(self.webpackChunkapp=self.webpackChunkapp||[]).push([[179],{45764:(qe,I,p)=>{"use strict";p.d(I,{B:()=>Xn,H:()=>Ve,a:()=>Ai,b:()=>Pn,c:()=>si,d:()=>Zn,e:()=>Nt,f:()=>gr,g:()=>Z,h:()=>mt,p:()=>ue,r:()=>Le,s:()=>le,w:()=>Ci});var o=p(15861);let l,D,g,E=!1,T=!1,n=!1,P=!1,w=!1;const B=typeof window<"u"?window:{},Y=B.document||{head:{}},V={$flags$:0,$resourcesUrl$:"",jmp:Et=>Et(),raf:Et=>requestAnimationFrame(Et),ael:(Et,gn,ei,un)=>Et.addEventListener(gn,ei,un),rel:(Et,gn,ei,un)=>Et.removeEventListener(gn,ei,un),ce:(Et,gn)=>new CustomEvent(Et,gn)},ue=Et=>Promise.resolve(Et),he=(()=>{try{return new CSSStyleSheet,!0}catch{}return!1})(),ae=(Et,gn,ei,un)=>{ei&&ei.map(([Ft,Ut,wn])=>{const Gn=ve(Et,Ft),xi=X(gn,wn),Cr=ye(Ft);V.ael(Gn,Ut,xi,Cr),(gn.$rmListeners$=gn.$rmListeners$||[]).push(()=>V.rel(Gn,Ut,xi,Cr))})},X=(Et,gn)=>ei=>{try{256&Et.$flags$?Et.$lazyInstance$[gn](ei):(Et.$queuedListeners$=Et.$queuedListeners$||[]).push([gn,ei])}catch(un){Qe(un)}},ve=(Et,gn)=>4&gn?Y:8&gn?B:16&gn?Y.body:Et,ye=Et=>0!=(2&Et),ne="http://www.w3.org/1999/xlink",xe=new WeakMap,oe=Et=>{const gn=Et.$cmpMeta$,ei=Et.$hostElement$,un=gn.$flags$,Ft=(gn.$tagName$,()=>{}),Ut=((Et,gn,ei,un)=>{let Ft=me(gn,ei),Ut=lr.get(Ft);if(Et=11===Et.nodeType?Et:Y,Ut)if("string"==typeof Ut){Et=Et.head||Et;let Gn,wn=xe.get(Et);wn||xe.set(Et,wn=new Set),wn.has(Ft)||(Gn=Y.createElement("style"),Gn.innerHTML=Ut,Et.insertBefore(Gn,Et.querySelector("link")),wn&&wn.add(Ft))}else Et.adoptedStyleSheets.includes(Ut)||(Et.adoptedStyleSheets=[...Et.adoptedStyleSheets,Ut]);return Ft})(ei.shadowRoot?ei.shadowRoot:ei.getRootNode(),gn,Et.$modeName$);10&un&&(ei["s-sc"]=Ut,ei.classList.add(Ut+"-h"),2&un&&ei.classList.add(Ut+"-s")),Ft()},me=(Et,gn)=>"sc-"+(gn&&32&Et.$flags$?Et.$tagName$+"-"+gn:Et.$tagName$),le=Et=>mo.push(Et),Z=Et=>hn(Et).$modeName$,Oe={},nt=Et=>"object"===(Et=typeof Et)||"function"===Et,mt=(Et,gn,...ei)=>{let un=null,Ft=null,Ut=null,wn=!1,Gn=!1,xi=[];const Cr=en=>{for(let Wn=0;Wn<en.length;Wn++)un=en[Wn],Array.isArray(un)?Cr(un):null!=un&&"boolean"!=typeof un&&((wn="function"!=typeof Et&&!nt(un))&&(un=String(un)),wn&&Gn?xi[xi.length-1].$text$+=un:xi.push(wn?ut(null,un):un),Gn=wn)};if(Cr(ei),gn){gn.key&&(Ft=gn.key),gn.name&&(Ut=gn.name);{const en=gn.className||gn.class;en&&(gn.class="object"!=typeof en?en:Object.keys(en).filter(Wn=>en[Wn]).join(" "))}}if("function"==typeof Et)return Et(null===gn?{}:gn,xi,Ne);const Fr=ut(Et,null);return Fr.$attrs$=gn,xi.length>0&&(Fr.$children$=xi),Fr.$key$=Ft,Fr.$name$=Ut,Fr},ut=(Et,gn)=>{const ei={$flags$:0,$tag$:Et,$text$:gn,$elm$:null,$children$:null,$attrs$:null,$key$:null,$name$:null};return ei},Ve={},Ne={forEach:(Et,gn)=>Et.map(wt).forEach(gn),map:(Et,gn)=>Et.map(wt).map(gn).map(ft)},wt=Et=>({vattrs:Et.$attrs$,vchildren:Et.$children$,vkey:Et.$key$,vname:Et.$name$,vtag:Et.$tag$,vtext:Et.$text$}),ft=Et=>{if("function"==typeof Et.vtag){const ei=Object.assign({},Et.vattrs);return Et.vkey&&(ei.key=Et.vkey),Et.vname&&(ei.name=Et.vname),mt(Et.vtag,ei,...Et.vchildren||[])}const gn=ut(Et.vtag,Et.vtext);return gn.$attrs$=Et.vattrs,gn.$children$=Et.vchildren,gn.$key$=Et.vkey,gn.$name$=Et.vname,gn},Ct=(Et,gn,ei,un,Ft,Ut)=>{if(ei!==un){let wn=we(Et,gn),Gn=gn.toLowerCase();if("class"===gn){const xi=Et.classList,Cr=He(ei),Fr=He(un);xi.remove(...Cr.filter(en=>en&&!Fr.includes(en))),xi.add(...Fr.filter(en=>en&&!Cr.includes(en)))}else if("style"===gn){for(const xi in ei)(!un||null==un[xi])&&(xi.includes("-")?Et.style.removeProperty(xi):Et.style[xi]="");for(const xi in un)(!ei||un[xi]!==ei[xi])&&(xi.includes("-")?Et.style.setProperty(xi,un[xi]):Et.style[xi]=un[xi])}else if("key"!==gn)if("ref"===gn)un&&un(Et);else if(wn||"o"!==gn[0]||"n"!==gn[1]){const xi=nt(un);if((wn||xi&&null!==un)&&!Ft)try{if(Et.tagName.includes("-"))Et[gn]=un;else{let Fr=un??"";"list"===gn?wn=!1:(null==ei||Et[gn]!=Fr)&&(Et[gn]=Fr)}}catch{}let Cr=!1;Gn!==(Gn=Gn.replace(/^xlink\:?/,""))&&(gn=Gn,Cr=!0),null==un||!1===un?(!1!==un||""===Et.getAttribute(gn))&&(Cr?Et.removeAttributeNS(ne,gn):Et.removeAttribute(gn)):(!wn||4&Ut||Ft)&&!xi&&(un=!0===un?"":un,Cr?Et.setAttributeNS(ne,gn,un):Et.setAttribute(gn,un))}else gn="-"===gn[2]?gn.slice(3):we(B,Gn)?Gn.slice(2):Gn[2]+gn.slice(3),ei&&V.rel(Et,gn,ei,!1),un&&V.ael(Et,gn,un,!1)}},rn=/\s/,He=Et=>Et?Et.split(rn):[],st=(Et,gn,ei,un)=>{const Ft=11===gn.$elm$.nodeType&&gn.$elm$.host?gn.$elm$.host:gn.$elm$,Ut=Et&&Et.$attrs$||Oe,wn=gn.$attrs$||Oe;for(un in Ut)un in wn||Ct(Ft,un,Ut[un],void 0,ei,gn.$flags$);for(un in wn)Ct(Ft,un,Ut[un],wn[un],ei,gn.$flags$)},nn=(Et,gn,ei,un)=>{let wn,Gn,xi,Ft=gn.$children$[ei],Ut=0;if(E||(n=!0,"slot"===Ft.$tag$&&(l&&un.classList.add(l+"-s"),Ft.$flags$|=Ft.$children$?2:1)),null!==Ft.$text$)wn=Ft.$elm$=Y.createTextNode(Ft.$text$);else if(1&Ft.$flags$)wn=Ft.$elm$=Y.createTextNode("");else{if(P||(P="svg"===Ft.$tag$),wn=Ft.$elm$=Y.createElementNS(P?"http://www.w3.org/2000/svg":"http://www.w3.org/1999/xhtml",2&Ft.$flags$?"slot-fb":Ft.$tag$),P&&"foreignObject"===Ft.$tag$&&(P=!1),st(null,Ft,P),(Et=>null!=Et)(l)&&wn["s-si"]!==l&&wn.classList.add(wn["s-si"]=l),Ft.$children$)for(Ut=0;Ut<Ft.$children$.length;++Ut)Gn=nn(Et,Ft,Ut,wn),Gn&&wn.appendChild(Gn);"svg"===Ft.$tag$?P=!1:"foreignObject"===wn.tagName&&(P=!0)}return wn["s-hn"]=g,3&Ft.$flags$&&(wn["s-sr"]=!0,wn["s-cr"]=D,wn["s-sn"]=Ft.$name$||"",xi=Et&&Et.$children$&&Et.$children$[ei],xi&&xi.$tag$===Ft.$tag$&&Et.$elm$&&Dn(Et.$elm$,!1)),wn},Dn=(Et,gn)=>{V.$flags$|=1;const ei=Et.childNodes;for(let un=ei.length-1;un>=0;un--){const Ft=ei[un];Ft["s-hn"]!==g&&Ft["s-ol"]&&(Bn(Ft).insertBefore(Ft,wi(Ft)),Ft["s-ol"].remove(),Ft["s-ol"]=void 0,n=!0),gn&&Dn(Ft,gn)}V.$flags$&=-2},Mn=(Et,gn,ei,un,Ft,Ut)=>{let Gn,wn=Et["s-cr"]&&Et["s-cr"].parentNode||Et;for(wn.shadowRoot&&wn.tagName===g&&(wn=wn.shadowRoot);Ft<=Ut;++Ft)un[Ft]&&(Gn=nn(null,ei,Ft,Et),Gn&&(un[Ft].$elm$=Gn,wn.insertBefore(Gn,wi(gn))))},vi=(Et,gn,ei,un,Ft)=>{for(;gn<=ei;++gn)(un=Et[gn])&&(Ft=un.$elm$,Fn(un),T=!0,Ft["s-ol"]?Ft["s-ol"].remove():Dn(Ft,!0),Ft.remove())},mi=(Et,gn)=>Et.$tag$===gn.$tag$&&("slot"===Et.$tag$?Et.$name$===gn.$name$:Et.$key$===gn.$key$),wi=Et=>Et&&Et["s-ol"]||Et,Bn=Et=>(Et["s-ol"]?Et["s-ol"]:Et).parentNode,kn=(Et,gn)=>{const ei=gn.$elm$=Et.$elm$,un=Et.$children$,Ft=gn.$children$,Ut=gn.$tag$,wn=gn.$text$;let Gn;null===wn?(P="svg"===Ut||"foreignObject"!==Ut&&P,"slot"===Ut||st(Et,gn,P),null!==un&&null!==Ft?((Et,gn,ei,un)=>{let It,Qt,Ft=0,Ut=0,wn=0,Gn=0,xi=gn.length-1,Cr=gn[0],Fr=gn[xi],en=un.length-1,Wn=un[0],at=un[en];for(;Ft<=xi&&Ut<=en;)if(null==Cr)Cr=gn[++Ft];else if(null==Fr)Fr=gn[--xi];else if(null==Wn)Wn=un[++Ut];else if(null==at)at=un[--en];else if(mi(Cr,Wn))kn(Cr,Wn),Cr=gn[++Ft],Wn=un[++Ut];else if(mi(Fr,at))kn(Fr,at),Fr=gn[--xi],at=un[--en];else if(mi(Cr,at))("slot"===Cr.$tag$||"slot"===at.$tag$)&&Dn(Cr.$elm$.parentNode,!1),kn(Cr,at),Et.insertBefore(Cr.$elm$,Fr.$elm$.nextSibling),Cr=gn[++Ft],at=un[--en];else if(mi(Fr,Wn))("slot"===Cr.$tag$||"slot"===at.$tag$)&&Dn(Fr.$elm$.parentNode,!1),kn(Fr,Wn),Et.insertBefore(Fr.$elm$,Cr.$elm$),Fr=gn[--xi],Wn=un[++Ut];else{for(wn=-1,Gn=Ft;Gn<=xi;++Gn)if(gn[Gn]&&null!==gn[Gn].$key$&&gn[Gn].$key$===Wn.$key$){wn=Gn;break}wn>=0?(Qt=gn[wn],Qt.$tag$!==Wn.$tag$?It=nn(gn&&gn[Ut],ei,wn,Et):(kn(Qt,Wn),gn[wn]=void 0,It=Qt.$elm$),Wn=un[++Ut]):(It=nn(gn&&gn[Ut],ei,Ut,Et),Wn=un[++Ut]),It&&Bn(Cr.$elm$).insertBefore(It,wi(Cr.$elm$))}Ft>xi?Mn(Et,null==un[en+1]?null:un[en+1].$elm$,ei,un,Ut,en):Ut>en&&vi(gn,Ft,xi)})(ei,un,gn,Ft):null!==Ft?(null!==Et.$text$&&(ei.textContent=""),Mn(ei,null,gn,Ft,0,Ft.length-1)):null!==un&&vi(un,0,un.length-1),P&&"svg"===Ut&&(P=!1)):(Gn=ei["s-cr"])?Gn.parentNode.textContent=wn:Et.$text$!==wn&&(ei.data=wn)},On=Et=>{let ei,un,Ft,Ut,wn,Gn,gn=Et.childNodes;for(un=0,Ft=gn.length;un<Ft;un++)if(ei=gn[un],1===ei.nodeType){if(ei["s-sr"])for(wn=ei["s-sn"],ei.hidden=!1,Ut=0;Ut<Ft;Ut++)if(gn[Ut]["s-hn"]!==ei["s-hn"])if(Gn=gn[Ut].nodeType,""!==wn){if(1===Gn&&wn===gn[Ut].getAttribute("slot")){ei.hidden=!0;break}}else if(1===Gn||3===Gn&&""!==gn[Ut].textContent.trim()){ei.hidden=!0;break}On(ei)}},je=[],Bt=Et=>{let gn,ei,un,Ft,Ut,wn,Gn=0,xi=Et.childNodes,Cr=xi.length;for(;Gn<Cr;Gn++){if(gn=xi[Gn],gn["s-sr"]&&(ei=gn["s-cr"]))for(un=ei.parentNode.childNodes,Ft=gn["s-sn"],wn=un.length-1;wn>=0;wn--)ei=un[wn],!ei["s-cn"]&&!ei["s-nr"]&&ei["s-hn"]!==gn["s-hn"]&&(xn(ei,Ft)?(Ut=je.find(Fr=>Fr.$nodeToRelocate$===ei),T=!0,ei["s-sn"]=ei["s-sn"]||Ft,Ut?Ut.$slotRefNode$=gn:je.push({$slotRefNode$:gn,$nodeToRelocate$:ei}),ei["s-sr"]&&je.map(Fr=>{xn(Fr.$nodeToRelocate$,ei["s-sn"])&&(Ut=je.find(en=>en.$nodeToRelocate$===ei),Ut&&!Fr.$slotRefNode$&&(Fr.$slotRefNode$=Ut.$slotRefNode$))})):je.some(Fr=>Fr.$nodeToRelocate$===ei)||je.push({$nodeToRelocate$:ei}));1===gn.nodeType&&Bt(gn)}},xn=(Et,gn)=>1===Et.nodeType?null===Et.getAttribute("slot")&&""===gn||Et.getAttribute("slot")===gn:Et["s-sn"]===gn||""===gn,Fn=Et=>{Et.$attrs$&&Et.$attrs$.ref&&Et.$attrs$.ref(null),Et.$children$&&Et.$children$.map(Fn)},ui=(Et,gn)=>{const ei=Et.$hostElement$,un=Et.$cmpMeta$,Ft=Et.$vnode$||ut(null,null),Ut=(Et=>Et&&Et.$tag$===Ve)(gn)?gn:mt(null,null,gn);if(g=ei.tagName,un.$attrsToReflect$&&(Ut.$attrs$=Ut.$attrs$||{},un.$attrsToReflect$.map(([wn,Gn])=>Ut.$attrs$[Gn]=ei[wn])),Ut.$tag$=null,Ut.$flags$|=4,Et.$vnode$=Ut,Ut.$elm$=Ft.$elm$=ei.shadowRoot||ei,l=ei["s-sc"],D=ei["s-cr"],E=0!=(1&un.$flags$),T=!1,kn(Ft,Ut),V.$flags$|=1,n){Bt(Ut.$elm$);let wn,Gn,xi,Cr,Fr,en,Wn=0;for(;Wn<je.length;Wn++)wn=je[Wn],Gn=wn.$nodeToRelocate$,Gn["s-ol"]||(xi=Y.createTextNode(""),xi["s-nr"]=Gn,Gn.parentNode.insertBefore(Gn["s-ol"]=xi,Gn));for(Wn=0;Wn<je.length;Wn++)if(wn=je[Wn],Gn=wn.$nodeToRelocate$,wn.$slotRefNode$){for(Cr=wn.$slotRefNode$.parentNode,Fr=wn.$slotRefNode$.nextSibling,xi=Gn["s-ol"];xi=xi.previousSibling;)if(en=xi["s-nr"],en&&en["s-sn"]===Gn["s-sn"]&&Cr===en.parentNode&&(en=en.nextSibling,!en||!en["s-nr"])){Fr=en;break}(!Fr&&Cr!==Gn.parentNode||Gn.nextSibling!==Fr)&&Gn!==Fr&&(!Gn["s-hn"]&&Gn["s-ol"]&&(Gn["s-hn"]=Gn["s-ol"].parentNode.nodeName),Cr.insertBefore(Gn,Fr))}else 1===Gn.nodeType&&(Gn.hidden=!0)}T&&On(Ut.$elm$),V.$flags$&=-2,je.length=0},Ai=Et=>hn(Et).$hostElement$,si=(Et,gn,ei)=>{const un=Ai(Et);return{emit:Ft=>Vi(un,gn,{bubbles:!!(4&ei),composed:!!(2&ei),cancelable:!!(1&ei),detail:Ft})}},Vi=(Et,gn,ei)=>{const un=V.ce(gn,ei);return Et.dispatchEvent(un),un},Vn=(Et,gn)=>{gn&&!Et.$onRenderResolve$&&gn["s-p"]&&gn["s-p"].push(new Promise(ei=>Et.$onRenderResolve$=ei))},Hn=(Et,gn)=>{if(Et.$flags$|=16,!(4&Et.$flags$))return Vn(Et,Et.$ancestorComponent$),Ci(()=>An(Et,gn));Et.$flags$|=512},An=(Et,gn)=>{const ei=(Et.$cmpMeta$.$tagName$,()=>{}),un=Et.$lazyInstance$;let Ft;return gn?(Et.$flags$|=256,Et.$queuedListeners$&&(Et.$queuedListeners$.map(([Ut,wn])=>Gr(un,Ut,wn)),Et.$queuedListeners$=null),Ft=Gr(un,"componentWillLoad")):Ft=Gr(un,"componentWillUpdate"),Ft=zr(Ft,()=>Gr(un,"componentWillRender")),ei(),zr(Ft,()=>vn(Et,un,gn))},vn=function(){var Et=(0,o.Z)(function*(gn,ei,un){const Ft=gn.$hostElement$,Ut=(gn.$cmpMeta$.$tagName$,()=>{}),wn=Ft["s-rc"];un&&oe(gn);const Gn=(gn.$cmpMeta$.$tagName$,()=>{});ui(gn,In(gn,ei)),wn&&(wn.map(xi=>xi()),Ft["s-rc"]=void 0),Gn(),Ut();{const xi=Ft["s-p"],Cr=()=>Zi(gn);0===xi.length?Cr():(Promise.all(xi).then(Cr),gn.$flags$|=4,xi.length=0)}});return function(ei,un,Ft){return Et.apply(this,arguments)}}(),In=(Et,gn)=>{try{gn=gn.render&&gn.render(),Et.$flags$&=-17,Et.$flags$|=2}catch(ei){Qe(ei,Et.$hostElement$)}return gn},Zi=Et=>{Et.$cmpMeta$.$tagName$;const ei=Et.$hostElement$,un=()=>{},Ft=Et.$lazyInstance$,Ut=Et.$ancestorComponent$;64&Et.$flags$?(Gr(Ft,"componentDidUpdate"),un()):(Et.$flags$|=64,Eo(ei),Gr(Ft,"componentDidLoad"),un(),Et.$onReadyResolve$(ei),Ut||Hi()),Et.$onInstanceResolve$(ei),Et.$onRenderResolve$&&(Et.$onRenderResolve$(),Et.$onRenderResolve$=void 0),512&Et.$flags$&&an(()=>Hn(Et,!1)),Et.$flags$&=-517},gr=Et=>{{const gn=hn(Et),ei=gn.$hostElement$.isConnected;return ei&&2==(18&gn.$flags$)&&Hn(gn,!1),ei}},Hi=Et=>{Eo(Y.documentElement),an(()=>Vi(B,"appload",{detail:{namespace:"sivi-common-ui"}}))},Gr=(Et,gn,ei)=>{if(Et&&Et[gn])try{return Et[gn](ei)}catch(un){Qe(un)}},zr=(Et,gn)=>Et&&Et.then?Et.then(gn):gn(),Eo=Et=>Et.classList.add("hydrated"),ct=(Et,gn,ei,un)=>{const Ft=hn(Et),Ut=Ft.$hostElement$,wn=Ft.$instanceValues$.get(gn),Gn=Ft.$flags$,xi=Ft.$lazyInstance$;if(ei=((Et,gn)=>null==Et||nt(Et)?Et:4&gn?"false"!==Et&&(""===Et||!!Et):2&gn?parseFloat(Et):1&gn?String(Et):Et)(ei,un.$members$[gn][0]),(!(8&Gn)||void 0===wn)&&ei!==wn&&(Ft.$instanceValues$.set(gn,ei),xi)){if(un.$watchers$&&128&Gn){const Cr=un.$watchers$[gn];Cr&&Cr.map(Fr=>{try{xi[Fr](ei,wn,gn)}catch(en){Qe(en,Ut)}})}2==(18&Gn)&&Hn(Ft,!1)}},Yt=(Et,gn,ei)=>{if(gn.$members$){Et.watchers&&(gn.$watchers$=Et.watchers);const un=Object.entries(gn.$members$),Ft=Et.prototype;if(un.map(([Ut,[wn]])=>{31&wn||2&ei&&32&wn?Object.defineProperty(Ft,Ut,{get(){return((Et,gn)=>hn(Et).$instanceValues$.get(gn))(this,Ut)},set(Gn){ct(this,Ut,Gn,gn)},configurable:!0,enumerable:!0}):1&ei&&64&wn&&Object.defineProperty(Ft,Ut,{value(...Gn){const xi=hn(this);return xi.$onInstancePromise$.then(()=>xi.$lazyInstance$[Ut](...Gn))}})}),1&ei){const Ut=new Map;Ft.attributeChangedCallback=function(wn,Gn,xi){V.jmp(()=>{const Cr=Ut.get(wn);this[Cr]=(null!==xi||"boolean"!=typeof this[Cr])&&xi})},Et.observedAttributes=un.filter(([wn,Gn])=>15&Gn[0]).map(([wn,Gn])=>{const xi=Gn[1]||wn;return Ut.set(xi,wn),512&Gn[0]&&gn.$attrsToReflect$.push([wn,xi]),xi})}}return Et},oi=function(){var Et=(0,o.Z)(function*(gn,ei,un,Ft,Ut){if(!(32&ei.$flags$)){{if(ei.$flags$|=32,(Ut=Tn(un)).then){const Cr=()=>{};Ut=yield Ut,Cr()}Ut.isProxied||(un.$watchers$=Ut.watchers,Yt(Ut,un,2),Ut.isProxied=!0);const xi=(un.$tagName$,()=>{});ei.$flags$|=8;try{new Ut(ei)}catch(Cr){Qe(Cr)}ei.$flags$&=-9,ei.$flags$|=128,xi(),Ni(ei.$lazyInstance$)}if(Ut.style){let xi=Ut.style;"string"!=typeof xi&&(xi=xi[ei.$modeName$=(Et=>mo.map(gn=>gn(Et)).find(gn=>!!gn))(gn)]);const Cr=me(un,ei.$modeName$);if(!lr.has(Cr)){const Fr=(un.$tagName$,()=>{});((Et,gn,ei)=>{let un=lr.get(Et);he&&ei?(un=un||new CSSStyleSheet,un.replace(gn)):un=gn,lr.set(Et,un)})(Cr,xi,!!(1&un.$flags$)),Fr()}}}const wn=ei.$ancestorComponent$,Gn=()=>Hn(ei,!0);wn&&wn["s-rc"]?wn["s-rc"].push(Gn):Gn()});return function(ei,un,Ft,Ut,wn){return Et.apply(this,arguments)}}(),Ni=Et=>{Gr(Et,"connectedCallback")},pr=Et=>{const gn=Et["s-cr"]=Y.createComment("");gn["s-cn"]=!0,Et.insertBefore(gn,Et.firstChild)},Pn=(Et,gn={})=>{const ei=()=>{},un=[],Ft=gn.exclude||[],Ut=B.customElements,wn=Y.head,Gn=wn.querySelector("meta[charset]"),xi=Y.createElement("style"),Cr=[];let Fr,en=!0;Object.assign(V,gn),V.$resourcesUrl$=new URL(gn.resourcesUrl||"./",Y.baseURI).href,Et.map(Wn=>Wn[1].map(at=>{const It={$flags$:at[0],$tagName$:at[1],$members$:at[2],$listeners$:at[3]};It.$members$=at[2],It.$listeners$=at[3],It.$attrsToReflect$=[],It.$watchers$={};const Qt=It.$tagName$,St=class extends HTMLElement{constructor(Pt){super(Pt),ce(Pt=this,It),1&It.$flags$&&Pt.attachShadow({mode:"open",delegatesFocus:!!(16&It.$flags$)})}connectedCallback(){Fr&&(clearTimeout(Fr),Fr=null),en?Cr.push(this):V.jmp(()=>(Et=>{if(!(1&V.$flags$)){const gn=hn(Et),ei=gn.$cmpMeta$,un=(ei.$tagName$,()=>{});if(1&gn.$flags$)ae(Et,gn,ei.$listeners$),Ni(gn.$lazyInstance$);else{gn.$flags$|=1,12&ei.$flags$&&pr(Et);{let Ft=Et;for(;Ft=Ft.parentNode||Ft.host;)if(Ft["s-p"]){Vn(gn,gn.$ancestorComponent$=Ft);break}}ei.$members$&&Object.entries(ei.$members$).map(([Ft,[Ut]])=>{if(31&Ut&&Et.hasOwnProperty(Ft)){const wn=Et[Ft];delete Et[Ft],Et[Ft]=wn}}),oi(Et,gn,ei)}un()}})(this))}disconnectedCallback(){V.jmp(()=>(Et=>{if(!(1&V.$flags$)){const gn=hn(Et),ei=gn.$lazyInstance$;gn.$rmListeners$&&(gn.$rmListeners$.map(un=>un()),gn.$rmListeners$=void 0),Gr(ei,"disconnectedCallback")}})(this))}componentOnReady(){return hn(this).$onReadyPromise$}};It.$lazyBundleId$=Wn[0],!Ft.includes(Qt)&&!Ut.get(Qt)&&(un.push(Qt),Ut.define(Qt,Yt(St,It,1)))})),xi.innerHTML=un+"{visibility:hidden}.hydrated{visibility:inherit}",xi.setAttribute("data-styles",""),wn.insertBefore(xi,Gn?Gn.nextSibling:wn.firstChild),en=!1,Cr.length?Cr.map(Wn=>Wn.connectedCallback()):V.jmp(()=>Fr=setTimeout(Hi,30)),ei()},Nt=Et=>{const gn=new URL(Et,V.$resourcesUrl$);return gn.origin!==B.location.origin?gn.href:gn.pathname},ai=new WeakMap,hn=Et=>ai.get(Et),Le=(Et,gn)=>ai.set(gn.$lazyInstance$=Et,gn),ce=(Et,gn)=>{const ei={$flags$:0,$hostElement$:Et,$cmpMeta$:gn,$instanceValues$:new Map};return ei.$onInstancePromise$=new Promise(un=>ei.$onInstanceResolve$=un),ei.$onReadyPromise$=new Promise(un=>ei.$onReadyResolve$=un),Et["s-p"]=[],Et["s-rc"]=[],ae(Et,ei,gn.$listeners$),ai.set(Et,ei)},we=(Et,gn)=>gn in Et,Qe=(Et,gn)=>(0,console.error)(Et,gn),qt=new Map,Tn=(Et,gn,ei)=>{const un=Et.$tagName$.replace(/-/g,"_"),Ft=Et.$lazyBundleId$,Ut=qt.get(Ft);return Ut?Ut[un]:p(6123)(`./${Ft}.entry.js`).then(wn=>(qt.set(Ft,wn),wn[un]),Qe)},lr=new Map,mo=[],rr=[],aa=[],ea=(Et,gn)=>ei=>{Et.push(ei),w||(w=!0,gn&&4&V.$flags$?an(Ii):V.raf(Ii))},Bo=Et=>{for(let gn=0;gn<Et.length;gn++)try{Et[gn](performance.now())}catch(ei){Qe(ei)}Et.length=0},Ii=()=>{Bo(rr),Bo(aa),(w=rr.length>0)&&V.raf(Ii)},an=Et=>ue().then(Et),Zn=ea(rr,!1),Ci=ea(aa,!0),Xn={isDev:!1,isBrowser:!0,isServer:!1,isTesting:!1}},1563:(qe,I,p)=>{"use strict";p.d(I,{a:()=>l,c:()=>de,g:()=>j,i:()=>ke});var o=p(45764);const l=(Be,nt)=>("string"==typeof Be&&(nt=Be,Be=void 0),(Be=>D(Be))(Be).includes(nt)),D=(Be=window)=>{if(typeof Be>"u")return[];Be.Ionic=Be.Ionic||{};let nt=Be.Ionic.platforms;return null==nt&&(nt=Be.Ionic.platforms=g(Be),nt.forEach(mt=>Be.document.documentElement.classList.add(`plt-${mt}`))),nt},g=Be=>Object.keys(Pe).filter(nt=>Pe[nt](Be)),T=Be=>!!(ne(Be,/iPad/i)||ne(Be,/Macintosh/i)&&ue(Be)),w=Be=>ne(Be,/android|sink/i),ue=Be=>pe(Be,"(any-pointer:coarse)"),ae=Be=>X(Be)||ve(Be),X=Be=>!!(Be.cordova||Be.phonegap||Be.PhoneGap),ve=Be=>{const nt=Be.Capacitor;return!(!nt||!nt.isNative)},ne=(Be,nt)=>nt.test(Be.navigator.userAgent),pe=(Be,nt)=>Be.matchMedia(nt).matches,Pe={ipad:T,iphone:Be=>ne(Be,/iPhone/i),ios:Be=>ne(Be,/iPhone|iPod/i)||T(Be),android:w,phablet:Be=>{const nt=Be.innerWidth,mt=Be.innerHeight,ut=Math.min(nt,mt),Ve=Math.max(nt,mt);return ut>390&&ut<520&&Ve>620&&Ve<800},tablet:Be=>{const nt=Be.innerWidth,mt=Be.innerHeight,ut=Math.min(nt,mt),Ve=Math.max(nt,mt);return T(Be)||(Be=>w(Be)&&!ne(Be,/mobile/i))(Be)||ut>460&&ut<820&&Ve>780&&Ve<1400},cordova:X,capacitor:ve,electron:Be=>ne(Be,/electron/i),pwa:Be=>!(!Be.matchMedia("(display-mode: standalone)").matches&&!Be.navigator.standalone),mobile:ue,mobileweb:Be=>ue(Be)&&!ae(Be),desktop:Be=>!ue(Be),hybrid:ae};class xe{constructor(){this.m=new Map}reset(nt){this.m=new Map(Object.entries(nt))}get(nt,mt){const ut=this.m.get(nt);return void 0!==ut?ut:mt}getBoolean(nt,mt=!1){const ut=this.m.get(nt);return void 0===ut?mt:"string"==typeof ut?"true"===ut:!!ut}getNumber(nt,mt){const ut=parseFloat(this.m.get(nt));return isNaN(ut)?void 0!==mt?mt:NaN:ut}set(nt,mt){this.m.set(nt,mt)}}const de=new xe,be=(Be,nt)=>Be.substr(0,nt.length)===nt,le="ionic:",Z="ionic-persist-config";let Oe;const j=Be=>Be&&(0,o.g)(Be)||Oe,ke=(Be={})=>{if(typeof window>"u")return;const nt=window.document,mt=window,ut=mt.Ionic=mt.Ionic||{};D(mt);const Ve=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},(Be=>{try{const nt=Be.sessionStorage.getItem(Z);return null!==nt?JSON.parse(nt):{}}catch{return{}}})(mt)),{persistConfig:!1}),ut.config),(Be=>{const nt={};return Be.location.search.slice(1).split("&").map(mt=>mt.split("=")).map(([mt,ut])=>[decodeURIComponent(mt),decodeURIComponent(ut)]).filter(([mt])=>be(mt,le)).map(([mt,ut])=>[mt.slice(le.length),ut]).forEach(([mt,ut])=>{nt[mt]=ut}),nt})(mt)),Be);de.reset(Ve),de.getBoolean("persistConfig")&&((Be,nt)=>{try{Be.sessionStorage.setItem(Z,JSON.stringify(nt))}catch{return}})(mt,Ve),ut.config=de,ut.mode=Oe=de.get("mode",nt.documentElement.getAttribute("mode")||(l(mt,"ios")?"ios":"md")),de.set("mode",Oe),nt.documentElement.setAttribute("mode",Oe),nt.documentElement.classList.add(Oe),de.getBoolean("_testing")&&de.set("animated",!1);const tt=wt=>wt.tagName&&wt.tagName.startsWith("ION-"),Ne=wt=>["ios","md"].includes(wt);(0,o.s)(wt=>{for(;wt;){const ft=wt.mode||wt.getAttribute("mode");if(ft){if(Ne(ft))return ft;tt(wt)&&console.warn('Invalid ionic mode: "'+ft+'", expected: "ios" or "md"')}wt=wt.parentElement}return Oe})}},31534:(qe,I,p)=>{"use strict";p.d(I,{b:()=>D});var o=p(70655),e=p(94650),l=p(55419),D=function(g){function E(){return null!==g&&g.apply(this,arguments)||this}return(0,o.__extends)(E,g),E.prototype.getAppName=function(){return(0,l.DM)(this,"getAppName",{},arguments)},E.prototype.getPackageName=function(){return(0,l.DM)(this,"getPackageName",{},arguments)},E.prototype.getVersionCode=function(){return(0,l.DM)(this,"getVersionCode",{},arguments)},E.prototype.getVersionNumber=function(){return(0,l.DM)(this,"getVersionNumber",{},arguments)},E.pluginName="AppVersion",E.plugin="cordova-plugin-app-version",E.pluginRef="cordova.getAppVersion",E.repo="https://github.com/whiteoctober/cordova-plugin-app-version",E.platforms=["Android","iOS","Windows"],E.\u0275fac=function(){var T;return function(P){return(T||(T=e.n5z(E)))(P||E)}}(),E.\u0275prov=e.Yz7({token:E,factory:function(T){return E.\u0275fac(T)}}),E}(l.KY)},9646:(qe,I,p)=>{"use strict";p.d(I,{V1:()=>w});var D,B,g,E,T,n,P,o=p(70655),e=p(94650),l=p(55419);(B=D||(D={}))[B.DATA_URL=0]="DATA_URL",B[B.FILE_URL=1]="FILE_URL",B[B.NATIVE_URI=2]="NATIVE_URI",function(B){B[B.JPEG=0]="JPEG",B[B.PNG=1]="PNG"}(g||(g={})),function(B){B[B.PICTURE=0]="PICTURE",B[B.VIDEO=1]="VIDEO",B[B.ALLMEDIA=2]="ALLMEDIA"}(E||(E={})),function(B){B[B.PHOTOLIBRARY=0]="PHOTOLIBRARY",B[B.CAMERA=1]="CAMERA",B[B.SAVEDPHOTOALBUM=2]="SAVEDPHOTOALBUM"}(T||(T={})),function(B){B[B.ARROW_UP=1]="ARROW_UP",B[B.ARROW_DOWN=2]="ARROW_DOWN",B[B.ARROW_LEFT=3]="ARROW_LEFT",B[B.ARROW_RIGHT=4]="ARROW_RIGHT",B[B.ARROW_ANY=5]="ARROW_ANY"}(n||(n={})),function(B){B[B.BACK=0]="BACK",B[B.FRONT=1]="FRONT"}(P||(P={}));var w=function(B){function Y(){var V=null!==B&&B.apply(this,arguments)||this;return V.DestinationType={DATA_URL:0,FILE_URI:1,NATIVE_URI:2},V.EncodingType={JPEG:0,PNG:1},V.MediaType={PICTURE:0,VIDEO:1,ALLMEDIA:2},V.PictureSourceType={PHOTOLIBRARY:0,CAMERA:1,SAVEDPHOTOALBUM:2},V.PopoverArrowDirection={ARROW_UP:1,ARROW_DOWN:2,ARROW_LEFT:4,ARROW_RIGHT:8,ARROW_ANY:15},V.Direction={BACK:0,FRONT:1},V}return(0,o.__extends)(Y,B),Y.prototype.getPicture=function(V){return(0,l.DM)(this,"getPicture",{callbackOrder:"reverse"},arguments)},Y.prototype.cleanup=function(){return(0,l.DM)(this,"cleanup",{platforms:["iOS"]},arguments)},Y.pluginName="Camera",Y.plugin="cordova-plugin-camera",Y.pluginRef="navigator.camera",Y.repo="https://github.com/apache/cordova-plugin-camera",Y.platforms=["Android","Browser","iOS","Windows"],Y.\u0275fac=function(){var V;return function(he){return(V||(V=e.n5z(Y)))(he||Y)}}(),Y.\u0275prov=e.Yz7({token:Y,factory:function(V){return Y.\u0275fac(V)}}),Y}(l.KY)},55419:(qe,I,p)=>{"use strict";p.d(I,{KY:()=>xe,gR:()=>B,DM:()=>de,e4:()=>me,J2:()=>be,Iq:()=>le,sM:()=>E,G5:()=>Y});var e=p(69751),l=p(54968),D={error:"cordova_not_available"},g={error:"plugin_not_installed"};function E(Z){if(typeof window<"u"&&window.angular){var j=window.document,ke=window.angular.element(j.querySelector("[ng-app]")||j.body).injector();if(ke)return ke.get("$q")(function(nt,mt){Z(nt,mt)});console.warn("Angular 1 was detected but $q couldn't be retrieved. This is usually when the app is not bootstrapped on the html or body tag. Falling back to native promises which won't trigger an automatic digest when promises resolve.")}return function(){if(Promise)return new Promise(function(nt,mt){Z(nt,mt)});console.error("No Promise support or polyfill found. To enable Ionic Native support, please add the es6-promise polyfill before this script, or run with a library like Angular or on a recent browser.")}()}function B(Z,Oe,j){var ke,Be,nt;return"string"==typeof Z?ke=Z:(ke=Z.constructor.getPluginRef(),j=Z.constructor.getPluginName(),nt=Z.constructor.getPluginInstallName()),!(!(Be=ae(ke))||Oe&&typeof Be[Oe]>"u")||(typeof window>"u"||!window.cordova?(function ye(Z,Oe){typeof process>"u"&&console.warn(Oe?"Native: tried calling "+Z+"."+Oe+", but Cordova is not available. Make sure to include cordova.js or run in a device/simulator":"Native: tried accessing the "+Z+" plugin but Cordova is not available. Make sure to include cordova.js or run in a device/simulator")}(j,Oe),D):(function ve(Z,Oe,j){console.warn(j?"Native: tried calling "+Z+"."+j+", but the "+Z+" plugin is not installed.":"Native: tried accessing the "+Z+" plugin but it's not installed."),Oe&&console.warn("Install the "+Z+" plugin: 'ionic cordova plugin add "+Oe+"'")}(j,nt,Oe),g))}function Y(Z,Oe){return Z._objectInstance&&(!Oe||typeof Z._objectInstance[Oe]<"u")}function V(Z,Oe,j,ke){if(void 0===Oe&&(Oe={}),Oe.sync)return Z;if("reverse"===Oe.callbackOrder)Z.unshift(ke),Z.unshift(j);else if("node"===Oe.callbackStyle)Z.push(function(ut,Ve){ut?ke(ut):j(Ve)});else if("object"===Oe.callbackStyle&&Oe.successName&&Oe.errorName){var Be={};Be[Oe.successName]=j,Be[Oe.errorName]=ke,Z.push(Be)}else if(typeof Oe.successIndex<"u"||typeof Oe.errorIndex<"u"){var nt=function(){Oe.successIndex>Z.length?Z[Oe.successIndex]=j:Z.splice(Oe.successIndex,0,j)},mt=function(){Oe.errorIndex>Z.length?Z[Oe.errorIndex]=ke:Z.splice(Oe.errorIndex,0,ke)};Oe.successIndex>Oe.errorIndex?(mt(),nt()):(nt(),mt())}else Z.push(j),Z.push(ke);return Z}function ue(Z,Oe,j,ke,Be,nt){void 0===ke&&(ke={}),j=V(j,ke,Be,nt);var mt=B(Z,Oe);if(!0===mt){var ut=ae(Z.constructor.getPluginRef());return ut[Oe].apply(ut,j)}return mt}function he(Z,Oe,j,ke,Be,nt){if(void 0===ke&&(ke={}),j=V(j,ke,Be,nt),Y(Z,Oe))return Z._objectInstance[Oe].apply(Z._objectInstance,j)}function ae(Z){return typeof window<"u"?X(window,Z):null}function X(Z,Oe){for(var j=Oe.split("."),ke=Z,Be=0;Be<j.length;Be++){if(!ke)return null;ke=ke[j[Be]]}return ke}var ge=function(Z,Oe,j){return void 0===j&&(j={}),function(){for(var ke=[],Be=0;Be<arguments.length;Be++)ke[Be]=arguments[Be];return j.sync?ue(Z,Oe,ke,j):j.observable?function P(Z,Oe,j,ke){return void 0===ke&&(ke={}),new e.y(function(Be){var nt;return nt=ke.destruct?ue(Z,Oe,j,ke,function(){for(var mt=[],ut=0;ut<arguments.length;ut++)mt[ut]=arguments[ut];return Be.next(mt)},function(){for(var mt=[],ut=0;ut<arguments.length;ut++)mt[ut]=arguments[ut];return Be.error(mt)}):ue(Z,Oe,j,ke,Be.next.bind(Be),Be.error.bind(Be)),nt&&nt.error&&(Be.error(nt.error),Be.complete()),function(){try{if(ke.clearFunction)return ke.clearWithArgs?ue(Z,ke.clearFunction,j,ke,Be.next.bind(Be),Be.error.bind(Be)):ue(Z,ke.clearFunction,[])}catch(mt){console.warn("Unable to clear the previous observable watch for",Z.constructor.getPluginName(),Oe),console.warn(mt)}}})}(Z,Oe,ke,j):j.eventObservable&&j.event?function w(Z,Oe){return Oe=typeof window<"u"&&Oe?X(window,Oe):Oe||(typeof window<"u"?window:{}),(0,l.R)(Oe,Z)}(j.event,j.element):j.otherPromise?function n(Z,Oe,j,ke){return void 0===ke&&(ke={}),E(function(Be,nt){var mt=ue(Z,Oe,j,ke);mt?mt.error?nt(mt.error):mt.then&&mt.then(Be).catch(nt):nt({error:"unexpected_error"})})}(Z,Oe,ke,j):function T(Z,Oe,j,ke){void 0===ke&&(ke={});var Be,nt,mt=E(function(ut,Ve){Be=ke.destruct?ue(Z,Oe,j,ke,function(){for(var tt=[],Ne=0;Ne<arguments.length;Ne++)tt[Ne]=arguments[Ne];return ut(tt)},function(){for(var tt=[],Ne=0;Ne<arguments.length;Ne++)tt[Ne]=arguments[Ne];return Ve(tt)}):ue(Z,Oe,j,ke,ut,Ve),nt=Ve});return Be&&Be.error&&(mt.catch(function(){}),"function"==typeof nt&&nt(Be.error)),mt}(Z,Oe,ke,j)}};var xe=function(){function Z(){}return Z.installed=function(){return!0===B(this.pluginRef)},Z.getPlugin=function(){return typeof window<"u"?function pe(Z,Oe){for(var j=Oe.split("."),ke=Z,Be=0;Be<j.length;Be++){if(!ke)return null;ke=ke[j[Be]]}return ke}(window,this.pluginRef):null},Z.getPluginName=function(){return this.pluginName},Z.getPluginRef=function(){return this.pluginRef},Z.getPluginInstallName=function(){return this.plugin},Z.getSupportedPlatforms=function(){return this.platforms},Z.pluginName="",Z.pluginRef="",Z.plugin="",Z.repo="",Z.platforms=[],Z.install="",Z}();function de(Z,Oe,j,ke){return ge(Z,Oe,j).apply(this,ke)}function me(Z,Oe,j,ke){return ke=Array.from(ke),function ne(Z,Oe,j){return void 0===j&&(j={}),function(){for(var ke=[],Be=0;Be<arguments.length;Be++)ke[Be]=arguments[Be];if(j.sync)return he(Z,Oe,ke,j);if(j.observable)return new e.y(function(Ve){var tt;return tt=j.destruct?he(Z,Oe,ke,j,function(){for(var Ne=[],wt=0;wt<arguments.length;wt++)Ne[wt]=arguments[wt];return Ve.next(Ne)},function(){for(var Ne=[],wt=0;wt<arguments.length;wt++)Ne[wt]=arguments[wt];return Ve.error(Ne)}):he(Z,Oe,ke,j,Ve.next.bind(Ve),Ve.error.bind(Ve)),tt&&tt.error&&Ve.error(tt.error),function(){try{return j.clearWithArgs?he(Z,j.clearFunction,ke,j,Ve.next.bind(Ve),Ve.error.bind(Ve)):he(Z,j.clearFunction,[])}catch(Ne){console.warn("Unable to clear the previous observable watch for",Z.constructor.getPluginName(),Oe),console.warn(Ne)}}});if(j.otherPromise)return E(function(Ve,tt){var Ne;Ne=j.destruct?he(Z,Oe,ke,j,function(){for(var wt=[],ft=0;ft<arguments.length;ft++)wt[ft]=arguments[ft];return Ve(wt)},function(){for(var wt=[],ft=0;ft<arguments.length;ft++)wt[ft]=arguments[ft];return tt(wt)}):he(Z,Oe,ke,j,Ve,tt),Ne&&Ne.then?Ne.then(Ve,tt):tt()});var nt,mt,ut=E(function(Ve,tt){nt=j.destruct?he(Z,Oe,ke,j,function(){for(var Ne=[],wt=0;wt<arguments.length;wt++)Ne[wt]=arguments[wt];return Ve(Ne)},function(){for(var Ne=[],wt=0;wt<arguments.length;wt++)Ne[wt]=arguments[wt];return tt(Ne)}):he(Z,Oe,ke,j,Ve,tt),mt=tt});return nt&&nt.error&&(ut.catch(function(){}),"function"==typeof mt&&mt(nt.error)),ut}}(Z,Oe,j).apply(this,ke)}function be(Z,Oe){return!0===B(Z,Oe)?ae(Z.constructor.getPluginRef())[Oe]:null}function le(Z,Oe,j){!0===B(Z,Oe)&&(ae(Z.constructor.getPluginRef())[Oe]=j)}!function o(){if(typeof process>"u"){var Z=typeof window<"u"?window:{},j=Date.now(),ke=!1;Z.document.addEventListener("deviceready",function(){console.log("Ionic Native: deviceready event fired after "+(Date.now()-j)+" ms"),ke=!0}),setTimeout(function(){!ke&&Z.cordova&&console.warn("Ionic Native: deviceready did not fire within 5000ms. This can happen when plugins are in an inconsistent state. Try removing plugins from plugins/ and reinstalling them.")},5e3)}}()},25702:(qe,I,p)=>{"use strict";p.d(I,{A:()=>D});var o=p(70655),e=p(94650),l=p(55419),D=function(g){function E(){return null!==g&&g.apply(this,arguments)||this}return(0,o.__extends)(E,g),Object.defineProperty(E.prototype,"cordova",{get:function(){return(0,l.J2)(this,"cordova")},set:function(T){(0,l.Iq)(this,"cordova",T)},enumerable:!1,configurable:!0}),Object.defineProperty(E.prototype,"model",{get:function(){return(0,l.J2)(this,"model")},set:function(T){(0,l.Iq)(this,"model",T)},enumerable:!1,configurable:!0}),Object.defineProperty(E.prototype,"platform",{get:function(){return(0,l.J2)(this,"platform")},set:function(T){(0,l.Iq)(this,"platform",T)},enumerable:!1,configurable:!0}),Object.defineProperty(E.prototype,"uuid",{get:function(){return(0,l.J2)(this,"uuid")},set:function(T){(0,l.Iq)(this,"uuid",T)},enumerable:!1,configurable:!0}),Object.defineProperty(E.prototype,"version",{get:function(){return(0,l.J2)(this,"version")},set:function(T){(0,l.Iq)(this,"version",T)},enumerable:!1,configurable:!0}),Object.defineProperty(E.prototype,"manufacturer",{get:function(){return(0,l.J2)(this,"manufacturer")},set:function(T){(0,l.Iq)(this,"manufacturer",T)},enumerable:!1,configurable:!0}),Object.defineProperty(E.prototype,"isVirtual",{get:function(){return(0,l.J2)(this,"isVirtual")},set:function(T){(0,l.Iq)(this,"isVirtual",T)},enumerable:!1,configurable:!0}),Object.defineProperty(E.prototype,"serial",{get:function(){return(0,l.J2)(this,"serial")},set:function(T){(0,l.Iq)(this,"serial",T)},enumerable:!1,configurable:!0}),E.pluginName="Device",E.plugin="cordova-plugin-device",E.pluginRef="device",E.repo="https://github.com/apache/cordova-plugin-device",E.platforms=["Android","Browser","iOS","macOS","Windows"],E.\u0275fac=function(){var T;return function(P){return(T||(T=e.n5z(E)))(P||E)}}(),E.\u0275prov=e.Yz7({token:E,factory:function(T){return E.\u0275fac(T)}}),E}(l.KY)},63834:(qe,I,p)=>{"use strict";p.d(I,{u:()=>D});var o=p(70655),e=p(94650),l=p(55419),D=function(g){function E(){return null!==g&&g.apply(this,arguments)||this}return(0,o.__extends)(E,g),E.prototype.open=function(T,n){return(0,l.DM)(this,"open",{callbackStyle:"object",successName:"success",errorName:"error"},arguments)},E.prototype.uninstall=function(T){return(0,l.DM)(this,"uninstall",{callbackStyle:"object",successName:"success",errorName:"error"},arguments)},E.prototype.appIsInstalled=function(T){return(0,l.DM)(this,"appIsInstalled",{callbackStyle:"object",successName:"success",errorName:"error"},arguments)},E.prototype.showOpenWithDialog=function(T,n){return(0,l.DM)(this,"showOpenWithDialog",{callbackStyle:"object",successName:"success",errorName:"error"},arguments)},E.pluginName="FileOpener",E.plugin="cordova-plugin-file-opener2",E.pluginRef="cordova.plugins.fileOpener2",E.repo="https://github.com/pwlin/cordova-plugin-file-opener2",E.platforms=["Android","iOS","Windows","Windows Phone 8"],E.\u0275fac=function(){var T;return function(P){return(T||(T=e.n5z(E)))(P||E)}}(),E.\u0275prov=e.Yz7({token:E,factory:function(T){return E.\u0275fac(T)}}),E}(l.KY)},31111:(qe,I,p)=>{"use strict";p.d(I,{$:()=>D});var o=p(70655),e=p(94650),l=p(55419),D=function(g){function E(){var T=null!==g&&g.apply(this,arguments)||this;return T.cordovaFileError={1:"NOT_FOUND_ERR",2:"SECURITY_ERR",3:"ABORT_ERR",4:"NOT_READABLE_ERR",5:"ENCODING_ERR",6:"NO_MODIFICATION_ALLOWED_ERR",7:"INVALID_STATE_ERR",8:"SYNTAX_ERR",9:"INVALID_MODIFICATION_ERR",10:"QUOTA_EXCEEDED_ERR",11:"TYPE_MISMATCH_ERR",12:"PATH_EXISTS_ERR",13:"WRONG_ENTRY_TYPE",14:"DIR_READ_ERR"},T}return(0,o.__extends)(E,g),E.prototype.getFreeDiskSpace=function(){var T=this;return function(){if(!0===(0,l.gR)(T))return(0,l.sM)(function(n,P){cordova.exec(n,P,"File","getFreeDiskSpace",[])})}()},E.prototype.checkDir=function(T,n){var P=this;return function(){if(!0===(0,l.gR)(P)){if(/^\//.test(n)){var w=new FileError(5);return w.message="directory cannot start with /",Promise.reject(w)}var B=T+n;return P.resolveDirectoryUrl(B).then(function(){return!0})}}()},E.prototype.createDir=function(T,n,P){var w=this;return function(){if(!0===(0,l.gR)(w)){if(/^\//.test(n)){var B=new FileError(5);return B.message="directory cannot start with /",Promise.reject(B)}var Y={create:!0};return P||(Y.exclusive=!0),w.resolveDirectoryUrl(T).then(function(V){return w.getDirectory(V,n,Y)})}}()},E.prototype.removeDir=function(T,n){var P=this;return function(){if(!0===(0,l.gR)(P)){if(/^\//.test(n)){var w=new FileError(5);return w.message="directory cannot start with /",Promise.reject(w)}return P.resolveDirectoryUrl(T).then(function(B){return P.getDirectory(B,n,{create:!1})}).then(function(B){return P.remove(B)})}}()},E.prototype.moveDir=function(T,n,P,w){var B=this;return function(){if(!0===(0,l.gR)(B)){if(w=w||n,/^\//.test(w)){var Y=new FileError(5);return Y.message="directory cannot start with /",Promise.reject(Y)}return B.resolveDirectoryUrl(T).then(function(V){return B.getDirectory(V,n,{create:!1})}).then(function(V){return B.resolveDirectoryUrl(P).then(function(ue){return B.move(V,ue,w)})})}}()},E.prototype.copyDir=function(T,n,P,w){var B=this;return function(){if(!0===(0,l.gR)(B)){if(/^\//.test(w)){var Y=new FileError(5);return Y.message="directory cannot start with /",Promise.reject(Y)}return B.resolveDirectoryUrl(T).then(function(V){return B.getDirectory(V,n,{create:!1})}).then(function(V){return B.resolveDirectoryUrl(P).then(function(ue){return B.copy(V,ue,w)})})}}()},E.prototype.listDir=function(T,n){var P=this;return function(){if(!0===(0,l.gR)(P)){if(/^\//.test(n)){var w=new FileError(5);return w.message="directory cannot start with /",Promise.reject(w)}return P.resolveDirectoryUrl(T).then(function(B){return P.getDirectory(B,n,{create:!1,exclusive:!1})}).then(function(B){var Y=B.createReader();return P.readEntries(Y)})}}()},E.prototype.removeRecursively=function(T,n){var P=this;return function(){if(!0===(0,l.gR)(P)){if(/^\//.test(n)){var w=new FileError(5);return w.message="directory cannot start with /",Promise.reject(w)}return P.resolveDirectoryUrl(T).then(function(B){return P.getDirectory(B,n,{create:!1})}).then(function(B){return P.rimraf(B)})}}()},E.prototype.checkFile=function(T,n){var P=this;return function(){if(!0===(0,l.gR)(P)){if(/^\//.test(n)){var w=new FileError(5);return w.message="file cannot start with /",Promise.reject(w)}return P.resolveLocalFilesystemUrl(T+n).then(function(B){if(B.isFile)return!0;var Y=new FileError(13);return Y.message="input is not a file",Promise.reject(Y)})}}()},E.prototype.createFile=function(T,n,P){var w=this;return function(){if(!0===(0,l.gR)(w)){if(/^\//.test(n)){var B=new FileError(5);return B.message="file-name cannot start with /",Promise.reject(B)}var Y={create:!0};return P||(Y.exclusive=!0),w.resolveDirectoryUrl(T).then(function(V){return w.getFile(V,n,Y)})}}()},E.prototype.removeFile=function(T,n){var P=this;return function(){if(!0===(0,l.gR)(P)){if(/^\//.test(n)){var w=new FileError(5);return w.message="file-name cannot start with /",Promise.reject(w)}return P.resolveDirectoryUrl(T).then(function(B){return P.getFile(B,n,{create:!1})}).then(function(B){return P.remove(B)})}}()},E.prototype.writeFile=function(T,n,P,w){var B=this;return void 0===w&&(w={}),function(){if(!0===(0,l.gR)(B)){if(/^\//.test(n)){var Y=new FileError(5);return Y.message="file-name cannot start with /",Promise.reject(Y)}var V={create:!w.append,exclusive:!w.replace};return B.resolveDirectoryUrl(T).then(function(ue){return B.getFile(ue,n,V)}).then(function(ue){return B.writeFileEntry(ue,P,w)})}}()},E.prototype.writeFileEntry=function(T,n,P){var w=this;return this.createWriter(T).then(function(B){return P.append&&B.seek(B.length),P.truncate&&B.truncate(P.truncate),w.write(B,n)}).then(function(){return T})},E.prototype.writeExistingFile=function(T,n,P){var w=this;return function(){if(!0===(0,l.gR)(w))return w.writeFile(T,n,P,{replace:!0})}()},E.prototype.readAsText=function(T,n){var P=this;return function(){if(!0===(0,l.gR)(P))return P.readFile(T,n,"Text")}()},E.prototype.readAsDataURL=function(T,n){var P=this;return function(){if(!0===(0,l.gR)(P))return P.readFile(T,n,"DataURL")}()},E.prototype.readAsBinaryString=function(T,n){var P=this;return function(){if(!0===(0,l.gR)(P))return P.readFile(T,n,"BinaryString")}()},E.prototype.readAsArrayBuffer=function(T,n){var P=this;return function(){if(!0===(0,l.gR)(P))return P.readFile(T,n,"ArrayBuffer")}()},E.prototype.moveFile=function(T,n,P,w){var B=this;return function(){if(!0===(0,l.gR)(B)){if(w=w||n,/^\//.test(w)){var Y=new FileError(5);return Y.message="file name cannot start with /",Promise.reject(Y)}return B.resolveDirectoryUrl(T).then(function(V){return B.getFile(V,n,{create:!1})}).then(function(V){return B.resolveDirectoryUrl(P).then(function(ue){return B.move(V,ue,w)})})}}()},E.prototype.copyFile=function(T,n,P,w){var B=this;return function(){if(!0===(0,l.gR)(B)){if(w=w||n,/^\//.test(w)){var Y=new FileError(5);return Y.message="file name cannot start with /",Promise.reject(Y)}return B.resolveDirectoryUrl(T).then(function(V){return B.getFile(V,n,{create:!1})}).then(function(V){return B.resolveDirectoryUrl(P).then(function(ue){return B.copy(V,ue,w)})})}}()},E.prototype.fillErrorMessage=function(T){try{T.message=this.cordovaFileError[T.code]}catch{}},E.prototype.resolveLocalFilesystemUrl=function(T){var n=this;return function(){if(!0===(0,l.gR)(n))return(0,l.sM)(function(P,w){try{window.resolveLocalFileSystemURL(T,function(B){P(B)},function(B){n.fillErrorMessage(B),w(B)})}catch(B){n.fillErrorMessage(B),w(B)}})}()},E.prototype.resolveDirectoryUrl=function(T){var n=this;return function(){if(!0===(0,l.gR)(n))return n.resolveLocalFilesystemUrl(T).then(function(P){if(P.isDirectory)return P;var w=new FileError(13);return w.message="input is not a directory",Promise.reject(w)})}()},E.prototype.getDirectory=function(T,n,P){var w=this;return function(){if(!0===(0,l.gR)(w))return new Promise(function(B,Y){try{T.getDirectory(n,P,function(V){B(V)},function(V){w.fillErrorMessage(V),Y(V)})}catch(V){w.fillErrorMessage(V),Y(V)}})}()},E.prototype.getFile=function(T,n,P){var w=this;return function(){if(!0===(0,l.gR)(w))return new Promise(function(B,Y){try{T.getFile(n,P,B,function(V){w.fillErrorMessage(V),Y(V)})}catch(V){w.fillErrorMessage(V),Y(V)}})}()},E.prototype.readFile=function(T,n,P){var w=this;if(/^\//.test(n)){var B=new FileError(5);return B.message="file-name cannot start with /",Promise.reject(B)}return this.resolveDirectoryUrl(T).then(function(Y){return w.getFile(Y,n,{create:!1})}).then(function(Y){var V=new FileReader;return(0,l.sM)(function(ue,he){V.onloadend=function(){void 0!==V.result||null!==V.result?ue(V.result):void 0!==V.error||null!==V.error?he(V.error):he({code:null,message:"READER_ONLOADEND_ERR"})},Y.file(function(ae){V["readAs"+P].call(V,ae)},function(ae){he(ae)})})})},E.prototype.remove=function(T){var n=this;return new Promise(function(P,w){T.remove(function(){P({success:!0,fileRemoved:T})},function(B){n.fillErrorMessage(B),w(B)})})},E.prototype.move=function(T,n,P){var w=this;return new Promise(function(B,Y){T.moveTo(n,P,function(V){B(V)},function(V){w.fillErrorMessage(V),Y(V)})})},E.prototype.copy=function(T,n,P){var w=this;return new Promise(function(B,Y){T.copyTo(n,P,function(V){B(V)},function(V){w.fillErrorMessage(V),Y(V)})})},E.prototype.readEntries=function(T){var n=this;return new Promise(function(P,w){T.readEntries(function(B){P(B)},function(B){n.fillErrorMessage(B),w(B)})})},E.prototype.rimraf=function(T){var n=this;return new Promise(function(P,w){T.removeRecursively(function(){P({success:!0,fileRemoved:T})},function(B){n.fillErrorMessage(B),w(B)})})},E.prototype.createWriter=function(T){var n=this;return new Promise(function(P,w){T.createWriter(function(B){P(B)},function(B){n.fillErrorMessage(B),w(B)})})},E.prototype.write=function(T,n){return n instanceof Blob?this.writeFileInChunks(T,n):new Promise(function(P,w){T.onwriteend=function(B){T.error?w(T.error):P(B)},T.write(n)})},E.prototype.writeFileInChunks=function(T,n){var P=1048576,w=0;function B(){var Y=Math.min(P,n.size-w),V=n.slice(w,w+Y);w+=Y,T.write(V)}return(0,l.sM)(function(Y,V){T.onerror=V,T.onwrite=function(){w<n.size?B():Y()},B()})},Object.defineProperty(E.prototype,"applicationDirectory",{get:function(){return(0,l.J2)(this,"applicationDirectory")},set:function(T){(0,l.Iq)(this,"applicationDirectory",T)},enumerable:!1,configurable:!0}),Object.defineProperty(E.prototype,"applicationStorageDirectory",{get:function(){return(0,l.J2)(this,"applicationStorageDirectory")},set:function(T){(0,l.Iq)(this,"applicationStorageDirectory",T)},enumerable:!1,configurable:!0}),Object.defineProperty(E.prototype,"dataDirectory",{get:function(){return(0,l.J2)(this,"dataDirectory")},set:function(T){(0,l.Iq)(this,"dataDirectory",T)},enumerable:!1,configurable:!0}),Object.defineProperty(E.prototype,"cacheDirectory",{get:function(){return(0,l.J2)(this,"cacheDirectory")},set:function(T){(0,l.Iq)(this,"cacheDirectory",T)},enumerable:!1,configurable:!0}),Object.defineProperty(E.prototype,"externalApplicationStorageDirectory",{get:function(){return(0,l.J2)(this,"externalApplicationStorageDirectory")},set:function(T){(0,l.Iq)(this,"externalApplicationStorageDirectory",T)},enumerable:!1,configurable:!0}),Object.defineProperty(E.prototype,"externalDataDirectory",{get:function(){return(0,l.J2)(this,"externalDataDirectory")},set:function(T){(0,l.Iq)(this,"externalDataDirectory",T)},enumerable:!1,configurable:!0}),Object.defineProperty(E.prototype,"externalCacheDirectory",{get:function(){return(0,l.J2)(this,"externalCacheDirectory")},set:function(T){(0,l.Iq)(this,"externalCacheDirectory",T)},enumerable:!1,configurable:!0}),Object.defineProperty(E.prototype,"externalRootDirectory",{get:function(){return(0,l.J2)(this,"externalRootDirectory")},set:function(T){(0,l.Iq)(this,"externalRootDirectory",T)},enumerable:!1,configurable:!0}),Object.defineProperty(E.prototype,"tempDirectory",{get:function(){return(0,l.J2)(this,"tempDirectory")},set:function(T){(0,l.Iq)(this,"tempDirectory",T)},enumerable:!1,configurable:!0}),Object.defineProperty(E.prototype,"syncedDataDirectory",{get:function(){return(0,l.J2)(this,"syncedDataDirectory")},set:function(T){(0,l.Iq)(this,"syncedDataDirectory",T)},enumerable:!1,configurable:!0}),Object.defineProperty(E.prototype,"documentsDirectory",{get:function(){return(0,l.J2)(this,"documentsDirectory")},set:function(T){(0,l.Iq)(this,"documentsDirectory",T)},enumerable:!1,configurable:!0}),Object.defineProperty(E.prototype,"sharedDirectory",{get:function(){return(0,l.J2)(this,"sharedDirectory")},set:function(T){(0,l.Iq)(this,"sharedDirectory",T)},enumerable:!1,configurable:!0}),E.pluginName="File",E.plugin="cordova-plugin-file",E.pluginRef="cordova.file",E.repo="https://github.com/apache/cordova-plugin-file",E.platforms=["Android","Browser","iOS","macOS","Windows"],E.\u0275fac=function(){var T;return function(P){return(T||(T=e.n5z(E)))(P||E)}}(),E.\u0275prov=e.Yz7({token:E,factory:function(T){return E.\u0275fac(T)}}),E}(l.KY)},70191:(qe,I,p)=>{"use strict";p.d(I,{BX:()=>We,Br:()=>Rt,w:()=>He,dr:()=>je,BJ:()=>Bt,oU:()=>xn,cs:()=>ti,YG:()=>Vi,Sm:()=>Vn,PM:()=>Hn,FN:()=>An,Zi:()=>vn,nz:()=>gr,hM:()=>Hi,wI:()=>Gr,W2:()=>zr,W4:()=>ct,fr:()=>oi,jY:()=>Ni,Gu:()=>Nn,gu:()=>pr,ju:()=>Pn,MB:()=>Nt,pK:()=>ai,Ie:()=>hn,Q$:()=>Tn,q_:()=>lr,yh:()=>mo,z0:()=>rr,fG:()=>aa,zc:()=>ea,uN:()=>an,X7:()=>Zn,B7:()=>Ci,se:()=>Xn,I_:()=>Et,Nh:()=>un,oz:()=>Ft,jP:()=>al,Nd:()=>wn,VI:()=>Gn,t9:()=>Fr,n0:()=>en,A$:()=>at,Hr:()=>It,PQ:()=>Qt,jI:()=>St,yW:()=>Ln,g2:()=>ii,wd:()=>Ri,ho:()=>_r,sr:()=>er,Pc:()=>ba,r4:()=>Ao,HT:()=>Qn,_q:()=>fi,IN:()=>wr,t4:()=>wa,Dh:()=>Mo,U5:()=>nn,QI:()=>Dn,j9:()=>Mn,yF:()=>ro});var o=p(94650),e=p(24006),l=p(70655),D=p(54968),g=p(77579),E=p(61135),T=p(9116),n=p(89442),B=(p(19950),p(74802),p(88685)),Y=p(33139),V=p(61671),ue=p(23756),he=p(30471),ae=p(40604),X=p(44239),ye=(p(43509),p(67936));var de=p(39300),re=p(63900),oe=p(71884),me=p(36895);const le=V.i,Oe=(Jt,De)=>typeof window>"u"?Promise.resolve():(0,ye.p)().then(()=>(le(),(0,ye.b)(JSON.parse('[["ion-menu_3",[[33,"ion-menu-button",{"color":[513],"disabled":[4],"menu":[1],"autoHide":[4,"auto-hide"],"type":[1],"visible":[32]},[[16,"ionMenuChange","visibilityChanged"],[16,"ionSplitPaneVisible","visibilityChanged"]]],[33,"ion-menu",{"contentId":[513,"content-id"],"menuId":[513,"menu-id"],"type":[1025],"disabled":[1028],"side":[513],"swipeGesture":[4,"swipe-gesture"],"maxEdgeStart":[2,"max-edge-start"],"isPaneVisible":[32],"isEndSide":[32],"isOpen":[64],"isActive":[64],"open":[64],"close":[64],"toggle":[64],"setOpen":[64]},[[16,"ionSplitPaneVisible","onSplitPaneChanged"],[2,"click","onBackdropClick"],[0,"keydown","onKeydown"]]],[1,"ion-menu-toggle",{"menu":[1],"autoHide":[4,"auto-hide"],"visible":[32]},[[16,"ionMenuChange","visibilityChanged"],[16,"ionSplitPaneVisible","visibilityChanged"]]]]],["ion-fab_3",[[33,"ion-fab-button",{"color":[513],"activated":[4],"disabled":[4],"download":[1],"href":[1],"rel":[1],"routerDirection":[1,"router-direction"],"routerAnimation":[16],"target":[1],"show":[4],"translucent":[4],"type":[1],"size":[1],"closeIcon":[1,"close-icon"]}],[1,"ion-fab",{"horizontal":[1],"vertical":[1],"edge":[4],"activated":[1028],"close":[64],"toggle":[64]}],[1,"ion-fab-list",{"activated":[4],"side":[1]}]]],["ion-refresher_2",[[0,"ion-refresher-content",{"pullingIcon":[1025,"pulling-icon"],"pullingText":[1,"pulling-text"],"refreshingSpinner":[1025,"refreshing-spinner"],"refreshingText":[1,"refreshing-text"]}],[32,"ion-refresher",{"pullMin":[2,"pull-min"],"pullMax":[2,"pull-max"],"closeDuration":[1,"close-duration"],"snapbackDuration":[1,"snapback-duration"],"pullFactor":[2,"pull-factor"],"disabled":[4],"nativeRefresher":[32],"state":[32],"complete":[64],"cancel":[64],"getProgress":[64]}]]],["ion-back-button",[[33,"ion-back-button",{"color":[513],"defaultHref":[1025,"default-href"],"disabled":[516],"icon":[1],"text":[1],"type":[1],"routerAnimation":[16]}]]],["ion-toast",[[33,"ion-toast",{"overlayIndex":[2,"overlay-index"],"color":[513],"enterAnimation":[16],"leaveAnimation":[16],"cssClass":[1,"css-class"],"duration":[2],"header":[1],"message":[1],"keyboardClose":[4,"keyboard-close"],"position":[1],"buttons":[16],"translucent":[4],"animated":[4],"icon":[1],"htmlAttributes":[16],"present":[64],"dismiss":[64],"onDidDismiss":[64],"onWillDismiss":[64]}]]],["ion-card_5",[[33,"ion-card",{"color":[513],"button":[4],"type":[1],"disabled":[4],"download":[1],"href":[1],"rel":[1],"routerDirection":[1,"router-direction"],"routerAnimation":[16],"target":[1]}],[32,"ion-card-content"],[33,"ion-card-header",{"color":[513],"translucent":[4]}],[33,"ion-card-subtitle",{"color":[513]}],[33,"ion-card-title",{"color":[513]}]]],["ion-item-option_3",[[33,"ion-item-option",{"color":[513],"disabled":[4],"download":[1],"expandable":[4],"href":[1],"rel":[1],"target":[1],"type":[1]}],[32,"ion-item-options",{"side":[1],"fireSwipeEvent":[64]}],[0,"ion-item-sliding",{"disabled":[4],"state":[32],"getOpenAmount":[64],"getSlidingRatio":[64],"open":[64],"close":[64],"closeOpened":[64]}]]],["ion-accordion_2",[[49,"ion-accordion",{"value":[1],"disabled":[4],"readonly":[4],"toggleIcon":[1,"toggle-icon"],"toggleIconSlot":[1,"toggle-icon-slot"],"state":[32],"isNext":[32],"isPrevious":[32]}],[33,"ion-accordion-group",{"animated":[4],"multiple":[4],"value":[1025],"disabled":[4],"readonly":[4],"expand":[1],"requestAccordionToggle":[64],"getAccordions":[64]},[[0,"keydown","onKeydown"]]]]],["ion-breadcrumb_2",[[33,"ion-breadcrumb",{"collapsed":[4],"last":[4],"showCollapsedIndicator":[4,"show-collapsed-indicator"],"color":[1],"active":[4],"disabled":[4],"download":[1],"href":[1],"rel":[1],"separator":[4],"target":[1],"routerDirection":[1,"router-direction"],"routerAnimation":[16]}],[33,"ion-breadcrumbs",{"color":[1],"maxItems":[2,"max-items"],"itemsBeforeCollapse":[2,"items-before-collapse"],"itemsAfterCollapse":[2,"items-after-collapse"],"collapsed":[32],"activeChanged":[32]},[[0,"collapsedClick","onCollapsedClick"]]]]],["ion-infinite-scroll_2",[[32,"ion-infinite-scroll-content",{"loadingSpinner":[1025,"loading-spinner"],"loadingText":[1,"loading-text"]}],[0,"ion-infinite-scroll",{"threshold":[1],"disabled":[4],"position":[1],"isLoading":[32],"complete":[64]}]]],["ion-reorder_2",[[33,"ion-reorder",null,[[2,"click","onClick"]]],[0,"ion-reorder-group",{"disabled":[4],"state":[32],"complete":[64]}]]],["ion-segment_2",[[33,"ion-segment-button",{"disabled":[4],"layout":[1],"type":[1],"value":[1],"checked":[32]}],[33,"ion-segment",{"color":[513],"disabled":[4],"scrollable":[4],"swipeGesture":[4,"swipe-gesture"],"value":[1025],"selectOnFocus":[4,"select-on-focus"],"activated":[32]},[[0,"keydown","onKeyDown"]]]]],["ion-tab-bar_2",[[33,"ion-tab-button",{"disabled":[4],"download":[1],"href":[1],"rel":[1],"layout":[1025],"selected":[1028],"tab":[1],"target":[1]},[[8,"ionTabBarChanged","onTabBarChanged"]]],[33,"ion-tab-bar",{"color":[513],"selectedTab":[1,"selected-tab"],"translucent":[4],"keyboardVisible":[32]}]]],["ion-chip",[[33,"ion-chip",{"color":[513],"outline":[4],"disabled":[4]}]]],["ion-datetime-button",[[33,"ion-datetime-button",{"color":[513],"disabled":[516],"datetime":[1],"datetimePresentation":[32],"dateText":[32],"timeText":[32],"datetimeActive":[32],"selectedButton":[32]}]]],["ion-searchbar",[[34,"ion-searchbar",{"color":[513],"animated":[4],"autocomplete":[1],"autocorrect":[1],"cancelButtonIcon":[1,"cancel-button-icon"],"cancelButtonText":[1,"cancel-button-text"],"clearIcon":[1,"clear-icon"],"debounce":[2],"disabled":[4],"inputmode":[1],"enterkeyhint":[1],"placeholder":[1],"searchIcon":[1,"search-icon"],"showCancelButton":[1,"show-cancel-button"],"showClearButton":[1,"show-clear-button"],"spellcheck":[4],"type":[1],"value":[1025],"focused":[32],"noAnimate":[32],"setFocus":[64],"getInputElement":[64]}]]],["ion-toggle",[[33,"ion-toggle",{"color":[513],"name":[1],"checked":[1028],"disabled":[4],"value":[1],"enableOnOffLabels":[4,"enable-on-off-labels"],"activated":[32]}]]],["ion-nav_2",[[1,"ion-nav",{"delegate":[16],"swipeGesture":[1028,"swipe-gesture"],"animated":[4],"animation":[16],"rootParams":[16],"root":[1],"push":[64],"insert":[64],"insertPages":[64],"pop":[64],"popTo":[64],"popToRoot":[64],"removeIndex":[64],"setRoot":[64],"setPages":[64],"setRouteId":[64],"getRouteId":[64],"getActive":[64],"getByIndex":[64],"canGoBack":[64],"getPrevious":[64]}],[0,"ion-nav-link",{"component":[1],"componentProps":[16],"routerDirection":[1,"router-direction"],"routerAnimation":[16]}]]],["ion-input",[[34,"ion-input",{"fireFocusEvents":[4,"fire-focus-events"],"color":[513],"accept":[1],"autocapitalize":[1],"autocomplete":[1],"autocorrect":[1],"autofocus":[4],"clearInput":[4,"clear-input"],"clearOnEdit":[4,"clear-on-edit"],"debounce":[2],"disabled":[4],"enterkeyhint":[1],"inputmode":[1],"max":[8],"maxlength":[2],"min":[8],"minlength":[2],"multiple":[4],"name":[1],"pattern":[1],"placeholder":[1],"readonly":[4],"required":[4],"spellcheck":[4],"step":[1],"size":[2],"type":[1],"value":[1032],"hasFocus":[32],"setFocus":[64],"setBlur":[64],"getInputElement":[64]}]]],["ion-textarea",[[34,"ion-textarea",{"fireFocusEvents":[4,"fire-focus-events"],"color":[513],"autocapitalize":[1],"autofocus":[4],"clearOnEdit":[1028,"clear-on-edit"],"debounce":[2],"disabled":[4],"inputmode":[1],"enterkeyhint":[1],"maxlength":[2],"minlength":[2],"name":[1],"placeholder":[1],"readonly":[4],"required":[4],"spellcheck":[4],"cols":[2],"rows":[2],"wrap":[1],"autoGrow":[516,"auto-grow"],"value":[1025],"hasFocus":[32],"setFocus":[64],"setBlur":[64],"getInputElement":[64]}]]],["ion-backdrop",[[33,"ion-backdrop",{"visible":[4],"tappable":[4],"stopPropagation":[4,"stop-propagation"]},[[2,"click","onMouseDown"]]]]],["ion-loading",[[34,"ion-loading",{"overlayIndex":[2,"overlay-index"],"keyboardClose":[4,"keyboard-close"],"enterAnimation":[16],"leaveAnimation":[16],"message":[1],"cssClass":[1,"css-class"],"duration":[2],"backdropDismiss":[4,"backdrop-dismiss"],"showBackdrop":[4,"show-backdrop"],"spinner":[1025],"translucent":[4],"animated":[4],"htmlAttributes":[16],"present":[64],"dismiss":[64],"onDidDismiss":[64],"onWillDismiss":[64]}]]],["ion-modal",[[33,"ion-modal",{"hasController":[4,"has-controller"],"overlayIndex":[2,"overlay-index"],"delegate":[16],"keyboardClose":[4,"keyboard-close"],"enterAnimation":[16],"leaveAnimation":[16],"breakpoints":[16],"initialBreakpoint":[2,"initial-breakpoint"],"backdropBreakpoint":[2,"backdrop-breakpoint"],"handle":[4],"handleBehavior":[1,"handle-behavior"],"component":[1],"componentProps":[16],"cssClass":[1,"css-class"],"backdropDismiss":[4,"backdrop-dismiss"],"showBackdrop":[4,"show-backdrop"],"animated":[4],"swipeToClose":[4,"swipe-to-close"],"presentingElement":[16],"htmlAttributes":[16],"isOpen":[4,"is-open"],"trigger":[1],"keepContentsMounted":[4,"keep-contents-mounted"],"canDismiss":[4,"can-dismiss"],"presented":[32],"present":[64],"dismiss":[64],"onDidDismiss":[64],"onWillDismiss":[64],"setCurrentBreakpoint":[64],"getCurrentBreakpoint":[64]}]]],["ion-route_4",[[0,"ion-route",{"url":[1],"component":[1],"componentProps":[16],"beforeLeave":[16],"beforeEnter":[16]}],[0,"ion-route-redirect",{"from":[1],"to":[1]}],[0,"ion-router",{"root":[1],"useHash":[4,"use-hash"],"canTransition":[64],"push":[64],"back":[64],"printDebug":[64],"navChanged":[64]},[[8,"popstate","onPopState"],[4,"ionBackButton","onBackButton"]]],[1,"ion-router-link",{"color":[513],"href":[1],"rel":[1],"routerDirection":[1,"router-direction"],"routerAnimation":[16],"target":[1]}]]],["ion-avatar_3",[[33,"ion-avatar"],[33,"ion-badge",{"color":[513]}],[1,"ion-thumbnail"]]],["ion-col_3",[[1,"ion-col",{"offset":[1],"offsetXs":[1,"offset-xs"],"offsetSm":[1,"offset-sm"],"offsetMd":[1,"offset-md"],"offsetLg":[1,"offset-lg"],"offsetXl":[1,"offset-xl"],"pull":[1],"pullXs":[1,"pull-xs"],"pullSm":[1,"pull-sm"],"pullMd":[1,"pull-md"],"pullLg":[1,"pull-lg"],"pullXl":[1,"pull-xl"],"push":[1],"pushXs":[1,"push-xs"],"pushSm":[1,"push-sm"],"pushMd":[1,"push-md"],"pushLg":[1,"push-lg"],"pushXl":[1,"push-xl"],"size":[1],"sizeXs":[1,"size-xs"],"sizeSm":[1,"size-sm"],"sizeMd":[1,"size-md"],"sizeLg":[1,"size-lg"],"sizeXl":[1,"size-xl"]},[[9,"resize","onResize"]]],[1,"ion-grid",{"fixed":[4]}],[1,"ion-row"]]],["ion-slide_2",[[0,"ion-slide"],[36,"ion-slides",{"options":[8],"pager":[4],"scrollbar":[4],"update":[64],"updateAutoHeight":[64],"slideTo":[64],"slideNext":[64],"slidePrev":[64],"getActiveIndex":[64],"getPreviousIndex":[64],"length":[64],"isEnd":[64],"isBeginning":[64],"startAutoplay":[64],"stopAutoplay":[64],"lockSwipeToNext":[64],"lockSwipeToPrev":[64],"lockSwipes":[64],"getSwiper":[64]}]]],["ion-tab_2",[[1,"ion-tab",{"active":[1028],"delegate":[16],"tab":[1],"component":[1],"setActive":[64]}],[1,"ion-tabs",{"useRouter":[1028,"use-router"],"selectedTab":[32],"select":[64],"getTab":[64],"getSelected":[64],"setRouteId":[64],"getRouteId":[64]}]]],["ion-img",[[1,"ion-img",{"alt":[1],"src":[1],"loadSrc":[32],"loadError":[32]}]]],["ion-progress-bar",[[33,"ion-progress-bar",{"type":[1],"reversed":[4],"value":[2],"buffer":[2],"color":[513]}]]],["ion-range",[[33,"ion-range",{"color":[513],"debounce":[2],"name":[1],"dualKnobs":[4,"dual-knobs"],"min":[2],"max":[2],"pin":[4],"pinFormatter":[16],"snaps":[4],"step":[2],"ticks":[4],"activeBarStart":[1026,"active-bar-start"],"disabled":[4],"value":[1026],"ratioA":[32],"ratioB":[32],"pressedKnob":[32]}]]],["ion-split-pane",[[33,"ion-split-pane",{"contentId":[513,"content-id"],"disabled":[4],"when":[8],"visible":[32]}]]],["ion-text",[[1,"ion-text",{"color":[513]}]]],["ion-virtual-scroll",[[0,"ion-virtual-scroll",{"approxItemHeight":[2,"approx-item-height"],"approxHeaderHeight":[2,"approx-header-height"],"approxFooterHeight":[2,"approx-footer-height"],"headerFn":[16],"footerFn":[16],"items":[16],"itemHeight":[16],"headerHeight":[16],"footerHeight":[16],"renderItem":[16],"renderHeader":[16],"renderFooter":[16],"nodeRender":[16],"domRender":[16],"totalHeight":[32],"positionForItem":[64],"checkRange":[64],"checkEnd":[64]},[[9,"resize","onResize"]]]]],["ion-picker-column-internal",[[33,"ion-picker-column-internal",{"items":[16],"value":[1032],"color":[513],"numericInput":[4,"numeric-input"],"isActive":[32],"scrollActiveItemIntoView":[64],"setValue":[64]}]]],["ion-picker-internal",[[33,"ion-picker-internal"]]],["ion-radio_2",[[33,"ion-radio",{"color":[513],"name":[1],"disabled":[4],"value":[8],"checked":[32],"buttonTabindex":[32],"setFocus":[64],"setButtonTabindex":[64]}],[0,"ion-radio-group",{"allowEmptySelection":[4,"allow-empty-selection"],"name":[1],"value":[1032]},[[4,"keydown","onKeydown"]]]]],["ion-ripple-effect",[[1,"ion-ripple-effect",{"type":[1],"addRipple":[64]}]]],["ion-button_2",[[33,"ion-button",{"color":[513],"buttonType":[1025,"button-type"],"disabled":[516],"expand":[513],"fill":[1537],"routerDirection":[1,"router-direction"],"routerAnimation":[16],"download":[1],"href":[1],"rel":[1],"shape":[513],"size":[513],"strong":[4],"target":[1],"type":[1]}],[1,"ion-icon",{"mode":[1025],"color":[1],"ios":[1],"md":[1],"flipRtl":[4,"flip-rtl"],"name":[513],"src":[1],"icon":[8],"size":[1],"lazy":[4],"sanitize":[4],"svgContent":[32],"isVisible":[32],"ariaLabel":[32]}]]],["ion-datetime_3",[[33,"ion-datetime",{"color":[1],"name":[1],"disabled":[4],"readonly":[4],"isDateEnabled":[16],"min":[1025],"max":[1025],"presentation":[1],"cancelText":[1,"cancel-text"],"doneText":[1,"done-text"],"clearText":[1,"clear-text"],"yearValues":[8,"year-values"],"monthValues":[8,"month-values"],"dayValues":[8,"day-values"],"hourValues":[8,"hour-values"],"minuteValues":[8,"minute-values"],"locale":[1],"firstDayOfWeek":[2,"first-day-of-week"],"multiple":[4],"value":[1025],"showDefaultTitle":[4,"show-default-title"],"showDefaultButtons":[4,"show-default-buttons"],"showClearButton":[4,"show-clear-button"],"showDefaultTimeLabel":[4,"show-default-time-label"],"hourCycle":[1,"hour-cycle"],"size":[1],"preferWheel":[4,"prefer-wheel"],"showMonthAndYear":[32],"activeParts":[32],"workingParts":[32],"isPresented":[32],"isTimePopoverOpen":[32],"confirm":[64],"reset":[64],"cancel":[64]}],[34,"ion-picker",{"overlayIndex":[2,"overlay-index"],"keyboardClose":[4,"keyboard-close"],"enterAnimation":[16],"leaveAnimation":[16],"buttons":[16],"columns":[16],"cssClass":[1,"css-class"],"duration":[2],"showBackdrop":[4,"show-backdrop"],"backdropDismiss":[4,"backdrop-dismiss"],"animated":[4],"htmlAttributes":[16],"presented":[32],"present":[64],"dismiss":[64],"onDidDismiss":[64],"onWillDismiss":[64],"getColumn":[64]}],[32,"ion-picker-column",{"col":[16]}]]],["ion-action-sheet",[[34,"ion-action-sheet",{"overlayIndex":[2,"overlay-index"],"keyboardClose":[4,"keyboard-close"],"enterAnimation":[16],"leaveAnimation":[16],"buttons":[16],"cssClass":[1,"css-class"],"backdropDismiss":[4,"backdrop-dismiss"],"header":[1],"subHeader":[1,"sub-header"],"translucent":[4],"animated":[4],"htmlAttributes":[16],"present":[64],"dismiss":[64],"onDidDismiss":[64],"onWillDismiss":[64]}]]],["ion-alert",[[34,"ion-alert",{"overlayIndex":[2,"overlay-index"],"keyboardClose":[4,"keyboard-close"],"enterAnimation":[16],"leaveAnimation":[16],"cssClass":[1,"css-class"],"header":[1],"subHeader":[1,"sub-header"],"message":[1],"buttons":[16],"inputs":[1040],"backdropDismiss":[4,"backdrop-dismiss"],"translucent":[4],"animated":[4],"htmlAttributes":[16],"present":[64],"dismiss":[64],"onDidDismiss":[64],"onWillDismiss":[64]},[[4,"keydown","onKeydown"]]]]],["ion-popover",[[33,"ion-popover",{"hasController":[4,"has-controller"],"delegate":[16],"overlayIndex":[2,"overlay-index"],"enterAnimation":[16],"leaveAnimation":[16],"component":[1],"componentProps":[16],"keyboardClose":[4,"keyboard-close"],"cssClass":[1,"css-class"],"backdropDismiss":[4,"backdrop-dismiss"],"event":[8],"showBackdrop":[4,"show-backdrop"],"translucent":[4],"animated":[4],"htmlAttributes":[16],"triggerAction":[1,"trigger-action"],"trigger":[1],"size":[1],"dismissOnSelect":[4,"dismiss-on-select"],"reference":[1],"side":[1],"alignment":[1025],"arrow":[4],"isOpen":[4,"is-open"],"keyboardEvents":[4,"keyboard-events"],"keepContentsMounted":[4,"keep-contents-mounted"],"presented":[32],"presentFromTrigger":[64],"present":[64],"dismiss":[64],"getParentPopover":[64],"onDidDismiss":[64],"onWillDismiss":[64]}]]],["ion-checkbox",[[33,"ion-checkbox",{"color":[513],"name":[1],"checked":[1028],"indeterminate":[1028],"disabled":[4],"value":[8]}]]],["ion-select_3",[[33,"ion-select",{"disabled":[4],"cancelText":[1,"cancel-text"],"okText":[1,"ok-text"],"placeholder":[1],"name":[1],"selectedText":[1,"selected-text"],"multiple":[4],"interface":[1],"interfaceOptions":[8,"interface-options"],"compareWith":[1,"compare-with"],"value":[1032],"isExpanded":[32],"open":[64]}],[1,"ion-select-option",{"disabled":[4],"value":[8]}],[34,"ion-select-popover",{"header":[1],"subHeader":[1,"sub-header"],"message":[1],"multiple":[4],"options":[16]},[[0,"ionChange","onSelect"]]]]],["ion-app_8",[[0,"ion-app",{"setFocus":[64]}],[1,"ion-content",{"color":[513],"fullscreen":[4],"forceOverscroll":[1028,"force-overscroll"],"scrollX":[4,"scroll-x"],"scrollY":[4,"scroll-y"],"scrollEvents":[4,"scroll-events"],"getScrollElement":[64],"getBackgroundElement":[64],"scrollToTop":[64],"scrollToBottom":[64],"scrollByPoint":[64],"scrollToPoint":[64]},[[8,"appload","onAppLoad"]]],[36,"ion-footer",{"collapse":[1],"translucent":[4],"keyboardVisible":[32]}],[36,"ion-header",{"collapse":[1],"translucent":[4]}],[1,"ion-router-outlet",{"mode":[1025],"delegate":[16],"animated":[4],"animation":[16],"swipeHandler":[16],"commit":[64],"setRouteId":[64],"getRouteId":[64]}],[33,"ion-title",{"color":[513],"size":[1]}],[33,"ion-toolbar",{"color":[513]},[[0,"ionStyle","childrenStyle"]]],[34,"ion-buttons",{"collapse":[4]}]]],["ion-spinner",[[1,"ion-spinner",{"color":[513],"duration":[2],"name":[1],"paused":[4]}]]],["ion-item_8",[[33,"ion-item-divider",{"color":[513],"sticky":[4]}],[32,"ion-item-group"],[1,"ion-skeleton-text",{"animated":[4]}],[32,"ion-list",{"lines":[1],"inset":[4],"closeSlidingItems":[64]}],[33,"ion-list-header",{"color":[513],"lines":[1]}],[49,"ion-item",{"color":[513],"button":[4],"detail":[4],"detailIcon":[1,"detail-icon"],"disabled":[4],"download":[1],"fill":[1],"shape":[1],"href":[1],"rel":[1],"lines":[1],"counter":[4],"routerAnimation":[16],"routerDirection":[1,"router-direction"],"target":[1],"type":[1],"counterFormatter":[16],"multipleInputs":[32],"focusable":[32],"counterString":[32]},[[0,"ionChange","handleIonChange"],[0,"ionColor","labelColorChanged"],[0,"ionStyle","itemStyle"]]],[34,"ion-label",{"color":[513],"position":[1],"noAnimate":[32]}],[33,"ion-note",{"color":[513]}]]]]'),De))),j=["*"],ke=["outlet"],Be=[[["","slot","top"]],"*"];function mt(Jt,De){if(1&Jt&&(o.TgZ(0,"div",1),o.GkF(1,2),o.qZA()),2&Jt){const bt=o.oxw();o.xp6(1),o.Q6J("ngTemplateOutlet",bt.template)}}function ut(Jt,De){if(1&Jt&&o.GkF(0,1),2&Jt){const bt=o.oxw();o.Q6J("ngTemplateOutlet",bt.template)}}const Ve=Jt=>"function"==typeof __zone_symbol__requestAnimationFrame?__zone_symbol__requestAnimationFrame(Jt):"function"==typeof requestAnimationFrame?requestAnimationFrame(Jt):setTimeout(Jt),tt=Jt=>!!Jt.resolveComponentFactory;class Ne{constructor(De,bt){this.injector=De,this.el=bt,this.onChange=()=>{},this.onTouched=()=>{}}writeValue(De){this.el.nativeElement.value=this.lastValue=De??"",wt(this.el)}handleChangeEvent(De,bt){De===this.el.nativeElement&&(bt!==this.lastValue&&(this.lastValue=bt,this.onChange(bt)),wt(this.el))}_handleBlurEvent(De){De===this.el.nativeElement&&(this.onTouched(),wt(this.el))}registerOnChange(De){this.onChange=De}registerOnTouched(De){this.onTouched=De}setDisabledState(De){this.el.nativeElement.disabled=De}ngOnDestroy(){this.statusChanges&&this.statusChanges.unsubscribe()}ngAfterViewInit(){let De;try{De=this.injector.get(e.a5)}catch{}if(!De)return;De.statusChanges&&(this.statusChanges=De.statusChanges.subscribe(()=>wt(this.el)));const bt=De.control;bt&&["markAsTouched","markAllAsTouched","markAsUntouched","markAsDirty","markAsPristine"].forEach(Qi=>{if(typeof bt[Qi]<"u"){const Kt=bt[Qi].bind(bt);bt[Qi]=(...Fe)=>{Kt(...Fe),wt(this.el)}}})}}Ne.\u0275fac=function(De){return new(De||Ne)(o.Y36(o.zs3),o.Y36(o.SBq))},Ne.\u0275dir=o.lG2({type:Ne,hostBindings:function(De,bt){1&De&&o.NdJ("ionBlur",function(Qi){return bt._handleBlurEvent(Qi.target)})}});const wt=Jt=>{Ve(()=>{const De=Jt.nativeElement,bt=null!=De.value&&De.value.toString().length>0,Xt=ft(De);Ct(De,Xt);const Qi=De.closest("ion-item");Qi&&Ct(Qi,bt?[...Xt,"item-has-value"]:Xt)})},ft=Jt=>{const De=Jt.classList,bt=[];for(let Xt=0;Xt<De.length;Xt++){const Qi=De.item(Xt);null!==Qi&&rn(Qi,"ng-")&&bt.push(`ion-${Qi.substring(3)}`)}return bt},Ct=(Jt,De)=>{const bt=Jt.classList;bt.remove("ion-valid","ion-invalid","ion-touched","ion-untouched","ion-dirty","ion-pristine"),bt.add(...De)},rn=(Jt,De)=>Jt.substring(0,De.length)===De;class He extends Ne{constructor(De,bt){super(De,bt)}writeValue(De){this.el.nativeElement.checked=this.lastValue=De??!1,wt(this.el)}_handleIonChange(De){this.handleChangeEvent(De,De.checked)}}He.\u0275fac=function(De){return new(De||He)(o.Y36(o.zs3),o.Y36(o.SBq))},He.\u0275dir=o.lG2({type:He,selectors:[["ion-checkbox"],["ion-toggle"]],hostBindings:function(De,bt){1&De&&o.NdJ("ionChange",function(Qi){return bt._handleIonChange(Qi.target)})},features:[o._Bn([{provide:e.JU,useExisting:He,multi:!0}]),o.qOj]});class st extends Ne{constructor(De,bt){super(De,bt)}_handleIonChange(De){this.handleChangeEvent(De,De.value)}registerOnChange(De){super.registerOnChange(bt=>{De(""===bt?null:parseFloat(bt))})}}st.\u0275fac=function(De){return new(De||st)(o.Y36(o.zs3),o.Y36(o.SBq))},st.\u0275dir=o.lG2({type:st,selectors:[["ion-input","type","number"]],hostBindings:function(De,bt){1&De&&o.NdJ("ionChange",function(Qi){return bt._handleIonChange(Qi.target)})},features:[o._Bn([{provide:e.JU,useExisting:st,multi:!0}]),o.qOj]});class nn extends Ne{constructor(De,bt){super(De,bt)}_handleIonSelect(De){this.handleChangeEvent(De,De.checked)}}nn.\u0275fac=function(De){return new(De||nn)(o.Y36(o.zs3),o.Y36(o.SBq))},nn.\u0275dir=o.lG2({type:nn,selectors:[["ion-radio"]],hostBindings:function(De,bt){1&De&&o.NdJ("ionSelect",function(Qi){return bt._handleIonSelect(Qi.target)})},features:[o._Bn([{provide:e.JU,useExisting:nn,multi:!0}]),o.qOj]});class Dn extends Ne{constructor(De,bt){super(De,bt)}_handleChangeEvent(De){this.handleChangeEvent(De,De.value)}}Dn.\u0275fac=function(De){return new(De||Dn)(o.Y36(o.zs3),o.Y36(o.SBq))},Dn.\u0275dir=o.lG2({type:Dn,selectors:[["ion-range"],["ion-select"],["ion-radio-group"],["ion-segment"],["ion-datetime"]],hostBindings:function(De,bt){1&De&&o.NdJ("ionChange",function(Qi){return bt._handleChangeEvent(Qi.target)})},features:[o._Bn([{provide:e.JU,useExisting:Dn,multi:!0}]),o.qOj]});class Mn extends Ne{constructor(De,bt){super(De,bt)}_handleInputEvent(De){this.handleChangeEvent(De,De.value)}}Mn.\u0275fac=function(De){return new(De||Mn)(o.Y36(o.zs3),o.Y36(o.SBq))},Mn.\u0275dir=o.lG2({type:Mn,selectors:[["ion-input",3,"type","number"],["ion-textarea"],["ion-searchbar"]],hostBindings:function(De,bt){1&De&&o.NdJ("ionChange",function(Qi){return bt._handleInputEvent(Qi.target)})},features:[o._Bn([{provide:e.JU,useExisting:Mn,multi:!0}]),o.qOj]});const vi=(Jt,De)=>{const bt=Jt.prototype;De.forEach(Xt=>{Object.defineProperty(bt,Xt,{get(){return this.el[Xt]},set(Qi){this.z.runOutsideAngular(()=>this.el[Xt]=Qi)}})})},Gi=(Jt,De)=>{const bt=Jt.prototype;De.forEach(Xt=>{bt[Xt]=function(){const Qi=arguments;return this.z.runOutsideAngular(()=>this.el[Xt].apply(this.el,Qi))}})},mi=(Jt,De,bt)=>{bt.forEach(Xt=>Jt[Xt]=(0,D.R)(De,Xt))};function Bn(Jt){return function(bt){const{defineCustomElementFn:Xt,inputs:Qi,methods:Kt}=Jt;return void 0!==Xt&&Xt(),Qi&&vi(bt,Qi),Kt&&Gi(bt,Kt),bt}}let kn=class{constructor(De,bt,Xt){this.z=Xt,De.detach(),this.el=bt.nativeElement}};kn.\u0275fac=function(De){return new(De||kn)(o.Y36(o.sBO),o.Y36(o.SBq),o.Y36(o.R0b))},kn.\u0275cmp=o.Xpm({type:kn,selectors:[["ion-accordion"]],inputs:{disabled:"disabled",mode:"mode",readonly:"readonly",toggleIcon:"toggleIcon",toggleIconSlot:"toggleIconSlot",value:"value"},ngContentSelectors:j,decls:1,vars:0,template:function(De,bt){1&De&&(o.F$t(),o.Hsn(0))},encapsulation:2,changeDetection:0}),kn=(0,l.__decorate)([Bn({defineCustomElementFn:void 0,inputs:["disabled","mode","readonly","toggleIcon","toggleIconSlot","value"]})],kn);let On=class{constructor(De,bt,Xt){this.z=Xt,De.detach(),this.el=bt.nativeElement,mi(this,this.el,["ionChange"])}};On.\u0275fac=function(De){return new(De||On)(o.Y36(o.sBO),o.Y36(o.SBq),o.Y36(o.R0b))},On.\u0275cmp=o.Xpm({type:On,selectors:[["ion-accordion-group"]],inputs:{animated:"animated",disabled:"disabled",expand:"expand",mode:"mode",multiple:"multiple",readonly:"readonly",value:"value"},ngContentSelectors:j,decls:1,vars:0,template:function(De,bt){1&De&&(o.F$t(),o.Hsn(0))},encapsulation:2,changeDetection:0}),On=(0,l.__decorate)([Bn({defineCustomElementFn:void 0,inputs:["animated","disabled","expand","mode","multiple","readonly","value"]})],On);let je=class{constructor(De,bt,Xt){this.z=Xt,De.detach(),this.el=bt.nativeElement}};je.\u0275fac=function(De){return new(De||je)(o.Y36(o.sBO),o.Y36(o.SBq),o.Y36(o.R0b))},je.\u0275cmp=o.Xpm({type:je,selectors:[["ion-app"]],ngContentSelectors:j,decls:1,vars:0,template:function(De,bt){1&De&&(o.F$t(),o.Hsn(0))},encapsulation:2,changeDetection:0}),je=(0,l.__decorate)([Bn({defineCustomElementFn:void 0})],je);let Bt=class{constructor(De,bt,Xt){this.z=Xt,De.detach(),this.el=bt.nativeElement}};Bt.\u0275fac=function(De){return new(De||Bt)(o.Y36(o.sBO),o.Y36(o.SBq),o.Y36(o.R0b))},Bt.\u0275cmp=o.Xpm({type:Bt,selectors:[["ion-avatar"]],ngContentSelectors:j,decls:1,vars:0,template:function(De,bt){1&De&&(o.F$t(),o.Hsn(0))},encapsulation:2,changeDetection:0}),Bt=(0,l.__decorate)([Bn({defineCustomElementFn:void 0})],Bt);let xn=class{constructor(De,bt,Xt){this.z=Xt,De.detach(),this.el=bt.nativeElement}};xn.\u0275fac=function(De){return new(De||xn)(o.Y36(o.sBO),o.Y36(o.SBq),o.Y36(o.R0b))},xn.\u0275cmp=o.Xpm({type:xn,selectors:[["ion-back-button"]],inputs:{color:"color",defaultHref:"defaultHref",disabled:"disabled",icon:"icon",mode:"mode",routerAnimation:"routerAnimation",text:"text",type:"type"},ngContentSelectors:j,decls:1,vars:0,template:function(De,bt){1&De&&(o.F$t(),o.Hsn(0))},encapsulation:2,changeDetection:0}),xn=(0,l.__decorate)([Bn({defineCustomElementFn:void 0,inputs:["color","defaultHref","disabled","icon","mode","routerAnimation","text","type"]})],xn);let Fn=class{constructor(De,bt,Xt){this.z=Xt,De.detach(),this.el=bt.nativeElement,mi(this,this.el,["ionBackdropTap"])}};Fn.\u0275fac=function(De){return new(De||Fn)(o.Y36(o.sBO),o.Y36(o.SBq),o.Y36(o.R0b))},Fn.\u0275cmp=o.Xpm({type:Fn,selectors:[["ion-backdrop"]],inputs:{stopPropagation:"stopPropagation",tappable:"tappable",visible:"visible"},ngContentSelectors:j,decls:1,vars:0,template:function(De,bt){1&De&&(o.F$t(),o.Hsn(0))},encapsulation:2,changeDetection:0}),Fn=(0,l.__decorate)([Bn({defineCustomElementFn:void 0,inputs:["stopPropagation","tappable","visible"]})],Fn);let ui=class{constructor(De,bt,Xt){this.z=Xt,De.detach(),this.el=bt.nativeElement}};ui.\u0275fac=function(De){return new(De||ui)(o.Y36(o.sBO),o.Y36(o.SBq),o.Y36(o.R0b))},ui.\u0275cmp=o.Xpm({type:ui,selectors:[["ion-badge"]],inputs:{color:"color",mode:"mode"},ngContentSelectors:j,decls:1,vars:0,template:function(De,bt){1&De&&(o.F$t(),o.Hsn(0))},encapsulation:2,changeDetection:0}),ui=(0,l.__decorate)([Bn({defineCustomElementFn:void 0,inputs:["color","mode"]})],ui);let Ai=class{constructor(De,bt,Xt){this.z=Xt,De.detach(),this.el=bt.nativeElement,mi(this,this.el,["ionFocus","ionBlur"])}};Ai.\u0275fac=function(De){return new(De||Ai)(o.Y36(o.sBO),o.Y36(o.SBq),o.Y36(o.R0b))},Ai.\u0275cmp=o.Xpm({type:Ai,selectors:[["ion-breadcrumb"]],inputs:{active:"active",color:"color",disabled:"disabled",download:"download",href:"href",mode:"mode",rel:"rel",routerAnimation:"routerAnimation",routerDirection:"routerDirection",separator:"separator",target:"target"},ngContentSelectors:j,decls:1,vars:0,template:function(De,bt){1&De&&(o.F$t(),o.Hsn(0))},encapsulation:2,changeDetection:0}),Ai=(0,l.__decorate)([Bn({defineCustomElementFn:void 0,inputs:["active","color","disabled","download","href","mode","rel","routerAnimation","routerDirection","separator","target"]})],Ai);let si=class{constructor(De,bt,Xt){this.z=Xt,De.detach(),this.el=bt.nativeElement,mi(this,this.el,["ionCollapsedClick"])}};si.\u0275fac=function(De){return new(De||si)(o.Y36(o.sBO),o.Y36(o.SBq),o.Y36(o.R0b))},si.\u0275cmp=o.Xpm({type:si,selectors:[["ion-breadcrumbs"]],inputs:{color:"color",itemsAfterCollapse:"itemsAfterCollapse",itemsBeforeCollapse:"itemsBeforeCollapse",maxItems:"maxItems",mode:"mode"},ngContentSelectors:j,decls:1,vars:0,template:function(De,bt){1&De&&(o.F$t(),o.Hsn(0))},encapsulation:2,changeDetection:0}),si=(0,l.__decorate)([Bn({defineCustomElementFn:void 0,inputs:["color","itemsAfterCollapse","itemsBeforeCollapse","maxItems","mode"]})],si);let Vi=class{constructor(De,bt,Xt){this.z=Xt,De.detach(),this.el=bt.nativeElement,mi(this,this.el,["ionFocus","ionBlur"])}};Vi.\u0275fac=function(De){return new(De||Vi)(o.Y36(o.sBO),o.Y36(o.SBq),o.Y36(o.R0b))},Vi.\u0275cmp=o.Xpm({type:Vi,selectors:[["ion-button"]],inputs:{buttonType:"buttonType",color:"color",disabled:"disabled",download:"download",expand:"expand",fill:"fill",href:"href",mode:"mode",rel:"rel",routerAnimation:"routerAnimation",routerDirection:"routerDirection",shape:"shape",size:"size",strong:"strong",target:"target",type:"type"},ngContentSelectors:j,decls:1,vars:0,template:function(De,bt){1&De&&(o.F$t(),o.Hsn(0))},encapsulation:2,changeDetection:0}),Vi=(0,l.__decorate)([Bn({defineCustomElementFn:void 0,inputs:["buttonType","color","disabled","download","expand","fill","href","mode","rel","routerAnimation","routerDirection","shape","size","strong","target","type"]})],Vi);let Vn=class{constructor(De,bt,Xt){this.z=Xt,De.detach(),this.el=bt.nativeElement}};Vn.\u0275fac=function(De){return new(De||Vn)(o.Y36(o.sBO),o.Y36(o.SBq),o.Y36(o.R0b))},Vn.\u0275cmp=o.Xpm({type:Vn,selectors:[["ion-buttons"]],inputs:{collapse:"collapse"},ngContentSelectors:j,decls:1,vars:0,template:function(De,bt){1&De&&(o.F$t(),o.Hsn(0))},encapsulation:2,changeDetection:0}),Vn=(0,l.__decorate)([Bn({defineCustomElementFn:void 0,inputs:["collapse"]})],Vn);let Hn=class{constructor(De,bt,Xt){this.z=Xt,De.detach(),this.el=bt.nativeElement}};Hn.\u0275fac=function(De){return new(De||Hn)(o.Y36(o.sBO),o.Y36(o.SBq),o.Y36(o.R0b))},Hn.\u0275cmp=o.Xpm({type:Hn,selectors:[["ion-card"]],inputs:{button:"button",color:"color",disabled:"disabled",download:"download",href:"href",mode:"mode",rel:"rel",routerAnimation:"routerAnimation",routerDirection:"routerDirection",target:"target",type:"type"},ngContentSelectors:j,decls:1,vars:0,template:function(De,bt){1&De&&(o.F$t(),o.Hsn(0))},encapsulation:2,changeDetection:0}),Hn=(0,l.__decorate)([Bn({defineCustomElementFn:void 0,inputs:["button","color","disabled","download","href","mode","rel","routerAnimation","routerDirection","target","type"]})],Hn);let An=class{constructor(De,bt,Xt){this.z=Xt,De.detach(),this.el=bt.nativeElement}};An.\u0275fac=function(De){return new(De||An)(o.Y36(o.sBO),o.Y36(o.SBq),o.Y36(o.R0b))},An.\u0275cmp=o.Xpm({type:An,selectors:[["ion-card-content"]],inputs:{mode:"mode"},ngContentSelectors:j,decls:1,vars:0,template:function(De,bt){1&De&&(o.F$t(),o.Hsn(0))},encapsulation:2,changeDetection:0}),An=(0,l.__decorate)([Bn({defineCustomElementFn:void 0,inputs:["mode"]})],An);let vn=class{constructor(De,bt,Xt){this.z=Xt,De.detach(),this.el=bt.nativeElement}};vn.\u0275fac=function(De){return new(De||vn)(o.Y36(o.sBO),o.Y36(o.SBq),o.Y36(o.R0b))},vn.\u0275cmp=o.Xpm({type:vn,selectors:[["ion-card-header"]],inputs:{color:"color",mode:"mode",translucent:"translucent"},ngContentSelectors:j,decls:1,vars:0,template:function(De,bt){1&De&&(o.F$t(),o.Hsn(0))},encapsulation:2,changeDetection:0}),vn=(0,l.__decorate)([Bn({defineCustomElementFn:void 0,inputs:["color","mode","translucent"]})],vn);let In=class{constructor(De,bt,Xt){this.z=Xt,De.detach(),this.el=bt.nativeElement}};In.\u0275fac=function(De){return new(De||In)(o.Y36(o.sBO),o.Y36(o.SBq),o.Y36(o.R0b))},In.\u0275cmp=o.Xpm({type:In,selectors:[["ion-card-subtitle"]],inputs:{color:"color",mode:"mode"},ngContentSelectors:j,decls:1,vars:0,template:function(De,bt){1&De&&(o.F$t(),o.Hsn(0))},encapsulation:2,changeDetection:0}),In=(0,l.__decorate)([Bn({defineCustomElementFn:void 0,inputs:["color","mode"]})],In);let Zi=class{constructor(De,bt,Xt){this.z=Xt,De.detach(),this.el=bt.nativeElement}};Zi.\u0275fac=function(De){return new(De||Zi)(o.Y36(o.sBO),o.Y36(o.SBq),o.Y36(o.R0b))},Zi.\u0275cmp=o.Xpm({type:Zi,selectors:[["ion-card-title"]],inputs:{color:"color",mode:"mode"},ngContentSelectors:j,decls:1,vars:0,template:function(De,bt){1&De&&(o.F$t(),o.Hsn(0))},encapsulation:2,changeDetection:0}),Zi=(0,l.__decorate)([Bn({defineCustomElementFn:void 0,inputs:["color","mode"]})],Zi);let gr=class{constructor(De,bt,Xt){this.z=Xt,De.detach(),this.el=bt.nativeElement,mi(this,this.el,["ionChange","ionFocus","ionBlur"])}};gr.\u0275fac=function(De){return new(De||gr)(o.Y36(o.sBO),o.Y36(o.SBq),o.Y36(o.R0b))},gr.\u0275cmp=o.Xpm({type:gr,selectors:[["ion-checkbox"]],inputs:{checked:"checked",color:"color",disabled:"disabled",indeterminate:"indeterminate",mode:"mode",name:"name",value:"value"},ngContentSelectors:j,decls:1,vars:0,template:function(De,bt){1&De&&(o.F$t(),o.Hsn(0))},encapsulation:2,changeDetection:0}),gr=(0,l.__decorate)([Bn({defineCustomElementFn:void 0,inputs:["checked","color","disabled","indeterminate","mode","name","value"]})],gr);let Hi=class{constructor(De,bt,Xt){this.z=Xt,De.detach(),this.el=bt.nativeElement}};Hi.\u0275fac=function(De){return new(De||Hi)(o.Y36(o.sBO),o.Y36(o.SBq),o.Y36(o.R0b))},Hi.\u0275cmp=o.Xpm({type:Hi,selectors:[["ion-chip"]],inputs:{color:"color",disabled:"disabled",mode:"mode",outline:"outline"},ngContentSelectors:j,decls:1,vars:0,template:function(De,bt){1&De&&(o.F$t(),o.Hsn(0))},encapsulation:2,changeDetection:0}),Hi=(0,l.__decorate)([Bn({defineCustomElementFn:void 0,inputs:["color","disabled","mode","outline"]})],Hi);let Gr=class{constructor(De,bt,Xt){this.z=Xt,De.detach(),this.el=bt.nativeElement}};Gr.\u0275fac=function(De){return new(De||Gr)(o.Y36(o.sBO),o.Y36(o.SBq),o.Y36(o.R0b))},Gr.\u0275cmp=o.Xpm({type:Gr,selectors:[["ion-col"]],inputs:{offset:"offset",offsetLg:"offsetLg",offsetMd:"offsetMd",offsetSm:"offsetSm",offsetXl:"offsetXl",offsetXs:"offsetXs",pull:"pull",pullLg:"pullLg",pullMd:"pullMd",pullSm:"pullSm",pullXl:"pullXl",pullXs:"pullXs",push:"push",pushLg:"pushLg",pushMd:"pushMd",pushSm:"pushSm",pushXl:"pushXl",pushXs:"pushXs",size:"size",sizeLg:"sizeLg",sizeMd:"sizeMd",sizeSm:"sizeSm",sizeXl:"sizeXl",sizeXs:"sizeXs"},ngContentSelectors:j,decls:1,vars:0,template:function(De,bt){1&De&&(o.F$t(),o.Hsn(0))},encapsulation:2,changeDetection:0}),Gr=(0,l.__decorate)([Bn({defineCustomElementFn:void 0,inputs:["offset","offsetLg","offsetMd","offsetSm","offsetXl","offsetXs","pull","pullLg","pullMd","pullSm","pullXl","pullXs","push","pushLg","pushMd","pushSm","pushXl","pushXs","size","sizeLg","sizeMd","sizeSm","sizeXl","sizeXs"]})],Gr);let zr=class{constructor(De,bt,Xt){this.z=Xt,De.detach(),this.el=bt.nativeElement,mi(this,this.el,["ionScrollStart","ionScroll","ionScrollEnd"])}};zr.\u0275fac=function(De){return new(De||zr)(o.Y36(o.sBO),o.Y36(o.SBq),o.Y36(o.R0b))},zr.\u0275cmp=o.Xpm({type:zr,selectors:[["ion-content"]],inputs:{color:"color",forceOverscroll:"forceOverscroll",fullscreen:"fullscreen",scrollEvents:"scrollEvents",scrollX:"scrollX",scrollY:"scrollY"},ngContentSelectors:j,decls:1,vars:0,template:function(De,bt){1&De&&(o.F$t(),o.Hsn(0))},encapsulation:2,changeDetection:0}),zr=(0,l.__decorate)([Bn({defineCustomElementFn:void 0,inputs:["color","forceOverscroll","fullscreen","scrollEvents","scrollX","scrollY"],methods:["getScrollElement","scrollToTop","scrollToBottom","scrollByPoint","scrollToPoint"]})],zr);let Eo=class{constructor(De,bt,Xt){this.z=Xt,De.detach(),this.el=bt.nativeElement,mi(this,this.el,["ionCancel","ionChange","ionFocus","ionBlur"])}};Eo.\u0275fac=function(De){return new(De||Eo)(o.Y36(o.sBO),o.Y36(o.SBq),o.Y36(o.R0b))},Eo.\u0275cmp=o.Xpm({type:Eo,selectors:[["ion-datetime"]],inputs:{cancelText:"cancelText",clearText:"clearText",color:"color",dayValues:"dayValues",disabled:"disabled",doneText:"doneText",firstDayOfWeek:"firstDayOfWeek",hourCycle:"hourCycle",hourValues:"hourValues",isDateEnabled:"isDateEnabled",locale:"locale",max:"max",min:"min",minuteValues:"minuteValues",mode:"mode",monthValues:"monthValues",multiple:"multiple",name:"name",preferWheel:"preferWheel",presentation:"presentation",readonly:"readonly",showClearButton:"showClearButton",showDefaultButtons:"showDefaultButtons",showDefaultTimeLabel:"showDefaultTimeLabel",showDefaultTitle:"showDefaultTitle",size:"size",value:"value",yearValues:"yearValues"},ngContentSelectors:j,decls:1,vars:0,template:function(De,bt){1&De&&(o.F$t(),o.Hsn(0))},encapsulation:2,changeDetection:0}),Eo=(0,l.__decorate)([Bn({defineCustomElementFn:void 0,inputs:["cancelText","clearText","color","dayValues","disabled","doneText","firstDayOfWeek","hourCycle","hourValues","isDateEnabled","locale","max","min","minuteValues","mode","monthValues","multiple","name","preferWheel","presentation","readonly","showClearButton","showDefaultButtons","showDefaultTimeLabel","showDefaultTitle","size","value","yearValues"],methods:["confirm","reset","cancel"]})],Eo);let mr=class{constructor(De,bt,Xt){this.z=Xt,De.detach(),this.el=bt.nativeElement}};mr.\u0275fac=function(De){return new(De||mr)(o.Y36(o.sBO),o.Y36(o.SBq),o.Y36(o.R0b))},mr.\u0275cmp=o.Xpm({type:mr,selectors:[["ion-datetime-button"]],inputs:{color:"color",datetime:"datetime",disabled:"disabled",mode:"mode"},ngContentSelectors:j,decls:1,vars:0,template:function(De,bt){1&De&&(o.F$t(),o.Hsn(0))},encapsulation:2,changeDetection:0}),mr=(0,l.__decorate)([Bn({defineCustomElementFn:void 0,inputs:["color","datetime","disabled","mode"]})],mr);let jn=class{constructor(De,bt,Xt){this.z=Xt,De.detach(),this.el=bt.nativeElement}};jn.\u0275fac=function(De){return new(De||jn)(o.Y36(o.sBO),o.Y36(o.SBq),o.Y36(o.R0b))},jn.\u0275cmp=o.Xpm({type:jn,selectors:[["ion-fab"]],inputs:{activated:"activated",edge:"edge",horizontal:"horizontal",vertical:"vertical"},ngContentSelectors:j,decls:1,vars:0,template:function(De,bt){1&De&&(o.F$t(),o.Hsn(0))},encapsulation:2,changeDetection:0}),jn=(0,l.__decorate)([Bn({defineCustomElementFn:void 0,inputs:["activated","edge","horizontal","vertical"],methods:["close"]})],jn);let ct=class{constructor(De,bt,Xt){this.z=Xt,De.detach(),this.el=bt.nativeElement,mi(this,this.el,["ionFocus","ionBlur"])}};ct.\u0275fac=function(De){return new(De||ct)(o.Y36(o.sBO),o.Y36(o.SBq),o.Y36(o.R0b))},ct.\u0275cmp=o.Xpm({type:ct,selectors:[["ion-fab-button"]],inputs:{activated:"activated",closeIcon:"closeIcon",color:"color",disabled:"disabled",download:"download",href:"href",mode:"mode",rel:"rel",routerAnimation:"routerAnimation",routerDirection:"routerDirection",show:"show",size:"size",target:"target",translucent:"translucent",type:"type"},ngContentSelectors:j,decls:1,vars:0,template:function(De,bt){1&De&&(o.F$t(),o.Hsn(0))},encapsulation:2,changeDetection:0}),ct=(0,l.__decorate)([Bn({defineCustomElementFn:void 0,inputs:["activated","closeIcon","color","disabled","download","href","mode","rel","routerAnimation","routerDirection","show","size","target","translucent","type"]})],ct);let Yt=class{constructor(De,bt,Xt){this.z=Xt,De.detach(),this.el=bt.nativeElement}};Yt.\u0275fac=function(De){return new(De||Yt)(o.Y36(o.sBO),o.Y36(o.SBq),o.Y36(o.R0b))},Yt.\u0275cmp=o.Xpm({type:Yt,selectors:[["ion-fab-list"]],inputs:{activated:"activated",side:"side"},ngContentSelectors:j,decls:1,vars:0,template:function(De,bt){1&De&&(o.F$t(),o.Hsn(0))},encapsulation:2,changeDetection:0}),Yt=(0,l.__decorate)([Bn({defineCustomElementFn:void 0,inputs:["activated","side"]})],Yt);let oi=class{constructor(De,bt,Xt){this.z=Xt,De.detach(),this.el=bt.nativeElement}};oi.\u0275fac=function(De){return new(De||oi)(o.Y36(o.sBO),o.Y36(o.SBq),o.Y36(o.R0b))},oi.\u0275cmp=o.Xpm({type:oi,selectors:[["ion-footer"]],inputs:{collapse:"collapse",mode:"mode",translucent:"translucent"},ngContentSelectors:j,decls:1,vars:0,template:function(De,bt){1&De&&(o.F$t(),o.Hsn(0))},encapsulation:2,changeDetection:0}),oi=(0,l.__decorate)([Bn({defineCustomElementFn:void 0,inputs:["collapse","mode","translucent"]})],oi);let Ni=class{constructor(De,bt,Xt){this.z=Xt,De.detach(),this.el=bt.nativeElement}};Ni.\u0275fac=function(De){return new(De||Ni)(o.Y36(o.sBO),o.Y36(o.SBq),o.Y36(o.R0b))},Ni.\u0275cmp=o.Xpm({type:Ni,selectors:[["ion-grid"]],inputs:{fixed:"fixed"},ngContentSelectors:j,decls:1,vars:0,template:function(De,bt){1&De&&(o.F$t(),o.Hsn(0))},encapsulation:2,changeDetection:0}),Ni=(0,l.__decorate)([Bn({defineCustomElementFn:void 0,inputs:["fixed"]})],Ni);let Nn=class{constructor(De,bt,Xt){this.z=Xt,De.detach(),this.el=bt.nativeElement}};Nn.\u0275fac=function(De){return new(De||Nn)(o.Y36(o.sBO),o.Y36(o.SBq),o.Y36(o.R0b))},Nn.\u0275cmp=o.Xpm({type:Nn,selectors:[["ion-header"]],inputs:{collapse:"collapse",mode:"mode",translucent:"translucent"},ngContentSelectors:j,decls:1,vars:0,template:function(De,bt){1&De&&(o.F$t(),o.Hsn(0))},encapsulation:2,changeDetection:0}),Nn=(0,l.__decorate)([Bn({defineCustomElementFn:void 0,inputs:["collapse","mode","translucent"]})],Nn);let pr=class{constructor(De,bt,Xt){this.z=Xt,De.detach(),this.el=bt.nativeElement}};pr.\u0275fac=function(De){return new(De||pr)(o.Y36(o.sBO),o.Y36(o.SBq),o.Y36(o.R0b))},pr.\u0275cmp=o.Xpm({type:pr,selectors:[["ion-icon"]],inputs:{color:"color",flipRtl:"flipRtl",icon:"icon",ios:"ios",lazy:"lazy",md:"md",mode:"mode",name:"name",sanitize:"sanitize",size:"size",src:"src"},ngContentSelectors:j,decls:1,vars:0,template:function(De,bt){1&De&&(o.F$t(),o.Hsn(0))},encapsulation:2,changeDetection:0}),pr=(0,l.__decorate)([Bn({defineCustomElementFn:void 0,inputs:["color","flipRtl","icon","ios","lazy","md","mode","name","sanitize","size","src"]})],pr);let Sn=class{constructor(De,bt,Xt){this.z=Xt,De.detach(),this.el=bt.nativeElement,mi(this,this.el,["ionImgWillLoad","ionImgDidLoad","ionError"])}};Sn.\u0275fac=function(De){return new(De||Sn)(o.Y36(o.sBO),o.Y36(o.SBq),o.Y36(o.R0b))},Sn.\u0275cmp=o.Xpm({type:Sn,selectors:[["ion-img"]],inputs:{alt:"alt",src:"src"},ngContentSelectors:j,decls:1,vars:0,template:function(De,bt){1&De&&(o.F$t(),o.Hsn(0))},encapsulation:2,changeDetection:0}),Sn=(0,l.__decorate)([Bn({defineCustomElementFn:void 0,inputs:["alt","src"]})],Sn);let Pn=class{constructor(De,bt,Xt){this.z=Xt,De.detach(),this.el=bt.nativeElement,mi(this,this.el,["ionInfinite"])}};Pn.\u0275fac=function(De){return new(De||Pn)(o.Y36(o.sBO),o.Y36(o.SBq),o.Y36(o.R0b))},Pn.\u0275cmp=o.Xpm({type:Pn,selectors:[["ion-infinite-scroll"]],inputs:{disabled:"disabled",position:"position",threshold:"threshold"},ngContentSelectors:j,decls:1,vars:0,template:function(De,bt){1&De&&(o.F$t(),o.Hsn(0))},encapsulation:2,changeDetection:0}),Pn=(0,l.__decorate)([Bn({defineCustomElementFn:void 0,inputs:["disabled","position","threshold"],methods:["complete"]})],Pn);let Nt=class{constructor(De,bt,Xt){this.z=Xt,De.detach(),this.el=bt.nativeElement}};Nt.\u0275fac=function(De){return new(De||Nt)(o.Y36(o.sBO),o.Y36(o.SBq),o.Y36(o.R0b))},Nt.\u0275cmp=o.Xpm({type:Nt,selectors:[["ion-infinite-scroll-content"]],inputs:{loadingSpinner:"loadingSpinner",loadingText:"loadingText"},ngContentSelectors:j,decls:1,vars:0,template:function(De,bt){1&De&&(o.F$t(),o.Hsn(0))},encapsulation:2,changeDetection:0}),Nt=(0,l.__decorate)([Bn({defineCustomElementFn:void 0,inputs:["loadingSpinner","loadingText"]})],Nt);let ai=class{constructor(De,bt,Xt){this.z=Xt,De.detach(),this.el=bt.nativeElement,mi(this,this.el,["ionInput","ionChange","ionBlur","ionFocus"])}};ai.\u0275fac=function(De){return new(De||ai)(o.Y36(o.sBO),o.Y36(o.SBq),o.Y36(o.R0b))},ai.\u0275cmp=o.Xpm({type:ai,selectors:[["ion-input"]],inputs:{accept:"accept",autocapitalize:"autocapitalize",autocomplete:"autocomplete",autocorrect:"autocorrect",autofocus:"autofocus",clearInput:"clearInput",clearOnEdit:"clearOnEdit",color:"color",debounce:"debounce",disabled:"disabled",enterkeyhint:"enterkeyhint",inputmode:"inputmode",max:"max",maxlength:"maxlength",min:"min",minlength:"minlength",mode:"mode",multiple:"multiple",name:"name",pattern:"pattern",placeholder:"placeholder",readonly:"readonly",required:"required",size:"size",spellcheck:"spellcheck",step:"step",type:"type",value:"value"},ngContentSelectors:j,decls:1,vars:0,template:function(De,bt){1&De&&(o.F$t(),o.Hsn(0))},encapsulation:2,changeDetection:0}),ai=(0,l.__decorate)([Bn({defineCustomElementFn:void 0,inputs:["accept","autocapitalize","autocomplete","autocorrect","autofocus","clearInput","clearOnEdit","color","debounce","disabled","enterkeyhint","inputmode","max","maxlength","min","minlength","mode","multiple","name","pattern","placeholder","readonly","required","size","spellcheck","step","type","value"],methods:["setFocus","getInputElement"]})],ai);let hn=class{constructor(De,bt,Xt){this.z=Xt,De.detach(),this.el=bt.nativeElement}};hn.\u0275fac=function(De){return new(De||hn)(o.Y36(o.sBO),o.Y36(o.SBq),o.Y36(o.R0b))},hn.\u0275cmp=o.Xpm({type:hn,selectors:[["ion-item"]],inputs:{button:"button",color:"color",counter:"counter",counterFormatter:"counterFormatter",detail:"detail",detailIcon:"detailIcon",disabled:"disabled",download:"download",fill:"fill",href:"href",lines:"lines",mode:"mode",rel:"rel",routerAnimation:"routerAnimation",routerDirection:"routerDirection",shape:"shape",target:"target",type:"type"},ngContentSelectors:j,decls:1,vars:0,template:function(De,bt){1&De&&(o.F$t(),o.Hsn(0))},encapsulation:2,changeDetection:0}),hn=(0,l.__decorate)([Bn({defineCustomElementFn:void 0,inputs:["button","color","counter","counterFormatter","detail","detailIcon","disabled","download","fill","href","lines","mode","rel","routerAnimation","routerDirection","shape","target","type"]})],hn);let Le=class{constructor(De,bt,Xt){this.z=Xt,De.detach(),this.el=bt.nativeElement}};Le.\u0275fac=function(De){return new(De||Le)(o.Y36(o.sBO),o.Y36(o.SBq),o.Y36(o.R0b))},Le.\u0275cmp=o.Xpm({type:Le,selectors:[["ion-item-divider"]],inputs:{color:"color",mode:"mode",sticky:"sticky"},ngContentSelectors:j,decls:1,vars:0,template:function(De,bt){1&De&&(o.F$t(),o.Hsn(0))},encapsulation:2,changeDetection:0}),Le=(0,l.__decorate)([Bn({defineCustomElementFn:void 0,inputs:["color","mode","sticky"]})],Le);let ce=class{constructor(De,bt,Xt){this.z=Xt,De.detach(),this.el=bt.nativeElement}};ce.\u0275fac=function(De){return new(De||ce)(o.Y36(o.sBO),o.Y36(o.SBq),o.Y36(o.R0b))},ce.\u0275cmp=o.Xpm({type:ce,selectors:[["ion-item-group"]],ngContentSelectors:j,decls:1,vars:0,template:function(De,bt){1&De&&(o.F$t(),o.Hsn(0))},encapsulation:2,changeDetection:0}),ce=(0,l.__decorate)([Bn({defineCustomElementFn:void 0})],ce);let we=class{constructor(De,bt,Xt){this.z=Xt,De.detach(),this.el=bt.nativeElement}};we.\u0275fac=function(De){return new(De||we)(o.Y36(o.sBO),o.Y36(o.SBq),o.Y36(o.R0b))},we.\u0275cmp=o.Xpm({type:we,selectors:[["ion-item-option"]],inputs:{color:"color",disabled:"disabled",download:"download",expandable:"expandable",href:"href",mode:"mode",rel:"rel",target:"target",type:"type"},ngContentSelectors:j,decls:1,vars:0,template:function(De,bt){1&De&&(o.F$t(),o.Hsn(0))},encapsulation:2,changeDetection:0}),we=(0,l.__decorate)([Bn({defineCustomElementFn:void 0,inputs:["color","disabled","download","expandable","href","mode","rel","target","type"]})],we);let Qe=class{constructor(De,bt,Xt){this.z=Xt,De.detach(),this.el=bt.nativeElement,mi(this,this.el,["ionSwipe"])}};Qe.\u0275fac=function(De){return new(De||Qe)(o.Y36(o.sBO),o.Y36(o.SBq),o.Y36(o.R0b))},Qe.\u0275cmp=o.Xpm({type:Qe,selectors:[["ion-item-options"]],inputs:{side:"side"},ngContentSelectors:j,decls:1,vars:0,template:function(De,bt){1&De&&(o.F$t(),o.Hsn(0))},encapsulation:2,changeDetection:0}),Qe=(0,l.__decorate)([Bn({defineCustomElementFn:void 0,inputs:["side"]})],Qe);let qt=class{constructor(De,bt,Xt){this.z=Xt,De.detach(),this.el=bt.nativeElement,mi(this,this.el,["ionDrag"])}};qt.\u0275fac=function(De){return new(De||qt)(o.Y36(o.sBO),o.Y36(o.SBq),o.Y36(o.R0b))},qt.\u0275cmp=o.Xpm({type:qt,selectors:[["ion-item-sliding"]],inputs:{disabled:"disabled"},ngContentSelectors:j,decls:1,vars:0,template:function(De,bt){1&De&&(o.F$t(),o.Hsn(0))},encapsulation:2,changeDetection:0}),qt=(0,l.__decorate)([Bn({defineCustomElementFn:void 0,inputs:["disabled"],methods:["getOpenAmount","getSlidingRatio","open","close","closeOpened"]})],qt);let Tn=class{constructor(De,bt,Xt){this.z=Xt,De.detach(),this.el=bt.nativeElement}};Tn.\u0275fac=function(De){return new(De||Tn)(o.Y36(o.sBO),o.Y36(o.SBq),o.Y36(o.R0b))},Tn.\u0275cmp=o.Xpm({type:Tn,selectors:[["ion-label"]],inputs:{color:"color",mode:"mode",position:"position"},ngContentSelectors:j,decls:1,vars:0,template:function(De,bt){1&De&&(o.F$t(),o.Hsn(0))},encapsulation:2,changeDetection:0}),Tn=(0,l.__decorate)([Bn({defineCustomElementFn:void 0,inputs:["color","mode","position"]})],Tn);let lr=class{constructor(De,bt,Xt){this.z=Xt,De.detach(),this.el=bt.nativeElement}};lr.\u0275fac=function(De){return new(De||lr)(o.Y36(o.sBO),o.Y36(o.SBq),o.Y36(o.R0b))},lr.\u0275cmp=o.Xpm({type:lr,selectors:[["ion-list"]],inputs:{inset:"inset",lines:"lines",mode:"mode"},ngContentSelectors:j,decls:1,vars:0,template:function(De,bt){1&De&&(o.F$t(),o.Hsn(0))},encapsulation:2,changeDetection:0}),lr=(0,l.__decorate)([Bn({defineCustomElementFn:void 0,inputs:["inset","lines","mode"],methods:["closeSlidingItems"]})],lr);let mo=class{constructor(De,bt,Xt){this.z=Xt,De.detach(),this.el=bt.nativeElement}};mo.\u0275fac=function(De){return new(De||mo)(o.Y36(o.sBO),o.Y36(o.SBq),o.Y36(o.R0b))},mo.\u0275cmp=o.Xpm({type:mo,selectors:[["ion-list-header"]],inputs:{color:"color",lines:"lines",mode:"mode"},ngContentSelectors:j,decls:1,vars:0,template:function(De,bt){1&De&&(o.F$t(),o.Hsn(0))},encapsulation:2,changeDetection:0}),mo=(0,l.__decorate)([Bn({defineCustomElementFn:void 0,inputs:["color","lines","mode"]})],mo);let rr=class{constructor(De,bt,Xt){this.z=Xt,De.detach(),this.el=bt.nativeElement,mi(this,this.el,["ionWillOpen","ionWillClose","ionDidOpen","ionDidClose"])}};rr.\u0275fac=function(De){return new(De||rr)(o.Y36(o.sBO),o.Y36(o.SBq),o.Y36(o.R0b))},rr.\u0275cmp=o.Xpm({type:rr,selectors:[["ion-menu"]],inputs:{contentId:"contentId",disabled:"disabled",maxEdgeStart:"maxEdgeStart",menuId:"menuId",side:"side",swipeGesture:"swipeGesture",type:"type"},ngContentSelectors:j,decls:1,vars:0,template:function(De,bt){1&De&&(o.F$t(),o.Hsn(0))},encapsulation:2,changeDetection:0}),rr=(0,l.__decorate)([Bn({defineCustomElementFn:void 0,inputs:["contentId","disabled","maxEdgeStart","menuId","side","swipeGesture","type"],methods:["isOpen","isActive","open","close","toggle","setOpen"]})],rr);let aa=class{constructor(De,bt,Xt){this.z=Xt,De.detach(),this.el=bt.nativeElement}};aa.\u0275fac=function(De){return new(De||aa)(o.Y36(o.sBO),o.Y36(o.SBq),o.Y36(o.R0b))},aa.\u0275cmp=o.Xpm({type:aa,selectors:[["ion-menu-button"]],inputs:{autoHide:"autoHide",color:"color",disabled:"disabled",menu:"menu",mode:"mode",type:"type"},ngContentSelectors:j,decls:1,vars:0,template:function(De,bt){1&De&&(o.F$t(),o.Hsn(0))},encapsulation:2,changeDetection:0}),aa=(0,l.__decorate)([Bn({defineCustomElementFn:void 0,inputs:["autoHide","color","disabled","menu","mode","type"]})],aa);let ea=class{constructor(De,bt,Xt){this.z=Xt,De.detach(),this.el=bt.nativeElement}};ea.\u0275fac=function(De){return new(De||ea)(o.Y36(o.sBO),o.Y36(o.SBq),o.Y36(o.R0b))},ea.\u0275cmp=o.Xpm({type:ea,selectors:[["ion-menu-toggle"]],inputs:{autoHide:"autoHide",menu:"menu"},ngContentSelectors:j,decls:1,vars:0,template:function(De,bt){1&De&&(o.F$t(),o.Hsn(0))},encapsulation:2,changeDetection:0}),ea=(0,l.__decorate)([Bn({defineCustomElementFn:void 0,inputs:["autoHide","menu"]})],ea);let Bo=class{constructor(De,bt,Xt){this.z=Xt,De.detach(),this.el=bt.nativeElement,mi(this,this.el,["ionNavWillChange","ionNavDidChange"])}};Bo.\u0275fac=function(De){return new(De||Bo)(o.Y36(o.sBO),o.Y36(o.SBq),o.Y36(o.R0b))},Bo.\u0275cmp=o.Xpm({type:Bo,selectors:[["ion-nav"]],inputs:{animated:"animated",animation:"animation",root:"root",rootParams:"rootParams",swipeGesture:"swipeGesture"},ngContentSelectors:j,decls:1,vars:0,template:function(De,bt){1&De&&(o.F$t(),o.Hsn(0))},encapsulation:2,changeDetection:0}),Bo=(0,l.__decorate)([Bn({defineCustomElementFn:void 0,inputs:["animated","animation","root","rootParams","swipeGesture"],methods:["push","insert","insertPages","pop","popTo","popToRoot","removeIndex","setRoot","setPages","getActive","getByIndex","canGoBack","getPrevious"]})],Bo);let Ii=class{constructor(De,bt,Xt){this.z=Xt,De.detach(),this.el=bt.nativeElement}};Ii.\u0275fac=function(De){return new(De||Ii)(o.Y36(o.sBO),o.Y36(o.SBq),o.Y36(o.R0b))},Ii.\u0275cmp=o.Xpm({type:Ii,selectors:[["ion-nav-link"]],inputs:{component:"component",componentProps:"componentProps",routerAnimation:"routerAnimation",routerDirection:"routerDirection"},ngContentSelectors:j,decls:1,vars:0,template:function(De,bt){1&De&&(o.F$t(),o.Hsn(0))},encapsulation:2,changeDetection:0}),Ii=(0,l.__decorate)([Bn({defineCustomElementFn:void 0,inputs:["component","componentProps","routerAnimation","routerDirection"]})],Ii);let an=class{constructor(De,bt,Xt){this.z=Xt,De.detach(),this.el=bt.nativeElement}};an.\u0275fac=function(De){return new(De||an)(o.Y36(o.sBO),o.Y36(o.SBq),o.Y36(o.R0b))},an.\u0275cmp=o.Xpm({type:an,selectors:[["ion-note"]],inputs:{color:"color",mode:"mode"},ngContentSelectors:j,decls:1,vars:0,template:function(De,bt){1&De&&(o.F$t(),o.Hsn(0))},encapsulation:2,changeDetection:0}),an=(0,l.__decorate)([Bn({defineCustomElementFn:void 0,inputs:["color","mode"]})],an);let Zn=class{constructor(De,bt,Xt){this.z=Xt,De.detach(),this.el=bt.nativeElement}};Zn.\u0275fac=function(De){return new(De||Zn)(o.Y36(o.sBO),o.Y36(o.SBq),o.Y36(o.R0b))},Zn.\u0275cmp=o.Xpm({type:Zn,selectors:[["ion-progress-bar"]],inputs:{buffer:"buffer",color:"color",mode:"mode",reversed:"reversed",type:"type",value:"value"},ngContentSelectors:j,decls:1,vars:0,template:function(De,bt){1&De&&(o.F$t(),o.Hsn(0))},encapsulation:2,changeDetection:0}),Zn=(0,l.__decorate)([Bn({defineCustomElementFn:void 0,inputs:["buffer","color","mode","reversed","type","value"]})],Zn);let Ci=class{constructor(De,bt,Xt){this.z=Xt,De.detach(),this.el=bt.nativeElement,mi(this,this.el,["ionFocus","ionBlur"])}};Ci.\u0275fac=function(De){return new(De||Ci)(o.Y36(o.sBO),o.Y36(o.SBq),o.Y36(o.R0b))},Ci.\u0275cmp=o.Xpm({type:Ci,selectors:[["ion-radio"]],inputs:{color:"color",disabled:"disabled",mode:"mode",name:"name",value:"value"},ngContentSelectors:j,decls:1,vars:0,template:function(De,bt){1&De&&(o.F$t(),o.Hsn(0))},encapsulation:2,changeDetection:0}),Ci=(0,l.__decorate)([Bn({defineCustomElementFn:void 0,inputs:["color","disabled","mode","name","value"]})],Ci);let Xn=class{constructor(De,bt,Xt){this.z=Xt,De.detach(),this.el=bt.nativeElement,mi(this,this.el,["ionChange"])}};Xn.\u0275fac=function(De){return new(De||Xn)(o.Y36(o.sBO),o.Y36(o.SBq),o.Y36(o.R0b))},Xn.\u0275cmp=o.Xpm({type:Xn,selectors:[["ion-radio-group"]],inputs:{allowEmptySelection:"allowEmptySelection",name:"name",value:"value"},ngContentSelectors:j,decls:1,vars:0,template:function(De,bt){1&De&&(o.F$t(),o.Hsn(0))},encapsulation:2,changeDetection:0}),Xn=(0,l.__decorate)([Bn({defineCustomElementFn:void 0,inputs:["allowEmptySelection","name","value"]})],Xn);let Et=class{constructor(De,bt,Xt){this.z=Xt,De.detach(),this.el=bt.nativeElement,mi(this,this.el,["ionChange","ionFocus","ionBlur","ionKnobMoveStart","ionKnobMoveEnd"])}};Et.\u0275fac=function(De){return new(De||Et)(o.Y36(o.sBO),o.Y36(o.SBq),o.Y36(o.R0b))},Et.\u0275cmp=o.Xpm({type:Et,selectors:[["ion-range"]],inputs:{activeBarStart:"activeBarStart",color:"color",debounce:"debounce",disabled:"disabled",dualKnobs:"dualKnobs",max:"max",min:"min",mode:"mode",name:"name",pin:"pin",pinFormatter:"pinFormatter",snaps:"snaps",step:"step",ticks:"ticks",value:"value"},ngContentSelectors:j,decls:1,vars:0,template:function(De,bt){1&De&&(o.F$t(),o.Hsn(0))},encapsulation:2,changeDetection:0}),Et=(0,l.__decorate)([Bn({defineCustomElementFn:void 0,inputs:["activeBarStart","color","debounce","disabled","dualKnobs","max","min","mode","name","pin","pinFormatter","snaps","step","ticks","value"]})],Et);let gn=class{constructor(De,bt,Xt){this.z=Xt,De.detach(),this.el=bt.nativeElement,mi(this,this.el,["ionRefresh","ionPull","ionStart"])}};gn.\u0275fac=function(De){return new(De||gn)(o.Y36(o.sBO),o.Y36(o.SBq),o.Y36(o.R0b))},gn.\u0275cmp=o.Xpm({type:gn,selectors:[["ion-refresher"]],inputs:{closeDuration:"closeDuration",disabled:"disabled",pullFactor:"pullFactor",pullMax:"pullMax",pullMin:"pullMin",snapbackDuration:"snapbackDuration"},ngContentSelectors:j,decls:1,vars:0,template:function(De,bt){1&De&&(o.F$t(),o.Hsn(0))},encapsulation:2,changeDetection:0}),gn=(0,l.__decorate)([Bn({defineCustomElementFn:void 0,inputs:["closeDuration","disabled","pullFactor","pullMax","pullMin","snapbackDuration"],methods:["complete","cancel","getProgress"]})],gn);let ei=class{constructor(De,bt,Xt){this.z=Xt,De.detach(),this.el=bt.nativeElement}};ei.\u0275fac=function(De){return new(De||ei)(o.Y36(o.sBO),o.Y36(o.SBq),o.Y36(o.R0b))},ei.\u0275cmp=o.Xpm({type:ei,selectors:[["ion-refresher-content"]],inputs:{pullingIcon:"pullingIcon",pullingText:"pullingText",refreshingSpinner:"refreshingSpinner",refreshingText:"refreshingText"},ngContentSelectors:j,decls:1,vars:0,template:function(De,bt){1&De&&(o.F$t(),o.Hsn(0))},encapsulation:2,changeDetection:0}),ei=(0,l.__decorate)([Bn({defineCustomElementFn:void 0,inputs:["pullingIcon","pullingText","refreshingSpinner","refreshingText"]})],ei);let un=class{constructor(De,bt,Xt){this.z=Xt,De.detach(),this.el=bt.nativeElement}};un.\u0275fac=function(De){return new(De||un)(o.Y36(o.sBO),o.Y36(o.SBq),o.Y36(o.R0b))},un.\u0275cmp=o.Xpm({type:un,selectors:[["ion-reorder"]],ngContentSelectors:j,decls:1,vars:0,template:function(De,bt){1&De&&(o.F$t(),o.Hsn(0))},encapsulation:2,changeDetection:0}),un=(0,l.__decorate)([Bn({defineCustomElementFn:void 0})],un);let Ft=class{constructor(De,bt,Xt){this.z=Xt,De.detach(),this.el=bt.nativeElement,mi(this,this.el,["ionItemReorder"])}};Ft.\u0275fac=function(De){return new(De||Ft)(o.Y36(o.sBO),o.Y36(o.SBq),o.Y36(o.R0b))},Ft.\u0275cmp=o.Xpm({type:Ft,selectors:[["ion-reorder-group"]],inputs:{disabled:"disabled"},ngContentSelectors:j,decls:1,vars:0,template:function(De,bt){1&De&&(o.F$t(),o.Hsn(0))},encapsulation:2,changeDetection:0}),Ft=(0,l.__decorate)([Bn({defineCustomElementFn:void 0,inputs:["disabled"],methods:["complete"]})],Ft);let Ut=class{constructor(De,bt,Xt){this.z=Xt,De.detach(),this.el=bt.nativeElement}};Ut.\u0275fac=function(De){return new(De||Ut)(o.Y36(o.sBO),o.Y36(o.SBq),o.Y36(o.R0b))},Ut.\u0275cmp=o.Xpm({type:Ut,selectors:[["ion-ripple-effect"]],inputs:{type:"type"},ngContentSelectors:j,decls:1,vars:0,template:function(De,bt){1&De&&(o.F$t(),o.Hsn(0))},encapsulation:2,changeDetection:0}),Ut=(0,l.__decorate)([Bn({defineCustomElementFn:void 0,inputs:["type"],methods:["addRipple"]})],Ut);let wn=class{constructor(De,bt,Xt){this.z=Xt,De.detach(),this.el=bt.nativeElement}};wn.\u0275fac=function(De){return new(De||wn)(o.Y36(o.sBO),o.Y36(o.SBq),o.Y36(o.R0b))},wn.\u0275cmp=o.Xpm({type:wn,selectors:[["ion-row"]],ngContentSelectors:j,decls:1,vars:0,template:function(De,bt){1&De&&(o.F$t(),o.Hsn(0))},encapsulation:2,changeDetection:0}),wn=(0,l.__decorate)([Bn({defineCustomElementFn:void 0})],wn);let Gn=class{constructor(De,bt,Xt){this.z=Xt,De.detach(),this.el=bt.nativeElement,mi(this,this.el,["ionInput","ionChange","ionCancel","ionClear","ionBlur","ionFocus"])}};Gn.\u0275fac=function(De){return new(De||Gn)(o.Y36(o.sBO),o.Y36(o.SBq),o.Y36(o.R0b))},Gn.\u0275cmp=o.Xpm({type:Gn,selectors:[["ion-searchbar"]],inputs:{animated:"animated",autocomplete:"autocomplete",autocorrect:"autocorrect",cancelButtonIcon:"cancelButtonIcon",cancelButtonText:"cancelButtonText",clearIcon:"clearIcon",color:"color",debounce:"debounce",disabled:"disabled",enterkeyhint:"enterkeyhint",inputmode:"inputmode",mode:"mode",placeholder:"placeholder",searchIcon:"searchIcon",showCancelButton:"showCancelButton",showClearButton:"showClearButton",spellcheck:"spellcheck",type:"type",value:"value"},ngContentSelectors:j,decls:1,vars:0,template:function(De,bt){1&De&&(o.F$t(),o.Hsn(0))},encapsulation:2,changeDetection:0}),Gn=(0,l.__decorate)([Bn({defineCustomElementFn:void 0,inputs:["animated","autocomplete","autocorrect","cancelButtonIcon","cancelButtonText","clearIcon","color","debounce","disabled","enterkeyhint","inputmode","mode","placeholder","searchIcon","showCancelButton","showClearButton","spellcheck","type","value"],methods:["setFocus","getInputElement"]})],Gn);let xi=class{constructor(De,bt,Xt){this.z=Xt,De.detach(),this.el=bt.nativeElement,mi(this,this.el,["ionChange"])}};xi.\u0275fac=function(De){return new(De||xi)(o.Y36(o.sBO),o.Y36(o.SBq),o.Y36(o.R0b))},xi.\u0275cmp=o.Xpm({type:xi,selectors:[["ion-segment"]],inputs:{color:"color",disabled:"disabled",mode:"mode",scrollable:"scrollable",selectOnFocus:"selectOnFocus",swipeGesture:"swipeGesture",value:"value"},ngContentSelectors:j,decls:1,vars:0,template:function(De,bt){1&De&&(o.F$t(),o.Hsn(0))},encapsulation:2,changeDetection:0}),xi=(0,l.__decorate)([Bn({defineCustomElementFn:void 0,inputs:["color","disabled","mode","scrollable","selectOnFocus","swipeGesture","value"]})],xi);let Cr=class{constructor(De,bt,Xt){this.z=Xt,De.detach(),this.el=bt.nativeElement}};Cr.\u0275fac=function(De){return new(De||Cr)(o.Y36(o.sBO),o.Y36(o.SBq),o.Y36(o.R0b))},Cr.\u0275cmp=o.Xpm({type:Cr,selectors:[["ion-segment-button"]],inputs:{disabled:"disabled",layout:"layout",mode:"mode",type:"type",value:"value"},ngContentSelectors:j,decls:1,vars:0,template:function(De,bt){1&De&&(o.F$t(),o.Hsn(0))},encapsulation:2,changeDetection:0}),Cr=(0,l.__decorate)([Bn({defineCustomElementFn:void 0,inputs:["disabled","layout","mode","type","value"]})],Cr);let Fr=class{constructor(De,bt,Xt){this.z=Xt,De.detach(),this.el=bt.nativeElement,mi(this,this.el,["ionChange","ionCancel","ionDismiss","ionFocus","ionBlur"])}};Fr.\u0275fac=function(De){return new(De||Fr)(o.Y36(o.sBO),o.Y36(o.SBq),o.Y36(o.R0b))},Fr.\u0275cmp=o.Xpm({type:Fr,selectors:[["ion-select"]],inputs:{cancelText:"cancelText",compareWith:"compareWith",disabled:"disabled",interface:"interface",interfaceOptions:"interfaceOptions",mode:"mode",multiple:"multiple",name:"name",okText:"okText",placeholder:"placeholder",selectedText:"selectedText",value:"value"},ngContentSelectors:j,decls:1,vars:0,template:function(De,bt){1&De&&(o.F$t(),o.Hsn(0))},encapsulation:2,changeDetection:0}),Fr=(0,l.__decorate)([Bn({defineCustomElementFn:void 0,inputs:["cancelText","compareWith","disabled","interface","interfaceOptions","mode","multiple","name","okText","placeholder","selectedText","value"],methods:["open"]})],Fr);let en=class{constructor(De,bt,Xt){this.z=Xt,De.detach(),this.el=bt.nativeElement}};en.\u0275fac=function(De){return new(De||en)(o.Y36(o.sBO),o.Y36(o.SBq),o.Y36(o.R0b))},en.\u0275cmp=o.Xpm({type:en,selectors:[["ion-select-option"]],inputs:{disabled:"disabled",value:"value"},ngContentSelectors:j,decls:1,vars:0,template:function(De,bt){1&De&&(o.F$t(),o.Hsn(0))},encapsulation:2,changeDetection:0}),en=(0,l.__decorate)([Bn({defineCustomElementFn:void 0,inputs:["disabled","value"]})],en);let Wn=class{constructor(De,bt,Xt){this.z=Xt,De.detach(),this.el=bt.nativeElement}};Wn.\u0275fac=function(De){return new(De||Wn)(o.Y36(o.sBO),o.Y36(o.SBq),o.Y36(o.R0b))},Wn.\u0275cmp=o.Xpm({type:Wn,selectors:[["ion-skeleton-text"]],inputs:{animated:"animated"},ngContentSelectors:j,decls:1,vars:0,template:function(De,bt){1&De&&(o.F$t(),o.Hsn(0))},encapsulation:2,changeDetection:0}),Wn=(0,l.__decorate)([Bn({defineCustomElementFn:void 0,inputs:["animated"]})],Wn);let at=class{constructor(De,bt,Xt){this.z=Xt,De.detach(),this.el=bt.nativeElement}};at.\u0275fac=function(De){return new(De||at)(o.Y36(o.sBO),o.Y36(o.SBq),o.Y36(o.R0b))},at.\u0275cmp=o.Xpm({type:at,selectors:[["ion-slide"]],ngContentSelectors:j,decls:1,vars:0,template:function(De,bt){1&De&&(o.F$t(),o.Hsn(0))},encapsulation:2,changeDetection:0}),at=(0,l.__decorate)([Bn({defineCustomElementFn:void 0})],at);let It=class{constructor(De,bt,Xt){this.z=Xt,De.detach(),this.el=bt.nativeElement,mi(this,this.el,["ionSlidesDidLoad","ionSlideTap","ionSlideDoubleTap","ionSlideWillChange","ionSlideDidChange","ionSlideNextStart","ionSlidePrevStart","ionSlideNextEnd","ionSlidePrevEnd","ionSlideTransitionStart","ionSlideTransitionEnd","ionSlideDrag","ionSlideReachStart","ionSlideReachEnd","ionSlideTouchStart","ionSlideTouchEnd"])}};It.\u0275fac=function(De){return new(De||It)(o.Y36(o.sBO),o.Y36(o.SBq),o.Y36(o.R0b))},It.\u0275cmp=o.Xpm({type:It,selectors:[["ion-slides"]],inputs:{mode:"mode",options:"options",pager:"pager",scrollbar:"scrollbar"},ngContentSelectors:j,decls:1,vars:0,template:function(De,bt){1&De&&(o.F$t(),o.Hsn(0))},encapsulation:2,changeDetection:0}),It=(0,l.__decorate)([Bn({defineCustomElementFn:void 0,inputs:["mode","options","pager","scrollbar"],methods:["update","updateAutoHeight","slideTo","slideNext","slidePrev","getActiveIndex","getPreviousIndex","length","isEnd","isBeginning","startAutoplay","stopAutoplay","lockSwipeToNext","lockSwipeToPrev","lockSwipes","getSwiper"]})],It);let Qt=class{constructor(De,bt,Xt){this.z=Xt,De.detach(),this.el=bt.nativeElement}};Qt.\u0275fac=function(De){return new(De||Qt)(o.Y36(o.sBO),o.Y36(o.SBq),o.Y36(o.R0b))},Qt.\u0275cmp=o.Xpm({type:Qt,selectors:[["ion-spinner"]],inputs:{color:"color",duration:"duration",name:"name",paused:"paused"},ngContentSelectors:j,decls:1,vars:0,template:function(De,bt){1&De&&(o.F$t(),o.Hsn(0))},encapsulation:2,changeDetection:0}),Qt=(0,l.__decorate)([Bn({defineCustomElementFn:void 0,inputs:["color","duration","name","paused"]})],Qt);let St=class{constructor(De,bt,Xt){this.z=Xt,De.detach(),this.el=bt.nativeElement,mi(this,this.el,["ionSplitPaneVisible"])}};St.\u0275fac=function(De){return new(De||St)(o.Y36(o.sBO),o.Y36(o.SBq),o.Y36(o.R0b))},St.\u0275cmp=o.Xpm({type:St,selectors:[["ion-split-pane"]],inputs:{contentId:"contentId",disabled:"disabled",when:"when"},ngContentSelectors:j,decls:1,vars:0,template:function(De,bt){1&De&&(o.F$t(),o.Hsn(0))},encapsulation:2,changeDetection:0}),St=(0,l.__decorate)([Bn({defineCustomElementFn:void 0,inputs:["contentId","disabled","when"]})],St);let Pt=class{constructor(De,bt,Xt){this.z=Xt,De.detach(),this.el=bt.nativeElement}};Pt.\u0275fac=function(De){return new(De||Pt)(o.Y36(o.sBO),o.Y36(o.SBq),o.Y36(o.R0b))},Pt.\u0275cmp=o.Xpm({type:Pt,selectors:[["ion-tab-bar"]],inputs:{color:"color",mode:"mode",selectedTab:"selectedTab",translucent:"translucent"},ngContentSelectors:j,decls:1,vars:0,template:function(De,bt){1&De&&(o.F$t(),o.Hsn(0))},encapsulation:2,changeDetection:0}),Pt=(0,l.__decorate)([Bn({defineCustomElementFn:void 0,inputs:["color","mode","selectedTab","translucent"]})],Pt);let cn=class{constructor(De,bt,Xt){this.z=Xt,De.detach(),this.el=bt.nativeElement}};cn.\u0275fac=function(De){return new(De||cn)(o.Y36(o.sBO),o.Y36(o.SBq),o.Y36(o.R0b))},cn.\u0275cmp=o.Xpm({type:cn,selectors:[["ion-tab-button"]],inputs:{disabled:"disabled",download:"download",href:"href",layout:"layout",mode:"mode",rel:"rel",selected:"selected",tab:"tab",target:"target"},ngContentSelectors:j,decls:1,vars:0,template:function(De,bt){1&De&&(o.F$t(),o.Hsn(0))},encapsulation:2,changeDetection:0}),cn=(0,l.__decorate)([Bn({defineCustomElementFn:void 0,inputs:["disabled","download","href","layout","mode","rel","selected","tab","target"]})],cn);let Ln=class{constructor(De,bt,Xt){this.z=Xt,De.detach(),this.el=bt.nativeElement}};Ln.\u0275fac=function(De){return new(De||Ln)(o.Y36(o.sBO),o.Y36(o.SBq),o.Y36(o.R0b))},Ln.\u0275cmp=o.Xpm({type:Ln,selectors:[["ion-text"]],inputs:{color:"color",mode:"mode"},ngContentSelectors:j,decls:1,vars:0,template:function(De,bt){1&De&&(o.F$t(),o.Hsn(0))},encapsulation:2,changeDetection:0}),Ln=(0,l.__decorate)([Bn({defineCustomElementFn:void 0,inputs:["color","mode"]})],Ln);let ii=class{constructor(De,bt,Xt){this.z=Xt,De.detach(),this.el=bt.nativeElement,mi(this,this.el,["ionChange","ionInput","ionBlur","ionFocus"])}};ii.\u0275fac=function(De){return new(De||ii)(o.Y36(o.sBO),o.Y36(o.SBq),o.Y36(o.R0b))},ii.\u0275cmp=o.Xpm({type:ii,selectors:[["ion-textarea"]],inputs:{autoGrow:"autoGrow",autocapitalize:"autocapitalize",autofocus:"autofocus",clearOnEdit:"clearOnEdit",color:"color",cols:"cols",debounce:"debounce",disabled:"disabled",enterkeyhint:"enterkeyhint",inputmode:"inputmode",maxlength:"maxlength",minlength:"minlength",mode:"mode",name:"name",placeholder:"placeholder",readonly:"readonly",required:"required",rows:"rows",spellcheck:"spellcheck",value:"value",wrap:"wrap"},ngContentSelectors:j,decls:1,vars:0,template:function(De,bt){1&De&&(o.F$t(),o.Hsn(0))},encapsulation:2,changeDetection:0}),ii=(0,l.__decorate)([Bn({defineCustomElementFn:void 0,inputs:["autoGrow","autocapitalize","autofocus","clearOnEdit","color","cols","debounce","disabled","enterkeyhint","inputmode","maxlength","minlength","mode","name","placeholder","readonly","required","rows","spellcheck","value","wrap"],methods:["setFocus","getInputElement"]})],ii);let hi=class{constructor(De,bt,Xt){this.z=Xt,De.detach(),this.el=bt.nativeElement}};hi.\u0275fac=function(De){return new(De||hi)(o.Y36(o.sBO),o.Y36(o.SBq),o.Y36(o.R0b))},hi.\u0275cmp=o.Xpm({type:hi,selectors:[["ion-thumbnail"]],ngContentSelectors:j,decls:1,vars:0,template:function(De,bt){1&De&&(o.F$t(),o.Hsn(0))},encapsulation:2,changeDetection:0}),hi=(0,l.__decorate)([Bn({defineCustomElementFn:void 0})],hi);let Ri=class{constructor(De,bt,Xt){this.z=Xt,De.detach(),this.el=bt.nativeElement}};Ri.\u0275fac=function(De){return new(De||Ri)(o.Y36(o.sBO),o.Y36(o.SBq),o.Y36(o.R0b))},Ri.\u0275cmp=o.Xpm({type:Ri,selectors:[["ion-title"]],inputs:{color:"color",size:"size"},ngContentSelectors:j,decls:1,vars:0,template:function(De,bt){1&De&&(o.F$t(),o.Hsn(0))},encapsulation:2,changeDetection:0}),Ri=(0,l.__decorate)([Bn({defineCustomElementFn:void 0,inputs:["color","size"]})],Ri);let _r=class{constructor(De,bt,Xt){this.z=Xt,De.detach(),this.el=bt.nativeElement,mi(this,this.el,["ionChange","ionFocus","ionBlur"])}};_r.\u0275fac=function(De){return new(De||_r)(o.Y36(o.sBO),o.Y36(o.SBq),o.Y36(o.R0b))},_r.\u0275cmp=o.Xpm({type:_r,selectors:[["ion-toggle"]],inputs:{checked:"checked",color:"color",disabled:"disabled",enableOnOffLabels:"enableOnOffLabels",mode:"mode",name:"name",value:"value"},ngContentSelectors:j,decls:1,vars:0,template:function(De,bt){1&De&&(o.F$t(),o.Hsn(0))},encapsulation:2,changeDetection:0}),_r=(0,l.__decorate)([Bn({defineCustomElementFn:void 0,inputs:["checked","color","disabled","enableOnOffLabels","mode","name","value"]})],_r);let er=class{constructor(De,bt,Xt){this.z=Xt,De.detach(),this.el=bt.nativeElement}};er.\u0275fac=function(De){return new(De||er)(o.Y36(o.sBO),o.Y36(o.SBq),o.Y36(o.R0b))},er.\u0275cmp=o.Xpm({type:er,selectors:[["ion-toolbar"]],inputs:{color:"color",mode:"mode"},ngContentSelectors:j,decls:1,vars:0,template:function(De,bt){1&De&&(o.F$t(),o.Hsn(0))},encapsulation:2,changeDetection:0}),er=(0,l.__decorate)([Bn({defineCustomElementFn:void 0,inputs:["color","mode"]})],er);class Yr{constructor(De={}){this.data=De}get(De){return this.data[De]}}class _o{constructor(De,bt){this.zone=De,this.appRef=bt}create(De,bt,Xt){return new Si(De,bt,Xt,this.appRef,this.zone)}}_o.\u0275fac=function(De){return new(De||_o)(o.LFG(o.R0b),o.LFG(o.z2F))},_o.\u0275prov=o.Yz7({token:_o,factory:_o.\u0275fac});class Si{constructor(De,bt,Xt,Qi,Kt){this.resolverOrInjector=De,this.injector=bt,this.location=Xt,this.appRef=Qi,this.zone=Kt,this.elRefMap=new WeakMap,this.elEventsMap=new WeakMap}attachViewToDom(De,bt,Xt,Qi){return this.zone.run(()=>new Promise(Kt=>{Kt(to(this.zone,this.resolverOrInjector,this.injector,this.location,this.appRef,this.elRefMap,this.elEventsMap,De,bt,Xt,Qi))}))}removeViewFromDom(De,bt){return this.zone.run(()=>new Promise(Xt=>{const Qi=this.elRefMap.get(bt);if(Qi){Qi.destroy(),this.elRefMap.delete(bt);const Kt=this.elEventsMap.get(bt);Kt&&(Kt(),this.elEventsMap.delete(bt))}Xt()}))}}const to=(Jt,De,bt,Xt,Qi,Kt,Fe,Wt,yi,Ki,ya)=>{let Na;const qi=o.zs3.create({providers:Vs(Ki),parent:bt});if(De&&tt(De)){const Us=De.resolveComponentFactory(yi);Na=Xt?Xt.createComponent(Us,Xt.length,qi):Us.create(qi)}else{if(!Xt)return null;{const Us=De;Na=Xt.createComponent(yi,{index:Xt.indexOf,injector:qi,environmentInjector:Us})}}const ia=Na.instance,$o=Na.location.nativeElement;if(Ki&&Object.assign(ia,Ki),ya)for(const Us of ya)$o.classList.add(Us);const su=Uo(Jt,ia,$o);return Wt.appendChild($o),Xt||Qi.attachView(Na.hostView),Na.changeDetectorRef.reattach(),Kt.set($o,Na),Fe.set($o,su),$o},Oa=[he.L,he.a,he.b,he.c,he.d],Uo=(Jt,De,bt)=>Jt.run(()=>{const Xt=Oa.filter(Qi=>"function"==typeof De[Qi]).map(Qi=>{const Kt=Fe=>De[Qi](Fe.detail);return bt.addEventListener(Qi,Kt),()=>bt.removeEventListener(Qi,Kt)});return()=>Xt.forEach(Qi=>Qi())}),rl=new o.OlP("NavParamsToken"),Vs=Jt=>[{provide:rl,useValue:Jt},{provide:Yr,useFactory:ps,deps:[rl]}],ps=Jt=>new Yr(Jt),gs=(Jt,De)=>((Jt=Jt.filter(bt=>bt.stackId!==De.stackId)).push(De),Jt),tc=(Jt,De)=>(Jt.indexOf(De)>=0?Jt=Jt.filter(Xt=>Xt.stackId!==De.stackId||Xt.id<=De.id):Jt.push(De),Jt),$a=(Jt,De)=>Jt.indexOf(De)>=0?Jt.filter(Xt=>Xt.stackId!==De.stackId||Xt.id<=De.id):gs(Jt,De),ln=(Jt,De)=>{const bt=Jt.createUrlTree(["."],{relativeTo:De});return Jt.serializeUrl(bt)},Di=(Jt,De)=>{if(!Jt)return;const bt=Er(De);for(let Xt=0;Xt<bt.length;Xt++){if(Xt>=Jt.length)return bt[Xt];if(bt[Xt]!==Jt[Xt])return}},Er=Jt=>Jt.split("/").map(De=>De.trim()).filter(De=>""!==De),ur=Jt=>{Jt&&(Jt.ref.destroy(),Jt.unlistenEvents())};class gi{constructor(De,bt,Xt,Qi,Kt,Fe){this.containerEl=bt,this.router=Xt,this.navCtrl=Qi,this.zone=Kt,this.location=Fe,this.views=[],this.skipTransition=!1,this.nextId=0,this.tabsPrefix=void 0!==De?Er(De):void 0}createView(De,bt){var Xt;const Qi=ln(this.router,bt),Kt=null===(Xt=De?.location)||void 0===Xt?void 0:Xt.nativeElement,Fe=Uo(this.zone,De.instance,Kt);return{id:this.nextId++,stackId:Di(this.tabsPrefix,Qi),unlistenEvents:Fe,element:Kt,ref:De,url:Qi}}getExistingView(De){const bt=ln(this.router,De),Xt=this.views.find(Qi=>Qi.url===bt);return Xt&&Xt.ref.changeDetectorRef.reattach(),Xt}setActive(De){var bt,Xt;const Qi=this.navCtrl.consumeTransition();let{direction:Kt,animation:Fe,animationBuilder:Wt}=Qi;const yi=this.activeView,Ki=((Jt,De)=>!De||Jt.stackId!==De.stackId)(De,yi);Ki&&(Kt="back",Fe=void 0);const ya=this.views.slice();let Na;const qi=this.router;qi.getCurrentNavigation?Na=qi.getCurrentNavigation():!(null===(bt=qi.navigations)||void 0===bt)&&bt.value&&(Na=qi.navigations.value),null!==(Xt=Na?.extras)&&void 0!==Xt&&Xt.replaceUrl&&this.views.length>0&&this.views.splice(-1,1);const ia=this.views.includes(De),$o=this.insertView(De,Kt);ia||De.ref.changeDetectorRef.detectChanges();const su=De.animationBuilder;return void 0===Wt&&"back"===Kt&&!Ki&&void 0!==su&&(Wt=su),yi&&(yi.animationBuilder=Wt),this.zone.runOutsideAngular(()=>this.wait(()=>(yi&&yi.ref.changeDetectorRef.detach(),De.ref.changeDetectorRef.reattach(),this.transition(De,yi,Fe,this.canGoBack(1),!1,Wt).then(()=>$t(De,$o,ya,this.location,this.zone)).then(()=>({enteringView:De,direction:Kt,animation:Fe,tabSwitch:Ki})))))}canGoBack(De,bt=this.getActiveStackId()){return this.getStack(bt).length>De}pop(De,bt=this.getActiveStackId()){return this.zone.run(()=>{var Xt,Qi;const Kt=this.getStack(bt);if(Kt.length<=De)return Promise.resolve(!1);const Fe=Kt[Kt.length-De-1];let Wt=Fe.url;const yi=Fe.savedData;if(yi){const ya=yi.get("primary");null!==(Qi=null===(Xt=ya?.route)||void 0===Xt?void 0:Xt._routerState)&&void 0!==Qi&&Qi.snapshot.url&&(Wt=ya.route._routerState.snapshot.url)}const{animationBuilder:Ki}=this.navCtrl.consumeTransition();return this.navCtrl.navigateBack(Wt,Object.assign(Object.assign({},Fe.savedExtras),{animation:Ki})).then(()=>!0)})}startBackTransition(){const De=this.activeView;if(De){const bt=this.getStack(De.stackId),Xt=bt[bt.length-2],Qi=Xt.animationBuilder;return this.wait(()=>this.transition(Xt,De,"back",this.canGoBack(2),!0,Qi))}return Promise.resolve()}endBackTransition(De){De?(this.skipTransition=!0,this.pop(1)):this.activeView&&Ma(this.activeView,this.views,this.views,this.location,this.zone)}getLastUrl(De){const bt=this.getStack(De);return bt.length>0?bt[bt.length-1]:void 0}getRootUrl(De){const bt=this.getStack(De);return bt.length>0?bt[0]:void 0}getActiveStackId(){return this.activeView?this.activeView.stackId:void 0}hasRunningTask(){return void 0!==this.runningTask}destroy(){this.containerEl=void 0,this.views.forEach(ur),this.activeView=void 0,this.views=[]}getStack(De){return this.views.filter(bt=>bt.stackId===De)}insertView(De,bt){return this.activeView=De,this.views=((Jt,De,bt)=>"root"===bt?gs(Jt,De):"forward"===bt?tc(Jt,De):$a(Jt,De))(this.views,De,bt),this.views.slice()}transition(De,bt,Xt,Qi,Kt,Fe){if(this.skipTransition)return this.skipTransition=!1,Promise.resolve(!1);if(bt===De)return Promise.resolve(!1);const Wt=De?De.element:void 0,yi=bt?bt.element:void 0,Ki=this.containerEl;return Wt&&Wt!==yi&&(Wt.classList.add("ion-page"),Wt.classList.add("ion-page-invisible"),Wt.parentElement!==Ki&&Ki.appendChild(Wt),Ki.commit)?Ki.commit(Wt,yi,{deepWait:!0,duration:void 0===Xt?0:void 0,direction:Xt,showGoBack:Qi,progressAnimation:Kt,animationBuilder:Fe}):Promise.resolve(!1)}wait(De){return(0,l.__awaiter)(this,void 0,void 0,function*(){void 0!==this.runningTask&&(yield this.runningTask,this.runningTask=void 0);const bt=this.runningTask=De();return bt.finally(()=>this.runningTask=void 0),bt})}}const $t=(Jt,De,bt,Xt,Qi)=>"function"==typeof requestAnimationFrame?new Promise(Kt=>{requestAnimationFrame(()=>{Ma(Jt,De,bt,Xt,Qi),Kt()})}):Promise.resolve(),Ma=(Jt,De,bt,Xt,Qi)=>{Qi.run(()=>bt.filter(Kt=>!De.includes(Kt)).forEach(ur)),De.forEach(Kt=>{const Wt=Xt.path().split("?")[0].split("#")[0];if(Kt!==Jt&&Kt.url!==Wt){const yi=Kt.element;yi.setAttribute("aria-hidden","true"),yi.classList.add("ion-page-hidden"),Kt.ref.changeDetectorRef.detach()}})};class Vo{get(De,bt){const Xt=ja();return Xt?Xt.get(De,bt):null}getBoolean(De,bt){const Xt=ja();return!!Xt&&Xt.getBoolean(De,bt)}getNumber(De,bt){const Xt=ja();return Xt?Xt.getNumber(De,bt):0}}Vo.\u0275fac=function(De){return new(De||Vo)},Vo.\u0275prov=o.Yz7({token:Vo,factory:Vo.\u0275fac,providedIn:"root"});const Ds=new o.OlP("USERCONFIG"),ja=()=>{if(typeof window<"u"){const Jt=window.Ionic;if(Jt?.config)return Jt.config}return null};class wa{constructor(De,bt){this.doc=De,this.backButton=new g.x,this.keyboardDidShow=new g.x,this.keyboardDidHide=new g.x,this.pause=new g.x,this.resume=new g.x,this.resize=new g.x,bt.run(()=>{var Xt;let Qi;this.win=De.defaultView,this.backButton.subscribeWithPriority=function(Kt,Fe){return this.subscribe(Wt=>Wt.register(Kt,yi=>bt.run(()=>Fe(yi))))},Cs(this.pause,De,"pause"),Cs(this.resume,De,"resume"),Cs(this.backButton,De,"ionBackButton"),Cs(this.resize,this.win,"resize"),Cs(this.keyboardDidShow,this.win,"ionKeyboardDidShow"),Cs(this.keyboardDidHide,this.win,"ionKeyboardDidHide"),this._readyPromise=new Promise(Kt=>{Qi=Kt}),null!==(Xt=this.win)&&void 0!==Xt&&Xt.cordova?De.addEventListener("deviceready",()=>{Qi("cordova")},{once:!0}):Qi("dom")})}is(De){return(0,V.a)(this.win,De)}platforms(){return(0,V.g)(this.win)}ready(){return this._readyPromise}get isRTL(){return"rtl"===this.doc.dir}getQueryParam(De){return ns(this.win.location.href,De)}isLandscape(){return!this.isPortrait()}isPortrait(){var De,bt;return null===(bt=(De=this.win).matchMedia)||void 0===bt?void 0:bt.call(De,"(orientation: portrait)").matches}testUserAgent(De){const bt=this.win.navigator;return!!(bt?.userAgent&&bt.userAgent.indexOf(De)>=0)}url(){return this.win.location.href}width(){return this.win.innerWidth}height(){return this.win.innerHeight}}wa.\u0275fac=function(De){return new(De||wa)(o.LFG(me.K0),o.LFG(o.R0b))},wa.\u0275prov=o.Yz7({token:wa,factory:wa.\u0275fac,providedIn:"root"});const ns=(Jt,De)=>{De=De.replace(/[[\]\\]/g,"\\$&");const Xt=new RegExp("[\\?&]"+De+"=([^&#]*)").exec(Jt);return Xt?decodeURIComponent(Xt[1].replace(/\+/g," ")):null},Cs=(Jt,De,bt)=>{De&&De.addEventListener(bt,Xt=>{Jt.next(Xt?.detail)})};class $r{constructor(De,bt,Xt,Qi){this.location=bt,this.serializer=Xt,this.router=Qi,this.direction=Gl,this.animated=ol,this.guessDirection="forward",this.lastNavId=-1,Qi&&Qi.events.subscribe(Kt=>{if(Kt instanceof T.OD){const Fe=Kt.restoredState?Kt.restoredState.navigationId:Kt.id;this.guessDirection=Fe<this.lastNavId?"back":"forward",this.guessAnimation=Kt.restoredState?void 0:this.guessDirection,this.lastNavId="forward"===this.guessDirection?Kt.id:Fe}}),De.backButton.subscribeWithPriority(0,Kt=>{this.pop(),Kt()})}navigateForward(De,bt={}){return this.setDirection("forward",bt.animated,bt.animationDirection,bt.animation),this.navigate(De,bt)}navigateBack(De,bt={}){return this.setDirection("back",bt.animated,bt.animationDirection,bt.animation),this.navigate(De,bt)}navigateRoot(De,bt={}){return this.setDirection("root",bt.animated,bt.animationDirection,bt.animation),this.navigate(De,bt)}back(De={animated:!0,animationDirection:"back"}){return this.setDirection("back",De.animated,De.animationDirection,De.animation),this.location.back()}pop(){return(0,l.__awaiter)(this,void 0,void 0,function*(){let De=this.topOutlet;for(;De&&!(yield De.pop());)De=De.parentOutlet})}setDirection(De,bt,Xt,Qi){this.direction=De,this.animated=Ts(De,bt,Xt),this.animationBuilder=Qi}setTopOutlet(De){this.topOutlet=De}consumeTransition(){let bt,De="root";const Xt=this.animationBuilder;return"auto"===this.direction?(De=this.guessDirection,bt=this.guessAnimation):(bt=this.animated,De=this.direction),this.direction=Gl,this.animated=ol,this.animationBuilder=void 0,{direction:De,animation:bt,animationBuilder:Xt}}navigate(De,bt){if(Array.isArray(De))return this.router.navigate(De,bt);{const Xt=this.serializer.parse(De.toString());return void 0!==bt.queryParams&&(Xt.queryParams=Object.assign({},bt.queryParams)),void 0!==bt.fragment&&(Xt.fragment=bt.fragment),this.router.navigateByUrl(Xt,bt)}}}$r.\u0275fac=function(De){return new(De||$r)(o.LFG(wa),o.LFG(me.Ye),o.LFG(T.Hx),o.LFG(T.F0,8))},$r.\u0275prov=o.Yz7({token:$r,factory:$r.\u0275fac,providedIn:"root"});const Ts=(Jt,De,bt)=>{if(!1!==De){if(void 0!==bt)return bt;if("forward"===Jt||"back"===Jt)return Jt;if("root"===Jt&&!0===De)return"forward"}},Gl="auto",ol=void 0;class zc{}class al{constructor(De,bt,Xt,Qi,Kt,Fe,Wt,yi,Ki,ya,Na,qi,ia,$o){this.parentContexts=De,this.location=bt,this.config=Kt,this.navCtrl=Fe,this.environmentInjector=Wt,this.componentFactoryResolver=yi,this.parentOutlet=$o,this.activated=null,this.activatedView=null,this._activatedRoute=null,this.proxyMap=new WeakMap,this.currentActivatedRoute$=new E.X(null),this.stackEvents=new o.vpe,this.activateEvents=new o.vpe,this.deactivateEvents=new o.vpe,this.nativeEl=ya.nativeElement,this.name=Xt||T.eC,this.tabsPrefix="true"===Qi?ln(Na,ia):void 0,this.stackCtrl=new gi(this.tabsPrefix,this.nativeEl,Na,Fe,qi,Ki),De.onChildOutletCreated(this.name,this)}set animation(De){this.nativeEl.animation=De}set animated(De){this.nativeEl.animated=De}set swipeGesture(De){this._swipeGesture=De,this.nativeEl.swipeHandler=De?{canStart:()=>this.stackCtrl.canGoBack(1)&&!this.stackCtrl.hasRunningTask(),onStart:()=>this.stackCtrl.startBackTransition(),onEnd:bt=>this.stackCtrl.endBackTransition(bt)}:void 0}ngOnDestroy(){this.stackCtrl.destroy()}getContext(){return this.parentContexts.getContext(this.name)}ngOnInit(){if(!this.activated){const De=this.getContext();De?.route&&this.activateWith(De.route,De.resolver||null)}new Promise(De=>(0,ue.c)(this.nativeEl,De)).then(()=>{void 0===this._swipeGesture&&(this.swipeGesture=this.config.getBoolean("swipeBackEnabled","ios"===this.nativeEl.mode))})}get isActivated(){return!!this.activated}get component(){if(!this.activated)throw new Error("Outlet is not activated");return this.activated.instance}get activatedRoute(){if(!this.activated)throw new Error("Outlet is not activated");return this._activatedRoute}get activatedRouteData(){return this._activatedRoute?this._activatedRoute.snapshot.data:{}}detach(){throw new Error("incompatible reuse strategy")}attach(De,bt){throw new Error("incompatible reuse strategy")}deactivate(){if(this.activated){if(this.activatedView){const bt=this.getContext();this.activatedView.savedData=new Map(bt.children.contexts);const Xt=this.activatedView.savedData.get("primary");if(Xt&&bt.route&&(Xt.route=Object.assign({},bt.route)),this.activatedView.savedExtras={},bt.route){const Qi=bt.route.snapshot;this.activatedView.savedExtras.queryParams=Qi.queryParams,this.activatedView.savedExtras.fragment=Qi.fragment}}const De=this.component;this.activatedView=null,this.activated=null,this._activatedRoute=null,this.deactivateEvents.emit(De)}}activateWith(De,bt){if(this.isActivated)throw new Error("Cannot activate an already activated outlet");this._activatedRoute=De;let Xt,Qi=this.stackCtrl.getExistingView(De);if(Qi){Xt=this.activated=Qi.ref;const Kt=Qi.savedData;if(Kt){this.getContext().children.contexts=Kt}this.updateActivatedRouteProxy(Xt.instance,De)}else{const Kt=De._futureSnapshot,Fe=Kt.routeConfig.component;if(null==Fe&&Kt.component)return void console.warn("[Ionic Warning]: Standalone components are not currently supported with ion-router-outlet. You can track this feature request at https://github.com/ionic-team/ionic-framework/issues/25404");const Wt=this.parentContexts.getOrCreateContext(this.name).children,yi=new E.X(null),Ki=this.createActivatedRouteProxy(yi,De),ya=new Jn(Ki,Wt,this.location.injector);if((bt=bt||this.componentFactoryResolver)&&tt(bt)){const Na=bt.resolveComponentFactory(Fe);Xt=this.activated=this.location.createComponent(Na,this.location.length,ya)}else{const Na=bt??this.environmentInjector;Xt=this.activated=this.location.createComponent(Fe,{index:this.location.length,injector:ya,environmentInjector:Na})}yi.next(Xt.instance),Qi=this.stackCtrl.createView(this.activated,De),this.proxyMap.set(Xt.instance,Ki),this.currentActivatedRoute$.next({component:Xt.instance,activatedRoute:De})}this.activatedView=Qi,this.stackCtrl.setActive(Qi).then(Kt=>{this.navCtrl.setTopOutlet(this),this.activateEvents.emit(Xt.instance),this.stackEvents.emit(Kt)})}canGoBack(De=1,bt){return this.stackCtrl.canGoBack(De,bt)}pop(De=1,bt){return this.stackCtrl.pop(De,bt)}getLastUrl(De){const bt=this.stackCtrl.getLastUrl(De);return bt?bt.url:void 0}getLastRouteView(De){return this.stackCtrl.getLastUrl(De)}getRootView(De){return this.stackCtrl.getRootUrl(De)}getActiveStackId(){return this.stackCtrl.getActiveStackId()}createActivatedRouteProxy(De,bt){const Xt=new T.gz;return Xt._futureSnapshot=bt._futureSnapshot,Xt._routerState=bt._routerState,Xt.snapshot=bt.snapshot,Xt.outlet=bt.outlet,Xt.component=bt.component,Xt._paramMap=this.proxyObservable(De,"paramMap"),Xt._queryParamMap=this.proxyObservable(De,"queryParamMap"),Xt.url=this.proxyObservable(De,"url"),Xt.params=this.proxyObservable(De,"params"),Xt.queryParams=this.proxyObservable(De,"queryParams"),Xt.fragment=this.proxyObservable(De,"fragment"),Xt.data=this.proxyObservable(De,"data"),Xt}proxyObservable(De,bt){return De.pipe((0,de.h)(Xt=>!!Xt),(0,re.w)(Xt=>this.currentActivatedRoute$.pipe((0,de.h)(Qi=>null!==Qi&&Qi.component===Xt),(0,re.w)(Qi=>Qi&&Qi.activatedRoute[bt]),(0,oe.x)())))}updateActivatedRouteProxy(De,bt){const Xt=this.proxyMap.get(De);if(!Xt)throw new Error("Could not find activated route proxy for view");Xt._futureSnapshot=bt._futureSnapshot,Xt._routerState=bt._routerState,Xt.snapshot=bt.snapshot,Xt.outlet=bt.outlet,Xt.component=bt.component,this.currentActivatedRoute$.next({component:De,activatedRoute:bt})}}al.\u0275fac=function(De){return new(De||al)(o.Y36(T.y6),o.Y36(o.s_b),o.$8M("name"),o.$8M("tabs"),o.Y36(Vo),o.Y36($r),o.Y36(zc,8),o.Y36(o._Vd,8),o.Y36(me.Ye),o.Y36(o.SBq),o.Y36(T.F0),o.Y36(o.R0b),o.Y36(T.gz),o.Y36(al,12))},al.\u0275dir=o.lG2({type:al,selectors:[["ion-router-outlet"]],inputs:{animated:"animated",animation:"animation",mode:"mode",swipeGesture:"swipeGesture"},outputs:{stackEvents:"stackEvents",activateEvents:"activate",deactivateEvents:"deactivate"},exportAs:["outlet"]});class Jn{constructor(De,bt,Xt){this.route=De,this.childContexts=bt,this.parent=Xt}get(De,bt){return De===T.gz?this.route:De===T.y6?this.childContexts:this.parent.get(De,bt)}}class tn{constructor(De){this.navCtrl=De,this.ionTabsWillChange=new o.vpe,this.ionTabsDidChange=new o.vpe}onPageSelected(De){const bt=De.enteringView.stackId;De.tabSwitch&&void 0!==bt&&(this.ionTabsWillChange.emit({tab:bt}),this.tabBar&&(this.tabBar.selectedTab=bt),this.ionTabsDidChange.emit({tab:bt}))}select(De){const bt="string"==typeof De,Xt=bt?De:De.detail.tab,Qi=this.outlet.getActiveStackId()===Xt,Kt=`${this.outlet.tabsPrefix}/${Xt}`;if(bt||De.stopPropagation(),Qi){const Fe=this.outlet.getActiveStackId();if(this.outlet.getLastRouteView(Fe)?.url===Kt)return;const yi=this.outlet.getRootView(Xt),Ki=yi&&Kt===yi.url&&yi.savedExtras;return this.navCtrl.navigateRoot(Kt,Object.assign(Object.assign({},Ki),{animated:!0,animationDirection:"back"}))}{const Fe=this.outlet.getLastRouteView(Xt),Wt=Fe?.url||Kt,yi=Fe?.savedExtras;return this.navCtrl.navigateRoot(Wt,Object.assign(Object.assign({},yi),{animated:!0,animationDirection:"back"}))}}getSelected(){return this.outlet.getActiveStackId()}}tn.\u0275fac=function(De){return new(De||tn)(o.Y36($r))},tn.\u0275cmp=o.Xpm({type:tn,selectors:[["ion-tabs"]],contentQueries:function(De,bt,Xt){if(1&De&&o.Suo(Xt,Pt,5),2&De){let Qi;o.iGM(Qi=o.CRH())&&(bt.tabBar=Qi.first)}},viewQuery:function(De,bt){if(1&De&&o.Gf(ke,5,al),2&De){let Xt;o.iGM(Xt=o.CRH())&&(bt.outlet=Xt.first)}},hostBindings:function(De,bt){1&De&&o.NdJ("ionTabButtonClick",function(Qi){return bt.select(Qi)})},outputs:{ionTabsWillChange:"ionTabsWillChange",ionTabsDidChange:"ionTabsDidChange"},ngContentSelectors:["[slot=top]","*"],decls:5,vars:0,consts:[[1,"tabs-inner"],["tabs","true",3,"stackEvents"],["outlet",""]],template:function(De,bt){1&De&&(o.F$t(Be),o.Hsn(0),o.TgZ(1,"div",0)(2,"ion-router-outlet",1,2),o.NdJ("stackEvents",function(Qi){return bt.onPageSelected(Qi)}),o.qZA()(),o.Hsn(4,1))},dependencies:[al],styles:["[_nghost-%COMP%] {\n        display: flex;\n        position: absolute;\n        top: 0;\n        left: 0;\n        right: 0;\n        bottom: 0;\n\n        flex-direction: column;\n\n        width: 100%;\n        height: 100%;\n\n        contain: layout size style;\n        z-index: $z-index-page-container;\n      }\n      .tabs-inner[_ngcontent-%COMP%] {\n        position: relative;\n\n        flex: 1;\n\n        contain: layout size style;\n      }"]});class ti{constructor(De,bt,Xt){this.routerOutlet=De,this.navCtrl=bt,this.config=Xt}onClick(De){var bt;const Xt=this.defaultHref||this.config.get("backButtonDefaultHref");null!==(bt=this.routerOutlet)&&void 0!==bt&&bt.canGoBack()?(this.navCtrl.setDirection("back",void 0,void 0,this.routerAnimation),this.routerOutlet.pop(),De.preventDefault()):null!=Xt&&(this.navCtrl.navigateBack(Xt,{animation:this.routerAnimation}),De.preventDefault())}}ti.\u0275fac=function(De){return new(De||ti)(o.Y36(al,8),o.Y36($r),o.Y36(Vo))},ti.\u0275dir=o.lG2({type:ti,selectors:[["ion-back-button"]],hostBindings:function(De,bt){1&De&&o.NdJ("click",function(Qi){return bt.onClick(Qi)})},inputs:{defaultHref:"defaultHref",routerAnimation:"routerAnimation"}});let _i=class{constructor(De,bt,Xt,Qi,Kt){this.el=De.nativeElement,De.nativeElement.delegate=Qi.create(bt,Xt,Kt),mi(this,this.el,["ionNavDidChange","ionNavWillChange"])}};_i.\u0275fac=function(De){return new(De||_i)(o.Y36(o.SBq),o.Y36(o._Vd),o.Y36(o.zs3),o.Y36(_o),o.Y36(o.s_b))},_i.\u0275dir=o.lG2({type:_i,selectors:[["ion-nav"]]}),_i=(0,l.__decorate)([Bn({inputs:["animated","animation","root","rootParams","swipeGesture"],methods:["push","insert","insertPages","pop","popTo","popToRoot","removeIndex","setRoot","setPages","getActive","getByIndex","canGoBack","getPrevious"]})],_i);class ar{constructor(De,bt,Xt,Qi,Kt){this.locationStrategy=De,this.navCtrl=bt,this.elementRef=Xt,this.router=Qi,this.routerLink=Kt,this.routerDirection="forward"}ngOnInit(){this.updateTargetUrlAndHref()}ngOnChanges(){this.updateTargetUrlAndHref()}updateTargetUrlAndHref(){var De;if(null!==(De=this.routerLink)&&void 0!==De&&De.urlTree){const bt=this.locationStrategy.prepareExternalUrl(this.router.serializeUrl(this.routerLink.urlTree));this.elementRef.nativeElement.href=bt}}onClick(De){this.navCtrl.setDirection(this.routerDirection,void 0,void 0,this.routerAnimation),De.preventDefault()}}ar.\u0275fac=function(De){return new(De||ar)(o.Y36(me.S$),o.Y36($r),o.Y36(o.SBq),o.Y36(T.F0),o.Y36(T.rH,8))},ar.\u0275dir=o.lG2({type:ar,selectors:[["","routerLink","",5,"a",5,"area"]],hostBindings:function(De,bt){1&De&&o.NdJ("click",function(Qi){return bt.onClick(Qi)})},inputs:{routerDirection:"routerDirection",routerAnimation:"routerAnimation"},features:[o.TTD]});class vr{constructor(De,bt,Xt,Qi,Kt){this.locationStrategy=De,this.navCtrl=bt,this.elementRef=Xt,this.router=Qi,this.routerLink=Kt,this.routerDirection="forward"}ngOnInit(){this.updateTargetUrlAndHref()}ngOnChanges(){this.updateTargetUrlAndHref()}updateTargetUrlAndHref(){var De;if(null!==(De=this.routerLink)&&void 0!==De&&De.urlTree){const bt=this.locationStrategy.prepareExternalUrl(this.router.serializeUrl(this.routerLink.urlTree));this.elementRef.nativeElement.href=bt}}onClick(){this.navCtrl.setDirection(this.routerDirection,void 0,void 0,this.routerAnimation)}}vr.\u0275fac=function(De){return new(De||vr)(o.Y36(me.S$),o.Y36($r),o.Y36(o.SBq),o.Y36(T.F0),o.Y36(T.rH,8))},vr.\u0275dir=o.lG2({type:vr,selectors:[["a","routerLink",""],["area","routerLink",""]],hostBindings:function(De,bt){1&De&&o.NdJ("click",function(){return bt.onClick()})},inputs:{routerDirection:"routerDirection",routerAnimation:"routerAnimation"},features:[o.TTD]});class Qr{constructor(De){this.templateRef=De}}Qr.\u0275fac=function(De){return new(De||Qr)(o.Y36(o.Rgc))},Qr.\u0275dir=o.lG2({type:Qr,selectors:[["","virtualFooter",""]]});class Li{constructor(De){this.templateRef=De}}Li.\u0275fac=function(De){return new(De||Li)(o.Y36(o.Rgc))},Li.\u0275dir=o.lG2({type:Li,selectors:[["","virtualHeader",""]]});class Ta{constructor(De,bt){this.templateRef=De,this.viewContainer=bt}}Ta.\u0275fac=function(De){return new(De||Ta)(o.Y36(o.Rgc),o.Y36(o.s_b))},Ta.\u0275dir=o.lG2({type:Ta,selectors:[["","virtualItem",""]]});let La=class{constructor(De,bt,Xt){this.z=De,this.iterableDiffers=bt,this.refMap=new WeakMap,this.el=Xt.nativeElement,this.el.nodeRender=this.nodeRender.bind(this)}ngOnChanges(De){if(this.trackBy&&"items"in De){const bt=De.items.currentValue;if(void 0===this.differ&&null!=bt)try{this.differ=this.iterableDiffers.find(bt).create(this.trackBy)}catch{throw new Error(`Cannot find a differ supporting object '${bt}'. VirtualScroll only supports binding to Iterables such as Arrays.`)}}}ngDoCheck(){null!==(void 0!==this.differ&&this.items?this.differ.diff(this.items):null)&&this.checkRange(0)}nodeRender(De,bt,Xt){return this.z.run(()=>{let Qi;if(De){Qi=this.refMap.get(De);const Kt=Qi.context;Kt.$implicit=bt.value,Kt.index=bt.index}else Qi=this.itmTmp.viewContainer.createEmbeddedView(this.getComponent(bt.type),{$implicit:bt.value,index:Xt},Xt),De=Ps(Qi),this.refMap.set(De,Qi);return Qi.detectChanges(),De})}getComponent(De){switch(De){case"item":return this.itmTmp.templateRef;case"header":return this.hdrTmp.templateRef;case"footer":return this.ftrTmp.templateRef;default:throw new Error("template for virtual item was not provided")}}};La.\u0275fac=function(De){return new(De||La)(o.Y36(o.R0b),o.Y36(o.ZZ4),o.Y36(o.SBq))},La.\u0275cmp=o.Xpm({type:La,selectors:[["ion-virtual-scroll"]],contentQueries:function(De,bt,Xt){if(1&De&&(o.Suo(Xt,Ta,5),o.Suo(Xt,Li,5),o.Suo(Xt,Qr,5)),2&De){let Qi;o.iGM(Qi=o.CRH())&&(bt.itmTmp=Qi.first),o.iGM(Qi=o.CRH())&&(bt.hdrTmp=Qi.first),o.iGM(Qi=o.CRH())&&(bt.ftrTmp=Qi.first)}},inputs:{approxItemHeight:"approxItemHeight",approxHeaderHeight:"approxHeaderHeight",approxFooterHeight:"approxFooterHeight",headerFn:"headerFn",footerFn:"footerFn",items:"items",itemHeight:"itemHeight",headerHeight:"headerHeight",footerHeight:"footerHeight",trackBy:"trackBy"},features:[o.TTD],ngContentSelectors:j,decls:1,vars:0,template:function(De,bt){1&De&&(o.F$t(),o.Hsn(0))},encapsulation:2,changeDetection:0}),La=(0,l.__decorate)([Bn({inputs:["approxItemHeight","approxHeaderHeight","approxFooterHeight","headerFn","footerFn","items","itemHeight","headerHeight","footerHeight"],methods:["checkEnd","checkRange","positionForItem"]})],La);const Ps=Jt=>{const De=Jt.rootNodes;for(let bt=0;bt<De.length;bt++)if(1===De[bt].nodeType)return De[bt];throw new Error("virtual element was not created")};let is=class{constructor(De,bt,Xt){this.z=Xt,this.isCmpOpen=!1,this.el=bt.nativeElement,this.el.addEventListener("willPresent",()=>{this.isCmpOpen=!0,De.detectChanges()}),this.el.addEventListener("didDismiss",()=>{this.isCmpOpen=!1,De.detectChanges()}),mi(this,this.el,["ionModalDidPresent","ionModalWillPresent","ionModalWillDismiss","ionModalDidDismiss","ionBreakpointDidChange","didPresent","willPresent","willDismiss","didDismiss"])}};is.\u0275fac=function(De){return new(De||is)(o.Y36(o.sBO),o.Y36(o.SBq),o.Y36(o.R0b))},is.\u0275cmp=o.Xpm({type:is,selectors:[["ion-modal"]],contentQueries:function(De,bt,Xt){if(1&De&&o.Suo(Xt,o.Rgc,5),2&De){let Qi;o.iGM(Qi=o.CRH())&&(bt.template=Qi.first)}},inputs:{animated:"animated",keepContentsMounted:"keepContentsMounted",backdropBreakpoint:"backdropBreakpoint",backdropDismiss:"backdropDismiss",breakpoints:"breakpoints",canDismiss:"canDismiss",cssClass:"cssClass",enterAnimation:"enterAnimation",event:"event",handle:"handle",handleBehavior:"handleBehavior",initialBreakpoint:"initialBreakpoint",isOpen:"isOpen",keyboardClose:"keyboardClose",leaveAnimation:"leaveAnimation",mode:"mode",presentingElement:"presentingElement",showBackdrop:"showBackdrop",swipeToClose:"swipeToClose",translucent:"translucent",trigger:"trigger"},decls:1,vars:1,consts:[["class","ion-page",4,"ngIf"],[1,"ion-page"],[3,"ngTemplateOutlet"]],template:function(De,bt){1&De&&o.YNc(0,mt,2,1,"div",0),2&De&&o.Q6J("ngIf",bt.isCmpOpen||bt.keepContentsMounted)},dependencies:[me.O5,me.tP],encapsulation:2,changeDetection:0}),is=(0,l.__decorate)([Bn({inputs:["animated","keepContentsMounted","backdropBreakpoint","backdropDismiss","breakpoints","canDismiss","cssClass","enterAnimation","event","handle","handleBehavior","initialBreakpoint","isOpen","keyboardClose","leaveAnimation","mode","presentingElement","showBackdrop","swipeToClose","translucent","trigger"],methods:["present","dismiss","onDidDismiss","onWillDismiss","setCurrentBreakpoint","getCurrentBreakpoint"]})],is);let yt=class{constructor(De,bt,Xt){this.z=Xt,this.isCmpOpen=!1,this.el=bt.nativeElement,this.el.addEventListener("willPresent",()=>{this.isCmpOpen=!0,De.detectChanges()}),this.el.addEventListener("didDismiss",()=>{this.isCmpOpen=!1,De.detectChanges()}),mi(this,this.el,["ionPopoverDidPresent","ionPopoverWillPresent","ionPopoverWillDismiss","ionPopoverDidDismiss","didPresent","willPresent","willDismiss","didDismiss"])}};yt.\u0275fac=function(De){return new(De||yt)(o.Y36(o.sBO),o.Y36(o.SBq),o.Y36(o.R0b))},yt.\u0275cmp=o.Xpm({type:yt,selectors:[["ion-popover"]],contentQueries:function(De,bt,Xt){if(1&De&&o.Suo(Xt,o.Rgc,5),2&De){let Qi;o.iGM(Qi=o.CRH())&&(bt.template=Qi.first)}},inputs:{alignment:"alignment",animated:"animated",arrow:"arrow",keepContentsMounted:"keepContentsMounted",backdropDismiss:"backdropDismiss",cssClass:"cssClass",dismissOnSelect:"dismissOnSelect",enterAnimation:"enterAnimation",event:"event",isOpen:"isOpen",keyboardClose:"keyboardClose",leaveAnimation:"leaveAnimation",mode:"mode",showBackdrop:"showBackdrop",translucent:"translucent",trigger:"trigger",triggerAction:"triggerAction",reference:"reference",size:"size",side:"side"},decls:1,vars:1,consts:[[3,"ngTemplateOutlet",4,"ngIf"],[3,"ngTemplateOutlet"]],template:function(De,bt){1&De&&o.YNc(0,ut,1,1,"ng-container",0),2&De&&o.Q6J("ngIf",bt.isCmpOpen||bt.keepContentsMounted)},dependencies:[me.O5,me.tP],encapsulation:2,changeDetection:0}),yt=(0,l.__decorate)([Bn({inputs:["alignment","animated","arrow","keepContentsMounted","backdropDismiss","cssClass","dismissOnSelect","enterAnimation","event","isOpen","keyboardClose","leaveAnimation","mode","showBackdrop","translucent","trigger","triggerAction","reference","size","side"],methods:["present","dismiss","onDidDismiss","onWillDismiss"]})],yt);class Dt{constructor(De){this.ctrl=De}create(De){return this.ctrl.create(De||{})}dismiss(De,bt,Xt){return this.ctrl.dismiss(De,bt,Xt)}getTop(){return this.ctrl.getTop()}}class We extends Dt{constructor(){super(X.b)}}We.\u0275fac=function(De){return new(De||We)},We.\u0275prov=o.Yz7({token:We,factory:We.\u0275fac,providedIn:"root"});class Rt extends Dt{constructor(){super(X.a)}}Rt.\u0275fac=function(De){return new(De||Rt)},Rt.\u0275prov=o.Yz7({token:Rt,factory:Rt.\u0275fac,providedIn:"root"});class Qn extends Dt{constructor(){super(X.l)}}Qn.\u0275fac=function(De){return new(De||Qn)},Qn.\u0275prov=o.Yz7({token:Qn,factory:Qn.\u0275fac,providedIn:"root"});class fi{open(De){return ae.m.open(De)}close(De){return ae.m.close(De)}toggle(De){return ae.m.toggle(De)}enable(De,bt){return ae.m.enable(De,bt)}swipeGesture(De,bt){return ae.m.swipeGesture(De,bt)}isOpen(De){return ae.m.isOpen(De)}isEnabled(De){return ae.m.isEnabled(De)}get(De){return ae.m.get(De)}getOpen(){return ae.m.getOpen()}getMenus(){return ae.m.getMenus()}}fi.\u0275fac=function(De){return new(De||fi)},fi.\u0275prov=o.Yz7({token:fi,factory:fi.\u0275fac,providedIn:"root"});class Xi extends Dt{constructor(){super(X.p)}}Xi.\u0275fac=function(De){return new(De||Xi)},Xi.\u0275prov=o.Yz7({token:Xi,factory:Xi.\u0275fac,providedIn:"root"});class wr extends Dt{constructor(De,bt,Xt,Qi){super(X.m),this.angularDelegate=De,this.resolver=bt,this.injector=Xt,this.environmentInjector=Qi}create(De){var bt;return super.create(Object.assign(Object.assign({},De),{delegate:this.angularDelegate.create(null!==(bt=this.resolver)&&void 0!==bt?bt:this.environmentInjector,this.injector)}))}}wr.\u0275fac=function(De){return new(De||wr)(o.LFG(_o),o.LFG(o._Vd),o.LFG(o.zs3),o.LFG(zc,8))},wr.\u0275prov=o.Yz7({token:wr,factory:wr.\u0275fac});class Mo extends Dt{constructor(De,bt,Xt,Qi){super(X.c),this.angularDelegate=De,this.resolver=bt,this.injector=Xt,this.environmentInjector=Qi}create(De){var bt;return super.create(Object.assign(Object.assign({},De),{delegate:this.angularDelegate.create(null!==(bt=this.resolver)&&void 0!==bt?bt:this.environmentInjector,this.injector)}))}}Mo.\u0275fac=function(De){return new(De||Mo)(o.LFG(_o),o.LFG(o._Vd),o.LFG(o.zs3),o.LFG(zc,8))},Mo.\u0275prov=o.Yz7({token:Mo,factory:Mo.\u0275fac});class ro extends Dt{constructor(){super(X.t)}}ro.\u0275fac=function(De){return new(De||ro)},ro.\u0275prov=o.Yz7({token:ro,factory:ro.\u0275fac,providedIn:"root"});class qr{read(De){ho().read(De)}write(De){ho().write(De)}}qr.\u0275fac=function(De){return new(De||qr)},qr.\u0275prov=o.Yz7({token:qr,factory:qr.\u0275fac,providedIn:"root"});const ho=()=>{const Jt=typeof window<"u"?window:null;if(null!=Jt){const De=Jt.Ionic;return De?.queue?De.queue:{read:bt=>Jt.requestAnimationFrame(bt),write:bt=>Jt.requestAnimationFrame(bt)}}return{read:De=>De(),write:De=>De()}};class xa{create(De){return(0,n.c)(De)}easingTime(De,bt,Xt,Qi,Kt){return(0,B.g)(De,bt,Xt,Qi,Kt)}}xa.\u0275fac=function(De){return new(De||xa)},xa.\u0275prov=o.Yz7({token:xa,factory:xa.\u0275fac,providedIn:"root"});class To{constructor(De){this.zone=De}create(De,bt=!1){return bt&&Object.getOwnPropertyNames(De).forEach(Xt=>{if("function"==typeof De[Xt]){const Qi=De[Xt];De[Xt]=(...Kt)=>this.zone.run(()=>Qi(...Kt))}}),(0,Y.createGesture)(De)}}To.\u0275fac=function(De){return new(De||To)(o.LFG(o.R0b))},To.\u0275prov=o.Yz7({token:To,factory:To.\u0275fac,providedIn:"root"});class Ao{shouldDetach(De){return!1}shouldAttach(De){return!1}store(De,bt){}retrieve(De){return null}shouldReuseRoute(De,bt){if(De.routeConfig!==bt.routeConfig)return!1;const Xt=De.params,Qi=bt.params,Kt=Object.keys(Xt),Fe=Object.keys(Qi);if(Kt.length!==Fe.length)return!1;for(const Wt of Kt)if(Qi[Wt]!==Xt[Wt])return!1;return!0}}const Ha=(Jt,De,bt)=>()=>{const Xt=De.defaultView;if(Xt&&typeof window<"u"){(Jt=>{const De=window,bt=De.Ionic;if(!bt||!bt.config||"Object"===bt.config.constructor.name)De.Ionic=De.Ionic||{},De.Ionic.config=Object.assign(Object.assign({},De.Ionic.config),Jt),De.Ionic.config})(Object.assign(Object.assign({},Jt),{_zoneGate:Kt=>bt.run(Kt)}));const Qi="__zone_symbol__addEventListener"in De.body?"__zone_symbol__addEventListener":"addEventListener";return function be(){var Jt=[];if(typeof window<"u"){var De=window;(!De.customElements||De.Element&&(!De.Element.prototype.closest||!De.Element.prototype.matches||!De.Element.prototype.remove||!De.Element.prototype.getRootNode))&&Jt.push(p.e(6748).then(p.t.bind(p,30723,23))),("function"!=typeof Object.assign||!Object.entries||!Array.prototype.find||!Array.prototype.includes||!String.prototype.startsWith||!String.prototype.endsWith||De.NodeList&&!De.NodeList.prototype.forEach||!De.fetch||!function(){try{var Xt=new URL("b","http://a");return Xt.pathname="c%20d","http://a/c%20d"===Xt.href&&Xt.searchParams}catch{return!1}}()||typeof WeakMap>"u")&&Jt.push(p.e(2214).then(p.t.bind(p,24144,23)))}return Promise.all(Jt)}().then(()=>Oe(0,{exclude:["ion-tabs","ion-tab"],syncQueue:!0,raf:Ve,jmp:Kt=>bt.runOutsideAngular(Kt),ael(Kt,Fe,Wt,yi){Kt[Qi](Fe,Wt,yi)},rel(Kt,Fe,Wt,yi){Kt.removeEventListener(Fe,Wt,yi)}}))}};class ba{static forRoot(De){return{ngModule:ba,providers:[{provide:Ds,useValue:De},{provide:o.ip1,useFactory:Ha,multi:!0,deps:[Ds,me.K0,o.R0b]}]}}}ba.\u0275fac=function(De){return new(De||ba)},ba.\u0275mod=o.oAB({type:ba}),ba.\u0275inj=o.cJS({providers:[_o,wr,Mo],imports:[[me.ez]]})},89442:(qe,I,p)=>{"use strict";p.d(I,{c:()=>he});var o=p(23756);let e;const D=ae=>ae.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),g=ae=>{if(void 0===e){const X=void 0!==ae.style.animationName,ve=void 0!==ae.style.webkitAnimationName;e=!X&&ve?"-webkit-":""}return e},E=(ae,X,ve)=>{const ye=X.startsWith("animation")?g(ae):"";ae.style.setProperty(ye+X,ve)},T=(ae,X)=>{const ve=X.startsWith("animation")?g(ae):"";ae.style.removeProperty(ve+X)},w=[],ue=(ae=[],X)=>{if(void 0!==X){const ve=Array.isArray(X)?X:[X];return[...ae,...ve]}return ae},he=ae=>{let X,ve,ye,ge,ne,pe,oe,Be,nt,mt,ut,wt,ft,Pe=[],xe=[],de=[],re=!1,me={},be=[],le=[],Z={},Oe=0,j=!1,ke=!1,Ve=!0,tt=!1,Ne=!0,Ct=!1;const rn=ae,He=[],st=[],nn=[],Dn=[],Mn=[],vi=[],Gi=[],mi=[],wi=[],Bn=[],kn="function"==typeof AnimationEffect||"function"==typeof window.AnimationEffect,On="function"==typeof Element&&"function"==typeof Element.prototype.animate&&kn,Bt=()=>Bn,Fn=Pt=>{Vn(),Pt&&Hn()},si=(Pt,cn)=>((cn?.oneTimeCallback?st:He).push({c:Pt,o:cn}),ft),Vi=()=>(He.length=0,st.length=0,ft),Vn=()=>{if(On)Bn.forEach(Pt=>{Pt.cancel()}),Bn.length=0;else{const Pt=nn.slice();(0,o.r)(()=>{Pt.forEach(cn=>{T(cn,"animation-name"),T(cn,"animation-duration"),T(cn,"animation-timing-function"),T(cn,"animation-iteration-count"),T(cn,"animation-delay"),T(cn,"animation-play-state"),T(cn,"animation-fill-mode"),T(cn,"animation-direction")})})}},Hn=()=>{Mn.forEach(Pt=>{Pt?.parentNode&&Pt.parentNode.removeChild(Pt)}),Mn.length=0},Yt=()=>void 0!==ne?ne:oe?oe.getFill():"both",oi=()=>void 0!==nt?nt:void 0!==pe?pe:oe?oe.getDirection():"normal",Ni=()=>j?"linear":void 0!==ye?ye:oe?oe.getEasing():"linear",Nn=()=>ke?0:void 0!==mt?mt:void 0!==ve?ve:oe?oe.getDuration():0,pr=()=>void 0!==ge?ge:oe?oe.getIterations():1,Sn=()=>void 0!==ut?ut:void 0!==X?X:oe?oe.getDelay():0,mo=Pt=>{On?Bt().forEach(cn=>{if(cn.effect.setKeyframes)cn.effect.setKeyframes(Pt);else{const Ln=new KeyframeEffect(cn.effect.target,Pt,cn.effect.getTiming());cn.effect=Ln}}):Bo()},ea=()=>{0!==Oe&&(Oe--,0===Oe&&((()=>{Gn(),mi.forEach(hi=>hi()),wi.forEach(hi=>hi());const Pt=Ve?1:0,cn=be,Ln=le,ii=Z;nn.forEach(hi=>{const Ri=hi.classList;cn.forEach(_r=>Ri.add(_r)),Ln.forEach(_r=>Ri.remove(_r));for(const _r in ii)ii.hasOwnProperty(_r)&&E(hi,_r,ii[_r])}),He.forEach(hi=>hi.c(Pt,ft)),st.forEach(hi=>hi.c(Pt,ft)),st.length=0,Ne=!0,Ve&&(tt=!0),Ve=!0})(),oe&&oe.animationFinish()))},Bo=(Pt=!0)=>{Hn();const cn=(ae=>(ae.forEach(X=>{for(const ve in X)if(X.hasOwnProperty(ve)){const ye=X[ve];if("easing"===ve)X["animation-timing-function"]=ye,delete X[ve];else{const ge=D(ve);ge!==ve&&(X[ge]=ye,delete X[ve])}}}),ae))(Pe);nn.forEach(Ln=>{if(cn.length>0){const ii=((ae=[])=>ae.map(X=>{const ve=X.offset,ye=[];for(const ge in X)X.hasOwnProperty(ge)&&"offset"!==ge&&ye.push(`${ge}: ${X[ge]};`);return`${100*ve}% { ${ye.join(" ")} }`}).join(" "))(cn);wt=void 0!==ae?ae:(ae=>{let X=w.indexOf(ae);return X<0&&(X=w.push(ae)-1),`ion-animation-${X}`})(ii);const hi=((ae,X,ve)=>{const ye=(ae=>{const X=ae.getRootNode();return X.head||X})(ve),ge=g(ve),ne=ye.querySelector("#"+ae);if(ne)return ne;const pe=(ve.ownerDocument||document).createElement("style");return pe.id=ae,pe.textContent=`@${ge}keyframes ${ae} { ${X} } @${ge}keyframes ${ae}-alt { ${X} }`,ye.appendChild(pe),pe})(wt,ii,Ln);Mn.push(hi),E(Ln,"animation-duration",`${Nn()}ms`),E(Ln,"animation-timing-function",Ni()),E(Ln,"animation-delay",`${Sn()}ms`),E(Ln,"animation-fill-mode",Yt()),E(Ln,"animation-direction",oi());const Ri=pr()===1/0?"infinite":pr().toString();E(Ln,"animation-iteration-count",Ri),E(Ln,"animation-play-state","paused"),Pt&&E(Ln,"animation-name",`${hi.id}-alt`),(0,o.r)(()=>{E(Ln,"animation-name",hi.id||null)})}})},an=(Pt=!0)=>{(()=>{vi.forEach(ii=>ii()),Gi.forEach(ii=>ii());const Pt=xe,cn=de,Ln=me;nn.forEach(ii=>{const hi=ii.classList;Pt.forEach(Ri=>hi.add(Ri)),cn.forEach(Ri=>hi.remove(Ri));for(const Ri in Ln)Ln.hasOwnProperty(Ri)&&E(ii,Ri,Ln[Ri])})})(),Pe.length>0&&(On?(nn.forEach(Pt=>{const cn=Pt.animate(Pe,{id:rn,delay:Sn(),duration:Nn(),easing:Ni(),iterations:pr(),fill:Yt(),direction:oi()});cn.pause(),Bn.push(cn)}),Bn.length>0&&(Bn[0].onfinish=()=>{ea()})):Bo(Pt)),re=!0},Zn=Pt=>{if(Pt=Math.min(Math.max(Pt,0),.9999),On)Bn.forEach(cn=>{cn.currentTime=cn.effect.getComputedTiming().delay+Nn()*Pt,cn.pause()});else{const cn=`-${Nn()*Pt}ms`;nn.forEach(Ln=>{Pe.length>0&&(E(Ln,"animation-delay",cn),E(Ln,"animation-play-state","paused"))})}},Ci=Pt=>{Bn.forEach(cn=>{cn.effect.updateTiming({delay:Sn(),duration:Nn(),easing:Ni(),iterations:pr(),fill:Yt(),direction:oi()})}),void 0!==Pt&&Zn(Pt)},Xn=(Pt=!0,cn)=>{(0,o.r)(()=>{nn.forEach(Ln=>{E(Ln,"animation-name",wt||null),E(Ln,"animation-duration",`${Nn()}ms`),E(Ln,"animation-timing-function",Ni()),E(Ln,"animation-delay",void 0!==cn?`-${cn*Nn()}ms`:`${Sn()}ms`),E(Ln,"animation-fill-mode",Yt()||null),E(Ln,"animation-direction",oi()||null);const ii=pr()===1/0?"infinite":pr().toString();E(Ln,"animation-iteration-count",ii),Pt&&E(Ln,"animation-name",`${wt}-alt`),(0,o.r)(()=>{E(Ln,"animation-name",wt||null)})})})},Et=(Pt=!1,cn=!0,Ln)=>(Pt&&Dn.forEach(ii=>{ii.update(Pt,cn,Ln)}),On?Ci(Ln):Xn(cn,Ln),ft),Ft=()=>{re&&(On?Bn.forEach(Pt=>{Pt.pause()}):nn.forEach(Pt=>{E(Pt,"animation-play-state","paused")}),Ct=!0)},wn=()=>{Be=void 0,ea()},Gn=()=>{Be&&clearTimeout(Be)},Cr=()=>{nn.forEach(Pt=>{T(Pt,"animation-duration"),T(Pt,"animation-delay"),T(Pt,"animation-play-state")})},Wn=Pt=>new Promise(cn=>{Pt?.sync&&(ke=!0,si(()=>ke=!1,{oneTimeCallback:!0})),re||an(),tt&&(On?(Zn(0),Ci()):Xn(),tt=!1),Ne&&(Oe=Dn.length+1,Ne=!1),si(()=>cn(),{oneTimeCallback:!0}),Dn.forEach(Ln=>{Ln.play()}),On?(Bn.forEach(Pt=>{Pt.play()}),(0===Pe.length||0===nn.length)&&ea()):(()=>{if(Gn(),(0,o.r)(()=>{nn.forEach(Pt=>{Pe.length>0&&E(Pt,"animation-play-state","running")})}),0===Pe.length||0===nn.length)ea();else{const Pt=Sn()||0,cn=Nn()||0,Ln=pr()||1;isFinite(Ln)&&(Be=setTimeout(wn,Pt+cn*Ln+100)),((ae,X)=>{let ve;const ye={passive:!0},ge=()=>{ve&&ve()},ne=pe=>{ae===pe.target&&(ge(),X(pe))};ae&&(ae.addEventListener("webkitAnimationEnd",ne,ye),ae.addEventListener("animationend",ne,ye),ve=()=>{ae.removeEventListener("webkitAnimationEnd",ne,ye),ae.removeEventListener("animationend",ne,ye)})})(nn[0],()=>{Gn(),(0,o.r)(()=>{Cr(),(0,o.r)(ea)})})}})(),Ct=!1}),It=(Pt,cn)=>{const Ln=Pe[0];return void 0===Ln||void 0!==Ln.offset&&0!==Ln.offset?Pe=[{offset:0,[Pt]:cn},...Pe]:Ln[Pt]=cn,ft};return ft={parentAnimation:oe,elements:nn,childAnimations:Dn,id:rn,animationFinish:ea,from:It,to:(Pt,cn)=>{const Ln=Pe[Pe.length-1];return void 0===Ln||void 0!==Ln.offset&&1!==Ln.offset?Pe=[...Pe,{offset:1,[Pt]:cn}]:Ln[Pt]=cn,ft},fromTo:(Pt,cn,Ln)=>It(Pt,cn).to(Pt,Ln),parent:Pt=>(oe=Pt,ft),play:Wn,pause:()=>(Dn.forEach(Pt=>{Pt.pause()}),Ft(),ft),stop:()=>{Dn.forEach(Pt=>{Pt.stop()}),re&&(Vn(),re=!1),j=!1,ke=!1,Ne=!0,nt=void 0,mt=void 0,ut=void 0,Oe=0,tt=!1,Ve=!0,Ct=!1},destroy:Pt=>(Dn.forEach(cn=>{cn.destroy(Pt)}),Fn(Pt),nn.length=0,Dn.length=0,Pe.length=0,Vi(),re=!1,Ne=!0,ft),keyframes:Pt=>{const cn=Pe!==Pt;return Pe=Pt,cn&&mo(Pe),ft},addAnimation:Pt=>{if(null!=Pt)if(Array.isArray(Pt))for(const cn of Pt)cn.parent(ft),Dn.push(cn);else Pt.parent(ft),Dn.push(Pt);return ft},addElement:Pt=>{if(null!=Pt)if(1===Pt.nodeType)nn.push(Pt);else if(Pt.length>=0)for(let cn=0;cn<Pt.length;cn++)nn.push(Pt[cn]);else console.error("Invalid addElement value");return ft},update:Et,fill:Pt=>(ne=Pt,Et(!0),ft),direction:Pt=>(pe=Pt,Et(!0),ft),iterations:Pt=>(ge=Pt,Et(!0),ft),duration:Pt=>(!On&&0===Pt&&(Pt=1),ve=Pt,Et(!0),ft),easing:Pt=>(ye=Pt,Et(!0),ft),delay:Pt=>(X=Pt,Et(!0),ft),getWebAnimations:Bt,getKeyframes:()=>Pe,getFill:Yt,getDirection:oi,getDelay:Sn,getIterations:pr,getEasing:Ni,getDuration:Nn,afterAddRead:Pt=>(mi.push(Pt),ft),afterAddWrite:Pt=>(wi.push(Pt),ft),afterClearStyles:(Pt=[])=>{for(const cn of Pt)Z[cn]="";return ft},afterStyles:(Pt={})=>(Z=Pt,ft),afterRemoveClass:Pt=>(le=ue(le,Pt),ft),afterAddClass:Pt=>(be=ue(be,Pt),ft),beforeAddRead:Pt=>(vi.push(Pt),ft),beforeAddWrite:Pt=>(Gi.push(Pt),ft),beforeClearStyles:(Pt=[])=>{for(const cn of Pt)me[cn]="";return ft},beforeStyles:(Pt={})=>(me=Pt,ft),beforeRemoveClass:Pt=>(de=ue(de,Pt),ft),beforeAddClass:Pt=>(xe=ue(xe,Pt),ft),onFinish:si,isRunning:()=>0!==Oe&&!Ct,progressStart:(Pt=!1,cn)=>(Dn.forEach(Ln=>{Ln.progressStart(Pt,cn)}),Ft(),j=Pt,re||an(),Et(!1,!0,cn),ft),progressStep:Pt=>(Dn.forEach(cn=>{cn.progressStep(Pt)}),Zn(Pt),ft),progressEnd:(Pt,cn,Ln)=>(j=!1,Dn.forEach(ii=>{ii.progressEnd(Pt,cn,Ln)}),void 0!==Ln&&(mt=Ln),tt=!1,Ve=!0,0===Pt?(nt="reverse"===oi()?"normal":"reverse","reverse"===nt&&(Ve=!1),On?(Et(),Zn(1-cn)):(ut=(1-cn)*Nn()*-1,Et(!1,!1))):1===Pt&&(On?(Et(),Zn(cn)):(ut=cn*Nn()*-1,Et(!1,!1))),void 0!==Pt&&(si(()=>{mt=void 0,nt=void 0,ut=void 0},{oneTimeCallback:!0}),oe||Wn()),ft)}}},88685:(qe,I,p)=>{"use strict";p.d(I,{g:()=>o});const o=(E,T,n,P,w)=>l(E[1],T[1],n[1],P[1],w).map(B=>e(E[0],T[0],n[0],P[0],B)),e=(E,T,n,P,w)=>w*(3*T*Math.pow(w-1,2)+w*(-3*n*w+3*n+P*w))-E*Math.pow(w-1,3),l=(E,T,n,P,w)=>g((P-=w)-3*(n-=w)+3*(T-=w)-(E-=w),3*n-6*T+3*E,3*T-3*E,E).filter(Y=>Y>=0&&Y<=1),g=(E,T,n,P)=>{if(0===E)return((E,T,n)=>{const P=T*T-4*E*n;return P<0?[]:[(-T+Math.sqrt(P))/(2*E),(-T-Math.sqrt(P))/(2*E)]})(T,n,P);const w=(3*(n/=E)-(T/=E)*T)/3,B=(2*T*T*T-9*T*n+27*(P/=E))/27;if(0===w)return[Math.pow(-B,1/3)];if(0===B)return[Math.sqrt(-w),-Math.sqrt(-w)];const Y=Math.pow(B/2,2)+Math.pow(w/3,3);if(0===Y)return[Math.pow(B/2,.5)-T/3];if(Y>0)return[Math.pow(-B/2+Math.sqrt(Y),1/3)-Math.pow(B/2+Math.sqrt(Y),1/3)-T/3];const V=Math.sqrt(Math.pow(-w/3,3)),ue=Math.acos(-B/(2*Math.sqrt(Math.pow(-w/3,3)))),he=2*Math.pow(V,1/3);return[he*Math.cos(ue/3)-T/3,he*Math.cos((ue+2*Math.PI)/3)-T/3,he*Math.cos((ue+4*Math.PI)/3)-T/3]}},43509:(qe,I,p)=>{"use strict";p.d(I,{G:()=>g});class e{constructor(T,n,P,w,B){this.id=n,this.name=P,this.disableScroll=B,this.priority=1e6*w+n,this.ctrl=T}canStart(){return!!this.ctrl&&this.ctrl.canStart(this.name)}start(){return!!this.ctrl&&this.ctrl.start(this.name,this.id,this.priority)}capture(){if(!this.ctrl)return!1;const T=this.ctrl.capture(this.name,this.id,this.priority);return T&&this.disableScroll&&this.ctrl.disableScroll(this.id),T}release(){this.ctrl&&(this.ctrl.release(this.id),this.disableScroll&&this.ctrl.enableScroll(this.id))}destroy(){this.release(),this.ctrl=void 0}}class l{constructor(T,n,P,w){this.id=n,this.disable=P,this.disableScroll=w,this.ctrl=T}block(){if(this.ctrl){if(this.disable)for(const T of this.disable)this.ctrl.disableGesture(T,this.id);this.disableScroll&&this.ctrl.disableScroll(this.id)}}unblock(){if(this.ctrl){if(this.disable)for(const T of this.disable)this.ctrl.enableGesture(T,this.id);this.disableScroll&&this.ctrl.enableScroll(this.id)}}destroy(){this.unblock(),this.ctrl=void 0}}const D="backdrop-no-scroll",g=new class o{constructor(){this.gestureId=0,this.requestedStart=new Map,this.disabledGestures=new Map,this.disabledScroll=new Set}createGesture(T){return new e(this,this.newID(),T.name,T.priority||0,!!T.disableScroll)}createBlocker(T={}){return new l(this,this.newID(),T.disable,!!T.disableScroll)}start(T,n,P){return this.canStart(T)?(this.requestedStart.set(n,P),!0):(this.requestedStart.delete(n),!1)}capture(T,n,P){if(!this.start(T,n,P))return!1;const w=this.requestedStart;let B=-1e4;if(w.forEach(Y=>{B=Math.max(B,Y)}),B===P){this.capturedId=n,w.clear();const Y=new CustomEvent("ionGestureCaptured",{detail:{gestureName:T}});return document.dispatchEvent(Y),!0}return w.delete(n),!1}release(T){this.requestedStart.delete(T),this.capturedId===T&&(this.capturedId=void 0)}disableGesture(T,n){let P=this.disabledGestures.get(T);void 0===P&&(P=new Set,this.disabledGestures.set(T,P)),P.add(n)}enableGesture(T,n){const P=this.disabledGestures.get(T);void 0!==P&&P.delete(n)}disableScroll(T){this.disabledScroll.add(T),1===this.disabledScroll.size&&document.body.classList.add(D)}enableScroll(T){this.disabledScroll.delete(T),0===this.disabledScroll.size&&document.body.classList.remove(D)}canStart(T){return!(void 0!==this.capturedId||this.isDisabled(T))}isCaptured(){return void 0!==this.capturedId}isScrollDisabled(){return this.disabledScroll.size>0}isDisabled(T){const n=this.disabledGestures.get(T);return!!(n&&n.size>0)}newID(){return this.gestureId++,this.gestureId}}},47593:(qe,I,p)=>{"use strict";p.r(I),p.d(I,{MENU_BACK_BUTTON_PRIORITY:()=>g,OVERLAY_BACK_BUTTON_PRIORITY:()=>D,blockHardwareBackButton:()=>e,startHardwareBackButton:()=>l});var o=p(15861);const e=()=>{document.addEventListener("backbutton",()=>{})},l=()=>{const E=document;let T=!1;E.addEventListener("backbutton",()=>{if(T)return;let n=0,P=[];const w=new CustomEvent("ionBackButton",{bubbles:!1,detail:{register(V,ue){P.push({priority:V,handler:ue,id:n++})}}});E.dispatchEvent(w);const B=function(){var V=(0,o.Z)(function*(ue){try{if(ue?.handler){const he=ue.handler(Y);null!=he&&(yield he)}}catch(he){console.error(he)}});return function(he){return V.apply(this,arguments)}}(),Y=()=>{if(P.length>0){let V={priority:Number.MIN_SAFE_INTEGER,handler:()=>{},id:-1};P.forEach(ue=>{ue.priority>=V.priority&&(V=ue)}),T=!0,P=P.filter(ue=>ue.id!==V.id),B(V).then(()=>T=!1)}};Y()})},D=100,g=99},23756:(qe,I,p)=>{"use strict";p.d(I,{a:()=>T,b:()=>n,c:()=>l,d:()=>ue,e:()=>he,f:()=>V,g:()=>P,h:()=>ne,i:()=>E,j:()=>D,k:()=>Y,l:()=>ae,m:()=>B,n:()=>X,o:()=>ge,p:()=>ye,q:()=>pe,r:()=>w,s:()=>Pe,t:()=>o,u:()=>ve});const o=(xe,de=0)=>new Promise(re=>{e(xe,de,re)}),e=(xe,de=0,re)=>{let oe,me;const be={passive:!0},Z=()=>{oe&&oe()},Oe=j=>{(void 0===j||xe===j.target)&&(Z(),re(j))};return xe&&(xe.addEventListener("webkitTransitionEnd",Oe,be),xe.addEventListener("transitionend",Oe,be),me=setTimeout(Oe,de+500),oe=()=>{me&&(clearTimeout(me),me=void 0),xe.removeEventListener("webkitTransitionEnd",Oe,be),xe.removeEventListener("transitionend",Oe,be)}),Z},l=(xe,de)=>{xe.componentOnReady?xe.componentOnReady().then(re=>de(re)):w(()=>de(xe))},D=(xe,de=[])=>{const re={};return de.forEach(oe=>{xe.hasAttribute(oe)&&(null!==xe.getAttribute(oe)&&(re[oe]=xe.getAttribute(oe)),xe.removeAttribute(oe))}),re},g=["role","aria-activedescendant","aria-atomic","aria-autocomplete","aria-braillelabel","aria-brailleroledescription","aria-busy","aria-checked","aria-colcount","aria-colindex","aria-colindextext","aria-colspan","aria-controls","aria-current","aria-describedby","aria-description","aria-details","aria-disabled","aria-errormessage","aria-expanded","aria-flowto","aria-haspopup","aria-hidden","aria-invalid","aria-keyshortcuts","aria-label","aria-labelledby","aria-level","aria-live","aria-multiline","aria-multiselectable","aria-orientation","aria-owns","aria-placeholder","aria-posinset","aria-pressed","aria-readonly","aria-relevant","aria-required","aria-roledescription","aria-rowcount","aria-rowindex","aria-rowindextext","aria-rowspan","aria-selected","aria-setsize","aria-sort","aria-valuemax","aria-valuemin","aria-valuenow","aria-valuetext"],E=xe=>D(xe,g),T=(xe,de,re,oe)=>{var me;if(typeof window<"u"){const le=null===(me=window?.Ionic)||void 0===me?void 0:me.config;if(le){const Z=le.get("_ael");if(Z)return Z(xe,de,re,oe);if(le._ael)return le._ael(xe,de,re,oe)}}return xe.addEventListener(de,re,oe)},n=(xe,de,re,oe)=>{var me;if(typeof window<"u"){const le=null===(me=window?.Ionic)||void 0===me?void 0:me.config;if(le){const Z=le.get("_rel");if(Z)return Z(xe,de,re,oe);if(le._rel)return le._rel(xe,de,re,oe)}}return xe.removeEventListener(de,re,oe)},P=(xe,de=xe)=>xe.shadowRoot||de,w=xe=>"function"==typeof __zone_symbol__requestAnimationFrame?__zone_symbol__requestAnimationFrame(xe):"function"==typeof requestAnimationFrame?requestAnimationFrame(xe):setTimeout(xe),B=xe=>!!xe.shadowRoot&&!!xe.attachShadow,Y=xe=>{const de=xe.closest("ion-item");return de?de.querySelector("ion-label"):null},V=xe=>{if(xe.focus(),xe.classList.contains("ion-focusable")){const de=xe.closest("ion-app");de&&de.setFocus([xe])}},ue=(xe,de)=>{let re;const oe=xe.getAttribute("aria-labelledby"),me=xe.id;let be=null!==oe&&""!==oe.trim()?oe:de+"-lbl",le=null!==oe&&""!==oe.trim()?document.getElementById(oe):Y(xe);return le?(null===oe&&(le.id=be),re=le.textContent,le.setAttribute("aria-hidden","true")):""!==me.trim()&&(le=document.querySelector(`label[for="${me}"]`),le&&(""!==le.id?be=le.id:le.id=be=`${me}-lbl`,re=le.textContent)),{label:le,labelId:be,labelText:re}},he=(xe,de,re,oe,me)=>{if(xe||B(de)){let be=de.querySelector("input.aux-input");be||(be=de.ownerDocument.createElement("input"),be.type="hidden",be.classList.add("aux-input"),de.appendChild(be)),be.disabled=me,be.name=re,be.value=oe||""}},ae=(xe,de,re)=>Math.max(xe,Math.min(de,re)),X=(xe,de)=>{if(!xe){const re="ASSERT: "+de;throw console.error(re),new Error(re)}},ve=xe=>xe.timeStamp||Date.now(),ye=xe=>{if(xe){const de=xe.changedTouches;if(de&&de.length>0){const re=de[0];return{x:re.clientX,y:re.clientY}}if(void 0!==xe.pageX)return{x:xe.pageX,y:xe.pageY}}return{x:0,y:0}},ge=xe=>{const de="rtl"===document.dir;switch(xe){case"start":return de;case"end":return!de;default:throw new Error(`"${xe}" is not a valid value for [side]. Use "start" or "end" instead.`)}},ne=(xe,de)=>{const re=xe._original||xe;return{_original:xe,emit:pe(re.emit.bind(re),de)}},pe=(xe,de=0)=>{let re;return(...oe)=>{clearTimeout(re),re=setTimeout(xe,de,...oe)}},Pe=(xe,de)=>{if(xe??(xe={}),de??(de={}),xe===de)return!0;const re=Object.keys(xe);if(re.length!==Object.keys(de).length)return!1;for(const oe of re)if(!(oe in de)||xe[oe]!==de[oe])return!1;return!0}},67936:(qe,I,p)=>{"use strict";p.d(I,{B:()=>Wn,H:()=>Dn,a:()=>tt,b:()=>aa,c:()=>en,e:()=>Gr,f:()=>Fr,g:()=>Ne,h:()=>st,i:()=>Hi,j:()=>Ni,k:()=>ea,p:()=>ae,r:()=>an,s:()=>ue});var o=p(15861);let l,D,g,E=!1,T=!1,n=!1,P=!1,w=!1;const B=typeof window<"u"?window:{},Y=B.document||{head:{}},V={$flags$:0,$resourcesUrl$:"",jmp:at=>at(),raf:at=>requestAnimationFrame(at),ael:(at,It,Qt,St)=>at.addEventListener(It,Qt,St),rel:(at,It,Qt,St)=>at.removeEventListener(It,Qt,St),ce:(at,It)=>new CustomEvent(at,It)},ue=at=>{Object.assign(V,at)},ae=at=>Promise.resolve(at),X=(()=>{try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync}catch{}return!1})(),ve=(at,It,Qt,St)=>{Qt&&Qt.map(([Pt,cn,Ln])=>{const ii=ge(at,Pt),hi=ye(It,Ln),Ri=ne(Pt);V.ael(ii,cn,hi,Ri),(It.$rmListeners$=It.$rmListeners$||[]).push(()=>V.rel(ii,cn,hi,Ri))})},ye=(at,It)=>Qt=>{try{256&at.$flags$?at.$lazyInstance$[It](Qt):(at.$queuedListeners$=at.$queuedListeners$||[]).push([It,Qt])}catch(St){Xn(St)}},ge=(at,It)=>4&It?Y:8&It?B:16&It?Y.body:at,ne=at=>0!=(2&at),re="s-id",oe="sty-id",le="http://www.w3.org/1999/xlink",j=new WeakMap,ke=(at,It,Qt)=>{let St=ei.get(at);X&&Qt?(St=St||new CSSStyleSheet,"string"==typeof St?St=It:St.replaceSync(It)):St=It,ei.set(at,St)},Be=(at,It,Qt,St)=>{let Pt=mt(It,Qt);const cn=ei.get(Pt);if(at=11===at.nodeType?at:Y,cn)if("string"==typeof cn){at=at.head||at;let ii,Ln=j.get(at);Ln||j.set(at,Ln=new Set),Ln.has(Pt)||(at.host&&(ii=at.querySelector(`[${oe}="${Pt}"]`))?ii.innerHTML=cn:(ii=Y.createElement("style"),ii.innerHTML=cn,at.insertBefore(ii,at.querySelector("link"))),Ln&&Ln.add(Pt))}else at.adoptedStyleSheets.includes(cn)||(at.adoptedStyleSheets=[...at.adoptedStyleSheets,cn]);return Pt},mt=(at,It)=>"sc-"+(It&&32&at.$flags$?at.$tagName$+"-"+It:at.$tagName$),ut=at=>at.replace(/\/\*!@([^\/]+)\*\/[^\{]+\{/g,"$1{"),tt=at=>un.push(at),Ne=at=>Ii(at).$modeName$,wt={},He=at=>"object"===(at=typeof at)||"function"===at,st=(at,It,...Qt)=>{let St=null,Pt=null,cn=null,Ln=!1,ii=!1;const hi=[],Ri=er=>{for(let Yr=0;Yr<er.length;Yr++)St=er[Yr],Array.isArray(St)?Ri(St):null!=St&&"boolean"!=typeof St&&((Ln="function"!=typeof at&&!He(St))&&(St=String(St)),Ln&&ii?hi[hi.length-1].$text$+=St:hi.push(Ln?nn(null,St):St),ii=Ln)};if(Ri(Qt),It){It.key&&(Pt=It.key),It.name&&(cn=It.name);{const er=It.className||It.class;er&&(It.class="object"!=typeof er?er:Object.keys(er).filter(Yr=>er[Yr]).join(" "))}}if("function"==typeof at)return at(null===It?{}:It,hi,vi);const _r=nn(at,null);return _r.$attrs$=It,hi.length>0&&(_r.$children$=hi),_r.$key$=Pt,_r.$name$=cn,_r},nn=(at,It)=>{const Qt={$flags$:0,$tag$:at,$text$:It,$elm$:null,$children$:null,$attrs$:null,$key$:null,$name$:null};return Qt},Dn={},vi={forEach:(at,It)=>at.map(Gi).forEach(It),map:(at,It)=>at.map(Gi).map(It).map(mi)},Gi=at=>({vattrs:at.$attrs$,vchildren:at.$children$,vkey:at.$key$,vname:at.$name$,vtag:at.$tag$,vtext:at.$text$}),mi=at=>{if("function"==typeof at.vtag){const Qt=Object.assign({},at.vattrs);return at.vkey&&(Qt.key=at.vkey),at.vname&&(Qt.name=at.vname),st(at.vtag,Qt,...at.vchildren||[])}const It=nn(at.vtag,at.vtext);return It.$attrs$=at.vattrs,It.$children$=at.vchildren,It.$key$=at.vkey,It.$name$=at.vname,It},wi=(at,It,Qt,St,Pt,cn)=>{if(Qt!==St){let Ln=Ci(at,It),ii=It.toLowerCase();if("class"===It){const hi=at.classList,Ri=kn(Qt),_r=kn(St);hi.remove(...Ri.filter(er=>er&&!_r.includes(er))),hi.add(..._r.filter(er=>er&&!Ri.includes(er)))}else if("style"===It){for(const hi in Qt)(!St||null==St[hi])&&(hi.includes("-")?at.style.removeProperty(hi):at.style[hi]="");for(const hi in St)(!Qt||St[hi]!==Qt[hi])&&(hi.includes("-")?at.style.setProperty(hi,St[hi]):at.style[hi]=St[hi])}else if("key"!==It)if("ref"===It)St&&St(at);else if(Ln||"o"!==It[0]||"n"!==It[1]){const hi=He(St);if((Ln||hi&&null!==St)&&!Pt)try{if(at.tagName.includes("-"))at[It]=St;else{const _r=St??"";"list"===It?Ln=!1:(null==Qt||at[It]!=_r)&&(at[It]=_r)}}catch{}let Ri=!1;ii!==(ii=ii.replace(/^xlink\:?/,""))&&(It=ii,Ri=!0),null==St||!1===St?(!1!==St||""===at.getAttribute(It))&&(Ri?at.removeAttributeNS(le,It):at.removeAttribute(It)):(!Ln||4&cn||Pt)&&!hi&&(St=!0===St?"":St,Ri?at.setAttributeNS(le,It,St):at.setAttribute(It,St))}else It="-"===It[2]?It.slice(3):Ci(B,ii)?ii.slice(2):ii[2]+It.slice(3),Qt&&V.rel(at,It,Qt,!1),St&&V.ael(at,It,St,!1)}},Bn=/\s/,kn=at=>at?at.split(Bn):[],On=(at,It,Qt,St)=>{const Pt=11===It.$elm$.nodeType&&It.$elm$.host?It.$elm$.host:It.$elm$,cn=at&&at.$attrs$||wt,Ln=It.$attrs$||wt;for(St in cn)St in Ln||wi(Pt,St,cn[St],void 0,Qt,It.$flags$);for(St in Ln)wi(Pt,St,cn[St],Ln[St],Qt,It.$flags$)},je=(at,It,Qt,St)=>{const Pt=It.$children$[Qt];let Ln,ii,hi,cn=0;if(E||(n=!0,"slot"===Pt.$tag$&&(l&&St.classList.add(l+"-s"),Pt.$flags$|=Pt.$children$?2:1)),null!==Pt.$text$)Ln=Pt.$elm$=Y.createTextNode(Pt.$text$);else if(1&Pt.$flags$)Ln=Pt.$elm$=Y.createTextNode("");else{if(P||(P="svg"===Pt.$tag$),Ln=Pt.$elm$=Y.createElementNS(P?"http://www.w3.org/2000/svg":"http://www.w3.org/1999/xhtml",2&Pt.$flags$?"slot-fb":Pt.$tag$),P&&"foreignObject"===Pt.$tag$&&(P=!1),On(null,Pt,P),(at=>null!=at)(l)&&Ln["s-si"]!==l&&Ln.classList.add(Ln["s-si"]=l),Pt.$children$)for(cn=0;cn<Pt.$children$.length;++cn)ii=je(at,Pt,cn,Ln),ii&&Ln.appendChild(ii);"svg"===Pt.$tag$?P=!1:"foreignObject"===Ln.tagName&&(P=!0)}return Ln["s-hn"]=g,3&Pt.$flags$&&(Ln["s-sr"]=!0,Ln["s-cr"]=D,Ln["s-sn"]=Pt.$name$||"",hi=at&&at.$children$&&at.$children$[Qt],hi&&hi.$tag$===Pt.$tag$&&at.$elm$&&Bt(at.$elm$,!1)),Ln},Bt=(at,It)=>{V.$flags$|=1;const Qt=at.childNodes;for(let St=Qt.length-1;St>=0;St--){const Pt=Qt[St];Pt["s-hn"]!==g&&Pt["s-ol"]&&(Vi(Pt).insertBefore(Pt,si(Pt)),Pt["s-ol"].remove(),Pt["s-ol"]=void 0,n=!0),It&&Bt(Pt,It)}V.$flags$&=-2},xn=(at,It,Qt,St,Pt,cn)=>{let ii,Ln=at["s-cr"]&&at["s-cr"].parentNode||at;for(Ln.shadowRoot&&Ln.tagName===g&&(Ln=Ln.shadowRoot);Pt<=cn;++Pt)St[Pt]&&(ii=je(null,Qt,Pt,at),ii&&(St[Pt].$elm$=ii,Ln.insertBefore(ii,si(It))))},Fn=(at,It,Qt,St,Pt)=>{for(;It<=Qt;++It)(St=at[It])&&(Pt=St.$elm$,Zi(St),T=!0,Pt["s-ol"]?Pt["s-ol"].remove():Bt(Pt,!0),Pt.remove())},Ai=(at,It)=>at.$tag$===It.$tag$&&("slot"===at.$tag$?at.$name$===It.$name$:at.$key$===It.$key$),si=at=>at&&at["s-ol"]||at,Vi=at=>(at["s-ol"]?at["s-ol"]:at).parentNode,Vn=(at,It)=>{const Qt=It.$elm$=at.$elm$,St=at.$children$,Pt=It.$children$,cn=It.$tag$,Ln=It.$text$;let ii;null===Ln?(P="svg"===cn||"foreignObject"!==cn&&P,"slot"===cn||On(at,It,P),null!==St&&null!==Pt?((at,It,Qt,St)=>{let Si,to,Pt=0,cn=0,Ln=0,ii=0,hi=It.length-1,Ri=It[0],_r=It[hi],er=St.length-1,Yr=St[0],_o=St[er];for(;Pt<=hi&&cn<=er;)if(null==Ri)Ri=It[++Pt];else if(null==_r)_r=It[--hi];else if(null==Yr)Yr=St[++cn];else if(null==_o)_o=St[--er];else if(Ai(Ri,Yr))Vn(Ri,Yr),Ri=It[++Pt],Yr=St[++cn];else if(Ai(_r,_o))Vn(_r,_o),_r=It[--hi],_o=St[--er];else if(Ai(Ri,_o))("slot"===Ri.$tag$||"slot"===_o.$tag$)&&Bt(Ri.$elm$.parentNode,!1),Vn(Ri,_o),at.insertBefore(Ri.$elm$,_r.$elm$.nextSibling),Ri=It[++Pt],_o=St[--er];else if(Ai(_r,Yr))("slot"===Ri.$tag$||"slot"===_o.$tag$)&&Bt(_r.$elm$.parentNode,!1),Vn(_r,Yr),at.insertBefore(_r.$elm$,Ri.$elm$),_r=It[--hi],Yr=St[++cn];else{for(Ln=-1,ii=Pt;ii<=hi;++ii)if(It[ii]&&null!==It[ii].$key$&&It[ii].$key$===Yr.$key$){Ln=ii;break}Ln>=0?(to=It[Ln],to.$tag$!==Yr.$tag$?Si=je(It&&It[cn],Qt,Ln,at):(Vn(to,Yr),It[Ln]=void 0,Si=to.$elm$),Yr=St[++cn]):(Si=je(It&&It[cn],Qt,cn,at),Yr=St[++cn]),Si&&Vi(Ri.$elm$).insertBefore(Si,si(Ri.$elm$))}Pt>hi?xn(at,null==St[er+1]?null:St[er+1].$elm$,Qt,St,cn,er):cn>er&&Fn(It,Pt,hi)})(Qt,St,It,Pt):null!==Pt?(null!==at.$text$&&(Qt.textContent=""),xn(Qt,null,It,Pt,0,Pt.length-1)):null!==St&&Fn(St,0,St.length-1),P&&"svg"===cn&&(P=!1)):(ii=Qt["s-cr"])?ii.parentNode.textContent=Ln:at.$text$!==Ln&&(Qt.data=Ln)},Hn=at=>{const It=at.childNodes;let Qt,St,Pt,cn,Ln,ii;for(St=0,Pt=It.length;St<Pt;St++)if(Qt=It[St],1===Qt.nodeType){if(Qt["s-sr"])for(Ln=Qt["s-sn"],Qt.hidden=!1,cn=0;cn<Pt;cn++)if(ii=It[cn].nodeType,It[cn]["s-hn"]!==Qt["s-hn"]||""!==Ln){if(1===ii&&Ln===It[cn].getAttribute("slot")){Qt.hidden=!0;break}}else if(1===ii||3===ii&&""!==It[cn].textContent.trim()){Qt.hidden=!0;break}Hn(Qt)}},An=[],vn=at=>{let It,Qt,St,Pt,cn,Ln,ii=0;const hi=at.childNodes,Ri=hi.length;for(;ii<Ri;ii++){if(It=hi[ii],It["s-sr"]&&(Qt=It["s-cr"])&&Qt.parentNode)for(St=Qt.parentNode.childNodes,Pt=It["s-sn"],Ln=St.length-1;Ln>=0;Ln--)Qt=St[Ln],!Qt["s-cn"]&&!Qt["s-nr"]&&Qt["s-hn"]!==It["s-hn"]&&(In(Qt,Pt)?(cn=An.find(_r=>_r.$nodeToRelocate$===Qt),T=!0,Qt["s-sn"]=Qt["s-sn"]||Pt,cn?cn.$slotRefNode$=It:An.push({$slotRefNode$:It,$nodeToRelocate$:Qt}),Qt["s-sr"]&&An.map(_r=>{In(_r.$nodeToRelocate$,Qt["s-sn"])&&(cn=An.find(er=>er.$nodeToRelocate$===Qt),cn&&!_r.$slotRefNode$&&(_r.$slotRefNode$=cn.$slotRefNode$))})):An.some(_r=>_r.$nodeToRelocate$===Qt)||An.push({$nodeToRelocate$:Qt}));1===It.nodeType&&vn(It)}},In=(at,It)=>1===at.nodeType?null===at.getAttribute("slot")&&""===It||at.getAttribute("slot")===It:at["s-sn"]===It||""===It,Zi=at=>{at.$attrs$&&at.$attrs$.ref&&at.$attrs$.ref(null),at.$children$&&at.$children$.map(Zi)},gr=(at,It)=>{const Qt=at.$hostElement$,St=at.$cmpMeta$,Pt=at.$vnode$||nn(null,null),cn=(at=>at&&at.$tag$===Dn)(It)?It:st(null,null,It);if(g=Qt.tagName,St.$attrsToReflect$&&(cn.$attrs$=cn.$attrs$||{},St.$attrsToReflect$.map(([Ln,ii])=>cn.$attrs$[ii]=Qt[Ln])),cn.$tag$=null,cn.$flags$|=4,at.$vnode$=cn,cn.$elm$=Pt.$elm$=Qt.shadowRoot||Qt,l=Qt["s-sc"],D=Qt["s-cr"],E=0!=(1&St.$flags$),T=!1,Vn(Pt,cn),V.$flags$|=1,n){vn(cn.$elm$);let Ln,ii,hi,Ri,_r,er,Yr=0;for(;Yr<An.length;Yr++)Ln=An[Yr],ii=Ln.$nodeToRelocate$,ii["s-ol"]||(hi=Y.createTextNode(""),hi["s-nr"]=ii,ii.parentNode.insertBefore(ii["s-ol"]=hi,ii));for(Yr=0;Yr<An.length;Yr++)if(Ln=An[Yr],ii=Ln.$nodeToRelocate$,Ln.$slotRefNode$){for(Ri=Ln.$slotRefNode$.parentNode,_r=Ln.$slotRefNode$.nextSibling,hi=ii["s-ol"];hi=hi.previousSibling;)if(er=hi["s-nr"],er&&er["s-sn"]===ii["s-sn"]&&Ri===er.parentNode&&(er=er.nextSibling,!er||!er["s-nr"])){_r=er;break}(!_r&&Ri!==ii.parentNode||ii.nextSibling!==_r)&&ii!==_r&&(!ii["s-hn"]&&ii["s-ol"]&&(ii["s-hn"]=ii["s-ol"].parentNode.nodeName),Ri.insertBefore(ii,_r))}else 1===ii.nodeType&&(ii.hidden=!0)}T&&Hn(cn.$elm$),V.$flags$&=-2,An.length=0},Hi=at=>Ii(at).$hostElement$,Gr=(at,It,Qt)=>{const St=Hi(at);return{emit:Pt=>zr(St,It,{bubbles:!!(4&Qt),composed:!!(2&Qt),cancelable:!!(1&Qt),detail:Pt})}},zr=(at,It,Qt)=>{const St=V.ce(It,Qt);return at.dispatchEvent(St),St},Eo=(at,It)=>{It&&!at.$onRenderResolve$&&It["s-p"]&&It["s-p"].push(new Promise(Qt=>at.$onRenderResolve$=Qt))},mr=(at,It)=>{if(at.$flags$|=16,!(4&at.$flags$))return Eo(at,at.$ancestorComponent$),en(()=>jn(at,It));at.$flags$|=512},jn=(at,It)=>{const Qt=(at.$cmpMeta$.$tagName$,()=>{}),St=at.$lazyInstance$;let Pt;return It&&(at.$flags$|=256,at.$queuedListeners$&&(at.$queuedListeners$.map(([cn,Ln])=>pr(St,cn,Ln)),at.$queuedListeners$=null),Pt=pr(St,"componentWillLoad")),Pt=Sn(Pt,()=>pr(St,"componentWillRender")),Qt(),Sn(Pt,()=>ct(at,St,It))},ct=function(){var at=(0,o.Z)(function*(It,Qt,St){const Pt=It.$hostElement$,cn=(It.$cmpMeta$.$tagName$,()=>{}),Ln=Pt["s-rc"];St&&(at=>{const It=at.$cmpMeta$,Qt=at.$hostElement$,St=It.$flags$,Pt=(It.$tagName$,()=>{}),cn=Be(Qt.shadowRoot?Qt.shadowRoot:Qt.getRootNode(),It,at.$modeName$);10&St&&(Qt["s-sc"]=cn,Qt.classList.add(cn+"-h"),2&St&&Qt.classList.add(cn+"-s")),Pt()})(It);const ii=(It.$cmpMeta$.$tagName$,()=>{});Yt(It,Qt),Ln&&(Ln.map(hi=>hi()),Pt["s-rc"]=void 0),ii(),cn();{const hi=Pt["s-p"],Ri=()=>oi(It);0===hi.length?Ri():(Promise.all(hi).then(Ri),It.$flags$|=4,hi.length=0)}});return function(Qt,St,Pt){return at.apply(this,arguments)}}(),Yt=(at,It,Qt)=>{try{It=It.render&&It.render(),at.$flags$&=-17,at.$flags$|=2,gr(at,It)}catch(St){Xn(St,at.$hostElement$)}return null},oi=at=>{at.$cmpMeta$.$tagName$;const Qt=at.$hostElement$,St=()=>{},Pt=at.$lazyInstance$,cn=at.$ancestorComponent$;pr(Pt,"componentDidRender"),64&at.$flags$?(pr(Pt,"componentDidUpdate"),St()):(at.$flags$|=64,Pn(Qt),pr(Pt,"componentDidLoad"),St(),at.$onReadyResolve$(Qt),cn||Nn()),at.$onInstanceResolve$(Qt),at.$onRenderResolve$&&(at.$onRenderResolve$(),at.$onRenderResolve$=void 0),512&at.$flags$&&Cr(()=>mr(at,!1)),at.$flags$&=-517},Ni=at=>{{const It=Ii(at),Qt=It.$hostElement$.isConnected;return Qt&&2==(18&It.$flags$)&&mr(It,!1),Qt}},Nn=at=>{Pn(Y.documentElement),Cr(()=>zr(B,"appload",{detail:{namespace:"ionic"}}))},pr=(at,It,Qt)=>{if(at&&at[It])try{return at[It](Qt)}catch(St){Xn(St)}},Sn=(at,It)=>at&&at.then?at.then(It):It(),Pn=at=>at.classList.add("hydrated"),ai=(at,It,Qt,St,Pt,cn,Ln)=>{let ii,hi,Ri,_r;if(1===cn.nodeType){for(ii=cn.getAttribute("c-id"),ii&&(hi=ii.split("."),(hi[0]===Ln||"0"===hi[0])&&(Ri={$flags$:0,$hostId$:hi[0],$nodeId$:hi[1],$depth$:hi[2],$index$:hi[3],$tag$:cn.tagName.toLowerCase(),$elm$:cn,$attrs$:null,$children$:null,$key$:null,$name$:null,$text$:null},It.push(Ri),cn.removeAttribute("c-id"),at.$children$||(at.$children$=[]),at.$children$[Ri.$index$]=Ri,at=Ri,St&&"0"===Ri.$depth$&&(St[Ri.$index$]=Ri.$elm$))),_r=cn.childNodes.length-1;_r>=0;_r--)ai(at,It,Qt,St,Pt,cn.childNodes[_r],Ln);if(cn.shadowRoot)for(_r=cn.shadowRoot.childNodes.length-1;_r>=0;_r--)ai(at,It,Qt,St,Pt,cn.shadowRoot.childNodes[_r],Ln)}else if(8===cn.nodeType)hi=cn.nodeValue.split("."),(hi[1]===Ln||"0"===hi[1])&&(ii=hi[0],Ri={$flags$:0,$hostId$:hi[1],$nodeId$:hi[2],$depth$:hi[3],$index$:hi[4],$elm$:cn,$attrs$:null,$children$:null,$key$:null,$name$:null,$tag$:null,$text$:null},"t"===ii?(Ri.$elm$=cn.nextSibling,Ri.$elm$&&3===Ri.$elm$.nodeType&&(Ri.$text$=Ri.$elm$.textContent,It.push(Ri),cn.remove(),at.$children$||(at.$children$=[]),at.$children$[Ri.$index$]=Ri,St&&"0"===Ri.$depth$&&(St[Ri.$index$]=Ri.$elm$))):Ri.$hostId$===Ln&&("s"===ii?(Ri.$tag$="slot",hi[5]?cn["s-sn"]=Ri.$name$=hi[5]:cn["s-sn"]="",cn["s-sr"]=!0,St&&(Ri.$elm$=Y.createElement(Ri.$tag$),Ri.$name$&&Ri.$elm$.setAttribute("name",Ri.$name$),cn.parentNode.insertBefore(Ri.$elm$,cn),cn.remove(),"0"===Ri.$depth$&&(St[Ri.$index$]=Ri.$elm$)),Qt.push(Ri),at.$children$||(at.$children$=[]),at.$children$[Ri.$index$]=Ri):"r"===ii&&(St?cn.remove():(Pt["s-cr"]=cn,cn["s-cn"]=!0))));else if(at&&"style"===at.$tag$){const er=nn(null,cn.textContent);er.$elm$=cn,er.$index$="0",at.$children$=[er]}},hn=(at,It)=>{if(1===at.nodeType){let Qt=0;for(;Qt<at.childNodes.length;Qt++)hn(at.childNodes[Qt],It);if(at.shadowRoot)for(Qt=0;Qt<at.shadowRoot.childNodes.length;Qt++)hn(at.shadowRoot.childNodes[Qt],It)}else if(8===at.nodeType){const Qt=at.nodeValue.split(".");"o"===Qt[0]&&(It.set(Qt[1]+"."+Qt[2],at),at.nodeValue="",at["s-en"]=Qt[3])}},we=(at,It,Qt,St)=>{const Pt=Ii(at),cn=Pt.$hostElement$,Ln=Pt.$instanceValues$.get(It),ii=Pt.$flags$,hi=Pt.$lazyInstance$;Qt=((at,It)=>null==at||He(at)?at:4&It?"false"!==at&&(""===at||!!at):2&It?parseFloat(at):1&It?String(at):at)(Qt,St.$members$[It][0]);const Ri=Number.isNaN(Ln)&&Number.isNaN(Qt);if((!(8&ii)||void 0===Ln)&&(Qt!==Ln&&!Ri)&&(Pt.$instanceValues$.set(It,Qt),hi)){if(St.$watchers$&&128&ii){const er=St.$watchers$[It];er&&er.map(Yr=>{try{hi[Yr](Qt,Ln,It)}catch(_o){Xn(_o,cn)}})}2==(18&ii)&&mr(Pt,!1)}},Qe=(at,It,Qt)=>{if(It.$members$){at.watchers&&(It.$watchers$=at.watchers);const St=Object.entries(It.$members$),Pt=at.prototype;if(St.map(([cn,[Ln]])=>{31&Ln||2&Qt&&32&Ln?Object.defineProperty(Pt,cn,{get(){return((at,It)=>Ii(at).$instanceValues$.get(It))(this,cn)},set(ii){we(this,cn,ii,It)},configurable:!0,enumerable:!0}):1&Qt&&64&Ln&&Object.defineProperty(Pt,cn,{value(...ii){const hi=Ii(this);return hi.$onInstancePromise$.then(()=>hi.$lazyInstance$[cn](...ii))}})}),1&Qt){const cn=new Map;Pt.attributeChangedCallback=function(Ln,ii,hi){V.jmp(()=>{const Ri=cn.get(Ln);if(this.hasOwnProperty(Ri))hi=this[Ri],delete this[Ri];else if(Pt.hasOwnProperty(Ri)&&"number"==typeof this[Ri]&&this[Ri]==hi)return;this[Ri]=(null!==hi||"boolean"!=typeof this[Ri])&&hi})},at.observedAttributes=St.filter(([Ln,ii])=>15&ii[0]).map(([Ln,ii])=>{const hi=ii[1]||Ln;return cn.set(hi,Ln),512&ii[0]&&It.$attrsToReflect$.push([Ln,hi]),hi})}}return at},qt=function(){var at=(0,o.Z)(function*(It,Qt,St,Pt,cn){if(!(32&Qt.$flags$)){{if(Qt.$flags$|=32,(cn=gn(St)).then){const Ri=()=>{};cn=yield cn,Ri()}cn.isProxied||(St.$watchers$=cn.watchers,Qe(cn,St,2),cn.isProxied=!0);const hi=(St.$tagName$,()=>{});Qt.$flags$|=8;try{new cn(Qt)}catch(Ri){Xn(Ri)}Qt.$flags$&=-9,Qt.$flags$|=128,hi(),Tn(Qt.$lazyInstance$)}if(cn.style){let hi=cn.style;"string"!=typeof hi&&(hi=hi[Qt.$modeName$=(at=>un.map(It=>It(at)).find(It=>!!It))(It)]);const Ri=mt(St,Qt.$modeName$);if(!ei.has(Ri)){const _r=(St.$tagName$,()=>{});ke(Ri,hi,!!(1&St.$flags$)),_r()}}}const Ln=Qt.$ancestorComponent$,ii=()=>mr(Qt,!0);Ln&&Ln["s-rc"]?Ln["s-rc"].push(ii):ii()});return function(Qt,St,Pt,cn,Ln){return at.apply(this,arguments)}}(),Tn=at=>{pr(at,"connectedCallback")},lr=at=>{if(!(1&V.$flags$)){const It=Ii(at),Qt=It.$cmpMeta$,St=(Qt.$tagName$,()=>{});if(1&It.$flags$)ve(at,It,Qt.$listeners$),Tn(It.$lazyInstance$);else{let Pt;if(It.$flags$|=1,Pt=at.getAttribute(re),Pt){if(1&Qt.$flags$){const cn=Be(at.shadowRoot,Qt,at.getAttribute("s-mode"));at.classList.remove(cn+"-h",cn+"-s")}((at,It,Qt,St)=>{const Pt=()=>{},cn=at.shadowRoot,Ln=[],hi=cn?[]:null,Ri=St.$vnode$=nn(It,null);V.$orgLocNodes$||hn(Y.body,V.$orgLocNodes$=new Map),at[re]=Qt,at.removeAttribute(re),ai(Ri,Ln,[],hi,at,at,Qt),Ln.map(_r=>{const er=_r.$hostId$+"."+_r.$nodeId$,Yr=V.$orgLocNodes$.get(er),_o=_r.$elm$;Yr&&""===Yr["s-en"]&&Yr.parentNode.insertBefore(_o,Yr.nextSibling),cn||(_o["s-hn"]=It,Yr&&(_o["s-ol"]=Yr,_o["s-ol"]["s-nr"]=_o)),V.$orgLocNodes$.delete(er)}),cn&&hi.map(_r=>{_r&&cn.appendChild(_r)}),Pt()})(at,Qt.$tagName$,Pt,It)}Pt||12&Qt.$flags$&&mo(at);{let cn=at;for(;cn=cn.parentNode||cn.host;)if(1===cn.nodeType&&cn.hasAttribute("s-id")&&cn["s-p"]||cn["s-p"]){Eo(It,It.$ancestorComponent$=cn);break}}Qt.$members$&&Object.entries(Qt.$members$).map(([cn,[Ln]])=>{if(31&Ln&&at.hasOwnProperty(cn)){const ii=at[cn];delete at[cn],at[cn]=ii}}),Cr(()=>qt(at,It,Qt))}St()}},mo=at=>{const It=at["s-cr"]=Y.createComment("");It["s-cn"]=!0,at.insertBefore(It,at.firstChild)},aa=(at,It={})=>{const Qt=()=>{},St=[],Pt=It.exclude||[],cn=B.customElements,Ln=Y.head,ii=Ln.querySelector("meta[charset]"),hi=Y.createElement("style"),Ri=[],_r=Y.querySelectorAll(`[${oe}]`);let er,Yr=!0,_o=0;for(Object.assign(V,It),V.$resourcesUrl$=new URL(It.resourcesUrl||"./",Y.baseURI).href,V.$flags$|=2;_o<_r.length;_o++)ke(_r[_o].getAttribute(oe),ut(_r[_o].innerHTML),!0);at.map(Si=>{Si[1].map(to=>{const Oa={$flags$:to[0],$tagName$:to[1],$members$:to[2],$listeners$:to[3]};Oa.$members$=to[2],Oa.$listeners$=to[3],Oa.$attrsToReflect$=[],Oa.$watchers$={};const Uo=Oa.$tagName$,rl=class extends HTMLElement{constructor(Vs){super(Vs),Zn(Vs=this,Oa),1&Oa.$flags$&&Vs.attachShadow({mode:"open",delegatesFocus:!!(16&Oa.$flags$)})}connectedCallback(){er&&(clearTimeout(er),er=null),Yr?Ri.push(this):V.jmp(()=>lr(this))}disconnectedCallback(){V.jmp(()=>(at=>{if(!(1&V.$flags$)){const It=Ii(at),Qt=It.$lazyInstance$;It.$rmListeners$&&(It.$rmListeners$.map(St=>St()),It.$rmListeners$=void 0),pr(Qt,"disconnectedCallback")}})(this))}componentOnReady(){return Ii(this).$onReadyPromise$}};Oa.$lazyBundleId$=Si[0],!Pt.includes(Uo)&&!cn.get(Uo)&&(St.push(Uo),cn.define(Uo,Qe(rl,Oa,1)))})}),hi.innerHTML=St+"{visibility:hidden}.hydrated{visibility:inherit}",hi.setAttribute("data-styles",""),Ln.insertBefore(hi,ii?ii.nextSibling:Ln.firstChild),Yr=!1,Ri.length?Ri.map(Si=>Si.connectedCallback()):V.jmp(()=>er=setTimeout(Nn,30)),Qt()},ea=at=>{const It=new URL(at,V.$resourcesUrl$);return It.origin!==B.location.origin?It.href:It.pathname},Bo=new WeakMap,Ii=at=>Bo.get(at),an=(at,It)=>Bo.set(It.$lazyInstance$=at,It),Zn=(at,It)=>{const Qt={$flags$:0,$hostElement$:at,$cmpMeta$:It,$instanceValues$:new Map};return Qt.$onInstancePromise$=new Promise(St=>Qt.$onInstanceResolve$=St),Qt.$onReadyPromise$=new Promise(St=>Qt.$onReadyResolve$=St),at["s-p"]=[],at["s-rc"]=[],ve(at,Qt,It.$listeners$),Bo.set(at,Qt)},Ci=(at,It)=>It in at,Xn=(at,It)=>(0,console.error)(at,It),Et=new Map,gn=(at,It,Qt)=>{const St=at.$tagName$.replace(/-/g,"_"),Pt=at.$lazyBundleId$,cn=Et.get(Pt);return cn?cn[St]:p(50863)(`./${Pt}.entry.js`).then(Ln=>(Et.set(Pt,Ln),Ln[St]),Xn)},ei=new Map,un=[],Ft=[],Ut=[],wn=(at,It)=>Qt=>{at.push(Qt),w||(w=!0,It&&4&V.$flags$?Cr(xi):V.raf(xi))},Gn=at=>{for(let It=0;It<at.length;It++)try{at[It](performance.now())}catch(Qt){Xn(Qt)}at.length=0},xi=()=>{Gn(Ft),Gn(Ut),(w=Ft.length>0)&&V.raf(xi)},Cr=at=>ae().then(at),Fr=wn(Ft,!1),en=wn(Ut,!0),Wn={isDev:!1,isBrowser:!0,isServer:!1,isTesting:!1}},33139:(qe,I,p)=>{"use strict";p.r(I),p.d(I,{GESTURE_CONTROLLER:()=>o.G,createGesture:()=>P});var o=p(43509);const e=(V,ue,he,ae)=>{const X=l(V)?{capture:!!ae.capture,passive:!!ae.passive}:!!ae.capture;let ve,ye;return V.__zone_symbol__addEventListener?(ve="__zone_symbol__addEventListener",ye="__zone_symbol__removeEventListener"):(ve="addEventListener",ye="removeEventListener"),V[ve](ue,he,X),()=>{V[ye](ue,he,X)}},l=V=>{if(void 0===D)try{const ue=Object.defineProperty({},"passive",{get:()=>{D=!0}});V.addEventListener("optsTest",()=>{},ue)}catch{D=!1}return!!D};let D;const T=V=>V instanceof Document?V:V.ownerDocument,P=V=>{let ue=!1,he=!1,ae=!0,X=!1;const ve=Object.assign({disableScroll:!1,direction:"x",gesturePriority:0,passive:!0,maxAngle:40,threshold:10},V),ye=ve.canStart,ge=ve.onWillStart,ne=ve.onStart,pe=ve.onEnd,Pe=ve.notCaptured,xe=ve.onMove,de=ve.threshold,re=ve.passive,oe=ve.blurOnStart,me={type:"pan",startX:0,startY:0,startTime:0,currentX:0,currentY:0,velocityX:0,velocityY:0,deltaX:0,deltaY:0,currentTime:0,event:void 0,data:void 0},be=((V,ue,he)=>{const ae=he*(Math.PI/180),X="x"===V,ve=Math.cos(ae),ye=ue*ue;let ge=0,ne=0,pe=!1,Pe=0;return{start(xe,de){ge=xe,ne=de,Pe=0,pe=!0},detect(xe,de){if(!pe)return!1;const re=xe-ge,oe=de-ne,me=re*re+oe*oe;if(me<ye)return!1;const be=Math.sqrt(me),le=(X?re:oe)/be;return Pe=le>ve?1:le<-ve?-1:0,pe=!1,!0},isGesture:()=>0!==Pe,getDirection:()=>Pe}})(ve.direction,ve.threshold,ve.maxAngle),le=o.G.createGesture({name:V.gestureName,priority:V.gesturePriority,disableScroll:V.disableScroll}),j=()=>{ue&&(X=!1,xe&&xe(me))},ke=()=>!(le&&!le.capture())&&(ue=!0,ae=!1,me.startX=me.currentX,me.startY=me.currentY,me.startTime=me.currentTime,ge?ge(me).then(nt):nt(),!0),nt=()=>{oe&&(()=>{if(typeof document<"u"){const Ne=document.activeElement;Ne?.blur&&Ne.blur()}})(),ne&&ne(me),ae=!0},mt=()=>{ue=!1,he=!1,X=!1,ae=!0,le.release()},ut=Ne=>{const wt=ue,ft=ae;if(mt(),ft){if(w(me,Ne),wt)return void(pe&&pe(me));Pe&&Pe(me)}},Ve=((V,ue,he,ae,X)=>{let ve,ye,ge,ne,pe,Pe,xe,de=0;const re=Be=>{de=Date.now()+2e3,ue(Be)&&(!ye&&he&&(ye=e(V,"touchmove",he,X)),ge||(ge=e(Be.target,"touchend",me,X)),ne||(ne=e(Be.target,"touchcancel",me,X)))},oe=Be=>{de>Date.now()||ue(Be)&&(!Pe&&he&&(Pe=e(T(V),"mousemove",he,X)),xe||(xe=e(T(V),"mouseup",be,X)))},me=Be=>{le(),ae&&ae(Be)},be=Be=>{Z(),ae&&ae(Be)},le=()=>{ye&&ye(),ge&&ge(),ne&&ne(),ye=ge=ne=void 0},Z=()=>{Pe&&Pe(),xe&&xe(),Pe=xe=void 0},Oe=()=>{le(),Z()},j=(Be=!0)=>{Be?(ve||(ve=e(V,"touchstart",re,X)),pe||(pe=e(V,"mousedown",oe,X))):(ve&&ve(),pe&&pe(),ve=pe=void 0,Oe())};return{enable:j,stop:Oe,destroy:()=>{j(!1),ae=he=ue=void 0}}})(ve.el,Ne=>{const wt=Y(Ne);return!(he||!ae||(B(Ne,me),me.startX=me.currentX,me.startY=me.currentY,me.startTime=me.currentTime=wt,me.velocityX=me.velocityY=me.deltaX=me.deltaY=0,me.event=Ne,ye&&!1===ye(me))||(le.release(),!le.start()))&&(he=!0,0===de?ke():(be.start(me.startX,me.startY),!0))},Ne=>{ue?!X&&ae&&(X=!0,w(me,Ne),requestAnimationFrame(j)):(w(me,Ne),be.detect(me.currentX,me.currentY)&&(!be.isGesture()||!ke())&&tt())},ut,{capture:!1,passive:re}),tt=()=>{mt(),Ve.stop(),Pe&&Pe(me)};return{enable(Ne=!0){Ne||(ue&&ut(void 0),mt()),Ve.enable(Ne)},destroy(){le.destroy(),Ve.destroy()}}},w=(V,ue)=>{if(!ue)return;const he=V.currentX,ae=V.currentY,X=V.currentTime;B(ue,V);const ve=V.currentX,ye=V.currentY,ne=(V.currentTime=Y(ue))-X;if(ne>0&&ne<100){const pe=(ve-he)/ne,Pe=(ye-ae)/ne;V.velocityX=.7*pe+.3*V.velocityX,V.velocityY=.7*Pe+.3*V.velocityY}V.deltaX=ve-V.startX,V.deltaY=ye-V.startY,V.event=ue},B=(V,ue)=>{let he=0,ae=0;if(V){const X=V.changedTouches;if(X&&X.length>0){const ve=X[0];he=ve.clientX,ae=ve.clientY}else void 0!==V.pageX&&(he=V.pageX,ae=V.pageY)}ue.currentX=he,ue.currentY=ae},Y=V=>V.timeStamp||Date.now()},30471:(qe,I,p)=>{"use strict";p.d(I,{L:()=>D,a:()=>g,b:()=>E,c:()=>T,d:()=>n,e:()=>de,g:()=>me,l:()=>Pe,s:()=>re,t:()=>B});var o=p(15861),e=p(67936),l=p(23756);const D="ionViewWillEnter",g="ionViewDidEnter",E="ionViewWillLeave",T="ionViewDidLeave",n="ionViewWillUnload",B=be=>new Promise((le,Z)=>{(0,e.c)(()=>{Y(be),V(be).then(Oe=>{Oe.animation&&Oe.animation.destroy(),ue(be),le(Oe)},Oe=>{ue(be),Z(Oe)})})}),Y=be=>{const le=be.enteringEl,Z=be.leavingEl;oe(le,Z,be.direction),be.showGoBack?le.classList.add("can-go-back"):le.classList.remove("can-go-back"),re(le,!1),le.style.setProperty("pointer-events","none"),Z&&(re(Z,!1),Z.style.setProperty("pointer-events","none"))},V=function(){var be=(0,o.Z)(function*(le){const Z=yield he(le);return Z&&e.B.isBrowser?ae(Z,le):X(le)});return function(Z){return be.apply(this,arguments)}}(),ue=be=>{const le=be.enteringEl,Z=be.leavingEl;le.classList.remove("ion-page-invisible"),le.style.removeProperty("pointer-events"),void 0!==Z&&(Z.classList.remove("ion-page-invisible"),Z.style.removeProperty("pointer-events"))},he=function(){var be=(0,o.Z)(function*(le){return le.leavingEl&&le.animated&&0!==le.duration?le.animationBuilder?le.animationBuilder:"ios"===le.mode?(yield Promise.resolve().then(p.bind(p,19950))).iosTransitionAnimation:(yield Promise.resolve().then(p.bind(p,74802))).mdTransitionAnimation:void 0});return function(Z){return be.apply(this,arguments)}}(),ae=function(){var be=(0,o.Z)(function*(le,Z){yield ve(Z,!0);const Oe=le(Z.baseEl,Z);ne(Z.enteringEl,Z.leavingEl);const j=yield ge(Oe,Z);return Z.progressCallback&&Z.progressCallback(void 0),j&&pe(Z.enteringEl,Z.leavingEl),{hasCompleted:j,animation:Oe}});return function(Z,Oe){return be.apply(this,arguments)}}(),X=function(){var be=(0,o.Z)(function*(le){const Z=le.enteringEl,Oe=le.leavingEl;return yield ve(le,!1),ne(Z,Oe),pe(Z,Oe),{hasCompleted:!0}});return function(Z){return be.apply(this,arguments)}}(),ve=function(){var be=(0,o.Z)(function*(le,Z){const j=(void 0!==le.deepWait?le.deepWait:Z)?[de(le.enteringEl),de(le.leavingEl)]:[xe(le.enteringEl),xe(le.leavingEl)];yield Promise.all(j),yield ye(le.viewIsReady,le.enteringEl)});return function(Z,Oe){return be.apply(this,arguments)}}(),ye=function(){var be=(0,o.Z)(function*(le,Z){le&&(yield le(Z))});return function(Z,Oe){return be.apply(this,arguments)}}(),ge=(be,le)=>{const Z=le.progressCallback,Oe=new Promise(j=>{be.onFinish(ke=>j(1===ke))});return Z?(be.progressStart(!0),Z(be)):be.play(),Oe},ne=(be,le)=>{Pe(le,E),Pe(be,D)},pe=(be,le)=>{Pe(be,g),Pe(le,T)},Pe=(be,le)=>{if(be){const Z=new CustomEvent(le,{bubbles:!1,cancelable:!1});be.dispatchEvent(Z)}},xe=be=>be?new Promise(le=>(0,l.c)(be,le)):Promise.resolve(),de=function(){var be=(0,o.Z)(function*(le){const Z=le;if(Z){if(null!=Z.componentOnReady){if(null!=(yield Z.componentOnReady()))return}else if(null!=Z.__registerHost)return void(yield new Promise(j=>(0,l.r)(j)));yield Promise.all(Array.from(Z.children).map(de))}});return function(Z){return be.apply(this,arguments)}}(),re=(be,le)=>{le?(be.setAttribute("aria-hidden","true"),be.classList.add("ion-page-hidden")):(be.hidden=!1,be.removeAttribute("aria-hidden"),be.classList.remove("ion-page-hidden"))},oe=(be,le,Z)=>{void 0!==be&&(be.style.zIndex="back"===Z?"99":"101"),void 0!==le&&(le.style.zIndex="100")},me=be=>{if(be.classList.contains("ion-page"))return be;return be.querySelector(":scope > .ion-page, :scope > ion-nav, :scope > ion-tabs")||be}},40604:(qe,I,p)=>{"use strict";p.d(I,{m:()=>B});var o=p(15861),e=p(47593),l=p(23756),D=p(61671),g=p(89442);const E=Y=>(0,g.c)().duration(Y?400:300),T=Y=>{let V,ue;const he=Y.width+8,ae=(0,g.c)(),X=(0,g.c)();Y.isEndSide?(V=he+"px",ue="0px"):(V=-he+"px",ue="0px"),ae.addElement(Y.menuInnerEl).fromTo("transform",`translateX(${V})`,`translateX(${ue})`);const ye="ios"===(0,D.b)(Y),ge=ye?.2:.25;return X.addElement(Y.backdropEl).fromTo("opacity",.01,ge),E(ye).addAnimation([ae,X])},n=Y=>{let V,ue;const he=(0,D.b)(Y),ae=Y.width;Y.isEndSide?(V=-ae+"px",ue=ae+"px"):(V=ae+"px",ue=-ae+"px");const X=(0,g.c)().addElement(Y.menuInnerEl).fromTo("transform",`translateX(${ue})`,"translateX(0px)"),ve=(0,g.c)().addElement(Y.contentEl).fromTo("transform","translateX(0px)",`translateX(${V})`),ye=(0,g.c)().addElement(Y.backdropEl).fromTo("opacity",.01,.32);return E("ios"===he).addAnimation([X,ve,ye])},P=Y=>{const V=(0,D.b)(Y),ue=Y.width*(Y.isEndSide?-1:1)+"px",he=(0,g.c)().addElement(Y.contentEl).fromTo("transform","translateX(0px)",`translateX(${ue})`);return E("ios"===V).addAnimation(he)},B=(()=>{const Y=new Map,V=[],ue=function(){var nt=(0,o.Z)(function*(mt){const ut=yield ne(mt);return!!ut&&ut.open()});return function(ut){return nt.apply(this,arguments)}}(),he=function(){var nt=(0,o.Z)(function*(mt){const ut=yield void 0!==mt?ne(mt):pe();return void 0!==ut&&ut.close()});return function(ut){return nt.apply(this,arguments)}}(),ae=function(){var nt=(0,o.Z)(function*(mt){const ut=yield ne(mt);return!!ut&&ut.toggle()});return function(ut){return nt.apply(this,arguments)}}(),X=function(){var nt=(0,o.Z)(function*(mt,ut){const Ve=yield ne(ut);return Ve&&(Ve.disabled=!mt),Ve});return function(ut,Ve){return nt.apply(this,arguments)}}(),ve=function(){var nt=(0,o.Z)(function*(mt,ut){const Ve=yield ne(ut);return Ve&&(Ve.swipeGesture=mt),Ve});return function(ut,Ve){return nt.apply(this,arguments)}}(),ye=function(){var nt=(0,o.Z)(function*(mt){if(null!=mt){const ut=yield ne(mt);return void 0!==ut&&ut.isOpen()}return void 0!==(yield pe())});return function(ut){return nt.apply(this,arguments)}}(),ge=function(){var nt=(0,o.Z)(function*(mt){const ut=yield ne(mt);return!!ut&&!ut.disabled});return function(ut){return nt.apply(this,arguments)}}(),ne=function(){var nt=(0,o.Z)(function*(mt){if(yield Be(),"start"===mt||"end"===mt){return ke(tt=>tt.side===mt&&!tt.disabled)||ke(tt=>tt.side===mt)}if(null!=mt)return ke(Ve=>Ve.menuId===mt);return ke(Ve=>!Ve.disabled)||(V.length>0?V[0].el:void 0)});return function(ut){return nt.apply(this,arguments)}}(),pe=function(){var nt=(0,o.Z)(function*(){return yield Be(),Z()});return function(){return nt.apply(this,arguments)}}(),Pe=function(){var nt=(0,o.Z)(function*(){return yield Be(),Oe()});return function(){return nt.apply(this,arguments)}}(),xe=function(){var nt=(0,o.Z)(function*(){return yield Be(),j()});return function(){return nt.apply(this,arguments)}}(),de=(nt,mt)=>{Y.set(nt,mt)},me=nt=>{const mt=nt.side;V.filter(ut=>ut.side===mt&&ut!==nt).forEach(ut=>ut.disabled=!0)},be=function(){var nt=(0,o.Z)(function*(mt,ut,Ve){if(j())return!1;if(ut){const tt=yield pe();tt&&mt.el!==tt&&(yield tt.setOpen(!1,!1))}return mt._setOpen(ut,Ve)});return function(ut,Ve,tt){return nt.apply(this,arguments)}}(),Z=()=>ke(nt=>nt._isOpen),Oe=()=>V.map(nt=>nt.el),j=()=>V.some(nt=>nt.isAnimating),ke=nt=>{const mt=V.find(nt);if(void 0!==mt)return mt.el},Be=()=>Promise.all(Array.from(document.querySelectorAll("ion-menu")).map(nt=>new Promise(mt=>(0,l.c)(nt,mt))));return de("reveal",P),de("push",n),de("overlay",T),typeof document<"u"&&document.addEventListener("ionBackButton",nt=>{const mt=Z();mt&&nt.detail.register(e.MENU_BACK_BUTTON_PRIORITY,()=>mt.close())}),{registerAnimation:de,get:ne,getMenus:Pe,getOpen:pe,isEnabled:ge,swipeGesture:ve,isAnimating:xe,isOpen:ye,enable:X,toggle:ae,close:he,open:ue,_getOpenSync:Z,_createAnimation:(nt,mt)=>{const ut=Y.get(nt);if(!ut)throw new Error("animation not registered");return ut(mt)},_register:nt=>{V.indexOf(nt)<0&&(nt.disabled||me(nt),V.push(nt))},_unregister:nt=>{const mt=V.indexOf(nt);mt>-1&&V.splice(mt,1)},_setOpen:be,_setActiveMenu:me}})()},61671:(qe,I,p)=>{"use strict";p.d(I,{a:()=>B,b:()=>j,c:()=>l,g:()=>w,i:()=>ke});var o=p(67936);class e{constructor(){this.m=new Map}reset(nt){this.m=new Map(Object.entries(nt))}get(nt,mt){const ut=this.m.get(nt);return void 0!==ut?ut:mt}getBoolean(nt,mt=!1){const ut=this.m.get(nt);return void 0===ut?mt:"string"==typeof ut?"true"===ut:!!ut}getNumber(nt,mt){const ut=parseFloat(this.m.get(nt));return isNaN(ut)?void 0!==mt?mt:NaN:ut}set(nt,mt){this.m.set(nt,mt)}}const l=new e,T=(Be,nt)=>Be.substr(0,nt.length)===nt,n="ionic:",P="ionic-persist-config",w=Be=>Y(Be),B=(Be,nt)=>("string"==typeof Be&&(nt=Be,Be=void 0),w(Be).includes(nt)),Y=(Be=window)=>{if(typeof Be>"u")return[];Be.Ionic=Be.Ionic||{};let nt=Be.Ionic.platforms;return null==nt&&(nt=Be.Ionic.platforms=V(Be),nt.forEach(mt=>Be.document.documentElement.classList.add(`plt-${mt}`))),nt},V=Be=>{const nt=l.get("platform");return Object.keys(Z).filter(mt=>{const ut=nt?.[mt];return"function"==typeof ut?ut(Be):Z[mt](Be)})},he=Be=>!!(be(Be,/iPad/i)||be(Be,/Macintosh/i)&&pe(Be)),ve=Be=>be(Be,/android|sink/i),pe=Be=>le(Be,"(any-pointer:coarse)"),xe=Be=>de(Be)||re(Be),de=Be=>!!(Be.cordova||Be.phonegap||Be.PhoneGap),re=Be=>!!Be.Capacitor?.isNative,be=(Be,nt)=>nt.test(Be.navigator.userAgent),le=(Be,nt)=>{var mt;return null===(mt=Be.matchMedia)||void 0===mt?void 0:mt.call(Be,nt).matches},Z={ipad:he,iphone:Be=>be(Be,/iPhone/i),ios:Be=>be(Be,/iPhone|iPod/i)||he(Be),android:ve,phablet:Be=>{const nt=Be.innerWidth,mt=Be.innerHeight,ut=Math.min(nt,mt),Ve=Math.max(nt,mt);return ut>390&&ut<520&&Ve>620&&Ve<800},tablet:Be=>{const nt=Be.innerWidth,mt=Be.innerHeight,ut=Math.min(nt,mt),Ve=Math.max(nt,mt);return he(Be)||(Be=>ve(Be)&&!be(Be,/mobile/i))(Be)||ut>460&&ut<820&&Ve>780&&Ve<1400},cordova:de,capacitor:re,electron:Be=>be(Be,/electron/i),pwa:Be=>{var nt;return!!(null!==(nt=Be.matchMedia)&&void 0!==nt&&nt.call(Be,"(display-mode: standalone)").matches||Be.navigator.standalone)},mobile:pe,mobileweb:Be=>pe(Be)&&!xe(Be),desktop:Be=>!pe(Be),hybrid:xe};let Oe;const j=Be=>Be&&(0,o.g)(Be)||Oe,ke=(Be={})=>{if(typeof window>"u")return;const nt=window.document,mt=window,ut=mt.Ionic=mt.Ionic||{},Ve={};Be._ael&&(Ve.ael=Be._ael),Be._rel&&(Ve.rel=Be._rel),Be._ce&&(Ve.ce=Be._ce),(0,o.s)(Ve);const tt=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},(Be=>{try{const nt=Be.sessionStorage.getItem(P);return null!==nt?JSON.parse(nt):{}}catch{return{}}})(mt)),{persistConfig:!1}),ut.config),(Be=>{const nt={};return Be.location.search.slice(1).split("&").map(mt=>mt.split("=")).map(([mt,ut])=>[decodeURIComponent(mt),decodeURIComponent(ut)]).filter(([mt])=>T(mt,n)).map(([mt,ut])=>[mt.slice(n.length),ut]).forEach(([mt,ut])=>{nt[mt]=ut}),nt})(mt)),Be);l.reset(tt),l.getBoolean("persistConfig")&&((Be,nt)=>{try{Be.sessionStorage.setItem(P,JSON.stringify(nt))}catch{return}})(mt,tt),Y(mt),ut.config=l,ut.mode=Oe=l.get("mode",nt.documentElement.getAttribute("mode")||(B(mt,"ios")?"ios":"md")),l.set("mode",Oe),nt.documentElement.setAttribute("mode",Oe),nt.documentElement.classList.add(Oe),l.getBoolean("_testing")&&l.set("animated",!1);const Ne=ft=>{var Ct;return null===(Ct=ft.tagName)||void 0===Ct?void 0:Ct.startsWith("ION-")},wt=ft=>["ios","md"].includes(ft);(0,o.a)(ft=>{for(;ft;){const Ct=ft.mode||ft.getAttribute("mode");if(Ct){if(wt(Ct))return Ct;Ne(ft)&&console.warn('Invalid ionic mode: "'+Ct+'", expected: "ios" or "md"')}ft=ft.parentElement}return Oe})}},19950:(qe,I,p)=>{"use strict";p.r(I),p.d(I,{iosTransitionAnimation:()=>Y,shadow:()=>E});var o=p(89442),e=p(30471);p(67936);const g=V=>document.querySelector(`${V}.ion-cloned-element`),E=V=>V.shadowRoot||V,T=V=>{const ue="ION-TABS"===V.tagName?V:V.querySelector("ion-tabs"),he="ion-content ion-header:not(.header-collapse-condense-inactive) ion-title.title-large";if(null!=ue){const ae=ue.querySelector("ion-tab:not(.tab-hidden), .ion-page:not(.ion-page-hidden)");return null!=ae?ae.querySelector(he):null}return V.querySelector(he)},n=(V,ue)=>{const he="ION-TABS"===V.tagName?V:V.querySelector("ion-tabs");let ae=[];if(null!=he){const X=he.querySelector("ion-tab:not(.tab-hidden), .ion-page:not(.ion-page-hidden)");null!=X&&(ae=X.querySelectorAll("ion-buttons"))}else ae=V.querySelectorAll("ion-buttons");for(const X of ae){const ve=X.closest("ion-header"),ye=ve&&!ve.classList.contains("header-collapse-condense-inactive"),ge=X.querySelector("ion-back-button"),ne=X.classList.contains("buttons-collapse"),pe="start"===X.slot||""===X.slot;if(null!==ge&&pe&&(ne&&ye&&ue||!ne))return ge}return null},w=(V,ue,he,ae,X,ve)=>{const ye=ue?`calc(100% - ${ve.right+4}px)`:ve.left-4+"px",ge=ue?"7px":"-7px",ne=ue?"-4px":"4px",pe=ue?"-4px":"4px",Pe=ue?"right":"left",xe=ue?"left":"right",de=[{offset:0,opacity:0,transform:`translate3d(${ge}, ${X.top-40}px, 0) scale(2.1)`},{offset:1,opacity:1,transform:`translate3d(${ne}, ${ve.top-46}px, 0) scale(1)`}],re=[{offset:0,opacity:1,transform:`translate3d(${ne}, ${ve.top-46}px, 0) scale(1)`},{offset:.6,opacity:0},{offset:1,opacity:0,transform:`translate3d(${ge}, ${X.top-40}px, 0) scale(2.1)`}],oe=he?re:de,me=[{offset:0,opacity:0,transform:`translate3d(${pe}, ${ve.top-41}px, 0) scale(0.6)`},{offset:1,opacity:1,transform:`translate3d(${pe}, ${ve.top-46}px, 0) scale(1)`}],be=[{offset:0,opacity:1,transform:`translate3d(${pe}, ${ve.top-46}px, 0) scale(1)`},{offset:.2,opacity:0,transform:`translate3d(${pe}, ${ve.top-41}px, 0) scale(0.6)`},{offset:1,opacity:0,transform:`translate3d(${pe}, ${ve.top-41}px, 0) scale(0.6)`}],le=he?be:me,Z=(0,o.c)(),Oe=(0,o.c)(),j=g("ion-back-button"),ke=E(j).querySelector(".button-text"),Be=E(j).querySelector("ion-icon");j.text=ae.text,j.mode=ae.mode,j.icon=ae.icon,j.color=ae.color,j.disabled=ae.disabled,j.style.setProperty("display","block"),j.style.setProperty("position","fixed"),Oe.addElement(Be),Z.addElement(ke),Z.beforeStyles({"transform-origin":`${Pe} center`}).beforeAddWrite(()=>{ae.style.setProperty("display","none"),j.style.setProperty(Pe,ye)}).afterAddWrite(()=>{ae.style.setProperty("display",""),j.style.setProperty("display","none"),j.style.removeProperty(Pe)}).keyframes(oe),Oe.beforeStyles({"transform-origin":`${xe} center`}).keyframes(le),V.addAnimation([Z,Oe])},B=(V,ue,he,ae,X,ve)=>{const ye=ue?`calc(100% - ${X.right}px)`:`${X.left}px`,ge=ue?"-18px":"18px",ne=ue?"right":"left",pe=[{offset:0,opacity:0,transform:`translate3d(${ge}, ${ve.top-4}px, 0) scale(0.49)`},{offset:.1,opacity:0},{offset:1,opacity:1,transform:`translate3d(0, ${X.top-2}px, 0) scale(1)`}],Pe=[{offset:0,opacity:.99,transform:`translate3d(0, ${X.top-2}px, 0) scale(1)`},{offset:.6,opacity:0},{offset:1,opacity:0,transform:`translate3d(${ge}, ${ve.top-4}px, 0) scale(0.5)`}],xe=he?pe:Pe,de=g("ion-title"),re=(0,o.c)();de.innerText=ae.innerText,de.size=ae.size,de.color=ae.color,re.addElement(de),re.beforeStyles({"transform-origin":`${ne} center`,height:"46px",display:"",position:"relative",[ne]:ye}).beforeAddWrite(()=>{ae.style.setProperty("display","none")}).afterAddWrite(()=>{ae.style.setProperty("display",""),de.style.setProperty("display","none")}).keyframes(xe),V.addAnimation(re)},Y=(V,ue)=>{try{const he="cubic-bezier(0.32,0.72,0,1)",ae="opacity",X="transform",ve="0%",ge="rtl"===V.ownerDocument.dir,ne=ge?"-99.5%":"99.5%",pe=ge?"33%":"-33%",Pe=ue.enteringEl,xe=ue.leavingEl,de="back"===ue.direction,re=Pe.querySelector(":scope > ion-content"),oe=Pe.querySelectorAll(":scope > ion-header > *:not(ion-toolbar), :scope > ion-footer > *"),me=Pe.querySelectorAll(":scope > ion-header > ion-toolbar"),be=(0,o.c)(),le=(0,o.c)();if(be.addElement(Pe).duration(ue.duration||540).easing(ue.easing||he).fill("both").beforeRemoveClass("ion-page-invisible"),xe&&V){const ke=(0,o.c)();ke.addElement(V),be.addAnimation(ke)}if(re||0!==me.length||0!==oe.length?(le.addElement(re),le.addElement(oe)):le.addElement(Pe.querySelector(":scope > .ion-page, :scope > ion-nav, :scope > ion-tabs")),be.addAnimation(le),de?le.beforeClearStyles([ae]).fromTo("transform",`translateX(${pe})`,`translateX(${ve})`).fromTo(ae,.8,1):le.beforeClearStyles([ae]).fromTo("transform",`translateX(${ne})`,`translateX(${ve})`),re){const ke=E(re).querySelector(".transition-effect");if(ke){const Be=ke.querySelector(".transition-cover"),nt=ke.querySelector(".transition-shadow"),mt=(0,o.c)(),ut=(0,o.c)(),Ve=(0,o.c)();mt.addElement(ke).beforeStyles({opacity:"1",display:"block"}).afterStyles({opacity:"",display:""}),ut.addElement(Be).beforeClearStyles([ae]).fromTo(ae,0,.1),Ve.addElement(nt).beforeClearStyles([ae]).fromTo(ae,.03,.7),mt.addAnimation([ut,Ve]),le.addAnimation([mt])}}const Z=Pe.querySelector("ion-header.header-collapse-condense"),{forward:Oe,backward:j}=((V,ue,he,ae,X)=>{const ve=n(ae,he),ye=T(X),ge=T(ae),ne=n(X,he),pe=null!==ve&&null!==ye&&!he,Pe=null!==ge&&null!==ne&&he;if(pe){const xe=ye.getBoundingClientRect(),de=ve.getBoundingClientRect();B(V,ue,he,ye,xe,de),w(V,ue,he,ve,xe,de)}else if(Pe){const xe=ge.getBoundingClientRect(),de=ne.getBoundingClientRect();B(V,ue,he,ge,xe,de),w(V,ue,he,ne,xe,de)}return{forward:pe,backward:Pe}})(be,ge,de,Pe,xe);if(me.forEach(ke=>{const Be=(0,o.c)();Be.addElement(ke),be.addAnimation(Be);const nt=(0,o.c)();nt.addElement(ke.querySelector("ion-title"));const mt=(0,o.c)(),ut=Array.from(ke.querySelectorAll("ion-buttons,[menuToggle]")),Ve=ke.closest("ion-header"),tt=Ve?.classList.contains("header-collapse-condense-inactive");let Ne;Ne=de?ut.filter(He=>{const st=He.classList.contains("buttons-collapse");return st&&!tt||!st}):ut.filter(He=>!He.classList.contains("buttons-collapse")),mt.addElement(Ne);const wt=(0,o.c)();wt.addElement(ke.querySelectorAll(":scope > *:not(ion-title):not(ion-buttons):not([menuToggle])"));const ft=(0,o.c)();ft.addElement(E(ke).querySelector(".toolbar-background"));const Ct=(0,o.c)(),rn=ke.querySelector("ion-back-button");if(rn&&Ct.addElement(rn),Be.addAnimation([nt,mt,wt,ft,Ct]),mt.fromTo(ae,.01,1),wt.fromTo(ae,.01,1),de)tt||nt.fromTo("transform",`translateX(${pe})`,`translateX(${ve})`).fromTo(ae,.01,1),wt.fromTo("transform",`translateX(${pe})`,`translateX(${ve})`),Ct.fromTo(ae,.01,1);else if(Z||nt.fromTo("transform",`translateX(${ne})`,`translateX(${ve})`).fromTo(ae,.01,1),wt.fromTo("transform",`translateX(${ne})`,`translateX(${ve})`),ft.beforeClearStyles([ae,"transform"]),Ve?.translucent?ft.fromTo("transform",ge?"translateX(-100%)":"translateX(100%)","translateX(0px)"):ft.fromTo(ae,.01,"var(--opacity)"),Oe||Ct.fromTo(ae,.01,1),rn&&!Oe){const st=(0,o.c)();st.addElement(E(rn).querySelector(".button-text")).fromTo("transform",ge?"translateX(-100px)":"translateX(100px)","translateX(0px)"),Be.addAnimation(st)}}),xe){const ke=(0,o.c)(),Be=xe.querySelector(":scope > ion-content"),nt=xe.querySelectorAll(":scope > ion-header > ion-toolbar"),mt=xe.querySelectorAll(":scope > ion-header > *:not(ion-toolbar), :scope > ion-footer > *");if(Be||0!==nt.length||0!==mt.length?(ke.addElement(Be),ke.addElement(mt)):ke.addElement(xe.querySelector(":scope > .ion-page, :scope > ion-nav, :scope > ion-tabs")),be.addAnimation(ke),de){ke.beforeClearStyles([ae]).fromTo("transform",`translateX(${ve})`,ge?"translateX(-100%)":"translateX(100%)");const ut=(0,e.g)(xe);be.afterAddWrite(()=>{"normal"===be.getDirection()&&ut.style.setProperty("display","none")})}else ke.fromTo("transform",`translateX(${ve})`,`translateX(${pe})`).fromTo(ae,1,.8);if(Be){const ut=E(Be).querySelector(".transition-effect");if(ut){const Ve=ut.querySelector(".transition-cover"),tt=ut.querySelector(".transition-shadow"),Ne=(0,o.c)(),wt=(0,o.c)(),ft=(0,o.c)();Ne.addElement(ut).beforeStyles({opacity:"1",display:"block"}).afterStyles({opacity:"",display:""}),wt.addElement(Ve).beforeClearStyles([ae]).fromTo(ae,.1,0),ft.addElement(tt).beforeClearStyles([ae]).fromTo(ae,.7,.03),Ne.addAnimation([wt,ft]),ke.addAnimation([Ne])}}nt.forEach(ut=>{const Ve=(0,o.c)();Ve.addElement(ut);const tt=(0,o.c)();tt.addElement(ut.querySelector("ion-title"));const Ne=(0,o.c)(),wt=ut.querySelectorAll("ion-buttons,[menuToggle]"),ft=ut.closest("ion-header"),Ct=ft?.classList.contains("header-collapse-condense-inactive"),rn=Array.from(wt).filter(vi=>{const Gi=vi.classList.contains("buttons-collapse");return Gi&&!Ct||!Gi});Ne.addElement(rn);const He=(0,o.c)(),st=ut.querySelectorAll(":scope > *:not(ion-title):not(ion-buttons):not([menuToggle])");st.length>0&&He.addElement(st);const nn=(0,o.c)();nn.addElement(E(ut).querySelector(".toolbar-background"));const Dn=(0,o.c)(),Mn=ut.querySelector("ion-back-button");if(Mn&&Dn.addElement(Mn),Ve.addAnimation([tt,Ne,He,Dn,nn]),be.addAnimation(Ve),Dn.fromTo(ae,.99,0),Ne.fromTo(ae,.99,0),He.fromTo(ae,.99,0),de){if(Ct||tt.fromTo("transform",`translateX(${ve})`,ge?"translateX(-100%)":"translateX(100%)").fromTo(ae,.99,0),He.fromTo("transform",`translateX(${ve})`,ge?"translateX(-100%)":"translateX(100%)"),nn.beforeClearStyles([ae,"transform"]),ft?.translucent?nn.fromTo("transform","translateX(0px)",ge?"translateX(-100%)":"translateX(100%)"):nn.fromTo(ae,"var(--opacity)",0),Mn&&!j){const Gi=(0,o.c)();Gi.addElement(E(Mn).querySelector(".button-text")).fromTo("transform",`translateX(${ve})`,`translateX(${(ge?-124:124)+"px"})`),Ve.addAnimation(Gi)}}else Ct||tt.fromTo("transform",`translateX(${ve})`,`translateX(${pe})`).fromTo(ae,.99,0).afterClearStyles([X,ae]),He.fromTo("transform",`translateX(${ve})`,`translateX(${pe})`).afterClearStyles([X,ae]),Dn.afterClearStyles([ae]),tt.afterClearStyles([ae]),Ne.afterClearStyles([ae])})}return be}catch(he){throw he}}},74802:(qe,I,p)=>{"use strict";p.r(I),p.d(I,{mdTransitionAnimation:()=>D});var o=p(89442),e=p(30471);p(67936);const D=(g,E)=>{const T="40px",P="back"===E.direction,w=E.enteringEl,B=E.leavingEl,Y=(0,e.g)(w),V=Y.querySelector("ion-toolbar"),ue=(0,o.c)();if(ue.addElement(Y).fill("both").beforeRemoveClass("ion-page-invisible"),P?ue.duration(E.duration||200).easing("cubic-bezier(0.47,0,0.745,0.715)"):ue.duration(E.duration||280).easing("cubic-bezier(0.36,0.66,0.04,1)").fromTo("transform",`translateY(${T})`,"translateY(0px)").fromTo("opacity",.01,1),V){const he=(0,o.c)();he.addElement(V),ue.addAnimation(he)}if(B&&P){ue.duration(E.duration||200).easing("cubic-bezier(0.47,0,0.745,0.715)");const he=(0,o.c)();he.addElement((0,e.g)(B)).onFinish(ae=>{1===ae&&he.elements.length>0&&he.elements[0].style.setProperty("display","none")}).fromTo("transform","translateY(0px)",`translateY(${T})`).fromTo("opacity",1,0),ue.addAnimation(he)}return ue}},44239:(qe,I,p)=>{"use strict";p.d(I,{B:()=>mt,a:()=>n,b:()=>P,c:()=>V,d:()=>oe,e:()=>he,f:()=>be,g:()=>Oe,h:()=>E,i:()=>ke,j:()=>ve,k:()=>de,l:()=>w,m:()=>B,p:()=>Y,s:()=>nt,t:()=>ue});var o=p(15861),e=p(61671),l=p(47593),D=p(23756);let g=0;const E=new WeakMap,T=ut=>({create:Ve=>ae(ut,Ve),dismiss:(Ve,tt,Ne)=>Pe(document,Ve,tt,ut,Ne),getTop:()=>(0,o.Z)(function*(){return de(document,ut)})()}),n=T("ion-alert"),P=T("ion-action-sheet"),w=T("ion-loading"),B=T("ion-modal"),Y=T("ion-picker"),V=T("ion-popover"),ue=T("ion-toast"),he=ut=>{typeof document<"u"&&pe(document);const Ve=g++;ut.overlayIndex=Ve,ut.hasAttribute("id")||(ut.id=`ion-overlay-${Ve}`)},ae=(ut,Ve)=>typeof window<"u"&&typeof window.customElements<"u"?window.customElements.whenDefined(ut).then(()=>{const tt=document.createElement(ut);return tt.classList.add("overlay-hidden"),Object.assign(tt,Object.assign(Object.assign({},Ve),{hasController:!0})),le(document).appendChild(tt),new Promise(Ne=>(0,D.c)(tt,Ne))}):Promise.resolve(),X='[tabindex]:not([tabindex^="-"]), input:not([type=hidden]):not([tabindex^="-"]), textarea:not([tabindex^="-"]), button:not([tabindex^="-"]), select:not([tabindex^="-"]), .ion-focusable:not([tabindex^="-"])',ve=(ut,Ve)=>{let tt=ut.querySelector(X);const Ne=tt?.shadowRoot;Ne&&(tt=Ne.querySelector(X)||tt),tt?(0,D.f)(tt):Ve.focus()},ge=(ut,Ve)=>{const tt=Array.from(ut.querySelectorAll(X));let Ne=tt.length>0?tt[tt.length-1]:null;const wt=Ne?.shadowRoot;wt&&(Ne=wt.querySelector(X)||Ne),Ne?Ne.focus():Ve.focus()},pe=ut=>{0===g&&(g=1,ut.addEventListener("focus",Ve=>{((ut,Ve)=>{const tt=de(Ve,"ion-alert,ion-action-sheet,ion-loading,ion-modal,ion-picker,ion-popover"),Ne=ut.target;if(!tt||!Ne||tt.classList.contains("ion-disable-focus-trap"))return;tt.shadowRoot?(()=>{if(tt.contains(Ne))tt.lastFocus=Ne;else{const Ct=tt.lastFocus;ve(tt,tt),Ct===Ve.activeElement&&ge(tt,tt),tt.lastFocus=Ve.activeElement}})():(()=>{if(tt===Ne)tt.lastFocus=void 0;else{const Ct=(0,D.g)(tt);if(!Ct.contains(Ne))return;const rn=Ct.querySelector(".ion-overlay-wrapper");if(!rn)return;if(rn.contains(Ne))tt.lastFocus=Ne;else{const He=tt.lastFocus;ve(rn,tt),He===Ve.activeElement&&ge(rn,tt),tt.lastFocus=Ve.activeElement}}})()})(Ve,ut)},!0),ut.addEventListener("ionBackButton",Ve=>{const tt=de(ut);tt?.backdropDismiss&&Ve.detail.register(l.OVERLAY_BACK_BUTTON_PRIORITY,()=>tt.dismiss(void 0,mt))}),ut.addEventListener("keyup",Ve=>{if("Escape"===Ve.key){const tt=de(ut);tt?.backdropDismiss&&tt.dismiss(void 0,mt)}}))},Pe=(ut,Ve,tt,Ne,wt)=>{const ft=de(ut,Ne,wt);return ft?ft.dismiss(Ve,tt):Promise.reject("overlay does not exist")},de=(ut,Ve,tt)=>{const Ne=((ut,Ve)=>(void 0===Ve&&(Ve="ion-alert,ion-action-sheet,ion-loading,ion-modal,ion-picker,ion-popover,ion-toast"),Array.from(ut.querySelectorAll(Ve)).filter(tt=>tt.overlayIndex>0)))(ut,Ve).filter(wt=>!(ut=>ut.classList.contains("overlay-hidden"))(wt));return void 0===tt?Ne[Ne.length-1]:Ne.find(wt=>wt.id===tt)},re=(ut=!1)=>{const tt=le(document).querySelector("ion-router-outlet, ion-nav, #ion-view-container-root");tt&&(ut?tt.setAttribute("aria-hidden","true"):tt.removeAttribute("aria-hidden"))},oe=function(){var ut=(0,o.Z)(function*(Ve,tt,Ne,wt,ft){var Ct,rn;if(Ve.presented)return;re(!0),Ve.presented=!0,Ve.willPresent.emit(),null===(Ct=Ve.willPresentShorthand)||void 0===Ct||Ct.emit();const He=(0,e.b)(Ve),st=Ve.enterAnimation?Ve.enterAnimation:e.c.get(tt,"ios"===He?Ne:wt);(yield Z(Ve,st,Ve.el,ft))&&(Ve.didPresent.emit(),null===(rn=Ve.didPresentShorthand)||void 0===rn||rn.emit()),"ION-TOAST"!==Ve.el.tagName&&me(Ve.el),Ve.keyboardClose&&(null===document.activeElement||!Ve.el.contains(document.activeElement))&&Ve.el.focus()});return function(tt,Ne,wt,ft,Ct){return ut.apply(this,arguments)}}(),me=function(){var ut=(0,o.Z)(function*(Ve){let tt=document.activeElement;if(!tt)return;const Ne=tt?.shadowRoot;Ne&&(tt=Ne.querySelector(X)||tt),yield Ve.onDidDismiss(),tt.focus()});return function(tt){return ut.apply(this,arguments)}}(),be=function(){var ut=(0,o.Z)(function*(Ve,tt,Ne,wt,ft,Ct,rn){var He,st;if(!Ve.presented)return!1;re(!1),Ve.presented=!1;try{Ve.el.style.setProperty("pointer-events","none"),Ve.willDismiss.emit({data:tt,role:Ne}),null===(He=Ve.willDismissShorthand)||void 0===He||He.emit({data:tt,role:Ne});const nn=(0,e.b)(Ve),Dn=Ve.leaveAnimation?Ve.leaveAnimation:e.c.get(wt,"ios"===nn?ft:Ct);"gesture"!==Ne&&(yield Z(Ve,Dn,Ve.el,rn)),Ve.didDismiss.emit({data:tt,role:Ne}),null===(st=Ve.didDismissShorthand)||void 0===st||st.emit({data:tt,role:Ne}),E.delete(Ve),Ve.el.classList.add("overlay-hidden"),Ve.el.style.removeProperty("pointer-events")}catch(nn){console.error(nn)}return Ve.el.remove(),!0});return function(tt,Ne,wt,ft,Ct,rn,He){return ut.apply(this,arguments)}}(),le=ut=>ut.querySelector("ion-app")||ut.body,Z=function(){var ut=(0,o.Z)(function*(Ve,tt,Ne,wt){Ne.classList.remove("overlay-hidden");const Ct=tt(Ve.el,wt);(!Ve.animated||!e.c.getBoolean("animated",!0))&&Ct.duration(0),Ve.keyboardClose&&Ct.beforeAddWrite(()=>{const He=Ne.ownerDocument.activeElement;He?.matches("input,ion-input, ion-textarea")&&He.blur()});const rn=E.get(Ve)||[];return E.set(Ve,[...rn,Ct]),yield Ct.play(),!0});return function(tt,Ne,wt,ft){return ut.apply(this,arguments)}}(),Oe=(ut,Ve)=>{let tt;const Ne=new Promise(wt=>tt=wt);return j(ut,Ve,wt=>{tt(wt.detail)}),Ne},j=(ut,Ve,tt)=>{const Ne=wt=>{(0,D.b)(ut,Ve,Ne),tt(wt)};(0,D.a)(ut,Ve,Ne)},ke=ut=>"cancel"===ut||ut===mt,Be=ut=>ut(),nt=(ut,Ve)=>{if("function"==typeof ut)return e.c.get("_zoneGate",Be)(()=>{try{return ut(Ve)}catch(Ne){throw Ne}})},mt="backdrop"},90849:(qe,I,p)=>{"use strict";p.d(I,{K:()=>E});var o=p(15861),e=p(94424),l=p.n(e);const D={SecureStorage:"ionicSecureStorage",IndexedDB:l().INDEXEDDB,LocalStorage:l().LOCALSTORAGE},g={name:"_ionicstorage",storeName:"_ionickv",dbKey:"_ionickey",driverOrder:[D.SecureStorage,D.IndexedDB,D.LocalStorage]};class E{constructor(n=g){this._db=null,this._secureStorageDriver=null;const P=Object.assign({},g,n||{});this._config=P}create(){var n=this;return(0,o.Z)(function*(){const P=l().createInstance(n._config);return n._db=P,yield P.setDriver(n._config.driverOrder||[]),n})()}defineDriver(n){var P=this;return(0,o.Z)(function*(){return n._driver===D.SecureStorage&&(P._secureStorageDriver=n),l().defineDriver(n)})()}get driver(){var n;return(null===(n=this._db)||void 0===n?void 0:n.driver())||null}assertDb(){if(!this._db)throw new Error("Database not created. Must call create() first");return this._db}get(n){return this.assertDb().getItem(n)}set(n,P){return this.assertDb().setItem(n,P)}remove(n){return this.assertDb().removeItem(n)}clear(){return this.assertDb().clear()}length(){return this.assertDb().length()}keys(){return this.assertDb().keys()}forEach(n){return this.assertDb().iterate(n)}setEncryptionKey(n){var P;if(!this._secureStorageDriver)throw new Error("@ionic-enterprise/secure-storage not installed. Encryption support not available");null===(P=this._secureStorageDriver)||void 0===P||P.setEncryptionKey(n)}}},24623:(qe,I,p)=>{"use strict";p.d(I,{x:()=>T});var o=p(29145),e=p(13312),l=p(88692),D=p(7398),g=p(94650);const n=class{};let E=n;n.\u0275fac=function(Y){return new(Y||n)},n.\u0275mod=g.oAB({type:n}),n.\u0275inj=g.cJS({imports:[l.SiviCoreComponentModule,l.ProfileImagePickerComponentModule,l.RadioListWithInputComponentModule,e.e,o.R,l.CommonSearchbarComponentModule,l.AttachmentComponentModule,l.AttachmentSelectorComponentModule,l.DatepickerModule,l.DirectivesModule,D.u,l.InfoPopupComponentModule,l.SelectComponentModule,l.SiviFormsModule]});const P=class{};let T=P;P.\u0275fac=function(Y){return new(Y||P)},P.\u0275mod=g.oAB({type:P}),P.\u0275inj=g.cJS({imports:[l.SiviCorePageModule,E,l.DirectivesModule,l.SiviFormsModule,E]})},29145:(qe,I,p)=>{"use strict";p.d(I,{R:()=>l});var o=p(88692),e=p(94650);const D=class{};let l=D;D.\u0275fac=function(T){return new(T||D)},D.\u0275mod=e.oAB({type:D}),D.\u0275inj=e.cJS({imports:[o.SiviCoreComponentModule,o.SelectComponentModule]})},13312:(qe,I,p)=>{"use strict";p.d(I,{e:()=>l});var o=p(88692),e=p(94650);const D=class{};let l=D;D.\u0275fac=function(T){return new(T||D)},D.\u0275mod=e.oAB({type:D}),D.\u0275inj=e.cJS({imports:[o.SiviCoreComponentModule]})},30903:(qe,I,p)=>{"use strict";p.d(I,{d:()=>ke});var o=p(15861),e=p(94650),l=p(88692),D=p(24956),g=p(49594),E=p(14177),T=p(78240),n=p(45840),P=p(15439),w=p.n(P),B=p(61135),Y=p(95698),V=p(54004),ue=p(34782),he=p(89383),ae=p(70191),X=p(36895),ve=p(78218);const ye=["commonSearchbarComponent"];function ge(nt,mt){if(1&nt&&(e.TgZ(0,"div"),e._UZ(1,"cgi-input",16),e.ALo(2,"translate"),e.ALo(3,"translate"),e.qZA()),2&nt){const ut=e.oxw();e.xp6(1),e.Q6J("viewMode",ut.readonly||ut.prcData)("label",e.lcZ(3,5,"Form.Label.Pic")),e.uIk("aria-label",e.lcZ(2,3,"Form.Label.Pic"))}}function ne(nt,mt){if(1&nt&&(e.TgZ(0,"div"),e._UZ(1,"sivi-lib-datepicker",17),e.qZA()),2&nt){const ut=e.oxw();e.xp6(1),e.Q6J("maxDate",ut.todayDate)("readonly",ut.readonly||ut.prcData)("label","Form.Label.BirthDate")("value",ut.person.dateOfBirth)}}function pe(nt,mt){1&nt&&e._UZ(0,"sivi-lib-info-popup",18),2&nt&&e.Q6J("text","Person.OID.Info")}function Pe(nt,mt){if(1&nt&&(e.TgZ(0,"ion-col",22),e._UZ(1,"cgi-input",23),e.ALo(2,"translate"),e.ALo(3,"translate"),e.qZA()),2&nt){const ut=e.oxw(3);e.xp6(1),e.Q6J("value",ut.prcPermanentAddress)("viewMode",!0)("label",e.lcZ(3,6,"Form.Label.Address")),e.uIk("aria-label",e.lcZ(2,4,"Form.Label.Address"))}}function xe(nt,mt){if(1&nt&&(e.TgZ(0,"ion-row",3),e.YNc(1,Pe,4,8,"ion-col",21),e.qZA()),2&nt){const ut=e.oxw(2);e.xp6(1),e.Q6J("ngIf",!ut.person.nonDisclosure)}}function de(nt,mt){if(1&nt&&(e.TgZ(0,"ion-col",22),e._UZ(1,"cgi-input",24),e.ALo(2,"translate"),e.ALo(3,"translate"),e.qZA()),2&nt){const ut=e.oxw(3);e.xp6(1),e.Q6J("value",ut.prcPostalAddress)("viewMode",!0)("label",e.lcZ(3,6,"Form.Label.Address")),e.uIk("aria-label",e.lcZ(2,4,"Form.Label.Address"))}}function re(nt,mt){if(1&nt&&(e.TgZ(0,"ion-row",3),e.YNc(1,de,4,8,"ion-col",21),e.qZA()),2&nt){const ut=e.oxw(2);e.xp6(1),e.Q6J("ngIf",!ut.person.nonDisclosure)}}function oe(nt,mt){1&nt&&(e.TgZ(0,"ion-col",25),e._UZ(1,"cgi-input",26),e.ALo(2,"translate"),e.ALo(3,"translate"),e.ALo(4,"translate"),e.qZA()),2&nt&&(e.xp6(1),e.Q6J("value",e.lcZ(2,5,"NonDisclosure.ContactDetails"))("viewMode",!0)("label",e.lcZ(4,9,"Form.Label.Address"))("css",".person-nda .field-value { color: var(--ion-color-warning); text-transform: uppercase; }"),e.uIk("aria-label",e.lcZ(3,7,"Form.Label.NonDisclosure.Contact")))}function me(nt,mt){if(1&nt){const ut=e.EpF();e.TgZ(0,"sivi-person-contact-address",27),e.NdJ("update",function(tt){e.CHM(ut);const Ne=e.oxw(2);return e.KtG(Ne.onChangeAddressToBeUsed(tt))}),e.qZA()}if(2&nt){const ut=e.oxw(2);e.Q6J("address",ut.addressToBeUsed)}}function be(nt,mt){if(1&nt&&(e.ynx(0),e.YNc(1,xe,2,1,"ion-row",15),e.YNc(2,re,2,1,"ion-row",15),e.YNc(3,oe,5,11,"ion-col",19),e.YNc(4,me,1,1,"sivi-person-contact-address",20),e.ALo(5,"async"),e.BQk()),2&nt){const ut=e.oxw();e.xp6(1),e.Q6J("ngIf",ut.addressPermanent),e.xp6(1),e.Q6J("ngIf",ut.addressPostal),e.xp6(1),e.Q6J("ngIf",ut.person.nonDisclosure),e.xp6(1),e.Q6J("ngIf",e.lcZ(5,4,ut.isAddressReady$))}}function le(nt,mt){if(1&nt){const ut=e.EpF();e.ynx(0),e.TgZ(1,"ion-row",3)(2,"ion-col",9)(3,"cgi-input",28),e.NdJ("siviChange",function(tt){e.CHM(ut);const Ne=e.oxw();return e.KtG(Ne.onChangeAddressPermanent(tt))}),e.ALo(4,"translate"),e.ALo(5,"translate"),e.qZA()(),e.TgZ(6,"ion-col",9)(7,"cgi-input",29),e.NdJ("siviChange",function(tt){e.CHM(ut);const Ne=e.oxw();return e.KtG(Ne.onChangeAddressPermanent(tt))}),e.ALo(8,"translate"),e.ALo(9,"translate"),e.qZA()(),e.TgZ(10,"ion-col",30)(11,"cgi-input",31),e.NdJ("siviChange",function(tt){e.CHM(ut);const Ne=e.oxw();return e.KtG(Ne.onChangeAddressPermanent(tt))}),e.ALo(12,"translate"),e.ALo(13,"translate"),e.qZA()()(),e.BQk()}if(2&nt){const ut=e.oxw();e.xp6(3),e.Q6J("value",null==ut.addressPermanent?null:ut.addressPermanent.street)("label",e.lcZ(5,11,"Form.Label.Address")),e.uIk("aria-label",e.lcZ(4,9,"Form.Label.Address")),e.xp6(4),e.Q6J("value",null==ut.addressPermanent?null:ut.addressPermanent.postalCode)("label",e.lcZ(9,15,"Form.Label.PostalCode")),e.uIk("aria-label",e.lcZ(8,13,"Form.Label.PostalCode")),e.xp6(4),e.Q6J("value",null==ut.addressPermanent?null:ut.addressPermanent.city)("label",e.lcZ(13,19,"Form.Label.City")),e.uIk("aria-label",e.lcZ(12,17,"Form.Label.City"))}}function Z(nt,mt){if(1&nt){const ut=e.EpF();e.ynx(0),e.TgZ(1,"ion-label",34),e._uU(2),e.ALo(3,"translate"),e.qZA(),e.TgZ(4,"cgi-autocomplete",35),e.NdJ("valueChange",function(tt){e.CHM(ut);const Ne=e.oxw(2);return e.KtG(Ne.onAutocompleteChange(tt))}),e.ALo(5,"async"),e.ALo(6,"translate"),e.qZA(),e.BQk()}if(2&nt){const ut=e.oxw(2);e.xp6(2),e.Oqu(e.lcZ(3,5,"Form.Label.PlaceOfDomicile")),e.xp6(2),e.Q6J("multiSelect",!1)("options",e.lcZ(5,7,ut.municipalitiesOptions$))("noItemsText",e.lcZ(6,9,"Message.NoMunicipalityFound")),e.uIk("readonly",ut.readonly)}}function Oe(nt,mt){if(1&nt&&(e._UZ(0,"cgi-input",36),e.ALo(1,"translate"),e.ALo(2,"translate")),2&nt){const ut=e.oxw(2);e.Q6J("value",ut.prcPlaceOfDomicile)("viewMode",!0)("label",e.lcZ(2,6,"Form.Label.PlaceOfDomicile")),e.uIk("aria-label",e.lcZ(1,4,"Form.Label.PlaceOfDomicile"))}}function j(nt,mt){if(1&nt&&(e.TgZ(0,"ion-row",3)(1,"ion-col",4),e.YNc(2,Z,7,11,"ng-container",32),e.YNc(3,Oe,3,8,"ng-template",null,33,e.W1O),e.qZA()()),2&nt){const ut=e.MAs(4),Ve=e.oxw();e.xp6(1),e.Q6J("ngClass",Ve.prcData?"view-mode":""),e.xp6(1),e.Q6J("ngIf",!Ve.prcData)("ngIfElse",ut)}}const Be=class extends l.AbstractValidator{constructor(mt,ut,Ve){super(mt),this.translate=mt,this.organizationService=ut,this.languageService=Ve,this.showPIN=!1,this.readonly=!1,this.update=new e.vpe,this.placeOfDomicile=[],this.prcPlaceOfDomicile="",this.preferredNameOptions=[],this.prcPermanentAddress="",this.prcPostalAddress="",this.todayDate=l.Utils.getTodayDateISO(),this.isAddressReady$=new B.X(!1)}ngOnInit(){var mt=()=>super.ngOnInit,ut=this;return(0,o.Z)(function*(){ut.isAddressReady$.next(!1),mt().call(ut);const Ve=yield ut.languageService.getUserLanguage().pipe((0,Y.q)(1)).toPromise();ut.userLanguage=Ve.language,ut.prcData=ut.person.prc;const tt=!ut.readonly&&ut.person.prc;ut.personOID=l.PersonUtils.getPersonOID(ut.person.personInfos,tt,ut.person.prc),ut.municipalitiesOptions$=ut.getMunicipalitiesOptions(),ut.preferredNameOptions=D._0.generatePreferredNameOptions(ut.person.firstName),ut.person.nonDisclosure||(ut.placeOfDomicile=yield ut.getPlaceOfDomicile()),ut.setAddress()})()}onValidatorStatusChange(mt){super.onValidatorStatusChange(mt)}onValidatorValuesChange(mt){super.onValidatorValuesChange(mt);const ut=Object.assign({},mt.detail);if(delete ut.address,ut.firstName!==this.person.firstName&&(this.preferredNameOptions=D._0.generatePreferredNameOptions(ut.firstName),ut.preferredFirstName=(0,g.Z)(this.preferredNameOptions,"[0].value","")),ut.dateOfBirth&&!this.showPIN){const st=w()(ut.dateOfBirth,l.DateFormats.FINNISH_MOMENT,!0).isValid(),nn=l.Utils.isISODate(ut.dateOfBirth);ut.dateOfBirth=st||nn?w()(ut.dateOfBirth).format("YYYY-MM-DD"):ut.dateOfBirth}else ut.dateOfBirth=this.person.dateOfBirth;const tt=this.getHomeMunicipalityNumber(ut.placeOfDomicile),{firstName:Ne,lastName:wt,preferredFirstName:ft,nickName:Ct,dateOfBirth:rn}=ut,He={...this.person,firstName:Ne,lastName:wt,preferredFirstName:ft,nickName:Ct,dateOfBirth:rn,homeMunicipalityNumber:tt};this.placeOfDomicile=[tt],this.person={...He},this.update.emit(this.person)}getHomeMunicipalityNumber(mt){return(0,E.Z)(mt)?mt[0]:mt||void 0}getHomeMunicipalityName(mt){let ut="";const Ve=this.municipalityList.find(tt=>tt.code===mt);return Ve&&Ve.name&&(ut=Ve.name),ut}onChangeAddressPermanent(mt){const ut=mt.detail;this.addressPermanent[ut.name]=ut.value,this.person.address.find(tt=>tt.address.addressTypeCode===l.ContactTypes.ADDRESS_PERMANENT)||(console.warn(`PersonBasicInfoComponent: onChangeAddressPermanent.\n      Could not find a permanent address. A new permanent address has been created.\n      Check for missing data for the guardian with id ${this.person.id}.`),this.person.address.push(D._0.createAddress(l.ContactTypes.ADDRESS_PERMANENT,l.ContactTypes.ADDRESS)));const Ve=this.person.address.find(tt=>tt.address.addressTypeCode===l.ContactTypes.ADDRESS_PERMANENT);Ve.address={...Ve.address,...this.addressPermanent},this.update.emit(this.person)}onChangeAddressToBeUsed(mt){let ut=this.person.address.find(Ve=>Ve.address.addressTypeCode===l.ContactTypes.ADDRESS_TYPE);mt?(this.addressToBeUsed={...mt},ut||this.person.address.push(D._0.createAddress(l.ContactTypes.ADDRESS_TYPE,l.ContactTypes.ADDRESS)),ut=this.person.address.find(Ve=>Ve.address.addressTypeCode===l.ContactTypes.ADDRESS_TYPE),ut.address={...this.addressToBeUsed},this.update.emit(this.person)):ut&&(0,T.Z)(this.person.address,ut)}getFormValidity(){return this.isValid}onAutocompleteChange(mt){const ut=(0,n.Z)(mt.detail);ut.value=mt.detail.value[0];const Ve=new CustomEvent("",{detail:ut});this.updateControlValue(Ve)}setAddress(){const mt=this.person.address.find(ut=>ut.address.addressTypeCode===l.ContactTypes.ADDRESS_PERMANENT);if(this.addressPermanent=mt?mt.address:void 0,this.person.prc){const ut=this.person.address.find(tt=>tt.address.addressTypeCode===l.ContactTypes.ADDRESS_POSTAL_TYPE);this.addressPostal=ut?ut.address:void 0;const Ve=this.person.address.find(tt=>tt.address.addressTypeCode===l.ContactTypes.ADDRESS_TYPE);if(this.addressToBeUsed=Ve?Ve.address:void 0,this.prcPermanentAddress=this.addressPermanent?this.getPrcAddress(this.addressPermanent):"",this.prcPostalAddress=this.addressPostal?this.getPrcAddress(this.addressPostal):"",!this.person.nonDisclosure){const tt=this.municipalityList.find(Ne=>Ne.code===this.person.homeMunicipalityNumber);this.prcPlaceOfDomicile=tt.name}}this.validatorOptions=this.getValidatorOptions(),this.isAddressReady$.next(!0)}onChangeOIdValue(mt){this.person.personInfos=l.PersonUtils.updatePersonOID(this.person.personInfos,mt),this.update.emit(this.person)}getPlaceOfDomicile(){var mt=this;return(0,o.Z)(function*(){const ut=yield mt.organizationService.getMunicipalityCodeList(mt.userLanguage).pipe((0,Y.q)(1)).toPromise();mt.municipalityList=ut;const Ve=ut.find(tt=>tt.code===mt.person.homeMunicipalityNumber);return Ve?[Ve.code]:[l.MunicipalityNumbers.UNKNOWN]})()}getMunicipalitiesOptions(){return this.organizationService.getMunicipalityCodeList(this.userLanguage).pipe((0,Y.q)(1),(0,V.U)(ut=>ut.map(Ve=>({element:{text:`${Ve.code} ${Ve.name}`,image:""},value:Ve.code}))),(0,ue.d)())}getPrcAddress(mt){return(mt.street?mt.street+", ":"")+(mt.postalCode?mt.postalCode+", ":"")+(mt.city?mt.city:"")}getValidatorOptions(){let mt=[];if(mt=[this.createValidatorOption("firstName",this.person.firstName,this.prcData?[]:[l.SiviValidators.required,l.SiviValidators.pattern(l.Patterns.ALPHABETS)],{pattern:this.translate.instant("Form.Error.OnlyAlphabets")}),this.createValidatorOption("lastName",this.person.lastName,this.prcData?[]:[l.SiviValidators.required,l.SiviValidators.pattern(l.Patterns.ALPHABETS)],{pattern:this.translate.instant("Form.Error.OnlyAlphabets")}),this.createValidatorOption("preferredFirstName",this.person.preferredFirstName,[l.SiviValidators.required]),this.createValidatorOption("nickName",this.person.nickName,[l.SiviValidators.pattern(l.Patterns.ALPHABETS)],{pattern:this.translate.instant("Form.Error.OnlyAlphabets")})],!this.prcData){const ut=[this.createValidatorOption("street",this.addressPermanent.street,[l.SiviValidators.required]),this.createValidatorOption("postalCode",this.addressPermanent.postalCode,[l.SiviValidators.required]),this.createValidatorOption("city",this.addressPermanent.city,[l.SiviValidators.required]),this.createValidatorOption("placeOfDomicile",this.placeOfDomicile,[l.SiviValidators.required])];mt=[...mt,...ut]}return mt.push(this.getPinOrDataOfBirthValidator()),mt}getPinOrDataOfBirthValidator(){return this.showPIN?this.createValidatorOption("pin",this.person.pin,[l.SiviValidators.required,l.SiviValidators.validatePin(),l.SiviValidators.validateChildAgeByPIC()]):this.createValidatorOption("dateOfBirth",this.person.dateOfBirth,[l.SiviValidators.required,l.SiviValidators.validateDate(),l.SiviValidators.validateChildAge()])}};let ke=Be;Be.\u0275fac=function(ut){return new(ut||Be)(e.Y36(he.sK),e.Y36(l.OrganizationService),e.Y36(l.LanguageService))},Be.\u0275cmp=e.Xpm({type:Be,selectors:[["sivi-person-basic-info"]],viewQuery:function(ut,Ve){if(1&ut&&e.Gf(ye,5),2&ut){let tt;e.iGM(tt=e.CRH())&&(Ve.commonSearchbarComponent=tt.first)}},inputs:{person:"person",municipalityId:"municipalityId",showPIN:"showPIN",readonly:"readonly"},outputs:{update:"update"},features:[e.qOj],decls:34,vars:52,consts:[[1,"basic-info-container","content"],[3,"validatorOptions"],["validator",""],[1,"ion-no-padding"],["size","12","size-md","6",1,"ion-no-padding",3,"ngClass"],["name","firstName","type","text","label-position","floating",3,"viewMode","label"],["name","lastName","type","text","label-position","floating",3,"viewMode","label"],["size","12","size-md","6",1,"preferred-first-name"],["name","preferredFirstName",3,"value","viewMode","options","disabled","label"],["size","12","size-md","6",1,"ion-no-padding"],["name","nickName","type","text","label-position","floating",3,"disabled","viewMode","label"],[4,"ngIf"],[1,"component-with-info-popup"],["name","OID","type","text","label-position","floating",1,"person-oid",3,"css","viewMode","label","value","siviChange"],[3,"text",4,"ngIf"],["class","ion-no-padding",4,"ngIf"],["name","pin","type","text","label-position","floating",3,"viewMode","label"],["name","dateOfBirth",3,"maxDate","readonly","label","value"],[3,"text"],["class","ion-no-padding","size","12","size-md","6","class","person-nda",4,"ngIf"],[3,"address","update",4,"ngIf"],["class","ion-no-padding","size","12","size-md","6","class","view-mode",4,"ngIf"],["size","12","size-md","6",1,"view-mode"],["name","prcPermanentAddress","type","text","label-position","floating",3,"value","viewMode","label"],["name","prcPostalAddress","type","text","label-position","floating",3,"value","viewMode","label"],["size","12","size-md","6",1,"person-nda"],["name","personNonDisclosure","type","text","label-position","floating",3,"value","viewMode","label","css"],[3,"address","update"],["name","street","type","text","label-position","floating",3,"value","label","siviChange"],["name","postalCode","type","text","label-position","floating",3,"value","label","siviChange"],["size","12","size-md","6"],["name","city","type","text","label-position","floating",3,"value","label","siviChange"],[4,"ngIf","ngIfElse"],["showMunicipalityName",""],[1,"autocomplete-label"],["name","placeOfDomicile","placeholderImage","location_city",3,"multiSelect","options","noItemsText","valueChange"],["name","placeOfDomicile","type","text","label-position","floating",3,"value","viewMode","label"]],template:function(ut,Ve){1&ut&&(e.TgZ(0,"div",0)(1,"cgi-validator",1,2)(3,"ion-row",3)(4,"ion-col",4),e._UZ(5,"cgi-input",5),e.ALo(6,"translate"),e.ALo(7,"translate"),e.qZA(),e.TgZ(8,"ion-col",4),e._UZ(9,"cgi-input",6),e.ALo(10,"translate"),e.ALo(11,"translate"),e.qZA()(),e.TgZ(12,"ion-row",3)(13,"ion-col",7),e._UZ(14,"sivi-lib-select",8),e.ALo(15,"translate"),e.ALo(16,"translate"),e.qZA(),e.TgZ(17,"ion-col",9),e._UZ(18,"cgi-input",10),e.ALo(19,"translate"),e.ALo(20,"translate"),e.qZA()(),e.TgZ(21,"ion-row",3)(22,"ion-col",4),e.YNc(23,ge,4,7,"div",11),e.YNc(24,ne,2,4,"div",11),e.qZA(),e.TgZ(25,"ion-col",4)(26,"p",12)(27,"cgi-input",13),e.NdJ("siviChange",function(Ne){return Ve.onChangeOIdValue(Ne)}),e.ALo(28,"translate"),e.ALo(29,"translate"),e.qZA(),e.YNc(30,pe,1,1,"sivi-lib-info-popup",14),e.qZA()()(),e.YNc(31,be,6,6,"ng-container",11),e.YNc(32,le,14,21,"ng-container",11),e.YNc(33,j,5,3,"ion-row",15),e.qZA()()),2&ut&&(e.xp6(1),e.Q6J("validatorOptions",Ve.validatorOptions),e.xp6(3),e.Q6J("ngClass",Ve.prcData?"view-mode":""),e.xp6(1),e.Q6J("viewMode",Ve.readonly||Ve.prcData)("label",e.lcZ(7,34,"Form.Label.FirstName.Plural")),e.uIk("aria-label",e.lcZ(6,32,"Form.Label.FirstName.Plural")),e.xp6(3),e.Q6J("ngClass",Ve.prcData?"view-mode":""),e.xp6(1),e.Q6J("viewMode",Ve.readonly||Ve.prcData)("label",e.lcZ(11,38,"Form.Label.FamilyName")),e.uIk("aria-label",e.lcZ(10,36,"Form.Label.FamilyName")),e.xp6(5),e.Q6J("value",Ve.person.preferredFirstName)("viewMode",Ve.readonly)("options",Ve.preferredNameOptions)("disabled",!Ve.preferredNameOptions||Ve.preferredNameOptions.length<1)("label",e.lcZ(16,42,"Form.Label.PreferredFirstName")),e.uIk("aria-label",e.lcZ(15,40,"Form.Label.PreferredFirstName")),e.xp6(4),e.Q6J("disabled",!Ve.person.firstName)("viewMode",Ve.readonly)("label",e.lcZ(20,46,"Form.Label.NickName")),e.uIk("aria-label",e.lcZ(19,44,"Form.Label.NickName")),e.xp6(4),e.Q6J("ngClass",Ve.prcData?"view-mode":""),e.xp6(1),e.Q6J("ngIf",Ve.showPIN),e.xp6(1),e.Q6J("ngIf",!Ve.showPIN),e.xp6(1),e.Q6J("ngClass",Ve.prcData?"view-mode":""),e.xp6(2),e.Q6J("css","cgi-input[name='OID'] ion-input { margin-top: 0px; }")("viewMode",Ve.readonly||Ve.prcData)("label",e.lcZ(29,50,"Form.Label.OrganizationOID"))("value",Ve.personOID),e.uIk("aria-label",e.lcZ(28,48,"Form.Label.OrganizationOID")),e.xp6(3),e.Q6J("ngIf",!Ve.readonly),e.xp6(1),e.Q6J("ngIf",Ve.person.prc),e.xp6(1),e.Q6J("ngIf",!Ve.person.prc),e.xp6(1),e.Q6J("ngIf",!Ve.person.nonDisclosure))},dependencies:[l.InfoPopupComponent,ae.wI,ae.Q$,ae.Nd,X.mk,X.O5,l.DatepickerComponent,ve.l,l.SelectComponent,X.Ov,he.X$],styles:[".view-mode[_ngcontent-%COMP%]{padding-top:16px}.basic-info-container[_ngcontent-%COMP%]{padding:4px}.preferred-first-name[_ngcontent-%COMP%]{margin-top:6px}.input-container[_ngcontent-%COMP%]{margin-left:24px}.autocomplete-label[_ngcontent-%COMP%]{font-size:12px;margin-left:10px}.component-with-info-popup[_ngcontent-%COMP%]{display:flex;margin-top:0;margin-bottom:0}.component-with-info-popup[_ngcontent-%COMP%]   .person-oid[_ngcontent-%COMP%]{width:100%}.component-with-info-popup[_ngcontent-%COMP%]   sivi-lib-info-popup[_ngcontent-%COMP%]{margin:25px auto auto;font-size:26px}"]})},78218:(qe,I,p)=>{"use strict";p.d(I,{l:()=>Y});var o=p(15861),e=p(94650),l=p(88692),D=p(24956),g=p(45840),E=p(59378),T=p(89383),n=p(31943),P=p(24006),w=p(70191),B=p(36895);const V=class extends l.SiviAbstractForm{constructor(he,ae,X){super(),this.translate=he,this.notify=ae,this.fb=X,this.address=null,this.readonly=!1,this.update=new e.vpe,this.showContactAddress=!1,this.emptyAddress={addressTypeCode:D.AV.ADDRESS_TYPE,name:"",street:"",city:"",postalCode:""},this.form=this.fb.group({careOf:[],street:[],postalCode:[],city:[]})}ngOnInit(){this.initContactAddress(),this.updateForm(),this.setValidators()}updateContactAddress(he){let ae=(0,g.Z)(this.contactAddress);ae={id:ae.id,name:"careOf"===he.detail.name?he.detail.value:ae.name,street:"street"===he.detail.name?he.detail.value:ae.street,city:"city"===he.detail.name?he.detail.value:ae.city,postalCode:"postalCode"===he.detail.name?he.detail.value:ae.postalCode,addressTypeCode:D.AV.ADDRESS_TYPE},this.contactAddress=(0,g.Z)(ae),this.setValidators()}onFormValueChange(){const he=this.hasData()||this.showContactAddress?(0,g.Z)(this.contactAddress):null;this.update.emit(he)}hasData(){for(const he in this.contactAddress)if(this.contactAddress[he]&&!(0,E.Z)(this.contactAddress[he])&&"addressTypeCode"!==he)return!0;return!1}onToggleContactAddress(he){var ae=this;return(0,o.Z)(function*(){const X=he.detail.checked,ve=!ae.showContactAddress;if(ve&&ae.hasData()&&!X){const ye=ae.translate.instant("General.AddressInUse.Delete"),ge=ae.translate.instant("General.AddressInUse.Delete.Info");(yield ae.notify.createConfirmationPopUp(ye,ge,"General.Buttons.Delete")).onDidDismiss().then(pe=>{if(pe&&pe.data)return ae.contactAddress=(0,g.Z)(ae.emptyAddress),ae.showContactAddress=!1,ae.updateForm(),void ae.setValidators();ae.showContactAddress=ve})}else ae.showContactAddress=X;ae.setValidators()})()}initContactAddress(){(0,E.Z)(this.address)?this.contactAddress=(0,g.Z)(this.emptyAddress):(this.contactAddress=(0,g.Z)(this.address),this.showContactAddress=!0)}setValidators(){this.form.get("careOf").setValidators([l.SiviValidators.maxLength(D.nf.DEFAULT)]),this.showContactAddress?(this.form.get("street").setValidators([l.SiviValidators.required,l.SiviValidators.maxLength(D.nf.DEFAULT)]),this.form.get("postalCode").setValidators([l.SiviValidators.required,l.SiviValidators.validatePostalCode()]),this.form.get("city").setValidators([l.SiviValidators.required,l.SiviValidators.validateCity()])):(this.form.get("street").setValidators([]),this.form.get("postalCode").setValidators([]),this.form.get("city").setValidators([]))}updateForm(){this.form.patchValue(this.contactAddress)}};let Y=V;V.\u0275fac=function(ae){return new(ae||V)(e.Y36(T.sK),e.Y36(n.c),e.Y36(P.qu))},V.\u0275cmp=e.Xpm({type:V,selectors:[["sivi-person-contact-address"]],inputs:{address:"address",readonly:"readonly"},outputs:{update:"update"},features:[e.qOj],decls:26,vars:31,consts:[[1,"ion-margin-bottom"],[1,"ion-no-padding"],[1,"checkbox-container"],["lines","none"],[3,"ngModel","disabled","ngModelChange","ionChange"],[1,"ion-margin-start","ion-text-wrap"],["siviLibForm","",3,"formGroup"],[3,"ngClass"],["siviGridCol","left",1,"ion-no-padding"],["formControlName","careOf","siviLibFormControl","","autocomplete","no","type","text","label-position","floating",3,"viewMode","label","siviChange"],["formControlName","street","siviLibFormControl","","autocomplete","no","type","text","label-position","floating",3,"viewMode","label","siviChange"],["formControlName","postalCode","siviLibFormControl","","autocomplete","no","type","text","label-position","floating",3,"viewMode","label","siviChange"],["siviGridCol","right",1,"ion-no-padding","input-city"],["formControlName","city","siviLibFormControl","","autocomplete","no","type","text","label-position","floating",3,"viewMode","label","siviChange"]],template:function(ae,X){1&ae&&(e.TgZ(0,"ion-row",0)(1,"ion-col",1)(2,"div",2)(3,"ion-item",3)(4,"ion-checkbox",4),e.NdJ("ngModelChange",function(ye){return X.showContactAddress=ye})("ionChange",function(ye){return X.onToggleContactAddress(ye)}),e.qZA(),e.TgZ(5,"ion-label",5),e._uU(6),e.ALo(7,"translate"),e.qZA()()()()(),e.TgZ(8,"form",6)(9,"ion-row",7)(10,"ion-col",8)(11,"cgi-input",9),e.NdJ("siviChange",function(ye){return X.updateContactAddress(ye)}),e.ALo(12,"translate"),e.ALo(13,"translate"),e.qZA()()(),e.TgZ(14,"ion-row",7)(15,"ion-col",8)(16,"cgi-input",10),e.NdJ("siviChange",function(ye){return X.updateContactAddress(ye)}),e.ALo(17,"translate"),e.ALo(18,"translate"),e.qZA()()(),e.TgZ(19,"ion-row",7)(20,"ion-col",8)(21,"cgi-input",11),e.NdJ("siviChange",function(ye){return X.updateContactAddress(ye)}),e.ALo(22,"translate"),e.qZA()(),e.TgZ(23,"ion-col",12)(24,"cgi-input",13),e.NdJ("siviChange",function(ye){return X.updateContactAddress(ye)}),e.ALo(25,"translate"),e.qZA()()()()),2&ae&&(e.xp6(4),e.Q6J("ngModel",X.showContactAddress)("disabled",X.readonly),e.xp6(2),e.Oqu(e.lcZ(7,17,"Form.Label.Address.ContactAddress.Show")),e.xp6(2),e.Q6J("formGroup",X.form),e.xp6(1),e.Q6J("ngClass",X.showContactAddress?"":"hidden"),e.xp6(2),e.Q6J("viewMode",X.readonly)("label",e.lcZ(12,19,"Form.Label.CareOf")),e.uIk("aria-label",e.lcZ(13,21,"Form.Label.CareOf")),e.xp6(3),e.Q6J("ngClass",X.showContactAddress?"":"hidden"),e.xp6(2),e.Q6J("viewMode",X.readonly)("label",e.lcZ(17,23,"Form.Label.StreetAddress")),e.uIk("aria-label",e.lcZ(18,25,"Form.Label.StreetAddress")),e.xp6(3),e.Q6J("ngClass",X.showContactAddress?"":"hidden"),e.xp6(2),e.Q6J("viewMode",X.readonly)("label",e.lcZ(22,27,"Form.Label.PostalCode")),e.xp6(3),e.Q6J("viewMode",X.readonly)("label",e.lcZ(25,29,"Form.Label.City")))},dependencies:[w.nz,w.wI,w.Ie,w.Q$,w.Nd,w.w,B.mk,P._Y,P.JJ,P.JL,P.On,l.GridColDirective,l.SiviFormDirective,l.SiviFormControlDirective,P.sg,P.u,T.X$],styles:[".checkbox-container[_ngcontent-%COMP%]{cursor:pointer;padding-left:0}.hidden[_ngcontent-%COMP%]{display:none}@media screen and (min-width: 768px){.input-city[_ngcontent-%COMP%]{padding-left:1em}}"]})},7398:(qe,I,p)=>{"use strict";p.d(I,{u:()=>l});var o=p(88692),e=p(94650);const D=class{};let l=D;D.\u0275fac=function(T){return new(T||D)},D.\u0275mod=e.oAB({type:D}),D.\u0275inj=e.cJS({imports:[o.SiviCoreComponentModule,o.CheckboxToggleComponentModule,o.DirectivesModule,o.SiviFormsModule]})},11091:(qe,I,p)=>{"use strict";p.d(I,{g:()=>D});var o=p(31943),e=p(88692),l=p(94650);const g=class{};let D=g;g.\u0275fac=function(n){return new(n||g)},g.\u0275mod=l.oAB({type:g}),g.\u0275inj=l.cJS({providers:[o.u7],imports:[e.SiviCoreComponentModule,e.CommonSearchbarComponentModule,e.AutocompleteGroupSelectComponentModule,e.DirectivesModule,e.InfoPopupComponentModule]})},78903:(qe,I,p)=>{"use strict";p.d(I,{d:()=>T});var o=p(15861),e=p(88692),l=p(24956),D=p(54004),g=p(94650),E=p(31943);const n=class{constructor(w,B,Y){this.auth=w,this.organizationService=B,this.environmentService=Y,this.shouldShowFeatureOtherDecisions=!this.environmentService.isPreprodOrProdEnvironment()||this.environmentService.proConsona}getDefaultGuardianMenuOptions(){return[...this.getCommonMenuOptions(),{title:"SideMenu.Family",component:l.vD.HOME_GUARDIAN_TOPICS,icon:"home",visible:!0,order:1,id:l.vD.HOME_GUARDIAN_TOPICS},{title:"SideMenu.Help",component:l.vD.USER_INFO,icon:"info",visible:!0,order:10,id:l.vD.INFO}]}getDefaultProfessionalMenuOptions(){return[...this.getCommonMenuOptions(),{title:"SideMenu.Home",component:l.vD.HOME,icon:"home",visible:!0,order:1,id:l.vD.HOME},{title:"SideMenu.Organizations",component:l.vD.ORGANIZATIONS,icon:"business",visible:!0,order:2,id:"organizations",roles:e.Permissions.Menu.CAN_ACCESS_ORGANIZATIONS},{title:"SideMenu.Applications",component:l.vD.APPLICATIONS_MANAGEMENT,icon:"insert_drive_file",visible:!0,order:3,id:l.vD.APPLICATIONS_MANAGEMENT,roles:e.Permissions.Menu.CAN_ACCESS_APPLICATIONS},{title:"SideMenu.Attendance",component:"attendance",icon:"show_chart",visible:!0,order:4,id:"attendance",roles:e.Permissions.Menu.CAN_SEE_ATTENDANCE},{title:"SideMenu.Fees",component:"fee-handling",icon:"euro_symbol",visible:!0,order:5,id:"fee-handling",roles:e.Permissions.Menu.CAN_ACCESS_FEES},{title:"Invoicing.Menu.Title",component:l.vD.INVOICING,icon:"receipt_long",visible:!0,order:6,id:"invoicing",roles:e.Permissions.Menu.CAN_ACCESS_INVOICING},{title:"SideMenu.Persons",component:l.vD.GUARDIANS_AND_CHILDREN,icon:"people",visible:!0,order:7,id:l.vD.GUARDIANS_AND_CHILDREN,roles:e.Permissions.Menu.CAN_ACESSS_GUARDIANS_AND_CHILDREN},{title:"SideMenu.Reports",component:"reports",icon:"description",visible:!0,order:8,id:"reports",roles:e.Permissions.Menu.CAN_ACCESS_REPORTS},{title:"SideMenu.Decisions",component:"other-decisions",icon:"receipt_long",visible:this.shouldShowFeatureOtherDecisions,order:9,id:"other-decisions",roles:e.Permissions.Menu.CAN_ACCESS_OTHER_DECISIONS},{title:"SideMenu.Settings",component:l.vD.MUNICIPALITY_SETTINGS,icon:"settings",visible:!0,order:11,id:l.vD.MUNICIPALITY_SETTINGS,roles:e.Permissions.Menu.CAN_ACCESS_MUNICIPALITY_SETTINGS}]}generateChildrenOptionsForGuardian(){var w=this;return(0,o.Z)(function*(){const B={page:l.gT.PAGE_NUMBER_FIRST,count:l.gT.HIGH_API_RESPONSES};return yield w.organizationService.getChildrenForGuardian(B).pipe((0,D.U)(Y=>Y.content)).toPromise().then(Y=>Y.sort((V,ue)=>V.age-ue.age)).then(Y=>w.createChildrenMenuOptions(Y)).catch(Y=>console.log("getChildrenOptionsForGuardian failed",Y))})()}createChildrenMenuOptions(w){const B=[];return w.forEach(Y=>{B.push({title:`${Y.firstName} ${Y.lastName}`,component:l.vD.CHILD,icon:"child_care",visible:!0,id:Y.id,order:6,firstName:Y.firstName,municipalityId:Y.organizationId})}),B}getOrganizationPathIds(w){const B=w.split(" - "),Y={};return Y.municipalityId=B[0],Y.educationalOrganizationId=B[1],Y.educationGroupId=B[2]?B[2]:B[1],Y}filterEducationGroupByMunicipalityId(w=[],B){const Y=[...w];return Y.forEach(V=>{V.visible=V.component===l.vD.EDUCATION_GROUP}),Y}createMunicipalitiesMenuOptions(w){const B=[];return w.forEach(Y=>{B.push({title:Y.organizationName,component:l.vD.MUNICIPALITY,icon:"business",visible:!0,id:Y.organizationId,order:3,type:Y.organizationType})}),B}getCommonMenuOptions(){return[{title:"SideMenu.Profile",component:l.vD.USER_ACCOUNT,icon:"person",visible:!0,order:10,id:l.vD.ACCOUNT}]}};let T=n;n.\u0275fac=function(B){return new(B||n)(g.LFG(E.e8),g.LFG(e.OrganizationService),g.LFG(E.L$))},n.\u0275prov=g.Yz7({token:n,factory:n.\u0275fac})},73819:(qe,I,p)=>{"use strict";p.d(I,{h:()=>oe});var o=p(15861),e=p(83734),l=p(54603),D=p(12854),g=p(95698),E=p(18505),T=p(95577),n=p(61135),P=p(27988),w=p(74526),B=p(57965),Y=p(64183);const ue=(0,B.Z)(function(be){var le=(0,P.Z)(be,Y.Z);return le.length&&le[0]===be[0]?(0,w.Z)(le):[]});var he=p(22754),ae=p(20113),X=p(67118);const ye=(0,B.Z)(function(be,le){return(0,X.Z)(be)?(0,he.Z)(be,(0,ae.Z)(le,1,X.Z,!0)):[]});var ge=p(45840),ne=p(9116),pe=p(94650),Pe=p(31943),xe=p(88692),de=p(42250),re=p(78903);const me=class{constructor(le,Z,Oe,j,ke){this.auth=le,this.organizations=Z,this.attributesService=Oe,this.menuOptionBuilder=j,this.environmentService=ke,this.menuAttributes=[],this.municipalities=[],this.rootPage=e.v.HOME,this.menuItems=[],this.attributePreference=[{attributes:["MENU_PROFESSIONAL_ECEC_GROUPS","MENU_PROFESSIONAL_ORGANIZATIONS_ECEC"],preference:"MENU_PROFESSIONAL_ORGANIZATIONS_ECEC"}],this.emptyMenuCategories={GUARDIAN:[],PROFESSIONAL:[]}}initMenuAttributesAndCategories(){this.menuCategoriesSubject$=new n.X(this.emptyMenuCategories),this.menuCategories$=this.menuCategoriesSubject$.asObservable(),this.menuAttributesWithOptionsSubject$=new n.X({})}initMenuService(){this.auth.getUserPersonData().pipe((0,g.q)(1)).subscribe(le=>{this.user=le,this.generateMenu()})}generateMenu(){this.getMenuAttributes(),this.menuAttributesWithOptionsSubject$.subscribe(le=>{this.generateMenuCategoriesWithOptions(le,this.menuAttributes)})}getMenuAttributes(){this.attributesService.getMenuAttributes().pipe((0,g.q)(1),(0,E.b)(le=>{const Z=le.map(Oe=>Oe.name);this.menuAttributes=this.reorderMenuAttributes(Z,this.attributePreference)}),(0,T.z)(()=>this.menuAttributesWithOptionsSubject$.pipe((0,g.q)(1)))).subscribe(le=>{const Z=this.createBasicMenuAttributes(this.menuAttributes,le);this.constructMenuAttributesWithOptions(Z)})}createBasicMenuAttributes(le,Z){return le.forEach(Oe=>{Z[Oe]&&Z[Oe].length>0?Z[Oe][0].visible=!0:Z[Oe]=[]}),Z}reorderMenuAttributes(le,Z){let Oe=[...le];const j=[...Z];return j.forEach(ke=>{ue(Oe,ke.attributes).length===ke.attributes.length&&(Oe=ye(Oe,j[0].attributes),Oe.push(j[0].preference))}),Oe}constructMenuAttributesWithOptions(le){var Z=this;return(0,o.Z)(function*(){const Oe={...le};Oe.hasOwnProperty("MENU_GUARDIAN_CHILDREN")&&(Oe.MENU_GUARDIAN_CHILDREN=yield Z.menuOptionBuilder.generateChildrenOptionsForGuardian()),Z.menuAttributesWithOptionsSubject$.next(Oe)})()}generateMenuCategoriesWithOptions(le,Z){const Oe={PROFESSIONAL:(0,ge.Z)(this.menuOptionBuilder.getDefaultProfessionalMenuOptions()),GUARDIAN:(0,ge.Z)(this.menuOptionBuilder.getDefaultGuardianMenuOptions())};Z.forEach(j=>{const ke=le[j]?le[j]:[];Array.isArray(ke)&&(j&&j.includes(String(D.b.GUARDIAN))?Oe.GUARDIAN.push(...ke):Oe.PROFESSIONAL.push(...ke))}),Oe.GUARDIAN=(0,l.Z)(Oe.GUARDIAN,"order"),Oe.PROFESSIONAL=(0,l.Z)(Oe.PROFESSIONAL,"order"),this.menuCategoriesSubject$.next(Oe)}getMenuCategoriesWithOptions(){return this.menuCategories$}setDefaultMenuCategoriesWithOptions(){const le={PROFESSIONAL:(0,ge.Z)(this.menuOptionBuilder.getDefaultProfessionalMenuOptions()),GUARDIAN:(0,ge.Z)(this.menuOptionBuilder.getDefaultGuardianMenuOptions())};this.menuCategoriesSubject$.next(le)}refreshOrganizations(le){this.currentMunicipality=le,this.menuAttributesWithOptionsSubject$.pipe((0,g.q)(1)).subscribe(Z=>{Z.MENU_PROFESSIONAL_ORGANIZATIONS_ECEC=this.menuOptionBuilder.filterEducationGroupByMunicipalityId(Z.MENU_PROFESSIONAL_ORGANIZATIONS_ECEC,le),this.menuAttributesWithOptionsSubject$.next(Z)})}setRootPage(le){const Z=le.routerState.snapshot.url,j=le.parseUrl(Z).root.children[ne.eC],Be=(j&&j.segments||[]).map(nt=>nt.path);for(const nt of Be){const mt=this.menuItems.find(ut=>ut.id===nt);if(mt){this.rootPage=mt.id;break}}}getOrganizationPathIds(le,Z){const Oe=le.split(Z),j={};return j.municipalityId=Oe[0],j.educationalOrganizationId=Oe[1],j.educationGroupId=Oe[2]?Oe[2]:Oe[1],j}};let oe=me;me.\u0275fac=function(Z){return new(Z||me)(pe.LFG(Pe.e8),pe.LFG(xe.OrganizationService),pe.LFG(de.f),pe.LFG(re.d),pe.LFG(Pe.L$))},me.\u0275prov=pe.Yz7({token:me,factory:me.\u0275fac})},12854:(qe,I,p)=>{"use strict";p.d(I,{b:()=>o});const l=class{};let o=l;l.GUARDIAN="GUARDIAN",l.PROFESSIONAL="PROFESSIONAL"},10838:(qe,I,p)=>{"use strict";p.d(I,{B:()=>T});var o=p(39646),e=p(24956),l=p(94650),D=p(35027),g=p(15737),E=p(65324);const n=class{constructor(w,B,Y){this.applicationService=w,this.applicationsListingService=B,this.placementCommonService=Y}changeApplicationState(w,B,Y){const ue={[e.Qt.IN_HANDLING]:()=>this.moveToHandling(B,Y),[e.Qt.BACK_FROM_HANDLING]:()=>this.moveBackFromHandling(Y)}[w];return ue?ue():(0,o.of)(Y)}moveToHandling(w,B){const V={[e.Qt.IN_PRE_PLACEMENT]:()=>this.moveFromPrePlacementToHandling(B),[e.Qt.IN_PLACEMENT]:()=>this.moveFromPlacementToHandling(B),[e.Qt.SAVED]:()=>this.moveFromSavedToHandling(B),[e.Qt.BACK_FROM_HANDLING]:()=>this.moveFromBackFromHandlingToHandling(B)}[w];return V?V():(0,o.of)(B)}moveFromPrePlacementToHandling(w){return this.applicationsListingService.removeApplicationsFromPrePlacement(w)}moveFromPlacementToHandling(w){return this.placementCommonService.moveBackToHandling(w)}moveFromSavedToHandling(w){return this.applicationService.moveApplicationsToHandling(w)}moveFromBackFromHandlingToHandling(w){return this.applicationService.moveApplicationsToHandling(w)}moveBackFromHandling(w){return this.applicationService.moveApplicationsBackFromHandling(w)}};let T=n;n.\u0275fac=function(B){return new(B||n)(l.LFG(D.I),l.LFG(g.n),l.LFG(E.$))},n.\u0275prov=l.Yz7({token:n,factory:n.\u0275fac})},22678:(qe,I,p)=>{"use strict";p.d(I,{Q:()=>E});var o=p(35027),e=p(15737),l=p(65324),D=p(10838),g=p(94650);const T=class{};let E=T;T.\u0275fac=function(w){return new(w||T)},T.\u0275mod=g.oAB({type:T}),T.\u0275inj=g.cJS({providers:[o.I,e.n,l.$,D.B]})},9701:(qe,I,p)=>{"use strict";p.d(I,{L:()=>n});var o=p(94650),e=p(88692),l=p(70191),D=p(36895),g=p(89383);function E(w,B){if(1&w&&(o.TgZ(0,"ion-col",2)(1,"ion-avatar"),o._UZ(2,"img",6),o.qZA()()),2&w){const Y=o.oxw();o.xp6(2),o.s9C("src",Y.image,o.LSH)}}function T(w,B){if(1&w){const Y=o.EpF();o.TgZ(0,"ion-col",7)(1,"ion-button",8),o.NdJ("click",function(){o.CHM(Y);const ue=o.oxw();return o.KtG(ue.onDelete())}),o.ALo(2,"translate"),o.TgZ(3,"i",9),o.ALo(4,"translate"),o.TgZ(5,"span",10),o._uU(6,"close"),o.qZA()()()()}2&w&&(o.xp6(1),o.s9C("title",o.lcZ(2,2,"General.Buttons.Delete")),o.xp6(2),o.uIk("aria-label",o.lcZ(4,4,"General.Buttons.Delete")))}const P=class{constructor(){this.showTitle=!0,this.showDelete=!1,this.delete=new o.vpe}ngOnInit(){this.timeOrDate=e.Utils.convertDateToTimeOrDate(this.date)}onDelete(){this.delete.emit()}};let n=P;P.\u0275fac=function(Y){return new(Y||P)},P.\u0275cmp=o.Xpm({type:P,selectors:[["sivi-comment"]],inputs:{title:"title",content:"content",date:"date",image:"image",tagContent:"tagContent",showTitle:"showTitle",side:"side",showDelete:"showDelete"},outputs:{delete:"delete"},decls:12,vars:6,consts:[[3,"ngClass"],["size","auto",4,"ngIf"],["size","auto"],[1,"weight-bold"],["size","auto","class","delete-button-container",4,"ngIf"],["size","12",1,"content"],[3,"src"],["size","auto",1,"delete-button-container"],["fill","clear","shape","round","no-min-width","","size","small",1,"delete-button",3,"title","click"],[1,"material-icons"],["aria-hidden","true"]],template:function(Y,V){1&Y&&(o.TgZ(0,"div",0)(1,"ion-row"),o.YNc(2,E,3,1,"ion-col",1),o.TgZ(3,"ion-col")(4,"h4"),o._uU(5),o.qZA()(),o.TgZ(6,"ion-col",2)(7,"ion-note",3),o._uU(8),o.qZA()(),o.YNc(9,T,7,6,"ion-col",4),o.TgZ(10,"ion-col",5),o._uU(11),o.qZA()()()),2&Y&&(o.Q6J("ngClass",V.side?"comment "+V.side:"comment"),o.xp6(2),o.Q6J("ngIf",V.image),o.xp6(3),o.hij(" ",V.title," "),o.xp6(3),o.hij(" ",V.timeOrDate," "),o.xp6(1),o.Q6J("ngIf",V.showDelete),o.xp6(2),o.hij(" ",V.content," "))},dependencies:[l.BJ,l.YG,l.wI,l.uN,l.Nd,D.mk,D.O5,g.X$],styles:['[_nghost-%COMP%]{display:block;color:var(--ion-color-primary)}.comment[_ngcontent-%COMP%]{position:relative;background-color:var(--ion-color-light);padding:8px}.comment[_ngcontent-%COMP%]   .bold[_ngcontent-%COMP%]{font-weight:700}.comment[_ngcontent-%COMP%]   .content[_ngcontent-%COMP%]{white-space:pre-line;word-break:break-word}.comment.right[_ngcontent-%COMP%]:before, .comment.left[_ngcontent-%COMP%]:before{content:"";position:absolute;border:10px solid var(--ion-color-light);transform:rotate(45deg);top:20px}.comment.right[_ngcontent-%COMP%]:before{right:-10px}.comment.left[_ngcontent-%COMP%]:before{left:-10px}.comment[_ngcontent-%COMP%]   .delete-button-container[_ngcontent-%COMP%]{line-height:1}.comment[_ngcontent-%COMP%]   .delete-button[_ngcontent-%COMP%]{margin:0;height:18px;--padding-start: 0;--padding-end: 0}.comment[_ngcontent-%COMP%]   .delete-button[_ngcontent-%COMP%]   i[_ngcontent-%COMP%]{font-size:20px}']})},90678:(qe,I,p)=>{"use strict";p.d(I,{U:()=>g});var o=p(94650),e=p(70191),l=p(36895);function D(T,n){if(1&T){const P=o.EpF();o.TgZ(0,"ion-col",3)(1,"ion-button",9),o.NdJ("click",function(B){o.CHM(P);const Y=o.oxw();return o.KtG(Y.onAddAttachmentClicked(B))}),o._UZ(2,"cgi-icon",10),o.qZA()()}}const E=class{constructor(){this.value="",this.addAttachmentButton=!0,this.valueChange=new o.vpe,this.sendMessage=new o.vpe,this.deleteMessage=new o.vpe,this.addAttachment=new o.vpe}onValueChange(n){const P=n.target.value;this.value=P,this.valueChange.emit(P)}onSendClicked(){this.sendMessage.emit(this.value)}onDeleteClicked(n){this.deleteMessage.emit(n)}onAddAttachmentClicked(n){this.addAttachment.emit(n)}};let g=E;E.\u0275fac=function(P){return new(P||E)},E.\u0275cmp=o.Xpm({type:E,selectors:[["sivi-input-bubble"]],inputs:{value:"value",disableSend:"disableSend",disableDelete:"disableDelete",addAttachmentButton:"addAttachmentButton"},outputs:{valueChange:"valueChange",sendMessage:"sendMessage",deleteMessage:"deleteMessage",addAttachment:"addAttachment"},decls:15,vars:4,consts:[[1,"bubble-comment"],[1,"content"],["name","value",3,"value","siviInput"],["size","auto"],["name","delete","no-min-width","","color","secondary","fill","clear","size","small",1,"delete-button",3,"disabled","click"],["name","delete"],["size","auto",4,"ngIf"],["name","send","no-min-width","","color","secondary","fill","clear","size","small",3,"disabled","click"],["name","send"],["name","addAttachment","no-min-width","","color","secondary","fill","clear","size","small",3,"click"],["name","attach_file"]],template:function(P,w){1&P&&(o.TgZ(0,"div",0)(1,"ion-grid")(2,"ion-row")(3,"ion-col")(4,"div",1)(5,"cgi-textarea",2),o.NdJ("siviInput",function(Y){return w.onValueChange(Y)}),o.qZA()()()(),o.TgZ(6,"ion-row")(7,"ion-col",3)(8,"ion-button",4),o.NdJ("click",function(Y){return w.onDeleteClicked(Y)}),o._UZ(9,"cgi-icon",5),o.qZA()(),o._UZ(10,"ion-col"),o.YNc(11,D,3,0,"ion-col",6),o.TgZ(12,"ion-col",3)(13,"ion-button",7),o.NdJ("click",function(){return w.onSendClicked()}),o._UZ(14,"cgi-icon",8),o.qZA()()()()()),2&P&&(o.xp6(5),o.Q6J("value",w.value),o.xp6(3),o.Q6J("disabled",w.disableDelete||!w.value),o.xp6(3),o.Q6J("ngIf",w.addAttachmentButton),o.xp6(2),o.Q6J("disabled",w.disableSend))},dependencies:[e.YG,e.wI,e.jY,e.Nd,l.O5],styles:['[_nghost-%COMP%]{display:block;position:relative}[_nghost-%COMP%]:before{z-index:0;content:"";position:absolute;border:10px solid var(--ion-color-primary);transform:rotate(45deg);top:16px;right:-10px}.bubble-comment[_ngcontent-%COMP%]{z-index:1;border:1px solid var(--ion-color-medium);position:relative}.bubble-comment[_ngcontent-%COMP%]:before{z-index:0;content:"";position:absolute;border:10px solid;border-color:#fff;transform:rotate(45deg);top:15px;right:-10px}.bubble-comment[_ngcontent-%COMP%]   .content[_ngcontent-%COMP%]   .item-textarea[_ngcontent-%COMP%]{width:95%;margin-left:2.5%}']})},36355:(qe,I,p)=>{"use strict";p.d(I,{y:()=>P});var o=p(36895),e=p(70191),l=p(90678),D=p(9701),g=p(89383),E=p(88692),T=p(94650);l.U,D.L;const w=class{};let P=w;w.\u0275fac=function(V){return new(V||w)},w.\u0275mod=T.oAB({type:w}),w.\u0275inj=T.cJS({providers:[E.SiviModalController],imports:[e.Pc,o.ez,g.aw]})},6054:(qe,I,p)=>{"use strict";var o,e,l,D,g;p.d(I,{BQ:()=>l,Cs:()=>D,S3:()=>e,Zn:()=>o,jF:()=>g}),(o||(o={})).APPLICATION="APPLICATION",function(E){E.PUBLIC="PUBLIC",E.PRIVATE="PRIVATE"}(e||(e={})),function(E){E.SAVED="SAVED",E.DELETED="DELETED"}(l||(l={})),function(E){E.COMMENT="comments",E.NOTE="notes"}(D||(D={})),function(E){E.RECEIVED_APPLICATION="RECEIVED_APPLICATION",E.APPLICATION_MESSAGE="APPLICATION_MESSAGE"}(g||(g={}))},90503:(qe,I,p)=>{"use strict";p.d(I,{XG:()=>e,jM:()=>D,lz:()=>o,wy:()=>l});const g=class{};let o=g;g.REPLACE_DECISION="Decisions.View.Action.ReplaceDecision",g.CHANGE_DECISION="Decisions.View.Action.ChangeDecision",g.NULLIFY_DECISION="Decisions.View.Action.NullifyDecision",g.NEW_DECISION="Decisions.View.Action.NewDecision",g.END_PLACEMENT_AND_DECISION="Decisions.View.Action.EndPlacementAndDecision";const E=class{};let e=E;E.IMMEDIATE="immediate",E.DELAYED="delayed";const T=class{};let l=T;T.APPROVING="approving",T.DISAPPROVING="disapproving",T.REPLACING="replacing",T.ENDING="ending";const n=class{};let D=n;n.SUCCESS="MESSAGE_QUEUED"},88511:(qe,I,p)=>{"use strict";p.d(I,{Ci:()=>o.Ci,XG:()=>e.XG,jM:()=>e.jM,lQ:()=>o.lQ,lz:()=>e.lz,wy:()=>e.wy,zC:()=>o.zC});var o=p(60798),e=p(90503)},60798:(qe,I,p)=>{"use strict";p.d(I,{Ci:()=>e,lQ:()=>D,zC:()=>l});var o=p(24956);const g=class{};let e=g;g.TO_PLACED="to-placed",g.TO_BE_PLACED="to-be-placed",g.TO_BE_PRE_PLACED="to-be-pre-placed",g.TO_LISTING="to-listing",g.TO_PRE_PLACEMENT="to-pre-placement",g.TO_PLACEMENT="to-placement",g.MAKE_DECISION="make-decision",g.EDIT_PLACEMENT="edit-placement",g.REPLACE_DECISION="replace-decision",g.END_PLACEMENT_AND_DECISION="end-placement-and-decision",g.NEW_PLACEMENT_AND_DECISION="new-placement-and-decision",g.NEW_PLACEMENT_TO_DIFFERENT_UNIT="new-placement-in-different-group",g.MOVE_TO_ANOTHER_GROUP="move-to-another-group",g.DELETE_PLACEMENT_AND_CANCEL_DECISION="delete-placement-and-cancel-decision",g.DECLINE_PLACE="decline-place",g.NO_ADDITIONAL_NEED="no-additional-need",g.RECEIVE_PLACE="remove-voucher-pending",g.DYNAMIC_ORGANIZATIONS="dynamic-organizations";const E=class{};let l=E;E.IN_GROUP="IN_GROUP",E.TO_BE_IN_GROUP="TO_BE_IN_GROUP",E.ENDED="ENDED";const D={[o.wW.PPE]:[o.wW.PPE],[o.wW.ECEC]:[o.wW.ECEC,o.wW.C_ECEC],[o.wW.CLUB]:[o.wW.CLUB],[o.wW.V_ECEC]:[o.wW.V_ECEC,o.wW.VC_ECEC],[o.wW.C_ECEC]:[o.wW.ECEC,o.wW.C_ECEC],[o.wW.VC_ECEC]:[o.wW.V_ECEC,o.wW.VC_ECEC]}},47970:(qe,I,p)=>{"use strict";p.d(I,{R:()=>Nt});var o=p(15861),e=p(95017),l=p(94650),D=p(30671),g=p(88511),E=p(49594),T=p(78033),n=p(5698),P=p(45840),w=p(15439),B=p.n(w),Y=p(39646),V=p(77579),ue=p(39841),he=p(4128),ae=p(32076),X=p(95698),ve=p(39300),ye=p(82722),ge=p(63900),ne=p(54004),pe=p(18505),Pe=p(34782),xe=p(95577),de=p(70207),re=p(68675),oe=p(88692),me=p(92053),be=p(37847),le=p(89383),Z=p(9116),Oe=p(65324),j=p(21940),ke=p(48768),Be=p(44438),nt=p(70191),mt=p(36895),ut=p(56709),Ve=p(97392);function tt(hn,Le){1&hn&&(l.TgZ(0,"th",22),l._uU(1),l.ALo(2,"translate"),l.qZA()),2&hn&&(l.xp6(1),l.hij(" ",l.lcZ(2,1,"Form.Label.Name")," "))}function Ne(hn,Le){if(1&hn&&(l.TgZ(0,"td",23),l._uU(1),l.qZA()),2&hn){const ce=Le.$implicit;l.xp6(1),l.hij(" ",ce.childDisplayName," ")}}function wt(hn,Le){if(1&hn){const ce=l.EpF();l.TgZ(0,"th",22)(1,"mat-checkbox",24),l.NdJ("change",function(Qe){l.CHM(ce);const qt=l.oxw();return l.KtG(Qe?qt.masterToggle():null)}),l.qZA()()}if(2&hn){const ce=l.oxw();l.xp6(1),l.Q6J("checked",ce.isAllSelected())("indeterminate",ce.selection.hasValue()&&!ce.isAllSelected())}}function ft(hn,Le){if(1&hn){const ce=l.EpF();l.TgZ(0,"td",23)(1,"mat-checkbox",25),l.NdJ("click",function(Qe){return Qe.stopPropagation()})("change",function(Qe){const Tn=l.CHM(ce).$implicit,lr=l.oxw();return l.KtG(Qe?lr.onSelectDecision(Tn):null)}),l.qZA()()}if(2&hn){const ce=Le.$implicit,we=l.oxw();l.xp6(1),l.Q6J("disabled",we.isSelectionDisabled(ce))("checked",we.selection.isSelected(we.getDecisionId(ce)))}}function Ct(hn,Le){1&hn&&(l.TgZ(0,"th",22),l._uU(1),l.ALo(2,"translate"),l.qZA()),2&hn&&(l.xp6(1),l.Oqu(l.lcZ(2,1,"Organization.Educational.Singular")))}const rn=function(hn){return{"edit-mode":hn}};function He(hn,Le){if(1&hn){const ce=l.EpF();l.ynx(0),l.TgZ(1,"sivi-lib-select",28),l.NdJ("siviChange",function(Qe){l.CHM(ce);const qt=l.oxw().$implicit,Tn=l.oxw();return l.KtG(Tn.onUpdatePrivateUnit(Qe,qt.placementId))}),l.ALo(2,"async"),l.qZA(),l.BQk()}if(2&hn){const ce=l.oxw().$implicit,we=l.oxw();l.xp6(1),l.Q6J("value",ce.unitId)("ngClass",l.VKq(5,rn,we.decisionState.replacing))("options",l.lcZ(2,3,we.privateUnitsOptions$))}}function st(hn,Le){if(1&hn&&l._uU(0),2&hn){const ce=l.oxw().$implicit,we=l.oxw();l.hij(" ",we.getUnitName(ce)," ")}}function nn(hn,Le){if(1&hn&&(l.TgZ(0,"td",23),l.YNc(1,He,3,7,"ng-container",26),l.YNc(2,st,1,1,"ng-template",null,27,l.W1O),l.qZA()),2&hn){const ce=Le.$implicit,we=l.MAs(3),Qe=l.oxw();l.xp6(1),l.Q6J("ngIf",Qe.canEditRow(ce)&&Qe.canChangeUnit(ce))("ngIfElse",we)}}function Dn(hn,Le){1&hn&&(l.TgZ(0,"th",22),l._uU(1),l.ALo(2,"translate"),l.qZA()),2&hn&&(l.xp6(1),l.hij(" ",l.lcZ(2,1,"Form.Label.FocusAtTheStart")," "))}function Mn(hn,Le){if(1&hn){const ce=l.EpF();l.ynx(0),l.TgZ(1,"sivi-lib-select",31),l.NdJ("siviChange",function(Qe){l.CHM(ce);const qt=l.oxw(2).$implicit,Tn=l.oxw();return l.KtG(Tn.onUpdateFocus(Qe,qt.placementId))}),l.ALo(2,"translate"),l.qZA(),l.BQk()}if(2&hn){const ce=l.oxw(2).$implicit,we=l.oxw();l.xp6(1),l.Q6J("name",we.rowUniqueKey("focus",ce.placementId))("value",we.getFocusValue(ce))("placeholder",l.lcZ(2,5,"ECEC.Payment.Extent.Option.Plural"))("options",null==we.focusOptions[ce.placementId]?null:we.focusOptions[ce.placementId].selectOptions)("viewMode",!we.canEditRow(ce))}}function vi(hn,Le){if(1&hn&&(l.ynx(0),l.YNc(1,Mn,3,7,"ng-container",30),l.BQk()),2&hn){const ce=l.oxw(2);l.xp6(1),l.Q6J("ngIf",ce.focusOptions)}}function Gi(hn,Le){if(1&hn&&l._uU(0),2&hn){const ce=l.oxw().$implicit,we=l.oxw();l.hij(" ",we.getFocusLabel(ce)," ")}}function mi(hn,Le){if(1&hn&&(l.TgZ(0,"td",23),l.YNc(1,vi,2,1,"ng-container",26),l.YNc(2,Gi,1,1,"ng-template",null,29,l.W1O),l.qZA()),2&hn){const ce=l.MAs(3),we=l.oxw();l.xp6(1),l.Q6J("ngIf",we.decisionState.replacing)("ngIfElse",ce)}}function wi(hn,Le){1&hn&&(l.TgZ(0,"th",22),l._uU(1),l.ALo(2,"translate"),l.qZA()),2&hn&&(l.xp6(1),l.hij(" ",l.lcZ(2,1,"General.Type.Singular")," "))}function Bn(hn,Le){if(1&hn&&(l.TgZ(0,"td",23),l._uU(1),l.ALo(2,"translate"),l.qZA()),2&hn){const ce=Le.$implicit;l.xp6(1),l.hij(" ",l.lcZ(2,1,ce.typeLong)," ")}}function kn(hn,Le){1&hn&&(l.TgZ(0,"th",22)(1,"span",32),l._uU(2),l.ALo(3,"translate"),l.qZA()()),2&hn&&(l.xp6(2),l.hij(" ",l.lcZ(3,1,"Form.label.StartDate")," "))}function On(hn,Le){if(1&hn){const ce=l.EpF();l.TgZ(0,"td",23)(1,"div",33)(2,"sivi-lib-datepicker",34),l.NdJ("update",function(Qe){const Tn=l.CHM(ce).$implicit,lr=l.oxw();return l.KtG(lr.onChangeDates(Qe,Tn.placementId,"startDate"))}),l.qZA()()()}if(2&hn){const ce=Le.$implicit,we=l.oxw();l.xp6(2),l.Q6J("name",we.rowUniqueKey("startDate",ce.placementId))("minDate",we.getMinStartDate(ce))("value",ce.startDate)("readonly",!we.canEditRow(ce)||we.isStartDateReadonly())("noLabel",!0),l.uIk("name",we.rowUniqueKey("startDate",ce.placementId))}}function je(hn,Le){if(1&hn&&(l.TgZ(0,"th",22)(1,"span"),l._uU(2),l.ALo(3,"translate"),l.qZA()()),2&hn){const ce=l.oxw();l.xp6(1),l.ekj("required-column",ce.decisionState.ending||ce.hasClubPlacement),l.xp6(1),l.Oqu(l.lcZ(3,3,"Form.label.EndDate"))}}function Bt(hn,Le){if(1&hn){const ce=l.EpF();l.TgZ(0,"td",23)(1,"sivi-lib-datepicker",35),l.NdJ("update",function(Qe){const Tn=l.CHM(ce).$implicit,lr=l.oxw();return l.KtG(lr.onChangeDates(Qe,Tn.placementId,"endDate"))}),l.qZA()()}if(2&hn){const ce=Le.$implicit,we=l.oxw();l.xp6(1),l.Q6J("name",we.rowUniqueKey("endDate",ce.placementId))("minDate",ce.startDate)("maxDate",we.getMaxEndDate(ce))("value",ce.endDate)("readonly",!we.canEditRow(ce)||we.isEndDateReadonly(ce))("noLabel",!0),l.uIk("name",we.rowUniqueKey("endDate",ce.placementId))}}function xn(hn,Le){1&hn&&(l.TgZ(0,"th",22)(1,"span",32),l._uU(2),l.ALo(3,"translate"),l.qZA()()),2&hn&&(l.xp6(2),l.Oqu(l.lcZ(3,1,"Decision.Rejection.Reason")))}function Fn(hn,Le){if(1&hn){const ce=l.EpF();l.ynx(0),l.TgZ(1,"sivi-lib-select",37),l.NdJ("siviChange",function(Qe){l.CHM(ce);const qt=l.oxw().$implicit,Tn=l.oxw();return l.KtG(Tn.onUpdateReason(Qe,qt.placementId))}),l.ALo(2,"async"),l.ALo(3,"translate"),l.qZA(),l.BQk()}if(2&hn){const ce=l.oxw().$implicit,we=l.oxw();l.xp6(1),l.Q6J("value",ce.disapprovalReason)("options",l.lcZ(2,4,we.getDisapprovalReasonsOptions(ce.decisionType)))("viewMode",!we.canEditRow(ce))("placeholder",l.lcZ(3,6,"Decision.Rejection.Reason"))}}function ui(hn,Le){if(1&hn&&(l._uU(0),l.ALo(1,"translate")),2&hn){const ce=l.oxw().$implicit;l.hij(" ",l.lcZ(1,1,"Decision.Disapprove.Not.Needed.For."+ce.applicationType)," ")}}function Ai(hn,Le){if(1&hn&&(l.TgZ(0,"td",23),l.YNc(1,Fn,4,8,"ng-container",26),l.YNc(2,ui,2,3,"ng-template",null,36,l.W1O),l.qZA()),2&hn){const ce=Le.$implicit,we=l.MAs(3),Qe=l.oxw();l.xp6(1),l.Q6J("ngIf",Qe.decisionState.disapproving&&Qe.supportDisapproval(ce))("ngIfElse",we)}}function si(hn,Le){1&hn&&(l.TgZ(0,"th",22)(1,"span",32),l._uU(2),l.ALo(3,"translate"),l.qZA()()),2&hn&&(l.xp6(2),l.hij(" ",l.lcZ(3,1,"Form.Label.DecisionText")," "))}function Vi(hn,Le){if(1&hn){const ce=l.EpF();l.ynx(0),l.TgZ(1,"sivi-lib-select",38),l.NdJ("siviChange",function(Qe){l.CHM(ce);const qt=l.oxw(2).$implicit,Tn=l.oxw();return l.KtG(Tn.onUpdateTemplate(Qe,qt.placementId))}),l.qZA(),l.BQk()}if(2&hn){const ce=Le.ngIf,we=l.oxw(2).$implicit,Qe=l.oxw();l.xp6(1),l.Q6J("name",Qe.rowUniqueKey("messageTemplate",we.placementId))("options",ce[we.decisionType])("ngClass",l.VKq(5,rn,Qe.decisionState.replacing||Qe.decisionState.approving))("value",we.messageTemplateId)("viewMode",!Qe.canEditRow(we))}}function Vn(hn,Le){if(1&hn&&(l.ynx(0),l.YNc(1,Vi,2,7,"ng-container",30),l.ALo(2,"async"),l.BQk()),2&hn){const ce=l.oxw(2);l.xp6(1),l.Q6J("ngIf",l.lcZ(2,1,ce.templateOptions$))}}function Hn(hn,Le){if(1&hn&&(l.TgZ(0,"td",23),l.YNc(1,Vn,3,3,"ng-container",30),l.qZA()),2&hn){const ce=l.oxw();l.xp6(1),l.Q6J("ngIf",ce.decisionState.approving||ce.decisionState.replacing)}}function An(hn,Le){1&hn&&(l.TgZ(0,"th",22)(1,"span",32),l._uU(2),l.ALo(3,"translate"),l.qZA()()),2&hn&&(l.xp6(2),l.Oqu(l.lcZ(3,1,"Application.View.Filters.Headers.Extent")))}function vn(hn,Le){if(1&hn){const ce=l.EpF();l.ynx(0),l.TgZ(1,"sivi-lib-select",39),l.NdJ("siviChange",function(Qe){l.CHM(ce);const qt=l.oxw().$implicit,Tn=l.oxw();return l.KtG(Tn.onUpdateExtent(Qe,qt.placementId))}),l.ALo(2,"translate"),l.qZA(),l.BQk()}if(2&hn){const ce=Le.ngIf,we=l.oxw().$implicit,Qe=l.oxw();l.xp6(1),l.Q6J("name",Qe.rowUniqueKey("extentId",we.placementId))("value",Qe.getPaymentExtentValue(we))("ngClass",l.VKq(9,rn,Qe.decisionState.replacing||we.extentEditMode))("viewMode",Qe.isExtentSelectDisabled(we))("options",ce[we.placementId])("placeholder",l.lcZ(2,7,"ECEC.Payment.Extent.Option.Plural")),l.uIk("name",Qe.rowUniqueKey("extentId",we.placementId))}}function In(hn,Le){if(1&hn&&(l.TgZ(0,"td",23),l.YNc(1,vn,3,11,"ng-container",30),l.ALo(2,"async"),l.qZA()),2&hn){const ce=Le.$implicit,we=l.oxw();l.xp6(1),l.Q6J("ngIf",ce.ececType&&l.lcZ(2,1,we.placementExtentOptions$))}}function Zi(hn,Le){1&hn&&(l.TgZ(0,"th",22),l._uU(1),l.ALo(2,"translate"),l.qZA()),2&hn&&(l.xp6(1),l.hij(" ",l.lcZ(2,1,"ECEC.Application.Title.EcecUsage")," "))}function gr(hn,Le){if(1&hn){const ce=l.EpF();l.TgZ(0,"sivi-lib-select",41),l.NdJ("siviChange",function(Qe){l.CHM(ce);const qt=l.oxw().$implicit,Tn=l.oxw();return l.KtG(Tn.onUpdateEcecUsage(Qe,qt.placementId))}),l.qZA()}if(2&hn){const ce=l.oxw().$implicit,we=l.oxw();l.Q6J("name",we.rowUniqueKey("ececUsage",ce.placementId))("value",we.getEcecUsage(ce))("options",we.ececUsageOptions)("viewMode",we.isNewDecision||!we.canEditRow(ce))("ngClass",l.VKq(5,rn,!we.isNewDecision))}}function Hi(hn,Le){if(1&hn&&(l.TgZ(0,"td",23),l.YNc(1,gr,1,7,"sivi-lib-select",40),l.qZA()),2&hn){const ce=Le.$implicit;l.xp6(1),l.Q6J("ngIf",ce.ececType)}}function Gr(hn,Le){1&hn&&(l.TgZ(0,"th",22),l._uU(1),l.ALo(2,"translate"),l.qZA()),2&hn&&(l.xp6(1),l.hij(" ",l.lcZ(2,1,"ECEC.WeeklyTimeOptions.Table.TurnCare")," "))}function zr(hn,Le){if(1&hn&&(l.ynx(0),l._uU(1),l.ALo(2,"translate"),l.BQk()),2&hn){const ce=l.oxw().$implicit;l.xp6(1),l.hij(" ",l.lcZ(2,1,ce.turnCare?"General.Yes":"General.No")," ")}}function Eo(hn,Le){if(1&hn){const ce=l.EpF();l.ynx(0),l.TgZ(1,"ion-checkbox",42),l.NdJ("ionChange",function(Qe){l.CHM(ce);const qt=l.oxw().$implicit,Tn=l.oxw();return l.KtG(Tn.onUpdateTurnCare(Qe,qt.placementId))}),l.qZA(),l.BQk()}if(2&hn){const ce=l.oxw().$implicit,we=l.oxw();l.xp6(1),l.Q6J("value",ce.turnCare)("checked",ce.turnCare)("disabled",!we.canEditRow(ce))}}function mr(hn,Le){if(1&hn&&(l.TgZ(0,"td",23),l.YNc(1,zr,3,3,"ng-container",30),l.YNc(2,Eo,2,3,"ng-container",30),l.qZA()),2&hn){const ce=Le.$implicit,we=l.oxw();l.xp6(1),l.Q6J("ngIf",!we.decisionState.replacing),l.xp6(1),l.Q6J("ngIf",we.decisionState.replacing&&ce.ececType)}}function jn(hn,Le){1&hn&&(l.TgZ(0,"th",22),l._uU(1),l.ALo(2,"translate"),l.qZA()),2&hn&&(l.xp6(1),l.hij(" ",l.lcZ(2,1,"Form.Label.Preview")," "))}const ct=function(hn){return{"radio-checked":hn}};function Yt(hn,Le){if(1&hn){const ce=l.EpF();l.TgZ(0,"ion-radio",44),l.NdJ("click",function(){l.CHM(ce);const Qe=l.oxw().$implicit,qt=l.oxw();return l.KtG(qt.onSelectDecisionForPreview(Qe))}),l.qZA()}if(2&hn){const ce=l.oxw().$implicit,we=l.oxw();l.Q6J("ngClass",l.VKq(3,ct,ce.placementId===we.previewedDecisionId))("disabled",!we.canEditRow(ce)),l.uIk("aria-checked",ce.placementId===we.previewedDecisionId)}}function oi(hn,Le){if(1&hn&&(l.TgZ(0,"td",23),l.YNc(1,Yt,1,5,"ion-radio",43),l.qZA()),2&hn){const ce=l.oxw();l.xp6(1),l.Q6J("ngIf",ce.decisions.length>1)}}function Ni(hn,Le){1&hn&&l._UZ(0,"th",22)}function Nn(hn,Le){1&hn&&(l.TgZ(0,"mat-icon",46),l._uU(1," warning "),l.qZA())}function pr(hn,Le){if(1&hn&&(l.TgZ(0,"td",23),l.YNc(1,Nn,2,0,"mat-icon",45),l.qZA()),2&hn){const ce=Le.$implicit;l.xp6(1),l.Q6J("ngIf",ce.decisionFailed)}}function Sn(hn,Le){1&hn&&l._UZ(0,"tr",47)}function Pn(hn,Le){1&hn&&l._UZ(0,"tr",48)}const ai=class extends be.w{set decisions(Le){this.dataSource.data=Le}get decisions(){return this.dataSource.data}get isApprovingOrDisapproving(){return this.decisionState.approving||this.decisionState.disapproving}get isReplacingOrEnding(){return this.decisionState.replacing||this.decisionState.ending}get isReplacingOrApproving(){return this.decisionState.replacing||this.decisionState.approving}get isValid(){const Le=this.decisions.every(we=>we.messageTemplateId),ce=!this.isReplacingOrApproving||Le;return this._isValid&&ce}constructor(Le,ce,we,Qe,qt,Tn,lr,mo,rr){super(Le,ce,we,rr,qt),this.translate=Le,this.router=ce,this.notify=we,this.cdr=Qe,this.placementCommonService=qt,this.applicationsDecisionService=Tn,this.applicationsPlacementService=lr,this.ececExtentOptionsService=mo,this.messageTemplateRestService=rr,this.decisionTaken=g.wy.APPROVING,this.selectedDecisions=[],this.hasRightToChangeUnit=!1,this.isNewDecision=!1,this.update=new l.vpe,this.updateOriginalData=new l.vpe,this.componentStatus=new l.vpe,this.selectForPreview=new l.vpe,this.selectDecisions=new l.vpe,this.deselectDecisions=new l.vpe,this.validityChange=new l.vpe,this.selectTemplateForPreview=new l.vpe,this.dataSource=new D.by,this.selection=new e.Ov(!0,[]),this.displayedColumns=[],this.extentSelectOptions=[],this.placementExtentOptions$=(0,Y.of)({}),this.lodashGet=E.Z,this.updateFocusList$=new V.x,this.applicationTypes=oe.ApplicationTypes,this.today=B()().format("YYYY-MM-DD"),this.PRIVATE_UNIT=oe.OrganizationTypes.ORGANIZATION_FORMAT_PRIVATE}ngOnInit(){this.privateUnitsOptions$=this.getPrivateUnitsOptions(),this.templateOptions$=this.handleFetchTemplateOptions(this.decisions[0].municipalityId),this.hasECECPlacement=this.decisions.some(Le=>Le.ececType),this.hasPPEWithECECPlacement=this.decisions.some(Le=>this.getExtentOptionType(Le.placementType)===oe.ApplicationTypes.PPEWITHECEC),this.hasClubPlacement=this.decisions.some(Le=>Le.placementType===oe.ApplicationTypes.CLUB),this.decisionState=this.getDecisionState(),this.displayedColumns=this.getDisplayedColumns(),this.disapprovalReasonsOptions$=this.getDisapprovalReasons(),this.placementExtentOptions$=this.getPlacementsExtentOptions(),this.placementExtentOptions$.pipe((0,X.q)(1),(0,ve.h)(()=>this.decisionTaken===g.wy.APPROVING)).subscribe(Le=>this.updateExtentEditable(Le)),this.setSelectedDecisions(),this.initFocuses(),this.ececUsageOptions=this.placementCommonService.getEcecUsageOptions(),this.validatorOptions=this.getValidatorOptions()}initFocuses(){this.decisionState.replacing&&(this.getFocusOptionsForPlacements(this.decisions),this.listenForFocusListUpdate())}trackByFnIndex(Le){return Le}getExtentOptionType(Le){const ce=[oe.EditPlacementTypes.ECEC,oe.EditPlacementTypes.ECEC_VOUCHER],we=[oe.EditPlacementTypes.ECEC_COMPLEMENTING,oe.EditPlacementTypes.ECEC_COMPLEMENTING_VOUCHER];return ce.includes(Le)?oe.ApplicationTypes.ECEC:we.includes(Le)?oe.ApplicationTypes.PPEWITHECEC:Le}getEcecUsage(Le){return Le.daily}markFieldsAsTouched(){var Le=this;return(0,o.Z)(function*(){yield Le.markAllFieldsTouched(Le.validatorOptions)})()}onValidatorStatusChange(Le){super.onValidatorStatusChange(Le),this.validityChange.emit(this.isValid)}getDisplayedColumns(){const Le=this.isExtentTurnCareColumnsVisible();return["select","fullName","unit",...this.isFocusColumnVisible()?["focus"]:[],"type","startDate","endDate",...this.decisionState.disapproving?["disapprovalReason"]:[],...this.isReplacingOrApproving?["messageTemplate"]:[],...Le?["extent"]:[],...this.isEcecUsageColumnVisible()?["ececUsage"]:[],...Le?["turnCare"]:[],...this.isPreviewColumnVisible()?["preview"]:[],"decisionFailed"]}isDecisionStateIsReplacingOrApproving(){return this.decisionState.replacing||this.decisionState.approving}isEcecUsageColumnVisible(){return this.hasECECPlacement&&(this.decisionState.approving||this.decisionState.replacing)}isFocusColumnVisible(){return this.decisionState.approving||this.decisionState.replacing}isExtentTurnCareColumnsVisible(){return this.hasECECPlacement&&(this.decisionState.approving||this.decisionState.replacing||this.decisionState.ending)}isPreviewColumnVisible(){return this.decisions.length>1&&(this.decisionState.approving||this.decisionState.replacing)}isExtentSelectDisabled(Le){return!this.canEditRow(Le)||this.isNewDecision||!this.decisionState.replacing&&!Le.extentEditMode}onSelectDecisionForPreview(Le){const{placementId:ce,messageTemplateId:we}=Le;this.selectForPreview.emit(ce),this.templateForPreview(we)}onUpdatePrivateUnit(Le,ce){const we=Le.unitId;if(!this.privateUnits||!this.privateUnits.find(Tn=>Tn.id===we))return;const qt={placementId:ce,privateUnitId:we};this.triggerUpdateFocusList(qt),this.update.emit(qt)}onUpdateTurnCare(Le,ce){const we={placementId:ce,turnCare:Le.detail.checked};this.update.emit(we)}onChangeDates(Le,ce,we){const Qe={placementId:ce,[we]:Le.value};this.triggerUpdateFocusList(Qe),this.update.emit(Qe)}triggerUpdateFocusList(Le){const ce=this.decisions.find(we=>we.placementId===Le.placementId);ce&&this.updateFocusList$.next({...ce,...Le})}updateDateValidators(Le){var ce=this;return(0,o.Z)(function*(){const we=yield ce.getControl("startDate-"+Le),Qe=yield ce.getControl("endDate-"+Le);we&&Qe&&(we.updateValueAndValidity(),Qe.updateValueAndValidity())})()}onUpdateExtent(Le,ce){var we=this;return(0,o.Z)(function*(){try{const[Qe,qt]=we.getUniqueValue(Le,"extentId",ce).split("_"),Tn="fullTime"===qt,lr=yield we.placementExtentOptions$.pipe((0,X.q)(1)).toPromise(),mo=[Qe,qt].join("_"),rr=we.getExtent(ce,mo,lr);we.update.emit({placementId:ce,extentId:Qe,extent:rr,fullTime:Tn})}catch(Qe){console.error("onUpdateExtent failed:",Qe)}})()}listenForFocusListUpdate(){this.updateFocusList$.pipe((0,ye.R)(this.destroy$),(0,ge.w)(Le=>{const ce=Le.privateUnitId||Le.unitId;return this.placementCommonService.getFocusOptionsForPlacement(Le,ce)})).subscribe(Le=>this.updateFocusOptions(Le))}updateFocusOptions(Le){const{selectOptions:ce,placementId:we}=Le;we&&(this.focusOptions[Le.placementId]=Le,this.updateCurrentFocus(ce,we))}updateCurrentFocus(Le,ce){const we=this.decisions.find(rr=>rr.placementId===ce);if(!we)return;const{activity:Qe,language:qt,languageExtent:Tn}=we;if(!Qe&&!qt&&!Tn)return;const lr=`${Qe}#${qt}#${Tn}`;if(!Le.find(rr=>rr.value===lr)){const rr={placementId:ce,activity:void 0,language:void 0,languageExtent:void 0};this.update.emit(rr)}}getFocusOptionsForPlacements(Le){const ce=(0,T.Z)(Le).unitId;this.placementCommonService.getFocusOptionsOnPlacementStartDate(Le,ce).pipe((0,X.q)(1)).subscribe(we=>{this.focusOptions={...we},this.cdr.detectChanges()})}getFocusLabel(Le){const ce={activity:Le.activity,language:Le.language,languageExtent:Le.languageExtent};return this.placementCommonService.getFocusText(ce)}getFocusValue(Le){return this.placementCommonService.getFocusValue(Le,this.focusOptions)}onUpdateFocus(Le,ce){const we=this.getUniqueValue(Le,"focus",ce),[Qe,qt,Tn]=we.split("#"),lr={placementId:ce,activity:"undefined"===Qe?void 0:Qe,language:"undefined"===qt?void 0:qt,languageExtent:"undefined"===Tn?void 0:Tn};this.update.emit(lr)}onUpdateEcecUsage(Le,ce){var we=this;return(0,o.Z)(function*(){const Qe=we.getUniqueValue(Le,"ececUsage",ce);void 0!==Qe&&we.update.emit({placementId:ce,daily:Qe})})()}onUpdateReason(Le,ce){const we={placementId:ce,disapprovalReason:Le.disapprovalReason};this.update.emit(we)}onUpdateTemplate(Le,ce){const Qe={placementId:ce,messageTemplateId:this.getUniqueValue(Le,"messageTemplate",ce)};this.update.emit(Qe),this.validatorOptions=this.getValidatorOptions(),this.templateForPreview(Qe.messageTemplateId)}templateForPreview(Le){for(const ce of this.templates){const we=ce.find(Qe=>Qe.id===Le);if(we){this.selectTemplateForPreview.emit(we);break}}}getPaymentExtentValue(Le){if(void 0===Le.fullTime)return"";const ce=Le.fullTime?"_fullTime":"_partTime",we=Le.extentId+ce;return this.extentSelectOptions&&this.extentSelectOptions.find(Qe=>Qe.value===we)?we:null}updateExtentEditable(Le){for(const ce of this.decisions){if(!Le[ce.placementId].length)continue;const we=this.checkIfExtentIsValid(ce.extentId,ce.fullTime,Le[ce.placementId]);we||this.update.emit({placementId:ce.placementId,extentId:!we&&ce.extentId?"":ce.extentId,extentEditMode:!we})}}checkIfExtentIsValid(Le,ce,we){const qt=`${Le}${ce?"_fullTime":"_partTime"}`;return!!we.find(lr=>lr.value===qt)}supportDisapproval(Le){return!Le.isPPEWITHECEC||Le.isPPEWITHECEC&&Le.decisionType===oe.ApplicationTypes.PPE}findAndExtendPlacementExtentOptions(Le,ce){const we=this.getExtentOptionType(Le.placementType);if(!ce||!ce[we])return[];const Qe=this.getMunicipalityExtentOption(Le.startDate,ce[we]);let qt=[];return Qe&&(qt=this.placementCommonService.getPlacementExtentSelectOptions(Qe.paymentExtentValues,Le.placementType),this.extentSelectOptions.push(...qt)),qt}getRelatedPPEDecision(Le){return this.decisions&&this.decisions.find(ce=>ce.applicationId===Le&&ce.decisionType===oe.ApplicationTypes.PPE)}getMinStartDate(Le){const{applicationId:ce,placementType:we}=Le,Qe=this.getRelatedPPEDecision(ce),qt=this.placementCommonService.isComplementingOrVoucherComplementing(we);return Qe&&qt?Qe.startDate:null}getMaxEndDate(Le){const{applicationId:ce,placementType:we}=Le,Qe=this.getRelatedPPEDecision(ce),qt=this.placementCommonService.isComplementingOrVoucherComplementing(we);return Qe&&qt?Qe.endDate:null}getPlacementsExtentOptions(){return this.getDecisionsExtentOptions().pipe((0,ne.U)(Le=>this.decisions.reduce((ce,we)=>{const Qe=this.findAndExtendPlacementExtentOptions(we,Le);return{...ce,[we.placementId]:Qe}},{})),(0,pe.b)(Le=>this.decisions.forEach(ce=>{const we=this.getPaymentExtentValue(ce),Qe=this.getExtent(ce.placementId,we,Le);Qe&&this.update.emit({placementId:ce.placementId,extent:Qe})})))}getMunicipalityExtentOption(Le,ce){return ce.find(Qe=>oe.Utils.dateIsBetween(Le,Qe.fromDate,Qe.validUntil))||ce.find(Qe=>!Qe.validUntil)}getDecisionsExtentOptions(){const Le=[...this.hasECECPlacement?[this.getExtentOptions(oe.ApplicationTypes.ECEC)]:[(0,Y.of)([])],...this.hasPPEWithECECPlacement?[this.getExtentOptions(oe.ApplicationTypes.PPEWITHECEC)]:[(0,Y.of)([])]];return(0,ue.a)(Le).pipe((0,ne.U)(([ce,we])=>({ECEC:ce,PPEWITHECEC:we})),(0,Pe.d)())}getDecisionId(Le){return this.isApprovingOrDisapproving?Le.applicationId:Le.placementId}getExtentOptions(Le){const ce=(0,T.Z)(this.decisions);return ce?this.ececExtentOptionsService.getExtentOptionsByMunicipalityId(ce.municipalityId,Le).pipe((0,ne.U)(we=>oe.Utils.sortArrayByDate(we))):(0,Y.of)([])}isAllSelected(){return this.selection.selected.length===this.getNumberOfRows()}isSelectionDisabled(Le){return!this.canEditRow(Le)||this.isReplacingOrEnding&&this.decisions.filter(we=>Le.childId===we.childId&&Le.placementId!==we.placementId&&(we=>g.lQ[Le.placementType].includes(we))(we.placementType)).some(({placementId:we})=>this.selection.isSelected(we))}canEditRow(Le){return!!this.getUnitName(Le)}getNumberOfRows(){return this.isApprovingOrDisapproving?oe.Utils.mapToUniqueArrayObjects(this.dataSource.data,"applicationId").length:this.dataSource.data.filter(Le=>!this.isSelectionDisabled(Le)).length}masterToggle(){this.isAllSelected()?this.deselectAll():this.selectAll()}deselectAll(){this.deselectDecisions.emit(this.selectedDecisions),this.selection.clear()}selectAll(){const Le=[];this.dataSource.data.forEach(ce=>{if(this.isSelectionDisabled(ce))return;const we=this.getDecisionId(ce);this.selection.select(we),this.selectedDecisions.find(qt=>qt===we)||Le.push(we)}),this.selectDecisions.emit(Le)}onSelectDecision(Le){const ce=this.getDecisionId(Le);this.selection.toggle(ce),this.selection.isSelected(ce)?this.selectDecisions.emit([ce]):this.deselectDecisions.emit([ce])}getDisapprovalReasons(){const ce=(0,n.Z)(this.decisions,"type").map(we=>we.decisionType).map(we=>this.applicationsDecisionService.getDisapprovedReasons(we).pipe((0,ne.U)(Qe=>({type:we,reasons:this.translateReasons(Qe.childCodes)}))));return(0,he.D)([...ce]).pipe((0,xe.z)(we=>(0,ae.D)(we)),(0,de.u)((we,Qe)=>({...we,[Qe.type]:Qe}),{}),(0,Pe.d)())}getDisapprovalReasonsOptions(Le){return this.disapprovalReasonsOptions$.pipe((0,ne.U)(ce=>ce?.[Le]?.reasons),(0,re.O)([]))}getPrivateUnitsOptions(){const Le=B()().add(1,"day").format(oe.DateFormats.STANDARD),ce=B()().add(6,"months").format(oe.DateFormats.STANDARD),Qe=`(${this.translate.instant("Placement.View.DaycarePlace.All.Groups").toLowerCase()})`;return this.applicationsPlacementService.getPrivateUnits({start:Le,end:ce}).pipe((0,ne.U)(Tn=>Tn.filter(lr=>lr.organizationFormat===oe.OrganizationTypes.ORGANIZATION_FORMAT_PRIVATE&&!lr.name.includes(Qe))),(0,pe.b)(Tn=>this.privateUnits=Tn),(0,ne.U)(Tn=>oe.Utils.getSelectOptionsFromArray(Tn||[],"id","name")))}canChangeUnit(Le){return[oe.EditPlacementTypes.ECEC_VOUCHER,oe.EditPlacementTypes.ECEC_COMPLEMENTING_VOUCHER].includes(Le.placementType)&&this.hasRightToChangeUnit}handleFetchTemplateOptions(Le){return this.getAllApprovalTemplateSelectOptions(Le).pipe((0,pe.b)(ce=>{this.decisions=[...this.mapDefaultTemplateIdToDecisions(ce)],this.dataSource.data=this.decisions,this.validatorOptions=this.getValidatorOptions(),this.templateForPreview(this.decisions[0].messageTemplateId)}))}mapDefaultTemplateIdToDecisions(Le){const ce=(0,P.Z)(this.decisions);for(const we of ce)we.messageTemplateId=this.findDefaultTemplate(Le[we.decisionType]),this.updateOriginalData.emit({placementId:we.placementId,messageTemplateId:we.messageTemplateId}),this.update.emit({placementId:we.placementId,messageTemplateId:we.messageTemplateId});return ce}getDecisionState(){return{approving:this.decisionTaken===g.wy.APPROVING,disapproving:this.decisionTaken===g.wy.DISAPPROVING,replacing:this.decisionTaken===g.wy.REPLACING,ending:this.decisionTaken===g.wy.ENDING}}getValidatorOptions(){const Le=[];for(const ce of this.decisions)switch(this.decisionTaken){case g.wy.APPROVING:Le.push(...this.getApprovingRelatedValidators(ce));break;case g.wy.DISAPPROVING:Le.push(...this.getDisapprovingRelatedValidators(ce));break;case g.wy.REPLACING:Le.push(...this.getReplacingRelatedValidators(ce));break;case g.wy.ENDING:Le.push(...this.getEndingRelatedValidators(ce))}return Le}getApprovingRelatedValidators(Le){const{placementId:ce,messageTemplateId:we,extentId:Qe}=Le;return[this.createValidatorOption(`messageTemplate-${ce}`,we,[oe.SiviValidators.required]),...Le.extentEditMode?[this.createValidatorOption(`extentId-${ce}`,Qe,[oe.SiviValidators.required])]:[]]}getDisapprovingRelatedValidators(Le){return[...this.getStartEndDateValidators(Le),this.createValidatorOption("disapprovalReason",Le.disapprovalReason,[oe.SiviValidators.required])]}getReplacingRelatedValidators(Le){const{placementId:ce,messageTemplateId:we,extentId:Qe}=Le;return[this.createValidatorOption(`messageTemplate-${ce}`,we,[oe.SiviValidators.required]),...this.getStartEndDateValidators(Le),...Le.ececType?[this.createValidatorOption(`extentId-${ce}`,Qe,[oe.SiviValidators.required])]:[]]}getEndingRelatedValidators(Le){return[...this.getStartEndDateValidators(Le)]}getStartEndDateValidators(Le){const{startDate:ce,endDate:we,placementId:Qe}=Le;return[this.createValidatorOption(`startDate-${Qe}`,ce,[oe.SiviValidators.validateDate(),oe.SiviValidators.validateDateIsAfterThan(`endDate-${Qe}`),oe.SiviValidators.validateInvalidControl(`endDate-${Qe}`)]),this.createValidatorOption(`endDate-${Qe}`,we,[oe.SiviValidators.validateDate(),oe.SiviValidators.validateDateIsBeforeThan(`startDate-${Qe}`),oe.SiviValidators.validateInvalidControl(`startDate-${Qe}`)],{isSameOrAfter:""})]}getExtent(Le,ce,we){const qt=(0,E.Z)(we,Le,[]).find(Tn=>Tn.value===ce);return(0,E.Z)(qt,"text","")}isStartDateReadonly(){return!this.decisionState.replacing}isEndDateReadonly(Le){return!(!this.decisionState.approving&&!this.decisionState.disapproving)||!!this.decisionState.ending&&this.isSelectionDisabled(Le)}rowUniqueKey(Le,ce){return`${Le}-${ce}`}getUniqueValue(Le,ce,we){return Le[`${ce}-${we}`]}getUnitName({unitId:Le,unitName:ce}){return this.organizations?me.P.getUnitName(Le,this.organizations):ce}translateReasons(Le){const ce=Le.map(we=>({text:this.translate.instant(we.name),value:we.name}));return ce.push({text:this.translate.instant("General.Other"),value:"sivi.application.decision.reason.disapproved.other-reason"}),ce}selectNotDisabledDecisions(){this.decisions.filter(Le=>this.selectedDecisions.includes(Le.placementId)).forEach(Le=>!this.isSelectionDisabled(Le)&&this.selection.select(Le.placementId))}selectAllSelectedDecisions(){this.selectedDecisions.forEach(Le=>this.selection.select(Le))}setSelectedDecisions(){this.selectedDecisions&&(this.isReplacingOrEnding?this.selectNotDisabledDecisions():this.selectAllSelectedDecisions())}};let Nt=ai;ai.\u0275fac=function(ce){return new(ce||ai)(l.Y36(le.sK),l.Y36(Z.F0),l.Y36(oe.NotifyService),l.Y36(l.sBO),l.Y36(Oe.$),l.Y36(j.Q),l.Y36(ke.T),l.Y36(Be.EcecExtentOptionsService),l.Y36(oe.MessageTemplateRestService))},ai.\u0275cmp=l.Xpm({type:ai,selectors:[["sivi-applications-decision-table"]],inputs:{decisions:"decisions",decisionTaken:"decisionTaken",previewedDecisionId:"previewedDecisionId",selectedDecisions:"selectedDecisions",hasRightToChangeUnit:"hasRightToChangeUnit",isNewDecision:"isNewDecision",organizations:"organizations"},outputs:{update:"update",updateOriginalData:"updateOriginalData",componentStatus:"componentStatus",selectForPreview:"selectForPreview",selectDecisions:"selectDecisions",deselectDecisions:"deselectDecisions",validityChange:"validityChange",selectTemplateForPreview:"selectTemplateForPreview"},features:[l.qOj],decls:48,vars:5,consts:[[3,"validatorOptions"],["validator",""],[1,"scrollable-container","mat-elevation-z8"],["mat-table","","aria-describedby","applications-decision",3,"dataSource","trackBy"],["matColumnDef","fullName","sticky",""],["mat-header-cell","","scope","col",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","select","sticky",""],["matColumnDef","unit"],["matColumnDef","focus"],["matColumnDef","type"],["matColumnDef","startDate"],["matColumnDef","endDate"],["matColumnDef","disapprovalReason"],["matColumnDef","messageTemplate"],["matColumnDef","extent"],["matColumnDef","ececUsage"],["matColumnDef","turnCare"],["matColumnDef","preview"],["matColumnDef","decisionFailed"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["mat-header-cell","","scope","col"],["mat-cell",""],[3,"checked","indeterminate","change"],[3,"disabled","checked","click","change"],[4,"ngIf","ngIfElse"],["displayOnlyUnitName",""],["name","unitId",3,"value","ngClass","options","siviChange"],["displayOnlyFocus",""],[4,"ngIf"],[1,"edit-mode",3,"name","value","placeholder","options","viewMode","siviChange"],[1,"required-column"],[1,"startDate"],[3,"name","minDate","value","readonly","noLabel","update"],[3,"name","minDate","maxDate","value","readonly","noLabel","update"],["disapprovalNotNeeded",""],["name","disapprovalReason",3,"value","options","viewMode","placeholder","siviChange"],[3,"name","options","ngClass","value","viewMode","siviChange"],[3,"name","value","ngClass","viewMode","options","placeholder","siviChange"],[3,"name","value","options","viewMode","ngClass","siviChange",4,"ngIf"],[3,"name","value","options","viewMode","ngClass","siviChange"],["role","checkbox","name","turnCare",1,"turnCare",3,"value","checked","disabled","ionChange"],["role","radio","class","radio-item","slot","start","name","preview",3,"ngClass","disabled","click",4,"ngIf"],["role","radio","slot","start","name","preview",1,"radio-item",3,"ngClass","disabled","click"],["aria-hidden","false","class","warning","matTooltipClass","application-state-tooltip",4,"ngIf"],["aria-hidden","false","matTooltipClass","application-state-tooltip",1,"warning"],["mat-header-row",""],["mat-row",""]],template:function(ce,we){1&ce&&(l.TgZ(0,"cgi-validator",0,1)(2,"div",2)(3,"table",3),l.ynx(4,4),l.YNc(5,tt,3,3,"th",5),l.YNc(6,Ne,2,1,"td",6),l.BQk(),l.ynx(7,7),l.YNc(8,wt,2,2,"th",5),l.YNc(9,ft,2,2,"td",6),l.BQk(),l.ynx(10,8),l.YNc(11,Ct,3,3,"th",5),l.YNc(12,nn,4,2,"td",6),l.BQk(),l.ynx(13,9),l.YNc(14,Dn,3,3,"th",5),l.YNc(15,mi,4,2,"td",6),l.BQk(),l.ynx(16,10),l.YNc(17,wi,3,3,"th",5),l.YNc(18,Bn,3,3,"td",6),l.BQk(),l.ynx(19,11),l.YNc(20,kn,4,3,"th",5),l.YNc(21,On,3,6,"td",6),l.BQk(),l.ynx(22,12),l.YNc(23,je,4,5,"th",5),l.YNc(24,Bt,2,7,"td",6),l.BQk(),l.ynx(25,13),l.YNc(26,xn,4,3,"th",5),l.YNc(27,Ai,4,2,"td",6),l.BQk(),l.ynx(28,14),l.YNc(29,si,4,3,"th",5),l.YNc(30,Hn,2,1,"td",6),l.BQk(),l.ynx(31,15),l.YNc(32,An,4,3,"th",5),l.YNc(33,In,3,3,"td",6),l.BQk(),l.ynx(34,16),l.YNc(35,Zi,3,3,"th",5),l.YNc(36,Hi,2,1,"td",6),l.BQk(),l.ynx(37,17),l.YNc(38,Gr,3,3,"th",5),l.YNc(39,mr,3,2,"td",6),l.BQk(),l.ynx(40,18),l.YNc(41,jn,3,3,"th",5),l.YNc(42,oi,2,1,"td",6),l.BQk(),l.ynx(43,19),l.YNc(44,Ni,1,0,"th",5),l.YNc(45,pr,2,1,"td",6),l.BQk(),l.YNc(46,Sn,1,0,"tr",20),l.YNc(47,Pn,1,0,"tr",21),l.qZA()()()),2&ce&&(l.Q6J("validatorOptions",we.validatorOptions),l.xp6(3),l.Q6J("dataSource",we.dataSource)("trackBy",we.trackByFnIndex),l.xp6(43),l.Q6J("matHeaderRowDef",we.displayedColumns),l.xp6(1),l.Q6J("matRowDefColumns",we.displayedColumns))},dependencies:[nt.nz,nt.B7,nt.w,nt.U5,mt.mk,mt.O5,oe.DatepickerComponent,oe.SelectComponent,D.BZ,D.fO,D.as,D.w1,D.Dz,D.nj,D.ge,D.ev,D.XQ,D.Gk,ut.oG,Ve.Hw,mt.Ov,le.X$],styles:['[_ngcontent-%COMP%]:focus, .ion-focused[_ngcontent-%COMP%]{outline:2px dashed var(--ion-color-primary);outline-offset:2px}.scrollable-container[_ngcontent-%COMP%]{margin-bottom:48px;overflow:auto;width:100%}table.mat-mdc-table[_ngcontent-%COMP%]{width:100%}table.mat-mdc-table[_ngcontent-%COMP%]   th[_ngcontent-%COMP%], table.mat-mdc-table[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]{padding:8px;white-space:nowrap}table.mat-mdc-table[_ngcontent-%COMP%]   th[_ngcontent-%COMP%]:first-of-type, table.mat-mdc-table[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]:first-of-type{padding-left:15px}.warning[_ngcontent-%COMP%]{color:var(--ion-color-danger)}.mat-column-select[_ngcontent-%COMP%]{background-color:var(--ion-color-primary-contrast, #fff);min-width:2em}.mat-column-fullName[_ngcontent-%COMP%]{background-color:var(--ion-color-primary-contrast, #fff);max-width:14em;min-width:14em;width:14em}.mat-column-fullName[_ngcontent-%COMP%]   mat-icon[_ngcontent-%COMP%]{top:5px;position:relative;left:5px}@media screen and (min-width: 840px){.mat-column-fullName[_ngcontent-%COMP%]{max-width:18em;min-width:18em;width:18em}}td.mat-column-fullName[_ngcontent-%COMP%]{font-weight:600}.mat-column-unit[_ngcontent-%COMP%]{min-width:9em}.mat-column-focus[_ngcontent-%COMP%]{min-width:8em}.mat-column-type[_ngcontent-%COMP%]{min-width:5em}.mat-column-startDate[_ngcontent-%COMP%], .mat-column-endDate[_ngcontent-%COMP%]{max-width:12em}.mat-column-disapprovalReason[_ngcontent-%COMP%], .mat-column-approvalText[_ngcontent-%COMP%]{min-width:22em}.mat-column-extent[_ngcontent-%COMP%], .mat-column-focus[_ngcontent-%COMP%], .mat-column-messageTemplate[_ngcontent-%COMP%], .mat-column-unit[_ngcontent-%COMP%], .mat-column-ececUsage[_ngcontent-%COMP%]{min-width:8em}.mat-column-extent[_ngcontent-%COMP%]   sivi-lib-select[_ngcontent-%COMP%], .mat-column-focus[_ngcontent-%COMP%]   sivi-lib-select[_ngcontent-%COMP%], .mat-column-messageTemplate[_ngcontent-%COMP%]   sivi-lib-select[_ngcontent-%COMP%], .mat-column-unit[_ngcontent-%COMP%]   sivi-lib-select[_ngcontent-%COMP%], .mat-column-ececUsage[_ngcontent-%COMP%]   sivi-lib-select[_ngcontent-%COMP%]{position:relative}.mat-column-ececUsage[_ngcontent-%COMP%]   sivi-lib-select[_ngcontent-%COMP%]{max-width:8em;display:inline-block}.mat-column-ececUsage[_ngcontent-%COMP%]   sivi-lib-select.edit-mode[_ngcontent-%COMP%]{bottom:10px}.edit-mode[_ngcontent-%COMP%]{bottom:10px;display:inline-block;min-width:15em}.mat-column-turnCare[_ngcontent-%COMP%]{min-width:4em}.mat-column-turnCare[_ngcontent-%COMP%]   ion-checkbox[_ngcontent-%COMP%]{position:relative;left:15px}.mat-column-preview[_ngcontent-%COMP%]{min-width:2em}.mat-column-preview[_ngcontent-%COMP%]   ion-radio[_ngcontent-%COMP%]{position:relative;left:11px}[mat-row][_ngcontent-%COMP%]{height:81px}.mat-column-startDate[_ngcontent-%COMP%], .mat-column-endDate[_ngcontent-%COMP%], .mat-column-approvalText[_ngcontent-%COMP%], .mat-column-disapprovalReason[_ngcontent-%COMP%]{position:relative}.mat-column-startDate[_ngcontent-%COMP%]     .error-message, .mat-column-endDate[_ngcontent-%COMP%]     .error-message, .mat-column-approvalText[_ngcontent-%COMP%]     .error-message, .mat-column-disapprovalReason[_ngcontent-%COMP%]     .error-message{position:absolute;bottom:0}.mat-column-extent[_ngcontent-%COMP%]{position:relative}.mat-column-extent[_ngcontent-%COMP%]     .error-message{position:absolute;bottom:0}.disapprovalReason-error-message[_ngcontent-%COMP%]{position:absolute;bottom:0}[_nghost-%COMP%]     ion-label.required:after{display:none!important}.required-column[_ngcontent-%COMP%]:after{color:var(--ion-color-warning);content:"*";margin-left:.3rem}mat-checkbox[_ngcontent-%COMP%]:focus-within, ion-radio[_ngcontent-%COMP%]:focus-within, ion-checkbox[_ngcontent-%COMP%]:focus-within, sivi-lib-select[_ngcontent-%COMP%]:focus-within{outline:2px dashed var(--ion-color-primary);outline-offset:2px}'],changeDetection:0})},95922:(qe,I,p)=>{"use strict";p.d(I,{L:()=>wt});var o=p(94650),e=p(41854),l=p(77579),D=p(60515),g=p(95698),E=p(39300),T=p(54004),n=p(71884),P=p(63900),w=p(70262),B=p(88511),Y=p(88692),V=p(89383),ue=p(65324),he=p(21940),ae=p(9116),X=p(70191),ve=p(36895),ye=p(24956);function ge(rn,He){1&rn&&(o.ynx(0),o.TgZ(1,"ion-col",6),o._uU(2),o.ALo(3,"translate"),o.qZA(),o.BQk()),2&rn&&(o.xp6(2),o.hij(" ",o.lcZ(3,1,"Organization.Educational.Singular"),""))}function ne(rn,He){1&rn&&(o.TgZ(0,"ion-col",6),o._uU(1),o.ALo(2,"translate"),o.qZA()),2&rn&&(o.xp6(1),o.hij(" ",o.lcZ(2,1,"Decision.Preview.Voucher.WishedUnit"),""))}function pe(rn,He){if(1&rn&&(o.ynx(0),o.TgZ(1,"ion-text"),o._uU(2),o.qZA(),o.TgZ(3,"ion-text"),o._uU(4),o.qZA(),o.BQk()),2&rn){const st=o.oxw();o.xp6(2),o.hij(" ",st.unit.address.street," "),o.xp6(2),o.hij(" ",st.unit.address.postalCode+", "+st.unit.address.city," ")}}function Pe(rn,He){if(1&rn&&(o.TgZ(0,"ion-row",0)(1,"ion-col",6),o._uU(2),o.ALo(3,"translate"),o.qZA(),o.TgZ(4,"ion-col",3)(5,"ion-text"),o._uU(6),o.qZA(),o.TgZ(7,"ion-text"),o._uU(8),o.ALo(9,"translate"),o.qZA(),o.TgZ(10,"ion-text"),o._uU(11),o.qZA(),o.TgZ(12,"ion-text"),o._uU(13),o.qZA()()()),2&rn){const st=o.oxw();o.xp6(2),o.hij(" ",o.lcZ(3,5,"Decision.Supervisor"),""),o.xp6(4),o.hij(" ",st.unitSupervisor.name," "),o.xp6(2),o.hij(" ",o.lcZ(9,7,st.unitSupervisor.jobTitle)," "),o.xp6(3),o.hij(" ",st.unitSupervisor.email," "),o.xp6(2),o.hij(" ",st.unitSupervisor.phoneNumber," ")}}const ft=class{constructor(){this.decisionTypes=ye.wn}ngOnInit(){this.unitSupervisor=this.getUnitSupervisor(this.unit)}getUnitSupervisor(He){if(!He.unitSupervisor)return null;const st=[...He.unitCounselors,...He.unitLeaders].find(nn=>nn.id===He.unitSupervisor.id);return st?this.mapStaffToUnitSupervisor(st):null}mapStaffToUnitSupervisor(He){return{name:`${He.firstName} ${He.lastName}`,jobTitle:this.unit.unitSupervisor.jobTitle,email:He.emailWork,phoneNumber:He.phoneWork}}};let xe=ft;function de(rn,He){if(1&rn&&(o.TgZ(0,"ion-row")(1,"ion-col",7),o._uU(2),o.ALo(3,"translate"),o.qZA(),o.TgZ(4,"ion-col",8)(5,"ion-text"),o._uU(6),o.ALo(7,"date"),o.qZA()()()),2&rn){const st=o.oxw();o.xp6(2),o.hij(" ",o.lcZ(3,2,"Decision.Preview.Decided.EndDate"),""),o.xp6(4),o.hij(" ",o.xi3(7,4,st.decision.endDate,st.dateFormats.FINNISH_ANGULAR)," ")}}function re(rn,He){if(1&rn&&(o.TgZ(0,"ion-row")(1,"ion-col",7),o._uU(2),o.ALo(3,"translate"),o.qZA(),o.TgZ(4,"ion-col",8)(5,"ion-text"),o._uU(6),o.qZA()()()),2&rn){const st=o.oxw(2);o.xp6(2),o.hij(" ",o.lcZ(3,2,"Application.View.Filters.Headers.Extent")," "),o.xp6(4),o.hij(" ",st.decision.extent," ")}}function oe(rn,He){if(1&rn&&(o.TgZ(0,"ion-row")(1,"ion-col",7),o._uU(2),o.ALo(3,"translate"),o.qZA(),o.TgZ(4,"ion-col",8)(5,"ion-text"),o._uU(6),o.ALo(7,"translate"),o.qZA()()()),2&rn){const st=o.oxw(2);o.xp6(2),o.hij(" ",o.lcZ(3,2,"ECEC.Application.Title.EcecUsage")," "),o.xp6(4),o.hij(" ",o.lcZ(7,4,st.decision.daily?"ECEC.Application.EcecUsage.Option.Daily":"ECEC.Application.EcecUsage.Option.PartWeek")," ")}}function me(rn,He){1&rn&&(o.TgZ(0,"ion-row")(1,"ion-col",7),o._uU(2),o.ALo(3,"translate"),o.qZA(),o.TgZ(4,"ion-col",8)(5,"ion-text"),o._uU(6),o.ALo(7,"translate"),o.qZA()()()),2&rn&&(o.xp6(2),o.hij(" ",o.lcZ(3,2,"ECEC.WeeklyTimeOptions.Table.TurnCare")," "),o.xp6(4),o.hij(" ",o.lcZ(7,4,"General.Yes")," "))}function be(rn,He){if(1&rn&&(o.TgZ(0,"ion-row")(1,"ion-col",7),o._uU(2),o.ALo(3,"translate"),o.qZA(),o.TgZ(4,"ion-col",8)(5,"ion-text"),o._uU(6),o.qZA()()()),2&rn){const st=He.ngIf;o.xp6(2),o.hij(" ",o.lcZ(3,2,"Form.Label.FocusAtTheStart"),""),o.xp6(4),o.hij(" ",st," ")}}function le(rn,He){if(1&rn&&o._UZ(0,"sivi-decision-preview-unit",18),2&rn){const st=He.ngIf,nn=o.oxw(2);o.Q6J("unit",st)("decisionType",nn.decision.decisionType)}}function Z(rn,He){if(1&rn&&(o.ynx(0),o.YNc(1,re,7,4,"ion-row",9),o.YNc(2,oe,8,6,"ion-row",9),o.YNc(3,me,8,6,"ion-row",9),o.YNc(4,be,7,4,"ion-row",9),o.YNc(5,le,1,2,"sivi-decision-preview-unit",17),o.ALo(6,"async"),o.BQk()),2&rn){const st=o.oxw();o.xp6(1),o.Q6J("ngIf",st.decision.ececType&&st.decision.extent),o.xp6(1),o.Q6J("ngIf",st.decision.ececType&&null!==st.decision.daily),o.xp6(1),o.Q6J("ngIf",st.decision.turnCare),o.xp6(1),o.Q6J("ngIf",st.getFocusText(st.decision)),o.xp6(1),o.Q6J("ngIf",o.lcZ(6,5,st.unit$))}}function Oe(rn,He){if(1&rn&&(o.ynx(0),o.TgZ(1,"ion-row")(2,"ion-col",20),o._uU(3),o.qZA()(),o.TgZ(4,"ion-row")(5,"ion-col",21)(6,"ion-text"),o._uU(7),o.qZA()()(),o.BQk()),2&rn){const st=o.oxw(2);o.xp6(3),o.hij(" ",st.replaceReasonTitles.FI,""),o.xp6(4),o.hij(" ",st.replaceReasons.replaceReasonFI," ")}}function j(rn,He){if(1&rn&&(o.ynx(0),o.TgZ(1,"ion-row")(2,"ion-col",20),o._uU(3),o.qZA()(),o.TgZ(4,"ion-row")(5,"ion-col",21)(6,"ion-text"),o._uU(7),o.qZA()()(),o.BQk()),2&rn){const st=o.oxw(2);o.xp6(3),o.hij(" ",st.replaceReasonTitles.SV,""),o.xp6(4),o.hij(" ",st.replaceReasons.replaceReasonSV," ")}}function ke(rn,He){if(1&rn&&(o.ynx(0),o.TgZ(1,"ion-row")(2,"ion-col",7),o._uU(3),o.ALo(4,"translate"),o.qZA(),o.TgZ(5,"ion-col",8)(6,"ion-text"),o._uU(7),o.qZA()()(),o.BQk()),2&rn){const st=He.ngIf;o.xp6(3),o.hij(" ",o.lcZ(4,2,"Decision.View.ReplacedDecisionNumber"),""),o.xp6(4),o.hij(" ",st," ")}}function Be(rn,He){if(1&rn&&(o.TgZ(0,"div",19),o.YNc(1,Oe,8,2,"ng-container",9),o.YNc(2,j,8,2,"ng-container",9),o.YNc(3,ke,8,4,"ng-container",9),o.ALo(4,"async"),o.qZA()),2&rn){const st=o.oxw();o.xp6(1),o.Q6J("ngIf",st.replaceReasons.replaceReasonFI),o.xp6(1),o.Q6J("ngIf",st.replaceReasons.replaceReasonSV),o.xp6(1),o.Q6J("ngIf",o.lcZ(4,3,st.decisionNumber$))}}function nt(rn,He){if(1&rn&&(o.ynx(0),o.TgZ(1,"ion-row")(2,"ion-col",20),o._uU(3),o.ALo(4,"translate"),o.qZA()(),o.TgZ(5,"ion-row")(6,"ion-col",21)(7,"ion-text"),o._uU(8),o.ALo(9,"translate"),o.qZA()()(),o.BQk()),2&rn){const st=o.oxw(2);o.xp6(3),o.hij(" ",o.lcZ(4,2,"Decision.Preview.Decision.Reason"),""),o.xp6(5),o.hij(" ",o.lcZ(9,4,st.decision.disapprovalReason)||"-"," ")}}function mt(rn,He){if(1&rn&&(o.TgZ(0,"ion-row")(1,"ion-col",20),o._uU(2),o.ALo(3,"translate"),o.qZA()(),o.TgZ(4,"ion-row")(5,"ion-col",21)(6,"ion-text"),o._uU(7),o.qZA()()(),o.TgZ(8,"ion-row")(9,"ion-col",20),o._uU(10),o.ALo(11,"translate"),o.qZA()(),o.TgZ(12,"ion-row")(13,"ion-col",21)(14,"ion-text"),o._uU(15),o.qZA()()()),2&rn){const st=o.oxw(2);o.xp6(2),o.hij(" ",o.lcZ(3,4,"Decision.Preview.Decision.Reason")," (FI)"),o.xp6(5),o.hij(" ",(null==st.decision.disapprovalOtherReasons?null:st.decision.disapprovalOtherReasons.fi)||"-"," "),o.xp6(3),o.hij(" ",o.lcZ(11,6,"Decision.Preview.Decision.Reason")," (SV)"),o.xp6(5),o.hij(" ",(null==st.decision.disapprovalOtherReasons?null:st.decision.disapprovalOtherReasons.sv)||"-"," ")}}function ut(rn,He){if(1&rn&&(o.TgZ(0,"div",19),o.YNc(1,nt,10,6,"ng-container",22),o.YNc(2,mt,16,8,"ng-template",null,23,o.W1O),o.qZA()),2&rn){const st=o.MAs(3),nn=o.oxw();o.xp6(1),o.Q6J("ngIf","sivi.application.decision.reason.disapproved.other-reason"!==nn.decision.disapprovalReason)("ngIfElse",st)}}function Ve(rn,He){if(1&rn&&(o.TgZ(0,"div",24)(1,"ion-row")(2,"ion-col",7),o._uU(3),o.ALo(4,"translate"),o.qZA()(),o.TgZ(5,"ion-row")(6,"ion-col",21),o._UZ(7,"sivi-lib-html-renderer",25),o.qZA()()()),2&rn){const st=He.ngIf;o.xp6(3),o.hij(" ",o.lcZ(4,2,"Decision.Preview.Decision.Information"),""),o.xp6(4),o.Q6J("text",st)}}function tt(rn,He){if(1&rn&&(o.TgZ(0,"div",26)(1,"ion-row")(2,"ion-col",7),o._uU(3),o.ALo(4,"translate"),o.qZA(),o.TgZ(5,"ion-col",8)(6,"ion-text"),o._uU(7),o.qZA()()()()),2&rn){const st=o.oxw();o.xp6(3),o.hij(" ",o.lcZ(4,2,"Decision.View.Table.Header.InformedDate"),""),o.xp6(4),o.hij(" ",st.decision.informedDate," ")}}function Ne(rn,He){if(1&rn&&(o.TgZ(0,"div",27)(1,"ion-row")(2,"ion-col",28),o._uU(3),o.ALo(4,"translate"),o.qZA()(),o.TgZ(5,"ion-row")(6,"ion-col",21),o._UZ(7,"sivi-lib-html-renderer",25),o.qZA()()()),2&rn){const st=He.ngIf;o.xp6(3),o.hij(" ",o.lcZ(4,2,"Decision.Preview.Decision.Instruction"),""),o.xp6(4),o.Q6J("text",st)}}ft.\u0275fac=function(st){return new(st||ft)},ft.\u0275cmp=o.Xpm({type:ft,selectors:[["sivi-decision-preview-unit"]],inputs:{unit:"unit",decisionType:"decisionType"},decls:9,vars:5,consts:[[1,"preview-row"],[4,"ngIf","ngIfElse"],["voucher",""],["size","6"],[4,"ngIf"],["class","preview-row",4,"ngIf"],["size","3",1,"weight-bold"]],template:function(st,nn){if(1&st&&(o.TgZ(0,"ion-row",0),o.YNc(1,ge,4,3,"ng-container",1),o.YNc(2,ne,3,3,"ng-template",null,2,o.W1O),o.TgZ(4,"ion-col",3)(5,"ion-text"),o._uU(6),o.qZA(),o.YNc(7,pe,5,2,"ng-container",4),o.qZA()(),o.YNc(8,Pe,14,9,"ion-row",5)),2&st){const Dn=o.MAs(3);o.xp6(1),o.Q6J("ngIf",nn.decisionType!==nn.decisionTypes.VOUCHER)("ngIfElse",Dn),o.xp6(5),o.hij(" ",nn.unit.name," "),o.xp6(1),o.Q6J("ngIf",nn.unit.address),o.xp6(1),o.Q6J("ngIf",nn.unitSupervisor)}},dependencies:[X.wI,X.Nd,X.yW,ve.O5,V.X$],styles:[".preview-row[_ngcontent-%COMP%]{margin-top:2em}ion-text[_ngcontent-%COMP%]{display:flex}ion-col[_ngcontent-%COMP%]{padding:0}"],changeDetection:0});const Ct=class{set previewedMessageTemplate(He){this.selectedPreviewedMessageTemplate=He,this.updateDecisionInformationText()}set decision(He){He&&!(0,e.Z)(this.decision,He)&&this.updateView(He)}get decision(){return this.decisionInstance}constructor(He,st,nn,Dn,Mn,vi,Gi,mi){this.translate=He,this.organizationService=st,this.placementCommonService=nn,this.messageTemplateRestService=Dn,this.applicationsDecisionService=Mn,this.languageService=vi,this.route=Gi,this.router=mi,this.replaceReasons={replaceReasonFI:"",replaceReasonSV:""},this.unitSupervisorId=new o.vpe,this.replaceReasonTitles=this.getReplaceReasonTitle(),this.previewOpenToggle=!1,this.applicationTypes=Y.ApplicationTypes,this.dateFormats=Y.DateFormats,this.decisionTakenEnum=B.wy,this.decisionDeliveryEnum=B.XG,this.decision$=new l.x}ngOnInit(){this.unit$=this.getUnit(),this.decisionNumber$=this.getDecisionNumber(),this.createDecisionAndRectificationTexts(),this.getUnitSupervisorId()}getUnitSupervisorId(){this.unit$&&this.unit$.pipe((0,g.q)(1)).subscribe(He=>{const st=He.unitSupervisor?.id;this.unitSupervisorId.emit(st)})}updateView(He){this.decisionInstance=He,this.decision$.next(He),this.updateDecisionInformationText()}updateDecisionInformationText(){this.approved&&(this.decisionInformationText=this.getTemplateMessageDescription([this.selectedPreviewedMessageTemplate]))}getDecisionNumber(){return this.decision$.pipe((0,E.h)(He=>!!He.decisionId),(0,T.U)(He=>He.decisionId),(0,n.x)(),(0,P.w)(He=>this.applicationsDecisionService.getDecision(He).pipe((0,T.U)(st=>st.decisionNumber),(0,w.K)(()=>D.E))))}getUnit(){if(this.decision.unitId)return this.decision$.pipe((0,T.U)(He=>He.unitId),(0,n.x)(),(0,P.w)(He=>this.organizationService.getUnit(He).pipe((0,w.K)(()=>D.E))))}createDecisionAndRectificationTexts(){this.approved?this.decisionInformationText=this.getTemplateMessageDescription([this.selectedPreviewedMessageTemplate]):this.decisionInformationText$=this.decision$.pipe((0,T.U)(He=>He.decisionType),(0,n.x)(),(0,P.w)(He=>this.getDecisionTextTemplate(He))),this.templateRectificationText$=this.decision$.pipe((0,T.U)(He=>He.decisionType),(0,n.x)(),(0,P.w)(He=>this.getRectificationText(He)))}getDecisionTextTemplate(He){const st=this.getDecisionReasonCode(He);return this.getTemplateText(st)}getRectificationText(He){const st=this.getRectificationReasonCode(He);return this.getTemplateText(st)}getFocusText(He){return this.placementCommonService.getFocusText(He)}getTemplateText(He){return this.messageTemplateRestService.getTemplateByReasonAndMunicipality(He,this.decision.municipalityId).pipe((0,T.U)(st=>this.getTemplateMessageDescription(st)))}getTemplateMessageDescription(He){const st=He[0],nn="sv"===this.translate.currentLang?"sv":"fi";if(!st)return;const{languageDescriptions:Dn,messageModes:Mn}=st;let vi;if(Dn&&Dn.length&&(vi=Dn.find(wi=>wi.language===nn)),!vi)return;const Gi=Mn.find(wi=>wi.messageContentId===vi.messageContentId&&wi.modeType===Y.ContactTypes.DOCUMENT_TEXT);if(!Gi)return;const mi=Gi.languages.find(wi=>wi.language===nn);return mi?mi.description:""}getDecisionReasonCode(He){let st;switch(He){case Y.ApplicationTypes.ECEC:case Y.ApplicationTypes.PPE:case Y.ApplicationTypes.CLUB:st=He;break;case Y.DecisionTypes.VOUCHER:st=Y.DecisionTypes.VOUCHER;break;default:st=Y.ApplicationTypes.ECEC}const nn=this.approved?"approved":"disapproved";return`sivi.message.template.decision.${st.toLowerCase()}.${nn}`}getRectificationReasonCode(He){let st;switch(He){case Y.ApplicationTypes.ECEC:case Y.ApplicationTypes.PPE:st=He;break;case Y.ApplicationTypes.CLUB:case Y.DecisionTypes.VOUCHER:st=Y.ApplicationTypes.ECEC;break;default:st=""}return`sivi.message.template.decision.${st.toLowerCase()}.demand-rectification`}getHeaderTitle(){if(this.decision.twoYear)return this.translate.instant("Decision.Type.TwoYearPPE");switch(this.decision.decisionType){case Y.DecisionTypes.PPE:return this.translate.instant("Decision.Type.PPE");case Y.DecisionTypes.ECEC:return this.translate.instant("Decision.Type.ECEC");case Y.DecisionTypes.CLUB:return this.translate.instant("Decision.Type.Club");case Y.DecisionTypes.VOUCHER:return this.translate.instant("Decision.Preview.ECEC.Voucher.Decision");default:return""}}getReplaceReasonTitle(){return{FI:`${this.languageService.getTranslationByLocale("Decision.Replace.Reason","fi")} (FI)`,SV:`${this.languageService.getTranslationByLocale("Decision.Replace.Reason","sv")} (SV)`}}};let wt=Ct;Ct.\u0275fac=function(st){return new(st||Ct)(o.Y36(V.sK),o.Y36(Y.OrganizationService),o.Y36(ue.$),o.Y36(Y.MessageTemplateRestService),o.Y36(he.Q),o.Y36(Y.LanguageService),o.Y36(ae.gz),o.Y36(ae.F0))},Ct.\u0275cmp=o.Xpm({type:Ct,selectors:[["sivi-decision-preview"]],inputs:{approved:"approved",previewedMessageTemplate:"previewedMessageTemplate",decisionTaken:"decisionTaken",replaceReasons:"replaceReasons",decisionDelivery:"decisionDelivery",decision:"decision"},outputs:{unitSupervisorId:"unitSupervisorId"},decls:67,vars:50,consts:[[3,"open"],["slot","header",1,"header",3,"click"],[1,"ion-padding-start"],["slot","content",1,"content","preview"],[1,"info"],[1,"weight-bold"],[1,"info-container","preview"],["size","3",1,"weight-bold"],["size","6"],[4,"ngIf"],["class","decision-reason preview",4,"ngIf"],["class","decision-information preview",4,"ngIf"],[1,"decision-made-by","preview"],[1,"decision-date","preview"],["class","informed-date preview",4,"ngIf"],["class","informed-instruction preview",4,"ngIf"],["slot","end",1,"preview-toggle",3,"ariaLabel","open","click"],[3,"unit","decisionType",4,"ngIf"],[3,"unit","decisionType"],[1,"decision-reason","preview"],["size","12",1,"weight-bold"],["size","12"],[4,"ngIf","ngIfElse"],["otherReasons",""],[1,"decision-information","preview"],[3,"text"],[1,"informed-date","preview"],[1,"informed-instruction","preview"],["size","6",1,"weight-bold"]],template:function(st,nn){1&st&&(o.TgZ(0,"cgi-accordion-item",0)(1,"div",1),o.NdJ("click",function(){return nn.previewOpenToggle=!nn.previewOpenToggle}),o.TgZ(2,"h3",2),o._uU(3),o.ALo(4,"translate"),o.qZA()(),o.TgZ(5,"div",3)(6,"div",4)(7,"h3",5),o._uU(8),o.qZA(),o.TgZ(9,"div",6)(10,"ion-row")(11,"ion-col",7),o._uU(12),o.ALo(13,"translate"),o.qZA(),o.TgZ(14,"ion-col",8)(15,"ion-text"),o._uU(16),o.qZA()()(),o.TgZ(17,"ion-row")(18,"ion-col",7),o._uU(19),o.ALo(20,"translate"),o.qZA(),o.TgZ(21,"ion-col",8)(22,"ion-text"),o._uU(23),o.qZA()()(),o.TgZ(24,"ion-row")(25,"ion-col",7),o._uU(26),o.ALo(27,"translate"),o.qZA(),o.TgZ(28,"ion-col",8)(29,"ion-text"),o._uU(30),o.ALo(31,"date"),o.qZA()()(),o.YNc(32,de,8,7,"ion-row",9),o.YNc(33,Z,7,7,"ng-container",9),o.qZA(),o.YNc(34,Be,5,5,"div",10),o.YNc(35,ut,4,2,"div",10),o.YNc(36,Ve,8,4,"div",11),o.ALo(37,"async"),o.TgZ(38,"div",12)(39,"ion-row")(40,"ion-col",7),o._uU(41),o.ALo(42,"translate"),o.qZA(),o.TgZ(43,"ion-col",8)(44,"ion-text"),o._uU(45),o.qZA(),o.TgZ(46,"ion-text"),o._uU(47),o.ALo(48,"translate"),o.qZA(),o.TgZ(49,"ion-text"),o._uU(50),o.qZA(),o.TgZ(51,"ion-text"),o._uU(52),o.qZA()()()(),o.TgZ(53,"div",13)(54,"ion-row")(55,"ion-col",7),o._uU(56),o.ALo(57,"translate"),o.qZA(),o.TgZ(58,"ion-col",8)(59,"ion-text"),o._uU(60),o.qZA()()()(),o.YNc(61,tt,8,4,"div",14),o.YNc(62,Ne,8,4,"div",15),o.ALo(63,"async"),o.qZA()(),o.TgZ(64,"cgi-toggle-accordion",16),o.NdJ("click",function(){return nn.previewOpenToggle=!nn.previewOpenToggle}),o.ALo(65,"translate"),o.ALo(66,"translate"),o.qZA()()),2&st&&(o.Q6J("open",nn.previewOpenToggle),o.xp6(3),o.hij(" ",o.lcZ(4,25,nn.previewOpenToggle?"Decision.Preview.Hide":"Decision.Preview.Show")," "),o.xp6(5),o.Oqu(nn.getHeaderTitle()),o.xp6(4),o.hij(" ",o.lcZ(13,27,"Form.Label.Child.Name"),""),o.xp6(4),o.hij(" ",nn.decision.childDisplayName," "),o.xp6(3),o.hij(" ",o.lcZ(20,29,"Form.Label.Unit"),""),o.xp6(4),o.hij(" ",nn.decision.unitName," "),o.xp6(3),o.hij(" ",o.lcZ(27,31,"Decision.Preview.Decided.StartDate"),""),o.xp6(4),o.hij(" ",o.xi3(31,33,nn.decision.startDate,nn.dateFormats.FINNISH_ANGULAR)," "),o.xp6(2),o.Q6J("ngIf",nn.decision.endDate),o.xp6(1),o.Q6J("ngIf",nn.approved),o.xp6(1),o.Q6J("ngIf",nn.decisionTaken===nn.decisionTakenEnum.REPLACING),o.xp6(1),o.Q6J("ngIf",!nn.approved),o.xp6(1),o.Q6J("ngIf",nn.decisionInformationText||o.lcZ(37,36,nn.decisionInformationText$)),o.xp6(5),o.hij(" ",o.lcZ(42,38,"Decision.Preview.MadeBy"),""),o.xp6(4),o.hij(" ",(null==nn.decision.details?null:nn.decision.details.decisionMakerName)||"-"," "),o.xp6(2),o.hij(" ",o.lcZ(48,40,null==nn.decision.details?null:nn.decision.details.decisionMakerJobTitle)," "),o.xp6(3),o.hij(" ",null==nn.decision.details?null:nn.decision.details.decisionMakerPhone," "),o.xp6(2),o.hij(" ",null==nn.decision.details?null:nn.decision.details.decisionMakerEmail," "),o.xp6(4),o.hij(" ",o.lcZ(57,42,"Decision.View.Table.Header.DecisionDate"),""),o.xp6(4),o.hij(" ",nn.decision.decisionDate," "),o.xp6(1),o.Q6J("ngIf",nn.decisionDelivery===nn.decisionDeliveryEnum.IMMEDIATE),o.xp6(1),o.Q6J("ngIf",o.lcZ(63,44,nn.templateRectificationText$)),o.xp6(2),o.Q6J("ariaLabel",nn.previewOpenToggle?o.lcZ(65,46,"General.Buttons.Close"):o.lcZ(66,48,"General.Buttons.Open"))("open",nn.previewOpenToggle))},dependencies:[X.wI,X.Nd,X.yW,ve.O5,Y.HtmlRendererComponent,xe,ve.Ov,ve.uU,V.X$],styles:["div.content[_ngcontent-%COMP%]{margin-left:1em;margin-right:1em;border-top:3px solid var(--ion-color-medium-alternative)}.preview[_ngcontent-%COMP%]{padding:2em 0 0 2em}.preview-row[_ngcontent-%COMP%]{margin-top:2em}.info[_ngcontent-%COMP%]{padding-top:2em}ion-text[_ngcontent-%COMP%]{display:flex}ion-col[_ngcontent-%COMP%]{padding:0}.municipality-custom-text[_ngcontent-%COMP%]{padding-bottom:4em}.preview-toggle[_ngcontent-%COMP%]{cursor:pointer}"],changeDetection:0})},52951:(qe,I,p)=>{"use strict";p.d(I,{w:()=>re});var o=p(15861),e=p(88511),l=p(49594),D=p(78033),g=p(28746),E=p(63900),T=p(88692),n=p(94650),P=p(89383),w=p(21940),B=p(31943),Y=p(9116),V=p(70191),ue=p(36895),he=p(47970),ae=p(95922);const X=["decisionsRef"];function ve(me,be){1&me&&n._UZ(0,"sivi-lib-info-popup",16),2&me&&n.Q6J("text","Decision.Title.Info.Approve")}function ye(me,be){1&me&&n._UZ(0,"sivi-lib-info-popup",16),2&me&&n.Q6J("text","Decision.Title.Info.Disapprove")}function ge(me,be){if(1&me){const le=n.EpF();n.TgZ(0,"div",17)(1,"cgi-input",18),n.NdJ("siviChange",function(Oe){n.CHM(le);const j=n.oxw();return n.KtG(j.onChangeOtherReason(Oe,"fi"))}),n.qZA(),n.TgZ(2,"cgi-input",19),n.NdJ("siviChange",function(Oe){n.CHM(le);const j=n.oxw();return n.KtG(j.onChangeOtherReason(Oe,"sv"))}),n.qZA()()}if(2&me){const le=n.oxw();n.xp6(1),n.Q6J("value",null==le.newDecisions[0]||null==le.newDecisions[0].disapprovalOtherReasons?null:le.newDecisions[0].disapprovalOtherReasons.fi)("label",null==le.disapprovalReasonTitles?null:le.disapprovalReasonTitles.fi),n.xp6(1),n.Q6J("value",null==le.newDecisions[0]||null==le.newDecisions[0].disapprovalOtherReasons?null:le.newDecisions[0].disapprovalOtherReasons.sv)("label",null==le.disapprovalReasonTitles?null:le.disapprovalReasonTitles.sv)}}function ne(me,be){if(1&me){const le=n.EpF();n.TgZ(0,"sivi-decision-preview",20),n.NdJ("unitSupervisorId",function(Oe){n.CHM(le);const j=n.oxw();return n.KtG(j.updateUnitSupervisorId(Oe))}),n.qZA()}if(2&me){const le=n.oxw();n.Q6J("approved",le.decisionTaken===le.decisionTakenValues.APPROVING)("decisionTaken",le.decisionTaken)("decisionDelivery",le.selectedDecisionDeliveryOption)("decision",le.previewedDecision)("previewedMessageTemplate",le.previewedMessageTemplate)}}function pe(me,be){if(1&me){const le=n.EpF();n.ynx(0),n.TgZ(1,"div",21)(2,"ion-text"),n._uU(3),n.ALo(4,"translate"),n.qZA(),n.TgZ(5,"ion-button",22),n.NdJ("click",function(){n.CHM(le);const Oe=n.oxw();return n.KtG(Oe.onClose())}),n._uU(6),n.ALo(7,"translate"),n.qZA()(),n.BQk()}2&me&&(n.xp6(3),n.hij(" ",n.lcZ(4,2,"Decision.Error.General")," "),n.xp6(3),n.hij(" ",n.lcZ(7,4,"General.Buttons.Close")," "))}function Pe(me,be){if(1&me){const le=n.EpF();n.TgZ(0,"ion-button",26),n.NdJ("click",function(){n.CHM(le);const Oe=n.oxw(2);return n.KtG(Oe.onMakeDecision())}),n._uU(1),n.ALo(2,"translate"),n.qZA()}if(2&me){const le=n.oxw(2);n.Q6J("disabled",le.showLoader||!le.isDecisionsTableFormValid),n.xp6(1),n.hij(" ",n.lcZ(2,2,"Placement.Applications.Action.MakeDecisions")," ")}}function xe(me,be){if(1&me){const le=n.EpF();n.TgZ(0,"ion-button",26),n.NdJ("click",function(){n.CHM(le);const Oe=n.oxw(2);return n.KtG(Oe.onDisapproveDecisions())}),n.ALo(1,"translate"),n._uU(2),n.ALo(3,"translate"),n.qZA()}if(2&me){const le=n.oxw(2);n.Q6J("disabled",le.showLoader||!le.isDecisionsTableFormValid),n.uIk("aria-label",n.lcZ(1,3,"General.Buttons.Disapprove")),n.xp6(2),n.hij(" ",n.lcZ(3,5,"General.Buttons.Disapprove")," ")}}function de(me,be){if(1&me){const le=n.EpF();n.TgZ(0,"ion-button",23),n.NdJ("click",function(){n.CHM(le);const Oe=n.oxw();return n.KtG(Oe.onClose())}),n._uU(1),n.ALo(2,"translate"),n.qZA(),n.YNc(3,Pe,3,4,"ion-button",24),n.YNc(4,xe,4,7,"ng-template",null,25,n.W1O)}if(2&me){const le=n.MAs(5),Z=n.oxw();n.xp6(1),n.hij(" ",n.lcZ(2,3,"General.Buttons.Cancel")," "),n.xp6(2),n.Q6J("ngIf",Z.decisionTaken===Z.decisionTakenValues.APPROVING)("ngIfElse",le)}}const oe=class extends T.SiviPage{get isDecisionsTableFormValid(){return this.decisionsRef.isValid&&this.selectedDecisions.length>0}constructor(be,le,Z,Oe,j,ke,Be,nt){super(ke,be,Be),this.translate=be,this.staffService=le,this.applicationsDecisionService=Z,this.auth=Oe,this.modalCtrl=j,this.notify=ke,this.router=Be,this.languageService=nt,this.decisionTaken=e.wy.APPROVING,this.selectedDecisions=[],this.showLoader=!1,this.someDecisionsProcessedFailed=!1,this.selectableDecisionDeliveryOptions=[{text:"Decision.Delivery.Immediate",value:e.XG.IMMEDIATE},{text:"Decision.Delivery.Delayed",value:e.XG.DELAYED}],this.selectedDecisionDeliveryOption=e.XG.IMMEDIATE,this.displayOtherReasonFields=!1,this.decisionTakenValues=e.wy}ngOnInit(){this.selectedDecisions=this.newDecisions.map(be=>be.applicationId),this.populateDecisionDisapproveState(),this.initPreviewedDecision(),this.disapprovalReasonTitles=this.getDisapprovalReasonTitles(),this.validatorOptions=this.getValidatorOptions()}onDeliveryOptionChange(be){this.selectedDecisionDeliveryOption=be.detail.value}onClose(){this.modalCtrl.dismiss()}onSelectDecisionForPreview(be){if(this.previewedDecision.placementId!==be){const le=this.newDecisions.find(Z=>Z.placementId===be);this.previewedDecision={...this.mapStaffMemberDataToPreview(le,this.staffMember)}}}onSelectTemplateForPreview(be){this.previewedMessageTemplate=be}onAddSelectedDecisions(be){be.forEach(le=>{this.selectedDecisions.includes(le)||this.selectedDecisions.push(le)})}onRemoveSelectedDecisions(be){this.selectedDecisions=this.selectedDecisions.filter(le=>!be.includes(le))}onUpdateDecisions({placementId:be,...le}){this.newDecisions=this.newDecisions.map(Oe=>Oe.placementId===be?{...Oe,...le}:Oe);const Z=this.newDecisions.some(Oe=>"sivi.application.decision.reason.disapproved.other-reason"===Oe.disapprovalReason);this.displayOtherReasonFields=Z,this.previewedDecision&&this.previewedDecision.placementId===be&&(this.previewedDecision={...this.previewedDecision,...le}),setTimeout(()=>{this.validatorOptions=this.getValidatorOptions()},1)}onChangeOtherReason(be,le){const Oe={...(0,l.Z)(this.newDecisions,"[0].disapprovalOtherReasons"),[le]:be.detail.value};this.onUpdateDecisions({placementId:(0,D.Z)(this.newDecisions).placementId,disapprovalOtherReasons:Oe})}updateUnitSupervisorId(be){this.newDecisions=this.newDecisions.map(le=>({...le,unitSupervisorId:be}))}onMakeDecision(){switch(this.decisionTaken){case e.wy.APPROVING:this.onApproveDecisions();break;case e.wy.DISAPPROVING:this.onDisapproveDecisions();break;default:return}}onApproveDecisions(){var be=this;return(0,o.Z)(function*(){if(!be.isDecisionsTableFormValid)return void(yield be.decisionsRef.markFieldsAsTouched());const le=be.newDecisions.filter(Oe=>be.selectedDecisions.includes(Oe.applicationId)),Z=be.selectedDecisionDeliveryOption===e.XG.IMMEDIATE;be.showLoader=!0,be.applicationsDecisionService.makeDecisions(le,Z).pipe((0,g.x)(()=>be.showLoader=!1)).subscribe(Oe=>be.handleProcessedDecisions(le,Oe,"Decision.Approved.Message.Success"),Oe=>be.handleDecisionsError(Oe,"Decision.Approved.Message.Error"))})()}onDisapproveDecisions(){var be=this;return(0,o.Z)(function*(){if(be.isDecisionsTableFormValid||(yield be.decisionsRef.markFieldsAsTouched()),be.isValid||(yield be.markAllFieldsTouched(be.validatorOptions)),!be.isDecisionsTableFormValid||!be.isValid)return;const le=be.newDecisions.filter(Oe=>be.selectedDecisions.includes(Oe.applicationId)&&Oe.disapprovalReason);be.showLoader=!0;const Z=T.Utils.mapToUniqueArrayObjects(le,"applicationId");be.applicationsDecisionService.disapproveDecisions(Z).pipe((0,g.x)(()=>be.showLoader=!1)).subscribe(Oe=>be.handleProcessedDecisions(le,Oe,"Decision.Disapproved.Message.Success"),Oe=>be.handleDecisionsError(Oe,"Decision.Disapproved.Message.Error"))})()}handleProcessedDecisions(be,le,Z){var Oe=this;return(0,o.Z)(function*(){const j=be.map(nt=>Oe.getIdDependingOnDecisionTaken(nt)),ke=le.map(nt=>Oe.getIdDependingOnDecisionTaken(nt)),Be=Oe.getFailedDecisionIds(j,ke);if(!Be.length)return Oe.notify.toast(Oe.translate.instant(Z)),void Oe.modalCtrl.dismiss(le);Oe.someDecisionsProcessedFailed=!0,Oe.newDecisions=Oe.newDecisions.map(nt=>{const mt=Be.includes(Oe.getIdDependingOnDecisionTaken(nt));return{...nt,decisionFailed:mt}})})()}getIdDependingOnDecisionTaken(be){switch(this.decisionTaken){case e.wy.DISAPPROVING:return be.applicationId;case e.wy.APPROVING:return be.placementId;default:return}}getFailedDecisionIds(be,le){return be.filter(Z=>!le.includes(Z))}handleDecisionsError({error:be},le){var Z=this;return(0,o.Z)(function*(){const Oe=be&&be.messageKey;Oe?Z.notify.alertBackendError(Oe):Z.notify.alert(le)})()}initPreviewedDecision(){this.showLoader=!0,this.getStaffMemberData().pipe((0,g.x)(()=>this.showLoader=!1)).subscribe(be=>{this.showLoader=!1,this.staffMember=be,this.previewedDecision={...this.mapStaffMemberDataToPreview((0,D.Z)(this.newDecisions),this.staffMember)}},be=>{console.error("error initializing previewed decision,",be)})}populateDecisionDisapproveState(){if(this.decisionTaken!==e.wy.DISAPPROVING)return;const be=this.selectableDecisionDeliveryOptions.find(le=>le.value===e.XG.DELAYED);be&&(be.disabled=!0,this.selectedDecisionDeliveryOption=e.XG.IMMEDIATE)}getDisapprovalReasonTitles(){return{fi:`${this.languageService.getTranslationByLocale("Decision.Preview.Decision.Reason","fi")} (FI)`,sv:`${this.languageService.getTranslationByLocale("Decision.Preview.Decision.Reason","sv")} (SV)`}}getStaffMemberData(){return this.auth.getUserPersonData().pipe((0,E.w)(be=>this.staffService.getStaffMember(be.userId)))}mapStaffMemberDataToPreview(be,le){return{...be,details:{decisionMakerName:`${le.firstName} ${le.lastName}`,decisionMakerJobTitle:le.jobTitle,decisionMakerPhone:le.workPhone,decisionMakerEmail:le.workEmail}}}getValidatorOptions(){const be=[];return this.displayOtherReasonFields&&(be.push(this.createValidatorOption("otherReasonFi",(0,l.Z)(this.newDecisions,"[0].disapprovalOtherReasons.fi"),[T.SiviValidators.required])),be.push(this.createValidatorOption("otherReasonSv",(0,l.Z)(this.newDecisions,"[0].disapprovalOtherReasons.sv"),[T.SiviValidators.required]))),be}};let re=oe;oe.\u0275fac=function(le){return new(le||oe)(n.Y36(P.sK),n.Y36(T.StaffService),n.Y36(w.Q),n.Y36(B.e8),n.Y36(T.SiviModalController),n.Y36(T.NotifyService),n.Y36(Y.F0),n.Y36(T.LanguageService))},oe.\u0275cmp=n.Xpm({type:oe,selectors:[["sivi-new-decision-modal"]],viewQuery:function(le,Z){if(1&le&&n.Gf(X,5),2&le){let Oe;n.iGM(Oe=n.CRH())&&(Z.decisionsRef=Oe.first)}},inputs:{newDecisions:"newDecisions",organizations:"organizations",decisionTaken:"decisionTaken"},features:[n.qOj],decls:30,vars:23,consts:[[3,"show"],[1,"decision-container"],[3,"validatorOptions"],["validator",""],[1,"header-div"],[3,"text",4,"ngIf"],[1,"sub-title"],[3,"options","value","horizontalMode","siviChange"],[3,"decisions","previewedDecisionId","selectedDecisions","isNewDecision","decisionTaken","organizations","update","selectForPreview","selectTemplateForPreview","selectDecisions","deselectDecisions"],["decisionsRef",""],["class","other-reason-container",4,"ngIf"],[3,"approved","decisionTaken","decisionDelivery","decision","previewedMessageTemplate","unitSupervisorId",4,"ngIf"],["no-border","","transparent",""],["size","12"],[4,"ngIf","ngIfElse"],["default",""],[3,"text"],[1,"other-reason-container"],["type","text","name","otherReasonFi","label-position","stacked",3,"value","label","siviChange"],["type","text","name","otherReasonSv","label-position","stacked",3,"value","label","siviChange"],[3,"approved","decisionTaken","decisionDelivery","decision","previewedMessageTemplate","unitSupervisorId"],[1,"some-decisions-processed-failed"],["name","close","color","primary","fill","outline","slot","end","size","default",3,"click"],["name","cancel","color","primary","fill","outline","slot","end","size","default",3,"click"],["name","newDecision","slot","end","size","default",3,"disabled","click",4,"ngIf","ngIfElse"],["disapproved",""],["name","newDecision","slot","end","size","default",3,"disabled","click"]],template:function(le,Z){if(1&le&&(n.TgZ(0,"ion-content"),n._UZ(1,"sivi-progress-bar",0),n.TgZ(2,"ion-grid",1)(3,"cgi-validator",2,3)(5,"ion-row",4)(6,"ion-title"),n._uU(7),n.ALo(8,"translate"),n.qZA(),n.YNc(9,ve,1,1,"sivi-lib-info-popup",5),n.YNc(10,ye,1,1,"sivi-lib-info-popup",5),n.qZA(),n.TgZ(11,"ion-row")(12,"ion-col")(13,"div")(14,"h5",6),n._uU(15),n.ALo(16,"translate"),n.qZA()(),n.TgZ(17,"sivi-lib-radio-list",7),n.NdJ("siviChange",function(j){return Z.onDeliveryOptionChange(j)}),n.qZA()()(),n.TgZ(18,"sivi-applications-decision-table",8,9),n.NdJ("update",function(j){return Z.onUpdateDecisions(j)})("selectForPreview",function(j){return Z.onSelectDecisionForPreview(j)})("selectTemplateForPreview",function(j){return Z.onSelectTemplateForPreview(j)})("selectDecisions",function(j){return Z.onAddSelectedDecisions(j)})("deselectDecisions",function(j){return Z.onRemoveSelectedDecisions(j)}),n.qZA(),n.YNc(20,ge,3,4,"div",10),n.YNc(21,ne,1,5,"sivi-decision-preview",11),n.qZA()()(),n.TgZ(22,"ion-footer",12)(23,"ion-grid")(24,"ion-row")(25,"ion-col",13)(26,"ion-toolbar"),n.YNc(27,pe,8,6,"ng-container",14),n.YNc(28,de,6,5,"ng-template",null,15,n.W1O),n.qZA()()()()()),2&le){const Oe=n.MAs(29);n.xp6(1),n.Q6J("show",Z.showLoader),n.xp6(2),n.Q6J("validatorOptions",Z.validatorOptions),n.xp6(4),n.Oqu(n.lcZ(8,19,"Decision.Title")),n.xp6(2),n.Q6J("ngIf",Z.decisionTaken===Z.decisionTakenValues.APPROVING),n.xp6(1),n.Q6J("ngIf",Z.decisionTaken===Z.decisionTakenValues.DISAPPROVING),n.xp6(5),n.Oqu(n.lcZ(16,21,"Decision.Delivery")),n.xp6(2),n.Q6J("options",Z.selectableDecisionDeliveryOptions)("value",Z.selectedDecisionDeliveryOption)("horizontalMode",!0),n.xp6(1),n.Q6J("decisions",Z.newDecisions)("previewedDecisionId",null==Z.previewedDecision?null:Z.previewedDecision.placementId)("selectedDecisions",Z.selectedDecisions)("isNewDecision",!0)("decisionTaken",Z.decisionTaken)("organizations",Z.organizations),n.xp6(2),n.Q6J("ngIf",Z.displayOtherReasonFields),n.xp6(1),n.Q6J("ngIf",Z.previewedDecision),n.xp6(6),n.Q6J("ngIf",Z.someDecisionsProcessedFailed)("ngIfElse",Oe)}},dependencies:[T.InfoPopupComponent,V.YG,V.wI,V.W2,V.fr,V.jY,V.Nd,V.yW,V.wd,V.sr,ue.O5,T.RadioListComponent,he.R,ae.L,P.X$],styles:["sivi-progress-bar[_ngcontent-%COMP%]{display:block;position:fixed;width:100%;z-index:9999}.decision-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:0 24px 48px}.decision-container[_ngcontent-%COMP%]   ion-title[_ngcontent-%COMP%]{color:var(--ion-color-secondary);margin-top:16px;display:flex;font-size:26px;font-weight:300;padding-left:0}.decision-container[_ngcontent-%COMP%]   .sub-title[_ngcontent-%COMP%]{padding-left:.1em}.decision-container[_ngcontent-%COMP%]   .radiobuttons[_ngcontent-%COMP%]{display:flex}.decision-container[_ngcontent-%COMP%]   .radioLabel[_ngcontent-%COMP%]{padding-right:2rem}.decision-container[_ngcontent-%COMP%]   .reasonOptions[_ngcontent-%COMP%]{padding-left:5px}.decision-container[_ngcontent-%COMP%]   .header-div[_ngcontent-%COMP%]{display:inline-flex;padding-left:1px}.decision-container[_ngcontent-%COMP%]   .header-div[_ngcontent-%COMP%]   sivi-lib-info-popup[_ngcontent-%COMP%]{margin-top:auto;margin-left:10px;font-size:26px}.decision-container[_ngcontent-%COMP%]   sivi-decision-preview[_ngcontent-%COMP%]{background-color:var(--ion-color-light);margin-bottom:24px;padding:16px;border-radius:5px;display:block}.other-reason-container[_ngcontent-%COMP%]{padding-bottom:2rem}.some-decisions-processed-failed[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-end}.some-decisions-processed-failed[_ngcontent-%COMP%]   ion-text[_ngcontent-%COMP%]{color:var(--ion-color-danger)}"]})},21940:(qe,I,p)=>{"use strict";p.d(I,{Q:()=>P});var o=p(80529),e=p(39646),l=p(89947),D=p(42884),g=p(88692),E=p(94650),T=p(62669),n=p(53377);const w=class extends l.i{constructor(Y,V,ue){super(Y,V,ue),this.http=Y,this.authService=V,this.environmentService=ue,this.decisionBaseUrl="./api/sivi-ada-api/decision",this.codesBaseUrl="./api/sivi-codes-api/codes"}makeDecisions(Y,V){const ue=this.mapToApproveDecisionsRequestDTO(Y,V);return this.post(`${this.decisionBaseUrl}/approve`,ue)}getDecisions(Y,V,ue){const{pageIndex:he,pageSize:ae}=V,X=this.getCommonPageableSearchOptions(he,ae,ue),ve=this.mapToGetDecisionParams(Y);return Object.keys(ve).map(ye=>{const ge=Array.isArray(ve[ye])?ve[ye]:[ve[ye]];for(const ne of ge)void 0!==ne&&(X.params=X.params.append(ye,ne))}),this.get(`${this.decisionBaseUrl}/list`,X)}informDecisions(Y){const V={...this.getCommonOptions()};return this.post(`${this.decisionBaseUrl}/inform`,Y,V)}downloadSecondDecisionPdf(Y,V,ue){const he=`${this.decisionBaseUrl}/second-pdf`;let ae=(new o.LE).set("decisionId",Y);V&&(ae=ae.set("language",V)),ue&&(ae=ae.set("guardianId",ue));const X={...this.getCommonOptions(),params:ae,responseType:"blob"};return this.get(he,X)}saveModifiedDecision(Y){return console.log("The following decision modification was saved:",Y),(0,e.of)({})}disapproveDecisions(Y){const V=this.mapToDisapproveDecisionsRequestDto(Y);return this.post(`${this.decisionBaseUrl}/disapprove`,V)}getDisapprovedReasons(Y){const V=`${this.codesBaseUrl}/name/sivi.application.decision.reason.disapproved.${Y.toLowerCase()}`;return this.get(V)}getDecision(Y){const V=`${this.decisionBaseUrl}/${Y}`;return this.get(V)}mapToApproveDecisionsRequestDTO(Y,V){return Y.map(ue=>({immediateDelivery:V,placementId:ue.placementId,messageTemplateId:ue.messageTemplateId}))}removeFocusesFromUnitId(Y){try{return Y?Y.includes("#")?Y.split("#")[0]:Y:null}catch(V){return console.error("unitId is not formed as expected",V),null}}mapToDisapproveDecisionsRequestDto(Y){return Y.map(V=>({applicationId:V.applicationId,rejectionReason:V.disapprovalReason,...V.disapprovalOtherReasons&&{reasonTexts:V.disapprovalOtherReasons}}))}mapToGetDecisionParams(Y){const V=D.vQ.getPlacementTypes(Y.decisionTypes),ue=V.indexOf(g.DecisionTypes.PURCHASE);ue>-1&&V.splice(ue,1);const he={municipalityId:[Y.municipalityId],...Y.madeFromDate&&{decisionFrom:[Y.madeFromDate]},decisionUntil:[Y.madeUntilDate],...Y.startFromDate&&{startFrom:[Y.startFromDate]},startUntil:[Y.startUntilDate],decisionTypes:V,informed:Y.informed,status:Y.decisionStatuses,serviceForm:Y.servicesForm,searchParam:[Y.searchParam],twoYear:Y.decisionTypes?D.vQ.isAnyTrial(Y.decisionTypes):null,municipalPurchasePrivateService:Y.decisionTypes&&Y.decisionTypes.length>0?ue>-1:null};return g.Utils.removeEmptyValues(he)}};let P=w;w.\u0275fac=function(V){return new(V||w)(E.LFG(o.eN),E.LFG(T.e),E.LFG(n.L))},w.\u0275prov=E.Yz7({token:w,factory:w.\u0275fac})},15737:(qe,I,p)=>{"use strict";p.d(I,{n:()=>V});var o=p(89947),e=p(32076),l=p(88692),D=p(54004),g=p(95577),E=p(22940),T=p(94650),n=p(80529),P=p(62669),w=p(44438),B=p(89383),Y=p(53377);const ue=class extends o.i{constructor(ae,X,ve,ye,ge){super(ae,X,ge),this.http=ae,this.authService=X,this.weeklyCareTimeService=ve,this.translate=ye,this.environmentService=ge}getAcuteApplications(ae,X,ve){const{municipalityId:ye,childFullName:ge}=ae,{pageIndex:ne,pageSize:pe}=X,xe=this.getCommonPageableSearchOptions(ne,pe,ve),de=xe.params.set("municipalityId",ye).set("childFullName",ge),re={...xe,params:de};return this.get("./api/sivi-ada-api/application-search/acute/",re)}getFilteredApplications(ae,X,ve){const{pageIndex:ye,pageSize:ge}=X,ne=this.getCommonPageableSearchOptions(ye,ge,ve);return this.post("./api/sivi-ada-api/application-search/",ae,ne)}removeApplicationsFromPrePlacement(ae){return this.post("./api/sivi-ada-api/pre-placements/remove-applications-from-pre-placement",ae)}getWeeklyCareTimeCodes(ae){const X=this.weeklyCareTimeService.getCurrentWeeklyCareTimeOptionByMunicipalityId(ae).pipe((0,D.U)(ye=>ye[0]),(0,D.U)(ye=>ye.restWeeklyCareTimeOptionValue)),ve=({option:ye,fromTime:ge,untilTime:ne})=>{const pe=ge&&ne?" "+ge+"-"+ne:"";return this.translate.stream(ye).pipe((0,D.U)(Pe=>Pe+pe),(0,D.U)(Pe=>({id:ye,name:Pe})))};return X.pipe((0,g.z)(ye=>(0,e.D)(ye)),(0,g.z)(ye=>ve(ye)),(0,E.R)((ye,ge)=>l.Utils.patchCollectionBy(ye,ge,"id"),[]))}};let V=ue;ue.\u0275fac=function(X){return new(X||ue)(T.LFG(n.eN),T.LFG(P.e),T.LFG(w.EcecWeeklyCareTimeOptionsService),T.LFG(B.sK),T.LFG(Y.L))},ue.\u0275prov=T.Yz7({token:ue,factory:ue.\u0275fac})},37847:(qe,I,p)=>{"use strict";p.d(I,{w:()=>P});var o=p(49594),e=p(92686),l=p(4128),D=p(39646),g=p(18505),E=p(54004),T=p(70262),n=p(88692);class P extends n.SiviPage{constructor(B,Y,V,ue,he){super(V,B,Y),this.translate=B,this.router=Y,this.notify=V,this.messageTemplateRestService=ue,this.placementCommonService=he,this.templates=[]}getAllApprovalTemplateSelectOptions(B){const Y=[this.messageTemplateRestService.getApprovalTemplatesByType(B,"ecec"),this.messageTemplateRestService.getApprovalTemplatesByType(B,"ppe"),this.messageTemplateRestService.getApprovalTemplatesByType(B,"club"),this.messageTemplateRestService.getApprovalTemplatesByType(B,"voucher")];return(0,l.D)(Y).pipe((0,g.b)(V=>this.templates=V),(0,E.U)(([V,ue,he,ae])=>({ECEC:this.getMessageTemplateSelectOptions(V),PPE:this.getMessageTemplateSelectOptions(ue),CLUB:this.getMessageTemplateSelectOptions(he),VOUCHER:this.getMessageTemplateSelectOptions(ae)})),(0,T.K)(V=>(console.error("getAllApprovalTemplateOptions failed",V),(0,D.of)({}))))}getMessageTemplateSelectOptions(B){const Y=[],V=this.translate.currentLang;if(!B)return[];for(const ue of B)if(ue.type===n.MessageTemplateType.DECISION){let he=ue.languageDescriptions.find(ae=>ae.language===V);!he.templateName&&"fi"!==V&&(he=ue.languageDescriptions.find(ae=>"fi"===ae.language)),Y.push({text:he.templateName,value:ue.id,selected:ue.isDefaultTemplate})}return Y}findDefaultTemplate(B){const Y=(B=B||[]).find(ue=>!0===ue.selected);return(0,o.Z)(Y,"value","")}getExtentAndFullTimeValues(B){const Y=B.detail.paymentExtentId.split("_");return{paymentExtentId:Y[0],fullTime:"fullTime"===Y[1]}}checkComplementingPlacementsInsidePPEPeriod(B){const Y=(0,e.Z)(B,"childId");return Object.keys(Y).map(V=>Y[V]).every(V=>this.validateComplementingPlacementsAreInsidePPEPeriod(V))}validateComplementingPlacementsAreInsidePPEPeriod(B){const Y=ae=>ae.placementType||ae.type,V=[n.ApplicationTypes.C_ECEC,n.ApplicationTypes.VC_ECEC],ue=B.filter(ae=>V.includes(Y(ae))),he=B.filter(ae=>Y(ae)===n.ApplicationTypes.PPE);return!ue.length||!he.length||ue.every(ae=>he.find(X=>this.getComplementingPlacementIsInsidePPEPeriod(X,ae)))}getComplementingPlacementIsInsidePPEPeriod(B,Y){return B.endDate?!!Y.endDate&&(n.Utils.isSameOrAfter(Y.startDate,B.startDate)&&n.Utils.isSameOrBefore(Y.endDate,B.endDate)):n.Utils.isSameOrAfter(Y.startDate,B.startDate)}}},48768:(qe,I,p)=>{"use strict";p.d(I,{T:()=>he});var o=p(80529),e=p(54004),l=p(70262),D=p(89947),g=p(24956),E=p(88511),T=p(49594),n=p(86377),P=p(59378),w=p(94650),B=p(62669),Y=p(53377),V=p(65710),ue=p(65324);const ae=class extends D.i{constructor(ve,ye,ge,ne,pe){super(ve,ye,ge),this.http=ve,this.authService=ye,this.environment=ge,this.placementAdapter=ne,this.placementCommonService=pe,this.ececTypes=[g.Wm.ECEC,g.Wm.ECEC_COMPLEMENTING,g.Wm.ECEC_VOUCHER,g.Wm.ECEC_COMPLEMENTING_VOUCHER],this.basePlacementUrl="./api/sivi-ada-api/placements",this.searchOptions=this.getCommonSearchOptions(),this.desiredOrderActionMenu=[E.Ci.EDIT_PLACEMENT,E.Ci.NEW_PLACEMENT_AND_DECISION,E.Ci.NEW_PLACEMENT_TO_DIFFERENT_UNIT,E.Ci.REPLACE_DECISION,E.Ci.END_PLACEMENT_AND_DECISION,E.Ci.DELETE_PLACEMENT_AND_CANCEL_DECISION,E.Ci.NO_ADDITIONAL_NEED,E.Ci.DECLINE_PLACE,E.Ci.DYNAMIC_ORGANIZATIONS,E.Ci.TO_BE_PLACED,E.Ci.MOVE_TO_ANOTHER_GROUP,E.Ci.MAKE_DECISION]}hasRelatedPlacements(ve,ye=1){return(0,T.Z)(ve,"relatedPlacements",[]).length>=ye}hasBothPPEAndECECTypePlacements(ve){const ye=ve.relatedPlacements;if(ye&&ye.length){const ge=ye.some(pe=>this.placementCommonService.ececTypes.includes(pe.type)),ne=ye.some(pe=>pe.type===g.wW.PPE);return ge&&ne}return!1}getPlacementIds(ve){const ye=[];return(ve||[]).forEach(ge=>this.hasRelatedPlacements(ge)?ge.relatedPlacements.forEach(ne=>ye.push(ne.placementId)):ye.push(ge.id)),ye}getStatistics(ve){const ye=`${this.basePlacementUrl}/info`,ge=(new o.LE).set("municipalityId",ve);return this.get(ye,{...this.searchOptions,params:ge}).pipe((0,e.U)(ne=>this.placementAdapter.adaptStatisticsDate(ne)),(0,l.K)(ne=>this.placementCommonService.handleError(ne)))}getPrivateUnits(ve){const{start:ge,end:ne}=ve,pe=(new o.LE).set("startDate",ge).set("endDate",ne);return this.get("./api/sivi-accounts-api/orgs/daycareplaces/private-units-for-edit-placement-and-replace-decision",{...this.searchOptions,params:pe}).pipe((0,e.U)(Pe=>this.placementAdapter.adaptDaycarePlaces(Pe)),(0,l.K)(Pe=>this.placementCommonService.handleError(Pe)))}getUnits(ve){const{start:ge,end:ne}=ve,pe=(new o.LE).set("startDate",ge).set("endDate",ne);return this.get("./api/sivi-accounts-api/orgs/daycareplaces/permitted/dropdown",{...this.searchOptions,params:pe}).pipe((0,e.U)(Pe=>this.placementAdapter.adaptDaycarePlaces(Pe)),(0,l.K)(Pe=>this.placementCommonService.handleError(Pe)))}getPlacedApplications(ve,ye,ge){const{id:ne}=ye,pe=`${this.basePlacementUrl}/groups-with-placed`,Pe=(new o.LE).set("unitId",ne).set("municipalityId",ve).set("fromDate",ge.start).set("untilDate",ge.end);return this.get(pe,{...this.searchOptions,params:Pe}).pipe((0,e.U)(xe=>this.placementAdapter.adaptPlacedApplications(xe)),(0,l.K)(xe=>this.placementCommonService.handleError(xe)))}getAllGroupsForUnit(ve,ye,ge){const pe=(new o.LE).set("municipalityId",ve).set("fromDate",ye.start).set("untilDate",ye.end).set("daycarePlaceId",ge);return this.get("api/sivi-accounts-api/orgs/daycareplaces/groups-or-itself-if-family-type",{...this.searchOptions,params:pe}).pipe((0,e.U)(Pe=>this.placementAdapter.adaptOrganizations(Pe)),(0,l.K)(Pe=>this.placementCommonService.handleError(Pe)))}getToBePlacedApplications(ve,ye,ge){const{id:ne}=ye,pe=`${this.basePlacementUrl}/to-be-placed`,Pe=(new o.LE).set("municipalityId",ve).set("daycarePlaceId",ne).set("startDate",ge.start).set("endDate",ge.end);return this.get(pe,{...this.searchOptions,params:Pe}).pipe((0,e.U)(xe=>this.placementAdapter.adaptToBePlacedApplications(xe)),(0,l.K)(xe=>this.placementCommonService.handleError(xe)))}createActionOptions(ve,ye,ge=[]){const Pe=[...[...ge],...ye.map(xe=>({id:xe.id,isGroupAction:!0,text:`${ve} ${xe.name}`.trim()}))];return this.sortActionOptions(Pe)}sortActionOptions(ve){return(0,n.Z)(ve,[ye=>{if(ye.isGroupAction)return this.desiredOrderActionMenu.indexOf(E.Ci.DYNAMIC_ORGANIZATIONS);const ge=this.desiredOrderActionMenu.indexOf(ye.id);return-1===ge?this.desiredOrderActionMenu.length:ge},"text"])}moveToAnotherGroup(ve){const ye=`${this.basePlacementUrl}/move-to-another-group`;return this.post(ye,ve)}moveApplicationsToBePlaced(ve){const ye=`${this.basePlacementUrl}/move-to-to-be-placed`,ne={placementIds:this.getPlacementIds(ve)};return this.post(ye,ne).pipe((0,e.U)(()=>this.placementAdapter.setApplicationPlacement(ve)))}noAdditionalNeed(ve,ye){const ge={id:ve,ignoreLastPlacementInUnitValidation:ye},ne=`${this.basePlacementUrl}/no-additional-need`;return this.post(ne,ge)}removePlacementAndCancelDecisions(ve){const ye=`${this.basePlacementUrl}/delete-placement-and-cancel-decision`;return this.post(ye,ve)}declinePlace(ve){const ye=`${this.basePlacementUrl}/decline-placement`,ge={placementIds:ve};return this.post(ye,ge)}moveApplicationsToPlaced(ve,ye){const ge=`${this.basePlacementUrl}/move-to-group`,ne=this.getPlacementIds(ve),{id:pe}=ye,Pe={placementIds:ne,daycarePlaceId:pe};return this.post(ge,Pe).pipe((0,e.U)(()=>this.placementAdapter.setApplicationPlacement(ve,ye)))}moveApplicationsToAnotherGroup(ve,ye){const ge=`${this.basePlacementUrl}/move-to-another-group`,{id:ne}=ye,Pe={placementIds:this.placementCommonService.getRelatedPlacementIds(ve),daycarePlaceId:ne};return this.post(ge,Pe).pipe((0,e.U)(()=>this.placementAdapter.setApplicationPlacement(ve,ye)))}updatePlacement(ve){const ye=`${this.basePlacementUrl}/update`;return this.post(ye,{placements:ve})}getPlacements(ve){const ye={...this.getCommonOptions(),params:new o.LE};return ve.forEach(ge=>ye.params=ye.params.append("ids",ge)),this.get(this.basePlacementUrl,ye)}endExistingAndCreateNewPlacement(ve,ye){const ge={...this.getCommonOptions(),params:(new o.LE).set("immediateDelivery",ye.toString())},ne=`${this.basePlacementUrl}/end-placement-and-create-new`;return this.post(ne,ve,ge)}createNewPlacementAndDecision(ve){const ye=`${this.basePlacementUrl}/create-placement-and-decision`;return this.post(ye,ve)}createNewPlacementToDifferentUnit(ve){const ye=`${this.basePlacementUrl}/create-placement-and-decision-in-different-unit`;return this.post(ye,ve)}updatePlacementsAndReplaceDecisions(ve,ye){const ge=`${this.basePlacementUrl}/update-placement-and-replace-decision`,ne=this.mapToUpdatePlacementsAndReplaceDecisionsDto(ve,ye);return this.post(ge,ne)}endPlacementsAndDecisions(ve){const ye=`${this.basePlacementUrl}/update-placement-and-decision-end-date`,ge={placements:ve.map(ne=>({id:ne.placementId,endDate:ne.endDate}))};return this.put(ge,ye)}getCorrelatedPlacements(ve){const ye=`${this.basePlacementUrl}/correlated`,ge={...this.getCommonOptions(),params:new o.LE};return ve.forEach(ne=>ge.params=ge.params.append("placementIds",ne)),this.get(ye,ge).pipe((0,e.U)(ne=>this.placementAdapter.adaptApplications(ne)),(0,l.K)(ne=>this.placementCommonService.handleError(ne)))}mapToUpdatePlacementsAndReplaceDecisionsDto(ve,ye){return{placements:this.getPlacementsDTO(ve),immediateDelivery:ye,reasonFI:ve[0].replaceReasons.fi,reasonSV:ve[0].replaceReasons.sv}}getPlacementsDTO(ve){return ve.map(ye=>({id:ye.placementId,startDate:ye.startDate,endDate:ye.endDate,messageTemplateId:ye.messageTemplateId,unitSupervisorId:ye.unitSupervisorId,paymentExtentId:ye.extentId,...ye.privateUnitId&&{privateUnitId:ye.privateUnitId},activity:ye.activity,language:ye.language,languageExtent:ye.languageExtent,turnCare:ye.turnCare,...this.ececTypes.includes(ye.placementType)&&{fullTime:ye.fullTime,daily:(0,T.Z)(ye,"daily",!0)}}))}updateUnitsOccupancy(ve=[],ye,ge,ne){const pe=[],xe=[(0,P.Z)(ge),(0,P.Z)(ne)].filter(re=>!re).length;return(0,T.Z)(ye,"length",0)!==xe?(console.warn("Not the same count of occupancies and units to update"),ve):ve?(ve.forEach(re=>{let oe=re.occupancy;const me=(0,T.Z)(ye,"[0]"),be=(0,T.Z)(ye,"[1]"),le=(0,T.Z)(re,"id");(0,T.Z)(ge,"id")===le&&(oe=me||be),(0,T.Z)(ne,"id")===le&&(oe=be||me),pe.push({...re,occupancy:oe})}),pe):(console.warn("Empty list of organizations"),[])}};let he=ae;ae.\u0275fac=function(ye){return new(ye||ae)(w.LFG(o.eN),w.LFG(B.e),w.LFG(Y.L),w.LFG(V.f),w.LFG(ue.$))},ae.\u0275prov=w.Yz7({token:ae,factory:ae.\u0275fac})},92053:(qe,I,p)=>{"use strict";p.d(I,{P:()=>l});var o=p(49594),e=p(24956);class l{static getUnitName(g,E){return E?.find(T=>T.id===g)?.name||""}static isRelatedPlacementInDifferentUnit(g){const E=1===(0,o.Z)(g,"relatedPlacements",[]).length,T=(0,o.Z)(g,"details.type",""),n=[e.wW.PPE,e.wW.PPEWITHECEC].includes(T);return E&&n}}},68261:(qe,I,p)=>{"use strict";p.d(I,{v:()=>B});var o=p(15439),e=p.n(o),l=p(49594),D=p(78033),g=p(24956),E=p(94650),T=p(94973),n=p(25442),P=p(89383),w=p(65324);const Y=class{constructor(ue,he,ae,X){this.applicationUtilsService=ue,this.unitCommonService=he,this.translate=ae,this.placementCommonService=X,this.applicationUtilsService.getLanguageOptions().subscribe(ve=>this.languages=ve,ve=>console.error("getLanguageOptions failed",ve))}mapApplicationsToNewDecisions(ue,he){const ae=[];return ue.forEach(X=>{const ve=(0,l.Z)(X,"selectedUnits[0].organizationFormat",!1)===g.V6.ORGANIZATION_FORMAT_PRIVATE,ye=this.getDecisionTypeBasedOnPlacementType(X.type),ge=(0,D.Z)(X.selectedUnits),ne={tempId:(1e6*Math.random()).toFixed(),decisionType:ye,voucher:ve,typeLong:g.xs[ye],applicationId:X.id,applicationType:X.type,unitName:he?this.getUnitName(ge):this.getUnitText(ge),unitId:ge?ge.id:null,focusAtStart:this.getFocusApplication(ge),fullTime:X.fullTime,municipalityId:X.municipalityId,startDate:X.desiredStartDate,endDate:X.endDate,decisionDate:e()().format(g.E_.FINNISH_MOMENT),informedDate:e()().format(g.E_.FINNISH_MOMENT),childDisplayName:`${X.child.lastName} ${X.child.firstNames}`,extent:X.weeklyHoursOption,address:{},details:{},twoYear:X.twoYear};if(ne.applicationType===g.wW.PPEWITHECEC){const pe=this.createPpeWithEccec(ne);ae.push(...pe)}else ae.push(ne)}),ae}mapPlacementsToNewDecisions(ue,he){const ae=[];return he.forEach(X=>{const{selectedUnit:ve,twoYear:ye}=X,ge=(0,l.Z)(ve,"organizationFormat",""),ne=(0,l.Z)(ve,"daycarePlaceId",""),pe=this.getTempId(ae,X),Pe=this.placementCommonService.getPlacementType(X.type),xe=e()().format(g.E_.FINNISH_MOMENT),de=(0,l.Z)(X,"child.fullName",""),re=(0,l.Z)(X,"child.id",""),oe=(0,l.Z)(X,"application.id"),me=(0,l.Z)(X,"application.type"),be={municipalityId:ue,tempId:pe,decisionType:this.getDecisionTypeBasedOnPlacement(X.type),decisionId:X.decisionId,placementType:X.type,format:ge,activity:X.focus?.activityFocus,language:X.focus?.languageFocus,languageExtent:X.focus?.languageExtent,daycarePlaceId:ne,typeLong:Pe,childId:re,applicationId:oe,applicationType:me,placementId:X.placementId,voucher:X.voucher,unitName:ve?ve.name||ve.displayName:"",unitId:X.daycarePlaceId,startDate:X.startDate,endDate:X.endDate,decisionDate:xe,informedDate:xe,childDisplayName:de,address:{},details:{},...(0,l.Z)(X,"unit.focus.languageExtent")&&{focusAtStart:this.translate.instant(X.unit.focus.languageExtent)},...this.placementCommonService.ececTypes.includes(X.type)&&{ececType:!0,fullTime:X.fullTime},extentId:X.paymentExtentId,turnCare:X.turnCare,daily:X.daily,twoYear:ye};ae.push(be)}),ae}getUnitName(ue){return ue?ue.name:""}getUnitText(ue){return ue?this.unitCommonService.getUnitFocus(ue,this.languages):""}getUnitId(ue,he={}){const ae=(0,l.Z)(he,"type");let X=(0,l.Z)(he,"id");return X===ae&&(X=ue.daycarePlaceId),X}getTempId(ue=[],he){const ae=ue.findIndex(X=>X.applicationId===(0,l.Z)(he,"application.id"));return ae>-1?ue[ae].tempId:(1e6*Math.random()).toFixed()}getDecisionTypeBasedOnPlacement(ue){const he=[g.Wm.ECEC,g.Wm.ECEC_COMPLEMENTING],ae=[g.Wm.ECEC_VOUCHER,g.Wm.ECEC_COMPLEMENTING_VOUCHER];return he.includes(ue)?g.wn.ECEC:ae.includes(ue)?g.wn.VOUCHER:ue}getDecisionTypeBasedOnPlacementType(ue){return[g.Wm.ECEC_VOUCHER,g.Wm.ECEC_COMPLEMENTING].includes(ue)?g.wn.VOUCHER:ue}getFocusApplication(ue){if(!ue)return"-";const{activityFocus:he,languageExtent:ae}=ue;return[he?this.translate.instant(he):null,ae?this.translate.instant(ae):null].filter(ve=>!!ve).join(", ")}getFocusPlacement(ue){return ue?ue.trim().slice(1,-1):"-"}createPpeWithEccec(ue){return[{...ue,tempId:(1e6*Math.random()).toFixed(),placementId:(1e6*Math.random()).toFixed(),isPPEWITHECEC:!0,applicationType:g.wW.PPE,decisionType:g.wn.PPE,typeLong:g.xs[g.wW.PPE]},{...ue,tempId:(1e6*Math.random()).toFixed(),placementId:(1e6*Math.random()).toFixed(),isPPEWITHECEC:!0,applicationType:g.wW.ECEC,decisionType:ue.voucher?g.wn.VOUCHER:g.wn.ECEC,typeLong:ue.voucher?g.rJ[g.wW.VC_ECEC]:g.xs[g.wW.ECEC]}]}};let B=Y;Y.\u0275fac=function(he){return new(he||Y)(E.LFG(T.q),E.LFG(n.e),E.LFG(P.sK),E.LFG(w.$))},Y.\u0275prov=E.Yz7({token:Y,factory:Y.\u0275fac,providedIn:"root"})},65710:(qe,I,p)=>{"use strict";p.d(I,{f:()=>he});var o=p(88692),e=p(54603),l=p(92686),D=p(78033),g=p(49594),E=p(59378),T=p(15439),n=p.n(T),w=(p(42884),p(88511)),B=p(24956),Y=p(94650),V=p(65324),ue=p(89383);const ae=class{constructor(ve,ye){this.placementCommonService=ve,this.translate=ye}adaptStatisticsDate(ve){const ye=n()().toString(),ge=ve||{daycarePlaces:[]},ne=ge.daycarePlaces.filter(pe=>pe.waitingForDecision||pe.toBePlaced).map(pe=>({...pe,displayName:this.getDisplayNameForOrganization(pe.name,pe.serviceFormat)}));return{...ge,lastUpdate:ye,daycarePlaces:ne}}adaptDaycarePlaces(ve){const ye=(ve||[]).map(ge=>({...ge,displayName:this.getDisplayNameForOrganization(ge.name,ge.format),...ge.format&&{organizationFormat:ge.format}}));return this.placementCommonService.sortByUnitsName(ye)}getDisplayNameForOrganization(ve,ye){const ge=this.translate.instant(B.V6.ORGANIZATION_FORMAT_PRIVATE);return ye===B.V6.ORGANIZATION_FORMAT_PRIVATE?`${ve} (${ge})`:ve}setApplicationPlacement(ve,ye={}){const{focusId:ge}=ye;return(ve||[]).map(ne=>({...ne,placementId:ge,checked:!1,state:w.zC.TO_BE_IN_GROUP}))}adaptPlacedApplications(ve){const ye={occupancy:{},groups:[],toBeInGroup:[],inGroup:[],ended:[]},{groups:ge,occupancy:ne}=ve;return ye.occupancy=ne,ye.groups=this.adaptOrganizations(ge),ge.forEach(pe=>{ye.toBeInGroup.push(...this.adaptApplications(pe.toBeInGroup.map(Pe=>({...Pe,state:w.zC.TO_BE_IN_GROUP})))),ye.inGroup.push(...this.adaptApplications(pe.inGroup.map(Pe=>({...Pe,state:w.zC.IN_GROUP})))),ye.ended.push(...this.adaptApplications(pe.ended.map(Pe=>({...Pe,state:w.zC.ENDED}))))}),ye}adaptToBePlacedApplications(ve){return this.adaptApplications(ve,!0)}unGroupIfComplementingOrVoucherComplementing(ve){const ye={},ge=Object.keys(ve);for(const ne of ge){const pe=ve[ne],Pe=pe.find(de=>de.type===B.wW.PPE),xe=pe.find(de=>this.placementCommonService.isComplementingOrVoucherComplementing(de.type));if(Pe&&xe&&xe.daycarePlaceId!==Pe.daycarePlaceId)for(const de of pe)ye[ne+de.placementId+de.type]=[de];else ye[ne]=pe}return ye}adaptApplications(ve,ye=!1){if(!ve)return[];const ge=o.Utils.getTodayDateISO(),ne=(0,e.Z)(ve,["startDate"]),pe=(0,l.Z)(ne,"correlationId"),Pe=this.unGroupIfComplementingOrVoucherComplementing(pe);return Object.keys(Pe).reduce((xe,de)=>{const re=this.setPPEFirst(Pe[de]),oe=(0,D.Z)(re),{application:me,child:be,startDate:le,daycarePlaceId:Z,placementId:Oe,state:j,correlationId:ke}=oe,Be=this.getDetails(oe),nt=this.getPlacementChildInfo(be,le,ge,ye),mt=ye?null:Z,ut=(0,g.Z)(me,"id",null),Ve=(0,E.Z)(me),Ne={id:Oe,relatedPlacements:re,state:j,correlationId:ke,daycarePlaceId:Z,applicationId:ut,placementId:mt,details:Be,child:nt,applicationState:(0,g.Z)(me,"state"),isVATJ:Ve};return xe.concat(Ne)},[])}adaptOrganizations(ve){return(0,E.Z)(ve)?[]:ve.map(ye=>{const{id:ge,areaName:ne,name:pe,format:Pe,ececPlaces:xe,ppePlaces:de,occupancy:re,openingHours:oe,focuses:me,validPeriodIssue:be,validFrom:le,validTo:Z}=ye;return{id:ge,name:ne?`${pe} (${ne})`:pe,displayName:this.getDisplayNameForOrganization(pe,Pe),numberOfECECPlaces:xe||0,numberOfPPEPlaces:de||0,occupancy:re,openingHours:oe,focuses:me,validPeriodIssue:be,periodValidFrom:le,periodValidUntil:Z}})}setPPEFirst(ve){const ye=[];return(ve||[]).forEach(ge=>{ge.type===B.wW.PPE?ye.unshift(ge):ye.push(ge)}),ye}getDetails(ve){const{application:ye,child:ge,startDate:ne,endDate:pe,twoYear:Pe}=ve,{type:xe,commentsCount:de,hasNotes:re,languages:oe,careTimeTypes:me,preferredPlaces:be}=ye||{},{siblingsAtSameUnit:le}=ge,Z=!!ve.decisionId,Oe=be||[];return{type:xe,siblingsAtSameECECPlace:le,decisionMade:Z,comments:de,hasNotes:re,language:oe,startDate:ne,endDate:pe,twoYear:Pe,weeklyEcecTimes:me,preferredPlace:(Oe.find(Be=>0===Be.preferenceChoice)||{}).name,places:(()=>Oe.filter(Be=>!!Be&&Be.id).map(Be=>({...Be,organizationId:Be.id,name:this.placementCommonService.getSelectedOrganizationName(Be.name,Be.familyDaycare),organizationFormat:Be.organizationFormat,languageExtent:(0,g.Z)(Be,"languageExtent"),activityFocus:(0,g.Z)(Be,"activityFocus"),languageFocus:(0,g.Z)(Be,"languageFocus")})))()}}getPlacementChildInfo(ve,ye,ge,ne){return{id:ve.id,displayName:ve.fullName,underlineName:!!ne&&o.Utils.isSameOrBefore(ye,ge),birthday:ve.birthday,age:ve.childAgeAtDesiredDate,supportNeed:ve.supportNeed,tooYoung:ve.tooYoung,notLivingCurrentMunicipality:ve.notLivingInCurrentMunicipality}}};let he=ae;ae.\u0275fac=function(ye){return new(ye||ae)(Y.LFG(V.$),Y.LFG(ue.sK))},ae.\u0275prov=Y.Yz7({token:ae,factory:ae.\u0275fac})},65324:(qe,I,p)=>{"use strict";p.d(I,{$:()=>xe});var o=p(39646),e=p(39841),l=p(4128),D=p(80529),g=p(49594),E=p(59378),T=p(78033),n=p(76224),P=p(74744),w=p(54004),B=p(34782),Y=p(89947),V=p(33053),ue=p(15439),he=p.n(ue),ae=p(88511),X=p(88692),ve=p(42884),ye=p(94650),ge=p(89383),ne=p(62669),pe=p(53377),Pe=p(44438);const de=class extends Y.i{constructor(oe,me,be,le,Z,Oe,j,ke,Be){super(me,be,le),this.translate=oe,this.http=me,this.authService=be,this.environment=le,this.organizationService=Z,this.translateService=Oe,this.ececExtentOptionsService=j,this.languageService=ke,this.notify=Be,this.placementTypes=V.rJ,this.ececTypes=[V.Wm.ECEC,V.Wm.ECEC_COMPLEMENTING,V.Wm.ECEC_VOUCHER,V.Wm.ECEC_COMPLEMENTING_VOUCHER],this.baseOccupanciesUrl="./api/sivi-ada-api/occupancies",this.basePlacementsUrl="./api/sivi-ada-api/placements",this.languageService.getUserLanguage().subscribe(nt=>this.locale=nt)}findPlacementOverlapsAndGaps(oe,me,be){const le=be?"?rulesForMoveToPlacement=true":"",Z=`${this.basePlacementsUrl}/overlapping-and-gaps-placements${le}`,Oe=oe.map(j=>this.getOverlappingPlacementsDTO(j,me));return this.post(Z,Oe)}hasAnyOverlaps(oe){let me=!1;return oe.forEach(be=>{me||(me=!!(0,g.Z)(be,"overlapping",[]).find(le=>le.similarPlacementType))}),me}getFromUntilDates(oe){if(!oe)return{start:null,end:null};const me=oe.map(Z=>Z.details.desiredStartDate).sort((Z,Oe)=>X.Utils.compareByDate(Z,Oe,"asc"));return{start:me[0],end:me.reverse()[0]}}sortByUnitsName(oe){return oe?oe.sort((me,be)=>(0,g.Z)(me,"name","").localeCompare((0,g.Z)(be,"name",""),"fi",{sensitivity:"base"})):[]}handleError(oe){return this.notify.alertBackendError(oe),(0,o.of)([])}getEarliestStartDate(oe,me="-"){if(!oe)return me;const be=oe.some(Oe=>!Oe.startDate),le=oe.map(Oe=>he()(Oe.startDate)),Z=he().min(le);return be?me:Z.format(X.DateFormats.FINNISH_MOMENT)}getLatestEndDate(oe,me="-"){if(!oe)return me;const be=oe.some(Oe=>!Oe.endDate),le=oe.map(Oe=>he()(Oe.endDate)),Z=he().max(le);return be?me:Z.format(X.DateFormats.FINNISH_MOMENT)}checkHasAnyPlacementStarted(oe,me){return oe.some(be=>X.Utils.isSameOrBefore(be.startDate,me))}moveBackToHandling(oe){return this.post(`${this.basePlacementsUrl}/move-back-to-in-handling`,{applicationIds:oe})}returnTooltipForNotes(oe){return(0,g.Z)(oe,"details.comments",0)>0?this.translate.instant("Application.View.Comments.Title")+", "+this.translate.instant("Application.View.Notes.Title"):this.translate.instant("Application.View.Notes.Title")}getOccupancyFirstDesiredStartDate(oe){const{id:me,activityFocus:be,languageFocus:le,languageExtent:Z}=oe,Oe=`${this.baseOccupanciesUrl}/first-placement-start-date`;let j=(new D.LE).set("daycarePlaceId",me);be&&(j=j.set("activity",be)),le&&(j=j.set("language",le)),Z&&(j=j.set("languageExtent",Z));const ke={headers:this.getCommonSearchOptions().headers,params:j};return this.get(Oe,ke)}isAnyPlacementWithVoucher(oe){for(const me of oe)if((0,g.Z)(me,"relatedPlacements",[]).find(le=>[V.wW.V_ECEC,V.wW.VC_ECEC].includes(le.type)))return!0;return!1}getOrganizationOccupancy(oe,me,be,le,Z){const Oe=this.getCommonPageableSearchOptions(be,le,Z),{start:j,end:ke}=me,{id:Be}=oe,nt=Oe.params.set("daycarePlaceId",Be).set("from",j).set("until",ke),mt={...Oe,params:nt};return this.get(this.baseOccupanciesUrl,mt)}getSelectedOrganizationName(oe,me){return me?`${this.translateService.instant("ECEC.Application.Instructions.FamilyDaycare")} (${oe})`:oe}getDecisionFocus(oe,me=!1){const be=`${this.translateService.instant("Placement.View.NoFocus")}`;if(!oe)return be;const le=[];oe.validFrom&&le.push(he()(oe.validFrom).format(X.DateFormats.FINNISH_MOMENT)),oe.validTo&&le.push(he()(oe.validTo).format(X.DateFormats.FINNISH_MOMENT));const Z=[];oe.activity&&Z.push(this.translateService.instant(oe.activity)),oe.language&&Z.push(this.languageService.getLanguagesText([oe.language])),oe.languageExtent&&Z.push(this.translateService.instant(oe.languageExtent));let Oe=(0,E.Z)(Z)?be:Z.join(", ");return Oe+=me?` ${le.join("-")}`:"",`${Oe}`}getOrganizationFocus(oe){if(!oe)return"-";const me=[];let be="";return oe.activityFocus&&me.push(this.translateService.instant(oe.activityFocus)),oe.languageExtent&&me.push(this.translateService.instant(oe.languageExtent)),oe.languageFocus&&me.push(this.languageService.getLanguagesText([oe.languageFocus])),be=me.join(", "),be}isPlacementPPEStartingInFuture(oe,me){if((0,E.Z)(oe))return!1;const be=[V.wW.PPE,...V.wW.ALL_PLACEMENT_TYPES],le=Z=>X.Utils.isSameOrAfter(Z.startDate,me)&&be.includes(Z.type);return oe.every(Z=>Z.relatedPlacements?Z.relatedPlacements.every(Oe=>le(Oe)):le(Z))}isFamilyOrGroupFamilyDaycareUnit(oe){return oe&&-1!==[V.V6.DAYCAREPLACE_TYPE_FAMILY_DAYCARE,V.V6.DAYCAREPLACE_TYPE_GROUP_FAMILY_DAYCARE].indexOf(oe.type)}isGroupFamilyDaycareUnit(oe){return oe&&oe.type===V.V6.DAYCAREPLACE_TYPE_GROUP_FAMILY_DAYCARE}isFamilyDaycareUnit(oe){return oe&&oe.type===V.V6.DAYCAREPLACE_TYPE_FAMILY_DAYCARE}getPlacementType(oe){return this.placementTypes[oe]||"-"}getPlacementExtentSelectOptions(oe,me){const be=[],le=[V.Wm.ECEC_VOUCHER,V.Wm.ECEC_COMPLEMENTING_VOUCHER].includes(me);return oe.forEach(Z=>{if(this.getCareNeedOptions(Z,le)){const Oe=this.getBaseExtentText(Z,le);be.push({text:Oe+this.translateService.instant("ECEC.Payment.Extent.Option.PartTime"),value:Z.id+"_partTime"}),be.push({text:Oe+this.translateService.instant("ECEC.Payment.Extent.Option.FullTime"),value:Z.id+"_fullTime"})}else{let Oe="";Oe=le?Z.privatePartTime?"_partTime":"_fullTime":Z.partTime?"_partTime":"_fullTime",be.push({text:this.getExtentOptionsLabel(Z,le),value:Z.id+Oe})}}),be}getCareNeedOptions(oe,me){return me?oe.privateFullTime&&oe.privatePartTime:oe.fullTime&&oe.partTime}getExtentOptionsLabel(oe,me){return this.getBaseExtentText(oe,me)+this.getPartTimeOrFullTimeLabel(oe,me)}getPartTimeOrFullTimeLabel(oe,me){if(me){if(oe.privatePartTime)return this.translateService.instant("ECEC.Payment.Extent.Option.PartTime");if(oe.privateFullTime)return this.translateService.instant("ECEC.Payment.Extent.Option.FullTime")}return oe.partTime?this.translateService.instant("ECEC.Payment.Extent.Option.PartTime"):oe.fullTime?this.translateService.instant("ECEC.Payment.Extent.Option.FullTime"):"-"}getBaseExtentText(oe,me){return me?oe.overHoursPerWeekPrivateECEC+"-"+oe.maxHoursPerWeekPrivateECEC+"h, ":oe.overHoursPerWeekECEC+"-"+oe.maxHoursPerWeekECEC+"h, "}getPlacementExtentOptions(oe,me){const be=this.getExtentOptionCalls(oe,me);return(0,e.a)(be).pipe((0,w.U)(([le,Z])=>({ECEC:le,PPEWITHECEC:Z})),(0,B.d)())}getExtentOptionCalls(oe,me){const be=[];return["ECEC","PPEWITHECEC"].forEach(Z=>{be.push(this.getExtentOptions(Z,oe,me))}),be}getExtentOptions(oe,me,be){return(0,T.Z)(me)?(oe=this.getExtentOptionType(oe),this.ececExtentOptionsService.getExtentOptionsByMunicipalityId(be,oe).pipe((0,w.U)(Z=>X.Utils.sortArrayByDate(Z)))):(0,o.of)([])}getAllExtentOptions(oe){const me=this.ececExtentOptionsService.getExtentOptionsByMunicipalityId(oe,V.wW.ECEC).pipe((0,w.U)(le=>X.Utils.sortArrayByDate(le))),be=this.ececExtentOptionsService.getExtentOptionsByMunicipalityId(oe,V.wW.PPEWITHECEC).pipe((0,w.U)(le=>X.Utils.sortArrayByDate(le)));return(0,l.D)([me,be]).pipe((0,w.U)(([le,Z])=>({ECEC:le,PPEWITHECEC:Z})))}getExtentOptionType(oe){const me=[V.Wm.ECEC,V.Wm.ECEC_VOUCHER],be=[V.Wm.ECEC_COMPLEMENTING,V.Wm.ECEC_COMPLEMENTING_VOUCHER];return me.includes(oe)?"ECEC":be.includes(oe)?"PPEWITHECEC":oe}getMunicipalitySettingsOptionsByDate(oe,me,be){if(!oe)return;const le=this.getMunicipalityExtentOption(me,oe[this.getExtentOptionType(be)]);return le?this.getPlacementExtentSelectOptions(le.paymentExtentValues,be):[]}isNotEmpty(oe){return null!=oe}getMunicipalityExtentOption(oe,me){return(me=me||[]).find(le=>X.Utils.dateIsBetween(oe,le.fromDate,le.validUntil))||me.find(le=>!le.validUntil)}getDecisionTypeBasedOnPlacement(oe){const me=[V.Wm.ECEC,V.Wm.ECEC_COMPLEMENTING],be=[V.Wm.ECEC_VOUCHER,V.Wm.ECEC_COMPLEMENTING_VOUCHER];return me.includes(oe)?V.wn.ECEC:be.includes(oe)?V.wn.VOUCHER:oe}getRelatedPlacementIds(oe){return oe.reduce((me,be)=>me.concat(be.relatedPlacements.map(le=>le.placementId)),[])}formatPlacements(oe,me){const be=oe.placements;if(!be)throw new Error("formatPlacements failed, no placements found for this application");const le=ke=>ke?he()(ke).format(X.DateFormats.FINNISH_MOMENT):"",Oe=be.find(ke=>ke.state===ae.zC.IN_GROUP),j=be.find(ke=>ke.state===ae.zC.TO_BE_IN_GROUP);if(Oe&&j){const ke=`\n        ${this.translate.instant("In.This.Group")}\n        ${le(Oe.startDate)} -\n        ${le(Oe.endDate)}`,Be=`\n        ${this.translate.instant("And.To.Be.In.Group")}\n        ${(ke=>{const Be=me.find(nt=>nt.id===ke);return Be?`"${Be.name}"`:""})(j.groupId)}\n        ${le(j.startDate)} -\n        ${le(j.endDate)}`;return{placementText:ke+Be,hasFuturePlacement:!0}}if(Oe&&!j)return{placementText:`\n        ${this.translate.instant("In.This.Group")}\n        ${le(Oe.startDate)} -\n        ${le(Oe.endDate)}`,hasFuturePlacement:!1};console.error("formatPlacements failed, no current or future placements found")}checkTypeSimilarity(oe,me){const be=[V.wW.C_ECEC,V.wW.ECEC,V.wW.V_ECEC,V.wW.VC_ECEC];return be.includes(me)?be.includes(oe)&&be.includes(me):oe===me}getPlacementTypeFilter(oe,me,be=!1){const le=[...new Set(oe)],Z=le.length>1,Oe=me?V.wW.VC_ECEC:V.wW.C_ECEC;return Z&&!be?[Oe]:le}getPlacementTypeSelectOptions(oe,me,be,le=!1,Z=[]){const Oe=le?this.getPlacementForDifferentUnitTypesDictionary(oe):this.getPlacementTypesDictionary(oe,be),j=le?(0,n.Z)(me.map(ke=>Oe[ke])):Oe[(0,T.Z)(me)];return this.getAllPlacementTypeOptions().filter(ke=>(j||[]).includes(ke.value)&&!Z.includes(ke.value))}getPlacementTypesDictionary(oe,me){const be=[V.wW.V_ECEC,V.wW.VC_ECEC],le=[V.wW.ECEC,V.wW.C_ECEC],Z={[ve.nx.VC_ECEC]:[V.wW.PPE,V.wW.V_ECEC,V.wW.VC_ECEC],[ve.nx.C_ECEC]:[V.wW.PPE,V.wW.ECEC,V.wW.C_ECEC],[ve.nx.CLUB]:[V.wW.CLUB]},Oe={[ve.nx.ECEC]:[V.wW.ECEC,V.wW.C_ECEC],[ve.nx.PPE]:[V.wW.PPE,V.wW.ECEC,V.wW.C_ECEC]},j={[ve.nx.V_ECEC]:[V.wW.V_ECEC,V.wW.VC_ECEC],[ve.nx.PPE]:[V.wW.PPE,V.wW.V_ECEC,V.wW.VC_ECEC]},ke=me?{[ve.nx.C_ECEC]:[V.wW.ECEC],[ve.nx.VC_ECEC]:[V.wW.V_ECEC],[ve.nx.PPE]:oe?be:le}:{};return oe?{...Z,...j,...ke}:{...Z,...Oe,...ke}}getPlacementForDifferentUnitTypesDictionary(oe){return{[ve.nx.PPE]:[...oe?[V.wW.VC_ECEC]:[V.wW.C_ECEC]],[ve.nx.ECEC]:[V.wW.ECEC],[ve.nx.C_ECEC]:[...oe?[]:[V.wW.ECEC]],[ve.nx.V_ECEC]:[],[ve.nx.VC_ECEC]:[]}}getUnitFormatsForPlacementInDifferentUnitDictionary(){return{[ve.nx.PPE]:[V.V6.ORGANIZATION_FORMAT_PUBLIC,V.V6.ORGANIZATION_FORMAT_PRIVATE],[ve.nx.ECEC]:[V.V6.ORGANIZATION_FORMAT_PUBLIC],[ve.nx.C_ECEC]:[V.V6.ORGANIZATION_FORMAT_PUBLIC],[ve.nx.V_ECEC]:[V.V6.ORGANIZATION_FORMAT_PRIVATE],[ve.nx.VC_ECEC]:[V.V6.ORGANIZATION_FORMAT_PRIVATE]}}getAllPlacementTypeOptions(){return[{text:this.translate.instant(V.rJ.PPE),value:V.wW.PPE},{text:this.translate.instant(V.rJ.CLUB),value:V.wW.CLUB},{text:this.translate.instant(V.rJ.ECEC),value:V.wW.ECEC},{text:this.translate.instant(V.rJ.C_ECEC),value:V.wW.C_ECEC},{text:this.translate.instant(V.rJ.V_ECEC),value:V.wW.V_ECEC},{text:this.translate.instant(V.rJ.VC_ECEC),value:V.wW.VC_ECEC}]}mapStaffMemberDataToPreview(oe,me){return{...oe,details:{decisionMakerName:`${me.firstName} ${me.lastName}`,decisionMakerJobTitle:me.jobTitle,decisionMakerPhone:me.workPhone,decisionMakerEmail:me.workEmail}}}mapOverlapsAndGapsToValidationResult(oe,me){const{unitId:be,todayDate:le}=me,Z=this.getOverlapsInCurrentUnit(oe,me),Oe=(oe.overlapping||[]).filter(rn=>rn.unitId!==be),j=!!oe.leftSideGap||!!oe.rightSideGap,ke=oe.anyStartedSameOrSimilarPlacements,Be=Z.length>0,nt=0===Z.length&&j,mt=1===Z.length,ut=Z.length>1,Ve=this.checkIsOverlappingPlacementInFuture(Z,le);return{overlapsOtherUnits:Oe,overlapsTargetUnit:Z,gap:j,similarTypePlacementStarted:ke,hasOverlapsInTargetUnit:Be,gapAndNoOverlaps:nt,oneOverlapping:mt,moreThanOneOverlapping:ut,overlappingInFuture:Ve,showOverlappingInFutureAlert:mt&&Ve,showConfirmEndExistingPrompt:mt&&!Ve,showGapWarning:nt&&ke,showEditAndReplaceAlert:j&&!ke,basePlacementId:this.getBasePlacementId(Z,me)}}getBasePlacementId(oe,me){const{existingPlacement:be,newPlacement:le,todayDate:Z}=me;if(!le)return null;const Oe=be.selectedUnit.id!==le.unitId;if(!oe?.length)return Oe?this.getBasePlacementIdForNewPlacementInDifferentUnit(be,le):this.getPlacementIdFromExistingPlacements(be,le,Z);const j=this.getAllLeftSideOverlapping(oe,le.startDate);return j.length>1||Oe&&oe.length>=1?null:1===j.length?(0,T.Z)(j).placementId:be.id}getPlacementIdFromExistingPlacements(oe,me,be){const le=oe.relatedPlacements;let Z="";if(1===le.length&&(Z=(0,T.Z)(le).placementId),le.length>1){const Oe=(ke,Be)=>{const nt=this.checkTypeSimilarity(ke,Be.type),mt=X.Utils.isSameOrBefore(Be.startDate,be);return nt&&mt},j=le.find(ke=>Oe(me.placementType,ke));if(j)Z=j.placementId;else{const ke=le.find(Be=>X.Utils.isSameOrBefore(Be.startDate,be));Z=ke?ke.placementId:oe.id}}return Z}getBasePlacementIdForNewPlacementInDifferentUnit(oe,me){const be={[V.wW.ECEC]:[ve.nx.ECEC,ve.nx.C_ECEC],[V.wW.VC_ECEC]:[ve.nx.PPE],[V.wW.C_ECEC]:[ve.nx.PPE]},le=oe.relatedPlacements,Z=be[me.placementType],Oe=le.find(j=>(Z||[]).includes(j.type));return Oe?Oe.placementId:null}getAllLeftSideOverlapping(oe,me){return oe.filter(be=>X.Utils.isSameOrBefore(be.startDate,me))}getOverlapsInCurrentUnit(oe,me){const{unitId:be}=me,le=(oe.overlapping||[]).filter(Oe=>{const j=Oe.similarPlacementType,ke=Oe.unitId===be;return j&&ke});return le.reduce((Oe,j)=>j.groups&&j.groups.length?Oe.concat(((Oe,j,ke)=>Oe.map(Be=>({...Be,placementId:j,placementType:ke})))(j.groups,j.placementId,j.placementType)):[...Oe,j],[])}checkIsOverlappingPlacementInFuture(oe,me){if(!(0,g.Z)(oe,"length"))return!1;const be=(0,T.Z)(oe).startDate;return X.Utils.isAfter(be,me)}getOverlappingPlacementsText(oe){const me=Oe=>this.translate.instant(V.rJ[Oe]),be=Oe=>Oe?X.Utils.convertDateToFinnishStandard(Oe,X.DateFormats.FINNISH_MOMENT):"";return`<b>${this.translate.instant("New.Placement.And.Decision.Overlapping.Placements.Found")}:</b>\n`+oe.map(Oe=>`${me(Oe.placementType)}, ${be(Oe.startDate)} - ${be(Oe.endDate)}`).join(" \n")}getOverlappingPlacementsDTO(oe,me){const le=(0,P.Z)(oe,["unitId","childId","startDate","endDate","placementType"]),{unitId:Z}=le;return me?{...le,unitId:Z,ignorePlacementId:me}:le}getEcecUsageOptions(){return[{value:!0,text:this.translate.instant("ECEC.Application.EcecUsage.Option.Daily")},{value:!1,text:this.translate.instant("ECEC.Application.EcecUsage.Option.PartWeek")}]}getFocusOptionsOnPlacementStartDate(oe,me){const be=oe.map(le=>{const{startDate:Z,placementId:Oe}=le;return this.organizationService.getUnitFocusesOnDate(me,Z).pipe((0,w.U)(j=>({selectOptions:this.getFocusSelectOptions(j),placementId:Oe})))});return(0,l.D)(be).pipe((0,w.U)(le=>le.reduce((Z,Oe)=>(Z[Oe.placementId]=Oe,Z),{})))}addOneDay(oe){return he()(oe).add(1,"day").format(X.DateFormats.STANDARD)}subtractOneDay(oe){return he()(oe).subtract(1,"day").format(X.DateFormats.STANDARD)}isComplementingOrVoucherComplementing(oe){return[V.Wm.ECEC_COMPLEMENTING,V.Wm.ECEC_COMPLEMENTING_VOUCHER].includes(oe)}getFocusOptionsForPlacement(oe,me){const{startDate:be,placementId:le}=oe;return this.organizationService.getUnitFocusesOnDate(me,be).pipe((0,w.U)(Z=>({selectOptions:this.getFocusSelectOptions(Z),placementId:le})))}getFocusSelectOptions(oe){if(!oe)return[];const me=Z=>{const{activity:Oe,language:j,languageExtent:ke}=Z;return`${Oe}#${j}#${ke}`};return[...oe.map(Z=>({value:me(Z),text:this.getFocusText(Z)})),{value:"undefined#undefined#undefined",text:this.translate.instant("Placement.View.NoFocus")}]}getFocusText({activity:oe,language:me,languageExtent:be},le=!0){const Z=[];return oe&&Z.push(this.translate.instant(oe)),me&&Z.push(this.translate.instant(this.languageService.getLanguagesText([me]))),be&&Z.push(this.translate.instant(be)),Z.join(", ")||(le?this.translate.instant("Placement.View.NoFocus"):"")}getFocusValue(oe,me){const{activity:be,language:le,languageExtent:Z}=oe,Oe=`${be}#${le}#${Z}`;return me[oe.placementId]?.selectOptions.find(ke=>ke.value===Oe)?Oe:"undefined#undefined#undefined"}mapApplicationTableElementsToPlacementApplications(oe){return oe.map(me=>({child:{id:me.childId,displayName:me.childFullName},details:{desiredStartDate:me.desiredDate,selectedUnit:me.preferenceFirst}}))}mapApplicationTableElementsToPlacements(oe){return oe.map(me=>({childId:me.childId,unitId:me.selectedUnits[0].id,unitName:me.preferenceFirst,startDate:me.desiredDate,placementType:me.type}))}mapToOverlappingTableModel(oe,me,be,le,Z=!1){if(!oe||!me)return[];const Oe=[],j=({startDate:ke,endDate:Be})=>[...ke?[he()(ke).format(X.DateFormats.FINNISH_MOMENT)]:[],...Be?[he()(Be).format(X.DateFormats.FINNISH_MOMENT)]:[]].join(" / ");for(const ke of oe)if(ke.overlapping&&ke.overlapping.length>0){const Be=me.find(nt=>nt.child.id===ke.childId);if(!Be)return void console.error("mapToOverlappingTableModel function not found application");for(const nt of ke.overlapping){const mt=(0,g.Z)(Be,"child.displayName"),ut=le.find(st=>st.childId===ke.childId),Ve=this.getTypeOfPreplacement(Z,nt,ut),tt=this.translate.instant(`Application.Type.${Ve}`),Ne=be.find(st=>st.id===ut.unitId),wt=(0,g.Z)(Ne,"name"),ft=(0,g.Z)(Be,"details.desiredStartDate"),Ct=be.find(st=>st.id===nt.unitId),rn=(0,g.Z)(Ct,"name"),He=j(nt);Oe.push({childName:mt,typeOfPrePlacement:tt,prePlacementUnit:wt,desiredStartDate:ft,overlappingUnit:rn,overlappingDates:He})}}return Oe}getTypeOfPreplacement(oe,me,be){return oe?me.foundForPlacementType:be.placementType}};let xe=de;de.\u0275fac=function(me){return new(me||de)(ye.LFG(ge.sK),ye.LFG(D.eN),ye.LFG(ne.e),ye.LFG(pe.L),ye.LFG(X.OrganizationService),ye.LFG(ge.sK),ye.LFG(Pe.EcecExtentOptionsService),ye.LFG(X.LanguageService),ye.LFG(X.NotifyService))},de.\u0275prov=ye.Yz7({token:de,factory:de.\u0275fac})},42884:(qe,I,p)=>{"use strict";var o,T;p.d(I,{DZ:()=>o,nx:()=>D,vQ:()=>l}),(T=o||(o={})).FIRST_PDF="FIRST_PDF",T.SECOND_PDF="SECOND_PDF";var e=p(24956);const g=class{static isAnyTrial(n=[]){return n.some(P=>[g.PPE,g.PPEWITHECEC,g.VOUCHER,...g.ALL_PLACEMENT_TYPES].includes(P))}static getPlacementTypes(n){return(n||[]).map(P=>this.getPlacementType(P))}static getPlacementType(n){switch(n){case g.PPE:return e.wW.PPE;case g.PPEWITHECEC:return e.wW.PPEWITHECEC;case g.ECEC:return e.wW.ECEC;case g.VC_ECEC:return e.wW.VC_ECEC;case g.C_ECEC:return e.wW.C_ECEC;case g.V_ECEC:return e.wW.V_ECEC;case g.VOUCHER:return e.wn.VOUCHER;default:return n}}static getTrialPlacementType(n){switch(n){case e.wW.PPE:return g.PPE;case e.wW.PPEWITHECEC:return g.PPEWITHECEC;case e.wW.ECEC:return g.ECEC;case e.wW.VC_ECEC:return g.VC_ECEC;case e.wW.C_ECEC:return g.C_ECEC;case e.wW.V_ECEC:return g.V_ECEC;default:return n}}};let l=g;g.PPE="PPE_TRIAL",g.PPEWITHECEC="PPEWITHECEC_TRIAL",g.ECEC="ECEC_TRIAL",g.VC_ECEC="VC_ECEC_TRIAL",g.VOUCHER="VOUCHER_TRIAL",g.C_ECEC="C_ECEC_TRIAL",g.V_ECEC="V_ECEC_TRIAL",g.ALL_PLACEMENT_TYPES=[g.VC_ECEC,g.C_ECEC,g.V_ECEC];const E=class{};let D=E;E.PPE="PPE",E.ECEC="ECEC",E.CLUB="CLUB",E.C_ECEC="C_ECEC",E.V_ECEC="V_ECEC",E.VC_ECEC="VC_ECEC"},94397:(qe,I,p)=>{"use strict";p.d(I,{m:()=>E});var o=p(9116),e=p(45134),l=p(88692),D=p(94650);const g=[{path:"communication-preferences",component:e.F}],T=class{};let E=T;T.\u0275fac=function(w){return new(w||T)},T.\u0275mod=D.oAB({type:T}),T.\u0275inj=D.cJS({providers:[l.SiviModalController],imports:[l.SiviCorePageModule,l.GuardianSettingsComponentModule,o.Bz.forChild(g)]})},45134:(qe,I,p)=>{"use strict";p.d(I,{F:()=>T});var o=p(15861),e=p(88692),l=p(94650),D=p(31943),g=p(70191),E=p(89383);const n=class{constructor(w,B){this.notify=w,this.modalCtrl=B}onSave(){const w=this.basicInfoComponent;w?w.isValid?(w.notChanged()&&this.modalCtrl.dismiss(!0),w.onSaveClick().then(()=>this.modalCtrl.dismiss(!0))):w.goToInvalid$.next():console.warn("child component not loaded")}canDismiss(){var w=this;return(0,o.Z)(function*(){try{const B=w.basicInfoComponent;return!(B&&!B.notChanged())||(yield(yield w.notify.promptDiscardChanges()).onDidDismiss()).data}catch(B){return console.error(B),!0}})()}onClose(){var w=this;return(0,o.Z)(function*(){(yield w.canDismiss())&&(yield w.modalCtrl.dismiss())})()}};let T=n;n.\u0275fac=function(B){return new(B||n)(l.Y36(D.c),l.Y36(e.SiviModalController))},n.\u0275cmp=l.Xpm({type:n,selectors:[["sivi-application-guardian-settings"]],viewQuery:function(B,Y){if(1&B&&l.Gf(e.GuardianSettingsComponent,5),2&B){let V;l.iGM(V=l.CRH())&&(Y.basicInfoComponent=V.first)}},inputs:{guardianId:"guardianId"},decls:10,vars:7,consts:[[3,"closeButton","hideNotifications","closed"],["navbar-title",""],["navbar-buttons-right",""],[3,"disabled","clicked"],[1,"ion-padding"],[3,"guardianId"],["basicInfoComponent",""]],template:function(B,Y){1&B&&(l.TgZ(0,"ion-header")(1,"sivi-lib-navbar",0),l.NdJ("closed",function(){return Y.onClose()}),l.TgZ(2,"div",1),l._uU(3),l.ALo(4,"translate"),l.qZA(),l.TgZ(5,"div",2)(6,"sivi-lib-navbar-action-button",3),l.NdJ("clicked",function(){return Y.onSave()}),l.qZA()()()(),l.TgZ(7,"ion-content",4),l._UZ(8,"sivi-lib-guardian-settings",5,6),l.qZA()),2&B&&(l.xp6(1),l.Q6J("closeButton",!0)("hideNotifications",!0),l.xp6(2),l.hij(" ",l.lcZ(4,5,"General.Info")," "),l.xp6(3),l.Q6J("disabled",!1),l.xp6(2),l.Q6J("guardianId",Y.guardianId))},dependencies:[g.W2,g.Gu,e.NavbarComponent,e.NavbarActionButtonComponent,e.GuardianSettingsComponent,E.X$],styles:[".header-container[_ngcontent-%COMP%]{display:flex}.header-container[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]{color:var(--ion-color-secondary)}.background[_ngcontent-%COMP%]{background-color:var(--ion-color-light)}"]})},3619:(qe,I,p)=>{"use strict";p.d(I,{w:()=>Hl});var o=p(15861),e=p(24956),l=p(88692),D=p(52951),g=p(82722),E=p(54004),T=p(95698),n=p(94650),P=p(31943),w=p(89383),B=p(9116),Y=p(11218),V=p(94973),ue=p(68261),he=p(36895),ae=p(70191),X=p(61135),ve=p(77579),ye=p(32076),ge=p(39646),ne=p(56451),pe=p(62843),Pe=p(13099),xe=p(95577),de=p(22940),re=p(70262),oe=p(6054),me=p(17489),be=p(41854),le=p(49594),Z=p(60515),Oe=p(39841),j=p(5963),ke=p(71884),Be=p(63900),nt=p(18505),mt=p(78372),ut=p(28746),Ve=p(87111),tt=p(39300),Ne=p(50590),wt=p(895),ft=p(14345),Ct=p(73819),rn=p(10838);const Fd=class extends l.SiviPage{constructor(N,O,Ce,Je,Vt,Rr,wo,ua,Ls,Ws,tu,Sc){super(O,N,Je),this.translate=N,this.notifyService=O,this.route=Ce,this.router=Je,this.auth=Vt,this.applicationService=Rr,this.messageTemplateRestService=wo,this.menuService=ua,this.applicationStateChangeFacadeService=Ls,this.applicationUtils=Ws,this.cdr=tu,this.modalCtrl=Sc,this.currentPage=0,this.changeApplication=new n.vpe,this.changeReviewMode=new n.vpe,this.steps=[],this.constants=l.Constants,this.roles=l.Roles,this.permissions=l.Permissions.Application,this.applicationTypes=l.ApplicationTypes,this.applicationStates=l.ApplicationStates,this.sendingApplication=!1,this.childrenComponentWasLoaded=!1,this.comments=[],this.notes=[],this.commentInputValue="",this.noteInputValue="",this.confirmationTitle="Application.Confirmation.Title",this.thanksMessage=l.ApplicationThanksMessage,this.onChange$=new ve.x,this.onUpdatePermits$=new ve.x}ngOnInit(){const N=Number(l.Utils.getParamFromURL("page"));"number"!=typeof N||isNaN(N)?this.shouldShowOnlySummary()&&this.goToPage(2):this.currentPage=N,this.updateReviewMode(!this.isDraft()),this.showReviewSummaryPage(),this.listenForInput(),this.getComments().pipe((0,g.R)(this.destroy$)).subscribe(O=>this.comments=O),this.getNotes().pipe((0,g.R)(this.destroy$)).subscribe(O=>this.notes=O),this.listenForPermitChanges(),this.onUpdatePermits$.next(this.application.state)}setContentLoader(N){this.contentLoader=N}isCancelled(){return this.application.state===l.Constants.CANCELLED}isSaved(){return this.application.state===l.Constants.SAVED}isInHandling(){return this.application.state===l.ApplicationStates.IN_HANDLING}isDraft(){return this.application.state===l.ApplicationStates.DRAFT}listenForPermitChanges(){this.onUpdatePermits$.pipe((0,g.R)(this.destroy$),(0,ke.x)(),(0,Be.w)(()=>this.applicationService.getApplicationPermits(this.application.id))).subscribe(N=>{this.permits={...N}})}shouldShowOnlySummary(){return this.isCancelled()}shouldShowComments(){const N=3!==this.currentPage;return(this.reviewMode||0===this.currentPage)&&N}shouldShowPdfs(){return 3!==this.currentPage&&((this.reviewMode||2===this.currentPage)&&this.application&&this.application.state!==this.applicationStates.SAVED&&this.application.state!==this.applicationStates.DRAFT)}updateSteps(N){this.steps=N}onEditSavedApplication(){this.updateReviewMode(!1),this.currentPage=0}onUpdateCompleteStatus(N,O){const Ce=(0,me.cloneDeep)(this.steps);Ce[O].completed=N,Ce[0].completed&&Ce[1].completed?(Ce[2].completed=!0,this.isAbleToSave=!0):(Ce[2].completed=!1,this.isAbleToSave=!1),this.steps=[...Ce],this.cdr.detectChanges()}getUpdateApplicationStream(N){return this.applicationService.updateApplication(N).pipe((0,nt.b)(()=>this.contentLoader.autoSaveSuccess(!0)),(0,nt.b)(()=>this.changeApplication.emit(this.application)),(0,re.K)(O=>(console.error(O),this.notify.toast("Message.Save.Error"),this.contentLoader.autoSaveFailed(),Z.E)))}updateApplication(N){this.updateApplicationObject(N),this.getUpdateApplicationStream(N).subscribe()}ngOnDestroy(){this.modalCtrl.removeQueryParam("page")}onPageChange(N){this.currentPage=N,this.modalCtrl.updateQueryParam("page",N)}onSelectStep(N){this.currentPage=N.detail,this.modalCtrl.updateQueryParam("page",this.currentPage)}hidePage(N){return N<2&&this.shouldShowOnlySummary()?"container-hide":2===N&&this.shouldShowOnlySummary()||this.currentPage===N?"":"container-hide"}goToPage(N){this.currentPage=N,this.modalCtrl.updateQueryParam("page",this.currentPage),document.getElementById("anchor").scrollIntoView(!0)}listenForInput(){const N=new ve.x,O=this.onChange$.pipe((0,mt.b)(this.constants.APPLICATION_AUTOSAVE_WAIT_TIME)),Ce=Vt=>{this.sendingApplication=Vt,N.next(!Vt)};(0,Oe.a)([O,N]).pipe((0,Ve.u)((0,j.H)(this.constants.APPLICATION_AUTOSAVE_WAIT_TIME)),(0,tt.h)(([,Vt])=>!!Vt),(0,E.U)(([Vt])=>Vt),(0,ke.x)(be.Z),(0,nt.b)(Vt=>this.updateApplicationObject(Vt)),(0,xe.z)(Vt=>Vt.state!==l.Constants.DRAFT?Z.E:(Ce(!0),this.getUpdateApplicationStream(Vt).pipe((0,ut.x)(()=>Ce(!1))))),(0,g.R)(this.destroy$)).subscribe(),N.next(!0)}onEditApplication(N){this.onChange$.next(N)}onEditBasicInformation(){var N=this;return(0,o.Z)(function*(){const Ce={component:N.auth.hasAnyRole([l.Roles.SERVICE_ADVISER])?wt.x:ft.y,componentProps:{application:{...N.application},child:N.application.child},cssClass:"modal-medium-size"};(yield N.openModal(Ce,"application",N.application.id)).onDidDismiss().then(Vt=>{Vt.data&&N.changeBasicInformationData(Vt.data)})})()}onUpdateApplication(N){this.changeApplication.emit(N),this.onUpdatePermits$.next(N.state)}changeBasicInformationData(N){N.type!==this.application.type||N.applicationPeople[0].applicationPerson.pin!==this.application.applicationPeople[0].applicationPerson.pin?this.changeApplication.emit(this.resetApplication(N)):(this.application=N,this.updateApplication(this.application))}sendApplication(){var N=this;return(0,o.Z)(function*(){let O;N.getConfirmationMessage(N.application),O=N.application.state===l.ApplicationStates.DRAFT?N.applicationService.sendApplication(N.application):N.applicationService.updateApplication(N.application),N.sendingApplication=!0,O.pipe((0,T.q)(1)).subscribe(Ce=>{N.sendingApplication=!1,N.goToPage(3),N.updateReviewMode(!0),N.application={...N.application,...Ce},N.changeApplication.emit(N.application),N.applicationUtils.applicationSent$.next(N.application),N.onUpdatePermits$.next(Ce.state),N.menuService.generateMenu()},Ce=>{N.sendingApplication=!1,N.notify.alertBackendError(Ce,"Message.Save.Error"),console.error("Error while sending the application: ",Ce)})})()}onChangeApplicationState(N){this.contentLoader.showLoader(),this.applicationStateChangeFacadeService.changeApplicationState(N,this.application.state,[this.application.id]).subscribe(()=>{this.application={...this.application,state:N},this.onUpdatePermits$.next(N)},()=>{this.notify.alertBackendError("Message.Error.ChangeState","Message.Save.Error")},()=>this.contentLoader.hideLoader())}getComments(){return this.auth.hasAnyRole(this.permissions.CAN_ACCESS_COMMENTS)?this.getApplicationMessages(oe.S3.PUBLIC):(0,ge.of)([])}getNotes(){return this.auth.hasAnyRole(this.permissions.CAN_ACCESS_NOTES)?this.getApplicationMessages(oe.S3.PRIVATE):(0,ge.of)([])}getApplicationMessages(N){return this.applicationService.getMessages(this.application.id,N).pipe((0,E.U)(O=>O.content),(0,E.U)(O=>O.sort((Ce,Je)=>l.Utils.compareByDate(Ce.createdDate,Je.createdDate,"asc"))),(0,re.K)(()=>[]))}postComment(N){var O=this;return(0,o.Z)(function*(){O.commentInputValue=N;const Ce=yield O.postApplicationMessage(N,oe.Cs.COMMENT);l.Utils.patchCollectionBy(O.comments,Ce,"id"),O.commentInputValue=null})()}postNote(N){var O=this;return(0,o.Z)(function*(){O.noteInputValue=N;const Ce=yield O.postApplicationMessage(N,oe.Cs.NOTE);l.Utils.patchCollectionBy(O.notes,Ce,"id"),O.noteInputValue=null})()}postApplicationMessage(N,O){var Ce=this;return(0,o.Z)(function*(){try{return N?(Ce.contentLoader.showLoader(),Ce.applicationService.postMessage(Ce.application.id,N,O).toPromise()):void 0}catch(Je){Ce.notify.alertBackendError(Je,"Message.Save.Error")}finally{Ce.contentLoader.hideLoader()}})()}deleteNote(N){var O=this;return(0,o.Z)(function*(){try{O.contentLoader.showLoader(),yield O.applicationService.deleteMessage(N.id).toPromise();const Ce=O.translate.instant("Application.View.Notes.Message.Deleted"),Je=oe.BQ.DELETED,Vt={...N,content:Ce,state:Je};l.Utils.patchCollectionBy(O.notes,Vt,"id")}catch(Ce){O.notify.alertBackendError(Ce,"Message.Save.Error")}finally{O.contentLoader.hideLoader()}})()}onDeleteNote(N){var O=this;return(0,o.Z)(function*(){try{(yield(yield O.notify.deleteConfirmPopup()).onDidDismiss()).data&&(yield O.deleteNote(N))}catch(Ce){console.log(Ce),O.notify.alertDeleteFailed()}})()}get userId(){return this.auth.getUserPersonData().pipe((0,E.U)(N=>N.userId))}updateReviewMode(N){this.reviewMode=N,this.changeReviewMode.emit(N),this.onUpdatePermits$.next(this.application.state)}updateApplicationObject(N){this.application={...this.application,...N}}resetApplication(N){return{id:N.id,state:N.state,type:N.type,applicationPeople:N.applicationPeople,desiredStartDate:N.desiredStartDate,municipalityId:N.municipalityId,municipalityName:N.municipalityName,createdDate:N.createdDate,updatedDate:N.updatedDate,createdBy:N.createdBy}}showReviewSummaryPage(){this.reviewMode&&(this.currentPage=2)}getConfirmationMessage(N){const O=[l.MessageTemplateReasonCode.APPLICATION_REASON,N.type.toLocaleLowerCase(),l.ApplicationThanksMessage.THANKS_MESSAGE].join(".");this.messageTemplateRestService.getTemplateByReasonAndMunicipality(O,N.municipalityId).pipe((0,T.q)(1),(0,E.U)(Ce=>Ce.filter(Je=>Je.restEntityState===l.Constants.CURRENT)),(0,Ne.P)()).subscribe(Ce=>{const Je={...Ce[0]};if(!Je.messageModes||!Je.languageDescriptions)return;const Vt=Je.messageModes.filter(ua=>ua.modeType===l.ContactTypes.UI_MESSAGE);if(!Vt.length)return;const Rr=this.translate.currentLang,wo=Je.languageDescriptions.find(ua=>ua.language===Rr);if(wo){const ua=Vt.find(Ls=>Ls.messageContentId===wo.messageContentId);if(ua&&ua.languages){const Ls=ua.languages.find(Ws=>Ws.language===Rr);this.confirmation=(0,le.Z)(Ls,"description","")}else this.confirmation=""}})}};let He=Fd;Fd.\u0275fac=function(O){return new(O||Fd)(n.Y36(w.sK),n.Y36(l.NotifyService),n.Y36(B.gz),n.Y36(B.F0),n.Y36(P.e8),n.Y36(P.IX),n.Y36(l.MessageTemplateRestService),n.Y36(Ct.h),n.Y36(rn.B),n.Y36(V.q),n.Y36(n.sBO),n.Y36(l.SiviModalController))},Fd.\u0275dir=n.lG2({type:Fd,inputs:{application:"application",currentPage:"currentPage"},outputs:{changeApplication:"changeApplication",changeReviewMode:"changeReviewMode"},features:[n.qOj]});const qu=class extends l.SiviComponent{constructor(){super()}};let st=qu;qu.\u0275fac=function(O){return new(O||qu)},qu.\u0275cmp=n.Xpm({type:qu,selectors:[["sivi-application-confirmation"]],inputs:{confirmationTitle:"confirmationTitle",confirmationText:"confirmationText"},features:[n.qOj],decls:9,vars:5,consts:[["data-cy","confirmation-title"],[1,"content"],["fixed",""],["size-lg","6","size","12",3,"ngClass"],["data-cy","confirmation-content",3,"text"]],template:function(O,Ce){1&O&&(n.TgZ(0,"ion-grid")(1,"h1",0),n._uU(2),n.ALo(3,"translate"),n.qZA()(),n.TgZ(4,"div",1)(5,"ion-grid",2)(6,"ion-row")(7,"ion-col",3),n._UZ(8,"sivi-lib-html-renderer",4),n.qZA()()()()),2&O&&(n.xp6(2),n.Oqu(n.lcZ(3,3,Ce.confirmationTitle)),n.xp6(5),n.Q6J("ngClass",Ce.confirmationText?"ion-margin-vertical background-box":"ion-margin-vertical"),n.xp6(1),n.Q6J("text",Ce.confirmationText))},dependencies:[ae.wI,ae.jY,ae.Nd,he.mk,l.HtmlRendererComponent,w.X$],styles:["h1[_ngcontent-%COMP%]{color:var(--ion-color-secondary);padding:0 0 0 6rem}.content[_ngcontent-%COMP%]{background-image:url(/assets/img/thankyou.bg.jpg);background-position:center;background-repeat:no-repeat;background-size:cover}.content[_ngcontent-%COMP%]   ion-grid[_ngcontent-%COMP%]   ion-col[_ngcontent-%COMP%]{min-height:400px}.content[_ngcontent-%COMP%]   ion-grid[_ngcontent-%COMP%]   ion-col.background-box[_ngcontent-%COMP%]{background:rgba(255,255,255,.9)}"],changeDetection:0});var nn=p(34782),Dn=p(44438),Mn=p(35027);function vi(Me,N){if(1&Me&&(n.ynx(0),n.TgZ(1,"span")(2,"b"),n._uU(3),n.qZA()(),n.BQk()),2&Me){const O=n.oxw().$implicit;n.xp6(3),n.Oqu(" - "+O.editorName)}}function Gi(Me,N){if(1&Me&&(n.ynx(0),n.TgZ(1,"span")(2,"b"),n._uU(3,": "),n.qZA(),n._uU(4),n.qZA(),n.BQk()),2&Me){const O=n.oxw().$implicit;n.xp6(4),n.hij('"',O.description,'"')}}function mi(Me,N){if(1&Me&&(n.TgZ(0,"li")(1,"span")(2,"b"),n._uU(3),n.ALo(4,"date"),n.qZA()(),n.TgZ(5,"span")(6,"b"),n._uU(7),n.ALo(8,"translate"),n.qZA()(),n.YNc(9,vi,4,1,"ng-container",4),n.YNc(10,Gi,5,1,"ng-container",4),n.qZA()),2&Me){const O=N.$implicit,Ce=n.oxw();n.xp6(3),n.Oqu(n.xi3(4,4,O.time,Ce.dateFormats.FINNISH_ANGULAR)),n.xp6(4),n.hij(" ",n.lcZ(8,7,Ce.getHistoryItemText(O)),""),n.xp6(2),n.Q6J("ngIf",O.editorName),n.xp6(1),n.Q6J("ngIf",O.description)}}const Zc=class extends l.SiviComponent{constructor(N,O){super(),this.auth=N,this.translate=O,this.dateFormats=l.DateFormats}getHistoryItemText(N){if([l.HistoryStates.PERMISSIONS_ADDED,l.HistoryStates.PERMISSIONS_REMOVED].includes(N.action))return this.getPermissionsModifiedText(N);const Ce=this.getStatusText(N.action);return this.translate.instant(Ce)}getPermissionsModifiedText(N){return`${this.translate.instant("Application.History.ManuallyAddedHandler")}: ${N.action===l.HistoryStates.PERMISSIONS_ADDED?N.description:this.translate.instant("General.Text.Removed")}`}getStatusText(N){switch(N){case l.HistoryStates.APPLICATION_SENT:return"General.Status.Sent";case l.HistoryStates.WAITING_FOR_HANDLING:return"General.Status.WaitingForHandling";default:return"General.Status."+N}}};let wi=Zc;Zc.\u0275fac=function(O){return new(O||Zc)(n.Y36(P.e8),n.Y36(w.sK))},Zc.\u0275cmp=n.Xpm({type:Zc,selectors:[["sivi-application-history"]],inputs:{history:"history"},features:[n.qOj],decls:8,vars:5,consts:[[1,"history-container"],["size","12"],[1,"history-list"],[4,"ngFor","ngForOf","ngForTrackBy"],[4,"ngIf"]],template:function(O,Ce){1&O&&(n.TgZ(0,"div",0)(1,"h1"),n._uU(2),n.ALo(3,"translate"),n.qZA(),n.TgZ(4,"ion-row")(5,"ion-col",1)(6,"ul",2),n.YNc(7,mi,11,9,"li",3),n.qZA()()()()),2&O&&(n.xp6(2),n.Oqu(n.lcZ(3,3,"Application.Summary.History")),n.xp6(5),n.Q6J("ngForOf",Ce.history)("ngForTrackBy",Ce.trackByFnIndex))},dependencies:[ae.wI,ae.Nd,he.sg,he.O5,he.uU,w.X$],styles:["h1[_ngcontent-%COMP%]{color:var(--ion-color-secondary)}.history-list[_ngcontent-%COMP%]{list-style-type:none;margin:0;padding:0}"]});var Bn=p(97392),kn=p(10266);function On(Me,N){if(1&Me&&(n.TgZ(0,"ion-col",3),n._UZ(1,"cgi-input",4),n.ALo(2,"translate"),n.qZA()),2&Me){const O=n.oxw(2);n.xp6(1),n.Q6J("label",n.lcZ(2,3,"Form.Label.CareOf"))("value",(null==O.contactAddress?null:O.contactAddress.name)||"-")("viewMode",!0)}}function je(Me,N){if(1&Me&&(n.TgZ(0,"ion-row")(1,"ion-col",1),n._uU(2),n.ALo(3,"translate"),n.qZA(),n.YNc(4,On,3,5,"ion-col",2),n.qZA()),2&Me){const O=n.oxw();n.xp6(2),n.hij(" ",n.lcZ(3,2,"Form.Label.Address.ContactAddress")," "),n.xp6(2),n.Q6J("ngIf",O.contactAddress.name)}}function Bt(Me,N){if(1&Me&&(n.TgZ(0,"ion-row")(1,"ion-col",3),n._UZ(2,"cgi-input",4),n.ALo(3,"translate"),n.qZA()()),2&Me){const O=n.oxw();n.xp6(2),n.Q6J("label",n.lcZ(3,3,"Form.Label.City"))("value",(null==O.contactAddress?null:O.contactAddress.streetAddress)||"-")("viewMode",!0)}}function xn(Me,N){if(1&Me&&(n.TgZ(0,"ion-row")(1,"ion-col",3),n._UZ(2,"cgi-input",4),n.ALo(3,"translate"),n.qZA(),n.TgZ(4,"ion-col",3),n._UZ(5,"cgi-input",4),n.ALo(6,"translate"),n.qZA()()),2&Me){const O=n.oxw();n.xp6(2),n.Q6J("label",n.lcZ(3,6,"Form.Label.City"))("value",(null==O.contactAddress?null:O.contactAddress.zipcode)||"-")("viewMode",!0),n.xp6(3),n.Q6J("label",n.lcZ(6,8,"Form.Label.City"))("value",(null==O.contactAddress?null:O.contactAddress.postOffice)||"-")("viewMode",!0)}}const uu=class extends l.SiviComponent{constructor(){super()}};let Fn=uu;function ui(Me,N){if(1&Me&&(n.ynx(0),n._UZ(1,"cgi-input",16),n.ALo(2,"translate"),n.ALo(3,"translate"),n.BQk()),2&Me){const O=n.oxw(2);n.xp6(1),n.Q6J("viewMode",!0)("value",O.child.pin)("label",n.lcZ(3,6,"Form.Label.Pic")),n.uIk("aria-label",n.lcZ(2,4,"Form.Label.Pic"))}}function Ai(Me,N){if(1&Me&&(n._UZ(0,"cgi-input",17),n.ALo(1,"date"),n.ALo(2,"translate"),n.ALo(3,"translate")),2&Me){const O=n.oxw(2);n.Q6J("viewMode",!0)("value",n.xi3(1,4,O.child.birthday,O.dateFormats.FINNISH_ANGULAR))("label",n.lcZ(3,9,"Form.Label.BirthDate")),n.uIk("aria-label",n.lcZ(2,7,"Form.Label.BirthDate"))}}uu.\u0275fac=function(O){return new(O||uu)},uu.\u0275cmp=n.Xpm({type:uu,selectors:[["sivi-contact-address"]],inputs:{contactAddress:"contactAddress"},features:[n.qOj],decls:3,vars:3,consts:[[4,"ngIf"],["size","12",1,"weight-600","big"],["size","12","size-md","6",4,"ngIf"],["size","12","size-md","6"],["type","text",3,"label","value","viewMode"]],template:function(O,Ce){1&O&&(n.YNc(0,je,5,4,"ion-row",0),n.YNc(1,Bt,4,5,"ion-row",0),n.YNc(2,xn,7,10,"ion-row",0)),2&O&&(n.Q6J("ngIf",Ce.contactAddress),n.xp6(1),n.Q6J("ngIf",Ce.contactAddress),n.xp6(1),n.Q6J("ngIf",Ce.contactAddress))},dependencies:[ae.wI,ae.Nd,he.O5,w.X$]});const si=function(Me){return{highlight:Me}};function Vi(Me,N){if(1&Me&&(n.TgZ(0,"ion-col",12),n._UZ(1,"cgi-input",3),n.ALo(2,"translate"),n.qZA()),2&Me){const O=n.oxw(2);n.xp6(1),n.Q6J("label",n.lcZ(2,4,"Form.Label.StreetAddress"))("ngClass",n.VKq(6,si,O.isChanged("streetAddress")))("value",(null==O.child||null==O.child.address?null:O.child.address.streetAddress)||"-")("viewMode",!0)}}function Vn(Me,N){if(1&Me&&(n.TgZ(0,"ion-col",2),n._UZ(1,"cgi-input",3),n.ALo(2,"translate"),n.qZA()),2&Me){const O=n.oxw(2);n.xp6(1),n.Q6J("label",n.lcZ(2,4,"Form.Label.PostalCode"))("ngClass",n.VKq(6,si,O.isChanged("zipcode")))("value",(null==O.child||null==O.child.address?null:O.child.address.zipcode)||"-")("viewMode",!0)}}function Hn(Me,N){if(1&Me&&(n.TgZ(0,"ion-col",2),n._UZ(1,"cgi-input",3),n.ALo(2,"translate"),n.qZA()),2&Me){const O=n.oxw(2);n.xp6(1),n.Q6J("label",n.lcZ(2,4,"Form.Label.City"))("ngClass",n.VKq(6,si,O.isChanged("postOfficeName")))("value",(null==O.child||null==O.child.address?null:O.child.address.postOffice)||"-")("viewMode",!0)}}function An(Me,N){1&Me&&(n.TgZ(0,"ion-col",18),n._UZ(1,"cgi-input",19),n.ALo(2,"translate"),n.ALo(3,"translate"),n.qZA()),2&Me&&(n.xp6(1),n.Q6J("label",n.lcZ(2,4,"Form.Label.Address"))("value",n.lcZ(3,6,"NonDisclosure.ContactDetails"))("viewMode",!0)("css",".nda-address .field-value { color: var(--ion-color-warning); text-transform: uppercase; }"))}function vn(Me,N){if(1&Me&&(n.TgZ(0,"ion-col",12),n._UZ(1,"cgi-input",3),n.ALo(2,"translate"),n.qZA()),2&Me){const O=n.oxw(2);n.xp6(1),n.Q6J("label",n.lcZ(2,4,"Form.Label.PlaceOfDomicile"))("ngClass",n.VKq(6,si,O.isChanged("placeOfDomicile")))("value",O.child.placeOfDomicile||"-")("viewMode",!0)}}function In(Me,N){1&Me&&(n.TgZ(0,"ion-col",20),n._UZ(1,"cgi-input",19),n.ALo(2,"translate"),n.ALo(3,"translate"),n.qZA()),2&Me&&(n.xp6(1),n.Q6J("label",n.lcZ(2,4,"Form.Label.PlaceOfDomicile"))("value",n.lcZ(3,6,"NonDisclosure.ContactDetails"))("viewMode",!0)("css",".municipality-nda .field-value { color: var(--ion-color-warning); text-transform: uppercase; }"))}function Zi(Me,N){if(1&Me&&(n.TgZ(0,"ion-col",2),n._UZ(1,"cgi-input",3),n.ALo(2,"translate"),n.qZA()),2&Me){const O=n.oxw(2);n.xp6(1),n.Q6J("label",n.lcZ(2,4,"Form.Label.MotherTongue"))("ngClass",n.VKq(6,si,O.isChanged("motherTongue")))("value",O.motherTongue)("viewMode",!0)}}function gr(Me,N){if(1&Me&&(n.TgZ(0,"ion-col",2),n._UZ(1,"cgi-input",3),n.ALo(2,"translate"),n.qZA()),2&Me){const O=n.oxw(2);n.xp6(1),n.Q6J("label",n.lcZ(2,4,"Form.Label.OtherLanguagesSpokenAtHome"))("ngClass",n.VKq(6,si,O.isChanged("otherLanguages")))("value",O.otherLanguages)("viewMode",!0)}}function Hi(Me,N){if(1&Me&&(n.TgZ(0,"ion-col",12),n._UZ(1,"cgi-input",3),n.ALo(2,"translate"),n.qZA()),2&Me){const O=n.oxw(2);n.xp6(1),n.Q6J("label",n.lcZ(2,4,"General.Text.MedicalInfo.Instruction"))("ngClass",n.VKq(6,si,O.isChanged("specialNeeds")))("value",O.getSpecialNeedsText())("viewMode",!0)}}function Gr(Me,N){1&Me&&(n.TgZ(0,"ion-col",12),n._uU(1," - "),n.qZA())}function zr(Me,N){if(1&Me&&(n.TgZ(0,"ion-col",21),n._UZ(1,"sivi-lib-attachment",22),n.qZA()),2&Me){const O=N.$implicit;n.xp6(1),n.Q6J("attachment",O)("showCancelButton",!1)}}function Eo(Me,N){if(1&Me&&(n.TgZ(0,"ion-col",21),n._UZ(1,"sivi-lib-attachment",22),n.qZA()),2&Me){const O=N.$implicit;n.xp6(1),n.Q6J("attachment",O)("showCancelButton",!1)}}function mr(Me,N){if(1&Me&&(n.TgZ(0,"div",1)(1,"h1"),n._uU(2),n.ALo(3,"translate"),n.qZA(),n.TgZ(4,"ion-row")(5,"ion-col",2),n._UZ(6,"cgi-input",3),n.ALo(7,"translate"),n.qZA(),n.TgZ(8,"ion-col",2),n._UZ(9,"cgi-input",3),n.ALo(10,"translate"),n.qZA()(),n.TgZ(11,"ion-row")(12,"ion-col",2),n._UZ(13,"cgi-input",3),n.ALo(14,"translate"),n.qZA(),n.TgZ(15,"ion-col",2),n._UZ(16,"cgi-input",3),n.ALo(17,"translate"),n.qZA(),n.TgZ(18,"ion-col",4),n.YNc(19,ui,4,8,"ng-container",5),n.YNc(20,Ai,4,11,"ng-template",null,6,n.W1O),n.qZA(),n.YNc(22,Vi,3,8,"ion-col",7),n.YNc(23,Vn,3,8,"ion-col",8),n.YNc(24,Hn,3,8,"ion-col",8),n.YNc(25,An,4,8,"ion-col",9),n.qZA(),n._UZ(26,"sivi-contact-address",10),n.TgZ(27,"ion-row"),n.YNc(28,vn,3,8,"ion-col",7),n.YNc(29,In,4,8,"ion-col",11),n.TgZ(30,"ion-col",12),n._UZ(31,"cgi-input",3),n.ALo(32,"translate"),n.qZA(),n.YNc(33,Zi,3,8,"ion-col",8),n.YNc(34,gr,3,8,"ion-col",8),n.YNc(35,Hi,3,8,"ion-col",7),n.qZA(),n.TgZ(36,"ion-row",13)(37,"ion-col",14),n._uU(38),n.ALo(39,"translate"),n.qZA(),n.YNc(40,Gr,2,0,"ion-col",7),n.ALo(41,"async"),n.ALo(42,"async"),n.YNc(43,zr,2,2,"ion-col",15),n.ALo(44,"async"),n.YNc(45,Eo,2,2,"ion-col",15),n.ALo(46,"async"),n.qZA()()),2&Me){const O=n.MAs(21),Ce=n.oxw();let Je;n.xp6(2),n.Oqu(n.lcZ(3,39,"Child.Information")),n.xp6(4),n.Q6J("label",n.lcZ(7,41,"Form.Label.FirstName.Plural"))("ngClass",n.VKq(61,si,Ce.isChanged("firstName")))("value",Ce.child.firstNames)("viewMode",!0),n.xp6(3),n.Q6J("label",n.lcZ(10,43,"Form.Label.LastName"))("ngClass",n.VKq(63,si,Ce.isChanged("lastName")))("value",Ce.child.lastName)("viewMode",!0),n.xp6(4),n.Q6J("label",n.lcZ(14,45,"Form.Label.PreferredFirstName"))("ngClass",n.VKq(65,si,Ce.isChanged("preferredFirstName")))("value",Ce.child.preferredFirstName)("viewMode",!0),n.xp6(3),n.Q6J("label",n.lcZ(17,47,"Form.Label.NickName"))("ngClass",n.VKq(67,si,Ce.isChanged("nickName")))("value",Ce.child.nickName||"-")("viewMode",!0),n.xp6(3),n.Q6J("ngIf",Ce.child.pin)("ngIfElse",O),n.xp6(3),n.Q6J("ngIf",!Ce.child.nonDisclosure),n.xp6(1),n.Q6J("ngIf",!Ce.child.nonDisclosure),n.xp6(1),n.Q6J("ngIf",!Ce.child.nonDisclosure),n.xp6(1),n.Q6J("ngIf",Ce.child.nonDisclosure),n.xp6(1),n.Q6J("contactAddress",Ce.child.contactAddress),n.xp6(2),n.Q6J("ngIf",!Ce.child.nonDisclosure),n.xp6(1),n.Q6J("ngIf",Ce.child.nonDisclosure),n.xp6(2),n.Q6J("label",n.lcZ(32,49,"Form.Label.Childlives"))("ngClass",n.VKq(69,si,Ce.isChanged("residence")))("value",Ce.getResidenceText())("viewMode",!0),n.xp6(2),n.Q6J("ngIf",Ce.motherTongue),n.xp6(1),n.Q6J("ngIf",Ce.otherLanguages),n.xp6(1),n.Q6J("ngIf",null==Ce.specialNeeds?null:Ce.specialNeeds.value),n.xp6(3),n.hij(" ",n.lcZ(39,51,"General.Text.Attachment.Plural")," "),n.xp6(2),n.Q6J("ngIf",0===(null==(Je=n.lcZ(41,53,Ce.images$))?null:Je.length)&&0===(null==(Je=n.lcZ(42,55,Ce.documents$))?null:Je.length)),n.xp6(3),n.Q6J("ngForOf",n.lcZ(44,57,Ce.images$))("ngForTrackBy",Ce.trackByFn),n.xp6(2),n.Q6J("ngForOf",n.lcZ(46,59,Ce.documents$))("ngForTrackBy",Ce.trackByFn)}}const Es=class extends l.SiviComponent{constructor(N,O,Ce,Je,Vt){super(),this.applicationService=N,this.attachmentsService=O,this.applicationUtils=Ce,this.translate=Je,this.platformService=Vt,this.changes={},this.dateFormats=l.DateFormats,this.generalOptionYes=l.Constants.YES}ngOnInit(){this.filterAttachments()}filterAttachments(){this.images$=this.applicationUtils.attachments$.pipe((0,E.U)(N=>{if(N)return N.filter(O=>O.type&&O.type.includes("image/")&&O.documentPurpose===l.AttachmentPurposes.CHILD)})),this.documents$=this.applicationUtils.attachments$.pipe((0,E.U)(N=>{if(N)return N.filter(O=>O.type&&!O.type.includes("image/")&&O.documentPurpose===l.AttachmentPurposes.CHILD)}))}ngOnChanges(N){if(this.watchChanges){N.child&&N.child.firstChange&&(this.savedChild={...this.child});for(const O in this.savedChild)this.child.hasOwnProperty(O)&&(this.changes[O]=!(0,be.Z)(this.child[O],this.savedChild[O]))}}isChanged(N){return this.changes[N]}getLanguages(){const N=this.child.otherLanguages;return this.applicationUtils.getLanguagesText(N)}getResidenceText(){const N=this.child.residence;let O="-";return N&&N.value&&(O=this.translate.instant(N.value),N.value===l.ChildResidesTypes.ELSEWHERE&&N.info&&(O=O.concat(", ",N.info))),O}isImage(N){return!!N&&N.toString().includes("image/")}getSpecialNeedsText(){const N=this.specialNeeds;let O="";if(N.value){const Ce=N.value[0].toUpperCase()+N.value.slice(1);O=this.translate.instant("General.Text."+Ce),N.value===l.Constants.YES&&N.info&&(O=O.concat(", ",N.info))}return O}};let jn=Es;Es.\u0275fac=function(O){return new(O||Es)(n.Y36(P.IX),n.Y36(P.oZ),n.Y36(V.q),n.Y36(w.sK),n.Y36(P.Jj))},Es.\u0275cmp=n.Xpm({type:Es,selectors:[["sivi-application-child"]],inputs:{watchChanges:"watchChanges",child:"child",applicationId:"applicationId",motherTongue:"motherTongue",otherLanguages:"otherLanguages",languagesList:"languagesList",specialNeeds:"specialNeeds"},features:[n.qOj,n.TTD],decls:1,vars:1,consts:[["class","childInformation",4,"ngIf"],[1,"childInformation"],["size","12","size-md","6"],["type","text",3,"label","ngClass","value","viewMode"],["siviGridCol","left"],[4,"ngIf","ngIfElse"],["birthday",""],["size","12",4,"ngIf"],["size","12","size-md","6",4,"ngIf"],["size","12","class","nda-address",4,"ngIf"],[3,"contactAddress"],["size","12","class","municipality-nda",4,"ngIf"],["size","12"],[1,"ion-margin-top"],["size","12",1,"weight-600","big"],["size","12","size-md","3",4,"ngFor","ngForOf","ngForTrackBy"],["name","pin","type","text","label-position","floating",3,"viewMode","value","label"],["name","birthday","type","text","label-position","floating",3,"viewMode","value","label"],["size","12",1,"nda-address"],["name","childNonDisclosure","type","text","label-position","floating",3,"label","value","viewMode","css"],["size","12",1,"municipality-nda"],["size","12","size-md","3"],[3,"attachment","showCancelButton"]],template:function(O,Ce){1&O&&n.YNc(0,mr,47,71,"div",0),2&O&&n.Q6J("ngIf",Ce.child)},dependencies:[ae.wI,ae.Nd,he.mk,he.sg,he.O5,l.GridColDirective,l.AttachmentComponent,Fn,he.Ov,he.uU,w.X$],styles:["h1[_ngcontent-%COMP%], .highlight[_ngcontent-%COMP%]{color:var(--ion-color-secondary)}"]});var ct=p(59378);function Yt(Me,N){1&Me&&(n.TgZ(0,"h3"),n._uU(1),n.ALo(2,"translate"),n.qZA()),2&Me&&(n.xp6(1),n.Oqu(n.lcZ(2,1,"GUARDIAN")))}function oi(Me,N){1&Me&&(n.TgZ(0,"h3"),n._uU(1),n.ALo(2,"translate"),n.qZA()),2&Me&&(n.xp6(1),n.Oqu(n.lcZ(2,1,"Child.Guardian.Or.Spouse.Singular")))}function Ni(Me,N){if(1&Me&&(n.ynx(0),n._UZ(1,"cgi-input",9),n.ALo(2,"translate"),n.ALo(3,"translate"),n.BQk()),2&Me){const O=n.oxw().$implicit;n.xp6(1),n.Q6J("viewMode",!0)("value",O.pin)("label",n.lcZ(3,6,"Form.Label.Pic")),n.uIk("aria-label",n.lcZ(2,4,"Form.Label.Pic"))}}function Nn(Me,N){if(1&Me&&(n._UZ(0,"cgi-input",10),n.ALo(1,"date"),n.ALo(2,"translate"),n.ALo(3,"translate")),2&Me){const O=n.oxw().$implicit,Ce=n.oxw();n.Q6J("viewMode",!0)("value",n.xi3(1,4,O.birthday,Ce.dateFormats.FINNISH_ANGULAR))("label",n.lcZ(3,9,"Form.Label.BirthDate")),n.uIk("aria-label",n.lcZ(2,7,"Form.Label.BirthDate"))}}function pr(Me,N){if(1&Me&&(n.TgZ(0,"ion-col",3),n._UZ(1,"cgi-input",4),n.ALo(2,"translate"),n.qZA()),2&Me){const O=n.oxw().$implicit,Ce=n.oxw();n.xp6(1),n.Q6J("label",n.lcZ(2,3,"Form.Label.MotherTongue"))("value",Ce.getMotherLanguage(O))("viewMode",!0)}}function Sn(Me,N){if(1&Me&&(n.TgZ(0,"ion-row")(1,"ion-col",11),n._uU(2),n.ALo(3,"translate"),n.qZA(),n.TgZ(4,"ion-col",3),n._UZ(5,"cgi-input",4),n.ALo(6,"translate"),n.qZA()()),2&Me){const O=n.oxw().$implicit;n.xp6(2),n.hij(" ",n.lcZ(3,4,"Form.Label.Address.Official")," "),n.xp6(3),n.Q6J("label",n.lcZ(6,6,"Form.Label.Address"))("value",(null==O||null==O.address?null:O.address.streetAddress)||"-")("viewMode",!0)}}function Pn(Me,N){if(1&Me&&(n.TgZ(0,"ion-row")(1,"ion-col",3),n._UZ(2,"cgi-input",4),n.ALo(3,"translate"),n.qZA(),n.TgZ(4,"ion-col",3),n._UZ(5,"cgi-input",4),n.ALo(6,"translate"),n.qZA()()),2&Me){const O=n.oxw().$implicit;n.xp6(2),n.Q6J("label",n.lcZ(3,6,"Form.Label.PostalCode"))("value",(null==O||null==O.address?null:O.address.zipcode)||"-")("viewMode",!0),n.xp6(3),n.Q6J("label",n.lcZ(6,8,"Form.Label.City"))("value",(null==O||null==O.address?null:O.address.postOffice)||"-")("viewMode",!0)}}function Nt(Me,N){1&Me&&(n.TgZ(0,"ion-row")(1,"ion-col",11),n._uU(2),n.ALo(3,"translate"),n.qZA(),n.TgZ(4,"ion-col",12),n._UZ(5,"cgi-input",13),n.ALo(6,"translate"),n.ALo(7,"translate"),n.qZA()()),2&Me&&(n.xp6(2),n.hij(" ",n.lcZ(3,5,"Form.Label.Address.Official")," "),n.xp6(3),n.Q6J("label",n.lcZ(6,7,"Form.Label.Address"))("value",n.lcZ(7,9,"NonDisclosure.ContactDetails"))("viewMode",!0)("css",".guardian-nda .field-value { color: var(--ion-color-warning); text-transform: uppercase; }"))}function ai(Me,N){if(1&Me&&(n.TgZ(0,"ion-row")(1,"ion-col"),n._UZ(2,"cgi-input",4),n.ALo(3,"translate"),n.qZA()()),2&Me){const O=n.oxw(3);n.xp6(2),n.Q6J("label",n.lcZ(3,3,"General.Text.Employment.Information"))("value",O.applicantEmploymentText)("viewMode",!0)}}function hn(Me,N){if(1&Me&&(n.TgZ(0,"ion-row")(1,"ion-col"),n._UZ(2,"cgi-input",4),n.ALo(3,"translate"),n.qZA()()),2&Me){const O=n.oxw(3);n.xp6(2),n.Q6J("label",n.lcZ(3,3,"General.Text.Employment.Information"))("value",O.spouseEmploymentText)("viewMode",!0)}}function Le(Me,N){if(1&Me&&(n.ynx(0),n.YNc(1,ai,4,5,"ion-row",2),n.YNc(2,hn,4,5,"ion-row",2),n.BQk()),2&Me){const O=n.oxw().index;n.xp6(1),n.Q6J("ngIf",0===O),n.xp6(1),n.Q6J("ngIf",O>0)}}function ce(Me,N){if(1&Me&&(n.TgZ(0,"ion-grid"),n.YNc(1,Yt,3,3,"h3",2),n.YNc(2,oi,3,3,"h3",2),n.TgZ(3,"ion-row")(4,"ion-col",3),n._UZ(5,"cgi-input",4),n.ALo(6,"translate"),n.qZA(),n.TgZ(7,"ion-col",3),n._UZ(8,"cgi-input",4),n.ALo(9,"translate"),n.qZA()(),n.TgZ(10,"ion-row")(11,"ion-col",3),n._UZ(12,"cgi-input",4),n.ALo(13,"translate"),n.qZA()(),n.TgZ(14,"ion-row")(15,"ion-col",3),n.YNc(16,Ni,4,8,"ng-container",5),n.YNc(17,Nn,4,11,"ng-template",null,6,n.W1O),n.qZA()(),n.TgZ(19,"ion-row"),n.YNc(20,pr,3,5,"ion-col",7),n.TgZ(21,"ion-col",3),n._UZ(22,"cgi-input",4),n.ALo(23,"translate"),n.qZA()(),n.YNc(24,Sn,7,8,"ion-row",2),n.YNc(25,Pn,7,10,"ion-row",2),n.YNc(26,Nt,8,11,"ion-row",2),n._UZ(27,"sivi-contact-address",8),n.TgZ(28,"ion-row")(29,"ion-col"),n._UZ(30,"cgi-input",4),n.ALo(31,"translate"),n.qZA()(),n.TgZ(32,"ion-row")(33,"ion-col"),n._UZ(34,"cgi-input",4),n.ALo(35,"translate"),n.qZA()(),n.YNc(36,Le,3,2,"ng-container",2),n.qZA()),2&Me){const O=N.$implicit,Ce=N.index,Je=n.MAs(18),Vt=n.oxw();n.xp6(1),n.Q6J("ngIf",0===Ce),n.xp6(1),n.Q6J("ngIf",Ce>0),n.xp6(3),n.Q6J("label",n.lcZ(6,28,"Form.Label.FirstName.Plural"))("value",null==O?null:O.firstNames)("viewMode",!0),n.xp6(3),n.Q6J("label",n.lcZ(9,30,"Form.Label.LastName"))("value",null==O?null:O.lastName)("viewMode",!0),n.xp6(4),n.Q6J("label",n.lcZ(13,32,"Form.Label.PreferredFirstName"))("value",null==O?null:O.preferredFirstName)("viewMode",!0),n.xp6(4),n.Q6J("ngIf",O.pin)("ngIfElse",Je),n.xp6(4),n.Q6J("ngIf",O.motherTongue),n.xp6(2),n.Q6J("label",n.lcZ(23,34,"Form.Label.CommunicationsLanguage.Singular"))("value",Vt.getCommunicationLanguage(O))("viewMode",!0),n.xp6(2),n.Q6J("ngIf",O.primary&&!O.nonDisclosure),n.xp6(1),n.Q6J("ngIf",O.primary&&!O.nonDisclosure),n.xp6(1),n.Q6J("ngIf",O.nonDisclosure),n.xp6(1),n.Q6J("contactAddress",O.contactAddress),n.xp6(3),n.Q6J("label",n.lcZ(31,36,"Form.Label.Phone"))("value",(null==O?null:O.phone)||"-")("viewMode",!0),n.xp6(4),n.Q6J("label",n.lcZ(35,38,"Form.Label.Email"))("value",(null==O?null:O.email)||"-")("viewMode",!0),n.xp6(2),n.Q6J("ngIf",Vt.shouldShowEmployment)}}const mc=class extends l.SiviComponent{constructor(N,O){super(),this.summaryUtilsService=N,this.translate=O,this.changes=[],this.applicationTypes=l.ApplicationTypes,this.dateFormats=l.DateFormats,this.employeeOrStudent=[l.EmploymentTypes.EMPLOYEE_OR_ENTREPRENEUR,l.EmploymentTypes.STUDENT]}ngOnInit(){this.summaryUtilsService.getApplication().pipe((0,g.R)(this.destroy$),(0,tt.h)(N=>!!N)).subscribe(N=>{this.guardians=N.guardians,this.applicationType=N.type,this.setEmploymentTexts(),this.showEmployment(this.applicationType)})}showEmployment(N){this.shouldShowEmployment=[this.applicationTypes.PPEWITHECEC,this.applicationTypes.ECEC].includes(N)}getMotherLanguage(N){return this.summaryUtilsService.getGuardianMotherTongue(N.motherTongue)}getCommunicationLanguage(N){return this.summaryUtilsService.getGuardianMotherTongue(N.communicationsLanguage)}isChanged(N,O){return this.changes&&this.changes[N]&&this.changes[N][O]}setEmploymentTexts(){this.applicantEmploymentText=this.getText((0,le.Z)(this.guardians,"[0].personEmployment")),this.spouseEmploymentText=this.getText((0,le.Z)(this.guardians,"[1].personEmployment"))}getText(N){let O="-";if(!(0,ct.Z)(N)){const Ce=[];N.forEach(Je=>{Ce.push(this.translate.instant(Je.type)),this.employeeOrStudent.includes(Je.type)?(Ce.push(Je.fullTime?" "+this.translate.instant(l.OccupationTypes.FULLTIME)+", ":" "+this.translate.instant(l.OccupationTypes.PARTTIME)+", "),Je.description&&Ce.push(Je.type===l.EmploymentTypes.EMPLOYEE_OR_ENTREPRENEUR?this.translate.instant(l.EmploymentInfoLabels.WORK)+": "+this.translate.instant(Je.description)+" ":this.translate.instant(l.EmploymentInfoLabels.STUDY)+": "+this.translate.instant(Je.description)+" ")):Je.type===l.EmploymentTypes.OTHER&&Ce.push(", "+Je.description)}),O=(0,ct.Z)(Ce)?"-":Ce.join("")}return O}};let we=mc;function Qe(Me,N){1&Me&&(n.TgZ(0,"ion-col"),n._UZ(1,"cgi-input",3),n.ALo(2,"translate"),n.ALo(3,"translate"),n.qZA()),2&Me&&(n.xp6(1),n.Q6J("label",n.lcZ(2,3,"Application.Summary.Other.Information"))("value",n.lcZ(3,5,"Placement.View.PlacementType.PPETrial"))("viewMode",!0))}function qt(Me,N){1&Me&&(n.ynx(0),n._UZ(1,"cgi-input",8),n.ALo(2,"translate"),n.BQk()),2&Me&&(n.xp6(1),n.Q6J("value",n.lcZ(2,2,"Application.Summary.ECECpreferences.NotNeeded"))("viewMode",!0))}function Tn(Me,N){if(1&Me&&(n.TgZ(0,"ion-col",2),n._UZ(1,"cgi-input",3),n.ALo(2,"translate"),n.ALo(3,"date"),n.qZA()),2&Me){const O=n.oxw(3);n.xp6(1),n.Q6J("label",n.lcZ(2,3,"Child.ECEC.Desired.StartDate.Instruction"))("value",n.xi3(3,5,O.applicationInstance.ececDesiredStartDate,O.dateFormats.FINNISH_ANGULAR||"-"))("viewMode",!0)}}function lr(Me,N){if(1&Me&&(n._UZ(0,"cgi-input",3),n.ALo(1,"translate"),n.ALo(2,"date")),2&Me){const O=n.oxw(3);n.Q6J("label",n.lcZ(1,3,"ECEC.Application.Need.Ends"))("value",n.xi3(2,5,O.applicationInstance.endDate,O.dateFormats.FINNISH_ANGULAR))("viewMode",!0)}}function mo(Me,N){1&Me&&(n._UZ(0,"cgi-input",3),n.ALo(1,"translate"),n.ALo(2,"translate")),2&Me&&n.Q6J("label",n.lcZ(1,3,"Application.Summary.Indefinitely"))("value",n.lcZ(2,5,"General.Yes"))("viewMode",!0)}function rr(Me,N){if(1&Me&&(n.TgZ(0,"ion-col",2),n._UZ(1,"cgi-input",3),n.ALo(2,"translate"),n.qZA()),2&Me){const O=n.oxw(3);n.xp6(1),n.Q6J("label",n.lcZ(2,3,"QuickHandlingReason.Title"))("value",(null==O.quickHandlingReason?null:O.quickHandlingReason.text)||"-")("viewMode",!0)}}function aa(Me,N){1&Me&&(n.TgZ(0,"ion-col",2),n._uU(1," -"),n.qZA())}function ea(Me,N){if(1&Me&&(n.TgZ(0,"ion-col",15),n._UZ(1,"sivi-lib-attachment",16),n.qZA()),2&Me){const O=N.$implicit;n.xp6(1),n.Q6J("attachment",O)("showCancelButton",!1)}}function Bo(Me,N){if(1&Me&&(n.TgZ(0,"ion-col",15),n._UZ(1,"sivi-lib-attachment",16),n.qZA()),2&Me){const O=N.$implicit;n.xp6(1),n.Q6J("attachment",O)("showCancelButton",!1)}}function Ii(Me,N){if(1&Me&&(n.TgZ(0,"ion-row")(1,"ion-col",2)(2,"p",13),n._uU(3),n.ALo(4,"translate"),n.qZA()(),n.YNc(5,aa,2,0,"ion-col",9),n.ALo(6,"async"),n.ALo(7,"async"),n.YNc(8,ea,2,2,"ion-col",14),n.ALo(9,"async"),n.YNc(10,Bo,2,2,"ion-col",14),n.ALo(11,"async"),n.qZA()),2&Me){const O=n.oxw(3);let Ce;n.xp6(3),n.hij(" ",n.lcZ(4,6,"Application.Summary.Quickhandling.Attachments")," "),n.xp6(2),n.Q6J("ngIf",0===(null==(Ce=n.lcZ(6,8,O.images$))?null:Ce.length)&&0===n.lcZ(7,10,O.documents$).length),n.xp6(3),n.Q6J("ngForOf",n.lcZ(9,12,O.images$))("ngForTrackBy",O.trackByFn),n.xp6(2),n.Q6J("ngForOf",n.lcZ(11,14,O.documents$))("ngForTrackBy",O.trackByFn)}}function an(Me,N){1&Me&&(n.TgZ(0,"mat-icon",17),n.ALo(1,"translate"),n._uU(2,"new_releases "),n.qZA()),2&Me&&n.s9C("matTooltip",n.lcZ(1,1,"Placement.View.Extent.Not.Available"))}function Zn(Me,N){if(1&Me&&(n.TgZ(0,"ion-row"),n.YNc(1,Tn,4,8,"ion-col",9),n.ALo(2,"async"),n.TgZ(3,"ion-col",2),n.YNc(4,lr,3,8,"cgi-input",10),n.YNc(5,mo,3,7,"cgi-input",10),n.qZA(),n.YNc(6,rr,3,5,"ion-col",9),n.ALo(7,"async"),n.ALo(8,"async"),n.YNc(9,Ii,12,16,"ion-row",4),n.ALo(10,"async"),n.ALo(11,"async"),n.TgZ(12,"ion-col",2),n._UZ(13,"cgi-input",3),n.ALo(14,"translate"),n.qZA(),n.TgZ(15,"ion-col",2),n.YNc(16,an,3,3,"mat-icon",11),n.TgZ(17,"span",12),n._uU(18),n.ALo(19,"translate"),n.qZA(),n._UZ(20,"cgi-input",8),n.qZA()()),2&Me){const O=n.oxw(2);n.xp6(1),n.Q6J("ngIf",!O.applicationInstance.nextPeriodEcecUnit&&!n.lcZ(2,12,O.summaryUtilsService.hideECECFields$).date),n.xp6(3),n.Q6J("ngIf",O.applicationInstance.endDate),n.xp6(1),n.Q6J("ngIf",O.applicationInstance.indefinitely),n.xp6(1),n.Q6J("ngIf",n.lcZ(7,14,O.summaryUtilsService.showQuickHandling$)&&!O.applicationInstance.nextPeriodEcecUnit&&!n.lcZ(8,16,O.summaryUtilsService.hideECECFields$).reason),n.xp6(3),n.Q6J("ngIf",n.lcZ(10,18,O.summaryUtilsService.showQuickHandling$)&&!O.applicationInstance.nextPeriodEcecUnit&&!n.lcZ(11,20,O.summaryUtilsService.hideECECFields$).reason),n.xp6(4),n.Q6J("label",n.lcZ(14,22,"Application.Summary.WeeklyCareTimes"))("value",O.careTimeOptionsText||"-")("viewMode",!0),n.xp6(3),n.Q6J("ngIf",O.invalidExtent&&O.professionalUser),n.xp6(2),n.Oqu(n.lcZ(19,24,"Application.Summary.ExtentOptions")),n.xp6(2),n.Q6J("value",O.extentOptionsText||"-")("viewMode",!0)}}function Ci(Me,N){if(1&Me&&(n.TgZ(0,"div",1)(1,"h1"),n._uU(2),n.ALo(3,"translate"),n.qZA(),n.TgZ(4,"ion-row")(5,"ion-col",2),n._UZ(6,"cgi-input",3),n.ALo(7,"translate"),n.qZA(),n.TgZ(8,"ion-col",2),n._UZ(9,"cgi-input",3),n.ALo(10,"translate"),n.qZA(),n.TgZ(11,"ion-col",2),n._UZ(12,"cgi-input",3),n.ALo(13,"translate"),n.ALo(14,"translate"),n.qZA(),n.YNc(15,Qe,4,7,"ion-col",4),n.qZA(),n.TgZ(16,"h1"),n._uU(17),n.ALo(18,"translate"),n.qZA(),n.TgZ(19,"ion-row")(20,"ion-col",2),n._UZ(21,"cgi-input",3),n.ALo(22,"translate"),n.qZA(),n.TgZ(23,"ion-col",2),n._UZ(24,"cgi-input",3),n.ALo(25,"translate"),n.ALo(26,"date"),n.qZA(),n.TgZ(27,"ion-col",2),n._UZ(28,"cgi-input",3),n.ALo(29,"translate"),n.qZA(),n.TgZ(30,"ion-col",2),n._UZ(31,"cgi-input",3),n.ALo(32,"translate"),n.qZA(),n.TgZ(33,"ion-col",2),n._UZ(34,"cgi-input",3),n.ALo(35,"translate"),n.qZA(),n.TgZ(36,"ion-col",2),n._UZ(37,"cgi-input",3),n.ALo(38,"translate"),n.qZA(),n.TgZ(39,"ion-col",2),n._UZ(40,"cgi-input",3),n.ALo(41,"translate"),n.qZA()(),n.TgZ(42,"h1"),n._uU(43),n.ALo(44,"translate"),n.qZA(),n.YNc(45,qt,3,4,"ng-container",5),n.YNc(46,Zn,21,26,"ng-template",null,6,n.W1O),n._UZ(48,"ion-row")(49,"sivi-application-child",7)(50,"sivi-application-guardians"),n.qZA()),2&Me){const O=n.MAs(47),Ce=n.oxw();n.xp6(2),n.Oqu(n.lcZ(3,41,"Application.Basic.Information")),n.xp6(4),n.Q6J("label",n.lcZ(7,43,"Municipality.Singular"))("value",null==Ce.applicationInstance?null:Ce.applicationInstance.municipalityName)("viewMode",!0),n.xp6(3),n.Q6J("label",n.lcZ(10,45,"Application.Summary.ApplicationMadeFor"))("value",(null==Ce.applicationInstance||null==Ce.applicationInstance.child?null:Ce.applicationInstance.child.firstNames)+" "+(null==Ce.applicationInstance.child?null:Ce.applicationInstance.child.lastName))("viewMode",!0),n.xp6(3),n.Q6J("label",n.lcZ(13,47,"Application.Type"))("value",n.lcZ(14,49,"Application.Type."+Ce.applicationInstance.type))("viewMode",!0),n.xp6(3),n.Q6J("ngIf",null==Ce.applicationInstance?null:Ce.applicationInstance.twoYear),n.xp6(2),n.Oqu(n.lcZ(18,51,"Application.Summary.Preferences")),n.xp6(4),n.Q6J("label",n.lcZ(22,53,"Application.PPE.PreferredEducationPlaces"))("value",Ce.preferredEducationPlaces)("viewMode",!0),n.xp6(3),n.Q6J("label",n.lcZ(25,55,"Application.Summary.StartDate"))("value",n.xi3(26,57,Ce.applicationInstance.desiredStartDate,Ce.dateFormats.FINNISH_ANGULAR))("viewMode",!0),n.xp6(4),n.Q6J("label",n.lcZ(29,60,"Application.PPE.Language"))("value",Ce.desiredOrganizationLanguages)("viewMode",!0),n.xp6(3),n.Q6J("label",n.lcZ(32,62,"Application.PPE.PreferredAddress"))("value",Ce.preferredEducationLocation)("viewMode",!0),n.xp6(3),n.Q6J("label",n.lcZ(35,64,"Application.PPE.PlaceOnStartDate"))("value",Ce.applicationInstance.inOtherMunicipality?Ce.applicationInstance.currentUnitInOtherMunicipality||"-":Ce.currentUnitName)("viewMode",!0),n.xp6(3),n.Q6J("label",n.lcZ(38,66,"Application.Summary.SiblingsAtSameUnit"))("value",Ce.siblingsAtSameUnit)("viewMode",!0),n.xp6(3),n.Q6J("label",n.lcZ(41,68,"ECEC.Plan.AdditionalInformation"))("value",Ce.applicationInstance.additionalInformation?Ce.applicationInstance.additionalInformation:"-")("viewMode",!0),n.xp6(3),n.Oqu(n.lcZ(44,70,"Application.Summary.ECECpreferences")),n.xp6(2),n.Q6J("ngIf",Ce.applicationInstance.type===Ce.applicationTypes.PPE)("ngIfElse",O),n.xp6(4),n.Q6J("child",null==Ce.applicationInstance?null:Ce.applicationInstance.child)("motherTongue",Ce.childMotherTongue)("otherLanguages",Ce.childOtherLanguages)("applicationId",null==Ce.applicationInstance?null:Ce.applicationInstance.id)("specialNeeds",Ce.applicationInstance.specialNeeds)}}mc.\u0275fac=function(O){return new(O||mc)(n.Y36(Y.p),n.Y36(w.sK))},mc.\u0275cmp=n.Xpm({type:mc,selectors:[["sivi-application-guardians"]],features:[n.qOj],decls:5,vars:5,consts:[[1,"guardianInformation"],[4,"ngFor","ngForOf","ngForTrackBy"],[4,"ngIf"],["size","12","size-md","6"],["type","text",3,"label","value","viewMode"],[4,"ngIf","ngIfElse"],["birthday",""],["size","12","size-md","6",4,"ngIf"],[3,"contactAddress"],["name","pin","type","text","label-position","floating",3,"viewMode","value","label"],["name","birthday","label-position","floating",3,"viewMode","value","label"],["size","12",1,"weight-600","big"],["size","12","size-md","6",1,"guardian-nda"],["name","guardianNonDisclosure","type","text","label-position","floating",3,"label","value","viewMode","css"]],template:function(O,Ce){1&O&&(n.TgZ(0,"div",0)(1,"h1"),n._uU(2),n.ALo(3,"translate"),n.qZA(),n.YNc(4,ce,37,40,"ion-grid",1),n.qZA()),2&O&&(n.xp6(2),n.Oqu(n.lcZ(3,3,"Application.Summary.GuardianInformation")),n.xp6(2),n.Q6J("ngForOf",Ce.guardians)("ngForTrackBy",Ce.trackByFn))},dependencies:[ae.wI,ae.jY,ae.Nd,he.sg,he.O5,Fn,he.uU,w.X$],styles:["h1[_ngcontent-%COMP%]{color:var(--ion-color-secondary)}"]});const Yp=class extends l.SiviComponent{set application(N){this.applicationInstance=N,this.onUpdateApplication$.next(N)}constructor(N,O,Ce,Je,Vt,Rr){super(),this.translate=N,this.summaryUtilsService=O,this.applicationUtils=Ce,this.auth=Je,this.ececWeeklyCareTimeOptionsService=Vt,this.ececExtentOptionsService=Rr,this.invalidExtent=!1,this.applicationTypes=l.ApplicationTypes,this.dateFormats=l.DateFormats,this.onUpdateApplication$=new ve.x}ngOnInit(){var N=this;return(0,o.Z)(function*(){N.professionalUser=N.auth.isProfessional(),N.extentId=N.applicationInstance.weeklyHoursOption,N.filterApplicationAttachments(),N.onUpdateApplication$.pipe((0,mt.b)(200),(0,g.R)(N.destroy$)).subscribe(O=>{N.reloadView(O)}),N.applicationUtils.careOptions$.pipe((0,g.R)(N.destroy$)).subscribe(O=>{N.careTimeOptions=O.timeOptions,N.validExtentOptions=O.extentOptions,N.setCareTimeOptionsText(),N.setExtentOptionsText()}),N.setQuickHandlingReason()})()}reloadView(N){var O=this;return(0,o.Z)(function*(){yield O.summaryUtilsService.setApplication(N),O.setQuickHandlingReason(),O.desiredOrganizationLanguages=O.summaryUtilsService.getDesiredOrgLanguages(),O.childMotherTongue=O.summaryUtilsService.getChildMotherTongue(),O.childOtherLanguages=O.summaryUtilsService.getChildOtherLanguages(),O.preferredEducationPlaces=O.summaryUtilsService.getPreferredEducationPlaces(),O.preferredEducationLocation=O.summaryUtilsService.getPreferredEducationalLocation(),O.siblingsAtSameUnit=O.summaryUtilsService.getSiblingsAtSamePlace(),O.setCareTimeOptionsText(),O.setExtentOptionsText(),O.getCurrentECECText(),O.validExtentOptions.find(Je=>Je.id===O.extentId)||O.ececExtentOptionsService.getExtentOptionsByMunicipalityId(N.municipalityId,N.type).pipe((0,E.U)(Je=>l.Utils.sortArrayByDate(Je))).subscribe(Je=>{O.invalidExtentOptions=Je,O.setExtentOptionsText()})})()}setQuickHandlingReason(){this.summaryUtilsService.quickHandlingOptions$.pipe((0,T.q)(1)).subscribe(N=>{this.quickHandlingReason=N.find(O=>O.value===this.applicationInstance.quickHandlingReason)})}filterApplicationAttachments(){this.images$=this.applicationUtils.attachments$.pipe((0,E.U)(N=>{if(N)return N.filter(O=>O.type&&O.type.includes("image/")&&O.documentPurpose===l.AttachmentPurposes.APPLICATION)})),this.documents$=this.applicationUtils.attachments$.pipe((0,E.U)(N=>{if(N)return N.filter(O=>O.type&&!O.type.includes("image/")&&O.documentPurpose===l.AttachmentPurposes.APPLICATION)}))}setCareTimeOptionsText(){const N=[];this.applicationInstance.careTimeTypes&&this.applicationInstance.careTimeTypes.length&&this.careTimeOptions&&this.applicationInstance.careTimeTypes.forEach(O=>{const Ce=this.careTimeOptions.findIndex(Je=>Je.value.type===O.type);Ce>-1&&N.push(this.careTimeOptions[Ce].text)}),this.careTimeOptionsText=N.length?N.join(", "):"-"}getCurrentECECText(){const N=this.summaryUtilsService.unitList$.value;if(N&&this.applicationInstance.currentUnit){const O=N.find(Ce=>Ce.value.areaId===this.applicationInstance.currentUnit);O&&(this.currentUnitName=O.element.text)}else this.currentUnitName=this.applicationInstance.inOtherMunicipality?this.translate.instant("Application.InOtherMunicipality"):this.translate.instant("Application.NoCurrentECEC")}setExtentOptionsText(){if(!this.validExtentOptions&&!this.invalidExtentOptions)return void(this.extentOptionsText="-");let N=[];const O=this.applicationInstance.weeklyCareNeedOption,Ce=this.applicationInstance.dailyCareNeedOption;this.extentId=this.applicationInstance.weeklyHoursOption||this.extentId;const Je=this.getExtentOption(this.extentId,this.validExtentOptions,this.invalidExtentOptions);if(Je){const Vt=Je.overHoursPerWeek+"-"+Je.maxHoursPerWeek+" "+this.translate.instant("General.HoursPerWeek");N.push(Vt),N=this.getWeeklyExtentTexts(O,N),N=this.getDailyExtentTexts(Je,Ce,N)}this.extentOptionsText=N.length?N.join(", "):"-"}getExtentOption(N,O,Ce){let Je;return N&&(Je=O.find(Vt=>Vt.id===N),!Je&&Ce&&Ce.forEach(Vt=>{const Rr=Vt.paymentExtentValues.find(wo=>wo.id===N);Rr&&(Je={...Rr},this.invalidExtent=!0)})),Je}getWeeklyExtentTexts(N,O){return"boolean"==typeof N&&(N?O.push(this.translate.instant("ECEC.Payment.Extent.Option.FullWeek")):O.push(this.translate.instant("ECEC.Payment.Extent.Option.PartWeek"))),O}getDailyExtentTexts(N,O,Ce){return N.fullTime||"boolean"==typeof O&&O?Ce.push(this.translate.instant("ECEC.Payment.Extent.Option.FullTime")):Ce.push(this.translate.instant("ECEC.Payment.Extent.Option.PartTime")),Ce}};let Xn=Yp;function Et(Me,N){if(1&Me&&(n.TgZ(0,"div",1)(1,"h1"),n._uU(2),n.ALo(3,"translate"),n.qZA(),n.TgZ(4,"ion-row")(5,"ion-col",2),n._UZ(6,"cgi-input",3),n.ALo(7,"translate"),n.qZA(),n.TgZ(8,"ion-col",2),n._UZ(9,"cgi-input",3),n.ALo(10,"translate"),n.qZA(),n.TgZ(11,"ion-col",2),n._UZ(12,"cgi-input",3),n.ALo(13,"translate"),n.ALo(14,"translate"),n.qZA()(),n.TgZ(15,"h1"),n._uU(16),n.ALo(17,"translate"),n.qZA(),n.TgZ(18,"ion-row")(19,"ion-col",2),n._UZ(20,"cgi-input",3),n.ALo(21,"translate"),n.qZA(),n.TgZ(22,"ion-col",2),n._UZ(23,"cgi-input",3),n.ALo(24,"translate"),n.qZA(),n.TgZ(25,"ion-col",2),n._UZ(26,"cgi-input",3),n.ALo(27,"translate"),n.ALo(28,"date"),n.qZA(),n.TgZ(29,"ion-col",2),n._UZ(30,"cgi-input",3),n.ALo(31,"translate"),n.qZA(),n.TgZ(32,"ion-col",2),n._UZ(33,"cgi-input",3),n.ALo(34,"translate"),n.qZA(),n.TgZ(35,"ion-col",2),n._UZ(36,"cgi-input",3),n.ALo(37,"translate"),n.qZA()(),n._UZ(38,"sivi-application-child",4)(39,"sivi-application-guardians"),n.qZA()),2&Me){const O=n.oxw();n.xp6(2),n.Oqu(n.lcZ(3,34,"Application.Basic.Information")),n.xp6(4),n.Q6J("label",n.lcZ(7,36,"Municipality.Singular"))("value",null==O.applicationInstance?null:O.applicationInstance.municipalityName)("viewMode",!0),n.xp6(3),n.Q6J("label",n.lcZ(10,38,"Application.Summary.ApplicationMadeFor"))("value",(null==O.applicationInstance||null==O.applicationInstance.child?null:O.applicationInstance.child.firstNames)+" "+(null==O.applicationInstance.child?null:O.applicationInstance.child.lastName))("viewMode",!0),n.xp6(3),n.Q6J("label",n.lcZ(13,40,"Application.Type"))("value",n.lcZ(14,42,"Application.Type."+O.applicationInstance.type))("viewMode",!0),n.xp6(4),n.Oqu(n.lcZ(17,44,"Application.Summary.ClubPreferences")),n.xp6(4),n.Q6J("label",n.lcZ(21,46,"Application.Club.PreferredPlaces"))("value",O.preferredEducationPlaces)("viewMode",!0),n.xp6(3),n.Q6J("label",n.lcZ(24,48,"Application.Club.PreferredAddress"))("value",O.preferredEducationLocation)("viewMode",!0),n.xp6(3),n.Q6J("label",n.lcZ(27,50,"Application.Summary.StartDate"))("value",n.xi3(28,52,O.applicationInstance.desiredStartDate,O.dateFormats.FINNISH_ANGULAR))("viewMode",!0),n.xp6(4),n.Q6J("label",n.lcZ(31,55,"Application.Club.Language"))("value",O.desiredOrganizationLanguages)("viewMode",!0),n.xp6(3),n.Q6J("label",n.lcZ(34,57,"Application.Summary.SiblingsAtSameUnit"))("value",O.siblingsAtSameUnit)("viewMode",!0),n.xp6(3),n.Q6J("label",n.lcZ(37,59,"ECEC.Plan.AdditionalInformation"))("value",O.applicationInstance.additionalInformation?O.applicationInstance.additionalInformation:"-")("viewMode",!0),n.xp6(2),n.Q6J("child",null==O.applicationInstance?null:O.applicationInstance.child)("motherTongue",O.childMotherTongue)("otherLanguages",O.childOtherLanguages)("applicationId",null==O.applicationInstance?null:O.applicationInstance.id)("specialNeeds",O.applicationInstance.specialNeeds)}}Yp.\u0275fac=function(O){return new(O||Yp)(n.Y36(w.sK),n.Y36(Y.p),n.Y36(V.q),n.Y36(P.e8),n.Y36(Dn.EcecWeeklyCareTimeOptionsService),n.Y36(Dn.EcecExtentOptionsService))},Yp.\u0275cmp=n.Xpm({type:Yp,selectors:[["sivi-application-summary-ppe"]],inputs:{application:"application"},features:[n.qOj],decls:1,vars:1,consts:[["id","printed",4,"ngIf"],["id","printed"],["size","12"],["type","text",3,"label","value","viewMode"],[4,"ngIf"],[4,"ngIf","ngIfElse"],["showECECPreferences",""],[3,"child","motherTongue","otherLanguages","applicationId","specialNeeds"],["type","text",3,"value","viewMode"],["size","12",4,"ngIf"],["type","text",3,"label","value","viewMode",4,"ngIf"],["aria-hidden","false","class","extent-icon","matTooltipClass","application-state-tooltip",3,"matTooltip",4,"ngIf"],[1,"extent"],["role","heading","aria-level","4"],["size","12","size-md","3",4,"ngFor","ngForOf","ngForTrackBy"],["size","12","size-md","3"],[3,"attachment","showCancelButton"],["aria-hidden","false","matTooltipClass","application-state-tooltip",1,"extent-icon",3,"matTooltip"]],template:function(O,Ce){1&O&&n.YNc(0,Ci,51,72,"div",0),2&O&&n.Q6J("ngIf",Ce.applicationInstance)},dependencies:[ae.wI,ae.Nd,he.sg,he.O5,l.AttachmentComponent,Bn.Hw,kn.gM,jn,we,he.Ov,he.uU,w.X$],styles:["h1[_ngcontent-%COMP%]{color:var(--ion-color-secondary)}ion-col[_ngcontent-%COMP%]{margin-top:5px}.summary-container[_ngcontent-%COMP%]{padding:0 16px 10px}@media screen and (min-width: 600px){.summary-container[_ngcontent-%COMP%]{padding:0 40px 10px}}@media screen and (min-width: 840px){.summary-container[_ngcontent-%COMP%]{padding:0 80px 10px}}.extent-icon[_ngcontent-%COMP%]{margin-right:5px;color:var(--ion-color-secondary);vertical-align:middle}.extent[_ngcontent-%COMP%]{display:inline-flex}"]});const Fs=class extends l.SiviComponent{set application(N){this.applicationInstance=N,this.onUpdateApplication$.next(this.applicationInstance)}constructor(N,O){super(),this.translate=N,this.summaryUtilsService=O,this.dateFormats=l.DateFormats,this.onUpdateApplication$=new ve.x}ngOnInit(){var N=this;return(0,o.Z)(function*(){N.onUpdateApplication$.pipe((0,mt.b)(200),(0,g.R)(N.destroy$)).subscribe(O=>{N.reloadView(O)})})()}reloadView(N){var O=this;return(0,o.Z)(function*(){yield O.summaryUtilsService.setApplication(N),O.currentUnitName=yield O.summaryUtilsService.getCurrentUnitName(),O.desiredOrganizationLanguages=O.summaryUtilsService.getDesiredOrgLanguages(),O.childMotherTongue=O.summaryUtilsService.getChildMotherTongue(),O.childOtherLanguages=O.summaryUtilsService.getChildOtherLanguages(),O.preferredEducationPlaces=O.summaryUtilsService.getPreferredEducationPlaces(),O.preferredEducationLocation=O.summaryUtilsService.getPreferredEducationalLocation(),O.siblingsAtSameUnit=O.summaryUtilsService.getSiblingsAtSamePlace()})()}};let gn=Fs;function ei(Me,N){1&Me&&(n.TgZ(0,"mat-icon",11),n.ALo(1,"translate"),n._uU(2,"new_releases "),n.qZA()),2&Me&&n.s9C("matTooltip",n.lcZ(1,1,"Placement.View.Extent.Not.Available"))}function un(Me,N){if(1&Me&&(n._UZ(0,"cgi-input",3),n.ALo(1,"translate"),n.ALo(2,"date")),2&Me){const O=n.oxw(2);n.Q6J("label",n.lcZ(1,3,"ECEC.Application.Need.Ends"))("value",n.xi3(2,5,O.applicationInstance.endDate,O.dateFormats.FINNISH_ANGULAR))("viewMode",!0)}}function Ft(Me,N){1&Me&&(n._UZ(0,"cgi-input",3),n.ALo(1,"translate"),n.ALo(2,"translate")),2&Me&&n.Q6J("label",n.lcZ(1,3,"Application.Summary.Indefinitely"))("value",n.lcZ(2,5,"General.Yes"))("viewMode",!0)}function Ut(Me,N){if(1&Me&&(n.TgZ(0,"ion-col",2),n._UZ(1,"cgi-input",3),n.ALo(2,"translate"),n.qZA()),2&Me){const O=n.oxw(2);n.xp6(1),n.Q6J("label",n.lcZ(2,3,"QuickHandlingReason.Title"))("value",(null==O.quickHandlingReason?null:O.quickHandlingReason.text)||"-")("viewMode",!0)}}function wn(Me,N){1&Me&&(n.TgZ(0,"ion-col",2),n._uU(1," -"),n.qZA())}function Gn(Me,N){if(1&Me&&(n.TgZ(0,"ion-col",14),n._UZ(1,"sivi-lib-attachment",15),n.qZA()),2&Me){const O=N.$implicit;n.xp6(1),n.Q6J("attachment",O)("showCancelButton",!1)}}function xi(Me,N){if(1&Me&&(n.TgZ(0,"ion-col",14),n._UZ(1,"sivi-lib-attachment",15),n.qZA()),2&Me){const O=N.$implicit;n.xp6(1),n.Q6J("attachment",O)("showCancelButton",!1)}}function Cr(Me,N){if(1&Me&&(n.TgZ(0,"ion-row")(1,"ion-col",2)(2,"p",12),n._uU(3),n.ALo(4,"translate"),n.qZA()(),n.YNc(5,wn,2,0,"ion-col",8),n.ALo(6,"async"),n.ALo(7,"async"),n.YNc(8,Gn,2,2,"ion-col",13),n.ALo(9,"async"),n.YNc(10,xi,2,2,"ion-col",13),n.ALo(11,"async"),n.qZA()),2&Me){const O=n.oxw(2);let Ce;n.xp6(3),n.hij(" ",n.lcZ(4,6,"Application.Summary.Quickhandling.Attachments")," "),n.xp6(2),n.Q6J("ngIf",0===(null==(Ce=n.lcZ(6,8,O.images$))?null:Ce.length)&&0===n.lcZ(7,10,O.documents$).length),n.xp6(3),n.Q6J("ngForOf",n.lcZ(9,12,O.images$))("ngForTrackBy",O.trackByFn),n.xp6(2),n.Q6J("ngForOf",n.lcZ(11,14,O.documents$))("ngForTrackBy",O.trackByFn)}}function Fr(Me,N){if(1&Me&&(n.TgZ(0,"ion-col",2),n._UZ(1,"cgi-input",3),n.ALo(2,"translate"),n.qZA()),2&Me){const O=n.oxw(2);n.xp6(1),n.Q6J("label",n.lcZ(2,3,"Form.Label.PetsAtHome"))("value",O.childPetInfoText)("viewMode",!0)}}function en(Me,N){if(1&Me&&(n.TgZ(0,"div",1)(1,"h1"),n._uU(2),n.ALo(3,"translate"),n.qZA(),n.TgZ(4,"ion-row")(5,"ion-col",2),n._UZ(6,"cgi-input",3),n.ALo(7,"translate"),n.qZA(),n.TgZ(8,"ion-col",2),n._UZ(9,"cgi-input",3),n.ALo(10,"translate"),n.qZA(),n.TgZ(11,"ion-col",2),n._UZ(12,"cgi-input",3),n.ALo(13,"translate"),n.ALo(14,"translate"),n.qZA()(),n.TgZ(15,"h1"),n._uU(16),n.ALo(17,"translate"),n.qZA(),n.TgZ(18,"ion-row")(19,"ion-col",2),n._UZ(20,"cgi-input",3),n.ALo(21,"translate"),n.qZA(),n.TgZ(22,"ion-col",2),n._UZ(23,"cgi-input",3),n.ALo(24,"translate"),n.qZA(),n.TgZ(25,"ion-col",2),n.YNc(26,ei,3,3,"mat-icon",4),n.TgZ(27,"span",5),n._uU(28),n.ALo(29,"translate"),n.qZA(),n._UZ(30,"cgi-input",6),n.qZA(),n.TgZ(31,"ion-col",2),n._UZ(32,"cgi-input",3),n.ALo(33,"translate"),n.ALo(34,"date"),n.qZA(),n.TgZ(35,"ion-col",2),n.YNc(36,un,3,8,"cgi-input",7),n.YNc(37,Ft,3,7,"cgi-input",7),n.qZA(),n.YNc(38,Ut,3,5,"ion-col",8),n.ALo(39,"async"),n.YNc(40,Cr,12,16,"ion-row",9),n.ALo(41,"async"),n.TgZ(42,"ion-col",2),n._UZ(43,"cgi-input",3),n.ALo(44,"translate"),n.ALo(45,"translate"),n.qZA(),n.TgZ(46,"ion-col",2),n._UZ(47,"cgi-input",3),n.ALo(48,"translate"),n.qZA(),n.TgZ(49,"ion-col"),n._UZ(50,"cgi-input",3),n.ALo(51,"translate"),n.qZA(),n.TgZ(52,"ion-col",2),n._UZ(53,"cgi-input",3),n.ALo(54,"translate"),n.qZA(),n.TgZ(55,"ion-col",2),n._UZ(56,"cgi-input",3),n.ALo(57,"translate"),n.qZA(),n.YNc(58,Fr,3,5,"ion-col",8),n.TgZ(59,"ion-col",2),n._UZ(60,"cgi-input",3),n.ALo(61,"translate"),n.qZA()(),n._UZ(62,"sivi-application-child",10)(63,"sivi-application-guardians"),n.qZA()),2&Me){const O=n.oxw();n.xp6(2),n.Oqu(n.lcZ(3,53,"Application.Basic.Information")),n.xp6(4),n.Q6J("label",n.lcZ(7,55,"Municipality.Singular"))("value",null==O.applicationInstance?null:O.applicationInstance.municipalityName)("viewMode",!0),n.xp6(3),n.Q6J("label",n.lcZ(10,57,"Application.Summary.ApplicationMadeFor"))("value",(null==O.applicationInstance||null==O.applicationInstance.child?null:O.applicationInstance.child.firstNames)+" "+(null==O.applicationInstance.child?null:O.applicationInstance.child.lastName))("viewMode",!0),n.xp6(3),n.Q6J("label",n.lcZ(13,59,"Application.Type"))("value",n.lcZ(14,61,"Application.Type."+O.applicationInstance.type))("viewMode",!0),n.xp6(4),n.Oqu(n.lcZ(17,63,"Application.Summary.ECECpreferences")),n.xp6(4),n.Q6J("label",n.lcZ(21,65,"ECEC.Application.Title.PriorityOrderForDayCarePlaces"))("value",O.preferredEducationPlaces)("viewMode",!0),n.xp6(3),n.Q6J("label",n.lcZ(24,67,"Application.Summary.WeeklyCareTimes"))("value",O.careTimeOptionsText||"-")("viewMode",!0),n.xp6(3),n.Q6J("ngIf",O.invalidExtent&&O.professionalUser),n.xp6(2),n.Oqu(n.lcZ(29,69,"Application.Summary.ExtentOptions")),n.xp6(2),n.Q6J("value",O.extentOptionsText||"-")("viewMode",!0),n.xp6(2),n.Q6J("label",n.lcZ(33,71,"Application.Summary.StartDate"))("value",n.xi3(34,73,O.applicationInstance.desiredStartDate,O.dateFormats.FINNISH_ANGULAR))("viewMode",!0),n.xp6(4),n.Q6J("ngIf",O.applicationInstance.endDate),n.xp6(1),n.Q6J("ngIf",O.applicationInstance.indefinitely),n.xp6(1),n.Q6J("ngIf",n.lcZ(39,76,O.summaryUtilsService.showQuickHandling$)),n.xp6(2),n.Q6J("ngIf",n.lcZ(41,78,O.summaryUtilsService.showQuickHandling$)),n.xp6(3),n.Q6J("label",n.lcZ(44,80,"Application.ECEC.CurrentECECPlace"))("value",n.lcZ(45,82,O.currentECECPlaceText))("viewMode",!0),n.xp6(4),n.Q6J("label",n.lcZ(48,84,"Application.ECEC.Language"))("value",O.desiredOrganizationLanguages)("viewMode",!0),n.xp6(3),n.Q6J("label",n.lcZ(51,86,"Application.View.Filters.Headers.ServiceForm"))("value",O.getServiceFormText())("viewMode",!0),n.xp6(3),n.Q6J("label",n.lcZ(54,88,"Application.ECEC.PreferredAddress"))("value",O.preferredPlaceAddress)("viewMode",!0),n.xp6(3),n.Q6J("label",n.lcZ(57,90,"Application.Summary.SiblingsAtSameUnit"))("value",O.siblingsAtSameUnit)("viewMode",!0),n.xp6(2),n.Q6J("ngIf",O.showPetsAtHome),n.xp6(2),n.Q6J("label",n.lcZ(61,92,"ECEC.Plan.AdditionalInformation"))("value",O.applicationInstance.additionalInformation?O.applicationInstance.additionalInformation:"-")("viewMode",!0),n.xp6(2),n.Q6J("child",null==O.applicationInstance?null:O.applicationInstance.child)("motherTongue",O.childMotherTongue)("otherLanguages",O.childOtherLanguages)("applicationId",null==O.applicationInstance?null:O.applicationInstance.id)("languagesList",O.languagesList)("specialNeeds",O.applicationInstance.specialNeeds)}}Fs.\u0275fac=function(O){return new(O||Fs)(n.Y36(w.sK),n.Y36(Y.p))},Fs.\u0275cmp=n.Xpm({type:Fs,selectors:[["sivi-application-summary-club"]],inputs:{application:"application"},features:[n.qOj],decls:1,vars:1,consts:[["id","printed",4,"ngIf"],["id","printed"],["size","12"],["type","text",3,"label","value","viewMode"],[3,"child","motherTongue","otherLanguages","applicationId","specialNeeds"]],template:function(O,Ce){1&O&&n.YNc(0,Et,40,61,"div",0),2&O&&n.Q6J("ngIf",Ce.applicationInstance)},dependencies:[ae.wI,ae.Nd,he.O5,jn,we,he.uU,w.X$],styles:["h1[_ngcontent-%COMP%]{color:var(--ion-color-secondary)}ion-col[_ngcontent-%COMP%]{margin-top:5px}.summary-container[_ngcontent-%COMP%]{padding:0 16px 10px}@media screen and (min-width: 600px){.summary-container[_ngcontent-%COMP%]{padding:0 40px 10px}}@media screen and (min-width: 840px){.summary-container[_ngcontent-%COMP%]{padding:0 80px 10px}}"]});const nc=class extends l.SiviComponent{set application(N){this.applicationInstance=N,this.onUpdateApplication$.next(N)}get selectedUnits(){return(0,le.Z)(this.applicationInstance,"selectedUnits",[])}get showPetsAtHome(){return this.selectedUnits.some(N=>N.organizationType===l.OrganizationTypes.DAYCAREPLACE_TYPE_FAMILY_DAYCARE)}get preferredEducationPlaces(){return this.selectedUnits.map(N=>this.applicationUtils.getUnitFocusesTextWithBrackets(N,this.languagesList)).join(", ")}constructor(N,O,Ce,Je,Vt,Rr,wo,ua){super(),this.translate=N,this.languageService=O,this.ececExtentOptionsService=Ce,this.ececWeeklyCareTimeOptionsService=Je,this.applicationUtils=Vt,this.auth=Rr,this.summaryUtilsService=wo,this.changeDetector=ua,this.invalidExtent=!1,this.dateFormats=l.DateFormats,this.onUpdateApplication$=new ve.x}ngOnInit(){this.userLanguage=this.languageService.getCurrentUserLanguage().language,this.professionalUser=this.auth.isProfessional(),this.filterAttachments(),this.getLanguageListAndUpdate(),this.extentId=this.applicationInstance.weeklyHoursOption,this.applicationUtils.careOptions$.pipe((0,g.R)(this.destroy$)).subscribe(N=>{this.careTimeOptions=N.timeOptions,this.validExtentOptions=N.extentOptions,this.setCareTimeOptionsText(),this.setExtentOptionsText()}),this.onUpdateApplication$.pipe((0,mt.b)(200),(0,g.R)(this.destroy$)).subscribe(N=>{this.reloadView(N)}),this.setQuickHandlingReason()}reloadView(N){var O=this;return(0,o.Z)(function*(){yield O.summaryUtilsService.setApplication(N),O.languagesList?O.updatePreferences(N):O.getLanguageListAndUpdate(),O.preferredPlaceAddress=O.summaryUtilsService.getPreferredEducationalLocation(),O.siblingsAtSameUnit=O.summaryUtilsService.getSiblingsAtSamePlace(),O.setQuickHandlingReason(),O.setCareTimeOptionsText(),O.setExtentOptionsText(),O.setChildPetInfoText(),O.getCurrentECECText(),O.validExtentOptions.find(Je=>Je.id===O.extentId)||O.ececExtentOptionsService.getExtentOptionsByMunicipalityId(N.municipalityId,N.type).pipe((0,E.U)(Je=>l.Utils.sortArrayByDate(Je))).subscribe(Je=>{O.invalidExtentOptions=Je,O.setExtentOptionsText()})})()}setQuickHandlingReason(){this.quickHandlingReason=this.summaryUtilsService.quickHandlingOptions$.getValue().find(N=>N.value===this.applicationInstance.quickHandlingReason)}filterAttachments(){this.images$=this.applicationUtils.attachments$.pipe((0,E.U)(N=>{if(N)return N.filter(O=>O.type&&O.type.includes("image/")&&O.documentPurpose===l.AttachmentPurposes.APPLICATION)})),this.documents$=this.applicationUtils.attachments$.pipe((0,E.U)(N=>{if(N)return N.filter(O=>O.type&&!O.type.includes("image/")&&O.documentPurpose===l.AttachmentPurposes.APPLICATION)}))}isImage(N){return!!N&&N.toString().includes("image/")}getLanguageListAndUpdate(){this.languageService.getLanguageList(this.userLanguage).pipe((0,T.q)(1)).subscribe(N=>{this.languagesList=N,this.updatePreferences(this.applicationInstance)})}updatePreferences(N){this.languagesList&&(this.desiredOrganizationLanguages=this.languageService.getSelectedLanguagesText(N.preferredLanguages,this.languagesList),this.childMotherTongue=this.languageService.getSelectedLanguagesText([N.child.motherTongue],this.languagesList),this.childOtherLanguages=this.languageService.getSelectedLanguagesText(N.child.otherLanguages,this.languagesList)),this.applicationInstance={...N}}setCareTimeOptionsText(){const N=[];this.applicationInstance.careTimeTypes&&this.applicationInstance.careTimeTypes.length&&this.careTimeOptions&&this.applicationInstance.careTimeTypes.forEach(O=>{const Ce=this.careTimeOptions.findIndex(Je=>Je.value.type===O.type);Ce>-1&&N.push(this.careTimeOptions[Ce].text)}),this.careTimeOptionsText=N.length?N.join(", "):"-"}setPreferredPlaceAddress(){const N=this.applicationInstance.preferredLocation;if(this.preferredPlaceAddress="-",N){const{streetAddress:O,postOffice:Ce,zipcode:Je}=N;O&&Ce&&Je&&(this.preferredPlaceAddress=O+", "+Ce+", "+Je)}}setChildPetInfoText(){const N=this.applicationInstance.petsAtHome;this.childPetInfoText=""!==N?this.translate.instant("General.Yes")+(N?", "+N:""):this.translate.instant("General.No")}setExtentOptionsText(){if(!this.validExtentOptions&&!this.invalidExtentOptions)return void(this.extentOptionsText="-");let N=[];const O=this.applicationInstance.weeklyCareNeedOption,Ce=this.applicationInstance.dailyCareNeedOption;this.extentId=this.applicationInstance.weeklyHoursOption||this.extentId;const Je=this.getExtentOption(this.extentId,this.validExtentOptions,this.invalidExtentOptions);if(Je){const Vt=Je.overHoursPerWeek+"-"+Je.maxHoursPerWeek+" "+this.translate.instant("General.HoursPerWeek");N.push(Vt),N=this.getWeeklyExtentTexts(O,N),N=this.getDailyExtentTexts(Je,Ce,N)}this.extentOptionsText=N.length?N.join(", "):"-"}getExtentOption(N,O,Ce){let Je;return N&&(Je=O.find(Vt=>Vt.id===N),!Je&&Ce&&Ce.forEach(Vt=>{const Rr=Vt.paymentExtentValues.find(wo=>wo.id===N);Rr&&(Je={...Rr},this.invalidExtent=!0)})),Je}getWeeklyExtentTexts(N,O){return"boolean"==typeof N&&(N?O.push(this.translate.instant("ECEC.Payment.Extent.Option.FullWeek")):O.push(this.translate.instant("ECEC.Payment.Extent.Option.PartWeek"))),O}getDailyExtentTexts(N,O,Ce){return N.fullTime||"boolean"==typeof O&&O?Ce.push(this.translate.instant("ECEC.Payment.Extent.Option.FullTime")):Ce.push(this.translate.instant("ECEC.Payment.Extent.Option.PartTime")),Ce}getCurrentECECText(){const N=this.summaryUtilsService.unitList$.value;if(N&&this.applicationInstance.currentUnit){const O=N.find(Ce=>Ce.value.areaId===this.applicationInstance.currentUnit);O&&(this.currentECECPlaceText=O.element.text)}else this.currentECECPlaceText=this.applicationInstance.inOtherMunicipality?"Application.InOtherMunicipality":"Application.NoCurrentECEC"}getServiceFormText(){const N=this.applicationInstance.serviceForms;return N&&N.length?N.map(Ce=>this.translate.instant(Ce)).join(", "):"-"}};let Wn=nc;function at(Me,N){if(1&Me&&n._UZ(0,"sivi-application-summary-ppe",5),2&Me){const O=n.oxw(2);n.Q6J("application",O.application)("files",O.files)}}function It(Me,N){if(1&Me&&n._UZ(0,"sivi-application-summary-club",5),2&Me){const O=n.oxw(2);n.Q6J("application",O.application)("files",O.files)}}function Qt(Me,N){if(1&Me&&n._UZ(0,"sivi-application-summary-ecec",5),2&Me){const O=n.oxw(2);n.Q6J("application",O.application)("files",O.files)}}function St(Me,N){if(1&Me&&(n.ynx(0),n._UZ(1,"sivi-application-history",6),n.ALo(2,"async"),n.BQk()),2&Me){const O=n.oxw(2);n.xp6(1),n.Q6J("history",n.lcZ(2,1,O.history$))}}function Pt(Me,N){if(1&Me&&(n.TgZ(0,"div",1)(1,"ion-grid",2),n.YNc(2,at,1,2,"sivi-application-summary-ppe",3),n.YNc(3,It,1,2,"sivi-application-summary-club",3),n.YNc(4,Qt,1,2,"sivi-application-summary-ecec",3),n.YNc(5,St,3,3,"ng-container",4),n.ALo(6,"async"),n.qZA()()),2&Me){const O=n.oxw();let Ce;n.xp6(2),n.Q6J("ngIf",O.application.type===O.applicationTypes.PPE||O.application.type===O.applicationTypes.PPEWITHECEC),n.xp6(1),n.Q6J("ngIf",O.application.type===O.applicationTypes.CLUB),n.xp6(1),n.Q6J("ngIf",O.application.type===O.applicationTypes.ECEC),n.xp6(1),n.Q6J("ngIf",null==(Ce=n.lcZ(6,4,O.history$))?null:Ce.length)}}nc.\u0275fac=function(O){return new(O||nc)(n.Y36(w.sK),n.Y36(P.TS),n.Y36(Dn.EcecExtentOptionsService),n.Y36(Dn.EcecWeeklyCareTimeOptionsService),n.Y36(V.q),n.Y36(P.e8),n.Y36(Y.p),n.Y36(n.sBO))},nc.\u0275cmp=n.Xpm({type:nc,selectors:[["sivi-application-summary-ecec"]],inputs:{application:"application"},features:[n.qOj],decls:1,vars:1,consts:[["id","printed",4,"ngIf"],["id","printed"],["size","12"],["type","text",3,"label","value","viewMode"],["aria-hidden","false","class","extent-icon","matTooltipClass","application-state-tooltip",3,"matTooltip",4,"ngIf"],[1,"extent"],["type","text",3,"value","viewMode"],["type","text",3,"label","value","viewMode",4,"ngIf"],["size","12",4,"ngIf"],[4,"ngIf"],[3,"child","motherTongue","otherLanguages","applicationId","languagesList","specialNeeds"],["aria-hidden","false","matTooltipClass","application-state-tooltip",1,"extent-icon",3,"matTooltip"],["role","heading","aria-level","4"],["size","12","size-md","3",4,"ngFor","ngForOf","ngForTrackBy"],["size","12","size-md","3"],[3,"attachment","showCancelButton"]],template:function(O,Ce){1&O&&n.YNc(0,en,64,94,"div",0),2&O&&n.Q6J("ngIf",Ce.applicationInstance)},dependencies:[ae.wI,ae.Nd,he.sg,he.O5,l.AttachmentComponent,Bn.Hw,kn.gM,jn,we,he.Ov,he.uU,w.X$],styles:["h1[_ngcontent-%COMP%]{color:var(--ion-color-secondary)}ion-col[_ngcontent-%COMP%]{margin-top:5px}.summary-container[_ngcontent-%COMP%]{padding:0 16px 10px}@media screen and (min-width: 600px){.summary-container[_ngcontent-%COMP%]{padding:0 40px 10px}}@media screen and (min-width: 840px){.summary-container[_ngcontent-%COMP%]{padding:0 80px 10px}}.extent-icon[_ngcontent-%COMP%]{margin-right:5px;color:var(--ion-color-secondary);vertical-align:middle}.extent[_ngcontent-%COMP%]{display:inline-flex}"]});const Pu=class extends l.SiviComponent{set application(N){N.state!==(0,le.Z)(this.applicationCopy,"state")&&(this.history$=this.getHistory(N).pipe((0,nn.d)())),this.applicationCopy=N}get application(){return this.applicationCopy}constructor(N,O,Ce,Je,Vt,Rr,wo){super(),this.translate=N,this.languageService=O,this.ececExtentOptionsService=Ce,this.ececWeeklyCareTimeOptionsService=Je,this.applicationUtilsService=Vt,this.applicationService=Rr,this.auth=wo,this.applicationTypes=l.ApplicationTypes,this.permissions=e.Pl.Application}getLanguagesList(){this.applicationUtilsService.getLanguageOptions().subscribe(N=>{N.length&&(this.languages=N)},N=>{console.error("getLanguagesList failed",N)})}getPlaceName(N){return this.applicationUtilsService.getUnitFocusesTextWithBrackets(N,this.languages)}getHistory(N){return this.auth.hasAnyRole(this.permissions.CAN_ACCESS_HISTORY)?this.applicationService.getHistory(N.id):(0,ge.of)([])}};let cn=Pu;function Ln(Me,N){if(1&Me){const O=n.EpF();n.ynx(0),n.TgZ(1,"ion-grid")(2,"ion-row")(3,"ion-col")(4,"ion-button",2),n.NdJ("click",function(){n.CHM(O);const Je=n.oxw();return n.KtG(Je.goToPage(1))}),n._uU(5),n.ALo(6,"translate"),n.qZA()()()(),n.BQk()}2&Me&&(n.xp6(5),n.hij(" ",n.lcZ(6,1,"General.Buttons.Next")," "))}function ii(Me,N){if(1&Me){const O=n.EpF();n.ynx(0),n.TgZ(1,"ion-grid")(2,"ion-row")(3,"ion-col",3)(4,"ion-button",4),n.NdJ("click",function(){n.CHM(O);const Je=n.oxw();return n.KtG(Je.goToPage(0))}),n._uU(5),n.ALo(6,"translate"),n.qZA()(),n.TgZ(7,"ion-col",5)(8,"ion-button",6),n.NdJ("click",function(){n.CHM(O);const Je=n.oxw();return n.KtG(Je.goToPage(2))}),n._uU(9),n.ALo(10,"translate"),n.qZA()()()(),n.BQk()}2&Me&&(n.xp6(5),n.hij(" ",n.lcZ(6,2,"General.Buttons.PreviousPage")," "),n.xp6(4),n.hij(" ",n.lcZ(10,4,"General.Buttons.Next")," "))}function hi(Me,N){if(1&Me){const O=n.EpF();n.TgZ(0,"ion-col",5)(1,"ion-button",11),n.NdJ("click",function(){n.CHM(O);const Je=n.oxw(2);return n.KtG(Je.onSendApplication())}),n.ALo(2,"translate"),n._UZ(3,"sivi-lib-spinner",12),n._uU(4),n.ALo(5,"translate"),n.qZA()()}if(2&Me){const O=n.oxw(2);n.xp6(1),n.Q6J("disabled",!O.isAbleToSave||O.sendingApplication),n.uIk("aria-label",n.lcZ(2,4,"General.Buttons.Send")),n.xp6(2),n.Q6J("show",O.sendingApplication),n.xp6(1),n.hij(" ",n.lcZ(5,6,"General.Buttons.Send")," ")}}function Ri(Me,N){if(1&Me){const O=n.EpF();n.TgZ(0,"ion-col",5)(1,"ion-button",13),n.NdJ("click",function(){n.CHM(O);const Je=n.oxw(2);return n.KtG(Je.onSendApplication())}),n.ALo(2,"translate"),n._UZ(3,"sivi-lib-spinner",12),n._uU(4),n.ALo(5,"translate"),n.qZA()()}if(2&Me){const O=n.oxw(2);n.xp6(1),n.Q6J("disabled",!O.isAbleToSave||O.sendingApplication),n.uIk("aria-label",n.lcZ(2,4,"General.Buttons.Send")),n.xp6(2),n.Q6J("show",O.sendingApplication),n.xp6(1),n.hij(" ",n.lcZ(5,6,"Application.Summary.SendChanges")," ")}}function _r(Me,N){1&Me&&(n.TgZ(0,"p"),n._uU(1),n.ALo(2,"translate"),n.qZA()),2&Me&&(n.xp6(1),n.Oqu(n.lcZ(2,1,"Application.Summary.ReadyToSent")))}function er(Me,N){1&Me&&(n.TgZ(0,"p"),n._uU(1),n.ALo(2,"translate"),n.qZA()),2&Me&&(n.xp6(1),n.Oqu(n.lcZ(2,1,"Application.Summary.CannotSent")))}function Yr(Me,N){if(1&Me){const O=n.EpF();n.TgZ(0,"ion-button",14),n.NdJ("click",function(){n.CHM(O);const Je=n.oxw(2);return n.KtG(Je.goToInvalid())}),n._uU(1),n.ALo(2,"translate"),n.qZA()}2&Me&&(n.xp6(1),n.Oqu(n.lcZ(2,1,"Application.Summary.ReturnToFill")))}function _o(Me,N){if(1&Me){const O=n.EpF();n.ynx(0),n.TgZ(1,"ion-grid")(2,"ion-row")(3,"ion-col",3)(4,"ion-button",7),n.NdJ("click",function(){n.CHM(O);const Je=n.oxw();return n.KtG(Je.goToPage(1))}),n._uU(5),n.ALo(6,"translate"),n.qZA()(),n.YNc(7,hi,6,8,"ion-col",8),n.YNc(8,Ri,6,8,"ion-col",8),n.qZA(),n.TgZ(9,"ion-row")(10,"ion-col",9),n.YNc(11,_r,3,3,"p",1),n.YNc(12,er,3,3,"p",1),n.YNc(13,Yr,3,3,"ion-button",10),n.qZA()()(),n.BQk()}if(2&Me){const O=n.oxw();n.xp6(5),n.hij(" ",n.lcZ(6,6,"General.Buttons.PreviousPage")," "),n.xp6(2),n.Q6J("ngIf",O.application.state===O.constants.DRAFT),n.xp6(1),n.Q6J("ngIf",!O.reviewMode&&O.application.state!==O.constants.DRAFT),n.xp6(3),n.Q6J("ngIf",O.isAbleToSave),n.xp6(1),n.Q6J("ngIf",!O.isAbleToSave),n.xp6(1),n.Q6J("ngIf",!O.isAbleToSave)}}function Si(Me,N){if(1&Me){const O=n.EpF();n.TgZ(0,"ion-button",18),n.NdJ("click",function(){n.CHM(O);const Je=n.oxw(2);return n.KtG(Je.goToPage(2,!1))}),n._uU(1),n.ALo(2,"translate"),n.qZA()}2&Me&&(n.xp6(1),n.hij(" ",n.lcZ(2,1,"Application.Confirmation.Review")," "))}function to(Me,N){if(1&Me){const O=n.EpF();n.ynx(0),n.TgZ(1,"ion-grid")(2,"ion-row")(3,"ion-col"),n.YNc(4,Si,3,3,"ion-button",15),n.qZA(),n.TgZ(5,"ion-col")(6,"ion-button",16),n.NdJ("click",function(){n.CHM(O);const Je=n.oxw();return n.KtG(Je.closeModal())}),n._uU(7),n.ALo(8,"translate"),n.qZA()()(),n.TgZ(9,"ion-row")(10,"ion-col")(11,"div",17)(12,"p"),n._uU(13),n.ALo(14,"translate"),n.qZA()()()()(),n.BQk()}if(2&Me){const O=n.oxw();n.xp6(4),n.Q6J("ngIf",O.canReviewApplication),n.xp6(3),n.hij(" ",n.lcZ(8,3,"General.Buttons.Close")," "),n.xp6(6),n.Oqu(n.lcZ(14,5,"Application.Confirmation.In.Progress"))}}Pu.\u0275fac=function(O){return new(O||Pu)(n.Y36(w.sK),n.Y36(P.TS),n.Y36(Dn.EcecExtentOptionsService),n.Y36(Dn.EcecWeeklyCareTimeOptionsService),n.Y36(V.q),n.Y36(Mn.I),n.Y36(P.e8))},Pu.\u0275cmp=n.Xpm({type:Pu,selectors:[["sivi-application-summary"]],inputs:{application:"application",files:"files"},features:[n.qOj],decls:1,vars:1,consts:[["class","summary-container",4,"ngIf"],[1,"summary-container"],[1,"ion-no-padding"],[3,"application","files",4,"ngIf"],[4,"ngIf"],[3,"application","files"],[3,"history"]],template:function(O,Ce){1&O&&n.YNc(0,Pt,7,6,"div",0),2&O&&n.Q6J("ngIf",Ce.application)},dependencies:[ae.jY,he.O5,wi,Xn,gn,Wn,he.Ov],styles:["h1[_ngcontent-%COMP%]{color:var(--ion-color-secondary)}ion-col[_ngcontent-%COMP%]{margin-top:10px;margin-bottom:10px}.summary-container[_ngcontent-%COMP%]{padding:0 16px 10px}@media screen and (min-width: 600px){.summary-container[_ngcontent-%COMP%]{padding:0 40px 10px}}@media screen and (min-width: 840px){.summary-container[_ngcontent-%COMP%]{padding:0 80px 10px}}"]});const yl=class extends l.SiviPage{set sending(N){this.sendingApplication=N}constructor(N,O,Ce,Je,Vt,Rr){super(O,N,Vt),this.translate=N,this.notifyService=O,this.applicationService=Ce,this.modalCtrl=Je,this.router=Vt,this.authService=Rr,this.page=0,this.pageChange=new n.vpe,this.sendApplication=new n.vpe,this.types={ECEC:l.ApplicationTypes.ECEC,PPE:l.ApplicationTypes.PPE,CLUB:l.ApplicationTypes.CLUB,PPEWITHECEC:l.ApplicationTypes.PPEWITHECEC},this.constants=l.Constants,this.sendingApplication=!1,this.canReviewApplication=!1}ngOnInit(){switch(this.canReviewApplication=this.authService.hasAnyRole(e.Pl.Application.CAN_REVIEW_SENT_APPLICATION),this.application.type){case this.types.ECEC:this.queryString="sivi-ecec-application-preferences";break;case this.types.PPE:case this.types.PPEWITHECEC:this.queryString="sivi-ppe-application-preferences";break;case this.types.CLUB:this.queryString="sivi-club-application-preferences"}}goToInvalid(){const N=document.querySelector("#main-application-container");if(!N)return void console.error("main-application-container not found");const O=N.querySelector(".invalid");if(O){console.warn("goToInvalid",O);const Ce=O.querySelector("input"),Je=document.querySelector(this.queryString);console.warn("goToInvalid input",Ce),Je.contains(O)?this.scrollToView(Ce,O,0):this.scrollToView(Ce,O,1)}}scrollToView(N,O,Ce){this.page=Ce,this.modalCtrl.updateQueryParam("page",this.page),this.pageChange.emit(this.page),setTimeout(()=>{N&&(N.focus({preventScroll:!0}),N.blur(),N.focus({preventScroll:!0})),O.scrollIntoView({behavior:"smooth",block:"start",inline:"nearest"})},200)}onSendApplication(){this.sendApplication.emit()}closeModal(){this.modalCtrl.dismiss({action:l.Actions.EDIT,applicationId:this.application.id})}goToPage(N,O=!0){this.page=N,this.modalCtrl.updateQueryParam("page",this.page),O&&document.getElementById("anchor").scrollIntoView(!0),this.pageChange.emit(this.page)}};let Oa=yl;yl.\u0275fac=function(O){return new(O||yl)(n.Y36(w.sK),n.Y36(P.c),n.Y36(P.IX),n.Y36(l.SiviModalController),n.Y36(B.F0),n.Y36(P.e8))},yl.\u0275cmp=n.Xpm({type:yl,selectors:[["sivi-buttons-container"]],inputs:{reviewMode:"reviewMode",page:"page",application:"application",isAbleToSave:"isAbleToSave",sending:"sending"},outputs:{pageChange:"pageChange",sendApplication:"sendApplication"},features:[n.qOj],decls:5,vars:4,consts:[[1,"buttons-container"],[4,"ngIf"],["color","primary","data-cy","buttons-container-page-next-1",1,"ion-float-right",3,"click"],[1,"start"],["color","primary","fill","outline","data-cy","buttons-container-page-back-0",3,"click"],[1,"end"],["color","primary","data-cy","buttons-container-page-next-2",1,"ion-float-right",3,"click"],["color","primary","fill","outline","data-cy","buttons-container-page-back-1",3,"click"],["class","end",4,"ngIf"],[1,"information","align-self-end"],["fill","outline","color","secondary",3,"click",4,"ngIf"],["color","primary","data-cy","buttons-container-application-send-draft",1,"ion-float-right",3,"disabled","click"],[3,"show"],["color","primary","data-cy","buttons-container-application-send-updated",1,"ion-float-right",3,"disabled","click"],["fill","outline","color","secondary",3,"click"],["color","primary","class","ion-margin-end","fill","outline","data-cy","buttons-container-application-go-review",3,"click",4,"ngIf"],["color","primary","data-cy","buttons-container-application-close",1,"ion-float-right",3,"click"],[1,"information","ion-float-right"],["color","primary","fill","outline","data-cy","buttons-container-application-go-review",1,"ion-margin-end",3,"click"]],template:function(O,Ce){1&O&&(n.TgZ(0,"div",0),n.YNc(1,Ln,7,3,"ng-container",1),n.YNc(2,ii,11,6,"ng-container",1),n.YNc(3,_o,14,8,"ng-container",1),n.YNc(4,to,15,7,"ng-container",1),n.qZA()),2&O&&(n.xp6(1),n.Q6J("ngIf",0===Ce.page),n.xp6(1),n.Q6J("ngIf",1===Ce.page),n.xp6(1),n.Q6J("ngIf",2===Ce.page),n.xp6(1),n.Q6J("ngIf",3===Ce.page))},dependencies:[l.SpinnerComponent,ae.YG,ae.wI,ae.jY,ae.Nd,he.O5,w.X$],styles:[".information[_ngcontent-%COMP%]{text-align:right}.goToInvalid[_ngcontent-%COMP%]{text-decoration:underline;color:var(--ion-color-secondary);text-align:end}.goToInvalid[_ngcontent-%COMP%]:hover{cursor:pointer}.end[_ngcontent-%COMP%]{justify-content:end}.start[_ngcontent-%COMP%]{justify-content:start}.buttons-container[_ngcontent-%COMP%]{display:flex}@media screen and (min-width: 600px){.buttons-container[_ngcontent-%COMP%]{padding:15px 30px 30px}}p[_ngcontent-%COMP%]{margin:0}"]});var Uo=p(24006);const dl=class extends l.SiviPage{constructor(N,O,Ce,Je,Vt,Rr,wo){super(Ce,N,Vt),this.translate=N,this.appState=O,this.notifyService=Ce,this.route=Je,this.router=Vt,this.modalCtrl=Rr,this.fb=wo,this.form=this.fb.group({cancellationReason:["",l.SiviValidators.required]})}ngOnInit(){this.form.get("cancellationReason").patchValue(this.cancellationReason)}onFormValueChange(N){this.cancellationReason=N.cancellationReason}onDismiss(){this.modalCtrl.dismiss(null)}onCancelApplication(){this.modalCtrl.dismiss({removeApplication:!0,cancellationReason:this.cancellationReason})}};let rl=dl;dl.\u0275fac=function(O){return new(O||dl)(n.Y36(w.sK),n.Y36(P.ZQ),n.Y36(P.c),n.Y36(B.gz),n.Y36(B.F0),n.Y36(l.SiviModalController),n.Y36(Uo.qu))},dl.\u0275cmp=n.Xpm({type:dl,selectors:[["sivi-cancel-application-modal"]],inputs:{applicationId:"applicationId"},features:[n.qOj],decls:23,vars:18,consts:[[1,"ion-padding"],[1,"application"],["siviLibForm","",1,"labels-container",3,"formGroup"],[1,"title"],[3,"text"],["formControlName","cancellationReason","siviLibFormControl","","type","text","label-position","floating",3,"label"],[1,"buttons-container"],[1,"row"],["size","12","size-md","5",1,"ion-no-padding","center"],["color","primary","fill","outline",3,"click"],["color","primary",3,"disabled","click"]],template:function(O,Ce){1&O&&(n.TgZ(0,"ion-content",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"h1"),n._uU(5),n.ALo(6,"translate"),n.qZA(),n._UZ(7,"sivi-lib-info-popup",4),n.qZA(),n.TgZ(8,"p"),n._uU(9),n.ALo(10,"translate"),n.qZA(),n._UZ(11,"cgi-input",5),n.ALo(12,"translate"),n.qZA(),n.TgZ(13,"div",6)(14,"ion-grid")(15,"ion-row",7)(16,"ion-col",8)(17,"ion-button",9),n.NdJ("click",function(){return Ce.onDismiss()}),n._uU(18),n.ALo(19,"translate"),n.qZA(),n.TgZ(20,"ion-button",10),n.NdJ("click",function(){return Ce.onCancelApplication()}),n._uU(21),n.ALo(22,"translate"),n.qZA()()()()()()()),2&O&&(n.xp6(2),n.Q6J("formGroup",Ce.form),n.xp6(3),n.Oqu(n.lcZ(6,8,"General.Buttons.CancelApplication")),n.xp6(2),n.s9C("text","Application.Contextual.Professional.CancelApplication"),n.xp6(2),n.Oqu(n.lcZ(10,10,"Message.Cancel.Application.Message")),n.xp6(2),n.Q6J("label",n.lcZ(12,12,"Conversation.Comment.Plural")),n.xp6(7),n.hij(" ",n.lcZ(19,14,"General.Text.No")," "),n.xp6(2),n.Q6J("disabled",!Ce.isValid),n.xp6(1),n.hij(" ",n.lcZ(22,16,"General.Text.Yes")," "))},dependencies:[l.InfoPopupComponent,ae.YG,ae.wI,ae.W2,ae.jY,ae.Nd,Uo.JJ,Uo.JL,l.SiviFormDirective,l.SiviFormControlDirective,Uo.sg,Uo.u,w.X$],styles:[".title[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:flex-start}.title[_ngcontent-%COMP%]   sivi-lib-info-popup[_ngcontent-%COMP%]{margin-top:auto;margin-left:10px;font-size:26px}.application[_ngcontent-%COMP%]{height:100%}.application[_ngcontent-%COMP%]   .position[_ngcontent-%COMP%]{flex-direction:row-reverse}.application[_ngcontent-%COMP%]   h6[_ngcontent-%COMP%]{color:var(--ion-color-warning)}.application[_ngcontent-%COMP%]   h1[_ngcontent-%COMP%]{margin:0}.application[_ngcontent-%COMP%]   .row[_ngcontent-%COMP%]{justify-content:flex-end}.normal[_ngcontent-%COMP%]{margin-top:1em;display:block}.labels-container[_ngcontent-%COMP%]{height:80%}.center[_ngcontent-%COMP%]{display:flex;justify-content:space-evenly;align-items:center;text-align:right}.buttons-container[_ngcontent-%COMP%]{height:20%}"]});var Vs=p(28255);function ps(Me,N){if(1&Me&&(n.TgZ(0,"div",4)(1,"ion-row"),n._uU(2),n.ALo(3,"translate"),n.ALo(4,"translate"),n.qZA(),n.TgZ(5,"ion-row"),n._uU(6),n.ALo(7,"date"),n.qZA()()),2&Me){const O=n.oxw();n.xp6(2),n.AsE(" ",n.lcZ(3,4,"Application.State")," ",n.lcZ(4,6,O.applicationUtils.getApplicationState(O.application))," "),n.xp6(4),n.AsE(" ",O.getDateLabel()," ",n.xi3(7,8,O.applicationDate,O.dateFormats.FINNISH_ANGULAR)," ")}}function ts(Me,N){if(1&Me){const O=n.EpF();n.TgZ(0,"cgi-page-stepper",12),n.NdJ("onSelectStep",function(Je){n.CHM(O);const Vt=n.oxw(2);return n.KtG(Vt.onSelectStep(Je))}),n.qZA()}if(2&Me){const O=n.oxw(2);n.Q6J("steps",O.steps)("activeStep",O.currentPage)}}function gs(Me,N){if(1&Me){const O=n.EpF();n.TgZ(0,"ion-button",15),n.NdJ("click",function(){n.CHM(O);const Je=n.oxw(3);return n.KtG(Je.onCancelApplication())}),n._uU(1),n.ALo(2,"translate"),n.qZA()}2&Me&&(n.xp6(1),n.hij(" ",n.lcZ(2,1,"General.Buttons.CancelApplication")," "))}function tc(Me,N){if(1&Me){const O=n.EpF();n.TgZ(0,"ion-button",16),n.NdJ("click",function(){n.CHM(O);const Je=n.oxw(3);return n.KtG(Je.onEditSavedApplication())}),n._uU(1),n.ALo(2,"translate"),n.qZA()}2&Me&&(n.xp6(1),n.hij(" ",n.lcZ(2,1,"General.Buttons.EditApplication")," "))}function $a(Me,N){if(1&Me&&(n.ynx(0),n.YNc(1,gs,3,3,"ion-button",13),n.YNc(2,tc,3,3,"ion-button",14),n.BQk()),2&Me){const O=n.oxw(2);n.xp6(1),n.Q6J("ngIf",null==O.canCancelApplication?null:O.canCancelApplication.enable),n.xp6(1),n.Q6J("ngIf",O.canEditSavedApplication)}}function ln(Me,N){if(1&Me&&(n.TgZ(0,"div")(1,"ion-button",17),n._uU(2),n.ALo(3,"translate"),n._UZ(4,"cgi-icon",18),n.qZA()()),2&Me){n.oxw(2);const O=n.MAs(4);n.xp6(1),n.Q6J("matMenuTriggerFor",O),n.xp6(1),n.hij(" ",n.lcZ(3,2,"General.Text.Actions")," ")}}function Mi(Me,N){1&Me&&(n.TgZ(0,"p",19),n._uU(1),n.ALo(2,"translate"),n.qZA()),2&Me&&(n.xp6(1),n.Oqu(n.lcZ(2,1,"Application.Summary.CanBeEdited")))}function Di(Me,N){1&Me&&(n.TgZ(0,"p"),n._uU(1),n.ALo(2,"translate"),n.qZA()),2&Me&&(n.xp6(1),n.Oqu(n.lcZ(2,1,"Application.PRC.Information")))}function Er(Me,N){if(1&Me&&(n.TgZ(0,"div",5)(1,"ion-row")(2,"ion-col",6),n.YNc(3,ts,1,2,"cgi-page-stepper",7),n.qZA()(),n.TgZ(4,"ion-row",8)(5,"ion-col",9),n.YNc(6,$a,3,2,"ng-container",10),n.YNc(7,ln,5,4,"div",10),n.qZA()(),n.TgZ(8,"ion-row")(9,"ion-col"),n.YNc(10,Mi,3,3,"p",11),n.qZA()(),n.YNc(11,Di,3,3,"p",10),n.qZA()),2&Me){const O=n.oxw();n.xp6(3),n.Q6J("ngIf",O.showStepper()),n.xp6(3),n.Q6J("ngIf",O.reviewMode),n.xp6(1),n.Q6J("ngIf",O.isActionButtonVisible()),n.xp6(3),n.Q6J("ngIf",O.canEditSavedApplication),n.xp6(1),n.Q6J("ngIf",!O.shouldShowOnlySummary())}}const Ti=class extends l.SiviPage{set permits(N){this.applicationPermits=N,this.checkApplicationToolBox()}get permits(){return this.applicationPermits}set application(N){this.applicationInstance=N,this.setupApplicationDate()}get application(){return this.applicationInstance}set reviewMode(N){this.reviewModeInstance=N}get reviewMode(){return this.reviewModeInstance}constructor(N,O,Ce,Je,Vt,Rr,wo,ua,Ls,Ws){super(O,Ce,Je,wo,Ws,Ls),this.auth=N,this.notifyService=O,this.translate=Ce,this.router=Je,this.applicationService=Vt,this.applicationUtils=Rr,this.route=wo,this.userSettingsService=ua,this.modalCtrl=Ls,this.location=Ws,this.steps=[],this.selectStep=new n.vpe,this.editSavedApplication=new n.vpe,this.stateChange=new n.vpe,this.constants=l.Constants,this.dateFormats=l.DateFormats,this.applicationStates=l.ApplicationStates,this.permissions=l.Permissions,this.environment=l.Environment}ngOnInit(){this.checkApplicationToolBox()}setupApplicationDate(){this.applicationDate=this.application.sentDate?this.application.sentDate:this.application.updatedDate?this.application.updatedDate:this.application.createdDate}showStatusContainer(){return 3!==this.currentPage}showStepper(){return!this.shouldShowOnlySummary()&&!this.reviewMode}showStepperContainer(){return this.showStatusContainer()&&!this.isCancelled()&&!this.isInPlacement()&&!this.isInPrePlacement()}isCancelled(){return this.application.state===l.Constants.CANCELLED}isSaved(){return this.application&&this.application.state===l.Constants.SAVED}isInHandling(){return this.application.state===l.ApplicationStates.IN_HANDLING}isInPlacement(){return this.application.state===l.ApplicationStates.IN_PLACEMENT}isInPrePlacement(){return this.application.state===l.ApplicationStates.IN_PRE_PLACEMENT}isMunicipalityAdminOrEcecCouncelor(){return this.auth.hasAnyRole([l.Roles.ECEC_SERVICE_COUNSELOR,l.Roles.MUNICIPALITY_ADMIN])}isActionButtonVisible(){const N=![l.ApplicationStates.DRAFT,l.ApplicationStates.IN_PRE_PLACEMENT,l.ApplicationStates.CANCELLED,l.ApplicationStates.VOUCHER_PENDING,l.ApplicationStates.DECISION_MADE,l.ApplicationStates.FINAL].includes(this.application.state),O=this.permits.canMoveBackFromHandling||this.permits.canMoveToHandling;return N&&O&&this.reviewMode}shouldShowOnlySummary(){return this.isCancelled()||this.isInPlacement()||this.isInPrePlacement()}checkApplicationToolBox(){this.canCancelApplication=this.checkCanCancelApplication(),this.canEditSavedApplication=this.checkCanEditSavedApplication()}checkCanEditSavedApplication(){return this.isMunicipalityAdminOrEcecCouncelor()?this.checkProfessionalCanEditApplication():!!this.auth.isGuardian()&&this.checkGuardianCanEditApplication()}checkProfessionalCanEditApplication(){return this.reviewMode&&this.permits.canEdit}checkGuardianCanEditApplication(){return this.reviewMode&&this.permits.canEdit&&this.isSaved()}checkCanCancelApplication(){const N={enable:!1,showReason:!1};return this.isMunicipalityAdminOrEcecCouncelor()&&(N.enable=this.permits.canCancel,N.showReason=!0),this.auth.isGuardian()&&(N.enable=this.isSaved()),N}checkProfessionalCancelRights(){return[l.ApplicationStates.IN_HANDLING,l.ApplicationStates.IN_PRE_PLACEMENT].includes(this.application.state)}onEditSavedApplication(){this.editSavedApplication.emit()}onSelectStep(N){this.selectStep.emit(N)}onApplicationStateChange(N){this.stateChange.emit(N)}onCancelApplication(){var N=this;return(0,o.Z)(function*(){N.canCancelApplication.enable&&(N.canCancelApplication.showReason?N.cancelApplicationWithReason():N.cancelApplicationWithoutReason())})()}cancelApplicationWithReason(){var N=this;return(0,o.Z)(function*(){const O={component:rl,cssClass:"modal-small-size"};(yield N.openModal(O)).onDidDismiss().then(Je=>{if(!Je?.data)return;const{removeApplication:Vt,cancellationReason:Rr}=Je.data;if(Vt){const wo={cancellationReason:Rr};N.applicationService.cancelApplicationWithReason(N.application.id,wo).subscribe(()=>{N.notify.toastCancelSuccess(),N.modalCtrl.dismiss({action:l.Actions.DELETE,applicationId:N.application.id})},ua=>{console.error("Error while cancelling the application",ua),N.notify.alertBackendError(ua)})}})})()}cancelApplicationWithoutReason(){var N=this;return(0,o.Z)(function*(){(yield N.notify.createCustomConfirmationPopUp("Message.Cancel.Application.Title","Message.Cancel.Application.Message","General.Text.Yes","General.Text.No")).onDidDismiss().then(wo=>{wo&&wo.data&&N.applicationService.cancelApplication(N.application.id).pipe((0,T.q)(1)).subscribe(()=>{N.notify.toastCancelSuccess(),N.modalCtrl.dismiss({action:l.Actions.DELETE,applicationId:N.application.id})},ua=>{console.error("Error while cancelling the application",ua),N.notify.alertBackendError(ua)})})})()}getDateLabel(){return this.application.sentDate?this.translate.instant("Application.Sent"):this.application.updatedDate?this.translate.instant("Application.Draft.Created"):""}};let ur=Ti;Ti.\u0275fac=function(O){return new(O||Ti)(n.Y36(P.e8),n.Y36(P.c),n.Y36(w.sK),n.Y36(B.F0),n.Y36(P.IX),n.Y36(V.q),n.Y36(B.gz),n.Y36(P.sF),n.Y36(l.SiviModalController),n.Y36(he.Ye))},Ti.\u0275cmp=n.Xpm({type:Ti,selectors:[["sivi-stepper-container"]],inputs:{permits:"permits",application:"application",reviewMode:"reviewMode",currentPage:"currentPage",steps:"steps"},outputs:{selectStep:"selectStep",editSavedApplication:"editSavedApplication",stateChange:"stateChange"},features:[n.qOj],decls:11,vars:10,consts:[["class","status-container",4,"ngIf"],["class","stepper-container",4,"ngIf"],["appMenu","matMenu"],["mat-menu-item","",3,"disabled","click"],[1,"status-container"],[1,"stepper-container"],["size","12","size-xl","7"],[3,"steps","activeStep","onSelectStep",4,"ngIf"],[1,"ion-justify-content-end","ion-align-items-center"],["size","12","size-sm","6",1,"ion-no-padding","buttons"],[4,"ngIf"],["class","info-text",4,"ngIf"],[3,"steps","activeStep","onSelectStep"],["name","cancel","no-min-width","","color","primary","fill","outline",3,"click",4,"ngIf"],["name","edit","no-min-width","","color","primary","fill","outline",3,"click",4,"ngIf"],["name","cancel","no-min-width","","color","primary","fill","outline",3,"click"],["name","edit","no-min-width","","color","primary","fill","outline",3,"click"],["color","primary","fill","outline",3,"matMenuTriggerFor"],["name","expand_more"],[1,"info-text"]],template:function(O,Ce){1&O&&(n.ynx(0),n.YNc(1,ps,8,11,"div",0),n.YNc(2,Er,12,5,"div",1),n.BQk(),n.TgZ(3,"mat-menu",null,2)(5,"button",3),n.NdJ("click",function(){return Ce.onApplicationStateChange(Ce.applicationStates.IN_HANDLING)}),n._uU(6),n.ALo(7,"translate"),n.qZA(),n.TgZ(8,"button",3),n.NdJ("click",function(){return Ce.onApplicationStateChange(Ce.applicationStates.BACK_FROM_HANDLING)}),n._uU(9),n.ALo(10,"translate"),n.qZA()()),2&O&&(n.xp6(1),n.Q6J("ngIf",Ce.showStatusContainer()),n.xp6(1),n.Q6J("ngIf",Ce.showStepperContainer()),n.xp6(3),n.Q6J("disabled",Ce.isInHandling()),n.xp6(1),n.hij(" ",n.lcZ(7,6,"Application.View.Buttons.MoveSelectedToHandling")," "),n.xp6(2),n.Q6J("disabled",!Ce.isInHandling()),n.xp6(1),n.hij(" ",n.lcZ(10,8,"Application.View.Buttons.RemoveFromHandling")," "))},dependencies:[ae.YG,ae.wI,ae.Nd,he.O5,Vs.VK,Vs.OP,Vs.p6,he.uU,w.X$],styles:[".stepper-container[_ngcontent-%COMP%], .status-container[_ngcontent-%COMP%]{padding:0 16px 10px}@media screen and (min-width: 600px){.stepper-container[_ngcontent-%COMP%], .status-container[_ngcontent-%COMP%]{padding:0 40px 10px}}@media screen and (min-width: 840px){.stepper-container[_ngcontent-%COMP%], .status-container[_ngcontent-%COMP%]{padding:0 80px 10px}}.stepper-container[_ngcontent-%COMP%]   cgi-page-stepper[_ngcontent-%COMP%], .status-container[_ngcontent-%COMP%]   cgi-page-stepper[_ngcontent-%COMP%]{margin:1px;--ion-color-yellow: #f5a624}.status-container[_ngcontent-%COMP%]{font-weight:700}@media screen and (max-width: 480px){.status-container[_ngcontent-%COMP%]{padding-top:2rem}}.info-text[_ngcontent-%COMP%]{float:right}.buttons[_ngcontent-%COMP%]{display:flex;flex-direction:row;justify-content:flex-end}@media (max-width: 840px){.buttons[_ngcontent-%COMP%]{flex-direction:column}}"]});var gi=p(94954),$t=p(90678),Ma=p(9701);const Vo=["last"];function Ds(Me,N){if(1&Me){const O=n.EpF();n.TgZ(0,"sivi-comment",5),n.NdJ("delete",function(){const Vt=n.CHM(O).$implicit,Rr=n.oxw(2);return n.KtG(Rr.deleteMessage(Vt))}),n.qZA()}if(2&Me){const O=N.$implicit,Ce=n.oxw(2);n.Q6J("title",Ce.getTitle(O))("content",O.content)("showDelete",Ce.shouldShowDelete(O))("side",Ce.userId===O.authorId?"right":"left")("date",O.createdDate)}}function ja(Me,N){if(1&Me){const O=n.EpF();n.ynx(0),n.TgZ(1,"sivi-input-bubble",6),n.NdJ("valueChange",function(Je){n.CHM(O);const Vt=n.oxw(2);return n.KtG(Vt.onInputValueChange(Je))})("sendMessage",function(Je){n.CHM(O);const Vt=n.oxw(2);return n.KtG(Vt.sendMessage(Je))})("deleteMessage",function(){n.CHM(O);const Je=n.oxw(2);return n.KtG(Je.onInputValueChange(""))}),n.qZA(),n.BQk()}if(2&Me){const O=n.oxw(2);n.xp6(1),n.Q6J("value",O.inputValue)("addAttachmentButton",!1)("disableSend",!O.isValid||!O.inputValue)}}function wa(Me,N){if(1&Me&&(n.ynx(0),n.TgZ(1,"h1"),n._uU(2),n.qZA(),n.YNc(3,Ds,1,5,"sivi-comment",4),n.YNc(4,ja,2,3,"ng-container",2),n.BQk()),2&Me){const O=n.oxw();n.xp6(2),n.Oqu(O.title),n.xp6(1),n.Q6J("ngForOf",O.messages)("ngForTrackBy",O.trackByFn),n.xp6(1),n.Q6J("ngIf",O.showInput)}}const du=class extends l.AbstractValidator{set showInput(N){this.showInputInstance=N,setTimeout(()=>{this.validatorOptions=this.getValidatorOptions()})}get showInput(){return this.showInputInstance}constructor(N){super(N),this.translate=N,this.title="",this.showDeleteComment=!1,this.userId="",this.inputValue="",this.send=new n.vpe,this.delete=new n.vpe,this.inputName="inputBubble",this.showInputInstance=!1,this.permissions=l.Permissions}getTitle(N){return`${N.authorFullName}`}sendMessage(N){this.send.emit(N)}deleteMessage(N){this.delete.emit(N)}onInputValueChange(N){var O=this;return(0,o.Z)(function*(){const Ce=O.inputName,Je=new CustomEvent("",{detail:{name:Ce,value:N}});yield O.markControlAsTouched(Ce),O.updateControlValue(Je)})()}onValidatorValuesChange(N){this.inputValue=N.detail[this.inputName],this.lastElement.nativeElement.scrollIntoView({behavior:"smooth",block:"nearest"})}getValidatorOptions(){const O=[l.SiviValidators.maxLength(1e3)],Ce=this.translate.instant("Form.Error.MaxLengthIsChactersCount",{count:1e3});return[this.createValidatorOption(this.inputName,this.inputValue,O,{maxlength:Ce})]}shouldShowDelete(N){const O=this.userId===N.authorId,Ce=N.state===oe.BQ.DELETED;return this.showDeleteComment&&O&&!Ce}trackByFn(N,O){return O.id}};let ns=du;function Cs(Me,N){if(1&Me){const O=n.EpF();n.TgZ(0,"sivi-application-conversation",3),n.NdJ("send",function(Je){n.CHM(O);const Vt=n.oxw();return n.KtG(Vt.onPostNote(Je))})("delete",function(Je){n.CHM(O);const Vt=n.oxw();return n.KtG(Vt.onDeleteNote(Je))}),n.ALo(1,"translate"),n.qZA()}if(2&Me){const O=n.oxw();n.Q6J("title",n.lcZ(1,6,"Application.View.Notes.Title"))("userId",O.userId)("messages",O.notes)("showInput",O.permits.canAddNote)("inputValue",O.noteInputValue)("showDeleteComment",!0)}}du.\u0275fac=function(O){return new(O||du)(n.Y36(w.sK))},du.\u0275cmp=n.Xpm({type:du,selectors:[["sivi-application-conversation"]],viewQuery:function(O,Ce){if(1&O&&n.Gf(Vo,7),2&O){let Je;n.iGM(Je=n.CRH())&&(Ce.lastElement=Je.first)}},inputs:{messages:"messages",title:"title",showDeleteComment:"showDeleteComment",userId:"userId",inputValue:"inputValue",showInput:"showInput"},outputs:{send:"send",delete:"delete"},features:[n.qOj],decls:6,vars:2,consts:[[3,"validatorOptions"],["validator",""],[4,"ngIf"],["last",""],["class","ion-margin-bottom",3,"title","content","showDelete","side","date","delete",4,"ngFor","ngForOf","ngForTrackBy"],[1,"ion-margin-bottom",3,"title","content","showDelete","side","date","delete"],["name","inputBubble",3,"value","addAttachmentButton","disableSend","valueChange","sendMessage","deleteMessage"]],template:function(O,Ce){1&O&&(n.TgZ(0,"div")(1,"cgi-validator",0,1),n.YNc(3,wa,5,4,"ng-container",2),n.qZA(),n._UZ(4,"div",null,3),n.qZA()),2&O&&(n.xp6(1),n.Q6J("validatorOptions",Ce.validatorOptions),n.xp6(2),n.Q6J("ngIf",Ce.showInput||Ce.messages&&Ce.messages.length))},dependencies:[he.sg,he.O5,$t.U,Ma.L],styles:["h1[_ngcontent-%COMP%]{color:var(--ion-color-secondary)}.application-container[_ngcontent-%COMP%]{padding:0 80px 10px}@media screen and (max-width: 840px){.application-container[_ngcontent-%COMP%]{padding:0 40px 10px}}"]});const Kc=class{constructor(){this.userId="",this.comments=[],this.notes=[],this.commentInputValue="",this.noteInputValue="",this.postComment=new n.vpe,this.postNote=new n.vpe,this.deleteNote=new n.vpe,this.permissions=e.Pl}onPostComment(N){this.postComment.emit(N)}onPostNote(N){this.postNote.emit(N)}onDeleteNote(N){this.deleteNote.emit(N)}};let $r=Kc;Kc.\u0275fac=function(O){return new(O||Kc)},Kc.\u0275cmp=n.Xpm({type:Kc,selectors:[["sivi-application-comments-and-notes"]],inputs:{userId:"userId",comments:"comments",notes:"notes",permits:"permits",commentInputValue:"commentInputValue",noteInputValue:"noteInputValue"},outputs:{postComment:"postComment",postNote:"postNote",deleteNote:"deleteNote"},decls:4,vars:8,consts:[[1,"application-container"],[3,"title","userId","messages","showInput","inputValue","send"],[3,"ngxPermissionsOnly"],[3,"title","userId","messages","showInput","inputValue","showDeleteComment","send","delete"]],template:function(O,Ce){1&O&&(n.TgZ(0,"div",0)(1,"sivi-application-conversation",1),n.NdJ("send",function(Vt){return Ce.onPostComment(Vt)}),n.ALo(2,"translate"),n.qZA(),n.YNc(3,Cs,2,8,"ng-template",2),n.qZA()),2&O&&(n.xp6(1),n.Q6J("title",n.lcZ(2,6,"Application.View.Comments.Title"))("userId",Ce.userId)("messages",Ce.comments)("showInput",Ce.permits.canAddComment)("inputValue",Ce.commentInputValue),n.xp6(2),n.Q6J("ngxPermissionsOnly",Ce.permissions.Application.CAN_ACCESS_NOTES))},dependencies:[gi.gE,ns,w.X$],styles:[".application-container[_ngcontent-%COMP%]{padding:0 80px 10px}@media screen and (max-width: 840px){.application-container[_ngcontent-%COMP%]{padding:0 40px 10px}}"]});var Ts=p(80529);function Gl(Me,N){1&Me&&n._UZ(0,"ion-spinner",7)}function ol(Me,N){1&Me&&(n.TgZ(0,"mat-icon",8),n._uU(1,"file_copy"),n.qZA())}function zc(Me,N){if(1&Me){const O=n.EpF();n.TgZ(0,"div",2),n.NdJ("click",function(){const Vt=n.CHM(O).$implicit,Rr=n.oxw();return n.KtG(Rr.onClick(Vt))}),n.TgZ(1,"div",3),n.YNc(2,Gl,1,0,"ion-spinner",4),n.YNc(3,ol,2,0,"ng-template",null,5,n.W1O),n.qZA(),n.TgZ(5,"a",6),n._uU(6),n.ALo(7,"translate"),n.qZA()()}if(2&Me){const O=N.$implicit,Ce=n.MAs(4),Je=n.oxw();n.xp6(2),n.Q6J("ngIf",Je.pending[O.id])("ngIfElse",Ce),n.xp6(3),n.uIk("disabled",Je.pending[O.id]),n.xp6(1),n.Oqu(n.lcZ(7,4,Je.getLanguageKey(O.name)))}}const Wd=class extends l.SiviComponent{constructor(N,O,Ce){super(),this.applicationService=N,this.attachmentsService=O,this.notifyService=Ce,this.langDictionary={en:"General.Language.English",fi:"General.Language.Finnish",ru:"General.Language.Russian",sv:"General.Language.Swedish"},this.pending={}}ngOnInit(){this.pdfs$=this.applicationService.getApplicationPdfs(this.applicationId)}getLanguageKey(N){const O=N.slice(0,2);return this.langDictionary[O]||N}onClick(N){var O=this;return(0,o.Z)(function*(){const Ce=Vt=>Vt.type===Ts.dt.Response?(0,ge.of)(Vt.body):Z.E,Je=Vt=>l.Utils.createAttachmentFile([Vt],N.name,Vt.type);try{O.pending[N.id]=!0;const Vt=yield O.attachmentsService.getFile(N.id).pipe((0,xe.z)(Ce),(0,E.U)(Je)).toPromise();O.attachmentsService.openFile(Vt)}catch(Vt){O.notifyService.alertBackendError(Vt)}finally{O.pending[N.id]=!1}})()}};let al=Wd;Wd.\u0275fac=function(O){return new(O||Wd)(n.Y36(P.IX),n.Y36(P.oZ),n.Y36(P.c))},Wd.\u0275cmp=n.Xpm({type:Wd,selectors:[["sivi-application-pdfs"]],inputs:{applicationId:"applicationId"},features:[n.qOj],decls:6,vars:7,consts:[[1,"application-pdfs"],["class","pdf-item",3,"click",4,"ngFor","ngForOf","ngForTrackBy"],[1,"pdf-item",3,"click"],[1,"icon"],["color","secondary",4,"ngIf","ngIfElse"],["icon",""],[1,"link"],["color","secondary"],["aria-hidden","false"]],template:function(O,Ce){1&O&&(n.TgZ(0,"div",0)(1,"h1"),n._uU(2),n.ALo(3,"translate"),n.qZA(),n.YNc(4,zc,8,6,"div",1),n.ALo(5,"async"),n.qZA()),2&O&&(n.xp6(2),n.Oqu(n.lcZ(3,3,"Application.View.Title.Original.Application")),n.xp6(2),n.Q6J("ngForOf",n.lcZ(5,5,Ce.pdfs$))("ngForTrackBy",Ce.trackByFn))},dependencies:[ae.PQ,he.sg,he.O5,Bn.Hw,he.Ov,w.X$],styles:["h1[_ngcontent-%COMP%]{color:var(--ion-color-secondary)}.application-pdfs[_ngcontent-%COMP%]{padding:0 80px 10px}@media screen and (max-width: 840px){.application-pdfs[_ngcontent-%COMP%]{padding:0 40px 10px}}.pdf-item[_ngcontent-%COMP%]{display:flex;cursor:pointer;margin-bottom:10px}.pdf-item[_ngcontent-%COMP%]   .icon[_ngcontent-%COMP%]{width:40px;height:40px}.pdf-item[_ngcontent-%COMP%]   .link[_ngcontent-%COMP%]{font-weight:700}"]});var Jn=p(45840),tn=p(83905),ti=p(30903),_i=p(78218);const ar=["commonSearchbarComponent"],vr=["personContactAddressComponent"];function Qr(Me,N){if(1&Me&&(n._UZ(0,"cgi-input",28),n.ALo(1,"translate"),n.ALo(2,"translate")),2&Me){const O=n.oxw(2);n.Q6J("value",O.child.preferredFirstName)("labelPosition","stacked")("label",n.lcZ(2,7,"Form.Label.PreferredFirstName"))("viewMode",!0),n.uIk("aria-label",n.lcZ(1,5,"Form.Label.PreferredFirstName"))}}function Li(Me,N){if(1&Me){const O=n.EpF();n.TgZ(0,"sivi-lib-select",29),n.NdJ("siviChange",function(Je){n.CHM(O);const Vt=n.oxw(2);return n.KtG(Vt.onChangeChildInfo(Je))}),n.ALo(1,"translate"),n.ALo(2,"translate"),n.qZA()}if(2&Me){const O=n.oxw(2);n.Q6J("options",O.preferredNameOptions)("disabled",!O.preferredNameOptions||O.preferredNameOptions.length<1)("label",n.lcZ(2,6,"Form.Label.PreferredFirstName")),n.uIk("aria-label",n.lcZ(1,4,"Form.Label.PreferredFirstName"))}}function Ta(Me,N){if(1&Me&&(n.ynx(0),n._UZ(1,"cgi-input",30),n.ALo(2,"translate"),n.ALo(3,"translate"),n.BQk()),2&Me){const O=n.oxw(2);n.xp6(1),n.Q6J("viewMode",!0)("value",O.child.pin)("label",n.lcZ(3,6,"Form.Label.Pic")),n.uIk("aria-label",n.lcZ(2,4,"Form.Label.Pic"))}}function La(Me,N){if(1&Me&&(n._UZ(0,"cgi-input",31),n.ALo(1,"date"),n.ALo(2,"translate"),n.ALo(3,"translate")),2&Me){const O=n.oxw(2);n.Q6J("viewMode",!0)("value",n.xi3(1,4,O.child.birthday,O.dateFormats.FINNISH_ANGULAR))("label",n.lcZ(3,9,"Form.Label.BirthDate")),n.uIk("aria-label",n.lcZ(2,7,"Form.Label.BirthDate"))}}function Ps(Me,N){if(1&Me&&(n.TgZ(0,"ion-row")(1,"ion-col",5),n._UZ(2,"cgi-input",32),n.ALo(3,"translate"),n.ALo(4,"translate"),n.qZA()()),2&Me){const O=n.oxw(2);n.xp6(2),n.Q6J("viewMode",!0)("value",(null==O.child?null:O.child.placeOfDomicile)||"-")("label",n.lcZ(4,6,"Form.Label.PlaceOfDomicile")),n.uIk("aria-label",n.lcZ(3,4,"Form.Label.PlaceOfDomicile"))}}function is(Me,N){1&Me&&(n.TgZ(0,"ion-row")(1,"ion-col",33),n._UZ(2,"cgi-input",34),n.ALo(3,"translate"),n.ALo(4,"translate"),n.qZA()()),2&Me&&(n.xp6(2),n.Q6J("label",n.lcZ(3,4,"Form.Label.PlaceOfDomicile"))("value",n.lcZ(4,6,"NonDisclosure.ContactDetails"))("viewMode",!0)("css",".municipality-nda .field-value { color: var(--ion-color-warning); text-transform: uppercase; }"))}function yt(Me,N){if(1&Me&&(n.ynx(0),n.TgZ(1,"ion-row")(2,"ion-col",5),n._UZ(3,"cgi-input",35),n.ALo(4,"translate"),n.ALo(5,"translate"),n.qZA()(),n.TgZ(6,"ion-row")(7,"ion-col",5),n._UZ(8,"cgi-input",36),n.ALo(9,"translate"),n.ALo(10,"translate"),n.qZA(),n.TgZ(11,"ion-col",7),n._UZ(12,"cgi-input",37),n.ALo(13,"translate"),n.ALo(14,"translate"),n.qZA()(),n.BQk()),2&Me){const O=n.oxw(2);n.xp6(3),n.Q6J("viewMode",!0)("label",n.lcZ(5,14,"Form.Label.Address"))("value",(null==O.child||null==O.child.address?null:O.child.address.streetAddress)||"-"),n.uIk("aria-label",n.lcZ(4,12,"Form.Label.Address")),n.xp6(5),n.Q6J("viewMode",!0)("label",n.lcZ(10,18,"Form.Label.PostalCode"))("value",(null==O.child||null==O.child.address?null:O.child.address.zipcode)||"-"),n.uIk("aria-label",n.lcZ(9,16,"Form.Label.PostalCode")),n.xp6(4),n.Q6J("viewMode",!0)("label",n.lcZ(14,22,"Form.Label.City"))("value",(null==O.child||null==O.child.address?null:O.child.address.postOffice)||"-"),n.uIk("aria-label",n.lcZ(13,20,"Form.Label.City"))}}function Dt(Me,N){if(1&Me){const O=n.EpF();n.TgZ(0,"ion-row")(1,"ion-col",38)(2,"sivi-person-contact-address",39,40),n.NdJ("update",function(Je){n.CHM(O);const Vt=n.oxw(2);return n.KtG(Vt.onUpdateContactAddress(Je))}),n.qZA()()()}if(2&Me){const O=n.oxw(2);n.xp6(2),n.Q6J("address",O.contactAddress)}}function We(Me,N){1&Me&&(n.TgZ(0,"ion-col",41),n._UZ(1,"cgi-input",34),n.ALo(2,"translate"),n.ALo(3,"translate"),n.qZA()),2&Me&&(n.xp6(1),n.Q6J("label",n.lcZ(2,4,"Form.Label.Address"))("value",n.lcZ(3,6,"NonDisclosure.ContactDetails"))("viewMode",!0)("css",".nda-address .field-value { color: var(--ion-color-warning); text-transform: uppercase; }"))}function Rt(Me,N){if(1&Me&&(n.TgZ(0,"ion-col"),n._UZ(1,"cgi-input",42),n.ALo(2,"translate"),n.ALo(3,"translate"),n.qZA()),2&Me){const O=n.oxw(2);n.xp6(1),n.Q6J("viewMode",O.reviewMode)("label",n.lcZ(2,3,"Form.Label.Childlives"))("value",n.lcZ(3,5,O.getResidenceText()))}}function Qn(Me,N){if(1&Me){const O=n.EpF();n.TgZ(0,"ion-col",5)(1,"sivi-lib-radio-list-with-input",43),n.NdJ("update",function(Je){n.CHM(O);const Vt=n.oxw(2);return n.KtG(Vt.onChangeChildLives(Je))}),n.ALo(2,"translate"),n.ALo(3,"translate"),n.qZA()()}if(2&Me){const O=n.oxw(2);n.xp6(1),n.Q6J("subTitle",n.lcZ(2,6,"Form.Label.Childlives"))("textFieldLabel",n.lcZ(3,8,"Form.Label.Specify"))("textFieldEnabler",O.childResidesTypeElsewhere)("inputValue",null==O.child?null:O.child.residence)("required",!0)("options",O.childResidenceOptions)}}function fi(Me,N){if(1&Me&&(n.ynx(0),n._UZ(1,"cgi-input",44),n.ALo(2,"async"),n.BQk()),2&Me){const O=n.oxw(2);n.xp6(1),n.Q6J("viewMode",!0)("value",O.getLanguageText(n.lcZ(2,2,O.selectedLanguage$)))}}function Xi(Me,N){if(1&Me){const O=n.EpF();n.TgZ(0,"cgi-autocomplete",45),n.NdJ("siviChange",function(Je){n.CHM(O);const Vt=n.oxw(2);return n.KtG(Vt.onChangeChildInfo(Je))}),n.ALo(1,"async"),n.ALo(2,"translate"),n.ALo(3,"translate"),n.ALo(4,"translate"),n.qZA()}if(2&Me){const O=n.oxw(2);n.Q6J("multiSelect",!1)("value",n.lcZ(1,7,O.selectedLanguage$))("options",O.languageOptions)("placeholderImage","")("selectAllText",n.lcZ(2,9,"General.Buttons.SelectAll"))("removeAllText",n.lcZ(3,11,"General.Buttons.RemoveAll"))("placeholder",n.lcZ(4,13,"General.Language.Select"))}}function wr(Me,N){if(1&Me){const O=n.EpF();n.TgZ(0,"cgi-autocomplete",46),n.NdJ("valueChange",function(Je){n.CHM(O);const Vt=n.oxw(2);return n.KtG(Vt.onChangeChildInfo(Je))}),n.ALo(1,"async"),n.ALo(2,"translate"),n.ALo(3,"translate"),n.ALo(4,"translate"),n.qZA()}if(2&Me){const O=n.oxw(2);n.Q6J("multiSelect",!0)("value",n.lcZ(1,7,O.selectedOtherLanguages$))("options",O.languageOptions)("placeholderImage","")("selectAllText",n.lcZ(2,9,"General.Buttons.SelectAll"))("removeAllText",n.lcZ(3,11,"General.Buttons.RemoveAll"))("placeholder",n.lcZ(4,13,"General.Language.Select"))}}function Mo(Me,N){if(1&Me&&(n.TgZ(0,"ion-col"),n._UZ(1,"cgi-input",47),n.ALo(2,"translate"),n.ALo(3,"translate"),n.ALo(4,"translate"),n.qZA()),2&Me){const O=n.oxw(2);n.xp6(1),n.Q6J("label",n.lcZ(2,3,"General.Text.MedicalInfo.Instruction"))("value",(null==O.specialNeeds?null:O.specialNeeds.value)===O.constantsYes?n.lcZ(3,5,"General.Text.Yes").concat(null!=O.specialNeeds&&O.specialNeeds.info?", "+(null==O.specialNeeds?null:O.specialNeeds.info):""):n.lcZ(4,7,"General.Text.No"))("viewMode",!0)}}function ro(Me,N){if(1&Me){const O=n.EpF();n.TgZ(0,"ion-col",48)(1,"sivi-lib-radio-list-with-input",49),n.NdJ("update",function(Je){n.CHM(O);const Vt=n.oxw(2);return n.KtG(Vt.onChangeSpecialNeeds(Je))}),n.ALo(2,"translate"),n.ALo(3,"translate"),n.qZA()()}if(2&Me){const O=n.oxw(2);n.xp6(1),n.Q6J("subTitle",n.lcZ(2,5,"General.Text.MedicalInfo.Instruction"))("textFieldLabel",n.lcZ(3,7,"Form.Label.MoreInformation"))("textFieldEnabler",O.constantsYes)("inputValue",O.specialNeeds)("options",O.yesOrNoOptions)}}const qr=function(Me,N){return{maxSize:Me,extensions:N}};function ho(Me,N){if(1&Me){const O=n.EpF();n.TgZ(0,"p",50)(1,"ion-button",51),n.NdJ("click",function(){n.CHM(O);const Je=n.oxw(2);return n.KtG(Je.onAddFile())}),n._uU(2),n.ALo(3,"translate"),n.qZA(),n._UZ(4,"sivi-lib-info-popup",52),n.ALo(5,"translate"),n.qZA()}if(2&Me){const O=n.oxw(2);n.xp6(1),n.Q6J("disabled",O.reviewMode),n.xp6(1),n.Oqu(n.lcZ(3,3,"General.Buttons.Add.Attachment")),n.xp6(2),n.s9C("text",n.xi3(5,5,"Attachment.Info.Text",n.WLB(8,qr,O.maxFileSize(),O.allowedFileExtensions())))}}function xa(Me,N){if(1&Me){const O=n.EpF();n.TgZ(0,"ion-col",53)(1,"sivi-lib-attachment",54),n.NdJ("cancelClick",function(Je){n.CHM(O);const Vt=n.oxw(2);return n.KtG(Vt.onDeleteAttachment(Je))}),n.qZA()()}if(2&Me){const O=N.$implicit,Ce=n.oxw(2);n.xp6(1),n.Q6J("attachment",O)("showCancelButton",!Ce.reviewMode)}}function To(Me,N){if(1&Me){const O=n.EpF();n.TgZ(0,"ion-col",53)(1,"sivi-lib-attachment",54),n.NdJ("cancelClick",function(Je){n.CHM(O);const Vt=n.oxw(2);return n.KtG(Vt.onDeleteAttachment(Je))}),n.qZA()()}if(2&Me){const O=N.$implicit,Ce=n.oxw(2);n.xp6(1),n.Q6J("attachment",O)("showCancelButton",!Ce.reviewMode)}}function Ao(Me,N){if(1&Me){const O=n.EpF();n.TgZ(0,"div",2)(1,"ion-grid",3)(2,"div",4)(3,"ion-row")(4,"ion-col",5),n._UZ(5,"cgi-input",6),n.ALo(6,"translate"),n.ALo(7,"translate"),n.qZA(),n.TgZ(8,"ion-col",7),n._UZ(9,"cgi-input",8),n.ALo(10,"translate"),n.ALo(11,"translate"),n.qZA()(),n.TgZ(12,"ion-row")(13,"ion-col",5),n.YNc(14,Qr,3,9,"cgi-input",9),n.YNc(15,Li,3,8,"ng-template",null,10,n.W1O),n.qZA(),n.TgZ(17,"ion-col",7)(18,"cgi-input",11),n.NdJ("siviChange",function(Je){n.CHM(O);const Vt=n.oxw();return n.KtG(Vt.onChangeNickName(Je))}),n.ALo(19,"translate"),n.ALo(20,"translate"),n.qZA()()()(),n.TgZ(21,"ion-row")(22,"ion-col",5),n.YNc(23,Ta,4,8,"ng-container",12),n.YNc(24,La,4,11,"ng-template",null,13,n.W1O),n.qZA()(),n.YNc(26,Ps,5,8,"ion-row",14),n.YNc(27,is,5,8,"ion-row",14),n.YNc(28,yt,15,24,"ng-container",12),n.YNc(29,Dt,4,1,"ion-row",14),n.YNc(30,We,4,8,"ng-template",null,15,n.W1O),n.TgZ(32,"ion-row",16),n.YNc(33,Rt,4,7,"ion-col",12),n.YNc(34,Qn,4,10,"ng-template",null,17,n.W1O),n.qZA(),n.TgZ(36,"ion-row",18)(37,"ion-col",19)(38,"ion-label"),n._uU(39),n.ALo(40,"translate"),n.qZA(),n.YNc(41,fi,3,4,"ng-container",12),n.YNc(42,Xi,5,15,"ng-template",null,20,n.W1O),n.qZA(),n.TgZ(44,"ion-col",7)(45,"ion-label"),n._uU(46),n.ALo(47,"translate"),n.qZA(),n.YNc(48,wr,5,15,"cgi-autocomplete",21),n.qZA()(),n.TgZ(49,"ion-row"),n.YNc(50,Mo,5,9,"ion-col",12),n.YNc(51,ro,4,9,"ng-template",null,22,n.W1O),n.qZA(),n.TgZ(53,"ion-row",23)(54,"ion-col",24),n._uU(55),n.ALo(56,"translate"),n.qZA()(),n.YNc(57,ho,6,11,"p",25),n.TgZ(58,"ion-row",26),n.YNc(59,xa,2,2,"ion-col",27),n.ALo(60,"async"),n.YNc(61,To,2,2,"ion-col",27),n.ALo(62,"async"),n.qZA()()()}if(2&Me){const O=n.MAs(16),Ce=n.MAs(25),Je=n.MAs(31),Vt=n.MAs(35),Rr=n.MAs(43),wo=n.MAs(52),ua=n.oxw();n.xp6(2),n.Q6J("formGroup",ua.form),n.xp6(3),n.Q6J("viewMode",ua.child.prc||ua.reviewMode)("label",n.lcZ(7,38,"Form.Label.FirstName.Plural")),n.uIk("aria-label",n.lcZ(6,36,"Form.Label.FirstName.Plural")),n.xp6(4),n.Q6J("viewMode",ua.child.prc||ua.reviewMode)("value",ua.child.lastName)("label",n.lcZ(11,42,"Form.Label.LastName")),n.uIk("aria-label",n.lcZ(10,40,"Form.Label.LastName")),n.xp6(5),n.Q6J("ngIf",ua.reviewMode)("ngIfElse",O),n.xp6(4),n.Q6J("disabled",!(null!=ua.child&&ua.child.firstNames))("viewMode",ua.reviewMode)("label",n.lcZ(20,46,"Form.Label.NickName")),n.uIk("aria-label",n.lcZ(19,44,"Form.Label.NickName")),n.xp6(5),n.Q6J("ngIf",ua.child.pin)("ngIfElse",Ce),n.xp6(3),n.Q6J("ngIf",!ua.hasNonDisclosure&&ua.child.placeOfDomicile),n.xp6(1),n.Q6J("ngIf",ua.hasNonDisclosure),n.xp6(1),n.Q6J("ngIf",!ua.hasNonDisclosure)("ngIfElse",Je),n.xp6(1),n.Q6J("ngIf",ua.child.prc),n.xp6(4),n.Q6J("ngIf",ua.reviewMode)("ngIfElse",Vt),n.xp6(6),n.Oqu(n.lcZ(40,48,"Form.Label.MotherTongue")),n.xp6(2),n.Q6J("ngIf",ua.child.prc||ua.reviewMode)("ngIfElse",Rr),n.xp6(5),n.Oqu(n.lcZ(47,50,"Form.Label.OtherLanguagesSpokenAtHome")),n.xp6(2),n.Q6J("ngIf",!ua.reviewMode),n.xp6(2),n.Q6J("ngIf",ua.reviewMode)("ngIfElse",wo),n.xp6(5),n.hij(" ",n.lcZ(56,52,"General.Text.Attachment.Plural")," "),n.xp6(2),n.Q6J("ngIf",!ua.reviewMode),n.xp6(2),n.Q6J("ngForOf",n.lcZ(60,54,ua.images$))("ngForTrackBy",ua.trackByFn),n.xp6(2),n.Q6J("ngForOf",n.lcZ(62,56,ua.documents$))("ngForTrackBy",ua.trackByFn)}}const Vl=class extends l.SiviAbstractForm{constructor(N,O,Ce,Je,Vt,Rr){super(N),this.translate=N,this.notify=O,this.applicationUtils=Ce,this.fileService=Je,this.languageService=Vt,this.fb=Rr,this.update=new n.vpe,this.updateSpecialNeeds=new n.vpe,this.preferredNameOptions=[],this.formValid=!1,this.childResidesTypeElsewhere=l.ChildResidesTypes.ELSEWHERE,this.constantsYes=l.Constants.YES,this.languageOptions=[],this.dateFormats=l.DateFormats,this.form=this.fb.group({firstName:[],lastName:[],preferredFirstName:[],nickName:[]})}ngOnInit(){this.filterAttachments(),this.getPreferredName(this.child.firstNames),this.updateValues(),this.setValidators(),this.yesOrNoOptions=this.getYesOrNoOptions(),this.getLanguageOptions(),this.childResidenceOptions=this.getAvailableResidenceOptions(),this.formValid=this.getFormValidity(),this.hasNonDisclosure=this.child.nonDisclosure===l.NonDisclosure.NON_DISCLOSURE,this.initContactAddress()}filterAttachments(){this.images$=this.applicationUtils.attachments$.pipe((0,g.R)(this.destroy$),(0,E.U)(N=>{if(N)return N.filter(O=>O.type&&O.type.includes("image/")&&O.documentPurpose===l.AttachmentPurposes.CHILD)})),this.documents$=this.applicationUtils.attachments$.pipe((0,g.R)(this.destroy$),(0,E.U)(N=>{if(N)return N.filter(O=>O.type&&!O.type.includes("image/")&&O.documentPurpose===l.AttachmentPurposes.CHILD)}))}getPreferredName(N){this.preferredNameOptions=l.SiviUtils.generatePreferredNameOptions(N),N?this.child.preferredFirstName=this.child.preferredFirstName?this.child.preferredFirstName:(0,le.Z)(this.preferredNameOptions,"[0].value",""):(this.preferredNameOptions=[],this.child.preferredFirstName=""),this.onValueChange()}getResidenceText(){const N=this.child.residence;let O="";return N&&N.value&&(O=this.translate.instant(N.value),N.value===l.ChildResidesTypes.ELSEWHERE&&N.info&&(O=O.concat(", ",N.info))),O}getLanguageOptions(){var N=this;return(0,o.Z)(function*(){try{const O=yield(0,tn.z)(N.languageService.getLanguageList(N.translate.currentLang));if(!O.length)return;N.languageOptions=l.Utils.getAutocompleteOptions(O);const Ce=N.child.motherTongue.toUpperCase(),Je=N.languageOptions.find(Vt=>Vt.value.code===Ce);N.selectedLanguage$=(0,ge.of)(Je?[Je.value]:[]),N.selectedOtherLanguages$=(0,ge.of)(N.child.otherLanguages.map(Vt=>Vt.toUpperCase()).map(Vt=>N.languageOptions.find(Rr=>Rr.value.code===Vt)).filter(Vt=>Vt).map(Vt=>Vt.value))}catch(O){console.error("Failed to get language options:",O),N.notify.alertBackendError(O)}})()}onChangeChildInfo(N){if("otherLanguages"===N.detail.name){const O=N.detail.value.map(Ce=>Ce.code.toLowerCase());this.child={...this.child,otherLanguages:O}}else this.child={...this.child,motherTongue:N.detail.value.code.toLowerCase()};this.onValueChange()}onChangeSpecialNeeds(N){this.specialNeeds={...N},this.formValid=this.getFormValidity(),this.updateSpecialNeeds.emit(this.specialNeeds)}onChangeChildLives(N){this.child={...this.child,residence:{value:N.value,info:N.info}},this.onValueChange()}onChangeNickName(N){N.detail.value!==this.child.nickName&&(this.child={...this.child,nickName:N.detail.value},this.onValueChange())}onLanguagesUpdate(N){const O=this.child.otherLanguages.map(Je=>Je.toUpperCase()),Ce=N.map(Je=>Je.languageCode.toUpperCase());(0,be.Z)(O,Ce)||(this.child={...this.child,otherLanguages:Ce},this.onValueChange())}onValueChange(){this.formValid=this.getFormValidity(),this.update.emit(this.child)}onUpdateContactAddress(N){if(N){const O={name:N.name,streetAddress:N.street,zipcode:N.postalCode,postOffice:N.city};this.child.contactAddress={...O}}else this.child.contactAddress=null;this.formValid=this.getFormValidity(),this.update.emit(this.child)}initContactAddress(){const N=(0,Jn.Z)(this.child.contactAddress);this.contactAddress=N?{name:N.name,street:N.streetAddress,city:N.postOffice,postalCode:N.zipcode}:null}getFormValidity(){const O=(this.radioListWithInputComponent?this.radioListWithInputComponent.toArray():[]).every(Vt=>!0===Vt.formGroup.valid),Ce=!this.personBasicInfoComponent||this.personBasicInfoComponent.getFormValidity(),Je=!!(0,ct.Z)(this.personContactAddressComponent?.contactAddress)||this.personContactAddressComponent?._isValid;return O&&Ce&&Je}onAddFile(){this.applicationUtils.addFile$.next(l.AttachmentPurposes.CHILD)}onDeleteAttachment(N){var O=this;return(0,o.Z)(function*(){(yield O.notify.deleteConfirmPopup()).onDidDismiss().then(Je=>{Je&&Je.data&&O.applicationUtils.deleteFile$.next(N)})})()}isImage(N){return!!N&&N.toString().includes("image/")}allowedFileExtensions(){return this.fileService.getAllowedFileTypes().join(", ")}maxFileSize(){return l.Constants.MAX_FILE_SIZE_IN_MEGABYTES}trackByFn(N,O){return O.id||O.tempId}getLanguageText(N){return N&&0!==N.length?N.map(O=>O.name).join(", "):"-"}updateValues(){this.form.get("firstName").patchValue(this.child.firstNames),this.form.get("lastName").patchValue(this.child.lastName),this.form.get("preferredFirstName").patchValue(this.child.preferredFirstName);const N=!this.child.nickName&&this.reviewMode?"-":this.child.nickName;this.form.get("nickName").patchValue(N)}setValidators(){this.reviewMode||(this.child.prc||(this.form.get("firstName").setValidators([l.SiviValidators.required,l.SiviValidators.pattern(l.Patterns.ALPHABETS)]),this.form.get("lastName").setValidators([l.SiviValidators.required,l.SiviValidators.pattern(l.Patterns.ALPHABETS)]),this.form.get("preferredFirstName").setValidators([l.SiviValidators.required])),this.form.get("nickName").setValidators([l.SiviValidators.pattern(l.Patterns.ALPHABETS)]))}getAvailableResidenceOptions(){return[{value:l.ChildResidesTypes.BOTH_GUARDIANS,text:this.translate.instant("sivi.person.info.child.resides.type.with-both-guardians")},{value:l.ChildResidesTypes.ONE_GUARDIAN,text:this.translate.instant("sivi.person.info.child.resides.type.with-one-guardian")},{value:l.ChildResidesTypes.SHARED_RESIDENCE,text:this.translate.instant("sivi.person.info.child.resides.type.shared-residence")},{value:l.ChildResidesTypes.ELSEWHERE,text:this.translate.instant("sivi.person.info.child.resides.type.elsewhere")}]}getYesOrNoOptions(){return[{value:l.Constants.NO,text:this.translate.instant("General.Text.No")},{value:l.Constants.YES,text:this.translate.instant("General.Text.Yes")}]}};let Ha=Vl;Vl.\u0275fac=function(O){return new(O||Vl)(n.Y36(w.sK),n.Y36(P.c),n.Y36(V.q),n.Y36(P.Ip),n.Y36(P.TS),n.Y36(Uo.qu))},Vl.\u0275cmp=n.Xpm({type:Vl,selectors:[["sivi-application-child-info"]],viewQuery:function(O,Ce){if(1&O&&(n.Gf(ar,7),n.Gf(ti.d,7),n.Gf(vr,5),n.Gf(l.RadioListWithInputComponent,5)),2&O){let Je;n.iGM(Je=n.CRH())&&(Ce.commonSearchbarComponent=Je.first),n.iGM(Je=n.CRH())&&(Ce.personBasicInfoComponent=Je.first),n.iGM(Je=n.CRH())&&(Ce.personContactAddressComponent=Je.first),n.iGM(Je=n.CRH())&&(Ce.radioListWithInputComponent=Je)}},inputs:{child:"child",reviewMode:"reviewMode",applicationId:"applicationId",specialNeeds:"specialNeeds"},outputs:{update:"update",updateSpecialNeeds:"updateSpecialNeeds"},features:[n.qOj],decls:2,vars:1,consts:[[1,"basic-info-container"],["class","content",4,"ngIf"],[1,"content"],[1,"ion-no-padding","spaces"],["siviLibForm","",3,"formGroup"],["siviGridCol","left"],["formControlName","firstName","siviLibFormControl","","type","text","label-position","floating",3,"viewMode","label"],["siviGridCol","right"],["formControlName","lastName","siviLibFormControl","","type","text","label-position","floating",3,"viewMode","value","label"],[3,"value","labelPosition","label","viewMode",4,"ngIf","ngIfElse"],["preferredFirstNameReviewModeOff",""],["formControlName","nickName","siviLibFormControl","","type","text","label-position","floating",3,"disabled","viewMode","label","siviChange"],[4,"ngIf","ngIfElse"],["birthday",""],[4,"ngIf"],["nonDisclosure",""],[1,"padding-top"],["childLivesReviewModeOff",""],[1,"ion-align-items-center"],["siviGridCol","left",1,"mothertongue"],["motherLanguage",""],["name","otherLanguages",3,"multiSelect","value","options","placeholderImage","selectAllText","removeAllText","placeholder","valueChange",4,"ngIf"],["medicalInfoReviewModeOff",""],[1,"attachments-container"],["size","12",1,"weight-600","big"],["class","add-button-container",4,"ngIf"],[1,"ion-margin-top"],["class","attachment","size","12","size-md","3",4,"ngFor","ngForOf","ngForTrackBy"],[3,"value","labelPosition","label","viewMode"],["formControlName","preferredFirstName","siviLibFormControl","",3,"viewMode","options","disabled","label","siviChange"],["name","pin","type","text","label-position","floating",3,"viewMode","value","label"],["name","birthday","type","text","label-position","floating",3,"viewMode","value","label"],["name","homeMunicipalityName","type","text","label-position","floating",3,"viewMode","value","label"],["siviGridCol","left",1,"ion-no-padding","municipality-nda"],["name","childNonDisclosure","type","text","label-position","floating",3,"label","value","viewMode","css"],["name","streetAddress","label-position","floating","type","text",3,"viewMode","label","value"],["name","zipcode","label-position","floating","type","text",3,"viewMode","label","value"],["name","postOfficeName","label-position","floating","type","text",3,"viewMode","label","value"],["size","12",1,"ion-no-padding"],[3,"address","update"],["personContactAddressComponent",""],["siviGridCol","left",1,"nda-address","ion-no-padding"],["type","text",3,"viewMode","label","value"],["subTitleCssClass","force-required-asterisk",3,"subTitle","textFieldLabel","textFieldEnabler","inputValue","required","options","update"],["type","text",3,"viewMode","value"],["name","motherTongue",3,"multiSelect","value","options","placeholderImage","selectAllText","removeAllText","placeholder","siviChange"],["name","otherLanguages",3,"multiSelect","value","options","placeholderImage","selectAllText","removeAllText","placeholder","valueChange"],["type","text",3,"label","value","viewMode"],["col","12"],[3,"subTitle","textFieldLabel","textFieldEnabler","inputValue","options","update"],[1,"add-button-container"],["color","primary","fill","outline","value","ECECInformation.attachment",3,"disabled","click"],[3,"text"],["size","12","size-md","3",1,"attachment"],[3,"attachment","showCancelButton","cancelClick"]],template:function(O,Ce){1&O&&(n.TgZ(0,"div",0),n.YNc(1,Ao,63,58,"div",1),n.qZA()),2&O&&(n.xp6(1),n.Q6J("ngIf",Ce.child))},dependencies:[l.InfoPopupComponent,ae.YG,ae.wI,ae.jY,ae.Q$,ae.Nd,he.sg,he.O5,Uo.JJ,Uo.JL,l.GridColDirective,l.RadioListWithInputComponent,_i.l,l.SelectComponent,l.AttachmentComponent,l.SiviFormDirective,l.SiviFormControlDirective,Uo.sg,Uo.u,he.Ov,he.uU,w.X$],styles:[".title[_ngcontent-%COMP%]{display:flex}.title[_ngcontent-%COMP%]   h1[_ngcontent-%COMP%]{color:var(--ion-color-secondary)}.title[_ngcontent-%COMP%]   sivi-lib-info-popup[_ngcontent-%COMP%]{margin-top:auto;margin-left:10px;font-size:26px}.margin[_ngcontent-%COMP%]{margin:20px 0}padding-top[_ngcontent-%COMP%]{padding-top:20px}.add-button-container[_ngcontent-%COMP%]{display:flex}sivi-lib-info-popup[_ngcontent-%COMP%]{font-size:26px}.attachments-container[_ngcontent-%COMP%]   ion-row[_ngcontent-%COMP%]{padding:0}.radio-list-with-input[_ngcontent-%COMP%]   ion-row[_ngcontent-%COMP%]{padding:0}"],changeDetection:0});const Ho=["personContactAddressComponent"];function Ra(Me,N){if(1&Me&&(n._UZ(0,"cgi-input",18),n.ALo(1,"translate"),n.ALo(2,"translate")),2&Me){const O=n.oxw(2);n.Q6J("value",O.guardian.preferredFirstName)("viewMode",O.reviewMode)("label",n.lcZ(2,6,"Form.Label.PreferredFirstName")),n.uIk("aria-label",n.lcZ(1,4,"Form.Label.PreferredFirstName"))}}function ba(Me,N){if(1&Me){const O=n.EpF();n.TgZ(0,"sivi-lib-select",19),n.NdJ("siviChange",function(Je){n.CHM(O);const Vt=n.oxw(2);return n.KtG(Vt.onChangeGuardianProperty(Je))}),n.ALo(1,"translate"),n.ALo(2,"translate"),n.qZA()}if(2&Me){const O=n.oxw(2);n.Q6J("value",O.guardian.preferredFirstName)("viewMode",O.reviewMode)("options",O.preferredNameOptions)("disabled",!O.preferredNameOptions||O.preferredNameOptions.length<1)("label",n.lcZ(2,8,"Form.Label.PreferredFirstName")),n.uIk("aria-label",n.lcZ(1,6,"Form.Label.PreferredFirstName"))}}function Jt(Me,N){if(1&Me){const O=n.EpF();n.TgZ(0,"ion-row")(1,"ion-col",5)(2,"cgi-input",20),n.NdJ("siviChange",function(Je){n.CHM(O);const Vt=n.oxw(2);return n.KtG(Vt.onChangeGuardian(Je))}),n.ALo(3,"translate"),n.ALo(4,"translate"),n.qZA()()()}if(2&Me){const O=n.oxw(2);n.xp6(2),n.Q6J("viewMode",O.reviewMode)("value",O.guardian.pin)("label",n.lcZ(4,6,"Form.Label.Pic")),n.uIk("aria-label",n.lcZ(3,4,"Form.Label.Pic"))}}function De(Me,N){if(1&Me&&(n.ynx(0),n._UZ(1,"cgi-input",23),n.ALo(2,"translate"),n.ALo(3,"translate"),n.BQk()),2&Me){const O=n.oxw(3);n.xp6(1),n.Q6J("viewMode",!0)("value",O.guardian.pin)("label",n.lcZ(3,6,"Form.Label.Pic")),n.uIk("aria-label",n.lcZ(2,4,"Form.Label.Pic"))}}function bt(Me,N){if(1&Me&&(n._UZ(0,"cgi-input",24),n.ALo(1,"date"),n.ALo(2,"translate"),n.ALo(3,"translate")),2&Me){const O=n.oxw(3);n.Q6J("viewMode",!0)("value",n.xi3(1,4,O.guardian.birthday,O.dateFormats.FINNISH_ANGULAR))("label",n.lcZ(3,9,"Form.Label.BirthDate")),n.uIk("aria-label",n.lcZ(2,7,"Form.Label.BirthDate"))}}function Xt(Me,N){if(1&Me&&(n.TgZ(0,"ion-row")(1,"ion-col",5),n.YNc(2,De,4,8,"ng-container",21),n.YNc(3,bt,4,11,"ng-template",null,22,n.W1O),n.qZA()()),2&Me){const O=n.MAs(4),Ce=n.oxw(2);n.xp6(2),n.Q6J("ngIf",Ce.guardian.pin)("ngIfElse",O)}}function Qi(Me,N){if(1&Me&&(n.ynx(0),n.TgZ(1,"ion-row")(2,"ion-col",5),n._UZ(3,"cgi-input",25),n.ALo(4,"translate"),n.ALo(5,"translate"),n.qZA()(),n.TgZ(6,"ion-row")(7,"ion-col",5),n._UZ(8,"cgi-input",26),n.ALo(9,"translate"),n.ALo(10,"translate"),n.qZA(),n.TgZ(11,"ion-col",7),n._UZ(12,"cgi-input",27),n.ALo(13,"translate"),n.ALo(14,"translate"),n.qZA()(),n.BQk()),2&Me){const O=n.oxw(2);n.xp6(3),n.Q6J("viewMode",!0)("label",n.lcZ(5,14,"Form.Label.Address"))("value",null==O.guardian||null==O.guardian.address?null:O.guardian.address.streetAddress),n.uIk("aria-label",n.lcZ(4,12,"Form.Label.Address")),n.xp6(5),n.Q6J("viewMode",!0)("label",n.lcZ(10,18,"Form.Label.PostalCode"))("value",null==O.guardian||null==O.guardian.address?null:O.guardian.address.zipcode),n.uIk("aria-label",n.lcZ(9,16,"Form.Label.PostalCode")),n.xp6(4),n.Q6J("viewMode",!0)("label",n.lcZ(14,22,"Form.Label.City"))("value",null==O.guardian||null==O.guardian.address?null:O.guardian.address.postOffice),n.uIk("aria-label",n.lcZ(13,20,"Form.Label.City"))}}function Kt(Me,N){if(1&Me){const O=n.EpF();n.TgZ(0,"ion-row")(1,"ion-col",28)(2,"sivi-person-contact-address",29,30),n.NdJ("update",function(Je){n.CHM(O);const Vt=n.oxw(2);return n.KtG(Vt.onUpdateContactAddress(Je))}),n.qZA()()()}if(2&Me){const O=n.oxw(2);n.xp6(2),n.Q6J("address",O.contactAddress)}}function Fe(Me,N){1&Me&&(n.TgZ(0,"ion-row")(1,"ion-col",31),n._UZ(2,"cgi-input",32),n.ALo(3,"translate"),n.ALo(4,"translate"),n.qZA()()),2&Me&&(n.xp6(2),n.Q6J("label",n.lcZ(3,4,"Form.Label.Address"))("value",n.lcZ(4,6,"NonDisclosure.ContactDetails"))("viewMode",!0)("css",".guardian-nda .field-value { color: var(--ion-color-warning); text-transform: uppercase; }"))}function Wt(Me,N){if(1&Me){const O=n.EpF();n.ynx(0),n.TgZ(1,"ion-label"),n._uU(2),n.ALo(3,"translate"),n.qZA(),n.TgZ(4,"cgi-autocomplete",34),n.NdJ("siviChange",function(Je){n.CHM(O);const Vt=n.oxw(3);return n.KtG(Vt.onChangeGuardianMotherTongue(Je))}),n.ALo(5,"async"),n.ALo(6,"translate"),n.qZA(),n.BQk()}if(2&Me){const O=n.oxw(3);n.xp6(2),n.Oqu(n.lcZ(3,7,"Form.Label.MotherTongue")),n.xp6(2),n.Q6J("multiSelect",!1)("options",O.languageOptions)("value",n.lcZ(5,9,O.selectedLanguage$))("placeholderImage","")("placeholder",n.lcZ(6,11,"General.Language.Select")),n.uIk("readonly",O.guardian.prc||O.reviewMode)}}function yi(Me,N){if(1&Me&&(n._UZ(0,"cgi-input",35),n.ALo(1,"translate")),2&Me){const O=n.oxw(3);n.Q6J("label",n.lcZ(1,3,"Form.Label.MotherTongue"))("viewMode",!0)("value",O.getLanguageText(O.guardian.motherTongue))}}function Ki(Me,N){if(1&Me&&(n.TgZ(0,"ion-col",5),n.YNc(1,Wt,7,13,"ng-container",21),n.YNc(2,yi,2,5,"ng-template",null,33,n.W1O),n.qZA()),2&Me){const O=n.MAs(3),Ce=n.oxw(2);n.xp6(1),n.Q6J("ngIf",!Ce.reviewMode&&!Ce.guardian.prc)("ngIfElse",O)}}function ya(Me,N){if(1&Me){const O=n.EpF();n.TgZ(0,"sivi-lib-select",36),n.NdJ("siviChange",function(Je){n.CHM(O);const Vt=n.oxw(2);return n.KtG(Vt.onChangeGuardianProperty(Je))}),n.ALo(1,"translate"),n.ALo(2,"translate"),n.ALo(3,"translate"),n.qZA()}if(2&Me){const O=n.oxw(2);n.Q6J("value",O.guardian.communicationsLanguage)("viewMode",O.reviewMode)("options",O.communicationLanguageOptions)("placeholder",n.lcZ(2,8,"General.Language.Select"))("label",n.lcZ(3,10,"Form.Label.CommunicationsLanguage.Singular")),n.uIk("aria-label",n.lcZ(1,6,"Form.Label.CommunicationsLanguage.Singular"))}}function Na(Me,N){if(1&Me&&(n._UZ(0,"cgi-input",37),n.ALo(1,"translate")),2&Me){const O=n.oxw(2);n.Q6J("label",n.lcZ(1,3,"Form.Label.CommunicationsLanguage.Singular"))("viewMode",!0)("value",O.getLanguageText(O.guardian.communicationsLanguage))}}function qi(Me,N){if(1&Me){const O=n.EpF();n.TgZ(0,"div",2)(1,"div",3)(2,"h3"),n._uU(3),n.ALo(4,"translate"),n.qZA()(),n.TgZ(5,"ion-grid",4)(6,"ion-row")(7,"ion-col",5)(8,"cgi-input",6),n.NdJ("siviChange",function(Je){n.CHM(O);const Vt=n.oxw();return n.KtG(Vt.onChangeGuardian(Je))})("siviBlur",function(){n.CHM(O);const Je=n.oxw();return n.KtG(Je.getPreferredName(Je.guardian.firstNames))}),n.ALo(9,"translate"),n.qZA()(),n.TgZ(10,"ion-col",7)(11,"cgi-input",8),n.NdJ("siviChange",function(Je){n.CHM(O);const Vt=n.oxw();return n.KtG(Vt.onChangeGuardian(Je))}),n.ALo(12,"translate"),n.qZA()()(),n.TgZ(13,"ion-row")(14,"ion-col",5),n.YNc(15,Ra,3,8,"cgi-input",9),n.YNc(16,ba,3,10,"ng-template",null,10,n.W1O),n.qZA()(),n.YNc(18,Jt,5,8,"ion-row",11),n.YNc(19,Xt,5,2,"ion-row",11),n.TgZ(20,"div",3)(21,"h3"),n._uU(22),n.ALo(23,"translate"),n.qZA()(),n.TgZ(24,"ion-row")(25,"ion-col",5)(26,"cgi-input",12),n.NdJ("siviChange",function(Je){n.CHM(O);const Vt=n.oxw();return n.KtG(Vt.onChangeGuardian(Je))}),n.ALo(27,"translate"),n.qZA()()(),n.TgZ(28,"ion-row")(29,"ion-col",5)(30,"cgi-input",13),n.NdJ("siviChange",function(Je){n.CHM(O);const Vt=n.oxw();return n.KtG(Vt.onChangeGuardian(Je))}),n.ALo(31,"translate"),n.qZA()()(),n.YNc(32,Qi,15,24,"ng-container",11),n.YNc(33,Kt,4,1,"ion-row",11),n.YNc(34,Fe,5,8,"ion-row",11),n.TgZ(35,"ion-row"),n.YNc(36,Ki,4,2,"ion-col",14),n.TgZ(37,"ion-col",15),n.YNc(38,ya,4,12,"sivi-lib-select",16),n.YNc(39,Na,2,5,"ng-template",null,17,n.W1O),n.qZA()()()()}if(2&Me){const O=n.MAs(17),Ce=n.MAs(40),Je=n.oxw();n.xp6(3),n.Oqu(n.lcZ(4,25,"Form.Label.Basic.Information")),n.xp6(5),n.Q6J("value",Je.guardian.firstNames)("viewMode",Je.guardian.prc||Je.reviewMode)("label",n.lcZ(9,27,"Form.Label.FirstName.Plural")),n.xp6(3),n.Q6J("value",Je.guardian.lastName)("viewMode",Je.guardian.prc||Je.reviewMode)("label",n.lcZ(12,29,"Form.Label.LastName")),n.xp6(4),n.Q6J("ngIf",Je.reviewMode)("ngIfElse",O),n.xp6(3),n.Q6J("ngIf",Je.secondaryGuardian),n.xp6(1),n.Q6J("ngIf",!Je.secondaryGuardian),n.xp6(3),n.Oqu(n.lcZ(23,31,"Form.Label.Contact.Details")),n.xp6(4),n.Q6J("label",n.lcZ(27,33,"Form.Label.Phone"))("viewMode",Je.reviewMode)("value",null==Je.guardian?null:Je.guardian.phone),n.xp6(4),n.Q6J("label",n.lcZ(31,35,"Form.Label.Email"))("viewMode",Je.reviewMode)("value",null==Je.guardian?null:Je.guardian.email),n.xp6(2),n.Q6J("ngIf",Je.shouldShowAddressField()),n.xp6(1),n.Q6J("ngIf",Je.guardian.prc),n.xp6(1),n.Q6J("ngIf",Je.hasNonDisclosure),n.xp6(2),n.Q6J("ngIf",!Je.secondaryGuardian),n.xp6(1),n.Q6J("siviGridCol",Je.secondaryGuardian?"left":"right"),n.xp6(1),n.Q6J("ngIf",!Je.reviewMode)("ngIfElse",Ce)}}const bl=class extends l.SiviAbstractForm{set guardian(N){this.updateView(N)}get guardian(){return this.guardianInstance}set reviewMode(N){this.reviewModeInstance=N,setTimeout(()=>{this.initValidatorOptions()},1e3)}get reviewMode(){return this.reviewModeInstance}constructor(N,O,Ce,Je,Vt,Rr,wo){super(N),this.translate=N,this.languageService=O,this.organizationService=Ce,this.auth=Je,this.notify=Vt,this.fb=Rr,this.applicationUtilsService=wo,this.update=new n.vpe,this.preferredNameOptions=[],this.languageOptions=[],this.communicationLanguageOptions=this.getDefaultLanguages(),this.dateFormats=l.DateFormats,this.form=this.fb.group({pin:[],firstNames:[],lastName:[],preferredFirstName:[],email:[],phone:[]})}ngOnInit(){this.initValidatorOptions(),this.setValidators(),this.updateValues(),this.getPreferredName(this.guardian.firstNames),this.initLanguagesAndOptions(),this.hasNonDisclosure=this.guardian.nonDisclosure===e.v3.NON_DISCLOSURE,this.initContactAddress()}updateView(N){if(N){const O=(0,Jn.Z)(this.guardianInstance);this.guardianInstance=N,this.employment=N.personEmployment,this.updateValidatorOptions(O,N)}}initValidatorOptions(){this.applicationUtilsService.checkGuardianIsEmpty(this.guardian)?(this.guardian=this.getEmptyGuardian(),this.getEmptyValidatorOptions()):this.setValidators()}getEmptyGuardian(){return{firstNames:"",lastName:"",email:"",phone:"",pin:"",address:{streetAddress:"",postOffice:"",zipcode:""}}}initLanguagesAndOptions(){var N=this;return(0,o.Z)(function*(){try{const O=yield(0,tn.z)(N.languageService.getLanguageList(N.translate.currentLang));if(!O.length||(N.languageOptions=e.cQ.getAutocompleteOptions(O),N.secondaryGuardian||!N.guardian.motherTongue))return;const Ce=N.guardian.motherTongue.toUpperCase(),Je=N.languageOptions.find(Vt=>Vt.value.code===Ce);N.selectedLanguage$=(0,ge.of)(Je?[Je.value]:[])}catch(O){console.error("Failed to initialize languages and options:",O),N.notify.alertBackendError(O)}})()}onChangeGuardianProperty(N){const O={...this.guardian,...N};this.update.emit(O)}onChangeGuardianMotherTongue(N){const O={...this.guardian,motherTongue:N.detail.value.code.toLowerCase()};this.update.emit(O)}onChangeGuardian(N){const O={...this.guardian,[N.detail.name]:N.detail.value};this.update.emit(O)}onUpdateContactAddress(N){const O={...this.guardian};if(N){const Ce={name:N.name,streetAddress:N.street,zipcode:N.postalCode,postOffice:N.city};O.contactAddress={...Ce}}else O.contactAddress=null;this.update.emit(O)}get formValid(){return this.personContactAddressComponent?this.isValid&&this.personContactAddressComponent.isValid:this.isValid}shouldShowAddressField(){return!this.hasNonDisclosure&&!this.secondaryGuardian}getPreferredName(N){const O={...this.guardian};if(this.preferredNameOptions=l.SiviUtils.generatePreferredNameOptions(N),N){let Ce;this.preferredNameOptions&&(Ce=this.preferredNameOptions.find(Je=>Je.value===this.guardian.preferredFirstName)),O.preferredFirstName=Ce?Ce.value:(0,le.Z)(this.preferredNameOptions,"[0].value","")}else this.preferredNameOptions=[],O.preferredFirstName="";this.update.emit(O)}getLanguageText(N){let O;return O="string"==typeof N?this.languageService.getLanguagesText([N]):this.languageService.getLanguagesText(N),O||"-"}initContactAddress(){const N=(0,Jn.Z)(this.guardian.contactAddress);this.contactAddress=N?{name:N.name,street:N.streetAddress,city:N.postOffice,postalCode:N.zipcode}:null}updateValidatorOptions(N,O){if(!N)return;const Ce=(0,ct.Z)(N.personEmployment)&&this.applicationUtilsService.checkGuardianIsEmpty(N),Je=(0,ct.Z)(O.personEmployment)&&this.applicationUtilsService.checkGuardianIsEmpty(O);if(Ce!==Je&&(Je?this.getEmptyValidatorOptions():this.setValidators()),!Je){const Rr=N.phone!==O.phone,wo=N.email!==O.email;(Rr||wo)&&this.setValidators()}}getEmptyValidatorOptions(){this.form.get("firstNames").setValidators([]),this.form.get("lastName").setValidators([]),this.form.get("pin").setValidators([]),this.form.get("preferredFirstName").setValidators([]),this.form.get("email").setValidators([]),this.form.get("phone").setValidators([])}updateValues(){this.form.patchValue(this.guardian)}setValidators(){this.guardian.prc||(this.form.get("firstNames").setValidators([l.SiviValidators.required,l.SiviValidators.pattern(e.eI.ALPHABETS)]),this.form.get("lastName").setValidators([l.SiviValidators.required,l.SiviValidators.pattern(e.eI.ALPHABETS)])),(!this.guardian.prc||!this.secondaryGuardian)&&this.form.get("preferredFirstName").setValidators([l.SiviValidators.required]),this.secondaryGuardian&&this.form.get("pin").setValidators([l.SiviValidators.required,l.SiviValidators.validatePin()]);const N=this.guardian.phone?[l.SiviValidators.validateEmail()]:[l.SiviValidators.required,l.SiviValidators.validateEmail()],O=this.guardian.email?[l.SiviValidators.validatePhoneNumber()]:[l.SiviValidators.required,l.SiviValidators.validatePhoneNumber()];this.form.get("email").setValidators(N),this.form.get("phone").setValidators(O)}getDefaultLanguages(){return[{value:"fi",text:this.translate.instant("General.Language.Finnish")},{value:"sv",text:this.translate.instant("General.Language.Swedish")},{value:"en",text:this.translate.instant("General.Language.English")}]}};let ia=bl;bl.\u0275fac=function(O){return new(O||bl)(n.Y36(w.sK),n.Y36(l.LanguageService),n.Y36(l.OrganizationService),n.Y36(P.e8),n.Y36(l.NotifyService),n.Y36(Uo.qu),n.Y36(V.q))},bl.\u0275cmp=n.Xpm({type:bl,selectors:[["sivi-application-guardian-info"]],viewQuery:function(O,Ce){if(1&O&&n.Gf(Ho,5),2&O){let Je;n.iGM(Je=n.CRH())&&(Ce.personContactAddressComponent=Je.first)}},inputs:{secondaryGuardian:"secondaryGuardian",guardian:"guardian",reviewMode:"reviewMode"},outputs:{update:"update"},features:[n.qOj],decls:2,vars:2,consts:[["siviLibForm","",1,"margin",3,"formGroup"],["class","content",4,"ngIf"],[1,"content"],[1,"subtitle"],[1,"ion-no-padding","spaces"],["siviGridCol","left"],["formControlName","firstNames","siviLibFormControl","","type","text","label-position","floating",3,"value","viewMode","label","siviChange","siviBlur"],["siviGridCol","right"],["formControlName","lastName","siviLibFormControl","","type","text","label-position","floating",3,"value","viewMode","label","siviChange"],["formControlName","preferredFirstName","siviLibFormControl","","type","text","label-position","floating",3,"value","viewMode","label",4,"ngIf","ngIfElse"],["reviewModeOff",""],[4,"ngIf"],["formControlName","phone","siviLibFormControl","","type","text","label-position","floating",3,"label","viewMode","value","siviChange"],["formControlName","email","siviLibFormControl","","type","text","label-position","floating",3,"label","viewMode","value","siviChange"],["siviGridCol","left",4,"ngIf"],[3,"siviGridCol"],["name","communicationsLanguage",3,"value","viewMode","options","placeholder","label","siviChange",4,"ngIf","ngIfElse"],["communicationsLanguageReviewOn",""],["formControlName","preferredFirstName","siviLibFormControl","","type","text","label-position","floating",3,"value","viewMode","label"],["formControlName","preferredFirstName","siviLibFormControl","",3,"value","viewMode","options","disabled","label","siviChange"],["formControlName","pin","siviLibFormControl","","type","text","label-position","floating",3,"viewMode","value","label","siviChange"],[4,"ngIf","ngIfElse"],["birthday",""],["formControlName","pin","siviLibFormControl","","type","text","label-position","floating",3,"viewMode","value","label"],["name","birthday","label-position","floating",3,"viewMode","value","label"],["name","streetAddress","label-position","floating","type","text",3,"viewMode","label","value"],["name","zipcode","label-position","floating","type","text",3,"viewMode","label","value"],["name","postOfficeName","label-position","floating","type","text",3,"viewMode","label","value"],["size","12",1,"ion-no-padding"],[3,"address","update"],["personContactAddressComponent",""],["siviGridCol","left",1,"guardian-nda","ion-no-padding"],["name","guardianNonDisclosure","type","text","label-position","floating",3,"label","value","viewMode","css"],["motherTongueReviewOn",""],["name","motherTongue",3,"multiSelect","options","value","placeholderImage","placeholder","siviChange"],["name","motherTongue","labelPosition","stacked",3,"label","viewMode","value"],["name","communicationsLanguage",3,"value","viewMode","options","placeholder","label","siviChange"],["name","communicationsLanguage","labelPosition","stacked",3,"label","viewMode","value"]],template:function(O,Ce){1&O&&(n.TgZ(0,"div",0),n.YNc(1,qi,41,37,"div",1),n.qZA()),2&O&&(n.Q6J("formGroup",Ce.form),n.xp6(1),n.Q6J("ngIf",Ce.guardian))},dependencies:[ae.wI,ae.jY,ae.Q$,ae.Nd,he.O5,Uo.JJ,Uo.JL,l.GridColDirective,_i.l,l.SelectComponent,l.SiviFormDirective,l.SiviFormControlDirective,Uo.sg,Uo.u,he.Ov,he.uU,w.X$],styles:[".title[_ngcontent-%COMP%]{display:flex}.title[_ngcontent-%COMP%]   h1[_ngcontent-%COMP%]{color:var(--ion-color-secondary)}.title[_ngcontent-%COMP%]   sivi-lib-info-popup[_ngcontent-%COMP%]{margin-top:auto;margin-left:10px;font-size:26px}.subtitle[_ngcontent-%COMP%]{color:var(--ion-color-primary);margin:30px 0 10px}.margin[_ngcontent-%COMP%]{margin:10px 0}"]});const $o=["applicationChildInfoComponent"],su=["applicantEmployment"],Us=["spouseEmployment"],Ka=["contentLoader"],Tc=["applicationGuardianInfoComponent"];function Qs(Me,N){if(1&Me){const O=n.EpF();n.TgZ(0,"sivi-lib-employment-information",17,18),n.NdJ("valueChange",function(Je){n.CHM(O);const Vt=n.oxw(2);return n.KtG(Vt.onUpdateEmploymentInformation(Je,0))}),n.qZA()}if(2&Me){const O=n.oxw(2);n.Q6J("value",null==O.guardians[0]?null:O.guardians[0].personEmployment)}}function vu(Me,N){if(1&Me){const O=n.EpF();n.TgZ(0,"sivi-lib-employment-information",17,20),n.NdJ("valueChange",function(Je){n.CHM(O);const Vt=n.oxw(3);return n.KtG(Vt.onUpdateEmploymentInformation(Je,1))}),n.qZA()}if(2&Me){const O=n.oxw(3);n.Q6J("value",null==O.guardians[1]?null:O.guardians[1].personEmployment)}}function hl(Me,N){if(1&Me){const O=n.EpF();n.TgZ(0,"div",11)(1,"h2"),n._uU(2),n.ALo(3,"translate"),n.qZA(),n.TgZ(4,"sivi-application-guardian-info",19,14),n.NdJ("update",function(Je){n.CHM(O);const Vt=n.oxw(2);return n.KtG(Vt.onUpdateGuardian(Je,1))}),n.qZA(),n.YNc(6,vu,2,1,"sivi-lib-employment-information",15),n.qZA()}if(2&Me){const O=n.oxw(2);n.xp6(2),n.Oqu(n.lcZ(3,6,"Child.Guardian.Or.Spouse.Singular")),n.xp6(2),n.Q6J("guardian",O.guardians[1]||null)("reviewMode",O.reviewMode)("prcData",!1)("secondaryGuardian",!0),n.xp6(2),n.Q6J("ngIf",O.application.type===O.applicationTypes.PPEWITHECEC)}}function Wl(Me,N){if(1&Me){const O=n.EpF();n.TgZ(0,"div",1)(1,"div",2)(2,"ion-row",3)(3,"h1"),n._uU(4),n.ALo(5,"translate"),n._UZ(6,"sivi-lib-info-popup",4),n.qZA()(),n.TgZ(7,"sivi-application-child-info",5,6),n.NdJ("update",function(Je){n.CHM(O);const Vt=n.oxw();return n.KtG(Vt.onUpdateChild(Je))})("updateSpecialNeeds",function(Je){n.CHM(O);const Vt=n.oxw();return n.KtG(Vt.onUpdateSpecialNeeds(Je))}),n.qZA()(),n.TgZ(9,"div",7)(10,"div",8)(11,"div",9)(12,"ion-row",10)(13,"h1"),n._uU(14),n.ALo(15,"translate"),n._UZ(16,"sivi-lib-info-popup",4),n.qZA()()()(),n.TgZ(17,"div",11)(18,"div",12)(19,"h2"),n._uU(20),n.ALo(21,"translate"),n.qZA()(),n.TgZ(22,"sivi-application-guardian-info",13,14),n.NdJ("update",function(Je){n.CHM(O);const Vt=n.oxw();return n.KtG(Vt.onUpdateGuardian(Je,0))}),n.qZA(),n.YNc(24,Qs,2,1,"sivi-lib-employment-information",15),n.qZA(),n.YNc(25,hl,7,8,"div",16),n.qZA()()}if(2&Me){const O=n.oxw();n.xp6(4),n.hij("",n.lcZ(5,14,"Child.BasicInfo")," "),n.xp6(2),n.s9C("text","Application.Child.Information.Info"),n.xp6(1),n.Q6J("applicationId",O.application.id)("child",O.application.child)("reviewMode",O.reviewMode)("specialNeeds",O.application.specialNeeds),n.xp6(7),n.hij("",n.lcZ(15,16,"Guardian.Information")," "),n.xp6(2),n.s9C("text","Application.Guardian.Information.Info"),n.xp6(4),n.Oqu(n.lcZ(21,18,"Child.Guardian.Singular")),n.xp6(2),n.Q6J("guardian",O.guardians[0])("reviewMode",O.reviewMode)("secondaryGuardian",!1),n.xp6(2),n.Q6J("ngIf",O.application.type===O.applicationTypes.PPEWITHECEC),n.xp6(1),n.Q6J("ngIf",O.reviewMode&&O.guardians[1]||!O.reviewMode)}}const Sl=class extends l.SiviComponent{set application(N){this.applicationInstance=N,this.child=N.child,this.guardians=N.guardians,this.checkValidity()}get application(){return this.applicationInstance}constructor(N,O,Ce,Je){super(),this.route=N,this.router=O,this.applicationUtils=Ce,this.translate=Je,this.update=new n.vpe,this.componentStatus=new n.vpe,this.applicationTypes=l.ApplicationTypes}ngOnInit(){this.child=this.application.child,this.guardians=this.application.guardians}onUpdateChild(N){const O={...this.application,child:N};this.update.emit(O)}onUpdateGuardian(N,O){const Ce=(0,Jn.Z)(this.application);Ce.guardians[O]={...Ce.guardians[O],...N},this.update.emit(Ce)}onUpdateEmploymentInformation(N,O){const Ce=N.map(Vt=>({...Vt,checked:!0})),Je=(0,Jn.Z)(this.application);Je.guardians[O]={...Je.guardians[O],personEmployment:Ce},this.update.emit(Je)}onUpdateSpecialNeeds(N){const O={...this.application,specialNeeds:{value:N.value,info:N.info}};this.update.emit(O)}checkValidity(){if(this.applicationGuardianInfoComponent&&this.applicationGuardianInfoComponent.first){const N=this.guardians[1],O=this.application.type===this.applicationTypes.PPEWITHECEC;this.checkIsGuardianEmpty(O,N)?(this.removeSecondaryGuardian(),this.isValid=this.getValidityWhenSecondaryGuardianIsEmpty(O)):this.isValid=this.getValidityWhenSecondaryGuardianIsNotEmpty(O),this.componentStatus.emit(this.isValid)}}getValidityWhenSecondaryGuardianIsNotEmpty(N){const O=this.applicationGuardianInfoComponent.toArray().every(Je=>Je.formValid),Ce=!N||this.applicantEmployment?.isValid&&this.spouseEmployment?.isValid;return this.applicationChildInfoComponent.formValid&&Ce&&O}getValidityWhenSecondaryGuardianIsEmpty(N){const O=this.applicationChildInfoComponent.formValid&&this.applicationGuardianInfoComponent.first.formValid,Ce=!N||this.applicantEmployment?.isValid;return O&&Ce}removeSecondaryGuardian(){const N=[...this.application.guardians];2===N.length&&(N.splice(1,1),this.update.emit({...this.application,guardians:N}))}checkIsGuardianEmpty(N,O){if(!O)return!0;const Ce=this.applicationUtils.checkGuardianIsEmpty(O),Je=(0,ct.Z)(O.personEmployment);return N?Ce&&Je:Ce}};let sp=Sl;function Ku(Me,N){if(1&Me&&(n.TgZ(0,"p"),n._uU(1),n.ALo(2,"firstNameLastName"),n.qZA()),2&Me){const O=n.oxw(2);n.xp6(1),n.hij(" ",n.lcZ(2,1,null==O.application?null:O.application.child),"")}}function Da(Me,N){1&Me&&(n.TgZ(0,"p"),n._uU(1),n.ALo(2,"translate"),n.qZA()),2&Me&&(n.xp6(1),n.Oqu(n.lcZ(2,1,"Application.Subject.Manual")))}function Pl(Me,N){1&Me&&(n.ynx(0),n.TgZ(1,"h2"),n._uU(2),n.ALo(3,"translate"),n.qZA(),n.TgZ(4,"p"),n._uU(5),n.ALo(6,"translate"),n.qZA(),n.BQk()),2&Me&&(n.xp6(2),n.Oqu(n.lcZ(3,2,"Application.Summary.Other.Information")),n.xp6(3),n.Oqu(n.lcZ(6,4,"Placement.View.PlacementType.PPETrial")))}function gl(Me,N){if(1&Me&&(n.TgZ(0,"div",3)(1,"h2"),n._uU(2),n.ALo(3,"translate"),n.qZA(),n.TgZ(4,"p"),n._uU(5),n.qZA(),n.TgZ(6,"h2"),n._uU(7),n.ALo(8,"translate"),n.qZA(),n.YNc(9,Ku,3,3,"p",4),n.YNc(10,Da,3,3,"ng-template",null,5,n.W1O),n.TgZ(12,"h2"),n._uU(13),n.ALo(14,"translate"),n.qZA(),n.TgZ(15,"p"),n._uU(16),n.ALo(17,"translate"),n.qZA(),n.YNc(18,Pl,7,6,"ng-container",6),n.qZA()),2&Me){const O=n.MAs(11),Ce=n.oxw();n.xp6(2),n.hij(" ",n.lcZ(3,8,"Municipality.Singular")," "),n.xp6(3),n.Oqu(null==Ce.application?null:Ce.application.municipalityName),n.xp6(2),n.hij(" ",n.lcZ(8,10,"Application.Subject.Child")," "),n.xp6(2),n.Q6J("ngIf",Ce.checkApplicationPersonExist())("ngIfElse",O),n.xp6(4),n.hij(" ",n.lcZ(14,12,"Application.Type")," "),n.xp6(3),n.Oqu(n.lcZ(17,14,"Application.Type."+Ce.application.type)),n.xp6(2),n.Q6J("ngIf",null==Ce.application?null:Ce.application.twoYear)}}Sl.\u0275fac=function(O){return new(O||Sl)(n.Y36(B.gz),n.Y36(B.F0),n.Y36(V.q),n.Y36(w.sK))},Sl.\u0275cmp=n.Xpm({type:Sl,selectors:[["sivi-ppe-application-person-information"]],viewQuery:function(O,Ce){if(1&O&&(n.Gf($o,5),n.Gf(su,5),n.Gf(Us,5),n.Gf(Ka,7),n.Gf(Tc,5)),2&O){let Je;n.iGM(Je=n.CRH())&&(Ce.applicationChildInfoComponent=Je.first),n.iGM(Je=n.CRH())&&(Ce.applicantEmployment=Je.first),n.iGM(Je=n.CRH())&&(Ce.spouseEmployment=Je.first),n.iGM(Je=n.CRH())&&(Ce.contentLoader=Je.first),n.iGM(Je=n.CRH())&&(Ce.applicationGuardianInfoComponent=Je)}},inputs:{application:"application",reviewMode:"reviewMode"},outputs:{update:"update",componentStatus:"componentStatus"},features:[n.qOj],decls:1,vars:1,consts:[["class","basic-container",4,"ngIf"],[1,"basic-container"],[1,"child-container"],[1,"information","title"],[3,"text"],[3,"applicationId","child","reviewMode","specialNeeds","update","updateSpecialNeeds"],["applicationChildInfoComponent",""],[1,"guardian-container"],[1,"header-container","padding"],[1,"title"],[1,"information"],[1,"guardians"],[1,"subtitle"],[3,"guardian","reviewMode","secondaryGuardian","update"],["applicationGuardianInfoComponent",""],[3,"value","valueChange",4,"ngIf"],["class","guardians",4,"ngIf"],[3,"value","valueChange"],["applicantEmployment",""],[3,"guardian","reviewMode","prcData","secondaryGuardian","update"],["spouseEmployment",""]],template:function(O,Ce){1&O&&n.YNc(0,Wl,26,20,"div",0),2&O&&n.Q6J("ngIf",Ce.application)},dependencies:[l.InfoPopupComponent,ae.Nd,he.O5,Ha,ia,l.EmploymentInformationComponent,w.X$],styles:[".basic-container[_ngcontent-%COMP%]{padding:0 16px 10px}@media screen and (min-width: 600px){.basic-container[_ngcontent-%COMP%]{padding:0 40px 10px}}@media screen and (min-width: 840px){.basic-container[_ngcontent-%COMP%]{padding:0 80px 10px}}.guardian-container[_ngcontent-%COMP%]{background-color:var(--ion-color-light);margin:0 -80px;padding:0 80px}.child-container[_ngcontent-%COMP%]{padding-bottom:50px}.guardians[_ngcontent-%COMP%]{padding-bottom:20px}.information[_ngcontent-%COMP%]{display:flex;align-items:flex-end}.title[_ngcontent-%COMP%]{display:flex}.title[_ngcontent-%COMP%]   h1[_ngcontent-%COMP%]{color:var(--ion-color-secondary)}.title[_ngcontent-%COMP%]   sivi-lib-info-popup[_ngcontent-%COMP%]{font-size:26px}@media screen and (max-width: 840px){.title[_ngcontent-%COMP%]   sivi-lib-info-popup[_ngcontent-%COMP%]{margin-left:10px}}.padding[_ngcontent-%COMP%]{padding-top:50px}"]});const Nd=class extends l.SiviComponent{constructor(N,O,Ce,Je,Vt){super(),this.translate=N,this.route=O,this.router=Ce,this.auth=Je,this.notify=Vt,this.clickEdit=new n.vpe,this.newId=l.Constants.NEW_ID}ngOnInit(){this.shouldBeAbleToEdit=this.auth.hasAnyRole([l.Roles.MUNICIPALITY_ADMIN])}checkApplicationPersonExist(){return!0}};let ss=Nd;Nd.\u0275fac=function(O){return new(O||Nd)(n.Y36(w.sK),n.Y36(B.gz),n.Y36(B.F0),n.Y36(P.e8),n.Y36(P.c))},Nd.\u0275cmp=n.Xpm({type:Nd,selectors:[["sivi-application-basic-information"]],inputs:{application:"application",reviewMode:"reviewMode"},outputs:{clickEdit:"clickEdit"},features:[n.qOj],decls:6,vars:4,consts:[[1,"basic-info-container"],[1,"title"],["class","content",4,"ngIf"],[1,"content"],[4,"ngIf","ngIfElse"],["showManual",""],[4,"ngIf"]],template:function(O,Ce){1&O&&(n.TgZ(0,"div",0)(1,"div",1)(2,"h1"),n._uU(3),n.ALo(4,"translate"),n.qZA()(),n.YNc(5,gl,19,16,"div",2),n.qZA()),2&O&&(n.xp6(3),n.Oqu(n.lcZ(4,2,"Application.Basic.Information")),n.xp6(2),n.Q6J("ngIf",Ce.application))},dependencies:[he.O5,w.X$,l.firstNameLastNamePipe],styles:[".basic-info-container[_ngcontent-%COMP%]{background-color:var(--ion-color-light);padding:0 16px 10px}@media screen and (min-width: 600px){.basic-info-container[_ngcontent-%COMP%]{padding:0 40px 10px}}@media screen and (min-width: 840px){.basic-info-container[_ngcontent-%COMP%]{padding:0 80px 10px}}.title[_ngcontent-%COMP%]{display:flex}.title[_ngcontent-%COMP%]   h1[_ngcontent-%COMP%]{color:var(--ion-color-secondary)}.title[_ngcontent-%COMP%]   sivi-lib-info-popup[_ngcontent-%COMP%]{margin-top:auto;margin-left:10px;font-size:26px}ion-label[_ngcontent-%COMP%]{padding-top:5px;display:block}p[_ngcontent-%COMP%]{font-weight:700;margin-top:5px}"]});var gc=p(15439),rs=p.n(gc),Pc=p(5698),ks=p(4128);function Ol(Me,N){if(1&Me){const O=n.EpF();n.TgZ(0,"ion-row")(1,"ion-col",19)(2,"p",20)(3,"sivi-lib-datepicker",21),n.NdJ("dateChange",function(Je){n.CHM(O);const Vt=n.oxw();return n.KtG(Vt.onChangeDesiredStartDate(Je))}),n.qZA(),n._UZ(4,"sivi-lib-info-popup",13),n.qZA()()()}if(2&Me){const O=n.oxw();n.xp6(3),n.Q6J("readonly",O.reviewMode)("label","Application.Date.DesiredStartDate")("minDate",O.minimumStartDate),n.xp6(1),n.Q6J("text","Application.ECEC.DesiredStartDate.Info")}}function _c(Me,N){if(1&Me){const O=n.EpF();n.TgZ(0,"ion-row")(1,"ion-col",19)(2,"sivi-lib-datepicker",23),n.NdJ("dateChange",function(Je){n.CHM(O);const Vt=n.oxw(2);return n.KtG(Vt.onChangeDesiredStartDate(Je))}),n.qZA()()()}if(2&Me){const O=n.oxw(2);n.xp6(2),n.Q6J("errorMessages",O.errorMessages)("readonly",O.reviewMode)("label","ECEC.Application.DesiredStartDate.IfDifferentFromPPE")("minDate",O.minimumStartDate)("maxDate",O.ececDesiredStartDateMaximumDate)}}function Yc(Me,N){if(1&Me&&n.YNc(0,_c,3,5,"ion-row",22),2&Me){const O=n.oxw();n.Q6J("ngIf",!O.hideECECFields.date)}}function lu(Me,N){if(1&Me){const O=n.EpF();n.TgZ(0,"ion-col",24)(1,"sivi-lib-attachment",25),n.NdJ("cancelClick",function(Je){n.CHM(O);const Vt=n.oxw();return n.KtG(Vt.onDeleteAttachment(Je))}),n.qZA()()}if(2&Me){const O=N.$implicit,Ce=n.oxw();n.xp6(1),n.Q6J("attachment",O)("viewMode",Ce.reviewMode)}}function ac(Me,N){if(1&Me){const O=n.EpF();n.TgZ(0,"ion-col",24)(1,"sivi-lib-attachment",25),n.NdJ("cancelClick",function(Je){n.CHM(O);const Vt=n.oxw();return n.KtG(Vt.onDeleteAttachment(Je))}),n.qZA()()}if(2&Me){const O=N.$implicit,Ce=n.oxw();n.xp6(1),n.Q6J("attachment",O)("viewMode",Ce.reviewMode)}}function bd(Me,N){if(1&Me&&(n.TgZ(0,"ion-row")(1,"ion-col",26),n._UZ(2,"cgi-input",27),n.ALo(3,"translate"),n.qZA()()),2&Me){const O=n.oxw();n.xp6(2),n.Q6J("viewMode",O.reviewMode)("label",n.lcZ(3,2,"ECEC.Application.Title.Weekly.Times"))}}function kd(Me,N){if(1&Me){const O=n.EpF();n.TgZ(0,"sivi-lib-checkbox-list",28),n.NdJ("siviChange",function(Je){n.CHM(O);const Vt=n.oxw();return n.KtG(Vt.updateCareTimes(Je))}),n.ALo(1,"translate"),n.ALo(2,"async"),n.qZA()}if(2&Me){const O=n.oxw();n.Q6J("label",n.lcZ(1,3,"ECEC.Application.Title.Weekly.Times"))("options",n.lcZ(2,5,O.careTimeOptions$))("verticalMode",!0)}}const Oc=function(Me){return{hidden:Me}},or=function(Me,N){return{maxSize:Me,extensions:N}},Hp=class extends l.SiviAbstractForm{set application(N){(0,be.Z)(N,this.application)||(this._application=N,this.handleApplicationChange(N),this.updateEcecDesiredStartDateIfNecessary())}get application(){return this._application}set viewMode(N){this.reviewMode=N,this.updateForm(),this.initializeCareTimeOptions()}get isECEC(){return this.application?.type===l.ApplicationTypes.ECEC}get isPPE(){return this.application?.type===l.ApplicationTypes.PPE}get isPPEWITHECEC(){return this.application?.type===l.ApplicationTypes.PPEWITHECEC}get endDateValidators(){const N=this.isPPEWITHECEC?"ececDesiredStartDate":"desiredStartDate";return this.indefinitelyToggle?[]:[l.SiviValidators.required,l.SiviValidators.validateDate(),l.SiviValidators.validateDateIsBeforeThan(N)]}get ececDesiredStartDateMaximumDate(){return this.indefinitelyToggle?null:this.application.endDate}constructor(N,O,Ce,Je,Vt,Rr,wo,ua,Ls,Ws,tu){super(N),this.translate=N,this.route=O,this.notify=Ce,this.applicationUtils=Je,this.ececWeeklyCareTimeOptionsService=Vt,this.ececExtentOptionsService=Rr,this.quickHandleService=wo,this.languageService=ua,this.fileService=Ls,this.summaryUtilsService=Ws,this.fb=tu,this.update=new n.vpe,this.startDateChange=new n.vpe,this.componentStatus=new n.vpe,this.sortOrganizations=new n.vpe,this.reviewMode=!0,this.quickHandlingDisplayDate=rs()().startOf("day").add(4,"M").format("YYYY-MM-DD"),this.minimumStartDate=rs()().add(1,"day").format("YYYY-MM-DD"),this.isInitialized=!1,this.files$=new X.X([]),this.isSaving$=new X.X(!1),this.files=[],this.currentTimeOptions=[],this.selectedWeeklyCareOptions=[],this.extentOptionsHours=[],this.extentOptionsTime=[],this.extentOptionSelectionIndex=0,this.extentOptionsWeek=[{text:this.translate.instant("ECEC.Payment.Extent.Option.PartWeek"),value:!0},{text:this.translate.instant("ECEC.Payment.Extent.Option.FullWeek"),value:!1}],this.hideECECFields={date:!1,reason:!1},this.errorMessages={desiredDateBeforePPE:this.translate.instant("ECEC.Application.Warning.DesireDateBeforePPE"),dateIsOutOfPeriods:this.translate.instant("Application.Warning.DesireDateIsOutOfPeriods")},this.form=this.fb.group({extentId:[],dailyCareNeedOption:[],careTimes:[],desiredStartDate:[],ececDesiredStartDate:[],quickHandlingReason:[],indefinitely:[],endDate:[]})}ngOnInit(){this.initDesiredStartDate(),this.indefinitelyToggle=this.application.indefinitely||!1,this.endDateCopy=this.application.endDate,this.userLanguage=this.languageService.getCurrentUserLanguage().language,this.applicationId=this.application.id||this.route.snapshot.paramMap.get("applicationId"),this.filterAttachments(),this.getMunicipalitySettings(this.application.municipalityId),this.careTimeOptions$=this.getCareTimeOptions(),this.setValidators(),this.updateForm(),[l.ApplicationStates.SAVED.toString(),l.ApplicationStates.IN_HANDLING.toString()].includes(this.application.state)&&(this.quickHandlingDisplayDate=rs()(this.application.sentDate).add(4,"M").format("YYYY-MM-DD"),this.originalEcecDesiredStartDate=this.isPPEWITHECEC?this.application.ececDesiredStartDate:this.application.desiredStartDate)}initializeCareTimeOptions(){this.reviewMode||setTimeout(()=>{this.isInitialized=!0},0)}initDesiredStartDate(){this.isPPEWITHECEC?(!this.application.ececDesiredStartDate&&this.application.desiredStartDate&&(this.application.ececDesiredStartDate=this.application.desiredStartDate),this.ececDesiredStartDateCopy=this.application.ececDesiredStartDate):this.desiredStartDateCopy=this.application.desiredStartDate}onFormStatusChange(N){this.componentStatus.emit(N)}filterAttachments(){this.images$=this.applicationUtils.attachments$.pipe((0,g.R)(this.destroy$),(0,E.U)(N=>{if(N)return N.filter(O=>O.type&&O.type.includes("image/")&&O.documentPurpose===l.AttachmentPurposes.APPLICATION)})),this.documents$=this.applicationUtils.attachments$.pipe((0,g.R)(this.destroy$),(0,E.U)(N=>{if(N)return N.filter(O=>O.type&&!O.type.includes("image/")&&O.documentPurpose===l.AttachmentPurposes.APPLICATION)}))}getCareTimeOptions(){return this.applicationUtils.careOptions$.pipe((0,E.U)(N=>N.timeOptions),(0,nt.b)(N=>{this.isInitialized&&!(0,be.Z)(this.currentTimeOptions,N)&&(this.form.get("careTimes").patchValue([]),this.form.get("careTimes").setValidators([l.SiviValidators.required]),this.currentTimeOptions=N,this.application.careTimeTypes=[],this.update.emit(this.application))}))}onAddFile(){this.applicationUtils.addFile$.next(l.AttachmentPurposes.APPLICATION)}onDeleteAttachment(N){var O=this;return(0,o.Z)(function*(){(yield O.notify.deleteConfirmPopup()).onDidDismiss().then(Je=>{Je&&Je.data&&O.applicationUtils.deleteFile$.next(N)})})()}onChangeDesiredStartDate({detail:N}){const O=N.value,Ce=N.name,Je=this.isPPEWITHECEC&&"ececDesiredStartDate"===Ce?this.application.ececDesiredStartDate:this.application.desiredStartDate;"desiredStartDate"===Ce?this.desiredStartDateCopy=O:this.ececDesiredStartDateCopy=O;const Vt=[];this.images$.forEach(wo=>Vt.push(...wo)),this.documents$.forEach(wo=>Vt.push(...wo));const Rr=l.Utils.isISODate(O)&&l.Utils.isAfter(O,rs()().endOf("day").toISOString());Rr&&(rs()(O,"YYYY-MM-DD").isSameOrAfter(this.quickHandlingDisplayDate)&&rs()(Je,"YYYY-MM-DD").isBefore(this.quickHandlingDisplayDate)&&Vt.length?this.confirmDeleteAttachments(N,Je,Vt):this.changeDesiredStartDate(N)),!Rr&&O&&this.form.get("ececDesiredStartDate").patchValue(this.application.desiredStartDate),this.ececDesiredStartDateCopy=this.application.ececDesiredStartDate,this.ececDesiredStartDateValidators(O)}confirmDeleteAttachments(N,O,Ce){var Je=this;return(0,o.Z)(function*(){(yield(yield Je.notify.createConfirmationPopUp("Application.Delete.Attachments.Title","Application.Delete.Attachments.Text","General.Buttons.Continue")).onDidDismiss()).data?(Je.changeDesiredStartDate(N),Je.deleteAttachments(Ce)):"desiredStartDate"===N.name?Je.desiredStartDateCopy=O:Je.ececDesiredStartDateCopy=O})()}deleteAttachments(N){N.forEach(O=>this.applicationUtils.deleteFile$.next(O))}changeDesiredStartDate(N){const O=N.value,Ce=N.name,Je=!(this.isPPEWITHECEC&&"desiredStartDate"===Ce);this.municipalityWeeklyCareTimes&&this.municipalityQuickHandling&&this.municipalityExtent&&this.setMunicipalitySettingsOptions(O,Je),this.application={...this.application,[Ce]:rs()(O).format("YYYY-MM-DD")},this.update.emit(this.application),"desiredStartDate"===Ce&&this.startDateChange.emit(!1);const Vt=this.summaryUtilsService.showQuickHandling$.value&&!this.hideECECFields.reason?[l.SiviValidators.required]:[];this.form.get("quickHandlingReason").setValidators(Vt)}onChangeEndDate({detail:N}){const O=N.value;this.endDateCopy=O;const Ce=this.application.ececDesiredStartDate?this.application.ececDesiredStartDate:this.application.desiredStartDate;l.Utils.isISODate(Ce)&&l.Utils.isISODate(O)&&(this.application={...this.application,endDate:rs()(O).format("YYYY-MM-DD")},this.update.emit(this.application))}validateMonthsDifference(N){const O=this.application.ececDesiredStartDate?this.application.ececDesiredStartDate:this.application.desiredStartDate;if(O){const Ce=rs()(O).startOf("day").diff(rs()().startOf("day"),"months");return this.daysBetweenDesiredDateAndToday=rs()(O).diff(rs()(),"days"),Ce<N}}onChangeIndefinitely(N){this.indefinitelyToggle=N.detail.value,this.application&&!this.application.indefinitely&&(this.application.endDate=null,this.endDateCopy=null),this.updateChanges(N),this.form.get("endDate").setValidators(this.endDateValidators)}updateChanges(N){this.application={...this.application,[N.detail.name]:N.detail.value},this.update.emit(this.application)}updateCareTimes(N){const O=(0,Pc.Z)(N.detail.value,"id");(0,be.Z)(this.application.careTimeTypes,O)||(this.application={...this.application,careTimeTypes:O},this.setSelectedWeeklyCareOptionsText(),this.update.emit(this.application),this.sortOrganizations.emit())}getMunicipalitySettings(N){const O=this.isECEC?Dn.ExtentOptionTypes.ECEC:Dn.ExtentOptionTypes.ECECWITHPPE,Ce=this.ececWeeklyCareTimeOptionsService.getWeeklyCareTimeOptionsByMunicipalityId(N),Je=this.quickHandleService.getQuickHandleOptionsByMunicipalityId(N),Vt=this.ececExtentOptionsService.getExtentOptionsByMunicipalityId(N,O),Rr=this.isPPEWITHECEC?this.application.ececDesiredStartDate:this.application.desiredStartDate;(0,ks.D)([Ce,Je,Vt]).subscribe(wo=>{this.municipalityWeeklyCareTimes=l.Utils.sortArrayByDate(wo[0]),this.municipalityQuickHandling=l.Utils.sortArrayByDate(wo[1].content),this.municipalityExtent=l.Utils.sortArrayByDate(wo[2]),this.setMunicipalitySettingsOptions(Rr,!1)},wo=>{this.notify.alertFailedToLoadData(),console.error("getMunicipalitySettings failed",wo)})}setMunicipalitySettingsOptions(N,O){const Ce=this.applicationUtils.careOptions$.value.timeOptions,Je=this.languageService.getCurrentUserLanguage().language,Vt=this.getMunicipalityWeeklyCareTimeOption(N,Je);if(!(0,be.Z)(Ce,Vt)){const wo=Ce.map(Ls=>Ls.value);this.application.careTimeTypes.some(Ls=>!wo.includes(Ls.type))||(this.selectedWeeklyCareOptions=[])}const Rr=this.getMunicipalityExtentOption(N);this.extentOptionsHours=this.getExtentOptionsHours(Rr.paymentExtentValues),this.extentOptionsTime=this.getExtentOptionsTime(Rr.paymentExtentValues),this.applicationUtils.careOptions$.next({timeOptions:Vt,extentOptions:Rr.paymentExtentValues}),this.setApplicationExtentOptions(),this.quickHandling=this.getMunicipalityQuickHandling(N,O),this.setQuickHandlingParams(N,O)}onChangeExtentOptionHours(N){const O=N.detail.value;if(!O||(0,ct.Z)(this.extentOptionsTime))return;let Ce,Je;this.extentOptionSelectionIndex=this.extentOptionsHours.findIndex(wo=>wo.value===O);const Vt=this.extentOptionsTime[this.extentOptionSelectionIndex][1].disabled,Rr=this.extentOptionsTime[this.extentOptionSelectionIndex][0].disabled;Rr&&!Vt?Ce=!1:!Rr&&Vt?Ce=!0:null!==this.application.dailyCareNeedOption&&(Ce=this.application.dailyCareNeedOption),null!==this.application.weeklyCareNeedOption&&(Je=this.application.weeklyCareNeedOption),this.application={...this.application,weeklyHoursOption:O,weeklyCareNeedOption:Je,dailyCareNeedOption:Ce},this.update.emit(this.application),this.form.get("dailyCareNeedOption").patchValue(this.application.dailyCareNeedOption)}onChangeExtentOptionTime(N){this.application={...this.application,[N.detail.name]:N.detail.value},this.update.emit(this.application)}setApplicationExtentOptions(){this.extentOptionsHours.findIndex(O=>O.value===this.application.weeklyHoursOption)>-1?this.onChangeExtentOptionHours({detail:{name:"extentId",value:this.application.weeklyHoursOption}}):(this.extentOptionSelectionIndex=0,this.application={...this.application,weeklyHoursOption:null,dailyCareNeedOption:null},this.update.emit(this.application))}setQuickHandlingParams(N,O){const Ce=this.getEcecDate(N),Je=this.isPPEWITHECEC?this.application.ececDesiredStartDate:this.application.desiredStartDate;if(this.isDateBeforeFourMonths(Ce,N))return this.summaryUtilsService.quickHandlingOptions$.next([]),this.summaryUtilsService.showQuickHandling$.next(!1),void(O&&this.resetQuickHandlingReason(Je,N));this.summaryUtilsService.showQuickHandling$.next(!0),this.userLanguage&&this.quickHandling&&this.setQuickHandlingLabel(N,O)}isDateBeforeFourMonths(N,O){return rs()(N,"YYYY-MM-DD").add(4,"M").isSameOrBefore(O)}isDateBeforeTwoWeeks(N){return rs()(N).startOf("d").isSameOrBefore(rs()().add(14,"d").startOf("d"))}getEcecDate(N){const O=this.originalEcecDesiredStartDate&&this.originalEcecDesiredStartDate!==N,Ce=[l.ApplicationStates.SAVED.toString(),l.ApplicationStates.IN_HANDLING.toString()].includes(this.application.state);return!Ce||O&&Ce&&this.isDateBeforeTwoWeeks(N)?rs()().format("YYYY-MM-DD"):rs()(this.application.sentDate).format("YYYY-MM-DD")}setQuickHandlingLabel(N,O){const Ce=this.isPPEWITHECEC?this.application.ececDesiredStartDate:this.application.desiredStartDate;let Vt,Rr,Je=[];this.isApplicationAcute(N)?(Rr=l.QuickHandling.ACUTE,Vt="ECEC.Application.Reason.TwoWeeks"):(Rr=l.QuickHandling.QUICK_HANDLING,Vt="ECEC.Application.Reason.FourMonths"),Je=this.quickHandling.quickHandlingOptions.filter(wo=>wo.handlingType===Rr),Vt!==this.quickHandlingLabel&&(this.quickHandlingLabel=Vt,O&&this.resetQuickHandlingReason(Ce,N)),this.checkIfQuickHandlingOptionsAreAvailable(Je)}isApplicationAcute(N){const O=this.getEcecDate(N),Ce=rs()(N).startOf("day").diff(rs()(O).startOf("day"),"days");return Ce>=0&&Ce<=l.QuickHandling.DAYS_BETWEEN}setQuickHandlingOptions(N){this.summaryUtilsService.quickHandlingOptions$.next(e._0.getQuickHandlingOptions(N,this.userLanguage))}checkIfQuickHandlingOptionsAreAvailable(N){if(0===N.length){const O="Message.Error.GeneralTitle",Ce="Application.Quickhandling.Reason.Error";this.notify.createErrorAlert(O,Ce)}else this.setQuickHandlingOptions(N)}resetQuickHandlingReason(N,O){N!==O&&(this.application={...this.application,quickHandlingReason:null},this.update.emit({...this.application}))}isImage(N){return!!N&&N.toString().includes("image/")}allowedFileExtensions(){return this.fileService.getAllowedFileTypes().join(", ")}maxFileSize(){return l.Constants.MAX_FILE_SIZE_IN_MEGABYTES}trackByFn(N,O){return O.id||O.tempId}setSelectedWeeklyCareOptionsText(){this.selectedWeeklyCareOptionsText=this.applicationUtils.careOptions$.value.timeOptions.filter(N=>this.application.careTimeTypes.some(O=>N.value===O.value)).map(N=>N.text).join(", ")}handleApplicationChange(N){N.type===l.ApplicationTypes.PPEWITHECEC&&(this.minimumStartDate=N.desiredStartDate,N.nextPeriodEcecUnit?this.updateHideECECFields(!0,!0):this.updateHideECECFields(!1,!!N.twoYear))}setValidators(){if(!this.reviewMode){if(this.form.get("careTimes").setValidators([l.SiviValidators.required]),this.form.get("extentId").setValidators([l.SiviValidators.required]),this.form.get("dailyCareNeedOption").setValidators([l.SiviValidators.required]),!this.isECEC){const N=this.application.endDate?[l.SiviValidators.required]:[];this.form.get("indefinitely").setValidators(N),this.form.get("endDate").setValidators(this.endDateValidators)}this.isPPEWITHECEC?this.hideECECFields.date||this.form.get("ececDesiredStartDate").setValidators(this.ececDesiredStartDateValidators()):this.form.get("desiredStartDate").setValidators([l.SiviValidators.required,l.SiviValidators.validateDateLaterThanToday()]),this.summaryUtilsService.showQuickHandling$.value&&!this.hideECECFields.reason&&this.form.get("quickHandlingReason").setValidators([l.SiviValidators.required])}}updateForm(){this.form.get("extentId").patchValue(this.application.weeklyHoursOption),this.form.get("dailyCareNeedOption").patchValue(this.application.dailyCareNeedOption),this.form.get("indefinitely").patchValue(this.application.indefinitely),this.form.get("endDate").patchValue(this.endDateCopy),this.form.get("careTimes").patchValue(this.application.careTimeTypes),this.isECEC&&this.form.get("desiredStartDate").patchValue(this.desiredStartDateCopy),this.isPPEWITHECEC&&!this.hideECECFields.date&&this.form.get("ececDesiredStartDate").patchValue(this.ececDesiredStartDateCopy),this.summaryUtilsService.showQuickHandling$.value&&!this.hideECECFields.reason&&this.form.get("quickHandlingReason").patchValue(this.application.quickHandlingReason)}isDesiredStartDateWithinPeriod(){return!this.desiredPeriod||l.Utils.isDateBetweenRangeInclusive(rs()(this.ececDesiredStartDateCopy),this.desiredPeriod.periodStart,this.desiredPeriod.periodEnd)}updateEcecDesiredStartDateIfNecessary(){const N=this.isPPEWITHECEC&&!this.hideECECFields.date,O=this.application.desiredStartDate>this.application.ececDesiredStartDate;N&&O&&(this.application.ececDesiredStartDate=this.application.desiredStartDate,this.form.get("ececDesiredStartDate").patchValue(this.application.ececDesiredStartDate),this.form.get("ececDesiredStartDate").setValidators(this.ececDesiredStartDateValidators(this.application.ececDesiredStartDate)))}ececDesiredStartDateValidators(N){const O=N||this.ececDesiredStartDateCopy;return[l.SiviValidators.required,l.SiviValidators.validateDate(),()=>l.Utils.isSameOrAfter(O,this.application.desiredStartDate)?null:{desiredDateBeforePPE:!0},()=>this.isDesiredStartDateWithinPeriod()?null:{dateIsOutOfPeriods:!0}]}updateHideECECFields(N,O){const Ce={date:N,reason:O};this.hideECECFields=Ce,this.summaryUtilsService.hideECECFields$.next(Ce)}getMunicipalityQuickHandling(N,O){const{state:Ce,quickHandlingReason:Je}=this.application,Vt=this.isPPEWITHECEC&&!Je;let Rr=Ce===l.ApplicationStates.DRAFT||O||Vt?this.getMunicipalityQuickHandlingByDesiredStartDate(N):this.getMunicipalityQuickHandlingByApplicationQuickReasonId();return Rr||(Rr=this.municipalityQuickHandling.find(wo=>!wo.validUntil)),this.checkApplicationQuickHandlingReasonIsNotValid((0,le.Z)(Rr,"quickHandlingOptions",[])),Rr}checkApplicationQuickHandlingReasonIsNotValid(N){((0,ct.Z)(N)||N.every(O=>O.id!==this.application.quickHandlingReason))&&setTimeout(()=>{this.application.quickHandlingReason=null})}getMunicipalityQuickHandlingByDesiredStartDate(N){return this.application.state===l.ApplicationStates.DRAFT&&(N=rs()().format("YYYY-MM-DD")),this.municipalityQuickHandling.find(O=>l.Utils.dateIsBetween(N,O.fromDate,O.validUntil))}getMunicipalityQuickHandlingByApplicationQuickReasonId(){return this.municipalityQuickHandling.find(N=>N.quickHandlingOptions.find(O=>O.id===this.application.quickHandlingReason))}getMunicipalityExtentOption(N){return this.municipalityExtent.find(Ce=>l.Utils.dateIsBetween(N,Ce.fromDate,Ce.validUntil))||this.municipalityExtent.find(Ce=>!Ce.validUntil)}getMunicipalityWeeklyCareTimeOption(N,O){return this.activeWeeklyCare=this.municipalityWeeklyCareTimes.find(Ce=>l.Utils.dateIsBetween(N,Ce.fromDate,Ce.validUntil)),this.activeWeeklyCare||(this.activeWeeklyCare=this.municipalityWeeklyCareTimes.find(Ce=>!Ce.validUntil)),Dn.MunicipalitySettingsUtils.getWeeklyCareTimeOptions((0,le.Z)(this.activeWeeklyCare,"restWeeklyCareTimeOptionValue",[]),O)}getExtentOptionsHours(N){const O=[];for(const Ce of N)O.push({id:Ce.id,value:Ce.overHoursPerWeek+"-"+Ce.maxHoursPerWeek+" "+this.translate.instant("General.HoursPerWeek")});return l.Utils.getSelectOptionsFromArray(O,"id","value")}getExtentOptionsTime(N){const O=[];for(const Ce of N){const Je=[];Je.push({text:this.translate.instant("ECEC.Extent.Option.FullTime"),value:!0,selected:Ce.fullTime,disabled:!Ce.fullTime}),Je.push({text:this.translate.instant("ECEC.Extent.Option.PartTime"),value:!1,selected:!Ce.fullTime,disabled:!Ce.partTime}),O.push(Je)}return O}};let Dr=Hp;function kr(Me,N){if(1&Me&&(n.ynx(0),n.TgZ(1,"ion-row")(2,"ion-col",4)(3,"p"),n._uU(4),n.qZA()()(),n.BQk()),2&Me){const O=n.oxw();n.xp6(4),n.Oqu(O.desiredStartDate)}}function Qo(Me,N){if(1&Me&&(n.TgZ(0,"p"),n._uU(1),n.ALo(2,"date"),n.ALo(3,"date"),n.qZA()),2&Me){const O=N.$implicit,Ce=n.oxw(3);n.xp6(1),n.hij(" ",O.periodName+": "+n.xi3(2,1,O.startDate,Ce.dateFormats.FINNISH_ANGULAR)+" - "+n.xi3(3,4,O.endDate,Ce.dateFormats.FINNISH_ANGULAR)," ")}}function oo(Me,N){if(1&Me&&(n.TgZ(0,"ion-col",4)(1,"b"),n._uU(2),n.ALo(3,"translate"),n.qZA(),n.YNc(4,Qo,4,7,"p",11),n.qZA()),2&Me){const O=n.oxw(2);n.xp6(2),n.hij("",n.lcZ(3,3,"Application.Periods.CurrentAndFuture"),":"),n.xp6(2),n.Q6J("ngForOf",O.currentAndFuturePeriods)("ngForTrackBy",O.trackByFnIndex)}}function da(Me,N){if(1&Me&&(n.TgZ(0,"p"),n._uU(1),n.ALo(2,"date"),n.ALo(3,"date"),n.qZA()),2&Me){const O=N.$implicit,Ce=n.oxw(3);n.xp6(1),n.hij(" ",O.periodName+": "+n.xi3(2,1,O.startDate,Ce.dateFormats.FINNISH_ANGULAR)+" - "+(O.twoYearPeriodEnd?n.xi3(3,4,O.twoYearPeriodEnd,Ce.dateFormats.FINNISH_ANGULAR):"")," ")}}function ha(Me,N){if(1&Me&&(n.TgZ(0,"ion-col",4)(1,"b"),n._uU(2),n.ALo(3,"translate"),n.qZA(),n.YNc(4,da,4,7,"p",11),n.qZA()),2&Me){const O=n.oxw(2);n.xp6(2),n.hij("",n.lcZ(3,3,"Application.Periods.CurrentAndFuture"),":"),n.xp6(2),n.Q6J("ngForOf",O.currentAndFuturePeriods)("ngForTrackBy",O.trackByFnIndex)}}function Ia(Me,N){if(1&Me){const O=n.EpF();n.TgZ(0,"sivi-lib-radio-list",5),n.NdJ("siviChange",function(Je){n.CHM(O);const Vt=n.oxw();return n.KtG(Vt.onUpdateDesiredPeriod(Je))}),n.qZA(),n.TgZ(1,"ion-row",6),n.YNc(2,oo,5,5,"ion-col",7),n.YNc(3,ha,5,5,"ng-template",null,8,n.W1O),n.TgZ(5,"ion-col",9)(6,"sivi-lib-datepicker",10),n.NdJ("dateChange",function(Je){n.CHM(O);const Vt=n.oxw();return n.KtG(Vt.onChangeDesiredStartDate(Je))}),n.qZA()()()}if(2&Me){const O=n.MAs(4),Ce=n.oxw();n.Q6J("options",Ce.startDateOptions)("value",Ce.startDateNextPeriod),n.xp6(1),n.Q6J("hidden",Ce.startDateNextPeriod),n.xp6(1),n.Q6J("ngIf",!Ce.twoYearPPE)("ngIfElse",O),n.xp6(4),n.Q6J("errorMessages",Ce.errorMessages)("label",Ce.title)("minDate",Ce.minimumStartDate)("maxDate",Ce.maximumStartDate)("value",Ce.desiredStartDate)}}Hp.\u0275fac=function(O){return new(O||Hp)(n.Y36(w.sK),n.Y36(B.gz),n.Y36(l.NotifyService),n.Y36(V.q),n.Y36(Dn.EcecWeeklyCareTimeOptionsService),n.Y36(Dn.EcecExtentOptionsService),n.Y36(Dn.QuickHandleService),n.Y36(P.TS),n.Y36(l.FileService),n.Y36(Y.p),n.Y36(Uo.qu))},Hp.\u0275cmp=n.Xpm({type:Hp,selectors:[["sivi-ecec-care"]],inputs:{application:"application",desiredPeriod:"desiredPeriod",viewMode:"viewMode"},outputs:{update:"update",startDateChange:"startDateChange",componentStatus:"componentStatus",sortOrganizations:"sortOrganizations"},features:[n.qOj],decls:44,vars:66,consts:[["siviLibForm","",1,"additionalECEC-container",3,"formGroup"],[1,"ion-no-padding"],[4,"ngIf","ngIfElse"],["ppewithecec",""],["size","12"],["siviGridCol","left"],["formControlName","indefinitely","siviLibFormControl","","name","indefinitely",3,"label","checked","viewMode","update"],["siviGridCol","right"],["formControlName","endDate","siviLibFormControl","","name","endDate","id","endDate",3,"readonly","readonlyValue","label","minDate","dateChange"],[3,"ngClass"],["formControlName","quickHandlingReason","siviLibFormControl","","name","quickHandlingReason",3,"placeholder","okText","cancelText","options","label","disabled","aria-value","selectChange"],[1,"add-button-container"],["color","primary","fill","outline","value","ECECInformation.attachment",3,"disabled","click"],[3,"text"],[1,"ion-margin-top"],["size","12","size-md","3",4,"ngFor","ngForOf","ngForTrackBy"],["weeklyCareReviewModeOff",""],["formControlName","extentId","siviLibFormControl","","name","extentId",3,"label","options","viewMode","siviChange"],["formControlName","dailyCareNeedOption","siviLibFormControl","","name","dailyCareNeedOption",3,"label","options","viewMode","siviChange"],["siviGridCol","left",1,"ion-no-padding"],[1,"component-with-info-popup"],["formControlName","desiredStartDate","siviLibFormControl","","name","desiredStartDate",1,"component",3,"readonly","label","minDate","dateChange"],[4,"ngIf"],["formControlName","ececDesiredStartDate","siviLibFormControl","","name","ececDesiredStartDate",3,"errorMessages","readonly","label","minDate","maxDate","dateChange"],["size","12","size-md","3"],[3,"attachment","viewMode","cancelClick"],["size","12","size-lg","6"],["type","text",3,"viewMode","label"],["formControlName","careTimes","siviLibFormControl","","name","careTimes","helpText","Application.ECEC.NeedForECEC.Info",1,"ion-margin-top",3,"label","options","verticalMode","siviChange"]],template:function(O,Ce){if(1&O&&(n.TgZ(0,"div",0)(1,"ion-grid",1),n.YNc(2,Ol,5,4,"ion-row",2),n.YNc(3,Yc,1,1,"ng-template",null,3,n.W1O),n.TgZ(5,"ion-row",4)(6,"ion-col",5)(7,"sivi-lib-checkbox-toggle",6),n.NdJ("update",function(Vt){return Ce.onChangeIndefinitely(Vt)}),n.qZA()(),n.TgZ(8,"ion-col",7)(9,"sivi-lib-datepicker",8),n.NdJ("dateChange",function(Vt){return Ce.onChangeEndDate(Vt)}),n.qZA()()(),n.TgZ(10,"div",9),n.ALo(11,"async"),n.TgZ(12,"ion-row")(13,"ion-col",5)(14,"sivi-lib-select",10),n.NdJ("selectChange",function(Vt){return Ce.updateChanges(Vt)}),n.ALo(15,"translate"),n.ALo(16,"translate"),n.ALo(17,"translate"),n.ALo(18,"async"),n.ALo(19,"translate"),n.qZA()()(),n.TgZ(20,"ion-row")(21,"ion-col",4)(22,"p"),n._uU(23),n.ALo(24,"translate"),n.qZA()(),n.TgZ(25,"ion-col",4)(26,"p",11)(27,"ion-button",12),n.NdJ("click",function(){return Ce.onAddFile()}),n._uU(28),n.ALo(29,"translate"),n.qZA(),n._UZ(30,"sivi-lib-info-popup",13),n.ALo(31,"translate"),n.qZA()()(),n.TgZ(32,"ion-row",14),n.YNc(33,lu,2,2,"ion-col",15),n.ALo(34,"async"),n.YNc(35,ac,2,2,"ion-col",15),n.ALo(36,"async"),n.qZA()(),n.YNc(37,bd,4,4,"ion-row",2),n.YNc(38,kd,3,7,"ng-template",null,16,n.W1O),n.TgZ(40,"sivi-lib-radio-list",17),n.NdJ("siviChange",function(Vt){return Ce.onChangeExtentOptionHours(Vt)}),n.ALo(41,"translate"),n.qZA(),n.TgZ(42,"sivi-lib-radio-list",18),n.NdJ("siviChange",function(Vt){return Ce.onChangeExtentOptionTime(Vt)}),n.ALo(43,"translate"),n.qZA()()()),2&O){const Je=n.MAs(4),Vt=n.MAs(39);n.Q6J("formGroup",Ce.form),n.xp6(2),n.Q6J("ngIf",Ce.isECEC)("ngIfElse",Je),n.xp6(5),n.Q6J("label","Form.Label.ForTheNonce")("checked",Ce.application.indefinitely)("viewMode",Ce.reviewMode),n.xp6(2),n.Q6J("readonly",Ce.application.indefinitely)("readonlyValue","-")("label","ECEC.Application.Need.Ends")("minDate",Ce.application.ececDesiredStartDate||Ce.application.desiredStartDate),n.xp6(1),n.Q6J("ngClass",n.VKq(61,Oc,!1===n.lcZ(11,34,Ce.summaryUtilsService.showQuickHandling$)||Ce.hideECECFields.reason)),n.xp6(4),n.Q6J("placeholder",n.lcZ(15,36,"Application.Quickhandling.Reason.Select"))("okText",n.lcZ(16,38,"General.Buttons.Ok"))("cancelText",n.lcZ(17,40,"General.Buttons.Cancel"))("options",n.lcZ(18,42,Ce.summaryUtilsService.quickHandlingOptions$))("label",n.lcZ(19,44,Ce.quickHandlingLabel))("disabled",Ce.reviewMode)("aria-value",null==Ce.application?null:Ce.application.quickHandlingReason),n.xp6(9),n.Oqu(n.lcZ(24,46,"ECEC.Application.Reason.Document")),n.xp6(4),n.Q6J("disabled",Ce.reviewMode),n.xp6(1),n.hij(" ",n.lcZ(29,48,"General.Buttons.Add.Attachment")," "),n.xp6(2),n.s9C("text",n.xi3(31,50,"Attachment.Info.Text",n.WLB(63,or,Ce.maxFileSize(),Ce.allowedFileExtensions()))),n.xp6(3),n.Q6J("ngForOf",n.lcZ(34,53,Ce.images$))("ngForTrackBy",Ce.trackByFn),n.xp6(2),n.Q6J("ngForOf",n.lcZ(36,55,Ce.documents$))("ngForTrackBy",Ce.trackByFn),n.xp6(2),n.Q6J("ngIf",Ce.reviewMode)("ngIfElse",Vt),n.xp6(3),n.Q6J("label",n.lcZ(41,57,Ce.isPPEWITHECEC?"ECEC.Application.Title.Extent.With.PPE":"ECEC.Application.Title.Extent"))("options",Ce.extentOptionsHours)("viewMode",Ce.reviewMode),n.xp6(2),n.Q6J("label",n.lcZ(43,59,"Application.View.Filters.Headers.EarlyChildhoodEducationAndCareNeedDaily"))("options",Ce.extentOptionsTime[Ce.extentOptionSelectionIndex])("viewMode",Ce.reviewMode)}},dependencies:[l.InfoPopupComponent,ae.YG,ae.wI,ae.jY,ae.Nd,he.mk,he.sg,he.O5,Uo.JJ,Uo.JL,l.GridColDirective,l.RadioListComponent,l.CheckboxListComponent,l.SelectComponent,l.CheckboxToggleComponent,l.AttachmentComponent,l.DatepickerComponent,l.SiviFormDirective,l.SiviFormControlDirective,Uo.sg,Uo.u,he.Ov,w.X$],styles:["ion-label[_ngcontent-%COMP%]{padding-right:5px}.great[_ngcontent-%COMP%]{margin-top:1em;display:block}.add-button-container[_ngcontent-%COMP%]{display:flex}sivi-lib-info-popup[_ngcontent-%COMP%]{font-size:26px;margin:auto auto auto 20px}"]});const eu=class{set minimumStartDate(N){this._minimumStartDate=N||rs()().format("YYYY-MM-DD")}get minimumStartDate(){return this._minimumStartDate}set periods(N){N&&this.populatePeriodsData(this.minimumStartDate,this.desiredStartDate,N)}constructor(N,O){this.translate=N,this.fb=O,this.form=this.fb.group({desiredStartDate:[]}),this.changeDesiredDate=new n.vpe,this.applicationTypes=l.ApplicationTypes,this.dateFormats=l.DateFormats,this.currentAndFuturePeriods=[]}onUpdateDesiredPeriod(N){this.startDateNextPeriod=N.detail.value,this.startDateNextPeriod&&this.changeDesiredDate.emit(this.nearestNextPeriod.startDate)}onChangeDesiredStartDate({detail:N}){this.changeDesiredDate.emit(N.value)}trackByFnIndex(N){return N}populatePeriodsData(N,O,Ce){const Je=this.mapMunicipalityPeriodsToCommonPeriods(Ce);this.nearestNextPeriod=this.getNearestNextPeriod(N,Je);const Vt=this.adjustDesiredStartDate(O,N,this.nearestNextPeriod);this.startDateOptions=this.getStartDateOptions(this.nearestNextPeriod),this.currentAndFuturePeriods=this.getCurrentAndFuturePeriods(N,Je),this.startDateNextPeriod=this.getInitialStartDateNextPeriod(Vt,this.nearestNextPeriod.startDate)}getNearestNextPeriod(N,O){let Je,Ce={};if(!O||!O.length)return Ce;for(const Vt of O){const Rr=rs()(Vt.startDate).diff(N,"days");Rr<0||(!Je||Rr<=Je)&&(Ce=Vt,Je=Rr)}return Ce}adjustDesiredStartDate(N,O,Ce){return N<O?Ce?.startDate||O:N}getStartDateOptions(N){if((0,ct.Z)(N))return[{value:!0,text:this.translate.instant("Application.DesiredStartDate.NoNextPeriod"),disabled:!0},{value:!1,text:this.translate.instant("Application.DesiredStartDate.OtherDate")}];const O=this.translate.instant("Application.DesiredStartDate.NextPeriod"),Ce=l.Utils.convertDateToFinnishStandard(N.startDate),Je=this.twoYearPPE?N.twoYearPeriodEnd:N.endDate,Vt=l.Utils.convertDateToFinnishStandard(Je)||"";return[{value:!0,text:`${O}: ${Ce} (${N.periodName}: ${Ce} - ${Vt})`},{value:!1,text:this.translate.instant("Application.DesiredStartDate.OtherDate")}]}getCurrentAndFuturePeriods(N,O){let Ce;if(Ce=this.twoYearPPE?O.filter(Rr=>rs()(Rr.twoYearPeriodEnd).diff(N,"days")>=0).reverse():O.filter(Rr=>rs()(Rr.endDate).diff(N,"days")>=0).reverse(),!Ce.length)return;const Je=Ce[0],Vt=Ce[Ce.length-1];return this._minimumStartDate=N||rs()(Je.startDate).format("YYYY-MM-DD"),this.maximumStartDate=rs()(Vt.endDate).subtract(1,"days").format("YYYY-MM-DD"),Ce}getInitialStartDateNextPeriod(N,O){return!N&&O?(this.changeDesiredDate.emit(O),!0):!(!N&&!O)&&N===O}mapMunicipalityPeriodsToCommonPeriods(N){return N.map(O=>({periodName:O.periodName,startDate:this.applicationType===l.ApplicationTypes.CLUB?O.clubPeriodStart:O.periodStart,endDate:this.applicationType===l.ApplicationTypes.CLUB?O.clubPeriodEnd:O.periodEnd,twoYearPeriodEnd:O.twoYearPeriodEnd}))}};let cc=eu;eu.\u0275fac=function(O){return new(O||eu)(n.Y36(w.sK),n.Y36(Uo.qu))},eu.\u0275cmp=n.Xpm({type:eu,selectors:[["sivi-application-desired-start-date"]],inputs:{form:"form",errorMessages:"errorMessages",applicationType:"applicationType",desiredStartDate:"desiredStartDate",minimumStartDate:"minimumStartDate",periods:"periods",title:"title",titleInfo:"titleInfo",twoYearPPE:"twoYearPPE",reviewMode:"reviewMode"},outputs:{changeDesiredDate:"changeDesiredDate"},decls:8,vars:7,consts:[[3,"text"],[4,"ngIf","ngIfElse"],[3,"formGroup"],["editDesiredStartDate",""],["size","12"],["name","startDateNextPeriod",3,"options","value","siviChange"],[1,"ion-no-padding",3,"hidden"],["size","12",4,"ngIf","ngIfElse"],["twoyearppe",""],["size","12","size-md","6",1,"ion-no-padding"],["formControlName","desiredStartDate","siviLibFormControl","","name","desiredStartDate",3,"errorMessages","label","minDate","maxDate","value","dateChange"],[4,"ngFor","ngForOf","ngForTrackBy"]],template:function(O,Ce){if(1&O&&(n.TgZ(0,"h3"),n._uU(1),n.ALo(2,"translate"),n._UZ(3,"sivi-lib-info-popup",0),n.qZA(),n.YNc(4,kr,5,1,"ng-container",1),n.TgZ(5,"div",2),n.YNc(6,Ia,7,10,"ng-template",null,3,n.W1O),n.qZA()),2&O){const Je=n.MAs(7);n.xp6(1),n.hij(" ",n.lcZ(2,5,Ce.title)," "),n.xp6(2),n.Q6J("text",Ce.titleInfo),n.xp6(1),n.Q6J("ngIf",Ce.reviewMode)("ngIfElse",Je),n.xp6(1),n.Q6J("formGroup",Ce.form)}},dependencies:[l.InfoPopupComponent,ae.wI,ae.Nd,he.sg,he.O5,Uo.JJ,Uo.JL,l.RadioListComponent,l.DatepickerComponent,l.SiviFormControlDirective,Uo.sg,Uo.u,he.uU,w.X$],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0});var Rs=p(74744);function xc(Me,N){if(1&Me){const O=n.EpF();n.TgZ(0,"sivi-lib-checkbox-list",22),n.NdJ("siviChange",function(Je){n.CHM(O);const Vt=n.oxw();return n.KtG(Vt.onChangeServiceForm(Je))}),n.ALo(1,"translate"),n.ALo(2,"async"),n.qZA()}if(2&Me){const O=n.oxw();n.Q6J("options",O.serviceTypeOptions)("label",n.lcZ(1,4,"Application.View.Filters.Headers.ServiceForm"))("verticalMode",!0)("value",n.lcZ(2,6,O.serviceFormFilter$))}}function Hc(Me,N){1&Me&&(n.TgZ(0,"div"),n._uU(1),n.ALo(2,"translate"),n.qZA()),2&Me&&(n.xp6(1),n.hij(" ",n.lcZ(2,1,"Application.ECEC.AvailablePlaces")," "))}function lp(Me,N){1&Me&&(n.TgZ(0,"div"),n._uU(1),n.ALo(2,"translate"),n.qZA()),2&Me&&(n.xp6(1),n.hij(" ",n.lcZ(2,1,"Application.PPE.AvailablePlaces")," "))}function kp(Me,N){1&Me&&(n.TgZ(0,"div"),n._uU(1),n.ALo(2,"translate"),n.qZA()),2&Me&&(n.xp6(1),n.hij(" ",n.lcZ(2,1,"Application.Club.AvailablePlaces")," "))}function Ju(Me,N){1&Me&&(n.TgZ(0,"div",23)(1,"div",24),n._UZ(2,"ion-spinner",25),n.qZA()())}function Su(Me,N){if(1&Me){const O=n.EpF();n.TgZ(0,"ion-item",29)(1,"ion-label",30),n._uU(2),n.qZA(),n.TgZ(3,"ion-checkbox",31),n.NdJ("ionChange",function(Je){const Rr=n.CHM(O).$implicit,wo=n.oxw(3);return n.KtG(wo.selectAvailablePlace(Je,Rr))}),n.qZA()()}if(2&Me){const O=N.$implicit,Ce=n.oxw(3);n.xp6(2),n.Oqu(Ce.getUnitNameWithFocus(O)),n.xp6(1),n.Q6J("disabled",!Ce.canSelectToBeAdded(O))("checked",Ce.isSelectedToBeAdded(O))}}function qs(Me,N){if(1&Me&&(n.TgZ(0,"ion-list",27),n.YNc(1,Su,4,3,"ion-item",28),n.qZA()),2&Me){const O=n.oxw(2);n.xp6(1),n.Q6J("ngForOf",O.filteredAvailablePlaces)("ngForTrackBy",O.trackByFn)}}function Cd(Me,N){if(1&Me&&n.YNc(0,qs,2,2,"ion-list",26),2&Me){const O=n.oxw(),Ce=n.MAs(19);n.Q6J("ngIf",null==O.filteredAvailablePlaces?null:O.filteredAvailablePlaces.length)("ngIfElse",Ce)}}function la(Me,N){1&Me&&(n.TgZ(0,"div",32),n._uU(1),n.ALo(2,"translate"),n.qZA()),2&Me&&(n.xp6(1),n.Oqu(n.lcZ(2,1,"Application.PreferredPlaces.NoPlacesAvailable")))}function ht(Me,N){1&Me&&(n.TgZ(0,"div"),n._uU(1),n.ALo(2,"translate"),n.TgZ(3,"span",33),n._uU(4,"*"),n.qZA()()),2&Me&&(n.xp6(1),n.hij(" ",n.lcZ(2,1,"Application.ECEC.PreferredPlaces")," "))}function Ke(Me,N){1&Me&&(n.TgZ(0,"div"),n._uU(1),n.ALo(2,"translate"),n.TgZ(3,"span",33),n._uU(4,"*"),n.qZA()()),2&Me&&(n.xp6(1),n.hij(" ",n.lcZ(2,1,"Application.PPE.PreferredEducationPlaces")," "))}function dn(Me,N){1&Me&&(n.TgZ(0,"div"),n._uU(1),n.ALo(2,"translate"),n.TgZ(3,"span",33),n._uU(4,"*"),n.qZA()()),2&Me&&(n.xp6(1),n.hij(" ",n.lcZ(2,1,"Application.Club.PreferredPlaces")," "))}function Kn(Me,N){1&Me&&(n.TgZ(0,"div",34),n._uU(1),n.ALo(2,"translate"),n.qZA()),2&Me&&(n.xp6(1),n.hij(" ",n.lcZ(2,1,"Application.PreferredPlaces.MaximumThreePlaces")," "))}function $i(Me,N){if(1&Me){const O=n.EpF();n.TgZ(0,"ion-row")(1,"ion-col",37)(2,"span",38),n._uU(3),n.qZA()(),n.TgZ(4,"ion-col",39)(5,"ion-item",40)(6,"ion-label",30),n._uU(7),n.qZA(),n.TgZ(8,"ion-checkbox",41),n.NdJ("ionChange",function(Je){const Rr=n.CHM(O).$implicit,wo=n.oxw(2);return n.KtG(wo.selectSelectedPlace(Je,Rr))}),n.qZA()()(),n.TgZ(9,"ion-col",42)(10,"ion-item",43)(11,"ion-button",44),n.NdJ("click",function(){const Vt=n.CHM(O).index,Rr=n.oxw(2);return n.KtG(Rr.moveSelectedUnit("up",Vt))}),n._UZ(12,"cgi-icon",45),n.qZA(),n.TgZ(13,"ion-button",44),n.NdJ("click",function(){const Vt=n.CHM(O).index,Rr=n.oxw(2);return n.KtG(Rr.moveSelectedUnit("down",Vt))}),n._UZ(14,"cgi-icon",46),n.qZA()()()()}if(2&Me){const O=N.$implicit,Ce=N.index,Je=n.oxw(2);n.xp6(3),n.hij("",Ce+1,"."),n.xp6(4),n.Oqu(Je.getUnitNameWithFocus(O)),n.xp6(1),n.Q6J("checked",Je.isSelectedToBeRemoved(O)),n.xp6(3),n.Q6J("disabled",0===Ce),n.xp6(2),n.Q6J("disabled",Ce===Je.selectedPlaces.length-1)}}function sr(Me,N){if(1&Me&&(n.TgZ(0,"ion-list",35),n.YNc(1,$i,15,5,"ion-row",36),n.qZA()),2&Me){const O=n.oxw();n.xp6(1),n.Q6J("ngForOf",O.selectedPlaces)("ngForTrackBy",O.trackByFn)}}function lo(Me,N){1&Me&&(n.TgZ(0,"div",32),n._uU(1),n.ALo(2,"translate"),n.qZA()),2&Me&&(n.xp6(1),n.Oqu(n.lcZ(2,1,"Application.PreferredPlaces.NoPlacesSelected")))}function ga(Me,N){if(1&Me&&(n.ynx(0),n.TgZ(1,"div",47),n._uU(2),n.qZA(),n.BQk()),2&Me){const O=n.oxw();n.xp6(2),n.hij(" ",O.minPreferredUnitsWarning," ")}}function Zs(Me,N){1&Me&&(n.ynx(0),n.TgZ(1,"div",47),n._uU(2),n.ALo(3,"translate"),n.qZA(),n.BQk()),2&Me&&(n.xp6(2),n.hij(" ",n.lcZ(3,1,"Application.PreferredPlaces.OnlyOnePlace")," "))}const Kr=function(Me,N){return{available:Me,selected:N}},ta=class extends l.SiviComponent{set applicationPlaces(N){this.selectedUnits$.next(N)}set availablePlaces(N){this.availablePlaces$.next(N)}set languages(N){N&&this.languages$.next(N)}set loadingUnits(N){this.loading$.next(N)}set minSelectableUnits(N){this._minSelectableUnits=N,this.setSelectablePlaceCount()}get minSelectableUnits(){return this._minSelectableUnits}get minPreferredUnitsWarning(){return this.minSelectableUnits?this.translate.instant(`Application.PreferredPlaces.Error.TooFewPlacesSelected.${this.minSelectableUnits}`):this.translate.instant("Application.PreferredPlaces.Error.TooFewPlacesSelected")}constructor(N,O){super(),this.applicationUtilsService=N,this.translate=O,this.serviceForms=[],this.activeServiceForms=[],this.updateUnits=new n.vpe,this.updateServiceForms=new n.vpe,this.serviceTypeOptions=[],this.places=[],this.filteredAvailablePlaces=[],this.selectedPlaces=[],this.checkedPlaces={toBeAdded:[]=[],toBeRemoved:[]=[]},this.selectablePlaceCount={min:l.Constants.APPLICATION_DEFAULT_MIN_PREFERRED_UNITS,max:l.Constants.APPLICATION_DEFAULT_MAX_PREFERRED_UNITS},this.displayServiceForm=!1,this.applicationTypes=l.ApplicationTypes,this.serviceFormFilter$=new X.X([]),this.selectedUnits$=new X.X([]),this.languages$=new X.X([]),this.availablePlaces$=new X.X([]),this.filterText$=new X.X(""),this.loading$=new ve.x}ngOnInit(){this.setSelectablePlaceCount(),this.listenForUnitChanges(),this.serviceTypeOptions=this.getServiceFormatOptions(),this.displayServiceForm=this.applicationType===l.ApplicationTypes.ECEC,this.serviceFormFilter$.pipe((0,g.R)(this.destroy$)).subscribe(N=>{this.updateServiceForms.emit(N)}),this.serviceFormFilter$.next(this.serviceForms)}setSelectablePlaceCount(){this.twoYearPPE?this.selectablePlaceCount={min:1,max:1}:this.minSelectableUnits&&(this.selectablePlaceCount={min:this.minSelectableUnits,max:l.Constants.APPLICATION_DEFAULT_MAX_PREFERRED_UNITS})}listenForUnitChanges(){(0,Oe.a)([this.selectedUnits$,this.languages$]).pipe((0,g.R)(this.destroy$)).subscribe(N=>{this.selectedPlaces=this.applicationUtilsService.prepareEducationalOrganizations(N[0],N[1])||[]}),(0,Oe.a)([this.availablePlaces$,this.serviceFormFilter$,this.filterText$,this.loading$]).pipe((0,g.R)(this.destroy$)).subscribe(N=>{if(!N[3]){const Ce=this.selectedPlaces.length;this.places=this.filterUnitsByServiceForm(N[0],N[1]),this.filteredAvailablePlaces=this.filterUnitsByName(this.places,N[2]),this.selectedPlaces=this.filterSelectedPlacesAfterChanges(this.selectedPlaces),this.checkedPlaces.toBeAdded=[],Ce!==this.selectedPlaces.length&&this.updateUnits.emit(this.selectedPlaces)}})}onChangeFilter(N){const O=N.detail.value;this.filterText$.next(O)}selectAvailablePlace(N,O){N.detail.checked?this.checkedPlaces.toBeAdded.some(Je=>(0,be.Z)(this.getCompareValues(Je),this.getCompareValues(O)))||this.checkedPlaces.toBeAdded.push(O):this.checkedPlaces.toBeAdded=this.checkedPlaces.toBeAdded.filter(Ce=>!(0,be.Z)(this.getCompareValues(Ce),this.getCompareValues(O)))}selectSelectedPlace(N,O){N.detail.checked?this.checkedPlaces.toBeRemoved.some(Je=>(0,be.Z)(this.getCompareValues(Je),this.getCompareValues(O)))||this.checkedPlaces.toBeRemoved.push(O):this.checkedPlaces.toBeRemoved=this.checkedPlaces.toBeRemoved.filter(Ce=>!(0,be.Z)(this.getCompareValues(Ce),this.getCompareValues(O)))}addPlaces(){const N=this.checkedPlaces.toBeAdded,O=[...this.selectedPlaces,...N];this.checkedPlaces.toBeAdded=[],this.updateUnits.emit(O)}removePlaces(){const N=this.checkedPlaces.toBeRemoved,O=this.selectedPlaces.filter(Ce=>N.every(Je=>!(0,be.Z)(Je,Ce)));this.checkedPlaces.toBeRemoved=[],this.updateUnits.emit(O)}getUnitNameWithFocus(N){const O=N.name,Ce=N.additionalText?`, ${N.additionalText}`:"";let Je="";return N.organizationFormat===l.OrganizationTypes.ORGANIZATION_FORMAT_PRIVATE&&(Je=`, ${this.translate.instant(l.OrganizationTypes.ORGANIZATION_FORMAT_PRIVATE)}`),N.organizationType===l.OrganizationTypes.DAYCAREPLACE_TYPE_FAMILY_DAYCARE||N.familyDaycare?this.translate.instant(l.OrganizationTypes.DAYCAREPLACE_TYPE_FAMILY_DAYCARE)+` (${N.name})${Je}`:`${O}${Ce}${Je}`}isSelectedToBeAdded(N){return this.checkedPlaces.toBeAdded.some(O=>(0,be.Z)(this.getCompareValues(N),this.getCompareValues(O)))}isSelectedToBeRemoved(N){return this.checkedPlaces.toBeRemoved.some(O=>(0,be.Z)(this.getCompareValues(N),this.getCompareValues(O)))}moveSelectedUnit(N,O){if(0===O&&"up"===N||O===this.selectedPlaces.length-1&&"down"===N)return void console.error("Unable to move "+N+" with index: "+O);const Ce="up"===N?O-1:O+1,Je=(0,Jn.Z)(this.selectedPlaces),Vt=Je.splice(O,1)[0];Je.splice(Ce,0,Vt),this.updateUnits.emit(Je)}canSelectToBeAdded(N){return!!this.isSelectedToBeAdded(N)||this.selectedPlaces.length+this.checkedPlaces.toBeAdded.length!==this.selectablePlaceCount.max&&!this.selectedPlaces.some(O=>(0,be.Z)(this.getCompareValues(O),this.getCompareValues(N)))}filterSelectedPlacesAfterChanges(N){return N.filter(O=>this.places.some(Ce=>(0,be.Z)(this.getCompareValues(Ce),this.getCompareValues(O))))}filterUnitsByServiceForm(N,O){return O.length?N.filter(Ce=>O.includes(Ce.organizationType)):N}filterUnitsByName(N,O){return O?N.filter(Ce=>{let Je=!1;return Ce.organizationType===l.OrganizationTypes.DAYCAREPLACE_TYPE_FAMILY_DAYCARE&&(Je=this.translate.instant(Ce.organizationType).toLowerCase().includes(O.toLowerCase())),(0,le.Z)(Ce,"name","").toLowerCase().includes(O.toLowerCase())||Je}):N}getTitleText(){let N="";switch(this.applicationType){case l.ApplicationTypes.ECEC:N="Application.ECEC.PreferredPlaces";break;case l.ApplicationTypes.PPE:case l.ApplicationTypes.PPEWITHECEC:N="Application.PPE.PreferredEducationPlaces";break;case l.ApplicationTypes.CLUB:N="Application.Club.PreferredPlaces";break;default:console.error("Unkown application type",this.applicationType),N="Application.PPE.PreferredEducationPlaces"}return this.translate.instant(N)}onChangeServiceForm(N){const O=N.detail.value;(0,be.Z)(O,this.serviceFormFilter$.getValue())||this.serviceFormFilter$.next(O)}getCompareValues(N){const O=(0,Rs.Z)(N,["id","activityFocus","languageFocus"]);return l.Utils.removeEmptyValues(O)}getServiceFormatOptions(){return[{value:l.OrganizationTypes.DAYCAREPLACE_TYPE_DAYCARE_CENTRE,text:this.translate.instant("sivi.organization.type.daycareplace.type.daycarecentre")},{value:l.OrganizationTypes.DAYCAREPLACE_TYPE_FAMILY_DAYCARE,text:this.translate.instant("sivi.organization.type.daycareplace.type.familydaycare")},{value:l.OrganizationTypes.DAYCAREPLACE_TYPE_GROUP_FAMILY_DAYCARE,text:this.translate.instant("sivi.organization.type.daycareplace.type.groupfamilydaycare")}].filter(O=>this.activeServiceForms.includes(O.value))}isValid(){return this.selectedPlaces.length>=this.selectablePlaceCount.min&&this.selectedPlaces.length<=this.selectablePlaceCount.max}};let os=ta;ta.\u0275fac=function(O){return new(O||ta)(n.Y36(V.q),n.Y36(w.sK))},ta.\u0275cmp=n.Xpm({type:ta,selectors:[["sivi-preferred-places"]],inputs:{applicationPlaces:"applicationPlaces",availablePlaces:"availablePlaces",languages:"languages",loadingUnits:"loadingUnits",serviceForms:"serviceForms",applicationType:"applicationType",twoYearPPE:"twoYearPPE",activeServiceForms:"activeServiceForms",minSelectableUnits:"minSelectableUnits"},outputs:{updateUnits:"updateUnits",updateServiceForms:"updateServiceForms"},features:[n.qOj],decls:41,vars:30,consts:[["name","serviceForms",3,"options","label","verticalMode","value","siviChange",4,"ngIf"],[3,"text"],[1,"ion-no-padding"],["size","12","size-lg","5"],[4,"ngIf"],[1,"selectable-units-container"],["data-cy","search-places",1,"unit-container-title",3,"placeholder","ionChange"],["class","loader-container",4,"ngIf","ngIfElse"],["displayUnits",""],["noSelectableUnits",""],[1,"info-text"],["size","12","size-lg","2",1,"button-col"],[1,"button-container"],[1,"button-wrapper"],["color","primary","fill","outline","role","button","size","small","no-min-width","","data-cy","button-add-places",3,"disabled","click"],["name","chevron_right",1,"move-button-icon"],["color","primary","fill","outline","role","button","size","small","no-min-width","","data-cy","button-remove-places",3,"disabled","click"],["name","chevron_left",1,"move-button-icon"],[1,"selected-units-container"],["class","unit-container-title",4,"ngIf"],["class","selected-units-list",4,"ngIf","ngIfElse"],["noSelectedUnits",""],["name","serviceForms",3,"options","label","verticalMode","value","siviChange"],[1,"loader-container"],[1,"loader-wrapper"],["color","primary"],["class","add-units-list",4,"ngIf","ngIfElse"],[1,"add-units-list"],["lines","none",4,"ngFor","ngForOf","ngForTrackBy"],["lines","none"],[1,"ion-text-wrap"],["slot","start",3,"disabled","checked","ionChange"],[1,"no-places"],[1,"error"],[1,"unit-container-title"],[1,"selected-units-list"],[4,"ngFor","ngForOf","ngForTrackBy"],["size","1",1,"ion-no-padding"],[1,"selected-unit-priority"],["size","9",1,"ion-no-padding"],["lines","none",1,"ion-no-padding"],["slot","start",3,"checked","ionChange"],["size","2",1,"ion-no-padding"],["lines","none",1,"ion-no-margin","ion-no-padding","move-buttons"],["color","primary","fill","none","role","button","size","small","no-min-width","",3,"disabled","click"],["name","arrow_upward"],["name","arrow_downward"],[1,"error","invalid","info-text"]],template:function(O,Ce){if(1&O&&(n.TgZ(0,"div"),n.YNc(1,xc,3,8,"sivi-lib-checkbox-list",0),n.TgZ(2,"h3"),n._uU(3),n._UZ(4,"sivi-lib-info-popup",1),n.qZA(),n.TgZ(5,"ion-grid",2)(6,"ion-row")(7,"ion-col",3),n.YNc(8,Hc,3,3,"div",4),n.YNc(9,lp,3,3,"div",4),n.YNc(10,kp,3,3,"div",4),n.TgZ(11,"div",5)(12,"ion-searchbar",6),n.NdJ("ionChange",function(Vt){return Ce.onChangeFilter(Vt)}),n.ALo(13,"translate"),n.qZA(),n.YNc(14,Ju,3,0,"div",7),n.ALo(15,"async"),n.YNc(16,Cd,1,2,"ng-template",null,8,n.W1O),n.YNc(18,la,3,3,"ng-template",null,9,n.W1O),n.qZA(),n.TgZ(20,"div",10),n._uU(21),n.ALo(22,"translate"),n.qZA()(),n.TgZ(23,"ion-col",11)(24,"div",12)(25,"div",13)(26,"ion-button",14),n.NdJ("click",function(){return Ce.addPlaces()}),n._UZ(27,"cgi-icon",15),n.qZA(),n.TgZ(28,"ion-button",16),n.NdJ("click",function(){return Ce.removePlaces()}),n._UZ(29,"cgi-icon",17),n.qZA()()()(),n.TgZ(30,"ion-col",3),n.YNc(31,ht,5,3,"div",4),n.YNc(32,Ke,5,3,"div",4),n.YNc(33,dn,5,3,"div",4),n.TgZ(34,"div",18),n.YNc(35,Kn,3,3,"div",19),n.YNc(36,sr,2,2,"ion-list",20),n.YNc(37,lo,3,3,"ng-template",null,21,n.W1O),n.qZA(),n.YNc(39,ga,3,1,"ng-container",4),n.YNc(40,Zs,4,3,"ng-container",4),n.qZA()()()()),2&O){const Je=n.MAs(17),Vt=n.MAs(38);n.xp6(1),n.Q6J("ngIf",Ce.displayServiceForm),n.xp6(2),n.hij("",Ce.getTitleText()," "),n.xp6(1),n.Q6J("text","Application.PreferredPlaces.Info"),n.xp6(4),n.Q6J("ngIf",Ce.applicationType===Ce.applicationTypes.ECEC),n.xp6(1),n.Q6J("ngIf",Ce.applicationType===Ce.applicationTypes.PPE||Ce.applicationType===Ce.applicationTypes.PPEWITHECEC),n.xp6(1),n.Q6J("ngIf",Ce.applicationType===Ce.applicationTypes.CLUB),n.xp6(2),n.Q6J("placeholder",n.lcZ(13,20,"General.Text.Search")),n.xp6(2),n.Q6J("ngIf",n.lcZ(15,22,Ce.loading$))("ngIfElse",Je),n.xp6(7),n.hij(" ",n.xi3(22,24,"Application.PreferredPlaces.SelectedOfAvailable",n.WLB(27,Kr,null==Ce.places?null:Ce.places.length,null==Ce.checkedPlaces||null==Ce.checkedPlaces.toBeAdded?null:Ce.checkedPlaces.toBeAdded.length))," "),n.xp6(5),n.Q6J("disabled",!(null!=Ce.checkedPlaces&&null!=Ce.checkedPlaces.toBeAdded&&Ce.checkedPlaces.toBeAdded.length)),n.xp6(2),n.Q6J("disabled",!(null!=Ce.checkedPlaces&&null!=Ce.checkedPlaces.toBeRemoved&&Ce.checkedPlaces.toBeRemoved.length)),n.xp6(3),n.Q6J("ngIf",Ce.applicationType===Ce.applicationTypes.ECEC),n.xp6(1),n.Q6J("ngIf",Ce.applicationType===Ce.applicationTypes.PPE||Ce.applicationType===Ce.applicationTypes.PPEWITHECEC),n.xp6(1),n.Q6J("ngIf",Ce.applicationType===Ce.applicationTypes.CLUB),n.xp6(2),n.Q6J("ngIf",!Ce.twoYearPPE),n.xp6(1),n.Q6J("ngIf",null==Ce.selectedPlaces?null:Ce.selectedPlaces.length)("ngIfElse",Vt),n.xp6(3),n.Q6J("ngIf",(null==Ce.selectedPlaces?null:Ce.selectedPlaces.length)<Ce.selectablePlaceCount.min&&!Ce.twoYearPPE),n.xp6(1),n.Q6J("ngIf",1!==(null==Ce.selectedPlaces?null:Ce.selectedPlaces.length)&&Ce.twoYearPPE)}},dependencies:[l.InfoPopupComponent,ae.YG,ae.nz,ae.wI,ae.jY,ae.Ie,ae.Q$,ae.q_,ae.Nd,ae.VI,ae.PQ,ae.w,ae.j9,he.sg,he.O5,l.CheckboxListComponent,he.Ov,w.X$],styles:["[_nghost-%COMP%]   .selectable-units-container[_ngcontent-%COMP%]{display:block;border:2px solid var(--ion-color-primary);border-radius:2px}[_nghost-%COMP%]   .selectable-units-container[_ngcontent-%COMP%]   .unit-container-title[_ngcontent-%COMP%]{border-bottom:1px solid var(--ion-color-primary);padding:0}[_nghost-%COMP%]   .selectable-units-container[_ngcontent-%COMP%]   .add-units-list[_ngcontent-%COMP%]{height:250px;overflow-y:auto}[_nghost-%COMP%]   .selectable-units-container[_ngcontent-%COMP%]   ion-searchbar[_ngcontent-%COMP%]{--box-shadow: none !important}[_nghost-%COMP%]   .loader-container[_ngcontent-%COMP%]{display:block;position:relative;height:250px}[_nghost-%COMP%]   .loader-container[_ngcontent-%COMP%]   .loader-wrapper[_ngcontent-%COMP%]{position:relative;top:50%;transform:translateY(-50%);width:-moz-fit-content;width:fit-content;margin:auto}[_nghost-%COMP%]   cdk-virtual-scroll-viewport[_ngcontent-%COMP%]{height:100%}[_nghost-%COMP%]   .selected-units-container[_ngcontent-%COMP%]{display:block;border:2px solid var(--ion-color-primary);border-radius:2px}[_nghost-%COMP%]   .selected-units-container[_ngcontent-%COMP%]   .unit-container-title[_ngcontent-%COMP%]{border-bottom:1px solid var(--ion-color-primary);padding:7px}[_nghost-%COMP%]   .selected-units-container[_ngcontent-%COMP%]   .selected-units-list[_ngcontent-%COMP%]{overflow-y:auto}[_nghost-%COMP%]   .selected-units-container[_ngcontent-%COMP%]   .selected-units-list[_ngcontent-%COMP%]   .selected-unit-priority[_ngcontent-%COMP%]{position:absolute;top:50%;transform:translateY(-50%) translate(-50%);left:50%}[_nghost-%COMP%]   .no-places[_ngcontent-%COMP%]{padding:.3em}[_nghost-%COMP%]   .info-text[_ngcontent-%COMP%]{padding-left:.3em}[_nghost-%COMP%]   .move-buttons[_ngcontent-%COMP%]{z-index:10;--inner-padding-bottom: 0;--inner-padding-end: 0;--inner-padding-start: 0;--inner-padding-top: 0;top:50%;transform:translateY(-50%)}[_nghost-%COMP%]   .button-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;height:100%;width:100%;position:relative}[_nghost-%COMP%]   .button-container[_ngcontent-%COMP%]   .button-wrapper[_ngcontent-%COMP%]{top:50%;left:50%;position:relative;transform:translate(-50%,-50%);width:-moz-fit-content;width:fit-content}@media (min-width: 992px){[_nghost-%COMP%]   .button-container[_ngcontent-%COMP%]   .button-wrapper[_ngcontent-%COMP%]{display:grid}[_nghost-%COMP%]   .button-container[_ngcontent-%COMP%]   .button-wrapper[_ngcontent-%COMP%]   ion-button[_ngcontent-%COMP%]{margin-left:auto;margin-right:auto}}@media (max-width: 991px){[_nghost-%COMP%]   .button-container[_ngcontent-%COMP%]   .button-wrapper[_ngcontent-%COMP%]   .move-button-icon[_ngcontent-%COMP%]{transform:rotate(90deg)}}[_nghost-%COMP%]   .error[_ngcontent-%COMP%]{color:var(--ion-color-warning)}ion-list[_ngcontent-%COMP%]   ion-item[_ngcontent-%COMP%]   ion-checkbox[_ngcontent-%COMP%]{margin-inline:2px 18px}ion-list[_ngcontent-%COMP%]   ion-item[_ngcontent-%COMP%]   ion-checkbox[_ngcontent-%COMP%], ion-list[_ngcontent-%COMP%]   ion-item[_ngcontent-%COMP%]   ion-label[_ngcontent-%COMP%]{margin-top:10px;margin-bottom:10px}"]});const _s=["commonSearchbarComponent"],ra=["preferredPlaces"];function _a(Me,N){if(1&Me){const O=n.EpF();n.TgZ(0,"ion-col",30)(1,"sivi-lib-autocomplete-group-select",31),n.NdJ("selectionChange",function(Je){n.CHM(O);const Vt=n.oxw(2);return n.KtG(Vt.onChangeCurrentEcecPlace(Je))}),n.qZA()()}if(2&Me){const O=N.ngIf,Ce=n.oxw(2);n.xp6(1),n.Q6J("selectableValues",Ce.autoCompleteSelectableValues)("viewMode",Ce.viewMode)("options",O)("preventEmitingSameValue",!0)}}function xl(Me,N){if(1&Me&&(n.ynx(0),n.YNc(1,_a,2,4,"ion-col",29),n.ALo(2,"async"),n.BQk()),2&Me){const O=n.oxw();n.xp6(1),n.Q6J("ngIf",n.lcZ(2,1,O.unitOptions$))}}function $l(Me,N){1&Me&&(n.TgZ(0,"ion-row",32),n._UZ(1,"cgi-icon",33),n.TgZ(2,"span",34),n._uU(3),n.ALo(4,"translate"),n.qZA()()),2&Me&&(n.xp6(3),n.Oqu(n.lcZ(4,1,"Form.Error.ECECPlaceChangedAutomatically")))}function Os(Me,N){if(1&Me&&(n.ynx(0),n.TgZ(1,"span",23)(2,"ion-row")(3,"h4",35),n._uU(4),n.ALo(5,"translate"),n.qZA()(),n._UZ(6,"sivi-lib-info-popup",20),n.qZA(),n.TgZ(7,"ion-row"),n._uU(8),n.ALo(9,"translate"),n.qZA(),n.TgZ(10,"ion-row",35),n._uU(11),n.ALo(12,"translate"),n.qZA(),n.BQk()),2&Me){const O=n.oxw();n.xp6(4),n.Oqu(n.lcZ(5,4,"Application.Child.ECEC.required")),n.xp6(2),n.Q6J("text","Application.PPE.NeedsECEC.Info"),n.xp6(2),n.Oqu(n.lcZ(9,6,"Application.PPE.ChildNeedsECECBeforePPE")),n.xp6(3),n.hij(" ",n.lcZ(12,8,O.application.type===O.applicationTypes.PPEWITHECEC?"General.Yes":"General.No")," ")}}function yu(Me,N){if(1&Me){const O=n.EpF();n.TgZ(0,"span",23)(1,"h4",35),n._uU(2),n.ALo(3,"translate"),n.qZA(),n._UZ(4,"sivi-lib-info-popup",20),n.qZA(),n.TgZ(5,"span"),n._uU(6),n.ALo(7,"translate"),n.qZA(),n.TgZ(8,"sivi-lib-radio-list",36),n.NdJ("siviChange",function(Je){n.CHM(O);const Vt=n.oxw();return n.KtG(Vt.onChangeChildNeedsECEC(Je))}),n.qZA()}if(2&Me){const O=n.oxw();n.xp6(2),n.Oqu(n.lcZ(3,5,"Application.Child.ECEC.required")),n.xp6(2),n.Q6J("text","Application.PPE.NeedsECEC.Info"),n.xp6(2),n.Oqu(n.lcZ(7,7,"Application.PPE.ChildNeedsECECBeforePPE")),n.xp6(2),n.Q6J("options",O.ececRequiredOptions)("value",O.application.type===O.applicationTypes.PPEWITHECEC)}}function Ks(Me,N){if(1&Me){const O=n.EpF();n.TgZ(0,"div")(1,"sivi-ecec-care",37,38),n.NdJ("update",function(Je){n.CHM(O);const Vt=n.oxw();return n.KtG(Vt.onUpdateECECCare(Je))})("componentStatus",function(Je){n.CHM(O);const Vt=n.oxw();return n.KtG(Vt.onECECCareStatusChange(Je))})("sortOrganizations",function(){n.CHM(O);const Je=n.oxw();return n.KtG(Je.onUpdateSortParams())}),n.qZA()()}if(2&Me){const O=n.oxw();n.Q6J("@animatedItem",void 0),n.xp6(1),n.Q6J("application",O.application)("desiredPeriod",O.desiredPeriod)("viewMode",O.viewMode)}}function _l(Me,N){if(1&Me&&(n._UZ(0,"cgi-input",39),n.ALo(1,"translate")),2&Me){const O=n.oxw();n.Q6J("viewMode",O.viewMode)("label",n.lcZ(1,3,"Application.PPE.Language"))("value",O.viewMode?O.selectedLanguagesText||"-":O.selectedLanguagesText)}}function Dc(Me,N){if(1&Me){const O=n.EpF();n.TgZ(0,"sivi-lib-checkbox-list",40),n.NdJ("siviChange",function(Je){n.CHM(O);const Vt=n.oxw();return n.KtG(Vt.onChangeApplicationInfos(Je))}),n.ALo(1,"translate"),n.qZA()}if(2&Me){const O=n.oxw();n.Q6J("label",n.lcZ(1,4,"Application.PPE.Language"))("options",O.languages)("value",O.application.preferredLanguages)("verticalMode",!0)}}function Gs(Me,N){if(1&Me){const O=n.EpF();n.TgZ(0,"ion-row")(1,"ion-col",21)(2,"sivi-preferred-places",41,42),n.NdJ("updateUnits",function(Je){n.CHM(O);const Vt=n.oxw();return n.KtG(Vt.onPlaceChosen(Je))}),n.qZA()()()}if(2&Me){const O=n.oxw();n.xp6(2),n.Q6J("minSelectableUnits",O.minSelectableUnits)("applicationPlaces",O.application.selectedUnits)("availablePlaces",O.availableUnits)("loadingUnits",O.searchingLocation)("languages",O.languagesList)("twoYearPPE",null==O.application?null:O.application.twoYear)("applicationType",O.application.type)}}const Ed=function(Me){return{hidden:Me}},pu=class extends l.SiviAbstractForm{set reviewMode(N){this.viewMode=N,this.startUnitSearch$.next()}set application(N){this.applicationInstance=N,this.isDraft=this.application.state===l.ApplicationStates.DRAFT,this.setApplicationOriginallyDesiredStartDate(N.desiredStartDate),this.checkValidity()}get application(){return this.applicationInstance}set searchbar(N){N&&(this.commonSearchbarComponent=N,this.initPreferredLocation(),this.cdRef.detectChanges())}get selectedUnits(){return(0,le.Z)(this.application,"selectedUnits",[])}get desiredStartDate(){return(0,le.Z)(this.application,"desiredStartDate","")}get isDesiredStartDateFormValid(){return this.desiredStartDateForm.valid}constructor(N,O,Ce,Je,Vt,Rr,wo,ua,Ls,Ws,tu,Sc,Um,ic){super(wo),this.translate=N,this.route=O,this.router=Ce,this.notify=Je,this.cdRef=Vt,this.auth=Rr,this.translateService=wo,this.geoLocationService=ua,this.organizationService=Ls,this.applicationService=Ws,this.applicationUtils=tu,this.summaryUtils=Sc,this.fb=Um,this.periodsService=ic,this.updateApplication=new n.vpe,this.componentStatus=new n.vpe,this.form=this.fb.group({additionalInformation:[],currentUnitInOtherMunicipality:[]}),this.desiredStartDateForm=this.fb.group({desiredStartDate:[]}),this.errorMessageDesiredStartDate={dateIsOutOfPeriods:this.translate.instant("Application.Warning.DesireDateIsOutOfPeriods"),isSameOrAfter:this.translate.instant("Form.Error.Invalid.Date")},this.errorMaxLength300Msg={maxlength:this.translate.instant("Form.Error.MaxLengthIsChactersCount",{count:l.MaxLength.MESSAGE_LENGTH_300})},this.errorMaxLength4000Msg={maxlength:this.translate.instant("Form.Error.MaxLengthIsChactersCount",{count:l.MaxLength.MESSAGE_LENGTH_4000})},this.autoCompleteSelectableValues=1,this.ececUnits=[],this.ececRequiredOptions=[],this.searchingLocation=!1,this.unitOptions$=new X.X([]),this.isDraft=!0,this.PPEWITHECECOnlyProperties=["quickHandlingReason","weeklyHoursOption","weeklyCareNeedOption","dailyCareNeedOption","ececDesiredStartDate","careTimeTypes"],this.availableUnits=[],this.languages=[{value:"fi",text:"General.Language.Finnish"},{value:"sv",text:"General.Language.Swedish"},{value:"en",text:"General.Language.English"}],this.noEcecOption={element:{text:this.translate.instant("Application.NoCurrentECEC"),additionalText:""},value:{areaId:""}},this.ececPlaceAutomaticallyUpdated=!1,this.currentUnitInOtherMunicipalityValidator=[l.SiviValidators.required,l.SiviValidators.maxLength(l.MaxLength.MESSAGE_LENGTH_300)],this.applicationTypes=l.ApplicationTypes,this.minimumStartDate=rs()().add(1,"day").format("YYYY-MM-DD"),this.startUnitSearch$=new ve.x,this.ECECUnits$=new X.X([])}ngOnInit(){this.getMunicipalityPeriods(),this.ececRequiredOptions=this.createECECRequiredOptions(),this.getUnitsForApplication(this.application),this.initEnrolmentInformation(),this.setLanguagesText(this.application.preferredLanguages),this.getEducationalOrganizations(),this.initEducationalOrganizations(),this.updateValues(),this.minSelectableUnits=this.setMinimumSelectableUnits()}setMinimumSelectableUnits(){return this.application.mandatoryUnitsNumberFromSettings?this.application.mandatoryUnitsNumberAmount:l.Constants.APPLICATION_DEFAULT_MIN_PREFERRED_UNITS}setApplicationOriginallyDesiredStartDate(N){this.applicationOriginallyDesiredStartDate=this.applicationOriginallyDesiredStartDate||N}initEnrolmentInformation(){this.application={...this.application,...this.applicationUtils.initEnrolmentInformation(this.application)}}onChangeChildNeedsECEC(N){const O=N.detail.value,Ce=O?l.ApplicationTypes.PPEWITHECEC:l.ApplicationTypes.PPE;this.application.type!==Ce&&(O?this.application.careTimeTypes=[]:this.application={...this.removePPEWITHECECProperties(this.application)},this.application={...this.application,type:Ce,indefinitely:!0},this.startUnitSearch$.next(),this.updateApplication.emit(this.application),this.setValidators)}removePPEWITHECECProperties(N){for(const O of this.PPEWITHECECOnlyProperties)delete N[O];return N}checkCanChangeApplicationType(){const N=[l.ApplicationStates.DRAFT,l.ApplicationStates.SAVED],O=[l.ApplicationStates.DRAFT,l.ApplicationStates.IN_HANDLING,l.ApplicationStates.IN_PRE_PLACEMENT,l.ApplicationStates.IN_PLACEMENT],Ce=this.auth.hasAnyRole([l.Roles.GUARDIAN])&&N.includes(this.application.state),Je=this.auth.hasAnyRole([l.Roles.SERVICE_ADVISER])&&this.application.state===l.ApplicationStates.DRAFT,Vt=this.auth.hasAnyRole([l.Roles.MUNICIPALITY_ADMIN,l.Roles.ECEC_SERVICE_COUNSELOR])&&O.includes(this.application.state);return Je||Vt||Ce}initPreferredLocation(){if((0,ct.Z)(this.application.preferredLocation)){const O=(0,le.Z)(this.application,"guardians[0].address");O&&O.longitude&&O.latitude&&this.updatePreferredPlace(O)}const N=this.applicationUtils.getPreferredPlaceText(this.application.preferredLocation);this.commonSearchbarComponent.setValue(N)}initEducationalOrganizations(){this.applicationUtils.getLanguageOptions().pipe((0,T.q)(1)).subscribe(N=>{this.languagesList=N,this.startUnitSearch$.next()},N=>{console.error("getLanguageOptions failed",N)})}getUnitForChildOnDate(N,O,Ce){return this.applicationService.findChildECECPlaceWithDate(N,O,Ce)}getUnitsForApplication(N){this.applicationService.findAllCurrentEcecDaycareplaces(N.municipalityId,N.desiredStartDate).pipe((0,T.q)(1),(0,E.U)(O=>this.getAutocompleteOptions(O)),(0,E.U)(O=>this.mapToAutoCompleteOptions(O))).subscribe(O=>{this.unitOptions$.next(O)})}getAutocompleteOptions(N){return N?N.map(O=>({element:{text:this.getTextFromUnit(O),additionalText:""},value:{areaId:O.id}})):[]}getTextFromUnit(N){return N.type===l.OrganizationTypes.DAYCAREPLACE_TYPE_FAMILY_DAYCARE?this.translate.instant(l.Constants.ANY_FDCP)+" ("+N.name+")":N.name}onNearToAddressChange(N){N||(this.application={...this.application,preferredLocation:{}},this.updateApplication.emit(this.application))}setECECPlaceAutomaticallyUpdated(N){(0,be.Z)(N,this.applicationOriginallyDesiredStartDate)||(this.ececPlaceAutomaticallyUpdated=!0)}onChangeDesiredStartDate(N){var O=this;return(0,o.Z)(function*(){if(O.checkValidity(),!l.Utils.isISODate(N))return;let Ce=!1;if(N!==O.desiredStartDate){O.desiredStartDateForm.get("desiredStartDate").patchValue(N),Ce=!0;const{child:Vt,municipalityId:Rr}=O.application;if(Vt?.id)try{const wo=yield O.getUnitForChildOnDate(Vt.id,N,Rr).toPromise();wo!==O.application.currentUnit&&O.changeCurrentECECPlace(wo)}catch(wo){console.error("Fetching current place for child failed",wo,Vt,N,Rr)}}O.application={...O.application,desiredStartDate:N};const Je=O.applicationUtils.isDesiredDateInsidePeriods(l.ApplicationTypes.PPE,O.desiredStartDate,O.currentAndFuturePeriods);O.desiredPeriod=O.currentAndFuturePeriods.find(Vt=>l.Utils.isDateBetweenRangeInclusive(rs()(O.desiredStartDate),Vt.periodStart,Vt.periodEnd)),Je&&(Ce&&O.getUnitsForApplication(O.application),O.setECECPlaceAutomaticallyUpdated(N),O.setValidators(),O.startUnitSearch$.next(),O.updateApplication.emit(O.application))})()}onChangeApplicationInfos(N){const{name:O,value:Ce}=N.detail;if(this.application={...this.application,[O]:Ce},"preferredLanguages"===O&&(this.setLanguagesText(Ce),this.startUnitSearch$.next()),"inOtherMunicipality"===O){this.application.currentUnit="",this.application.currentUnitInOtherMunicipality="";const Je=Ce?this.currentUnitInOtherMunicipalityValidator:[];this.form.get("currentUnitInOtherMunicipality").setValidators(Je)}this.updateApplication.emit(this.application)}onChangeCurrentEcecPlace(N){this.ececPlaceAutomaticallyUpdated=!1;const O=N[0];if(O){const Ce=O.areaId;this.changeCurrentECECPlace(Ce)}}changeCurrentECECPlace(N){this.application={...this.application,currentUnit:N},this.reorderUnitsForApplicationAfterSelection(this.application.currentUnit),this.updateApplication.emit(this.application)}reorderUnitsForApplicationAfterSelection(N){if(!N)return;let O=(0,Jn.Z)(this.unitOptions$.value);const Ce=O.findIndex(Je=>Je.value.areaId===N);0!==Ce&&(O=l.Utils.reorderArray(O,{from:Ce,to:0}),this.unitOptions$.next(O))}checkValidity(){const N=this.application.type===l.ApplicationTypes.PPEWITHECEC?this.isValid&&this.ECECCare&&this.ECECCare.isValid&&this.checkPreferredPlacesValidity()&&this.isDesiredStartDateFormValid:this.isValid&&this.checkPreferredPlacesValidity()&&this.isDesiredStartDateFormValid;this.componentStatus.emit(N)}checkPreferredPlacesValidity(){if(!this.application||!this.selectedUnits||!this.preferredPlaces)return!1;const N=this.preferredPlaces.selectablePlaceCount;return this.selectedUnits.length>=N.min&&this.selectedUnits.length<=N.max}getCoordinates(N){this.geoLocationService.getGeoCoordinates(N).pipe((0,T.q)(1)).subscribe(O=>{this.setLocation(O)},O=>{console.error("getCoordinates failed",O),this.notify.alertFailedToLoadData()})}findEducationalOrganizations(N){this.updatePreferredPlace({longitude:N.longitude,latitude:N.latitude}),this.startUnitSearch$.next()}onPlaceChosen(N){this.application.selectedUnits=N,this.checkValidity(),this.updateApplication.emit(this.application)}getMunicipalityPeriods(){this.periodsService.getPeriodsByMunicipality(this.application.municipalityId).pipe((0,tt.h)(N=>!!N.length)).subscribe(N=>{this.periods=N,this.currentAndFuturePeriods=this.applicationUtils.getCurrentAndFuturePeriods(l.ApplicationTypes.PPE,this.minimumStartDate,N),this.desiredPeriod=this.currentAndFuturePeriods.find(O=>l.Utils.isDateBetweenRangeInclusive(rs()(this.application.desiredStartDate),O.periodStart,O.periodEnd)),this.setValidators()})}setValidators(){const{inOtherMunicipality:N}=this.application;this.desiredStartDateForm.get("desiredStartDate").setValidators([l.SiviValidators.required,l.SiviValidators.validateDate(),this.validateDateIsInsidePeriods(),l.SiviValidators.validateDateIsSameOrAfterThanParameter(this.minimumStartDate)]),this.form.get("additionalInformation").setValidators([l.SiviValidators.maxLength(l.MaxLength.MESSAGE_LENGTH_4000)]);const O=N?this.currentUnitInOtherMunicipalityValidator:[];this.form.get("currentUnitInOtherMunicipality").setValidators(O)}updateValues(){this.desiredStartDateForm.get("desiredStartDate").patchValue(this.application.desiredStartDate),this.form.patchValue(this.application)}onUpdateECECCare(N){this.application={...this.application,...N},this.updateApplication.emit(this.application)}onECECCareStatusChange(N){this.componentStatus.emit(N&&this.isValid&&this.checkPreferredPlacesValidity())}onUpdateSortParams(){this.application={...this.application},this.startUnitSearch$.next(),this.updateApplication.emit(this.application)}setLocation(N){this.locations=N;const O=this.geoLocationService.getLocationsList(this.locations);this.commonSearchbarComponent.displayResults(O)}onSelectLocation(N){this.searchingLocation=!0;const O=this.locations.find(Ce=>Ce.id===N);if(O&&O.latitude&&O.longitude){const Ce=O.label+", "+O.zip;this.commonSearchbarComponent.setValue(Ce),this.updatePreferredPlace({streetAddress:O.housenumber?O.street+" "+O.housenumber:O.street,zipcode:O.zip,postOffice:O.city,longitude:O.longitude,latitude:O.latitude}),this.findEducationalOrganizations({longitude:O.longitude,latitude:O.latitude})}}getPreferredEducationPlaces(){const N=[];return this.selectedUnits.forEach(O=>{O.id&&N.push(this.applicationUtils.getUnitFocusesTextWithBrackets(O,this.languagesList))}),N?N.join(", "):""}updatePreferredPlace(N){this.application.preferredLocation={...this.application.preferredLocation,...N},this.updateApplication.emit(this.application)}validateDateIsInsidePeriods(){return this.applicationUtils.validateDateIsInsidePeriods(l.ApplicationTypes.PPE,this.currentAndFuturePeriods)}mapToAutoCompleteOptions(N){if(!N||!N.length)return[];this.summaryUtils.unitList$.next(N);const O=this.application.currentUnit,Ce=N.find(Je=>Je.value.areaId===O);if(O&&Ce&&N){const Je=N.findIndex(Vt=>Vt.value.areaId===O);l.Utils.reorderArray(N,{from:Je,to:0}),N=[...N,this.noEcecOption]}else this.application.currentUnit="",N=[this.noEcecOption,...N];return N}setLanguagesText(N){this.selectedLanguagesText=this.applicationUtils.getLanguagesText(N)}getEducationalOrganizations(){this.handleEducationalOrganizationsSearch().subscribe(N=>{this.searchingLocation=!1,this.availableUnits=N,this.cdRef.detectChanges()},N=>{console.error("getEducationalOrganizations failed",N),this.searchingLocation=!1,this.notify.alertFailedToLoadData()})}handleEducationalOrganizationsSearch(){return this.startUnitSearch$.pipe((0,g.R)(this.destroy$),(0,mt.b)(500),(0,nt.b)(()=>{this.searchingLocation=!0,this.cdRef.detectChanges()}),(0,Be.w)(()=>this.applicationUtils.getEducationalOrganizations(this.application,this.languagesList)))}createECECRequiredOptions(){return[{value:!0,text:this.translate.instant("General.Yes")},{value:!1,text:this.translate.instant("General.No")}]}};let zl=pu;pu.\u0275fac=function(O){return new(O||pu)(n.Y36(w.sK),n.Y36(B.gz),n.Y36(B.F0),n.Y36(l.NotifyService),n.Y36(n.sBO),n.Y36(P.e8),n.Y36(w.sK),n.Y36(P.u7),n.Y36(l.OrganizationService),n.Y36(Mn.I),n.Y36(V.q),n.Y36(Y.p),n.Y36(Uo.qu),n.Y36(Dn.PeriodsService))},pu.\u0275cmp=n.Xpm({type:pu,selectors:[["sivi-ppe-application-enrolment-information"]],viewQuery:function(O,Ce){if(1&O&&(n.Gf(Dr,5),n.Gf(_s,5),n.Gf(ra,5)),2&O){let Je;n.iGM(Je=n.CRH())&&(Ce.ECECCare=Je.first),n.iGM(Je=n.CRH())&&(Ce.searchbar=Je.first),n.iGM(Je=n.CRH())&&(Ce.preferredPlaces=Je.first)}},inputs:{reviewMode:"reviewMode",application:"application"},outputs:{updateApplication:"updateApplication",componentStatus:"componentStatus"},features:[n.qOj],decls:53,vars:56,consts:[["siviLibForm","",1,"enrolment-info-container",3,"formGroup"],[1,"title"],[1,"content"],[1,"ion-no-padding","spaces"],[3,"municipalityId","applicationType","twoYearPPE","desiredStartDate","form","errorMessages","minimumStartDate","periods","title","titleInfo","reviewMode","changeDesiredDate"],[1,"currentECEC"],[4,"ngIf"],["size","12","size-md","5",1,"checkbox"],["name","inOtherMunicipality","label","Application.PPE.ECECPlace.Elsewhere",1,"checkbox",3,"viewMode","checked","update"],[3,"ngClass"],["formControlName","currentUnitInOtherMunicipality","siviLibFormControl","","type","text",3,"errorMessages","value","siviChange"],["class","warning-date ion-margin-bottom",4,"ngIf"],["size","12","size-sm","9","size-md","8","size-lg","7","size-xl","4",1,"ion-no-padding"],[4,"ngIf","ngIfElse"],["viewModeOff",""],["size","12","size-lg","6",1,"ion-no-padding"],["type","text",3,"viewMode","label","value",4,"ngIf","ngIfElse"],["languagesReviewModeOff",""],[1,"preferred-places","ion-no-padding"],[1,"preferred-places-header"],[3,"text"],[1,"ion-no-padding"],["size","12","size-lg","7","size-md","9",1,"ion-no-padding"],[1,"component-with-info-popup"],["name","preferredPlace",1,"ion-margin-bottom","component",3,"searchLabel","alwaysOpen","searchKeyword","siviChange","selectedResult"],["commonSearchbarComponent",""],["size","12",1,"checkbox"],["name","siblingsAtSameUnit","label","Child.Siblings.LivingInSameEarlyChildhoodAndCarePlace",3,"viewMode","checked","update"],["formControlName","additionalInformation","siviLibFormControl","","type","text","label-position","floating",3,"errorMessages","viewMode","value","label","siviChange"],["class","ion-no-padding","size","12","size-md","6",4,"ngIf"],["size","12","size-md","6",1,"ion-no-padding"],["name","currentUnit","placeholderImage","location_city",3,"selectableValues","viewMode","options","preventEmitingSameValue","selectionChange"],[1,"warning-date","ion-margin-bottom"],["name","warning"],[1,"pl1"],[1,"weight-600"],["name","childNeedsECEC",3,"options","value","siviChange"],[3,"application","desiredPeriod","viewMode","update","componentStatus","sortOrganizations"],["ececCare",""],["type","text",3,"viewMode","label","value"],["name","preferredLanguages",3,"label","options","value","verticalMode","siviChange"],[3,"minSelectableUnits","applicationPlaces","availablePlaces","loadingUnits","languages","twoYearPPE","applicationType","updateUnits"],["preferredPlaces",""]],template:function(O,Ce){if(1&O&&(n.TgZ(0,"div",0)(1,"div",1)(2,"h1"),n._uU(3),n.ALo(4,"translate"),n.qZA()(),n.TgZ(5,"div",2)(6,"ion-grid",3)(7,"sivi-application-desired-start-date",4),n.NdJ("changeDesiredDate",function(Vt){return Ce.onChangeDesiredStartDate(Vt)}),n.ALo(8,"translate"),n.ALo(9,"translate"),n.qZA(),n.TgZ(10,"ion-row")(11,"h2"),n._uU(12),n.ALo(13,"translate"),n.qZA()(),n.TgZ(14,"ion-row",5),n.YNc(15,xl,3,3,"ng-container",6),n.TgZ(16,"ion-col",7)(17,"sivi-lib-checkbox-toggle",8),n.NdJ("update",function(Vt){return Ce.onChangeApplicationInfos(Vt)}),n.qZA()(),n.TgZ(18,"ion-col",9)(19,"cgi-input",10),n.NdJ("siviChange",function(Vt){return Ce.onChangeApplicationInfos(Vt)}),n.qZA()()(),n.YNc(20,$l,5,3,"ion-row",11),n.TgZ(21,"ion-row")(22,"ion-col",12),n.YNc(23,Os,13,10,"ng-container",13),n.YNc(24,yu,9,9,"ng-template",null,14,n.W1O),n.qZA()(),n.YNc(26,Ks,3,4,"div",6),n.TgZ(27,"ion-row")(28,"ion-col",15),n.YNc(29,_l,2,5,"cgi-input",16),n.YNc(30,Dc,2,6,"ng-template",null,17,n.W1O),n.qZA()(),n.TgZ(32,"ion-grid",18)(33,"ion-row")(34,"h3",19),n._uU(35),n.ALo(36,"translate"),n._UZ(37,"sivi-lib-info-popup",20),n.qZA()(),n.TgZ(38,"ion-row",21)(39,"ion-col",22)(40,"p",23)(41,"sivi-lib-common-searchbar",24,25),n.NdJ("searchKeyword",function(Vt){return Ce.getCoordinates(Vt)})("siviChange",function(Vt){return Ce.onNearToAddressChange(Vt)})("selectedResult",function(Vt){return Ce.onSelectLocation(Vt)}),n.ALo(43,"translate"),n.qZA()()()(),n.YNc(44,Gs,4,7,"ion-row",6),n.TgZ(45,"ion-row")(46,"ion-col",26)(47,"sivi-lib-checkbox-toggle",27),n.NdJ("update",function(Vt){return Ce.onChangeApplicationInfos(Vt)}),n.qZA()()(),n.TgZ(48,"ion-row")(49,"ion-col",21)(50,"cgi-input",28),n.NdJ("siviChange",function(Vt){return Ce.onChangeApplicationInfos(Vt)}),n.ALo(51,"translate"),n.ALo(52,"translate"),n.qZA()()()()()()()),2&O){const Je=n.MAs(25),Vt=n.MAs(31);n.Q6J("formGroup",Ce.form),n.xp6(3),n.Oqu(n.lcZ(4,38,"Application.Summary.Preferences")),n.xp6(4),n.Q6J("municipalityId",Ce.application.municipalityId)("applicationType",Ce.applicationTypes.PPE)("twoYearPPE",Ce.application.twoYear)("desiredStartDate",Ce.application.desiredStartDate)("form",Ce.desiredStartDateForm)("errorMessages",Ce.errorMessageDesiredStartDate)("minimumStartDate",Ce.minimumStartDate)("periods",Ce.periods)("title",n.lcZ(8,40,"Application.PPE.DesiredStartDate"))("titleInfo",n.lcZ(9,42,"Application.PPE.DesiredStartDate.Info"))("reviewMode",Ce.reviewMode),n.xp6(5),n.hij(" ",n.lcZ(13,44,"Application.PPE.PlaceOnStartDate")," "),n.xp6(3),n.Q6J("ngIf",!Ce.application.inOtherMunicipality),n.xp6(2),n.Q6J("viewMode",Ce.viewMode)("checked",Ce.application.inOtherMunicipality),n.xp6(1),n.Q6J("ngClass",n.VKq(54,Ed,!Ce.application.inOtherMunicipality)),n.xp6(1),n.Q6J("errorMessages",Ce.errorMaxLength300Msg)("value",Ce.application.currentUnitInOtherMunicipality),n.xp6(1),n.Q6J("ngIf",Ce.ececPlaceAutomaticallyUpdated),n.xp6(3),n.Q6J("ngIf",Ce.viewMode||!Ce.checkCanChangeApplicationType())("ngIfElse",Je),n.xp6(3),n.Q6J("ngIf",Ce.application.type===Ce.applicationTypes.PPEWITHECEC),n.xp6(3),n.Q6J("ngIf",Ce.viewMode)("ngIfElse",Vt),n.xp6(6),n.hij("",n.lcZ(36,46,"Application.PreferredPlaces")," "),n.xp6(2),n.Q6J("text","Application.PreferredNearAddress.Info"),n.xp6(4),n.Q6J("searchLabel",n.lcZ(43,48,"Application.PPE.PreferredAddress"))("alwaysOpen",!0),n.xp6(3),n.Q6J("ngIf",!Ce.viewMode),n.xp6(3),n.Q6J("viewMode",Ce.viewMode)("checked",Ce.application.siblingsAtSameUnit),n.xp6(3),n.Q6J("errorMessages",Ce.errorMaxLength4000Msg)("viewMode",Ce.viewMode)("value",Ce.viewMode?Ce.application.additionalInformation||"-":Ce.application.additionalInformation)("label",n.lcZ(51,50,"Application.Enrolment.MoreInformation")),n.uIk("aria-label",n.lcZ(52,52,"Application.Enrolment.MoreInformation"))}},dependencies:[l.AutocompleteGroupSelectComponent,l.RadioListComponent,l.CheckboxToggleComponent,he.mk,he.O5,l.CheckboxListComponent,Dr,cc,l.InfoPopupComponent,ae.wI,ae.jY,ae.Nd,Uo.JJ,Uo.JL,os,l.CommonSearchbarComponent,l.SiviFormDirective,l.SiviFormControlDirective,Uo.sg,Uo.u,he.Ov,w.X$],styles:[".enrolment-info-container[_ngcontent-%COMP%]{padding:0 16px 10px}@media screen and (min-width: 600px){.enrolment-info-container[_ngcontent-%COMP%]{padding:0 40px 10px}}@media screen and (min-width: 840px){.enrolment-info-container[_ngcontent-%COMP%]{padding:0 80px 10px}}.preferred-places[_ngcontent-%COMP%]{margin-bottom:40px;padding-top:2em}.title[_ngcontent-%COMP%]{display:flex}.title[_ngcontent-%COMP%]   h1[_ngcontent-%COMP%]{color:var(--ion-color-secondary)}.title[_ngcontent-%COMP%]   sivi-lib-info-popup[_ngcontent-%COMP%]{font-size:26px}.preferred-places-header[_ngcontent-%COMP%]{margin-bottom:0}sivi-lib-info-popup[_ngcontent-%COMP%]{font-size:26px}.warning-date[_ngcontent-%COMP%]   cgi-icon[_ngcontent-%COMP%]{color:var(--ion-color-secondary)}.subtitle[_ngcontent-%COMP%]{color:var(--ion-color-primary);padding-top:1em;font-weight:600}"],data:{animation:[l.listAnimations]},changeDetection:0});const vl=["contentLoader"],fc=class extends l.SiviComponent{constructor(N,O,Ce){super(),this.translate=N,this.route=O,this.router=Ce,this.editBasicInformation=new n.vpe,this.componentStatus=new n.vpe,this.update=new n.vpe}onEditClicked(){this.editBasicInformation.emit()}onUpdateComponentStatus(N){this.componentStatus.emit(N)}updateEnrolmentInformation(N){this.update.emit(N)}};let Lc=fc;fc.\u0275fac=function(O){return new(O||fc)(n.Y36(w.sK),n.Y36(B.gz),n.Y36(B.F0))},fc.\u0275cmp=n.Xpm({type:fc,selectors:[["sivi-ppe-application-preferences"]],viewQuery:function(O,Ce){if(1&O&&n.Gf(vl,7),2&O){let Je;n.iGM(Je=n.CRH())&&(Ce.contentLoader=Je.first)}},inputs:{reviewMode:"reviewMode",application:"application"},outputs:{editBasicInformation:"editBasicInformation",componentStatus:"componentStatus",update:"update"},features:[n.qOj],decls:3,vars:4,consts:[[3,"application","reviewMode","clickEdit"],[3,"application","reviewMode","updateApplication","componentStatus"]],template:function(O,Ce){1&O&&(n.TgZ(0,"sivi-application-basic-information",0),n.NdJ("clickEdit",function(){return Ce.onEditClicked()}),n.qZA(),n.ynx(1),n.TgZ(2,"sivi-ppe-application-enrolment-information",1),n.NdJ("updateApplication",function(Vt){return Ce.updateEnrolmentInformation(Vt)})("componentStatus",function(Vt){return Ce.onUpdateComponentStatus(Vt)}),n.qZA(),n.BQk()),2&O&&(n.Q6J("application",Ce.application)("reviewMode",Ce.reviewMode),n.xp6(2),n.Q6J("application",Ce.application)("reviewMode",Ce.reviewMode))},dependencies:[ss,zl],encapsulation:2});const Xe=["contentLoader"],zt=["attachmentSelector"];function mn(Me,N){if(1&Me){const O=n.EpF();n.TgZ(0,"sivi-stepper-container",4),n.NdJ("editSavedApplication",function(){n.CHM(O);const Je=n.oxw(2);return n.KtG(Je.onEditSavedApplication())})("stateChange",function(Je){n.CHM(O);const Vt=n.oxw(2);return n.KtG(Vt.onChangeApplicationState(Je))})("selectStep",function(Je){n.CHM(O);const Vt=n.oxw(2);return n.KtG(Vt.onSelectStep(Je))}),n.qZA()}if(2&Me){const O=n.oxw(2);n.Q6J("application",O.application)("currentPage",O.currentPage)("reviewMode",O.reviewMode)("permits",O.permits)("steps",O.steps)}}function ni(Me,N){if(1&Me){const O=n.EpF();n.TgZ(0,"sivi-application-comments-and-notes",13),n.NdJ("postComment",function(Je){n.CHM(O);const Vt=n.oxw(3);return n.KtG(Vt.postComment(Je))})("postNote",function(Je){n.CHM(O);const Vt=n.oxw(3);return n.KtG(Vt.postNote(Je))})("deleteNote",function(Je){n.CHM(O);const Vt=n.oxw(3);return n.KtG(Vt.onDeleteNote(Je))}),n.ALo(1,"async"),n.qZA()}if(2&Me){const O=n.oxw(3);n.Q6J("userId",n.lcZ(1,6,O.userId))("comments",O.comments)("permits",O.permits)("notes",O.notes)("commentInputValue",O.commentInputValue)("noteInputValue",O.noteInputValue)}}function Fi(Me,N){if(1&Me&&n._UZ(0,"sivi-application-pdfs",14),2&Me){const O=n.oxw(3);n.Q6J("applicationId",O.application.id)}}function nr(Me,N){if(1&Me){const O=n.EpF();n.TgZ(0,"sivi-buttons-container",15),n.NdJ("sendApplication",function(){n.CHM(O);const Je=n.oxw(3);return n.KtG(Je.sendApplication())})("pageChange",function(Je){n.CHM(O);const Vt=n.oxw(3);return n.KtG(Vt.onPageChange(Je))}),n.qZA()}if(2&Me){const O=n.oxw(3);n.Q6J("page",O.currentPage)("application",O.application)("reviewMode",O.reviewMode)("isAbleToSave",O.isAbleToSave)("sending",O.sendingApplication)}}function zo(Me,N){if(1&Me){const O=n.EpF();n.ynx(0),n.TgZ(1,"sivi-lib-content-loader",null,5),n.YNc(3,ni,2,8,"sivi-application-comments-and-notes",6),n.TgZ(4,"sivi-ppe-application-preferences",7),n.NdJ("editBasicInformation",function(){n.CHM(O);const Je=n.oxw(2);return n.KtG(Je.onEditBasicInformation())})("update",function(Je){n.CHM(O);const Vt=n.oxw(2);return n.KtG(Vt.onEditApplication(Je))})("componentStatus",function(Je){n.CHM(O);const Vt=n.oxw(2);return n.KtG(Vt.onUpdateCompleteStatus(Je,0))}),n.qZA(),n.TgZ(5,"sivi-ppe-application-person-information",8),n.NdJ("update",function(Je){n.CHM(O);const Vt=n.oxw(2);return n.KtG(Vt.onEditApplication(Je))})("componentStatus",function(Je){n.CHM(O);const Vt=n.oxw(2);return n.KtG(Vt.onUpdateCompleteStatus(Je,1))}),n.qZA(),n._UZ(6,"sivi-application-summary",9),n.YNc(7,Fi,1,1,"sivi-application-pdfs",10),n._UZ(8,"sivi-application-confirmation",11),n.YNc(9,nr,1,5,"sivi-buttons-container",12),n.qZA(),n.BQk()}if(2&Me){const O=n.oxw(2);n.xp6(3),n.Q6J("ngIf",O.shouldShowComments()&&O.permits),n.xp6(1),n.Q6J("ngClass",O.hidePage(0))("reviewMode",O.reviewMode)("application",O.application),n.xp6(1),n.Q6J("ngClass",O.hidePage(1))("application",O.application)("reviewMode",O.reviewMode)("files",O.files),n.xp6(1),n.Q6J("application",O.application)("ngClass",O.hidePage(2))("files",O.files),n.xp6(1),n.Q6J("ngIf",O.shouldShowPdfs()),n.xp6(1),n.Q6J("confirmationTitle",O.confirmationTitle)("confirmationText",O.confirmation)("ngClass",O.hidePage(3)),n.xp6(1),n.Q6J("ngIf",3===O.currentPage||!O.shouldShowOnlySummary()&&!O.reviewMode)}}function oa(Me,N){if(1&Me&&(n.TgZ(0,"div"),n.YNc(1,mn,1,5,"sivi-stepper-container",3),n.YNc(2,zo,10,16,"ng-container",1),n.qZA()),2&Me){const O=n.oxw();n.xp6(1),n.Q6J("ngIf",O.permits),n.xp6(1),n.Q6J("ngIf",O.application)}}const Tu=class extends He{constructor(N,O,Ce,Je,Vt,Rr,wo,ua,Ls,Ws,tu,Sc){super(N,O,Ce,Je,Vt,Rr,wo,Ls,Ws,ua,tu,Sc),this.translate=N,this.notifyService=O,this.route=Ce,this.router=Je,this.auth=Vt,this.applicationService=Rr,this.messageTemplateRestService=wo,this.applicationUtils=ua,this.menuService=Ls,this.applicationStateChangeFacadeService=Ws,this.cdr=tu,this.modalCtrl=Sc,this.changeApplication=new n.vpe,this.files$=new X.X([]),this.destroy$=new ve.x,this.currentPage=0,this.steps=[{title:this.translate.instant("Preferences.Plural"),completed:!1},{title:this.translate.instant("Form.Label.Person.Information"),completed:!1},{title:this.translate.instant("Title.Summary"),completed:!1}]}ngOnInit(){super.ngOnInit(),this.getAllAttachments().pipe((0,Pe.B)(),(0,g.R)(this.destroy$)).subscribe(N=>{this.applicationUtils.attachments$.next(N)}),this.listenForAttachmentActions()}ngAfterViewInit(){super.setContentLoader(this.contentLoader)}onEditApplication(N){this.changeApplication.emit(N),super.onEditApplication(N)}listenForAttachmentActions(){this.applicationUtils.addFile$.pipe((0,g.R)(this.destroy$)).subscribe(N=>{this.documentPurpose=N,this.attachmentSelector.onSelectFile()}),this.applicationUtils.deleteFile$.pipe((0,g.R)(this.destroy$)).subscribe(N=>{this.deleteAttachment(N)})}getAllAttachments(){const N=this.uploadSelectorAttachments(),O=this.application.id?this.applicationService.getApplicationAttachments(this.application.id).pipe((0,T.q)(1),(0,xe.z)(Ce=>(0,ye.D)(Ce)),(0,xe.z)(Ce=>this.applicationService.handleDownloadAttachment(this.application.id,Ce))):(0,ge.of)([]);return(0,ne.T)(O,N,this.files$).pipe((0,de.R)((Ce,Je)=>{const Vt=Je.tempId?"tempId":"id";return l.Utils.patchCollectionBy(Ce,Je,Vt)},[]),(0,E.U)(Ce=>Ce.sort((Je,Vt)=>l.Utils.compareByDate(Je.createdDate,Vt.createdDate))),(0,E.U)(Ce=>Ce.filter(Je=>Je.restEntityState!==l.Constants.DELETED)))}uploadSelectorAttachments(){return this.attachmentSelector.files$.pipe((0,xe.z)(N=>(0,ye.D)(N)),(0,xe.z)(N=>this.applicationService.handleUploadAttachment(this.application.id,N,this.documentPurpose)))}deleteAttachment(N){const O=l.Utils.copyFile(N);O.isLoading=!0,O.locked=!0,this.files$.next([O]),this.applicationService.handleDeleteAttachment(this.application.id,N).pipe((0,T.q)(1),(0,re.K)(Ce=>{const Je=l.Utils.copyFile(O);return delete Je.isLoading,delete Je.locked,this.files$.next([Je]),(0,pe._)(Ce)})).subscribe(Ce=>{delete Ce.isLoading,delete Ce.locked,this.files$.next([Ce])})}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}};let Ca=Tu;Tu.\u0275fac=function(O){return new(O||Tu)(n.Y36(w.sK),n.Y36(l.NotifyService),n.Y36(B.gz),n.Y36(B.F0),n.Y36(P.e8),n.Y36(P.IX),n.Y36(l.MessageTemplateRestService),n.Y36(V.q),n.Y36(Ct.h),n.Y36(rn.B),n.Y36(n.sBO),n.Y36(l.SiviModalController))},Tu.\u0275cmp=n.Xpm({type:Tu,selectors:[["sivi-ppe-application"]],viewQuery:function(O,Ce){if(1&O&&(n.Gf(Xe,5),n.Gf(zt,7)),2&O){let Je;n.iGM(Je=n.CRH())&&(Ce.contentLoader=Je.first),n.iGM(Je=n.CRH())&&(Ce.attachmentSelector=Je.first)}},inputs:{application:"application"},outputs:{changeApplication:"changeApplication"},features:[n.qOj],decls:4,vars:1,consts:[["id","anchor"],[4,"ngIf"],["attachmentSelector",""],[3,"application","currentPage","reviewMode","permits","steps","editSavedApplication","stateChange","selectStep",4,"ngIf"],[3,"application","currentPage","reviewMode","permits","steps","editSavedApplication","stateChange","selectStep"],["contentLoader",""],[3,"userId","comments","permits","notes","commentInputValue","noteInputValue","postComment","postNote","deleteNote",4,"ngIf"],[3,"ngClass","reviewMode","application","editBasicInformation","update","componentStatus"],[3,"ngClass","application","reviewMode","files","update","componentStatus"],[3,"application","ngClass","files"],[3,"applicationId",4,"ngIf"],[3,"confirmationTitle","confirmationText","ngClass"],[3,"page","application","reviewMode","isAbleToSave","sending","sendApplication","pageChange",4,"ngIf"],[3,"userId","comments","permits","notes","commentInputValue","noteInputValue","postComment","postNote","deleteNote"],[3,"applicationId"],[3,"page","application","reviewMode","isAbleToSave","sending","sendApplication","pageChange"]],template:function(O,Ce){1&O&&(n._UZ(0,"div",0),n.YNc(1,oa,3,2,"div",1),n._UZ(2,"sivi-lib-attachment-selector",null,2)),2&O&&(n.xp6(1),n.Q6J("ngIf",Ce.application))},dependencies:[he.mk,he.O5,l.ContentLoaderComponent,st,cn,Oa,ur,$r,al,sp,l.AttachmentSelectorComponent,Lc,he.Ov],styles:[".container-hide[_ngcontent-%COMP%]{display:none!important;visibility:hidden}"]});const Ba=["applicationChildInfoComponent"],Is=["applicantEmployment"],ul=["spouseEmployment"],bu=["contentLoader"],Zd=["applicationGuardianInfoComponent"];function Qu(Me,N){if(1&Me){const O=n.EpF();n.TgZ(0,"div",11)(1,"h2"),n._uU(2),n.ALo(3,"translate"),n.qZA(),n.TgZ(4,"sivi-application-guardian-info",18,14),n.NdJ("update",function(Je){n.CHM(O);const Vt=n.oxw(2);return n.KtG(Vt.onUpdateGuardian(Je,1))}),n.qZA(),n.TgZ(6,"sivi-lib-employment-information",15,19),n.NdJ("valueChange",function(Je){n.CHM(O);const Vt=n.oxw(2);return n.KtG(Vt.onUpdateEmploymentInformation(Je,1))}),n.qZA()()}if(2&Me){const O=n.oxw(2);n.xp6(2),n.Oqu(n.lcZ(3,6,"Child.Guardian.Or.Spouse.Singular")),n.xp6(2),n.Q6J("guardian",O.guardians[1])("reviewMode",O.reviewMode)("prcData",!1)("secondaryGuardian",!0),n.xp6(2),n.Q6J("value",null==O.guardians[1]?null:O.guardians[1].personEmployment)}}function _t(Me,N){if(1&Me){const O=n.EpF();n.TgZ(0,"div",1)(1,"div",2)(2,"ion-row",3)(3,"h1"),n._uU(4),n.ALo(5,"translate"),n._UZ(6,"sivi-lib-info-popup",4),n.qZA()(),n.TgZ(7,"sivi-application-child-info",5,6),n.NdJ("update",function(Je){n.CHM(O);const Vt=n.oxw();return n.KtG(Vt.onUpdateApplication(Je))})("updateSpecialNeeds",function(Je){n.CHM(O);const Vt=n.oxw();return n.KtG(Vt.onUpdateSpecialNeeds(Je))}),n.qZA()(),n.TgZ(9,"div",7)(10,"div",8)(11,"div",9)(12,"ion-row",10)(13,"h1"),n._uU(14),n.ALo(15,"translate"),n._UZ(16,"sivi-lib-info-popup",4),n.qZA()()()(),n.TgZ(17,"div",11)(18,"div",12)(19,"h2"),n._uU(20),n.ALo(21,"translate"),n.qZA()(),n.TgZ(22,"sivi-application-guardian-info",13,14),n.NdJ("update",function(Je){n.CHM(O);const Vt=n.oxw();return n.KtG(Vt.onUpdateGuardian(Je,0))}),n.qZA(),n.TgZ(24,"sivi-lib-employment-information",15,16),n.NdJ("valueChange",function(Je){n.CHM(O);const Vt=n.oxw();return n.KtG(Vt.onUpdateEmploymentInformation(Je,0))}),n.qZA()(),n.YNc(26,Qu,8,8,"div",17),n.qZA()()}if(2&Me){const O=n.oxw();n.xp6(4),n.hij("",n.lcZ(5,15,"Child.BasicInfo")," "),n.xp6(2),n.s9C("text","Application.Child.Information.Info"),n.xp6(1),n.Q6J("applicationId",O.application.id)("child",O.application.child)("isSaved",O.application.state===O.savedConstant)("reviewMode",O.reviewMode)("specialNeeds",O.application.specialNeeds),n.xp6(7),n.hij("",n.lcZ(15,17,"Guardian.Information")," "),n.xp6(2),n.s9C("text","Application.Guardian.Information.Info"),n.xp6(4),n.Oqu(n.lcZ(21,19,"Child.Guardian.Singular")),n.xp6(2),n.Q6J("guardian",O.guardians[0])("reviewMode",O.reviewMode)("secondaryGuardian",!1),n.xp6(2),n.Q6J("value",null==O.guardians[0]?null:O.guardians[0].personEmployment),n.xp6(2),n.Q6J("ngIf",O.reviewMode&&O.guardians[1]||!O.reviewMode)}}const cp=class extends l.SiviComponent{set application(N){this.applicationInstance=N,this.child=N.child,this.guardians=N.guardians,this.checkValidity()}get application(){return this.applicationInstance}constructor(N,O,Ce,Je){super(),this.route=N,this.router=O,this.translate=Ce,this.applicationUtilsService=Je,this.update=new n.vpe,this.componentStatus=new n.vpe,this.applicationTypes=e.wW,this.savedConstant=e.gT.SAVED}ngOnInit(){this.child=this.application.child,this.guardians=this.application.guardians}onUpdateApplication(N){const O={...this.application,child:N};this.update.emit(O)}onUpdateGuardian(N,O){const Ce=this.application.guardians;Ce[O]={...Ce[O],...N};const Je={...this.application,guardians:Ce};this.update.emit(Je)}onUpdateEmploymentInformation(N,O){const Ce=N.map(Rr=>({...Rr,checked:!0})),Je=(0,Jn.Z)(this.application.guardians);Je[O]={...Je[O],personEmployment:Ce};const Vt={...this.application,guardians:Je};this.update.emit(Vt)}onUpdateSpecialNeeds(N){const O={...this.application,specialNeeds:{value:N.value,info:N.info}};this.update.emit(O)}checkValidity(){if(this.applicationGuardianInfoComponent&&this.applicationGuardianInfoComponent.first){const N=this.guardians[1];this.checkIsGuardianEmpty(N)?(this.removeSecondaryGuardian(),this.isValid=this.getValidityWhenSecondaryGuardianIsEmpty()):this.isValid=this.getValidityWhenSecondaryGuardianIsNotEmpty(),this.componentStatus.emit(this.isValid)}}getValidityWhenSecondaryGuardianIsNotEmpty(){const N=this.applicationGuardianInfoComponent.toArray().every(O=>O.formValid);return this.applicationChildInfoComponent.formValid&&this.applicantEmployment.isValid&&this.spouseEmployment.isValid&&N}getValidityWhenSecondaryGuardianIsEmpty(){return this.applicationChildInfoComponent.formValid&&this.applicationGuardianInfoComponent.first.formValid&&this.applicantEmployment.isValid}removeSecondaryGuardian(){const N=[...this.application.guardians];2===N.length&&(N.splice(1,1),this.update.emit({...this.application,guardians:N}))}checkIsGuardianEmpty(N){if(!N)return!0;const O=this.applicationUtilsService.checkGuardianIsEmpty(N),Ce=(0,ct.Z)(N?.personEmployment);return O&&Ce}};let q=cp;cp.\u0275fac=function(O){return new(O||cp)(n.Y36(B.gz),n.Y36(B.F0),n.Y36(w.sK),n.Y36(V.q))},cp.\u0275cmp=n.Xpm({type:cp,selectors:[["sivi-ecec-application-person-information"]],viewQuery:function(O,Ce){if(1&O&&(n.Gf(Ba,5),n.Gf(Is,5),n.Gf(ul,5),n.Gf(bu,7),n.Gf(Zd,5)),2&O){let Je;n.iGM(Je=n.CRH())&&(Ce.applicationChildInfoComponent=Je.first),n.iGM(Je=n.CRH())&&(Ce.applicantEmployment=Je.first),n.iGM(Je=n.CRH())&&(Ce.spouseEmployment=Je.first),n.iGM(Je=n.CRH())&&(Ce.contentLoader=Je.first),n.iGM(Je=n.CRH())&&(Ce.applicationGuardianInfoComponent=Je)}},inputs:{reviewMode:"reviewMode",application:"application",files:"files"},outputs:{update:"update",componentStatus:"componentStatus"},features:[n.qOj],decls:1,vars:1,consts:[["class","basic-container",4,"ngIf"],[1,"basic-container"],[1,"child-container"],[1,"information","title"],[3,"text"],[3,"applicationId","child","isSaved","reviewMode","specialNeeds","update","updateSpecialNeeds"],["applicationChildInfoComponent",""],[1,"guardian-container"],[1,"header-container","padding"],[1,"title"],[1,"information"],[1,"guardians"],[1,"subtitle"],[3,"guardian","reviewMode","secondaryGuardian","update"],["applicationGuardianInfoComponent",""],[3,"value","valueChange"],["applicantEmployment",""],["class","guardians",4,"ngIf"],[3,"guardian","reviewMode","prcData","secondaryGuardian","update"],["spouseEmployment",""]],template:function(O,Ce){1&O&&n.YNc(0,_t,27,21,"div",0),2&O&&n.Q6J("ngIf",Ce.application)},dependencies:[l.InfoPopupComponent,ae.Nd,he.O5,Ha,ia,l.EmploymentInformationComponent,w.X$],styles:[".basic-container[_ngcontent-%COMP%]{padding:0 16px 10px}@media screen and (min-width: 600px){.basic-container[_ngcontent-%COMP%]{padding:0 40px 10px}}@media screen and (min-width: 840px){.basic-container[_ngcontent-%COMP%]{padding:0 80px 10px}}.guardian-container[_ngcontent-%COMP%]{background-color:var(--ion-color-light);margin:0 -80px;padding:0 80px}.child-container[_ngcontent-%COMP%]{padding-bottom:50px}.guardians[_ngcontent-%COMP%]{padding-bottom:20px}.information[_ngcontent-%COMP%]{display:flex;align-items:flex-end}.title[_ngcontent-%COMP%]{display:flex}.title[_ngcontent-%COMP%]   h1[_ngcontent-%COMP%]{color:var(--ion-color-secondary)}.title[_ngcontent-%COMP%]   sivi-lib-info-popup[_ngcontent-%COMP%]{font-size:26px}@media screen and (max-width: 840px){.title[_ngcontent-%COMP%]   sivi-lib-info-popup[_ngcontent-%COMP%]{margin-left:10px}}.padding[_ngcontent-%COMP%]{padding-top:50px}"]});const W=["petsAtHome"],dt=["commonSearchbarComponent"],fn=["preferredPlaces"];function Ei(Me,N){if(1&Me){const O=n.EpF();n.TgZ(0,"ion-col",12)(1,"sivi-lib-autocomplete-group-select",24),n.NdJ("selectionChange",function(Je){n.CHM(O);const Vt=n.oxw(2);return n.KtG(Vt.onChangeCurrentEcecPlace(Je))}),n.qZA()()}if(2&Me){const O=N.ngIf,Ce=n.oxw(2);n.xp6(1),n.Q6J("selectableValues",Ce.autoCompleteSelectableValues)("viewMode",Ce.viewMode)("options",O)}}function Po(Me,N){if(1&Me&&(n.ynx(0),n.YNc(1,Ei,2,3,"ion-col",23),n.ALo(2,"async"),n.BQk()),2&Me){const O=n.oxw();n.xp6(1),n.Q6J("ngIf",n.lcZ(2,1,O.unitOptions$))}}function En(Me,N){if(1&Me&&(n.TgZ(0,"ion-col",18),n._UZ(1,"cgi-input",25),n.ALo(2,"translate"),n.ALo(3,"translate"),n.qZA()),2&Me){const O=n.oxw();n.xp6(1),n.Q6J("viewMode",O.viewMode)("label",n.lcZ(2,3,"Application.Child.ECEC.required"))("value",n.lcZ(3,5,O.application.childNeedsECEC?"General.Yes":"General.No"))}}function ls(Me,N){if(1&Me){const O=n.EpF();n.TgZ(0,"ion-col",26)(1,"sivi-lib-radio-list",27),n.NdJ("siviChange",function(Je){n.CHM(O);const Vt=n.oxw();return n.KtG(Vt.onChangeChildNeedsECEC(Je))}),n.ALo(2,"translate"),n.qZA()()}if(2&Me){const O=n.oxw();n.xp6(1),n.Q6J("label",n.lcZ(2,3,"Application.Child.ECEC.required"))("options",O.ececRequiredOptions)("value",O.application.childNeedsECEC)}}function Au(Me,N){if(1&Me&&(n._UZ(0,"cgi-input",25),n.ALo(1,"translate")),2&Me){const O=n.oxw();n.Q6J("viewMode",O.viewMode)("label",n.lcZ(1,3,"Application.ECEC.Language"))("value",O.viewMode?O.selectedLanguagesText||"-":O.selectedLanguagesText)}}function kc(Me,N){if(1&Me){const O=n.EpF();n.TgZ(0,"sivi-lib-checkbox-list",28),n.NdJ("siviChange",function(Je){n.CHM(O);const Vt=n.oxw();return n.KtG(Vt.onChangeApplicationInfos(Je))}),n.ALo(1,"translate"),n.qZA()}if(2&Me){const O=n.oxw();n.Q6J("label",n.lcZ(1,4,"Application.ECEC.Language"))("options",O.languages)("value",O.application.preferredLanguages)("verticalMode",!0)}}function cs(Me,N){if(1&Me){const O=n.EpF();n.TgZ(0,"ion-row",29)(1,"ion-col",30)(2,"p",31)(3,"sivi-lib-common-searchbar",32,33),n.NdJ("searchKeyword",function(Je){n.CHM(O);const Vt=n.oxw();return n.KtG(Vt.getCoordinates(Je))})("siviChange",function(Je){n.CHM(O);const Vt=n.oxw();return n.KtG(Vt.onNearToAddressChange(Je))})("selectedResult",function(Je){n.CHM(O);const Vt=n.oxw();return n.KtG(Vt.onSelectLocation(Je))}),n.ALo(5,"translate"),n.qZA()()()()}2&Me&&(n.xp6(3),n.Q6J("searchLabel",n.lcZ(5,2,"Application.ECEC.PreferredAddress"))("alwaysOpen",!0))}function wu(Me,N){if(1&Me){const O=n.EpF();n.TgZ(0,"ion-row")(1,"ion-col",18)(2,"sivi-preferred-places",34,35),n.NdJ("updateServiceForms",function(Je){n.CHM(O);const Vt=n.oxw();return n.KtG(Vt.onChangeServiceForm(Je))})("updateUnits",function(Je){n.CHM(O);const Vt=n.oxw();return n.KtG(Vt.onPlaceChosen(Je))}),n.qZA()()()}if(2&Me){const O=n.oxw();n.xp6(2),n.Q6J("applicationPlaces",O.application.selectedUnits)("availablePlaces",O.availableUnits)("loadingUnits",O.searchingLocation)("languages",O.languagesList)("applicationType",O.application.type)("serviceForms",O.application.serviceForms)("activeServiceForms",O.application.activeServiceForms)("minSelectableUnits",O.minSelectableUnits)}}function Iu(Me,N){if(1&Me&&(n.TgZ(0,"ion-col",18),n._UZ(1,"cgi-input",25),n.ALo(2,"translate"),n.qZA()),2&Me){const O=n.oxw(2);n.xp6(1),n.Q6J("viewMode",O.viewMode)("label",n.lcZ(2,3,"Form.Label.PetsAtHome"))("value",O.childPetInfoText)}}function sd(Me,N){if(1&Me){const O=n.EpF();n.TgZ(0,"ion-col",38)(1,"sivi-lib-radio-list-with-input",39,40),n.NdJ("update",function(Je){n.CHM(O);const Vt=n.oxw(2);return n.KtG(Vt.onChangePetsAtHome(Je))})("validityChange",function(Je){n.CHM(O);const Vt=n.oxw(2);return n.KtG(Vt.onPetsAtHomeStatusChange(Je))}),n.ALo(3,"translate"),n.ALo(4,"translate"),n.qZA()()}if(2&Me){const O=n.oxw(2);n.xp6(1),n.Q6J("additionalText",n.lcZ(3,5,"General.Text.PetsInfo.Instruction"))("textFieldLabel",n.lcZ(4,7,"Form.Label.WhatPets"))("textFieldEnabler",O.constants.YES)("inputValue",O.childPetInfoPayload)("options",O.yesOrNoOptions)}}function Cu(Me,N){if(1&Me&&(n.TgZ(0,"ion-row",36)(1,"h3"),n._uU(2),n.ALo(3,"translate"),n.qZA(),n._UZ(4,"sivi-lib-info-popup",16),n.YNc(5,Iu,3,5,"ion-col",10),n.YNc(6,sd,5,9,"ng-template",null,37,n.W1O),n.qZA()),2&Me){const O=n.MAs(7),Ce=n.oxw();n.xp6(2),n.hij("",n.lcZ(3,4,"Form.Label.PetsAtHome")," "),n.xp6(2),n.Q6J("text","Application.PetsAtHome.Info"),n.xp6(1),n.Q6J("ngIf",Ce.viewMode)("ngIfElse",O)}}const Ql=class extends l.SiviAbstractForm{set reviewMode(N){this.viewMode=N,this.startUnitSearch$.next()}set searchbar(N){N&&(this.commonSearchbarComponent=N,this.initPreferredLocation(),this.cdRef.detectChanges())}get selectedUnits(){return(0,le.Z)(this.application,"selectedUnits",[])}constructor(N,O,Ce,Je,Vt,Rr,wo,ua){super(N),this.translate=N,this.notify=O,this.cdRef=Ce,this.geoLocationService=Je,this.applicationService=Vt,this.applicationUtils=Rr,this.summaryUtils=wo,this.fb=ua,this.updateApplication=new n.vpe,this.componentStatus=new n.vpe,this.autoCompleteSelectableValues=1,this.unitOptions$=new X.X([]),this.ececRequiredOptions=[],this.showPetsAtHome=!1,this.showError=!1,this.selectedUnitsNeededForSort=2,this.searchingLocation=!1,this.constants=l.Constants,this.form=this.fb.group({additionalInformation:[]}),this.errorMaxLength4000Msg={maxlength:this.translate.instant("Form.Error.MaxLengthIsChactersCount",{count:l.MaxLength.MESSAGE_LENGTH_4000})},this.availableUnits=[],this.noEcecOption=this.applicationUtils.getNoEcecOption(),this.languages=this.applicationUtils.getLanguageSelectOptions(),this.applicationTypes=l.ApplicationTypes,this.startUnitSearch$=new ve.x}ngOnInit(){this.ececRequiredOptions=this.createECECRequiredOptions(),this.yesOrNoOptions=this.applicationUtils.getYesOrNoOptions(),this.getUnitsForApplication(this.application),this.initEnrolmentInformation(),this.setLanguagesText(this.application.preferredLanguages),this.getEducationalOrganizations(),this.initEducationalOrganizations(),this.getPetsAtHomeText(),this.setValidator(),this.updateForm(),this.minSelectableUnits=this.setMinimumSelectableUnits()}setMinimumSelectableUnits(){return this.application.mandatoryUnitsNumberFromSettings?this.application.mandatoryUnitsNumberAmount:l.Constants.APPLICATION_DEFAULT_MIN_PREFERRED_UNITS}initEnrolmentInformation(){this.application={...this.application,...this.applicationUtils.initEnrolmentInformation(this.application)},this.checkIfShowPetsAtHome()}getPetsAtHomeText(){this.childPetInfoText=this.application.petsAtHome?this.translate.instant("General.Yes")+", "+this.application.petsAtHome:this.translate.instant("General.No"),this.childPetInfoPayload={value:this.application.petsAtHome?"yes":"no",info:this.application.petsAtHome?this.application.petsAtHome:""}}initPreferredLocation(){if((0,ct.Z)(this.application.preferredLocation)){const O=(0,le.Z)(this.application,"guardians[0].address");O&&O.longitude&&O.latitude&&this.updatePreferredPlace(O)}const N=this.applicationUtils.getPreferredPlaceText(this.application.preferredLocation);this.commonSearchbarComponent.setValue(N)}onSelectLanguage(N){this.application={...this.application,preferredLanguages:N.detail.value}}initEducationalOrganizations(){this.applicationUtils.getLanguageOptions().pipe((0,T.q)(1)).subscribe(N=>{this.languagesList=N,this.startUnitSearch$.next()},N=>{console.error("getLanguageOptions failed",N)})}getUnitsForApplication(N){this.applicationService.findAllCurrentEcecDaycareplaces(N.municipalityId).pipe((0,T.q)(1),(0,E.U)(O=>this.getAutocompleteOptions(O)),(0,E.U)(O=>this.mapToAutoCompleteOptions(O))).subscribe(O=>{this.unitOptions$.next(O)})}onChangeChildNeedsECEC(N){delete this.application.careTimeTypes;const O=N.detail.value;this.application={...this.application,childNeedsECEC:O},this.application.child.needsECEC=O,this.setValidator(),this.updateApplication.emit(this.application),this.startUnitSearch$.next()}onChangeApplicationInfos(N){this.application={...this.application,[N.detail.name]:N.detail.value},this.checkForAdditionalActions(N),this.updateApplication.emit(this.application)}checkForAdditionalActions(N){switch(N.detail.name){case"preferredLanguages":this.setLanguagesText(N.detail.value),this.onUpdateSortParams();break;case"inOtherMunicipality":this.application.currentUnit=""}}onChangeCurrentEcecPlace(N){const O=N[0];this.application={...this.application,currentUnit:O?O.areaId:""},this.reorderUnitsForApplicationAfterSelection(this.application.currentUnit),this.updateApplication.emit(this.application)}reorderUnitsForApplicationAfterSelection(N){if(!N)return;let O=(0,Jn.Z)(this.unitOptions$.value);const Ce=O.findIndex(Je=>Je.value.areaId===N);0!==Ce&&(O=l.Utils.reorderArray(O,{from:Ce,to:0}),this.unitOptions$.next(O))}onChangePetsAtHome(N){this.application={...this.application,petsAtHome:"yes"===N.value?N.info:""},this.updateApplication.emit(this.application)}checkValidity(){const N=this.ECECCare.isValid&&this.checkPreferredPlacesValidity()&&this.isValid,O=this.petsAtHome?N&&this.petsAtHome.isValid:N;this.componentStatus.emit(O)}checkPreferredPlacesValidity(){if(!this.selectedUnits)return!1;const N=this.selectedUnits.length;return N>=this.minSelectableUnits&&N<=l.Constants.APPLICATION_DEFAULT_MAX_PREFERRED_UNITS}getCoordinates(N){this.geoLocationService.getGeoCoordinates(N).pipe((0,T.q)(1)).subscribe(O=>{this.setLocation(O)},O=>{console.error("getCoordinates failed",O),this.notify.alertFailedToLoadData()})}onNearToAddressChange(N){N.detail.value||(this.application={...this.application,preferredLocation:{}},this.updateApplication.emit(this.application))}setLocation(N){this.locations=N;const O=this.geoLocationService.getLocationsList(this.locations);this.commonSearchbarComponent.displayResults(O)}findEducationalOrganizations(N){this.updatePreferredPlace({longitude:N.longitude,latitude:N.latitude}),this.startUnitSearch$.next()}onPlaceChosen(N){this.application.selectedUnits=N,this.checkIfShowPetsAtHome(),this.updateApplication.emit(this.application),this.checkValidity()}onChangeServiceForm(N){const O=(0,Jn.Z)(this.application);O.serviceForms=N,this.updateApplication.emit(O)}sortPreferences(N){return N.sort((O,Ce)=>O.preferenceChoice-Ce.preferenceChoice)}setValidator(){this.form.get("additionalInformation").setValidators([l.SiviValidators.maxLength(l.MaxLength.MESSAGE_LENGTH_4000)])}updateForm(){const N=this.viewMode?this.application.additionalInformation||"-":this.application.additionalInformation;this.form.get("additionalInformation").patchValue(N)}onUpdateECECCare(N){this.application={...this.application,...N},this.applicationUtils.setSelectedCareTimeTypes(N.careTimeTypes),this.updateApplication.emit(this.application)}onECECCareStatusChange(N){this.petsAtHome?this.componentStatus.emit(N&&this.isValid&&this.petsAtHome.isValid&&this.checkPreferredPlacesValidity()):this.componentStatus.emit(N&&this.isValid&&this.checkPreferredPlacesValidity())}onPetsAtHomeStatusChange(N){this.componentStatus.emit(N&&this.isValid&&this.ECECCare.isValid&&this.checkPreferredPlacesValidity())}getPreferredEducationPlaces(){const N=[];return this.selectedUnits.forEach(O=>{O.id&&N.push(this.applicationUtils.getUnitFocusesTextWithBrackets(O,this.languagesList))}),N?N.join(", "):""}onUpdateSortParams(){this.startUnitSearch$.next(),this.updateApplication.emit(this.application)}onSelectLocation(N){this.searchingLocation=!0;const O=this.locations.find(Ce=>Ce.id===N);if(O&&O.latitude&&O.longitude){const Ce=O.label+", "+O.zip;this.commonSearchbarComponent.setValue(Ce),this.updatePreferredPlace({streetAddress:O.housenumber?O.street+" "+O.housenumber:O.street,zipcode:O.zip,postOffice:O.city,longitude:O.longitude,latitude:O.latitude}),this.findEducationalOrganizations({longitude:O.longitude,latitude:O.latitude})}}updatePreferredPlace(N){this.application.preferredLocation={...this.application.preferredLocation,...N},this.updateApplication.emit(this.application)}mapToAutoCompleteOptions(N){if(!N||!N.length)return[];this.summaryUtils.unitList$.next(N);const O=this.application.currentUnit,Ce=N.find(Je=>Je.value.areaId===O);if(O&&Ce&&N){const Je=N.findIndex(Vt=>Vt.value.areaId===O);l.Utils.reorderArray(N,{from:Je,to:0}),N=[...N,this.noEcecOption]}else this.application.currentUnit="",N=[this.noEcecOption,...N];return N}checkIfShowPetsAtHome(){this.showPetsAtHome=!1,this.application.selectedUnits&&(this.showPetsAtHome=this.application.selectedUnits.some(N=>N.organizationType===l.OrganizationTypes.DAYCAREPLACE_TYPE_FAMILY_DAYCARE)),this.showPetsAtHome||this.clearPetsAtHome()}getAutocompleteOptions(N){return N?N.map(O=>({element:{text:this.getTextFromUnit(O),additionalText:""},value:{areaId:O.id}})):[]}getTextFromUnit(N){return N.type===l.OrganizationTypes.DAYCAREPLACE_TYPE_FAMILY_DAYCARE?this.translate.instant(l.Constants.ANY_FDCP)+" ("+N.name+")":N.name}clearPetsAtHome(){this.onChangePetsAtHome({value:void 0,info:void 0})}setLanguagesText(N){this.selectedLanguagesText=this.applicationUtils.getLanguagesText(N)}createECECRequiredOptions(){return[{value:!0,text:this.translate.instant("General.Yes")},{value:!1,text:this.translate.instant("General.No")}]}getEducationalOrganizations(){this.handleEducationalOrganizationsSearch().subscribe(N=>{this.searchingLocation=!1,this.availableUnits=N,this.cdRef.detectChanges()},N=>{console.error("getEducationalOrganizations failed",N),this.searchingLocation=!1,this.notify.alertFailedToLoadData()})}handleEducationalOrganizationsSearch(){return this.startUnitSearch$.pipe((0,g.R)(this.destroy$),(0,mt.b)(500),(0,nt.b)(()=>{this.searchingLocation=!0,this.cdRef.detectChanges()}),(0,Be.w)(()=>this.applicationUtils.getEducationalOrganizations(this.application,this.languagesList)))}};let Gd=Ql;Ql.\u0275fac=function(O){return new(O||Ql)(n.Y36(w.sK),n.Y36(P.c),n.Y36(n.sBO),n.Y36(P.u7),n.Y36(P.IX),n.Y36(V.q),n.Y36(Y.p),n.Y36(Uo.qu))},Ql.\u0275cmp=n.Xpm({type:Ql,selectors:[["sivi-ecec-application-enrolment-information"]],viewQuery:function(O,Ce){if(1&O&&(n.Gf(Dr,7),n.Gf(W,5),n.Gf(dt,5),n.Gf(fn,5)),2&O){let Je;n.iGM(Je=n.CRH())&&(Ce.ECECCare=Je.first),n.iGM(Je=n.CRH())&&(Ce.petsAtHome=Je.first),n.iGM(Je=n.CRH())&&(Ce.searchbar=Je.first),n.iGM(Je=n.CRH())&&(Ce.preferredPlaces=Je.first)}},inputs:{reviewMode:"reviewMode",application:"application",desiredStartDate:"desiredStartDate",municipalityId:"municipalityId"},outputs:{updateApplication:"updateApplication",componentStatus:"componentStatus"},features:[n.qOj],decls:43,vars:34,consts:[["siviLibForm","",1,"enrolment-info-container",3,"formGroup"],[1,"title"],[1,"content"],[1,"ion-no-padding","spaces"],[3,"application","viewMode","startDateChange","update","componentStatus","sortOrganizations"],["ececCare",""],[1,"currentECEC"],[4,"ngIf"],[3,"siviGridCol"],["name","inOtherMunicipality","label","Application.InOtherMunicipality",3,"viewMode","checked","update"],["class","ion-no-padding",4,"ngIf","ngIfElse"],["childNeedsECECReviewModeOff",""],["siviGridCol","left",1,"ion-no-padding"],["type","text",3,"viewMode","label","value",4,"ngIf","ngIfElse"],["languagesReviewModeOff",""],[1,"geolocation","ion-no-padding"],[3,"text"],["class","preferred-place-row ion-no-padding",4,"ngIf"],[1,"ion-no-padding"],["size","12",1,"checkbox","ion-no-padding"],["name","siblingsAtSameUnit","label","Child.Siblings.LivingInSameEarlyChildhoodAndCarePlace",3,"viewMode","checked","update"],["class","ion-no-padding ion-margin-top",4,"ngIf"],["formControlName","additionalInformation","siviLibFormControl","","type","text","label-position","floating",3,"viewMode","label","errorMessages","siviChange"],["class","ion-no-padding","siviGridCol","left",4,"ngIf"],["name","currentUnit","placeholderImage","location_city",3,"selectableValues","viewMode","options","selectionChange"],["type","text",3,"viewMode","label","value"],["size","12","size-lg","6",1,"ion-no-padding"],["name","childNeedsECEC",3,"label","options","value","siviChange"],["name","preferredLanguages",3,"label","options","value","verticalMode","siviChange"],[1,"preferred-place-row","ion-no-padding"],["size","12",1,"ion-no-padding"],[1,"component-with-info-popup"],["name","preferredPlace",1,"ion-margin-bottom","component",3,"searchLabel","alwaysOpen","searchKeyword","siviChange","selectedResult"],["commonSearchbarComponent",""],[3,"applicationPlaces","availablePlaces","loadingUnits","languages","applicationType","serviceForms","activeServiceForms","minSelectableUnits","updateServiceForms","updateUnits"],["preferredPlaces",""],[1,"ion-no-padding","ion-margin-top"],["petsAtHomeModeOff",""],["size","12",1,"radio-list-with-input","ion-no-padding"],["name","petsAtHome",3,"additionalText","textFieldLabel","textFieldEnabler","inputValue","options","update","validityChange"],["petsAtHome",""]],template:function(O,Ce){if(1&O&&(n.TgZ(0,"div",0)(1,"div",1)(2,"h1"),n._uU(3),n.ALo(4,"translate"),n.qZA()(),n.TgZ(5,"div",2)(6,"ion-grid",3)(7,"sivi-ecec-care",4,5),n.NdJ("startDateChange",function(){return Ce.onUpdateSortParams()})("update",function(Vt){return Ce.onUpdateECECCare(Vt)})("componentStatus",function(Vt){return Ce.onECECCareStatusChange(Vt)})("sortOrganizations",function(){return Ce.onUpdateSortParams()}),n.qZA(),n.TgZ(9,"ion-row")(10,"h3"),n._uU(11),n.ALo(12,"translate"),n.qZA()(),n.TgZ(13,"ion-row",6),n.YNc(14,Po,3,3,"ng-container",7),n.TgZ(15,"ion-col",8)(16,"sivi-lib-checkbox-toggle",9),n.NdJ("update",function(Vt){return Ce.onChangeApplicationInfos(Vt)}),n.qZA()()(),n.TgZ(17,"ion-row"),n.YNc(18,En,4,7,"ion-col",10),n.YNc(19,ls,3,5,"ng-template",null,11,n.W1O),n.qZA(),n.TgZ(21,"ion-row")(22,"ion-col",12),n.YNc(23,Au,2,5,"cgi-input",13),n.YNc(24,kc,2,6,"ng-template",null,14,n.W1O),n.qZA()(),n.TgZ(26,"ion-grid",15)(27,"ion-row")(28,"h3"),n._uU(29),n.ALo(30,"translate"),n._UZ(31,"sivi-lib-info-popup",16),n.qZA()(),n.YNc(32,cs,6,4,"ion-row",17),n.YNc(33,wu,4,8,"ion-row",7),n.TgZ(34,"ion-row",18)(35,"ion-col",19)(36,"sivi-lib-checkbox-toggle",20),n.NdJ("update",function(Vt){return Ce.onChangeApplicationInfos(Vt)}),n.qZA()()(),n.YNc(37,Cu,8,6,"ion-row",21),n.TgZ(38,"ion-row",18)(39,"ion-col",18)(40,"cgi-input",22),n.NdJ("siviChange",function(Vt){return Ce.onChangeApplicationInfos(Vt)}),n.ALo(41,"translate"),n.ALo(42,"translate"),n.qZA()()()()()()()),2&O){const Je=n.MAs(20),Vt=n.MAs(25);n.Q6J("formGroup",Ce.form),n.xp6(3),n.Oqu(n.lcZ(4,24,"Application.Summary.ECECpreferences")),n.xp6(4),n.Q6J("application",Ce.application)("viewMode",Ce.viewMode),n.xp6(4),n.hij(" ",n.lcZ(12,26,"Application.ECEC.CurrentECECPlace")," "),n.xp6(3),n.Q6J("ngIf",!Ce.application.inOtherMunicipality),n.xp6(1),n.Q6J("siviGridCol",Ce.application.inOtherMunicipality?"left":"right"),n.xp6(1),n.Q6J("viewMode",Ce.viewMode)("checked",Ce.application.inOtherMunicipality),n.xp6(2),n.Q6J("ngIf",Ce.viewMode)("ngIfElse",Je),n.xp6(5),n.Q6J("ngIf",Ce.viewMode)("ngIfElse",Vt),n.xp6(6),n.hij("",n.lcZ(30,28,"Application.PreferredPlaces")," "),n.xp6(2),n.Q6J("text","Application.PreferredNearAddress.Info"),n.xp6(1),n.Q6J("ngIf",!Ce.viewMode),n.xp6(1),n.Q6J("ngIf",!Ce.viewMode),n.xp6(3),n.Q6J("viewMode",Ce.viewMode)("checked",Ce.application.siblingsAtSameUnit),n.xp6(1),n.Q6J("ngIf",Ce.showPetsAtHome),n.xp6(3),n.Q6J("viewMode",Ce.viewMode)("label",n.lcZ(41,30,"Application.Enrolment.MoreInformation"))("errorMessages",Ce.errorMaxLength4000Msg),n.uIk("aria-label",n.lcZ(42,32,"Application.Enrolment.MoreInformation"))}},dependencies:[l.AutocompleteGroupSelectComponent,l.RadioListWithInputComponent,he.O5,l.CommonSearchbarComponent,l.GridColDirective,l.CheckboxListComponent,Dr,l.InfoPopupComponent,ae.wI,ae.jY,ae.Nd,Uo.JJ,Uo.JL,l.CheckboxToggleComponent,os,l.SiviFormDirective,l.SiviFormControlDirective,Uo.sg,Uo.u,he.Ov,w.X$],styles:[".enrolment-info-container[_ngcontent-%COMP%]{padding:0 16px 10px}@media screen and (min-width: 600px){.enrolment-info-container[_ngcontent-%COMP%]{padding:0 40px 10px}}@media screen and (min-width: 840px){.enrolment-info-container[_ngcontent-%COMP%]{padding:0 80px 10px}}.geolocation[_ngcontent-%COMP%]{margin-bottom:40px;padding-top:2em}.title[_ngcontent-%COMP%]{display:flex}.title[_ngcontent-%COMP%]   h1[_ngcontent-%COMP%]{color:var(--ion-color-secondary)}.title[_ngcontent-%COMP%]   sivi-lib-info-popup[_ngcontent-%COMP%]{margin-top:auto;margin-left:10px;font-size:26px}.preferred-place-row[_ngcontent-%COMP%]{padding-top:0!important}sivi-lib-info-popup[_ngcontent-%COMP%]{font-size:26px}ion-grid[_ngcontent-%COMP%]   ion-row[_ngcontent-%COMP%]:not(:first-child){padding-top:2rem}.checkbox[_ngcontent-%COMP%]{display:flex;margin-left:5px}.currentECEC[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center}.progress-bar-fill[_ngcontent-%COMP%]{height:6px}.subtitle[_ngcontent-%COMP%]{color:var(--ion-color-primary);font-weight:600}.component-with-info-popup[_ngcontent-%COMP%]{margin-top:0}"]});const Rd=["contentLoader"],Tm=class extends l.SiviComponent{constructor(N,O,Ce){super(),this.translate=N,this.route=O,this.router=Ce,this.editBasicInformation=new n.vpe,this.componentStatus=new n.vpe,this.update=new n.vpe}onEditClicked(){this.editBasicInformation.emit()}onUpdateComponentStatus(N){this.componentStatus.emit(N)}updateEnrolmentInformation(N){this.update.emit(N)}};let Bu=Tm;Tm.\u0275fac=function(O){return new(O||Tm)(n.Y36(w.sK),n.Y36(B.gz),n.Y36(B.F0))},Tm.\u0275cmp=n.Xpm({type:Tm,selectors:[["sivi-ecec-application-preferences"]],viewQuery:function(O,Ce){if(1&O&&n.Gf(Rd,7),2&O){let Je;n.iGM(Je=n.CRH())&&(Ce.contentLoader=Je.first)}},inputs:{application:"application",reviewMode:"reviewMode"},outputs:{editBasicInformation:"editBasicInformation",componentStatus:"componentStatus",update:"update"},features:[n.qOj],decls:3,vars:6,consts:[[3,"application","reviewMode","clickEdit"],[3,"application","desiredStartDate","municipalityId","reviewMode","updateApplication","componentStatus"]],template:function(O,Ce){1&O&&(n.TgZ(0,"sivi-application-basic-information",0),n.NdJ("clickEdit",function(){return Ce.onEditClicked()}),n.qZA(),n.ynx(1),n.TgZ(2,"sivi-ecec-application-enrolment-information",1),n.NdJ("updateApplication",function(Vt){return Ce.updateEnrolmentInformation(Vt)})("componentStatus",function(Vt){return Ce.onUpdateComponentStatus(Vt)}),n.qZA(),n.BQk()),2&O&&(n.Q6J("application",Ce.application)("reviewMode",Ce.reviewMode),n.xp6(2),n.Q6J("application",Ce.application)("desiredStartDate",null==Ce.application?null:Ce.application.desiredStartDate)("municipalityId",Ce.application.municipalityId)("reviewMode",Ce.reviewMode))},dependencies:[ss,Gd],encapsulation:2,changeDetection:0});const Wf=["contentLoader"],vc=["attachmentSelector"];function Rc(Me,N){if(1&Me){const O=n.EpF();n.TgZ(0,"sivi-stepper-container",4),n.NdJ("stateChange",function(Je){n.CHM(O);const Vt=n.oxw(2);return n.KtG(Vt.onChangeApplicationState(Je))})("editSavedApplication",function(){n.CHM(O);const Je=n.oxw(2);return n.KtG(Je.onEditSavedApplication())})("selectStep",function(Je){n.CHM(O);const Vt=n.oxw(2);return n.KtG(Vt.onSelectStep(Je))}),n.qZA()}if(2&Me){const O=n.oxw(2);n.Q6J("application",O.application)("currentPage",O.currentPage)("reviewMode",O.reviewMode)("permits",O.permits)("steps",O.steps)}}function Go(Me,N){if(1&Me){const O=n.EpF();n.TgZ(0,"sivi-application-comments-and-notes",13),n.NdJ("postComment",function(Je){n.CHM(O);const Vt=n.oxw(3);return n.KtG(Vt.postComment(Je))})("postNote",function(Je){n.CHM(O);const Vt=n.oxw(3);return n.KtG(Vt.postNote(Je))})("deleteNote",function(Je){n.CHM(O);const Vt=n.oxw(3);return n.KtG(Vt.onDeleteNote(Je))}),n.ALo(1,"async"),n.qZA()}if(2&Me){const O=n.oxw(3);n.Q6J("userId",n.lcZ(1,6,O.userId))("comments",O.comments)("permits",O.permits)("notes",O.notes)("commentInputValue",O.commentInputValue)("noteInputValue",O.noteInputValue)}}function Md(Me,N){if(1&Me&&n._UZ(0,"sivi-application-pdfs",14),2&Me){const O=n.oxw(3);n.Q6J("applicationId",O.application.id)}}function Mm(Me,N){if(1&Me){const O=n.EpF();n.TgZ(0,"sivi-buttons-container",15),n.NdJ("sendApplication",function(){n.CHM(O);const Je=n.oxw(3);return n.KtG(Je.sendApplication())})("pageChange",function(Je){n.CHM(O);const Vt=n.oxw(3);return n.KtG(Vt.onPageChange(Je))}),n.qZA()}if(2&Me){const O=n.oxw(3);n.Q6J("page",O.currentPage)("application",O.application)("reviewMode",O.reviewMode)("isAbleToSave",O.isAbleToSave)("sending",O.sendingApplication)}}function am(Me,N){if(1&Me){const O=n.EpF();n.ynx(0),n.TgZ(1,"sivi-lib-content-loader",null,5),n.YNc(3,Go,2,8,"sivi-application-comments-and-notes",6),n.TgZ(4,"sivi-ecec-application-preferences",7),n.NdJ("editBasicInformation",function(){n.CHM(O);const Je=n.oxw(2);return n.KtG(Je.onEditBasicInformation())})("update",function(Je){n.CHM(O);const Vt=n.oxw(2);return n.KtG(Vt.onEditApplication(Je))})("componentStatus",function(Je){n.CHM(O);const Vt=n.oxw(2);return n.KtG(Vt.onUpdateCompleteStatus(Je,0))}),n.qZA(),n.TgZ(5,"sivi-ecec-application-person-information",8),n.NdJ("update",function(Je){n.CHM(O);const Vt=n.oxw(2);return n.KtG(Vt.onEditApplication(Je))})("componentStatus",function(Je){n.CHM(O);const Vt=n.oxw(2);return n.KtG(Vt.onUpdateCompleteStatus(Je,1))}),n.qZA(),n._UZ(6,"sivi-application-summary",9),n.YNc(7,Md,1,1,"sivi-application-pdfs",10),n._UZ(8,"sivi-application-confirmation",11),n.YNc(9,Mm,1,5,"sivi-buttons-container",12),n.qZA(),n.BQk()}if(2&Me){const O=n.oxw(2);n.xp6(3),n.Q6J("ngIf",O.shouldShowComments()&&O.permits),n.xp6(1),n.Q6J("application",O.application)("ngClass",O.hidePage(0))("reviewMode",O.reviewMode),n.xp6(1),n.Q6J("ngClass",O.hidePage(1))("application",O.application)("reviewMode",O.reviewMode),n.xp6(1),n.Q6J("application",O.application)("ngClass",O.hidePage(2)),n.xp6(1),n.Q6J("ngIf",O.shouldShowPdfs()),n.xp6(1),n.Q6J("confirmationTitle",O.confirmationTitle)("confirmationText",O.confirmation)("ngClass",O.hidePage(3)),n.xp6(1),n.Q6J("ngIf",3===O.currentPage||!O.shouldShowOnlySummary()&&!O.reviewMode)}}function Ef(Me,N){if(1&Me&&(n.TgZ(0,"div"),n.YNc(1,Rc,1,5,"sivi-stepper-container",3),n.YNc(2,am,10,14,"ng-container",1),n.qZA()),2&Me){const O=n.oxw();n.xp6(1),n.Q6J("ngIf",O.permits),n.xp6(1),n.Q6J("ngIf",O.application)}}const Ro=class extends He{constructor(N,O,Ce,Je,Vt,Rr,wo,ua,Ls,Ws,tu,Sc){super(N,O,Ce,Je,Vt,ua,Rr,Ls,Ws,wo,tu,Sc),this.translate=N,this.notifyService=O,this.route=Ce,this.router=Je,this.auth=Vt,this.messageTemplateRestService=Rr,this.applicationUtils=wo,this.applicationService=ua,this.menuService=Ls,this.applicationStateChangeFacadeService=Ws,this.cdr=tu,this.modalCtrl=Sc,this.changeApplication=new n.vpe,this.files$=new X.X([]),this.destroy$=new ve.x,this.currentPage=0,this.steps=[{title:this.translate.instant("Preferences.Plural"),completed:!1},{title:this.translate.instant("Form.Label.Person.Information"),completed:!1},{title:this.translate.instant("Title.Summary"),completed:!1}]}ngOnInit(){super.ngOnInit(),this.getAllAttachments().pipe((0,Pe.B)(),(0,g.R)(this.destroy$)).subscribe(N=>{this.applicationUtils.attachments$.next(N)}),this.listenForAttachmentActions()}ngAfterViewInit(){super.setContentLoader(this.contentLoader)}onEditApplication(N){this.changeApplication.emit(N),super.onEditApplication(N)}listenForAttachmentActions(){this.applicationUtils.addFile$.pipe((0,g.R)(this.destroy$)).subscribe(N=>{this.documentPurpose=N,this.attachmentSelector.onSelectFile()}),this.applicationUtils.deleteFile$.pipe((0,g.R)(this.destroy$)).subscribe(N=>{this.deleteAttachment(N)})}getAllAttachments(){const N=this.uploadSelectorAttachments(),O=this.application.id?this.applicationService.getApplicationAttachments(this.application.id).pipe((0,T.q)(1),(0,xe.z)(Ce=>(0,ye.D)(Ce)),(0,xe.z)(Ce=>this.applicationService.handleDownloadAttachment(this.application.id,Ce))):(0,ge.of)([]);return(0,ne.T)(O,N,this.files$).pipe((0,de.R)((Ce,Je)=>{const Vt=Je.tempId?"tempId":"id";return l.Utils.patchCollectionBy(Ce,Je,Vt)},[]),(0,E.U)(Ce=>Ce.sort((Je,Vt)=>l.Utils.compareByDate(Je.createdDate,Vt.createdDate))),(0,E.U)(Ce=>Ce.filter(Je=>Je.restEntityState!==l.Constants.DELETED)))}uploadSelectorAttachments(){return this.attachmentSelector.files$.pipe((0,xe.z)(N=>(0,ye.D)(N)),(0,xe.z)(N=>this.applicationService.handleUploadAttachment(this.application.id,N,this.documentPurpose)))}deleteAttachment(N){const O=l.Utils.copyFile(N);O.isLoading=!0,O.locked=!0,this.files$.next([O]),this.applicationService.handleDeleteAttachment(this.application.id,N).pipe((0,T.q)(1),(0,re.K)(Ce=>{const Je=l.Utils.copyFile(O);return delete Je.isLoading,delete Je.locked,this.files$.next([Je]),(0,pe._)(Ce)})).subscribe(Ce=>{delete Ce.isLoading,delete Ce.locked,this.files$.next([Ce])})}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}};let Xc=Ro;Ro.\u0275fac=function(O){return new(O||Ro)(n.Y36(w.sK),n.Y36(l.NotifyService),n.Y36(B.gz),n.Y36(B.F0),n.Y36(P.e8),n.Y36(l.MessageTemplateRestService),n.Y36(V.q),n.Y36(P.IX),n.Y36(Ct.h),n.Y36(rn.B),n.Y36(n.sBO),n.Y36(l.SiviModalController))},Ro.\u0275cmp=n.Xpm({type:Ro,selectors:[["sivi-ecec-application"]],viewQuery:function(O,Ce){if(1&O&&(n.Gf(Wf,5),n.Gf(vc,7)),2&O){let Je;n.iGM(Je=n.CRH())&&(Ce.contentLoader=Je.first),n.iGM(Je=n.CRH())&&(Ce.attachmentSelector=Je.first)}},inputs:{application:"application"},outputs:{changeApplication:"changeApplication"},features:[n.qOj],decls:4,vars:1,consts:[["id","anchor"],[4,"ngIf"],["attachmentSelector",""],[3,"application","currentPage","reviewMode","permits","steps","stateChange","editSavedApplication","selectStep",4,"ngIf"],[3,"application","currentPage","reviewMode","permits","steps","stateChange","editSavedApplication","selectStep"],["contentLoader",""],[3,"userId","comments","permits","notes","commentInputValue","noteInputValue","postComment","postNote","deleteNote",4,"ngIf"],[3,"application","ngClass","reviewMode","editBasicInformation","update","componentStatus"],[3,"ngClass","application","reviewMode","update","componentStatus"],[3,"application","ngClass"],[3,"applicationId",4,"ngIf"],[3,"confirmationTitle","confirmationText","ngClass"],[3,"page","application","reviewMode","isAbleToSave","sending","sendApplication","pageChange",4,"ngIf"],[3,"userId","comments","permits","notes","commentInputValue","noteInputValue","postComment","postNote","deleteNote"],[3,"applicationId"],[3,"page","application","reviewMode","isAbleToSave","sending","sendApplication","pageChange"]],template:function(O,Ce){1&O&&(n._UZ(0,"div",0),n.YNc(1,Ef,3,2,"div",1),n._UZ(2,"sivi-lib-attachment-selector",null,2)),2&O&&(n.xp6(1),n.Q6J("ngIf",Ce.application))},dependencies:[he.mk,he.O5,l.ContentLoaderComponent,st,cn,Oa,ur,$r,al,q,l.AttachmentSelectorComponent,Bu,he.Ov],styles:[".container-hide[_ngcontent-%COMP%]{display:none!important;visibility:hidden}"]});const yc=["applicationChildInfoComponent"],Eu=["contentLoader"],Mu=["applicationGuardianInfoComponent"];function ws(Me,N){if(1&Me){const O=n.EpF();n.TgZ(0,"div",11)(1,"h2"),n._uU(2),n.ALo(3,"translate"),n.qZA(),n.TgZ(4,"sivi-application-guardian-info",16,14),n.NdJ("update",function(Je){n.CHM(O);const Vt=n.oxw(2);return n.KtG(Vt.onUpdateGuardian(Je,1))}),n.qZA()()}if(2&Me){const O=n.oxw(2);n.xp6(2),n.Oqu(n.lcZ(3,5,"Child.Guardian.Or.Spouse.Singular")),n.xp6(2),n.Q6J("guardian",O.guardians[1])("reviewMode",O.reviewMode)("prcData",!1)("secondaryGuardian",!0)}}function Ll(Me,N){if(1&Me){const O=n.EpF();n.TgZ(0,"div",1)(1,"div",2)(2,"ion-row",3)(3,"h1"),n._uU(4),n.ALo(5,"translate"),n._UZ(6,"sivi-lib-info-popup",4),n.qZA()(),n.TgZ(7,"sivi-application-child-info",5,6),n.NdJ("update",function(Je){n.CHM(O);const Vt=n.oxw();return n.KtG(Vt.onUpdateApplication(Je))})("updateSpecialNeeds",function(Je){n.CHM(O);const Vt=n.oxw();return n.KtG(Vt.onUpdateSpecialNeeds(Je))}),n.qZA()(),n.TgZ(9,"div",7)(10,"div",8)(11,"div",9)(12,"ion-row",10)(13,"h1"),n._uU(14),n.ALo(15,"translate"),n._UZ(16,"sivi-lib-info-popup",4),n.qZA()()()(),n.TgZ(17,"div",11)(18,"div",12)(19,"h2"),n._uU(20),n.ALo(21,"translate"),n.qZA()(),n.TgZ(22,"sivi-application-guardian-info",13,14),n.NdJ("update",function(Je){n.CHM(O);const Vt=n.oxw();return n.KtG(Vt.onUpdateGuardian(Je,0))}),n.qZA()(),n.YNc(24,ws,6,7,"div",15),n.qZA()()}if(2&Me){const O=n.oxw();n.xp6(4),n.hij("",n.lcZ(5,13,"Child.BasicInfo")," "),n.xp6(2),n.s9C("text","Application.Child.Information.Info"),n.xp6(1),n.Q6J("applicationId",O.application.id)("child",O.application.child)("reviewMode",O.reviewMode)("specialNeeds",O.application.specialNeeds),n.xp6(7),n.hij("",n.lcZ(15,15,"Guardian.Information")," "),n.xp6(2),n.s9C("text","Application.Guardian.Information.Info"),n.xp6(4),n.Oqu(n.lcZ(21,17,"Child.Guardian.Singular")),n.xp6(2),n.Q6J("guardian",O.guardians[0])("reviewMode",O.reviewMode)("secondaryGuardian",!1),n.xp6(2),n.Q6J("ngIf",O.reviewMode&&O.guardians[1]||!O.reviewMode)}}const Fo=class extends l.SiviComponent{set application(N){this.applicationInstance=N,this.child=N.child,this.guardians=N.guardians,this.checkValidity()}get application(){return this.applicationInstance}constructor(N,O,Ce,Je){super(),this.route=N,this.router=O,this.translate=Ce,this.applicationUtilsService=Je,this.update=new n.vpe,this.componentStatus=new n.vpe,this.addAttachment=new n.vpe,this.deleteAttachment=new n.vpe}ngOnInit(){this.child=this.application.child,this.guardians=this.application.guardians}onUpdateApplication(N){const O={...this.application,child:N};this.update.emit(O)}onUpdateGuardian(N,O){const Ce=this.application.guardians;Ce[O]={...Ce[O],...N};const Je={...this.application,guardians:Ce};this.update.emit(Je)}onUpdateSpecialNeeds(N){const O={...this.application,specialNeeds:{value:N.value,info:N.info}};this.update.emit(O)}checkValidity(){if(this.applicationGuardianInfoComponent){const N=this.guardians[1];this.applicationUtilsService.checkGuardianIsEmpty(N)?(this.removeSecondaryGuardian(),this.isValid=this.getValidityWhenSecondaryGuardianIsEmpty()):this.isValid=this.getValidityWhenSecondaryGuardianIsNotEmpty(),this.componentStatus.emit(this.isValid)}}getValidityWhenSecondaryGuardianIsNotEmpty(){const N=this.applicationGuardianInfoComponent.toArray().every(O=>O.formValid);return this.applicationChildInfoComponent.formValid&&N}getValidityWhenSecondaryGuardianIsEmpty(){return this.applicationChildInfoComponent.formValid&&this.applicationGuardianInfoComponent.first.formValid}removeSecondaryGuardian(){const N=[...this.application.guardians];2===N.length&&(N.splice(1,1),this.update.emit({...this.application,guardians:N}))}onAddAttachment(){this.addAttachment.emit()}onDeleteAttachment(N){this.deleteAttachment.emit(N)}};let Vc=Fo;Fo.\u0275fac=function(O){return new(O||Fo)(n.Y36(B.gz),n.Y36(B.F0),n.Y36(w.sK),n.Y36(V.q))},Fo.\u0275cmp=n.Xpm({type:Fo,selectors:[["sivi-club-application-person-information"]],viewQuery:function(O,Ce){if(1&O&&(n.Gf(yc,5),n.Gf(Eu,7),n.Gf(Mu,5)),2&O){let Je;n.iGM(Je=n.CRH())&&(Ce.applicationChildInfoComponent=Je.first),n.iGM(Je=n.CRH())&&(Ce.contentLoader=Je.first),n.iGM(Je=n.CRH())&&(Ce.applicationGuardianInfoComponent=Je)}},inputs:{reviewMode:"reviewMode",application:"application",files:"files"},outputs:{update:"update",componentStatus:"componentStatus",addAttachment:"addAttachment",deleteAttachment:"deleteAttachment"},features:[n.qOj],decls:1,vars:1,consts:[["class","basic-container",4,"ngIf"],[1,"basic-container"],[1,"child-container"],[1,"information","title"],[3,"text"],[3,"applicationId","child","reviewMode","specialNeeds","update","updateSpecialNeeds"],["applicationChildInfoComponent",""],[1,"guardian-container"],[1,"header-container","padding"],[1,"title"],[1,"information"],[1,"guardians"],[1,"subtitle"],[3,"guardian","reviewMode","secondaryGuardian","update"],["applicationGuardianInfoComponent",""],["class","guardians",4,"ngIf"],[3,"guardian","reviewMode","prcData","secondaryGuardian","update"]],template:function(O,Ce){1&O&&n.YNc(0,Ll,25,19,"div",0),2&O&&n.Q6J("ngIf",Ce.application)},dependencies:[l.InfoPopupComponent,ae.Nd,he.O5,Ha,ia,w.X$],styles:[".basic-container[_ngcontent-%COMP%]{padding:0 16px 10px}@media screen and (min-width: 600px){.basic-container[_ngcontent-%COMP%]{padding:0 40px 10px}}@media screen and (min-width: 840px){.basic-container[_ngcontent-%COMP%]{padding:0 80px 10px}}.guardian-container[_ngcontent-%COMP%]{background-color:var(--ion-color-light);margin:0 -80px;padding:0 80px}.child-container[_ngcontent-%COMP%]{padding-bottom:50px}.guardians[_ngcontent-%COMP%]{padding-bottom:20px}.information[_ngcontent-%COMP%]{display:flex;align-items:flex-end}.title[_ngcontent-%COMP%]{display:flex}.title[_ngcontent-%COMP%]   h1[_ngcontent-%COMP%]{color:var(--ion-color-secondary)}.title[_ngcontent-%COMP%]   sivi-lib-info-popup[_ngcontent-%COMP%]{font-size:26px}@media screen and (max-width: 840px){.title[_ngcontent-%COMP%]   sivi-lib-info-popup[_ngcontent-%COMP%]{margin-left:10px}}.padding[_ngcontent-%COMP%]{padding-top:50px}"]});const Lo=["commonSearchbarComponent"];function Uu(Me,N){if(1&Me&&(n._UZ(0,"cgi-input",20),n.ALo(1,"translate")),2&Me){const O=n.oxw();n.Q6J("viewMode",O.viewMode)("label",n.lcZ(1,3,"Application.Club.Language"))("value",O.viewMode?O.selectedLanguagesText||"-":O.selectedLanguagesText)}}function et(Me,N){if(1&Me){const O=n.EpF();n.TgZ(0,"sivi-lib-checkbox-list",21),n.NdJ("siviChange",function(Je){n.CHM(O);const Vt=n.oxw();return n.KtG(Vt.onChangeApplicationInfos(Je))}),n.ALo(1,"translate"),n.qZA()}if(2&Me){const O=n.oxw();n.Q6J("label",n.lcZ(1,4,"Application.Club.Language"))("options",O.languages)("value",O.application.preferredLanguages)("verticalMode",!0)}}function Ae(Me,N){if(1&Me){const O=n.EpF();n.TgZ(0,"ion-row")(1,"ion-col",11)(2,"sivi-preferred-places",22,23),n.NdJ("updateUnits",function(Je){n.CHM(O);const Vt=n.oxw();return n.KtG(Vt.onPlaceChosen(Je))}),n.qZA()()()}if(2&Me){const O=n.oxw();n.xp6(2),n.Q6J("applicationPlaces",O.application.selectedUnits)("availablePlaces",O.availableUnits)("loadingUnits",O.searchingLocation)("languages",O.languagesList)("applicationType",O.application.type)("minSelectableUnits",O.minSelectableUnits)}}const vs=class extends l.SiviAbstractForm{set reviewMode(N){this.viewMode=N,this.updateValues(),this.setValidators(),this.startUnitSearch$.next()}set searchbar(N){N&&(this.commonSearchbarComponent=N,this.initPreferredLocation(),this.cdRef.detectChanges())}get selectedUnits(){return(0,le.Z)(this.application,"selectedUnits",[])}get desiredStartDate(){return(0,le.Z)(this.application,"desiredStartDate","")}constructor(N,O,Ce,Je,Vt,Rr,wo,ua,Ls,Ws,tu,Sc){super(Rr),this.translate=N,this.route=O,this.router=Ce,this.notify=Je,this.cdRef=Vt,this.translateService=Rr,this.geoLocationService=wo,this.organizationService=ua,this.applicationService=Ls,this.applicationUtils=Ws,this.periodsService=tu,this.fb=Sc,this.updateApplication=new n.vpe,this.componentStatus=new n.vpe,this.form=this.fb.group({additionalInformation:[]}),this.desiredStartDateForm=this.fb.group({desiredStartDate:[]}),this.errorMessages={dateIsOutOfPeriods:this.translate.instant("Application.Warning.DesireDateIsOutOfPeriods"),maxlength:this.translate.instant("Form.Error.MaxLengthIsChactersCount",{count:l.MaxLength.MESSAGE_LENGTH_4000})},this.searchingLocation=!1,this.applicationTypes=l.ApplicationTypes,this.availableUnits=[],this.minimumStartDate=rs()().add(1,"day").format("YYYY-MM-DD"),this.languages=[{value:"fi",text:"General.Language.Finnish"},{value:"sv",text:"General.Language.Swedish"},{value:"en",text:"General.Language.English"}],this.startUnitSearch$=new ve.x}ngOnInit(){this.getMunicipalityPeriods(),this.initEnrolmentInformation(),this.setLanguagesText(this.application.preferredLanguages),this.getEducationalOrganizations(),this.initEducationalOrganizations(),this.updateValues(),this.setValidators(),this.checkValidity(),this.minSelectableUnits=this.setMinimumSelectableUnits()}setMinimumSelectableUnits(){return this.application.mandatoryUnitsNumberFromSettings&&this.application?.mandatoryUnitsNumberAmount?this.application.mandatoryUnitsNumberAmount:l.Constants.APPLICATION_DEFAULT_MIN_PREFERRED_UNITS}initEnrolmentInformation(){this.application={...this.application,...this.applicationUtils.initEnrolmentInformation(this.application)}}initPreferredLocation(){if((0,ct.Z)(this.application.preferredLocation)){const O=(0,le.Z)(this.application,"guardians[0].address");O&&O.longitude&&O.latitude&&this.updatePreferredPlace(O)}const N=this.applicationUtils.getPreferredPlaceText(this.application.preferredLocation);this.commonSearchbarComponent.setValue(N)}onSelectLanguage(N){this.application={...this.application,preferredLanguages:N.detail.value}}initEducationalOrganizations(){this.applicationUtils.getLanguageOptions().pipe((0,T.q)(1)).subscribe(N=>{N.length&&(this.languagesList=N,this.startUnitSearch$.next())},N=>{console.error("getLanguageOptions failed",N)})}onChangeDesiredStartDate(N){this.application={...this.application,desiredStartDate:N};const O=this.applicationUtils.isDesiredDateInsidePeriods(l.ApplicationTypes.CLUB,this.desiredStartDate,this.currentAndFuturePeriods);this.checkValidity(),O&&(this.startUnitSearch$.next(),this.updateApplication.emit(this.application))}onChangeApplicationInfos(N){this.application={...this.application,[N.detail.name]:N.detail.value},"preferredLanguages"===N.detail.name&&(this.setLanguagesText(N.detail.value),this.startUnitSearch$.next()),this.updateApplication.emit(this.application),this.checkValidity()}checkValidity(){const N=this.isValid&&this.checkPreferredPlacesValidity();this.componentStatus.emit(N)}checkPreferredPlacesValidity(){if(!this.selectedUnits)return!1;const N=this.selectedUnits.length;return N>=this.minSelectableUnits&&N<=l.Constants.APPLICATION_DEFAULT_MAX_PREFERRED_UNITS}getCoordinates(N){this.geoLocationService.getGeoCoordinates(N).pipe((0,T.q)(1)).subscribe(O=>{this.setLocation(O)},O=>{console.error("getCoordinates failed",O),this.notify.alertFailedToLoadData()})}findEducationalOrganizations(N){this.updatePreferredPlace({longitude:N.longitude,latitude:N.latitude}),this.startUnitSearch$.next()}onPlaceChosen(N){this.application.selectedUnits=N,this.updateApplication.emit(this.application),this.checkValidity()}onNearToAddressChange(N){N||(this.application={...this.application,preferredLocation:{}},this.updateApplication.emit(this.application))}getMunicipalityPeriods(){this.periodsService.getPeriodsByMunicipality(this.application.municipalityId).pipe((0,tt.h)(N=>!!N.length)).subscribe(N=>{this.periods=N,this.currentAndFuturePeriods=this.applicationUtils.getCurrentAndFuturePeriods(l.ApplicationTypes.CLUB,this.minimumStartDate,N),this.desiredStartDateForm.get("desiredStartDate").setValidators([l.SiviValidators.required,l.SiviValidators.validateDate(),this.validateDateIsInsidePeriods()])})}setValidators(){this.desiredStartDateForm.get("desiredStartDate").setValidators([l.SiviValidators.required,l.SiviValidators.validateDate(),this.validateDateIsInsidePeriods()]),this.form.get("additionalInformation").setValidators([l.SiviValidators.maxLength(l.MaxLength.MESSAGE_LENGTH_4000)])}updateValues(){const{desiredStartDate:N,additionalInformation:O}=this.application;this.desiredStartDateForm.get("desiredStartDate").patchValue(N);const Ce=!O&&this.viewMode?"-":O;this.form.get("additionalInformation").patchValue(Ce)}setLocation(N){this.locations=N;const O=this.geoLocationService.getLocationsList(this.locations);this.commonSearchbarComponent.displayResults(O)}onSelectLocation(N){this.searchingLocation=!0;const O=this.locations.find(Ce=>Ce.id===N);if(O&&O.latitude&&O.longitude){const Ce=O.label+", "+O.zip;this.commonSearchbarComponent.setValue(Ce),this.updatePreferredPlace({streetAddress:O.housenumber?O.street+" "+O.housenumber:O.street,zipcode:O.zip,postOffice:O.city,longitude:O.longitude,latitude:O.latitude}),this.findEducationalOrganizations({longitude:O.longitude,latitude:O.latitude})}}getPreferredEducationPlaces(){const N=[];return this.selectedUnits.forEach(O=>{O.id&&N.push(this.applicationUtils.getUnitFocusesTextWithBrackets(O,this.languagesList))}),N?N.join(", "):""}updatePreferredPlace(N){this.application.preferredLocation={...this.application.preferredLocation,...N},this.updateApplication.emit(this.application)}onOptionChange(N){this.application={...this.application,[N.detail.name]:N.detail.value}}validateDateIsInsidePeriods(){return this.applicationUtils.validateDateIsInsidePeriods(l.ApplicationTypes.CLUB,this.currentAndFuturePeriods)}setLanguagesText(N){this.selectedLanguagesText=this.applicationUtils.getLanguagesText(N)}getEducationalOrganizations(){this.handleEducationalOrganizationsSearch().subscribe(N=>{this.searchingLocation=!1,this.availableUnits=N,this.cdRef.detectChanges()},N=>{console.error("getEducationalOrganizations failed",N),this.searchingLocation=!1,this.notify.alertFailedToLoadData()})}handleEducationalOrganizationsSearch(){return this.startUnitSearch$.pipe((0,g.R)(this.destroy$),(0,mt.b)(500),(0,nt.b)(()=>{this.searchingLocation=!0,this.cdRef.detectChanges()}),(0,Be.w)(()=>this.applicationUtils.getEducationalOrganizations(this.application,this.languagesList)))}};let Ge=vs;vs.\u0275fac=function(O){return new(O||vs)(n.Y36(w.sK),n.Y36(B.gz),n.Y36(B.F0),n.Y36(l.NotifyService),n.Y36(n.sBO),n.Y36(w.sK),n.Y36(P.u7),n.Y36(l.OrganizationService),n.Y36(P.IX),n.Y36(V.q),n.Y36(Dn.PeriodsService),n.Y36(Uo.qu))},vs.\u0275cmp=n.Xpm({type:vs,selectors:[["sivi-club-application-enrolment-information"]],viewQuery:function(O,Ce){if(1&O&&n.Gf(Lo,5),2&O){let Je;n.iGM(Je=n.CRH())&&(Ce.searchbar=Je.first)}},inputs:{reviewMode:"reviewMode",application:"application",municipalityId:"municipalityId"},outputs:{updateApplication:"updateApplication",componentStatus:"componentStatus"},features:[n.qOj],decls:36,vars:40,consts:[["siviLibForm","",3,"formGroup"],[1,"enrolment-info-container"],[1,"title"],[1,"content"],[1,"ion-no-padding","spaces"],[3,"municipalityId","applicationType","desiredStartDate","minimumStartDate","form","periods","title","titleInfo","reviewMode","errorMessages","changeDesiredDate"],["size","12","size-lg","6",1,"ion-no-padding"],["type","text",3,"viewMode","label","value",4,"ngIf","ngIfElse"],["languagesReviewModeOff",""],[1,"geolocation","ion-no-padding"],[1,"preferred-places-header"],[1,"ion-no-padding"],["size","12","size-lg","7","size-md","9",1,"ion-no-padding"],[1,"component-with-info-popup"],["name","preferredPlace",1,"ion-margin-bottom","component",3,"searchLabel","alwaysOpen","searchKeyword","siviChange","selectedResult"],["commonSearchbarComponent",""],[3,"text"],[4,"ngIf"],["name","siblingsAtSameUnit",3,"label","viewMode","checked","update"],["formControlName","additionalInformation","siviLibFormControl","","type","text","label-position","floating",3,"viewMode","label","errorMessages","siviChange"],["type","text",3,"viewMode","label","value"],["name","preferredLanguages",3,"label","options","value","verticalMode","siviChange"],[3,"applicationPlaces","availablePlaces","loadingUnits","languages","applicationType","minSelectableUnits","updateUnits"],["preferredPlaces",""]],template:function(O,Ce){if(1&O&&(n.TgZ(0,"div",0)(1,"div",1)(2,"div",2)(3,"h1"),n._uU(4),n.ALo(5,"translate"),n.qZA()(),n.TgZ(6,"div",3)(7,"ion-grid",4)(8,"sivi-application-desired-start-date",5),n.NdJ("changeDesiredDate",function(Vt){return Ce.onChangeDesiredStartDate(Vt)}),n.ALo(9,"translate"),n.ALo(10,"translate"),n.qZA(),n.TgZ(11,"ion-row")(12,"ion-col",6),n.YNc(13,Uu,2,5,"cgi-input",7),n.YNc(14,et,2,6,"ng-template",null,8,n.W1O),n.qZA()(),n.TgZ(16,"ion-grid",9)(17,"h3",10),n._uU(18),n.ALo(19,"translate"),n.qZA(),n.TgZ(20,"ion-row",11)(21,"ion-col",12)(22,"p",13)(23,"sivi-lib-common-searchbar",14,15),n.NdJ("searchKeyword",function(Vt){return Ce.getCoordinates(Vt)})("siviChange",function(Vt){return Ce.onNearToAddressChange(Vt)})("selectedResult",function(Vt){return Ce.onSelectLocation(Vt)}),n.ALo(25,"translate"),n.qZA(),n._UZ(26,"sivi-lib-info-popup",16),n.qZA()()(),n.YNc(27,Ae,4,6,"ion-row",17),n.TgZ(28,"ion-row")(29,"ion-col")(30,"sivi-lib-checkbox-toggle",18),n.NdJ("update",function(Vt){return Ce.onChangeApplicationInfos(Vt)}),n.qZA()()(),n.TgZ(31,"ion-row")(32,"ion-col",11)(33,"cgi-input",19),n.NdJ("siviChange",function(Vt){return Ce.onChangeApplicationInfos(Vt)}),n.ALo(34,"translate"),n.ALo(35,"translate"),n.qZA()()()()()()()()),2&O){const Je=n.MAs(15);n.Q6J("formGroup",Ce.form),n.xp6(4),n.Oqu(n.lcZ(5,26,"Application.Summary.ClubPreferences")),n.xp6(4),n.Q6J("municipalityId",Ce.application.municipalityId)("applicationType",Ce.applicationTypes.CLUB)("desiredStartDate",Ce.application.desiredStartDate)("minimumStartDate",Ce.minimumStartDate)("form",Ce.desiredStartDateForm)("periods",Ce.periods)("title",n.lcZ(9,28,"Application.Club.DesiredStartDate"))("titleInfo",n.lcZ(10,30,"Application.Club.DesiredStartDate.Info"))("reviewMode",Ce.reviewMode)("errorMessages",Ce.errorMessages),n.xp6(5),n.Q6J("ngIf",Ce.viewMode)("ngIfElse",Je),n.xp6(5),n.Oqu(n.lcZ(19,32,"Application.PreferredPlaces")),n.xp6(5),n.Q6J("searchLabel",n.lcZ(25,34,"Application.Club.PreferredAddress"))("alwaysOpen",!0),n.xp6(3),n.Q6J("text","Application.PreferredNearAddress.Info"),n.xp6(1),n.Q6J("ngIf",!Ce.viewMode),n.xp6(3),n.Q6J("label","Child.Siblings.LivingInSameEarlyChildhoodAndCarePlace")("viewMode",Ce.viewMode)("checked",Ce.application.siblingsAtSameUnit),n.xp6(3),n.Q6J("viewMode",Ce.viewMode)("label",n.lcZ(34,36,"Application.Enrolment.MoreInformation"))("errorMessages",Ce.errorMessages),n.uIk("aria-label",n.lcZ(35,38,"Application.Enrolment.MoreInformation"))}},dependencies:[l.CheckboxToggleComponent,he.O5,l.CheckboxListComponent,cc,l.InfoPopupComponent,ae.wI,ae.jY,ae.Nd,Uo.JJ,Uo.JL,os,l.CommonSearchbarComponent,l.SiviFormDirective,l.SiviFormControlDirective,Uo.sg,Uo.u,w.X$],styles:[".enrolment-info-container[_ngcontent-%COMP%]{padding:0 16px 10px}@media screen and (min-width: 600px){.enrolment-info-container[_ngcontent-%COMP%]{padding:0 40px 10px}}@media screen and (min-width: 840px){.enrolment-info-container[_ngcontent-%COMP%]{padding:0 80px 10px}}.geolocation[_ngcontent-%COMP%]{margin-bottom:40px;margin-top:2em}.title[_ngcontent-%COMP%]{display:flex}.title[_ngcontent-%COMP%]   h1[_ngcontent-%COMP%]{color:var(--ion-color-secondary)}.title[_ngcontent-%COMP%]   sivi-lib-info-popup[_ngcontent-%COMP%]{margin-top:auto;margin-left:10px;font-size:26px}sivi-lib-info-popup[_ngcontent-%COMP%]{font-size:26px}ion-grid[_ngcontent-%COMP%]{--ion-grid-padding: 0;--ion-grid-column-padding: 0}ion-grid[_ngcontent-%COMP%]   ion-row[_ngcontent-%COMP%]:not(:first-child){padding-top:2rem}.warning-date[_ngcontent-%COMP%]   cgi-icon[_ngcontent-%COMP%]{color:var(--ion-color-secondary)}.subtitle[_ngcontent-%COMP%]{color:var(--ion-color-primary);font-weight:600}"]});const xt=["contentLoader"],_e=class extends l.SiviComponent{constructor(N,O,Ce){super(),this.translate=N,this.route=O,this.router=Ce,this.editBasicInformation=new n.vpe,this.componentStatus=new n.vpe,this.update=new n.vpe}onEditClicked(){this.editBasicInformation.emit()}onUpdateComponentStatus(N){this.componentStatus.emit(N)}updateEnrolmentInformation(N){this.update.emit(N)}};let Ht=_e;_e.\u0275fac=function(O){return new(O||_e)(n.Y36(w.sK),n.Y36(B.gz),n.Y36(B.F0))},_e.\u0275cmp=n.Xpm({type:_e,selectors:[["sivi-club-application-preferences"]],viewQuery:function(O,Ce){if(1&O&&n.Gf(xt,7),2&O){let Je;n.iGM(Je=n.CRH())&&(Ce.contentLoader=Je.first)}},inputs:{application:"application",reviewMode:"reviewMode"},outputs:{editBasicInformation:"editBasicInformation",componentStatus:"componentStatus",update:"update"},features:[n.qOj],decls:3,vars:5,consts:[[3,"application","reviewMode","clickEdit"],[3,"application","reviewMode","municipalityId","updateApplication","componentStatus"]],template:function(O,Ce){1&O&&(n.TgZ(0,"sivi-application-basic-information",0),n.NdJ("clickEdit",function(){return Ce.onEditClicked()}),n.qZA(),n.ynx(1),n.TgZ(2,"sivi-club-application-enrolment-information",1),n.NdJ("updateApplication",function(Vt){return Ce.updateEnrolmentInformation(Vt)})("componentStatus",function(Vt){return Ce.onUpdateComponentStatus(Vt)}),n.qZA(),n.BQk()),2&O&&(n.Q6J("application",Ce.application)("reviewMode",Ce.reviewMode),n.xp6(2),n.Q6J("application",Ce.application)("reviewMode",Ce.reviewMode)("municipalityId",Ce.application.municipalityId))},dependencies:[ss,Ge],encapsulation:2});const _n=["contentLoader"],li=["attachmentSelector"];function dr(Me,N){if(1&Me){const O=n.EpF();n.TgZ(0,"sivi-stepper-container",4),n.NdJ("stateChange",function(Je){n.CHM(O);const Vt=n.oxw(2);return n.KtG(Vt.onChangeApplicationState(Je))})("editSavedApplication",function(){n.CHM(O);const Je=n.oxw(2);return n.KtG(Je.onEditSavedApplication())})("selectStep",function(Je){n.CHM(O);const Vt=n.oxw(2);return n.KtG(Vt.onSelectStep(Je))}),n.qZA()}if(2&Me){const O=n.oxw(2);n.Q6J("application",O.application)("currentPage",O.currentPage)("reviewMode",O.reviewMode)("permits",O.permits)("steps",O.steps)}}function Sr(Me,N){if(1&Me){const O=n.EpF();n.TgZ(0,"sivi-application-comments-and-notes",13),n.NdJ("postComment",function(Je){n.CHM(O);const Vt=n.oxw(3);return n.KtG(Vt.postComment(Je))})("postNote",function(Je){n.CHM(O);const Vt=n.oxw(3);return n.KtG(Vt.postNote(Je))})("deleteNote",function(Je){n.CHM(O);const Vt=n.oxw(3);return n.KtG(Vt.onDeleteNote(Je))}),n.ALo(1,"async"),n.qZA()}if(2&Me){const O=n.oxw(3);n.Q6J("userId",n.lcZ(1,6,O.userId))("comments",O.comments)("notes",O.notes)("permits",O.permits)("commentInputValue",O.commentInputValue)("noteInputValue",O.noteInputValue)}}function fo(Me,N){if(1&Me&&n._UZ(0,"sivi-application-pdfs",14),2&Me){const O=n.oxw(3);n.Q6J("applicationId",O.application.id)}}function ms(Me,N){if(1&Me){const O=n.EpF();n.TgZ(0,"sivi-buttons-container",15),n.NdJ("sendApplication",function(){n.CHM(O);const Je=n.oxw(3);return n.KtG(Je.sendApplication())})("pageChange",function(Je){n.CHM(O);const Vt=n.oxw(3);return n.KtG(Vt.onPageChange(Je))}),n.qZA()}if(2&Me){const O=n.oxw(3);n.Q6J("page",O.currentPage)("application",O.application)("reviewMode",O.reviewMode)("isAbleToSave",O.isAbleToSave)("sending",O.sendingApplication)}}function Nl(Me,N){if(1&Me){const O=n.EpF();n.ynx(0),n.TgZ(1,"sivi-lib-content-loader",null,5),n.YNc(3,Sr,2,8,"sivi-application-comments-and-notes",6),n.TgZ(4,"sivi-club-application-preferences",7),n.NdJ("editBasicInformation",function(){n.CHM(O);const Je=n.oxw(2);return n.KtG(Je.onEditBasicInformation())})("update",function(Je){n.CHM(O);const Vt=n.oxw(2);return n.KtG(Vt.onEditApplication(Je))})("componentStatus",function(Je){n.CHM(O);const Vt=n.oxw(2);return n.KtG(Vt.onUpdateCompleteStatus(Je,0))}),n.qZA(),n.TgZ(5,"sivi-club-application-person-information",8),n.NdJ("update",function(Je){n.CHM(O);const Vt=n.oxw(2);return n.KtG(Vt.onEditApplication(Je))})("componentStatus",function(Je){n.CHM(O);const Vt=n.oxw(2);return n.KtG(Vt.onUpdateCompleteStatus(Je,1))}),n.qZA(),n._UZ(6,"sivi-application-summary",9),n.YNc(7,fo,1,1,"sivi-application-pdfs",10),n._UZ(8,"sivi-application-confirmation",11),n.YNc(9,ms,1,5,"sivi-buttons-container",12),n.qZA(),n.BQk()}if(2&Me){const O=n.oxw(2);n.xp6(3),n.Q6J("ngIf",O.shouldShowComments()&&O.permits),n.xp6(1),n.Q6J("ngClass",O.hidePage(0))("reviewMode",O.reviewMode)("application",O.application),n.xp6(1),n.Q6J("ngClass",O.hidePage(1))("application",O.application)("reviewMode",O.reviewMode),n.xp6(1),n.Q6J("application",O.application)("ngClass",O.hidePage(2)),n.xp6(1),n.Q6J("ngIf",O.shouldShowPdfs()),n.xp6(1),n.Q6J("confirmationTitle",O.confirmationTitle)("confirmationText",O.confirmation)("ngClass",O.hidePage(3)),n.xp6(1),n.Q6J("ngIf",3===O.currentPage||!O.shouldShowOnlySummary()&&!O.reviewMode)}}function Dl(Me,N){if(1&Me&&(n.TgZ(0,"div"),n.YNc(1,dr,1,5,"sivi-stepper-container",3),n.YNc(2,Nl,10,14,"ng-container",1),n.qZA()),2&Me){const O=n.oxw();n.xp6(1),n.Q6J("ngIf",O.permits),n.xp6(1),n.Q6J("ngIf",O.application)}}const $e=class extends He{constructor(N,O,Ce,Je,Vt,Rr,wo,ua,Ls,Ws,tu,Sc,Um){super(N,O,Ce,Je,Vt,Rr,wo,Ws,tu,Ls,Sc,Um),this.translate=N,this.notifyService=O,this.route=Ce,this.router=Je,this.auth=Vt,this.applicationService=Rr,this.messageTemplateRestService=wo,this.userSettingsService=ua,this.applicationUtils=Ls,this.menuService=Ws,this.applicationStateChangeFacadeService=tu,this.cdr=Sc,this.modalCtrl=Um,this.changeApplication=new n.vpe,this.files$=new X.X([]),this.currentPage=0,this.steps=[{title:this.translate.instant("Preferences.Plural"),completed:!1},{title:this.translate.instant("Form.Label.Person.Information"),completed:!1},{title:this.translate.instant("Title.Summary"),completed:!1}]}ngOnInit(){super.ngOnInit(),this.getAllAttachments().pipe((0,Pe.B)(),(0,g.R)(this.destroy$)).subscribe(N=>{this.applicationUtils.attachments$.next(N)}),this.listenForAttachmentActions()}ngAfterViewInit(){super.setContentLoader(this.contentLoader)}onEditApplication(N){this.changeApplication.emit(N),super.onEditApplication(N)}listenForAttachmentActions(){this.applicationUtils.addFile$.pipe((0,g.R)(this.destroy$)).subscribe(N=>{this.documentPurpose=N,this.attachmentSelector.onSelectFile()}),this.applicationUtils.deleteFile$.pipe((0,g.R)(this.destroy$)).subscribe(N=>{this.deleteAttachment(N)})}getAllAttachments(){const N=this.uploadSelectorAttachments(),O=this.application.id?this.applicationService.getApplicationAttachments(this.application.id).pipe((0,T.q)(1),(0,E.U)(Ce=>Ce.filter(Je=>Je.documentPurpose===l.AttachmentPurposes.CHILD)),(0,xe.z)(Ce=>(0,ye.D)(Ce)),(0,xe.z)(Ce=>this.applicationService.handleDownloadAttachment(this.application.id,Ce))):(0,ge.of)([]);return(0,ne.T)(O,N,this.files$).pipe((0,de.R)((Ce,Je)=>{const Vt=Je.tempId?"tempId":"id";return l.Utils.patchCollectionBy(Ce,Je,Vt)},[]),(0,E.U)(Ce=>Ce.sort((Je,Vt)=>l.Utils.compareByDate(Je.createdDate,Vt.createdDate))),(0,E.U)(Ce=>Ce.filter(Je=>Je.restEntityState!==l.Constants.DELETED)))}uploadSelectorAttachments(){return this.attachmentSelector.files$.pipe((0,xe.z)(N=>(0,ye.D)(N)),(0,xe.z)(N=>this.applicationService.handleUploadAttachment(this.application.id,N,l.AttachmentPurposes.CHILD)))}deleteAttachment(N){const O=l.Utils.copyFile(N);O.isLoading=!0,O.locked=!0,this.files$.next([O]),this.applicationService.handleDeleteAttachment(this.application.id,N).pipe((0,T.q)(1),(0,re.K)(Ce=>{const Je=l.Utils.copyFile(O);return delete Je.isLoading,delete Je.locked,this.files$.next([Je]),(0,pe._)(Ce)})).subscribe(Ce=>{delete Ce.isLoading,delete Ce.locked,this.files$.next([Ce])})}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}};let Yl=$e;function cu(Me,N){if(1&Me){const O=n.EpF();n.TgZ(0,"div",2)(1,"sivi-lib-navbar-more-options",6),n.NdJ("clickedSettings",function(){n.CHM(O);const Je=n.oxw();return n.KtG(Je.openNewDecisionPage())}),n.ALo(2,"translate"),n.qZA()()}if(2&Me){const O=n.oxw();n.xp6(1),n.Q6J("showSettings",!1)("options",O.navBarMoreOptions)("ariaLabel",n.lcZ(2,3,"Decision.Placement.Applications.Action.MakeDecisions"))}}function Mr(Me,N){if(1&Me){const O=n.EpF();n.TgZ(0,"sivi-lib-navbar-action-button",7),n.NdJ("clicked",function(){n.CHM(O);const Je=n.oxw();return n.KtG(Je.onPrint())}),n.ALo(1,"translate"),n.qZA()}2&Me&&n.Q6J("icon","print")("text","")("ariaLabel",n.lcZ(1,3,"General.Buttons.Print"))}function sl(Me,N){if(1&Me){const O=n.EpF();n.TgZ(0,"sivi-lib-navbar-action-button",8),n.NdJ("clicked",function(){n.CHM(O);const Je=n.oxw();return n.KtG(Je.onDelete())}),n.ALo(1,"translate"),n.qZA()}2&Me&&n.Q6J("icon","delete")("ariaLabel",n.lcZ(1,3,"General.Buttons.Delete"))("text","")}function ld(Me,N){if(1&Me){const O=n.EpF();n.TgZ(0,"sivi-ppe-application",12),n.NdJ("changeApplication",function(Je){n.CHM(O);const Vt=n.oxw(2);return n.KtG(Vt.onChange(Je))})("changeReviewMode",function(Je){n.CHM(O);const Vt=n.oxw(2);return n.KtG(Vt.onChangeReviewMode(Je))}),n.qZA()}if(2&Me){const O=n.oxw(2);n.Q6J("application",O.application)}}function qo(Me,N){if(1&Me){const O=n.EpF();n.TgZ(0,"sivi-ecec-application",12),n.NdJ("changeApplication",function(Je){n.CHM(O);const Vt=n.oxw(2);return n.KtG(Vt.onChange(Je))})("changeReviewMode",function(Je){n.CHM(O);const Vt=n.oxw(2);return n.KtG(Vt.onChangeReviewMode(Je))}),n.qZA()}if(2&Me){const O=n.oxw(2);n.Q6J("application",O.application)}}function ll(Me,N){if(1&Me){const O=n.EpF();n.TgZ(0,"sivi-club-application",12),n.NdJ("changeApplication",function(Je){n.CHM(O);const Vt=n.oxw(2);return n.KtG(Vt.onChange(Je))})("changeReviewMode",function(Je){n.CHM(O);const Vt=n.oxw(2);return n.KtG(Vt.onChangeReviewMode(Je))}),n.qZA()}if(2&Me){const O=n.oxw(2);n.Q6J("application",O.application)}}function y_(Me,N){if(1&Me&&(n.TgZ(0,"ion-content",9),n._UZ(1,"sivi-progress-bar",10),n.YNc(2,ld,1,1,"sivi-ppe-application",11),n.YNc(3,qo,1,1,"sivi-ecec-application",11),n.YNc(4,ll,1,1,"sivi-club-application",11),n.qZA()),2&Me){const O=n.oxw();n.xp6(1),n.Q6J("show",O.loading),n.xp6(1),n.Q6J("ngIf",O.application.type===O.applicationTypes.PPE||O.application.type===O.applicationTypes.PPEWITHECEC),n.xp6(1),n.Q6J("ngIf",O.application.type===O.applicationTypes.ECEC),n.xp6(1),n.Q6J("ngIf",O.application.type===O.applicationTypes.CLUB)}}$e.\u0275fac=function(O){return new(O||$e)(n.Y36(w.sK),n.Y36(l.NotifyService),n.Y36(B.gz),n.Y36(B.F0),n.Y36(P.e8),n.Y36(P.IX),n.Y36(l.MessageTemplateRestService),n.Y36(l.UserSettingsService),n.Y36(V.q),n.Y36(Ct.h),n.Y36(rn.B),n.Y36(n.sBO),n.Y36(l.SiviModalController))},$e.\u0275cmp=n.Xpm({type:$e,selectors:[["sivi-club-application"]],viewQuery:function(O,Ce){if(1&O&&(n.Gf(_n,5),n.Gf(li,7)),2&O){let Je;n.iGM(Je=n.CRH())&&(Ce.contentLoader=Je.first),n.iGM(Je=n.CRH())&&(Ce.attachmentSelector=Je.first)}},inputs:{application:"application"},outputs:{changeApplication:"changeApplication"},features:[n.qOj],decls:4,vars:1,consts:[["id","anchor"],[4,"ngIf"],["attachmentSelector",""],[3,"application","currentPage","reviewMode","permits","steps","stateChange","editSavedApplication","selectStep",4,"ngIf"],[3,"application","currentPage","reviewMode","permits","steps","stateChange","editSavedApplication","selectStep"],["contentLoader",""],[3,"userId","comments","notes","permits","commentInputValue","noteInputValue","postComment","postNote","deleteNote",4,"ngIf"],[3,"ngClass","reviewMode","application","editBasicInformation","update","componentStatus"],[3,"ngClass","application","reviewMode","update","componentStatus"],[3,"application","ngClass"],[3,"applicationId",4,"ngIf"],[3,"confirmationTitle","confirmationText","ngClass"],[3,"page","application","reviewMode","isAbleToSave","sending","sendApplication","pageChange",4,"ngIf"],[3,"userId","comments","notes","permits","commentInputValue","noteInputValue","postComment","postNote","deleteNote"],[3,"applicationId"],[3,"page","application","reviewMode","isAbleToSave","sending","sendApplication","pageChange"]],template:function(O,Ce){1&O&&(n._UZ(0,"div",0),n.YNc(1,Dl,3,2,"div",1),n._UZ(2,"sivi-lib-attachment-selector",null,2)),2&O&&(n.xp6(1),n.Q6J("ngIf",Ce.application))},dependencies:[he.mk,he.O5,l.ContentLoaderComponent,st,cn,Oa,ur,$r,al,Vc,l.AttachmentSelectorComponent,Ht,he.Ov],styles:[".container-hide[_ngcontent-%COMP%]{display:none!important;visibility:hidden}"]});const Tt=class extends e.xv{get isPrintButtonVisible(){return!!this.application&&(this.application.state===e.Qt.SAVED||this.application.state===e.Qt.DRAFT)}constructor(N,O,Ce,Je,Vt,Rr,wo,ua,Ls,Ws,tu,Sc,Um){super(N,O,Ce,Je,Um,wo),this.notify=N,this.translate=O,this.router=Ce,this.route=Je,this.unsavedChanges=Vt,this.summaryUtilsService=Rr,this.modalCtrl=wo,this.auth=ua,this.attachmentsService=Ls,this.applicationService=Ws,this.applicationUtils=tu,this.newDecisionMapper=Sc,this.location=Um,this.loading=!1,this.draftMessage=this.translate.instant("Application.Confirm.Close.Explanation")+"\n"+this.translate.instant("Application.Confirm.Close.Message"),this.sendMessage=this.translate.instant("Message.Changes.Discard.UnsavedChanges")+" "+this.translate.instant("Application.Confirm.Close.Message"),this.printWindow={blank:"_blank",properties:"width=600,height=700,scrollbars=no,menubar=no,toolbar=no,location=no,status=no,titlebar=no",content:ic=>`<html><head><link rel="stylesheet" type="text/css" href="" /></head><body onload="window.print()">${ic}</html>`},this.applicationTypes=e.wW,this.permissions=l.Permissions,this.constants=e.gT}ngOnInit(){this.restoreModal(),this.navBarMoreOptions=[{id:"click-settings",text:"Placement.Applications.Action.MakeDecisions",icon:"insert_drive_file",ariaLabel:"Decision.MakeDecision"}]}ngAfterViewInit(){this.listenForApplicationSending()}listenForApplicationSending(){this.watchForValueChanges([this.application]),this.applicationUtils.applicationSent$.pipe((0,g.R)(this.destroy$)).subscribe(N=>{this.watchForValueChanges([N])})}openNewDecisionPage(){var N=this;return(0,o.Z)(function*(){const O=N.newDecisionMapper.mapApplicationsToNewDecisions([N.application],!0),Ce={component:D.w,cssClass:"modal-extra-large-size",componentProps:{newDecisions:O}};yield N.openModal(Ce)})()}get userId$(){return this.auth.getUserPersonData().pipe((0,E.U)(N=>N.userId))}onChange(N){this.application={...N},this.updateWatchedEntities([N])}onChangeReviewMode(N){this.reviewMode=N}onDelete(){var N=this;return(0,o.Z)(function*(){try{if((yield(yield N.notify.createConfirmationPopUp("Message.Delete.Application.Title","Message.Delete.Application.Message","General.Buttons.Delete")).onDidDismiss()).data){const wo=yield N.applicationService.deleteApplication(N.application.id).toPromise();wo&&wo.id&&(N.notify.toastDeleteSuccess(),N.closeModal())}}catch{N.notify.alertDeleteError()}})()}onPrint(){this.loading=!0,this.applicationService.getSentApplicationPDF(this.application.id).pipe((0,T.q)(1)).subscribe(N=>{const O=new Blob([N],{type:"application/pdf"});O.name=this.application.child.firstNames+" "+this.application.child.lastName+".pdf",this.attachmentsService.openFile(O),this.loading=!1},N=>{this.notify.alertFailedToLoadData(),console.error("ApplicationComponent->onPrint: Error fetching sent application PDF",N),this.loading=!1})}checkCanDelete(){return this.userId$.pipe((0,g.R)(this.destroy$),(0,E.U)(O=>{const Ce=this.application.state===e.gT.DRAFT,Je=this.application.createdBy===O,Vt=this.auth.hasAnyRole([e.G7.SERVICE_ADVISER,e.G7.ECEC_SERVICE_COUNSELOR]);return Ce&&(Je||Vt)}))}onDismiss(){var N=this;return(0,o.Z)(function*(){return N.reviewMode?(N.modalCtrl.removeQueryParam("applicationId"),void N.modalCtrl.dismiss(null)):N.application.state===e.gT.DRAFT?(N.modalCtrl.removeQueryParam("applicationId"),void N.modalCtrl.dismiss({skipRestoreModal:!0})):void N.unsavedChanges.canDeactivate(N).pipe((0,T.q)(1)).subscribe(O=>{O&&(N.modalCtrl.removeQueryParam("applicationId"),N.modalCtrl.dismiss({skipRestoreModal:!0}))})})()}showConfirmationAlert(N){var O=this;return(0,o.Z)(function*(){const Ce=O.translate.instant("Application.Confirm.Close.Title");(yield O.notify.createConfirmationPopUp(Ce,N,"General.Buttons.Close")).onDidDismiss().then(Vt=>{Vt.data&&O.closeModal()})})()}restoreModal(){const N=e.cQ.getParamFromURL("modal");N&&"searchPerson"!==N&&this.openNewDecisionPage()}closeModal(){var N=this;return(0,o.Z)(function*(){N.deleteParams(),N.summaryUtilsService.resetApplication(),N.modalCtrl.dismiss()})()}deleteParams(){this.modalCtrl.removeQueryParam("applicationId"),this.modalCtrl.removeQueryParam("page")}};let Hl=Tt;Tt.\u0275fac=function(O){return new(O||Tt)(n.Y36(P.c),n.Y36(w.sK),n.Y36(B.F0),n.Y36(B.gz),n.Y36(e.Ox),n.Y36(Y.p),n.Y36(l.SiviModalController),n.Y36(P.e8),n.Y36(P.oZ),n.Y36(P.IX),n.Y36(V.q),n.Y36(ue.v),n.Y36(he.Ye))},Tt.\u0275cmp=n.Xpm({type:Tt,selectors:[["sivi-application"]],inputs:{applicationId:"applicationId",application:"application"},features:[n.qOj],decls:11,vars:10,consts:[[3,"hideNotifications","closeButton","closed"],["navbar-title",""],["navbar-buttons-right",""],[3,"icon","text","ariaLabel","clicked",4,"ngIf"],[3,"icon","ariaLabel","text","clicked",4,"ngIf"],["id","main-application-container",4,"ngIf"],[3,"showSettings","options","ariaLabel","clickedSettings"],[3,"icon","text","ariaLabel","clicked"],[3,"icon","ariaLabel","text","clicked"],["id","main-application-container"],[3,"show"],[3,"application","changeApplication","changeReviewMode",4,"ngIf"],[3,"application","changeApplication","changeReviewMode"]],template:function(O,Ce){1&O&&(n.TgZ(0,"ion-header")(1,"sivi-lib-navbar",0),n.NdJ("closed",function(){return Ce.onDismiss()}),n.TgZ(2,"div",1),n._uU(3),n.ALo(4,"translate"),n.qZA(),n.YNc(5,cu,3,5,"ng-template"),n.TgZ(6,"div",2),n.YNc(7,Mr,2,5,"sivi-lib-navbar-action-button",3),n.YNc(8,sl,2,5,"sivi-lib-navbar-action-button",4),n.ALo(9,"async"),n.qZA()()(),n.YNc(10,y_,5,4,"ion-content",5)),2&O&&(n.xp6(1),n.Q6J("hideNotifications",!0)("closeButton",!0),n.xp6(2),n.hij(" ",n.lcZ(4,6,"Application.Singular")," "),n.xp6(4),n.Q6J("ngIf",Ce.isPrintButtonVisible),n.xp6(1),n.Q6J("ngIf",n.lcZ(9,8,Ce.checkCanDelete())),n.xp6(2),n.Q6J("ngIf",Ce.application))},dependencies:[ae.W2,ae.Gu,he.O5,l.NavbarComponent,l.NavbarActionButtonComponent,l.NavbarMoreOptionsComponent,Ca,Xc,Yl,he.Ov,w.X$],encapsulation:2})},90999:(qe,I,p)=>{"use strict";p.d(I,{E:()=>ke});var o=p(36895),e=p(24623),l=p(13312),D=p(7398),g=p(11091),E=p(63834),T=p(31943),n=p(94954),P=p(88692),w=p(36355),B=p(89383),Y=p(11218),V=p(28255),ue=p(97392),he=p(10266),ae=p(29145),X=p(44438),ve=p(94650);const Be=class{};let ye=Be;Be.\u0275fac=function(Mn){return new(Mn||Be)},Be.\u0275mod=ve.oAB({type:Be}),Be.\u0275inj=ve.cJS({providers:[X.EcecWeeklyCareTimeOptionsService,X.EcecExtentOptionsService,X.QuickHandleService,T.Ip,T.oZ,Y.p,P.SiviModalController],imports:[P.SiviCoreComponentModule,P.RadioListWithInputComponentModule,P.CommonSearchbarComponentModule,ae.R,P.AttachmentSelectorComponentModule,P.RadioListComponentModule,l.e,D.u,P.CheckboxListComponentModule,P.SelectComponentModule,P.CheckboxToggleComponentModule,P.AttachmentComponentModule,P.SiviCorePageModule,P.HtmlRendererComponentModule,B.aw,V.Tx,ue.Ps,he.AV,n.VI.forChild(),P.DatepickerModule,w.y,P.DirectivesModule,P.InfoPopupComponentModule,P.SiviFormsModule,P.PipesModule,n.VI]});const nt=class{};let ge=nt;nt.\u0275fac=function(Mn){return new(Mn||nt)},nt.\u0275mod=ve.oAB({type:nt}),nt.\u0275inj=ve.cJS({imports:[P.SiviCorePageModule,P.CheckboxListComponentModule,P.InfoPopupComponentModule]});var ne=p(94397);const mt=class{};let pe=mt;mt.\u0275fac=function(Mn){return new(Mn||mt)},mt.\u0275mod=ve.oAB({type:mt}),mt.\u0275inj=ve.cJS({providers:[X.PeriodsService],imports:[P.AutocompleteGroupSelectComponentModule,P.RadioListComponentModule,g.g,P.AttachmentSelectorComponentModule,P.CheckboxToggleComponentModule,o.ez,P.CheckboxListComponentModule,ye,P.AttachmentComponentModule,e.x,P.DirectivesModule,P.SiviCoreComponentModule,P.InfoPopupComponentModule,ne.m,P.DatepickerModule,ge,P.CommonSearchbarComponentModule,P.SiviFormsModule]});const ut=class{};let Pe=ut;ut.\u0275fac=function(Mn){return new(Mn||ut)},ut.\u0275mod=ve.oAB({type:ut}),ut.\u0275inj=ve.cJS({imports:[P.SiviCoreComponentModule,P.RadioListWithInputComponentModule,P.CommonSearchbarComponentModule,ae.R,P.AttachmentSelectorComponentModule,P.AttachmentComponentModule,P.DirectivesModule,P.InfoPopupComponentModule,ye,P.SiviFormsModule]});const Ve=class{};let xe=Ve;Ve.\u0275fac=function(Mn){return new(Mn||Ve)},Ve.\u0275mod=ve.oAB({type:Ve}),Ve.\u0275inj=ve.cJS({providers:[P.SiviModalController],imports:[P.SiviCorePageModule,P.InfoPopupComponentModule,ne.m,P.SiviFormsModule]});var de=p(22678);const tt=class{};let re=tt;tt.\u0275fac=function(Mn){return new(Mn||tt)},tt.\u0275mod=ve.oAB({type:tt}),tt.\u0275inj=ve.cJS({providers:[P.SiviModalController],imports:[P.SiviCorePageModule,ye,Pe,pe,xe,P.AttachmentSelectorComponentModule,P.AttachmentComponentModule,de.Q]});const Ne=class{};let oe=Ne;Ne.\u0275fac=function(Mn){return new(Mn||Ne)},Ne.\u0275mod=ve.oAB({type:Ne}),Ne.\u0275inj=ve.cJS({imports:[P.DirectivesModule,P.SiviCoreComponentModule,P.InfoPopupComponentModule,ye,P.EmploymentInformationComponentModule]});var me=p(94973);const wt=class{};let be=wt;wt.\u0275fac=function(Mn){return new(Mn||wt)},wt.\u0275mod=ve.oAB({type:wt}),wt.\u0275inj=ve.cJS({providers:[me.q],imports:[P.AutocompleteGroupSelectComponentModule,P.RadioListWithInputComponentModule,g.g,P.AttachmentSelectorComponentModule,P.SelectComponentModule,o.ez,P.CommonSearchbarComponentModule,P.AttachmentComponentModule,e.x,P.DirectivesModule,P.CheckboxListComponentModule,ye,P.SiviCoreComponentModule,P.InfoPopupComponentModule,ne.m,P.CheckboxToggleComponentModule,ge,P.SiviFormsModule]});const ft=class{};let le=ft;ft.\u0275fac=function(Mn){return new(Mn||ft)},ft.\u0275mod=ve.oAB({type:ft}),ft.\u0275inj=ve.cJS({providers:[P.SiviModalController],imports:[P.SiviCorePageModule,ye,oe,be,P.AttachmentSelectorComponentModule,P.AttachmentComponentModule,de.Q]});const Ct=class{};let Z=Ct;Ct.\u0275fac=function(Mn){return new(Mn||Ct)},Ct.\u0275mod=ve.oAB({type:Ct}),Ct.\u0275inj=ve.cJS({imports:[P.SiviCoreComponentModule,P.RadioListWithInputComponentModule,P.CommonSearchbarComponentModule,ae.R,P.AttachmentSelectorComponentModule,P.AttachmentComponentModule,P.DirectivesModule,P.InfoPopupComponentModule,ye,P.EmploymentInformationComponentModule]});const rn=class{};let Oe=rn;rn.\u0275fac=function(Mn){return new(Mn||rn)},rn.\u0275mod=ve.oAB({type:rn}),rn.\u0275inj=ve.cJS({providers:[X.PeriodsService],imports:[P.AutocompleteGroupSelectComponentModule,P.RadioListComponentModule,g.g,P.AttachmentSelectorComponentModule,P.CheckboxToggleComponentModule,o.ez,P.AttachmentComponentModule,e.x,P.CheckboxListComponentModule,ye,P.DirectivesModule,P.SiviCoreComponentModule,P.InfoPopupComponentModule,ne.m,P.DatepickerModule,ge,P.CommonSearchbarComponentModule,P.SiviFormsModule]});const He=class{};let j=He;He.\u0275fac=function(Mn){return new(Mn||He)},He.\u0275mod=ve.oAB({type:He}),He.\u0275inj=ve.cJS({providers:[P.SiviModalController],imports:[P.SiviCorePageModule,ye,Z,Oe,P.AttachmentSelectorComponentModule,P.AttachmentComponentModule,de.Q]});const st=class{};let ke=st;st.\u0275fac=function(Mn){return new(Mn||st)},st.\u0275mod=ve.oAB({type:st}),st.\u0275inj=ve.cJS({providers:[T.IX,T.MP,T.oZ,E.u,P.MessageTemplateRestService,P.SiviModalController],imports:[P.SiviCorePageModule,P.AutocompleteGroupSelectComponentModule,P.RadioListComponentModule,g.g,P.AttachmentSelectorComponentModule,n.VI,P.CheckboxListComponentModule,P.CheckboxToggleComponentModule,e.x,g.g,o.ez,P.AttachmentComponentModule,l.e,D.u,g.g,e.x,j,le,re,w.y]})},94973:(qe,I,p)=>{"use strict";p.d(I,{q:()=>X});var o=p(59378),e=p(49594),l=p(74744),D=p(77579),g=p(61135),E=p(39646),T=p(95577),n=p(95698),P=p(54004),w=p(33053),B=p(15439),Y=p.n(B),V=p(88692),ue=p(94650),he=p(31943),ae=p(89383);const ve=class{constructor(ge,ne,pe,Pe,xe){this.auth=ge,this.translate=ne,this.languageService=pe,this.unitCommonService=Pe,this.organizationService=xe,this.unitAndAreaOptions$=new D.x,this.selectedCareTimeTypes$=new g.X([]),this.attachments$=new g.X([]),this.addFile$=new D.x,this.deleteFile$=new D.x,this.initialCareTimeOptions={timeOptions:[],extentOptions:[]},this.careOptions$=new g.X(this.initialCareTimeOptions),this.applicationSent$=new D.x,this.PRIVATE_ORGANIZATION=w.V6.ORGANIZATION_FORMAT_PRIVATE,this.hiddenStatesForGuardian=[w.Qt.IN_PLACEMENT,w.Qt.IN_PRE_PLACEMENT]}mapPersonLanguagesToCodes(ge){let ne;return ne=ge.length>0?ge.map(pe=>{if(pe)return pe.languageCode}):this.translate.currentLang?[this.translate.currentLang.toUpperCase()]:[],ne}getNewPreferredPlaceOptions(ge){this.unitAndAreaOptions$.next(ge)}getAdditionalSortingParams(ge,ne){return(0,o.Z)(ge.careTimeTypes)||(ne.timeOptions=ge.careTimeTypes.map(pe=>pe.type).join(",")),(0,o.Z)(ge.preferredLanguages)||(ne.language=ge.preferredLanguages.join(",")),ge.desiredStartDate&&(ne.desiredStartDate=Y()(ge.desiredStartDate).format("YYYY-MM-DD")),ge.type!==w.wW.ECEC&&ge.currentUnit&&(ne.currentDcpId=ge.currentUnit),ne}getEducationLanguages(ge){const ne=[];return ge.forEach(pe=>{ne.push({languageCode:pe.toUpperCase(),languageType:this.getApplicationLanguageType(pe)})}),ne}getApplicationLanguageType(ge){let ne;return ne=ge===this.translate.currentLang?"sivi.person.language.type.mother-tongue":"sivi.person.language.type.communication-language",ne}getSelectedLanguages(ge,ne=!0){return ge.applicationLanguage&&ge.applicationLanguage.length>0?ge.applicationLanguage.map(pe=>{if(pe)return pe.languageCode}):this.translate.currentLang&&ne?[this.translate.currentLang.toUpperCase()]:[]}getLanguagesText(ge=[]){return this.getSelectOptionLanguages().filter(Pe=>ge.includes(Pe.value)||ge.includes(Pe.value.toUpperCase())||ge.includes(Pe.value.toLowerCase())).map(Pe=>this.translate.instant(`${Pe.text}`)).join(", ")}getSelectOptionLanguages(){return[{value:"FI",text:"General.Language.Finnish"},{value:"SV",text:"General.Language.Swedish"},{value:"EN",text:"General.Language.English"}]}getYesOrNoOptions(){return[{value:w.gT.NO,text:this.translate.instant("General.Text.No")},{value:w.gT.YES,text:this.translate.instant("General.Text.Yes")}]}getEducationalOrganizations(ge,ne){const pe=this.getCoordinatesFromApplication(ge),Pe=this.getApplicationType(ge.type),xe={parentOrgId:ge.municipalityId,applicationType:Pe,latitude:pe.latitude.toString(),longitude:pe.longitude.toString()},de=this.getAdditionalSortingParams(ge,xe);return this.organizationService.findEducationalOrganizationsByLocation(de).pipe((0,T.z)(re=>(0,E.of)(re)),(0,T.z)(re=>[this.prepareEducationalOrganizations(re,ne)]))}getApplicationType(ge){switch(ge){case w.wW.PPE:return w.RX.PPE;case w.wW.ECEC:return w.RX.ECEC;case w.wW.PPEWITHECEC:return w.RX.PPE_WITH_ECEC;case w.wW.CLUB:return w.RX.CLUB;default:return""}}getCoordinatesFromApplication(ge){let ne;if(ge.preferredLocation&&ge.preferredLocation.latitude&&ge.preferredLocation.longitude)ne={latitude:ge.preferredLocation.latitude,longitude:ge.preferredLocation.longitude};else{const pe=(0,e.Z)(ge,"guardians[0].address",{latitude:"",longitude:""});ne={latitude:pe.latitude||"",longitude:pe.longitude||""}}return ne}setRestApplicationPlacesAtBeginning(ge,ne){const pe=["id","organizationActivityFocuses","organizationLanguageFocuses"];return(0,o.Z)(ne)?[]:((0,o.Z)(ge)||(ne=this.mapEmptyFocusesToOrganizations(ne),ge.forEach(Pe=>{const xe=ne.findIndex(de=>w.cQ.compareObjectProperties(de,Pe,pe));xe>=0&&(ne=[...w.cQ.reorderArray(ne,{from:xe,to:Pe.preferenceChoice})])})),ne)}mapEmptyFocusesToOrganizations(ge){return ge.map(ne=>{ne.organizationActivityFocuses=ne.organizationActivityFocuses||[],ne.organizationLanguageFocuses=ne.organizationLanguageFocuses||[]}),ge}setSelectedCareTimeTypes(ge){this.selectedCareTimeTypes$.next(ge)}mapADAListOfOrganizationsToFlatListOfOrganizations(ge){return ge.map(ne=>({...ne,serviceForm:ne.organizationType||ne.serviceForm,languageFocus:(0,e.Z)(ne,"organizationLanguageFocuses[0].languageCode")||(0,e.Z)(ne,"languageFocus"),languageExtent:(0,e.Z)(ne,"organizationLanguageFocuses[0].extent")||(0,e.Z)(ne,"languageExtent"),activityFocus:(0,e.Z)(ne,"organizationActivityFocuses[0].activityFocusCode")||(0,e.Z)(ne,"activityFocus")}))}prepareEducationalOrganizations(ge,ne){return ge?this.mapADAListOfOrganizationsToFlatListOfOrganizations(ge).map((Pe,xe)=>{const{id:de,name:re,organizationType:oe,organizationFormat:me,languageFocus:be,languageExtent:le,activityFocus:Z}=Pe;return{id:de,name:re,organizationType:oe,organizationFormat:me,preferenceChoice:xe,additionalText:this.getUnitFocusDetails(Pe,ne),...be&&{languageFocus:be},...le&&{languageExtent:le},...Z&&{activityFocus:Z},...Pe}}):[]}updateRestApplicationPlaces(ge){return ge.map((ne,pe)=>{ne.preferenceChoice=pe}),ge}updateMoreInformationMessage(ge=[],ne,pe,Pe){const xe=ge.findIndex(re=>re.infoType===ne),de={infoType:ne,moreInfo:pe,value:Pe};return xe>-1&&(de.id=ge[xe].id),w.cQ.patchCollectionBy(ge,de,"infoType")}setNoDefaultMoreInfoValue(ge){const{value:ne}=ge;return{...ge,value:"no"===ne?"":ne}}getMoreInfosPayload(ge,ne){const pe=this.getMoreInfosIndex(ne,ge);let Pe={infoType:ge,value:"no"};if(pe>-1){const{moreInfo:xe,value:de,infoType:re}=ne[pe];Pe={...Pe,value:de,infoType:re,info:xe}}return Pe}getUnitFocusDetails(ge,ne){if((0,o.Z)(ge))return;const pe=[],{languageFocus:Pe,languageExtent:xe,activityFocus:de}=ge,re=(ne||[]).find(oe=>Pe&&oe.code===Pe.toUpperCase())?.name||Pe;return pe.push(re),pe.push(xe),pe.push(de),w.cQ.capitalizeString(pe.filter(oe=>!!oe).map(oe=>this.translate.instant(oe)).join(", "))}getUnitFocusesTextWithBrackets(ge,ne,pe=!0){if(!ge)return"";const{name:Pe,organizationFormat:xe,organizationType:de}=ge;if(de===w.V6.DAYCAREPLACE_TYPE_FAMILY_DAYCARE||ge.familyDaycare)return`${this.translate.instant(w.V6.DAYCAREPLACE_TYPE_FAMILY_DAYCARE)} (${Pe})`;const re=xe===w.V6.ORGANIZATION_FORMAT_PRIVATE,oe=pe&&re?`${this.translate.instant(w.V6.ORGANIZATION_FORMAT_PRIVATE)}`:"",be=[this.getUnitFocusDetails(ge,ne),oe].filter(Z=>Z).join(", ");return Pe+((0,o.Z)(be)?"":` (${be})`)}getLocaleByLanguageCode(ge,ne){if((0,o.Z)(ge))return console.warn("empty language code"),"Organization.Unit.Error.Backend.null.value.exception";if((0,o.Z)(ne))return ge;const pe=ne.find(Pe=>Pe.code.toUpperCase()===ge.toUpperCase());return pe?pe.name:ge}getLanguageOptions(){return this.languageService.getLanguageList(this.translate.currentLang).pipe((0,n.q)(1))}isEmploymentInvalid(ge,ne=!1){if(!ge)return!0;const pe=this.checkGuardianIsEmpty(ge),Pe=(0,o.Z)(ge.personEmployment);return ne?!pe&&Pe:Pe}isEmploymentRequired(ge,ne=!1){const pe=this.checkGuardianIsEmpty(ge),Pe=(0,o.Z)(ge?.personEmployment);return!!ne||(!pe||!Pe)}checkGuardianIsEmpty(ge){if(!ge)return!0;const ne=(({firstNames:pe,lastName:Pe,preferredFirstName:xe,phone:de,email:re,pin:oe})=>({firstNames:pe,lastName:Pe,preferredFirstName:xe,phone:de,email:re,pin:oe}))(ge);return!Object.values(ne).some(pe=>pe)}getPreferredPlaceText(ge){return(0,o.Z)(ge)||Object.values(ge).some(ne=>""===ne||void 0)?"":ge.streetAddress+", "+ge.postOffice+", "+ge.zipcode}initEnrolmentInformation(ge){if(ge.applicationLanguage||(ge.applicationLanguage=[]),ge.type===w.wW.PPEWITHECEC&&!ge.ececDesiredStartDate&&ge.desiredStartDate&&(ge.ececDesiredStartDate=ge.desiredStartDate),!ge.preferredLocation)try{const ne=ge.guardians[0].address;ge.preferredLocation={streetAddress:ne.streetAddress,postOffice:ne.postOffice,zipcode:ne.zipcode,latitude:ne.latitude,longitude:ne.longitude}}catch(ne){console.log(ne),ge.preferredLocation={}}return ge}isEmptyGuardian(ge){const ne=[...ge.contacts||[]],pe=(0,e.Z)(ne,"[0].contact.value"),Pe=(0,e.Z)(ne,"[1].contact.value"),xe=[...ge.address||[]],de=(0,e.Z)(xe,"[0].address.city"),re=(0,l.Z)(ge,["firstName","lastName","preferedFirstName","pin"]);return!((0,o.Z)(re)||Object.values(re).some(me=>!(0,o.Z)(me))||!(0,o.Z)(Pe)||!(0,o.Z)(pe)||!(0,o.Z)(de))}updateGuardian(ge,ne,pe){return ne?(this.checkGuardianIsEmpty(ne)?ge.applicationPeople[0].applicationPerson.guardians.splice(pe,1):ge.guardians[pe]={...ge.guardians[pe],...ne},ge):null}getMoreInfosIndex(ge,ne){return ge.findIndex(pe=>pe.infoType===ne)}getMoreInformationMessage(ge,ne){let pe="";if(ge){const Pe=ge.find(xe=>xe.infoType===ne);pe=Pe?Pe.moreInfo:""}return pe}getApplicationState({state:ge}){return this.auth.isGuardian()?this.getApplicationStateForGuardian(ge):`General.Status.${ge}`}getApplicationStateForGuardian(ge){return this.hiddenStatesForGuardian.some(ne=>ne===ge)?"General.Status.IN_HANDLING":ge===w.Qt.BACK_FROM_HANDLING?"General.Status.WaitingForHandling":ge===w.Qt.DISAPPROVED?"General.Status.FINAL":`General.Status.${ge}`}getServiceFormats(){const ge=[{value:w.V6.DAYCAREPLACE_TYPE_DAYCARE_CENTRE,text:this.translate.instant("sivi.organization.type.daycareplace.type.daycarecentre")},{value:w.V6.DAYCAREPLACE_TYPE_FAMILY_DAYCARE,text:this.translate.instant("sivi.organization.type.daycareplace.type.familydaycare")},{value:w.V6.DAYCAREPLACE_TYPE_GROUP_FAMILY_DAYCARE,text:this.translate.instant("sivi.organization.type.daycareplace.type.groupfamilydaycare")},{value:w.gT.NO_SERVICE_FORMAT,text:this.translate.instant("General.None")}];return this.selectedCareTimeTypes$.pipe((0,P.U)(pe=>1===pe.length&&pe[0].type===V.DefaultWeeklyCareTimeOptions.MON_FRI?ge:ge.filter(Pe=>Pe.value!==w.V6.DAYCAREPLACE_TYPE_FAMILY_DAYCARE)))}getLanguageSelectOptions(){return[{value:"fi",text:"General.Language.Finnish"},{value:"sv",text:"General.Language.Swedish"},{value:"en",text:"General.Language.English"}]}getNoEcecOption(){return{element:{text:this.translate.instant("Application.NoCurrentECEC"),additionalText:""},value:{areaId:""}}}getTranslationKey(ge){switch(ge){case w.V6.ORGANIZATION_TYPE_AREA:return"ECEC.Application.Instructions.FamilyDaycare";case w.V6.DAYCAREPLACE_TYPE_GROUP_FAMILY_DAYCARE:return"ECEC.Application.Instructions.AnyGroupFamilyDaycarePlace";default:return"ECEC.Application.Instructions.AnyDaycarePlace"}}isDesiredDateInsidePeriods(ge,ne,pe){return!!(ne&&pe&&pe.length)&&pe.some(Pe=>{const{startDate:xe,endDate:de}=ge===w.wW.CLUB?{startDate:Pe.clubPeriodStart,endDate:Pe.clubPeriodEnd}:{startDate:Pe.periodStart,endDate:Pe.periodEnd};return w.cQ.isDateBetweenRangeInclusive(Y()(ne),xe,de)})}getCurrentAndFuturePeriods(ge,ne,pe){return pe.filter(Pe=>{const{endDate:xe}=ge===w.wW.CLUB?{endDate:Pe.clubPeriodEnd}:{endDate:Pe.periodEnd};return Y()(xe).diff(ne,"days")>=0}).reverse()}validateDateIsInsidePeriods(ge,ne){return pe=>pe.value?this.isDesiredDateInsidePeriods(ge,pe.value,ne)?null:{dateIsOutOfPeriods:!0}:null}};let X=ve;ve.\u0275fac=function(ne){return new(ne||ve)(ue.LFG(he.e8),ue.LFG(ae.sK),ue.LFG(V.LanguageService),ue.LFG(he.ey),ue.LFG(V.OrganizationService))},ve.\u0275prov=ue.Yz7({token:ve,factory:ve.\u0275fac})},11218:(qe,I,p)=>{"use strict";p.d(I,{p:()=>P});var o=p(15861),e=p(14177),l=p(61135),D=p(94650),g=p(89383),E=p(88692),T=p(35796),n=p(94973);const w=class{constructor(Y,V,ue,he,ae){this.translate=Y,this.languageService=V,this.organizationService=ue,this.geoLocationService=he,this.applicationUtils=ae,this.showQuickHandling$=new l.X(!1),this.quickHandlingOptions$=new l.X([]),this.hideECECFields$=new l.X({date:!1,reason:!1}),this.unitList$=new l.X([]),this.currentLang=this.translate.currentLang,this.application$=new l.X(null)}setApplication(Y){var V=this;return(0,o.Z)(function*(){V.application$.next(Y),yield V.setLanguageList()})()}getApplication(){return this.application$}getSiblingsAtSamePlace(){return this.getApplicationValue().siblingsAtSameUnit?this.translate.instant("General.Text.Yes"):"-"}resetApplication(){this.application$.next(null)}getPreferredEducationalLocation(){const Y=this.getApplicationValue().preferredLocation;let V="-";if(Y){const{streetAddress:ue,postOffice:he,zipcode:ae}=Y;ue&&he&&ae&&(V=ue+", "+he+", "+ae)}return V}getChildOtherLanguages(){const Y=this.getApplicationValue().child.otherLanguages;return this.getLanguageText((0,e.Z)(Y)?Y:[Y])}getCommunicationLanguage(Y){return this.getLanguageText([Y])}getGuardianMotherTongue(Y){return this.getLanguageText([Y])}getChildMotherTongue(){return this.getLanguageText([this.getApplicationValue().child.motherTongue])}getDesiredOrgLanguages(){return this.getLanguageText(this.getApplicationValue().preferredLanguages)}getPreferredEducationPlaces(){const Y=[];return(this.getApplicationValue().selectedUnits||[]).forEach(V=>{V.id&&Y.push(this.applicationUtils.getUnitFocusesTextWithBrackets(V,this.languagesList))}),Y&&Y.length?Y.join(", "):"-"}getCurrentUnitName(){var Y=this;return(0,o.Z)(function*(){const V=Y.getApplicationValue();if(V.currentUnit){const ue=yield Y.organizationService.getOrganization(V.currentUnit).toPromise();return ue?ue.name:(yield Y.geoLocationService.findGeoAreaById(V.currentUnit).toPromise()).name}return V.inOtherMunicipality?Y.translate.instant("Application.InOtherMunicipality"):Y.translate.instant("Application.NoCurrentECEC")})()}setLanguageList(){var Y=this;return(0,o.Z)(function*(){(!Y.languagesList||Y.currentLang!==Y.translate.currentLang)&&(Y.currentLang=Y.translate.currentLang,Y.languagesList=yield Y.languageService.getLanguageList(Y.currentLang).toPromise())})()}getApplicationValue(){return this.application$.getValue()}getLanguageText(Y){if(!this.languagesList)return"-";return this.languageService.getSelectedLanguagesText(Y,this.languagesList)||"-"}};let P=w;w.\u0275fac=function(V){return new(V||w)(D.LFG(g.sK),D.LFG(E.LanguageService),D.LFG(E.OrganizationService),D.LFG(T.u),D.LFG(n.q))},w.\u0275prov=D.Yz7({token:w,factory:w.\u0275fac})},14345:(qe,I,p)=>{"use strict";p.d(I,{y:()=>Pe});var o=p(15861),e=p(49594),l=p(39646),D=p(95698),g=p(28746),E=p(95577),T=p(70262),n=p(88692),P=p(45134),w=p(94650),B=p(89383),Y=p(31943),V=p(9116),ue=p(36895),he=p(70191);const ae=["contentLoader"];function X(de,re){if(1&de){const oe=w.EpF();w.TgZ(0,"sivi-lib-select",13),w.NdJ("siviChange",function(be){w.CHM(oe);const le=w.oxw();return w.KtG(le.onChangeMunicipality(be))}),w.ALo(1,"translate"),w.ALo(2,"translate"),w.qZA()}if(2&de){const oe=w.oxw();w.Q6J("value",null==oe.applicationPayload?null:oe.applicationPayload.municipalityId)("viewMode",!oe.canChangeMunicipality)("options",oe.municipalityOptions)("label",w.lcZ(2,7,"Municipality.Singular")),w.uIk("aria-label",w.lcZ(1,5,"Municipality.Singular"))}}function ve(de,re){1&de&&(w.TgZ(0,"div"),w._UZ(1,"ion-spinner",14),w.qZA())}function ye(de,re){if(1&de){const oe=w.EpF();w.TgZ(0,"sivi-lib-radio-list",18),w.NdJ("siviChange",function(be){w.CHM(oe);const le=w.oxw(2);return w.KtG(le.onChildChange(be))}),w.qZA()}if(2&de){const oe=w.oxw(2);w.Q6J("options",oe.childOptions)("value",(null==oe.application||null==oe.application.child?null:oe.application.child.pin)||(null==oe.application||null==oe.application.child?null:oe.application.child.id))}}function ge(de,re){if(1&de&&w._UZ(0,"cgi-input",19),2&de){const oe=w.oxw(2);w.Q6J("viewMode",!0)("value",oe.child.firstName+" "+oe.child.lastName)}}function ne(de,re){1&de&&(w.TgZ(0,"div",20)(1,"h6"),w._uU(2),w.ALo(3,"translate"),w.qZA()()),2&de&&(w.xp6(2),w.Oqu(w.lcZ(3,1,"Application.PRC.NoChildrenOptions")))}function pe(de,re){if(1&de&&(w.YNc(0,ye,1,2,"sivi-lib-radio-list",15),w.YNc(1,ge,1,2,"ng-template",null,16,w.W1O),w.YNc(3,ne,4,3,"div",17)),2&de){const oe=w.MAs(2),me=w.oxw();w.Q6J("ngIf",!me.child)("ngIfElse",oe),w.xp6(3),w.Q6J("ngIf",!me.childOptions.length&&!me.child)}}const xe=class extends n.SiviPage{constructor(re,oe,me,be,le,Z,Oe,j,ke,Be,nt){super(me,re,le,be,Be,Oe),this.translate=re,this.appState=oe,this.notifyService=me,this.route=be,this.router=le,this.personService=Z,this.modalCtrl=Oe,this.organizationService=j,this.authService=ke,this.location=Be,this.settings=nt,this.applicationPayload={child:{},municipalityId:"",guardianId:"",guardianPin:"",applicationType:""},this.children=[],this.childOptions=[],this.options={page:n.Constants.PAGE_NUMBER_FIRST,count:n.Constants.HIGH_API_RESPONSES},this.defaultMunicipality=null,this.canChangeMunicipality=!0,this.loadingDependents=!1,this.municipalityOptions=[],this.applicationTypeOptions=[]}ionViewWillEnter(){this.applicationTypeOptions=this.activeApplicationTypes.map(re=>({value:re,text:"Application.Type."+re})),this.application?this.application={...this.application,type:this.application.type===n.ApplicationTypes.PPEWITHECEC?n.ApplicationTypes.PPE:this.application.type}:this.application={id:""},this.childSelected=!!this.child,this.settings.getUserSettingsByKey("selectedMunicipality").pipe((0,D.q)(1),(0,g.x)(()=>this.getData())).subscribe(re=>{this.defaultMunicipality=re.value})}onDismiss(){this.modalCtrl.removeQueryParam("municipality"),this.modalCtrl.dismiss(null)}getData(){this.loadingDependents=!0,this.contentLoader.showLoader(),this.authService.getUserPersonData().pipe((0,D.q)(1),(0,E.z)(re=>(this.applicationPayload.guardianId=re.userId,this.organizationService.getMunicipalities(n.Constants.PAGE_NUMBER_FIRST,n.Constants.MAX_API_RESPONSES))),(0,E.z)(re=>{this.municipalities=re.content;const oe=this.getDefaultMunicipality(this.municipalities,this.defaultMunicipality);return!this.application?.municipalityId&&oe&&(this.applicationPayload.municipalityId=oe.municipalityId),this.municipalityOptions=this.getMunicipalityData(this.municipalities),this.getChildrenForGuardian()}),(0,T.K)(re=>(console.error(re),(0,l.of)([])))).subscribe(re=>{this.loadingDependents=!1,this.children=re||[],this.child?(this.applicationPayload.child=this.child,this.childSelected=!0):console.log("No child was received by parameter"),this.childOptions=this.createChildOptions(this.children),this.contentLoader.hideLoader()},re=>{this.loadingDependents=!1,console.error(re,"failed to get data"),this.contentLoader.showError()})}getChildrenForGuardian(){return this.personService.getGuardianDependents().pipe((0,D.q)(1))}onCreateApplication(){const re=(0,e.Z)(this.applicationPayload,"guardianId");re?(this.modalCtrl.removeQueryParam("municipality"),this.openMunicipalityCommunicationPreferencesDialog(re)):console.warn("no guardian id")}openMunicipalityCommunicationPreferencesDialog(re){var oe=this;return(0,o.Z)(function*(){const me={component:P.F,componentProps:{guardianId:re},cssClass:"modal-large-size"},be=yield oe.openModal(me,"communication-preferences");return be.onDidDismiss().then(le=>{le.data&&oe.modalCtrl.dismiss(oe.applicationPayload,void 0,"basic-info-modal")}),yield be.present()})()}onChildChange(re){const oe=re.detail.value;oe&&(this.applicationPayload.child=11===oe.length?this.getChildByPin(oe):this.getChildById(oe),this.childSelected=!0)}onApplicationTypeChange(re){const oe=re.detail.value;oe&&(this.applicationPayload.applicationType=oe,this.applicationTypeSelected=!0)}onChangeMunicipality(re){const oe=re.municipality;this.childOptions=[],this.loadingDependents=!0,this.childSelected=!1,this.applicationPayload.child={};const me=this.municipalities.find(be=>be.id===oe);me.municipalityId=me.id,this.application.municipalityId=me.id,this.application.municipalityName=me.name,this.getChildrenForGuardian().pipe((0,D.q)(1)).subscribe(be=>{this.children=be||[],this.childOptions=this.createChildOptions(this.children),this.loadingDependents=!1,0===this.children.length&&(this.childSelected=!1),this.child&&this.child.pin&&(this.applicationPayload.child=this.child,this.childSelected=!0)})}getDefaultMunicipality(re,oe){let me;const le=this.checkQueryMunicipality(re)||oe;return re.forEach(Z=>{Z.municipalityNumber===le&&(me=Z)}),me}checkQueryMunicipality(re){const oe=this.route.snapshot.queryParams.municipality;if(!oe)return;const me=re.find(be=>be.municipalityNumber===oe);return me?(this.canChangeMunicipality=!1,me.municipalityNumber):void 0}getMunicipalityData(re){let oe=[];return re.length>0&&(oe=n.Utils.getSelectOptionsFromArray(re,"id","name")),oe}createChildOptions(re){const oe=[];if(Array.isArray(re)&&re.length)for(const me of re)oe.push({value:me.pin?me.pin:me.id,text:me.firstName+" "+me.lastName});else console.warn("createChildOptions children not found",re);return oe}getChildByPin(re){return this.children.find(oe=>oe.pin===re)}getChildById(re){return this.children.find(oe=>oe.id===re)}};let Pe=xe;xe.\u0275fac=function(oe){return new(oe||xe)(w.Y36(B.sK),w.Y36(Y.ZQ),w.Y36(n.NotifyService),w.Y36(V.gz),w.Y36(V.F0),w.Y36(Y.R_),w.Y36(n.SiviModalController),w.Y36(n.OrganizationService),w.Y36(Y.e8),w.Y36(ue.Ye),w.Y36(n.UserSettingsService))},xe.\u0275cmp=w.Xpm({type:xe,selectors:[["sivi-organizations-staff-basic-info-modal"]],viewQuery:function(oe,me){if(1&oe&&w.Gf(ae,7),2&oe){let be;w.iGM(be=w.CRH())&&(me.contentLoader=be.first)}},inputs:{child:"child",application:"application",activeApplicationTypes:"activeApplicationTypes"},features:[w.qOj],decls:29,vars:22,consts:[[1,"ion-padding"],["contentLoader",""],[1,"application"],[3,"text"],["name","municipality",3,"value","viewMode","options","label","siviChange",4,"ngIf"],[1,"weight-600","great"],[4,"ngIf","ngIfElse"],["childList",""],["name","applicationType",3,"options","value","siviChange"],[1,"button-container"],[1,"position"],["color","primary",3,"disabled","click"],["color","primary","fill","outline",3,"click"],["name","municipality",3,"value","viewMode","options","label","siviChange"],["name","crescent","color","secondary"],["name","child",3,"options","value","siviChange",4,"ngIf","ngIfElse"],["oneChild",""],["class","progress-bar-filler",4,"ngIf"],["name","child",3,"options","value","siviChange"],["type","text",3,"viewMode","value"],[1,"progress-bar-filler"]],template:function(oe,me){if(1&oe&&(w.TgZ(0,"ion-content",0)(1,"sivi-lib-content-loader",null,1)(3,"div",2)(4,"div")(5,"h1"),w._uU(6),w.ALo(7,"translate"),w._UZ(8,"sivi-lib-info-popup",3),w.qZA()(),w.YNc(9,X,3,9,"sivi-lib-select",4),w.TgZ(10,"ion-label",5),w._uU(11),w.ALo(12,"translate"),w.qZA(),w.YNc(13,ve,2,0,"div",6),w.YNc(14,pe,4,3,"ng-template",null,7,w.W1O),w.TgZ(16,"ion-label",5),w._uU(17),w.ALo(18,"translate"),w.qZA(),w.TgZ(19,"sivi-lib-radio-list",8),w.NdJ("siviChange",function(le){return me.onApplicationTypeChange(le)}),w.qZA()(),w.TgZ(20,"div",9)(21,"ion-grid")(22,"ion-row",10)(23,"ion-button",11),w.NdJ("click",function(){return me.onCreateApplication()}),w._uU(24),w.ALo(25,"translate"),w.qZA(),w.TgZ(26,"ion-button",12),w.NdJ("click",function(){return me.onDismiss()}),w._uU(27),w.ALo(28,"translate"),w.qZA()()()()()()),2&oe){const be=w.MAs(15);w.xp6(6),w.hij(" ",w.lcZ(7,12,"ECEC.Application.NewApplication")," "),w.xp6(2),w.s9C("text","Application.New.Info"),w.xp6(1),w.Q6J("ngIf",me.municipalities),w.xp6(2),w.Oqu(w.lcZ(12,14,"Application.Subject.Child")),w.xp6(2),w.Q6J("ngIf",me.loadingDependents)("ngIfElse",be),w.xp6(4),w.Oqu(w.lcZ(18,16,"Application.Type")),w.xp6(2),w.Q6J("options",me.applicationTypeOptions)("value",null==me.application?null:me.application.type),w.xp6(4),w.Q6J("disabled",!me.applicationPayload.municipalityId||!me.childSelected||!me.applicationTypeSelected),w.xp6(1),w.hij(" ",w.lcZ(25,18,"General.Buttons.Create")," "),w.xp6(3),w.hij(" ",w.lcZ(28,20,"General.Buttons.Cancel")," ")}},dependencies:[n.InfoPopupComponent,he.YG,he.W2,he.jY,he.Q$,he.Nd,he.PQ,ue.O5,n.ContentLoaderComponent,n.RadioListComponent,n.SelectComponent,B.X$],styles:["[_nghost-%COMP%]{--padding-bottom: 0}.application[_ngcontent-%COMP%]{overflow-y:auto;height:calc(100% - 60px);position:relative}.application[_ngcontent-%COMP%]   h6[_ngcontent-%COMP%]{color:var(--ion-color-warning)}.button-container[_ngcontent-%COMP%]{background-color:var(--ion-color-primary-contrast);bottom:-16px;right:30px;height:64px;margin-bottom:-16px;position:fixed;position:sticky}.button-container[_ngcontent-%COMP%]   .position[_ngcontent-%COMP%]{flex-direction:row-reverse}@media (max-width: 600px){.button-container[_ngcontent-%COMP%]   ion-grid[_ngcontent-%COMP%]{padding:0}}.great[_ngcontent-%COMP%]{margin-top:1em;display:block}.progress-bar-filler[_ngcontent-%COMP%]{min-height:7px}"]})},895:(qe,I,p)=>{"use strict";p.d(I,{x:()=>ae});var o=p(24956),e=p(94650),l=p(89383),D=p(31943),g=p(9116),E=p(88692),T=p(36895),n=p(15861),P=p(95698),w=p(45134),B=p(49594),Y=p(70191);const V=["contentLoader"],X=class extends o.xv{constructor(ge,ne,pe,Pe,xe,de,re,oe,me){super(ne,ge,pe,Pe,me,re),this.translate=ge,this.notifyService=ne,this.router=pe,this.route=Pe,this.personService=xe,this.appStateService=de,this.modalCtrl=re,this.auth=oe,this.location=me,this.continue=new e.vpe,this.cancel=new e.vpe,this.twoYearPPE="TWO_YEAR_PPE",this.applicationTypeOptions=[]}ngOnInit(){this.getApplicationTypeOptions(),this.instantiateChildInfo(),this.getGuardians(this.child.id),this.getProfessionalMunicipality()}getApplicationTypeOptions(){const ge=this.activeApplicationTypes.map(Pe=>({value:Pe,text:"Application.Type."+Pe})),ne={text:"Placement.View.PlacementType.PPETrial",value:this.twoYearPPE},pe=()=>{this.applicationTypeOptions.length>2?this.applicationTypeOptions.splice(2,0,ne):this.applicationTypeOptions.push(ne)};this.auth.hasAnyRole([E.Roles.MUNICIPALITY_ADMIN])?(this.applicationTypeOptions=[...ge],pe()):this.auth.hasAnyRole([E.Roles.SERVICE_ADVISER])?(this.applicationTypeOptions=[...ge],this.auth.hasAnyRole([E.Roles.ECEC_SERVICE_COUNSELOR])&&pe()):this.auth.hasAnyRole([E.Roles.ECEC_SERVICE_COUNSELOR])&&pe()}instantiateChildInfo(){this.application={guardians:[],child:this.child,...this.application}}onCreate(){const ge=(0,B.Z)(this.application,"guardians[0].id");ge?(this.application.type===this.twoYearPPE&&(this.application.type=o.wW.PPE,this.application.twoYear=!0),this.openMunicipalityCommunicationPreferencesDialog(ge)):console.warn("no guardian id")}onCancel(){this.cancel.emit()}openMunicipalityCommunicationPreferencesDialog(ge){var ne=this;return(0,n.Z)(function*(){const pe={component:w.F,componentProps:{guardianId:ge},cssClass:"modal-large-size"};(yield ne.openModal(pe,"communication-preferences")).onDidDismiss().then(xe=>{xe.data&&ne.modalCtrl.dismiss(ne.application,void 0,"basic-info-modal")})})()}updateGuardianContacts(ge,ne,pe){const Pe=ge.guardians.findIndex(xe=>xe.id===pe);if(Pe){const xe=ne.find(re=>re.contact.contactTypeCode===o.AV.EMAIL),de=ne.find(re=>re.contact.contactTypeCode===o.AV.PHONE);xe&&(ge.guardians[Pe].email=xe.contact.value),de&&(ge.guardians[Pe].phone=de.contact.value)}return ge}onApplicationGuardianChange(ge){const ne=this.application.guardians.filter(Pe=>Pe.id!==ge.detail.value),pe=this.allGuardians.find(Pe=>Pe.id===ge.detail.value);pe&&(this.application.guardians=[pe,...ne],this.guardianSelected=!0)}onApplicationTypeChange(ge){this.application.type=ge.detail.value,this.applicationTypesSelected=!0}getGuardians(ge){this.personService.getGuardians(ge).pipe((0,P.q)(1)).subscribe(ne=>{this.allGuardians=ne,this.createGuardianOptions(ne)},ne=>{console.error("failed to retrieve guardians",ne)})}getProfessionalMunicipality(){this.appStateService.getMunicipality().pipe((0,P.q)(1)).subscribe(ge=>{this.application.municipalityId=ge.id,this.application.municipalityName=ge.name})}createGuardianOptions(ge){Array.isArray(ge)&&ge.length&&(this.guardiansOptions=E.Utils.getSelectOptionsFromArray(ge,"id","firstName","lastName"))}};let ue=X;function he(ye,ge){if(1&ye){const ne=e.EpF();e.TgZ(0,"sivi-basic-child-application",1),e.NdJ("continue",function(Pe){e.CHM(ne);const xe=e.oxw();return e.KtG(xe.onContinue(Pe))})("cancel",function(){e.CHM(ne);const Pe=e.oxw();return e.KtG(Pe.onCancel())}),e.qZA()}if(2&ye){const ne=e.oxw();e.Q6J("child",ne.child)("application",ne.application)("activeApplicationTypes",ne.activeApplicationTypes)}}X.\u0275fac=function(ne){return new(ne||X)(e.Y36(l.sK),e.Y36(D.c),e.Y36(g.F0),e.Y36(g.gz),e.Y36(D.R_),e.Y36(D.ZQ),e.Y36(E.SiviModalController),e.Y36(D.e8),e.Y36(T.Ye))},X.\u0275cmp=e.Xpm({type:X,selectors:[["sivi-basic-child-application"]],viewQuery:function(ne,pe){if(1&ne&&e.Gf(V,7),2&ne){let Pe;e.iGM(Pe=e.CRH())&&(pe.contentLoader=Pe.first)}},inputs:{child:"child",application:"application",activeApplicationTypes:"activeApplicationTypes"},outputs:{continue:"continue",cancel:"cancel"},features:[e.qOj],decls:28,vars:25,consts:[[1,"ion-padding"],[1,"container"],["contentLoader",""],[1,"application"],[1,"title"],[3,"text"],["type","text",3,"label","value","viewMode"],[1,"mt2","mb1"],["name","applicationType",3,"options","value","siviChange"],["name","applicationGuardian",3,"options","siviChange"],[1,"button-container"],[1,"position"],["color","primary","data-cy","basic-child-application-create",3,"disabled","click"],["color","primary","fill","outline","data-cy","basic-child-application-cancel",3,"click"]],template:function(ne,pe){1&ne&&(e.TgZ(0,"ion-content",0)(1,"sivi-lib-content-loader",1,2)(3,"div",3)(4,"div",4)(5,"h1"),e._uU(6),e.ALo(7,"translate"),e.qZA(),e._UZ(8,"sivi-lib-info-popup",5),e.qZA(),e._UZ(9,"cgi-input",6),e.ALo(10,"translate"),e.TgZ(11,"h2",7),e._uU(12),e.ALo(13,"translate"),e.qZA(),e.TgZ(14,"sivi-lib-radio-list",8),e.NdJ("siviChange",function(xe){return pe.onApplicationTypeChange(xe)}),e.qZA(),e.TgZ(15,"h2",7),e._uU(16),e.ALo(17,"translate"),e.qZA(),e.TgZ(18,"sivi-lib-radio-list",9),e.NdJ("siviChange",function(xe){return pe.onApplicationGuardianChange(xe)}),e.qZA()(),e.TgZ(19,"div",10)(20,"ion-grid")(21,"ion-row",11)(22,"ion-button",12),e.NdJ("click",function(){return pe.onCreate()}),e._uU(23),e.ALo(24,"translate"),e.qZA(),e.TgZ(25,"ion-button",13),e.NdJ("click",function(){return pe.onCancel()}),e._uU(26),e.ALo(27,"translate"),e.qZA()()()()()()),2&ne&&(e.xp6(6),e.Oqu(e.lcZ(7,13,"ECEC.Application.NewApplication")),e.xp6(2),e.s9C("text","Application.New.Info"),e.xp6(1),e.Q6J("label",e.lcZ(10,15,"Application.Subject.Child"))("value",(null==pe.child?null:pe.child.firstName)+" "+(null==pe.child?null:pe.child.lastName))("viewMode",!0),e.xp6(3),e.Oqu(e.lcZ(13,17,"Application.Type")),e.xp6(2),e.Q6J("options",pe.applicationTypeOptions)("value",null==pe.application?null:pe.application.type),e.xp6(2),e.Oqu(e.lcZ(17,19,"Child.Guardian.Singular")),e.xp6(2),e.Q6J("options",pe.guardiansOptions),e.xp6(4),e.Q6J("disabled",!pe.guardianSelected||!pe.applicationTypesSelected),e.xp6(1),e.hij(" ",e.lcZ(24,21,"General.Buttons.Create")," "),e.xp6(3),e.hij(" ",e.lcZ(27,23,"General.Buttons.Cancel")," "))},dependencies:[E.InfoPopupComponent,Y.YG,Y.W2,Y.jY,Y.Nd,E.ContentLoaderComponent,E.RadioListComponent,l.X$],styles:[".container[_ngcontent-%COMP%]{display:flex;flex-direction:column;height:100%;justify-content:space-between}.application[_ngcontent-%COMP%]{max-width:100%;overflow-y:auto;height:calc(100% - 60px);position:relative;width:100%}.application[_ngcontent-%COMP%]   h1[_ngcontent-%COMP%]{color:var(--ion-color-secondary)}.button-container[_ngcontent-%COMP%]{background-color:var(--ion-color-primary-contrast);bottom:-16px;right:30px;height:64px;margin-bottom:-16px;position:fixed;position:sticky}.button-container[_ngcontent-%COMP%]   .position[_ngcontent-%COMP%]{flex-direction:row-reverse}@media (max-width: 600px){.button-container[_ngcontent-%COMP%]   ion-grid[_ngcontent-%COMP%]{padding:0}}.title[_ngcontent-%COMP%]{display:flex}.title[_ngcontent-%COMP%]   sivi-lib-info-popup[_ngcontent-%COMP%]{margin-top:auto;margin-left:10px;font-size:26px}"]});const ve=class extends o.xv{constructor(ge,ne,pe,Pe){super(ne,ge,pe),this.translate=ge,this.notifyService=ne,this.router=pe,this.modalCtrl=Pe,this.showBasicView=!0}onCreate(ge){this.modalCtrl.dismiss({...this.application,...ge})}onContinue(ge){this.application={...ge},this.showBasicView=!1}onBack(){this.showBasicView=!0}onCancel(){this.modalCtrl.dismiss(null)}};let ae=ve;ve.\u0275fac=function(ne){return new(ne||ve)(e.Y36(l.sK),e.Y36(D.c),e.Y36(g.F0),e.Y36(E.SiviModalController))},ve.\u0275cmp=e.Xpm({type:ve,selectors:[["sivi-new-child-application-modal"]],inputs:{child:"child",activeApplicationTypes:"activeApplicationTypes"},features:[e.qOj],decls:1,vars:1,consts:[[3,"child","application","activeApplicationTypes","continue","cancel",4,"ngIf"],[3,"child","application","activeApplicationTypes","continue","cancel"]],template:function(ne,pe){1&ne&&e.YNc(0,he,1,3,"sivi-basic-child-application",0),2&ne&&e.Q6J("ngIf",pe.showBasicView)},dependencies:[T.O5,ue],styles:["[_nghost-%COMP%], sivi-municipality-application[_ngcontent-%COMP%], sivi-basic-child-application[_ngcontent-%COMP%]{height:100%;margin-left:5px}"]})},61887:(qe,I,p)=>{"use strict";p.r(I),p.d(I,{LoginPageModule:()=>Ni});var o=p(9116),e=p(15861),l=p(88692),D=p(24956),g=p(94650),E=p(36895),T=p(89383);function n(ce,we){if(1&ce){const Qe=g.EpF();g.TgZ(0,"img",8),g.NdJ("click",function(){g.CHM(Qe);const Tn=g.oxw();return g.KtG(Tn.openStore(Tn.info.deviceCategoryType))}),g.ALo(1,"translate"),g.qZA()}2&ce&&g.Q6J("alt",g.lcZ(1,1,"Mobile.App.Distribution.AppStore"))}function P(ce,we){if(1&ce){const Qe=g.EpF();g.TgZ(0,"img",9),g.NdJ("click",function(){g.CHM(Qe);const Tn=g.oxw();return g.KtG(Tn.openStore(Tn.info.deviceCategoryType))}),g.ALo(1,"translate"),g.qZA()}2&ce&&g.Q6J("alt",g.lcZ(1,1,"Mobile.App.Distribution.GooglePlay"))}const Nn=class{openStore(we){"ios"===we?window.open(D.KV.AppStoreLink,"_blank"):"android"===we&&window.open(D.KV.GooglePlayLink,"_system")}};let w=Nn;Nn.\u0275fac=function(Qe){return new(Qe||Nn)},Nn.\u0275cmp=g.Xpm({type:Nn,selectors:[["sivi-version-modal"]],inputs:{info:"info"},decls:14,vars:8,consts:[[1,"update-modal-content"],[1,"icon-container"],["aria-hidden","true",1,"material-icons"],[1,"title-container"],[1,"text-container"],[1,"badges"],["src","assets/img/vesa-landing/appstore.svg",3,"alt","click",4,"ngIf","ngIfElse"],["android",""],["src","assets/img/vesa-landing/appstore.svg",3,"alt","click"],["src","assets/img/vesa-landing/googleplay.svg",3,"alt","click"]],template:function(Qe,qt){if(1&Qe&&(g.TgZ(0,"ion-content",0)(1,"div",1)(2,"i",2),g._uU(3," system_update_alt "),g.qZA()(),g.TgZ(4,"h3",3),g._uU(5),g.ALo(6,"translate"),g.qZA(),g.TgZ(7,"div",4),g._uU(8),g.ALo(9,"translate"),g.qZA(),g.TgZ(10,"div",5),g.YNc(11,n,2,3,"img",6),g.YNc(12,P,2,3,"ng-template",null,7,g.W1O),g.qZA()()),2&Qe){const Tn=g.MAs(13);g.xp6(5),g.Oqu(g.lcZ(6,4,"Mobile.App.Update.Required.Title")),g.xp6(3),g.Oqu(g.lcZ(9,6,"Mobile.App.Update.Required.Description")),g.xp6(3),g.Q6J("ngIf",qt.info&&"ios"===qt.info.deviceCategoryType)("ngIfElse",Tn)}},dependencies:[E.O5,T.X$],styles:[".update-modal-content[_ngcontent-%COMP%]   .scroll-content[_ngcontent-%COMP%]{overflow-y:auto}.update-modal-content[_ngcontent-%COMP%]   .icon-container[_ngcontent-%COMP%]{align-items:center;background-color:var(--ion-color-primary);display:flex;height:150px;justify-content:center}.update-modal-content[_ngcontent-%COMP%]   .icon-container[_ngcontent-%COMP%]   .material-icons[_ngcontent-%COMP%]{color:var(--ion-color-primary-contrast);font-size:120px;opacity:1;padding:10px 0}.update-modal-content[_ngcontent-%COMP%]   .title-container[_ngcontent-%COMP%], .update-modal-content[_ngcontent-%COMP%]   .text-container[_ngcontent-%COMP%]{padding:2rem 0;text-align:center}.update-modal-content[_ngcontent-%COMP%]   .badges[_ngcontent-%COMP%]{display:flex;justify-content:center;padding:2rem 0}.update-modal-content[_ngcontent-%COMP%]   .badges[_ngcontent-%COMP%]   a[_ngcontent-%COMP%]{margin:1rem}@media screen and (min-width: 600px){.update-modal-content[_ngcontent-%COMP%]   .icon-container[_ngcontent-%COMP%]{height:180px}.update-modal-content[_ngcontent-%COMP%]   .icon-container[_ngcontent-%COMP%]   .material-icons[_ngcontent-%COMP%]{font-size:138px}}"]});var B=p(61135),Y=p(39841),V=p(56451),ue=p(83905),he=p(60515),ae=p(82722),X=p(39300),ve=p(63900),ye=p(95698),ge=p(28746),ne=p(95577),pe=p(70262),Pe=p(64837),xe=p(88359),de=p(31943),re=p(18505),oe=p(70655),me=p(55419),be=p(69751),le=function(){function ce(we,Qe,qt){try{qt&&"string"!=typeof qt&&(qt=Object.keys(qt).map(function(Tn){return Tn+"="+qt[Tn]}).join(",")),this._objectInstance=cordova.InAppBrowser.open(we,Qe,qt)}catch{typeof window<"u"&&window.open(we,Qe),console.warn("Native: InAppBrowser is not installed or you are running on a browser. Falling back to window.open.")}}return ce.prototype._loadAfterBeforeload=function(we){return(0,me.e4)(this,"_loadAfterBeforeload",{sync:!0},arguments)},ce.prototype.show=function(){return(0,me.e4)(this,"show",{sync:!0},arguments)},ce.prototype.close=function(){return(0,me.e4)(this,"close",{sync:!0},arguments)},ce.prototype.hide=function(){return(0,me.e4)(this,"hide",{sync:!0},arguments)},ce.prototype.executeScript=function(we){return(0,me.e4)(this,"executeScript",{},arguments)},ce.prototype.insertCSS=function(we){return(0,me.e4)(this,"insertCSS",{},arguments)},ce.prototype.on=function(we){var Qe=this;return function(){if(!0===(0,me.G5)(Qe))return new be.y(function(qt){return Qe._objectInstance.addEventListener(we,qt.next.bind(qt)),function(){return Qe._objectInstance.removeEventListener(we,qt.next.bind(qt))}})}()},ce.prototype.on=function(we){var Qe=this;return function(){if(!0===(0,me.G5)(Qe))return new be.y(function(qt){return Qe._objectInstance.addEventListener(we,qt.next.bind(qt)),function(){return Qe._objectInstance.removeEventListener(we,qt.next.bind(qt))}})}()},ce}(),Z=function(ce){function we(){return null!==ce&&ce.apply(this,arguments)||this}return(0,oe.__extends)(we,ce),we.prototype.create=function(Qe,qt,Tn){return new le(Qe,qt,Tn)},we.pluginName="InAppBrowser",we.plugin="cordova-plugin-inappbrowser",we.pluginRef="cordova.InAppBrowser",we.repo="https://github.com/apache/cordova-plugin-inappbrowser",we.platforms=["AmazonFire OS","Android","Browser","iOS","macOS","Windows"],we.\u0275fac=function(){var Qe;return function(Tn){return(Qe||(Qe=g.n5z(we)))(Tn||we)}}(),we.\u0275prov=g.Yz7({token:we,factory:function(Qe){return we.\u0275fac(Qe)}}),we}(me.KY),Oe=p(38059);const pr=class{constructor(we,Qe,qt,Tn){this.platformHelper=we,this.inAppBrowser=Qe,this.loginProviders=qt,this.zone=Tn,this.loginParams$=new B.X(null),this.loginFlowInProcess$=new B.X(!1)}startLoginFlow(we){var Qe=this;return(0,e.Z)(function*(){if(yield Qe.loginFlowInProcess$.pipe((0,ye.q)(1)).toPromise())return!1;Qe.loginFlowInProcess$.next(!0);const Tn=Qe.platformHelper.isMobilePlatform(),lr=Tn?"_blank":"_self",mo=Qe.loginProviders.getCurrentStartUrl(we);if(Qe.inAppBrowserObject=Qe.inAppBrowser.create(mo,lr,Qe.getDefaultConfig()),Tn){const rr=Qe.inAppBrowserObject.on("loadstart").subscribe(aa=>Qe.onIABLoadStart(aa));Qe.inAppBrowserObject.on("exit").pipe((0,ye.q)(1),(0,re.b)(()=>rr.unsubscribe())).subscribe(()=>Qe.onIABExit(),aa=>console.error("iab exit failed",aa))}return!0})()}getLoginParams(){return this.loginParams$.asObservable()}onIABLoadStart(we){this.loginProviders.didCurrentProviderRedirect(we.url)&&this.zone.run(()=>{const qt=this.loginProviders.getCurrentLoginParams(we.url);this.loginParams$.next(qt),this.inAppBrowserObject.close()})}onIABExit(){this.loginFlowInProcess$.next(!1)}getDefaultConfig(){return{clearcache:"yes",cleardata:"yes",clearsessioncache:"yes",location:"no",footer:"yes",hideurlbar:"yes",hardwareback:"no",hidenavigationbuttons:"yes",toolbar:"yes",enableViewportScale:"yes"}}};let j=pr;pr.\u0275fac=function(Qe){return new(Qe||pr)(g.LFG(l.PlatformHelperService),g.LFG(Z),g.LFG(Oe.E),g.LFG(g.R0b))},pr.\u0275prov=g.Yz7({token:pr,factory:pr.\u0275fac});var ke=p(70191),Be=p(54004),nt=p(89947),mt=p(80529),ut=p(62669),Ve=p(53377);const Sn=class extends nt.i{constructor(we,Qe,qt){super(we,Qe,qt),this.http=we,this.authService=Qe,this.environmentService=qt}getVesaStatus(we){const qt=this.getCommonSearchOptions();return this.get("./api/sivi-accounts-api/vesa-version",qt).pipe((0,Be.U)(Tn=>{const lr=this.getVersionNumber(we),mo=this.getVersionNumber(Tn.minVersion);return{minVersion:mo,versionIsAllowed:this.isAllowedVersion(lr,mo),allowGuardian:Tn.allowGuardian,allowProfessional:Tn.allowProfessional}}))}getVersionNumber(we){const Qe=we.split("."),qt=Qe[2].split("-")[0];return{major:Number(Qe[0]),minor:Number(Qe[1]),revision:Number(qt)}}isAllowedVersion(we,Qe){return we.major>Qe.major||!(we.major<Qe.major)&&(we.minor>Qe.minor||!(we.minor<Qe.minor)&&we.revision>=Qe.revision)}};let tt=Sn;Sn.\u0275fac=function(Qe){return new(Qe||Sn)(g.LFG(mt.eN),g.LFG(ut.e),g.LFG(Ve.L))},Sn.\u0275prov=g.Yz7({token:Sn,factory:Sn.\u0275fac});var Ne=p(24006);function wt(ce,we){1&ce&&(g.TgZ(0,"a",7),g._UZ(1,"img",8),g.ALo(2,"translate"),g.qZA()),2&ce&&(g.xp6(1),g.Q6J("alt",g.lcZ(2,1,"Mobile.App.Distribution.AppStore")))}function ft(ce,we){1&ce&&(g.TgZ(0,"a",9),g._UZ(1,"img",10),g.ALo(2,"translate"),g.qZA()),2&ce&&(g.xp6(1),g.Q6J("alt",g.lcZ(2,1,"Mobile.App.Distribution.GooglePlay")))}function Ct(ce,we){}function rn(ce,we){1&ce&&g.YNc(0,Ct,0,0,"ng-template")}function He(ce,we){}function st(ce,we){1&ce&&g.YNc(0,He,0,0,"ng-template")}function nn(ce,we){}function Dn(ce,we){}function Mn(ce,we){if(1&ce&&(g.TgZ(0,"div",2),g.YNc(1,nn,0,0,"ng-template",11),g.YNc(2,Dn,0,0,"ng-template",11),g.qZA()),2&ce){g.oxw();const Qe=g.MAs(6),qt=g.MAs(8);g.xp6(1),g.Q6J("ngTemplateOutlet",Qe),g.xp6(1),g.Q6J("ngTemplateOutlet",qt)}}function vi(ce,we){if(1&ce&&(g.TgZ(0,"section",1)(1,"h3"),g._uU(2),g.ALo(3,"translate"),g.qZA(),g.TgZ(4,"div",2),g.YNc(5,wt,3,3,"ng-template",null,3,g.W1O),g.YNc(7,ft,3,3,"ng-template",null,4,g.W1O),g.YNc(9,rn,1,0,null,5),g.YNc(10,st,1,0,null,5),g.YNc(11,Mn,3,2,"div",6),g.ALo(12,"async"),g.qZA()()),2&ce){const Qe=g.MAs(6),qt=g.MAs(8),Tn=g.oxw();g.xp6(2),g.hij(" ",g.lcZ(3,6,"Mobile.App.Distribution.DownloadToDevice")," "),g.xp6(7),g.Q6J("ngIf",Tn.platform.is("ios"))("ngIfThen",Qe),g.xp6(1),g.Q6J("ngIf",Tn.platform.is("android"))("ngIfThen",qt),g.xp6(1),g.Q6J("ngIf",Tn.platform.is("desktop")||g.lcZ(12,8,Tn.isMobilePlatformWithRequestDesktopModeSubject$))}}const Pn=class{constructor(we,Qe){this.platform=we,this.platformHelperService=Qe,this.isMobilePlatformWithRequestDesktopModeSubject$=new B.X(!1)}ngOnInit(){this.loadPlatformData()}loadPlatformData(){this.isMobilePlatformWithRequestDesktopModeSubject$.next(this.platformHelperService.isMobilePlatformWithRequestDesktopMode())}};let Gi=Pn;function mi(ce,we){if(1&ce&&(g.TgZ(0,"p",5),g._uU(1),g.ALo(2,"async"),g.qZA()),2&ce){const Qe=g.oxw(2);g.xp6(1),g.hij(" ",g.lcZ(2,1,Qe.getTranslatedLabel("Message.Error.Maintenance.Login.Prevented"))," ")}}function wi(ce,we){if(1&ce){const Qe=g.EpF();g.ynx(0),g.YNc(1,mi,3,3,"p",3),g.TgZ(2,"button",4),g.NdJ("click",function(Tn){g.CHM(Qe);const lr=g.oxw();return Tn.preventDefault(),g.KtG(lr.startSingleSignOnProcess.emit(lr.loginProviderName.SUOMI))}),g.ALo(3,"async"),g._uU(4," Suomi.fi "),g.qZA(),g.BQk()}if(2&ce){const Qe=g.oxw();g.xp6(1),g.Q6J("ngIf",!Qe.vesaStatus.allowGuardian),g.xp6(1),g.Q6J("disabled",Qe.loadingLogin||!Qe.vesaStatus.allowGuardian),g.uIk("aria-label",g.lcZ(3,3,Qe.getTranslatedLabel("General.Login.SuomiFi.AriaLabel")))}}function Bn(ce,we){1&ce&&(g.ynx(0),g._UZ(1,"sivi-lib-spinner",6),g.BQk()),2&ce&&(g.xp6(1),g.Q6J("show",!0))}Pn.\u0275fac=function(Qe){return new(Qe||Pn)(g.Y36(ke.t4),g.Y36(l.PlatformHelperService))},Pn.\u0275cmp=g.Xpm({type:Pn,selectors:[["sivi-mobile-app-promo"]],decls:1,vars:1,consts:[["class","mobile-app-promo ion-text-center pt2 pb3",4,"ngIf"],[1,"mobile-app-promo","ion-text-center","pt2","pb3"],[1,"badges"],["ios",""],["android",""],[4,"ngIf","ngIfThen"],["class","badges",4,"ngIf"],["href","https://apps.apple.com/fi/app/cgi-vesa/id1477037174","target","_blank","location","yes",1,"badge"],["src","assets/img/vesa-landing/appstore.svg",3,"alt"],["href","https://play.google.com/store/apps/details?id=com.cgi.vesa","target","_blank","location","yes",1,"badge"],["src","assets/img/vesa-landing/googleplay.svg",3,"alt"],[3,"ngTemplateOutlet"]],template:function(Qe,qt){1&Qe&&g.YNc(0,vi,13,10,"section",0),2&Qe&&g.Q6J("ngIf",qt.platform.is("mobileweb")||qt.platform.is("desktop"))},dependencies:[E.O5,E.tP,E.Ov,T.X$],styles:[".mobile-app-promo[_ngcontent-%COMP%]{background-color:#ffffffe6;margin:-2vw 5vw 5vw}.mobile-app-promo[_ngcontent-%COMP%]   .badge[_ngcontent-%COMP%]{margin:1rem}"]});const Nt=class{constructor(we){this.translate=we,this.loadingLogin=!1,this.startSingleSignOnProcess=new g.vpe,this.loginProviderName=xe.M}getTranslatedLabel(we){return this.translate.stream(we)}};let kn=Nt;function On(ce,we){1&ce&&g._UZ(0,"ion-progress-bar",12)}function je(ce,we){if(1&ce&&(g.TgZ(0,"div")(1,"h1",13),g._uU(2),g.ALo(3,"async"),g.qZA()()),2&ce){const Qe=g.oxw();g.xp6(2),g.hij(" ",g.lcZ(3,1,Qe.getTranslatedLabel(Qe.labels.loginInProgress))," ")}}function Bt(ce,we){if(1&ce){const Qe=g.EpF();g.TgZ(0,"a",25),g.NdJ("click",function(){g.CHM(Qe);const Tn=g.oxw(3);return g.KtG(Tn.resetMunicipality())}),g._uU(1),g.ALo(2,"async"),g.qZA()}if(2&ce){const Qe=g.oxw(3);g.xp6(1),g.hij(" ",g.lcZ(2,1,Qe.getTranslatedLabel(Qe.labels.resetMunicipality))," ")}}function xn(ce,we){if(1&ce&&(g.TgZ(0,"ion-col",23)(1,"div",24),g._uU(2),g.ALo(3,"translate"),g.qZA(),g.YNc(4,Bt,3,3,"a",7),g.qZA()),2&ce){const Qe=g.oxw(2);g.xp6(2),g.hij(" ",g.lcZ(3,2,Qe.translateMunicipalityFromOptions(Qe.selectedMunicipality.value))," "),g.xp6(2),g.Q6J("ngIf",Qe.selectedMunicipality)}}Nt.\u0275fac=function(Qe){return new(Qe||Nt)(g.Y36(T.sK))},Nt.\u0275cmp=g.Xpm({type:Nt,selectors:[["sivi-guardian-login-form"]],inputs:{vesaStatus:"vesaStatus",loadingLogin:"loadingLogin"},outputs:{startSingleSignOnProcess:"startSingleSignOnProcess"},decls:6,vars:5,consts:[[1,"ion-text-center","p2"],[1,"ion-text-center"],[4,"ngIf"],["data-cy","maintenance-mode-enabled-guardian","class","ion-text-center form-error",4,"ngIf"],["data-cy","guardian-login-button","color","primary",3,"disabled","click"],["data-cy","maintenance-mode-enabled-guardian",1,"ion-text-center","form-error"],[3,"show"]],template:function(Qe,qt){1&Qe&&(g.TgZ(0,"div",0)(1,"p",1),g._uU(2),g.ALo(3,"async"),g.qZA(),g.YNc(4,wi,5,5,"ng-container",2),g.YNc(5,Bn,2,1,"ng-container",2),g.qZA()),2&Qe&&(g.xp6(2),g.hij(" ",g.lcZ(3,3,qt.getTranslatedLabel("General.Login.Info.Guardian"))," "),g.xp6(2),g.Q6J("ngIf",qt.vesaStatus),g.xp6(1),g.Q6J("ngIf",!qt.vesaStatus))},dependencies:[l.SpinnerComponent,E.O5,E.Ov],styles:["ion-button[_ngcontent-%COMP%], button[_ngcontent-%COMP%]{margin-bottom:24px;margin-top:24px;min-width:80%}button[_ngcontent-%COMP%]{background:var(--ion-color-primary, #3880ff);color:var(--ion-color-primary-contrast, #fff);height:36px;border-radius:4px;text-transform:uppercase;letter-spacing:1px;font-size:14px;box-shadow:0 3px 1px -2px #0003,0 2px 2px #00000024,0 1px 5px #0000001f}button[_ngcontent-%COMP%]:hover{background-color:#407080eb}.form-error[_ngcontent-%COMP%]{color:var(--ion-color-warning)}"]});const Fn=function(ce){return{selected:ce}};function ui(ce,we){if(1&ce&&(g.TgZ(0,"span"),g._UZ(1,"input",26),g.ALo(2,"translate"),g.TgZ(3,"label",27),g._uU(4),g.ALo(5,"translate"),g.qZA()()),2&ce){const Qe=we.$implicit;g.xp6(1),g.Q6J("id",Qe.language)("ngClass",g.VKq(14,Fn,Qe.checked))("value",Qe.language)("tabindex",Qe.checked?0:-1)("checked",Qe.checked),g.uIk("aria-checked",Qe.checked)("data-cy","radio-list-option-"+Qe.language)("aria-label",g.lcZ(2,10,"General.Language.Code."+Qe.language)),g.xp6(2),g.s9C("for",Qe.language),g.xp6(1),g.hij(" ",g.lcZ(5,12,"General.Language.Code.Abbreviation."+Qe.language.toLowerCase())," ")}}function Ai(ce,we){if(1&ce){const Qe=g.EpF();g.TgZ(0,"div",28)(1,"h1",29),g._uU(2),g.ALo(3,"async"),g.qZA(),g.TgZ(4,"p",30),g._uU(5),g.ALo(6,"async"),g.qZA(),g.TgZ(7,"cgi-autocomplete",31),g.NdJ("valueChange",function(Tn){g.CHM(Qe);const lr=g.oxw(2);return g.KtG(lr.changeMunicipalityAutocompleteValue(Tn))}),g.ALo(8,"translate"),g.ALo(9,"translate"),g.ALo(10,"translate"),g.qZA(),g.TgZ(11,"ion-button",32),g.NdJ("click",function(){g.CHM(Qe);const Tn=g.oxw(2);return g.KtG(Tn.setMunicipality())}),g._uU(12),g.ALo(13,"translate"),g.qZA()()}if(2&ce){const Qe=g.oxw(2);g.xp6(2),g.hij(" ",g.lcZ(3,10,Qe.getTranslatedLabel(Qe.labels.municipalityTitle))," "),g.xp6(3),g.hij(" ",g.lcZ(6,12,Qe.getTranslatedLabel(Qe.labels.municipalitySelectionInfo))," "),g.xp6(2),g.Q6J("multiSelect",!1)("options",Qe.municipalityAutocompleteOptions)("placeholderImage","")("placeholder",g.lcZ(8,14,"General.Login.SelectMunicipality"))("noItemsText",g.lcZ(9,16,"Message.NoDataFound"))("allSelectedText",g.lcZ(10,18,"General.Login.SelectMunicipality")),g.xp6(4),g.Q6J("disabled",!Qe.municipalityAutocompleteValue),g.xp6(1),g.hij(" ",g.lcZ(13,20,"General.Buttons.Select")," ")}}function si(ce,we){if(1&ce){const Qe=g.EpF();g.TgZ(0,"sivi-guardian-login-form",36),g.NdJ("startSingleSignOnProcess",function(Tn){g.CHM(Qe);const lr=g.oxw(3);return g.KtG(lr.startSingleSignOnProcess(Tn))}),g.qZA()}if(2&ce){const Qe=g.oxw(3);g.Q6J("loadingLogin",Qe.loadingLogin)("vesaStatus",Qe.vesaStatus)}}function Vi(ce,we){if(1&ce&&(g.TgZ(0,"p",48),g._uU(1),g.ALo(2,"translate"),g.qZA()),2&ce){const Qe=g.oxw(5);g.xp6(1),g.hij(" ",g.lcZ(2,1,Qe.labels.loginPrevented)," ")}}function Vn(ce,we){1&ce&&g._UZ(0,"ion-spinner")}function Hn(ce,we){if(1&ce){const Qe=g.EpF();g.ynx(0),g.YNc(1,Vi,3,3,"p",38),g.TgZ(2,"ion-button",39),g.NdJ("click",function(){g.CHM(Qe);const Tn=g.oxw(4);return g.KtG(Tn.startSingleSignOnProcess(Tn.loginProviderName.AD))}),g._uU(3),g.ALo(4,"async"),g.qZA(),g.TgZ(5,"ion-button",40),g.NdJ("click",function(){g.CHM(Qe);const Tn=g.oxw(4);return g.KtG(Tn.startSingleSignOnProcess(Tn.loginProviderName.EDU_AD))}),g._uU(6),g.ALo(7,"async"),g.qZA(),g.TgZ(8,"p",41),g._uU(9),g.ALo(10,"async"),g.qZA(),g.TgZ(11,"div",42)(12,"cgi-input",43),g.NdJ("keyup.enter",function(){g.CHM(Qe);const Tn=g.oxw(4);return g.KtG(Tn.loginWithCredentials())})("ionChange",function(Tn){g.CHM(Qe);const lr=g.oxw(4);return g.KtG(lr.onInputChange(Tn))}),g.ALo(13,"async"),g.qZA(),g.TgZ(14,"cgi-input",44),g.NdJ("keyup.enter",function(){g.CHM(Qe);const Tn=g.oxw(4);return g.KtG(Tn.loginWithCredentials())})("ionChange",function(Tn){g.CHM(Qe);const lr=g.oxw(4);return g.KtG(lr.onInputChange(Tn))}),g.ALo(15,"async"),g.qZA(),g.TgZ(16,"ion-button",45),g.NdJ("click",function(Tn){g.CHM(Qe);const lr=g.oxw(4);return g.KtG(lr.presentPopover(Tn))}),g.TgZ(17,"i",46),g._uU(18,"more_vert"),g.qZA()()(),g.TgZ(19,"ion-button",47),g.YNc(20,Vn,1,0,"ion-spinner",3),g._uU(21),g.ALo(22,"async"),g.qZA(),g.BQk()}if(2&ce){const Qe=g.oxw(4);g.xp6(1),g.Q6J("ngIf",!Qe.vesaStatus.allowProfessional),g.xp6(1),g.Q6J("disabled",Qe.loadingLogin||!Qe.vesaStatus.allowProfessional),g.xp6(1),g.hij(" ",g.lcZ(4,17,Qe.getTranslatedLabel(Qe.labels.logMeInWithActiveDirectory))," "),g.xp6(2),g.Q6J("disabled",Qe.loadingLogin||!Qe.vesaStatus.allowProfessional),g.xp6(1),g.hij(" ",g.lcZ(7,19,Qe.getTranslatedLabel(Qe.labels.logMeInWithEduActiveDirectory))," "),g.xp6(3),g.hij(" ",g.lcZ(10,21,Qe.getTranslatedLabel(Qe.labels.usernameAndPassword))," "),g.xp6(3),g.Q6J("label",g.lcZ(13,23,Qe.getTranslatedLabel(Qe.labels.email)))("required",!0)("value",Qe.credentials.username),g.xp6(2),g.Q6J("type",Qe.showPasswordCharacters?"text":"password")("required",!0)("label",g.lcZ(15,25,Qe.getTranslatedLabel(Qe.labels.password)))("value",Qe.credentials.password)("disableReveal",!0),g.xp6(5),g.Q6J("disabled",Qe.loadingLogin||!Qe.vesaStatus.allowProfessional),g.xp6(1),g.Q6J("ngIf",Qe.loadingLogin),g.xp6(1),g.hij(" ",g.lcZ(22,27,Qe.getTranslatedLabel(Qe.labels.logMeIn))," ")}}function An(ce,we){1&ce&&(g.ynx(0),g._UZ(1,"sivi-lib-spinner",49),g.BQk()),2&ce&&(g.xp6(1),g.Q6J("show",!0))}function vn(ce,we){if(1&ce&&(g.TgZ(0,"div",37)(1,"p",30),g._uU(2),g.ALo(3,"async"),g.qZA(),g.YNc(4,Hn,23,29,"ng-container",3),g.YNc(5,An,2,1,"ng-container",3),g.qZA()),2&ce){const Qe=g.oxw(3);g.xp6(2),g.hij(" ",g.lcZ(3,3,Qe.getTranslatedLabel(Qe.labels.loginInfoProfessional))," "),g.xp6(2),g.Q6J("ngIf",Qe.vesaStatus),g.xp6(1),g.Q6J("ngIf",!Qe.vesaStatus)}}function In(ce,we){if(1&ce&&(g.TgZ(0,"h1",29),g._uU(1),g.ALo(2,"async"),g.qZA(),g.TgZ(3,"div",33),g._uU(4),g.ALo(5,"translate"),g.qZA(),g.YNc(6,si,1,2,"sivi-guardian-login-form",34),g.YNc(7,vn,6,5,"div",35)),2&ce){const Qe=g.oxw(2);g.xp6(1),g.hij(" ",g.lcZ(2,4,Qe.getTranslatedLabel(Qe.labels.title))," "),g.xp6(3),g.hij(" ",g.lcZ(5,6,Qe.message)," "),g.xp6(2),g.Q6J("ngIf",Qe.loginMode===Qe.loginModeOptions.GUARDIAN),g.xp6(1),g.Q6J("ngIf",Qe.loginMode===Qe.loginModeOptions.PROFESSIONAL)}}function Zi(ce,we){if(1&ce){const Qe=g.EpF();g.TgZ(0,"form",14,15),g.NdJ("submit",function(){g.CHM(Qe);const Tn=g.oxw();return g.KtG(Tn.loginWithCredentials())}),g.TgZ(2,"ion-row",16),g.YNc(3,xn,5,4,"ion-col",17),g.TgZ(4,"ion-col")(5,"div",18)(6,"radio-group",19),g.NdJ("change",function(Tn){g.CHM(Qe);const lr=g.oxw();return g.KtG(lr.changeLanguage(Tn.target.value))}),g.ALo(7,"translate"),g.YNc(8,ui,6,16,"span",20),g.qZA()()()(),g.YNc(9,Ai,14,22,"div",21),g.YNc(10,In,8,8,"ng-template",null,22,g.W1O),g.qZA()}if(2&ce){const Qe=g.MAs(11),qt=g.oxw();g.xp6(3),g.Q6J("ngIf",qt.selectedMunicipality),g.xp6(3),g.uIk("aria-label",g.lcZ(7,6,"Organization.Educational.ChooseLanguage")),g.xp6(2),g.Q6J("ngForOf",qt.languages)("ngForTrackBy",qt.trackByFn),g.xp6(1),g.Q6J("ngIf",!qt.selectedMunicipality)("ngIfElse",Qe)}}function gr(ce,we){1&ce&&g._UZ(0,"ion-spinner")}function Hi(ce,we){if(1&ce){const Qe=g.EpF();g.TgZ(0,"form",50,51),g.NdJ("submit",function(){g.CHM(Qe);const Tn=g.oxw();return g.KtG(Tn.onSubmitForgotPassword(Tn.credentials.forgottenPasswordEmail))}),g.TgZ(2,"header",52)(3,"h3",37),g._uU(4),g.ALo(5,"async"),g.qZA(),g.TgZ(6,"div",53),g._uU(7),g.ALo(8,"translate"),g.qZA()(),g.TgZ(9,"div",54)(10,"cgi-input",55),g.NdJ("keyup.enter",function(){g.CHM(Qe);const Tn=g.oxw();return g.KtG(Tn.onSubmitForgotPassword(Tn.credentials.forgottenPasswordEmail))})("ionChange",function(Tn){g.CHM(Qe);const lr=g.oxw();return g.KtG(lr.onInputChange(Tn))}),g.ALo(11,"translate"),g.qZA()(),g.TgZ(12,"ion-button",56),g.YNc(13,gr,1,0,"ion-spinner",3),g._uU(14),g.ALo(15,"async"),g.qZA(),g.TgZ(16,"ion-button",57),g.NdJ("click",function(){g.CHM(Qe);const Tn=g.oxw();return g.KtG(Tn.onToggleShowForgotPasswordForm())}),g._uU(17),g.ALo(18,"async"),g.qZA()()}if(2&ce){const Qe=g.oxw();g.xp6(4),g.Oqu(g.lcZ(5,10,Qe.getTranslatedLabel(Qe.labels.registeredEmailAddress))),g.xp6(3),g.Oqu(g.lcZ(8,12,Qe.message)),g.xp6(3),g.Q6J("type","text")("name","forgottenPasswordEmail")("labelPosition","floating")("label",g.lcZ(11,14,Qe.labels.email)),g.xp6(2),g.Q6J("disabled",0===Qe.credentials.forgottenPasswordEmail.length||Qe.loadingForgotPassword),g.xp6(1),g.Q6J("ngIf",Qe.loadingForgotPassword),g.xp6(1),g.hij(" ",g.lcZ(15,16,Qe.getTranslatedLabel(Qe.labels.send))," "),g.xp6(3),g.Oqu(g.lcZ(18,18,Qe.getTranslatedLabel(Qe.labels.cancel)))}}function Gr(ce,we){if(1&ce){const Qe=g.EpF();g.TgZ(0,"a",25),g.NdJ("click",function(){g.CHM(Qe);const Tn=g.oxw();return g.KtG(Tn.toggleLoginMode())}),g._uU(1),g.ALo(2,"async"),g.qZA()}if(2&ce){const Qe=g.oxw();g.xp6(1),g.Oqu(g.lcZ(2,1,Qe.getTranslatedLabel(Qe.labels.professionalLogin)))}}function zr(ce,we){if(1&ce){const Qe=g.EpF();g.TgZ(0,"a",25),g.NdJ("click",function(){g.CHM(Qe);const Tn=g.oxw();return g.KtG(Tn.toggleLoginMode())}),g._uU(1),g.ALo(2,"async"),g.qZA()}if(2&ce){const Qe=g.oxw();g.xp6(1),g.hij(" ",g.lcZ(2,1,Qe.getTranslatedLabel(Qe.labels.guardiansLogin))," ")}}function Eo(ce,we){if(1&ce&&(g.TgZ(0,"div",58),g._uU(1),g.qZA()),2&ce){const Qe=g.oxw();g.xp6(1),g.hij(" Version: ",Qe.version," ")}}var mr,ce;(ce=mr||(mr={})).GUARDIAN="guardian",ce.PROFESSIONAL="professional";const ai=class extends l.SiviPage{constructor(we,Qe,qt,Tn,lr,mo,rr,aa,ea,Bo,Ii,an,Zn,Ci,Xn,Et,gn,ei,un,Ft){super(ea,an,we),this.router=we,this.auth=Qe,this.authWithIAB=qt,this.loginProviders=Tn,this.popoverCtrl=lr,this.storageService=mo,this.languageService=rr,this.userSettingsService=aa,this.notify=ea,this.location=Bo,this.route=Ii,this.translate=an,this.environmentService=Zn,this.platform=Ci,this.platformService=Xn,this.modalCtrl=Et,this.versionService=gn,this.municipalityService=ei,this.guardianSettings=un,this.ngZone=Ft,this.returnURL=this.route.snapshot.queryParams.returnUrl,this.languages=this.languageService.getAllTranslatedLanguages().map(Ut=>({...Ut,checked:this.isSelectedLanguage(Ut)})),this.credentials={username:"",password:"",forgottenPasswordEmail:""},this.title="Page.Login",this.message="",this.loginModeOptions=mr,this.labels={title:"Page.Login",loginInProgress:"General.Login.LoginInProgress",loginInfoProfessional:"General.Login.Info.Professional",welcomeText:"General.Login.WelcomeText",loginPrevented:"Message.Error.Maintenance.Login.Prevented",professionalLogin:"General.ProfessionalLogin",logMeInWithActiveDirectory:"General.LogMeInWithActiveDirectory",logMeInWithEduActiveDirectory:"General.LogMeInWithEduActiveDirectory",usernameAndPassword:"General.Login.UsernameAndPassword",email:"Form.Label.Email",password:"Form.Label.Password",logMeIn:"General.LogMeIn",registeredEmailAddress:"UserAccount.RegisteredEmailAddress",send:"General.Buttons.Send",cancel:"General.Buttons.Cancel",municipalityTitle:"General.Login.MunicipalityTitle",guardiansLogin:"General.Login.GuardiansLogin",resetMunicipality:"General.Login.ResetMunicipalitySelection",municipalitySelectionInfo:"General.Login.MunicipalitySelectionInfo"},this.showPasswordCharacters=!1,this.showForgotPasswordForm=!1,this.loadingLogin=!1,this.loadingForgotPassword=!1,this.loginProviderName=xe.M,this.showEnvironmentInformation=!1,this.version=Pe.i,this.municipalityAutocompleteOptions=[],this.loginParams$=new B.X(""),this.bindNavigateToHomePageWhenAuthenticated(),this.startAutoLoginBasedOnSearchParams(this.getReturnUrlParam()),this.bindLoginWithParamsFromMobileIAB(),this.handleMobileAppResumedFromBackground(),this.window=window}ionViewWillEnter(){this.initializeMunicipalityOptions(),this.watchMunicipalitySelection(),this.loadingForgotPassword=!1,this.environmentService.setForceTestEnvironment(!1),this.environmentService.isProduction()||(this.showEnvironmentInformation=!0),this.handleThirdPartyLoginParamsFromURL();const we=this.route.snapshot.paramMap.get("loginMode");this.loginMode=we===mr.PROFESSIONAL?mr.PROFESSIONAL:mr.GUARDIAN,this.checkForMaintenanceModeAndVersion()}initializeMunicipalityOptions(){this.municipalityService.getMunicipalityOptions().pipe((0,ae.R)(this.destroy$)).subscribe(we=>{this.municipalityAutocompleteOptions=this.getMunicipalityAutocompleteOptions(we),this.municipalityOptions=we})}watchMunicipalitySelection(){this.municipalityService.getSelectedMunicipalityOption().pipe((0,ae.R)(this.destroy$)).subscribe(we=>{this.selectedMunicipality=we,this.changeMunicipalityAutocompleteValue(new CustomEvent("selectMunicipality",{detail:{value:[we?.value]}}))})}handleMobileAppResumedFromBackground(){this.platform.resume.pipe((0,ae.R)(this.destroy$)).subscribe(()=>{this.ngZone.run(()=>{this.checkForMaintenanceModeAndVersion()})})}setMunicipality(){const we={value:this.municipalityAutocompleteValue.value,text:this.municipalityAutocompleteValue.element.text};this.platformService.isMobilePlatform()||this.redirectToOptionUrl(we),this.municipalityService.setSelectedOption(we)}redirectToOptionUrl(we){const Qe=this.municipalityOptions.find(qt=>qt.value===we.value);if(Qe.url!==`${this.window.location.origin}/`){const qt=this.window.location.pathname.substring(1);this.window.location.hostname!==l.AuthDomains.LOCALHOST?this.window.location.href=Qe.url+qt:console.log("Redirecting to",Qe.url+qt)}}changeMunicipalityAutocompleteValue(we){this.municipalityAutocompleteValue=this.municipalityAutocompleteOptions.find(Qe=>Qe.value===we.detail.value[0])}resetMunicipality(){this.municipalityService.resetMunicipality(),this.initializeMunicipalityOptions()}handleThirdPartyLoginParamsFromURL(){const we=this.window.location.href;if(this.loginProviders.setCurrentProviderIfRedirected(we)){const qt=this.loginProviders.getCurrentLoginParams(we);this.loginParams$.next(qt)}}bindLoginWithParamsFromMobileIAB(){(0,Y.a)({params:(0,V.T)(this.loginParams$,this.authWithIAB.getLoginParams()),init:this.municipalityService.isInitialized()}).pipe((0,X.h)(({init:we})=>we),(0,ve.w)(({params:we})=>this.loginWithSSOCode(we)),(0,ae.R)(this.destroy$)).subscribe({next:we=>console.log("loginWithSSOCode success",we),error:we=>this.showLoginError(we)})}bindNavigateToHomePageWhenAuthenticated(){this.auth.isAuthenticated$().pipe((0,ae.R)(this.destroy$)).subscribe(()=>{this.auth.isAuthenticated()&&(this.auth.isGuardian()?this.handleGuardianLoginChecks():this.navigateToHomeOrReturnURLPage())})}handleGuardianLoginChecks(){var we=this;return(0,e.Z)(function*(){if(yield(0,ue.z)(we.guardianSettings.getGuardianPersonalDataAgreementIsNeeded()).catch(Tn=>(console.error("Checking data agreement status failed, assuming that agreement is needed",Tn),!0))){const Tn=yield we.askForDataStoringPermissions();if(yield(0,ue.z)(we.guardianSettings.setGuardianPersonalDataAgreementStatus(Tn)).catch(lr=>{console.error("Error saving agreement status",lr)}),!Tn)return void we.auth.logout()}(yield(0,ue.z)(we.auth.areMandatoryAgreementsSigned()))?we.navigateToHomeOrReturnURLPage():we.router.navigate(["user/agreements"])})()}askForDataStoringPermissions(){var we=this;return(0,e.Z)(function*(){return(yield(yield we.notify.createCustomConfirmationPopUp("General.Login.OtherMunicipality.SaveDataConfirmation.Title","General.Login.OtherMunicipality.SaveDataConfirmation.Text","General.Text.Yes","General.Text.No")).onDidDismiss()).data})()}checkForMaintenanceModeAndVersion(){var we=this;return(0,e.Z)(function*(){const Qe=yield we.platformService.getDevicePlatformInformation().toPromise();we.getMaintenanceAndVersionInfo(Qe)})()}getMaintenanceAndVersionInfo(we){this.vesaStatus=null,l.Utils.getParamFromURL("bypass")?this.vesaStatus={allowGuardian:!0,allowProfessional:!0}:this.municipalityService.isInitialized().pipe((0,ve.w)(()=>this.versionService.getVesaStatus(we.appVersion)),(0,ye.q)(1)).subscribe({next:Qe=>{this.platformService.isMobilePlatform()&&!Qe.versionIsAllowed&&this.showVersionMismatchModal(we),this.vesaStatus=Qe},error:Qe=>{console.error("getVesaStatus failed",Qe),this.message="Message.Error.GeneralBackendError"}})}navigateToHomeOrReturnURLPage(){this.storageService.getAuthenticationProcessData().pipe((0,ye.q)(1)).subscribe(we=>{const Qe=we&&we.returnURL?we.returnURL:this.returnURL;this.router.navigateByUrl(Qe||"/home").then(()=>{this.languageService.setLanguageFromURL()}),this.returnURL="",this.storageService.saveAuthenticationProcessData({})})}startAutoLoginBasedOnSearchParams(we){console.log("startAutoLoginBasedOnSearchParams searchParams",we);let Qe=l.Utils.getParamFromSearchParams("vesaLogin",we);const qt=l.Utils.getParamFromSearchParams("vesaLanguage",we),Tn=this.getReturnUrlParam();Qe?(console.log("startAutoLoginBasedOnSearchParams autoLoginParam",Qe),Qe=Qe.toUpperCase(),Object.keys(this.loginProviders.loginProviders).includes(Qe)?(this.storageService.saveAuthenticationProcessData({returnURL:Tn,languageCode:qt}),this.startSingleSignOnProcess(Qe)):console.warn("given vesaLogin provider name is not valid",Qe)):Tn&&this.storageService.saveAuthenticationProcessData({returnURL:Tn,languageCode:qt})}loginWithCredentials(){this.loadingLogin=!0,this.message="","cgivesa.test123+999@gmail.com"===this.credentials.username&&this.environmentService.setForceTestEnvironment(!0),this.auth.authenticate(this.credentials.username,this.credentials.password).pipe((0,ye.q)(1),(0,ge.x)(()=>this.loadingLogin=!1)).subscribe(()=>{this.credentials={...this.credentials,username:"",password:""}},we=>{console.warn("loginWithCredentials failed",we),this.showLoginError(we)})}loginWithSSOCode(we){if(!we)return he.E;this.message="",this.loadingLogin=!0;const Qe=this.loginProviders.getCurrentLoginUrl();return this.auth.authenticateWithSSO(Qe,we).pipe((0,ne.z)(()=>this.auth.isAuthenticated$()),(0,X.h)(qt=>!!qt),(0,ye.q)(1),(0,ge.x)(()=>this.loadingLogin=!1),(0,pe.K)(qt=>(console.error("loginWithSSOCode failed",JSON.stringify(qt)),this.showLoginError(qt),he.E)))}onInputChange(we){this.credentials[we.target.name]=we.target.value}navigateToHomePage(){this.router.navigate(["/home"])}presentPopover(we){var Qe=this;return(0,e.Z)(function*(){const qt=[{id:"forgot-password",text:"General.Text.ForgotMyPassword",icon:"help_outline"}];Qe.showPasswordCharacters?qt.push({id:"hide-characters",text:"UserAccount.Password.HideCharacters",icon:"visibility_off"}):qt.push({id:"show-characters",text:"UserAccount.Password.ShowCharacters",icon:"visibility_on"});const Tn=yield Qe.popoverCtrl.create({component:l.PopoverComponent,event:we,componentProps:{items:qt}});return Tn.onDidDismiss().then(lr=>{switch(lr.data){case"forgot-password":Qe.onToggleShowForgotPasswordForm();break;case"show-characters":case"hide-characters":Qe.onToggleShowCharacters()}}),yield Tn.present()})()}showLoginError(we){412!==we.status&&(401===we.status?this.message="UserAccount.Password.ErrorPasswordsDontMatch":this.message="Message.Error.GeneralBackendError")}startSingleSignOnProcess(we){this.loginProviders.setCurrentLoginProvider(we);const Qe=this.languageService.getCurrentUserLanguage().language;this.authWithIAB.startLoginFlow(Qe),this.message=""}changeLanguage(we){this.languageService.setLanguage(this.languageService.getLanguageLocaleByLanguageCode(we)),this.languages=this.languages.map(Qe=>({...Qe,checked:this.isSelectedLanguage(Qe)})),this.municipalityAutocompleteOptions=this.getMunicipalityAutocompleteOptions(this.municipalityOptions)}onSubmitForgotPassword(we){console.log("onSubmitForgotPassword",we),this.loadingForgotPassword=!0,this.auth.requestNewPassword(we).pipe((0,ye.q)(1)).subscribe(Qe=>{this.loadingForgotPassword=!1,console.log("onSubmitForgotPassword success",Qe),this.notify.alert("","UserAccount.CheckEmailForPassword")},Qe=>{this.loadingForgotPassword=!1,console.error("onSubmitForgotPassword failed",Qe),this.notify.alertFailedToCommunicateWithBackend()})}onToggleShowForgotPasswordForm(){this.message="",this.showForgotPasswordForm=!this.showForgotPasswordForm,this.showForgotPasswordForm&&(this.credentials.forgottenPasswordEmail=this.credentials.username),document.querySelector(".login").scrollIntoView()}onToggleShowCharacters(){this.showPasswordCharacters=!this.showPasswordCharacters}isSelectedLanguage(we){return!!this.languageService.getCurrentUserLanguage()&&this.languageService.getCurrentUserLanguage().language===we.language}toggleLoginMode(){this.loginMode===mr.PROFESSIONAL?this.loginMode=mr.GUARDIAN:this.loginMode=mr.PROFESSIONAL,this.message="",this.location.go("/login/"+this.loginMode),document.querySelector(".login").scrollIntoView()}showVersionMismatchModal(we){var Qe=this;return(0,e.Z)(function*(){(yield Qe.modalCtrl.create({component:w,componentProps:{info:we},backdropDismiss:!1,cssClass:"modal-full-size"})).present()})()}getTranslatedLabel(we){return this.translate.stream(we)}getReturnUrlParam(){return l.Utils.getParamFromURL("returnUrl")}translateMunicipalityFromOptions(we){return this.municipalityOptions?`Municipality.Names.${this.municipalityOptions.find(qt=>qt.value===we).text}`:void 0}translateMunicipalityByName(we){const Qe=this.languageService.getCurrentUserLanguage().language,qt=`Municipality.Names.${we}`;return this.languageService.getTranslationByLocale(qt,Qe)}getMunicipalityAutocompleteOptions(we){return we.map(Qe=>({value:Qe.value,element:{text:this.translateMunicipalityByName(Qe.text)}}))}};let jn=ai;ai.\u0275fac=function(Qe){return new(Qe||ai)(g.Y36(o.F0),g.Y36(de.e8),g.Y36(j),g.Y36(Oe.E),g.Y36(ke.Dh),g.Y36(l.StorageService),g.Y36(de.TS),g.Y36(l.UserSettingsService),g.Y36(l.NotifyService),g.Y36(E.Ye),g.Y36(o.gz),g.Y36(T.sK),g.Y36(de.L$),g.Y36(ke.t4),g.Y36(de.Jj),g.Y36(l.SiviModalController),g.Y36(tt),g.Y36(de.CI),g.Y36(l.GuardianSettingsService),g.Y36(g.R0b))},ai.\u0275cmp=g.Xpm({type:ai,selectors:[["sivi-app-login"]],features:[g.qOj],decls:21,vars:10,consts:[[1,"login"],[1,"form"],["type","indeterminate","color","secondary",4,"ngIf"],[4,"ngIf"],["class","p1 pb3",3,"submit",4,"ngIf"],["class","ion-text-center pt2 pb3",3,"submit",4,"ngIf"],[1,"mode-toggler"],["role","button","tabindex","0",3,"click",4,"ngIf"],["src","../../../../assets/img/login/stones.svg","role","presentation",1,"stones"],[1,"footer-title"],[1,"secondary"],["class","environment-info",4,"ngIf"],["type","indeterminate","color","secondary"],[1,"ion-text-center","p3","pv6"],[1,"p1","pb3",3,"submit"],["loginForm","ngForm"],[1,"top-bar"],["role","toolbar","class","selected-municipality",4,"ngIf"],["role","toolbar",1,"ion-text-end","languages"],["role","radiogroup",3,"change"],[4,"ngFor","ngForOf","ngForTrackBy"],["class","municipality-selection ion-padding ion-text-center",4,"ngIf","ngIfElse"],["loginSection",""],["role","toolbar",1,"selected-municipality"],[1,"municipality-chip"],["role","button","tabindex","0",3,"click"],["type","radio","role","radio",3,"id","ngClass","value","tabindex","checked"],[3,"for"],[1,"municipality-selection","ion-padding","ion-text-center"],[1,"text-primary","weight-lighter","ion-text-center"],[1,"ion-text-center","p2"],["name","selectMunicipality",1,"municipality-autocomplete",3,"multiSelect","options","placeholderImage","placeholder","noItemsText","allSelectedText","valueChange"],[3,"disabled","click"],[1,"form-error","ion-text-center"],[3,"loadingLogin","vesaStatus","startSingleSignOnProcess",4,"ngIf"],["class","ion-text-center",4,"ngIf"],[3,"loadingLogin","vesaStatus","startSingleSignOnProcess"],[1,"ion-text-center"],["data-cy","maintenance-mode-enabled-professional","class","ion-text-center form-error",4,"ngIf"],["color","primary","data-cy","start-SSO-AD-login",3,"disabled","click"],["color","primary","data-cy","start-SSO-EDU-AD-login",1,"edu-ad-button",3,"disabled","click"],[1,"ion-text-center","mb0","p2","pb0"],[1,"pw-grid","ph3","ph-xxs-4"],["autocomplete","new-password","id","username-input","type","text","name","username","label-position","floating",3,"label","required","value","keyup.enter","ionChange"],["id","password-input","autocomplete","new-password","name","password","label-position","floating",1,"required",3,"type","required","label","value","disableReveal","keyup.enter","ionChange"],["id","more-options-for-login","fill","clear","color","medium",3,"click"],[1,"material-icons"],["type","submit","id","login-button","color","primary","fill","outline","data-cy","login-with-credentials-button",3,"disabled"],["data-cy","maintenance-mode-enabled-professional",1,"ion-text-center","form-error"],[3,"show"],[1,"ion-text-center","pt2","pb3",3,"submit"],["forgotPasswordForm","ngForm"],[1,"ph3","ph-xs-4"],[1,"form-error"],[1,"mh3","mh-xs-4","mb2"],[1,"forgottenPasswordEmail",3,"type","name","labelPosition","label","keyup.enter","ionChange"],["type","submit","color","primary",1,"m1i",3,"disabled"],["type","button",1,"m1i",3,"click"],[1,"environment-info"]],template:function(Qe,qt){1&Qe&&(g.TgZ(0,"ion-content")(1,"div",0)(2,"h2"),g._uU(3),g.ALo(4,"async"),g.qZA(),g.TgZ(5,"section",1),g.YNc(6,On,1,0,"ion-progress-bar",2),g.YNc(7,je,4,3,"div",3),g.YNc(8,Zi,12,8,"form",4),g.YNc(9,Hi,19,20,"form",5),g.qZA(),g._UZ(10,"sivi-mobile-app-promo"),g.qZA(),g.TgZ(11,"footer")(12,"div",6),g.YNc(13,Gr,3,3,"a",7),g.YNc(14,zr,3,3,"a",7),g.qZA(),g._UZ(15,"img",8),g.TgZ(16,"div",9),g._uU(17," CGI "),g.TgZ(18,"span",10),g._uU(19,"Vesa"),g.qZA()()(),g.YNc(20,Eo,2,1,"div",11),g.qZA()),2&Qe&&(g.xp6(3),g.hij(" ",g.lcZ(4,8,qt.getTranslatedLabel(qt.labels.welcomeText))," "),g.xp6(3),g.Q6J("ngIf",qt.loadingLogin),g.xp6(1),g.Q6J("ngIf",qt.loadingLogin),g.xp6(1),g.Q6J("ngIf",!qt.showForgotPasswordForm&&!qt.loadingLogin),g.xp6(1),g.Q6J("ngIf",qt.showForgotPasswordForm),g.xp6(4),g.Q6J("ngIf","guardian"===qt.loginMode),g.xp6(1),g.Q6J("ngIf",qt.loginMode===qt.loginModeOptions.PROFESSIONAL&&!qt.showForgotPasswordForm),g.xp6(6),g.Q6J("ngIf",qt.showEnvironmentInformation))},dependencies:[l.SpinnerComponent,ke.YG,ke.wI,ke.W2,ke.X7,ke.Nd,ke.PQ,E.mk,E.sg,E.O5,Ne._Y,Ne.JL,Ne.F,Gi,kn,E.Ov,T.X$],styles:['[_ngcontent-%COMP%]:focus, .ion-focused[_ngcontent-%COMP%]{outline:2px dashed var(--ion-color-primary);outline-offset:2px}.login[_ngcontent-%COMP%]{background-image:url(/assets/img/login/stones-narrow-640.jpg);background-position:center top;background-size:cover;padding:5vw 0}@media (min-resolution: 192dpi){.login[_ngcontent-%COMP%]{background-image:url(/assets/img/login/stones-narrow-960.jpg)}}.form-error[_ngcontent-%COMP%]{color:var(--ion-color-warning)}h2[_ngcontent-%COMP%]{color:var(--ion-color-primary-contrast);font-size:7.2vw;font-weight:700;margin:0;text-align:center;padding:7vw 14vw;text-shadow:.1em .1em .2em rgba(0,0,0,.5)}.form[_ngcontent-%COMP%]{background-color:#ffffffe6;margin:5vw}.languages[_ngcontent-%COMP%]{display:flex;justify-content:flex-end}.languages[_ngcontent-%COMP%]   input[type=radio][_ngcontent-%COMP%]{appearance:none;opacity:0;position:absolute}.languages[_ngcontent-%COMP%]   label[_ngcontent-%COMP%]{position:relative;padding:6px;margin:0 2px;min-width:40px;color:var(--ion-color-primary, #3880ff);font-size:13px;border-style:solid;border-radius:4px;border-width:1px;border-color:transparent;cursor:pointer}.languages[_ngcontent-%COMP%]   input[type=radio][_ngcontent-%COMP%]:checked + label[_ngcontent-%COMP%]{border-color:var(--ion-color-primary, #3880ff)}.languages[_ngcontent-%COMP%]   input[type=radio][_ngcontent-%COMP%]:checked + label[_ngcontent-%COMP%]:after{background:var(--blue)}.languages[_ngcontent-%COMP%]   input[type=radio][_ngcontent-%COMP%]:hover + label[_ngcontent-%COMP%]{border-color:var(--ion-color-primary, #3880ff);background-color:#2a56a310}.languages[_ngcontent-%COMP%]   input[type=radio][_ngcontent-%COMP%]:focus + label[_ngcontent-%COMP%]{outline:2px dashed var(--ion-color-primary);outline-offset:2px}h1[_ngcontent-%COMP%]{color:var(--ion-color-secondary)}h1[_ngcontent-%COMP%]   sivi-lib-info-popup[_ngcontent-%COMP%]{color:var(--ion-text-color)}ion-button[_ngcontent-%COMP%], button[_ngcontent-%COMP%]{margin-top:24px;margin-bottom:24px;min-width:80%}.edu-ad-button[_ngcontent-%COMP%]{margin-top:0}.pw-grid[_ngcontent-%COMP%]{display:grid;grid-template-columns:auto 2em;grid-template-rows:auto;grid-template-areas:"username ." "password more-btn"}#username-input[_ngcontent-%COMP%]{grid-area:username}#password-input[_ngcontent-%COMP%]{grid-area:password}ion-button#more-options-for-login[_ngcontent-%COMP%]{grid-area:more-btn;min-width:0;width:2em;--padding-end: 0;--padding-start: 0}.selected-municipality[_ngcontent-%COMP%]{max-width:45%;display:flex;flex-direction:row;flex-wrap:wrap}.selected-municipality[_ngcontent-%COMP%]   .municipality-chip[_ngcontent-%COMP%]{color:var(--ion-color-primary, #3880ff);border:var(--ion-color-primary, #3880ff) 1px solid;border-radius:10%;padding:0 5px;margin-right:1em}.selected-municipality[_ngcontent-%COMP%]   a[_ngcontent-%COMP%]{text-decoration:underline;cursor:pointer}.top-bar[_ngcontent-%COMP%]{display:flex;flex-wrap:nowrap}.municipality-selection[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:center;align-items:center}.municipality-selection[_ngcontent-%COMP%]   .municipality-autocomplete[_ngcontent-%COMP%]{width:100%}footer[_ngcontent-%COMP%]   .mode-toggler[_ngcontent-%COMP%]{margin:1em 5vw;text-align:right}footer[_ngcontent-%COMP%]   .mode-toggler[_ngcontent-%COMP%]   a[_ngcontent-%COMP%]{text-decoration:underline;cursor:pointer}footer[_ngcontent-%COMP%]   .stones[_ngcontent-%COMP%]{margin-left:6vw;width:46vw}footer[_ngcontent-%COMP%]   .footer-title[_ngcontent-%COMP%]{color:#000;font-size:6vw;font-weight:500;margin:5vw 0 14vw;text-align:center}footer[_ngcontent-%COMP%]   .footer-title[_ngcontent-%COMP%]   .secondary[_ngcontent-%COMP%]{color:var(--ion-color-secondary)}@media screen and (min-width: 600px){.login[_ngcontent-%COMP%]{background-image:url(/assets/img/login/stones-narrow-960.jpg)}}@media screen and (min-width: 600px) and (min-resolution: 192dpi){.login[_ngcontent-%COMP%]{background-image:url(/assets/img/login/stones-narrow-1920.jpg)}}@media screen and (min-width: 960px){.login[_ngcontent-%COMP%]{background-image:url(/assets/img/login/stones-1280.jpg);display:grid;grid-template-columns:1fr 1fr;grid-template-areas:"login-form deco";padding:0}}@media screen and (min-width: 960px) and (min-resolution: 192dpi){.login[_ngcontent-%COMP%]{background-image:url(/assets/img/login/stones-1920.jpg)}}@media screen and (min-width: 960px){.login[_ngcontent-%COMP%] > h2[_ngcontent-%COMP%]{align-self:center;font-size:56px;grid-area:deco;margin:5vw 5vw 10vw;padding:0}}@media screen and (min-width: 960px){.login[_ngcontent-%COMP%]   .form[_ngcontent-%COMP%]{grid-area:login-form}.login[_ngcontent-%COMP%]   .form[_ngcontent-%COMP%]   form[_ngcontent-%COMP%]{margin-left:auto;margin-right:auto;max-width:640px}}@media screen and (min-width: 960px){footer[_ngcontent-%COMP%]{position:relative}footer[_ngcontent-%COMP%]   .stones[_ngcontent-%COMP%]{left:8vw;margin-left:0;position:absolute;top:-3vw;width:19vw}footer[_ngcontent-%COMP%]   .mode-toggler[_ngcontent-%COMP%]{width:calc(50% - 10vw)}footer[_ngcontent-%COMP%]   .footer-title[_ngcontent-%COMP%]{font-size:6vw;margin-right:3vw;text-align:right}}@media screen and (min-width: 1424px){.login[_ngcontent-%COMP%]{background-image:url(/assets/img/login/stones-1536.jpg)}}@media screen and (min-width: 1424px) and (min-resolution: 192dpi){.login[_ngcontent-%COMP%]{background-image:url(/assets/img/login/stones-2880.jpg)}}.environment-info[_ngcontent-%COMP%]{text-align:center}']});var ct=p(61154);const hn=class{};let Yt=hn;hn.\u0275fac=function(Qe){return new(Qe||hn)},hn.\u0275mod=g.oAB({type:hn}),hn.\u0275inj=g.cJS({providers:[tt],imports:[T.aw,E.ez]});const oi=[{path:"",component:jn,canActivate:[ct.kE]},{path:":loginMode",component:jn,canActivate:[ct.kE]},{path:"first-login/:token",loadChildren:()=>Promise.all([p.e(8592),p.e(2681)]).then(p.bind(p,2681)).then(ce=>ce.FirstLoginPageModule)},{path:"password-reset/:token",loadChildren:()=>Promise.all([p.e(8592),p.e(3140)]).then(p.bind(p,63140)).then(ce=>ce.PasswordResetPageModule)}],Le=class{};let Ni=Le;Le.\u0275fac=function(Qe){return new(Qe||Le)},Le.\u0275mod=g.oAB({type:Le}),Le.\u0275inj=g.cJS({providers:[ct.kE,j,Oe.E,Z,l.SiviModalController],imports:[l.SiviCorePageModule,Yt,o.Bz.forChild(oi)]})},73877:(qe,I,p)=>{"use strict";p.d(I,{_:()=>E});var o=p(89947),e=p(94650),l=p(80529),D=p(62669),g=p(53377);const T=class extends o.i{constructor(P,w,B){super(P,w,B),this.http=P,this.authService=w,this.environmentService=B}getNonSignedAgreements(P){const w=P?`./api/sivi-accounts-api/personagreement/non-signed/?locale=${P}`:"./api/sivi-accounts-api/personagreement/non-signed/",B=this.getCommonSearchOptions();return this.get(w,B)}saveAgreement(P){return this.saveEntity(P,"./api/sivi-accounts-api/personagreement/")}getPersonAgreements(P){const B={...this.getCommonSearchOptions(),params:P};return this.get("./api/sivi-accounts-api/personagreement/",B)}};let E=T;T.\u0275fac=function(w){return new(w||T)(e.LFG(l.eN),e.LFG(D.e),e.LFG(g.L))},T.\u0275prov=e.Yz7({token:T,factory:T.\u0275fac})},79688:(qe,I,p)=>{"use strict";p.d(I,{o:()=>de});var o=p(15861),e=p(80529),l=p(15439),D=p.n(l),g=p(49594),E=p(39646),T=p(77579),n=p(60515),P=p(32076),w=p(95577),B=p(82722),Y=p(63900),V=p(70262),ue=p(22940),he=p(95698),ae=p(88692),X=p(24956),ve=p(89947),ye=p(94650),ge=p(62669),ne=p(31111),pe=p(70191),Pe=p(53377),xe=p(63834);const re=class extends ve.i{constructor(me,be,le,Z,Oe,j,ke,Be){super(me,be,j),this.http=me,this.auth=be,this.notify=le,this.fileSystem=Z,this.platform=Oe,this.environmentService=j,this.fileOpener=ke,this.platformHelper=Be}getFile(me,be=ae.AttachmentFileSize.MEDIUM){const Z=this.getCommonOptions(),Oe=Z.headers.append("Sender",""),j=(new e.LE).set("uuid",me).set("documentSizeType",be);return this.getFileWithProgress("./api/sivi-ada-api/documents/file",{...Z,headers:Oe,params:j})}postMessageAttachment(me,be){const le=`./api/sivi-messaging-api/messages/${me}/document`;return this.postFileWithProgress(le,be)}deleteMessageAttachment(me,be){const le=`./api/sivi-messaging-api/messages/${me}/documents/${be}`,Z={...this.getCommonOptions(),responseType:"arraybuffer"};return this.delete(le,Z)}writeAttachmentToDevice(me,be=!0){let Z;return this.platform.is("cordova")?(this.platform.is("android")?Z=this.fileSystem.externalRootDirectory+"/Download/":this.platform.is("ios")&&(Z=this.fileSystem.documentsDirectory),new Promise(Oe=>{this.fileSystem.writeFile(Z,me.name,me,{replace:!0}).then(j=>{be&&this.notify.toastSaveSuccess(),Oe(j)},j=>{this.notify.alertSaveError(),console.error("openAttachment failed",j)})})):new Promise(Oe=>{const j=document.createElement("a"),ke=new FileReader;ke.onloadend=()=>{j.download=me.name,j.href=ke.result.toString(),document.body.appendChild(j),j.click(),document.body.removeChild(j),Oe(me)},ke.readAsDataURL(me)})}openFile(me){if(this.platformHelper.isMobilePlatform())this.writeAttachmentToDevice(me,!1).then(be=>{try{this.openFileWithUrl(be.nativeURL)}catch(le){console.error("openFileWithUrl",le),this.notify.alertFailedToLoadData()}}).catch(be=>{console.error("Error opening file",be),this.notify.alertFailedToLoadData()});else try{const be=new Blob([me],{type:X.P4.getFileMimeType(me.name)}),le=(window.URL||window.webkitURL).createObjectURL(be),Z=document.createElement("a");Z.href=le,Z.download=me.name,document.body.appendChild(Z),Z.click(),document.body.removeChild(Z)}catch(be){console.error("failed to open file",be),this.notify.alertFailedToLoadData()}}openFileWithUrl(me){const be=X.P4.getFileMimeType(me);this.fileOpener.open(me,be).catch(le=>{this.notify.alertFailedToLoadData(),console.error("openFileWithUrl",le)})}handleDeleteAttachment(me,be){const le=X.cQ.copyFile(be);return le.restEntityState="DELETED",le.id?this.deleteMessageAttachment(me,le.id).pipe((0,w.z)(()=>(0,E.of)(le))):(le.cancelRequestSub$&&(le.cancelRequestSub$.next(),le.cancelRequestSub$.complete()),(0,E.of)(le))}handleUploadAttachment(me,be){const le=new T.x,Z=X.cQ.copyFile(be);return Z.isLoading=!0,Z.createdDate=D()().toISOString(),Z.relatedEntityId=me,this.postMessageAttachment(me,Z).pipe((0,B.R)(le),(0,Y.w)(Oe=>{const j=X.cQ.copyFile(Z);switch(j.tempId=Z.lastModified.toString(),j.isLoading=!0,Oe.type){case e.dt.Sent:j.loadingProgress=0;break;case e.dt.UploadProgress:const ke=Math.round(100*Oe.loaded/Oe.total);j.loadingProgress=ke;break;case e.dt.Response:const{id:Be,createdDate:nt}=Oe.body;j.id=Be,j.createdDate=nt,delete j.cancelRequestSub$,delete j.loadingProgress,delete j.isLoading;break;default:return n.E}return(0,E.of)(j)}),(0,V.K)(Oe=>{const j=X.cQ.copyFile(Z);return j.tempId=Z.lastModified.toString(),j.restEntityState="DELETED",console.log(new Error(Oe)),this.notify.alertSaveError(),(0,E.of)(j)}))}handleDownloadAttachment(me,be){if(!be)return n.E;const le="PICTURE"===be.documentType,Z=be.name.split(".").pop(),Oe=le?"image/"+Z:"application/octet-stream",j=new T.x,ke=X.cQ.createAttachmentFile([" "],be.name,Oe);return ke.id=be.id,ke.createdDate=be.createdDate,ke.cancelRequestSub$=j,ke.relatedEntityId=me,this.getFile(be.id).pipe((0,Y.w)(Be=>{const nt=X.cQ.copyFile(ke);switch(Be.type){case e.dt.Sent:nt.isLoading=!0;break;case e.dt.DownloadProgress:break;case e.dt.Response:const mt=X.cQ.createAttachmentFile([Be.body],be.name,Oe);if(mt.id=be.id,mt.createdDate=be.createdDate,mt.relatedEntityId=me,le){const ut=new FileReader;ut.readAsDataURL(mt),ut.onloadend=()=>{mt.contentBase64=ut.result}}return(0,E.of)(mt);default:return n.E}return(0,E.of)(nt)}))}downloadMessageAttachments(me,be){return me.resources?(0,E.of)(me.resources.content).pipe((0,w.z)(le=>(0,P.D)(le)),(0,w.z)(le=>this.downloadAttachment(me.id,le,be)),(0,ue.R)((le,Z)=>X.cQ.patchCollectionBy(le,Z,"id"),[])):n.E}downloadAttachment(me,be,le){return le?le.pipe((0,he.q)(1),(0,w.z)(Z=>Z.find(j=>j.id===be.id)?n.E:this.handleDownloadAttachment(me,be))):this.handleDownloadAttachment(me,be)}handleBlobError(me){var be=this;return(0,o.Z)(function*(){if("application/json"===(0,g.Z)(me,"error.type","")){const Z=yield be.getBlobErrorAsText(me);be.notify.alertBackendError(Z,"Message.Alert.Title")}else be.notify.alertBackendError(me)})()}getBlobErrorAsText(me){return(0,o.Z)(function*(){return new Promise((be,le)=>{const Z=new FileReader;Z.onload=Oe=>be(Oe.target.result),Z.onerror=()=>le(me),Z.readAsText(me.error)})})()}};let de=re;re.\u0275fac=function(be){return new(be||re)(ye.LFG(e.eN),ye.LFG(ge.e),ye.LFG(ae.NotifyService),ye.LFG(ne.$),ye.LFG(pe.t4),ye.LFG(Pe.L),ye.LFG(xe.u),ye.LFG(ae.PlatformHelperService))},re.\u0275prov=ye.Yz7({token:re,factory:re.\u0275fac})},62669:(qe,I,p)=>{"use strict";p.d(I,{e:()=>ve});var o=p(80529),e=p(88692),l=p(49594),D=p(77079),g=p(214),E="[object Boolean]";const n=function T(ge){return!0===ge||!1===ge||(0,g.Z)(ge)&&(0,D.Z)(ge)==E};var P=p(77579),w=p(61135),B=p(54004),Y=p(95698),V=p(95577),ue=p(18505),he=p(94650),ae=p(53377),X=p(9116);const ye=class{static decodeAccessToken(ne){return ne?JSON.parse(window.atob(ne.split(".")[1])):""}constructor(ne,pe,Pe,xe,de){this.http=ne,this.platformHelper=pe,this.environmentService=Pe,this.router=xe,this.storageService=de,this.isLoggingOut$=new P.x,this.authorizedToViewConsents=!1,this.authenticated$=new w.X(null),this.authenticatedNow$=new w.X(null),this.loggingOut=!1,this.tokenExpirationDate=null,this.userSession={token:null,userPersonData:null,userAccountData:null},this.loadDataFromStorage()}isAuthenticated(){return this.checkTokenExpirationDate(),this.authenticated$.getValue()}authenticatedNow(){return this.authenticatedNow$.asObservable()}isAuthorizedToViewConsents(){return this.authorizedToViewConsents}setAuthorisationToViewConsents(ne){this.authorizedToViewConsents=ne}setMandatoryAgreementsStatus(ne){this.storageService.saveUserSettings({...this.userSettings,mandatoryAgreementsStatus:ne})}areMandatoryAgreementsSigned(){return this.storageService.getUserSettings().pipe((0,B.U)(ne=>ne.mandatoryAgreementsStatus))}isLoggingOut(){return this.loggingOut}isAuthenticated$(){return this.authenticated$.asObservable()}getAuthorizationHeaders(){let ne;try{(this.isAuthenticated()||this.isAuthorizedToViewConsents())&&(ne=new o.WM({Authorization:`Bearer ${this.userSession.token.access_token}`}),(0,l.Z)(this.userSettings,"selectedMunicipalityId")&&(ne=ne.append("current-municipality-id",this.userSettings.selectedMunicipalityId)),(0,l.Z)(this.userSettings,"language.language")&&(ne=ne.append("Accept-Language",this.userSettings.language.language)),ne=ne.append("vesa-client-version",e.version))}catch{console.error("user session does not exist")}return ne}authenticate(ne,pe){const Pe="username="+encodeURIComponent(ne)+"&password="+encodeURIComponent(pe)+"&grant_type=password",xe=this.http.post(this.environmentService.getEnvironment().API+"./api/auth/oauth/token",Pe,{headers:this.createAuthorizationHeadersForLogin()});return this.authenticateWithBackend(xe)}authenticateWithSSO(ne,pe){console.log("Authentication with SSO pending...",ne);const Pe=this.http.get(ne+pe,{headers:this.createAuthorizationHeadersForSSOLogin()});return this.authenticateWithBackend(Pe)}authenticateWithBackend(ne){let pe;return ne.pipe((0,Y.q)(1),(0,V.z)(Pe=>(pe=Pe,this.getUserBasicInformation(pe.access_token))),(0,ue.b)(Pe=>{this.mapAuthenticatedUserData(Pe,pe)}))}mapAuthenticatedUserData(ne,pe){this.updateUserSessionData({token:pe});const Pe=ye.decodeAccessToken(this.userSession.token.access_token);this.updateUserSessionData({userAccountData:Pe,userPersonData:ne}),this.setAuthorisationToViewConsents(!0),this.tokenExpirationDate=new Date(1e3*Pe.exp);const xe=ne.cookieConsent&&ne.termsAndConditions;this.setMandatoryAgreementsStatus(xe),this.authenticated$.next(!0),this.authenticatedNow$.next(ne)}getUserBasicInformation(ne){return this.http.get(this.environmentService.getEnvironment().API+"./api/sivi-accounts-api/user/basic-info",{headers:this.createAuthorizationHeaders(ne)})}updateOwnPassword(ne,pe,Pe){const xe={currentPassword:ne,password:pe,confirmPassword:Pe};return this.http.post(this.environmentService.getEnvironment().API+"./api/auth/update-own-password",xe,{headers:this.getAuthorizationHeaders()})}updatePassword(ne,pe,Pe){const xe={password:pe,confirmPassword:Pe,uuid:ne};return this.http.post(this.environmentService.getEnvironment().API+"./api/auth/update-forgotten-password",xe,{headers:this.getDefaultHeaders()})}requestNewPassword(ne){return this.http.post(this.environmentService.getEnvironment().API+"./api/auth/reset-password",{loginId:ne},{headers:this.getDefaultHeaders()})}getPersonInfoByUrlToken(ne){return this.http.get(this.environmentService.getEnvironment().API+"./api/auth/password-info/?passwordUuid="+ne,{headers:this.getDefaultHeaders()})}refreshToken(){if(this.isAuthenticated()){const ne=btoa("acme:acmesecret"),pe=new o.WM({Authorization:`Basic  ${ne}`,Accept:"application/json","Content-Type":"application/x-www-form-urlencoded"}),Pe="grant_type=refresh_token&refresh_token="+encodeURIComponent(this.userSession.token.refresh_token);this.http.post(this.environmentService.getEnvironment().API+"./api/auth/oauth/token",Pe,{headers:pe}).pipe((0,Y.q)(1)).subscribe(xe=>{this.updateUserSessionData({token:xe}),this.authenticated$.next(!0);const de=ye.decodeAccessToken(xe.access_token);this.updateUserSessionData({userAccountData:de}),this.tokenExpirationDate=new Date(1e3*de.exp)},xe=>{console.error("refreshToken failed",xe)})}}logout(){this.isLoggingOut$.next(!0),this.logUserOut()}resetSession(){try{this.clearSessionData(),this.storageService.clearSessionData(),this.setMandatoryAgreementsStatus(!1),this.setAuthorisationToViewConsents(!1),this.authenticated$.next(!1)}catch(ne){console.error("resetSession failed",ne)}this.loggingOut=!1}getUserAccountData(){return this.storageService.getUserSession().pipe((0,B.U)(ne=>ne.userAccountData))}getUserPersonData(){return this.storageService.getUserSession().pipe((0,B.U)(ne=>ne.userPersonData))}getAuthorities(){return this.storageService.getUserSession().pipe((0,B.U)(ne=>ne.userPersonData.professionalRoles))}_setAuthorities(ne){this.userSession.userPersonData.professionalRoles=ne}getTokenExpirationDate(){return this.tokenExpirationDate}hasRole(ne,pe=[e.Roles.GENERAL_ADMIN,e.Roles.MUNICIPALITY_SUPPORT]){try{return!(!this.isAuthenticated()||this.userSession.userPersonData.professional||ne!==e.Roles.GUARDIAN)||!(!this.isAuthenticated()||!this.userSession.userPersonData.professionalRoles)&&this.userSession.userPersonData.professionalRoles.some(Pe=>[...pe,ne].includes(Pe.roleName))}catch{return!1}}hasRoleIn(ne,pe){if(this.isAuthenticated()&&this.userSession.userPersonData.professionalRoles&&pe){if(this.hasRole(e.Roles.GENERAL_ADMIN))return!0;const Pe=this.userSession.userPersonData.professionalRoles.filter(xe=>ne.includes(xe.roleName));for(const xe of Pe)if(pe.includes(xe.organizationId))return!0}return!1}hasAnyOfRolesIn(ne,pe){let Pe=!1;if(!ne||0===ne.length)throw new Error("hasAnyOfRolesIn roles parameter is missing");if(!pe)throw new Error("hasAnyOfRolesIn orgPath parameter is missing");for(const xe of ne)if(this.hasRoleIn(xe,pe)){Pe=!0;break}return Pe}isAdmin(){try{return this.isAuthenticated()&&this.userSession.userPersonData.professionalRoles.some(ne=>e.Roles.GENERAL_ADMIN===ne.roleName)}catch{return!1}}isMunicipalitySupportUser(){try{return this.isAuthenticated()&&this.userSession.userPersonData.professionalRoles.some(ne=>e.Roles.MUNICIPALITY_SUPPORT===ne.roleName)}catch{return!1}}isGuardian(){return!this.isProfessional()}isProfessional(){try{return this.isAuthenticated()&&this.userSession.userPersonData.professional}catch{return!1}}hasAnyRole(ne){let pe=!1;return!ne||0===ne.length||(ne.forEach(Pe=>{this.hasRole(Pe)&&(pe=!0)}),pe)}checkTokenExpirationDate(){this.authenticated$.getValue()&&this.tokenExpirationDate&&this.tokenExpirationDate<new Date&&(console.warn("Session timeout"),this.logUserOut())}isAuthenticatedWith3rdPartyService(){const ne=(0,l.Z)(this.userSession,"userAccountData.authMethod");return!!ne&&("SAML"===ne||ne.includes("OAUTH"))}mapPermissionsForSupportUser(ne){const pe=xe=>!!n(ne[xe])||this.mapPermissionsForSupportUser(ne[xe]);return this.isMunicipalitySupportUser()?Object.keys(ne).reduce((xe,de)=>({...xe,[de]:pe(de)}),{}):ne}isSomethingPermitted(ne){return Object.values(ne||{}).some(pe=>!0===pe)}_expireToken(){this.tokenExpirationDate=new Date(0),this.checkTokenExpirationDate()}clearSessionData(){this.userSession={token:null,userPersonData:null,userAccountData:null},this.tokenExpirationDate=null}logUserOut(){if(this.loggingOut)return;this.dismissAllPopups(),this.loggingOut=!0;let pe,ne=!1;!this.platformHelper.isMobilePlatform()&&this.isAuthenticatedWith3rdPartyService()&&(pe=this.environmentService.isLocalDevelopmentEnvironment()?"?redirect=http://localhost:4200/login":`?redirect=${window.location.origin}/login`,ne=!0),this.resetSession(),ne?this.navigateToLogoutEndpoint(pe):(this.isLoggingOut$.next(!1),this.router.navigate(["/login"]))}navigateToLogoutEndpoint(ne){const pe=this.environmentService.isLocalDevelopmentEnvironment()?`${this.environmentService.getEnvironment().API}`:`${window.location.origin}`;window.location.href=pe+"/api/sivi-accounts-api/logout"+ne}loadDataFromStorage(){this.loadDataForE2ETests(),this.storageService.getUserSession().pipe((0,Y.q)(1)).subscribe(ne=>{ne&&ne.token&&ne.token.access_token&&ne.userPersonData&&(this.userSession=ne,this.authenticated$.next(!0),this.tokenExpirationDate=new Date(1e3*this.userSession.userAccountData.exp),this.checkTokenExpirationDate())}),this.storageService.getUserSettings().subscribe(ne=>{this.userSettings=ne})}loadDataForE2ETests(){if([e.Environment.E2E,e.Environment.E2E1].includes(this.environmentService.getEnvironment().environmentName)){const ne=localStorage.getItem("__vesa-testing__");ne&&(this.storageService.saveUserSession(JSON.parse(ne).userSession),this.storageService.saveUserSettings(JSON.parse(ne).userSettings))}}updateUserSessionData(ne){const pe={...this.userSession,...ne};this.userSession=pe,this.storageService.saveUserSession(pe)}getDefaultHeaders(){return new o.WM({Accept:"application/json","vesa-client-version":e.version})}createAuthorizationHeaders(ne){return new o.WM({Authorization:`Bearer ${ne}`,"vesa-client-version":e.version})}createAuthorizationHeadersForLogin(){const ne=btoa("acme:acmesecret"),pe=new o.WM({Authorization:`Basic ${ne}`,Accept:"application/json","Content-Type":"application/x-www-form-urlencoded","vesa-client-version":e.version});return this.addUserLanguageToHeaders(pe)}createAuthorizationHeadersForSSOLogin(){const ne=new o.WM({Accept:"application/json","Content-Type":"application/x-www-form-urlencoded","vesa-client-version":e.version});return this.addUserLanguageToHeaders(ne)}addUserLanguageToHeaders(ne){return(0,l.Z)(this.userSettings,"language.language")&&(ne=ne.append("Accept-Language",this.userSettings.language.language)),ne}dismissAllPopups(){try{const ne=document.getElementsByTagName("ion-modal"),pe=document.getElementsByTagName("ion-alert"),Pe=Array.from(ne),xe=Array.from(pe);[...Pe,...xe].forEach(de=>de.dismiss())}catch(ne){console.warn("Failed to dismiss modals",ne)}}};let ve=ye;ye.\u0275fac=function(pe){return new(pe||ye)(he.LFG(o.eN),he.LFG(e.PlatformHelperService),he.LFG(ae.L),he.LFG(X.F0),he.LFG(e.StorageService))},ye.\u0275prov=he.Yz7({token:ye,factory:ye.\u0275fac,providedIn:"root"})},53377:(qe,I,p)=>{"use strict";p.d(I,{L:()=>E});var o=p(88692),e=p(92340);const D={production:!0,API:"https://demo.cgivesa.fi/",entryUrl:"https://demo.cgivesa.fi/api/sivi-entry-proxy",environmentName:p(43189).qA.DEMO,firebase:{apiKey:"AIzaSyC-K38zkD6i1LTqOSNUJx5DjCRyjQlIERs",authDomain:"cgi-sivi-demo.firebaseapp.com",databaseURL:"https://cgi-sivi-demo.firebaseio.com",projectId:"cgi-sivi-demo",storageBucket:"",messagingSenderId:"431684045828",appId:"1:431684045828:web:69a83c1fc05aab6e447951"},sentry:{dsn:"https://c0e8a40b17774b1c9593c5409d25dafe@vesasentry.sytes.net/8"}};var g=p(94650);const T=class{constructor(){this.forceTestEnvironment=!1,this.API=e.N.API,this._proConsona=null}get proConsona(){return this._proConsona}set proConsona(P){this._proConsona=P}getEnvironment(){return this.forceTestEnvironment?D:{...e.N,API:this.API}}isProduction(){return!this.forceTestEnvironment&&e.N.environmentName===o.Environment.PRODUCTION}setForceTestEnvironment(P){this.forceTestEnvironment=P}isLocalDevelopmentEnvironment(){return!e.N.production}getEnvironmentName(){return this.getEnvironment().environmentName}setAPI(P){this.API=P}isEnvironment(P){return this.getEnvironmentName().includes(P)}isDevOrE2eEnvironment(){return this.isEnvironment(o.Environment.DEV)||this.isEnvironment(o.Environment.E2E)}isUAT(){return this.isEnvironment(o.Environment.UAT)}isSitOrTrainingOrDemo(){return this.isEnvironment(o.Environment.SIT)||this.isEnvironment(o.Environment.TRAINING)||this.isEnvironment(o.Environment.DEMO)}isPreprodOrProdEnvironment(){return this.isEnvironment(o.Environment.PREPROD)||this.isEnvironment(o.Environment.PRODUCTION)}isUatPreprodOrProdEnvironment(){return this.isEnvironment(o.Environment.UAT)||this.isPreprodOrProdEnvironment()}};let E=T;T.\u0275fac=function(w){return new(w||T)},T.\u0275prov=g.Yz7({token:T,factory:T.\u0275fac,providedIn:"root"})},57817:(qe,I,p)=>{"use strict";p.d(I,{L:()=>o.L});var o=p(53377)},35796:(qe,I,p)=>{"use strict";p.d(I,{u:()=>E});var o=p(89947),e=p(94650),l=p(80529),D=p(62669),g=p(53377);const T=class extends o.i{constructor(P,w,B){super(P,w,B),this.http=P,this.authService=w,this.environmentService=B}getGeoCoordinates(P){const w=`./api/sivi-accounts-api/address-search/autocomplete?searchTerm=${P}`;return this.get(w)}findGeoAreasForMunicipalityLocation(P,w,B){const Y=`./api/sivi-accounts-api/geoarea/find-for-location?municipalityId=${P}&lat=${w}&lon=${B}`;return this.get(Y)}findGeoAreaById(P){const w=`./api/sivi-accounts-api/geoarea/${P}`;return this.get(w)}getLocationsList(P){let w=[];for(const B of P)w=[...w,{id:B.id,text:B.label,subtext:B.zip,icon:null}];return w}};let E=T;T.\u0275fac=function(w){return new(w||T)(e.LFG(l.eN),e.LFG(D.e),e.LFG(g.L))},T.\u0275prov=e.Yz7({token:T,factory:T.\u0275fac})},31943:(qe,I,p)=>{"use strict";p.d(I,{id:()=>n.i,ZQ:()=>Pe,IX:()=>l.I,oZ:()=>ft.o,e8:()=>o.e,th:()=>Oe,$T:()=>e.CodeService,MP:()=>D.M,L$:()=>ut.L,Ip:()=>e.FileService,Ky:()=>wt,u7:()=>mt.u,TS:()=>e.LanguageService,Ek:()=>nn.E,CI:()=>st,c:()=>e.NotifyService,_Z:()=>Be._,a:()=>nt,R_:()=>Y,Jj:()=>e.PlatformHelperService,V1:()=>e.StorageService,ey:()=>Ve.e,sF:()=>e.UserSettingsService});var o=p(62669),e=p(88692),l=p(35027),D=p(15622),g=p(80529),E=p(39646),T=p(60515),n=p(89947),P=p(63900),w=p(94650),B=p(53377);const Dn=class extends n.i{constructor(je,Bt,xn){super(je,Bt,xn),this.http=je,this.authService=Bt,this.environmentService=xn,this.personSearchUrl="api/sivi-accounts-api/person-search"}getChildByPin(je){const Bt=`${this.personSearchUrl}/pin/child`;return this.post(Bt,je,this.getCommonOptions())}getGuardianByPin(je){const Bt=`${this.personSearchUrl}/pin/guardian`;return this.post(Bt,je,this.getCommonOptions())}getChildByPinFromPrc(je){const Bt=`${this.personSearchUrl}/pin/child-vrk-only`;return this.post(Bt,je,this.getCommonOptions())}getGuardianByPinFromPrc(je){const Bt=`${this.personSearchUrl}/pin/guardian-vrk-only`;return this.post(Bt,je,this.getCommonOptions())}getChildrenForOrganization(je,Bt,xn){const Fn="./api/sivi-accounts-api/orgs/organization/"+xn+"/children",ui=this.getCommonPageableSearchOptions(je,Bt);return this.get(Fn,ui)}getChildById(je){const Bt=`./api/sivi-accounts-api/user/child/${je}`;return this.get(Bt)}getChildVATJDocuments(je){const Bt=`./api/sivi-accounts-api/user/child/${je}/vatjDocuments`;return this.get(Bt,this.getCommonOptions())}getChildVatjDocument(je,Bt){const xn={...this.getCommonOptions(),responseType:"blob"},Fn=`./api/sivi-accounts-api/user/child/${je}/vatjDocument/${Bt}`;return this.get(Fn,xn)}saveCurrentUserUILanguage(je){this.authService.isAuthenticated()&&this.put(je,"./api/sivi-accounts-api/user/settings/ui-language").subscribe(()=>{},Bt=>{console.error("saveCurrentUserUILanguage failed",Bt)})}getPerson(je,Bt=!1,xn=!1){const Fn=`./api/sivi-accounts-api/people/${je};full=${Bt}?family=${xn}`,ui=this.getCommonSearchOptions();return this.get(Fn,ui)}getPersonById(je){const Bt=`${this.personSearchUrl}/id/${je}`;return this.get(Bt)}getGuardiansAndChildren(je){const xn=Object.entries(je).reduce((Fn,[ui,Ai])=>Fn.set(ui,Ai.toString()),new g.LE);return this.get(this.personSearchUrl,{...this.getCommonOptions(),params:xn})}getGuardiansAndChildrenForAddingPeople(je,Bt){const xn=`${this.personSearchUrl}/for-add-users/`;let Fn=this.getCommonPageableSearchOptions(je.page,je.count),ui=Fn.params;return Object.keys(Bt).forEach(Ai=>ui=ui.set(Ai,Bt[Ai])),Fn={...Fn,params:ui},this.get(xn,Fn)}mergePersons(je){return this.put(je,"./api/sivi-accounts-api/people/merge-with-prc")}getChild(je){const Bt="./api/sivi-accounts-api/people/children/"+je,xn=this.getCommonSearchOptions();return this.get(Bt,xn)}saveChild(je){return this.saveEntity(je,"./api/sivi-accounts-api/user/child")}saveChildByPin(je){return this.post("./api/sivi-accounts-api/user/child/pin",je)}getGuardians(je){const Bt="./api/sivi-accounts-api/children/"+je+"/guardians",xn=this.getCommonSearchOptions();return this.get(Bt,xn)}getPersonMainPhoto(je,Bt){const xn={...this.getCommonOptions()};Bt&&(xn.params=(new g.LE).set("documentSize",Bt));const Fn=`./api/sivi-accounts-api/people/${je}/documents/person-main-picture`;return this.getFileWithProgress(Fn,xn).pipe((0,P.w)(ui=>{if(ui.type===g.dt.Response&&200===ui.status){const Ai=ui.headers.get("Content-Disposition").split(";")[1].trim().split("=")[1],si=Ai.split("."),Vi="image/"+si[si.length-1],Vn=e.Utils.createAttachmentFile([ui.body],Ai,Vi);Vn.relatedEntityId=je;const Hn=new FileReader;return Hn.readAsDataURL(Vn),Hn.onloadend=()=>{Vn.contentBase64=Hn.result},(0,E.of)(Vn)}return T.E}))}savePersonMainPhoto(je,Bt){const xn="./api/sivi-accounts-api/people/"+je+"/documents";return this.saveFile(Bt,xn)}deletePersonMainPhoto(je){const Bt="./api/sivi-accounts-api/people/"+je+"/documents/person-main-picture",xn={...this.getCommonOptions()};return this.delete(Bt,xn)}getGuardianDependents(){return this.get("./api/sivi-accounts-api/vrk/guardian-dependents/draft")}};let Y=Dn;Dn.\u0275fac=function(Bt){return new(Bt||Dn)(w.LFG(g.eN),w.LFG(o.e),w.LFG(B.L))},Dn.\u0275prov=w.Yz7({token:Dn,factory:Dn.\u0275fac,providedIn:"root"});var V=p(61135),ue=p(4128),he=p(54004),ae=p(39300),X=p(9116),ve=p(45840),ye=p(49594),ge=p(33053);const Mn=class extends n.i{constructor(je,Bt,xn){super(je,Bt,xn),this.http=je,this.authService=Bt,this.environmentService=xn}getOrganization(je){const Bt="./api/sivi-accounts-api/orgs/?ids="+je,xn=this.getCommonPageableSearchOptions(0,1);return this.get(Bt,xn).pipe((0,he.U)(Fn=>Fn&&Fn.content?Fn.content[0]:null))}getMunicipality(je){const Bt="./api/sivi-accounts-api/orgs/municipalities/"+je;return this.get(Bt)}};let ne=Mn;Mn.\u0275fac=function(Bt){return new(Bt||Mn)(w.LFG(g.eN),w.LFG(o.e),w.LFG(ut.L))},Mn.\u0275prov=w.Yz7({token:Mn,factory:Mn.\u0275fac,providedIn:"root"});const vi=class{constructor(je,Bt){this.router=je,this.appStateDataOrganizationService=Bt,this.entities$=new V.X({municipality:null,organization:null}),this._listenForRouterChanges()}getMunicipality(){return this.entities$.pipe((0,he.U)(je=>(0,ve.Z)(je.municipality)))}setMunicipality(je){console.error("setMunicipality",je);const Bt=this.entities$.value;this.entities$.next({...Bt,municipality:je})}getOrganization(){return this.entities$.pipe((0,he.U)(je=>(0,ve.Z)(je.organization)))}setOrganization(je){const Bt=this.entities$.value;this.entities$.next({...Bt,organization:je})}updateOrganizationFromBE(){const je=(0,ye.Z)(this.entities$,"value.organization.id");je&&this.appStateDataOrganizationService.getOrganization(je).subscribe(Bt=>{this.setOrganization(Bt)},Bt=>{console.error("updateOrganization failed",Bt)})}resetEntities(){this.entities$.next({municipality:null,organization:null})}_listenForRouterChanges(){this.router.events.pipe((0,ae.h)(je=>je instanceof X.m2)).subscribe(()=>{this._resolveEntities(e.Utils.getPathParamFromRouterSnapshot("municipalityId",this.router.routerState.snapshot.root),e.Utils.getPathParamFromRouterSnapshot("organizationId",this.router.routerState.snapshot.root))})}_resolveEntities(je,Bt){const xn=[];this.shouldResolveMunicipality(je)&&xn.push(this.appStateDataOrganizationService.getMunicipality(je)),this.shouldResolveOrganization(Bt)&&xn.push(this.appStateDataOrganizationService.getOrganization(Bt)),xn.length>0&&(0,ue.D)(xn).subscribe(Fn=>{const ui=Fn.find(si=>si?.organizationType===ge.V6.MUNICIPALITY),Ai=Fn.find(si=>si?.organizationType!==ge.V6.MUNICIPALITY);this.entities$.next({municipality:ui||this.entities$.value.municipality,organization:Ai||this.entities$.value.organization})})}shouldResolveMunicipality(je){return!(!je||this.entities$.value.municipality&&this.entities$.value.municipality.id===je)}shouldResolveOrganization(je){return!(!je||this.entities$.value.organization&&this.entities$.value.organization.id===je)}};let pe=vi;vi.\u0275fac=function(Bt){return new(Bt||vi)(w.LFG(X.F0),w.LFG(ne))},vi.\u0275prov=w.Yz7({token:vi,factory:vi.\u0275fac,providedIn:"root"});const Gi=class{constructor(je){this.dataService=je}getMunicipality(){return this.dataService.getMunicipality()}setMunicipality(je){this.dataService.setMunicipality(je)}getOrganization(){return this.dataService.getOrganization()}setOrganization(je){this.dataService.setOrganization(je)}updateOrganization(){this.dataService.updateOrganizationFromBE()}resetEntitites(){this.dataService.resetEntities()}};let Pe=Gi;Gi.\u0275fac=function(Bt){return new(Bt||Gi)(w.LFG(pe))},Gi.\u0275prov=w.Yz7({token:Gi,factory:Gi.\u0275fac,providedIn:"root"});var xe=p(15439),de=p.n(xe),re=p(77579),oe=p(32076),me=p(82722),be=p(70262),le=p(95577),Z=p(22940);const mi=class extends n.i{constructor(je,Bt,xn){super(je,Bt,xn),this.http=je,this.authService=Bt,this.environmentService=xn}deleteAttachment(je,Bt){const xn=`./api/sivi-accounts-api/people/${je}/document/${Bt}`,Fn={...this.getCommonOptions(),responseType:"arraybuffer"};return this.delete(xn,Fn)}postAttachment(je,Bt){const xn=`./api/sivi-accounts-api/people/${je}/document/`;return this.postFileWithProgress(xn,Bt)}handleUploadAttachment(je,Bt){const xn=new re.x,Fn=e.Utils.copyFile(Bt);return Fn.isLoading=!0,Fn.createdDate=de()().toISOString(),this.postAttachment(je,Fn).pipe((0,me.R)(xn),(0,P.w)(ui=>{const Ai=e.Utils.copyFile(Fn);switch(Ai.tempId=Fn.lastModified.toString(),Ai.isLoading=!0,ui.type){case g.dt.Sent:Ai.loadingProgress=0;break;case g.dt.UploadProgress:const si=Math.round(100*ui.loaded/ui.total);Ai.loadingProgress=si;break;case g.dt.Response:const{id:Vi,createdDate:Vn}=ui.body;Ai.id=Vi,Ai.createdDate=Vn,delete Ai.cancelRequestSub$,delete Ai.loadingProgress,Ai.isLoading=!1;break;default:return T.E}return(0,E.of)(Ai)}),(0,be.K)(ui=>{const Ai=e.Utils.copyFile(Fn);return Ai.tempId=Fn.lastModified.toString(),Ai.restEntityState=e.Constants.DELETED,console.log(new Error(ui)),(0,E.of)(Ai)}))}getPersonAttachment(je,Bt){const xn=`./api/sivi-accounts-api/people/${je}/documents/${Bt}`;return this.getFileWithProgress(xn)}handleDeleteAttachment(je,Bt){const xn=e.Utils.copyFile(Bt);return xn.restEntityState="DELETED",xn.id?this.deleteAttachment(je,xn.id).pipe((0,le.z)(()=>(0,E.of)(xn))):(xn.cancelRequestSub$&&(xn.cancelRequestSub$.next(),xn.cancelRequestSub$.complete()),(0,E.of)(xn))}downloadChildAttachments(je){return je.resources?(0,E.of)(je.resources.filter(Bt=>Bt.documentPurpose===e.AttachmentPurposes.PERSON_ATTACHMENT)).pipe((0,le.z)(Bt=>(0,oe.D)(Bt)),(0,le.z)(Bt=>this.handleDownloadAttachment(je.id,Bt)),(0,Z.R)((Bt,xn)=>e.Utils.patchCollectionBy(Bt,xn,"id"),[])):T.E}handleDownloadAttachment(je,Bt){if(!Bt)return T.E;const xn="PICTURE"===Bt.documentType,Fn=Bt.name.split(".").pop(),ui=xn?"image/"+Fn:"application/octet-stream",Ai=new re.x,si=e.Utils.createAttachmentFile([" "],Bt.name,ui);return si.id=Bt.id,si.createdDate=Bt.createdDate,si.cancelRequestSub$=Ai,si.relatedEntityId=je,this.getPersonAttachment(je,Bt.id).pipe((0,P.w)(Vi=>{const Vn=e.Utils.copyFile(si);switch(Vi.type){case g.dt.Sent:Vn.isLoading=!0;break;case g.dt.DownloadProgress:break;case g.dt.Response:const Hn=e.Utils.createAttachmentFile([Vi.body],Bt.name,ui);if(Hn.id=Bt.id,Hn.createdDate=Bt.createdDate,Hn.relatedEntityId=je,xn){const An=new FileReader;An.readAsDataURL(Hn),An.onloadend=()=>{Hn.contentBase64=An.result}}return(0,E.of)(Hn);default:return T.E}return(0,E.of)(Vn)}))}deleteGuardianRelation(je,Bt){const xn=`./api/sivi-accounts-api/people/children/${je}/sever-guardian/${Bt}`;return this.put({},xn)}getChildPermissions(je){const Bt=`./api/sivi-accounts-api/people/children/${je}/permissions`;return this.get(Bt)}};let Oe=mi;mi.\u0275fac=function(Bt){return new(Bt||mi)(w.LFG(g.eN),w.LFG(o.e),w.LFG(B.L))},mi.\u0275prov=w.Yz7({token:mi,factory:mi.\u0275fac,providedIn:"root"});var j=p(95698),ke=p(69751),Be=p(73877);const wi=class{constructor(je){this.personAgreementsRestService=je,this.personAgreements=[]}setPersonAgreements(je){this.personAgreements=je}resetPersonAgreements(){this.personAgreements=[]}getPersonAgreementsByLanguage(je,Bt){return new ke.y(xn=>{this.language&&this.language===je&&this.personAgreements.length>0?(console.log("Using cache for person agreements",this.personAgreements),xn.next(this.personAgreements),xn.complete()):(this.language=je,this.getPersonAgreements(je,Bt,xn))})}getPersonAgreements(je,Bt,xn){const Fn={locale:je,content:!0,guardianId:Bt};this.personAgreementsRestService.getPersonAgreements(Fn).pipe((0,j.q)(1)).subscribe(ui=>{this.setPersonAgreements(ui),xn.next(ui),xn.complete()},ui=>{this.resetPersonAgreements(),xn.error(ui),xn.complete()})}};let nt=wi;wi.\u0275fac=function(Bt){return new(Bt||wi)(w.LFG(Be._))},wi.\u0275prov=w.Yz7({token:wi,factory:wi.\u0275fac});var mt=p(35796),ut=p(57817),Ve=p(25442),tt=p(34114),Ne=p(17489);const Bn=class{constructor(){this.existingFocusTrapElements=[],this.mostRecentFocusTrapElement=null,this.trappableNodeTypes=["ION-MODAL","ION-ALERT","ION-POPOVER"],this.setTrap=(0,Ne.debounce)(function(je){this.mostRecentFocusTrapElement!==je&&(je.focusTrap=tt(je,{allowOutsideClick:()=>!0,escapeDeactivates:!1}),je.focusTrap.activate(),this.existingFocusTrapElements.push(je),this.mostRecentFocusTrapElement=je)},10)}initialize(je){this.observeForIonModals(je),this.observeFor3rdPartyOverlay()}observeForIonModals(je){const Bt=je;this.changes=new MutationObserver(xn=>{xn.forEach(Fn=>{Fn.addedNodes.length>0&&this.addModalFocusHandler(Fn.addedNodes),Fn.removedNodes.length>0&&this.removeModalFocusHandler(Fn.removedNodes)})}),this.changes.observe(Bt,{attributes:!1,childList:!0,characterData:!1,subtree:!1})}addModalFocusHandler(je){const Bt=[].slice.call(je);for(const xn of Bt){if(!this.trappableNodeTypes.includes(xn.tagName))return;this.setTrap(xn),new MutationObserver(ui=>{ui.forEach(()=>{this.setTrap(xn)})}).observe(xn,{attributes:!1,characterData:!1,childList:!0,subtree:!1})}}removeModalFocusHandler(je){const Bt=[].slice.call(je);for(const xn of Bt)xn.focusTrap&&(xn.focusTrap.deactivate(),delete xn.focusTrap,this.existingFocusTrapElements.length>0&&(this.existingFocusTrapElements.pop(),this.existingFocusTrapElements.length>0?this.mostRecentFocusTrapElement=this.existingFocusTrapElements[this.existingFocusTrapElements.length-1]:this.mostRecentFocusTrapElement=null))}observeFor3rdPartyOverlay(){new MutationObserver(Bt=>{Bt.forEach(xn=>{this.existingFocusTrapElements.length>0&&xn.addedNodes.forEach(Fn=>{Fn.classList.contains("cdk-overlay-container")&&(this.focusDatePicker(Fn),this.observeFor3rdPartyOverlayContent(Fn,"material-calendar")),Fn.classList.contains("tox-tinymce-aux")&&(this.observeFor3rdPartyOverlayContent(Fn,"tinyMCE"),this.setTrap(Fn))})})}).observe(document.body,{attributes:!1,childList:!0,characterData:!1,subtree:!1})}observeFor3rdPartyOverlayContent(je,Bt){new MutationObserver(Fn=>{Fn.forEach(ui=>{this.mostRecentFocusTrapElement&&(ui.addedNodes.length>0&&(this.mostRecentFocusTrapElement.focusTrap.pause(),"material-calendar"===Bt?this.focusDatePicker(je):"tinyMCE"===Bt&&this.focusFirstInput(je)),ui.removedNodes.length>0&&"tox-dialog__popups"!==ui.removedNodes[0].className&&"cdk-overlay-backdrop"!==ui.removedNodes[0].className&&this.mostRecentFocusTrapElement.focusTrap.unpause())})}).observe(je,{attributes:!1,childList:!0,characterData:!1,subtree:!1})}focusFirstInput(je){const Bt=je.querySelector("input");Bt&&Bt.focus()}focusDatePicker(je){je.querySelector(".mat-datepicker-popup")&&(this.mostRecentFocusTrapElement.focusTrap.pause(),je.querySelector("button").focus())}};let wt=Bn;Bn.\u0275fac=function(Bt){return new(Bt||Bn)},Bn.\u0275prov=w.Yz7({token:Bn,factory:Bn.\u0275fac});var ft=p(79688),Ct=p(15861),rn=p(21441),He=p(83905);const kn=class{constructor(je,Bt,xn,Fn,ui,Ai){this.http=je,this.auth=Bt,this.environmentService=xn,this.platformService=Fn,this.settingsService=ui,this.loginProviders=Ai,this.municipalityOptions$=new V.X([]),this.selectedMunicipalityUrls$=new V.X(null),this.selectedMunicipalityOption$=new V.X(null),this.initialized$=new V.X(!1),this.entryUrl=xn.getEnvironment().entryUrl||"https://dev1.cgivesa.fi/api/sivi-entry-proxy",this.municipalityOptions$.observed||this.watchOptionChanges()}isInitialized(){return this.initialized$.pipe((0,ae.h)(Boolean))}getMunicipalityOptions(){return this.municipalityOptions$.asObservable()}getSelectedMunicipalityUrl(){return this.selectedMunicipalityUrls$.asObservable()}getSelectedMunicipalityOption(){return this.selectedMunicipalityOption$.asObservable()}initializeMunicipalityOptions(){this.http.get(`${this.entryUrl}/municipalities/options`).pipe((0,j.q)(1)).subscribe({next:je=>{this.municipalityOptions$.next(je)},error:je=>{this.municipalityOptions$.error(je)}})}setSelectedOption(je){this.getMunicipalityByNumber(je.value).subscribe(Bt=>{this.setMunicipalityInfo(Bt,je)})}resetMunicipality(){this.environmentService.proConsona=null,this.selectedMunicipalityUrls$.next(null),this.selectedMunicipalityOption$.next(null),this.settingsService.resetMunicipalitySelection()}watchOptionChanges(){this.municipalityOptions$.pipe((0,ae.h)(je=>je.length>0)).subscribe(()=>{this.initializeOptionSelection()})}initializeOptionSelection(){if(this.platformService.isMobilePlatform())this.handleMobileInitialization();else{const je=window.location.hostname===e.AuthDomains.LOCALHOST,Bt=this.municipalityOptions$.getValue().find(xn=>`${window.location.origin}/`===xn.url||je&&xn.url===e.AuthDomains.DEV1);Bt?this.setSelectedAndCompleteInit(Bt):this.initialized$.next(!0)}}setSelectedAndCompleteInit(je){this.getMunicipalityByNumber(je.value).subscribe(Bt=>{this.setMunicipalityInfo(Bt,je),this.initialized$.next(!0)})}handleMobileInitialization(){var je=this;return(0,Ct.Z)(function*(){const Bt=yield(0,He.z)(je.settingsService.getSettings());if((0,rn.Z)(Bt?.selectedMunicipalityUrls))return void je.initialized$.next(!0);const xn=je.municipalityOptions$.getValue().find(Fn=>Fn.value===Bt.selectedMunicipalityUrls.municipalityNumber);xn&&Bt.selectedMunicipalityUrls.municipalityUrl===xn.url?je.setMunicipalityInfo(Bt.selectedMunicipalityUrls,Bt.selectedMunicipality):je.settingsService.resetMunicipalitySelection(),je.initialized$.next(!0)})()}setMunicipalityInfo(je,Bt){this.environmentService.proConsona=je.proConsona,this.selectedMunicipalityUrls$.next(je),this.selectedMunicipalityOption$.next({...Bt,url:je.municipalityUrl}),this.setMunicipalityInformationToStorage(je,Bt);let xn=(0,ve.Z)(je);this.platformService.isMobilePlatform()||(xn=this.setLocalRedirect(xn)),this.setUrlInformationToServices(xn)}setMunicipalityInformationToStorage(je,Bt){this.settingsService.setSelectedMunicipality(Bt),this.settingsService.setSelectedMunicipalityUrls(je)}setUrlInformationToServices(je){this.loginProviders.setProviderUrls(je),this.environmentService.setAPI(je.municipalityUrl),this.loginProviders.setMunicipalityNumberToSuomi(je.municipalityNumber)}getMunicipalityByNumber(je){return this.http.get(`${this.entryUrl}/municipalities/options/${je}`).pipe((0,j.q)(1))}setLocalRedirect(je){if(window.location.hostname===e.AuthDomains.LOCALHOST){const Bt=window.location.port;je.AD_StartUrl+=`?redirect=http://localhost:${Bt}/login`,je.EDU_StartUrl+=`?redirect=http://localhost:${Bt}/login`,je.SUOMI_StartUrl+=`&redirect=http://localhost:${Bt}/login`,console.log("Localhost urls:",je)}return je}};let st=kn;kn.\u0275fac=function(Bt){return new(Bt||kn)(w.LFG(g.eN),w.LFG(o.e),w.LFG(ut.L),w.LFG(e.PlatformHelperService),w.LFG(e.UserSettingsService),w.LFG(nn.E))},kn.\u0275prov=w.Yz7({token:kn,factory:kn.\u0275fac,providedIn:"root"});var nn=p(38059)},88359:(qe,I,p)=>{"use strict";var o,e;p.d(I,{M:()=>o}),(e=o||(o={})).AD="AD",e.EDU_AD="EDU_AD",e.SUOMI="SUOMI.FI"},38059:(qe,I,p)=>{"use strict";p.d(I,{E:()=>ue});var o=p(88692),e=p(88359),l=p(92340);const D={[e.M.AD]:{startUrl:l.N.production?l.N.API+"./api/sivi-accounts-api/oauth2/authorization/vantaa":l.N.API+"./api/sivi-accounts-api/oauth2/authorization/vantaa?redirect=http://localhost:4200/login",loginUrl:l.N.API+"./api/sivi-accounts-api/login/oauth2/code/vantaa"},[e.M.EDU_AD]:{startUrl:l.N.production?l.N.API+"./api/sivi-accounts-api/oauth2/authorization/eduvantaa":l.N.API+"./api/sivi-accounts-api/oauth2/authorization/eduvantaa?redirect=http://localhost:4200/login",loginUrl:l.N.API+"./api/sivi-accounts-api/login/oauth2/code/eduvantaa"},[e.M.SUOMI]:{startUrl:l.N.environmentName===o.Environment.PRODUCTION?l.N.API+"./api/sivi-accounts-api/saml/sp/discovery?idp=https://tunnistautuminen.suomi.fi/idp1":l.N.production?l.N.API+"./api/sivi-accounts-api/saml/sp/discovery?idp=https://testi.apro.tunnistus.fi/idp1":l.N.API+"./api/sivi-accounts-api/saml/sp/discovery?idp=https://testi.apro.tunnistus.fi/idp1&redirect=http://localhost:4200/login",loginUrl:l.N.API+"./api/sivi-accounts-api/saml/sp/SSO/alias/cgiVesaDevTest"}};var g=p(49594);class E{constructor(X){const ve=D[X],ye=(0,g.Z)(l.N,["loginProviders",X]);this.startUrl=(0,g.Z)(ye,"startUrl")||ve.startUrl,this.loginUrl=(0,g.Z)(ye,"loginUrl")||ve.loginUrl}setMunicipalityNumber(X){this.municipalityNumber=X}setStartUrl(X){this.startUrl=X}setLoginUrl(X){this.loginUrl=X}getStartUrl(X){return this.startUrl}getLoginUrl(){return this.loginUrl}getLoginParams(X){return new URL(X).search}isRedirected(X){return!(l.N.production||!X.includes("http://localhost:4200/login?responseKey="))||X.includes("cgivesa")}}var T=p(64837);const B={[e.M.AD]:new class n extends E{constructor(){super(e.M.AD),this.authRequestId=o.Utils.createUUID(),this.params=[{name:"authRequestId",value:this.authRequestId},{name:"clientVersion",value:T.i}],this.setStartUrl(this.startUrl)}setStartUrl(X){this.startUrl=o.Utils.addParamsToURL(X,this.params)}getLoginParams(X){return`${super.getLoginParams(X)}&authRequestId=${this.authRequestId}`}isRedirected(X){return super.isRedirected(X)&&X.includes("code=")}},[e.M.EDU_AD]:new class w extends E{constructor(){super(e.M.EDU_AD),this.authRequestId=o.Utils.createUUID(),this.params=[{name:"authRequestId",value:this.authRequestId},{name:"clientVersion",value:T.i}],this.setStartUrl(this.startUrl)}setStartUrl(X){this.startUrl=o.Utils.addParamsToURL(X,this.params)}getLoginParams(X){return`${super.getLoginParams(X)}&authRequestId=${this.authRequestId}`}isRedirected(X){return super.isRedirected(X)&&X.includes("code=")}},[e.M.SUOMI]:new class P extends E{constructor(){super(e.M.SUOMI)}getLoginParams(X){return super.getLoginParams(X).replace("responseKey","SAMLResponse")}isRedirected(X){return super.isRedirected(X)&&X.includes("responseKey=")}getStartUrl(X){const ve=this.municipalityNumber?`&municipalityOrganizationNumber=${this.municipalityNumber}`:"";return`${this.startUrl}&lang=${X}&clientVersion=${T.i}${ve}`}setMunicipalityNumber(X){this.municipalityNumber=X}}};var Y=p(94650);const V=B[Object.keys(e.M)[0]],he=class{constructor(){this.loginProviders=B,this.currentLoginProvider=V}getCurrentLoginProvider(){return this.currentLoginProvider}setCurrentLoginProvider(X){return this.loginProviders[X]?(this.currentLoginProvider=this.loginProviders[X],this.currentLoginProvider):null}getCurrentStartUrl(X){return this.currentLoginProvider.getStartUrl(X)}getCurrentLoginUrl(){return this.currentLoginProvider.getLoginUrl()}getCurrentLoginParams(X){return this.currentLoginProvider.getLoginParams(X)}didCurrentProviderRedirect(X){return this.currentLoginProvider.isRedirected(X)}setCurrentProviderIfRedirected(X){return Object.keys(this.loginProviders).some(ye=>{const ne=this.loginProviders[ye].isRedirected(X);return ne&&this.setCurrentLoginProvider(ye),ne})?this.currentLoginProvider:null}setProviderUrls(X){this.loginProviders[e.M.AD].setLoginUrl(X.AD_LoginUrl),this.loginProviders[e.M.AD].setStartUrl(X.AD_StartUrl),this.loginProviders[e.M.EDU_AD].setLoginUrl(X.EDU_LoginUrl),this.loginProviders[e.M.EDU_AD].setStartUrl(X.EDU_StartUrl),this.loginProviders[e.M.SUOMI].setLoginUrl(X.SUOMI_LoginUrl),this.loginProviders[e.M.SUOMI].setStartUrl(X.SUOMI_StartUrl)}setMunicipalityNumberToSuomi(X){this.loginProviders[e.M.SUOMI].setMunicipalityNumber(X)}};let ue=he;he.\u0275fac=function(ve){return new(ve||he)},he.\u0275prov=Y.Yz7({token:he,factory:he.\u0275fac})},89947:(qe,I,p)=>{"use strict";p.d(I,{i:()=>T});var o=p(80529),e=p(39646),l=p(54004),D=p(94650),g=p(62669),E=p(57817);const n=class{constructor(w,B,Y){this.http=w,this.authService=B,this.environmentService=Y}saveEntity(w,B){return w&&w.id?this.http.put(this.formUrl(B),w,this.getCommonOptions()):this.http.post(this.formUrl(B),w,this.getCommonOptions())}sendEntity(w,B){return this.http.post(this.formUrl(B),w,this.getCommonOptions())}saveArray(w,B){return this.http.post(this.formUrl(B),w,this.getCommonOptions())}saveFile(w,B){const Y=new FormData;return Y.append("file",w),this.http.post(this.formUrl(B),Y,this.getCommonOptions())}put(w,B){return this.http.put(this.formUrl(B),w,this.getCommonOptions())}post(w,B,Y){return Y=Y||this.getCommonOptions(),this.http.post(this.formUrl(w),B,Y)}postMultipart(w,B){const Y=new FormData;for(const ue in B)B.hasOwnProperty(ue)&&(B[ue]instanceof Array||(B[ue]=[B[ue]]),B[ue].forEach(he=>{const ae="application/json"===he.type?JSON.stringify(he.content):he.content,X=new Blob([ae],{type:he.type}),ve=he.content.name?[ue,X,he.content.name]:[ue,X];Y.append(...ve)}));const V=this.getCommonOptions();return this.http.post(this.formUrl(w),Y,V)}putMultipart(w,B){const Y=new FormData;for(const ue in B)B.hasOwnProperty(ue)&&(B[ue]instanceof Array||(B[ue]=[B[ue]]),B[ue].forEach(he=>{const ae="application/json"===he.type?JSON.stringify(he.content):he.content,X=new Blob([ae],{type:he.type}),ve=he.content.name?[ue,X,he.content.name]:[ue,X];Y.append(...ve)}));const V=this.getCommonOptions();return this.http.put(this.formUrl(w),Y,V)}getFileWithProgress(w,B){const Y=B||this.getCommonOptions(),V=new o.aW("GET",this.formUrl(w),null,{...Y,responseType:"blob",reportProgress:!0});return this.http.request(V)}postFileWithProgress(w,B,Y){const V=Y||this.getCommonOptions(),ue=new FormData;ue.append("file",B,B.name);const he=new o.aW("POST",this.formUrl(w),ue,{...V,reportProgress:!0});return this.http.request(he)}patch(w,B){return this.http.patch(this.formUrl(B),w,this.getCommonOptions())}get(w,B){return B=B||this.getCommonOptions(),this.http.get(this.formUrl(w),B)}delete(w,B=this.getCommonOptions()){return this.http.delete(this.formUrl(w),B)}getCommonPageableSearchOptions(w=0,B=20,Y=""){let V=(new o.LE).set("page",""+w).set("size",""+B);return Y&&(V=V.set("sort",Y)),{headers:this.getCommonSearchOptions().headers,params:V}}getCommonPageableSearchOptionsMultipleSorts(w=0,B=20,Y=[]){let V=(new o.LE).set("page",""+w).set("size",""+B);return Y.length&&Y.forEach(ue=>{V=V.append("sort",`${ue.active},${ue.direction}`)}),{headers:this.getCommonSearchOptions().headers,params:V}}getCommonSearchOptions(){return this.getCommonOptions()}getCommonOptions(){return{headers:this.authService.getAuthorizationHeaders()}}getImage(w,B,Y){return this.http.get(this.formUrl(w),B).pipe((0,l.U)(V=>new Blob([V],{type:"image/"+Y}),V=>(console.log(V),(0,e.of)(null))))}formUrl(w){return this.environmentService.getEnvironment().API+w}};let T=n;n.\u0275fac=function(B){return new(B||n)(D.LFG(o.eN),D.LFG(g.e),D.LFG(E.L))},n.\u0275prov=D.Yz7({token:n,factory:n.\u0275fac,providedIn:"root"})},35027:(qe,I,p)=>{"use strict";p.d(I,{I:()=>ne});var o=p(89947),e=p(80529),l=p(24956),D=p(95577),g=p(22940),E=p(82722),T=p(63900),n=p(70262),P=p(39646),w=p(32076),B=p(77579),Y=p(60515),V=p(15439),ue=p.n(V),he=p(88692),ae=p(43189),X=p(6054),ve=p(94650),ye=p(62669),ge=p(53377);const pe=class extends o.i{constructor(xe,de,re,oe){super(xe,re,oe),this.http=xe,this.notify=de,this.auth=re,this.environmentService=oe}createApplication(xe){const de=`./api/sivi-ada-api/daycare-applications/draft/${xe.applicationType}/${xe.municipalityId}/${xe.childId}`;return this.get(de)}createBehalfApplicationForChild(xe){"TWO_YEAR_PPE"===xe.type&&(xe.type=ae.wW.PPE,xe.twoYear=!0);const{type:de,municipalityId:re,child:oe,guardians:me,twoYear:be}=xe;if(!me)throw Error("createBehalfApplicationForChild guardians array is empty");const le=`./api/sivi-ada-api/daycare-applications/draft/behalf/${me[0].id}/${de}/${re}`,Z=this.getCommonOptions();if(xe.type===ae.wW.PPE){const Oe="boolean"==typeof be?be.toString():"false";Z.params=(new e.LE).set("twoYear",Oe)}return this.post(le,oe,Z)}createApplicationForChild(xe){const{applicationType:de,municipalityId:re,child:oe}=xe,me=`./api/sivi-ada-api/daycare-applications/draft/${de}/${re}/`;return this.post(me,oe)}getApplicationsCreatedByCurrentUser(xe){return this.get("./api/sivi-ada-api/daycare-applications/family",this.getCommonPageableSearchOptions(xe.page,xe.count))}getApplicationsByPersonId(xe,de,re){let oe;return re===l.gT.DRAFT?oe=`./api/sivi-ada-api/application/person-draft-applications/${xe}`:re===l.gT.SAVED&&(oe=`./api/sivi-ada-api/application/person-saved-applications/${xe}`),this.get(oe,this.getCommonPageableSearchOptions(de.page,de.count))}getGuardianApplicationsForChild(xe,de){const re=`./api/sivi-ada-api/daycare-applications/child/id/${xe}`;return this.get(re,this.getCommonPageableSearchOptions(de.page,de.count))}getProfessionalApplicationsForChild(xe,de,re){const oe=`./api/sivi-ada-api/daycare-applications/municipality/${xe}/child/${de}`;return this.get(oe,this.getCommonPageableSearchOptions(re.page,re.count))}getApplication(xe){const de=`./api/sivi-ada-api/daycare-applications/${xe}/`;return this.get(de)}getHistory(xe){const de=`./api/sivi-ada-api/applications/${xe}/log`;return this.get(de)}getMessages(xe,de){const oe=this.getCommonPageableSearchOptions(0,99,""),me=oe.params.set("masterId",xe).set("visibility",de).set("states",X.BQ.SAVED);return this.get("./api/sivi-messaging-api/application-messages",{...oe,params:me})}postMessage(xe,de,re){const oe=`./api/sivi-messaging-api/application-messages/${re}`,me={masterId:xe,masterType:X.Zn.APPLICATION,content:de};return this.post(oe,me)}deleteMessage(xe){const de=`./api/sivi-messaging-api/application-messages/${xe}`;return this.delete(de)}getSentApplicationPDF(xe){const de="./api/sivi-ada-api/applications/pdf/"+xe,re={...this.getCommonOptions(),responseType:"blob"};return this.get(de,re)}updateApplication(xe){let de;return de=xe.state===l.gT.DRAFT?`./api/sivi-ada-api/daycare-applications/draft/${xe.id}/`:`./api/sivi-ada-api/daycare-applications/${xe.id}/`,this.put(xe,de)}sendApplication(xe){const de=`./api/sivi-ada-api/daycare-applications/draft/send/${xe.id}/`;return this.sendEntity(xe,de)}deleteApplication(xe){const de=`./api/sivi-ada-api/daycare-applications/draft/delete/${xe}/`;return this.delete(de)}putApplicationsSession(xe){return this.put(xe,"./api/sivi-ada-api/pre-placement/moveToPrePlacement")}postApplicationsSession(xe){return this.post("./api/sivi-ada-api/pre-placements/add-applications",xe)}moveApplicationsToHandling(xe){return this.post("./api/sivi-ada-api/applications/move-to-handling",xe)}moveApplicationsBackFromHandling(xe){return this.post("./api/sivi-ada-api/applications/move-back-from-handling",xe)}removePendingStatus(xe){const re=xe;return this.post("./api/sivi-ada-api/applications/move-from-voucher-pending-to-final",re)}cancelApplication(xe){const de=`./api/sivi-ada-api/daycare-applications/cancel/${xe}/`;return this.delete(de)}cancelApplicationWithReason(xe,de){const re=`./api/sivi-ada-api/daycare-applications/cancel/${xe}/`;return this.put(de,re)}getApplicationOverlapping(xe){const de=`./api/sivi-ada-api/pre-placements/overlapping-pre-placements-and-placements?applicationIds=${xe}`;return this.get(de)}getApplicationAttachments(xe){const de=`./api/sivi-ada-api/application/${xe}/attachments/`;return this.get(de)}getReasonAttachment(xe,de){const re=`./api/sivi-ada-api/application/${xe}/attachments/${de}`;return this.getFileWithProgress(re)}getUnitsByApplicationAndMunicipality(xe){const de=`./api/sivi-ada-api/application/${xe.id}/units/${xe.restApplicationMunicipality.municipalityId}/`;return this.get(de)}getECECUnits(xe){const de=`./api/sivi-accounts-api/orgs/municipality/${xe}/daycare`;return this.get(de,this.getCommonOptions())}getApplicationPdfs(xe){const de=`./api/sivi-ada-api/applications/pdfs/${xe}`;return this.get(de)}deleteReasonAttachment(xe,de){const re=`./api/sivi-ada-api/application/${xe}/attachments/${de}`,oe={...this.getCommonOptions(),responseType:"arraybuffer"};return this.delete(re,oe)}handleDeleteAttachment(xe,de){const re=he.Utils.copyFile(de);return re.restEntityState="DELETED",re.id?this.deleteReasonAttachment(xe,re.id).pipe((0,D.z)(()=>(0,P.of)(re))):(re.cancelRequestSub$&&(re.cancelRequestSub$.next(),re.cancelRequestSub$.complete()),(0,P.of)(re))}postReasonAttachment(xe,de,re){const oe=`./api/sivi-ada-api/application/${xe}/attachments/?documentPurpose=${re}`;return this.postFileWithProgress(oe,de)}downloadReasonAttachments(xe,de){return console.log(xe),(0,P.of)(xe).pipe((0,D.z)(re=>(0,w.D)(re)),(0,D.z)(re=>this.getReasonAttachment(de,re.id)),(0,g.R)((re,oe)=>he.Utils.patchCollectionBy(re,oe,"id"),[]))}downloadAttachment(xe,de){return this.handleDownloadAttachment(xe,de)}handleUploadAttachment(xe,de,re){const oe=new B.x,me=he.Utils.copyFile(de);return me.isLoading=!0,me.createdDate=ue()().toISOString(),me.relatedEntityId=xe,me.documentPurpose=re,this.postReasonAttachment(xe,me,re).pipe((0,E.R)(oe),(0,T.w)(be=>{const le=he.Utils.copyFile(me);switch(le.tempId=me.lastModified.toString(),le.isLoading=!0,be.type){case e.dt.Sent:le.loadingProgress=0;break;case e.dt.UploadProgress:const Z=Math.round(100*be.loaded/be.total);le.loadingProgress=Z;break;case e.dt.Response:const{id:Oe,createdDate:j,documentPurpose:ke}=be.body;le.id=Oe,le.createdDate=j,le.documentPurpose=ke,delete le.cancelRequestSub$,delete le.loadingProgress,delete le.isLoading;break;default:return Y.E}return(0,P.of)(le)}),(0,n.K)(be=>{const le=he.Utils.copyFile(me);return le.tempId=me.lastModified.toString(),le.restEntityState="DELETED",console.log(new Error(be)),this.notify.alertSaveError(),(0,P.of)(le)}))}handleDownloadAttachment(xe,de){console.log("ApplicationService -> attachmentInfo",de.name);const re="PICTURE"===de.documentType,oe=de.name.split(".").pop(),me=re?"image/"+oe:"application/octet-stream",be=new B.x,le=he.Utils.createAttachmentFile([" "],de.name,me);return le.id=de.id,le.createdDate=de.createdDate,le.documentPurpose=de.documentPurpose,le.cancelRequestSub$=be,this.getReasonAttachment(xe,de.id).pipe((0,T.w)(Z=>{const Oe=he.Utils.copyFile(le);switch(Z.type){case e.dt.Sent:Oe.isLoading=!0;break;case e.dt.DownloadProgress:break;case e.dt.Response:const j=he.Utils.createAttachmentFile([Z.body],de.name,me);if(j.id=de.id,j.createdDate=de.createdDate,j.documentPurpose=de.documentPurpose,re){const ke=new FileReader;ke.readAsDataURL(j),ke.onloadend=()=>{j.contentBase64=ke.result}}return(0,P.of)(j);default:return Y.E}return(0,P.of)(Oe)}))}findAllCurrentEcecDaycareplaces(xe,de){const re=this.getCommonSearchOptions(),oe=`./api/sivi-accounts-api/orgs/current-ecec-daycareplaces/${xe}`;return de&&(re.params=(new e.LE).set("date",de)),this.get(oe,re)}findChildECECPlaceWithDate(xe,de,re){const oe=this.getCommonSearchOptions();return oe.params=(new e.LE).set("date",de).set("childId",xe).set("municipalityId",re),this.get("./sivi-ada-api/placements/unit-for-child-and-date",oe)}getAreasForMunicipality(xe,de){let re=`./api/sivi-accounts-api/orgs/application-areas?municipalityId=${xe}`;if(de&&de.latitude&&de.longitude){const{latitude:oe,longitude:me}=de;re+=`&lat=${oe}&lng=${me}`}return this.get(re)}getApplicationPermits(xe){const de=`./api/sivi-ada-api/daycare-applications/${xe}/permits-own`;return this.get(de)}getAvailableStaffMembers(xe){const de=`./api/sivi-ada-api/application/${xe}/additional-permissions/available-users`;return this.get(de)}removeAdditionalHandler(xe,de){const re=`./api/sivi-ada-api/application/${xe}/additional-permissions/${de}`;return this.delete(re)}addAdditionalHandler(xe,de){const re=`./api/sivi-ada-api/application/${xe}/additional-permissions/${de}`;return this.put({},re)}getActiveServiceForms(xe){const re=this.getCommonOptions();return re.params=(new e.LE).set("date",xe),this.get("./api/sivi-accounts-api/municipality-settings/active-service-forms",re)}};let ne=pe;pe.\u0275fac=function(de){return new(de||pe)(ve.LFG(e.eN),ve.LFG(he.NotifyService),ve.LFG(ye.e),ve.LFG(ge.L))},pe.\u0275prov=ve.Yz7({token:pe,factory:pe.\u0275fac})},42250:(qe,I,p)=>{"use strict";p.d(I,{f:()=>E});var o=p(89947),e=p(94650),l=p(80529),D=p(62669),g=p(53377);const T=class extends o.i{constructor(P,w,B){super(P,w,B),this.http=P,this.authService=w,this.environmentService=B}getMenuAttributes(){const w=this.getCommonSearchOptions();return this.get("./api/sivi-accounts-api/vesa-ui/attributes",w)}};let E=T;T.\u0275fac=function(w){return new(w||T)(e.LFG(l.eN),e.LFG(D.e),e.LFG(g.L))},T.\u0275prov=e.Yz7({token:T,factory:T.\u0275fac})},15622:(qe,I,p)=>{"use strict";p.d(I,{M:()=>E});var o=p(80529),e=p(89947),l=p(94650),D=p(62669),g=p(57817);const T=class extends e.i{constructor(P,w,B){super(P,w,B),this.http=P,this.auth=w,this.environmentService=B,this.decisionBaseUrl="./api/sivi-ada-api/decision"}getDecisionDocumentsForChild(P,w){const B=`${this.decisionBaseUrl}/documents`,Y=this.getCommonPageableSearchOptions(w.page,w.count);return Y.params=Y.params.set("childId",P),this.get(B,Y)}getFamilyDecisions(P){const w=`${this.decisionBaseUrl}/family`,B=this.getCommonPageableSearchOptions(P.page,P.count);return this.get(w,B)}downloadDecisionPdf(P,w,B){const Y=`${this.decisionBaseUrl}/first-pdf`;let V=(new o.LE).set("decisionId",P);w&&(V=V.set("language",w)),B&&(V=V.set("personId",B));const ue={...this.getCommonOptions(),params:V,responseType:"blob"};return this.get(Y,ue)}};let E=T;T.\u0275fac=function(w){return new(w||T)(l.LFG(o.eN),l.LFG(D.e),l.LFG(g.L))},T.\u0275prov=l.Yz7({token:T,factory:T.\u0275fac})},25442:(qe,I,p)=>{"use strict";p.d(I,{e:()=>E});var o=p(24956),e=p(59378),l=p(49594),D=p(94650),g=p(89383);const T=class{constructor(P){this.translate=P,this.FAMILY_DAYCARE_LABEL=this.translate.instant(o.V6.DAYCAREPLACE_TYPE_FAMILY_DAYCARE)}getUnitFocusesTextWithBrackets(P,w){if((0,e.Z)(P))return;if(P.organizationType===o.V6.DAYCAREPLACE_TYPE_FAMILY_DAYCARE)return`${this.FAMILY_DAYCARE_LABEL} (${P.name})`;const Y=this.getUnitFocus(P,w);return P.name+((0,e.Z)(Y)?"":" ("+Y+")")}getUnitFocus(P,w){if((0,e.Z)(P))return;const B=[],Y=(0,l.Z)(P,"organizationLanguageFocuses",[]),V=(0,l.Z)(P,"organizationActivityFocuses",[]);return B.push(...this.getUnitLanguageFocus(Y,w)),B.push(...this.getUnitActivityFocus(V)),o.cQ.capitalizeString(B.filter(ue=>!!ue).map(ue=>this.translate.instant(ue)).join(", "))}getUnitActivityFocus(P){return(P||[]).map(w=>w.activityFocusCode)}getUnitLanguageFocus(P,w){const B=[];return(P||[]).forEach(Y=>{const{extent:V,languageCode:ue}=Y,he=w.find(ae=>ae.code?.toUpperCase()===ue?.toUpperCase())?.name||ue;B.push(he),B.push(V)}),B}};let E=T;T.\u0275fac=function(w){return new(w||T)(D.LFG(g.sK))},T.\u0275prov=D.Yz7({token:T,factory:T.\u0275fac,providedIn:"root"})},83734:(qe,I,p)=>{"use strict";p.d(I,{v:()=>o});const e=class{};let o=e;e.APPLICATIONS_MANAGEMENT="applications-management",e.MUNICIPALITY="municipality",e.MUNICIPALITIES="municipalities",e.STAFF_EDITOR="staff-editor",e.GUARDIANS_AND_CHILDREN="guardians-and-children",e.CHILDREN="children",e.FEES="fee-handling",e.EDUCATION_GROUP="education-group",e.CHILD="child",e.MY_HOMEPAGE="my-home",e.ERROR_ACCESS_DENIED="access-denied",e.UNKNOWN_ERROR="error",e.LOGIN="login",e.HOME_MY_ROLES="roles",e.HOME="home",e.HOME_GUARDIAN_TOPICS="home/guardian-topics",e.MUNICIPALITY_SETTINGS="municipality-settings",e.HELP="help",e.ACCOUNT="account",e.USER_ACCOUNT="user/account",e.USER_INFO="user/info",e.INFO="info",e.ORGANIZATIONS="organizations",e.INVOICING="invoicing"},43189:(qe,I,p)=>{"use strict";p.d(I,{AV:()=>Pe,mM:()=>P,qA:()=>Ct,wW:()=>w});const st=class{};st.PAGE_NUMBER_FIRST=0,st.HIGH_API_RESPONSES=95,st.MAX_API_RESPONSES=999,st.PAGING_MAX_RESPONSES=20,st.PAGINATOR_PAGE_SIZES=[10,20,50,100,200,300],st.MAX_FILE_SIZE_IN_MEGABYTES=5,st.MAX_FILE_SIZE_IN_BYTES=5242880,st.CURRENT="CURRENT",st.FUTURE="FUTURE",st.EXPIRED="EXPIRED",st.DELETED="DELETED",st.DRAFT="DRAFT",st.PUBLISH="PUBLISH",st.SAVED="SAVED",st.SENT="SENT",st.CANCELLED="CANCELLED",st.FINAL="FINAL",st.TARGETCHILD="TARGETCHILD",st.NO_ID="no-id",st.NEW_ID="new",st.MODAL="modal",st.SETTINGS="settings",st.AUTOSAVE_WAIT_TIME=1e3,st.APPLICATION_AUTOSAVE_WAIT_TIME=2e3,st.FILTER_WAIT_TIME=1e3,st.VALIDATOR_WAIT_TIME=100,st.YES="yes",st.NO="no",st.PROFESSIONAL_LOGIN_METHOD_PREFIX="OAUTH2",st.BACKEND_ERROR_PREFIX="Backend.Error.",st.TRANSLATED_UI_LANGUAGES=["fi","sv","en"],st.ROLE_TYPE_PROFESSIONAL="professional",st.ROLE_TYPE_GUARDIAN="guardian",st.ECEC="early-childhood-education",st.NO_SERVICE_FORMAT="noServiceFormat",st.EDUCATION="education",st.ANY_FDCP="ECEC.Application.Instructions.FamilyDaycare";const nn=class{};nn.MUNICIPALITY="sivi.organization.type.municipality",nn.MUNICIPALITY_AREA="sivi.organization.type.municipalityarea",nn.DAYCAREPLACE="sivi.organization.type.daycareplace.type",nn.DAYCAREPLACE_TYPE_OPEN_DAYCARE="sivi.organization.type.daycareplace.type.opendaycare",nn.DAYCAREPLACE_TYPE_FAMILY_DAYCARE="sivi.organization.type.daycareplace.type.familydaycare",nn.DAYCAREPLACE_TYPE_GROUP_FAMILY_DAYCARE="sivi.organization.type.daycareplace.type.groupfamilydaycare",nn.DAYCAREPLACE_TYPE_DAYCARE_CENTRE="sivi.organization.type.daycareplace.type.daycarecentre",nn.DAYCAREPLACE_GROUP="sivi.organization.type.daycareplace.group",nn.DAYCAREPLACE_GROUP_PRESCHOOL="sivi.organization.type.daycareplace.group.preschool",nn.DAYCAREPLACE_GROUP_REGULAR="sivi.organization.type.daycareplace.group.regular",nn.SCHOOL="sivi.organization.type.school.type",nn.SCHOOL_TYPE_SCHOOL="sivi.organization.type.school.type.school",nn.MUNICIPALITY_AREA_CODE="sivi.organization.type.municipalityarea",nn.ORGANIZATION_TYPE_GENERAL="sivi.organization.type.general",nn.ORGANIZATION_TYPE_AREA="sivi.organization.type.area-department",nn.ORGANIZATIONAL_AREA="sivi.organization.type.area",nn.MUNICIPALITY_SHORT="municipality",nn.ORGANIZATION_GENERAL_SHORT="general",nn.DAYCAREPLACE_SHORT="unit",nn.DAYCAREPLACE_GROUP_SHORT="group",nn.MUNICIPALITY_AREA_USAGE="sivi.organization.type.municipalityarea.usage",nn.EDUCATION="sivi.organization.type.municipalityarea.usage.education",nn.EARLY_CHILDHOOD_AND_EDUCATION="sivi.organization.type.municipalityarea.usage.early-childhood-education",nn.ECEC_AND_EDUCATION="sivi.organization.type.municipalityarea.usage.ecec-and-education",nn.ORGANIZATION_FORMAT_PUBLIC="sivi.organization.type.daycareplace.format.public",nn.ORGANIZATION_FORMAT_PRIVATE="sivi.organization.type.daycareplace.format.private",nn.FAMILY_DAYCARE_TYPES=[nn.DAYCAREPLACE_TYPE_FAMILY_DAYCARE],nn.GOVERNMENT_OID="organization.attribute.government.oid";const Dn=class{};Dn.PREFERRED_SERVICE_TYPE="sivi.municipality.communication.preference.preferred.service.type",Dn.PREFERRED_SERVICE_TYPE_TEXT_MESSAGE="sivi.municipality.communication.preference.preferred.service.type.textmessage",Dn.PREFERRED_SERVICE_TYPE_EMAIL="sivi.municipality.communication.preference.preferred.service.type.email",Dn.PREFERRED_SERVICE_TYPE_CGI_VESA="sivi.municipality.communication.preference.preferred.service.type.cgi.vesa",Dn.OFFICIAL_DECISION="sivi.municipality.communication.preference.official.decision",Dn.OFFICIAL_DECISION_TYPE_SUOMI_FI="sivi.municipality.communication.preference.official.decision.type.suomi.fi",Dn.OFFICIAL_DECISION_TYPE_PAPER_POST="sivi.municipality.communication.preference.official.decision.type.paper.post";const Mn=class{};Mn.ACTIVITY_FOCUS="sivi.unit.code.type.activityfocus.",Mn.ORGANIZATIONAL_FORM="sivi.unit.code.type.organizationalform.",Mn.EDUCATIONAL_SYSTEM="sivi.unit.code.type.educationalsystem.",Mn.LANGUAGEFOCUSEXTENT="sivi.organization.languagefocus.extent",Mn.DAYCARE_PLACE_TYPE="sivi.organization.type.daycareplace.type.";const vi=class{};vi.PPE="sivi.organization.type.application.type.ppe",vi.CLUB="sivi.organization.type.application.type.club",vi.ECEC="sivi.organization.type.application.type.ecec",vi.PPEWITHECEC="sivi.organization.type.application.type.ppewithecec",vi.VC_ECEC="Application.Type.VC_ECEC",vi.C_ECEC="Application.Type.C_ECEC",vi.V_ECEC="Application.Type.V_ECEC";const Gi=class{};Gi.ECEC="sivi.organization.type.decision.type.ecec",Gi.PPE="sivi.organization.type.decision.type.ppe",Gi.CLUB="sivi.organization.type.decision.type.club",Gi.OPEN_DAYCARE="sivi.organization.type.decision.type.opendaycare",Gi.VOUCHER="sivi.organization.type.decision.type.voucher";const mi=class{};mi.ECEC="ECEC",mi.ECEC_COMPLEMENTING="C_ECEC",mi.ECEC_VOUCHER="V_ECEC",mi.ECEC_COMPLEMENTING_VOUCHER="VC_ECEC";const wi=class{};wi.PPE="sivi.organization.type.decision.type.ppe",wi.CLUB="sivi.organization.type.decision.type.club",wi.ECEC="sivi.organization.type.decision.type.ecec",wi.C_ECEC="sivi.organization.type.placement.ecec.complementing",wi.V_ECEC="sivi.organization.type.placement.ecec.voucher",wi.VC_ECEC="sivi.organization.type.placement.ecec.complementing-voucher";const Bn=class{};let P=Bn;Bn.DATERANGE="DATERANGE",Bn.ACTIVE="ACTIVE",Bn.ENDED="ENDED";const kn=class{};let w=kn;var B,Le,Y,V;kn.PPE="PPE",kn.CLUB="CLUB",kn.ECEC="ECEC",kn.PPEWITHECEC="PPEWITHECEC",kn.VC_ECEC="VC_ECEC",kn.C_ECEC="C_ECEC",kn.V_ECEC="V_ECEC",kn.ALL_PLACEMENT_TYPES=[kn.VC_ECEC,kn.C_ECEC,kn.V_ECEC],(Le=B||(B={})).DRAFT="DRAFT",Le.SAVED="SAVED",Le.WAITING_FOR_MORE_INFO="WAITING_FOR_MORE_INFO",Le.BACK_FROM_HANDLING="BACK_FROM_HANDLING",Le.IN_HANDLING="IN_HANDLING",Le.WAITING_FOR_PRE_PLACEMENT="WAITING_FOR_PRE_PLACEMENT",Le.IN_PRE_PLACEMENT="IN_PRE_PLACEMENT",Le.IN_PLACEMENT="IN_PLACEMENT",Le.DECISION_MADE="DECISION_MADE",Le.DECISION_SENT="DECISION_SENT",Le.APPROVED="APPROVED",Le.REJECTED="REJECTED",Le.DISAPPROVED="DISAPPROVED",Le.CANCELLED="CANCELLED",Le.VOUCHER_PENDING="VOUCHER_PENDING",Le.FINAL="FINAL",function(Le){Le.DRAFT="DRAFT",Le.APPLICATION_SENT="APPLICATION_SENT",Le.WAITING_FOR_MORE_INFO="WAITING_FOR_MORE_INFO",Le.BACK_FROM_HANDLING="BACK_FROM_HANDLING",Le.WAITING_FOR_HANDLING="WAITING_FOR_HANDLING",Le.IN_HANDLING="IN_HANDLING",Le.WAITING_FOR_PRE_PLACEMENT="WAITING_FOR_PRE_PLACEMENT",Le.IN_PRE_PLACEMENT="IN_PRE_PLACEMENT",Le.IN_PLACEMENT="IN_PLACEMENT",Le.DECISION_MADE="DECISION_MADE",Le.DECISION_SENT="DECISION_SENT",Le.APPROVED="APPROVED",Le.REJECTED="REJECTED",Le.DISAPPROVED="DISAPPROVED",Le.CANCELLED="CANCELLED",Le.VOUCHER_PENDING="VOUCHER_PENDING",Le.FINAL="FINAL",Le.PERMISSIONS_ADDED="PERMISSIONS_ADDED",Le.PERMISSIONS_REMOVED="PERMISSIONS_REMOVED",Le.EDITED="EDITED"}(Y||(Y={})),function(Le){Le.REPLACE_DECISION="REPLACE_DECISION",Le.CHANGE_DECISION="CHANGE_DECISION",Le.NULLIFY_DECISION="NULLIFY_DECISION"}(V||(V={}));const On=class{};On.ECEC="ECEC",On.PPE="PPE",On.CLUB="CLUB",On.VOUCHER="VOUCHER";const je=class{};je.DAYCARE_CENTRE="DAYCARECENTER",je.GROUP_FAMILY_DAYCARE="GROUP_FAMILY_DAYCARE",je.FAMILY_DAYCARE="FAMILY_DAYCARE",je.OPEN_DAYCARE="OPEN_DAYCARE";const Bt=class{};Bt.APPROVED="APPROVED",Bt.DISAPPROVED="DISAPPROVED",Bt.NULLIFIED="NULLIFIED",Bt.CANCELLED="CANCELLED";const xn=class{};xn.APPROVED="sivi.decision.status.approved",xn.DISAPPROVED="sivi.decision.status.disapproved",xn.NULLIFIED="sivi.decision.status.nullified",xn.CANCELLED="sivi.decision.status.cancelled";const Fn=class{};Fn.DRAFT_APPLICATION="DRAFT_APPLICATION_MESSAGE",Fn.SAVED_APPLICATION="SAVED_APPLICATION_MESSAGE";const ui=class{};ui.APPLICATION="ApplicationAttachment",ui.CHILD="ChildInfoAttachment",ui.PERSON_ATTACHMENT="personAttachment",ui.PROFILE_PICTURE="ProfileMainPicture";const Ai=class{};Ai.PERSON_SUBSCRIPTION="sivi.subscription.type.message.person";const si=class{};si.ALPHABETS=/^['a-zA-Z\xc0-\u017e\u0430-\u044f\u0410-\u042f\s-]+$/,si.ALPHANUMERIC=/^([a-zA-Z\xc0-\u017e\u0430-\u044f\u0410-\u042f0-9\s])+$/,si.ONLYNUMBERS=/^([0-9])+$/,si.NUMBERSWITHDECIMAL=/^[0-9]{1,}([,.][0-9]{1,2})?$/,si.EMAIL=/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+$/,si.SPACE=/^\s/,si.PHONE_NUMBER=/^[+][0-9\s]{2,19}$|^[0-9\s]{3,20}$/,si.POSTAL_CODE=/\d{5}/g,si.HOUR_24FORMAT=/^([0-9]|0[0-9]|1[0-9]|2[0-3]):[0-5][0-9]$/;const Vi=class{};Vi.PHONE=20,Vi.POSTALCODE=5,Vi.DEFAULT=100,Vi.INFORMATION=200;const Vn=class{};let Pe=Vn;Vn.ADDRESS="address",Vn.HOME="home",Vn.WORK="work",Vn.EMAIL="email",Vn.PHONE="phone",Vn.ADDRESS_TYPE="sivi.contact.type.address",Vn.ADDRESS_PERMANENT="sivi.contact.type.address.personal.permanent",Vn.ADDRESS_TYPE_ORGANIZATION_PHYSICAL="sivi.contact.type.address.organization.physical",Vn.ADDRESS_TYPE_POSTAL_ADDRESS="sivi.contact.type.address.organization.postal",Vn.ADDRESS_POSTAL_TYPE="sivi.contact.type.postal.address",Vn.ADDRESS_HOME_TYPE="sivi.contact.type.address.home",Vn.ADDRESS_WORK_TYPE="sivi.contact.type.address.work",Vn.EMAIL_TYPE="sivi.contact.type.email",Vn.EMAIL_ECEC_TYPE="sivi.contact.type.ecec.email",Vn.EMAIL_HOME_TYPE="sivi.contact.type.email.home",Vn.EMAIL_WORK_TYPE="sivi.contact.type.email.work",Vn.PHONE_TYPE="sivi.contact.type.phone",Vn.PHONE_ECEC_TYPE="sivi.contact.type.ecec.phone",Vn.PHONE_HOME_TYPE="sivi.contact.type.phone.home",Vn.PHONE_WORK_TYPE="sivi.contact.type.phone.work",Vn.TEXT_MESSAGE="sivi.contact.type.textmessage",Vn.UI_MESSAGE="sivi.contact.type.uimessage",Vn.DOCUMENT_TEXT="sivi.contact.type.documenttext",Vn.MUNICIPALITY_ACCESSIBILITY_EMAIL="sivi.contact.type.accessibility.email";const Hn=class{};Hn.ECEC="ECEC",Hn.PPE="PPE",Hn.CLUB="CLUB",Hn.PPE_WITH_ECEC="PPEWITHECEC";const An=class{};An.ENROLMENT="APPLICATION_ENROLLMENT_MOREINFO",An.SPECIAL_NEEDS="SPECIAL_NEEDS",An.MEDICINE_OR_THERAPHY="MEDICINE_OR_THERAPHY",An.CHILD_RESIDES="CHILD_RESIDES",An.WITH_BOTH_GUARDIANS="WITH_BOTH_GUARDIANS",An.WITH_ONE_GUARDIAN="WITH_ONE_GUARDIAN",An.SHARED_RESIDENCE="SHARED_RESIDENCE",An.ELSEWHERE="ELSEWHERE",An.PLACE_OF_DOMICILE="PLACE_OF_DOMICILE",An.PETS_AT_HOME="PETS_AT_HOME",An.PERSON_OID="PERSON_OID";const vn=class{};vn.FINNISH="fi",vn.SWEDISH="sv",vn.ENGLISH="en",vn.RUSSIAN="ru";const In=class{};In.FINNISH="General.Language.Finnish",In.SWEDISH="General.Language.Swedish",In.ENGLISH="General.Language.English",In.RUSSIAN="General.Language.Russian";const Zi=class{};Zi.UNDER_3Y_OR_SAME="Age.UnderThreeOrSame",Zi.OVER_3Y="Age.OverThree";const gr=class{};gr.ENRICHED="sivi.organization.languagefocus.extent.languageenrichededucation",gr.EXTENSIVE="sivi.organization.languagefocus.extent.extensivebilingualeducation",gr.IMMERSION="sivi.organization.languagefocus.extent.languageimmersion";const Hi=class{};Hi.LANGUAGE="sivi.user.preference.type.language",Hi.MENU="sivi.user.preference.type.menu",Hi.MUNICIPALITY="sivi.user.preference.type.municipality",Hi.MENU_ROLE_GUARDIAN="sivi.user.preference.type.menu.role.guardian",Hi.MENU_ROLE_PROFESSIONAL="sivi.user.preference.type.menu.role.professional";const Gr=class{};Gr.MAIN_TYPE="sivi.person.info.child.resides",Gr.BOTH_GUARDIANS="sivi.person.info.child.resides.type.with-both-guardians",Gr.ONE_GUARDIAN="sivi.person.info.child.resides.type.with-one-guardian",Gr.SHARED_RESIDENCE="sivi.person.info.child.resides.type.shared-residence",Gr.ELSEWHERE="sivi.person.info.child.resides.type.elsewhere";const zr=class{};zr.PLACE_OF_DOMICILE="sivi.contact.type.address.personal.place-of-domicile",zr.MEDICINE_OR_THERAPHY="sivi.person.info.type.medicine-or-theraphy",zr.BOTH_GUARDIANS="sivi.person.info.child.resides.type.with-both-guardians",zr.PETS_AT_HOME="sivi.person.info.type.pets-at-home",zr.PERSON_OID="person.oid";const Eo=class{};Eo.MOTHER_TONGUE="sivi.person.language.type.mother-tongue",Eo.SPOKEN_AT_HOME="sivi.person.language.type.spoken-at-home",Eo.COMMUNICATION_LANGUAGE="sivi.person.language.type.communication-language";const mr=class{};mr.RESIDENT_TYPE="sivi.person.relation.guardian.type.resident",mr.NON_RESIDENT_TYPE="sivi.person.relation.guardian.type.non-resident",mr.SPOUSE_TYPE="sivi.person.relation.guardian.type.spouse-guardian",mr.PERIPHERAL_TYPE="sivi.person.relation.guardian.type.peripheral-guardian",mr.SUBSTITUTE_TYPE="sivi.person.relation.guardian.type.substitute-guardian";const jn=class{};jn.BROWSER="browser",jn.NATIVE="native";const ct=class{};ct.EMPLOYEE_OR_ENTREPRENEUR="sivi.person.employmentinfo.type.employee-or-entrepreneur",ct.STUDENT="sivi.person.employmentinfo.type.student",ct.JOBSEEKER="sivi.person.employmentinfo.type.job-applicant",ct.OTHER="sivi.person.employmentinfo.type.other";const Yt=class{};Yt.FULLTIME="sivi.person.employment.type.fulltime",Yt.PARTTIME="sivi.person.employment.type.parttime";const oi=class{};oi.WORK="Form.Label.WorkPlace",oi.STUDY="Form.Label.StudyPlace";const Ni=class{};Ni.GUARDIAN="sivi.person.type.guardian",Ni.CHILD="sivi.person.type.child";const Nn=class{};Nn.DELETE="delete",Nn.EDIT="edit",Nn.ADD="add",Nn.MOVE_UP="move_up",Nn.MOVE_DOWN="move_down";const pr=class{};pr.TERMS_AND_CONDITIONS="sivi.userlogin.consent.termsandconditions",pr.COOKIES="sivi.userlogin.consent.cookie";const Sn=class{};Sn.ACUTE="sivi.application.handling.type.acute",Sn.QUICK_HANDLING="sivi.application.handling.type.quick-handling",Sn.MONTHS_BETWEEN=4,Sn.DAYS_BETWEEN=14;const Pn=class{};Pn.NON_DISCLOSURE="NON_DISCLOSURE",Pn.NON_DICSLOSURE_CONTACT_TYPE="sivi.contact.type.non-disclosure";const Nt=class{};let Ct=Nt;Nt.REMOTE_DEV="remote-dev",Nt.DEV="dev",Nt.DEV1="dev1",Nt.SIT="sit",Nt.SIT2="sit2",Nt.UAT="uat",Nt.TEST="test",Nt.DEMO="demo",Nt.PREPROD="preprod",Nt.PERF="perf",Nt.PRODUCTION="prod",Nt.LOCAL_VM="local-vm",Nt.LOCAL_PROD="prod-local",Nt.TRAINING="training",Nt.DEV_LIETO="dev-lieto",Nt.TEST_LIETO="test-lieto",Nt.TRAINING_LIETO="training-lieto",Nt.QA="QA",Nt.E2E="e2e",Nt.E2E1="e2e1";const ai=class{};ai.MONDAY="MONDAY",ai.TUESDAY="TUESDAY",ai.WEDNESDAY="WEDNESDAY",ai.THURSDAY="THURSDAY",ai.FRIDAY="FRIDAY",ai.SATURDAY="SATURDAY",ai.SUNDAY="SUNDAY",ai.MON_FRI="MON_FRI",ai.MON_SUN="MON_SUN",ai.SAT_SUN="SAT_SUN";const hn=class{};hn.AppStoreLink="https://itunes.apple.com/gb/app/id1477037174",hn.GooglePlayLink="market://details?id=com.cgi.vesa"},33053:(qe,I,p)=>{"use strict";p.d(I,{xA:()=>l.AgreementTypes,RX:()=>l.ApplicationQueryType,Qt:()=>l.ApplicationStates,wW:()=>l.ApplicationTypes,YP:()=>l.ApplicationTypesLong,uN:()=>l.Area,dT:()=>l.AttachmentPurposes,Uk:()=>l.Child,iF:()=>l.ChildResidesTypes,DG:()=>l.CommunicationPreferenceTypes,gT:()=>l.Constants,AV:()=>l.ContactTypes,E_:()=>l.DateFormats,Ir:()=>l.DecisionStatus,nW:()=>l.DecisionStatusTypes,wn:()=>l.DecisionTypes,xs:()=>l.DecisionTypesLong,Wm:()=>l.EditPlacementTypes,pQ:()=>l.EducationGroup,Ts:()=>l.EmploymentTypes,qA:()=>l.Environment,q7:()=>l.GuardianTypes,rA:()=>l.LanguageCodes,lI:()=>l.Languages,nf:()=>l.MaxLength,KV:()=>l.MobileApp,sR:()=>l.ModalNames,ZL:()=>l.Municipality,v3:()=>l.NonDisclosure,V6:()=>l.OrganizationTypes,eI:()=>l.Patterns,Pl:()=>l.Permissions,a7:()=>l.PersonalInfos,rJ:()=>l.PlacementTypeTranslations,fb:()=>l.Unit,cQ:()=>l.Utils,bD:()=>l.WeekPeriods});p(49426);var l=p(88692)},61154:(qe,I,p)=>{"use strict";p.d(I,{JR:()=>B,pb:()=>g,kE:()=>D,Ox:()=>w});var o=p(94650),e=p(62669),l=p(9116);const Y=class{constructor(X,ve){this.auth=X,this.router=ve}canActivate(){return!this.auth.isAuthenticated()||(console.warn("UnauthenticatedGuard: redirect to homepage"),this.router.navigate(["/home"]),!1)}};let D=Y;Y.\u0275fac=function(ve){return new(ve||Y)(o.LFG(e.e),o.LFG(l.F0))},Y.\u0275prov=o.Yz7({token:Y,factory:Y.\u0275fac});const V=class{constructor(X,ve){this.auth=X,this.router=ve}canActivate(X,ve){const ye=X.data.roles;if(!ye||0===ye.length)throw console.error("RoleGuard: route does not have required roles configured",{routeConfig:X.routeConfig,data:X.data}),new Error("RoleGuard: route does not have required roles configured");return this.auth.isAuthenticated()?!!this.auth.hasAnyRole(ye)||(console.warn("RoleGuard: redirect to error page since user does not have any of following roles",ye),this.router.navigate(["/error/access-denied"]),!1):(console.warn("RoleGuard: redirect to login since user is not authenticated"),this.router.navigate(["/login"],{queryParams:{returnUrl:ve.url}}),!1)}};let g=V;V.\u0275fac=function(ve){return new(ve||V)(o.LFG(e.e),o.LFG(l.F0))},V.\u0275prov=o.Yz7({token:V,factory:V.\u0275fac,providedIn:"root"});var E=p(15861),T=p(39646),n=p(69751),P=p(88692);const ue=class{constructor(X){this.notify=X}canDeactivate(X){try{if(X.canDeactivate())return(0,T.of)(!0)}catch(ve){throw console.error("UnsavedChangesGuard canDeactivate error: ",ve),new TypeError(`UnsavedChangesGuard: component\n              ${X.constructor.name} failed with canDeactivate().\n              Does it extend class DetectValueChanges?`)}return this.showDiscardDialog()}showDiscardDialog(){var X=this;return new n.y(ve=>{(0,E.Z)(function*(){(yield X.notify.promptDiscardChanges()).onDidDismiss().then(ge=>{ve.next(ge.data),ve.complete()})})()})}};let w=ue;ue.\u0275fac=function(ve){return new(ve||ue)(o.LFG(P.NotifyService))},ue.\u0275prov=o.Yz7({token:ue,factory:ue.\u0275fac,providedIn:"root"});const he=class{constructor(X,ve){this.router=X,this.platformHelper=ve}canActivate(){return!this.platformHelper.isMobilePlatform()||(this.router.navigate(["/login"]),!1)}};let B=he;he.\u0275fac=function(ve){return new(ve||he)(o.LFG(l.F0),o.LFG(P.PlatformHelperService))},he.\u0275prov=o.Yz7({token:he,factory:he.\u0275fac,providedIn:"root"})},24956:(qe,I,p)=>{"use strict";p.d(I,{xA:()=>l.xA,Qt:()=>l.Qt,wW:()=>l.wW,YP:()=>l.YP,uN:()=>l.uN,dT:()=>l.dT,Uk:()=>l.Uk,iF:()=>l.iF,DG:()=>l.DG,gT:()=>l.gT,AV:()=>l.AV,E_:()=>l.E_,Ir:()=>l.Ir,nW:()=>l.nW,wn:()=>l.wn,xs:()=>l.xs,Wm:()=>l.Wm,pQ:()=>l.pQ,Ts:()=>l.Ts,qA:()=>l.qA,P4:()=>o.FileUtils,q7:()=>l.q7,rA:()=>l.rA,lI:()=>l.lI,nf:()=>l.nf,KV:()=>l.KV,JR:()=>D.JR,sR:()=>l.sR,ZL:()=>l.ZL,v3:()=>l.v3,V6:()=>l.V6,eI:()=>l.eI,Pl:()=>l.Pl,a7:()=>l.a7,rJ:()=>l.rJ,pb:()=>D.pb,G7:()=>o.Roles,vD:()=>e.v,de:()=>o.SiviComponent,xv:()=>o.SiviPage,_0:()=>g,fb:()=>l.fb,Ox:()=>D.Ox,cQ:()=>l.cQ,bD:()=>l.bD});var o=p(88692),e=p(83734),l=p(33053),D=p(61154);class g{static createContact(T,n,P,w=!0){return{id:"",tempId:(Date.now()*Math.random()).toString(),primary:w,person:{id:P||null},contact:{id:"",contactTypeCode:T,contactTypeDescription:n,value:""}}}static createAddress(T,n){return{tempId:(Date.now()*Math.random()).toString(),primary:!0,person:{id:null},address:{addressTypeCode:T,addressTypeDescription:n,city:"",postalCode:"",street:""}}}static createPerson(){return{tempId:(Date.now()*Math.random()).toString(),firstName:"",lastName:"",pin:null,address:[g.createAddress(o.ContactTypes.ADDRESS_PERMANENT,o.ContactTypes.ADDRESS)],contacts:[g.createContact(o.ContactTypes.PHONE_TYPE,o.ContactTypes.PHONE),g.createContact(o.ContactTypes.EMAIL_TYPE,o.ContactTypes.EMAIL)]}}static createChild(){return{firstName:"",lastName:"",nickName:"",pin:"",guardians:[],siblings:[],personInfos:[],personLanguages:[],address:[g.createAddress(o.ContactTypes.ADDRESS_PERMANENT,o.ContactTypes.ADDRESS)]}}static createPersonInfo(T){return{id:null,infoType:T,value:"",info:""}}static createCommunicationPreference(T,n,P,w){return{municipalityCommunicationPreferenceId:T,preferenceType:n,serviceName:P,selected:w}}static getAddressFromGeoLocation(T,n){const w=T.find(B=>B.id===n);return w&&w.longitude&&w.latitude?{streetAddress:w.street,zipcode:w.zip,postOffice:w.city}:{streetAddress:"",zipcode:"",postOffice:""}}static getPersonPlainAddress(T){return(T.address.street?T.address.street+", ":"")+(T.address.postalCode?T.address.postalCode+", ":"")+(T.address.city?T.address.city:"")}static getQuickHandlingOptions(T,n){const P=[];for(const w of T){const B=w.localizations.find(Y=>Y.lang===n);P.push({id:w.id,name:B.name})}return o.Utils.getSelectOptionsFromArray(P,"id","name")}static generatePreferredNameOptions(T){if(!T)return[];let n=[];const P=T?T.split(" "):"";for(const w of P){""!==w&&(n=[...n,{value:w,text:w}]);const B=w.split("-");if(B.length>1)for(const Y of B)""!==Y&&(n=[...n,{value:Y,text:Y}])}return n}}},92340:(qe,I,p)=>{"use strict";p.d(I,{N:()=>e});const e={production:!0,API:"https://www.cgivesa.fi/",entryUrl:"https://sivi-entry-proxy.cgivesa.fi/api/sivi-entry-proxy",environmentName:p(43189).qA.PRODUCTION,firebase:{apiKey:"AIzaSyC3x-TMw_s1tOLxK-RKkbL_6m07V1dabtU",authDomain:"cgi-sivi-prod.firebaseapp.com",databaseURL:"https://cgi-sivi-prod.firebaseio.com",projectId:"cgi-sivi-prod",storageBucket:"cgi-sivi-prod.appspot.com",messagingSenderId:"585768746274",appId:"1:585768746274:web:fd2ab3c19f2577b4"},sentry:{dsn:"https://c0e8a40b17774b1c9593c5409d25dafe@vesasentry.sytes.net/8"}}},65647:(qe,I,p)=>{"use strict";var o=p(11481);const e=new RegExp("(\\:not\\()|(([\\.\\#]?)[-\\w]+)|(?:\\[([-.\\w*\\\\$]+)(?:=([\"']?)([^\\]\"']*)\\5)?\\])|(\\))|(\\s*,\\s*)","g");class l{constructor(){this.element=null,this.classNames=[],this.attrs=[],this.notSelectors=[]}static parse(r){const u=[],y=(gt,Ot)=>{Ot.notSelectors.length>0&&!Ot.element&&0==Ot.classNames.length&&0==Ot.attrs.length&&(Ot.element="*"),gt.push(Ot)};let G,L=new l,Te=L,Ze=!1;for(e.lastIndex=0;G=e.exec(r);){if(G[1]){if(Ze)throw new Error("Nesting :not in a selector is not allowed");Ze=!0,Te=new l,L.notSelectors.push(Te)}const gt=G[2];if(gt){const sn=G[3];"#"===sn?Te.addAttribute("id",gt.slice(1)):"."===sn?Te.addClassName(gt.slice(1)):Te.setElement(gt)}const Ot=G[4];if(Ot&&Te.addAttribute(Te.unescapeAttribute(Ot),G[6]),G[7]&&(Ze=!1,Te=L),G[8]){if(Ze)throw new Error("Multiple selectors in :not are not supported");y(u,L),L=Te=new l}}return y(u,L),u}unescapeAttribute(r){let u="",y=!1;for(let L=0;L<r.length;L++){const G=r.charAt(L);if("\\"!==G){if("$"===G&&!y)throw new Error(`Error in attribute selector "${r}". Unescaped "$" is not supported. Please escape with "\\$".`);y=!1,u+=G}else y=!0}return u}escapeAttribute(r){return r.replace(/\\/g,"\\\\").replace(/\$/g,"\\$")}isElementSelector(){return this.hasElementSelector()&&0==this.classNames.length&&0==this.attrs.length&&0===this.notSelectors.length}hasElementSelector(){return!!this.element}setElement(r=null){this.element=r}getAttrs(){const r=[];return this.classNames.length>0&&r.push("class",this.classNames.join(" ")),r.concat(this.attrs)}addAttribute(r,u=""){this.attrs.push(r,u&&u.toLowerCase()||"")}addClassName(r){this.classNames.push(r.toLowerCase())}toString(){let r=this.element||"";if(this.classNames&&this.classNames.forEach(u=>r+=`.${u}`),this.attrs)for(let u=0;u<this.attrs.length;u+=2){const y=this.escapeAttribute(this.attrs[u]),L=this.attrs[u+1];r+=`[${y}${L?"="+L:""}]`}return this.notSelectors.forEach(u=>r+=`:not(${u})`),r}}var n,b,P;(b=n||(n={}))[b.Emulated=0]="Emulated",b[b.None=2]="None",b[b.ShadowDom=3]="ShadowDom",function(b){b[b.OnPush=0]="OnPush",b[b.Default=1]="Default"}(P||(P={}));const w={name:"custom-elements"},B={name:"no-errors-schema"};var V,ue;function X(b){const r=function he(b){const r=b.classNames&&b.classNames.length?[8,...b.classNames]:[];return[b.element&&"*"!==b.element?b.element:"",...b.attrs,...r]}(b),u=b.notSelectors&&b.notSelectors.length?b.notSelectors.map(y=>function ae(b){const r=b.classNames&&b.classNames.length?[8,...b.classNames]:[];return b.element?[5,b.element,...b.attrs,...r]:b.attrs.length?[3,...b.attrs,...r]:b.classNames&&b.classNames.length?[9,...b.classNames]:[]}(y)):[];return r.concat(...u)}function ve(b){return b?l.parse(b).map(X):[]}!function(b){b[b.NONE=0]="NONE",b[b.HTML=1]="HTML",b[b.STYLE=2]="STYLE",b[b.SCRIPT=3]="SCRIPT",b[b.URL=4]="URL",b[b.RESOURCE_URL=5]="RESOURCE_URL"}(V||(V={})),function(b){b[b.Error=0]="Error",b[b.Warning=1]="Warning",b[b.Ignore=2]="Ignore"}(ue||(ue={}));class ge{static zero(){return new ge([0])}static one(){return new ge([1])}constructor(r){this.digits=r}clone(){return new ge(this.digits.slice())}add(r){const u=this.clone();return u.addToSelf(r),u}addToSelf(r){const u=Math.max(this.digits.length,r.digits.length);let y=0;for(let L=0;L<u;L++){let G=y;L<this.digits.length&&(G+=this.digits[L]),L<r.digits.length&&(G+=r.digits[L]),G>=10?(this.digits[L]=G-10,y=1):(this.digits[L]=G,y=0)}y>0&&(this.digits[u]=1)}toString(){let r="";for(let u=this.digits.length-1;u>=0;u--)r+=this.digits[u];return r}}class ne{constructor(r){this.powerOfTwos=[r]}getValue(){return this.powerOfTwos[0]}multiplyBy(r){const u=ge.zero();return this.multiplyByAndAddTo(r,u),u}multiplyByAndAddTo(r,u){for(let y=0;0!==r;r>>>=1,y++)if(1&r){const L=this.getMultipliedByPowerOfTwo(y);u.addToSelf(L)}}getMultipliedByPowerOfTwo(r){for(let u=this.powerOfTwos.length;u<=r;u++){const y=this.powerOfTwos[u-1];this.powerOfTwos[u]=y.add(y)}return this.powerOfTwos[r]}}let Pe;function de(b){return function Oe(b){Pe??(Pe=new TextEncoder);const r=[...Pe.encode(b)],u=function rn(b,r){const u=b.length+3>>>2,y=[];for(let L=0;L<u;L++)y[L]=st(b,4*L,r);return y}(r,Ve.Big),y=8*r.length,L=new Uint32Array(80);let G=1732584193,Te=4023233417,Ze=2562383102,gt=271733878,Ot=3285377520;u[y>>5]|=128<<24-y%32,u[15+(y+64>>9<<4)]=y;for(let sn=0;sn<u.length;sn+=16){const ci=G,Ji=Te,xr=Ze,Hr=gt,Do=Ot;for(let Zo=0;Zo<80;Zo++){L[Zo]=Zo<16?u[sn+Zo]:ft(L[Zo-3]^L[Zo-8]^L[Zo-14]^L[Zo-16],1);const Ko=ke(Zo,Te,Ze,gt),ma=Ko[0],Rl=Ko[1],Cc=[ft(G,5),ma,Ot,Rl,L[Zo]].reduce(tt);Ot=gt,gt=Ze,Ze=ft(Te,30),Te=G,G=Cc}G=tt(G,ci),Te=tt(Te,Ji),Ze=tt(Ze,xr),gt=tt(gt,Hr),Ot=tt(Ot,Do)}return j(G)+j(Te)+j(Ze)+j(gt)+j(Ot)}(function le(b){return b.map(r=>r.visit(be,null))}(b.nodes).join("")+`[${b.meaning}]`)}function re(b){return b.id||oe(b)}function oe(b){const r=new Z;return nt(b.nodes.map(y=>y.visit(r,null)).join(""),b.meaning)}class me{visitText(r,u){return r.value}visitContainer(r,u){return`[${r.children.map(y=>y.visit(this)).join(", ")}]`}visitIcu(r,u){const y=Object.keys(r.cases).map(L=>`${L} {${r.cases[L].visit(this)}}`);return`{${r.expression}, ${r.type}, ${y.join(", ")}}`}visitTagPlaceholder(r,u){return r.isVoid?`<ph tag name="${r.startName}"/>`:`<ph tag name="${r.startName}">${r.children.map(y=>y.visit(this)).join(", ")}</ph name="${r.closeName}">`}visitPlaceholder(r,u){return r.value?`<ph name="${r.name}">${r.value}</ph>`:`<ph name="${r.name}"/>`}visitIcuPlaceholder(r,u){return`<ph icu name="${r.name}">${r.value.visit(this)}</ph>`}}const be=new me;class Z extends me{visitIcu(r,u){let y=Object.keys(r.cases).map(L=>`${L} {${r.cases[L].visit(this)}}`);return`{${r.type}, ${y.join(", ")}}`}}function j(b){return(b>>>0).toString(16).padStart(8,"0")}function ke(b,r,u,y){return b<20?[r&u|~r&y,1518500249]:b<40?[r^u^y,1859775393]:b<60?[r&u|r&y|u&y,2400959708]:[r^u^y,3395469782]}function Be(b){Pe??(Pe=new TextEncoder);const r=Pe.encode(b),u=new DataView(r.buffer,r.byteOffset,r.byteLength);let y=mt(u,r.length,0),L=mt(u,r.length,102072);return 0==y&&(0==L||1==L)&&(y^=319790063,L^=-1801410264),[y,L]}function nt(b,r=""){let u=Be(b);if(r){const G=Be(r);u=function wt(b,r){const u=b[0],y=b[1],L=r[0],G=r[1],Te=Ne(y,G),Ze=Te[0],gt=Te[1];return[tt(tt(u,L),Ze),gt]}(function Ct(b,r){const u=b[0],y=b[1],L=u<<r|y>>>32-r,G=y<<r|u>>>32-r;return[L,G]}(u,1),G)}return function Dn(b,r){const u=nn.toThePowerOf(0).multiplyBy(r);return nn.toThePowerOf(4).multiplyByAndAddTo(b,u),u.toString()}(2147483647&u[0],u[1])}function mt(b,r,u){let y=2654435769,L=2654435769,G=0;const Te=r-12;for(;G<=Te;G+=12){y+=b.getUint32(G,!0),L+=b.getUint32(G+4,!0);const gt=ut(y,L,u+=b.getUint32(G+8,!0));y=gt[0],L=gt[1],u=gt[2]}const Ze=r-G;return u+=r,Ze>=4?(y+=b.getUint32(G,!0),G+=4,Ze>=8?(L+=b.getUint32(G,!0),G+=4,Ze>=9&&(u+=b.getUint8(G++)<<8),Ze>=10&&(u+=b.getUint8(G++)<<16),11===Ze&&(u+=b.getUint8(G++)<<24)):(Ze>=5&&(L+=b.getUint8(G++)),Ze>=6&&(L+=b.getUint8(G++)<<8),7===Ze&&(L+=b.getUint8(G++)<<16))):(Ze>=1&&(y+=b.getUint8(G++)),Ze>=2&&(y+=b.getUint8(G++)<<8),3===Ze&&(y+=b.getUint8(G++)<<16)),ut(y,L,u)[2]}function ut(b,r,u){return b-=r,b-=u,r-=u,r-=b^=u>>>13,u-=b,u-=r^=b<<8,b-=r,b-=u^=r>>>13,r-=u,r-=b^=u>>>12,u-=b,u-=r^=b<<16,b-=r,b-=u^=r>>>5,r-=u,r-=b^=u>>>3,u-=b,u-=r^=b<<10,[b,r,u^=r>>>15]}var Ve;function tt(b,r){return Ne(b,r)[1]}function Ne(b,r){const u=(65535&b)+(65535&r),y=(b>>>16)+(r>>>16)+(u>>>16);return[y>>>16,y<<16|65535&u]}function ft(b,r){return b<<r|b>>>32-r}function He(b,r){return r>=b.length?0:b[r]}function st(b,r,u){let y=0;if(u===Ve.Big)for(let L=0;L<4;L++)y+=He(b,r+L)<<24-8*L;else for(let L=0;L<4;L++)y+=He(b,r+L)<<8*L;return y}!function(b){b[b.Little=0]="Little",b[b.Big=1]="Big"}(Ve||(Ve={}));const nn=new class pe{constructor(r){this.base=r,this.exponents=[new ne(ge.one())]}toThePowerOf(r){for(let u=this.exponents.length;u<=r;u++){const y=this.exponents[u-1].multiplyBy(this.base);this.exponents[u]=new ne(y)}return this.exponents[r]}}(256);var Mn,Gi;!function(b){b[b.None=0]="None",b[b.Const=1]="Const"}(Mn||(Mn={}));class vi{constructor(r=Mn.None){this.modifiers=r}hasModifier(r){return 0!=(this.modifiers&r)}}!function(b){b[b.Dynamic=0]="Dynamic",b[b.Bool=1]="Bool",b[b.String=2]="String",b[b.Int=3]="Int",b[b.Number=4]="Number",b[b.Function=5]="Function",b[b.Inferred=6]="Inferred",b[b.None=7]="None"}(Gi||(Gi={}));class mi extends vi{constructor(r,u){super(u),this.name=r}visitType(r,u){return r.visitBuiltinType(this,u)}}class wi extends vi{constructor(r,u,y=null){super(u),this.value=r,this.typeParams=y}visitType(r,u){return r.visitExpressionType(this,u)}}const On=new mi(Gi.Dynamic),je=new mi(Gi.Inferred),Bt=new mi(Gi.Bool),Fn=(new mi(Gi.Int),new mi(Gi.Number)),ui=new mi(Gi.String),si=(new mi(Gi.Function),new mi(Gi.None));var Vi,Vn;function Hn(b,r){return null==b||null==r?b==r:b.isEquivalent(r)}function An(b,r,u){const y=b.length;if(y!==r.length)return!1;for(let L=0;L<y;L++)if(!u(b[L],r[L]))return!1;return!0}function vn(b,r){return An(b,r,(u,y)=>u.isEquivalent(y))}!function(b){b[b.Minus=0]="Minus",b[b.Plus=1]="Plus"}(Vi||(Vi={})),function(b){b[b.Equals=0]="Equals",b[b.NotEquals=1]="NotEquals",b[b.Identical=2]="Identical",b[b.NotIdentical=3]="NotIdentical",b[b.Minus=4]="Minus",b[b.Plus=5]="Plus",b[b.Divide=6]="Divide",b[b.Multiply=7]="Multiply",b[b.Modulo=8]="Modulo",b[b.And=9]="And",b[b.Or=10]="Or",b[b.BitwiseAnd=11]="BitwiseAnd",b[b.Lower=12]="Lower",b[b.LowerEquals=13]="LowerEquals",b[b.Bigger=14]="Bigger",b[b.BiggerEquals=15]="BiggerEquals",b[b.NullishCoalesce=16]="NullishCoalesce"}(Vn||(Vn={}));class In{constructor(r,u){this.type=r||null,this.sourceSpan=u||null}prop(r,u){return new Ii(this,r,null,u)}key(r,u,y){return new an(this,r,u,y)}callFn(r,u,y){return new mr(this,r,null,u,y)}instantiate(r,u,y){return new ct(this,r,u,y)}conditional(r,u=null,y){return new lr(this,r,u,null,y)}equals(r,u){return new Bo(Vn.Equals,this,r,null,u)}notEquals(r,u){return new Bo(Vn.NotEquals,this,r,null,u)}identical(r,u){return new Bo(Vn.Identical,this,r,null,u)}notIdentical(r,u){return new Bo(Vn.NotIdentical,this,r,null,u)}minus(r,u){return new Bo(Vn.Minus,this,r,null,u)}plus(r,u){return new Bo(Vn.Plus,this,r,null,u)}divide(r,u){return new Bo(Vn.Divide,this,r,null,u)}multiply(r,u){return new Bo(Vn.Multiply,this,r,null,u)}modulo(r,u){return new Bo(Vn.Modulo,this,r,null,u)}and(r,u){return new Bo(Vn.And,this,r,null,u)}bitwiseAnd(r,u,y=!0){return new Bo(Vn.BitwiseAnd,this,r,null,u,y)}or(r,u){return new Bo(Vn.Or,this,r,null,u)}lower(r,u){return new Bo(Vn.Lower,this,r,null,u)}lowerEquals(r,u){return new Bo(Vn.LowerEquals,this,r,null,u)}bigger(r,u){return new Bo(Vn.Bigger,this,r,null,u)}biggerEquals(r,u){return new Bo(Vn.BiggerEquals,this,r,null,u)}isBlank(r){return this.equals(ei,r)}nullishCoalesce(r,u){return new Bo(Vn.NullishCoalesce,this,r,null,u)}toStmt(){return new Cr(this,null)}}class Zi extends In{constructor(r,u,y){super(u,y),this.name=r}isEquivalent(r){return r instanceof Zi&&this.name===r.name}isConstant(){return!1}visitExpression(r,u){return r.visitReadVarExpr(this,u)}set(r){return new Gr(this.name,r,null,this.sourceSpan)}}class gr extends In{constructor(r,u,y){super(u,y),this.expr=r}visitExpression(r,u){return r.visitTypeofExpr(this,u)}isEquivalent(r){return r instanceof gr&&r.expr.isEquivalent(this.expr)}isConstant(){return this.expr.isConstant()}}class Hi extends In{constructor(r,u,y){super(u,y),this.node=r}isEquivalent(r){return r instanceof Hi&&this.node===r.node}isConstant(){return!1}visitExpression(r,u){return r.visitWrappedNodeExpr(this,u)}}class Gr extends In{constructor(r,u,y,L){super(y||u.type,L),this.name=r,this.value=u}isEquivalent(r){return r instanceof Gr&&this.name===r.name&&this.value.isEquivalent(r.value)}isConstant(){return!1}visitExpression(r,u){return r.visitWriteVarExpr(this,u)}toDeclStmt(r,u){return new Gn(this.name,this.value,r,u,this.sourceSpan)}toConstDecl(){return this.toDeclStmt(je,un.Final)}}class zr extends In{constructor(r,u,y,L,G){super(L||y.type,G),this.receiver=r,this.index=u,this.value=y}isEquivalent(r){return r instanceof zr&&this.receiver.isEquivalent(r.receiver)&&this.index.isEquivalent(r.index)&&this.value.isEquivalent(r.value)}isConstant(){return!1}visitExpression(r,u){return r.visitWriteKeyExpr(this,u)}}class Eo extends In{constructor(r,u,y,L,G){super(L||y.type,G),this.receiver=r,this.name=u,this.value=y}isEquivalent(r){return r instanceof Eo&&this.receiver.isEquivalent(r.receiver)&&this.name===r.name&&this.value.isEquivalent(r.value)}isConstant(){return!1}visitExpression(r,u){return r.visitWritePropExpr(this,u)}}class mr extends In{constructor(r,u,y,L,G=!1){super(y,L),this.fn=r,this.args=u,this.pure=G}isEquivalent(r){return r instanceof mr&&this.fn.isEquivalent(r.fn)&&vn(this.args,r.args)&&this.pure===r.pure}isConstant(){return!1}visitExpression(r,u){return r.visitInvokeFunctionExpr(this,u)}}class jn extends In{constructor(r,u,y,L){super(y,L),this.tag=r,this.template=u}isEquivalent(r){return r instanceof jn&&this.tag.isEquivalent(r.tag)&&An(this.template.elements,r.template.elements,(u,y)=>u.text===y.text)&&vn(this.template.expressions,r.template.expressions)}isConstant(){return!1}visitExpression(r,u){return r.visitTaggedTemplateExpr(this,u)}}class ct extends In{constructor(r,u,y,L){super(y,L),this.classExpr=r,this.args=u}isEquivalent(r){return r instanceof ct&&this.classExpr.isEquivalent(r.classExpr)&&vn(this.args,r.args)}isConstant(){return!1}visitExpression(r,u){return r.visitInstantiateExpr(this,u)}}class Yt extends In{constructor(r,u,y){super(u,y),this.value=r}isEquivalent(r){return r instanceof Yt&&this.value===r.value}isConstant(){return!0}visitExpression(r,u){return r.visitLiteralExpr(this,u)}}class oi{constructor(r,u){this.elements=r,this.expressions=u}}class Ni{constructor(r,u,y){this.text=r,this.sourceSpan=u,this.rawText=y??u?.toString()??we(hn(r))}}class Nn{constructor(r,u){this.text=r,this.sourceSpan=u}}class pr{constructor(r,u,y){this.text=r,this.sourceSpan=u,this.associatedMessage=y}}class ai extends In{constructor(r,u,y,L,G){super(ui,G),this.metaBlock=r,this.messageParts=u,this.placeHolderNames=y,this.expressions=L}isEquivalent(r){return!1}isConstant(){return!1}visitExpression(r,u){return r.visitLocalizedString(this,u)}serializeI18nHead(){let r=this.metaBlock.description||"";return this.metaBlock.meaning&&(r=`${this.metaBlock.meaning}|${r}`),this.metaBlock.customId&&(r=`${r}@@${this.metaBlock.customId}`),this.metaBlock.legacyIds&&this.metaBlock.legacyIds.forEach(u=>{r=`${r}\u241f${u}`}),Qe(r,this.messageParts[0].text,this.getMessagePartSourceSpan(0))}getMessagePartSourceSpan(r){return this.messageParts[r]?.sourceSpan??this.sourceSpan}getPlaceholderSourceSpan(r){return this.placeHolderNames[r]?.sourceSpan??this.expressions[r]?.sourceSpan??this.sourceSpan}serializeI18nTemplatePart(r){const u=this.placeHolderNames[r-1],y=this.messageParts[r];let L=u.text;return 0===u.associatedMessage?.legacyIds.length&&(L+=`@@${nt(u.associatedMessage.messageString,u.associatedMessage.meaning)}`),Qe(L,y.text,this.getMessagePartSourceSpan(r))}}const hn=b=>b.replace(/\\/g,"\\\\"),Le=b=>b.replace(/^:/,"\\:"),ce=b=>b.replace(/:/g,"\\:"),we=b=>b.replace(/`/g,"\\`").replace(/\${/g,"$\\{");function Qe(b,r,u){return""===b?{cooked:r,raw:we(Le(hn(r))),range:u}:{cooked:`:${b}:${r}`,raw:we(`:${ce(hn(b))}:${hn(r)}`),range:u}}class qt extends In{constructor(r,u,y=null,L){super(u,L),this.value=r,this.typeParams=y}isEquivalent(r){return r instanceof qt&&this.value.name===r.value.name&&this.value.moduleName===r.value.moduleName&&this.value.runtime===r.value.runtime}isConstant(){return!1}visitExpression(r,u){return r.visitExternalExpr(this,u)}}class lr extends In{constructor(r,u,y=null,L,G){super(L||u.type,G),this.condition=r,this.falseCase=y,this.trueCase=u}isEquivalent(r){return r instanceof lr&&this.condition.isEquivalent(r.condition)&&this.trueCase.isEquivalent(r.trueCase)&&Hn(this.falseCase,r.falseCase)}isConstant(){return!1}visitExpression(r,u){return r.visitConditionalExpr(this,u)}}class mo extends In{constructor(r,u){super(Bt,u),this.condition=r}isEquivalent(r){return r instanceof mo&&this.condition.isEquivalent(r.condition)}isConstant(){return!1}visitExpression(r,u){return r.visitNotExpr(this,u)}}class rr{constructor(r,u=null){this.name=r,this.type=u}isEquivalent(r){return this.name===r.name}}class aa extends In{constructor(r,u,y,L,G){super(y,L),this.params=r,this.statements=u,this.name=G}isEquivalent(r){return r instanceof aa&&vn(this.params,r.params)&&vn(this.statements,r.statements)}isConstant(){return!1}visitExpression(r,u){return r.visitFunctionExpr(this,u)}toDeclStmt(r,u){return new xi(r,this.params,this.statements,this.type,u,this.sourceSpan)}}class ea extends In{constructor(r,u,y,L,G=!0){super(y||Fn,L),this.operator=r,this.expr=u,this.parens=G}isEquivalent(r){return r instanceof ea&&this.operator===r.operator&&this.expr.isEquivalent(r.expr)}isConstant(){return!1}visitExpression(r,u){return r.visitUnaryOperatorExpr(this,u)}}class Bo extends In{constructor(r,u,y,L,G,Te=!0){super(L||u.type,G),this.operator=r,this.rhs=y,this.parens=Te,this.lhs=u}isEquivalent(r){return r instanceof Bo&&this.operator===r.operator&&this.lhs.isEquivalent(r.lhs)&&this.rhs.isEquivalent(r.rhs)}isConstant(){return!1}visitExpression(r,u){return r.visitBinaryOperatorExpr(this,u)}}class Ii extends In{constructor(r,u,y,L){super(y,L),this.receiver=r,this.name=u}isEquivalent(r){return r instanceof Ii&&this.receiver.isEquivalent(r.receiver)&&this.name===r.name}isConstant(){return!1}visitExpression(r,u){return r.visitReadPropExpr(this,u)}set(r){return new Eo(this.receiver,this.name,r,null,this.sourceSpan)}}class an extends In{constructor(r,u,y,L){super(y,L),this.receiver=r,this.index=u}isEquivalent(r){return r instanceof an&&this.receiver.isEquivalent(r.receiver)&&this.index.isEquivalent(r.index)}isConstant(){return!1}visitExpression(r,u){return r.visitReadKeyExpr(this,u)}set(r){return new zr(this.receiver,this.index,r,null,this.sourceSpan)}}class Zn extends In{constructor(r,u,y){super(u,y),this.entries=r}isConstant(){return this.entries.every(r=>r.isConstant())}isEquivalent(r){return r instanceof Zn&&vn(this.entries,r.entries)}visitExpression(r,u){return r.visitLiteralArrayExpr(this,u)}}class Ci{constructor(r,u,y){this.key=r,this.value=u,this.quoted=y}isEquivalent(r){return this.key===r.key&&this.value.isEquivalent(r.value)}}class Xn extends In{constructor(r,u,y){super(u,y),this.entries=r,this.valueType=null,u&&(this.valueType=u.valueType)}isEquivalent(r){return r instanceof Xn&&vn(this.entries,r.entries)}isConstant(){return this.entries.every(r=>r.value.isConstant())}visitExpression(r,u){return r.visitLiteralMapExpr(this,u)}}const gn=new Yt(null,null,null),ei=new Yt(null,je,null);var un;!function(b){b[b.None=0]="None",b[b.Final=1]="Final",b[b.Private=2]="Private",b[b.Exported=4]="Exported",b[b.Static=8]="Static"}(un||(un={}));class Ft{constructor(r,u,y){this.text=r,this.multiline=u,this.trailingNewline=y}toString(){return this.multiline?` ${this.text} `:this.text}}class Ut extends Ft{constructor(r){super("",!0,!0),this.tags=r}toString(){return function rl(b){if(0===b.length)return"";if(1===b.length&&b[0].tagName&&!b[0].text)return`*${Uo(b[0])} `;let r="*\n";for(const u of b)r+=" *",r+=Uo(u).replace(/\n/g,"\n * "),r+="\n";return r+=" ",r}(this.tags)}}class wn{constructor(r=un.None,u=null,y){this.modifiers=r,this.sourceSpan=u,this.leadingComments=y}hasModifier(r){return 0!=(this.modifiers&r)}addLeadingComment(r){this.leadingComments=this.leadingComments??[],this.leadingComments.push(r)}}class Gn extends wn{constructor(r,u,y,L,G,Te){super(L,G,Te),this.name=r,this.value=u,this.type=y||u&&u.type||null}isEquivalent(r){return r instanceof Gn&&this.name===r.name&&(this.value?!!r.value&&this.value.isEquivalent(r.value):!r.value)}visitStatement(r,u){return r.visitDeclareVarStmt(this,u)}}class xi extends wn{constructor(r,u,y,L,G,Te,Ze){super(G,Te,Ze),this.name=r,this.params=u,this.statements=y,this.type=L||null}isEquivalent(r){return r instanceof xi&&vn(this.params,r.params)&&vn(this.statements,r.statements)}visitStatement(r,u){return r.visitDeclareFunctionStmt(this,u)}}class Cr extends wn{constructor(r,u,y){super(un.None,u,y),this.expr=r}isEquivalent(r){return r instanceof Cr&&this.expr.isEquivalent(r.expr)}visitStatement(r,u){return r.visitExpressionStmt(this,u)}}class Fr extends wn{constructor(r,u=null,y){super(un.None,u,y),this.value=r}isEquivalent(r){return r instanceof Fr&&this.value.isEquivalent(r.value)}visitStatement(r,u){return r.visitReturnStmt(this,u)}}class en extends wn{constructor(r,u,y=[],L,G){super(un.None,L,G),this.condition=r,this.trueCase=u,this.falseCase=y}isEquivalent(r){return r instanceof en&&this.condition.isEquivalent(r.condition)&&vn(this.trueCase,r.trueCase)&&vn(this.falseCase,r.falseCase)}visitStatement(r,u){return r.visitIfStmt(this,u)}}function It(b=[]){return new Ut(b)}function Qt(b,r,u){return new Zi(b,r,u)}function St(b,r=null,u){return new qt(b,null,r,u)}function cn(b,r,u){return new wi(b,r,u)}function Ln(b){return new gr(b)}function ii(b,r,u){return new Zn(b,r,u)}function hi(b,r=null){return new Xn(b.map(u=>new Ci(u.key,u.value,u.quoted)),r,null)}function _r(b,r){return new mo(b,r)}function er(b,r,u,y,L){return new aa(b,r,u,y,L)}function Yr(b,r,u,y,L){return new en(b,r,u,y,L)}function _o(b,r,u,y){return new jn(b,r,u,y)}function Si(b,r,u){return new Yt(b,r,u)}function to(b,r,u,y,L){return new ai(b,r,u,y,L)}function Oa(b){return b instanceof Yt&&null===b.value}function Uo(b){let r="";if(b.tagName&&(r+=` @${b.tagName}`),b.text){if(b.text.match(/\/\*|\*\//))throw new Error('JSDoc text cannot contain "/*" and "*/"');r+=" "+b.text.replace(/@/g,"\\@")}return r}const ts=Qt("<unknown>"),gs={},tc=50;class $a extends In{constructor(r){super(r.type),this.resolved=r,this.original=r}visitExpression(r,u){return u===gs?this.original.visitExpression(r,u):this.resolved.visitExpression(r,u)}isEquivalent(r){return r instanceof $a&&this.resolved.isEquivalent(r.resolved)}isConstant(){return!0}fixup(r){this.resolved=r,this.shared=!0}}class ln{constructor(r=!1){this.isClosureCompilerEnabled=r,this.statements=[],this.literals=new Map,this.literalFactories=new Map,this.nextNameIndex=0}getConstLiteral(r,u){if(r instanceof Yt&&!ur(r)||r instanceof $a)return r;const y=this.keyOf(r);let L=this.literals.get(y),G=!1;if(L||(L=new $a(r),this.literals.set(y,L),G=!0),!G&&!L.shared||G&&u){const Te=this.freshName();let Ze,gt;this.isClosureCompilerEnabled&&ur(r)?(Ze=Qt(Te).set(new aa([],[new Fr(r)])),gt=Qt(Te).callFn([])):(Ze=Qt(Te).set(r),gt=Qt(Te)),this.statements.push(Ze.toDeclStmt(je,un.Final)),L.fixup(gt)}return L}getLiteralFactory(r){if(r instanceof Zn){const u=r.entries.map(L=>L.isConstant()?L:ts),y=this.keyOf(ii(u));return this._getLiteralFactory(y,r.entries,L=>ii(L))}{const u=hi(r.entries.map(L=>({key:L.key,value:L.value.isConstant()?L.value:ts,quoted:L.quoted}))),y=this.keyOf(u);return this._getLiteralFactory(y,r.entries.map(L=>L.value),L=>hi(L.map((G,Te)=>({key:r.entries[Te].key,value:G,quoted:r.entries[Te].quoted}))))}}_getLiteralFactory(r,u,y){let L=this.literalFactories.get(r);const G=u.filter(Te=>!Te.isConstant());if(!L){const Te=u.map((sn,ci)=>sn.isConstant()?this.getConstLiteral(sn,!0):Qt(`a${ci}`)),gt=er(Te.filter(Er).map(sn=>new rr(sn.name,On)),[new Fr(y(Te))],je),Ot=this.freshName();this.statements.push(Qt(Ot).set(gt).toDeclStmt(je,un.Final)),L=Qt(Ot),this.literalFactories.set(r,L)}return{literalFactory:L,literalFactoryArguments:G}}uniqueName(r){return`${r}${this.nextNameIndex++}`}freshName(){return this.uniqueName("_c")}keyOf(r){return r.visitExpression(new Mi,gs)}}class Mi{constructor(){this.visitWrappedNodeExpr=Di,this.visitWriteVarExpr=Di,this.visitWriteKeyExpr=Di,this.visitWritePropExpr=Di,this.visitInvokeFunctionExpr=Di,this.visitTaggedTemplateExpr=Di,this.visitInstantiateExpr=Di,this.visitConditionalExpr=Di,this.visitNotExpr=Di,this.visitAssertNotNullExpr=Di,this.visitCastExpr=Di,this.visitFunctionExpr=Di,this.visitUnaryOperatorExpr=Di,this.visitBinaryOperatorExpr=Di,this.visitReadPropExpr=Di,this.visitReadKeyExpr=Di,this.visitCommaExpr=Di,this.visitLocalizedString=Di}visitLiteralExpr(r){return`${"string"==typeof r.value?'"'+r.value+'"':r.value}`}visitLiteralArrayExpr(r,u){return`[${r.entries.map(y=>y.visitExpression(this,u)).join(",")}]`}visitLiteralMapExpr(r,u){return`{${r.entries.map(G=>`${(G=>{const Te=G.quoted?'"':"";return`${Te}${G.key}${Te}`})(G)}:${G.value.visitExpression(this,u)}`).join(",")}`}visitExternalExpr(r){return r.value.moduleName?`EX:${r.value.moduleName}:${r.value.name}`:`EX:${r.value.runtime.name}`}visitReadVarExpr(r){return`VAR:${r.name}`}visitTypeofExpr(r,u){return`TYPEOF:${r.expr.visitExpression(this,u)}`}}function Di(b){throw new Error(`Invalid state: Visitor ${this.constructor.name} doesn't handle ${b.constructor.name}`)}function Er(b){return b instanceof Zi}function ur(b){return b instanceof Yt&&"string"==typeof b.value&&b.value.length>=tc}const gi="@angular/core";class $t{}$t.NEW_METHOD="factory",$t.TRANSFORM_METHOD="transform",$t.PATCH_DEPS="patchedDeps",$t.core={name:null,moduleName:gi},$t.namespaceHTML={name:"\u0275\u0275namespaceHTML",moduleName:gi},$t.namespaceMathML={name:"\u0275\u0275namespaceMathML",moduleName:gi},$t.namespaceSVG={name:"\u0275\u0275namespaceSVG",moduleName:gi},$t.element={name:"\u0275\u0275element",moduleName:gi},$t.elementStart={name:"\u0275\u0275elementStart",moduleName:gi},$t.elementEnd={name:"\u0275\u0275elementEnd",moduleName:gi},$t.advance={name:"\u0275\u0275advance",moduleName:gi},$t.syntheticHostProperty={name:"\u0275\u0275syntheticHostProperty",moduleName:gi},$t.syntheticHostListener={name:"\u0275\u0275syntheticHostListener",moduleName:gi},$t.attribute={name:"\u0275\u0275attribute",moduleName:gi},$t.attributeInterpolate1={name:"\u0275\u0275attributeInterpolate1",moduleName:gi},$t.attributeInterpolate2={name:"\u0275\u0275attributeInterpolate2",moduleName:gi},$t.attributeInterpolate3={name:"\u0275\u0275attributeInterpolate3",moduleName:gi},$t.attributeInterpolate4={name:"\u0275\u0275attributeInterpolate4",moduleName:gi},$t.attributeInterpolate5={name:"\u0275\u0275attributeInterpolate5",moduleName:gi},$t.attributeInterpolate6={name:"\u0275\u0275attributeInterpolate6",moduleName:gi},$t.attributeInterpolate7={name:"\u0275\u0275attributeInterpolate7",moduleName:gi},$t.attributeInterpolate8={name:"\u0275\u0275attributeInterpolate8",moduleName:gi},$t.attributeInterpolateV={name:"\u0275\u0275attributeInterpolateV",moduleName:gi},$t.classProp={name:"\u0275\u0275classProp",moduleName:gi},$t.elementContainerStart={name:"\u0275\u0275elementContainerStart",moduleName:gi},$t.elementContainerEnd={name:"\u0275\u0275elementContainerEnd",moduleName:gi},$t.elementContainer={name:"\u0275\u0275elementContainer",moduleName:gi},$t.styleMap={name:"\u0275\u0275styleMap",moduleName:gi},$t.styleMapInterpolate1={name:"\u0275\u0275styleMapInterpolate1",moduleName:gi},$t.styleMapInterpolate2={name:"\u0275\u0275styleMapInterpolate2",moduleName:gi},$t.styleMapInterpolate3={name:"\u0275\u0275styleMapInterpolate3",moduleName:gi},$t.styleMapInterpolate4={name:"\u0275\u0275styleMapInterpolate4",moduleName:gi},$t.styleMapInterpolate5={name:"\u0275\u0275styleMapInterpolate5",moduleName:gi},$t.styleMapInterpolate6={name:"\u0275\u0275styleMapInterpolate6",moduleName:gi},$t.styleMapInterpolate7={name:"\u0275\u0275styleMapInterpolate7",moduleName:gi},$t.styleMapInterpolate8={name:"\u0275\u0275styleMapInterpolate8",moduleName:gi},$t.styleMapInterpolateV={name:"\u0275\u0275styleMapInterpolateV",moduleName:gi},$t.classMap={name:"\u0275\u0275classMap",moduleName:gi},$t.classMapInterpolate1={name:"\u0275\u0275classMapInterpolate1",moduleName:gi},$t.classMapInterpolate2={name:"\u0275\u0275classMapInterpolate2",moduleName:gi},$t.classMapInterpolate3={name:"\u0275\u0275classMapInterpolate3",moduleName:gi},$t.classMapInterpolate4={name:"\u0275\u0275classMapInterpolate4",moduleName:gi},$t.classMapInterpolate5={name:"\u0275\u0275classMapInterpolate5",moduleName:gi},$t.classMapInterpolate6={name:"\u0275\u0275classMapInterpolate6",moduleName:gi},$t.classMapInterpolate7={name:"\u0275\u0275classMapInterpolate7",moduleName:gi},$t.classMapInterpolate8={name:"\u0275\u0275classMapInterpolate8",moduleName:gi},$t.classMapInterpolateV={name:"\u0275\u0275classMapInterpolateV",moduleName:gi},$t.styleProp={name:"\u0275\u0275styleProp",moduleName:gi},$t.stylePropInterpolate1={name:"\u0275\u0275stylePropInterpolate1",moduleName:gi},$t.stylePropInterpolate2={name:"\u0275\u0275stylePropInterpolate2",moduleName:gi},$t.stylePropInterpolate3={name:"\u0275\u0275stylePropInterpolate3",moduleName:gi},$t.stylePropInterpolate4={name:"\u0275\u0275stylePropInterpolate4",moduleName:gi},$t.stylePropInterpolate5={name:"\u0275\u0275stylePropInterpolate5",moduleName:gi},$t.stylePropInterpolate6={name:"\u0275\u0275stylePropInterpolate6",moduleName:gi},$t.stylePropInterpolate7={name:"\u0275\u0275stylePropInterpolate7",moduleName:gi},$t.stylePropInterpolate8={name:"\u0275\u0275stylePropInterpolate8",moduleName:gi},$t.stylePropInterpolateV={name:"\u0275\u0275stylePropInterpolateV",moduleName:gi},$t.nextContext={name:"\u0275\u0275nextContext",moduleName:gi},$t.resetView={name:"\u0275\u0275resetView",moduleName:gi},$t.templateCreate={name:"\u0275\u0275template",moduleName:gi},$t.text={name:"\u0275\u0275text",moduleName:gi},$t.enableBindings={name:"\u0275\u0275enableBindings",moduleName:gi},$t.disableBindings={name:"\u0275\u0275disableBindings",moduleName:gi},$t.getCurrentView={name:"\u0275\u0275getCurrentView",moduleName:gi},$t.textInterpolate={name:"\u0275\u0275textInterpolate",moduleName:gi},$t.textInterpolate1={name:"\u0275\u0275textInterpolate1",moduleName:gi},$t.textInterpolate2={name:"\u0275\u0275textInterpolate2",moduleName:gi},$t.textInterpolate3={name:"\u0275\u0275textInterpolate3",moduleName:gi},$t.textInterpolate4={name:"\u0275\u0275textInterpolate4",moduleName:gi},$t.textInterpolate5={name:"\u0275\u0275textInterpolate5",moduleName:gi},$t.textInterpolate6={name:"\u0275\u0275textInterpolate6",moduleName:gi},$t.textInterpolate7={name:"\u0275\u0275textInterpolate7",moduleName:gi},$t.textInterpolate8={name:"\u0275\u0275textInterpolate8",moduleName:gi},$t.textInterpolateV={name:"\u0275\u0275textInterpolateV",moduleName:gi},$t.restoreView={name:"\u0275\u0275restoreView",moduleName:gi},$t.pureFunction0={name:"\u0275\u0275pureFunction0",moduleName:gi},$t.pureFunction1={name:"\u0275\u0275pureFunction1",moduleName:gi},$t.pureFunction2={name:"\u0275\u0275pureFunction2",moduleName:gi},$t.pureFunction3={name:"\u0275\u0275pureFunction3",moduleName:gi},$t.pureFunction4={name:"\u0275\u0275pureFunction4",moduleName:gi},$t.pureFunction5={name:"\u0275\u0275pureFunction5",moduleName:gi},$t.pureFunction6={name:"\u0275\u0275pureFunction6",moduleName:gi},$t.pureFunction7={name:"\u0275\u0275pureFunction7",moduleName:gi},$t.pureFunction8={name:"\u0275\u0275pureFunction8",moduleName:gi},$t.pureFunctionV={name:"\u0275\u0275pureFunctionV",moduleName:gi},$t.pipeBind1={name:"\u0275\u0275pipeBind1",moduleName:gi},$t.pipeBind2={name:"\u0275\u0275pipeBind2",moduleName:gi},$t.pipeBind3={name:"\u0275\u0275pipeBind3",moduleName:gi},$t.pipeBind4={name:"\u0275\u0275pipeBind4",moduleName:gi},$t.pipeBindV={name:"\u0275\u0275pipeBindV",moduleName:gi},$t.hostProperty={name:"\u0275\u0275hostProperty",moduleName:gi},$t.property={name:"\u0275\u0275property",moduleName:gi},$t.propertyInterpolate={name:"\u0275\u0275propertyInterpolate",moduleName:gi},$t.propertyInterpolate1={name:"\u0275\u0275propertyInterpolate1",moduleName:gi},$t.propertyInterpolate2={name:"\u0275\u0275propertyInterpolate2",moduleName:gi},$t.propertyInterpolate3={name:"\u0275\u0275propertyInterpolate3",moduleName:gi},$t.propertyInterpolate4={name:"\u0275\u0275propertyInterpolate4",moduleName:gi},$t.propertyInterpolate5={name:"\u0275\u0275propertyInterpolate5",moduleName:gi},$t.propertyInterpolate6={name:"\u0275\u0275propertyInterpolate6",moduleName:gi},$t.propertyInterpolate7={name:"\u0275\u0275propertyInterpolate7",moduleName:gi},$t.propertyInterpolate8={name:"\u0275\u0275propertyInterpolate8",moduleName:gi},$t.propertyInterpolateV={name:"\u0275\u0275propertyInterpolateV",moduleName:gi},$t.i18n={name:"\u0275\u0275i18n",moduleName:gi},$t.i18nAttributes={name:"\u0275\u0275i18nAttributes",moduleName:gi},$t.i18nExp={name:"\u0275\u0275i18nExp",moduleName:gi},$t.i18nStart={name:"\u0275\u0275i18nStart",moduleName:gi},$t.i18nEnd={name:"\u0275\u0275i18nEnd",moduleName:gi},$t.i18nApply={name:"\u0275\u0275i18nApply",moduleName:gi},$t.i18nPostprocess={name:"\u0275\u0275i18nPostprocess",moduleName:gi},$t.pipe={name:"\u0275\u0275pipe",moduleName:gi},$t.projection={name:"\u0275\u0275projection",moduleName:gi},$t.projectionDef={name:"\u0275\u0275projectionDef",moduleName:gi},$t.reference={name:"\u0275\u0275reference",moduleName:gi},$t.inject={name:"\u0275\u0275inject",moduleName:gi},$t.injectAttribute={name:"\u0275\u0275injectAttribute",moduleName:gi},$t.directiveInject={name:"\u0275\u0275directiveInject",moduleName:gi},$t.invalidFactory={name:"\u0275\u0275invalidFactory",moduleName:gi},$t.invalidFactoryDep={name:"\u0275\u0275invalidFactoryDep",moduleName:gi},$t.templateRefExtractor={name:"\u0275\u0275templateRefExtractor",moduleName:gi},$t.forwardRef={name:"forwardRef",moduleName:gi},$t.resolveForwardRef={name:"resolveForwardRef",moduleName:gi},$t.\u0275\u0275defineInjectable={name:"\u0275\u0275defineInjectable",moduleName:gi},$t.declareInjectable={name:"\u0275\u0275ngDeclareInjectable",moduleName:gi},$t.InjectableDeclaration={name:"\u0275\u0275InjectableDeclaration",moduleName:gi},$t.resolveWindow={name:"\u0275\u0275resolveWindow",moduleName:gi},$t.resolveDocument={name:"\u0275\u0275resolveDocument",moduleName:gi},$t.resolveBody={name:"\u0275\u0275resolveBody",moduleName:gi},$t.defineComponent={name:"\u0275\u0275defineComponent",moduleName:gi},$t.declareComponent={name:"\u0275\u0275ngDeclareComponent",moduleName:gi},$t.setComponentScope={name:"\u0275\u0275setComponentScope",moduleName:gi},$t.ChangeDetectionStrategy={name:"ChangeDetectionStrategy",moduleName:gi},$t.ViewEncapsulation={name:"ViewEncapsulation",moduleName:gi},$t.ComponentDeclaration={name:"\u0275\u0275ComponentDeclaration",moduleName:gi},$t.FactoryDeclaration={name:"\u0275\u0275FactoryDeclaration",moduleName:gi},$t.declareFactory={name:"\u0275\u0275ngDeclareFactory",moduleName:gi},$t.FactoryTarget={name:"\u0275\u0275FactoryTarget",moduleName:gi},$t.defineDirective={name:"\u0275\u0275defineDirective",moduleName:gi},$t.declareDirective={name:"\u0275\u0275ngDeclareDirective",moduleName:gi},$t.DirectiveDeclaration={name:"\u0275\u0275DirectiveDeclaration",moduleName:gi},$t.InjectorDef={name:"\u0275\u0275InjectorDef",moduleName:gi},$t.InjectorDeclaration={name:"\u0275\u0275InjectorDeclaration",moduleName:gi},$t.defineInjector={name:"\u0275\u0275defineInjector",moduleName:gi},$t.declareInjector={name:"\u0275\u0275ngDeclareInjector",moduleName:gi},$t.NgModuleDeclaration={name:"\u0275\u0275NgModuleDeclaration",moduleName:gi},$t.ModuleWithProviders={name:"ModuleWithProviders",moduleName:gi},$t.defineNgModule={name:"\u0275\u0275defineNgModule",moduleName:gi},$t.declareNgModule={name:"\u0275\u0275ngDeclareNgModule",moduleName:gi},$t.setNgModuleScope={name:"\u0275\u0275setNgModuleScope",moduleName:gi},$t.registerNgModuleType={name:"\u0275\u0275registerNgModuleType",moduleName:gi},$t.PipeDeclaration={name:"\u0275\u0275PipeDeclaration",moduleName:gi},$t.definePipe={name:"\u0275\u0275definePipe",moduleName:gi},$t.declarePipe={name:"\u0275\u0275ngDeclarePipe",moduleName:gi},$t.declareClassMetadata={name:"\u0275\u0275ngDeclareClassMetadata",moduleName:gi},$t.setClassMetadata={name:"\u0275setClassMetadata",moduleName:gi},$t.queryRefresh={name:"\u0275\u0275queryRefresh",moduleName:gi},$t.viewQuery={name:"\u0275\u0275viewQuery",moduleName:gi},$t.loadQuery={name:"\u0275\u0275loadQuery",moduleName:gi},$t.contentQuery={name:"\u0275\u0275contentQuery",moduleName:gi},$t.NgOnChangesFeature={name:"\u0275\u0275NgOnChangesFeature",moduleName:gi},$t.InheritDefinitionFeature={name:"\u0275\u0275InheritDefinitionFeature",moduleName:gi},$t.CopyDefinitionFeature={name:"\u0275\u0275CopyDefinitionFeature",moduleName:gi},$t.StandaloneFeature={name:"\u0275\u0275StandaloneFeature",moduleName:gi},$t.ProvidersFeature={name:"\u0275\u0275ProvidersFeature",moduleName:gi},$t.HostDirectivesFeature={name:"\u0275\u0275HostDirectivesFeature",moduleName:gi},$t.listener={name:"\u0275\u0275listener",moduleName:gi},$t.getInheritedFactory={name:"\u0275\u0275getInheritedFactory",moduleName:gi},$t.sanitizeHtml={name:"\u0275\u0275sanitizeHtml",moduleName:gi},$t.sanitizeStyle={name:"\u0275\u0275sanitizeStyle",moduleName:gi},$t.sanitizeResourceUrl={name:"\u0275\u0275sanitizeResourceUrl",moduleName:gi},$t.sanitizeScript={name:"\u0275\u0275sanitizeScript",moduleName:gi},$t.sanitizeUrl={name:"\u0275\u0275sanitizeUrl",moduleName:gi},$t.sanitizeUrlOrResourceUrl={name:"\u0275\u0275sanitizeUrlOrResourceUrl",moduleName:gi},$t.trustConstantHtml={name:"\u0275\u0275trustConstantHtml",moduleName:gi},$t.trustConstantResourceUrl={name:"\u0275\u0275trustConstantResourceUrl",moduleName:gi},$t.validateIframeAttribute={name:"\u0275\u0275validateIframeAttribute",moduleName:gi};const Ma=/-+([a-z0-9])/g;function wa(b,r,u){const y=b.indexOf(r);return-1==y?u:[b.slice(0,y).trim(),b.slice(y+1).trim()]}function Cs(b){throw new Error(`Internal Error: ${b}`)}function Gl(b){if("string"==typeof b)return b;if(Array.isArray(b))return"["+b.map(Gl).join(", ")+"]";if(null==b)return""+b;if(b.overriddenName)return`${b.overriddenName}`;if(b.name)return`${b.name}`;if(!b.toString)return"object";const r=b.toString();if(null==r)return""+r;const u=r.indexOf("\n");return-1===u?r:r.substring(0,u)}const zc=(()=>typeof global<"u"&&global||typeof window<"u"&&window||typeof self<"u"&&typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&self)();class _i{constructor(r=null){this.file=r,this.sourcesContent=new Map,this.lines=[],this.lastCol0=0,this.hasMappings=!1}addSource(r,u=null){return this.sourcesContent.has(r)||this.sourcesContent.set(r,u),this}addLine(){return this.lines.push([]),this.lastCol0=0,this}addMapping(r,u,y,L){if(!this.currentLine)throw new Error("A line must be added before mappings can be added");if(null!=u&&!this.sourcesContent.has(u))throw new Error(`Unknown source file "${u}"`);if(null==r)throw new Error("The column in the generated code must be provided");if(r<this.lastCol0)throw new Error("Mapping should be added in output order");if(u&&(null==y||null==L))throw new Error("The source location must be provided when a source url is provided");return this.hasMappings=!0,this.lastCol0=r,this.currentLine.push({col0:r,sourceUrl:u,sourceLine0:y,sourceCol0:L}),this}get currentLine(){return this.lines.slice(-1)[0]}toJSON(){if(!this.hasMappings)return null;const r=new Map,u=[],y=[];Array.from(this.sourcesContent.keys()).forEach((Ot,sn)=>{r.set(Ot,sn),u.push(Ot),y.push(this.sourcesContent.get(Ot)||null)});let L="",G=0,Te=0,Ze=0,gt=0;return this.lines.forEach(Ot=>{G=0,L+=Ot.map(sn=>{let ci=vr(sn.col0-G);return G=sn.col0,null!=sn.sourceUrl&&(ci+=vr(r.get(sn.sourceUrl)-Te),Te=r.get(sn.sourceUrl),ci+=vr(sn.sourceLine0-Ze),Ze=sn.sourceLine0,ci+=vr(sn.sourceCol0-gt),gt=sn.sourceCol0),ci}).join(","),L+=";"}),L=L.slice(0,-1),{file:this.file||"",version:3,sourceRoot:"",sources:u,sourcesContent:y,mappings:L}}toJsComment(){return this.hasMappings?"//# sourceMappingURL=data:application/json;base64,"+function ar(b){let r="";const u=function Ts(b){let r=[];for(let u=0;u<b.length;u++){let y=b.charCodeAt(u);if(y>=55296&&y<=56319&&b.length>u+1){const L=b.charCodeAt(u+1);L>=56320&&L<=57343&&(u++,y=(y-55296<<10)+L-56320+65536)}y<=127?r.push(y):y<=2047?r.push(y>>6&31|192,63&y|128):y<=65535?r.push(y>>12|224,y>>6&63|128,63&y|128):y<=2097151&&r.push(y>>18&7|240,y>>12&63|128,y>>6&63|128,63&y|128)}return r}(b);for(let y=0;y<u.length;){const L=u[y++],G=y<u.length?u[y++]:null,Te=y<u.length?u[y++]:null;r+=Li(L>>2),r+=Li((3&L)<<4|(null===G?0:G>>4)),r+=null===G?"=":Li((15&G)<<2|(null===Te?0:Te>>6)),r+=null===G||null===Te?"=":Li(63&Te)}return r}(JSON.stringify(this,null,0)):""}}function vr(b){b=b<0?1+(-b<<1):b<<1;let r="";do{let u=31&b;(b>>=5)>0&&(u|=32),r+=Li(u)}while(b>0);return r}const Qr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function Li(b){if(b<0||b>=64)throw new Error("Can only encode value in the range [0, 63]");return Qr[b]}const Ta=/'|\\|\n|\r|\$/g,La=/^[$A-Z_][0-9A-Z_$]*$/i,Ps="  ";class is{constructor(r){this.indent=r,this.partsLength=0,this.parts=[],this.srcSpans=[]}}class yt{static createRoot(){return new yt(0)}constructor(r){this._indent=r,this._lines=[new is(r)]}get _currentLine(){return this._lines[this._lines.length-1]}println(r,u=""){this.print(r||null,u,!0)}lineIsEmpty(){return 0===this._currentLine.parts.length}lineLength(){return this._currentLine.indent*Ps.length+this._currentLine.partsLength}print(r,u,y=!1){u.length>0&&(this._currentLine.parts.push(u),this._currentLine.partsLength+=u.length,this._currentLine.srcSpans.push(r&&r.sourceSpan||null)),y&&this._lines.push(new is(this._indent))}removeEmptyLastLine(){this.lineIsEmpty()&&this._lines.pop()}incIndent(){this._indent++,this.lineIsEmpty()&&(this._currentLine.indent=this._indent)}decIndent(){this._indent--,this.lineIsEmpty()&&(this._currentLine.indent=this._indent)}toSource(){return this.sourceLines.map(r=>r.parts.length>0?Rt(r.indent)+r.parts.join(""):"").join("\n")}toSourceMapGenerator(r,u=0){const y=new _i(r);let L=!1;const G=()=>{L||(y.addSource(r," ").addMapping(0,r,0,0),L=!0)};for(let Te=0;Te<u;Te++)y.addLine(),G();return this.sourceLines.forEach((Te,Ze)=>{y.addLine();const gt=Te.srcSpans,Ot=Te.parts;let sn=Te.indent*Ps.length,ci=0;for(;ci<gt.length&&!gt[ci];)sn+=Ot[ci].length,ci++;for(ci<gt.length&&0===Ze&&0===sn?L=!0:G();ci<gt.length;){const Ji=gt[ci],xr=Ji.start.file,Hr=Ji.start.line,Do=Ji.start.col;for(y.addSource(xr.url,xr.content).addMapping(sn,xr.url,Hr,Do),sn+=Ot[ci].length,ci++;ci<gt.length&&(Ji===gt[ci]||!gt[ci]);)sn+=Ot[ci].length,ci++}}),y}spanOf(r,u){const y=this._lines[r];if(y){let L=u-Rt(y.indent).length;for(let G=0;G<y.parts.length;G++){const Te=y.parts[G];if(Te.length>L)return y.srcSpans[G];L-=Te.length}}return null}get sourceLines(){return this._lines.length&&0===this._lines[this._lines.length-1].parts.length?this._lines.slice(0,-1):this._lines}}class Dt{constructor(r){this._escapeDollarInStrings=r}printLeadingComments(r,u){if(void 0!==r.leadingComments)for(const y of r.leadingComments)y instanceof Ut?u.print(r,`/*${y.toString()}*/`,y.trailingNewline):y.multiline?u.print(r,`/* ${y.text} */`,y.trailingNewline):y.text.split("\n").forEach(L=>{u.println(r,`// ${L}`)})}visitExpressionStmt(r,u){return this.printLeadingComments(r,u),r.expr.visitExpression(this,u),u.println(r,";"),null}visitReturnStmt(r,u){return this.printLeadingComments(r,u),u.print(r,"return "),r.value.visitExpression(this,u),u.println(r,";"),null}visitIfStmt(r,u){this.printLeadingComments(r,u),u.print(r,"if ("),r.condition.visitExpression(this,u),u.print(r,") {");const y=null!=r.falseCase&&r.falseCase.length>0;return r.trueCase.length<=1&&!y?(u.print(r," "),this.visitAllStatements(r.trueCase,u),u.removeEmptyLastLine(),u.print(r," ")):(u.println(),u.incIndent(),this.visitAllStatements(r.trueCase,u),u.decIndent(),y&&(u.println(r,"} else {"),u.incIndent(),this.visitAllStatements(r.falseCase,u),u.decIndent())),u.println(r,"}"),null}visitWriteVarExpr(r,u){const y=u.lineIsEmpty();return y||u.print(r,"("),u.print(r,`${r.name} = `),r.value.visitExpression(this,u),y||u.print(r,")"),null}visitWriteKeyExpr(r,u){const y=u.lineIsEmpty();return y||u.print(r,"("),r.receiver.visitExpression(this,u),u.print(r,"["),r.index.visitExpression(this,u),u.print(r,"] = "),r.value.visitExpression(this,u),y||u.print(r,")"),null}visitWritePropExpr(r,u){const y=u.lineIsEmpty();return y||u.print(r,"("),r.receiver.visitExpression(this,u),u.print(r,`.${r.name} = `),r.value.visitExpression(this,u),y||u.print(r,")"),null}visitInvokeFunctionExpr(r,u){return r.fn.visitExpression(this,u),u.print(r,"("),this.visitAllExpressions(r.args,u,","),u.print(r,")"),null}visitTaggedTemplateExpr(r,u){r.tag.visitExpression(this,u),u.print(r,"`"+r.template.elements[0].rawText);for(let y=1;y<r.template.elements.length;y++)u.print(r,"${"),r.template.expressions[y-1].visitExpression(this,u),u.print(r,`}${r.template.elements[y].rawText}`);return u.print(r,"`"),null}visitWrappedNodeExpr(r,u){throw new Error("Abstract emitter cannot visit WrappedNodeExpr.")}visitTypeofExpr(r,u){u.print(r,"typeof "),r.expr.visitExpression(this,u)}visitReadVarExpr(r,u){return u.print(r,r.name),null}visitInstantiateExpr(r,u){return u.print(r,"new "),r.classExpr.visitExpression(this,u),u.print(r,"("),this.visitAllExpressions(r.args,u,","),u.print(r,")"),null}visitLiteralExpr(r,u){const y=r.value;return"string"==typeof y?u.print(r,We(y,this._escapeDollarInStrings)):u.print(r,`${y}`),null}visitLocalizedString(r,u){const y=r.serializeI18nHead();u.print(r,"$localize `"+y.raw);for(let L=1;L<r.messageParts.length;L++)u.print(r,"${"),r.expressions[L-1].visitExpression(this,u),u.print(r,`}${r.serializeI18nTemplatePart(L).raw}`);return u.print(r,"`"),null}visitConditionalExpr(r,u){return u.print(r,"("),r.condition.visitExpression(this,u),u.print(r,"? "),r.trueCase.visitExpression(this,u),u.print(r,": "),r.falseCase.visitExpression(this,u),u.print(r,")"),null}visitNotExpr(r,u){return u.print(r,"!"),r.condition.visitExpression(this,u),null}visitUnaryOperatorExpr(r,u){let y;switch(r.operator){case Vi.Plus:y="+";break;case Vi.Minus:y="-";break;default:throw new Error(`Unknown operator ${r.operator}`)}return r.parens&&u.print(r,"("),u.print(r,y),r.expr.visitExpression(this,u),r.parens&&u.print(r,")"),null}visitBinaryOperatorExpr(r,u){let y;switch(r.operator){case Vn.Equals:y="==";break;case Vn.Identical:y="===";break;case Vn.NotEquals:y="!=";break;case Vn.NotIdentical:y="!==";break;case Vn.And:y="&&";break;case Vn.BitwiseAnd:y="&";break;case Vn.Or:y="||";break;case Vn.Plus:y="+";break;case Vn.Minus:y="-";break;case Vn.Divide:y="/";break;case Vn.Multiply:y="*";break;case Vn.Modulo:y="%";break;case Vn.Lower:y="<";break;case Vn.LowerEquals:y="<=";break;case Vn.Bigger:y=">";break;case Vn.BiggerEquals:y=">=";break;case Vn.NullishCoalesce:y="??";break;default:throw new Error(`Unknown operator ${r.operator}`)}return r.parens&&u.print(r,"("),r.lhs.visitExpression(this,u),u.print(r,` ${y} `),r.rhs.visitExpression(this,u),r.parens&&u.print(r,")"),null}visitReadPropExpr(r,u){return r.receiver.visitExpression(this,u),u.print(r,"."),u.print(r,r.name),null}visitReadKeyExpr(r,u){return r.receiver.visitExpression(this,u),u.print(r,"["),r.index.visitExpression(this,u),u.print(r,"]"),null}visitLiteralArrayExpr(r,u){return u.print(r,"["),this.visitAllExpressions(r.entries,u,","),u.print(r,"]"),null}visitLiteralMapExpr(r,u){return u.print(r,"{"),this.visitAllObjects(y=>{u.print(r,`${We(y.key,this._escapeDollarInStrings,y.quoted)}:`),y.value.visitExpression(this,u)},r.entries,u,","),u.print(r,"}"),null}visitCommaExpr(r,u){return u.print(r,"("),this.visitAllExpressions(r.parts,u,","),u.print(r,")"),null}visitAllExpressions(r,u,y){this.visitAllObjects(L=>L.visitExpression(this,u),r,u,y)}visitAllObjects(r,u,y,L){let G=!1;for(let Te=0;Te<u.length;Te++)Te>0&&(y.lineLength()>80?(y.print(null,L,!0),G||(y.incIndent(),y.incIndent(),G=!0)):y.print(null,L,!1)),r(u[Te]);G&&(y.decIndent(),y.decIndent())}visitAllStatements(r,u){r.forEach(y=>y.visitStatement(this,u))}}function We(b,r,u=!0){if(null==b)return null;const y=b.replace(Ta,(...G)=>"$"==G[0]?r?"\\$":"$":"\n"==G[0]?"\\n":"\r"==G[0]?"\\r":`\\${G[0]}`);return u||!La.test(y)?`'${y}'`:y}function Rt(b){let r="";for(let u=0;u<b;u++)r+=Ps;return r}function Qn(b,r){if(0===r)return cn(b);const u=[];for(let y=0;y<r;y++)u.push(On);return cn(b,void 0,u)}const fi="@";function Xi(b){return`${fi}${b}`}function Mo(b,r){const u=We(r,!1,!1);return u!==r?`${b}[${u}]`:`${b}.${r}`}function ro(b,r){return`animation_${b}_${r}`}function xa(b,r){const u=new qt({name:b,moduleName:null}),y=new Bo(Vn.Identical,new gr(u),Si("undefined")),L=new Bo(Vn.Or,y,u,void 0,void 0,!0);return new Bo(Vn.And,L,r)}function To(b){const r=new Hi(b);return{value:r,type:r}}function Ao(b,r){const u=ii(b.map(y=>y.value));return r?er([],[new Fr(u)]):u}function Ha(b,r){return{expression:b,forwardRef:r}}function Ho({expression:b,forwardRef:r}){switch(r){case 0:case 1:return b;case 2:return Ra(b)}}function Ra(b){return St($t.forwardRef).callFn([er([],[new Fr(b)])])}var ba,Jt;function De(b){const r=Qt("t");let u=null;const y=Wt(b)?r:new Bo(Vn.Or,r,b.internalType);let L=null;null!==b.deps?"invalid"!==b.deps&&(L=new ct(y,Xt(b.deps,b.target))):(u=Qt(`\u0275${b.name}_BaseFactory`),L=u.callFn([y]));const G=[];let Te=null;function Ze(Ot){const sn=Qt("r");G.push(sn.set(gn).toDeclStmt());const ci=null!==L?sn.set(L).toStmt():St($t.invalidFactory).callFn([]).toStmt();return G.push(Yr(r,[ci],[sn.set(Ot).toStmt()])),sn}if(Wt(b)){const Ot=Xt(b.delegateDeps,b.target);Te=Ze(new(b.delegateType===ba.Class?ct:mr)(b.delegate,Ot))}else Te=function yi(b){return void 0!==b.expression}(b)?Ze(b.expression):L;if(null===Te)G.push(St($t.invalidFactory).callFn([]).toStmt());else if(null!==u){const Ot=St($t.getInheritedFactory).callFn([b.internalType]),sn=new Bo(Vn.Or,u,u.set(Ot));G.push(new Fr(sn.callFn([y])))}else G.push(new Fr(Te));let gt=er([new rr("t",On)],G,je,void 0,`${b.name}_Factory`);return null!==u&&(gt=er([],[new Gn(u.name),new Fr(gt)]).callFn([],void 0,!0)),{expression:gt,statements:[],type:bt(b)}}function bt(b){const r=null!==b.deps&&"invalid"!==b.deps?function Kt(b){let r=!1;const u=b.map(y=>{const L=function Fe(b){const r=[];return null!==b.attributeNameType&&r.push({key:"attribute",value:b.attributeNameType,quoted:!1}),b.optional&&r.push({key:"optional",value:Si(!0),quoted:!1}),b.host&&r.push({key:"host",value:Si(!0),quoted:!1}),b.self&&r.push({key:"self",value:Si(!0),quoted:!1}),b.skipSelf&&r.push({key:"skipSelf",value:Si(!0),quoted:!1}),r.length>0?hi(r):null}(y);return null!==L?(r=!0,L):Si(null)});return r?cn(ii(u)):si}(b.deps):si;return cn(St($t.FactoryDeclaration,[Qn(b.type.type,b.typeArgumentCount),r]))}function Xt(b,r){return b.map((u,y)=>function Qi(b,r,u){if(null===b.token)return St($t.invalidFactoryDep).callFn([Si(u)]);if(null===b.attributeNameType){const y=0|(b.self?2:0)|(b.skipSelf?4:0)|(b.host?1:0)|(b.optional?8:0)|(r===Jt.Pipe?16:0);let L=0!==y||b.optional?Si(y):null;const G=[b.token];L&&G.push(L);const Te=function Ki(b){switch(b){case Jt.Component:case Jt.Directive:case Jt.Pipe:return $t.directiveInject;case Jt.NgModule:case Jt.Injectable:default:return $t.inject}}(r);return St(Te).callFn(G)}return St($t.injectAttribute).callFn([b.token])}(u,r,y))}function Wt(b){return void 0!==b.delegateType}!function(b){b[b.Class=0]="Class",b[b.Function=1]="Function"}(ba||(ba={})),function(b){b[b.Directive=0]="Directive",b[b.Component=1]="Component",b[b.Injectable=2]="Injectable",b[b.Pipe=3]="Pipe",b[b.NgModule=4]="NgModule"}(Jt||(Jt={}));class ya{constructor(r,u){this.value=r,this.sourceSpan=u}visit(r){throw new Error("visit() not implemented for Comment")}}class Na{constructor(r,u){this.value=r,this.sourceSpan=u}visit(r){return r.visitText(this)}}class qi{constructor(r,u,y){this.value=r,this.sourceSpan=u,this.i18n=y}visit(r){return r.visitBoundText(this)}}class ia{constructor(r,u,y,L,G,Te){this.name=r,this.value=u,this.sourceSpan=y,this.keySpan=L,this.valueSpan=G,this.i18n=Te}visit(r){return r.visitTextAttribute(this)}}class $o{constructor(r,u,y,L,G,Te,Ze,gt,Ot){this.name=r,this.type=u,this.securityContext=y,this.value=L,this.unit=G,this.sourceSpan=Te,this.keySpan=Ze,this.valueSpan=gt,this.i18n=Ot}static fromBoundElementProperty(r,u){if(void 0===r.keySpan)throw new Error(`Unexpected state: keySpan must be defined for bound attributes but was not for ${r.name}: ${r.sourceSpan}`);return new $o(r.name,r.type,r.securityContext,r.value,r.unit,r.sourceSpan,r.keySpan,r.valueSpan,u)}visit(r){return r.visitBoundAttribute(this)}}class su{constructor(r,u,y,L,G,Te,Ze,gt){this.name=r,this.type=u,this.handler=y,this.target=L,this.phase=G,this.sourceSpan=Te,this.handlerSpan=Ze,this.keySpan=gt}static fromParsedEvent(r){const u=0===r.type?r.targetOrPhase:null,y=1===r.type?r.targetOrPhase:null;if(void 0===r.keySpan)throw new Error(`Unexpected state: keySpan must be defined for bound event but was not for ${r.name}: ${r.sourceSpan}`);return new su(r.name,r.type,r.handler,u,y,r.sourceSpan,r.handlerSpan,r.keySpan)}visit(r){return r.visitBoundEvent(this)}}class Us{constructor(r,u,y,L,G,Te,Ze,gt,Ot,sn){this.name=r,this.attributes=u,this.inputs=y,this.outputs=L,this.children=G,this.references=Te,this.sourceSpan=Ze,this.startSourceSpan=gt,this.endSourceSpan=Ot,this.i18n=sn}visit(r){return r.visitElement(this)}}class Ka{constructor(r,u,y,L,G,Te,Ze,gt,Ot,sn,ci,Ji){this.tagName=r,this.attributes=u,this.inputs=y,this.outputs=L,this.templateAttrs=G,this.children=Te,this.references=Ze,this.variables=gt,this.sourceSpan=Ot,this.startSourceSpan=sn,this.endSourceSpan=ci,this.i18n=Ji}visit(r){return r.visitTemplate(this)}}class Tc{constructor(r,u,y,L){this.selector=r,this.attributes=u,this.sourceSpan=y,this.i18n=L,this.name="ng-content"}visit(r){return r.visitContent(this)}}class Qs{constructor(r,u,y,L,G){this.name=r,this.value=u,this.sourceSpan=y,this.keySpan=L,this.valueSpan=G}visit(r){return r.visitVariable(this)}}class vu{constructor(r,u,y,L,G){this.name=r,this.value=u,this.sourceSpan=y,this.keySpan=L,this.valueSpan=G}visit(r){return r.visitReference(this)}}class hl{constructor(r,u,y,L){this.vars=r,this.placeholders=u,this.sourceSpan=y,this.i18n=L}visit(r){return r.visitIcu(this)}}function Da(b,r){const u=[];if(b.visit)for(const y of r){b.visit(y)||y.visit(b)}else for(const y of r){const L=y.visit(b);L&&u.push(L)}return u}class gl{constructor(r,u,y,L,G,Te){this.nodes=r,this.placeholders=u,this.placeholderToMessage=y,this.meaning=L,this.description=G,this.customId=Te,this.id=this.customId,this.legacyIds=[],this.messageString=function lu(b){const r=new ac;return b.map(y=>y.visit(r)).join("")}(this.nodes),r.length?this.sources=[{filePath:r[0].sourceSpan.start.file.url,startLine:r[0].sourceSpan.start.line+1,startCol:r[0].sourceSpan.start.col+1,endLine:r[r.length-1].sourceSpan.end.line+1,endCol:r[0].sourceSpan.start.col+1}]:this.sources=[]}}class ss{constructor(r,u){this.value=r,this.sourceSpan=u}visit(r,u){return r.visitText(this,u)}}class gc{constructor(r,u){this.children=r,this.sourceSpan=u}visit(r,u){return r.visitContainer(this,u)}}class rs{constructor(r,u,y,L){this.expression=r,this.type=u,this.cases=y,this.sourceSpan=L}visit(r,u){return r.visitIcu(this,u)}}class Pc{constructor(r,u,y,L,G,Te,Ze,gt,Ot){this.tag=r,this.attrs=u,this.startName=y,this.closeName=L,this.children=G,this.isVoid=Te,this.sourceSpan=Ze,this.startSourceSpan=gt,this.endSourceSpan=Ot}visit(r,u){return r.visitTagPlaceholder(this,u)}}class ks{constructor(r,u,y){this.value=r,this.name=u,this.sourceSpan=y}visit(r,u){return r.visitPlaceholder(this,u)}}class Ol{constructor(r,u,y){this.value=r,this.name=u,this.sourceSpan=y}visit(r,u){return r.visitIcuPlaceholder(this,u)}}class ac{visitText(r){return r.value}visitContainer(r){return r.children.map(u=>u.visit(this)).join("")}visitIcu(r){const u=Object.keys(r.cases).map(y=>`${y} {${r.cases[y].visit(this)}}`);return`{${r.expressionPlaceholder}, ${r.type}, ${u.join(" ")}}`}visitTagPlaceholder(r){const u=r.children.map(y=>y.visit(this)).join("");return`{$${r.startName}}${u}{$${r.closeName}}`}visitPlaceholder(r){return`{$${r.name}}`}visitIcuPlaceholder(r){return`{$${r.name}}`}}new class Oc{visitTag(r){const u=this._serializeAttributes(r.attrs);if(0==r.children.length)return`<${r.name}${u}/>`;const y=r.children.map(L=>L.visit(this));return`<${r.name}${u}>${y.join("")}</${r.name}>`}visitText(r){return r.value}visitDeclaration(r){return`<?xml${this._serializeAttributes(r.attrs)} ?>`}_serializeAttributes(r){const u=Object.keys(r).map(y=>`${y}="${r[y]}"`).join(" ");return u.length>0?" "+u:""}visitDoctype(r){return`<!DOCTYPE ${r.rootTag} [\n${r.dtd}\n]>`}};function ht(b){return b.toUpperCase().replace(/[^A-Z0-9_]/g,"_")}const Ke="MSG_",Kn="i18n",$i="i18n-",ga="\ufffd";function Zs(b){return b===Kn||b.startsWith($i)}function Kr(b){return b instanceof gl}function os(b){return Kr(b)&&1===b.nodes.length&&b.nodes[0]instanceof rs}function _s(b){return!!b.i18n}function _a(b){return b.nodes[0]}function xl(b,r=0){return`${ga}${b}${r>0?`:${r}`:""}${ga}`}function Os(b=0){let r=b;return()=>r++}function yu(b){const r={};return b.forEach((u,y)=>{r[y]=Si(u.length>1?`[${u.join("|")}]`:u[0])}),r}function Ks(b,r,...u){const y=b.get(r)||[];y.push(...u),b.set(r,y)}function _l(b,r=0,u=0){const y=r,L=new Map,G=b instanceof gl?b.nodes.find(Te=>Te instanceof gc):b;return G&&G.children.filter(Te=>Te instanceof ks).forEach((Te,Ze)=>{const gt=xl(y+Ze,u);Ks(L,Te.name,gt)}),L}function Dc(b={},r){const u={};return b&&Object.keys(b).length&&Object.keys(b).forEach(y=>u[Gs(y,r)]=b[y]),u}function Gs(b,r=!0){const u=ht(b);if(!r)return u;const y=u.split("_");if(1===y.length)return b.toLowerCase();let L;/^\d+$/.test(y[y.length-1])&&(L=y.pop());let G=y.shift().toLowerCase();return y.length&&(G+=y.map(Te=>Te.charAt(0).toUpperCase()+Te.slice(1).toLowerCase()).join("")),L?`${G}_${L}`:G}function Ed(b){return`${Ke}${b}`.toUpperCase()}function zl(b){return new Gn(b.name,void 0,je,void 0,b.sourceSpan)}const vl=/[-.]/,Lc="_t",Xe="ctx",zt="rf",nr="restoredCtx",zo=500,oa=new Set([$t.element,$t.elementStart,$t.elementEnd,$t.elementContainer,$t.elementContainerStart,$t.elementContainerEnd,$t.i18nExp,$t.listener,$t.classProp,$t.syntheticHostListener,$t.hostProperty,$t.syntheticHostProperty,$t.property,$t.propertyInterpolate1,$t.propertyInterpolate2,$t.propertyInterpolate3,$t.propertyInterpolate4,$t.propertyInterpolate5,$t.propertyInterpolate6,$t.propertyInterpolate7,$t.propertyInterpolate8,$t.propertyInterpolateV,$t.attribute,$t.attributeInterpolate1,$t.attributeInterpolate2,$t.attributeInterpolate3,$t.attributeInterpolate4,$t.attributeInterpolate5,$t.attributeInterpolate6,$t.attributeInterpolate7,$t.attributeInterpolate8,$t.attributeInterpolateV,$t.styleProp,$t.stylePropInterpolate1,$t.stylePropInterpolate2,$t.stylePropInterpolate3,$t.stylePropInterpolate4,$t.stylePropInterpolate5,$t.stylePropInterpolate6,$t.stylePropInterpolate7,$t.stylePropInterpolate8,$t.stylePropInterpolateV,$t.textInterpolate,$t.textInterpolate1,$t.textInterpolate2,$t.textInterpolate3,$t.textInterpolate4,$t.textInterpolate5,$t.textInterpolate6,$t.textInterpolate7,$t.textInterpolate8,$t.textInterpolateV]);function Ca(b,r,u){return St(r,null,b).callFn(u,b)}function Ba(b,r){let u=null;return()=>(u||(b.push(new Gn(Lc,void 0,On)),u=Qt(r)),u)}function Is(b){throw new Error(`Invalid state: Visitor ${this.constructor.name} doesn't handle ${b.constructor.name}`)}function ul(b){return Array.isArray(b)?ii(b.map(ul)):Si(b,je)}function bu(b,r){return Object.getOwnPropertyNames(b).length>0?function Zd(b,r){return hi(Object.getOwnPropertyNames(b).map(u=>{const y=b[u];let L,G,Te,Ze;return Array.isArray(y)?([G,L]=y,Te=u,Ze=G!==L):(Te=L=u,G=y,Ze=!1),{key:Te,quoted:vl.test(Te),value:r&&Ze?ii([ul(G),ul(L)]):ul(G)}}))}(b,r):null}function Qu(b){for(;Oa(b[b.length-1]);)b.pop();return b}function _t(b,r){if(Array.isArray(b.predicate)){let u=[];return b.predicate.forEach(y=>{const L=y.split(",").map(G=>Si(G.trim()));u.push(...L)}),r.getConstLiteral(ii(u),!0)}switch(b.predicate.forwardRef){case 0:case 2:return b.predicate.expression;case 1:return St($t.resolveForwardRef).callFn([b.predicate.expression])}}class q{constructor(){this.values=[]}set(r,u){u&&this.values.push({key:r,value:u,quoted:!1})}toLiteralMap(){return hi(this.values)}}function dt(b){const{expressions:r,strings:u}=b;return 1===r.length&&2===u.length&&""===u[0]&&""===u[1]?1:r.length+u.length}function fn(b){const r=[];let u=null,y=null,L=0;for(const G of b){const Te=("function"==typeof G.paramsOrFn?G.paramsOrFn():G.paramsOrFn)??[],Ze=Array.isArray(Te)?Te:[Te];L<zo&&y===G.reference&&oa.has(y)?(u=u.callFn(Ze,u.sourceSpan),L++):(null!==u&&r.push(u.toStmt()),u=Ca(G.span,G.reference,Ze),y=G.reference,L=0)}return null!==u&&r.push(u.toStmt()),r}function Ei(b,r){let u=null;const y={name:b.name,type:b.type,internalType:b.internalType,typeArgumentCount:b.typeArgumentCount,deps:[],target:Jt.Injectable};if(void 0!==b.useClass){const Ze=b.useClass.expression.isEquivalent(b.internalType);let gt;void 0!==b.deps&&(gt=b.deps),u=void 0!==gt?De({...y,delegate:b.useClass.expression,delegateDeps:gt,delegateType:ba.Class}):Ze?De(y):{statements:[],expression:En(b.type.value,b.useClass.expression,r)}}else u=void 0!==b.useFactory?void 0!==b.deps?De({...y,delegate:b.useFactory,delegateDeps:b.deps||[],delegateType:ba.Function}):{statements:[],expression:er([],[new Fr(b.useFactory.callFn([]))])}:void 0!==b.useValue?De({...y,expression:b.useValue.expression}):void 0!==b.useExisting?De({...y,expression:St($t.inject).callFn([b.useExisting.expression])}):{statements:[],expression:En(b.type.value,b.internalType,r)};const L=b.internalType,G=new q;return G.set("token",L),G.set("factory",u.expression),null!==b.providedIn.expression.value&&G.set("providedIn",Ho(b.providedIn)),{expression:St($t.\u0275\u0275defineInjectable).callFn([G.toLiteralMap()],void 0,!0),type:Po(b),statements:u.statements}}function Po(b){return new wi(St($t.InjectableDeclaration,[Qn(b.type.type,b.typeArgumentCount)]))}function En(b,r,u){if(b.node===r.node)return r.prop("\u0275fac");if(!u)return ls(r);return ls(St($t.resolveForwardRef).callFn([r]))}function ls(b){return er([new rr("t",On)],[new Fr(b.prop("\u0275fac").callFn([Qt("t")]))])}const Au=[/^\s*$/,/[<>]/,/^[{}]$/,/&(#|[a-z])/i,/^\/\//];class cs{static fromArray(r){return r?(function kc(b,r){if(null!=r&&(!Array.isArray(r)||2!=r.length))throw new Error(`Expected '${b}' to be an array, [start, end].`);if(null!=r){const u=r[0],y=r[1];Au.forEach(L=>{if(L.test(u)||L.test(y))throw new Error(`['${u}', '${y}'] contains unusable interpolation symbol.`)})}}("interpolation",r),new cs(r[0],r[1])):wu}constructor(r,u){this.start=r,this.end=u}}const wu=new cs("{{","}}"),Iu=0,Cu=9,Gd=10,Rd=11,Bu=12,Wf=13,vc=32,Go=34,Mm=36,Xc=39,ws=43,Vc=45,Uu=47,Ae=59,Ge=60,xt=61,Ht=62,li=48,dr=55,Sr=57,fo=65,ms=69,Nl=70,Yl=90,qo=95,ll=97,Hl=101,Fd=102,qu=110,Zc=114,uu=116,mc=118,Fs=122,nc=123,yl=125,dl=160,Wd=96;function Vl(b){return b>=Cu&&b<=vc||b==dl}function bl(b){return li<=b&&b<=Sr}function Sl(b){return b>=ll&&b<=Fs||b>=fo&&b<=Yl}function Hp(b){return b===Gd||b===Wf}function eu(b){return li<=b&&b<=dr}function ta(b){return b===Xc||b===Go||b===Wd}class pu{constructor(r,u,y,L){this.file=r,this.offset=u,this.line=y,this.col=L}toString(){return null!=this.offset?`${this.file.url}@${this.line}:${this.col}`:this.file.url}moveBy(r){const u=this.file.content,y=u.length;let L=this.offset,G=this.line,Te=this.col;for(;L>0&&r<0;)if(L--,r++,u.charCodeAt(L)==Gd){G--;const gt=u.substring(0,L-1).lastIndexOf(String.fromCharCode(Gd));Te=gt>0?L-gt:L}else Te--;for(;L<y&&r>0;){const Ze=u.charCodeAt(L);L++,r--,Ze==Gd?(G++,Te=0):Te++}return new pu(this.file,L,G,Te)}getContext(r,u){const y=this.file.content;let L=this.offset;if(null!=L){L>y.length-1&&(L=y.length-1);let G=L,Te=0,Ze=0;for(;Te<r&&L>0&&(L--,Te++,"\n"!=y[L]||++Ze!=u););for(Te=0,Ze=0;Te<r&&G<y.length-1&&(G++,Te++,"\n"!=y[G]||++Ze!=u););return{before:y.substring(L,this.offset),after:y.substring(this.offset,G+1)}}return null}}class fc{constructor(r,u){this.content=r,this.url=u}}class Tu{constructor(r,u,y=r,L=null){this.start=r,this.end=u,this.fullStart=y,this.details=L}toString(){return this.start.file.content.substring(this.start.offset,this.end.offset)}}var cp;!function(b){b[b.WARNING=0]="WARNING",b[b.ERROR=1]="ERROR"}(cp||(cp={}));class Ql{constructor(r,u,y=cp.ERROR){this.span=r,this.msg=u,this.level=y}contextualMessage(){const r=this.span.start.getContext(100,3);return r?`${this.msg} ("${r.before}[${cp[this.level]} ->]${r.after}")`:this.msg}toString(){const r=this.span.details?`, ${this.span.details}`:"";return`${this.contextualMessage()}: ${this.span.start}${r}`}}let Ro=0;function vs(b){return b.replace(/\W/g,"_")}const _e='(this&&this.__makeTemplateObject||function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e})';class $e extends Dt{constructor(){super(!1)}visitWrappedNodeExpr(r,u){throw new Error("Cannot emit a WrappedNodeExpr in Javascript.")}visitDeclareVarStmt(r,u){return u.print(r,`var ${r.name}`),r.value&&(u.print(r," = "),r.value.visitExpression(this,u)),u.println(r,";"),null}visitTaggedTemplateExpr(r,u){const y=r.template.elements;return r.tag.visitExpression(this,u),u.print(r,`(${_e}(`),u.print(r,`[${y.map(L=>We(L.text,!1)).join(", ")}], `),u.print(r,`[${y.map(L=>We(L.rawText,!1)).join(", ")}])`),r.template.expressions.forEach(L=>{u.print(r,", "),L.visitExpression(this,u)}),u.print(r,")"),null}visitFunctionExpr(r,u){return u.print(r,`function${r.name?" "+r.name:""}(`),this._visitParams(r.params,u),u.println(r,") {"),u.incIndent(),this.visitAllStatements(r.statements,u),u.decIndent(),u.print(r,"}"),null}visitDeclareFunctionStmt(r,u){return u.print(r,`function ${r.name}(`),this._visitParams(r.params,u),u.println(r,") {"),u.incIndent(),this.visitAllStatements(r.statements,u),u.decIndent(),u.println(r,"}"),null}visitLocalizedString(r,u){u.print(r,`$localize(${_e}(`);const y=[r.serializeI18nHead()];for(let L=1;L<r.messageParts.length;L++)y.push(r.serializeI18nTemplatePart(L));return u.print(r,`[${y.map(L=>We(L.cooked,!1)).join(", ")}], `),u.print(r,`[${y.map(L=>We(L.raw,!1)).join(", ")}])`),r.expressions.forEach(L=>{u.print(r,", "),L.visitExpression(this,u)}),u.print(r,")"),null}_visitParams(r,u){this.visitAllObjects(y=>u.print(null,y.name),r,u,",")}}let Tt;function N(b){return function Me(){if(void 0===Tt&&(Tt=null,zc.trustedTypes))try{Tt=zc.trustedTypes.createPolicy("angular#unsafe-jit",{createScript:b=>b})}catch{}return Tt}()?.createScript(b)||b}function O(...b){if(!zc.trustedTypes)return new Function(...b);const y=`(function anonymous(${b.slice(0,-1).join(",")}\n) { ${b[b.length-1]}\n})`,L=zc.eval(N(y));return void 0===L.bind?new Function(...b):(L.toString=()=>y,L.bind(zc))}class Ce{evaluateStatements(r,u,y,L){const G=new Je(y),Te=yt.createRoot();return u.length>0&&!function Vt(b){return b.isEquivalent(Si("use strict").toStmt())}(u[0])&&(u=[Si("use strict").toStmt(),...u]),G.visitAllStatements(u,Te),G.createReturnStmt(Te),this.evaluateCode(r,Te,G.getArgs(),L)}evaluateCode(r,u,y,L){let G=`"use strict";${u.toSource()}\n//# sourceURL=${r}`;const Te=[],Ze=[];for(const Ot in y)Ze.push(y[Ot]),Te.push(Ot);if(L){const Ot=O(...Te.concat("return null;")).toString(),sn=Ot.slice(0,Ot.indexOf("return null;")).split("\n").length-1;G+=`\n${u.toSourceMapGenerator(r,sn).toJsComment()}`}const gt=O(...Te.concat(G));return this.executeFunction(gt,Ze)}executeFunction(r,u){return r(...u)}}class Je extends $e{constructor(r){super(),this.refResolver=r,this._evalArgNames=[],this._evalArgValues=[],this._evalExportedVars=[]}createReturnStmt(r){new Fr(new Xn(this._evalExportedVars.map(y=>new Ci(y,Qt(y),!1)))).visitStatement(this,r)}getArgs(){const r={};for(let u=0;u<this._evalArgNames.length;u++)r[this._evalArgNames[u]]=this._evalArgValues[u];return r}visitExternalExpr(r,u){return this._emitReferenceToExternal(r,this.refResolver.resolveExternalReference(r.value),u),null}visitWrappedNodeExpr(r,u){return this._emitReferenceToExternal(r,r.node,u),null}visitDeclareVarStmt(r,u){return r.hasModifier(un.Exported)&&this._evalExportedVars.push(r.name),super.visitDeclareVarStmt(r,u)}visitDeclareFunctionStmt(r,u){return r.hasModifier(un.Exported)&&this._evalExportedVars.push(r.name),super.visitDeclareFunctionStmt(r,u)}_emitReferenceToExternal(r,u,y){let L=this._evalArgValues.indexOf(u);if(-1===L){L=this._evalArgValues.length,this._evalArgValues.push(u);const G=function Fo(b){if(!b||!b.reference)return null;const r=b.reference;if(r.__anonymousType)return r.__anonymousType;if(r.__forward_ref__)return"__forward_ref__";let u=Gl(r);return u.indexOf("(")>=0?(u="anonymous_"+Ro++,r.__anonymousType=u):u=vs(u),u}({reference:u})||"val";this._evalArgNames.push(`jit_${G}_${L}`)}y.print(r,this._evalArgNames[L])}}function Rr(b){const r=new q;null!==b.providers&&r.set("providers",b.providers),b.imports.length>0&&r.set("imports",ii(b.imports));return{expression:St($t.defineInjector).callFn([r.toLiteralMap()],void 0,!0),type:wo(b),statements:[]}}function wo(b){return new wi(St($t.InjectorDeclaration,[new wi(b.type.type)]))}class ua{constructor(r){this.context=r}resolveExternalReference(r){if("@angular/core"!==r.moduleName)throw new Error(`Cannot resolve external reference to ${r.moduleName}, only references to @angular/core are supported.`);if(!this.context.hasOwnProperty(r.name))throw new Error(`No value provided for @angular/core symbol '${r.name}'.`);return this.context[r.name]}}var Ls,cd,Nh,yr;function Ws(b){const{adjacentType:r,internalType:u,bootstrap:y,declarations:L,imports:G,exports:Te,schemas:Ze,containsForwardDecls:gt,selectorScopeMode:Ot,id:sn}=b,ci=[],Ji=new q;if(Ji.set("type",u),y.length>0&&Ji.set("bootstrap",Ao(y,gt)),Ot===Ls.Inline)L.length>0&&Ji.set("declarations",Ao(L,gt)),G.length>0&&Ji.set("imports",Ao(G,gt)),Te.length>0&&Ji.set("exports",Ao(Te,gt));else if(Ot===Ls.SideEffect){const Do=function Um(b){const{adjacentType:r,declarations:u,imports:y,exports:L,containsForwardDecls:G}=b,Te=new q;if(u.length>0&&Te.set("declarations",Ao(u,G)),y.length>0&&Te.set("imports",Ao(y,G)),L.length>0&&Te.set("exports",Ao(L,G)),0===Object.keys(Te.values).length)return null;const Ze=new mr(St($t.setNgModuleScope),[r,Te.toLiteralMap()]),gt=function qr(b){return xa("ngJitMode",b)}(Ze),Ot=new aa([],[gt.toStmt()]);return new mr(Ot,[]).toStmt()}(b);null!==Do&&ci.push(Do)}null!==Ze&&Ze.length>0&&Ji.set("schemas",ii(Ze.map(Do=>Do.value))),null!==sn&&(Ji.set("id",sn),ci.push(St($t.registerNgModuleType).callFn([r,sn]).toStmt()));return{expression:St($t.defineNgModule).callFn([Ji.toLiteralMap()],void 0,!0),type:Sc(b),statements:ci}}function Sc({type:b,declarations:r,exports:u,imports:y,includeImportTypes:L,publicDeclarationTypes:G}){return new wi(St($t.NgModuleDeclaration,[new wi(b.type),null===G?ic(r):mu(G),L?ic(y):si,ic(u)]))}function ic(b){const r=b.map(u=>Ln(u.type));return b.length>0?cn(ii(r)):si}function mu(b){const r=b.map(u=>Ln(u));return b.length>0?cn(ii(r)):si}function us(b){const r=[];r.push({key:"name",value:Si(b.pipeName),quoted:!1}),r.push({key:"type",value:b.type.value,quoted:!1}),r.push({key:"pure",value:Si(b.pure),quoted:!1}),b.isStandalone&&r.push({key:"standalone",value:Si(!0),quoted:!1});return{expression:St($t.definePipe).callFn([hi(r)],void 0,!0),type:Gg(b),statements:[]}}function Gg(b){return new wi(St($t.PipeDeclaration,[Qn(b.type.type,b.typeArgumentCount),new wi(new Yt(b.pipeName)),new wi(new Yt(b.isStandalone))]))}!function(b){b[b.Inline=0]="Inline",b[b.SideEffect=1]="SideEffect",b[b.Omit=2]="Omit"}(Ls||(Ls={})),function(b){b[b.Directive=0]="Directive",b[b.Pipe=1]="Pipe",b[b.NgModule=2]="NgModule"}(cd||(cd={}));class ds{constructor(r,u,y,L){this.input=u,this.errLocation=y,this.ctxLocation=L,this.message=`Parser Error: ${r} ${y} [${u}] in ${L}`}}class xm{constructor(r,u){this.start=r,this.end=u}toAbsolute(r){return new dp(r+this.start,r+this.end)}}class Ns{constructor(r,u){this.span=r,this.sourceSpan=u}toString(){return"AST"}}class Dm extends Ns{constructor(r,u,y){super(r,u),this.nameSpan=y}}class rc extends Ns{visit(r,u=null){}}class sm extends Ns{visit(r,u=null){return r.visitImplicitReceiver(this,u)}}class Xu extends sm{visit(r,u=null){return r.visitThisReceiver?.(this,u)}}class Td extends Ns{constructor(r,u,y){super(r,u),this.expressions=y}visit(r,u=null){return r.visitChain(this,u)}}class pg extends Ns{constructor(r,u,y,L,G){super(r,u),this.condition=y,this.trueExp=L,this.falseExp=G}visit(r,u=null){return r.visitConditional(this,u)}}class ud extends Dm{constructor(r,u,y,L,G){super(r,u,y),this.receiver=L,this.name=G}visit(r,u=null){return r.visitPropertyRead(this,u)}}class Vp extends Dm{constructor(r,u,y,L,G,Te){super(r,u,y),this.receiver=L,this.name=G,this.value=Te}visit(r,u=null){return r.visitPropertyWrite(this,u)}}class Wg extends Dm{constructor(r,u,y,L,G){super(r,u,y),this.receiver=L,this.name=G}visit(r,u=null){return r.visitSafePropertyRead(this,u)}}class ql extends Ns{constructor(r,u,y,L){super(r,u),this.receiver=y,this.key=L}visit(r,u=null){return r.visitKeyedRead(this,u)}}class Bd extends Ns{constructor(r,u,y,L){super(r,u),this.receiver=y,this.key=L}visit(r,u=null){return r.visitSafeKeyedRead(this,u)}}class Xl extends Ns{constructor(r,u,y,L,G){super(r,u),this.receiver=y,this.key=L,this.value=G}visit(r,u=null){return r.visitKeyedWrite(this,u)}}class gh extends Dm{constructor(r,u,y,L,G,Te){super(r,u,Te),this.exp=y,this.name=L,this.args=G}visit(r,u=null){return r.visitPipe(this,u)}}class Zp extends Ns{constructor(r,u,y){super(r,u),this.value=y}visit(r,u=null){return r.visitLiteralPrimitive(this,u)}}class $d extends Ns{constructor(r,u,y){super(r,u),this.expressions=y}visit(r,u=null){return r.visitLiteralArray(this,u)}}class dd extends Ns{constructor(r,u,y,L){super(r,u),this.keys=y,this.values=L}visit(r,u=null){return r.visitLiteralMap(this,u)}}class fu extends Ns{constructor(r,u,y,L){super(r,u),this.strings=y,this.expressions=L}visit(r,u=null){return r.visitInterpolation(this,u)}}class up extends Ns{constructor(r,u,y,L,G){super(r,u),this.operation=y,this.left=L,this.right=G}visit(r,u=null){return r.visitBinary(this,u)}}class jd extends up{static createMinus(r,u,y){return new jd(r,u,"-",y,"-",new Zp(r,u,0),y)}static createPlus(r,u,y){return new jd(r,u,"+",y,"-",y,new Zp(r,u,0))}constructor(r,u,y,L,G,Te,Ze){super(r,u,G,Te,Ze),this.operator=y,this.expr=L,this.left=null,this.right=null,this.operation=null}visit(r,u=null){return void 0!==r.visitUnary?r.visitUnary(this,u):r.visitBinary(this,u)}}class hu extends Ns{constructor(r,u,y){super(r,u),this.expression=y}visit(r,u=null){return r.visitPrefixNot(this,u)}}class Kd extends Ns{constructor(r,u,y){super(r,u),this.expression=y}visit(r,u=null){return r.visitNonNullAssert(this,u)}}class as extends Ns{constructor(r,u,y,L,G){super(r,u),this.receiver=y,this.args=L,this.argumentSpan=G}visit(r,u=null){return r.visitCall(this,u)}}class ed extends Ns{constructor(r,u,y,L,G){super(r,u),this.receiver=y,this.args=L,this.argumentSpan=G}visit(r,u=null){return r.visitSafeCall(this,u)}}class dp{constructor(r,u){this.start=r,this.end=u}}class Gp extends Ns{constructor(r,u,y,L,G){super(new xm(0,null===u?0:u.length),new dp(L,null===u?L:L+u.length)),this.ast=r,this.source=u,this.location=y,this.errors=G}visit(r,u=null){return r.visitASTWithSource?r.visitASTWithSource(this,u):this.ast.visit(r,u)}toString(){return`${this.source} in ${this.location}`}}class td{constructor(r,u,y){this.sourceSpan=r,this.key=u,this.value=y}}class lm{constructor(r,u,y){this.sourceSpan=r,this.key=u,this.value=y}}class mg{visit(r,u){r.visit(this,u)}visitUnary(r,u){this.visit(r.expr,u)}visitBinary(r,u){this.visit(r.left,u),this.visit(r.right,u)}visitChain(r,u){this.visitAll(r.expressions,u)}visitConditional(r,u){this.visit(r.condition,u),this.visit(r.trueExp,u),this.visit(r.falseExp,u)}visitPipe(r,u){this.visit(r.exp,u),this.visitAll(r.args,u)}visitImplicitReceiver(r,u){}visitThisReceiver(r,u){}visitInterpolation(r,u){this.visitAll(r.expressions,u)}visitKeyedRead(r,u){this.visit(r.receiver,u),this.visit(r.key,u)}visitKeyedWrite(r,u){this.visit(r.receiver,u),this.visit(r.key,u),this.visit(r.value,u)}visitLiteralArray(r,u){this.visitAll(r.expressions,u)}visitLiteralMap(r,u){this.visitAll(r.values,u)}visitLiteralPrimitive(r,u){}visitPrefixNot(r,u){this.visit(r.expression,u)}visitNonNullAssert(r,u){this.visit(r.expression,u)}visitPropertyRead(r,u){this.visit(r.receiver,u)}visitPropertyWrite(r,u){this.visit(r.receiver,u),this.visit(r.value,u)}visitSafePropertyRead(r,u){this.visit(r.receiver,u)}visitSafeKeyedRead(r,u){this.visit(r.receiver,u),this.visit(r.key,u)}visitCall(r,u){this.visit(r.receiver,u),this.visitAll(r.args,u)}visitSafeCall(r,u){this.visit(r.receiver,u),this.visitAll(r.args,u)}visitAll(r,u){for(const y of r)this.visit(y,u)}}class Mf{visitImplicitReceiver(r,u){return r}visitThisReceiver(r,u){return r}visitInterpolation(r,u){return new fu(r.span,r.sourceSpan,r.strings,this.visitAll(r.expressions))}visitLiteralPrimitive(r,u){return new Zp(r.span,r.sourceSpan,r.value)}visitPropertyRead(r,u){return new ud(r.span,r.sourceSpan,r.nameSpan,r.receiver.visit(this),r.name)}visitPropertyWrite(r,u){return new Vp(r.span,r.sourceSpan,r.nameSpan,r.receiver.visit(this),r.name,r.value.visit(this))}visitSafePropertyRead(r,u){return new Wg(r.span,r.sourceSpan,r.nameSpan,r.receiver.visit(this),r.name)}visitLiteralArray(r,u){return new $d(r.span,r.sourceSpan,this.visitAll(r.expressions))}visitLiteralMap(r,u){return new dd(r.span,r.sourceSpan,r.keys,this.visitAll(r.values))}visitUnary(r,u){switch(r.operator){case"+":return jd.createPlus(r.span,r.sourceSpan,r.expr.visit(this));case"-":return jd.createMinus(r.span,r.sourceSpan,r.expr.visit(this));default:throw new Error(`Unknown unary operator ${r.operator}`)}}visitBinary(r,u){return new up(r.span,r.sourceSpan,r.operation,r.left.visit(this),r.right.visit(this))}visitPrefixNot(r,u){return new hu(r.span,r.sourceSpan,r.expression.visit(this))}visitNonNullAssert(r,u){return new Kd(r.span,r.sourceSpan,r.expression.visit(this))}visitConditional(r,u){return new pg(r.span,r.sourceSpan,r.condition.visit(this),r.trueExp.visit(this),r.falseExp.visit(this))}visitPipe(r,u){return new gh(r.span,r.sourceSpan,r.exp.visit(this),r.name,this.visitAll(r.args),r.nameSpan)}visitKeyedRead(r,u){return new ql(r.span,r.sourceSpan,r.receiver.visit(this),r.key.visit(this))}visitKeyedWrite(r,u){return new Xl(r.span,r.sourceSpan,r.receiver.visit(this),r.key.visit(this),r.value.visit(this))}visitCall(r,u){return new as(r.span,r.sourceSpan,r.receiver.visit(this),this.visitAll(r.args),r.argumentSpan)}visitSafeCall(r,u){return new ed(r.span,r.sourceSpan,r.receiver.visit(this),this.visitAll(r.args),r.argumentSpan)}visitAll(r){const u=[];for(let y=0;y<r.length;++y)u[y]=r[y].visit(this);return u}visitChain(r,u){return new Td(r.span,r.sourceSpan,this.visitAll(r.expressions))}visitSafeKeyedRead(r,u){return new Bd(r.span,r.sourceSpan,r.receiver.visit(this),r.key.visit(this))}}class pp{visitImplicitReceiver(r,u){return r}visitThisReceiver(r,u){return r}visitInterpolation(r,u){const y=this.visitAll(r.expressions);return y!==r.expressions?new fu(r.span,r.sourceSpan,r.strings,y):r}visitLiteralPrimitive(r,u){return r}visitPropertyRead(r,u){const y=r.receiver.visit(this);return y!==r.receiver?new ud(r.span,r.sourceSpan,r.nameSpan,y,r.name):r}visitPropertyWrite(r,u){const y=r.receiver.visit(this),L=r.value.visit(this);return y!==r.receiver||L!==r.value?new Vp(r.span,r.sourceSpan,r.nameSpan,y,r.name,L):r}visitSafePropertyRead(r,u){const y=r.receiver.visit(this);return y!==r.receiver?new Wg(r.span,r.sourceSpan,r.nameSpan,y,r.name):r}visitLiteralArray(r,u){const y=this.visitAll(r.expressions);return y!==r.expressions?new $d(r.span,r.sourceSpan,y):r}visitLiteralMap(r,u){const y=this.visitAll(r.values);return y!==r.values?new dd(r.span,r.sourceSpan,r.keys,y):r}visitUnary(r,u){const y=r.expr.visit(this);if(y!==r.expr)switch(r.operator){case"+":return jd.createPlus(r.span,r.sourceSpan,y);case"-":return jd.createMinus(r.span,r.sourceSpan,y);default:throw new Error(`Unknown unary operator ${r.operator}`)}return r}visitBinary(r,u){const y=r.left.visit(this),L=r.right.visit(this);return y!==r.left||L!==r.right?new up(r.span,r.sourceSpan,r.operation,y,L):r}visitPrefixNot(r,u){const y=r.expression.visit(this);return y!==r.expression?new hu(r.span,r.sourceSpan,y):r}visitNonNullAssert(r,u){const y=r.expression.visit(this);return y!==r.expression?new Kd(r.span,r.sourceSpan,y):r}visitConditional(r,u){const y=r.condition.visit(this),L=r.trueExp.visit(this),G=r.falseExp.visit(this);return y!==r.condition||L!==r.trueExp||G!==r.falseExp?new pg(r.span,r.sourceSpan,y,L,G):r}visitPipe(r,u){const y=r.exp.visit(this),L=this.visitAll(r.args);return y!==r.exp||L!==r.args?new gh(r.span,r.sourceSpan,y,r.name,L,r.nameSpan):r}visitKeyedRead(r,u){const y=r.receiver.visit(this),L=r.key.visit(this);return y!==r.receiver||L!==r.key?new ql(r.span,r.sourceSpan,y,L):r}visitKeyedWrite(r,u){const y=r.receiver.visit(this),L=r.key.visit(this),G=r.value.visit(this);return y!==r.receiver||L!==r.key||G!==r.value?new Xl(r.span,r.sourceSpan,y,L,G):r}visitAll(r){const u=[];let y=!1;for(let L=0;L<r.length;++L){const G=r[L],Te=G.visit(this);u[L]=Te,y=y||Te!==G}return y?u:r}visitChain(r,u){const y=this.visitAll(r.expressions);return y!==r.expressions?new Td(r.span,r.sourceSpan,y):r}visitCall(r,u){const y=r.receiver.visit(this),L=this.visitAll(r.args);return y!==r.receiver||L!==r.args?new as(r.span,r.sourceSpan,y,L,r.argumentSpan):r}visitSafeCall(r,u){const y=r.receiver.visit(this),L=this.visitAll(r.args);return y!==r.receiver||L!==r.args?new ed(r.span,r.sourceSpan,y,L,r.argumentSpan):r}visitSafeKeyedRead(r,u){const y=r.receiver.visit(this),L=r.key.visit(this);return y!==r.receiver||L!==r.key?new Bd(r.span,r.sourceSpan,y,L):r}}class b_{constructor(r,u,y,L,G,Te){this.name=r,this.expression=u,this.type=y,this.sourceSpan=L,this.keySpan=G,this.valueSpan=Te,this.isLiteral=this.type===Nh.LITERAL_ATTR,this.isAnimation=this.type===Nh.ANIMATION}}!function(b){b[b.DEFAULT=0]="DEFAULT",b[b.LITERAL_ATTR=1]="LITERAL_ATTR",b[b.ANIMATION=2]="ANIMATION"}(Nh||(Nh={}));class _h{constructor(r,u,y,L,G,Te,Ze){this.name=r,this.targetOrPhase=u,this.type=y,this.handler=L,this.sourceSpan=G,this.handlerSpan=Te,this.keySpan=Ze}}class Jd{constructor(r,u,y,L,G){this.name=r,this.value=u,this.sourceSpan=y,this.keySpan=L,this.valueSpan=G}}class cm{constructor(r,u,y,L,G,Te,Ze,gt){this.name=r,this.type=u,this.securityContext=y,this.value=L,this.unit=G,this.sourceSpan=Te,this.keySpan=Ze,this.valueSpan=gt}}class um{}function Cl(b,r,u,y,L,G,Te){b||(b=new nu(Te));const Ze=function Sa(b,r){return function uc(b,r){const u=new q_(b);return r.visit(u)}(b,r)}({createLiteralArrayConverter:ci=>Ji=>ii(Ji),createLiteralMapConverter:ci=>Ji=>hi(ci.map((Hr,Do)=>({key:Hr.key,value:Ji[Do],quoted:Hr.quoted}))),createPipeConverter:ci=>{throw new Error(`Illegal State: Actions are not allowed to contain pipes. Pipe: ${ci}`)}},u),gt=new $f(b,r,y,!1,L,G),Ot=[];jf(Ze.visit(gt,yr.Statement),Ot),function C_(b,r,u){for(let y=b-1;y>=0;y--)u.unshift($g(r,y))}(gt.temporaryCount,y,Ot),gt.usesImplicitReceiver&&b.notifyImplicitReceiverUse();const sn=Ot.length-1;if(sn>=0){const ci=Ot[sn];ci instanceof Cr&&(Ot[sn]=new Fr(ci.expr))}return Ot}um.event=Qt("$event");class pd{constructor(r,u){this.stmts=r,this.currValExpr=u}}function Sm(b,r,u,y){b||(b=new nu);const L=new $f(b,r,y,!1),G=u.visit(L,yr.Expression),Te=J_(L,y);return L.usesImplicitReceiver&&b.notifyImplicitReceiverUse(),new pd(Te,G)}function J_(b,r){const u=[];for(let y=0;y<b.temporaryCount;y++)u.push($g(r,y));return u}function vh(b,r){return`tmp_${b}_${r}`}function $g(b,r){return new Gn(vh(b,r))}function Q_(b,r){if(b!==yr.Expression)throw new Error(`Expected an expression, but saw ${r}`)}function xd(b,r){return b===yr.Statement?r.toStmt():r}!function(b){b[b.Statement=0]="Statement",b[b.Expression=1]="Expression"}(yr||(yr={}));class q_ extends Mf{constructor(r){super(),this._converterFactory=r}visitPipe(r,u){const y=[r.exp,...r.args].map(L=>L.visit(this,u));return new Va(r.span,r.sourceSpan,y,this._converterFactory.createPipeConverter(r.name,y.length))}visitLiteralArray(r,u){const y=r.expressions.map(L=>L.visit(this,u));return new Va(r.span,r.sourceSpan,y,this._converterFactory.createLiteralArrayConverter(r.expressions.length))}visitLiteralMap(r,u){const y=r.values.map(L=>L.visit(this,u));return new Va(r.span,r.sourceSpan,y,this._converterFactory.createLiteralMapConverter(r.keys))}}class $f{constructor(r,u,y,L,G,Te){this._localResolver=r,this._implicitReceiver=u,this.bindingId=y,this.supportsInterpolation=L,this.baseSourceSpan=G,this.implicitReceiverAccesses=Te,this._nodeMap=new Map,this._resultMap=new Map,this._currentTemporary=0,this.temporaryCount=0,this.usesImplicitReceiver=!1}visitUnary(r,u){let y;switch(r.operator){case"+":y=Vi.Plus;break;case"-":y=Vi.Minus;break;default:throw new Error(`Unsupported operator ${r.operator}`)}return xd(u,new ea(y,this._visit(r.expr,yr.Expression),void 0,this.convertSourceSpan(r.span)))}visitBinary(r,u){let y;switch(r.operation){case"+":y=Vn.Plus;break;case"-":y=Vn.Minus;break;case"*":y=Vn.Multiply;break;case"/":y=Vn.Divide;break;case"%":y=Vn.Modulo;break;case"&&":y=Vn.And;break;case"||":y=Vn.Or;break;case"==":y=Vn.Equals;break;case"!=":y=Vn.NotEquals;break;case"===":y=Vn.Identical;break;case"!==":y=Vn.NotIdentical;break;case"<":y=Vn.Lower;break;case">":y=Vn.Bigger;break;case"<=":y=Vn.LowerEquals;break;case">=":y=Vn.BiggerEquals;break;case"??":return this.convertNullishCoalesce(r,u);default:throw new Error(`Unsupported operation ${r.operation}`)}return xd(u,new Bo(y,this._visit(r.left,yr.Expression),this._visit(r.right,yr.Expression),void 0,this.convertSourceSpan(r.span)))}visitChain(r,u){return function Eb(b,r){if(b!==yr.Statement)throw new Error(`Expected a statement, but saw ${r}`)}(u,r),this.visitAll(r.expressions,u)}visitConditional(r,u){return xd(u,this._visit(r.condition,yr.Expression).conditional(this._visit(r.trueExp,yr.Expression),this._visit(r.falseExp,yr.Expression),this.convertSourceSpan(r.span)))}visitPipe(r,u){throw new Error(`Illegal state: Pipes should have been converted into functions. Pipe: ${r.name}`)}visitImplicitReceiver(r,u){return Q_(u,r),this.usesImplicitReceiver=!0,this._implicitReceiver}visitThisReceiver(r,u){return this.visitImplicitReceiver(r,u)}visitInterpolation(r,u){if(!this.supportsInterpolation)throw new Error("Unexpected interpolation");Q_(u,r);let y=[];for(let G=0;G<r.strings.length-1;G++)y.push(Si(r.strings[G])),y.push(this._visit(r.expressions[G],yr.Expression));y.push(Si(r.strings[r.strings.length-1]));const L=r.strings;return 2===L.length&&""===L[0]&&""===L[1]?y=[y[1]]:r.expressions.length>=9&&(y=[ii(y)]),new E_(y)}visitKeyedRead(r,u){const y=this.leftMostSafeNode(r);return y?this.convertSafeAccess(r,y,u):xd(u,this._visit(r.receiver,yr.Expression).key(this._visit(r.key,yr.Expression)))}visitKeyedWrite(r,u){const y=this._visit(r.receiver,yr.Expression),L=this._visit(r.key,yr.Expression),G=this._visit(r.value,yr.Expression);return y===this._implicitReceiver&&this._localResolver.maybeRestoreView(),xd(u,y.key(L).set(G))}visitLiteralArray(r,u){throw new Error("Illegal State: literal arrays should have been converted into functions")}visitLiteralMap(r,u){throw new Error("Illegal State: literal maps should have been converted into functions")}visitLiteralPrimitive(r,u){const y=null===r.value||void 0===r.value||!0===r.value||!0===r.value?je:void 0;return xd(u,Si(r.value,y,this.convertSourceSpan(r.span)))}_getLocal(r,u){return this._localResolver.globals?.has(r)&&u instanceof Xu?null:this._localResolver.getLocal(r)}visitPrefixNot(r,u){return xd(u,_r(this._visit(r.expression,yr.Expression)))}visitNonNullAssert(r,u){return xd(u,this._visit(r.expression,yr.Expression))}visitPropertyRead(r,u){const y=this.leftMostSafeNode(r);if(y)return this.convertSafeAccess(r,y,u);{let L=null;const G=this.usesImplicitReceiver,Te=this._visit(r.receiver,yr.Expression);return Te===this._implicitReceiver&&(L=this._getLocal(r.name,r.receiver),L&&(this.usesImplicitReceiver=G,this.addImplicitReceiverAccess(r.name))),null==L&&(L=Te.prop(r.name,this.convertSourceSpan(r.span))),xd(u,L)}}visitPropertyWrite(r,u){const y=this._visit(r.receiver,yr.Expression),L=this.usesImplicitReceiver;let G=null;if(y===this._implicitReceiver){const Te=this._getLocal(r.name,r.receiver);if(Te){if(!(Te instanceof Ii)){const Ze=r.name,gt=r.value instanceof ud?r.value.name:void 0;throw new Error(`Cannot assign value "${gt}" to template variable "${Ze}". Template variables are read-only.`)}G=Te,this.usesImplicitReceiver=L,this.addImplicitReceiverAccess(r.name)}}return null===G&&(G=y.prop(r.name,this.convertSourceSpan(r.span))),xd(u,G.set(this._visit(r.value,yr.Expression)))}visitSafePropertyRead(r,u){return this.convertSafeAccess(r,this.leftMostSafeNode(r),u)}visitSafeKeyedRead(r,u){return this.convertSafeAccess(r,this.leftMostSafeNode(r),u)}visitAll(r,u){return r.map(y=>this._visit(y,u))}visitCall(r,u){const y=this.leftMostSafeNode(r);if(y)return this.convertSafeAccess(r,y,u);const L=this.visitAll(r.args,yr.Expression);if(r instanceof Va)return xd(u,r.converter(L));const G=r.receiver;if(G instanceof ud&&G.receiver instanceof sm&&!(G.receiver instanceof Xu)&&"$any"===G.name){if(1!==L.length)throw new Error(`Invalid call to $any, expected 1 argument but received ${L.length||"none"}`);return xd(u,L[0])}return xd(u,this._visit(G,yr.Expression).callFn(L,this.convertSourceSpan(r.span)))}visitSafeCall(r,u){return this.convertSafeAccess(r,this.leftMostSafeNode(r),u)}_visit(r,u){return this._resultMap.get(r)||(this._nodeMap.get(r)||r).visit(this,u)}convertSafeAccess(r,u,y){let G,L=this._visit(u.receiver,yr.Expression);this.needsTemporaryInSafeAccess(u.receiver)&&(G=this.allocateTemporary(),L=G.set(L),this._resultMap.set(u.receiver,G));const Te=L.isBlank();u instanceof ed?this._nodeMap.set(u,new as(u.span,u.sourceSpan,u.receiver,u.args,u.argumentSpan)):u instanceof Bd?this._nodeMap.set(u,new ql(u.span,u.sourceSpan,u.receiver,u.key)):this._nodeMap.set(u,new ud(u.span,u.sourceSpan,u.nameSpan,u.receiver,u.name));const Ze=this._visit(r,yr.Expression);return this._nodeMap.delete(u),G&&this.releaseTemporary(G),xd(y,Te.conditional(gn,Ze))}convertNullishCoalesce(r,u){const y=this._visit(r.left,yr.Expression),L=this._visit(r.right,yr.Expression),G=this.allocateTemporary();return this.releaseTemporary(G),xd(u,G.set(y).notIdentical(gn).and(G.notIdentical(Si(void 0))).conditional(G,L))}leftMostSafeNode(r){const u=(y,L)=>(this._nodeMap.get(L)||L).visit(y);return r.visit({visitUnary:y=>null,visitBinary:y=>null,visitChain:y=>null,visitConditional:y=>null,visitCall(y){return u(this,y.receiver)},visitSafeCall(y){return u(this,y.receiver)||y},visitImplicitReceiver:y=>null,visitThisReceiver:y=>null,visitInterpolation:y=>null,visitKeyedRead(y){return u(this,y.receiver)},visitKeyedWrite:y=>null,visitLiteralArray:y=>null,visitLiteralMap:y=>null,visitLiteralPrimitive:y=>null,visitPipe:y=>null,visitPrefixNot:y=>null,visitNonNullAssert(y){return u(this,y.expression)},visitPropertyRead(y){return u(this,y.receiver)},visitPropertyWrite:y=>null,visitSafePropertyRead(y){return u(this,y.receiver)||y},visitSafeKeyedRead(y){return u(this,y.receiver)||y}})}needsTemporaryInSafeAccess(r){const u=(L,G)=>G&&(this._nodeMap.get(G)||G).visit(L);return r.visit({visitUnary(L){return u(this,L.expr)},visitBinary(L){return u(this,L.left)||u(this,L.right)},visitChain:L=>!1,visitConditional(L){return u(this,L.condition)||u(this,L.trueExp)||u(this,L.falseExp)},visitCall:L=>!0,visitSafeCall:L=>!0,visitImplicitReceiver:L=>!1,visitThisReceiver:L=>!1,visitInterpolation(L){return((L,G)=>G.some(Te=>u(L,Te)))(this,L.expressions)},visitKeyedRead:L=>!1,visitKeyedWrite:L=>!1,visitLiteralArray:L=>!0,visitLiteralMap:L=>!0,visitLiteralPrimitive:L=>!1,visitPipe:L=>!0,visitPrefixNot(L){return u(this,L.expression)},visitNonNullAssert(L){return u(this,L.expression)},visitPropertyRead:L=>!1,visitPropertyWrite:L=>!1,visitSafePropertyRead:L=>!1,visitSafeKeyedRead:L=>!1})}allocateTemporary(){const r=this._currentTemporary++;return this.temporaryCount=Math.max(this._currentTemporary,this.temporaryCount),new Zi(vh(this.bindingId,r))}releaseTemporary(r){if(this._currentTemporary--,r.name!=vh(this.bindingId,this._currentTemporary))throw new Error(`Temporary ${r.name} released out of order`)}convertSourceSpan(r){if(this.baseSourceSpan){const u=this.baseSourceSpan.start.moveBy(r.start),y=this.baseSourceSpan.start.moveBy(r.end),L=this.baseSourceSpan.fullStart.moveBy(r.start);return new Tu(u,y,L)}return null}addImplicitReceiverAccess(r){this.implicitReceiverAccesses&&this.implicitReceiverAccesses.add(r)}}function jf(b,r){Array.isArray(b)?b.forEach(u=>jf(u,r)):r.push(b)}function rf(){throw new Error("Unsupported operation")}class E_ extends In{constructor(r){super(null,null),this.args=r,this.isConstant=rf,this.isEquivalent=rf,this.visitExpression=rf}}class nu{constructor(r){this.globals=r}notifyImplicitReceiverUse(){}maybeRestoreView(){}getLocal(r){return r===um.event.name?um.event:null}}class Va extends as{constructor(r,u,y,L){super(r,u,new rc(r,u),y,null),this.converter=L}}let mp;function M_(){return mp||(mp={},Wp(V.HTML,["iframe|srcdoc","*|innerHTML","*|outerHTML"]),Wp(V.STYLE,["*|style"]),Wp(V.URL,["*|formAction","area|href","area|ping","audio|src","a|href","a|ping","blockquote|cite","body|background","del|cite","form|action","img|src","input|src","ins|cite","q|cite","source|src","track|src","video|poster","video|src"]),Wp(V.RESOURCE_URL,["applet|code","applet|codebase","base|href","embed|src","frame|src","head|profile","html|manifest","iframe|src","link|href","media|src","object|codebase","object|data","script|src"])),mp}function Wp(b,r){for(const u of r)mp[u.toLowerCase()]=b}const X_=new Set(["sandbox","allow","allowfullscreen","referrerpolicy","csp","fetchpriority"]);function fp(b){return X_.has(b.toLowerCase())}const Bh=new Set(["inherit","initial","revert","unset","alternate","alternate-reverse","normal","reverse","backwards","both","forwards","none","paused","running","ease","ease-in","ease-in-out","ease-out","linear","step-start","step-end","end","jump-both","jump-end","jump-none","jump-start","start"]);class Uh{constructor(){this._animationDeclarationKeyframesRe=/(^|\s+)(?:(?:(['"])((?:\\\\|\\\2|(?!\2).)+)\2)|(-?[A-Za-z][\w\-]*))(?=[,\s]|$)/g}shimCssText(r,u,y=""){const L=function gg(b){return b.match(Yh)||[]}(r);return r=function hp(b){return b.replace(T_,"")}(r),r=this._insertDirectives(r),[this._scopeCssText(r,u,y),...L].join("\n")}_insertDirectives(r){return r=this._insertPolyfillDirectivesInCssText(r),this._insertPolyfillRulesInCssText(r)}_scopeKeyframesRelatedCss(r,u){const y=new Set,L=Vm(r,G=>this._scopeLocalKeyframeDeclarations(G,u,y));return Vm(L,G=>this._scopeAnimationRule(G,u,y))}_scopeLocalKeyframeDeclarations(r,u,y){return{...r,selector:r.selector.replace(/(^@(?:-webkit-)?keyframes(?:\s+))(['"]?)(.+)\2(\s*)$/,(L,G,Te,Ze,gt)=>(y.add(rv(Ze,Te)),`${G}${Te}${u}_${Ze}${Te}${gt}`))}}_scopeAnimationKeyframe(r,u,y){return r.replace(/^(\s*)(['"]?)(.+?)\2(\s*)$/,(L,G,Te,Ze,gt)=>`${G}${Te}${Ze=`${y.has(rv(Ze,Te))?u+"_":""}${Ze}`}${Te}${gt}`)}_scopeAnimationRule(r,u,y){let L=r.content.replace(/((?:^|\s+|;)(?:-webkit-)?animation(?:\s*):(?:\s*))([^;]+)/g,(G,Te,Ze)=>Te+Ze.replace(this._animationDeclarationKeyframesRe,(gt,Ot,sn="",ci,Ji)=>ci?`${Ot}${this._scopeAnimationKeyframe(`${sn}${ci}${sn}`,u,y)}`:Bh.has(Ji)?gt:`${Ot}${this._scopeAnimationKeyframe(Ji,u,y)}`));return L=L.replace(/((?:^|\s+|;)(?:-webkit-)?animation-name(?:\s*):(?:\s*))([^;]+)/g,(G,Te,Ze)=>`${Te}${Ze.split(",").map(gt=>this._scopeAnimationKeyframe(gt,u,y)).join(",")}`),{...r,content:L}}_insertPolyfillDirectivesInCssText(r){return r.replace(zh,function(...u){return u[2]+"{"})}_insertPolyfillRulesInCssText(r){return r.replace(Tf,(...u)=>{const y=u[0].replace(u[1],"").replace(u[2],"");return u[4]+y})}_scopeCssText(r,u,y){const L=this._extractUnscopedRulesFromCssText(r);return r=this._insertPolyfillHostInCssText(r),r=this._convertColonHost(r),r=this._convertColonHostContext(r),r=this._convertShadowDOMSelectors(r),u&&(r=this._scopeKeyframesRelatedCss(r,u),r=this._scopeSelectors(r,u,y)),(r=r+"\n"+L).trim()}_extractUnscopedRulesFromCssText(r){let y,u="";for(xf.lastIndex=0;null!==(y=xf.exec(r));){u+=y[0].replace(y[2],"").replace(y[1],y[4])+"\n\n"}return u}_convertColonHost(r){return r.replace(fg,(u,y,L)=>{if(y){const G=[],Te=y.split(",").map(Ze=>Ze.trim());for(const Ze of Te){if(!Ze)break;const gt=Ja+Ze.replace(Ud,"")+L;G.push(gt)}return G.join(",")}return Ja+L})}_convertColonHostContext(r){return r.replace(jo,u=>{const y=[[]];let L;for(;L=Ou.exec(u);){const G=(L[1]??"").trim().split(",").map(Ze=>Ze.trim()).filter(Ze=>""!==Ze),Te=y.length;_g(y,G.length);for(let Ze=0;Ze<G.length;Ze++)for(let gt=0;gt<Te;gt++)y[gt+Ze*Te].push(G[Ze]);u=L[2]}return y.map(G=>function vp(b,r){const u=Ja;Am.lastIndex=0;const y=Am.test(r);if(0===b.length)return u+r;const L=[b.pop()||""];for(;b.length>0;){const G=L.length,Te=b.pop();for(let Ze=0;Ze<G;Ze++){const gt=L[Ze];L[2*G+Ze]=gt+" "+Te,L[G+Ze]=Te+" "+gt,L[Ze]=Te+gt}}return L.map(G=>y?`${G}${r}`:`${G}${u}${r}, ${G} ${u}${r}`).join(",")}(G,u)).join(", ")})}_convertShadowDOMSelectors(r){return tv.reduce((u,y)=>u.replace(y," "),r)}_scopeSelectors(r,u,y){return Vm(r,L=>{let G=L.selector,Te=L.content;return"@"!==L.selector[0]?G=this._scopeSelector(L.selector,u,y):L.selector.startsWith("@media")||L.selector.startsWith("@supports")||L.selector.startsWith("@document")||L.selector.startsWith("@layer")||L.selector.startsWith("@container")?Te=this._scopeSelectors(L.content,u,y):(L.selector.startsWith("@font-face")||L.selector.startsWith("@page"))&&(Te=this._stripScopingSelectors(L.content)),new Hm(G,Te)})}_stripScopingSelectors(r){return Vm(r,u=>{const y=u.selector.replace(hg," ").replace($p," ");return new Hm(y,u.content)})}_scopeSelector(r,u,y){return r.split(",").map(L=>L.trim().split(hg)).map(L=>{const[G,...Te]=L;return[(gt=>this._selectorNeedsScoping(gt,u)?this._applySelectorScope(gt,u,y):gt)(G),...Te].join(" ")}).join(", ")}_selectorNeedsScoping(r,u){return!this._makeScopeMatcher(u).test(r)}_makeScopeMatcher(r){return r=r.replace(/\[/g,"\\[").replace(/\]/g,"\\]"),new RegExp("^("+r+")"+Lt,"m")}_applySimpleSelectorScope(r,u,y){if(Am.lastIndex=0,Am.test(r)){const L=`[${y}]`;return r.replace($p,(G,Te)=>Te.replace(/([^:]*)(:*)(.*)/,(Ze,gt,Ot,sn)=>gt+L+Ot+sn)).replace(Am,L+" ")}return u+" "+r}_applySelectorScope(r,u,y){const G="["+(u=u.replace(/\[is=([^\]]*)\]/g,(Do,...Zo)=>Zo[0]))+"]",Te=Do=>{let Zo=Do.trim();if(!Zo)return"";if(Do.indexOf(Ja)>-1)Zo=this._applySimpleSelectorScope(Do,u,y);else{const Ko=Do.replace(Am,"");if(Ko.length>0){const ma=Ko.match(/([^:]*)(:*)(.*)/);ma&&(Zo=ma[1]+G+ma[2]+ma[3])}}return Zo},Ze=new ev(r);let sn,gt="",Ot=0;const ci=/( |>|\+|~(?!=))\s*/g;let xr=!((r=Ze.content()).indexOf(Ja)>-1);for(;null!==(sn=ci.exec(r));){const Do=sn[1],Zo=r.slice(Ot,sn.index).trim();if(Zo.match(bh)&&r[sn.index+1]?.match(/[a-fA-F\d]/))continue;xr=xr||Zo.indexOf(Ja)>-1;gt+=`${xr?Te(Zo):Zo} ${Do} `,Ot=ci.lastIndex}const Hr=r.substring(Ot);return xr=xr||Hr.indexOf(Ja)>-1,gt+=xr?Te(Hr):Hr,Ze.restore(gt)}_insertPolyfillHostInCssText(r){return r.replace(Lu,Rp).replace(yh,Ud)}}class ev{constructor(r){this.placeholders=[],this.index=0,r=this._escapeRegexMatches(r,/(\[[^\]]*\])/g),r=this._escapeRegexMatches(r,/(\\.)/g),this._content=r.replace(/(:nth-[-\w]+)(\([^)]+\))/g,(u,y,L)=>{const G=`__ph-${this.index}__`;return this.placeholders.push(L),this.index++,y+G})}restore(r){return r.replace(bh,(u,y)=>this.placeholders[+y])}content(){return this._content}_escapeRegexMatches(r,u){return r.replace(u,(y,L)=>{const G=`__ph-${this.index}__`;return this.placeholders.push(L),this.index++,G})}}const zh=/polyfill-next-selector[^}]*content:[\s]*?(['"])(.*?)\1[;\s]*}([^{]*?){/gim,Tf=/(polyfill-rule)[^}]*(content:[\s]*(['"])(.*?)\3)[;\s]*[^}]*}/gim,xf=/(polyfill-unscoped-rule)[^}]*(content:[\s]*(['"])(.*?)\3)[;\s]*[^}]*}/gim,Ud="-shadowcsshost",Rp="-shadowcsscontext",Kf="(?:\\(((?:\\([^)(]*\\)|[^)(]*)+?)\\))?([^,{]*)",fg=new RegExp(Ud+Kf,"gim"),jo=new RegExp(Rp+Kf,"gim"),Ou=new RegExp(Rp+Kf,"im"),Ja=Ud+"-no-combinator",$p=/-shadowcsshost-no-combinator([^\s]*)/,tv=[/::shadow/g,/::content/g,/\/shadow-deep\//g,/\/shadow\//g],hg=/(?:>>>)|(?:\/deep\/)|(?:::ng-deep)/g,Lt="([>\\s~+[.,{:][\\s\\S]*)?$",Am=/-shadowcsshost/gim,yh=/:host/gim,Lu=/:host-context/gim,T_=/\/\*[\s\S]*?\*\//g,bh=/__ph-(\d+)__/g;const Yh=/\/\*\s*#\s*source(Mapping)?URL=[\s\S]+?\*\//g;const Ym="%BLOCK%",co=/(\s*)([^;\{\}]+?)(\s*)((?:{%BLOCK%}?\s*;?)|(?:\s*;))/g,sc=new Map([["{","}"]]),Js="%COMMA_IN_PLACEHOLDER%",zs="%SEMI_IN_PLACEHOLDER%",gp="%COLON_IN_PLACEHOLDER%",zu=new RegExp(Js,"g"),_p=new RegExp(zs,"g"),nv=new RegExp(gp,"g");class Hm{constructor(r,u){this.selector=r,this.content=u}}function Vm(b,r){const u=function Sd(b){let r=b,u=null;for(let y=0;y<r.length;y++){const L=r[y];if("\\"===L)y++;else if(null!==u)if(L===u)u=null;else{const G=iv[L];G&&(r=`${r.substr(0,y)}${G}${r.substr(y+1)}`,y+=G.length-1)}else("'"===L||'"'===L)&&(u=L)}return r}(b),y=function Jf(b,r,u){const y=[],L=[];let gt,Ot,G=0,Te=0,Ze=-1;for(let sn=0;sn<b.length;sn++){const ci=b[sn];"\\"===ci?sn++:ci===Ot?(G--,0===G&&(L.push(b.substring(Ze,sn)),y.push(u),Te=sn,Ze=-1,gt=Ot=void 0)):ci===gt?G++:0===G&&r.has(ci)&&(gt=ci,Ot=r.get(ci),G=1,Ze=sn+1,y.push(b.substring(Te,Ze)))}return-1!==Ze?(L.push(b.substring(Ze)),y.push(u)):y.push(b.substring(Te)),new Dd(y.join(""),L)}(u,sc,Ym);let L=0;return function jg(b){let r=b.replace(zu,",");return r=r.replace(_p,";"),r=r.replace(nv,":"),r}(y.escapedString.replace(co,(...Te)=>{const Ze=Te[2];let gt="",Ot=Te[4],sn="";Ot&&Ot.startsWith("{"+Ym)&&(gt=y.blocks[L++],Ot=Ot.substring(Ym.length+1),sn="{");const ci=r(new Hm(Ze,gt));return`${Te[1]}${ci.selector}${Te[3]}${sn}${ci.content}${Ot}`}))}class Dd{constructor(r,u){this.escapedString=r,this.blocks=u}}const iv={";":zs,",":Js,":":gp};function rv(b,r){return r?b.replace(/((?:^|[^\\])(?:\\\\)*)\\(?=['"])/g,"$1"):b}function _g(b,r){const u=b.length;for(let y=1;y<r;y++)for(let L=0;L<u;L++)b[L+y*u]=b[L].slice(0)}function Qd(b){return b.replace(/[a-z][A-Z]/g,r=>r.charAt(0)+"-"+r.charAt(1)).toLowerCase()}const jp="!important",yp=2;class Bl{constructor(r){this._directiveExpr=r,this._hasInitialValues=!1,this.hasBindings=!1,this.hasBindingsWithPipes=!1,this._classMapInput=null,this._styleMapInput=null,this._singleStyleInputs=null,this._singleClassInputs=null,this._lastStylingInput=null,this._firstStylingInput=null,this._stylesIndex=new Map,this._classesIndex=new Map,this._initialStyleValues=[],this._initialClassValues=[]}registerBoundInput(r){let u=null,y=r.name;switch(r.type){case 0:u=this.registerInputBasedOnName(y,r.value,r.sourceSpan);break;case 3:u=this.registerStyleInput(y,!1,r.value,r.sourceSpan,r.unit);break;case 2:u=this.registerClassInput(y,!1,r.value,r.sourceSpan)}return!!u}registerInputBasedOnName(r,u,y){let L=null;const G=r.substring(0,6),Te="style"===r||"style."===G||"style!"===G;if(Te||!Te&&("class"===r||"class."===G||"class!"===G)){const gt="."!==r.charAt(5),Ot=r.slice(gt?5:6);L=Te?this.registerStyleInput(Ot,gt,u,y):this.registerClassInput(Ot,gt,u,y)}return L}registerStyleInput(r,u,y,L,G){if(sf(y))return null;(function Ac(b){return b.startsWith("--")})(r)||(r=Qd(r));const{property:Te,hasOverrideFlag:Ze,suffix:gt}=bp(r),Ot={name:Te,suffix:G="string"==typeof G&&0!==G.length?G:gt,value:y,sourceSpan:L,hasOverrideFlag:Ze};return u?this._styleMapInput=Ot:((this._singleStyleInputs=this._singleStyleInputs||[]).push(Ot),Kp(this._stylesIndex,Te)),this._lastStylingInput=Ot,this._firstStylingInput=this._firstStylingInput||Ot,this._checkForPipes(y),this.hasBindings=!0,Ot}registerClassInput(r,u,y,L){if(sf(y))return null;const{property:G,hasOverrideFlag:Te}=bp(r),Ze={name:G,value:y,sourceSpan:L,hasOverrideFlag:Te,suffix:null};return u?this._classMapInput=Ze:((this._singleClassInputs=this._singleClassInputs||[]).push(Ze),Kp(this._classesIndex,G)),this._lastStylingInput=Ze,this._firstStylingInput=this._firstStylingInput||Ze,this._checkForPipes(y),this.hasBindings=!0,Ze}_checkForPipes(r){r instanceof Gp&&r.ast instanceof gh&&(this.hasBindingsWithPipes=!0)}registerStyleAttr(r){this._initialStyleValues=function of(b){const r=[];let u=0,y=0,L=0,G=0,Te=0,Ze=null;for(;u<b.length;)switch(b.charCodeAt(u++)){case 40:y++;break;case 41:y--;break;case 39:0===L?L=39:39===L&&92!==b.charCodeAt(u-1)&&(L=0);break;case 34:0===L?L=34:34===L&&92!==b.charCodeAt(u-1)&&(L=0);break;case 58:!Ze&&0===y&&0===L&&(Ze=Qd(b.substring(Te,u-1).trim()),G=u);break;case 59:if(Ze&&G>0&&0===y&&0===L){const Ot=b.substring(G,u-1).trim();r.push(Ze,Ot),Te=u,G=0,Ze=null}}if(Ze&&G){const gt=b.slice(G).trim();r.push(Ze,gt)}return r}(r),this._hasInitialValues=!0}registerClassAttr(r){this._initialClassValues=r.trim().split(/\s+/g),this._hasInitialValues=!0}populateInitialStylingAttrs(r){if(this._initialClassValues.length){r.push(Si(1));for(let u=0;u<this._initialClassValues.length;u++)r.push(Si(this._initialClassValues[u]))}if(this._initialStyleValues.length){r.push(Si(2));for(let u=0;u<this._initialStyleValues.length;u+=2)r.push(Si(this._initialStyleValues[u]),Si(this._initialStyleValues[u+1]))}}assignHostAttrs(r,u){this._directiveExpr&&(r.length||this._hasInitialValues)&&(this.populateInitialStylingAttrs(r),u.set("hostAttrs",ii(r)))}buildClassMapInstruction(r){return this._classMapInput?this._buildMapBasedInstruction(r,!0,this._classMapInput):null}buildStyleMapInstruction(r){return this._styleMapInput?this._buildMapBasedInstruction(r,!1,this._styleMapInput):null}_buildMapBasedInstruction(r,u,y){let L=yp;const G=y.value.visit(r);let Te;return G instanceof fu?(L+=G.expressions.length,Te=u?function af(b){switch(dt(b)){case 1:return $t.classMap;case 3:return $t.classMapInterpolate1;case 5:return $t.classMapInterpolate2;case 7:return $t.classMapInterpolate3;case 9:return $t.classMapInterpolate4;case 11:return $t.classMapInterpolate5;case 13:return $t.classMapInterpolate6;case 15:return $t.classMapInterpolate7;case 17:return $t.classMapInterpolate8;default:return $t.classMapInterpolateV}}(G):function wm(b){switch(dt(b)){case 1:return $t.styleMap;case 3:return $t.styleMapInterpolate1;case 5:return $t.styleMapInterpolate2;case 7:return $t.styleMapInterpolate3;case 9:return $t.styleMapInterpolate4;case 11:return $t.styleMapInterpolate5;case 13:return $t.styleMapInterpolate6;case 15:return $t.styleMapInterpolate7;case 17:return $t.styleMapInterpolate8;default:return $t.styleMapInterpolateV}}(G)):Te=u?$t.classMap:$t.styleMap,{reference:Te,calls:[{supportsInterpolation:!0,sourceSpan:y.sourceSpan,allocateBindingSlots:L,params:Ze=>{const gt=Ze(G);return Array.isArray(gt)?gt:[gt]}}]}}_buildSingleInputs(r,u,y,L,G){const Te=[];return u.forEach(Ze=>{const gt=Te[Te.length-1],Ot=Ze.value.visit(y);let sn=r,ci=yp;Ot instanceof fu&&(ci+=Ot.expressions.length,L&&(sn=L(Ot)));const Ji={sourceSpan:Ze.sourceSpan,allocateBindingSlots:ci,supportsInterpolation:!!L,params:xr=>{const Hr=[];Hr.push(Si(Ze.name));const Do=xr(Ot);return Array.isArray(Do)?Hr.push(...Do):Hr.push(Do),!G&&null!==Ze.suffix&&Hr.push(Si(Ze.suffix)),Hr}};gt&&gt.reference===sn?gt.calls.push(Ji):Te.push({reference:sn,calls:[Ji]})}),Te}_buildClassInputs(r){return this._singleClassInputs?this._buildSingleInputs($t.classProp,this._singleClassInputs,r,null,!0):[]}_buildStyleInputs(r){return this._singleStyleInputs?this._buildSingleInputs($t.styleProp,this._singleStyleInputs,r,Jc,!1):[]}buildUpdateLevelInstructions(r){const u=[];if(this.hasBindings){const y=this.buildStyleMapInstruction(r);y&&u.push(y);const L=this.buildClassMapInstruction(r);L&&u.push(L),u.push(...this._buildStyleInputs(r)),u.push(...this._buildClassInputs(r))}return u}}function Kp(b,r){b.has(r)||b.set(r,b.size)}function bp(b){let r=!1;const u=b.indexOf(jp);-1!==u&&(b=u>0?b.substring(0,u):"",r=!0);let y=null,L=b;const G=b.lastIndexOf(".");return G>0&&(y=b.slice(G+1),L=b.substring(0,G)),{property:L,suffix:y,hasOverrideFlag:r}}function Jc(b){switch(dt(b)){case 1:return $t.styleProp;case 3:return $t.stylePropInterpolate1;case 5:return $t.stylePropInterpolate2;case 7:return $t.stylePropInterpolate3;case 9:return $t.stylePropInterpolate4;case 11:return $t.stylePropInterpolate5;case 13:return $t.stylePropInterpolate6;case 15:return $t.stylePropInterpolate7;case 17:return $t.stylePropInterpolate8;default:return $t.stylePropInterpolateV}}function sf(b){return b instanceof Gp&&(b=b.ast),b instanceof rc}var pl;!function(b){b[b.Character=0]="Character",b[b.Identifier=1]="Identifier",b[b.PrivateIdentifier=2]="PrivateIdentifier",b[b.Keyword=3]="Keyword",b[b.String=4]="String",b[b.Operator=5]="Operator",b[b.Number=6]="Number",b[b.Error=7]="Error"}(pl||(pl={}));const Zm=["var","let","as","null","undefined","true","false","if","else","this"];class Jp{tokenize(r){const u=new Ep(r),y=[];let L=u.scanToken();for(;null!=L;)y.push(L),L=u.scanToken();return y}}class Cp{constructor(r,u,y,L,G){this.index=r,this.end=u,this.type=y,this.numValue=L,this.strValue=G}isCharacter(r){return this.type==pl.Character&&this.numValue==r}isNumber(){return this.type==pl.Number}isString(){return this.type==pl.String}isOperator(r){return this.type==pl.Operator&&this.strValue==r}isIdentifier(){return this.type==pl.Identifier}isPrivateIdentifier(){return this.type==pl.PrivateIdentifier}isKeyword(){return this.type==pl.Keyword}isKeywordLet(){return this.type==pl.Keyword&&"let"==this.strValue}isKeywordAs(){return this.type==pl.Keyword&&"as"==this.strValue}isKeywordNull(){return this.type==pl.Keyword&&"null"==this.strValue}isKeywordUndefined(){return this.type==pl.Keyword&&"undefined"==this.strValue}isKeywordTrue(){return this.type==pl.Keyword&&"true"==this.strValue}isKeywordFalse(){return this.type==pl.Keyword&&"false"==this.strValue}isKeywordThis(){return this.type==pl.Keyword&&"this"==this.strValue}isError(){return this.type==pl.Error}toNumber(){return this.type==pl.Number?this.numValue:-1}toString(){switch(this.type){case pl.Character:case pl.Identifier:case pl.Keyword:case pl.Operator:case pl.PrivateIdentifier:case pl.String:case pl.Error:return this.strValue;case pl.Number:return this.numValue.toString();default:return null}}}function Hh(b,r,u){return new Cp(b,r,pl.Character,u,String.fromCharCode(u))}function Qp(b,r,u){return new Cp(b,r,pl.Operator,0,u)}const wc=new Cp(-1,-1,pl.Character,0,"");class Ep{constructor(r){this.input=r,this.peek=0,this.index=-1,this.length=r.length,this.advance()}advance(){this.peek=++this.index>=this.length?Iu:this.input.charCodeAt(this.index)}scanToken(){const r=this.input,u=this.length;let y=this.peek,L=this.index;for(;y<=vc;){if(++L>=u){y=Iu;break}y=r.charCodeAt(L)}if(this.peek=y,this.index=L,L>=u)return null;if(Gh(y))return this.scanIdentifier();if(bl(y))return this.scanNumber(L);const G=L;switch(y){case 46:return this.advance(),bl(this.peek)?this.scanNumber(G):Hh(G,this.index,46);case 40:case 41:case nc:case yl:case 91:case 93:case 44:case 58:case Ae:return this.scanCharacter(G,y);case Xc:case Go:return this.scanString();case 35:return this.scanPrivateIdentifier();case ws:case Vc:case 42:case Uu:case 37:case 94:return this.scanOperator(G,String.fromCharCode(y));case 63:return this.scanQuestion(G);case Ge:case Ht:return this.scanComplexOperator(G,String.fromCharCode(y),xt,"=");case 33:case xt:return this.scanComplexOperator(G,String.fromCharCode(y),xt,"=",xt,"=");case 38:return this.scanComplexOperator(G,"&",38,"&");case 124:return this.scanComplexOperator(G,"|",124,"|");case dl:for(;Vl(this.peek);)this.advance();return this.scanToken()}return this.advance(),this.error(`Unexpected character [${String.fromCharCode(y)}]`,0)}scanCharacter(r,u){return this.advance(),Hh(r,this.index,u)}scanOperator(r,u){return this.advance(),Qp(r,this.index,u)}scanComplexOperator(r,u,y,L,G,Te){this.advance();let Ze=u;return this.peek==y&&(this.advance(),Ze+=L),null!=G&&this.peek==G&&(this.advance(),Ze+=Te),Qp(r,this.index,Ze)}scanIdentifier(){const r=this.index;for(this.advance();lf(this.peek);)this.advance();const u=this.input.substring(r,this.index);return Zm.indexOf(u)>-1?function Vh(b,r,u){return new Cp(b,r,pl.Keyword,0,u)}(r,this.index,u):function md(b,r,u){return new Cp(b,r,pl.Identifier,0,u)}(r,this.index,u)}scanPrivateIdentifier(){const r=this.index;if(this.advance(),!Gh(this.peek))return this.error("Invalid character [#]",-1);for(;lf(this.peek);)this.advance();const u=this.input.substring(r,this.index);return function vg(b,r,u){return new Cp(b,r,pl.PrivateIdentifier,0,u)}(r,this.index,u)}scanNumber(r){let u=this.index===r,y=!1;for(this.advance();;){if(!bl(this.peek))if(this.peek===qo){if(!bl(this.input.charCodeAt(this.index-1))||!bl(this.input.charCodeAt(this.index+1)))return this.error("Invalid numeric separator",0);y=!0}else if(46===this.peek)u=!1;else{if(!dm(this.peek))break;if(this.advance(),Ch(this.peek)&&this.advance(),!bl(this.peek))return this.error("Invalid exponent",-1);u=!1}this.advance()}let L=this.input.substring(r,this.index);y&&(L=L.replace(/_/g,""));const G=u?function Qf(b){const r=parseInt(b);if(isNaN(r))throw new Error("Invalid integer literal when parsing "+b);return r}(L):parseFloat(L);return function Qc(b,r,u){return new Cp(b,r,pl.Number,u,"")}(r,this.index,G)}scanString(){const r=this.index,u=this.peek;this.advance();let y="",L=this.index;const G=this.input;for(;this.peek!=u;)if(92==this.peek){let Ze;if(y+=G.substring(L,this.index),this.advance(),117==this.peek){const gt=G.substring(this.index+1,this.index+5);if(!/^[0-9a-f]+$/i.test(gt))return this.error(`Invalid unicode escape [\\u${gt}]`,0);Ze=parseInt(gt,16);for(let Ot=0;Ot<5;Ot++)this.advance()}else Ze=Ov(this.peek),this.advance();y+=String.fromCharCode(Ze),L=this.index}else{if(this.peek==Iu)return this.error("Unterminated quote",0);this.advance()}const Te=G.substring(L,this.index);return this.advance(),function Kg(b,r,u){return new Cp(b,r,pl.String,0,u)}(r,this.index,y+Te)}scanQuestion(r){this.advance();let u="?";return(63===this.peek||46===this.peek)&&(u+=46===this.peek?".":"?",this.advance()),Qp(r,this.index,u)}error(r,u){const y=this.index+u;return function Zh(b,r,u){return new Cp(b,r,pl.Error,0,u)}(y,this.index,`Lexer Error: ${r} at column ${y} in expression [${this.input}]`)}}function Gh(b){return ll<=b&&b<=Fs||fo<=b&&b<=Yl||b==qo||b==Mm}function lf(b){return Sl(b)||bl(b)||b==qo||b==Mm}function dm(b){return b==Hl||b==ms}function Ch(b){return b==Vc||b==ws}function Ov(b){switch(b){case qu:return Gd;case Fd:return Bu;case Zc:return Wf;case uu:return Cu;case mc:return Rd;default:return b}}class yg{constructor(r,u,y){this.strings=r,this.expressions=u,this.offsets=y}}class Mb{constructor(r,u,y){this.templateBindings=r,this.warnings=u,this.errors=y}}class Tb{constructor(r){this._lexer=r,this.errors=[]}parseAction(r,u,y,L,G=wu){this._checkNoInterpolation(r,y,G);const Te=this._stripComments(r),Ze=this._lexer.tokenize(Te);let gt=1;u&&(gt|=2);const Ot=new Mp(r,y,L,Ze,gt,this.errors,0).parseChain();return new Gp(Ot,r,y,L,this.errors)}parseBinding(r,u,y,L=wu){const G=this._parseBindingAst(r,u,y,L);return new Gp(G,r,u,y,this.errors)}checkSimpleExpression(r){const u=new Jg;return r.visit(u),u.errors}parseSimpleBinding(r,u,y,L=wu){const G=this._parseBindingAst(r,u,y,L),Te=this.checkSimpleExpression(G);return Te.length>0&&this._reportError(`Host binding expression cannot contain ${Te.join(" ")}`,r,u),new Gp(G,r,u,y,this.errors)}_reportError(r,u,y,L){this.errors.push(new ds(r,u,y,L))}_parseBindingAst(r,u,y,L){this._checkNoInterpolation(r,u,L);const G=this._stripComments(r),Te=this._lexer.tokenize(G);return new Mp(r,u,y,Te,0,this.errors,0).parseChain()}parseTemplateBindings(r,u,y,L,G){const Te=this._lexer.tokenize(u);return new Mp(u,y,G,Te,0,this.errors,0).parseTemplateBindings({source:r,span:new dp(L,L+r.length)})}parseInterpolation(r,u,y,L,G=wu){const{strings:Te,expressions:Ze,offsets:gt}=this.splitInterpolation(r,u,L,G);if(0===Ze.length)return null;const Ot=[];for(let sn=0;sn<Ze.length;++sn){const ci=Ze[sn].text,Ji=this._stripComments(ci),xr=this._lexer.tokenize(Ji),Hr=new Mp(r,u,y,xr,0,this.errors,gt[sn]).parseChain();Ot.push(Hr)}return this.createInterpolationAst(Te.map(sn=>sn.text),Ot,r,u,y)}parseInterpolationExpression(r,u,y){const L=this._stripComments(r),G=this._lexer.tokenize(L),Te=new Mp(r,u,y,G,0,this.errors,0).parseChain();return this.createInterpolationAst(["",""],[Te],r,u,y)}createInterpolationAst(r,u,y,L,G){const Te=new xm(0,y.length),Ze=new fu(Te,Te.toAbsolute(G),r,u);return new Gp(Ze,y,L,G,this.errors)}splitInterpolation(r,u,y,L=wu){const G=[],Te=[],Ze=[],gt=y?function bg(b){let r=new Map,u=0,y=0,L=0;for(;L<b.length;){const G=b[L];if(9===G.type){const[Te,Ze]=G.parts;u+=Ze.length,y+=Te.length}else{const Te=G.parts.reduce((Ze,gt)=>Ze+gt.length,0);y+=Te,u+=Te}r.set(y,u),L++}return r}(y):null;let Ot=0,sn=!1,ci=!1,{start:Ji,end:xr}=L;for(;Ot<r.length;)if(sn){const Hr=Ot,Do=Hr+Ji.length,Zo=this._getInterpolationEndIndex(r,xr,Do);if(-1===Zo){sn=!1,ci=!0;break}const Ko=Zo+xr.length,ma=r.substring(Do,Zo);0===ma.trim().length&&this._reportError("Blank expressions are not allowed in interpolated strings",r,`at column ${Ot} in`,u),Te.push({text:ma,start:Hr,end:Ko});const Cc=(gt?.get(Hr)??Hr)+Ji.length;Ze.push(Cc),Ot=Ko,sn=!1}else{const Hr=Ot;Ot=r.indexOf(Ji,Ot),-1===Ot&&(Ot=r.length);const Do=r.substring(Hr,Ot);G.push({text:Do,start:Hr,end:Ot}),sn=!0}if(!sn)if(ci){const Hr=G[G.length-1];Hr.text+=r.substring(Ot),Hr.end=r.length}else G.push({text:r.substring(Ot),start:Ot,end:r.length});return new yg(G,Te,Ze)}wrapLiteralPrimitive(r,u,y){const L=new xm(0,null==r?0:r.length);return new Gp(new Zp(L,L.toAbsolute(y),r),r,u,y,this.errors)}_stripComments(r){const u=this._commentStart(r);return null!=u?r.substring(0,u):r}_commentStart(r){let u=null;for(let y=0;y<r.length-1;y++){const L=r.charCodeAt(y),G=r.charCodeAt(y+1);if(L===Uu&&G==Uu&&null==u)return y;u===L?u=null:null==u&&ta(L)&&(u=L)}return null}_checkNoInterpolation(r,u,{start:y,end:L}){let G=-1,Te=-1;for(const Ze of this._forEachUnquotedChar(r,0))if(-1===G)r.startsWith(y)&&(G=Ze);else if(Te=this._getInterpolationEndIndex(r,L,Ze),Te>-1)break;G>-1&&Te>-1&&this._reportError(`Got interpolation (${y}${L}) where expression was expected`,r,`at column ${G} in`,u)}_getInterpolationEndIndex(r,u,y){for(const L of this._forEachUnquotedChar(r,y)){if(r.startsWith(u,L))return L;if(r.startsWith("//",L))return r.indexOf(u,L)}return-1}*_forEachUnquotedChar(r,u){let y=null,L=0;for(let G=u;G<r.length;G++){const Te=r[G];!ta(r.charCodeAt(G))||null!==y&&y!==Te||L%2!=0?null===y&&(yield G):y=null===y?Te:null,L="\\"===Te?L+1:0}}}var x_,Yd;!function(b){b[b.None=0]="None",b[b.Writable=1]="Writable"}(x_||(x_={}));class Mp{constructor(r,u,y,L,G,Te,Ze){this.input=r,this.location=u,this.absoluteOffset=y,this.tokens=L,this.parseFlags=G,this.errors=Te,this.offset=Ze,this.rparensExpected=0,this.rbracketsExpected=0,this.rbracesExpected=0,this.context=x_.None,this.sourceSpanCache=new Map,this.index=0}peek(r){const u=this.index+r;return u<this.tokens.length?this.tokens[u]:wc}get next(){return this.peek(0)}get atEOF(){return this.index>=this.tokens.length}get inputIndex(){return this.atEOF?this.currentEndIndex:this.next.index+this.offset}get currentEndIndex(){return this.index>0?this.peek(-1).end+this.offset:0===this.tokens.length?this.input.length+this.offset:this.next.index+this.offset}get currentAbsoluteOffset(){return this.absoluteOffset+this.inputIndex}span(r,u){let y=this.currentEndIndex;if(void 0!==u&&u>this.currentEndIndex&&(y=u),r>y){const L=y;y=r,r=L}return new xm(r,y)}sourceSpan(r,u){const y=`${r}@${this.inputIndex}:${u}`;return this.sourceSpanCache.has(y)||this.sourceSpanCache.set(y,this.span(r,u).toAbsolute(this.absoluteOffset)),this.sourceSpanCache.get(y)}advance(){this.index++}withContext(r,u){this.context|=r;const y=u();return this.context^=r,y}consumeOptionalCharacter(r){return!!this.next.isCharacter(r)&&(this.advance(),!0)}peekKeywordLet(){return this.next.isKeywordLet()}peekKeywordAs(){return this.next.isKeywordAs()}expectCharacter(r){this.consumeOptionalCharacter(r)||this.error(`Missing expected ${String.fromCharCode(r)}`)}consumeOptionalOperator(r){return!!this.next.isOperator(r)&&(this.advance(),!0)}expectOperator(r){this.consumeOptionalOperator(r)||this.error(`Missing expected operator ${r}`)}prettyPrintToken(r){return r===wc?"end of input":`token ${r}`}expectIdentifierOrKeyword(){const r=this.next;return r.isIdentifier()||r.isKeyword()?(this.advance(),r.toString()):(r.isPrivateIdentifier()?this._reportErrorForPrivateIdentifier(r,"expected identifier or keyword"):this.error(`Unexpected ${this.prettyPrintToken(r)}, expected identifier or keyword`),null)}expectIdentifierOrKeywordOrString(){const r=this.next;return r.isIdentifier()||r.isKeyword()||r.isString()?(this.advance(),r.toString()):(r.isPrivateIdentifier()?this._reportErrorForPrivateIdentifier(r,"expected identifier, keyword or string"):this.error(`Unexpected ${this.prettyPrintToken(r)}, expected identifier, keyword, or string`),"")}parseChain(){const r=[],u=this.inputIndex;for(;this.index<this.tokens.length;){const y=this.parsePipe();if(r.push(y),this.consumeOptionalCharacter(Ae))for(1&this.parseFlags||this.error("Binding expression cannot contain chained expression");this.consumeOptionalCharacter(Ae););else if(this.index<this.tokens.length){const L=this.index;if(this.error(`Unexpected token '${this.next}'`),this.index===L)break}}if(0===r.length){const y=this.offset,L=this.offset+this.input.length;return new rc(this.span(y,L),this.sourceSpan(y,L))}return 1==r.length?r[0]:new Td(this.span(u),this.sourceSpan(u),r)}parsePipe(){const r=this.inputIndex;let u=this.parseExpression();if(this.consumeOptionalOperator("|")){1&this.parseFlags&&this.error("Cannot have a pipe in an action expression");do{const y=this.inputIndex;let G,Te,L=this.expectIdentifierOrKeyword();null!==L?G=this.sourceSpan(y):(L="",Te=-1!==this.next.index?this.next.index:this.input.length+this.offset,G=new xm(Te,Te).toAbsolute(this.absoluteOffset));const Ze=[];for(;this.consumeOptionalCharacter(58);)Ze.push(this.parseExpression());u=new gh(this.span(r),this.sourceSpan(r,Te),u,L,Ze,G)}while(this.consumeOptionalOperator("|"))}return u}parseExpression(){return this.parseConditional()}parseConditional(){const r=this.inputIndex,u=this.parseLogicalOr();if(this.consumeOptionalOperator("?")){const y=this.parsePipe();let L;if(this.consumeOptionalCharacter(58))L=this.parsePipe();else{const G=this.inputIndex,Te=this.input.substring(r,G);this.error(`Conditional expression ${Te} requires all 3 expressions`),L=new rc(this.span(r),this.sourceSpan(r))}return new pg(this.span(r),this.sourceSpan(r),u,y,L)}return u}parseLogicalOr(){const r=this.inputIndex;let u=this.parseLogicalAnd();for(;this.consumeOptionalOperator("||");){const y=this.parseLogicalAnd();u=new up(this.span(r),this.sourceSpan(r),"||",u,y)}return u}parseLogicalAnd(){const r=this.inputIndex;let u=this.parseNullishCoalescing();for(;this.consumeOptionalOperator("&&");){const y=this.parseNullishCoalescing();u=new up(this.span(r),this.sourceSpan(r),"&&",u,y)}return u}parseNullishCoalescing(){const r=this.inputIndex;let u=this.parseEquality();for(;this.consumeOptionalOperator("??");){const y=this.parseEquality();u=new up(this.span(r),this.sourceSpan(r),"??",u,y)}return u}parseEquality(){const r=this.inputIndex;let u=this.parseRelational();for(;this.next.type==pl.Operator;){const y=this.next.strValue;switch(y){case"==":case"===":case"!=":case"!==":this.advance();const L=this.parseRelational();u=new up(this.span(r),this.sourceSpan(r),y,u,L);continue}break}return u}parseRelational(){const r=this.inputIndex;let u=this.parseAdditive();for(;this.next.type==pl.Operator;){const y=this.next.strValue;switch(y){case"<":case">":case"<=":case">=":this.advance();const L=this.parseAdditive();u=new up(this.span(r),this.sourceSpan(r),y,u,L);continue}break}return u}parseAdditive(){const r=this.inputIndex;let u=this.parseMultiplicative();for(;this.next.type==pl.Operator;){const y=this.next.strValue;switch(y){case"+":case"-":this.advance();let L=this.parseMultiplicative();u=new up(this.span(r),this.sourceSpan(r),y,u,L);continue}break}return u}parseMultiplicative(){const r=this.inputIndex;let u=this.parsePrefix();for(;this.next.type==pl.Operator;){const y=this.next.strValue;switch(y){case"*":case"%":case"/":this.advance();let L=this.parsePrefix();u=new up(this.span(r),this.sourceSpan(r),y,u,L);continue}break}return u}parsePrefix(){if(this.next.type==pl.Operator){const r=this.inputIndex;let y;switch(this.next.strValue){case"+":return this.advance(),y=this.parsePrefix(),jd.createPlus(this.span(r),this.sourceSpan(r),y);case"-":return this.advance(),y=this.parsePrefix(),jd.createMinus(this.span(r),this.sourceSpan(r),y);case"!":return this.advance(),y=this.parsePrefix(),new hu(this.span(r),this.sourceSpan(r),y)}}return this.parseCallChain()}parseCallChain(){const r=this.inputIndex;let u=this.parsePrimary();for(;;)if(this.consumeOptionalCharacter(46))u=this.parseAccessMember(u,r,!1);else if(this.consumeOptionalOperator("?."))u=this.consumeOptionalCharacter(40)?this.parseCall(u,r,!0):this.consumeOptionalCharacter(91)?this.parseKeyedReadOrWrite(u,r,!0):this.parseAccessMember(u,r,!0);else if(this.consumeOptionalCharacter(91))u=this.parseKeyedReadOrWrite(u,r,!1);else if(this.consumeOptionalCharacter(40))u=this.parseCall(u,r,!1);else{if(!this.consumeOptionalOperator("!"))return u;u=new Kd(this.span(r),this.sourceSpan(r),u)}}parsePrimary(){const r=this.inputIndex;if(this.consumeOptionalCharacter(40)){this.rparensExpected++;const u=this.parsePipe();return this.rparensExpected--,this.expectCharacter(41),u}if(this.next.isKeywordNull())return this.advance(),new Zp(this.span(r),this.sourceSpan(r),null);if(this.next.isKeywordUndefined())return this.advance(),new Zp(this.span(r),this.sourceSpan(r),void 0);if(this.next.isKeywordTrue())return this.advance(),new Zp(this.span(r),this.sourceSpan(r),!0);if(this.next.isKeywordFalse())return this.advance(),new Zp(this.span(r),this.sourceSpan(r),!1);if(this.next.isKeywordThis())return this.advance(),new Xu(this.span(r),this.sourceSpan(r));if(this.consumeOptionalCharacter(91)){this.rbracketsExpected++;const u=this.parseExpressionList(93);return this.rbracketsExpected--,this.expectCharacter(93),new $d(this.span(r),this.sourceSpan(r),u)}if(this.next.isCharacter(nc))return this.parseLiteralMap();if(this.next.isIdentifier())return this.parseAccessMember(new sm(this.span(r),this.sourceSpan(r)),r,!1);if(this.next.isNumber()){const u=this.next.toNumber();return this.advance(),new Zp(this.span(r),this.sourceSpan(r),u)}if(this.next.isString()){const u=this.next.toString();return this.advance(),new Zp(this.span(r),this.sourceSpan(r),u)}return this.next.isPrivateIdentifier()?(this._reportErrorForPrivateIdentifier(this.next,null),new rc(this.span(r),this.sourceSpan(r))):this.index>=this.tokens.length?(this.error(`Unexpected end of expression: ${this.input}`),new rc(this.span(r),this.sourceSpan(r))):(this.error(`Unexpected token ${this.next}`),new rc(this.span(r),this.sourceSpan(r)))}parseExpressionList(r){const u=[];do{if(this.next.isCharacter(r))break;u.push(this.parsePipe())}while(this.consumeOptionalCharacter(44));return u}parseLiteralMap(){const r=[],u=[],y=this.inputIndex;if(this.expectCharacter(nc),!this.consumeOptionalCharacter(yl)){this.rbracesExpected++;do{const L=this.inputIndex,G=this.next.isString(),Te=this.expectIdentifierOrKeywordOrString();if(r.push({key:Te,quoted:G}),G)this.expectCharacter(58),u.push(this.parsePipe());else if(this.consumeOptionalCharacter(58))u.push(this.parsePipe());else{const Ze=this.span(L),gt=this.sourceSpan(L);u.push(new ud(Ze,gt,gt,new sm(Ze,gt),Te))}}while(this.consumeOptionalCharacter(44)&&!this.next.isCharacter(yl));this.rbracesExpected--,this.expectCharacter(yl)}return new dd(this.span(y),this.sourceSpan(y),r,u)}parseAccessMember(r,u,y){const L=this.inputIndex,G=this.withContext(x_.Writable,()=>{const gt=this.expectIdentifierOrKeyword()??"";return 0===gt.length&&this.error("Expected identifier for property access",r.span.end),gt}),Te=this.sourceSpan(L);let Ze;if(y)this.consumeOptionalAssignment()?(this.error("The '?.' operator cannot be used in the assignment"),Ze=new rc(this.span(u),this.sourceSpan(u))):Ze=new Wg(this.span(u),this.sourceSpan(u),Te,r,G);else if(this.consumeOptionalAssignment()){if(!(1&this.parseFlags))return this.error("Bindings cannot contain assignments"),new rc(this.span(u),this.sourceSpan(u));const gt=this.parseConditional();Ze=new Vp(this.span(u),this.sourceSpan(u),Te,r,G,gt)}else Ze=new ud(this.span(u),this.sourceSpan(u),Te,r,G);return Ze}parseCall(r,u,y){const L=this.inputIndex;this.rparensExpected++;const G=this.parseCallArguments(),Te=this.span(L,this.inputIndex).toAbsolute(this.absoluteOffset);this.expectCharacter(41),this.rparensExpected--;const Ze=this.span(u),gt=this.sourceSpan(u);return y?new ed(Ze,gt,r,G,Te):new as(Ze,gt,r,G,Te)}consumeOptionalAssignment(){return 2&this.parseFlags&&this.next.isOperator("!")&&this.peek(1).isOperator("=")?(this.advance(),this.advance(),!0):this.consumeOptionalOperator("=")}parseCallArguments(){if(this.next.isCharacter(41))return[];const r=[];do{r.push(this.parsePipe())}while(this.consumeOptionalCharacter(44));return r}expectTemplateBindingKey(){let r="",u=!1;const y=this.currentAbsoluteOffset;do{r+=this.expectIdentifierOrKeywordOrString(),u=this.consumeOptionalOperator("-"),u&&(r+="-")}while(u);return{source:r,span:new dp(y,y+r.length)}}parseTemplateBindings(r){const u=[];for(u.push(...this.parseDirectiveKeywordBindings(r));this.index<this.tokens.length;){const y=this.parseLetBinding();if(y)u.push(y);else{const L=this.expectTemplateBindingKey(),G=this.parseAsBinding(L);G?u.push(G):(L.source=r.source+L.source.charAt(0).toUpperCase()+L.source.substring(1),u.push(...this.parseDirectiveKeywordBindings(L)))}this.consumeStatementTerminator()}return new Mb(u,[],this.errors)}parseKeyedReadOrWrite(r,u,y){return this.withContext(x_.Writable,()=>{this.rbracketsExpected++;const L=this.parsePipe();if(L instanceof rc&&this.error("Key access cannot be empty"),this.rbracketsExpected--,this.expectCharacter(93),!this.consumeOptionalOperator("="))return y?new Bd(this.span(u),this.sourceSpan(u),r,L):new ql(this.span(u),this.sourceSpan(u),r,L);if(!y){const G=this.parseConditional();return new Xl(this.span(u),this.sourceSpan(u),r,L,G)}return this.error("The '?.' operator cannot be used in the assignment"),new rc(this.span(u),this.sourceSpan(u))})}parseDirectiveKeywordBindings(r){const u=[];this.consumeOptionalCharacter(58);const y=this.getDirectiveBoundTarget();let L=this.currentAbsoluteOffset;const G=this.parseAsBinding(r);G||(this.consumeStatementTerminator(),L=this.currentAbsoluteOffset);const Te=new dp(r.span.start,L);return u.push(new lm(Te,r,y)),G&&u.push(G),u}getDirectiveBoundTarget(){if(this.next===wc||this.peekKeywordAs()||this.peekKeywordLet())return null;const r=this.parsePipe(),{start:u,end:y}=r.span,L=this.input.substring(u,y);return new Gp(r,L,this.location,this.absoluteOffset+u,this.errors)}parseAsBinding(r){if(!this.peekKeywordAs())return null;this.advance();const u=this.expectTemplateBindingKey();this.consumeStatementTerminator();const y=new dp(r.span.start,this.currentAbsoluteOffset);return new td(y,u,r)}parseLetBinding(){if(!this.peekKeywordLet())return null;const r=this.currentAbsoluteOffset;this.advance();const u=this.expectTemplateBindingKey();let y=null;this.consumeOptionalOperator("=")&&(y=this.expectTemplateBindingKey()),this.consumeStatementTerminator();const L=new dp(r,this.currentAbsoluteOffset);return new td(L,u,y)}consumeStatementTerminator(){this.consumeOptionalCharacter(Ae)||this.consumeOptionalCharacter(44)}error(r,u=null){this.errors.push(new ds(r,this.input,this.locationText(u),this.location)),this.skip()}locationText(r=null){return null==r&&(r=this.index),r<this.tokens.length?`at column ${this.tokens[r].index+1} in`:"at the end of the expression"}_reportErrorForPrivateIdentifier(r,u){let y=`Private identifiers are not supported. Unexpected private identifier: ${r}`;null!==u&&(y+=`, ${u}`),this.error(y)}skip(){let r=this.next;for(;!(!(this.index<this.tokens.length)||r.isCharacter(Ae)||r.isOperator("|")||!(this.rparensExpected<=0)&&r.isCharacter(41)||!(this.rbracesExpected<=0)&&r.isCharacter(yl)||!(this.rbracketsExpected<=0)&&r.isCharacter(93)||this.context&x_.Writable&&r.isOperator("="));)this.next.isError()&&this.errors.push(new ds(this.next.toString(),this.input,this.locationText(),this.location)),this.advance(),r=this.next}}class Jg extends mg{constructor(){super(...arguments),this.errors=[]}visitPipe(){this.errors.push("pipes")}}class fd{constructor(r,u){this.sourceSpan=r,this.i18n=u}}class Wh extends fd{constructor(r,u,y,L){super(u,L),this.value=r,this.tokens=y}visit(r,u){return r.visitText(this,u)}}class Cg extends fd{constructor(r,u,y,L,G,Te){super(L,Te),this.switchValue=r,this.type=u,this.cases=y,this.switchValueSourceSpan=G}visit(r,u){return r.visitExpansion(this,u)}}class zd{constructor(r,u,y,L,G){this.value=r,this.expression=u,this.sourceSpan=y,this.valueSourceSpan=L,this.expSourceSpan=G}visit(r,u){return r.visitExpansionCase(this,u)}}class Ga extends fd{constructor(r,u,y,L,G,Te,Ze){super(y,Ze),this.name=r,this.value=u,this.keySpan=L,this.valueSpan=G,this.valueTokens=Te}visit(r,u){return r.visitAttribute(this,u)}}class hd extends fd{constructor(r,u,y,L,G,Te=null,Ze){super(L,Ze),this.name=r,this.attrs=u,this.children=y,this.startSourceSpan=G,this.endSourceSpan=Te}visit(r,u){return r.visitElement(this,u)}}class Eh{constructor(r,u){this.value=r,this.sourceSpan=u}visit(r,u){return r.visitComment(this,u)}}function Al(b,r,u=null){const y=[],L=b.visit?G=>b.visit(G,u)||G.visit(b,u):G=>G.visit(b,u);return r.forEach(G=>{const Te=L(G);Te&&y.push(Te)}),y}function Ya(b){if(":"!=b[0])return[null,b];const r=b.indexOf(":",1);if(-1===r)throw new Error(`Unsupported format "${b}" expecting ":namespace:name"`);return[b.slice(1,r),b.slice(r+1)]}function Im(b){return"ng-container"===Ya(b)[1]}function cf(b){return"ng-content"===Ya(b)[1]}function Fc(b){return null===b?null:Ya(b)[0]}function gd(b,r){return b?`:${b}:${r}`:r}!function(b){b[b.RAW_TEXT=0]="RAW_TEXT",b[b.ESCAPABLE_RAW_TEXT=1]="ESCAPABLE_RAW_TEXT",b[b.PARSABLE_DATA=2]="PARSABLE_DATA"}(Yd||(Yd={}));class xb{}const qd=["[Element]|textContent,%ariaAtomic,%ariaAutoComplete,%ariaBusy,%ariaChecked,%ariaColCount,%ariaColIndex,%ariaColSpan,%ariaCurrent,%ariaDescription,%ariaDisabled,%ariaExpanded,%ariaHasPopup,%ariaHidden,%ariaKeyShortcuts,%ariaLabel,%ariaLevel,%ariaLive,%ariaModal,%ariaMultiLine,%ariaMultiSelectable,%ariaOrientation,%ariaPlaceholder,%ariaPosInSet,%ariaPressed,%ariaReadOnly,%ariaRelevant,%ariaRequired,%ariaRoleDescription,%ariaRowCount,%ariaRowIndex,%ariaRowSpan,%ariaSelected,%ariaSetSize,%ariaSort,%ariaValueMax,%ariaValueMin,%ariaValueNow,%ariaValueText,%classList,className,elementTiming,id,innerHTML,*beforecopy,*beforecut,*beforepaste,*fullscreenchange,*fullscreenerror,*search,*webkitfullscreenchange,*webkitfullscreenerror,outerHTML,%part,#scrollLeft,#scrollTop,slot,*message,*mozfullscreenchange,*mozfullscreenerror,*mozpointerlockchange,*mozpointerlockerror,*webglcontextcreationerror,*webglcontextlost,*webglcontextrestored","[HTMLElement]^[Element]|accessKey,autocapitalize,!autofocus,contentEditable,dir,!draggable,enterKeyHint,!hidden,innerText,inputMode,lang,nonce,*abort,*animationend,*animationiteration,*animationstart,*auxclick,*beforexrselect,*blur,*cancel,*canplay,*canplaythrough,*change,*click,*close,*contextmenu,*copy,*cuechange,*cut,*dblclick,*drag,*dragend,*dragenter,*dragleave,*dragover,*dragstart,*drop,*durationchange,*emptied,*ended,*error,*focus,*formdata,*gotpointercapture,*input,*invalid,*keydown,*keypress,*keyup,*load,*loadeddata,*loadedmetadata,*loadstart,*lostpointercapture,*mousedown,*mouseenter,*mouseleave,*mousemove,*mouseout,*mouseover,*mouseup,*mousewheel,*paste,*pause,*play,*playing,*pointercancel,*pointerdown,*pointerenter,*pointerleave,*pointermove,*pointerout,*pointerover,*pointerrawupdate,*pointerup,*progress,*ratechange,*reset,*resize,*scroll,*securitypolicyviolation,*seeked,*seeking,*select,*selectionchange,*selectstart,*slotchange,*stalled,*submit,*suspend,*timeupdate,*toggle,*transitioncancel,*transitionend,*transitionrun,*transitionstart,*volumechange,*waiting,*webkitanimationend,*webkitanimationiteration,*webkitanimationstart,*webkittransitionend,*wheel,outerText,!spellcheck,%style,#tabIndex,title,!translate,virtualKeyboardPolicy","abbr,address,article,aside,b,bdi,bdo,cite,content,code,dd,dfn,dt,em,figcaption,figure,footer,header,hgroup,i,kbd,main,mark,nav,noscript,rb,rp,rt,rtc,ruby,s,samp,section,small,strong,sub,sup,u,var,wbr^[HTMLElement]|accessKey,autocapitalize,!autofocus,contentEditable,dir,!draggable,enterKeyHint,!hidden,innerText,inputMode,lang,nonce,*abort,*animationend,*animationiteration,*animationstart,*auxclick,*beforexrselect,*blur,*cancel,*canplay,*canplaythrough,*change,*click,*close,*contextmenu,*copy,*cuechange,*cut,*dblclick,*drag,*dragend,*dragenter,*dragleave,*dragover,*dragstart,*drop,*durationchange,*emptied,*ended,*error,*focus,*formdata,*gotpointercapture,*input,*invalid,*keydown,*keypress,*keyup,*load,*loadeddata,*loadedmetadata,*loadstart,*lostpointercapture,*mousedown,*mouseenter,*mouseleave,*mousemove,*mouseout,*mouseover,*mouseup,*mousewheel,*paste,*pause,*play,*playing,*pointercancel,*pointerdown,*pointerenter,*pointerleave,*pointermove,*pointerout,*pointerover,*pointerrawupdate,*pointerup,*progress,*ratechange,*reset,*resize,*scroll,*securitypolicyviolation,*seeked,*seeking,*select,*selectionchange,*selectstart,*slotchange,*stalled,*submit,*suspend,*timeupdate,*toggle,*transitioncancel,*transitionend,*transitionrun,*transitionstart,*volumechange,*waiting,*webkitanimationend,*webkitanimationiteration,*webkitanimationstart,*webkittransitionend,*wheel,outerText,!spellcheck,%style,#tabIndex,title,!translate,virtualKeyboardPolicy","media^[HTMLElement]|!autoplay,!controls,%controlsList,%crossOrigin,#currentTime,!defaultMuted,#defaultPlaybackRate,!disableRemotePlayback,!loop,!muted,*encrypted,*waitingforkey,#playbackRate,preload,!preservesPitch,src,%srcObject,#volume",":svg:^[HTMLElement]|!autofocus,nonce,*abort,*animationend,*animationiteration,*animationstart,*auxclick,*beforexrselect,*blur,*cancel,*canplay,*canplaythrough,*change,*click,*close,*contextmenu,*copy,*cuechange,*cut,*dblclick,*drag,*dragend,*dragenter,*dragleave,*dragover,*dragstart,*drop,*durationchange,*emptied,*ended,*error,*focus,*formdata,*gotpointercapture,*input,*invalid,*keydown,*keypress,*keyup,*load,*loadeddata,*loadedmetadata,*loadstart,*lostpointercapture,*mousedown,*mouseenter,*mouseleave,*mousemove,*mouseout,*mouseover,*mouseup,*mousewheel,*paste,*pause,*play,*playing,*pointercancel,*pointerdown,*pointerenter,*pointerleave,*pointermove,*pointerout,*pointerover,*pointerrawupdate,*pointerup,*progress,*ratechange,*reset,*resize,*scroll,*securitypolicyviolation,*seeked,*seeking,*select,*selectionchange,*selectstart,*slotchange,*stalled,*submit,*suspend,*timeupdate,*toggle,*transitioncancel,*transitionend,*transitionrun,*transitionstart,*volumechange,*waiting,*webkitanimationend,*webkitanimationiteration,*webkitanimationstart,*webkittransitionend,*wheel,%style,#tabIndex",":svg:graphics^:svg:|",":svg:animation^:svg:|*begin,*end,*repeat",":svg:geometry^:svg:|",":svg:componentTransferFunction^:svg:|",":svg:gradient^:svg:|",":svg:textContent^:svg:graphics|",":svg:textPositioning^:svg:textContent|","a^[HTMLElement]|charset,coords,download,hash,host,hostname,href,hreflang,name,password,pathname,ping,port,protocol,referrerPolicy,rel,%relList,rev,search,shape,target,text,type,username","area^[HTMLElement]|alt,coords,download,hash,host,hostname,href,!noHref,password,pathname,ping,port,protocol,referrerPolicy,rel,%relList,search,shape,target,username","audio^media|","br^[HTMLElement]|clear","base^[HTMLElement]|href,target","body^[HTMLElement]|aLink,background,bgColor,link,*afterprint,*beforeprint,*beforeunload,*blur,*error,*focus,*hashchange,*languagechange,*load,*message,*messageerror,*offline,*online,*pagehide,*pageshow,*popstate,*rejectionhandled,*resize,*scroll,*storage,*unhandledrejection,*unload,text,vLink","button^[HTMLElement]|!disabled,formAction,formEnctype,formMethod,!formNoValidate,formTarget,name,type,value","canvas^[HTMLElement]|#height,#width","content^[HTMLElement]|select","dl^[HTMLElement]|!compact","data^[HTMLElement]|value","datalist^[HTMLElement]|","details^[HTMLElement]|!open","dialog^[HTMLElement]|!open,returnValue","dir^[HTMLElement]|!compact","div^[HTMLElement]|align","embed^[HTMLElement]|align,height,name,src,type,width","fieldset^[HTMLElement]|!disabled,name","font^[HTMLElement]|color,face,size","form^[HTMLElement]|acceptCharset,action,autocomplete,encoding,enctype,method,name,!noValidate,target","frame^[HTMLElement]|frameBorder,longDesc,marginHeight,marginWidth,name,!noResize,scrolling,src","frameset^[HTMLElement]|cols,*afterprint,*beforeprint,*beforeunload,*blur,*error,*focus,*hashchange,*languagechange,*load,*message,*messageerror,*offline,*online,*pagehide,*pageshow,*popstate,*rejectionhandled,*resize,*scroll,*storage,*unhandledrejection,*unload,rows","hr^[HTMLElement]|align,color,!noShade,size,width","head^[HTMLElement]|","h1,h2,h3,h4,h5,h6^[HTMLElement]|align","html^[HTMLElement]|version","iframe^[HTMLElement]|align,allow,!allowFullscreen,!allowPaymentRequest,csp,frameBorder,height,loading,longDesc,marginHeight,marginWidth,name,referrerPolicy,%sandbox,scrolling,src,srcdoc,width","img^[HTMLElement]|align,alt,border,%crossOrigin,decoding,#height,#hspace,!isMap,loading,longDesc,lowsrc,name,referrerPolicy,sizes,src,srcset,useMap,#vspace,#width","input^[HTMLElement]|accept,align,alt,autocomplete,!checked,!defaultChecked,defaultValue,dirName,!disabled,%files,formAction,formEnctype,formMethod,!formNoValidate,formTarget,#height,!incremental,!indeterminate,max,#maxLength,min,#minLength,!multiple,name,pattern,placeholder,!readOnly,!required,selectionDirection,#selectionEnd,#selectionStart,#size,src,step,type,useMap,value,%valueAsDate,#valueAsNumber,#width","li^[HTMLElement]|type,#value","label^[HTMLElement]|htmlFor","legend^[HTMLElement]|align","link^[HTMLElement]|as,charset,%crossOrigin,!disabled,href,hreflang,imageSizes,imageSrcset,integrity,media,referrerPolicy,rel,%relList,rev,%sizes,target,type","map^[HTMLElement]|name","marquee^[HTMLElement]|behavior,bgColor,direction,height,#hspace,#loop,#scrollAmount,#scrollDelay,!trueSpeed,#vspace,width","menu^[HTMLElement]|!compact","meta^[HTMLElement]|content,httpEquiv,media,name,scheme","meter^[HTMLElement]|#high,#low,#max,#min,#optimum,#value","ins,del^[HTMLElement]|cite,dateTime","ol^[HTMLElement]|!compact,!reversed,#start,type","object^[HTMLElement]|align,archive,border,code,codeBase,codeType,data,!declare,height,#hspace,name,standby,type,useMap,#vspace,width","optgroup^[HTMLElement]|!disabled,label","option^[HTMLElement]|!defaultSelected,!disabled,label,!selected,text,value","output^[HTMLElement]|defaultValue,%htmlFor,name,value","p^[HTMLElement]|align","param^[HTMLElement]|name,type,value,valueType","picture^[HTMLElement]|","pre^[HTMLElement]|#width","progress^[HTMLElement]|#max,#value","q,blockquote,cite^[HTMLElement]|","script^[HTMLElement]|!async,charset,%crossOrigin,!defer,event,htmlFor,integrity,!noModule,%referrerPolicy,src,text,type","select^[HTMLElement]|autocomplete,!disabled,#length,!multiple,name,!required,#selectedIndex,#size,value","slot^[HTMLElement]|name","source^[HTMLElement]|#height,media,sizes,src,srcset,type,#width","span^[HTMLElement]|","style^[HTMLElement]|!disabled,media,type","caption^[HTMLElement]|align","th,td^[HTMLElement]|abbr,align,axis,bgColor,ch,chOff,#colSpan,headers,height,!noWrap,#rowSpan,scope,vAlign,width","col,colgroup^[HTMLElement]|align,ch,chOff,#span,vAlign,width","table^[HTMLElement]|align,bgColor,border,%caption,cellPadding,cellSpacing,frame,rules,summary,%tFoot,%tHead,width","tr^[HTMLElement]|align,bgColor,ch,chOff,vAlign","tfoot,thead,tbody^[HTMLElement]|align,ch,chOff,vAlign","template^[HTMLElement]|","textarea^[HTMLElement]|autocomplete,#cols,defaultValue,dirName,!disabled,#maxLength,#minLength,name,placeholder,!readOnly,!required,#rows,selectionDirection,#selectionEnd,#selectionStart,value,wrap","time^[HTMLElement]|dateTime","title^[HTMLElement]|text","track^[HTMLElement]|!default,kind,label,src,srclang","ul^[HTMLElement]|!compact,type","unknown^[HTMLElement]|","video^media|!disablePictureInPicture,#height,*enterpictureinpicture,*leavepictureinpicture,!playsInline,poster,#width",":svg:a^:svg:graphics|",":svg:animate^:svg:animation|",":svg:animateMotion^:svg:animation|",":svg:animateTransform^:svg:animation|",":svg:circle^:svg:geometry|",":svg:clipPath^:svg:graphics|",":svg:defs^:svg:graphics|",":svg:desc^:svg:|",":svg:discard^:svg:|",":svg:ellipse^:svg:geometry|",":svg:feBlend^:svg:|",":svg:feColorMatrix^:svg:|",":svg:feComponentTransfer^:svg:|",":svg:feComposite^:svg:|",":svg:feConvolveMatrix^:svg:|",":svg:feDiffuseLighting^:svg:|",":svg:feDisplacementMap^:svg:|",":svg:feDistantLight^:svg:|",":svg:feDropShadow^:svg:|",":svg:feFlood^:svg:|",":svg:feFuncA^:svg:componentTransferFunction|",":svg:feFuncB^:svg:componentTransferFunction|",":svg:feFuncG^:svg:componentTransferFunction|",":svg:feFuncR^:svg:componentTransferFunction|",":svg:feGaussianBlur^:svg:|",":svg:feImage^:svg:|",":svg:feMerge^:svg:|",":svg:feMergeNode^:svg:|",":svg:feMorphology^:svg:|",":svg:feOffset^:svg:|",":svg:fePointLight^:svg:|",":svg:feSpecularLighting^:svg:|",":svg:feSpotLight^:svg:|",":svg:feTile^:svg:|",":svg:feTurbulence^:svg:|",":svg:filter^:svg:|",":svg:foreignObject^:svg:graphics|",":svg:g^:svg:graphics|",":svg:image^:svg:graphics|decoding",":svg:line^:svg:geometry|",":svg:linearGradient^:svg:gradient|",":svg:mpath^:svg:|",":svg:marker^:svg:|",":svg:mask^:svg:|",":svg:metadata^:svg:|",":svg:path^:svg:geometry|",":svg:pattern^:svg:|",":svg:polygon^:svg:geometry|",":svg:polyline^:svg:geometry|",":svg:radialGradient^:svg:gradient|",":svg:rect^:svg:geometry|",":svg:svg^:svg:graphics|#currentScale,#zoomAndPan",":svg:script^:svg:|type",":svg:set^:svg:animation|",":svg:stop^:svg:|",":svg:style^:svg:|!disabled,media,title,type",":svg:switch^:svg:graphics|",":svg:symbol^:svg:|",":svg:tspan^:svg:textPositioning|",":svg:text^:svg:textPositioning|",":svg:textPath^:svg:textContent|",":svg:title^:svg:|",":svg:use^:svg:graphics|",":svg:view^:svg:|#zoomAndPan","data^[HTMLElement]|value","keygen^[HTMLElement]|!autofocus,challenge,!disabled,form,keytype,name","menuitem^[HTMLElement]|type,label,icon,!disabled,!checked,radiogroup,!default","summary^[HTMLElement]|","time^[HTMLElement]|dateTime",":svg:cursor^:svg:|"],Tp=new Map(Object.entries({class:"className",for:"htmlFor",formaction:"formAction",innerHtml:"innerHTML",readonly:"readOnly",tabindex:"tabIndex"})),df=Array.from(Tp).reduce((b,[r,u])=>(b.set(r,u),b),new Map);class Fp extends xb{constructor(){super(),this._schema=new Map,this._eventSchema=new Map,qd.forEach(r=>{const u=new Map,y=new Set,[L,G]=r.split("|"),Te=G.split(","),[Ze,gt]=L.split("^");Ze.split(",").forEach(sn=>{this._schema.set(sn.toLowerCase(),u),this._eventSchema.set(sn.toLowerCase(),y)});const Ot=gt&&this._schema.get(gt.toLowerCase());if(Ot){for(const[sn,ci]of Ot)u.set(sn,ci);for(const sn of this._eventSchema.get(gt.toLowerCase()))y.add(sn)}Te.forEach(sn=>{if(sn.length>0)switch(sn[0]){case"*":y.add(sn.substring(1));break;case"!":u.set(sn.substring(1),"boolean");break;case"#":u.set(sn.substring(1),"number");break;case"%":u.set(sn.substring(1),"object");break;default:u.set(sn,"string")}})})}hasProperty(r,u,y){if(y.some(G=>G.name===B.name))return!0;if(r.indexOf("-")>-1){if(Im(r)||cf(r))return!1;if(y.some(G=>G.name===w.name))return!0}return(this._schema.get(r.toLowerCase())||this._schema.get("unknown")).has(u)}hasElement(r,u){return!!(u.some(y=>y.name===B.name)||r.indexOf("-")>-1&&(Im(r)||cf(r)||u.some(y=>y.name===w.name)))||this._schema.has(r.toLowerCase())}securityContext(r,u,y){y&&(u=this.getMappedPropName(u)),r=r.toLowerCase(),u=u.toLowerCase();let L=M_()[r+"|"+u];return L||(L=M_()["*|"+u],L||V.NONE)}getMappedPropName(r){return Tp.get(r)??r}getDefaultComponentElementName(){return"ng-component"}validateProperty(r){return r.toLowerCase().startsWith("on")?{error:!0,msg:`Binding to event property '${r}' is disallowed for security reasons, please use (${r.slice(2)})=...\nIf '${r}' is a directive input, make sure the directive is imported by the current module.`}:{error:!1}}validateAttribute(r){return r.toLowerCase().startsWith("on")?{error:!0,msg:`Binding to event attribute '${r}' is disallowed for security reasons, please use (${r.slice(2)})=...`}:{error:!1}}allKnownElementNames(){return Array.from(this._schema.keys())}allKnownAttributesOfElement(r){const u=this._schema.get(r.toLowerCase())||this._schema.get("unknown");return Array.from(u.keys()).map(y=>df.get(y)??y)}allKnownEventsOfElement(r){return Array.from(this._eventSchema.get(r.toLowerCase())??[])}normalizeAnimationStyleProperty(r){return function Vo(b){return b.replace(Ma,(...r)=>r[1].toUpperCase())}(r)}normalizeAnimationStyleValue(r,u,y){let L="";const G=y.toString().trim();let Te=null;if(function xy(b){switch(b){case"width":case"height":case"minWidth":case"minHeight":case"maxWidth":case"maxHeight":case"left":case"top":case"bottom":case"right":case"fontSize":case"outlineWidth":case"outlineOffset":case"paddingTop":case"paddingLeft":case"paddingBottom":case"paddingRight":case"marginTop":case"marginLeft":case"marginBottom":case"marginRight":case"borderRadius":case"borderWidth":case"borderTopWidth":case"borderLeftWidth":case"borderRightWidth":case"borderBottomWidth":case"textIndent":return!0;default:return!1}}(r)&&0!==y&&"0"!==y)if("number"==typeof y)L="px";else{const Ze=y.match(/^[+-]?[\d\.]+([a-z]*)$/);Ze&&0==Ze[1].length&&(Te=`Please provide a CSS unit value for ${u}:${y}`)}return{error:Te,value:G+L}}}class Xs{constructor({closedByChildren:r,implicitNamespacePrefix:u,contentType:y=Yd.PARSABLE_DATA,closedByParent:L=!1,isVoid:G=!1,ignoreFirstLf:Te=!1,preventNamespaceInheritance:Ze=!1,canSelfClose:gt=!1}={}){this.closedByChildren={},this.closedByParent=!1,r&&r.length>0&&r.forEach(Ot=>this.closedByChildren[Ot]=!0),this.isVoid=G,this.closedByParent=L||G,this.implicitNamespacePrefix=u||null,this.contentType=y,this.ignoreFirstLf=Te,this.preventNamespaceInheritance=Ze,this.canSelfClose=gt??G}isClosedByChild(r){return this.isVoid||r.toLowerCase()in this.closedByChildren}getContentType(r){return"object"==typeof this.contentType?(void 0===r?void 0:this.contentType[r])??this.contentType.default:this.contentType}}let nd,Df;function Db(b){return Df||(nd=new Xs({canSelfClose:!0}),Df={base:new Xs({isVoid:!0}),meta:new Xs({isVoid:!0}),area:new Xs({isVoid:!0}),embed:new Xs({isVoid:!0}),link:new Xs({isVoid:!0}),img:new Xs({isVoid:!0}),input:new Xs({isVoid:!0}),param:new Xs({isVoid:!0}),hr:new Xs({isVoid:!0}),br:new Xs({isVoid:!0}),source:new Xs({isVoid:!0}),track:new Xs({isVoid:!0}),wbr:new Xs({isVoid:!0}),p:new Xs({closedByChildren:["address","article","aside","blockquote","div","dl","fieldset","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","hr","main","nav","ol","p","pre","section","table","ul"],closedByParent:!0}),thead:new Xs({closedByChildren:["tbody","tfoot"]}),tbody:new Xs({closedByChildren:["tbody","tfoot"],closedByParent:!0}),tfoot:new Xs({closedByChildren:["tbody"],closedByParent:!0}),tr:new Xs({closedByChildren:["tr"],closedByParent:!0}),td:new Xs({closedByChildren:["td","th"],closedByParent:!0}),th:new Xs({closedByChildren:["td","th"],closedByParent:!0}),col:new Xs({isVoid:!0}),svg:new Xs({implicitNamespacePrefix:"svg"}),foreignObject:new Xs({implicitNamespacePrefix:"svg",preventNamespaceInheritance:!0}),math:new Xs({implicitNamespacePrefix:"math"}),li:new Xs({closedByChildren:["li"],closedByParent:!0}),dt:new Xs({closedByChildren:["dt","dd"]}),dd:new Xs({closedByChildren:["dt","dd"],closedByParent:!0}),rb:new Xs({closedByChildren:["rb","rt","rtc","rp"],closedByParent:!0}),rt:new Xs({closedByChildren:["rb","rt","rtc","rp"],closedByParent:!0}),rtc:new Xs({closedByChildren:["rb","rtc","rp"],closedByParent:!0}),rp:new Xs({closedByChildren:["rb","rt","rtc","rp"],closedByParent:!0}),optgroup:new Xs({closedByChildren:["optgroup"],closedByParent:!0}),option:new Xs({closedByChildren:["option","optgroup"],closedByParent:!0}),pre:new Xs({ignoreFirstLf:!0}),listing:new Xs({ignoreFirstLf:!0}),style:new Xs({contentType:Yd.RAW_TEXT}),script:new Xs({contentType:Yd.RAW_TEXT}),title:new Xs({contentType:{default:Yd.ESCAPABLE_RAW_TEXT,svg:Yd.PARSABLE_DATA}}),textarea:new Xs({contentType:Yd.ESCAPABLE_RAW_TEXT,ignoreFirstLf:!0})},(new Fp).allKnownElementNames().forEach(r=>{!Df.hasOwnProperty(r)&&null===Fc(r)&&(Df[r]=new Xs({canSelfClose:!1}))})),Df[b]??Df[b.toLowerCase()]??nd}const Sf={AElig:"\xc6",AMP:"&",amp:"&",Aacute:"\xc1",Abreve:"\u0102",Acirc:"\xc2",Acy:"\u0410",Afr:"\u{1d504}",Agrave:"\xc0",Alpha:"\u0391",Amacr:"\u0100",And:"\u2a53",Aogon:"\u0104",Aopf:"\u{1d538}",ApplyFunction:"\u2061",af:"\u2061",Aring:"\xc5",angst:"\xc5",Ascr:"\u{1d49c}",Assign:"\u2254",colone:"\u2254",coloneq:"\u2254",Atilde:"\xc3",Auml:"\xc4",Backslash:"\u2216",setminus:"\u2216",setmn:"\u2216",smallsetminus:"\u2216",ssetmn:"\u2216",Barv:"\u2ae7",Barwed:"\u2306",doublebarwedge:"\u2306",Bcy:"\u0411",Because:"\u2235",becaus:"\u2235",because:"\u2235",Bernoullis:"\u212c",Bscr:"\u212c",bernou:"\u212c",Beta:"\u0392",Bfr:"\u{1d505}",Bopf:"\u{1d539}",Breve:"\u02d8",breve:"\u02d8",Bumpeq:"\u224e",HumpDownHump:"\u224e",bump:"\u224e",CHcy:"\u0427",COPY:"\xa9",copy:"\xa9",Cacute:"\u0106",Cap:"\u22d2",CapitalDifferentialD:"\u2145",DD:"\u2145",Cayleys:"\u212d",Cfr:"\u212d",Ccaron:"\u010c",Ccedil:"\xc7",Ccirc:"\u0108",Cconint:"\u2230",Cdot:"\u010a",Cedilla:"\xb8",cedil:"\xb8",CenterDot:"\xb7",centerdot:"\xb7",middot:"\xb7",Chi:"\u03a7",CircleDot:"\u2299",odot:"\u2299",CircleMinus:"\u2296",ominus:"\u2296",CirclePlus:"\u2295",oplus:"\u2295",CircleTimes:"\u2297",otimes:"\u2297",ClockwiseContourIntegral:"\u2232",cwconint:"\u2232",CloseCurlyDoubleQuote:"\u201d",rdquo:"\u201d",rdquor:"\u201d",CloseCurlyQuote:"\u2019",rsquo:"\u2019",rsquor:"\u2019",Colon:"\u2237",Proportion:"\u2237",Colone:"\u2a74",Congruent:"\u2261",equiv:"\u2261",Conint:"\u222f",DoubleContourIntegral:"\u222f",ContourIntegral:"\u222e",conint:"\u222e",oint:"\u222e",Copf:"\u2102",complexes:"\u2102",Coproduct:"\u2210",coprod:"\u2210",CounterClockwiseContourIntegral:"\u2233",awconint:"\u2233",Cross:"\u2a2f",Cscr:"\u{1d49e}",Cup:"\u22d3",CupCap:"\u224d",asympeq:"\u224d",DDotrahd:"\u2911",DJcy:"\u0402",DScy:"\u0405",DZcy:"\u040f",Dagger:"\u2021",ddagger:"\u2021",Darr:"\u21a1",Dashv:"\u2ae4",DoubleLeftTee:"\u2ae4",Dcaron:"\u010e",Dcy:"\u0414",Del:"\u2207",nabla:"\u2207",Delta:"\u0394",Dfr:"\u{1d507}",DiacriticalAcute:"\xb4",acute:"\xb4",DiacriticalDot:"\u02d9",dot:"\u02d9",DiacriticalDoubleAcute:"\u02dd",dblac:"\u02dd",DiacriticalGrave:"`",grave:"`",DiacriticalTilde:"\u02dc",tilde:"\u02dc",Diamond:"\u22c4",diam:"\u22c4",diamond:"\u22c4",DifferentialD:"\u2146",dd:"\u2146",Dopf:"\u{1d53b}",Dot:"\xa8",DoubleDot:"\xa8",die:"\xa8",uml:"\xa8",DotDot:"\u20dc",DotEqual:"\u2250",doteq:"\u2250",esdot:"\u2250",DoubleDownArrow:"\u21d3",Downarrow:"\u21d3",dArr:"\u21d3",DoubleLeftArrow:"\u21d0",Leftarrow:"\u21d0",lArr:"\u21d0",DoubleLeftRightArrow:"\u21d4",Leftrightarrow:"\u21d4",hArr:"\u21d4",iff:"\u21d4",DoubleLongLeftArrow:"\u27f8",Longleftarrow:"\u27f8",xlArr:"\u27f8",DoubleLongLeftRightArrow:"\u27fa",Longleftrightarrow:"\u27fa",xhArr:"\u27fa",DoubleLongRightArrow:"\u27f9",Longrightarrow:"\u27f9",xrArr:"\u27f9",DoubleRightArrow:"\u21d2",Implies:"\u21d2",Rightarrow:"\u21d2",rArr:"\u21d2",DoubleRightTee:"\u22a8",vDash:"\u22a8",DoubleUpArrow:"\u21d1",Uparrow:"\u21d1",uArr:"\u21d1",DoubleUpDownArrow:"\u21d5",Updownarrow:"\u21d5",vArr:"\u21d5",DoubleVerticalBar:"\u2225",par:"\u2225",parallel:"\u2225",shortparallel:"\u2225",spar:"\u2225",DownArrow:"\u2193",ShortDownArrow:"\u2193",darr:"\u2193",downarrow:"\u2193",DownArrowBar:"\u2913",DownArrowUpArrow:"\u21f5",duarr:"\u21f5",DownBreve:"\u0311",DownLeftRightVector:"\u2950",DownLeftTeeVector:"\u295e",DownLeftVector:"\u21bd",leftharpoondown:"\u21bd",lhard:"\u21bd",DownLeftVectorBar:"\u2956",DownRightTeeVector:"\u295f",DownRightVector:"\u21c1",rhard:"\u21c1",rightharpoondown:"\u21c1",DownRightVectorBar:"\u2957",DownTee:"\u22a4",top:"\u22a4",DownTeeArrow:"\u21a7",mapstodown:"\u21a7",Dscr:"\u{1d49f}",Dstrok:"\u0110",ENG:"\u014a",ETH:"\xd0",Eacute:"\xc9",Ecaron:"\u011a",Ecirc:"\xca",Ecy:"\u042d",Edot:"\u0116",Efr:"\u{1d508}",Egrave:"\xc8",Element:"\u2208",in:"\u2208",isin:"\u2208",isinv:"\u2208",Emacr:"\u0112",EmptySmallSquare:"\u25fb",EmptyVerySmallSquare:"\u25ab",Eogon:"\u0118",Eopf:"\u{1d53c}",Epsilon:"\u0395",Equal:"\u2a75",EqualTilde:"\u2242",eqsim:"\u2242",esim:"\u2242",Equilibrium:"\u21cc",rightleftharpoons:"\u21cc",rlhar:"\u21cc",Escr:"\u2130",expectation:"\u2130",Esim:"\u2a73",Eta:"\u0397",Euml:"\xcb",Exists:"\u2203",exist:"\u2203",ExponentialE:"\u2147",ee:"\u2147",exponentiale:"\u2147",Fcy:"\u0424",Ffr:"\u{1d509}",FilledSmallSquare:"\u25fc",FilledVerySmallSquare:"\u25aa",blacksquare:"\u25aa",squarf:"\u25aa",squf:"\u25aa",Fopf:"\u{1d53d}",ForAll:"\u2200",forall:"\u2200",Fouriertrf:"\u2131",Fscr:"\u2131",GJcy:"\u0403",GT:">",gt:">",Gamma:"\u0393",Gammad:"\u03dc",Gbreve:"\u011e",Gcedil:"\u0122",Gcirc:"\u011c",Gcy:"\u0413",Gdot:"\u0120",Gfr:"\u{1d50a}",Gg:"\u22d9",ggg:"\u22d9",Gopf:"\u{1d53e}",GreaterEqual:"\u2265",ge:"\u2265",geq:"\u2265",GreaterEqualLess:"\u22db",gel:"\u22db",gtreqless:"\u22db",GreaterFullEqual:"\u2267",gE:"\u2267",geqq:"\u2267",GreaterGreater:"\u2aa2",GreaterLess:"\u2277",gl:"\u2277",gtrless:"\u2277",GreaterSlantEqual:"\u2a7e",geqslant:"\u2a7e",ges:"\u2a7e",GreaterTilde:"\u2273",gsim:"\u2273",gtrsim:"\u2273",Gscr:"\u{1d4a2}",Gt:"\u226b",NestedGreaterGreater:"\u226b",gg:"\u226b",HARDcy:"\u042a",Hacek:"\u02c7",caron:"\u02c7",Hat:"^",Hcirc:"\u0124",Hfr:"\u210c",Poincareplane:"\u210c",HilbertSpace:"\u210b",Hscr:"\u210b",hamilt:"\u210b",Hopf:"\u210d",quaternions:"\u210d",HorizontalLine:"\u2500",boxh:"\u2500",Hstrok:"\u0126",HumpEqual:"\u224f",bumpe:"\u224f",bumpeq:"\u224f",IEcy:"\u0415",IJlig:"\u0132",IOcy:"\u0401",Iacute:"\xcd",Icirc:"\xce",Icy:"\u0418",Idot:"\u0130",Ifr:"\u2111",Im:"\u2111",image:"\u2111",imagpart:"\u2111",Igrave:"\xcc",Imacr:"\u012a",ImaginaryI:"\u2148",ii:"\u2148",Int:"\u222c",Integral:"\u222b",int:"\u222b",Intersection:"\u22c2",bigcap:"\u22c2",xcap:"\u22c2",InvisibleComma:"\u2063",ic:"\u2063",InvisibleTimes:"\u2062",it:"\u2062",Iogon:"\u012e",Iopf:"\u{1d540}",Iota:"\u0399",Iscr:"\u2110",imagline:"\u2110",Itilde:"\u0128",Iukcy:"\u0406",Iuml:"\xcf",Jcirc:"\u0134",Jcy:"\u0419",Jfr:"\u{1d50d}",Jopf:"\u{1d541}",Jscr:"\u{1d4a5}",Jsercy:"\u0408",Jukcy:"\u0404",KHcy:"\u0425",KJcy:"\u040c",Kappa:"\u039a",Kcedil:"\u0136",Kcy:"\u041a",Kfr:"\u{1d50e}",Kopf:"\u{1d542}",Kscr:"\u{1d4a6}",LJcy:"\u0409",LT:"<",lt:"<",Lacute:"\u0139",Lambda:"\u039b",Lang:"\u27ea",Laplacetrf:"\u2112",Lscr:"\u2112",lagran:"\u2112",Larr:"\u219e",twoheadleftarrow:"\u219e",Lcaron:"\u013d",Lcedil:"\u013b",Lcy:"\u041b",LeftAngleBracket:"\u27e8",lang:"\u27e8",langle:"\u27e8",LeftArrow:"\u2190",ShortLeftArrow:"\u2190",larr:"\u2190",leftarrow:"\u2190",slarr:"\u2190",LeftArrowBar:"\u21e4",larrb:"\u21e4",LeftArrowRightArrow:"\u21c6",leftrightarrows:"\u21c6",lrarr:"\u21c6",LeftCeiling:"\u2308",lceil:"\u2308",LeftDoubleBracket:"\u27e6",lobrk:"\u27e6",LeftDownTeeVector:"\u2961",LeftDownVector:"\u21c3",dharl:"\u21c3",downharpoonleft:"\u21c3",LeftDownVectorBar:"\u2959",LeftFloor:"\u230a",lfloor:"\u230a",LeftRightArrow:"\u2194",harr:"\u2194",leftrightarrow:"\u2194",LeftRightVector:"\u294e",LeftTee:"\u22a3",dashv:"\u22a3",LeftTeeArrow:"\u21a4",mapstoleft:"\u21a4",LeftTeeVector:"\u295a",LeftTriangle:"\u22b2",vartriangleleft:"\u22b2",vltri:"\u22b2",LeftTriangleBar:"\u29cf",LeftTriangleEqual:"\u22b4",ltrie:"\u22b4",trianglelefteq:"\u22b4",LeftUpDownVector:"\u2951",LeftUpTeeVector:"\u2960",LeftUpVector:"\u21bf",uharl:"\u21bf",upharpoonleft:"\u21bf",LeftUpVectorBar:"\u2958",LeftVector:"\u21bc",leftharpoonup:"\u21bc",lharu:"\u21bc",LeftVectorBar:"\u2952",LessEqualGreater:"\u22da",leg:"\u22da",lesseqgtr:"\u22da",LessFullEqual:"\u2266",lE:"\u2266",leqq:"\u2266",LessGreater:"\u2276",lessgtr:"\u2276",lg:"\u2276",LessLess:"\u2aa1",LessSlantEqual:"\u2a7d",leqslant:"\u2a7d",les:"\u2a7d",LessTilde:"\u2272",lesssim:"\u2272",lsim:"\u2272",Lfr:"\u{1d50f}",Ll:"\u22d8",Lleftarrow:"\u21da",lAarr:"\u21da",Lmidot:"\u013f",LongLeftArrow:"\u27f5",longleftarrow:"\u27f5",xlarr:"\u27f5",LongLeftRightArrow:"\u27f7",longleftrightarrow:"\u27f7",xharr:"\u27f7",LongRightArrow:"\u27f6",longrightarrow:"\u27f6",xrarr:"\u27f6",Lopf:"\u{1d543}",LowerLeftArrow:"\u2199",swarr:"\u2199",swarrow:"\u2199",LowerRightArrow:"\u2198",searr:"\u2198",searrow:"\u2198",Lsh:"\u21b0",lsh:"\u21b0",Lstrok:"\u0141",Lt:"\u226a",NestedLessLess:"\u226a",ll:"\u226a",Map:"\u2905",Mcy:"\u041c",MediumSpace:"\u205f",Mellintrf:"\u2133",Mscr:"\u2133",phmmat:"\u2133",Mfr:"\u{1d510}",MinusPlus:"\u2213",mnplus:"\u2213",mp:"\u2213",Mopf:"\u{1d544}",Mu:"\u039c",NJcy:"\u040a",Nacute:"\u0143",Ncaron:"\u0147",Ncedil:"\u0145",Ncy:"\u041d",NegativeMediumSpace:"\u200b",NegativeThickSpace:"\u200b",NegativeThinSpace:"\u200b",NegativeVeryThinSpace:"\u200b",ZeroWidthSpace:"\u200b",NewLine:"\n",Nfr:"\u{1d511}",NoBreak:"\u2060",NonBreakingSpace:"\xa0",nbsp:"\xa0",Nopf:"\u2115",naturals:"\u2115",Not:"\u2aec",NotCongruent:"\u2262",nequiv:"\u2262",NotCupCap:"\u226d",NotDoubleVerticalBar:"\u2226",npar:"\u2226",nparallel:"\u2226",nshortparallel:"\u2226",nspar:"\u2226",NotElement:"\u2209",notin:"\u2209",notinva:"\u2209",NotEqual:"\u2260",ne:"\u2260",NotEqualTilde:"\u2242\u0338",nesim:"\u2242\u0338",NotExists:"\u2204",nexist:"\u2204",nexists:"\u2204",NotGreater:"\u226f",ngt:"\u226f",ngtr:"\u226f",NotGreaterEqual:"\u2271",nge:"\u2271",ngeq:"\u2271",NotGreaterFullEqual:"\u2267\u0338",ngE:"\u2267\u0338",ngeqq:"\u2267\u0338",NotGreaterGreater:"\u226b\u0338",nGtv:"\u226b\u0338",NotGreaterLess:"\u2279",ntgl:"\u2279",NotGreaterSlantEqual:"\u2a7e\u0338",ngeqslant:"\u2a7e\u0338",nges:"\u2a7e\u0338",NotGreaterTilde:"\u2275",ngsim:"\u2275",NotHumpDownHump:"\u224e\u0338",nbump:"\u224e\u0338",NotHumpEqual:"\u224f\u0338",nbumpe:"\u224f\u0338",NotLeftTriangle:"\u22ea",nltri:"\u22ea",ntriangleleft:"\u22ea",NotLeftTriangleBar:"\u29cf\u0338",NotLeftTriangleEqual:"\u22ec",nltrie:"\u22ec",ntrianglelefteq:"\u22ec",NotLess:"\u226e",nless:"\u226e",nlt:"\u226e",NotLessEqual:"\u2270",nle:"\u2270",nleq:"\u2270",NotLessGreater:"\u2278",ntlg:"\u2278",NotLessLess:"\u226a\u0338",nLtv:"\u226a\u0338",NotLessSlantEqual:"\u2a7d\u0338",nleqslant:"\u2a7d\u0338",nles:"\u2a7d\u0338",NotLessTilde:"\u2274",nlsim:"\u2274",NotNestedGreaterGreater:"\u2aa2\u0338",NotNestedLessLess:"\u2aa1\u0338",NotPrecedes:"\u2280",npr:"\u2280",nprec:"\u2280",NotPrecedesEqual:"\u2aaf\u0338",npre:"\u2aaf\u0338",npreceq:"\u2aaf\u0338",NotPrecedesSlantEqual:"\u22e0",nprcue:"\u22e0",NotReverseElement:"\u220c",notni:"\u220c",notniva:"\u220c",NotRightTriangle:"\u22eb",nrtri:"\u22eb",ntriangleright:"\u22eb",NotRightTriangleBar:"\u29d0\u0338",NotRightTriangleEqual:"\u22ed",nrtrie:"\u22ed",ntrianglerighteq:"\u22ed",NotSquareSubset:"\u228f\u0338",NotSquareSubsetEqual:"\u22e2",nsqsube:"\u22e2",NotSquareSuperset:"\u2290\u0338",NotSquareSupersetEqual:"\u22e3",nsqsupe:"\u22e3",NotSubset:"\u2282\u20d2",nsubset:"\u2282\u20d2",vnsub:"\u2282\u20d2",NotSubsetEqual:"\u2288",nsube:"\u2288",nsubseteq:"\u2288",NotSucceeds:"\u2281",nsc:"\u2281",nsucc:"\u2281",NotSucceedsEqual:"\u2ab0\u0338",nsce:"\u2ab0\u0338",nsucceq:"\u2ab0\u0338",NotSucceedsSlantEqual:"\u22e1",nsccue:"\u22e1",NotSucceedsTilde:"\u227f\u0338",NotSuperset:"\u2283\u20d2",nsupset:"\u2283\u20d2",vnsup:"\u2283\u20d2",NotSupersetEqual:"\u2289",nsupe:"\u2289",nsupseteq:"\u2289",NotTilde:"\u2241",nsim:"\u2241",NotTildeEqual:"\u2244",nsime:"\u2244",nsimeq:"\u2244",NotTildeFullEqual:"\u2247",ncong:"\u2247",NotTildeTilde:"\u2249",nap:"\u2249",napprox:"\u2249",NotVerticalBar:"\u2224",nmid:"\u2224",nshortmid:"\u2224",nsmid:"\u2224",Nscr:"\u{1d4a9}",Ntilde:"\xd1",Nu:"\u039d",OElig:"\u0152",Oacute:"\xd3",Ocirc:"\xd4",Ocy:"\u041e",Odblac:"\u0150",Ofr:"\u{1d512}",Ograve:"\xd2",Omacr:"\u014c",Omega:"\u03a9",ohm:"\u03a9",Omicron:"\u039f",Oopf:"\u{1d546}",OpenCurlyDoubleQuote:"\u201c",ldquo:"\u201c",OpenCurlyQuote:"\u2018",lsquo:"\u2018",Or:"\u2a54",Oscr:"\u{1d4aa}",Oslash:"\xd8",Otilde:"\xd5",Otimes:"\u2a37",Ouml:"\xd6",OverBar:"\u203e",oline:"\u203e",OverBrace:"\u23de",OverBracket:"\u23b4",tbrk:"\u23b4",OverParenthesis:"\u23dc",PartialD:"\u2202",part:"\u2202",Pcy:"\u041f",Pfr:"\u{1d513}",Phi:"\u03a6",Pi:"\u03a0",PlusMinus:"\xb1",plusmn:"\xb1",pm:"\xb1",Popf:"\u2119",primes:"\u2119",Pr:"\u2abb",Precedes:"\u227a",pr:"\u227a",prec:"\u227a",PrecedesEqual:"\u2aaf",pre:"\u2aaf",preceq:"\u2aaf",PrecedesSlantEqual:"\u227c",prcue:"\u227c",preccurlyeq:"\u227c",PrecedesTilde:"\u227e",precsim:"\u227e",prsim:"\u227e",Prime:"\u2033",Product:"\u220f",prod:"\u220f",Proportional:"\u221d",prop:"\u221d",propto:"\u221d",varpropto:"\u221d",vprop:"\u221d",Pscr:"\u{1d4ab}",Psi:"\u03a8",QUOT:'"',quot:'"',Qfr:"\u{1d514}",Qopf:"\u211a",rationals:"\u211a",Qscr:"\u{1d4ac}",RBarr:"\u2910",drbkarow:"\u2910",REG:"\xae",circledR:"\xae",reg:"\xae",Racute:"\u0154",Rang:"\u27eb",Rarr:"\u21a0",twoheadrightarrow:"\u21a0",Rarrtl:"\u2916",Rcaron:"\u0158",Rcedil:"\u0156",Rcy:"\u0420",Re:"\u211c",Rfr:"\u211c",real:"\u211c",realpart:"\u211c",ReverseElement:"\u220b",SuchThat:"\u220b",ni:"\u220b",niv:"\u220b",ReverseEquilibrium:"\u21cb",leftrightharpoons:"\u21cb",lrhar:"\u21cb",ReverseUpEquilibrium:"\u296f",duhar:"\u296f",Rho:"\u03a1",RightAngleBracket:"\u27e9",rang:"\u27e9",rangle:"\u27e9",RightArrow:"\u2192",ShortRightArrow:"\u2192",rarr:"\u2192",rightarrow:"\u2192",srarr:"\u2192",RightArrowBar:"\u21e5",rarrb:"\u21e5",RightArrowLeftArrow:"\u21c4",rightleftarrows:"\u21c4",rlarr:"\u21c4",RightCeiling:"\u2309",rceil:"\u2309",RightDoubleBracket:"\u27e7",robrk:"\u27e7",RightDownTeeVector:"\u295d",RightDownVector:"\u21c2",dharr:"\u21c2",downharpoonright:"\u21c2",RightDownVectorBar:"\u2955",RightFloor:"\u230b",rfloor:"\u230b",RightTee:"\u22a2",vdash:"\u22a2",RightTeeArrow:"\u21a6",map:"\u21a6",mapsto:"\u21a6",RightTeeVector:"\u295b",RightTriangle:"\u22b3",vartriangleright:"\u22b3",vrtri:"\u22b3",RightTriangleBar:"\u29d0",RightTriangleEqual:"\u22b5",rtrie:"\u22b5",trianglerighteq:"\u22b5",RightUpDownVector:"\u294f",RightUpTeeVector:"\u295c",RightUpVector:"\u21be",uharr:"\u21be",upharpoonright:"\u21be",RightUpVectorBar:"\u2954",RightVector:"\u21c0",rharu:"\u21c0",rightharpoonup:"\u21c0",RightVectorBar:"\u2953",Ropf:"\u211d",reals:"\u211d",RoundImplies:"\u2970",Rrightarrow:"\u21db",rAarr:"\u21db",Rscr:"\u211b",realine:"\u211b",Rsh:"\u21b1",rsh:"\u21b1",RuleDelayed:"\u29f4",SHCHcy:"\u0429",SHcy:"\u0428",SOFTcy:"\u042c",Sacute:"\u015a",Sc:"\u2abc",Scaron:"\u0160",Scedil:"\u015e",Scirc:"\u015c",Scy:"\u0421",Sfr:"\u{1d516}",ShortUpArrow:"\u2191",UpArrow:"\u2191",uarr:"\u2191",uparrow:"\u2191",Sigma:"\u03a3",SmallCircle:"\u2218",compfn:"\u2218",Sopf:"\u{1d54a}",Sqrt:"\u221a",radic:"\u221a",Square:"\u25a1",squ:"\u25a1",square:"\u25a1",SquareIntersection:"\u2293",sqcap:"\u2293",SquareSubset:"\u228f",sqsub:"\u228f",sqsubset:"\u228f",SquareSubsetEqual:"\u2291",sqsube:"\u2291",sqsubseteq:"\u2291",SquareSuperset:"\u2290",sqsup:"\u2290",sqsupset:"\u2290",SquareSupersetEqual:"\u2292",sqsupe:"\u2292",sqsupseteq:"\u2292",SquareUnion:"\u2294",sqcup:"\u2294",Sscr:"\u{1d4ae}",Star:"\u22c6",sstarf:"\u22c6",Sub:"\u22d0",Subset:"\u22d0",SubsetEqual:"\u2286",sube:"\u2286",subseteq:"\u2286",Succeeds:"\u227b",sc:"\u227b",succ:"\u227b",SucceedsEqual:"\u2ab0",sce:"\u2ab0",succeq:"\u2ab0",SucceedsSlantEqual:"\u227d",sccue:"\u227d",succcurlyeq:"\u227d",SucceedsTilde:"\u227f",scsim:"\u227f",succsim:"\u227f",Sum:"\u2211",sum:"\u2211",Sup:"\u22d1",Supset:"\u22d1",Superset:"\u2283",sup:"\u2283",supset:"\u2283",SupersetEqual:"\u2287",supe:"\u2287",supseteq:"\u2287",THORN:"\xde",TRADE:"\u2122",trade:"\u2122",TSHcy:"\u040b",TScy:"\u0426",Tab:"\t",Tau:"\u03a4",Tcaron:"\u0164",Tcedil:"\u0162",Tcy:"\u0422",Tfr:"\u{1d517}",Therefore:"\u2234",there4:"\u2234",therefore:"\u2234",Theta:"\u0398",ThickSpace:"\u205f\u200a",ThinSpace:"\u2009",thinsp:"\u2009",Tilde:"\u223c",sim:"\u223c",thicksim:"\u223c",thksim:"\u223c",TildeEqual:"\u2243",sime:"\u2243",simeq:"\u2243",TildeFullEqual:"\u2245",cong:"\u2245",TildeTilde:"\u2248",ap:"\u2248",approx:"\u2248",asymp:"\u2248",thickapprox:"\u2248",thkap:"\u2248",Topf:"\u{1d54b}",TripleDot:"\u20db",tdot:"\u20db",Tscr:"\u{1d4af}",Tstrok:"\u0166",Uacute:"\xda",Uarr:"\u219f",Uarrocir:"\u2949",Ubrcy:"\u040e",Ubreve:"\u016c",Ucirc:"\xdb",Ucy:"\u0423",Udblac:"\u0170",Ufr:"\u{1d518}",Ugrave:"\xd9",Umacr:"\u016a",UnderBar:"_",lowbar:"_",UnderBrace:"\u23df",UnderBracket:"\u23b5",bbrk:"\u23b5",UnderParenthesis:"\u23dd",Union:"\u22c3",bigcup:"\u22c3",xcup:"\u22c3",UnionPlus:"\u228e",uplus:"\u228e",Uogon:"\u0172",Uopf:"\u{1d54c}",UpArrowBar:"\u2912",UpArrowDownArrow:"\u21c5",udarr:"\u21c5",UpDownArrow:"\u2195",updownarrow:"\u2195",varr:"\u2195",UpEquilibrium:"\u296e",udhar:"\u296e",UpTee:"\u22a5",bot:"\u22a5",bottom:"\u22a5",perp:"\u22a5",UpTeeArrow:"\u21a5",mapstoup:"\u21a5",UpperLeftArrow:"\u2196",nwarr:"\u2196",nwarrow:"\u2196",UpperRightArrow:"\u2197",nearr:"\u2197",nearrow:"\u2197",Upsi:"\u03d2",upsih:"\u03d2",Upsilon:"\u03a5",Uring:"\u016e",Uscr:"\u{1d4b0}",Utilde:"\u0168",Uuml:"\xdc",VDash:"\u22ab",Vbar:"\u2aeb",Vcy:"\u0412",Vdash:"\u22a9",Vdashl:"\u2ae6",Vee:"\u22c1",bigvee:"\u22c1",xvee:"\u22c1",Verbar:"\u2016",Vert:"\u2016",VerticalBar:"\u2223",mid:"\u2223",shortmid:"\u2223",smid:"\u2223",VerticalLine:"|",verbar:"|",vert:"|",VerticalSeparator:"\u2758",VerticalTilde:"\u2240",wr:"\u2240",wreath:"\u2240",VeryThinSpace:"\u200a",hairsp:"\u200a",Vfr:"\u{1d519}",Vopf:"\u{1d54d}",Vscr:"\u{1d4b1}",Vvdash:"\u22aa",Wcirc:"\u0174",Wedge:"\u22c0",bigwedge:"\u22c0",xwedge:"\u22c0",Wfr:"\u{1d51a}",Wopf:"\u{1d54e}",Wscr:"\u{1d4b2}",Xfr:"\u{1d51b}",Xi:"\u039e",Xopf:"\u{1d54f}",Xscr:"\u{1d4b3}",YAcy:"\u042f",YIcy:"\u0407",YUcy:"\u042e",Yacute:"\xdd",Ycirc:"\u0176",Ycy:"\u042b",Yfr:"\u{1d51c}",Yopf:"\u{1d550}",Yscr:"\u{1d4b4}",Yuml:"\u0178",ZHcy:"\u0416",Zacute:"\u0179",Zcaron:"\u017d",Zcy:"\u0417",Zdot:"\u017b",Zeta:"\u0396",Zfr:"\u2128",zeetrf:"\u2128",Zopf:"\u2124",integers:"\u2124",Zscr:"\u{1d4b5}",aacute:"\xe1",abreve:"\u0103",ac:"\u223e",mstpos:"\u223e",acE:"\u223e\u0333",acd:"\u223f",acirc:"\xe2",acy:"\u0430",aelig:"\xe6",afr:"\u{1d51e}",agrave:"\xe0",alefsym:"\u2135",aleph:"\u2135",alpha:"\u03b1",amacr:"\u0101",amalg:"\u2a3f",and:"\u2227",wedge:"\u2227",andand:"\u2a55",andd:"\u2a5c",andslope:"\u2a58",andv:"\u2a5a",ang:"\u2220",angle:"\u2220",ange:"\u29a4",angmsd:"\u2221",measuredangle:"\u2221",angmsdaa:"\u29a8",angmsdab:"\u29a9",angmsdac:"\u29aa",angmsdad:"\u29ab",angmsdae:"\u29ac",angmsdaf:"\u29ad",angmsdag:"\u29ae",angmsdah:"\u29af",angrt:"\u221f",angrtvb:"\u22be",angrtvbd:"\u299d",angsph:"\u2222",angzarr:"\u237c",aogon:"\u0105",aopf:"\u{1d552}",apE:"\u2a70",apacir:"\u2a6f",ape:"\u224a",approxeq:"\u224a",apid:"\u224b",apos:"'",aring:"\xe5",ascr:"\u{1d4b6}",ast:"*",midast:"*",atilde:"\xe3",auml:"\xe4",awint:"\u2a11",bNot:"\u2aed",backcong:"\u224c",bcong:"\u224c",backepsilon:"\u03f6",bepsi:"\u03f6",backprime:"\u2035",bprime:"\u2035",backsim:"\u223d",bsim:"\u223d",backsimeq:"\u22cd",bsime:"\u22cd",barvee:"\u22bd",barwed:"\u2305",barwedge:"\u2305",bbrktbrk:"\u23b6",bcy:"\u0431",bdquo:"\u201e",ldquor:"\u201e",bemptyv:"\u29b0",beta:"\u03b2",beth:"\u2136",between:"\u226c",twixt:"\u226c",bfr:"\u{1d51f}",bigcirc:"\u25ef",xcirc:"\u25ef",bigodot:"\u2a00",xodot:"\u2a00",bigoplus:"\u2a01",xoplus:"\u2a01",bigotimes:"\u2a02",xotime:"\u2a02",bigsqcup:"\u2a06",xsqcup:"\u2a06",bigstar:"\u2605",starf:"\u2605",bigtriangledown:"\u25bd",xdtri:"\u25bd",bigtriangleup:"\u25b3",xutri:"\u25b3",biguplus:"\u2a04",xuplus:"\u2a04",bkarow:"\u290d",rbarr:"\u290d",blacklozenge:"\u29eb",lozf:"\u29eb",blacktriangle:"\u25b4",utrif:"\u25b4",blacktriangledown:"\u25be",dtrif:"\u25be",blacktriangleleft:"\u25c2",ltrif:"\u25c2",blacktriangleright:"\u25b8",rtrif:"\u25b8",blank:"\u2423",blk12:"\u2592",blk14:"\u2591",blk34:"\u2593",block:"\u2588",bne:"=\u20e5",bnequiv:"\u2261\u20e5",bnot:"\u2310",bopf:"\u{1d553}",bowtie:"\u22c8",boxDL:"\u2557",boxDR:"\u2554",boxDl:"\u2556",boxDr:"\u2553",boxH:"\u2550",boxHD:"\u2566",boxHU:"\u2569",boxHd:"\u2564",boxHu:"\u2567",boxUL:"\u255d",boxUR:"\u255a",boxUl:"\u255c",boxUr:"\u2559",boxV:"\u2551",boxVH:"\u256c",boxVL:"\u2563",boxVR:"\u2560",boxVh:"\u256b",boxVl:"\u2562",boxVr:"\u255f",boxbox:"\u29c9",boxdL:"\u2555",boxdR:"\u2552",boxdl:"\u2510",boxdr:"\u250c",boxhD:"\u2565",boxhU:"\u2568",boxhd:"\u252c",boxhu:"\u2534",boxminus:"\u229f",minusb:"\u229f",boxplus:"\u229e",plusb:"\u229e",boxtimes:"\u22a0",timesb:"\u22a0",boxuL:"\u255b",boxuR:"\u2558",boxul:"\u2518",boxur:"\u2514",boxv:"\u2502",boxvH:"\u256a",boxvL:"\u2561",boxvR:"\u255e",boxvh:"\u253c",boxvl:"\u2524",boxvr:"\u251c",brvbar:"\xa6",bscr:"\u{1d4b7}",bsemi:"\u204f",bsol:"\\",bsolb:"\u29c5",bsolhsub:"\u27c8",bull:"\u2022",bullet:"\u2022",bumpE:"\u2aae",cacute:"\u0107",cap:"\u2229",capand:"\u2a44",capbrcup:"\u2a49",capcap:"\u2a4b",capcup:"\u2a47",capdot:"\u2a40",caps:"\u2229\ufe00",caret:"\u2041",ccaps:"\u2a4d",ccaron:"\u010d",ccedil:"\xe7",ccirc:"\u0109",ccups:"\u2a4c",ccupssm:"\u2a50",cdot:"\u010b",cemptyv:"\u29b2",cent:"\xa2",cfr:"\u{1d520}",chcy:"\u0447",check:"\u2713",checkmark:"\u2713",chi:"\u03c7",cir:"\u25cb",cirE:"\u29c3",circ:"\u02c6",circeq:"\u2257",cire:"\u2257",circlearrowleft:"\u21ba",olarr:"\u21ba",circlearrowright:"\u21bb",orarr:"\u21bb",circledS:"\u24c8",oS:"\u24c8",circledast:"\u229b",oast:"\u229b",circledcirc:"\u229a",ocir:"\u229a",circleddash:"\u229d",odash:"\u229d",cirfnint:"\u2a10",cirmid:"\u2aef",cirscir:"\u29c2",clubs:"\u2663",clubsuit:"\u2663",colon:":",comma:",",commat:"@",comp:"\u2201",complement:"\u2201",congdot:"\u2a6d",copf:"\u{1d554}",copysr:"\u2117",crarr:"\u21b5",cross:"\u2717",cscr:"\u{1d4b8}",csub:"\u2acf",csube:"\u2ad1",csup:"\u2ad0",csupe:"\u2ad2",ctdot:"\u22ef",cudarrl:"\u2938",cudarrr:"\u2935",cuepr:"\u22de",curlyeqprec:"\u22de",cuesc:"\u22df",curlyeqsucc:"\u22df",cularr:"\u21b6",curvearrowleft:"\u21b6",cularrp:"\u293d",cup:"\u222a",cupbrcap:"\u2a48",cupcap:"\u2a46",cupcup:"\u2a4a",cupdot:"\u228d",cupor:"\u2a45",cups:"\u222a\ufe00",curarr:"\u21b7",curvearrowright:"\u21b7",curarrm:"\u293c",curlyvee:"\u22ce",cuvee:"\u22ce",curlywedge:"\u22cf",cuwed:"\u22cf",curren:"\xa4",cwint:"\u2231",cylcty:"\u232d",dHar:"\u2965",dagger:"\u2020",daleth:"\u2138",dash:"\u2010",hyphen:"\u2010",dbkarow:"\u290f",rBarr:"\u290f",dcaron:"\u010f",dcy:"\u0434",ddarr:"\u21ca",downdownarrows:"\u21ca",ddotseq:"\u2a77",eDDot:"\u2a77",deg:"\xb0",delta:"\u03b4",demptyv:"\u29b1",dfisht:"\u297f",dfr:"\u{1d521}",diamondsuit:"\u2666",diams:"\u2666",digamma:"\u03dd",gammad:"\u03dd",disin:"\u22f2",div:"\xf7",divide:"\xf7",divideontimes:"\u22c7",divonx:"\u22c7",djcy:"\u0452",dlcorn:"\u231e",llcorner:"\u231e",dlcrop:"\u230d",dollar:"$",dopf:"\u{1d555}",doteqdot:"\u2251",eDot:"\u2251",dotminus:"\u2238",minusd:"\u2238",dotplus:"\u2214",plusdo:"\u2214",dotsquare:"\u22a1",sdotb:"\u22a1",drcorn:"\u231f",lrcorner:"\u231f",drcrop:"\u230c",dscr:"\u{1d4b9}",dscy:"\u0455",dsol:"\u29f6",dstrok:"\u0111",dtdot:"\u22f1",dtri:"\u25bf",triangledown:"\u25bf",dwangle:"\u29a6",dzcy:"\u045f",dzigrarr:"\u27ff",eacute:"\xe9",easter:"\u2a6e",ecaron:"\u011b",ecir:"\u2256",eqcirc:"\u2256",ecirc:"\xea",ecolon:"\u2255",eqcolon:"\u2255",ecy:"\u044d",edot:"\u0117",efDot:"\u2252",fallingdotseq:"\u2252",efr:"\u{1d522}",eg:"\u2a9a",egrave:"\xe8",egs:"\u2a96",eqslantgtr:"\u2a96",egsdot:"\u2a98",el:"\u2a99",elinters:"\u23e7",ell:"\u2113",els:"\u2a95",eqslantless:"\u2a95",elsdot:"\u2a97",emacr:"\u0113",empty:"\u2205",emptyset:"\u2205",emptyv:"\u2205",varnothing:"\u2205",emsp13:"\u2004",emsp14:"\u2005",emsp:"\u2003",eng:"\u014b",ensp:"\u2002",eogon:"\u0119",eopf:"\u{1d556}",epar:"\u22d5",eparsl:"\u29e3",eplus:"\u2a71",epsi:"\u03b5",epsilon:"\u03b5",epsiv:"\u03f5",straightepsilon:"\u03f5",varepsilon:"\u03f5",equals:"=",equest:"\u225f",questeq:"\u225f",equivDD:"\u2a78",eqvparsl:"\u29e5",erDot:"\u2253",risingdotseq:"\u2253",erarr:"\u2971",escr:"\u212f",eta:"\u03b7",eth:"\xf0",euml:"\xeb",euro:"\u20ac",excl:"!",fcy:"\u0444",female:"\u2640",ffilig:"\ufb03",fflig:"\ufb00",ffllig:"\ufb04",ffr:"\u{1d523}",filig:"\ufb01",fjlig:"fj",flat:"\u266d",fllig:"\ufb02",fltns:"\u25b1",fnof:"\u0192",fopf:"\u{1d557}",fork:"\u22d4",pitchfork:"\u22d4",forkv:"\u2ad9",fpartint:"\u2a0d",frac12:"\xbd",half:"\xbd",frac13:"\u2153",frac14:"\xbc",frac15:"\u2155",frac16:"\u2159",frac18:"\u215b",frac23:"\u2154",frac25:"\u2156",frac34:"\xbe",frac35:"\u2157",frac38:"\u215c",frac45:"\u2158",frac56:"\u215a",frac58:"\u215d",frac78:"\u215e",frasl:"\u2044",frown:"\u2322",sfrown:"\u2322",fscr:"\u{1d4bb}",gEl:"\u2a8c",gtreqqless:"\u2a8c",gacute:"\u01f5",gamma:"\u03b3",gap:"\u2a86",gtrapprox:"\u2a86",gbreve:"\u011f",gcirc:"\u011d",gcy:"\u0433",gdot:"\u0121",gescc:"\u2aa9",gesdot:"\u2a80",gesdoto:"\u2a82",gesdotol:"\u2a84",gesl:"\u22db\ufe00",gesles:"\u2a94",gfr:"\u{1d524}",gimel:"\u2137",gjcy:"\u0453",glE:"\u2a92",gla:"\u2aa5",glj:"\u2aa4",gnE:"\u2269",gneqq:"\u2269",gnap:"\u2a8a",gnapprox:"\u2a8a",gne:"\u2a88",gneq:"\u2a88",gnsim:"\u22e7",gopf:"\u{1d558}",gscr:"\u210a",gsime:"\u2a8e",gsiml:"\u2a90",gtcc:"\u2aa7",gtcir:"\u2a7a",gtdot:"\u22d7",gtrdot:"\u22d7",gtlPar:"\u2995",gtquest:"\u2a7c",gtrarr:"\u2978",gvertneqq:"\u2269\ufe00",gvnE:"\u2269\ufe00",hardcy:"\u044a",harrcir:"\u2948",harrw:"\u21ad",leftrightsquigarrow:"\u21ad",hbar:"\u210f",hslash:"\u210f",planck:"\u210f",plankv:"\u210f",hcirc:"\u0125",hearts:"\u2665",heartsuit:"\u2665",hellip:"\u2026",mldr:"\u2026",hercon:"\u22b9",hfr:"\u{1d525}",hksearow:"\u2925",searhk:"\u2925",hkswarow:"\u2926",swarhk:"\u2926",hoarr:"\u21ff",homtht:"\u223b",hookleftarrow:"\u21a9",larrhk:"\u21a9",hookrightarrow:"\u21aa",rarrhk:"\u21aa",hopf:"\u{1d559}",horbar:"\u2015",hscr:"\u{1d4bd}",hstrok:"\u0127",hybull:"\u2043",iacute:"\xed",icirc:"\xee",icy:"\u0438",iecy:"\u0435",iexcl:"\xa1",ifr:"\u{1d526}",igrave:"\xec",iiiint:"\u2a0c",qint:"\u2a0c",iiint:"\u222d",tint:"\u222d",iinfin:"\u29dc",iiota:"\u2129",ijlig:"\u0133",imacr:"\u012b",imath:"\u0131",inodot:"\u0131",imof:"\u22b7",imped:"\u01b5",incare:"\u2105",infin:"\u221e",infintie:"\u29dd",intcal:"\u22ba",intercal:"\u22ba",intlarhk:"\u2a17",intprod:"\u2a3c",iprod:"\u2a3c",iocy:"\u0451",iogon:"\u012f",iopf:"\u{1d55a}",iota:"\u03b9",iquest:"\xbf",iscr:"\u{1d4be}",isinE:"\u22f9",isindot:"\u22f5",isins:"\u22f4",isinsv:"\u22f3",itilde:"\u0129",iukcy:"\u0456",iuml:"\xef",jcirc:"\u0135",jcy:"\u0439",jfr:"\u{1d527}",jmath:"\u0237",jopf:"\u{1d55b}",jscr:"\u{1d4bf}",jsercy:"\u0458",jukcy:"\u0454",kappa:"\u03ba",kappav:"\u03f0",varkappa:"\u03f0",kcedil:"\u0137",kcy:"\u043a",kfr:"\u{1d528}",kgreen:"\u0138",khcy:"\u0445",kjcy:"\u045c",kopf:"\u{1d55c}",kscr:"\u{1d4c0}",lAtail:"\u291b",lBarr:"\u290e",lEg:"\u2a8b",lesseqqgtr:"\u2a8b",lHar:"\u2962",lacute:"\u013a",laemptyv:"\u29b4",lambda:"\u03bb",langd:"\u2991",lap:"\u2a85",lessapprox:"\u2a85",laquo:"\xab",larrbfs:"\u291f",larrfs:"\u291d",larrlp:"\u21ab",looparrowleft:"\u21ab",larrpl:"\u2939",larrsim:"\u2973",larrtl:"\u21a2",leftarrowtail:"\u21a2",lat:"\u2aab",latail:"\u2919",late:"\u2aad",lates:"\u2aad\ufe00",lbarr:"\u290c",lbbrk:"\u2772",lbrace:"{",lcub:"{",lbrack:"[",lsqb:"[",lbrke:"\u298b",lbrksld:"\u298f",lbrkslu:"\u298d",lcaron:"\u013e",lcedil:"\u013c",lcy:"\u043b",ldca:"\u2936",ldrdhar:"\u2967",ldrushar:"\u294b",ldsh:"\u21b2",le:"\u2264",leq:"\u2264",leftleftarrows:"\u21c7",llarr:"\u21c7",leftthreetimes:"\u22cb",lthree:"\u22cb",lescc:"\u2aa8",lesdot:"\u2a7f",lesdoto:"\u2a81",lesdotor:"\u2a83",lesg:"\u22da\ufe00",lesges:"\u2a93",lessdot:"\u22d6",ltdot:"\u22d6",lfisht:"\u297c",lfr:"\u{1d529}",lgE:"\u2a91",lharul:"\u296a",lhblk:"\u2584",ljcy:"\u0459",llhard:"\u296b",lltri:"\u25fa",lmidot:"\u0140",lmoust:"\u23b0",lmoustache:"\u23b0",lnE:"\u2268",lneqq:"\u2268",lnap:"\u2a89",lnapprox:"\u2a89",lne:"\u2a87",lneq:"\u2a87",lnsim:"\u22e6",loang:"\u27ec",loarr:"\u21fd",longmapsto:"\u27fc",xmap:"\u27fc",looparrowright:"\u21ac",rarrlp:"\u21ac",lopar:"\u2985",lopf:"\u{1d55d}",loplus:"\u2a2d",lotimes:"\u2a34",lowast:"\u2217",loz:"\u25ca",lozenge:"\u25ca",lpar:"(",lparlt:"\u2993",lrhard:"\u296d",lrm:"\u200e",lrtri:"\u22bf",lsaquo:"\u2039",lscr:"\u{1d4c1}",lsime:"\u2a8d",lsimg:"\u2a8f",lsquor:"\u201a",sbquo:"\u201a",lstrok:"\u0142",ltcc:"\u2aa6",ltcir:"\u2a79",ltimes:"\u22c9",ltlarr:"\u2976",ltquest:"\u2a7b",ltrPar:"\u2996",ltri:"\u25c3",triangleleft:"\u25c3",lurdshar:"\u294a",luruhar:"\u2966",lvertneqq:"\u2268\ufe00",lvnE:"\u2268\ufe00",mDDot:"\u223a",macr:"\xaf",strns:"\xaf",male:"\u2642",malt:"\u2720",maltese:"\u2720",marker:"\u25ae",mcomma:"\u2a29",mcy:"\u043c",mdash:"\u2014",mfr:"\u{1d52a}",mho:"\u2127",micro:"\xb5",midcir:"\u2af0",minus:"\u2212",minusdu:"\u2a2a",mlcp:"\u2adb",models:"\u22a7",mopf:"\u{1d55e}",mscr:"\u{1d4c2}",mu:"\u03bc",multimap:"\u22b8",mumap:"\u22b8",nGg:"\u22d9\u0338",nGt:"\u226b\u20d2",nLeftarrow:"\u21cd",nlArr:"\u21cd",nLeftrightarrow:"\u21ce",nhArr:"\u21ce",nLl:"\u22d8\u0338",nLt:"\u226a\u20d2",nRightarrow:"\u21cf",nrArr:"\u21cf",nVDash:"\u22af",nVdash:"\u22ae",nacute:"\u0144",nang:"\u2220\u20d2",napE:"\u2a70\u0338",napid:"\u224b\u0338",napos:"\u0149",natur:"\u266e",natural:"\u266e",ncap:"\u2a43",ncaron:"\u0148",ncedil:"\u0146",ncongdot:"\u2a6d\u0338",ncup:"\u2a42",ncy:"\u043d",ndash:"\u2013",neArr:"\u21d7",nearhk:"\u2924",nedot:"\u2250\u0338",nesear:"\u2928",toea:"\u2928",nfr:"\u{1d52b}",nharr:"\u21ae",nleftrightarrow:"\u21ae",nhpar:"\u2af2",nis:"\u22fc",nisd:"\u22fa",njcy:"\u045a",nlE:"\u2266\u0338",nleqq:"\u2266\u0338",nlarr:"\u219a",nleftarrow:"\u219a",nldr:"\u2025",nopf:"\u{1d55f}",not:"\xac",notinE:"\u22f9\u0338",notindot:"\u22f5\u0338",notinvb:"\u22f7",notinvc:"\u22f6",notnivb:"\u22fe",notnivc:"\u22fd",nparsl:"\u2afd\u20e5",npart:"\u2202\u0338",npolint:"\u2a14",nrarr:"\u219b",nrightarrow:"\u219b",nrarrc:"\u2933\u0338",nrarrw:"\u219d\u0338",nscr:"\u{1d4c3}",nsub:"\u2284",nsubE:"\u2ac5\u0338",nsubseteqq:"\u2ac5\u0338",nsup:"\u2285",nsupE:"\u2ac6\u0338",nsupseteqq:"\u2ac6\u0338",ntilde:"\xf1",nu:"\u03bd",num:"#",numero:"\u2116",numsp:"\u2007",nvDash:"\u22ad",nvHarr:"\u2904",nvap:"\u224d\u20d2",nvdash:"\u22ac",nvge:"\u2265\u20d2",nvgt:">\u20d2",nvinfin:"\u29de",nvlArr:"\u2902",nvle:"\u2264\u20d2",nvlt:"<\u20d2",nvltrie:"\u22b4\u20d2",nvrArr:"\u2903",nvrtrie:"\u22b5\u20d2",nvsim:"\u223c\u20d2",nwArr:"\u21d6",nwarhk:"\u2923",nwnear:"\u2927",oacute:"\xf3",ocirc:"\xf4",ocy:"\u043e",odblac:"\u0151",odiv:"\u2a38",odsold:"\u29bc",oelig:"\u0153",ofcir:"\u29bf",ofr:"\u{1d52c}",ogon:"\u02db",ograve:"\xf2",ogt:"\u29c1",ohbar:"\u29b5",olcir:"\u29be",olcross:"\u29bb",olt:"\u29c0",omacr:"\u014d",omega:"\u03c9",omicron:"\u03bf",omid:"\u29b6",oopf:"\u{1d560}",opar:"\u29b7",operp:"\u29b9",or:"\u2228",vee:"\u2228",ord:"\u2a5d",order:"\u2134",orderof:"\u2134",oscr:"\u2134",ordf:"\xaa",ordm:"\xba",origof:"\u22b6",oror:"\u2a56",orslope:"\u2a57",orv:"\u2a5b",oslash:"\xf8",osol:"\u2298",otilde:"\xf5",otimesas:"\u2a36",ouml:"\xf6",ovbar:"\u233d",para:"\xb6",parsim:"\u2af3",parsl:"\u2afd",pcy:"\u043f",percnt:"%",period:".",permil:"\u2030",pertenk:"\u2031",pfr:"\u{1d52d}",phi:"\u03c6",phiv:"\u03d5",straightphi:"\u03d5",varphi:"\u03d5",phone:"\u260e",pi:"\u03c0",piv:"\u03d6",varpi:"\u03d6",planckh:"\u210e",plus:"+",plusacir:"\u2a23",pluscir:"\u2a22",plusdu:"\u2a25",pluse:"\u2a72",plussim:"\u2a26",plustwo:"\u2a27",pointint:"\u2a15",popf:"\u{1d561}",pound:"\xa3",prE:"\u2ab3",prap:"\u2ab7",precapprox:"\u2ab7",precnapprox:"\u2ab9",prnap:"\u2ab9",precneqq:"\u2ab5",prnE:"\u2ab5",precnsim:"\u22e8",prnsim:"\u22e8",prime:"\u2032",profalar:"\u232e",profline:"\u2312",profsurf:"\u2313",prurel:"\u22b0",pscr:"\u{1d4c5}",psi:"\u03c8",puncsp:"\u2008",qfr:"\u{1d52e}",qopf:"\u{1d562}",qprime:"\u2057",qscr:"\u{1d4c6}",quatint:"\u2a16",quest:"?",rAtail:"\u291c",rHar:"\u2964",race:"\u223d\u0331",racute:"\u0155",raemptyv:"\u29b3",rangd:"\u2992",range:"\u29a5",raquo:"\xbb",rarrap:"\u2975",rarrbfs:"\u2920",rarrc:"\u2933",rarrfs:"\u291e",rarrpl:"\u2945",rarrsim:"\u2974",rarrtl:"\u21a3",rightarrowtail:"\u21a3",rarrw:"\u219d",rightsquigarrow:"\u219d",ratail:"\u291a",ratio:"\u2236",rbbrk:"\u2773",rbrace:"}",rcub:"}",rbrack:"]",rsqb:"]",rbrke:"\u298c",rbrksld:"\u298e",rbrkslu:"\u2990",rcaron:"\u0159",rcedil:"\u0157",rcy:"\u0440",rdca:"\u2937",rdldhar:"\u2969",rdsh:"\u21b3",rect:"\u25ad",rfisht:"\u297d",rfr:"\u{1d52f}",rharul:"\u296c",rho:"\u03c1",rhov:"\u03f1",varrho:"\u03f1",rightrightarrows:"\u21c9",rrarr:"\u21c9",rightthreetimes:"\u22cc",rthree:"\u22cc",ring:"\u02da",rlm:"\u200f",rmoust:"\u23b1",rmoustache:"\u23b1",rnmid:"\u2aee",roang:"\u27ed",roarr:"\u21fe",ropar:"\u2986",ropf:"\u{1d563}",roplus:"\u2a2e",rotimes:"\u2a35",rpar:")",rpargt:"\u2994",rppolint:"\u2a12",rsaquo:"\u203a",rscr:"\u{1d4c7}",rtimes:"\u22ca",rtri:"\u25b9",triangleright:"\u25b9",rtriltri:"\u29ce",ruluhar:"\u2968",rx:"\u211e",sacute:"\u015b",scE:"\u2ab4",scap:"\u2ab8",succapprox:"\u2ab8",scaron:"\u0161",scedil:"\u015f",scirc:"\u015d",scnE:"\u2ab6",succneqq:"\u2ab6",scnap:"\u2aba",succnapprox:"\u2aba",scnsim:"\u22e9",succnsim:"\u22e9",scpolint:"\u2a13",scy:"\u0441",sdot:"\u22c5",sdote:"\u2a66",seArr:"\u21d8",sect:"\xa7",semi:";",seswar:"\u2929",tosa:"\u2929",sext:"\u2736",sfr:"\u{1d530}",sharp:"\u266f",shchcy:"\u0449",shcy:"\u0448",shy:"\xad",sigma:"\u03c3",sigmaf:"\u03c2",sigmav:"\u03c2",varsigma:"\u03c2",simdot:"\u2a6a",simg:"\u2a9e",simgE:"\u2aa0",siml:"\u2a9d",simlE:"\u2a9f",simne:"\u2246",simplus:"\u2a24",simrarr:"\u2972",smashp:"\u2a33",smeparsl:"\u29e4",smile:"\u2323",ssmile:"\u2323",smt:"\u2aaa",smte:"\u2aac",smtes:"\u2aac\ufe00",softcy:"\u044c",sol:"/",solb:"\u29c4",solbar:"\u233f",sopf:"\u{1d564}",spades:"\u2660",spadesuit:"\u2660",sqcaps:"\u2293\ufe00",sqcups:"\u2294\ufe00",sscr:"\u{1d4c8}",star:"\u2606",sub:"\u2282",subset:"\u2282",subE:"\u2ac5",subseteqq:"\u2ac5",subdot:"\u2abd",subedot:"\u2ac3",submult:"\u2ac1",subnE:"\u2acb",subsetneqq:"\u2acb",subne:"\u228a",subsetneq:"\u228a",subplus:"\u2abf",subrarr:"\u2979",subsim:"\u2ac7",subsub:"\u2ad5",subsup:"\u2ad3",sung:"\u266a",sup1:"\xb9",sup2:"\xb2",sup3:"\xb3",supE:"\u2ac6",supseteqq:"\u2ac6",supdot:"\u2abe",supdsub:"\u2ad8",supedot:"\u2ac4",suphsol:"\u27c9",suphsub:"\u2ad7",suplarr:"\u297b",supmult:"\u2ac2",supnE:"\u2acc",supsetneqq:"\u2acc",supne:"\u228b",supsetneq:"\u228b",supplus:"\u2ac0",supsim:"\u2ac8",supsub:"\u2ad4",supsup:"\u2ad6",swArr:"\u21d9",swnwar:"\u292a",szlig:"\xdf",target:"\u2316",tau:"\u03c4",tcaron:"\u0165",tcedil:"\u0163",tcy:"\u0442",telrec:"\u2315",tfr:"\u{1d531}",theta:"\u03b8",thetasym:"\u03d1",thetav:"\u03d1",vartheta:"\u03d1",thorn:"\xfe",times:"\xd7",timesbar:"\u2a31",timesd:"\u2a30",topbot:"\u2336",topcir:"\u2af1",topf:"\u{1d565}",topfork:"\u2ada",tprime:"\u2034",triangle:"\u25b5",utri:"\u25b5",triangleq:"\u225c",trie:"\u225c",tridot:"\u25ec",triminus:"\u2a3a",triplus:"\u2a39",trisb:"\u29cd",tritime:"\u2a3b",trpezium:"\u23e2",tscr:"\u{1d4c9}",tscy:"\u0446",tshcy:"\u045b",tstrok:"\u0167",uHar:"\u2963",uacute:"\xfa",ubrcy:"\u045e",ubreve:"\u016d",ucirc:"\xfb",ucy:"\u0443",udblac:"\u0171",ufisht:"\u297e",ufr:"\u{1d532}",ugrave:"\xf9",uhblk:"\u2580",ulcorn:"\u231c",ulcorner:"\u231c",ulcrop:"\u230f",ultri:"\u25f8",umacr:"\u016b",uogon:"\u0173",uopf:"\u{1d566}",upsi:"\u03c5",upsilon:"\u03c5",upuparrows:"\u21c8",uuarr:"\u21c8",urcorn:"\u231d",urcorner:"\u231d",urcrop:"\u230e",uring:"\u016f",urtri:"\u25f9",uscr:"\u{1d4ca}",utdot:"\u22f0",utilde:"\u0169",uuml:"\xfc",uwangle:"\u29a7",vBar:"\u2ae8",vBarv:"\u2ae9",vangrt:"\u299c",varsubsetneq:"\u228a\ufe00",vsubne:"\u228a\ufe00",varsubsetneqq:"\u2acb\ufe00",vsubnE:"\u2acb\ufe00",varsupsetneq:"\u228b\ufe00",vsupne:"\u228b\ufe00",varsupsetneqq:"\u2acc\ufe00",vsupnE:"\u2acc\ufe00",vcy:"\u0432",veebar:"\u22bb",veeeq:"\u225a",vellip:"\u22ee",vfr:"\u{1d533}",vopf:"\u{1d567}",vscr:"\u{1d4cb}",vzigzag:"\u299a",wcirc:"\u0175",wedbar:"\u2a5f",wedgeq:"\u2259",weierp:"\u2118",wp:"\u2118",wfr:"\u{1d534}",wopf:"\u{1d568}",wscr:"\u{1d4cc}",xfr:"\u{1d535}",xi:"\u03be",xnis:"\u22fb",xopf:"\u{1d569}",xscr:"\u{1d4cd}",yacute:"\xfd",yacy:"\u044f",ycirc:"\u0177",ycy:"\u044b",yen:"\xa5",yfr:"\u{1d536}",yicy:"\u0457",yopf:"\u{1d56a}",yscr:"\u{1d4ce}",yucy:"\u044e",yuml:"\xff",zacute:"\u017a",zcaron:"\u017e",zcy:"\u0437",zdot:"\u017c",zeta:"\u03b6",zfr:"\u{1d537}",zhcy:"\u0436",zigrarr:"\u21dd",zopf:"\u{1d56b}",zscr:"\u{1d4cf}",zwj:"\u200d",zwnj:"\u200c"},Mh="\ue500";Sf.ngsp=Mh;class Mg extends Ql{constructor(r,u,y){super(y,r),this.tokenType=u}}class vC{constructor(r,u,y){this.tokens=r,this.errors=u,this.nonNormalizedIcuExpressions=y}}const Wm=/\r\n?/g;function Pm(b){return`Unexpected character "${b===Iu?"EOF":String.fromCharCode(b)}"`}function Af(b){return`Unknown entity "${b}" - use the "&#<decimal>;" or  "&#x<hex>;" syntax`}var Gc;!function(b){b.HEX="hexadecimal",b.DEC="decimal"}(Gc||(Gc={}));class gu{constructor(r){this.error=r}}class Ad{constructor(r,u,y){this._getTagDefinition=u,this._currentTokenStart=null,this._currentTokenType=null,this._expansionCaseStack=[],this._inInterpolation=!1,this.tokens=[],this.errors=[],this.nonNormalizedIcuExpressions=[],this._tokenizeIcu=y.tokenizeExpansionForms||!1,this._interpolationConfig=y.interpolationConfig||wu,this._leadingTriviaCodePoints=y.leadingTriviaChars&&y.leadingTriviaChars.map(G=>G.codePointAt(0)||0);const L=y.range||{endPos:r.content.length,startPos:0,startLine:0,startCol:0};this._cursor=y.escapedString?new wf(r,L):new D_(r,L),this._preserveLineEndings=y.preserveLineEndings||!1,this._escapedString=y.escapedString||!1,this._i18nNormalizeLineEndingsInICUs=y.i18nNormalizeLineEndingsInICUs||!1;try{this._cursor.init()}catch(G){this.handleError(G)}}_processCarriageReturns(r){return this._preserveLineEndings?r:r.replace(Wm,"\n")}tokenize(){for(;this._cursor.peek()!==Iu;){const r=this._cursor.clone();try{this._attemptCharCode(Ge)?this._attemptCharCode(33)?this._attemptCharCode(91)?this._consumeCdata(r):this._attemptCharCode(Vc)?this._consumeComment(r):this._consumeDocType(r):this._attemptCharCode(Uu)?this._consumeTagClose(r):this._consumeTagOpen(r):this._tokenizeIcu&&this._tokenizeExpansionForm()||this._consumeWithInterpolation(5,8,()=>this._isTextEnd(),()=>this._isTagStart())}catch(u){this.handleError(u)}}this._beginToken(24),this._endToken([])}_tokenizeExpansionForm(){if(this.isExpansionFormStart())return this._consumeExpansionFormStart(),!0;if(function Th(b){return b!==yl}(this._cursor.peek())&&this._isInExpansionForm())return this._consumeExpansionCaseStart(),!0;if(this._cursor.peek()===yl){if(this._isInExpansionCase())return this._consumeExpansionCaseEnd(),!0;if(this._isInExpansionForm())return this._consumeExpansionFormEnd(),!0}return!1}_beginToken(r,u=this._cursor.clone()){this._currentTokenStart=u,this._currentTokenType=r}_endToken(r,u){if(null===this._currentTokenStart)throw new Mg("Programming error - attempted to end a token when there was no start to the token",this._currentTokenType,this._cursor.getSpan(u));if(null===this._currentTokenType)throw new Mg("Programming error - attempted to end a token which has no token type",null,this._cursor.getSpan(this._currentTokenStart));const y={type:this._currentTokenType,parts:r,sourceSpan:(u??this._cursor).getSpan(this._currentTokenStart,this._leadingTriviaCodePoints)};return this.tokens.push(y),this._currentTokenStart=null,this._currentTokenType=null,y}_createError(r,u){this._isInExpansionForm()&&(r+=' (Do you have an unescaped "{" in your template? Use "{{ \'{\' }}") to escape it.)');const y=new Mg(r,this._currentTokenType,u);return this._currentTokenStart=null,this._currentTokenType=null,new gu(y)}handleError(r){if(r instanceof Qg&&(r=this._createError(r.msg,this._cursor.getSpan(r.cursor))),!(r instanceof gu))throw r;this.errors.push(r.error)}_attemptCharCode(r){return this._cursor.peek()===r&&(this._cursor.advance(),!0)}_attemptCharCodeCaseInsensitive(r){return!!function yC(b,r){return jh(b)===jh(r)}(this._cursor.peek(),r)&&(this._cursor.advance(),!0)}_requireCharCode(r){const u=this._cursor.clone();if(!this._attemptCharCode(r))throw this._createError(Pm(this._cursor.peek()),this._cursor.getSpan(u))}_attemptStr(r){const u=r.length;if(this._cursor.charsLeft()<u)return!1;const y=this._cursor.clone();for(let L=0;L<u;L++)if(!this._attemptCharCode(r.charCodeAt(L)))return this._cursor=y,!1;return!0}_attemptStrCaseInsensitive(r){for(let u=0;u<r.length;u++)if(!this._attemptCharCodeCaseInsensitive(r.charCodeAt(u)))return!1;return!0}_requireStr(r){const u=this._cursor.clone();if(!this._attemptStr(r))throw this._createError(Pm(this._cursor.peek()),this._cursor.getSpan(u))}_attemptCharCodeUntilFn(r){for(;!r(this._cursor.peek());)this._cursor.advance()}_requireCharCodeUntilFn(r,u){const y=this._cursor.clone();if(this._attemptCharCodeUntilFn(r),this._cursor.diff(y)<u)throw this._createError(Pm(this._cursor.peek()),this._cursor.getSpan(y))}_attemptUntilChar(r){for(;this._cursor.peek()!==r;)this._cursor.advance()}_readChar(){const r=String.fromCodePoint(this._cursor.peek());return this._cursor.advance(),r}_consumeEntity(r){this._beginToken(9);const u=this._cursor.clone();if(this._cursor.advance(),this._attemptCharCode(35)){const y=this._attemptCharCode(120)||this._attemptCharCode(88),L=this._cursor.clone();if(this._attemptCharCodeUntilFn(Yu),this._cursor.peek()!=Ae){this._cursor.advance();const Te=y?Gc.HEX:Gc.DEC;throw this._createError(function kl(b,r){return`Unable to parse entity "${r}" - ${b} character reference entities must end with ";"`}(Te,this._cursor.getChars(u)),this._cursor.getSpan())}const G=this._cursor.getChars(L);this._cursor.advance();try{const Te=parseInt(G,y?16:10);this._endToken([String.fromCharCode(Te),this._cursor.getChars(u)])}catch{throw this._createError(Af(this._cursor.getChars(u)),this._cursor.getSpan())}}else{const y=this._cursor.clone();if(this._attemptCharCodeUntilFn(Xp),this._cursor.peek()!=Ae)this._beginToken(r,u),this._cursor=y,this._endToken(["&"]);else{const L=this._cursor.getChars(y);this._cursor.advance();const G=Sf[L];if(!G)throw this._createError(Af(L),this._cursor.getSpan(u));this._endToken([G,`&${L};`])}}}_consumeRawText(r,u){this._beginToken(r?6:7);const y=[];for(;;){const L=this._cursor.clone(),G=u();if(this._cursor=L,G)break;r&&38===this._cursor.peek()?(this._endToken([this._processCarriageReturns(y.join(""))]),y.length=0,this._consumeEntity(6),this._beginToken(6)):y.push(this._readChar())}this._endToken([this._processCarriageReturns(y.join(""))])}_consumeComment(r){this._beginToken(10,r),this._requireCharCode(Vc),this._endToken([]),this._consumeRawText(!1,()=>this._attemptStr("--\x3e")),this._beginToken(11),this._requireStr("--\x3e"),this._endToken([])}_consumeCdata(r){this._beginToken(12,r),this._requireStr("CDATA["),this._endToken([]),this._consumeRawText(!1,()=>this._attemptStr("]]>")),this._beginToken(13),this._requireStr("]]>"),this._endToken([])}_consumeDocType(r){this._beginToken(18,r);const u=this._cursor.clone();this._attemptUntilChar(Ht);const y=this._cursor.getChars(u);this._cursor.advance(),this._endToken([y])}_consumePrefixAndName(){const r=this._cursor.clone();let y,u="";for(;58!==this._cursor.peek()&&!av(this._cursor.peek());)this._cursor.advance();58===this._cursor.peek()?(u=this._cursor.getChars(r),this._cursor.advance(),y=this._cursor.clone()):y=r,this._requireCharCodeUntilFn($h,""===u?0:1);return[u,this._cursor.getChars(y)]}_consumeTagOpen(r){let u,y,L;try{if(!Sl(this._cursor.peek()))throw this._createError(Pm(this._cursor.peek()),this._cursor.getSpan(r));for(L=this._consumeTagOpenStart(r),y=L.parts[0],u=L.parts[1],this._attemptCharCodeUntilFn($s);this._cursor.peek()!==Uu&&this._cursor.peek()!==Ht&&this._cursor.peek()!==Ge&&this._cursor.peek()!==Iu;)this._consumeAttributeName(),this._attemptCharCodeUntilFn($s),this._attemptCharCode(xt)&&(this._attemptCharCodeUntilFn($s),this._consumeAttributeValue()),this._attemptCharCodeUntilFn($s);this._consumeTagOpenEnd()}catch(Te){if(Te instanceof gu)return void(L?L.type=4:(this._beginToken(5,r),this._endToken(["<"])));throw Te}const G=this._getTagDefinition(u).getContentType(y);G===Yd.RAW_TEXT?this._consumeRawTextWithTagClose(y,u,!1):G===Yd.ESCAPABLE_RAW_TEXT&&this._consumeRawTextWithTagClose(y,u,!0)}_consumeRawTextWithTagClose(r,u,y){this._consumeRawText(y,()=>!!(this._attemptCharCode(Ge)&&this._attemptCharCode(Uu)&&(this._attemptCharCodeUntilFn($s),this._attemptStrCaseInsensitive(u)))&&(this._attemptCharCodeUntilFn($s),this._attemptCharCode(Ht))),this._beginToken(3),this._requireCharCodeUntilFn(L=>L===Ht,3),this._cursor.advance(),this._endToken([r,u])}_consumeTagOpenStart(r){this._beginToken(0,r);const u=this._consumePrefixAndName();return this._endToken(u)}_consumeAttributeName(){const r=this._cursor.peek();if(r===Xc||r===Go)throw this._createError(Pm(r),this._cursor.getSpan());this._beginToken(14);const u=this._consumePrefixAndName();this._endToken(u)}_consumeAttributeValue(){if(this._cursor.peek()===Xc||this._cursor.peek()===Go){const u=this._cursor.peek();this._consumeQuote(u);const y=()=>this._cursor.peek()===u;this._consumeWithInterpolation(16,17,y,y),this._consumeQuote(u)}else{const u=()=>$h(this._cursor.peek());this._consumeWithInterpolation(16,17,u,u)}}_consumeQuote(r){this._beginToken(15),this._requireCharCode(r),this._endToken([String.fromCodePoint(r)])}_consumeTagOpenEnd(){const r=this._attemptCharCode(Uu)?2:1;this._beginToken(r),this._requireCharCode(Ht),this._endToken([])}_consumeTagClose(r){this._beginToken(3,r),this._attemptCharCodeUntilFn($s);const u=this._consumePrefixAndName();this._attemptCharCodeUntilFn($s),this._requireCharCode(Ht),this._endToken(u)}_consumeExpansionFormStart(){this._beginToken(19),this._requireCharCode(nc),this._endToken([]),this._expansionCaseStack.push(19),this._beginToken(7);const r=this._readUntil(44),u=this._processCarriageReturns(r);if(this._i18nNormalizeLineEndingsInICUs)this._endToken([u]);else{const L=this._endToken([r]);u!==r&&this.nonNormalizedIcuExpressions.push(L)}this._requireCharCode(44),this._attemptCharCodeUntilFn($s),this._beginToken(7);const y=this._readUntil(44);this._endToken([y]),this._requireCharCode(44),this._attemptCharCodeUntilFn($s)}_consumeExpansionCaseStart(){this._beginToken(20);const r=this._readUntil(nc).trim();this._endToken([r]),this._attemptCharCodeUntilFn($s),this._beginToken(21),this._requireCharCode(nc),this._endToken([]),this._attemptCharCodeUntilFn($s),this._expansionCaseStack.push(21)}_consumeExpansionCaseEnd(){this._beginToken(22),this._requireCharCode(yl),this._endToken([]),this._attemptCharCodeUntilFn($s),this._expansionCaseStack.pop()}_consumeExpansionFormEnd(){this._beginToken(23),this._requireCharCode(yl),this._endToken([]),this._expansionCaseStack.pop()}_consumeWithInterpolation(r,u,y,L){this._beginToken(r);const G=[];for(;!y();){const Te=this._cursor.clone();this._interpolationConfig&&this._attemptStr(this._interpolationConfig.start)?(this._endToken([this._processCarriageReturns(G.join(""))],Te),G.length=0,this._consumeInterpolation(u,Te,L),this._beginToken(r)):38===this._cursor.peek()?(this._endToken([this._processCarriageReturns(G.join(""))]),G.length=0,this._consumeEntity(r),this._beginToken(r)):G.push(this._readChar())}this._inInterpolation=!1,this._endToken([this._processCarriageReturns(G.join(""))])}_consumeInterpolation(r,u,y){const L=[];this._beginToken(r,u),L.push(this._interpolationConfig.start);const G=this._cursor.clone();let Te=null,Ze=!1;for(;this._cursor.peek()!==Iu&&(null===y||!y());){const gt=this._cursor.clone();if(this._isTagStart())return this._cursor=gt,L.push(this._getProcessedChars(G,gt)),void this._endToken(L);if(null===Te){if(this._attemptStr(this._interpolationConfig.end))return L.push(this._getProcessedChars(G,gt)),L.push(this._interpolationConfig.end),void this._endToken(L);this._attemptStr("//")&&(Ze=!0)}const Ot=this._cursor.peek();this._cursor.advance(),92===Ot?this._cursor.advance():Ot===Te?Te=null:!Ze&&null===Te&&ta(Ot)&&(Te=Ot)}L.push(this._getProcessedChars(G,this._cursor)),this._endToken(L)}_getProcessedChars(r,u){return this._processCarriageReturns(u.getChars(r))}_isTextEnd(){return!!(this._isTagStart()||this._cursor.peek()===Iu||this._tokenizeIcu&&!this._inInterpolation&&(this.isExpansionFormStart()||this._cursor.peek()===yl&&this._isInExpansionCase()))}_isTagStart(){if(this._cursor.peek()===Ge){const r=this._cursor.clone();r.advance();const u=r.peek();if(ll<=u&&u<=Fs||fo<=u&&u<=Yl||u===Uu||33===u)return!0}return!1}_readUntil(r){const u=this._cursor.clone();return this._attemptUntilChar(r),this._cursor.getChars(u)}_isInExpansionCase(){return this._expansionCaseStack.length>0&&21===this._expansionCaseStack[this._expansionCaseStack.length-1]}_isInExpansionForm(){return this._expansionCaseStack.length>0&&19===this._expansionCaseStack[this._expansionCaseStack.length-1]}isExpansionFormStart(){if(this._cursor.peek()!==nc)return!1;if(this._interpolationConfig){const r=this._cursor.clone(),u=this._attemptStr(this._interpolationConfig.start);return this._cursor=r,!u}return!0}}function $s(b){return!Vl(b)||b===Iu}function $h(b){return Vl(b)||b===Ht||b===Ge||b===Uu||b===Xc||b===Go||b===xt||b===Iu}function av(b){return(b<ll||Fs<b)&&(b<fo||Yl<b)&&(b<li||b>Sr)}function Yu(b){return b===Ae||b===Iu||!function Nd(b){return b>=ll&&b<=Fd||b>=fo&&b<=Nl||bl(b)}(b)}function Xp(b){return b===Ae||b===Iu||!Sl(b)}function jh(b){return b>=ll&&b<=Fs?b-ll+fo:b}class D_{constructor(r,u){if(r instanceof D_){this.file=r.file,this.input=r.input,this.end=r.end;const y=r.state;this.state={peek:y.peek,offset:y.offset,line:y.line,column:y.column}}else{if(!u)throw new Error("Programming error: the range argument must be provided with a file argument.");this.file=r,this.input=r.content,this.end=u.endPos,this.state={peek:-1,offset:u.startPos,line:u.startLine,column:u.startCol}}}clone(){return new D_(this)}peek(){return this.state.peek}charsLeft(){return this.end-this.state.offset}diff(r){return this.state.offset-r.state.offset}advance(){this.advanceState(this.state)}init(){this.updatePeek(this.state)}getSpan(r,u){let y=r=r||this;if(u)for(;this.diff(r)>0&&-1!==u.indexOf(r.peek());)y===r&&(r=r.clone()),r.advance();const L=this.locationFromCursor(r),G=this.locationFromCursor(this),Te=y!==r?this.locationFromCursor(y):L;return new Tu(L,G,Te)}getChars(r){return this.input.substring(r.state.offset,this.state.offset)}charAt(r){return this.input.charCodeAt(r)}advanceState(r){if(r.offset>=this.end)throw this.state=r,new Qg('Unexpected character "EOF"',this);const u=this.charAt(r.offset);u===Gd?(r.line++,r.column=0):Hp(u)||r.column++,r.offset++,this.updatePeek(r)}updatePeek(r){r.peek=r.offset>=this.end?Iu:this.charAt(r.offset)}locationFromCursor(r){return new pu(r.file,r.state.offset,r.state.line,r.state.column)}}class wf extends D_{constructor(r,u){r instanceof wf?(super(r),this.internalState={...r.internalState}):(super(r,u),this.internalState=this.state)}advance(){this.state=this.internalState,super.advance(),this.processEscapeSequence()}init(){super.init(),this.processEscapeSequence()}clone(){return new wf(this)}getChars(r){const u=r.clone();let y="";for(;u.internalState.offset<this.internalState.offset;)y+=String.fromCodePoint(u.peek()),u.advance();return y}processEscapeSequence(){const r=()=>this.internalState.peek;if(92===r())if(this.internalState={...this.state},this.advanceState(this.internalState),r()===qu)this.state.peek=Gd;else if(r()===Zc)this.state.peek=Wf;else if(r()===mc)this.state.peek=Rd;else if(r()===uu)this.state.peek=Cu;else if(98===r())this.state.peek=8;else if(r()===Fd)this.state.peek=Bu;else if(117===r())if(this.advanceState(this.internalState),r()===nc){this.advanceState(this.internalState);const u=this.clone();let y=0;for(;r()!==yl;)this.advanceState(this.internalState),y++;this.state.peek=this.decodeHexDigits(u,y)}else{const u=this.clone();this.advanceState(this.internalState),this.advanceState(this.internalState),this.advanceState(this.internalState),this.state.peek=this.decodeHexDigits(u,4)}else if(120===r()){this.advanceState(this.internalState);const u=this.clone();this.advanceState(this.internalState),this.state.peek=this.decodeHexDigits(u,2)}else if(eu(r())){let u="",y=0,L=this.clone();for(;eu(r())&&y<3;)L=this.clone(),u+=String.fromCodePoint(r()),this.advanceState(this.internalState),y++;this.state.peek=parseInt(u,8),this.internalState=L.internalState}else Hp(this.internalState.peek)?(this.advanceState(this.internalState),this.state=this.internalState):this.state.peek=this.internalState.peek}decodeHexDigits(r,u){const y=this.input.slice(r.internalState.offset,r.internalState.offset+u),L=parseInt(y,16);if(isNaN(L))throw r.state=r.internalState,new Qg("Invalid hexadecimal escape sequence",r);return L}}class Qg{constructor(r,u){this.msg=r,this.cursor=u}}class Np extends Ql{static create(r,u,y){return new Np(r,u,y)}constructor(r,u,y){super(u,y),this.elementName=r}}class em{constructor(r,u){this.rootNodes=r,this.errors=u}}class _d{constructor(r){this.getTagDefinition=r}parse(r,u,y){const L=function ov(b,r,u,y={}){const L=new Ad(new fc(b,r),u,y);return L.tokenize(),new vC(function Kh(b){const r=[];let u;for(let y=0;y<b.length;y++){const L=b[y];u&&5===u.type&&5===L.type||u&&16===u.type&&16===L.type?(u.parts[0]+=L.parts[0],u.sourceSpan.end=L.sourceSpan.end):(u=L,r.push(u))}return r}(L.tokens),L.errors,L.nonNormalizedIcuExpressions)}(r,u,this.getTagDefinition,y),G=new xh(L.tokens,this.getTagDefinition);return G.build(),new em(G.rootNodes,L.errors.concat(G.errors))}}class xh{constructor(r,u){this.tokens=r,this.getTagDefinition=u,this._index=-1,this._elementStack=[],this.rootNodes=[],this.errors=[],this._advance()}build(){for(;24!==this._peek.type;)0===this._peek.type||4===this._peek.type?this._consumeStartTag(this._advance()):3===this._peek.type?this._consumeEndTag(this._advance()):12===this._peek.type?(this._closeVoidElement(),this._consumeCdata(this._advance())):10===this._peek.type?(this._closeVoidElement(),this._consumeComment(this._advance())):5===this._peek.type||7===this._peek.type||6===this._peek.type?(this._closeVoidElement(),this._consumeText(this._advance())):19===this._peek.type?this._consumeExpansion(this._advance()):this._advance()}_advance(){const r=this._peek;return this._index<this.tokens.length-1&&this._index++,this._peek=this.tokens[this._index],r}_advanceIf(r){return this._peek.type===r?this._advance():null}_consumeCdata(r){this._consumeText(this._advance()),this._advanceIf(13)}_consumeComment(r){const u=this._advanceIf(7);this._advanceIf(11);const y=null!=u?u.parts[0].trim():null;this._addToParent(new Eh(y,r.sourceSpan))}_consumeExpansion(r){const u=this._advance(),y=this._advance(),L=[];for(;20===this._peek.type;){const Te=this._parseExpansionCase();if(!Te)return;L.push(Te)}if(23!==this._peek.type)return void this.errors.push(Np.create(null,this._peek.sourceSpan,"Invalid ICU message. Missing '}'."));const G=new Tu(r.sourceSpan.start,this._peek.sourceSpan.end,r.sourceSpan.fullStart);this._addToParent(new Cg(u.parts[0],y.parts[0],L,G,u.sourceSpan)),this._advance()}_parseExpansionCase(){const r=this._advance();if(21!==this._peek.type)return this.errors.push(Np.create(null,this._peek.sourceSpan,"Invalid ICU message. Missing '{'.")),null;const u=this._advance(),y=this._collectExpansionExpTokens(u);if(!y)return null;const L=this._advance();y.push({type:24,parts:[],sourceSpan:L.sourceSpan});const G=new xh(y,this.getTagDefinition);if(G.build(),G.errors.length>0)return this.errors=this.errors.concat(G.errors),null;const Te=new Tu(r.sourceSpan.start,L.sourceSpan.end,r.sourceSpan.fullStart),Ze=new Tu(u.sourceSpan.start,L.sourceSpan.end,u.sourceSpan.fullStart);return new zd(r.parts[0],G.rootNodes,Te,r.sourceSpan,Ze)}_collectExpansionExpTokens(r){const u=[],y=[21];for(;;){if((19===this._peek.type||21===this._peek.type)&&y.push(this._peek.type),22===this._peek.type){if(!iu(y,21))return this.errors.push(Np.create(null,r.sourceSpan,"Invalid ICU message. Missing '}'.")),null;if(y.pop(),0===y.length)return u}if(23===this._peek.type){if(!iu(y,19))return this.errors.push(Np.create(null,r.sourceSpan,"Invalid ICU message. Missing '}'.")),null;y.pop()}if(24===this._peek.type)return this.errors.push(Np.create(null,r.sourceSpan,"Invalid ICU message. Missing '}'.")),null;u.push(this._advance())}}_consumeText(r){const u=[r],y=r.sourceSpan;let L=r.parts[0];if(L.length>0&&"\n"===L[0]){const G=this._getParentElement();null!=G&&0===G.children.length&&this.getTagDefinition(G.name).ignoreFirstLf&&(L=L.substring(1),u[0]={type:r.type,sourceSpan:r.sourceSpan,parts:[L]})}for(;8===this._peek.type||5===this._peek.type||9===this._peek.type;)r=this._advance(),u.push(r),8===r.type?L+=r.parts.join("").replace(/&([^;]+);/g,xp):9===r.type?L+=r.parts[0]:L+=r.parts.join("");if(L.length>0){const G=r.sourceSpan;this._addToParent(new Wh(L,new Tu(y.start,G.end,y.fullStart,y.details),u))}}_closeVoidElement(){const r=this._getParentElement();r&&this.getTagDefinition(r.name).isVoid&&this._elementStack.pop()}_consumeStartTag(r){const[u,y]=r.parts,L=[];for(;14===this._peek.type;)L.push(this._consumeAttr(this._advance()));const G=this._getElementFullName(u,y,this._getParentElement());let Te=!1;if(2===this._peek.type){this._advance(),Te=!0;const ci=this.getTagDefinition(G);ci.canSelfClose||null!==Fc(G)||ci.isVoid||this.errors.push(Np.create(G,r.sourceSpan,`Only void, custom and foreign elements can be self closed "${r.parts[1]}"`))}else 1===this._peek.type&&(this._advance(),Te=!1);const Ze=this._peek.sourceSpan.fullStart,gt=new Tu(r.sourceSpan.start,Ze,r.sourceSpan.fullStart),Ot=new Tu(r.sourceSpan.start,Ze,r.sourceSpan.fullStart),sn=new hd(G,L,[],gt,Ot,void 0);this._pushElement(sn),Te?this._popElement(G,gt):4===r.type&&(this._popElement(G,null),this.errors.push(Np.create(G,gt,`Opening tag "${G}" not terminated.`)))}_pushElement(r){const u=this._getParentElement();u&&this.getTagDefinition(u.name).isClosedByChild(r.name)&&this._elementStack.pop(),this._addToParent(r),this._elementStack.push(r)}_consumeEndTag(r){const u=this._getElementFullName(r.parts[0],r.parts[1],this._getParentElement());if(this.getTagDefinition(u).isVoid)this.errors.push(Np.create(u,r.sourceSpan,`Void elements do not have end tags "${r.parts[1]}"`));else if(!this._popElement(u,r.sourceSpan)){const y=`Unexpected closing tag "${u}". It may happen when the tag has already been closed by another tag. For more info see https://www.w3.org/TR/html5/syntax.html#closing-elements-that-have-implied-end-tags`;this.errors.push(Np.create(u,r.sourceSpan,y))}}_popElement(r,u){let y=!1;for(let L=this._elementStack.length-1;L>=0;L--){const G=this._elementStack[L];if(G.name===r)return G.endSourceSpan=u,G.sourceSpan.end=null!==u?u.end:G.sourceSpan.end,this._elementStack.splice(L,this._elementStack.length-L),!y;this.getTagDefinition(G.name).closedByParent||(y=!0)}return!1}_consumeAttr(r){const u=gd(r.parts[0],r.parts[1]);let y=r.sourceSpan.end;15===this._peek.type&&this._advance();let L="";const G=[];let Te,Ze;if(16===this._peek.type)for(Te=this._peek.sourceSpan,Ze=this._peek.sourceSpan.end;16===this._peek.type||17===this._peek.type||9===this._peek.type;){const sn=this._advance();G.push(sn),17===sn.type?L+=sn.parts.join("").replace(/&([^;]+);/g,xp):9===sn.type?L+=sn.parts[0]:L+=sn.parts.join(""),Ze=y=sn.sourceSpan.end}15===this._peek.type&&(y=this._advance().sourceSpan.end);const Ot=Te&&Ze&&new Tu(Te.start,Ze,Te.fullStart);return new Ga(u,L,new Tu(r.sourceSpan.start,y,r.sourceSpan.fullStart),r.sourceSpan,Ot,G.length>0?G:void 0,void 0)}_getParentElement(){return this._elementStack.length>0?this._elementStack[this._elementStack.length-1]:null}_addToParent(r){const u=this._getParentElement();null!=u?u.children.push(r):this.rootNodes.push(r)}_getElementFullName(r,u,y){if(""===r&&(""===(r=this.getTagDefinition(u).implicitNamespacePrefix||"")&&null!=y)){const L=Ya(y.name)[1];this.getTagDefinition(L).preventNamespaceInheritance||(r=Fc(y.name))}return gd(r,u)}}function iu(b,r){return b.length>0&&b[b.length-1]===r}function xp(b,r){return void 0!==Sf[r]?Sf[r]||b:/^#x[a-f0-9]+$/i.test(r)?String.fromCodePoint(parseInt(r.slice(2),16)):/^#\d+$/.test(r)?String.fromCodePoint(parseInt(r.slice(1),10)):b}class kv extends _d{constructor(){super(Db)}parse(r,u,y){return super.parse(r,u,y)}}const id="ngPreserveWhitespaces",Dy=new Set(["pre","template","textarea","script","style"]),Jh=" \f\n\r\t\v\u1680\u180e\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff",Sb=new RegExp(`[^${Jh}]`),f0=new RegExp(`[${Jh}]{2,}`,"g");function Dh(b){return b.replace(new RegExp(Mh,"g")," ")}class qf{visitElement(r,u){return Dy.has(r.name)||function Ab(b){return b.some(r=>r.name===id)}(r.attrs)?new hd(r.name,Al(this,r.attrs),r.children,r.sourceSpan,r.startSourceSpan,r.endSourceSpan,r.i18n):new hd(r.name,r.attrs,function Bp(b,r){const u=[];return r.forEach((y,L)=>{const G={prev:r[L-1],next:r[L+1]},Te=y.visit(b,G);Te&&u.push(Te)}),u}(this,r.children),r.sourceSpan,r.startSourceSpan,r.endSourceSpan,r.i18n)}visitAttribute(r,u){return r.name!==id?r:null}visitText(r,u){const y=r.value.match(Sb),L=u&&(u.prev instanceof Cg||u.next instanceof Cg);if(y||L){const G=r.tokens.map(Ze=>5===Ze.type?function wd({type:b,parts:r,sourceSpan:u}){return{type:b,parts:[Qh(r[0])],sourceSpan:u}}(Ze):Ze),Te=Qh(r.value);return new Wh(Te,r.sourceSpan,G,r.i18n)}return null}visitComment(r,u){return r}visitExpansion(r,u){return r}visitExpansionCase(r,u){return r}}function Qh(b){return Dh(b).replace(f0," ")}function Hd(b,r=!1){return hi(Object.keys(b).map(u=>({key:u,quoted:r,value:b[u]})))}const nm=new Set(["iframe|srcdoc","*|innerhtml","*|outerhtml","embed|src","object|codebase","object|data"]);function Up(b,r){return b=b.toLowerCase(),r=r.toLowerCase(),nm.has(b+"|"+r)||nm.has("*|"+r)}const mm="animate-";class Sy{constructor(r,u,y,L){this._exprParser=r,this._interpolationConfig=u,this._schemaRegistry=y,this.errors=L}get interpolationConfig(){return this._interpolationConfig}createBoundHostProperties(r,u){const y=[];for(const L of Object.keys(r)){const G=r[L];"string"==typeof G?this.parsePropertyBinding(L,G,!0,u,u.start.offset,void 0,[],y,u):this._reportError(`Value of the host property binding "${L}" needs to be a string representing an expression but got "${G}" (${typeof G})`,u)}return y}createDirectiveHostEventAsts(r,u){const y=[];for(const L of Object.keys(r)){const G=r[L];"string"==typeof G?this.parseEvent(L,G,!1,u,u,[],y,u):this._reportError(`Value of the host listener "${L}" needs to be a string representing an expression but got "${G}" (${typeof G})`,u)}return y}parseInterpolation(r,u,y){const L=u.start.toString(),G=u.fullStart.offset;try{const Te=this._exprParser.parseInterpolation(r,L,G,y,this._interpolationConfig);return Te&&this._reportExpressionParserErrors(Te.errors,u),Te}catch(Te){return this._reportError(`${Te}`,u),this._exprParser.wrapLiteralPrimitive("ERROR",L,G)}}parseInterpolationExpression(r,u){const y=u.start.toString(),L=u.start.offset;try{const G=this._exprParser.parseInterpolationExpression(r,y,L);return G&&this._reportExpressionParserErrors(G.errors,u),G}catch(G){return this._reportError(`${G}`,u),this._exprParser.wrapLiteralPrimitive("ERROR",y,L)}}parseInlineTemplateBinding(r,u,y,L,G,Te,Ze,gt){const Ot=y.start.offset+"*".length,sn=this._parseTemplateBindings(r,u,y,Ot,L);for(const ci of sn){const Ji=Q(y,ci.sourceSpan),xr=ci.key.source,Hr=Q(y,ci.key.span);if(ci instanceof td){const Do=ci.value?ci.value.source:"$implicit",Zo=ci.value?Q(y,ci.value.span):void 0;Ze.push(new Jd(xr,Do,Ji,Hr,Zo))}else if(ci.value){const Do=gt?Ji:y,Zo=Q(y,ci.value.ast.sourceSpan);this._parsePropertyAst(xr,ci.value,Do,Hr,Zo,G,Te)}else G.push([xr,""]),this.parseLiteralAttr(xr,null,Hr,L,void 0,G,Te,Hr)}}_parseTemplateBindings(r,u,y,L,G){const Te=y.start.toString();try{const Ze=this._exprParser.parseTemplateBindings(r,u,Te,L,G);return this._reportExpressionParserErrors(Ze.errors,y),Ze.warnings.forEach(gt=>{this._reportError(gt,y,cp.WARNING)}),Ze.templateBindings}catch(Ze){return this._reportError(`${Ze}`,y),[]}}parseLiteralAttr(r,u,y,L,G,Te,Ze,gt){M(r)?(r=r.substring(1),void 0!==gt&&(gt=Q(gt,new dp(gt.start.offset+1,gt.end.offset))),u&&this._reportError('Assigning animation triggers via @prop="exp" attributes with an expression is invalid. Use property bindings (e.g. [@prop]="exp") or use an attribute without a value (e.g. @prop) instead.',y,cp.ERROR),this._parseAnimation(r,u,y,L,gt,G,Te,Ze)):Ze.push(new b_(r,this._exprParser.wrapLiteralPrimitive(u,"",L),Nh.LITERAL_ATTR,y,gt,G))}parsePropertyBinding(r,u,y,L,G,Te,Ze,gt,Ot){0===r.length&&this._reportError("Property name is missing in binding",L);let sn=!1;r.startsWith(mm)?(sn=!0,r=r.substring(mm.length),void 0!==Ot&&(Ot=Q(Ot,new dp(Ot.start.offset+mm.length,Ot.end.offset)))):M(r)&&(sn=!0,r=r.substring(1),void 0!==Ot&&(Ot=Q(Ot,new dp(Ot.start.offset+1,Ot.end.offset)))),sn?this._parseAnimation(r,u,L,G,Ot,Te,Ze,gt):this._parsePropertyAst(r,this._parseBinding(u,y,Te||L,G),L,Ot,Te,Ze,gt)}parsePropertyInterpolation(r,u,y,L,G,Te,Ze,gt){const Ot=this.parseInterpolation(u,L||y,gt);return!!Ot&&(this._parsePropertyAst(r,Ot,y,Ze,L,G,Te),!0)}_parsePropertyAst(r,u,y,L,G,Te,Ze){Te.push([r,u.source]),Ze.push(new b_(r,u,Nh.DEFAULT,y,L,G))}_parseAnimation(r,u,y,L,G,Te,Ze,gt){0===r.length&&this._reportError("Animation trigger is missing",y);const Ot=this._parseBinding(u||"undefined",!1,Te||y,L);Ze.push([r,Ot.source]),gt.push(new b_(r,Ot,Nh.ANIMATION,y,G,Te))}_parseBinding(r,u,y,L){const G=(y&&y.start||"(unknown)").toString();try{const Te=u?this._exprParser.parseSimpleBinding(r,G,L,this._interpolationConfig):this._exprParser.parseBinding(r,G,L,this._interpolationConfig);return Te&&this._reportExpressionParserErrors(Te.errors,y),Te}catch(Te){return this._reportError(`${Te}`,y),this._exprParser.wrapLiteralPrimitive("ERROR",G,L)}}createBoundElementProperty(r,u,y=!1,L=!0){if(u.isAnimation)return new cm(u.name,4,V.NONE,u.expression,null,u.sourceSpan,u.keySpan,u.valueSpan);let Te,G=null,Ze=null;const gt=u.name.split(".");let Ot;if(gt.length>1)if("attr"==gt[0]){Ze=gt.slice(1).join("."),y||this._validatePropertyOrAttributeName(Ze,u.sourceSpan,!0),Ot=C(this._schemaRegistry,r,Ze,!0);const sn=Ze.indexOf(":");if(sn>-1){const ci=Ze.substring(0,sn),Ji=Ze.substring(sn+1);Ze=gd(ci,Ji)}Te=1}else"class"==gt[0]?(Ze=gt[1],Te=2,Ot=[V.NONE]):"style"==gt[0]&&(G=gt.length>2?gt[2]:null,Ze=gt[1],Te=3,Ot=[V.STYLE]);if(null===Ze){const sn=this._schemaRegistry.getMappedPropName(u.name);Ze=L?sn:u.name,Ot=C(this._schemaRegistry,r,sn,!1),Te=0,y||this._validatePropertyOrAttributeName(sn,u.sourceSpan,!1)}return new cm(Ze,Te,Ot[0],u.expression,G,u.sourceSpan,u.keySpan,u.valueSpan)}parseEvent(r,u,y,L,G,Te,Ze,gt){0===r.length&&this._reportError("Event name is missing in binding",L),M(r)?(r=r.slice(1),void 0!==gt&&(gt=Q(gt,new dp(gt.start.offset+1,gt.end.offset))),this._parseAnimationEvent(r,u,y,L,G,Ze,gt)):this._parseRegularEvent(r,u,y,L,G,Te,Ze,gt)}calcPossibleSecurityContexts(r,u,y){const L=this._schemaRegistry.getMappedPropName(u);return C(this._schemaRegistry,r,L,y)}_parseAnimationEvent(r,u,y,L,G,Te,Ze){const gt=function ja(b,r){return wa(b,".",r)}(r,[r,""]),Ot=gt[0],sn=gt[1].toLowerCase(),ci=this._parseAction(u,y,G);Te.push(new _h(Ot,sn,1,ci,L,G,Ze)),0===Ot.length&&this._reportError("Animation event name is missing in binding",L),sn?"start"!==sn&&"done"!==sn&&this._reportError(`The provided animation output phase value "${sn}" for "@${Ot}" is not supported (use start or done)`,L):this._reportError(`The animation trigger output event (@${Ot}) is missing its phase value name (start or done are currently supported)`,L)}_parseRegularEvent(r,u,y,L,G,Te,Ze,gt){const[Ot,sn]=function Ds(b,r){return wa(b,":",r)}(r,[null,r]),ci=this._parseAction(u,y,G);Te.push([r,ci.source]),Ze.push(new _h(sn,Ot,0,ci,L,G,gt))}_parseAction(r,u,y){const L=(y&&y.start||"(unknown").toString(),G=y&&y.start?y.start.offset:0;try{const Te=this._exprParser.parseAction(r,u,L,G,this._interpolationConfig);return Te&&this._reportExpressionParserErrors(Te.errors,y),!Te||Te.ast instanceof rc?(this._reportError("Empty expressions are not allowed",y),this._exprParser.wrapLiteralPrimitive("ERROR",L,G)):Te}catch(Te){return this._reportError(`${Te}`,y),this._exprParser.wrapLiteralPrimitive("ERROR",L,G)}}_reportError(r,u,y=cp.ERROR){this.errors.push(new Ql(u,r,y))}_reportExpressionParserErrors(r,u){for(const y of r)this._reportError(y.message,u)}_validatePropertyOrAttributeName(r,u,y){const L=y?this._schemaRegistry.validateAttribute(r):this._schemaRegistry.validateProperty(r);L.error&&this._reportError(L.msg,u,cp.ERROR)}}function M(b){return"@"==b[0]}function C(b,r,u,y){const L=[];return l.parse(r).forEach(G=>{const Te=G.element?[G.element]:b.allKnownElementNames(),Ze=new Set(G.notSelectors.filter(Ot=>Ot.isElementSelector()).map(Ot=>Ot.element)),gt=Te.filter(Ot=>!Ze.has(Ot));L.push(...gt.map(Ot=>b.securityContext(Ot,u,y)))}),0===L.length?[V.NONE]:Array.from(new Set(L)).sort()}function Q(b,r){const u=r.start-b.start.offset,y=r.end-b.end.offset;return new Tu(b.start.moveBy(u),b.end.moveBy(y),b.fullStart.moveBy(u),b.details)}const Zt=/^([^:/?#]+):/,Pi="select",Ir="link",xo="rel",Qa="href",ec="stylesheet",Sh="style",qg="script",ao="ngNonBindable",Ay="ngProjectAs";function Wc(b){let r=null,u=null,y=null,L=!1,G="";b.attrs.forEach(gt=>{const Ot=gt.name.toLowerCase();Ot==Pi?r=gt.value:Ot==Qa?u=gt.value:Ot==xo?y=gt.value:gt.name==ao?L=!0:gt.name==Ay&&gt.value.length>0&&(G=gt.value)}),r=function CC(b){return null===b||0===b.length?"*":b}(r);const Te=b.name.toLowerCase();let Ze=Dp.OTHER;return cf(Te)?Ze=Dp.NG_CONTENT:Te==Sh?Ze=Dp.STYLE:Te==qg?Ze=Dp.SCRIPT:Te==Ir&&y==ec&&(Ze=Dp.STYLESHEET),new Ah(Ze,r,u,L,G)}var Dp;!function(b){b[b.NG_CONTENT=0]="NG_CONTENT",b[b.STYLE=1]="STYLE",b[b.STYLESHEET=2]="STYLESHEET",b[b.SCRIPT=3]="SCRIPT",b[b.OTHER=4]="OTHER"}(Dp||(Dp={}));class Ah{constructor(r,u,y,L,G){this.type=r,this.selectAttr=u,this.hrefAttr=y,this.nonBindable=L,this.projectAs=G}}const Id=/^(?:(bind-)|(let-)|(ref-|#)|(on-)|(bindon-)|(@))(.*)$/,dc_BANANA_BOX={start:"[(",end:")]"},dc_PROPERTY={start:"[",end:"]"},dc_EVENT={start:"(",end:")"};class lv{constructor(r,u){this.bindingParser=r,this.options=u,this.errors=[],this.styles=[],this.styleUrls=[],this.ngContentSelectors=[],this.commentNodes=[],this.inI18nBlock=!1}visitElement(r){const u=Kr(r.i18n);u&&(this.inI18nBlock&&this.reportError("Cannot mark an element as translatable inside of a translatable section. Please remove the nested i18n marker.",r.sourceSpan),this.inI18nBlock=!0);const y=Wc(r);if(y.type===Dp.SCRIPT)return null;if(y.type===Dp.STYLE){const Zo=function im(b){return 1===b.children.length&&b.children[0]instanceof Wh?b.children[0].value:null}(r);return null!==Zo&&this.styles.push(Zo),null}if(y.type===Dp.STYLESHEET&&function Ye(b){if(null==b||0===b.length||"/"==b[0])return!1;const r=b.match(Zt);return null===r||"package"==r[1]||"asset"==r[1]}(y.hrefAttr))return this.styleUrls.push(y.hrefAttr),null;const L=function Lv(b){return"ng-template"===Ya(b)[1]}(r.name),G=[],Te=[],Ze=[],gt=[],Ot=[],sn={},ci=[],Ji=[];let xr=!1;for(const Zo of r.attrs){let Ko=!1;const ma=Tr(Zo.name);let Rl=!1;if(Zo.i18n&&(sn[Zo.name]=Zo.i18n),ma.startsWith("*")){xr&&this.reportError("Can't have multiple template bindings on one element. Use only one attribute prefixed with *",Zo.sourceSpan),Rl=!0,xr=!0;const Cc=Zo.value,km=ma.substring("*".length),Rm=[],Pp=Zo.valueSpan?Zo.valueSpan.start.offset:Zo.sourceSpan.start.offset+Zo.name.length;this.bindingParser.parseInlineTemplateBinding(km,Cc,Zo.sourceSpan,Pp,[],ci,Rm,!0),Ji.push(...Rm.map(Uf=>new Qs(Uf.name,Uf.value,Uf.sourceSpan,Uf.keySpan,Uf.valueSpan)))}else Ko=this.parseAttribute(L,Zo,[],G,Te,Ze,gt);!Ko&&!Rl&&Ot.push(this.visitAttribute(Zo))}const Hr=Al(y.nonBindable?TC:this,r.children);let Do;if(y.type===Dp.NG_CONTENT){r.children&&!r.children.every(ma=>function Iy(b){return b instanceof Wh&&0==b.value.trim().length}(ma)||function u1(b){return b instanceof Eh}(ma))&&this.reportError("<ng-content> element cannot have content.",r.sourceSpan);const Zo=y.selectAttr,Ko=r.attrs.map(ma=>this.visitAttribute(ma));Do=new Tc(Zo,Ko,r.sourceSpan,r.i18n),this.ngContentSelectors.push(Zo)}else if(L){const Zo=this.extractAttributes(r.name,G,sn);Do=new Ka(r.name,Ot,Zo.bound,Te,[],Hr,gt,Ze,r.sourceSpan,r.startSourceSpan,r.endSourceSpan,r.i18n)}else{const Zo=this.extractAttributes(r.name,G,sn);Do=new Us(r.name,Ot,Zo.bound,Te,Hr,gt,r.sourceSpan,r.startSourceSpan,r.endSourceSpan,r.i18n)}if(xr){const Zo=this.extractAttributes("ng-template",ci,sn),Ko=[];Zo.literal.forEach(km=>Ko.push(km)),Zo.bound.forEach(km=>Ko.push(km));const ma=Do instanceof Us?{attributes:Do.attributes,inputs:Do.inputs,outputs:Do.outputs}:{attributes:[],inputs:[],outputs:[]},Rl=L&&u?void 0:r.i18n,Cc=Do instanceof Ka?null:Do.name;Do=new Ka(Cc,ma.attributes,ma.inputs,ma.outputs,Ko,[Do],[],Ji,r.sourceSpan,r.startSourceSpan,r.endSourceSpan,Rl)}return u&&(this.inI18nBlock=!1),Do}visitAttribute(r){return new ia(r.name,r.value,r.sourceSpan,r.keySpan,r.valueSpan,r.i18n)}visitText(r){return this._visitTextWithInterpolation(r.value,r.sourceSpan,r.tokens,r.i18n)}visitExpansion(r){if(!r.i18n)return null;if(!Kr(r.i18n))throw new Error(`Invalid type "${r.i18n.constructor}" for "i18n" property of ${r.sourceSpan.toString()}. Expected a "Message"`);const u=r.i18n,y={},L={};return Object.keys(u.placeholders).forEach(G=>{const Te=u.placeholders[G];if(G.startsWith("VAR_")){const Ze=G.trim(),gt=this.bindingParser.parseInterpolationExpression(Te.text,Te.sourceSpan);y[Ze]=new qi(gt,Te.sourceSpan)}else L[G]=this._visitTextWithInterpolation(Te.text,Te.sourceSpan,null)}),new hl(y,L,r.sourceSpan,u)}visitExpansionCase(r){return null}visitComment(r){return this.options.collectCommentNodes&&this.commentNodes.push(new ya(r.value||"",r.sourceSpan)),null}extractAttributes(r,u,y){const L=[],G=[];return u.forEach(Te=>{const Ze=y[Te.name];if(Te.isLiteral)G.push(new ia(Te.name,Te.expression.source||"",Te.sourceSpan,Te.keySpan,Te.valueSpan,Ze));else{const gt=this.bindingParser.createBoundElementProperty(r,Te,!0,!1);L.push($o.fromBoundElementProperty(gt,Ze))}}),{bound:L,literal:G}}parseAttribute(r,u,y,L,G,Te,Ze){const gt=Tr(u.name),Ot=u.value,sn=u.sourceSpan,ci=u.valueSpan?u.valueSpan.start.offset:sn.start.offset;function Ji(Ko,ma,Rl){const Cc=u.name.length-gt.length,km=Ko.start.moveBy(ma.length+Cc),Rm=km.moveBy(Rl.length);return new Tu(km,Rm,km,Rl)}const xr=gt.match(Id);if(xr){if(null!=xr[1]){const Ko=xr[7],ma=Ji(sn,xr[1],Ko);this.bindingParser.parsePropertyBinding(Ko,Ot,!1,sn,ci,u.valueSpan,y,L,ma)}else if(xr[2])if(r){const Ko=xr[7],ma=Ji(sn,xr[2],Ko);this.parseVariable(Ko,Ot,sn,ma,u.valueSpan,Te)}else this.reportError('"let-" is only supported on ng-template elements.',sn);else if(xr[3]){const Ko=xr[7],ma=Ji(sn,xr[3],Ko);this.parseReference(Ko,Ot,sn,ma,u.valueSpan,Ze)}else if(xr[4]){const Ko=[],ma=xr[7],Rl=Ji(sn,xr[4],ma);this.bindingParser.parseEvent(ma,Ot,!1,sn,u.valueSpan||sn,y,Ko,Rl),qh(Ko,G)}else if(xr[5]){const Ko=xr[7],ma=Ji(sn,xr[5],Ko);this.bindingParser.parsePropertyBinding(Ko,Ot,!1,sn,ci,u.valueSpan,y,L,ma),this.parseAssignmentEvent(Ko,Ot,sn,u.valueSpan,y,G,ma)}else if(xr[6]){const Ko=Ji(sn,"",gt);this.bindingParser.parseLiteralAttr(gt,Ot,sn,ci,u.valueSpan,y,L,Ko)}return!0}let Hr=null;if(gt.startsWith(dc_BANANA_BOX.start)?Hr=dc_BANANA_BOX:gt.startsWith(dc_PROPERTY.start)?Hr=dc_PROPERTY:gt.startsWith(dc_EVENT.start)&&(Hr=dc_EVENT),null!==Hr&&gt.endsWith(Hr.end)&&gt.length>Hr.start.length+Hr.end.length){const Ko=gt.substring(Hr.start.length,gt.length-Hr.end.length),ma=Ji(sn,Hr.start,Ko);if(Hr.start===dc_BANANA_BOX.start)this.bindingParser.parsePropertyBinding(Ko,Ot,!1,sn,ci,u.valueSpan,y,L,ma),this.parseAssignmentEvent(Ko,Ot,sn,u.valueSpan,y,G,ma);else if(Hr.start===dc_PROPERTY.start)this.bindingParser.parsePropertyBinding(Ko,Ot,!1,sn,ci,u.valueSpan,y,L,ma);else{const Rl=[];this.bindingParser.parseEvent(Ko,Ot,!1,sn,u.valueSpan||sn,y,Rl,ma),qh(Rl,G)}return!0}const Do=Ji(sn,"",gt);return this.bindingParser.parsePropertyInterpolation(gt,Ot,sn,u.valueSpan,y,L,Do,u.valueTokens??null)}_visitTextWithInterpolation(r,u,y,L){const G=Dh(r),Te=this.bindingParser.parseInterpolation(G,u,y);return Te?new qi(Te,u,L):new Na(G,u)}parseVariable(r,u,y,L,G,Te){r.indexOf("-")>-1?this.reportError('"-" is not allowed in variable names',y):0===r.length&&this.reportError("Variable does not have a name",y),Te.push(new Qs(r,u,y,L,G))}parseReference(r,u,y,L,G,Te){r.indexOf("-")>-1?this.reportError('"-" is not allowed in reference names',y):0===r.length?this.reportError("Reference does not have a name",y):Te.some(Ze=>Ze.name===r)&&this.reportError(`Reference "#${r}" is defined more than once`,y),Te.push(new vu(r,u,y,L,G))}parseAssignmentEvent(r,u,y,L,G,Te,Ze){const gt=[];this.bindingParser.parseEvent(`${r}Change`,`${u} =$event`,!0,y,L||y,G,gt,Ze),qh(gt,Te)}reportError(r,u,y=cp.ERROR){this.errors.push(new Ql(u,r,y))}}const TC=new class cv{visitElement(r){const u=Wc(r);if(u.type===Dp.SCRIPT||u.type===Dp.STYLE||u.type===Dp.STYLESHEET)return null;const y=Al(this,r.children,null);return new Us(r.name,Al(this,r.attrs),[],[],y,[],r.sourceSpan,r.startSourceSpan,r.endSourceSpan)}visitComment(r){return null}visitAttribute(r){return new ia(r.name,r.value,r.sourceSpan,r.keySpan,r.valueSpan,r.i18n)}visitText(r){return new Na(r.value,r.sourceSpan)}visitExpansion(r){return null}visitExpansionCase(r){return null}};function Tr(b){return/^data-/i.test(b)?b.substring(5):b}function qh(b,r){r.push(...b.map(u=>su.fromParsedEvent(u)))}var _u;!function(b){b[b.ELEMENT=0]="ELEMENT",b[b.TEMPLATE=1]="TEMPLATE"}(_u||(_u={}));class $c{constructor(r,u,y=0,L=null,G,Te){this.index=r,this.ref=u,this.level=y,this.templateIndex=L,this.meta=G,this.registry=Te,this.bindings=new Set,this.placeholders=new Map,this.isEmitted=!1,this._unresolvedCtxCount=0,this._registry=Te||function Tg(){return{getUniqueId:Os(),icus:new Map}}(),this.id=this._registry.getUniqueId()}appendTag(r,u,y,L){if(u.isVoid&&L)return;const G=u.isVoid||!L?u.startName:u.closeName,Te={type:r,index:y,ctx:this.id,isVoid:u.isVoid,closed:L};Ks(this.placeholders,G,Te)}get icus(){return this._registry.icus}get isRoot(){return 0===this.level}get isResolved(){return 0===this._unresolvedCtxCount}getSerializedPlaceholders(){const r=new Map;return this.placeholders.forEach((u,y)=>r.set(y,u.map(d1))),r}appendBinding(r){this.bindings.add(r)}appendIcu(r,u){Ks(this._registry.icus,r,u)}appendBoundText(r){_l(r,this.bindings.size,this.id).forEach((y,L)=>Ks(this.placeholders,L,...y))}appendTemplate(r,u){this.appendTag(_u.TEMPLATE,r,u,!1),this.appendTag(_u.TEMPLATE,r,u,!0),this._unresolvedCtxCount++}appendElement(r,u,y){this.appendTag(_u.ELEMENT,r,u,y)}appendProjection(r,u){this.appendTag(_u.ELEMENT,r,u,!1),this.appendTag(_u.ELEMENT,r,u,!0)}forkChildContext(r,u,y){return new $c(r,this.ref,this.level+1,u,y,this._registry)}reconcileChildContext(r){["start","close"].forEach(y=>{const L=r.meta[`${y}Name`],Te=(this.placeholders.get(L)||[]).find(wb(this.id,r.templateIndex));Te&&(Te.ctx=r.id)}),r.placeholders.forEach((y,L)=>{const G=this.placeholders.get(L);if(!G)return void this.placeholders.set(L,y);const Te=G.findIndex(wb(r.id,r.templateIndex));if(Te>=0){const Ze=L.startsWith("CLOSE");if(L.endsWith("NG-TEMPLATE"))G.splice(Te+(Ze?0:1),0,...y);else{y[Ze?y.length-1:0].tmpl=G[Te],G.splice(Te,1,...y)}}else G.push(...y);this.placeholders.set(L,G)}),this._unresolvedCtxCount--}}function Pd(b,r,u,y){return xl(`${y?"/":""}${b}${r}`,u)}function Xg(b,{index:r,ctx:u,isVoid:y},L){return y?Pd(b,r,u)+Pd(b,r,u,!0):Pd(b,r,u,L)}function wb(b,r){return u=>"object"==typeof u&&u.type===_u.TEMPLATE&&u.index===r&&u.ctx===b}function d1(b){const r=(y,L)=>Xg("#",y,L),u=(y,L)=>Xg("*",y,L);switch(b.type){case _u.ELEMENT:return b.closed?r(b,!0)+(b.tmpl?u(b.tmpl,!0):""):b.tmpl?u(b.tmpl)+r(b)+(b.isVoid?u(b.tmpl,!0):""):r(b);case _u.TEMPLATE:return u(b,b.closed);default:return b}}const p1=new class xC{visitText(r){return r.value}visitContainer(r){return r.children.map(u=>u.visit(this)).join("")}visitIcu(r){const u=Object.keys(r.cases).map(L=>`${L} {${r.cases[L].visit(this)}}`);return`{${r.expressionPlaceholder}, ${r.type}, ${u.join(" ")}}`}visitTagPlaceholder(r){return r.isVoid?this.formatPh(r.startName):`${this.formatPh(r.startName)}${r.children.map(u=>u.visit(this)).join("")}${this.formatPh(r.closeName)}`}visitPlaceholder(r){return this.formatPh(r.name)}visitIcuPlaceholder(r,u){return this.formatPh(r.name)}formatPh(r){return`{${Gs(r,!1)}}`}};function Ib(b){return b.visit(p1)}const Py={A:"LINK",B:"BOLD_TEXT",BR:"LINE_BREAK",EM:"EMPHASISED_TEXT",H1:"HEADING_LEVEL1",H2:"HEADING_LEVEL2",H3:"HEADING_LEVEL3",H4:"HEADING_LEVEL4",H5:"HEADING_LEVEL5",H6:"HEADING_LEVEL6",HR:"HORIZONTAL_RULE",I:"ITALIC_TEXT",LI:"LIST_ITEM",LINK:"MEDIA_LINK",OL:"ORDERED_LIST",P:"PARAGRAPH",Q:"QUOTATION",S:"STRIKETHROUGH_TEXT",SMALL:"SMALL_TEXT",SUB:"SUBSTRIPT",SUP:"SUPERSCRIPT",TBODY:"TABLE_BODY",TD:"TABLE_CELL",TFOOT:"TABLE_FOOTER",TH:"TABLE_HEADER_CELL",THEAD:"TABLE_HEADER",TR:"TABLE_ROW",TT:"MONOSPACED_TEXT",U:"UNDERLINED_TEXT",UL:"UNORDERED_LIST"};class Fv{constructor(){this._placeHolderNameCounts={},this._signatureToName={}}getStartTagPlaceholderName(r,u,y){const L=this._hashTag(r,u,y);if(this._signatureToName[L])return this._signatureToName[L];const G=r.toUpperCase(),Te=Py[G]||`TAG_${G}`,Ze=this._generateUniqueName(y?Te:`START_${Te}`);return this._signatureToName[L]=Ze,Ze}getCloseTagPlaceholderName(r){const u=this._hashClosingTag(r);if(this._signatureToName[u])return this._signatureToName[u];const y=r.toUpperCase(),L=Py[y]||`TAG_${y}`,G=this._generateUniqueName(`CLOSE_${L}`);return this._signatureToName[u]=G,G}getPlaceholderName(r,u){const y=r.toUpperCase(),L=`PH: ${y}=${u}`;if(this._signatureToName[L])return this._signatureToName[L];const G=this._generateUniqueName(y);return this._signatureToName[L]=G,G}getUniquePlaceholder(r){return this._generateUniqueName(r.toUpperCase())}_hashTag(r,u,y){return`<${r}`+Object.keys(u).sort().map(Ze=>` ${Ze}=${u[Ze]}`).join("")+(y?"/>":`></${r}>`)}_hashClosingTag(r){return this._hashTag(`/${r}`,{},!1)}_generateUniqueName(r){if(!this._placeHolderNameCounts.hasOwnProperty(r))return this._placeHolderNameCounts[r]=1,r;const y=this._placeHolderNameCounts[r];return this._placeHolderNameCounts[r]=y+1,`${r}_${y}`}}const Nv=new Tb(new Jp);function S_(b){const r=new Bv(Nv,b);return(u,y,L,G,Te)=>r.toI18nMessage(u,y,L,G,Te)}function Oy(b,r){return r}class Bv{constructor(r,u){this._expressionParser=r,this._interpolationConfig=u}toI18nMessage(r,u="",y="",L="",G){const Te={isIcu:1==r.length&&r[0]instanceof Cg,icuDepth:0,placeholderRegistry:new Fv,placeholderToContent:{},placeholderToMessage:{},visitNodeFn:G||Oy},Ze=Al(this,r,Te);return new gl(Ze,Te.placeholderToContent,Te.placeholderToMessage,u,y,L)}visitElement(r,u){const y=Al(this,r.children,u),L={};r.attrs.forEach(Ot=>{L[Ot.name]=Ot.value});const G=Db(r.name).isVoid,Te=u.placeholderRegistry.getStartTagPlaceholderName(r.name,L,G);u.placeholderToContent[Te]={text:r.startSourceSpan.toString(),sourceSpan:r.startSourceSpan};let Ze="";G||(Ze=u.placeholderRegistry.getCloseTagPlaceholderName(r.name),u.placeholderToContent[Ze]={text:`</${r.name}>`,sourceSpan:r.endSourceSpan??r.sourceSpan});const gt=new Pc(r.name,L,Te,Ze,y,G,r.sourceSpan,r.startSourceSpan,r.endSourceSpan);return u.visitNodeFn(r,gt)}visitAttribute(r,u){const y=void 0===r.valueTokens||1===r.valueTokens.length?new ss(r.value,r.valueSpan||r.sourceSpan):this._visitTextWithInterpolation(r.valueTokens,r.valueSpan||r.sourceSpan,u,r.i18n);return u.visitNodeFn(r,y)}visitText(r,u){const y=1===r.tokens.length?new ss(r.value,r.sourceSpan):this._visitTextWithInterpolation(r.tokens,r.sourceSpan,u,r.i18n);return u.visitNodeFn(r,y)}visitComment(r,u){return null}visitExpansion(r,u){u.icuDepth++;const y={},L=new rs(r.switchValue,r.type,y,r.sourceSpan);if(r.cases.forEach(Ze=>{y[Ze.value]=new gc(Ze.expression.map(gt=>gt.visit(this,u)),Ze.expSourceSpan)}),u.icuDepth--,u.isIcu||u.icuDepth>0){const Ze=u.placeholderRegistry.getUniquePlaceholder(`VAR_${r.type}`);return L.expressionPlaceholder=Ze,u.placeholderToContent[Ze]={text:r.switchValue,sourceSpan:r.switchValueSourceSpan},u.visitNodeFn(r,L)}const G=u.placeholderRegistry.getPlaceholderName("ICU",r.sourceSpan.toString());u.placeholderToMessage[G]=this.toI18nMessage([r],"","","",void 0);const Te=new Ol(L,G,r.sourceSpan);return u.visitNodeFn(r,Te)}visitExpansionCase(r,u){throw new Error("Unreachable code")}_visitTextWithInterpolation(r,u,y,L){const G=[];let Te=!1;for(const Ze of r)switch(Ze.type){case 8:case 17:Te=!0;const gt=Ze.parts[1],Ot=h0(gt)||"INTERPOLATION",sn=y.placeholderRegistry.getPlaceholderName(Ot,gt);y.placeholderToContent[sn]={text:Ze.parts.join(""),sourceSpan:Ze.sourceSpan},G.push(new ks(gt,sn,Ze.sourceSpan));break;default:if(Ze.parts[0].length>0){const ci=G[G.length-1];ci instanceof ss?(ci.value+=Ze.parts[0],ci.sourceSpan=new Tu(ci.sourceSpan.start,Ze.sourceSpan.end,ci.sourceSpan.fullStart,ci.sourceSpan.details)):G.push(new ss(Ze.parts[0],Ze.sourceSpan))}}return Te?(function Uv(b,r){if(r instanceof gl&&(function rm(b){const r=b.nodes;if(1!==r.length||!(r[0]instanceof gc))throw new Error("Unexpected previous i18n message - expected it to consist of only a single `Container` node.")}(r),r=r.nodes[0]),r instanceof gc){!function If(b,r){if(b.length!==r.length)throw new Error("The number of i18n message children changed between first and second pass.");if(b.some((u,y)=>r[y].constructor!==u.constructor))throw new Error("The types of the i18n message children changed between first and second pass.")}(r.children,b);for(let u=0;u<b.length;u++)b[u].sourceSpan=r.children[u].sourceSpan}}(G,L),new gc(G,u)):G[0]}}const ku=/\/\/[\s\S]*i18n[\s\S]*\([\s\S]*ph[\s\S]*=[\s\S]*("|')([\s\S]*?)\1[\s\S]*\)/g;function h0(b){return b.split(ku)[2]}class Nc extends Ql{constructor(r,u){super(r,u)}}const g0=(b,r)=>(b instanceof fd&&(r instanceof Ol&&b.i18n instanceof gl&&(r.previousMessage=b.i18n),b.i18n=r),r);class _0{constructor(r=wu,u=!1,y=!1){this.interpolationConfig=r,this.keepI18nAttrs=u,this.enableI18nLegacyMessageIdFormat=y,this.hasI18nMeta=!1,this._errors=[],this._createI18nMessage=S_(this.interpolationConfig)}_generateI18nMessage(r,u="",y){const{meaning:L,description:G,customId:Te}=this._parseMetadata(u),Ze=this._createI18nMessage(r,L,G,Te,y);return this._setMessageId(Ze,u),this._setLegacyIds(Ze,u),Ze}visitAllWithErrors(r){const u=r.map(y=>y.visit(this,null));return new em(u,this._errors)}visitElement(r){let u;if(function ra(b){return b.attrs.some(r=>Zs(r.name))}(r)){this.hasI18nMeta=!0;const y=[],L={};for(const G of r.attrs)if(G.name===Kn){const Te=r.i18n||G.value;u=this._generateI18nMessage(r.children,Te,g0),0===u.nodes.length&&(u=void 0),r.i18n=u}else if(G.name.startsWith($i)){const Te=G.name.slice($i.length);Up(r.name,Te)?this._reportError(G,`Translating attribute '${Te}' is disallowed for security reasons.`):L[Te]=G.value}else y.push(G);if(Object.keys(L).length)for(const G of y){const Te=L[G.name];void 0!==Te&&G.value&&(G.i18n=this._generateI18nMessage([G],G.i18n||Te))}this.keepI18nAttrs||(r.attrs=y)}return Al(this,r.children,u),r}visitExpansion(r,u){let y;const L=r.i18n;if(this.hasI18nMeta=!0,L instanceof Ol){const G=L.name;y=this._generateI18nMessage([r],L);_a(y).name=G,null!==u&&(u.placeholderToMessage[G]=y)}else y=this._generateI18nMessage([r],u||L);return r.i18n=y,r}visitText(r){return r}visitAttribute(r){return r}visitComment(r){return r}visitExpansionCase(r){return r}_parseMetadata(r){return"string"==typeof r?function Kl(b=""){let r,u,y;if(b=b.trim(),b){const L=b.indexOf(Xh),G=b.indexOf(v0);let Te;[Te,r]=L>-1?[b.slice(0,L),b.slice(L+2)]:[b,""],[u,y]=G>-1?[Te.slice(0,G),Te.slice(G+1)]:["",Te]}return{customId:r,meaning:u,description:y}}(r):r instanceof gl?r:{}}_setMessageId(r,u){r.id||(r.id=u instanceof gl&&u.id||re(r))}_setLegacyIds(r,u){if(this.enableI18nLegacyMessageIdFormat)r.legacyIds=[de(r),oe(r)];else if("string"!=typeof u){const y=u instanceof gl?u:u instanceof Ol?u.previousMessage:void 0;r.legacyIds=y?y.legacyIds:[]}}_reportError(r,u){this._errors.push(new Nc(r.sourceSpan,u))}}const v0="|",Xh="@@";const eg="goog.getMsg";function DC(b,r,u,y){const L=function m1(b){return b.nodes.map(r=>r.visit(Bc,null)).join("")}(r),G=[Si(L)];Object.keys(y).length&&(G.push(Hd(Dc(y,!0),!0)),G.push(Hd({original_code:hi(Object.keys(y).map(gt=>({key:Gs(gt),quoted:!0,value:r.placeholders[gt]?Si(r.placeholders[gt].sourceSpan.toString()):Si(r.placeholderToMessage[gt].nodes.map(Ot=>Ot.sourceSpan.toString()).join(""))})))})));const Te=u.set(Qt(eg).callFn(G)).toConstDecl();Te.addLeadingComment(function y0(b){const r=[];return b.description?r.push({tagName:"desc",text:b.description}):r.push({tagName:"suppress",text:"{msgDescriptions}"}),b.meaning&&r.push({tagName:"meaning",text:b.meaning}),It(r)}(r));return[Te,new Cr(b.set(u))]}const Bc=new class wh{formatPh(r){return`{$${Gs(r)}}`}visitText(r){return r.value}visitContainer(r){return r.children.map(u=>u.visit(this)).join("")}visitIcu(r){return Ib(r)}visitTagPlaceholder(r){return r.isVoid?this.formatPh(r.startName):`${this.formatPh(r.startName)}${r.children.map(u=>u.visit(this)).join("")}${this.formatPh(r.closeName)}`}visitPlaceholder(r){return this.formatPh(r.name)}visitIcuPlaceholder(r,u){return this.formatPh(r.name)}};function gE(b,r,u){const{messageParts:y,placeHolders:L}=function f1(b){const r=[],u=new Ly(b.placeholderToMessage,r);return b.nodes.forEach(y=>y.visit(u)),function zv(b){const r=[],u=[];b[0]instanceof pr&&r.push(A_(b[0].sourceSpan.start));for(let y=0;y<b.length;y++){const L=b[y];L instanceof Nn?r.push(L):(u.push(L),b[y-1]instanceof pr&&r.push(A_(b[y-1].sourceSpan.end)))}return b[b.length-1]instanceof pr&&r.push(A_(b[b.length-1].sourceSpan.end)),{messageParts:r,placeHolders:u}}(r)}(r),G=function ky(b){const r=b.nodes[0],u=b.nodes[b.nodes.length-1];return new Tu(r.sourceSpan.fullStart,u.sourceSpan.end,r.sourceSpan.fullStart,r.sourceSpan.details)}(r),Te=L.map(Ot=>u[Ot.text]),Ze=to(r,y,L,Te,G),gt=b.set(Ze);return[new Cr(gt)]}class Ly{constructor(r,u){this.placeholderToMessage=r,this.pieces=u}visitText(r){if(this.pieces[this.pieces.length-1]instanceof Nn)this.pieces[this.pieces.length-1].text+=r.value;else{const u=new Tu(r.sourceSpan.fullStart,r.sourceSpan.end,r.sourceSpan.fullStart,r.sourceSpan.details);this.pieces.push(new Nn(r.value,u))}}visitContainer(r){r.children.forEach(u=>u.visit(this))}visitIcu(r){this.pieces.push(new Nn(Ib(r),r.sourceSpan))}visitTagPlaceholder(r){this.pieces.push(this.createPlaceholderPiece(r.startName,r.startSourceSpan??r.sourceSpan)),r.isVoid||(r.children.forEach(u=>u.visit(this)),this.pieces.push(this.createPlaceholderPiece(r.closeName,r.endSourceSpan??r.sourceSpan)))}visitPlaceholder(r){this.pieces.push(this.createPlaceholderPiece(r.name,r.sourceSpan))}visitIcuPlaceholder(r){this.pieces.push(this.createPlaceholderPiece(r.name,r.sourceSpan,this.placeholderToMessage[r.name]))}createPlaceholderPiece(r,u,y){return new pr(Gs(r,!1),u,y)}}function A_(b){return new Nn("",new Tu(b,b))}const e_=new Set(["$event"]),eh=new Map([["window",$t.resolveWindow],["document",$t.resolveDocument],["body",$t.resolveBody]]),SC=[" ","\n","\r","\t"];function w_(b,r){return Yr(Qt(zt).bitwiseAnd(Si(b),null,!1),r)}function AC(b,r=null,u=null){const{type:y,name:L,target:G,phase:Te,handler:Ze}=b;if(G&&!eh.has(G))throw new Error(`Unexpected global target '${G}' defined for '${L}' event.\n        Supported list of global targets: ${Array.from(eh.keys())}.`);const Ot=new Set,sn=null===u||0===u.bindingLevel?Qt(Xe):u.getOrCreateSharedContextVar(0),ci=Cl(u,sn,Ze,"b",b.handlerSpan,Ot,e_),Ji=[],xr=u?.variableDeclarations(),Hr=u?.restoreViewStatement();if(xr&&Ji.push(...xr),Ji.push(...ci),Hr){Ji.unshift(Hr);const Cc=Ji[Ji.length-1];Cc instanceof Fr?Ji[Ji.length-1]=new Fr(Ca(Cc.value.sourceSpan,$t.resetView,[Cc.value])):Ji.push(new Cr(Ca(null,$t.resetView,[])))}const Do=1===y?function wr(b,r){return`${fi}${b}.${r}`}(L,Te):L,Zo=r&&vs(r),Ko=[];Ot.has("$event")&&Ko.push(new rr("$event",On));const ma=er(Ko,Ji,je,null,Zo),Rl=[Si(Do),ma];return G&&Rl.push(Si(!1),St(eh.get(G))),Rl}class uv{constructor(r,u,y=0,L,G,Te,Ze,gt,Ot,sn,ci=function _E(){return{prepareStatements:[],constExpressions:[],i18nVarRefsCache:new Map}}()){this.constantPool=r,this.level=y,this.contextName=L,this.i18nContext=G,this.templateIndex=Te,this.templateName=Ze,this._namespace=gt,this.i18nUseExternalIds=sn,this._constants=ci,this._dataIndex=0,this._bindingContext=0,this._prefixCode=[],this._creationCodeFns=[],this._updateCodeFns=[],this._currentIndex=0,this._tempVariables=[],this._nestedTemplateFns=[],this.i18n=null,this._pureFunctionSlots=0,this._bindingSlots=0,this._ngContentReservedSlots=[],this._ngContentSelectorsOffset=0,this._implicitReceiverExpr=null,this.visitReference=Is,this.visitVariable=Is,this.visitTextAttribute=Is,this.visitBoundAttribute=Is,this.visitBoundEvent=Is,this._bindingScope=u.nestedScope(y),this.fileBasedI18nSuffix=Ot.replace(/[^A-Za-z0-9]/g,"_")+"_",this._valueConverter=new Sp(r,()=>this.allocateDataSlot(),Ji=>this.allocatePureFunctionSlots(Ji),(Ji,xr,Hr,Do)=>{this._bindingScope.set(this.level,xr,Do),this.creationInstruction(null,$t.pipe,[Si(Hr),Si(Ji)])})}buildTemplateFunction(r,u,y=0,L){this._ngContentSelectorsOffset=y,this._namespace!==$t.namespaceHTML&&this.creationInstruction(null,this._namespace),u.forEach(xr=>this.registerContextVariables(xr));const G=this.i18nContext||Kr(L)&&!os(L)&&!(function b0(b){return 1===b.length&&b[0]instanceof Us}(r)&&r[0].i18n===L),Te=tg(r);if(G&&this.i18nStart(null,L,Te),Da(this,r),this._pureFunctionSlots+=this._bindingSlots,this._valueConverter.updatePipeSlotOffsets(this._bindingSlots),this._nestedTemplateFns.forEach(xr=>xr()),0===this.level&&this._ngContentReservedSlots.length){const xr=[];if(this._ngContentReservedSlots.length>1||"*"!==this._ngContentReservedSlots[0]){const Hr=this._ngContentReservedSlots.map(Do=>"*"!==Do?ve(Do):Do);xr.push(this.constantPool.getConstLiteral(ul(Hr),!0))}this.creationInstruction(null,$t.projectionDef,xr,!0)}G&&this.i18nEnd(null,Te);const Ze=fn(this._creationCodeFns),gt=fn(this._updateCodeFns),Ot=this._bindingScope.viewSnapshotStatements(),sn=this._bindingScope.variableDeclarations().concat(this._tempVariables),ci=Ze.length>0?[w_(1,Ot.concat(Ze))]:[],Ji=gt.length>0?[w_(2,sn.concat(gt))]:[];return er([new rr(zt,Fn),new rr(Xe,null)],[...this._prefixCode,...ci,...Ji],je,null,this.templateName)}getLocal(r){return this._bindingScope.get(r)}notifyImplicitReceiverUse(){this._bindingScope.notifyImplicitReceiverUse()}maybeRestoreView(){this._bindingScope.maybeRestoreView()}i18nTranslate(r,u={},y,L){const G=y||this.i18nGenerateMainBlockVar(),Ze=function CE(b,r,u,y={},L){const G=[zl(r),Yr(Fy(),DC(r,b,u,y),gE(r,b,Dc(y,!1)))];return L&&G.push(new Cr(r.set(L(r)))),G}(r,G,this.i18nGenerateClosureVar(r.id),u,L);return this._constants.prepareStatements.push(...Ze),G}registerContextVariables(r){const u=this._bindingScope.freshReferenceName(),y=this.level,L=Qt(r.name+u);this._bindingScope.set(y,r.name,L,1,(G,Te)=>{let Ze;if(G.bindingLevel===y)G.isListenerScope()&&G.hasRestoreViewVariable()?(Ze=Qt(nr),G.notifyRestoredViewContextUse()):Ze=Qt(Xe);else{Ze=G.getSharedContextName(y)||Ob(Te)}return[L.set(Ze.prop(r.value||"$implicit")).toConstDecl()]})}i18nAppendBindings(r){r.length>0&&r.forEach(u=>this.i18n.appendBinding(u))}i18nBindProps(r){const u={};return Object.keys(r).forEach(y=>{const L=r[y];if(L instanceof Na)u[y]=Si(L.value);else{const G=L.value.visit(this._valueConverter);if(this.allocateBindingSlots(G),G instanceof fu){const{strings:Te,expressions:Ze}=G,{id:gt,bindings:Ot}=this.i18n,sn=function $l(b,r=0,u=0){if(!b.length)return"";let y="";const L=b.length-1;for(let G=0;G<L;G++)y+=`${b[G]}${xl(r+G,u)}`;return y+=b[L],y}(Te,Ot.size,gt);this.i18nAppendBindings(Ze),u[y]=Si(sn)}}}),u}i18nGenerateMainBlockVar(){return Qt(this.constantPool.uniqueName("i18n_"))}i18nGenerateClosureVar(r){let u;const y=this.fileBasedI18nSuffix.toUpperCase();if(this.i18nUseExternalIds){const L=Ed("EXTERNAL_"),G=this.constantPool.uniqueName(y);u=`${L}${vs(r)}$$${G}`}else{const L=Ed(y);u=this.constantPool.uniqueName(L)}return Qt(u)}i18nUpdateRef(r){const{icus:u,meta:y,isRoot:L,isResolved:G,isEmitted:Te}=r;if(L&&G&&!Te&&!os(y)){r.isEmitted=!0;const Ze=r.getSerializedPlaceholders();let gt={},Ot=Ze.size?yu(Ze):{};u.size&&u.forEach((Ji,xr)=>{if(1===Ji.length)Ot[xr]=Ji[0];else{const Hr=xl(`I18N_EXP_${xr}`);Ot[xr]=Si(Hr),gt[xr]=ii(Ji)}});let ci;(Array.from(Ze.values()).some(Ji=>Ji.length>1)||Object.keys(gt).length)&&(ci=Ji=>{const xr=[Ji];return Object.keys(gt).length&&xr.push(Hd(gt,!0)),Ca(null,$t.i18nPostprocess,xr)}),this.i18nTranslate(y,Ot,r.ref,ci)}}i18nStart(r=null,u,y){const L=this.allocateDataSlot();this.i18n=this.i18nContext?this.i18nContext.forkChildContext(L,this.templateIndex,u):new $c(L,this.i18nGenerateMainBlockVar(),0,this.templateIndex,u);const{id:G,ref:Te}=this.i18n,Ze=[Si(L),this.addToConsts(Te)];G>0&&Ze.push(Si(G)),this.creationInstruction(r,y?$t.i18n:$t.i18nStart,Ze)}i18nEnd(r=null,u){if(!this.i18n)throw new Error("i18nEnd is executed with no i18n context present");this.i18nContext?(this.i18nContext.reconcileChildContext(this.i18n),this.i18nUpdateRef(this.i18nContext)):this.i18nUpdateRef(this.i18n);const{index:y,bindings:L}=this.i18n;if(L.size){for(const G of L)this.updateInstructionWithAdvance(this.getConstCount()-1,r,$t.i18nExp,()=>this.convertPropertyBinding(G));this.updateInstruction(r,$t.i18nApply,[Si(y)])}u||this.creationInstruction(r,$t.i18nEnd),this.i18n=null}i18nAttributesInstruction(r,u,y){let L=!1;const G=[];if(u.forEach(Te=>{const Ze=Te.i18n,gt=Te.value.visit(this._valueConverter);if(this.allocateBindingSlots(gt),gt instanceof fu){const sn=yu(_l(Ze));G.push(Si(Te.name),this.i18nTranslate(Ze,sn)),gt.expressions.forEach(ci=>{L=!0,this.updateInstructionWithAdvance(r,y,$t.i18nExp,()=>this.convertPropertyBinding(ci))})}}),G.length>0){const Te=Si(this.allocateDataSlot()),Ze=this.addToConsts(ii(G));this.creationInstruction(y,$t.i18nAttributes,[Te,Ze]),L&&this.updateInstruction(y,$t.i18nApply,[Te])}}getNamespaceInstruction(r){switch(r){case"math":return $t.namespaceMathML;case"svg":return $t.namespaceSVG;default:return $t.namespaceHTML}}addNamespaceInstruction(r,u){this._namespace=r,this.creationInstruction(u.startSourceSpan,r)}interpolatedUpdateInstruction(r,u,y,L,G,Te){this.updateInstructionWithAdvance(u,L.sourceSpan,r,()=>[Si(y),...this.getUpdateInstructionArguments(G),...Te])}visitContent(r){const u=this.allocateDataSlot(),y=this._ngContentSelectorsOffset+this._ngContentReservedSlots.length,L=[Si(u)];this._ngContentReservedSlots.push(r.selector);const G=r.attributes.filter(Ze=>"select"!==Ze.name.toLowerCase()),Te=this.getAttributeExpressions(r.name,G,[],[]);Te.length>0?L.push(Si(y),ii(Te)):0!==y&&L.push(Si(y)),this.creationInstruction(r.sourceSpan,$t.projection,L),this.i18n&&this.i18n.appendProjection(r.i18n,u)}visitElement(r){const u=this.allocateDataSlot(),y=new Bl(null);let L=!1;const G=Kr(r.i18n)&&!os(r.i18n),Te=[],[Ze,gt]=Ya(r.name),Ot=Im(r.name);for(const hs of r.attributes){const{name:od,value:ad}=hs;"ngNonBindable"===od?L=!0:"style"===od?y.registerStyleAttr(ad):"class"===od?y.registerClassAttr(ad):Te.push(hs)}const sn=[Si(u)];Ot||sn.push(Si(gt));const ci=[],Ji=[];r.inputs.forEach(hs=>{y.registerBoundInput(hs)||(0===hs.type&&hs.i18n?Ji.push(hs):ci.push(hs))});const xr=this.getAttributeExpressions(r.name,Te,ci,r.outputs,y,[],Ji);sn.push(this.addAttrsToConsts(xr));const Hr=this.prepareRefsArray(r.references);sn.push(this.addToConsts(Hr));const Do=this._namespace,Zo=this.getNamespaceInstruction(Ze);Zo!==Do&&this.addNamespaceInstruction(Zo,r),this.i18n&&this.i18n.appendElement(r.i18n,u);const Ko=!G&&this.i18n?!tg(r.children):r.children.length>0,ma=!y.hasBindingsWithPipes&&0===r.outputs.length&&0===Ji.length&&!Ko,Rl=!ma&&tg(r.children);if(ma)this.creationInstruction(r.sourceSpan,Ot?$t.elementContainer:$t.element,Qu(sn));else{if(this.creationInstruction(r.startSourceSpan,Ot?$t.elementContainerStart:$t.elementStart,Qu(sn)),L&&this.creationInstruction(r.startSourceSpan,$t.disableBindings),Ji.length>0&&this.i18nAttributesInstruction(u,Ji,r.startSourceSpan??r.sourceSpan),r.outputs.length>0)for(const hs of r.outputs)this.creationInstruction(hs.sourceSpan,$t.listener,this.prepareListenerParameter(r.name,hs,u));G&&this.i18nStart(r.startSourceSpan,r.i18n,Rl)}const Cc=y.buildUpdateLevelInstructions(this._valueConverter),km=Cc.length-1;for(let hs=0;hs<=km;hs++){const od=Cc[hs];this._bindingSlots+=this.processStylingUpdateInstruction(u,od)}const Rm=Si(void 0),Pp=[],Uf=[];ci.forEach(hs=>{const od=hs.type;if(4===od){const ad=hs.value.visit(this._valueConverter),ph=!(ad instanceof Zp)||!!ad.value;this.allocateBindingSlots(ad),Pp.push({span:hs.sourceSpan,paramsOrFn:Ih(()=>ph?this.convertPropertyBinding(ad):Rm,Xi(hs.name))})}else{if(hs.i18n)return;const ad=hs.value.visit(this._valueConverter);if(void 0!==ad){const ph=[],[u_,d_]=Ya(hs.name),sC=1===od;let Xa=Dg(hs.securityContext,sC);if(Xa||function Of(b){return"iframe"===b.toLowerCase()}(r.name)&&fp(hs.name)&&(Xa=St($t.validateIframeAttribute)),Xa&&ph.push(Xa),u_){const Ms=Si(u_);Xa?ph.push(Ms):ph.push(Si(null),Ms)}if(this.allocateBindingSlots(ad),0===od)ad instanceof fu?this.interpolatedUpdateInstruction(t_(ad),u,d_,hs,ad,ph):Pp.push({span:hs.sourceSpan,paramsOrFn:Ih(()=>this.convertPropertyBinding(ad),d_,ph)});else if(1===od)if(ad instanceof fu&&dt(ad)>1)this.interpolatedUpdateInstruction(function Lb(b){switch(dt(b)){case 3:return $t.attributeInterpolate1;case 5:return $t.attributeInterpolate2;case 7:return $t.attributeInterpolate3;case 9:return $t.attributeInterpolate4;case 11:return $t.attributeInterpolate5;case 13:return $t.attributeInterpolate6;case 15:return $t.attributeInterpolate7;case 17:return $t.attributeInterpolate8;default:return $t.attributeInterpolateV}}(ad),u,d_,hs,ad,ph);else{const Ms=ad instanceof fu?ad.expressions[0]:ad;Uf.push({span:hs.sourceSpan,paramsOrFn:Ih(()=>this.convertPropertyBinding(Ms),d_,ph)})}else this.updateInstructionWithAdvance(u,hs.sourceSpan,$t.classProp,()=>[Si(u),Si(d_),this.convertPropertyBinding(ad),...ph])}}});for(const hs of Pp)this.updateInstructionWithAdvance(u,hs.span,$t.property,hs.paramsOrFn);for(const hs of Uf)this.updateInstructionWithAdvance(u,hs.span,$t.attribute,hs.paramsOrFn);if(Da(this,r.children),!G&&this.i18n&&this.i18n.appendElement(r.i18n,u,!0),!ma){const hs=r.endSourceSpan??r.sourceSpan;G&&this.i18nEnd(hs,Rl),L&&this.creationInstruction(hs,$t.enableBindings),this.creationInstruction(hs,Ot?$t.elementContainerEnd:$t.elementEnd)}}visitTemplate(r){const u="ng-template",y=this.allocateDataSlot();this.i18n&&this.i18n.appendTemplate(r.i18n,y);const L=r.tagName?Ya(r.tagName)[1]:r.tagName,G=`${this.contextName}${r.tagName?"_"+vs(r.tagName):""}_${y}`,Te=`${G}_Template`,Ze=[Si(y),Qt(Te),Si(L)],gt=this.getAttributeExpressions(u,r.attributes,r.inputs,r.outputs,void 0,r.templateAttrs);if(Ze.push(this.addAttrsToConsts(gt)),r.references&&r.references.length){const sn=this.prepareRefsArray(r.references);Ze.push(this.addToConsts(sn)),Ze.push(St($t.templateRefExtractor))}const Ot=new uv(this.constantPool,this._bindingScope,this.level+1,G,this.i18n,y,Te,this._namespace,this.fileBasedI18nSuffix,this.i18nUseExternalIds,this._constants);if(this._nestedTemplateFns.push(()=>{const sn=Ot.buildTemplateFunction(r.children,r.variables,this._ngContentReservedSlots.length+this._ngContentSelectorsOffset,r.i18n);this.constantPool.statements.push(sn.toDeclStmt(Te)),Ot._ngContentReservedSlots.length&&this._ngContentReservedSlots.push(...Ot._ngContentReservedSlots)}),this.creationInstruction(r.sourceSpan,$t.templateCreate,()=>(Ze.splice(2,0,Si(Ot.getConstCount()),Si(Ot.getVarCount())),Qu(Ze))),this.templatePropertyBindings(y,r.templateAttrs),L===u){const[sn,ci]=function Jn(b,r){const u=[],y=[];for(const L of b)(r(L)?u:y).push(L);return[u,y]}(r.inputs,_s);sn.length>0&&this.i18nAttributesInstruction(y,sn,r.startSourceSpan??r.sourceSpan),ci.length>0&&this.templatePropertyBindings(y,ci);for(const Ji of r.outputs)this.creationInstruction(Ji.sourceSpan,$t.listener,this.prepareListenerParameter("ng_template",Ji,y))}}visitBoundText(r){if(this.i18n){const L=r.value.visit(this._valueConverter);return this.allocateBindingSlots(L),void(L instanceof fu&&(this.i18n.appendBoundText(r.i18n),this.i18nAppendBindings(L.expressions)))}const u=this.allocateDataSlot();this.creationInstruction(r.sourceSpan,$t.text,[Si(u)]);const y=r.value.visit(this._valueConverter);this.allocateBindingSlots(y),y instanceof fu?this.updateInstructionWithAdvance(u,r.sourceSpan,function bE(b){switch(dt(b)){case 1:return $t.textInterpolate;case 3:return $t.textInterpolate1;case 5:return $t.textInterpolate2;case 7:return $t.textInterpolate3;case 9:return $t.textInterpolate4;case 11:return $t.textInterpolate5;case 13:return $t.textInterpolate6;case 15:return $t.textInterpolate7;case 17:return $t.textInterpolate8;default:return $t.textInterpolateV}}(y),()=>this.getUpdateInstructionArguments(y)):Cs("Text nodes should be interpolated and never bound directly.")}visitText(r){this.i18n||this.creationInstruction(r.sourceSpan,$t.text,[Si(this.allocateDataSlot()),Si(r.value)])}visitIcu(r){let u=!1;this.i18n||(u=!0,this.i18nStart(null,r.i18n,!0));const y=this.i18n,L=this.i18nBindProps(r.vars),G=this.i18nBindProps(r.placeholders),Te=r.i18n,Ze=gt=>{const sn=Dc({...L,...G},!1);return Ca(null,$t.i18nPostprocess,[gt,Hd(sn,!0)])};if(os(y.meta))this.i18nTranslate(Te,{},y.ref,Ze);else{const gt=this.i18nTranslate(Te,{},void 0,Ze);y.appendIcu(_a(Te).name,gt)}return u&&this.i18nEnd(null,!0),null}allocateDataSlot(){return this._dataIndex++}getConstCount(){return this._dataIndex}getVarCount(){return this._pureFunctionSlots}getConsts(){return this._constants}getNgContentSelectors(){return this._ngContentReservedSlots.length?this.constantPool.getConstLiteral(ul(this._ngContentReservedSlots),!0):null}bindingContext(){return""+this._bindingContext++}templatePropertyBindings(r,u){const y=[];for(const L of u){if(!(L instanceof $o))continue;const G=L.value.visit(this._valueConverter);if(void 0!==G)if(this.allocateBindingSlots(G),G instanceof fu){const Te=[];this.interpolatedUpdateInstruction(t_(G),r,L.name,L,G,Te)}else y.push({span:L.sourceSpan,paramsOrFn:Ih(()=>this.convertPropertyBinding(G),L.name)})}for(const L of y)this.updateInstructionWithAdvance(r,L.span,$t.property,L.paramsOrFn)}instructionFn(r,u,y,L,G=!1){r[G?"unshift":"push"]({span:u,reference:y,paramsOrFn:L})}processStylingUpdateInstruction(r,u){let y=0;if(u)for(const L of u.calls)y+=L.allocateBindingSlots,this.updateInstructionWithAdvance(r,L.sourceSpan,u.reference,()=>L.params(G=>L.supportsInterpolation&&G instanceof fu?this.getUpdateInstructionArguments(G):this.convertPropertyBinding(G)));return y}creationInstruction(r,u,y,L){this.instructionFn(this._creationCodeFns,r,u,y||[],L)}updateInstructionWithAdvance(r,u,y,L){this.addAdvanceInstructionIfNecessary(r,u),this.updateInstruction(u,y,L)}updateInstruction(r,u,y){this.instructionFn(this._updateCodeFns,r,u,y||[])}addAdvanceInstructionIfNecessary(r,u){if(r!==this._currentIndex){const y=r-this._currentIndex;if(y<1)throw new Error("advance instruction can only go forwards");this.instructionFn(this._updateCodeFns,u,$t.advance,[Si(y)]),this._currentIndex=r}}allocatePureFunctionSlots(r){const u=this._pureFunctionSlots;return this._pureFunctionSlots+=r,u}allocateBindingSlots(r){this._bindingSlots+=r instanceof fu?r.expressions.length:1}getImplicitReceiverExpr(){return this._implicitReceiverExpr?this._implicitReceiverExpr:this._implicitReceiverExpr=0===this.level?Qt(Xe):this._bindingScope.getOrCreateSharedContextVar(0)}convertPropertyBinding(r){const u=Sm(this,this.getImplicitReceiverExpr(),r,this.bindingContext()),y=u.currValExpr;return this._tempVariables.push(...u.stmts),y}getUpdateInstructionArguments(r){const{args:u,stmts:y}=function zm(b,r,u,y){const L=new $f(b,r,y,!0),G=L.visitInterpolation(u,yr.Expression);return L.usesImplicitReceiver&&b.notifyImplicitReceiverUse(),{stmts:J_(L,y),args:G.args}}(this,this.getImplicitReceiverExpr(),r,this.bindingContext());return this._tempVariables.push(...y),u}getAttributeExpressions(r,u,y,L,G,Te=[],Ze=[]){const gt=new Set,Ot=[];let sn;for(const Ji of u)if("ngProjectAs"===Ji.name&&(sn=Ji),Ji.i18n){const{i18nVarRefsCache:xr}=this._constants;let Hr;xr.has(Ji.i18n)?Hr=xr.get(Ji.i18n):(Hr=this.i18nTranslate(Ji.i18n),xr.set(Ji.i18n,Hr)),Ot.push(Si(Ji.name),Hr)}else Ot.push(...rd(Ji.name),Vv(r,Ji));function ci(Ji,xr){"string"==typeof Ji?gt.has(Ji)||(Ot.push(...rd(Ji)),void 0!==xr&&Ot.push(xr),gt.add(Ji)):Ot.push(Si(Ji))}if(sn&&Ot.push(...function Ry(b){const r=ve(b.value)[0];return[Si(5),ul(r)]}(sn)),G&&G.populateInitialStylingAttrs(Ot),y.length||L.length){const Ji=Ot.length;for(let xr=0;xr<y.length;xr++){const Hr=y[xr];4!==Hr.type&&1!==Hr.type&&ci(Hr.name)}for(let xr=0;xr<L.length;xr++){const Hr=L[xr];1!==Hr.type&&ci(Hr.name)}Ot.length!==Ji&&Ot.splice(Ji,0,Si(3))}return Te.length&&(Ot.push(Si(4)),Te.forEach(Ji=>ci(Ji.name))),Ze.length&&(Ot.push(Si(6)),Ze.forEach(Ji=>ci(Ji.name))),Ot}addToConsts(r){if(Oa(r))return ei;const u=this._constants.constExpressions;for(let y=0;y<u.length;y++)if(u[y].isEquivalent(r))return Si(y);return Si(u.push(r)-1)}addAttrsToConsts(r){return r.length>0?this.addToConsts(ii(r)):ei}prepareRefsArray(r){if(!r||0===r.length)return ei;return ul(r.flatMap(y=>{const L=this.allocateDataSlot(),G=this._bindingScope.freshReferenceName(),Te=this.level,Ze=Qt(G);return this._bindingScope.set(Te,y.name,Ze,0,(gt,Ot)=>{const sn=Ot>0?[Ob(Ot).toStmt()]:[],ci=Ze.set(St($t.reference).callFn([Si(L)]));return sn.concat(ci.toConstDecl())},!0),[y.name,y.value]}))}prepareListenerParameter(r,u,y){return()=>{const L=u.name,G=1===u.type?ro(L,u.phase):vs(L),Te=`${this.templateName}_${r}_${G}_${y}_listener`,Ze=this._bindingScope.nestedScope(this._bindingScope.bindingLevel,e_);return AC(u,Te,Ze)}}}class Sp extends pp{constructor(r,u,y,L){super(),this.constantPool=r,this.allocateSlot=u,this.allocatePureFunctionSlots=y,this.definePipe=L,this._pipeBindExprs=[]}visitPipe(r,u){const y=this.allocateSlot(),L=`PIPE:${y}`,G=this.allocatePureFunctionSlots(2+r.args.length),Te=new ud(r.span,r.sourceSpan,r.nameSpan,new sm(r.span,r.sourceSpan),L),{identifier:Ze,isVarLength:gt}=function Pb(b){const r=Yv[b.length];return{identifier:r||$t.pipeBindV,isVarLength:!r}}(r.args);this.definePipe(r.name,L,y,St(Ze));const Ot=[r.exp,...r.args],sn=gt?this.visitAll([new $d(r.span,r.sourceSpan,Ot)]):this.visitAll(Ot),ci=new as(r.span,r.sourceSpan,Te,[new Zp(r.span,r.sourceSpan,y),new Zp(r.span,r.sourceSpan,G),...sn],null);return this._pipeBindExprs.push(ci),ci}updatePipeSlotOffsets(r){this._pipeBindExprs.forEach(u=>{u.args[1].value+=r})}visitLiteralArray(r,u){return new Va(r.span,r.sourceSpan,this.visitAll(r.expressions),y=>{const L=ii(y);return ep(this.constantPool,L,this.allocatePureFunctionSlots)})}visitLiteralMap(r,u){return new Va(r.span,r.sourceSpan,this.visitAll(r.values),y=>{const L=hi(y.map((G,Te)=>({key:r.keys[Te].key,value:G,quoted:r.keys[Te].quoted})));return ep(this.constantPool,L,this.allocatePureFunctionSlots)})}}const Yv=[$t.pipeBind1,$t.pipeBind2,$t.pipeBind3,$t.pipeBind4];const vE=[$t.pureFunction0,$t.pureFunction1,$t.pureFunction2,$t.pureFunction3,$t.pureFunction4,$t.pureFunction5,$t.pureFunction6,$t.pureFunction7,$t.pureFunction8];function Ob(b){return St($t.nextContext).callFn(b>1?[Si(b)]:[])}function ep(b,r,u){const{literalFactory:y,literalFactoryArguments:L}=b.getLiteralFactory(r),G=u(1+L.length),{identifier:Te,isVarLength:Ze}=function mf(b){const r=vE[b.length];return{identifier:r||$t.pureFunctionV,isVarLength:!r}}(L),gt=[Si(G),y];return Ze?gt.push(ii(L)):gt.push(...L),St(Te).callFn(gt)}function rd(b){const[r,u]=Ya(b),y=Si(u);return r?[Si(0),Si(r),y]:[y]}const Pf="$$shared_ctx$$";class I_{static createRootScope(){return new I_}constructor(r=0,u=null,y){if(this.bindingLevel=r,this.parent=u,this.globals=y,this.map=new Map,this.referenceNameIndex=0,this.restoreViewVariable=null,this.usesRestoredViewContext=!1,void 0!==y)for(const L of y)this.set(0,L,Qt(L))}get(r){let u=this;for(;u;){let y=u.map.get(r);if(null!=y)return u!==this&&(y={retrievalLevel:y.retrievalLevel,lhs:y.lhs,declareLocalCallback:y.declareLocalCallback,declare:!1,priority:y.priority},this.map.set(r,y),this.maybeGenerateSharedContextVar(y),this.maybeRestoreView()),y.declareLocalCallback&&!y.declare&&(y.declare=!0),y.lhs;u=u.parent}return 0===this.bindingLevel?null:this.getComponentProperty(r)}set(r,u,y,L=0,G,Te){if(this.map.has(u)){if(Te)return this;Cs(`The name ${u} is already defined in scope to be ${this.map.get(u)}`)}return this.map.set(u,{retrievalLevel:r,lhs:y,declare:!1,declareLocalCallback:G,priority:L}),this}getLocal(r){return this.get(r)}notifyImplicitReceiverUse(){0!==this.bindingLevel&&(this.map.get(Pf+0).declare=!0)}nestedScope(r,u){const y=new I_(r,this,u);return r>0&&y.generateSharedContextVar(0),y}getOrCreateSharedContextVar(r){const u=Pf+r;return this.map.has(u)||this.generateSharedContextVar(r),this.map.get(u).lhs}getSharedContextName(r){const u=this.map.get(Pf+r);return u&&u.declare?u.lhs:null}maybeGenerateSharedContextVar(r){if(1===r.priority&&r.retrievalLevel<this.bindingLevel){const u=this.map.get(Pf+r.retrievalLevel);u?u.declare=!0:this.generateSharedContextVar(r.retrievalLevel)}}generateSharedContextVar(r){const u=Qt(Xe+this.freshReferenceName());this.map.set(Pf+r,{retrievalLevel:r,lhs:u,declareLocalCallback:(y,L)=>[u.set(Ob(L)).toConstDecl()],declare:!1,priority:2})}getComponentProperty(r){const u=this.map.get(Pf+0);return u.declare=!0,this.maybeRestoreView(),u.lhs.prop(r)}maybeRestoreView(){this.isListenerScope()&&(this.parent.restoreViewVariable||(this.parent.restoreViewVariable=Qt(this.parent.freshReferenceName())),this.restoreViewVariable=this.parent.restoreViewVariable)}restoreViewStatement(){if(this.restoreViewVariable){const r=Ca(null,$t.restoreView,[this.restoreViewVariable]);return this.usesRestoredViewContext?Qt(nr).set(r).toConstDecl():r.toStmt()}return null}viewSnapshotStatements(){return this.restoreViewVariable?[this.restoreViewVariable.set(Ca(null,$t.getCurrentView,[])).toConstDecl()]:[]}isListenerScope(){return this.parent&&this.parent.bindingLevel===this.bindingLevel}variableDeclarations(){let r=0;return Array.from(this.map.values()).filter(u=>u.declare).sort((u,y)=>y.retrievalLevel-u.retrievalLevel||y.priority-u.priority).reduce((u,y)=>{const L=this.bindingLevel-y.retrievalLevel,G=y.declareLocalCallback(this,L-r);return r=L,u.concat(G)},[])}freshReferenceName(){let r=this;for(;r.parent;)r=r.parent;return"_r"+r.referenceNameIndex++}hasRestoreViewVariable(){return!!this.restoreViewVariable}notifyRestoredViewContextUse(){this.usesRestoredViewContext=!0}}function t_(b){switch(dt(b)){case 1:return $t.propertyInterpolate;case 3:return $t.propertyInterpolate1;case 5:return $t.propertyInterpolate2;case 7:return $t.propertyInterpolate3;case 9:return $t.propertyInterpolate4;case 11:return $t.propertyInterpolate5;case 13:return $t.propertyInterpolate6;case 15:return $t.propertyInterpolate7;case 17:return $t.propertyInterpolate8;default:return $t.propertyInterpolateV}}function dv(b,r,u={}){const{interpolationConfig:y,preserveWhitespaces:L,enableI18nLegacyMessageIdFormat:G}=u,Te=xg(y),gt=(new kv).parse(b,r,{leadingTriviaChars:SC,...u,tokenizeExpansionForms:!0});if(!u.alwaysAttemptHtmlToR3AstConversion&&gt.errors&&gt.errors.length>0){const Rl={interpolationConfig:y,preserveWhitespaces:L,errors:gt.errors,nodes:[],styleUrls:[],styles:[],ngContentSelectors:[]};return u.collectCommentNodes&&(Rl.commentNodes=[]),Rl}let Ot=gt.rootNodes;const sn=new _0(y,!L,G),ci=sn.visitAllWithErrors(Ot);if(!u.alwaysAttemptHtmlToR3AstConversion&&ci.errors&&ci.errors.length>0){const Rl={interpolationConfig:y,preserveWhitespaces:L,errors:ci.errors,nodes:[],styleUrls:[],styles:[],ngContentSelectors:[]};return u.collectCommentNodes&&(Rl.commentNodes=[]),Rl}Ot=ci.rootNodes,L||(Ot=Al(new qf,Ot),sn.hasI18nMeta&&(Ot=Al(new _0(y,!1),Ot)));const{nodes:Ji,errors:xr,styleUrls:Hr,styles:Do,ngContentSelectors:Zo,commentNodes:Ko}=function fm(b,r,u){const y=new lv(r,u),Te={nodes:Al(y,b),errors:r.errors.concat(y.errors),styleUrls:y.styleUrls,styles:y.styles,ngContentSelectors:y.ngContentSelectors};return u.collectCommentNodes&&(Te.commentNodes=y.commentNodes),Te}(Ot,Te,{collectCommentNodes:!!u.collectCommentNodes});xr.push(...gt.errors,...ci.errors);const ma={interpolationConfig:y,preserveWhitespaces:L,errors:xr.length>0?xr:null,nodes:Ji,styleUrls:Hr,styles:Do,ngContentSelectors:Zo};return u.collectCommentNodes&&(ma.commentNodes=Ko),ma}const Hv=new Fp;function xg(b=wu){return new Sy(new Tb(new Jp),b,Hv,[])}function Dg(b,r){switch(b){case V.HTML:return St($t.sanitizeHtml);case V.SCRIPT:return St($t.sanitizeScript);case V.STYLE:return r?St($t.sanitizeStyle):null;case V.URL:return St($t.sanitizeUrl);case V.RESOURCE_URL:return St($t.sanitizeResourceUrl);default:return null}}function Vv(b,r){const u=ul(r.value);if(!Up(b,r.name))return u;switch(Hv.securityContext(b,r.name,!0)){case V.HTML:return _o(St($t.trustConstantHtml),new oi([new Ni(r.value)],[]),void 0,r.valueSpan);case V.RESOURCE_URL:return _o(St($t.trustConstantResourceUrl),new oi([new Ni(r.value)],[]),void 0,r.valueSpan);default:return u}}function Zv(b){return b instanceof Na||b instanceof qi||b instanceof hl}function tg(b){return b.every(Zv)}function Ih(b,r,u){return()=>{const y=b(),L=Array.isArray(y)?y:[y];return u&&L.push(...u),r&&L.unshift(Si(r)),L}}const Lf="ngI18nClosureMode";function Fy(){return Ln(Qt(Lf)).notIdentical(Si("undefined",ui)).and(Qt(Lf))}const g1=/attr\.([^\]]+)/,Gv="_nghost-%COMP%",Wv="_ngcontent-%COMP%";function zp(b,r,u){const y=new q,L=ve(b.selector);return y.set("type",b.internalType),L.length>0&&y.set("selectors",ul(L)),b.queries.length>0&&y.set("contentQueries",function y1(b,r,u){const y=[],L=[],G=Ba(L,Lc);for(const Ze of b){y.push(St($t.contentQuery).callFn([Qt("dirIndex"),...Rb(Ze,r)]).toStmt());const gt=G(),Ot=St($t.loadQuery).callFn([]),sn=St($t.queryRefresh).callFn([gt.set(Ot)]),ci=Qt(Xe).prop(Ze.propertyName).set(Ze.first?gt.prop("first"):gt);L.push(sn.and(ci).toStmt())}const Te=u?`${u}_ContentQueries`:null;return er([new rr(zt,Fn),new rr(Xe,null),new rr("dirIndex",null)],[w_(1,y),w_(2,L)],je,null,Te)}(b.queries,r,b.name)),b.viewQueries.length&&y.set("viewQuery",function xE(b,r,u){const y=[],L=[],G=Ba(L,Lc);b.forEach(Ze=>{const gt=St($t.viewQuery).callFn(Rb(Ze,r));y.push(gt.toStmt());const Ot=G(),sn=St($t.loadQuery).callFn([]),ci=St($t.queryRefresh).callFn([Ot.set(sn)]),Ji=Qt(Xe).prop(Ze.propertyName).set(Ze.first?Ot.prop("first"):Ot);L.push(ci.and(Ji).toStmt())});const Te=u?`${u}_Query`:null;return er([new rr(zt,Fn),new rr(Xe,null)],[w_(1,y),w_(2,L)],je,null,Te)}(b.viewQueries,r,b.name)),y.set("hostBindings",function Fb(b,r,u,y,L,G,Te){const Ze=Qt(Xe),gt=new Bl(Ze),{styleAttr:Ot,classAttr:sn}=b.specialAttributes;void 0!==Ot&&gt.registerStyleAttr(Ot),void 0!==sn&&gt.registerClassAttr(sn);const ci=[],Ji=[],xr=[],Hr=r,Do=u.createDirectiveHostEventAsts(b.listeners,Hr);Do&&Do.length&&ci.push(...function IC(b,r){const u=[],y=[],L=[];for(const G of b){let Te=G.name&&vs(G.name);const Ze=1===G.type?ro(Te,G.targetOrPhase):Te,gt=r&&Te?`${r}_${Ze}_HostBindingHandler`:null,Ot=AC(su.fromParsedEvent(G),gt);1==G.type?y.push(Ot):u.push(Ot)}for(const G of y)L.push({reference:$t.syntheticHostListener,paramsOrFn:G,span:null});for(const G of u)L.push({reference:$t.listener,paramsOrFn:G,span:null});return L}(Do,G));const Zo=u.createBoundHostProperties(b.properties,Hr),Ko=[];let Rl,ma=0;Zo&&Zo.forEach(hs=>{gt.registerInputBasedOnName(hs.name,hs.expression,Hr)?ma+=yp:(Ko.push(hs),ma++)});const Cc=()=>{if(!Rl){Rl=new Sp(y,()=>Cs("Unexpected node"),od=>{const ad=ma;return ma+=od,ad},()=>Cs("Unexpected pipe"))}return Rl},km=[],Rm=[],Pp=[];for(const hs of Ko){const od=hs.expression.visit(Cc()),ad=mv(Ze,od),{bindingName:ph,instruction:u_,isAttribute:d_}=C1(hs),sC=u.calcPossibleSecurityContexts(L,ph,d_).filter(Il=>Il!==V.NONE);let Xa=null;sC.length&&(Xa=2===sC.length&&sC.indexOf(V.URL)>-1&&sC.indexOf(V.RESOURCE_URL)>-1?St($t.sanitizeUrlOrResourceUrl):Dg(sC[0],d_));const Ms=[Si(ph),ad.currValExpr];Xa?Ms.push(Xa):fp(ph)&&Ms.push(St($t.validateIframeAttribute)),xr.push(...ad.stmts),u_===$t.hostProperty?km.push(Ms):u_===$t.attribute?Rm.push(Ms):u_===$t.syntheticHostProperty?Pp.push(Ms):Ji.push({reference:u_,paramsOrFn:Ms,span:null})}for(const hs of km)Ji.push({reference:$t.hostProperty,paramsOrFn:hs,span:null});for(const hs of Rm)Ji.push({reference:$t.attribute,paramsOrFn:hs,span:null});for(const hs of Pp)Ji.push({reference:$t.syntheticHostProperty,paramsOrFn:hs,span:null});const Uf=function TE(b){const r=[];for(let u of Object.getOwnPropertyNames(b)){const y=b[u];r.push(Si(u),y)}return r}(b.attributes);if(gt.assignHostAttrs(Uf,Te),gt.hasBindings&&gt.buildUpdateLevelInstructions(Cc()).forEach(hs=>{for(const od of hs.calls)ma+=Math.max(od.allocateBindingSlots-yp,0),Ji.push({reference:hs.reference,paramsOrFn:b1(od,Ze,mv),span:null})}),ma&&Te.set("hostVars",Si(ma)),ci.length>0||Ji.length>0){const hs=G?`${G}_HostBindings`:null,od=[];return ci.length>0&&od.push(w_(1,fn(ci))),Ji.length>0&&od.push(w_(2,xr.concat(fn(Ji)))),er([new rr(zt,Fn),new rr(Xe,null)],od,je,null,hs)}return null}(b.host,b.typeSourceSpan,u,r,b.selector||"",b.name,y)),y.set("inputs",bu(b.inputs,!0)),y.set("outputs",bu(b.outputs)),null!==b.exportAs&&y.set("exportAs",ii(b.exportAs.map(G=>Si(G)))),b.isStandalone&&y.set("standalone",Si(!0)),y}function Ny(b,r){const u=[],y=r.providers,L=r.viewProviders;if(y||L){const G=[y||new Zn([])];L&&G.push(L),u.push(St($t.ProvidersFeature).callFn(G))}r.usesInheritance&&u.push(St($t.InheritDefinitionFeature)),r.fullInheritance&&u.push(St($t.CopyDefinitionFeature)),r.lifecycle.usesOnChanges&&u.push(St($t.NgOnChangesFeature)),r.hasOwnProperty("template")&&r.isStandalone&&u.push(St($t.StandaloneFeature)),r.hostDirectives?.length&&u.push(St($t.HostDirectivesFeature).callFn([Ag(r.hostDirectives)])),u.length&&b.set("features",ii(u))}function By(b,r,u){const y=zp(b,r,u);Ny(y,b);const L=b.selector&&l.parse(b.selector),G=L&&L[0];if(G){const Ko=G.getAttrs();Ko.length&&y.set("attrs",r.getConstLiteral(ii(Ko.map(ma=>Si(null!=ma?ma:void 0))),!0))}const Te=b.name,Ze=Te?`${Te}_Template`:null,gt=b.changeDetection,Ot=b.template,sn=new uv(r,I_.createRootScope(),0,Te,null,null,Ze,$t.namespaceHTML,b.relativeContextFilePath,b.i18nUseExternalIds),ci=sn.buildTemplateFunction(Ot.nodes,[]),Ji=sn.getNgContentSelectors();Ji&&y.set("ngContentSelectors",Ji),y.set("decls",Si(sn.getConstCount())),y.set("vars",Si(sn.getVarCount()));const{constExpressions:xr,prepareStatements:Hr}=sn.getConsts();if(xr.length>0){let Ko=ii(xr);Hr.length>0&&(Ko=er([],[...Hr,new Fr(Ko)])),y.set("consts",Ko)}if(y.set("template",ci),b.declarations.length>0&&y.set("dependencies",function EE(b,r){switch(r){case 0:return b;case 1:return er([],[new Fr(b)]);case 2:const u=b.prop("map").callFn([St($t.resolveForwardRef)]);return er([],[new Fr(u)])}}(ii(b.declarations.map(Ko=>Ko.type)),b.declarationListEmitMode)),null===b.encapsulation&&(b.encapsulation=n.Emulated),b.styles&&b.styles.length){const ma=(b.encapsulation==n.Emulated?function OC(b,r,u){const y=new Uh;return b.map(L=>y.shimCssText(L,r,u))}(b.styles,Wv,Gv):b.styles).reduce((Rl,Cc)=>(Cc.trim().length>0&&Rl.push(r.getConstLiteral(Si(Cc))),Rl),[]);ma.length>0&&y.set("styles",ii(ma))}else b.encapsulation===n.Emulated&&(b.encapsulation=n.None);b.encapsulation!==n.Emulated&&y.set("encapsulation",Si(b.encapsulation)),null!==b.animations&&y.set("data",hi([{key:"animation",value:b.animations,quoted:!1}])),null!=gt&&gt!==P.Default&&y.set("changeDetection",Si(gt));return{expression:St($t.defineComponent).callFn([y.toLiteralMap()],void 0,!0),type:v1(b),statements:[]}}function v1(b){const r=Uy(b);return r.push(ng(b.template.ngContentSelectors)),r.push(cn(Si(b.isStandalone))),r.push(zy(b)),cn(St($t.ComponentDeclaration,r))}function Rb(b,r){const u=[_t(b,r),Si(ME(b))];return b.read&&u.push(b.read),u}function ME(b){return(b.descendants?1:0)|(b.static?2:0)|(b.emitDistinctChangesOnly?4:0)}function wC(b){return cn(Si(b))}function pv(b){return hi(Object.keys(b).map(u=>({key:u,value:Si(Array.isArray(b[u])?b[u][0]:b[u]),quoted:!0})))}function ng(b){return b.length>0?cn(ii(b.map(r=>Si(r)))):si}function Uy(b){const r=null!==b.selector?b.selector.replace(/\n/g,""):null;return[Qn(b.type.type,b.typeArgumentCount),null!==r?wC(r):si,null!==b.exportAs?ng(b.exportAs):si,cn(pv(b.inputs)),cn(pv(b.outputs)),ng(b.queries.map(u=>u.propertyName))]}function Sg(b){const r=Uy(b);return r.push(si),r.push(cn(Si(b.isStandalone))),r.push(zy(b)),cn(St($t.DirectiveDeclaration,r))}function mv(b,r){return Sm(null,b,r,"b")}function b1(b,r,u){return b.params(y=>u(r,y).currValExpr)}function C1(b){let u,r=b.name;const y=r.match(g1);return y?(r=y[1],u=$t.attribute):b.isAnimation?(r=Xi(r),u=$t.syntheticHostProperty):u=$t.hostProperty,{bindingName:r,instruction:u,isAttribute:!!y}}const PC=/^(?:\[([^\]]+)\])|(?:\(([^\)]+)\))$/;function zy(b){return b.hostDirectives?.length?cn(ii(b.hostDirectives.map(r=>hi([{key:"directive",value:Ln(r.directive.type),quoted:!1},{key:"inputs",value:pv(r.inputs||{}),quoted:!1},{key:"outputs",value:pv(r.outputs||{}),quoted:!1}])))):si}function Ag(b){const r=[];let u=!1;for(const y of b){if(y.inputs||y.outputs){const L=[{key:"directive",value:y.directive.type,quoted:!1}];if(y.inputs){const G=Yy(y.inputs);G&&L.push({key:"inputs",value:G,quoted:!1})}if(y.outputs){const G=Yy(y.outputs);G&&L.push({key:"outputs",value:G,quoted:!1})}r.push(hi(L))}else r.push(y.directive.type);y.isForwardReference&&(u=!0)}return u?new aa([],[new Fr(ii(r))]):ii(r)}function Yy(b){const r=[];for(const u in b)b.hasOwnProperty(u)&&r.push(Si(u),Si(b[u]));return r.length>0?ii(r):null}class E1{}class C0{constructor(r=new Ce){this.jitEvaluator=r,this.FactoryTarget=Jt,this.ResourceLoader=E1,this.elementSchemaRegistry=new Fp}compilePipe(r,u,y){const G=us({name:y.name,type:To(y.type),internalType:new Hi(y.type),typeArgumentCount:0,deps:null,pipeName:y.pipeName,pure:y.pure,isStandalone:y.isStandalone});return this.jitExpression(G.expression,r,u,[])}compilePipeDeclaration(r,u,y){const L=function M1(b){return{name:b.type.name,type:To(b.type),internalType:new Hi(b.type),typeArgumentCount:0,pipeName:b.name,deps:null,pure:b.pure??!0,isStandalone:b.isStandalone??!1}}(y),G=us(L);return this.jitExpression(G.expression,r,u,[])}compileInjectable(r,u,y){const{expression:L,statements:G}=Ei({name:y.name,type:To(y.type),internalType:new Hi(y.type),typeArgumentCount:y.typeArgumentCount,providedIn:hv(y.providedIn),useClass:Ph(y,"useClass"),useFactory:P_(y,"useFactory"),useValue:Ph(y,"useValue"),useExisting:Ph(y,"useExisting"),deps:y.deps?.map(M0)},!0);return this.jitExpression(L,r,u,G)}compileInjectableDeclaration(r,u,y){const{expression:L,statements:G}=Ei({name:y.type.name,type:To(y.type),internalType:new Hi(y.type),typeArgumentCount:0,providedIn:hv(y.providedIn),useClass:Ph(y,"useClass"),useFactory:P_(y,"useFactory"),useValue:Ph(y,"useValue"),useExisting:Ph(y,"useExisting"),deps:y.deps?.map(i_)},!0);return this.jitExpression(L,r,u,G)}compileInjector(r,u,y){const G=Rr({name:y.name,type:To(y.type),internalType:new Hi(y.type),providers:y.providers&&y.providers.length>0?new Hi(y.providers):null,imports:y.imports.map(Te=>new Hi(Te))});return this.jitExpression(G.expression,r,u,[])}compileInjectorDeclaration(r,u,y){const L=function T0(b){return{name:b.type.name,type:To(b.type),internalType:new Hi(b.type),providers:void 0!==b.providers&&b.providers.length>0?new Hi(b.providers):null,imports:void 0!==b.imports?b.imports.map(r=>new Hi(r)):[]}}(y),G=Rr(L);return this.jitExpression(G.expression,r,u,[])}compileNgModule(r,u,y){const G=Ws({type:To(y.type),internalType:new Hi(y.type),adjacentType:new Hi(y.type),bootstrap:y.bootstrap.map(To),declarations:y.declarations.map(To),publicDeclarationTypes:null,imports:y.imports.map(To),includeImportTypes:!0,exports:y.exports.map(To),selectorScopeMode:Ls.Inline,containsForwardDecls:!1,schemas:y.schemas?y.schemas.map(To):null,id:y.id?new Hi(y.id):null});return this.jitExpression(G.expression,r,u,[])}compileNgModuleDeclaration(r,u,y){const L=function tu(b){const r=new q;return r.set("type",new Hi(b.type)),void 0!==b.bootstrap&&r.set("bootstrap",new Hi(b.bootstrap)),void 0!==b.declarations&&r.set("declarations",new Hi(b.declarations)),void 0!==b.imports&&r.set("imports",new Hi(b.imports)),void 0!==b.exports&&r.set("exports",new Hi(b.exports)),void 0!==b.schemas&&r.set("schemas",new Hi(b.schemas)),void 0!==b.id&&r.set("id",new Hi(b.id)),St($t.defineNgModule).callFn([r.toLiteralMap()])}(y);return this.jitExpression(L,r,u,[])}compileDirective(r,u,y){const L=jm(y);return this.compileDirectiveFromMeta(r,u,L)}compileDirectiveDeclaration(r,u,y){const G=fv(y,this.createParseSourceSpan("Directive",y.type.name,u));return this.compileDirectiveFromMeta(r,u,G)}compileDirectiveFromMeta(r,u,y){const L=new ln,Te=function kb(b,r,u){const y=zp(b,r,u);return Ny(y,b),{expression:St($t.defineDirective).callFn([y.toLiteralMap()],void 0,!0),type:Sg(b),statements:[]}}(y,L,xg());return this.jitExpression(Te.expression,r,u,L.statements)}compileComponent(r,u,y){const{template:L,interpolation:G}=Kv(y.template,y.name,u,y.preserveWhitespaces,y.interpolation),Te={...y,...jm(y),selector:y.selector||this.elementSchemaRegistry.getDefaultComponentElementName(),template:L,declarations:y.declarations.map(jv),declarationListEmitMode:0,styles:[...y.styles,...L.styles],encapsulation:y.encapsulation,interpolation:G,changeDetection:y.changeDetection,animations:null!=y.animations?new Hi(y.animations):null,viewProviders:null!=y.viewProviders?new Hi(y.viewProviders):null,relativeContextFilePath:"",i18nUseExternalIds:!0},Ze=`ng:///${y.name}.js`;return this.compileComponentFromMeta(r,Ze,Te)}compileComponentDeclaration(r,u,y){const G=function Ap(b,r,u){const{template:y,interpolation:L}=Kv(b.template,b.type.name,u,b.preserveWhitespaces??!1,b.interpolation),G=[];if(b.dependencies)for(const Te of b.dependencies)switch(Te.kind){case"directive":case"component":G.push(rg(Te));break;case"pipe":G.push(hf(Te))}else(b.components||b.directives||b.pipes)&&(b.components&&G.push(...b.components.map(Te=>rg(Te,!0))),b.directives&&G.push(...b.directives.map(Te=>rg(Te))),b.pipes&&G.push(...function ff(b){return b?Object.keys(b).map(r=>({kind:cd.Pipe,name:r,type:new Hi(b[r])})):[]}(b.pipes)));return{...fv(b,r),template:y,styles:b.styles??[],declarations:G,viewProviders:void 0!==b.viewProviders?new Hi(b.viewProviders):null,animations:void 0!==b.animations?new Hi(b.animations):null,changeDetection:b.changeDetection??P.Default,encapsulation:b.encapsulation??n.Emulated,interpolation:L,declarationListEmitMode:2,relativeContextFilePath:"",i18nUseExternalIds:!0}}(y,this.createParseSourceSpan("Component",y.type.name,u),u);return this.compileComponentFromMeta(r,u,G)}compileComponentFromMeta(r,u,y){const L=new ln,Te=By(y,L,xg(y.interpolation));return this.jitExpression(Te.expression,r,u,L.statements)}compileFactory(r,u,y){const L=De({name:y.name,type:To(y.type),internalType:new Hi(y.type),typeArgumentCount:y.typeArgumentCount,deps:Hy(y.deps),target:y.target});return this.jitExpression(L.expression,r,u,L.statements)}compileFactoryDeclaration(r,u,y){const L=De({name:y.type.name,type:To(y.type),internalType:new Hi(y.type),typeArgumentCount:0,deps:Array.isArray(y.deps)?y.deps.map(i_):y.deps,target:y.target});return this.jitExpression(L.expression,r,u,L.statements)}createParseSourceSpan(r,u,y){return function Tm(b,r,u){const L=new fc("",`in ${b} ${r} in ${u}`);return new Tu(new pu(L,-1,-1,-1),new pu(L,-1,-1,-1))}(r,u,y)}jitExpression(r,u,y,L){const G=[...L,new Gn("$def",r,void 0,un.Exported)];return this.jitEvaluator.evaluateStatements(y,G,new ua(u),!0).$def}}function ig(b){return{...b,predicate:th(b.predicate),read:b.read?new Hi(b.read):null,static:b.static,emitDistinctChangesOnly:b.emitDistinctChangesOnly}}function gm(b){return{propertyName:b.propertyName,first:b.first??!1,predicate:th(b.predicate),descendants:b.descendants??!1,read:b.read?new Hi(b.read):null,static:b.static??!1,emitDistinctChangesOnly:b.emitDistinctChangesOnly??!0}}function th(b){return Array.isArray(b)?b:Ha(new Hi(b),1)}function jm(b){const r=Ig(b.inputs||[]),u=Ig(b.outputs||[]),y=b.propMetadata,L={},G={};for(const Te in y)y.hasOwnProperty(Te)&&y[Te].forEach(Ze=>{nh(Ze)?L[Te]=Ze.bindingPropertyName?[Ze.bindingPropertyName,Te]:Te:O_(Ze)&&(G[Te]=Ze.bindingPropertyName||Te)});return{...b,typeArgumentCount:0,typeSourceSpan:b.typeSourceSpan,type:To(b.type),internalType:new Hi(b.type),deps:null,host:Bb(b.propMetadata,b.typeSourceSpan,b.host),inputs:{...r,...L},outputs:{...u,...G},queries:b.queries.map(ig),providers:null!=b.providers?new Hi(b.providers):null,viewQueries:b.viewQueries.map(ig),fullInheritance:!1,hostDirectives:ru(b)}}function fv(b,r){return{name:b.type.name,type:To(b.type),typeSourceSpan:r,internalType:new Hi(b.type),selector:b.selector??null,inputs:b.inputs??{},outputs:b.outputs??{},host:E0(b.host),queries:(b.queries??[]).map(gm),viewQueries:(b.viewQueries??[]).map(gm),providers:void 0!==b.providers?new Hi(b.providers):null,exportAs:b.exportAs??null,usesInheritance:b.usesInheritance??!1,lifecycle:{usesOnChanges:b.usesOnChanges??!1},deps:null,typeArgumentCount:0,fullInheritance:!1,isStandalone:b.isStandalone??!1,hostDirectives:ru(b)}}function E0(b={}){return{attributes:Nb(b.attributes??{}),listeners:b.listeners??{},properties:b.properties??{},specialAttributes:{classAttr:b.classAttribute,styleAttr:b.styleAttribute}}}function ru(b){return b.hostDirectives?.length?b.hostDirectives.map(r=>"function"==typeof r?{directive:To(r),inputs:null,outputs:null,isForwardReference:!1}:{directive:To(r.directive),isForwardReference:!1,inputs:r.inputs?Ig(r.inputs):null,outputs:r.outputs?Ig(r.outputs):null}):null}function Nb(b){const r={};for(const u of Object.keys(b))r[u]=new Hi(b[u]);return r}function jv(b){return{...b,type:new Hi(b.type)}}function rg(b,r=null){return{kind:cd.Directive,isComponent:r||"component"===b.kind,selector:b.selector,type:new Hi(b.type),inputs:b.inputs??[],outputs:b.outputs??[],exportAs:b.exportAs??null}}function hf(b){return{kind:cd.Pipe,name:b.name,type:new Hi(b.type)}}function Kv(b,r,u,y,L){const G=L?cs.fromArray(L):wu,Te=dv(b,u,{preserveWhitespaces:y,interpolationConfig:G});if(null!==Te.errors){const Ze=Te.errors.map(gt=>gt.toString()).join(", ");throw new Error(`Errors during JIT compilation of template for ${r}: ${Ze}`)}return{template:Te,interpolation:G}}function Ph(b,r){if(b.hasOwnProperty(r))return Ha(new Hi(b[r]),0)}function P_(b,r){if(b.hasOwnProperty(r))return new Hi(b[r])}function hv(b){return Ha("function"==typeof b?new Hi(b):new Yt(b??null),0)}function Hy(b){return null==b?null:b.map(M0)}function M0(b){const r=null!=b.attribute,u=null===b.token?null:new Hi(b.token);return r_(r?new Hi(b.attribute):u,r,b.host,b.optional,b.self,b.skipSelf)}function i_(b){const r=b.attribute??!1;return r_(null===b.token?null:new Hi(b.token),r,b.host??!1,b.optional??!1,b.self??!1,b.skipSelf??!1)}function r_(b,r,u,y,L,G){return{token:b,attributeNameType:r?Si("unknown"):null,host:u,optional:y,self:L,skipSelf:G}}function Bb(b,r,u){const y=function n_(b){const r={},u={},y={},L={};for(const G of Object.keys(b)){const Te=b[G],Ze=G.match(PC);if(null===Ze)switch(G){case"class":if("string"!=typeof Te)throw new Error("Class binding must be string");L.classAttr=Te;break;case"style":if("string"!=typeof Te)throw new Error("Style binding must be string");L.styleAttr=Te;break;default:r[G]="string"==typeof Te?Si(Te):Te}else if(null!=Ze[1]){if("string"!=typeof Te)throw new Error("Property binding must be string");y[Ze[1]]=Te}else if(null!=Ze[2]){if("string"!=typeof Te)throw new Error("Event binding must be string");u[Ze[2]]=Te}}return{attributes:r,listeners:u,properties:y,specialAttributes:L}}(u||{}),L=function $v(b,r){const u=xg();return u.createDirectiveHostEventAsts(b.listeners,r),u.createBoundHostProperties(b.properties,r),u.errors}(y,r);if(L.length)throw new Error(L.map(G=>G.msg).join("\n"));for(const G in b)b.hasOwnProperty(G)&&b[G].forEach(Te=>{wg(Te)?y.properties[Te.hostPropertyName||G]=Mo("this",G):_m(Te)&&(y.listeners[Te.eventName||G]=`${G}(${(Te.args||[]).join(",")})`)});return y}function wg(b){return"HostBinding"===b.ngMetadataName}function _m(b){return"HostListener"===b.ngMetadataName}function nh(b){return"Input"===b.ngMetadataName}function O_(b){return"Output"===b.ngMetadataName}function Ig(b){return b.reduce((r,u)=>{const[y,L]=u.split(":",2).map(G=>G.trim());return r[y]=L||y,r},{})}new class ol{constructor(r){this.full=r;const u=r.split(".");this.major=u[0],this.minor=u[1],this.patch=u.slice(2).join(".")}}("15.2.9");var kf;!function(b){b[b.Extract=0]="Extract",b[b.Merge=1]="Merge"}(kf||(kf={}));new class Ue{constructor(){this.closedByParent=!1,this.isVoid=!1,this.ignoreFirstLf=!1,this.canSelfClose=!0,this.preventNamespaceInheritance=!1}requireExtraParent(r){return!1}isClosedByChild(r){return!1}getContentType(){return Yd.PARSABLE_DATA}};var _f;!function(b){b[b.Directive=0]="Directive",b[b.Component=1]="Component",b[b.Injectable=2]="Injectable",b[b.Pipe=3]="Pipe",b[b.NgModule=4]="NgModule"}(_f||(_f={}));!function Vy(b){(b.ng||(b.ng={})).\u0275compilerFacade=new C0}(zc);var rt=p(94650);var bv=p(45764);const D1=p(1563).i,zM=(b,r)=>typeof window>"u"?Promise.resolve():(0,bv.p)().then(()=>(D1(),(0,bv.b)(JSON.parse('[["cgi-autocomplete",[[1,"cgi-autocomplete",{"placeholder":[1],"placeholderImage":[1,"placeholder-image"],"selectAllText":[1,"select-all-text"],"removeAllText":[1,"remove-all-text"],"allSelectedText":[1,"all-selected-text"],"noItemsText":[1,"no-items-text"],"name":[513],"value":[1040],"options":[16],"readonly":[4],"multiSelect":[4,"multi-select"],"elementHasValue":[32],"availableOptions":[32],"chips":[32],"setFocus":[64]}]]],["cgi-list-options-accordion",[[1,"cgi-list-options-accordion",{"header":[1],"canMultipleCategoriesBeOpen":[4,"can-multiple-categories-be-open"],"categories":[1040]}]]],["cgi-autocomplete-popover-content",[[1,"cgi-autocomplete-popover-content",{"placeholder":[1],"placeholderImage":[1,"placeholder-image"],"selectAllText":[1,"select-all-text"],"removeAllText":[1,"remove-all-text"],"noItemsText":[1,"no-items-text"],"multiSelect":[4,"multi-select"],"parentHasValue$":[16],"relativeRef":[16],"popoverPresented$":[16],"options$":[16],"optionClick$":[16],"selectAllClick$":[16],"removeAllClick$":[16],"inputValue$":[16],"options":[32]},[[9,"resize","resize"],[0,"siviDidLoad","onSiviDidLoad"],[0,"siviDidUnload","onSiviDidUnload"]]]]],["ion-select-popover",[[2,"ion-select-popover",{"header":[1],"subHeader":[1,"sub-header"],"message":[1],"options":[16]},[[0,"ionChange","onSelect"]]]]],["cgi-autocomplete-item",[[1,"cgi-autocomplete-item",{"item":[16],"placeholderImage":[1,"placeholder-image"]}]]],["cgi-text-area",[[0,"cgi-text-area",{"value":[1537],"name":[513],"label":[1],"labelPosition":[1,"label-position"],"placeholder":[1],"minHeight":[1,"min-height"],"maxHeight":[1,"max-height"],"maxLength":[2,"max-length"]},[[9,"resize","resize"]]]]],["cgi-page-stepper",[[1,"cgi-page-stepper",{"steps":[16],"activeStep":[2,"active-step"],"currentStates":[32]}]]],["ion-action-sheet",[[34,"ion-action-sheet",{"overlayIndex":[2,"overlay-index"],"keyboardClose":[4,"keyboard-close"],"enterAnimation":[16],"leaveAnimation":[16],"buttons":[16],"cssClass":[1,"css-class"],"backdropDismiss":[4,"backdrop-dismiss"],"header":[1],"subHeader":[1,"sub-header"],"translucent":[4],"animated":[4],"htmlAttributes":[16],"present":[64],"dismiss":[64],"onDidDismiss":[64],"onWillDismiss":[64]}]]],["cgi-info-popup",[[1,"cgi-info-popup",{"text":[1],"buttonLabel":[1,"button-label"],"containerRef":[16],"icon":[1],"iconColor":[1,"icon-color"],"popupVisible":[32],"setFocus":[64]},[[0,"closePopup","handleClosePopup"],[0,"keydown","handleKeyDown"],[9,"resize","handleWindowResize"]]]]],["ion-alert",[[34,"ion-alert",{"overlayIndex":[2,"overlay-index"],"keyboardClose":[4,"keyboard-close"],"enterAnimation":[16],"leaveAnimation":[16],"cssClass":[1,"css-class"],"header":[1],"subHeader":[1,"sub-header"],"message":[1],"buttons":[16],"inputs":[1040],"backdropDismiss":[4,"backdrop-dismiss"],"translucent":[4],"animated":[4],"htmlAttributes":[16],"present":[64],"dismiss":[64],"onDidDismiss":[64],"onWillDismiss":[64]},[[4,"keydown","onKeydown"]]]]],["ion-back-button",[[33,"ion-back-button",{"color":[513],"defaultHref":[1025,"default-href"],"disabled":[516],"icon":[1],"text":[1],"type":[1],"routerAnimation":[16]}]]],["ion-fab-button",[[33,"ion-fab-button",{"color":[513],"activated":[4],"disabled":[4],"download":[1],"href":[1],"rel":[1],"routerDirection":[1,"router-direction"],"routerAnimation":[16],"target":[1],"show":[4],"translucent":[4],"type":[1],"size":[1],"closeIcon":[1,"close-icon"]}]]],["ion-loading",[[34,"ion-loading",{"overlayIndex":[2,"overlay-index"],"keyboardClose":[4,"keyboard-close"],"enterAnimation":[16],"leaveAnimation":[16],"message":[1],"cssClass":[1,"css-class"],"duration":[2],"backdropDismiss":[4,"backdrop-dismiss"],"showBackdrop":[4,"show-backdrop"],"spinner":[1025],"translucent":[4],"animated":[4],"htmlAttributes":[16],"present":[64],"dismiss":[64],"onDidDismiss":[64],"onWillDismiss":[64]}]]],["ion-menu-button",[[33,"ion-menu-button",{"color":[513],"disabled":[4],"menu":[1],"autoHide":[4,"auto-hide"],"type":[1],"visible":[32]},[[16,"ionMenuChange","visibilityChanged"],[16,"ionSplitPaneVisible","visibilityChanged"]]]]],["ion-picker",[[34,"ion-picker",{"overlayIndex":[2,"overlay-index"],"keyboardClose":[4,"keyboard-close"],"enterAnimation":[16],"leaveAnimation":[16],"buttons":[16],"columns":[16],"cssClass":[1,"css-class"],"duration":[2],"showBackdrop":[4,"show-backdrop"],"backdropDismiss":[4,"backdrop-dismiss"],"animated":[4],"htmlAttributes":[16],"presented":[32],"present":[64],"dismiss":[64],"onDidDismiss":[64],"onWillDismiss":[64],"getColumn":[64]}]]],["ion-refresher-content",[[0,"ion-refresher-content",{"pullingIcon":[1025,"pulling-icon"],"pullingText":[1,"pulling-text"],"refreshingSpinner":[1025,"refreshing-spinner"],"refreshingText":[1,"refreshing-text"]}]]],["ion-toast",[[33,"ion-toast",{"overlayIndex":[2,"overlay-index"],"color":[513],"enterAnimation":[16],"leaveAnimation":[16],"cssClass":[1,"css-class"],"duration":[2],"header":[1],"message":[1],"keyboardClose":[4,"keyboard-close"],"position":[1],"buttons":[16],"translucent":[4],"animated":[4],"htmlAttributes":[16],"present":[64],"dismiss":[64],"onDidDismiss":[64],"onWillDismiss":[64]}]]],["cgi-count-bar",[[1,"cgi-count-bar",{"abbreviation":[1],"text":[1],"barValue":[2,"bar-value"],"maxValue":[2,"max-value"],"value":[1],"size":[2]}]]],["cgi-fab",[[1,"cgi-fab",{"icon":[1]}]]],["cgi-navigation-tabs",[[1,"cgi-navigation-tabs",{"tabs":[16],"selectTabId":[1537,"select-tab-id"],"color":[1],"selectedTextColor":[1025,"selected-text-color"]},[[8,"keydown","handleKeyDown"]]]]],["cgi-oval-item",[[1,"cgi-oval-item",{"header":[1],"imgUrl":[1,"img-url"],"imgWidth":[2,"img-width"],"imgHeight":[2,"img-height"],"textFirst":[1,"text-first"],"textSecond":[1,"text-second"],"itemType":[1,"item-type"],"placeholderColor":[1,"placeholder-color"],"placeholderOpacity":[2,"placeholder-opacity"],"imageDescription":[1,"image-description"]}]]],["cgi-profile-image",[[1,"cgi-profile-image",{"name":[1],"imgUrl":[1,"img-url"],"text":[1],"subsubtitle":[1],"imageType":[1,"image-type"],"imageLabel":[1,"image-label"],"placeholder":[1],"shaped":[4],"disabled":[4],"clamp":[4]}]]],["cgi-status-view",[[1,"cgi-status-view",{"icon":[1],"header":[1],"text":[1],"color":[1]}]]],["cgi-toggle-accordion",[[1,"cgi-toggle-accordion",{"open":[1540],"ariaLabel":[1537,"aria-label"]}]]],["ion-card",[[33,"ion-card",{"color":[513],"button":[4],"type":[1],"disabled":[4],"download":[1],"href":[1],"rel":[1],"routerDirection":[1,"router-direction"],"routerAnimation":[16],"target":[1]}]]],["ion-infinite-scroll-content",[[32,"ion-infinite-scroll-content",{"loadingSpinner":[1025,"loading-spinner"],"loadingText":[1,"loading-text"]}]]],["ion-item-option",[[33,"ion-item-option",{"color":[513],"disabled":[4],"download":[1],"expandable":[4],"href":[1],"rel":[1],"target":[1],"type":[1]}]]],["ion-menu",[[33,"ion-menu",{"contentId":[513,"content-id"],"menuId":[513,"menu-id"],"type":[1025],"disabled":[1028],"side":[513],"swipeGesture":[4,"swipe-gesture"],"maxEdgeStart":[2,"max-edge-start"],"isPaneVisible":[32],"isEndSide":[32],"isOpen":[64],"isActive":[64],"open":[64],"close":[64],"toggle":[64],"setOpen":[64]},[[16,"ionSplitPaneVisible","onSplitPaneChanged"],[2,"click","onBackdropClick"]]]]],["ion-modal",[[34,"ion-modal",{"overlayIndex":[2,"overlay-index"],"delegate":[16],"keyboardClose":[4,"keyboard-close"],"enterAnimation":[16],"leaveAnimation":[16],"component":[1],"componentProps":[16],"cssClass":[1,"css-class"],"backdropDismiss":[4,"backdrop-dismiss"],"showBackdrop":[4,"show-backdrop"],"animated":[4],"swipeToClose":[4,"swipe-to-close"],"presentingElement":[16],"htmlAttributes":[16],"present":[64],"dismiss":[64],"onDidDismiss":[64],"onWillDismiss":[64]}]]],["ion-popover",[[34,"ion-popover",{"delegate":[16],"overlayIndex":[2,"overlay-index"],"enterAnimation":[16],"leaveAnimation":[16],"component":[1],"componentProps":[16],"keyboardClose":[4,"keyboard-close"],"cssClass":[1,"css-class"],"backdropDismiss":[4,"backdrop-dismiss"],"event":[8],"showBackdrop":[4,"show-backdrop"],"translucent":[4],"animated":[4],"htmlAttributes":[16],"present":[64],"dismiss":[64],"onDidDismiss":[64],"onWillDismiss":[64]}]]],["ion-reorder",[[33,"ion-reorder",null,[[2,"click","onClick"]]]]],["ion-searchbar",[[34,"ion-searchbar",{"color":[513],"animated":[4],"autocomplete":[1],"autocorrect":[1],"cancelButtonIcon":[1,"cancel-button-icon"],"cancelButtonText":[1,"cancel-button-text"],"clearIcon":[1,"clear-icon"],"debounce":[2],"disabled":[4],"inputmode":[1],"enterkeyhint":[1],"placeholder":[1],"searchIcon":[1,"search-icon"],"showCancelButton":[1,"show-cancel-button"],"showClearButton":[1,"show-clear-button"],"spellcheck":[4],"type":[1],"value":[1025],"focused":[32],"noAnimate":[32],"setFocus":[64],"getInputElement":[64]}]]],["ion-segment-button",[[33,"ion-segment-button",{"disabled":[4],"layout":[1],"type":[1],"value":[1],"checked":[32]}]]],["ion-tab-button",[[33,"ion-tab-button",{"disabled":[4],"download":[1],"href":[1],"rel":[1],"layout":[1025],"selected":[1028],"tab":[1],"target":[1]},[[8,"ionTabBarChanged","onTabBarChanged"]]]]],["card-footer",[[0,"card-footer",{"entity":[8],"footerTitle":[1,"footer-title"],"footerSubtitle":[1,"footer-subtitle"],"footerMoreOptions":[4,"footer-more-options"]}]]],["cgi-accordion-item",[[1,"cgi-accordion-item",{"open":[4],"slotEndSize":[1,"slot-end-size"]}]]],["cgi-card",[[1,"cgi-card"]]],["cgi-library-version",[[0,"cgi-library-version"]]],["cgi-status",[[0,"cgi-status",{"statusText":[1,"status-text"],"statusType":[1,"status-type"],"statusIcon":[1,"status-icon"],"statusColor":[1,"status-color"]}]]],["cgi-tag",[[1,"cgi-tag",{"color":[1]}]]],["cgi-textarea",[[0,"cgi-textarea",{"value":[1537],"name":[513],"placeholder":[1],"border":[4],"disabled":[4]},[[9,"resize","resize"]]]]],["cgi-validator",[[1,"cgi-validator",{"validatorOptions":[16],"showRequiredIndicator":[4,"show-required-indicator"],"updateRequiredIndicator":[64],"setElementValue":[64],"updateValue":[64],"addFormControl":[64],"setFormFieldValue":[64],"reset":[64],"getFormControl":[64]}]]],["ion-app",[[0,"ion-app"]]],["ion-badge",[[33,"ion-badge",{"color":[513]}]]],["ion-buttons",[[34,"ion-buttons",{"collapse":[4]}]]],["ion-card-content",[[32,"ion-card-content"]]],["ion-card-header",[[33,"ion-card-header",{"color":[513],"translucent":[4]}]]],["ion-card-subtitle",[[33,"ion-card-subtitle",{"color":[513]}]]],["ion-card-title",[[33,"ion-card-title",{"color":[513]}]]],["ion-content",[[1,"ion-content",{"color":[513],"fullscreen":[4],"forceOverscroll":[1028,"force-overscroll"],"scrollX":[4,"scroll-x"],"scrollY":[4,"scroll-y"],"scrollEvents":[4,"scroll-events"],"getScrollElement":[64],"scrollToTop":[64],"scrollToBottom":[64],"scrollByPoint":[64],"scrollToPoint":[64]},[[8,"appload","onAppLoad"],[2,"click","onClick"]]]]],["ion-datetime",[[33,"ion-datetime",{"name":[1],"disabled":[4],"readonly":[4],"min":[1025],"max":[1025],"displayFormat":[1,"display-format"],"displayTimezone":[1,"display-timezone"],"pickerFormat":[1,"picker-format"],"cancelText":[1,"cancel-text"],"doneText":[1,"done-text"],"yearValues":[8,"year-values"],"monthValues":[8,"month-values"],"dayValues":[8,"day-values"],"hourValues":[8,"hour-values"],"minuteValues":[8,"minute-values"],"monthNames":[1,"month-names"],"monthShortNames":[1,"month-short-names"],"dayNames":[1,"day-names"],"dayShortNames":[1,"day-short-names"],"pickerOptions":[16],"placeholder":[1],"value":[1025],"isExpanded":[32],"open":[64]}]]],["ion-fab",[[1,"ion-fab",{"horizontal":[1],"vertical":[1],"edge":[4],"activated":[1028],"close":[64]}]]],["ion-fab-list",[[1,"ion-fab-list",{"activated":[4],"side":[1]}]]],["ion-footer",[[36,"ion-footer",{"translucent":[4]}]]],["ion-header",[[36,"ion-header",{"collapse":[1],"translucent":[4]}]]],["ion-img",[[1,"ion-img",{"alt":[1],"src":[1],"loadSrc":[32],"loadError":[32]}]]],["ion-infinite-scroll",[[0,"ion-infinite-scroll",{"threshold":[1],"disabled":[4],"position":[1],"isLoading":[32],"complete":[64]}]]],["ion-item-divider",[[33,"ion-item-divider",{"color":[513],"sticky":[4]}]]],["ion-item-group",[[32,"ion-item-group"]]],["ion-item-options",[[32,"ion-item-options",{"side":[1],"fireSwipeEvent":[64]}]]],["ion-item-sliding",[[0,"ion-item-sliding",{"disabled":[4],"state":[32],"getOpenAmount":[64],"getSlidingRatio":[64],"open":[64],"close":[64],"closeOpened":[64]}]]],["ion-menu-toggle",[[1,"ion-menu-toggle",{"menu":[1],"autoHide":[4,"auto-hide"],"visible":[32]},[[16,"ionMenuChange","visibilityChanged"],[16,"ionSplitPaneVisible","visibilityChanged"]]]]],["ion-nav",[[1,"ion-nav",{"delegate":[16],"swipeGesture":[1028,"swipe-gesture"],"animated":[4],"animation":[16],"rootParams":[16],"root":[1],"push":[64],"insert":[64],"insertPages":[64],"pop":[64],"popTo":[64],"popToRoot":[64],"removeIndex":[64],"setRoot":[64],"setPages":[64],"setRouteId":[64],"getRouteId":[64],"getActive":[64],"getByIndex":[64],"canGoBack":[64],"getPrevious":[64]}]]],["ion-nav-link",[[0,"ion-nav-link",{"component":[1],"componentProps":[16],"routerDirection":[1,"router-direction"],"routerAnimation":[16]}]]],["ion-note",[[33,"ion-note",{"color":[513]}]]],["ion-progress-bar",[[33,"ion-progress-bar",{"type":[1],"reversed":[4],"value":[2],"buffer":[2],"color":[513]}]]],["ion-range",[[33,"ion-range",{"color":[513],"debounce":[2],"name":[1],"dualKnobs":[4,"dual-knobs"],"min":[2],"max":[2],"pin":[4],"snaps":[4],"step":[2],"ticks":[4],"disabled":[4],"value":[1026],"ratioA":[32],"ratioB":[32],"pressedKnob":[32]}]]],["ion-refresher",[[32,"ion-refresher",{"pullMin":[2,"pull-min"],"pullMax":[2,"pull-max"],"closeDuration":[1,"close-duration"],"snapbackDuration":[1,"snapback-duration"],"pullFactor":[2,"pull-factor"],"disabled":[4],"nativeRefresher":[32],"state":[32],"complete":[64],"cancel":[64],"getProgress":[64]}]]],["ion-reorder-group",[[0,"ion-reorder-group",{"disabled":[4],"state":[32],"complete":[64]}]]],["ion-route",[[0,"ion-route",{"url":[1],"component":[1],"componentProps":[16],"beforeLeave":[16],"beforeEnter":[16]}]]],["ion-route-redirect",[[0,"ion-route-redirect",{"from":[1],"to":[1]}]]],["ion-router",[[0,"ion-router",{"root":[1],"useHash":[4,"use-hash"],"canTransition":[64],"push":[64],"back":[64],"printDebug":[64],"navChanged":[64]},[[8,"popstate","onPopState"],[4,"ionBackButton","onBackButton"]]]]],["ion-router-link",[[1,"ion-router-link",{"color":[513],"href":[1],"rel":[1],"routerDirection":[1,"router-direction"],"routerAnimation":[16],"target":[1]}]]],["ion-router-outlet",[[1,"ion-router-outlet",{"mode":[1025],"delegate":[16],"animated":[4],"animation":[16],"swipeHandler":[16],"commit":[64],"setRouteId":[64],"getRouteId":[64]}]]],["ion-segment",[[33,"ion-segment",{"color":[513],"disabled":[4],"scrollable":[4],"swipeGesture":[4,"swipe-gesture"],"value":[1025],"activated":[32]}]]],["ion-select",[[33,"ion-select",{"disabled":[4],"cancelText":[1,"cancel-text"],"okText":[1,"ok-text"],"placeholder":[1],"name":[1],"selectedText":[1,"selected-text"],"multiple":[4],"interface":[1],"interfaceOptions":[8,"interface-options"],"compareWith":[1,"compare-with"],"value":[1032],"isExpanded":[32],"open":[64]}]]],["ion-select-option",[[1,"ion-select-option",{"disabled":[4],"value":[8]}]]],["ion-skeleton-text",[[1,"ion-skeleton-text",{"animated":[4]}]]],["ion-slide",[[0,"ion-slide"]]],["ion-slides",[[36,"ion-slides",{"options":[8],"pager":[4],"scrollbar":[4],"update":[64],"updateAutoHeight":[64],"slideTo":[64],"slideNext":[64],"slidePrev":[64],"getActiveIndex":[64],"getPreviousIndex":[64],"length":[64],"isEnd":[64],"isBeginning":[64],"startAutoplay":[64],"stopAutoplay":[64],"lockSwipeToNext":[64],"lockSwipeToPrev":[64],"lockSwipes":[64],"getSwiper":[64]}]]],["ion-split-pane",[[33,"ion-split-pane",{"contentId":[513,"content-id"],"disabled":[4],"when":[8],"visible":[32]}]]],["ion-tab",[[1,"ion-tab",{"active":[1028],"delegate":[16],"tab":[1],"component":[1],"setActive":[64]}]]],["ion-tab-bar",[[33,"ion-tab-bar",{"color":[513],"selectedTab":[1,"selected-tab"],"translucent":[4],"keyboardVisible":[32]}]]],["ion-tabs",[[1,"ion-tabs",{"useRouter":[1028,"use-router"],"selectedTab":[32],"select":[64],"getTab":[64],"getSelected":[64],"setRouteId":[64],"getRouteId":[64]}]]],["ion-text",[[1,"ion-text",{"color":[513]}]]],["ion-thumbnail",[[1,"ion-thumbnail"]]],["ion-title",[[33,"ion-title",{"color":[513],"size":[1]}]]],["ion-toggle",[[33,"ion-toggle",{"color":[513],"name":[1],"checked":[1028],"disabled":[4],"value":[1],"activated":[32]}]]],["ion-virtual-scroll",[[0,"ion-virtual-scroll",{"approxItemHeight":[2,"approx-item-height"],"approxHeaderHeight":[2,"approx-header-height"],"approxFooterHeight":[2,"approx-footer-height"],"headerFn":[16],"footerFn":[16],"items":[16],"itemHeight":[16],"headerHeight":[16],"footerHeight":[16],"renderItem":[16],"renderHeader":[16],"renderFooter":[16],"nodeRender":[16],"domRender":[16],"totalHeight":[32],"positionForItem":[64],"checkRange":[64],"checkEnd":[64]},[[9,"resize","onResize"]]]]],["cgi-info-popup-content",[[0,"cgi-info-popup-content",{"text":[1],"iconColor":[1,"icon-color"]},[[0,"keydown","handleKeyDown"]]]]],["ion-picker-column",[[32,"ion-picker-column",{"col":[16]}]]],["ion-textarea",[[34,"ion-textarea",{"fireFocusEvents":[4,"fire-focus-events"],"color":[513],"autocapitalize":[1],"autofocus":[4],"clearOnEdit":[1028,"clear-on-edit"],"debounce":[2],"disabled":[4],"inputmode":[1],"enterkeyhint":[1],"maxlength":[2],"minlength":[2],"name":[1],"placeholder":[1],"readonly":[4],"required":[4],"spellcheck":[4],"cols":[2],"rows":[2],"wrap":[1],"autoGrow":[4,"auto-grow"],"value":[1025],"hasFocus":[32],"setFocus":[64],"setBlur":[64],"getInputElement":[64]}]]],["ion-toolbar",[[33,"ion-toolbar",{"color":[513]},[[0,"ionStyle","childrenStyle"]]]]],["ion-icon",[[1,"ion-icon",{"mode":[1025],"color":[1],"ariaLabel":[1537,"aria-label"],"ariaHidden":[513,"aria-hidden"],"ios":[1],"md":[1],"flipRtl":[4,"flip-rtl"],"name":[513],"src":[1],"icon":[8],"size":[1],"lazy":[4],"sanitize":[4],"svgContent":[32],"isVisible":[32]}]]],["ion-ripple-effect",[[1,"ion-ripple-effect",{"type":[1],"addRipple":[64]}]]],["cgi-autocomplete-popover_2",[[1,"cgi-autocomplete-selected-item",{"item":[16],"placeholderImage":[1,"placeholder-image"],"closeButton":[4,"close-button"],"multiSelect":[4,"multi-select"],"readonly":[4]},[[0,"keydown","onKeypress"]]],[1,"cgi-autocomplete-popover",{"popoverOpts":[16],"inputValue":[1025,"input-value"],"readonly":[4],"parentHasValue":[4,"parent-has-value"],"placeholder":[1],"placeholderImage":[1,"placeholder-image"],"selectAllText":[1,"select-all-text"],"removeAllText":[1,"remove-all-text"],"noItemsText":[1,"no-items-text"],"allSelectedText":[1,"all-selected-text"],"multiSelect":[4,"multi-select"],"options":[16],"presentPopover":[64]}]]],["cgi-autocomplete-list-item_2",[[1,"cgi-autocomplete-list-item",{"item":[16],"placeholderImage":[1,"placeholder-image"]}],[33,"ion-button",{"color":[513],"buttonType":[1025,"button-type"],"disabled":[516],"expand":[513],"fill":[1537],"routerDirection":[1,"router-direction"],"routerAnimation":[16],"download":[1],"href":[1],"rel":[1],"shape":[513],"size":[513],"strong":[4],"target":[1],"type":[1]}]]],["ion-checkbox_2",[[33,"ion-checkbox",{"color":[513],"name":[1],"checked":[1028],"indeterminate":[1028],"disabled":[4],"value":[1]}],[1,"ion-col",{"offset":[1],"offsetXs":[1,"offset-xs"],"offsetSm":[1,"offset-sm"],"offsetMd":[1,"offset-md"],"offsetLg":[1,"offset-lg"],"offsetXl":[1,"offset-xl"],"pull":[1],"pullXs":[1,"pull-xs"],"pullSm":[1,"pull-sm"],"pullMd":[1,"pull-md"],"pullLg":[1,"pull-lg"],"pullXl":[1,"pull-xl"],"push":[1],"pushXs":[1,"push-xs"],"pushSm":[1,"push-sm"],"pushMd":[1,"push-md"],"pushLg":[1,"push-lg"],"pushXl":[1,"push-xl"],"size":[1],"sizeXs":[1,"size-xs"],"sizeSm":[1,"size-sm"],"sizeMd":[1,"size-md"],"sizeLg":[1,"size-lg"],"sizeXl":[1,"size-xl"]},[[9,"resize","onResize"]]]]],["ion-list",[[32,"ion-list",{"lines":[1],"inset":[4],"closeSlidingItems":[64]}]]],["ion-list-header_3",[[33,"ion-list-header",{"color":[513],"lines":[1]}],[33,"ion-radio",{"color":[513],"name":[1],"disabled":[4],"value":[8],"checked":[32],"buttonTabindex":[32],"setFocus":[64],"setButtonTabindex":[64]}],[0,"ion-radio-group",{"allowEmptySelection":[4,"allow-empty-selection"],"name":[1],"value":[1032]},[[4,"keydown","onKeydown"]]]]],["ion-spinner",[[1,"ion-spinner",{"color":[513],"duration":[2],"name":[1],"paused":[4]}]]],["ion-avatar_2",[[33,"ion-chip",{"color":[513],"outline":[4],"disabled":[4]}],[33,"ion-avatar"]]],["cgi-input_2",[[0,"cgi-input",{"name":[513],"value":[1537],"disabled":[1540],"readonly":[1028],"label":[1],"color":[1],"placeholder":[1025],"type":[1],"passwordExists":[4,"password-exists"],"disableReveal":[4,"disable-reveal"],"revealPassword":[1540,"reveal-password"],"revealPasswordLabel":[1,"reveal-password-label"],"hidePasswordLabel":[1,"hide-password-label"],"labelPosition":[1,"label-position"],"autoFocus":[4,"auto-focus"],"autocomplete":[1],"required":[4],"viewMode":[4,"view-mode"],"viewModePlainText":[4,"view-mode-plain-text"],"css":[1],"touched":[32],"changeInputFieldState":[64],"setFocus":[64]}],[34,"ion-input",{"fireFocusEvents":[4,"fire-focus-events"],"color":[513],"accept":[1],"autocapitalize":[1],"autocomplete":[1],"autocorrect":[1],"autofocus":[4],"clearInput":[4,"clear-input"],"clearOnEdit":[4,"clear-on-edit"],"debounce":[2],"disabled":[4],"enterkeyhint":[1],"inputmode":[1],"max":[1],"maxlength":[2],"min":[1],"minlength":[2],"multiple":[4],"name":[1],"pattern":[1],"placeholder":[1],"readonly":[4],"required":[4],"spellcheck":[4],"step":[1],"size":[2],"type":[1],"value":[1032],"hasFocus":[32],"setFocus":[64],"setBlur":[64],"getInputElement":[64]}]]],["cgi-badge_3",[[1,"ion-grid",{"fixed":[4]}],[1,"ion-row"],[1,"cgi-badge",{"color":[1],"fillStyle":[1,"fill-style"],"size":[1],"fontSize":[1,"font-size"]}]]],["cgi-shaped-image",[[1,"cgi-shaped-image",{"src":[1],"height":[1],"width":[1],"responsive":[4],"imageDescription":[1,"image-description"],"round":[4]}]]],["ion-backdrop",[[33,"ion-backdrop",{"visible":[4],"tappable":[4],"stopPropagation":[4,"stop-propagation"]},[[2,"click","onMouseDown"]]]]],["cgi-icon",[[1,"cgi-icon",{"name":[1],"size":[1],"ariaLabel":[1,"aria-label"],"disabled":[4]}]]],["ion-item_2",[[34,"ion-label",{"color":[513],"position":[1],"noAnimate":[32]}],[49,"ion-item",{"color":[513],"button":[4],"detail":[4],"detailIcon":[1,"detail-icon"],"disabled":[4],"download":[1],"href":[1],"rel":[1],"lines":[1],"routerAnimation":[16],"routerDirection":[1,"router-direction"],"target":[1],"type":[1],"multipleInputs":[32]},[[0,"ionColor","labelColorChanged"],[0,"ionStyle","itemStyle"]]]]]]'),r)));var Ru=p(37340);function S1(b){return new rt.vHH(3e3,!1)}function k0(){return typeof process<"u"&&"[object process]"==={}.toString.call(process)}function N_(b){switch(b.length){case 0:return new Ru.ZN;case 1:return b[0];default:return new Ru.ZE(b)}}function UE(b,r,u,y,L=new Map,G=new Map){const Te=[],Ze=[];let gt=-1,Ot=null;if(y.forEach(sn=>{const ci=sn.get("offset"),Ji=ci==gt,xr=Ji&&Ot||new Map;sn.forEach((Hr,Do)=>{let Zo=Do,Ko=Hr;if("offset"!==Do)switch(Zo=r.normalizePropertyName(Zo,Te),Ko){case Ru.k1:Ko=L.get(Do);break;case Ru.l3:Ko=G.get(Do);break;default:Ko=r.normalizeStyleValue(Do,Zo,Ko,Te)}xr.set(Zo,Ko)}),Ji||Ze.push(xr),Ot=xr,gt=ci}),Te.length)throw function sh(b){return new rt.vHH(3502,!1)}();return Ze}function ch(b,r,u,y){switch(r){case"start":b.onStart(()=>y(u&&qm(u,"start",b)));break;case"done":b.onDone(()=>y(u&&qm(u,"done",b)));break;case"destroy":b.onDestroy(()=>y(u&&qm(u,"destroy",b)))}}function qm(b,r,u){const y=u.totalTime,L=!!u.disabled,G=B_(b.element,b.triggerName,b.fromState,b.toState,r||b.phaseName,y??b.totalTime,L),Te=b._data;return null!=Te&&(G._data=Te),G}function B_(b,r,u,y,L="",G=0,Te){return{element:b,triggerName:r,fromState:u,toState:y,phaseName:L,totalTime:G,disabled:!!Te}}function Ff(b,r,u){let y=b.get(r);return y||b.set(r,y=u),y}function HM(b){const r=b.indexOf(":");return[b.substring(1,r),b.slice(r+1)]}let F1=(b,r)=>!1,Ml=(b,r,u)=>[],UC=null;function Gb(b){const r=b.parentNode||b.host;return r===UC?null:r}(k0()||typeof Element<"u")&&(function BE(){return typeof window<"u"&&typeof window.document<"u"}()?(UC=(()=>document.documentElement)(),F1=(b,r)=>{for(;r;){if(r===b)return!0;r=Gb(r)}return!1}):F1=(b,r)=>b.contains(r),Ml=(b,r,u)=>{if(u)return Array.from(b.querySelectorAll(r));const y=b.querySelector(r);return y?[y]:[]});let Ev=null,iy=!1;function ry(b){Ev||(Ev=function lx(){return typeof document<"u"?document.body:null}()||{},iy=!!Ev.style&&"WebkitAppearance"in Ev.style);let r=!0;return Ev.style&&!function zC(b){return"ebkit"==b.substring(1,6)}(b)&&(r=b in Ev.style,!r&&iy&&(r="Webkit"+b.charAt(0).toUpperCase()+b.slice(1)in Ev.style)),r}const B1=F1,Wb=Ml;class oy{validateStyleProperty(r){return ry(r)}matchesElement(r,u){return!1}containsElement(r,u){return B1(r,u)}getParentElement(r){return Gb(r)}query(r,u,y){return Wb(r,u,y)}computeStyle(r,u,y){return y||""}animate(r,u,y,L,G,Te=[],Ze){return new Ru.ZN(y,L)}}oy.\u0275fac=function(r){return new(r||oy)},oy.\u0275prov=rt.Yz7({token:oy,factory:oy.\u0275fac});class U1{}U1.NOOP=new oy;const VM=1e3,$b="ng-enter",Aa="ng-leave",z1="ng-trigger",Y1=".ng-trigger",YE="ng-animating",Mv=".ng-animating";function Tv(b){if("number"==typeof b)return b;const r=b.match(/^(-?[\.\d]+)(m?s)/);return!r||r.length<2?0:H1(parseFloat(r[1]),r[2])}function H1(b,r){return"s"===r?b*VM:b}function YC(b,r,u){return b.hasOwnProperty("duration")?b:function R0(b,r,u){const y=/^(-?[\.\d]+)(m?s)(?:\s+(-?[\.\d]+)(m?s))?(?:\s+([-a-z]+(?:\(.+?\))?))?$/i;let L,G=0,Te="";if("string"==typeof b){const Ze=b.match(y);if(null===Ze)return r.push(S1()),{duration:0,delay:0,easing:""};L=H1(parseFloat(Ze[1]),Ze[2]);const gt=Ze[3];null!=gt&&(G=H1(parseFloat(gt),Ze[4]));const Ot=Ze[5];Ot&&(Te=Ot)}else L=b;if(!u){let Ze=!1,gt=r.length;L<0&&(r.push(function Jy(){return new rt.vHH(3100,!1)}()),Ze=!0),G<0&&(r.push(function Qy(){return new rt.vHH(3101,!1)}()),Ze=!0),Ze&&r.splice(gt,0,S1())}return{duration:L,delay:G,easing:Te}}(b,r,u)}function jb(b,r={}){return Object.keys(b).forEach(u=>{r[u]=b[u]}),r}function V1(b){const r=new Map;return Object.keys(b).forEach(u=>{const y=b[u];r.set(u,y)}),r}function ay(b,r=new Map,u){if(u)for(let[y,L]of u)r.set(y,L);for(let[y,L]of b)r.set(y,L);return r}function HE(b,r,u){return u?r+":"+u+";":""}function rb(b){let r="";for(let u=0;u<b.style.length;u++){const y=b.style.item(u);r+=HE(0,y,b.style.getPropertyValue(y))}for(const u in b.style){if(!b.style.hasOwnProperty(u)||u.startsWith("_"))continue;r+=HE(0,ie(u),b.style[u])}b.setAttribute("style",r)}function Rh(b,r,u){b.style&&(r.forEach((y,L)=>{const G=k(L);u&&!u.has(L)&&u.set(L,b.style[G]),b.style[G]=y}),k0()&&rb(b))}function Ng(b,r){b.style&&(r.forEach((u,y)=>{const L=k(y);b.style[L]=""}),k0()&&rb(b))}function cg(b){return Array.isArray(b)?1==b.length?b[0]:(0,Ru.vP)(b):b}function xv(b,r,u){const y=r.params||{},L=Kb(b);L.length&&L.forEach(G=>{y.hasOwnProperty(G)||u.push(function A1(b){return new rt.vHH(3001,!1)}())})}const Jl=new RegExp("{{\\s*(.+?)\\s*}}","g");function Kb(b){let r=[];if("string"==typeof b){let u;for(;u=Jl.exec(b);)r.push(u[1]);Jl.lastIndex=0}return r}function H(b,r,u){const y=b.toString(),L=y.replace(Jl,(G,Te)=>{let Ze=r[Te];return null==Ze&&(u.push(function qy(b){return new rt.vHH(3003,!1)}()),Ze=""),Ze.toString()});return L==y?b:L}function s(b){const r=[];let u=b.next();for(;!u.done;)r.push(u.value),u=b.next();return r}const d=/-+([a-z0-9])/g;function k(b){return b.replace(d,(...r)=>r[1].toUpperCase())}function ie(b){return b.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function ir(b,r,u){switch(r.type){case 7:return b.visitTrigger(r,u);case 0:return b.visitState(r,u);case 1:return b.visitTransition(r,u);case 2:return b.visitSequence(r,u);case 3:return b.visitGroup(r,u);case 4:return b.visitAnimate(r,u);case 5:return b.visitKeyframes(r,u);case 6:return b.visitStyle(r,u);case 8:return b.visitReference(r,u);case 9:return b.visitAnimateChild(r,u);case 10:return b.visitAnimateRef(r,u);case 11:return b.visitQuery(r,u);case 12:return b.visitStagger(r,u);default:throw function Zb(b){return new rt.vHH(3004,!1)}(r.type)}}function Yo(b,r){return window.getComputedStyle(b)[r]}const tl=!1;function bc(b){const r="\n - ";return`${r}${b.filter(Boolean).map(u=>u).join(r)}`}const sy="*";function Tl(b,r){const u=[];return"string"==typeof b?b.split(/\s*,\s*/).forEach(y=>function WM(b,r,u){if(":"==b[0]){const gt=function $M(b,r){switch(b){case":enter":return"void => *";case":leave":return"* => void";case":increment":return(u,y)=>parseFloat(y)>parseFloat(u);case":decrement":return(u,y)=>parseFloat(y)<parseFloat(u);default:return r.push(function ax(b){return new rt.vHH(3016,!1)}()),"* => *"}}(b,u);if("function"==typeof gt)return void r.push(gt);b=gt}const y=b.match(/^(\*|[-\w]+)\s*(<?[=-]>)\s*(\*|[-\w]+)$/);if(null==y||y.length<4)return u.push(function P1(b){return new rt.vHH(3015,!1)}()),r;const L=y[1],G=y[2],Te=y[3];r.push(ip(L,Te));const Ze=L==sy&&Te==sy;"<"==G[0]&&!Ze&&r.push(ip(Te,L))}(y,u,r)):u.push(b),u}const ob=new Set(["true","1"]),Jb=new Set(["false","0"]);function ip(b,r){const u=ob.has(b)||Jb.has(b),y=ob.has(r)||Jb.has(r);return(L,G)=>{let Te=b==sy||b==L,Ze=r==sy||r==G;return!Te&&u&&"boolean"==typeof L&&(Te=L?ob.has(b):Jb.has(b)),!Ze&&y&&"boolean"==typeof G&&(Ze=G?ob.has(r):Jb.has(r)),Te&&Ze}}const uh=":self",Qb=new RegExp(`s*${uh}s*,?`,"g");function F0(b,r,u,y){return new PD(b).build(r,u,y)}class PD{constructor(r){this._driver=r}build(r,u,y){const L=new cx(u);return this._resetContextStyleTimingState(L),ir(this,cg(r),L)}_resetContextStyleTimingState(r){r.currentQuerySelector="",r.collectedStyles=new Map,r.collectedStyles.set("",new Map),r.currentTime=0}visitTrigger(r,u){let y=u.queryCount=0,L=u.depCount=0;const G=[],Te=[];return"@"==r.name.charAt(0)&&u.errors.push(function ty(){return new rt.vHH(3006,!1)}()),r.definitions.forEach(Ze=>{if(this._resetContextStyleTimingState(u),0==Ze.type){const gt=Ze,Ot=gt.name;Ot.toString().split(/\s*,\s*/).forEach(sn=>{gt.name=sn,G.push(this.visitState(gt,u))}),gt.name=Ot}else if(1==Ze.type){const gt=this.visitTransition(Ze,u);y+=gt.queryCount,L+=gt.depCount,Te.push(gt)}else u.errors.push(function tp(){return new rt.vHH(3007,!1)}())}),{type:7,name:r.name,states:G,transitions:Te,queryCount:y,depCount:L,options:null}}visitState(r,u){const y=this.visitStyle(r.styles,u),L=r.options&&r.options.params||null;if(y.containsDynamicStyles){const G=new Set,Te=L||{};if(y.styles.forEach(Ze=>{Ze instanceof Map&&Ze.forEach(gt=>{Kb(gt).forEach(Ot=>{Te.hasOwnProperty(Ot)||G.add(Ot)})})}),G.size){s(G.values());u.errors.push(function kg(b,r){return new rt.vHH(3008,!1)}(r.name))}}return{type:0,name:r.name,style:y,options:L?{params:L}:null}}visitTransition(r,u){u.queryCount=0,u.depCount=0;const y=ir(this,cg(r.animation),u);return{type:1,matchers:Tl(r.expr,u.errors),animation:y,queryCount:u.queryCount,depCount:u.depCount,options:qb(r.options)}}visitSequence(r,u){return{type:2,steps:r.steps.map(y=>ir(this,y,u)),options:qb(r.options)}}visitGroup(r,u){const y=u.currentTime;let L=0;const G=r.steps.map(Te=>{u.currentTime=y;const Ze=ir(this,Te,u);return L=Math.max(L,u.currentTime),Ze});return u.currentTime=L,{type:3,steps:G,options:qb(r.options)}}visitAnimate(r,u){const y=function ZE(b,r){if(b.hasOwnProperty("duration"))return b;if("number"==typeof b){return GE(YC(b,r).duration,0,"")}const u=b;if(u.split(/\s+/).some(G=>"{"==G.charAt(0)&&"{"==G.charAt(1))){const G=GE(0,0,"");return G.dynamic=!0,G.strValue=u,G}const L=YC(u,r);return GE(L.duration,L.delay,L.easing)}(r.timings,u.errors);u.currentAnimateTimings=y;let L,G=r.styles?r.styles:(0,Ru.oB)({});if(5==G.type)L=this.visitKeyframes(G,u);else{let Te=r.styles,Ze=!1;if(!Te){Ze=!0;const Ot={};y.easing&&(Ot.easing=y.easing),Te=(0,Ru.oB)(Ot)}u.currentTime+=y.duration+y.delay;const gt=this.visitStyle(Te,u);gt.isEmptyStep=Ze,L=gt}return u.currentAnimateTimings=null,{type:4,timings:y,style:L,options:null}}visitStyle(r,u){const y=this._makeStyleAst(r,u);return this._validateStyleAst(y,u),y}_makeStyleAst(r,u){const y=[],L=Array.isArray(r.styles)?r.styles:[r.styles];for(let Ze of L)"string"==typeof Ze?Ze===Ru.l3?y.push(Ze):u.errors.push(new rt.vHH(3002,!1)):y.push(V1(Ze));let G=!1,Te=null;return y.forEach(Ze=>{if(Ze instanceof Map&&(Ze.has("easing")&&(Te=Ze.get("easing"),Ze.delete("easing")),!G))for(let gt of Ze.values())if(gt.toString().indexOf("{{")>=0){G=!0;break}}),{type:6,styles:y,easing:Te,offset:r.offset,containsDynamicStyles:G,options:null}}_validateStyleAst(r,u){const y=u.currentAnimateTimings;let L=u.currentTime,G=u.currentTime;y&&G>0&&(G-=y.duration+y.delay),r.styles.forEach(Te=>{"string"!=typeof Te&&Te.forEach((Ze,gt)=>{const Ot=u.collectedStyles.get(u.currentQuerySelector),sn=Ot.get(gt);let ci=!0;sn&&(G!=L&&G>=sn.startTime&&L<=sn.endTime&&(u.errors.push(function Cv(b,r,u,y,L){return new rt.vHH(3010,!1)}(0,sn.startTime,sn.endTime)),ci=!1),G=sn.startTime),ci&&Ot.set(gt,{startTime:G,endTime:L}),u.options&&xv(Ze,u.options,u.errors)})})}visitKeyframes(r,u){const y={type:5,styles:[],options:null};if(!u.currentAnimateTimings)return u.errors.push(function I1(){return new rt.vHH(3011,!1)}()),y;let G=0;const Te=[];let Ze=!1,gt=!1,Ot=0;const sn=r.steps.map(Ko=>{const ma=this._makeStyleAst(Ko,u);let Rl=null!=ma.offset?ma.offset:function KM(b){if("string"==typeof b)return null;let r=null;if(Array.isArray(b))b.forEach(u=>{if(u instanceof Map&&u.has("offset")){const y=u;r=parseFloat(y.get("offset")),y.delete("offset")}});else if(b instanceof Map&&b.has("offset")){const u=b;r=parseFloat(u.get("offset")),u.delete("offset")}return r}(ma.styles),Cc=0;return null!=Rl&&(G++,Cc=ma.offset=Rl),gt=gt||Cc<0||Cc>1,Ze=Ze||Cc<Ot,Ot=Cc,Te.push(Cc),ma});gt&&u.errors.push(function Fg(){return new rt.vHH(3012,!1)}()),Ze&&u.errors.push(function O0(){return new rt.vHH(3200,!1)}());const ci=r.steps.length;let Ji=0;G>0&&G<ci?u.errors.push(function BC(){return new rt.vHH(3202,!1)}()):0==G&&(Ji=1/(ci-1));const xr=ci-1,Hr=u.currentTime,Do=u.currentAnimateTimings,Zo=Do.duration;return sn.forEach((Ko,ma)=>{const Rl=Ji>0?ma==xr?1:Ji*ma:Te[ma],Cc=Rl*Zo;u.currentTime=Hr+Do.delay+Cc,Do.duration=Cc,this._validateStyleAst(Ko,u),Ko.offset=Rl,y.styles.push(Ko)}),y}visitReference(r,u){return{type:8,animation:ir(this,cg(r.animation),u),options:qb(r.options)}}visitAnimateChild(r,u){return u.depCount++,{type:9,options:qb(r.options)}}visitAnimateRef(r,u){return{type:10,animation:this.visitReference(r.animation,u),options:qb(r.options)}}visitQuery(r,u){const y=u.currentQuerySelector,L=r.options||{};u.queryCount++,u.currentQuery=r;const[G,Te]=function VE(b){const r=!!b.split(/\s*,\s*/).find(u=>u==uh);return r&&(b=b.replace(Qb,"")),b=b.replace(/@\*/g,Y1).replace(/@\w+/g,u=>Y1+"-"+u.slice(1)).replace(/:animating/g,Mv),[b,r]}(r.selector);u.currentQuerySelector=y.length?y+" "+G:G,Ff(u.collectedStyles,u.currentQuerySelector,new Map);const Ze=ir(this,cg(r.animation),u);return u.currentQuery=null,u.currentQuerySelector=y,{type:11,selector:G,limit:L.limit||0,optional:!!L.optional,includeSelf:Te,animation:Ze,originalSelector:r.selector,options:qb(r.options)}}visitStagger(r,u){u.currentQuery||u.errors.push(function L0(){return new rt.vHH(3013,!1)}());const y="full"===r.timings?{duration:0,delay:0,easing:"full"}:YC(r.timings,u.errors,!0);return{type:12,animation:ir(this,cg(r.animation),u),timings:y,options:null}}}class cx{constructor(r){this.errors=r,this.queryCount=0,this.depCount=0,this.currentTransition=null,this.currentQuery=null,this.currentQuerySelector=null,this.currentAnimateTimings=null,this.currentTime=0,this.collectedStyles=new Map,this.options=null,this.unsupportedCSSPropertiesFound=new Set}}function qb(b){return b?(b=jb(b)).params&&(b.params=function G1(b){return b?jb(b):null}(b.params)):b={},b}function GE(b,r,u){return{duration:b,delay:r,easing:u}}function JM(b,r,u,y,L,G,Te=null,Ze=!1){return{type:1,element:b,keyframes:r,preStyleProps:u,postStyleProps:y,duration:L,delay:G,totalTime:L+G,easing:Te,subTimeline:Ze}}class W1{constructor(){this._map=new Map}get(r){return this._map.get(r)||[]}append(r,u){let y=this._map.get(r);y||this._map.set(r,y=[]),y.push(...u)}has(r){return this._map.has(r)}clear(){this._map.clear()}}const N0=new RegExp(":enter","g"),dx=new RegExp(":leave","g");function px(b,r,u,y,L,G=new Map,Te=new Map,Ze,gt,Ot=[]){return(new mx).buildKeyframes(b,r,u,y,L,G,Te,Ze,gt,Ot)}class mx{buildKeyframes(r,u,y,L,G,Te,Ze,gt,Ot,sn=[]){Ot=Ot||new W1;const ci=new B0(r,u,Ot,L,G,sn,[]);ci.options=gt;const Ji=gt.delay?Tv(gt.delay):0;ci.currentTimeline.delayNextStep(Ji),ci.currentTimeline.setStyles([Te],null,ci.errors,gt),ir(this,y,ci);const xr=ci.timelines.filter(Hr=>Hr.containsAnimation());if(xr.length&&Ze.size){let Hr;for(let Do=xr.length-1;Do>=0;Do--){const Zo=xr[Do];if(Zo.element===u){Hr=Zo;break}}Hr&&!Hr.allowOnlyTimelineStyles()&&Hr.setStyles([Ze],null,ci.errors,gt)}return xr.length?xr.map(Hr=>Hr.buildKeyframes()):[JM(u,[],[],[],0,Ji,"",!1)]}visitTrigger(r,u){}visitState(r,u){}visitTransition(r,u){}visitAnimateChild(r,u){const y=u.subInstructions.get(u.element);if(y){const L=u.createSubContext(r.options),G=u.currentTimeline.currentTime,Te=this._visitSubInstructions(y,L,L.options);G!=Te&&u.transformIntoNewTimeline(Te)}u.previousNode=r}visitAnimateRef(r,u){const y=u.createSubContext(r.options);y.transformIntoNewTimeline(),this._applyAnimationRefDelays([r.options,r.animation.options],u,y),this.visitReference(r.animation,y),u.transformIntoNewTimeline(y.currentTimeline.currentTime),u.previousNode=r}_applyAnimationRefDelays(r,u,y){for(const L of r){const G=L?.delay;if(G){const Te="number"==typeof G?G:Tv(H(G,L?.params??{},u.errors));y.delayNextStep(Te)}}}_visitSubInstructions(r,u,y){let G=u.currentTimeline.currentTime;const Te=null!=y.duration?Tv(y.duration):null,Ze=null!=y.delay?Tv(y.delay):null;return 0!==Te&&r.forEach(gt=>{const Ot=u.appendInstructionToTimeline(gt,Te,Ze);G=Math.max(G,Ot.duration+Ot.delay)}),G}visitReference(r,u){u.updateOptions(r.options,!0),ir(this,r.animation,u),u.previousNode=r}visitSequence(r,u){const y=u.subContextCount;let L=u;const G=r.options;if(G&&(G.params||G.delay)&&(L=u.createSubContext(G),L.transformIntoNewTimeline(),null!=G.delay)){6==L.previousNode.type&&(L.currentTimeline.snapshotCurrentStyles(),L.previousNode=ly);const Te=Tv(G.delay);L.delayNextStep(Te)}r.steps.length&&(r.steps.forEach(Te=>ir(this,Te,L)),L.currentTimeline.applyStylesToKeyframe(),L.subContextCount>y&&L.transformIntoNewTimeline()),u.previousNode=r}visitGroup(r,u){const y=[];let L=u.currentTimeline.currentTime;const G=r.options&&r.options.delay?Tv(r.options.delay):0;r.steps.forEach(Te=>{const Ze=u.createSubContext(r.options);G&&Ze.delayNextStep(G),ir(this,Te,Ze),L=Math.max(L,Ze.currentTimeline.currentTime),y.push(Ze.currentTimeline)}),y.forEach(Te=>u.currentTimeline.mergeTimelineCollectedStyles(Te)),u.transformIntoNewTimeline(L),u.previousNode=r}_visitTiming(r,u){if(r.dynamic){const y=r.strValue;return YC(u.params?H(y,u.params,u.errors):y,u.errors)}return{duration:r.duration,delay:r.delay,easing:r.easing}}visitAnimate(r,u){const y=u.currentAnimateTimings=this._visitTiming(r.timings,u),L=u.currentTimeline;y.delay&&(u.incrementTime(y.delay),L.snapshotCurrentStyles());const G=r.style;5==G.type?this.visitKeyframes(G,u):(u.incrementTime(y.duration),this.visitStyle(G,u),L.applyStylesToKeyframe()),u.currentAnimateTimings=null,u.previousNode=r}visitStyle(r,u){const y=u.currentTimeline,L=u.currentAnimateTimings;!L&&y.hasCurrentStyleProperties()&&y.forwardFrame();const G=L&&L.easing||r.easing;r.isEmptyStep?y.applyEmptyStep(G):y.setStyles(r.styles,G,u.errors,u.options),u.previousNode=r}visitKeyframes(r,u){const y=u.currentAnimateTimings,L=u.currentTimeline.duration,G=y.duration,Ze=u.createSubContext().currentTimeline;Ze.easing=y.easing,r.styles.forEach(gt=>{const Ot=gt.offset||0;Ze.forwardTime(Ot*G),Ze.setStyles(gt.styles,gt.easing,u.errors,u.options),Ze.applyStylesToKeyframe()}),u.currentTimeline.mergeTimelineCollectedStyles(Ze),u.transformIntoNewTimeline(L+G),u.previousNode=r}visitQuery(r,u){const y=u.currentTimeline.currentTime,L=r.options||{},G=L.delay?Tv(L.delay):0;G&&(6===u.previousNode.type||0==y&&u.currentTimeline.hasCurrentStyleProperties())&&(u.currentTimeline.snapshotCurrentStyles(),u.previousNode=ly);let Te=y;const Ze=u.invokeQuery(r.selector,r.originalSelector,r.limit,r.includeSelf,!!L.optional,u.errors);u.currentQueryTotal=Ze.length;let gt=null;Ze.forEach((Ot,sn)=>{u.currentQueryIndex=sn;const ci=u.createSubContext(r.options,Ot);G&&ci.delayNextStep(G),Ot===u.element&&(gt=ci.currentTimeline),ir(this,r.animation,ci),ci.currentTimeline.applyStylesToKeyframe();const Ji=ci.currentTimeline.currentTime;Te=Math.max(Te,Ji)}),u.currentQueryIndex=0,u.currentQueryTotal=0,u.transformIntoNewTimeline(Te),gt&&(u.currentTimeline.mergeTimelineCollectedStyles(gt),u.currentTimeline.snapshotCurrentStyles()),u.previousNode=r}visitStagger(r,u){const y=u.parentContext,L=u.currentTimeline,G=r.timings,Te=Math.abs(G.duration),Ze=Te*(u.currentQueryTotal-1);let gt=Te*u.currentQueryIndex;switch(G.duration<0?"reverse":G.easing){case"reverse":gt=Ze-gt;break;case"full":gt=y.currentStaggerTime}const sn=u.currentTimeline;gt&&sn.delayNextStep(gt);const ci=sn.currentTime;ir(this,r.animation,u),u.previousNode=r,y.currentStaggerTime=L.currentTime-ci+(L.startTime-y.currentTimeline.startTime)}}const ly={};class B0{constructor(r,u,y,L,G,Te,Ze,gt){this._driver=r,this.element=u,this.subInstructions=y,this._enterClassName=L,this._leaveClassName=G,this.errors=Te,this.timelines=Ze,this.parentContext=null,this.currentAnimateTimings=null,this.previousNode=ly,this.subContextCount=0,this.options={},this.currentQueryIndex=0,this.currentQueryTotal=0,this.currentStaggerTime=0,this.currentTimeline=gt||new $1(this._driver,u,0),Ze.push(this.currentTimeline)}get params(){return this.options.params}updateOptions(r,u){if(!r)return;const y=r;let L=this.options;null!=y.duration&&(L.duration=Tv(y.duration)),null!=y.delay&&(L.delay=Tv(y.delay));const G=y.params;if(G){let Te=L.params;Te||(Te=this.options.params={}),Object.keys(G).forEach(Ze=>{(!u||!Te.hasOwnProperty(Ze))&&(Te[Ze]=H(G[Ze],Te,this.errors))})}}_copyOptions(){const r={};if(this.options){const u=this.options.params;if(u){const y=r.params={};Object.keys(u).forEach(L=>{y[L]=u[L]})}}return r}createSubContext(r=null,u,y){const L=u||this.element,G=new B0(this._driver,L,this.subInstructions,this._enterClassName,this._leaveClassName,this.errors,this.timelines,this.currentTimeline.fork(L,y||0));return G.previousNode=this.previousNode,G.currentAnimateTimings=this.currentAnimateTimings,G.options=this._copyOptions(),G.updateOptions(r),G.currentQueryIndex=this.currentQueryIndex,G.currentQueryTotal=this.currentQueryTotal,G.parentContext=this,this.subContextCount++,G}transformIntoNewTimeline(r){return this.previousNode=ly,this.currentTimeline=this.currentTimeline.fork(this.element,r),this.timelines.push(this.currentTimeline),this.currentTimeline}appendInstructionToTimeline(r,u,y){const L={duration:u??r.duration,delay:this.currentTimeline.currentTime+(y??0)+r.delay,easing:""},G=new WE(this._driver,r.element,r.keyframes,r.preStyleProps,r.postStyleProps,L,r.stretchStartingKeyframe);return this.timelines.push(G),L}incrementTime(r){this.currentTimeline.forwardTime(this.currentTimeline.duration+r)}delayNextStep(r){r>0&&this.currentTimeline.delayNextStep(r)}invokeQuery(r,u,y,L,G,Te){let Ze=[];if(L&&Ze.push(this.element),r.length>0){r=(r=r.replace(N0,"."+this._enterClassName)).replace(dx,"."+this._leaveClassName);const gt=1!=y;let Ot=this._driver.query(this.element,r,gt);0!==y&&(Ot=y<0?Ot.slice(Ot.length+y,Ot.length):Ot.slice(0,y)),Ze.push(...Ot)}return!G&&0==Ze.length&&Te.push(function FE(b){return new rt.vHH(3014,!1)}()),Ze}}class $1{constructor(r,u,y,L){this._driver=r,this.element=u,this.startTime=y,this._elementTimelineStylesLookup=L,this.duration=0,this.easing=null,this._previousKeyframe=new Map,this._currentKeyframe=new Map,this._keyframes=new Map,this._styleSummary=new Map,this._localTimelineStyles=new Map,this._pendingStyles=new Map,this._backFill=new Map,this._currentEmptyStepKeyframe=null,this._elementTimelineStylesLookup||(this._elementTimelineStylesLookup=new Map),this._globalTimelineStyles=this._elementTimelineStylesLookup.get(u),this._globalTimelineStyles||(this._globalTimelineStyles=this._localTimelineStyles,this._elementTimelineStylesLookup.set(u,this._localTimelineStyles)),this._loadKeyframe()}containsAnimation(){switch(this._keyframes.size){case 0:return!1;case 1:return this.hasCurrentStyleProperties();default:return!0}}hasCurrentStyleProperties(){return this._currentKeyframe.size>0}get currentTime(){return this.startTime+this.duration}delayNextStep(r){const u=1===this._keyframes.size&&this._pendingStyles.size;this.duration||u?(this.forwardTime(this.currentTime+r),u&&this.snapshotCurrentStyles()):this.startTime+=r}fork(r,u){return this.applyStylesToKeyframe(),new $1(this._driver,r,u||this.currentTime,this._elementTimelineStylesLookup)}_loadKeyframe(){this._currentKeyframe&&(this._previousKeyframe=this._currentKeyframe),this._currentKeyframe=this._keyframes.get(this.duration),this._currentKeyframe||(this._currentKeyframe=new Map,this._keyframes.set(this.duration,this._currentKeyframe))}forwardFrame(){this.duration+=1,this._loadKeyframe()}forwardTime(r){this.applyStylesToKeyframe(),this.duration=r,this._loadKeyframe()}_updateStyle(r,u){this._localTimelineStyles.set(r,u),this._globalTimelineStyles.set(r,u),this._styleSummary.set(r,{time:this.currentTime,value:u})}allowOnlyTimelineStyles(){return this._currentEmptyStepKeyframe!==this._currentKeyframe}applyEmptyStep(r){r&&this._previousKeyframe.set("easing",r);for(let[u,y]of this._globalTimelineStyles)this._backFill.set(u,y||Ru.l3),this._currentKeyframe.set(u,Ru.l3);this._currentEmptyStepKeyframe=this._currentKeyframe}setStyles(r,u,y,L){u&&this._previousKeyframe.set("easing",u);const G=L&&L.params||{},Te=function qM(b,r){const u=new Map;let y;return b.forEach(L=>{if("*"===L){y=y||r.keys();for(let G of y)u.set(G,Ru.l3)}else ay(L,u)}),u}(r,this._globalTimelineStyles);for(let[Ze,gt]of Te){const Ot=H(gt,G,y);this._pendingStyles.set(Ze,Ot),this._localTimelineStyles.has(Ze)||this._backFill.set(Ze,this._globalTimelineStyles.get(Ze)??Ru.l3),this._updateStyle(Ze,Ot)}}applyStylesToKeyframe(){0!=this._pendingStyles.size&&(this._pendingStyles.forEach((r,u)=>{this._currentKeyframe.set(u,r)}),this._pendingStyles.clear(),this._localTimelineStyles.forEach((r,u)=>{this._currentKeyframe.has(u)||this._currentKeyframe.set(u,r)}))}snapshotCurrentStyles(){for(let[r,u]of this._localTimelineStyles)this._pendingStyles.set(r,u),this._updateStyle(r,u)}getFinalKeyframe(){return this._keyframes.get(this.duration)}get properties(){const r=[];for(let u in this._currentKeyframe)r.push(u);return r}mergeTimelineCollectedStyles(r){r._styleSummary.forEach((u,y)=>{const L=this._styleSummary.get(y);(!L||u.time>L.time)&&this._updateStyle(y,u.value)})}buildKeyframes(){this.applyStylesToKeyframe();const r=new Set,u=new Set,y=1===this._keyframes.size&&0===this.duration;let L=[];this._keyframes.forEach((Ze,gt)=>{const Ot=ay(Ze,new Map,this._backFill);Ot.forEach((sn,ci)=>{sn===Ru.k1?r.add(ci):sn===Ru.l3&&u.add(ci)}),y||Ot.set("offset",gt/this.duration),L.push(Ot)});const G=r.size?s(r.values()):[],Te=u.size?s(u.values()):[];if(y){const Ze=L[0],gt=new Map(Ze);Ze.set("offset",0),gt.set("offset",1),L=[Ze,gt]}return JM(this.element,L,G,Te,this.duration,this.startTime,this.easing,!1)}}class WE extends $1{constructor(r,u,y,L,G,Te,Ze=!1){super(r,u,Te.delay),this.keyframes=y,this.preStyleProps=L,this.postStyleProps=G,this._stretchStartingKeyframe=Ze,this.timings={duration:Te.duration,delay:Te.delay,easing:Te.easing}}containsAnimation(){return this.keyframes.length>1}buildKeyframes(){let r=this.keyframes,{delay:u,duration:y,easing:L}=this.timings;if(this._stretchStartingKeyframe&&u){const G=[],Te=y+u,Ze=u/Te,gt=ay(r[0]);gt.set("offset",0),G.push(gt);const Ot=ay(r[0]);Ot.set("offset",j1(Ze)),G.push(Ot);const sn=r.length-1;for(let ci=1;ci<=sn;ci++){let Ji=ay(r[ci]);const Hr=u+Ji.get("offset")*y;Ji.set("offset",j1(Hr/Te)),G.push(Ji)}y=Te,u=0,L="",r=G}return JM(this.element,r,this.preStyleProps,this.postStyleProps,y,u,L,!0)}}function j1(b,r=3){const u=Math.pow(10,r-1);return Math.round(b*u)/u}class $E{}const fx=new Set(["width","height","minWidth","minHeight","maxWidth","maxHeight","left","top","bottom","right","fontSize","outlineWidth","outlineOffset","paddingTop","paddingLeft","paddingBottom","paddingRight","marginTop","marginLeft","marginBottom","marginRight","borderRadius","borderWidth","borderTopWidth","borderLeftWidth","borderRightWidth","borderBottomWidth","textIndent","perspective"]);class AS extends $E{normalizePropertyName(r,u){return k(r)}normalizeStyleValue(r,u,y,L){let G="";const Te=y.toString().trim();if(fx.has(u)&&0!==y&&"0"!==y)if("number"==typeof y)G="px";else{const Ze=y.match(/^[+-]?[\d\.]+([a-z]*)$/);Ze&&0==Ze[1].length&&L.push(function Xy(b,r){return new rt.vHH(3005,!1)}())}return Te+G}}function RD(b,r,u,y,L,G,Te,Ze,gt,Ot,sn,ci,Ji){return{type:0,element:b,triggerName:r,isRemovalTransition:L,fromState:u,fromStyles:G,toState:y,toStyles:Te,timelines:Ze,queriedElements:gt,preStyleProps:Ot,postStyleProps:sn,totalTime:ci,errors:Ji}}const XM={};class eT{constructor(r,u,y){this._triggerName=r,this.ast=u,this._stateStyles=y}match(r,u,y,L){return function jA(b,r,u,y,L){return b.some(G=>G(r,u,y,L))}(this.ast.matchers,r,u,y,L)}buildStyles(r,u,y){let L=this._stateStyles.get("*");return void 0!==r&&(L=this._stateStyles.get(r?.toString())||L),L?L.buildStyles(u,y):new Map}build(r,u,y,L,G,Te,Ze,gt,Ot,sn){const ci=[],Ji=this.ast.options&&this.ast.options.params||XM,xr=Ze&&Ze.params||XM,Hr=this.buildStyles(y,xr,ci),Do=gt&&gt.params||XM,Zo=this.buildStyles(L,Do,ci),Ko=new Set,ma=new Map,Rl=new Map,Cc="void"===L,km={params:FD(Do,Ji),delay:this.ast.options?.delay},Rm=sn?[]:px(r,u,this.ast.animation,G,Te,Hr,Zo,km,Ot,ci);let Pp=0;if(Rm.forEach(hs=>{Pp=Math.max(hs.duration+hs.delay,Pp)}),ci.length)return RD(u,this._triggerName,y,L,Cc,Hr,Zo,[],[],ma,Rl,Pp,ci);Rm.forEach(hs=>{const od=hs.element,ad=Ff(ma,od,new Set);hs.preStyleProps.forEach(u_=>ad.add(u_));const ph=Ff(Rl,od,new Set);hs.postStyleProps.forEach(u_=>ph.add(u_)),od!==u&&Ko.add(od)});const Uf=s(Ko.values());return RD(u,this._triggerName,y,L,Cc,Hr,Zo,Rm,Uf,ma,Rl,Pp)}}function FD(b,r){const u=jb(r);for(const y in b)b.hasOwnProperty(y)&&null!=b[y]&&(u[y]=b[y]);return u}class IS{constructor(r,u,y){this.styles=r,this.defaultParams=u,this.normalizer=y}buildStyles(r,u){const y=new Map,L=jb(this.defaultParams);return Object.keys(r).forEach(G=>{const Te=r[G];null!==Te&&(L[G]=Te)}),this.styles.styles.forEach(G=>{"string"!=typeof G&&G.forEach((Te,Ze)=>{Te&&(Te=H(Te,L,u));const gt=this.normalizer.normalizePropertyName(Ze,u);Te=this.normalizer.normalizeStyleValue(Ze,gt,Te,u),y.set(Ze,Te)})}),y}}class PS{constructor(r,u,y){this.name=r,this.ast=u,this._normalizer=y,this.transitionFactories=[],this.states=new Map,u.states.forEach(L=>{const G=L.options&&L.options.params||{};this.states.set(L.name,new IS(L.style,G,y))}),K1(this.states,"true","1"),K1(this.states,"false","0"),u.transitions.forEach(L=>{this.transitionFactories.push(new eT(r,L,this.states))}),this.fallbackTransition=function OS(b,r,u){return new eT(b,{type:1,animation:{type:2,steps:[],options:null},matchers:[(Te,Ze)=>!0],options:null,queryCount:0,depCount:0},r)}(r,this.states,this._normalizer)}get containsQueries(){return this.ast.queryCount>0}matchTransition(r,u,y,L){return this.transitionFactories.find(Te=>Te.match(r,u,y,L))||null}matchStyles(r,u,y){return this.fallbackTransition.buildStyles(r,u,y)}}function K1(b,r,u){b.has(r)?b.has(u)||b.set(u,b.get(r)):b.has(u)&&b.set(r,b.get(u))}const hx=new W1;class gx{constructor(r,u,y){this.bodyNode=r,this._driver=u,this._normalizer=y,this._animations=new Map,this._playersById=new Map,this.players=[]}register(r,u){const y=[],L=[],G=F0(this._driver,u,y,L);if(y.length)throw function eb(b){return new rt.vHH(3503,!1)}();L.length&&function Xm(b){tl&&console.warn(`Animation built with the following warnings:${bc(b)}`)}(L),this._animations.set(r,G)}_buildPlayer(r,u,y){const L=r.element,G=UE(this._driver,this._normalizer,0,r.keyframes,u,y);return this._driver.animate(L,G,r.duration,r.delay,r.easing,[],!0)}create(r,u,y={}){const L=[],G=this._animations.get(r);let Te;const Ze=new Map;if(G?(Te=px(this._driver,u,G,$b,Aa,new Map,new Map,y,hx,L),Te.forEach(sn=>{const ci=Ff(Ze,sn.element,new Map);sn.postStyleProps.forEach(Ji=>ci.set(Ji,null))})):(L.push(function k1(){return new rt.vHH(3300,!1)}()),Te=[]),L.length)throw function YM(b){return new rt.vHH(3504,!1)}();Ze.forEach((sn,ci)=>{sn.forEach((Ji,xr)=>{sn.set(xr,this._driver.computeStyle(ci,xr,Ru.l3))})});const Ot=N_(Te.map(sn=>{const ci=Ze.get(sn.element);return this._buildPlayer(sn,new Map,ci)}));return this._playersById.set(r,Ot),Ot.onDestroy(()=>this.destroy(r)),this.players.push(Ot),Ot}destroy(r){const u=this._getPlayer(r);u.destroy(),this._playersById.delete(r);const y=this.players.indexOf(u);y>=0&&this.players.splice(y,1)}_getPlayer(r){const u=this._playersById.get(r);if(!u)throw function ny(b){return new rt.vHH(3301,!1)}();return u}listen(r,u,y,L){const G=B_(u,"","","");return ch(this._getPlayer(r),y,G,L),()=>{}}command(r,u,y,L){if("register"==y)return void this.register(r,L[0]);if("create"==y){const Te=L[0]||{};return void this.create(r,u,Te)}const G=this._getPlayer(r);switch(y){case"play":G.play();break;case"pause":G.pause();break;case"reset":G.reset();break;case"restart":G.restart();break;case"finish":G.finish();break;case"init":G.init();break;case"setPosition":G.setPosition(parseFloat(L[0]));break;case"destroy":this.destroy(r)}}}const tT="ng-animate-queued",jE="ng-animate-disabled",vx=[],iT={namespaceId:"",setForRemoval:!1,setForMove:!1,hasAnimation:!1,removedBeforeQueried:!1},U0={namespaceId:"",setForMove:!1,setForRemoval:!1,hasAnimation:!1,removedBeforeQueried:!0},a_="__ng_removed";class J1{get params(){return this.options.params}constructor(r,u=""){this.namespaceId=u;const y=r&&r.hasOwnProperty("value"),L=y?r.value:r;if(this.value=function bx(b){return b??null}(L),y){const G=jb(r);delete G.value,this.options=G}else this.options={};this.options.params||(this.options.params={})}absorbOptions(r){const u=r.params;if(u){const y=this.options.params;Object.keys(u).forEach(L=>{null==y[L]&&(y[L]=u[L])})}}}const dh="void",rT=new J1(dh);class oT{constructor(r,u,y){this.id=r,this.hostElement=u,this._engine=y,this.players=[],this._triggers=new Map,this._queue=[],this._elementListeners=new Map,this._hostClassName="ng-tns-"+r,Dv(u,this._hostClassName)}listen(r,u,y,L){if(!this._triggers.has(u))throw function NE(b,r){return new rt.vHH(3302,!1)}();if(null==y||0==y.length)throw function tb(b){return new rt.vHH(3303,!1)}();if(!function Cx(b){return"start"==b||"done"==b}(y))throw function Ua(b,r){return new rt.vHH(3400,!1)}();const G=Ff(this._elementListeners,r,[]),Te={name:u,phase:y,callback:L};G.push(Te);const Ze=Ff(this._engine.statesByElement,r,new Map);return Ze.has(u)||(Dv(r,z1),Dv(r,z1+"-"+u),Ze.set(u,rT)),()=>{this._engine.afterFlush(()=>{const gt=G.indexOf(Te);gt>=0&&G.splice(gt,1),this._triggers.has(u)||Ze.delete(u)})}}register(r,u){return!this._triggers.has(r)&&(this._triggers.set(r,u),!0)}_getTrigger(r){const u=this._triggers.get(r);if(!u)throw function kh(b){return new rt.vHH(3401,!1)}();return u}trigger(r,u,y,L=!0){const G=this._getTrigger(u),Te=new aT(this.id,u,r);let Ze=this._engine.statesByElement.get(r);Ze||(Dv(r,z1),Dv(r,z1+"-"+u),this._engine.statesByElement.set(r,Ze=new Map));let gt=Ze.get(u);const Ot=new J1(y,this.id);if(!(y&&y.hasOwnProperty("value"))&&gt&&Ot.absorbOptions(gt.options),Ze.set(u,Ot),gt||(gt=rT),Ot.value!==dh&&gt.value===Ot.value){if(!function Y0(b,r){const u=Object.keys(b),y=Object.keys(r);if(u.length!=y.length)return!1;for(let L=0;L<u.length;L++){const G=u[L];if(!r.hasOwnProperty(G)||b[G]!==r[G])return!1}return!0}(gt.params,Ot.params)){const Do=[],Zo=G.matchStyles(gt.value,gt.params,Do),Ko=G.matchStyles(Ot.value,Ot.params,Do);Do.length?this._engine.reportError(Do):this._engine.afterFlush(()=>{Ng(r,Zo),Rh(r,Ko)})}return}const Ji=Ff(this._engine.playersByElement,r,[]);Ji.forEach(Do=>{Do.namespaceId==this.id&&Do.triggerName==u&&Do.queued&&Do.destroy()});let xr=G.matchTransition(gt.value,Ot.value,r,Ot.params),Hr=!1;if(!xr){if(!L)return;xr=G.fallbackTransition,Hr=!0}return this._engine.totalQueuedPlayers++,this._queue.push({element:r,triggerName:u,transition:xr,fromState:gt,toState:Ot,player:Te,isFallbackTransition:Hr}),Hr||(Dv(r,tT),Te.onStart(()=>{z0(r,tT)})),Te.onDone(()=>{let Do=this.players.indexOf(Te);Do>=0&&this.players.splice(Do,1);const Zo=this._engine.playersByElement.get(r);if(Zo){let Ko=Zo.indexOf(Te);Ko>=0&&Zo.splice(Ko,1)}}),this.players.push(Te),Ji.push(Te),Te}deregister(r){this._triggers.delete(r),this._engine.statesByElement.forEach(u=>u.delete(r)),this._elementListeners.forEach((u,y)=>{this._elementListeners.set(y,u.filter(L=>L.name!=r))})}clearElementCache(r){this._engine.statesByElement.delete(r),this._elementListeners.delete(r);const u=this._engine.playersByElement.get(r);u&&(u.forEach(y=>y.destroy()),this._engine.playersByElement.delete(r))}_signalRemovalForInnerTriggers(r,u){const y=this._engine.driver.query(r,Y1,!0);y.forEach(L=>{if(L[a_])return;const G=this._engine.fetchNamespacesByElement(L);G.size?G.forEach(Te=>Te.triggerLeaveAnimation(L,u,!1,!0)):this.clearElementCache(L)}),this._engine.afterFlushAnimationsDone(()=>y.forEach(L=>this.clearElementCache(L)))}triggerLeaveAnimation(r,u,y,L){const G=this._engine.statesByElement.get(r),Te=new Map;if(G){const Ze=[];if(G.forEach((gt,Ot)=>{if(Te.set(Ot,gt.value),this._triggers.has(Ot)){const sn=this.trigger(r,Ot,dh,L);sn&&Ze.push(sn)}}),Ze.length)return this._engine.markElementAsRemoved(this.id,r,!0,u,Te),y&&N_(Ze).onDone(()=>this._engine.processLeaveNode(r)),!0}return!1}prepareLeaveAnimationListeners(r){const u=this._elementListeners.get(r),y=this._engine.statesByElement.get(r);if(u&&y){const L=new Set;u.forEach(G=>{const Te=G.name;if(L.has(Te))return;L.add(Te);const gt=this._triggers.get(Te).fallbackTransition,Ot=y.get(Te)||rT,sn=new J1(dh),ci=new aT(this.id,Te,r);this._engine.totalQueuedPlayers++,this._queue.push({element:r,triggerName:Te,transition:gt,fromState:Ot,toState:sn,player:ci,isFallbackTransition:!0})})}}removeNode(r,u){const y=this._engine;if(r.childElementCount&&this._signalRemovalForInnerTriggers(r,u),this.triggerLeaveAnimation(r,u,!0))return;let L=!1;if(y.totalAnimations){const G=y.players.length?y.playersByQueriedElement.get(r):[];if(G&&G.length)L=!0;else{let Te=r;for(;Te=Te.parentNode;)if(y.statesByElement.get(Te)){L=!0;break}}}if(this.prepareLeaveAnimationListeners(r),L)y.markElementAsRemoved(this.id,r,!1,u);else{const G=r[a_];(!G||G===iT)&&(y.afterFlush(()=>this.clearElementCache(r)),y.destroyInnerAnimations(r),y._onRemovalComplete(r,u))}}insertNode(r,u){Dv(r,this._hostClassName)}drainQueuedTransitions(r){const u=[];return this._queue.forEach(y=>{const L=y.player;if(L.destroyed)return;const G=y.element,Te=this._elementListeners.get(G);Te&&Te.forEach(Ze=>{if(Ze.name==y.triggerName){const gt=B_(G,y.triggerName,y.fromState.value,y.toState.value);gt._data=r,ch(y.player,Ze.phase,gt,Ze.callback)}}),L.markedForDestroy?this._engine.afterFlush(()=>{L.destroy()}):u.push(y)}),this._queue=[],u.sort((y,L)=>{const G=y.transition.ast.depCount,Te=L.transition.ast.depCount;return 0==G||0==Te?G-Te:this._engine.driver.containsElement(y.element,L.element)?1:-1})}destroy(r){this.players.forEach(u=>u.destroy()),this._signalRemovalForInnerTriggers(this.hostElement,r)}elementContainsData(r){let u=!1;return this._elementListeners.has(r)&&(u=!0),u=!!this._queue.find(y=>y.element===r)||u,u}}class ND{_onRemovalComplete(r,u){this.onRemovalComplete(r,u)}constructor(r,u,y){this.bodyNode=r,this.driver=u,this._normalizer=y,this.players=[],this.newHostElements=new Map,this.playersByElement=new Map,this.playersByQueriedElement=new Map,this.statesByElement=new Map,this.disabledNodes=new Set,this.totalAnimations=0,this.totalQueuedPlayers=0,this._namespaceLookup={},this._namespaceList=[],this._flushFns=[],this._whenQuietFns=[],this.namespacesByHostElement=new Map,this.collectedEnterElements=[],this.collectedLeaveElements=[],this.onRemovalComplete=(L,G)=>{}}get queuedPlayers(){const r=[];return this._namespaceList.forEach(u=>{u.players.forEach(y=>{y.queued&&r.push(y)})}),r}createNamespace(r,u){const y=new oT(r,u,this);return this.bodyNode&&this.driver.containsElement(this.bodyNode,u)?this._balanceNamespaceList(y,u):(this.newHostElements.set(u,y),this.collectEnterElement(u)),this._namespaceLookup[r]=y}_balanceNamespaceList(r,u){const y=this._namespaceList,L=this.namespacesByHostElement;if(y.length-1>=0){let Te=!1,Ze=this.driver.getParentElement(u);for(;Ze;){const gt=L.get(Ze);if(gt){const Ot=y.indexOf(gt);y.splice(Ot+1,0,r),Te=!0;break}Ze=this.driver.getParentElement(Ze)}Te||y.unshift(r)}else y.push(r);return L.set(u,r),r}register(r,u){let y=this._namespaceLookup[r];return y||(y=this.createNamespace(r,u)),y}registerTrigger(r,u,y){let L=this._namespaceLookup[r];L&&L.register(u,y)&&this.totalAnimations++}destroy(r,u){if(!r)return;const y=this._fetchNamespace(r);this.afterFlush(()=>{this.namespacesByHostElement.delete(y.hostElement),delete this._namespaceLookup[r];const L=this._namespaceList.indexOf(y);L>=0&&this._namespaceList.splice(L,1)}),this.afterFlushAnimationsDone(()=>y.destroy(u))}_fetchNamespace(r){return this._namespaceLookup[r]}fetchNamespacesByElement(r){const u=new Set,y=this.statesByElement.get(r);if(y)for(let L of y.values())if(L.namespaceId){const G=this._fetchNamespace(L.namespaceId);G&&u.add(G)}return u}trigger(r,u,y,L){if(Q1(u)){const G=this._fetchNamespace(r);if(G)return G.trigger(u,y,L),!0}return!1}insertNode(r,u,y,L){if(!Q1(u))return;const G=u[a_];if(G&&G.setForRemoval){G.setForRemoval=!1,G.setForMove=!0;const Te=this.collectedLeaveElements.indexOf(u);Te>=0&&this.collectedLeaveElements.splice(Te,1)}if(r){const Te=this._fetchNamespace(r);Te&&Te.insertNode(u,y)}L&&this.collectEnterElement(u)}collectEnterElement(r){this.collectedEnterElements.push(r)}markElementAsDisabled(r,u){u?this.disabledNodes.has(r)||(this.disabledNodes.add(r),Dv(r,jE)):this.disabledNodes.has(r)&&(this.disabledNodes.delete(r),z0(r,jE))}removeNode(r,u,y,L){if(Q1(u)){const G=r?this._fetchNamespace(r):null;if(G?G.removeNode(u,L):this.markElementAsRemoved(r,u,!1,L),y){const Te=this.namespacesByHostElement.get(u);Te&&Te.id!==r&&Te.removeNode(u,L)}}else this._onRemovalComplete(u,L)}markElementAsRemoved(r,u,y,L,G){this.collectedLeaveElements.push(u),u[a_]={namespaceId:r,setForRemoval:L,hasAnimation:y,removedBeforeQueried:!1,previousTriggersValues:G}}listen(r,u,y,L,G){return Q1(u)?this._fetchNamespace(r).listen(u,y,L,G):()=>{}}_buildInstruction(r,u,y,L,G){return r.transition.build(this.driver,r.element,r.fromState.value,r.toState.value,y,L,r.fromState.options,r.toState.options,u,G)}destroyInnerAnimations(r){let u=this.driver.query(r,Y1,!0);u.forEach(y=>this.destroyActiveAnimationsForElement(y)),0!=this.playersByQueriedElement.size&&(u=this.driver.query(r,Mv,!0),u.forEach(y=>this.finishActiveQueriedAnimationOnElement(y)))}destroyActiveAnimationsForElement(r){const u=this.playersByElement.get(r);u&&u.forEach(y=>{y.queued?y.markedForDestroy=!0:y.destroy()})}finishActiveQueriedAnimationOnElement(r){const u=this.playersByQueriedElement.get(r);u&&u.forEach(y=>y.finish())}whenRenderingDone(){return new Promise(r=>{if(this.players.length)return N_(this.players).onDone(()=>r());r()})}processLeaveNode(r){const u=r[a_];if(u&&u.setForRemoval){if(r[a_]=iT,u.namespaceId){this.destroyInnerAnimations(r);const y=this._fetchNamespace(u.namespaceId);y&&y.clearElementCache(r)}this._onRemovalComplete(r,u.setForRemoval)}r.classList?.contains(jE)&&this.markElementAsDisabled(r,!1),this.driver.query(r,".ng-animate-disabled",!0).forEach(y=>{this.markElementAsDisabled(y,!1)})}flush(r=-1){let u=[];if(this.newHostElements.size&&(this.newHostElements.forEach((y,L)=>this._balanceNamespaceList(y,L)),this.newHostElements.clear()),this.totalAnimations&&this.collectedEnterElements.length)for(let y=0;y<this.collectedEnterElements.length;y++){Dv(this.collectedEnterElements[y],"ng-star-inserted")}if(this._namespaceList.length&&(this.totalQueuedPlayers||this.collectedLeaveElements.length)){const y=[];try{u=this._flushAnimations(y,r)}finally{for(let L=0;L<y.length;L++)y[L]()}}else for(let y=0;y<this.collectedLeaveElements.length;y++){const L=this.collectedLeaveElements[y];this.processLeaveNode(L)}if(this.totalQueuedPlayers=0,this.collectedEnterElements.length=0,this.collectedLeaveElements.length=0,this._flushFns.forEach(y=>y()),this._flushFns=[],this._whenQuietFns.length){const y=this._whenQuietFns;this._whenQuietFns=[],u.length?N_(u).onDone(()=>{y.forEach(L=>L())}):y.forEach(L=>L())}}reportError(r){throw function lh(b){return new rt.vHH(3402,!1)}()}_flushAnimations(r,u){const y=new W1,L=[],G=new Map,Te=[],Ze=new Map,gt=new Map,Ot=new Map,sn=new Set;this.disabledNodes.forEach(Xa=>{sn.add(Xa);const Ms=this.driver.query(Xa,".ng-animate-queued",!0);for(let Il=0;Il<Ms.length;Il++)sn.add(Ms[Il])});const ci=this.bodyNode,Ji=Array.from(this.statesByElement.keys()),xr=U_(Ji,this.collectedEnterElements),Hr=new Map;let Do=0;xr.forEach((Xa,Ms)=>{const Il=$b+Do++;Hr.set(Ms,Il),Xa.forEach(Wu=>Dv(Wu,Il))});const Zo=[],Ko=new Set,ma=new Set;for(let Xa=0;Xa<this.collectedLeaveElements.length;Xa++){const Ms=this.collectedLeaveElements[Xa],Il=Ms[a_];Il&&Il.setForRemoval&&(Zo.push(Ms),Ko.add(Ms),Il.hasAnimation?this.driver.query(Ms,".ng-star-inserted",!0).forEach(Wu=>Ko.add(Wu)):ma.add(Ms))}const Rl=new Map,Cc=U_(Ji,Array.from(Ko));Cc.forEach((Xa,Ms)=>{const Il=Aa+Do++;Rl.set(Ms,Il),Xa.forEach(Wu=>Dv(Wu,Il))}),r.push(()=>{xr.forEach((Xa,Ms)=>{const Il=Hr.get(Ms);Xa.forEach(Wu=>z0(Wu,Il))}),Cc.forEach((Xa,Ms)=>{const Il=Rl.get(Ms);Xa.forEach(Wu=>z0(Wu,Il))}),Zo.forEach(Xa=>{this.processLeaveNode(Xa)})});const km=[],Rm=[];for(let Xa=this._namespaceList.length-1;Xa>=0;Xa--)this._namespaceList[Xa].drainQueuedTransitions(u).forEach(Il=>{const Wu=Il.player,zf=Il.element;if(km.push(Wu),this.collectedEnterElements.length){const p_=zf[a_];if(p_&&p_.setForMove){if(p_.previousTriggersValues&&p_.previousTriggersValues.has(Il.triggerName)){const qC=p_.previousTriggersValues.get(Il.triggerName),yy=this.statesByElement.get(Il.element);if(yy&&yy.has(Il.triggerName)){const iS=yy.get(Il.triggerName);iS.value=qC,yy.set(Il.triggerName,iS)}}return void Wu.destroy()}}const o0=!ci||!this.driver.containsElement(ci,zf),zg=Rl.get(zf),gb=Hr.get(zf),Fm=this._buildInstruction(Il,y,gb,zg,o0);if(Fm.errors&&Fm.errors.length)return void Rm.push(Fm);if(o0)return Wu.onStart(()=>Ng(zf,Fm.fromStyles)),Wu.onDestroy(()=>Rh(zf,Fm.toStyles)),void L.push(Wu);if(Il.isFallbackTransition)return Wu.onStart(()=>Ng(zf,Fm.fromStyles)),Wu.onDestroy(()=>Rh(zf,Fm.toStyles)),void L.push(Wu);const Qx=[];Fm.timelines.forEach(p_=>{p_.stretchStartingKeyframe=!0,this.disabledNodes.has(p_.element)||Qx.push(p_)}),Fm.timelines=Qx,y.append(zf,Fm.timelines);const LI={instruction:Fm,player:Wu,element:zf};Te.push(LI),Fm.queriedElements.forEach(p_=>Ff(Ze,p_,[]).push(Wu)),Fm.preStyleProps.forEach((p_,qC)=>{if(p_.size){let yy=gt.get(qC);yy||gt.set(qC,yy=new Set),p_.forEach((iS,rS)=>yy.add(rS))}}),Fm.postStyleProps.forEach((p_,qC)=>{let yy=Ot.get(qC);yy||Ot.set(qC,yy=new Set),p_.forEach((iS,rS)=>yy.add(rS))})});if(Rm.length){const Xa=[];Rm.forEach(Ms=>{Xa.push(function R1(b,r){return new rt.vHH(3505,!1)}(Ms.triggerName,Ms.errors))}),km.forEach(Ms=>Ms.destroy()),this.reportError(Xa)}const Pp=new Map,Uf=new Map;Te.forEach(Xa=>{const Ms=Xa.element;y.has(Ms)&&(Uf.set(Ms,Ms),this._beforeAnimationBuild(Xa.player.namespaceId,Xa.instruction,Pp))}),L.forEach(Xa=>{const Ms=Xa.element;this._getPreviousPlayers(Ms,!1,Xa.namespaceId,Xa.triggerName,null).forEach(Wu=>{Ff(Pp,Ms,[]).push(Wu),Wu.destroy()})});const hs=Zo.filter(Xa=>BD(Xa,gt,Ot)),od=new Map;Ex(od,this.driver,ma,Ot,Ru.l3).forEach(Xa=>{BD(Xa,gt,Ot)&&hs.push(Xa)});const ph=new Map;xr.forEach((Xa,Ms)=>{Ex(ph,this.driver,new Set(Xa),gt,Ru.k1)}),hs.forEach(Xa=>{const Ms=od.get(Xa),Il=ph.get(Xa);od.set(Xa,new Map([...Array.from(Ms?.entries()??[]),...Array.from(Il?.entries()??[])]))});const u_=[],d_=[],sC={};Te.forEach(Xa=>{const{element:Ms,player:Il,instruction:Wu}=Xa;if(y.has(Ms)){if(sn.has(Ms))return Il.onDestroy(()=>Rh(Ms,Wu.toStyles)),Il.disabled=!0,Il.overrideTotalTime(Wu.totalTime),void L.push(Il);let zf=sC;if(Uf.size>1){let zg=Ms;const gb=[];for(;zg=zg.parentNode;){const Fm=Uf.get(zg);if(Fm){zf=Fm;break}gb.push(zg)}gb.forEach(Fm=>Uf.set(Fm,zf))}const o0=this._buildAnimation(Il.namespaceId,Wu,Pp,G,ph,od);if(Il.setRealPlayer(o0),zf===sC)u_.push(Il);else{const zg=this.playersByElement.get(zf);zg&&zg.length&&(Il.parentPlayer=N_(zg)),L.push(Il)}}else Ng(Ms,Wu.fromStyles),Il.onDestroy(()=>Rh(Ms,Wu.toStyles)),d_.push(Il),sn.has(Ms)&&L.push(Il)}),d_.forEach(Xa=>{const Ms=G.get(Xa.element);if(Ms&&Ms.length){const Il=N_(Ms);Xa.setRealPlayer(Il)}}),L.forEach(Xa=>{Xa.parentPlayer?Xa.syncPlayerEvents(Xa.parentPlayer):Xa.destroy()});for(let Xa=0;Xa<Zo.length;Xa++){const Ms=Zo[Xa],Il=Ms[a_];if(z0(Ms,Aa),Il&&Il.hasAnimation)continue;let Wu=[];if(Ze.size){let o0=Ze.get(Ms);o0&&o0.length&&Wu.push(...o0);let zg=this.driver.query(Ms,Mv,!0);for(let gb=0;gb<zg.length;gb++){let Fm=Ze.get(zg[gb]);Fm&&Fm.length&&Wu.push(...Fm)}}const zf=Wu.filter(o0=>!o0.destroyed);zf.length?sb(this,Ms,zf):this.processLeaveNode(Ms)}return Zo.length=0,u_.forEach(Xa=>{this.players.push(Xa),Xa.onDone(()=>{Xa.destroy();const Ms=this.players.indexOf(Xa);this.players.splice(Ms,1)}),Xa.play()}),u_}elementContainsData(r,u){let y=!1;const L=u[a_];return L&&L.setForRemoval&&(y=!0),this.playersByElement.has(u)&&(y=!0),this.playersByQueriedElement.has(u)&&(y=!0),this.statesByElement.has(u)&&(y=!0),this._fetchNamespace(r).elementContainsData(u)||y}afterFlush(r){this._flushFns.push(r)}afterFlushAnimationsDone(r){this._whenQuietFns.push(r)}_getPreviousPlayers(r,u,y,L,G){let Te=[];if(u){const Ze=this.playersByQueriedElement.get(r);Ze&&(Te=Ze)}else{const Ze=this.playersByElement.get(r);if(Ze){const gt=!G||G==dh;Ze.forEach(Ot=>{Ot.queued||!gt&&Ot.triggerName!=L||Te.push(Ot)})}}return(y||L)&&(Te=Te.filter(Ze=>!(y&&y!=Ze.namespaceId||L&&L!=Ze.triggerName))),Te}_beforeAnimationBuild(r,u,y){const L=u.triggerName,G=u.element,Te=u.isRemovalTransition?void 0:r,Ze=u.isRemovalTransition?void 0:L;for(const gt of u.timelines){const Ot=gt.element,sn=Ot!==G,ci=Ff(y,Ot,[]);this._getPreviousPlayers(Ot,sn,Te,Ze,u.toState).forEach(xr=>{const Hr=xr.getRealPlayer();Hr.beforeDestroy&&Hr.beforeDestroy(),xr.destroy(),ci.push(xr)})}Ng(G,u.fromStyles)}_buildAnimation(r,u,y,L,G,Te){const Ze=u.triggerName,gt=u.element,Ot=[],sn=new Set,ci=new Set,Ji=u.timelines.map(Hr=>{const Do=Hr.element;sn.add(Do);const Zo=Do[a_];if(Zo&&Zo.removedBeforeQueried)return new Ru.ZN(Hr.duration,Hr.delay);const Ko=Do!==gt,ma=function Mx(b){const r=[];return KE(b,r),r}((y.get(Do)||vx).map(Pp=>Pp.getRealPlayer())).filter(Pp=>{const Uf=Pp;return!!Uf.element&&Uf.element===Do}),Rl=G.get(Do),Cc=Te.get(Do),km=UE(this.driver,this._normalizer,0,Hr.keyframes,Rl,Cc),Rm=this._buildPlayer(Hr,km,ma);if(Hr.subTimeline&&L&&ci.add(Do),Ko){const Pp=new aT(r,Ze,Do);Pp.setRealPlayer(Rm),Ot.push(Pp)}return Rm});Ot.forEach(Hr=>{Ff(this.playersByQueriedElement,Hr.element,[]).push(Hr),Hr.onDone(()=>function yx(b,r,u){let y=b.get(r);if(y){if(y.length){const L=y.indexOf(u);y.splice(L,1)}0==y.length&&b.delete(r)}return y}(this.playersByQueriedElement,Hr.element,Hr))}),sn.forEach(Hr=>Dv(Hr,YE));const xr=N_(Ji);return xr.onDestroy(()=>{sn.forEach(Hr=>z0(Hr,YE)),Rh(gt,u.toStyles)}),ci.forEach(Hr=>{Ff(L,Hr,[]).push(xr)}),xr}_buildPlayer(r,u,y){return u.length>0?this.driver.animate(r.element,u,r.duration,r.delay,r.easing,y):new Ru.ZN(r.duration,r.delay)}}class aT{constructor(r,u,y){this.namespaceId=r,this.triggerName=u,this.element=y,this._player=new Ru.ZN,this._containsRealPlayer=!1,this._queuedCallbacks=new Map,this.destroyed=!1,this.parentPlayer=null,this.markedForDestroy=!1,this.disabled=!1,this.queued=!0,this.totalTime=0}setRealPlayer(r){this._containsRealPlayer||(this._player=r,this._queuedCallbacks.forEach((u,y)=>{u.forEach(L=>ch(r,y,void 0,L))}),this._queuedCallbacks.clear(),this._containsRealPlayer=!0,this.overrideTotalTime(r.totalTime),this.queued=!1)}getRealPlayer(){return this._player}overrideTotalTime(r){this.totalTime=r}syncPlayerEvents(r){const u=this._player;u.triggerCallback&&r.onStart(()=>u.triggerCallback("start")),r.onDone(()=>this.finish()),r.onDestroy(()=>this.destroy())}_queueEvent(r,u){Ff(this._queuedCallbacks,r,[]).push(u)}onDone(r){this.queued&&this._queueEvent("done",r),this._player.onDone(r)}onStart(r){this.queued&&this._queueEvent("start",r),this._player.onStart(r)}onDestroy(r){this.queued&&this._queueEvent("destroy",r),this._player.onDestroy(r)}init(){this._player.init()}hasStarted(){return!this.queued&&this._player.hasStarted()}play(){!this.queued&&this._player.play()}pause(){!this.queued&&this._player.pause()}restart(){!this.queued&&this._player.restart()}finish(){this._player.finish()}destroy(){this.destroyed=!0,this._player.destroy()}reset(){!this.queued&&this._player.reset()}setPosition(r){this.queued||this._player.setPosition(r)}getPosition(){return this.queued?0:this._player.getPosition()}triggerCallback(r){const u=this._player;u.triggerCallback&&u.triggerCallback(r)}}function Q1(b){return b&&1===b.nodeType}function sT(b,r){const u=b.style.display;return b.style.display=r??"none",u}function Ex(b,r,u,y,L){const G=[];u.forEach(gt=>G.push(sT(gt)));const Te=[];y.forEach((gt,Ot)=>{const sn=new Map;gt.forEach(ci=>{const Ji=r.computeStyle(Ot,ci,L);sn.set(ci,Ji),(!Ji||0==Ji.length)&&(Ot[a_]=U0,Te.push(Ot))}),b.set(Ot,sn)});let Ze=0;return u.forEach(gt=>sT(gt,G[Ze++])),Te}function U_(b,r){const u=new Map;if(b.forEach(Ze=>u.set(Ze,[])),0==r.length)return u;const y=1,L=new Set(r),G=new Map;function Te(Ze){if(!Ze)return y;let gt=G.get(Ze);if(gt)return gt;const Ot=Ze.parentNode;return gt=u.has(Ot)?Ot:L.has(Ot)?y:Te(Ot),G.set(Ze,gt),gt}return r.forEach(Ze=>{const gt=Te(Ze);gt!==y&&u.get(gt).push(Ze)}),u}function Dv(b,r){b.classList?.add(r)}function z0(b,r){b.classList?.remove(r)}function sb(b,r,u){N_(u).onDone(()=>b.processLeaveNode(r))}function KE(b,r){for(let u=0;u<b.length;u++){const y=b[u];y instanceof Ru.ZE?KE(y.players,r):r.push(y)}}function BD(b,r,u){const y=u.get(b);if(!y)return!1;let L=r.get(b);return L?y.forEach(G=>L.add(G)):r.set(b,y),u.delete(b),!0}class VC{constructor(r,u,y){this.bodyNode=r,this._driver=u,this._normalizer=y,this._triggerCache={},this.onRemovalComplete=(L,G)=>{},this._transitionEngine=new ND(r,u,y),this._timelineEngine=new gx(r,u,y),this._transitionEngine.onRemovalComplete=(L,G)=>this.onRemovalComplete(L,G)}registerTrigger(r,u,y,L,G){const Te=r+"-"+L;let Ze=this._triggerCache[Te];if(!Ze){const gt=[],Ot=[],sn=F0(this._driver,G,gt,Ot);if(gt.length)throw function qc(b,r){return new rt.vHH(3404,!1)}();Ot.length&&function Ss(b,r){tl&&console.warn(`The animation trigger "${b}" has built with the following warnings:${bc(r)}`)}(L,Ot),Ze=function ab(b,r,u){return new PS(b,r,u)}(L,sn,this._normalizer),this._triggerCache[Te]=Ze}this._transitionEngine.registerTrigger(u,L,Ze)}register(r,u){this._transitionEngine.register(r,u)}destroy(r,u){this._transitionEngine.destroy(r,u)}onInsert(r,u,y,L){this._transitionEngine.insertNode(r,u,y,L)}onRemove(r,u,y,L){this._transitionEngine.removeNode(r,u,L||!1,y)}disableAnimations(r,u){this._transitionEngine.markElementAsDisabled(r,u)}process(r,u,y,L){if("@"==y.charAt(0)){const[G,Te]=HM(y),Ze=L;this._timelineEngine.command(G,u,Te,Ze)}else this._transitionEngine.trigger(r,u,y,L)}listen(r,u,y,L,G){if("@"==y.charAt(0)){const[Te,Ze]=HM(y);return this._timelineEngine.listen(Te,u,Ze,G)}return this._transitionEngine.listen(r,u,y,L,G)}flush(r=-1){this._transitionEngine.flush(r)}get players(){return this._transitionEngine.players.concat(this._timelineEngine.players)}whenRenderingDone(){return this._transitionEngine.whenRenderingDone()}}class lb{constructor(r,u,y){this._element=r,this._startStyles=u,this._endStyles=y,this._state=0;let L=lb.initialStylesByElement.get(r);L||lb.initialStylesByElement.set(r,L=new Map),this._initialStyles=L}start(){this._state<1&&(this._startStyles&&Rh(this._element,this._startStyles,this._initialStyles),this._state=1)}finish(){this.start(),this._state<2&&(Rh(this._element,this._initialStyles),this._endStyles&&(Rh(this._element,this._endStyles),this._endStyles=null),this._state=1)}destroy(){this.finish(),this._state<3&&(lb.initialStylesByElement.delete(this._element),this._startStyles&&(Ng(this._element,this._startStyles),this._endStyles=null),this._endStyles&&(Ng(this._element,this._endStyles),this._endStyles=null),Rh(this._element,this._initialStyles),this._state=3)}}function cb(b){let r=null;return b.forEach((u,y)=>{(function UD(b){return"display"===b||"position"===b})(y)&&(r=r||new Map,r.set(y,u))}),r}lb.initialStylesByElement=new WeakMap;class Tx{constructor(r,u,y,L){this.element=r,this.keyframes=u,this.options=y,this._specialStyles=L,this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._initialized=!1,this._finished=!1,this._started=!1,this._destroyed=!1,this._originalOnDoneFns=[],this._originalOnStartFns=[],this.time=0,this.parentPlayer=null,this.currentSnapshot=new Map,this._duration=y.duration,this._delay=y.delay||0,this.time=this._duration+this._delay}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(r=>r()),this._onDoneFns=[])}init(){this._buildPlayer(),this._preparePlayerBeforeStart()}_buildPlayer(){if(this._initialized)return;this._initialized=!0;const r=this.keyframes;this.domPlayer=this._triggerWebAnimation(this.element,r,this.options),this._finalKeyframe=r.length?r[r.length-1]:new Map,this.domPlayer.addEventListener("finish",()=>this._onFinish())}_preparePlayerBeforeStart(){this._delay?this._resetDomPlayerState():this.domPlayer.pause()}_convertKeyframesToObject(r){const u=[];return r.forEach(y=>{u.push(Object.fromEntries(y))}),u}_triggerWebAnimation(r,u,y){return r.animate(this._convertKeyframesToObject(u),y)}onStart(r){this._originalOnStartFns.push(r),this._onStartFns.push(r)}onDone(r){this._originalOnDoneFns.push(r),this._onDoneFns.push(r)}onDestroy(r){this._onDestroyFns.push(r)}play(){this._buildPlayer(),this.hasStarted()||(this._onStartFns.forEach(r=>r()),this._onStartFns=[],this._started=!0,this._specialStyles&&this._specialStyles.start()),this.domPlayer.play()}pause(){this.init(),this.domPlayer.pause()}finish(){this.init(),this._specialStyles&&this._specialStyles.finish(),this._onFinish(),this.domPlayer.finish()}reset(){this._resetDomPlayerState(),this._destroyed=!1,this._finished=!1,this._started=!1,this._onStartFns=this._originalOnStartFns,this._onDoneFns=this._originalOnDoneFns}_resetDomPlayerState(){this.domPlayer&&this.domPlayer.cancel()}restart(){this.reset(),this.play()}hasStarted(){return this._started}destroy(){this._destroyed||(this._destroyed=!0,this._resetDomPlayerState(),this._onFinish(),this._specialStyles&&this._specialStyles.destroy(),this._onDestroyFns.forEach(r=>r()),this._onDestroyFns=[])}setPosition(r){void 0===this.domPlayer&&this.init(),this.domPlayer.currentTime=r*this.time}getPosition(){return this.domPlayer.currentTime/this.time}get totalTime(){return this._delay+this._duration}beforeDestroy(){const r=new Map;this.hasStarted()&&this._finalKeyframe.forEach((y,L)=>{"offset"!==L&&r.set(L,this._finished?y:Yo(this.element,L))}),this.currentSnapshot=r}triggerCallback(r){const u="start"===r?this._onStartFns:this._onDoneFns;u.forEach(y=>y()),u.length=0}}class zD{validateStyleProperty(r){return!0}validateAnimatableStyleProperty(r){return!0}matchesElement(r,u){return!1}containsElement(r,u){return B1(r,u)}getParentElement(r){return Gb(r)}query(r,u,y){return Wb(r,u,y)}computeStyle(r,u,y){return window.getComputedStyle(r)[u]}animate(r,u,y,L,G,Te=[]){const gt={duration:y,delay:L,fill:0==L?"both":"forwards"};G&&(gt.easing=G);const Ot=new Map,sn=Te.filter(xr=>xr instanceof Tx);(function ot(b,r){return 0===b||0===r})(y,L)&&sn.forEach(xr=>{xr.currentSnapshot.forEach((Hr,Do)=>Ot.set(Do,Hr))});let ci=function GM(b){return b.length?b[0]instanceof Map?b:b.map(r=>V1(r)):[]}(u).map(xr=>ay(xr));ci=function Cn(b,r,u){if(u.size&&r.length){let y=r[0],L=[];if(u.forEach((G,Te)=>{y.has(Te)||L.push(Te),y.set(Te,G)}),L.length)for(let G=1;G<r.length;G++){let Te=r[G];L.forEach(Ze=>Te.set(Ze,Yo(b,Ze)))}}return r}(r,ci,Ot);const Ji=function RS(b,r){let u=null,y=null;return Array.isArray(r)&&r.length?(u=cb(r[0]),r.length>1&&(y=cb(r[r.length-1]))):r instanceof Map&&(u=cb(r)),u||y?new lb(b,u,y):null}(r,ci);return new Tx(r,ci,gt,Ji)}}var vd=p(36895);class H0 extends Ru._j{constructor(r,u){super(),this._nextAnimationId=0;const y={id:"0",encapsulation:rt.ifc.None,styles:[],data:{animation:[]}};this._renderer=r.createRenderer(u.body,y)}build(r){const u=this._nextAnimationId.toString();this._nextAnimationId++;const y=Array.isArray(r)?(0,Ru.vP)(r):r;return JE(this._renderer,null,u,"register",[y]),new xx(u,this._renderer)}}H0.\u0275fac=function(r){return new(r||H0)(rt.LFG(rt.FYo),rt.LFG(vd.K0))},H0.\u0275prov=rt.Yz7({token:H0,factory:H0.\u0275fac});class xx extends Ru.LC{constructor(r,u){super(),this._id=r,this._renderer=u}create(r,u){return new lT(this._id,r,u||{},this._renderer)}}class lT{constructor(r,u,y,L){this.id=r,this.element=u,this._renderer=L,this.parentPlayer=null,this._started=!1,this.totalTime=0,this._command("create",y)}_listen(r,u){return this._renderer.listen(this.element,`@@${this.id}:${r}`,u)}_command(r,...u){return JE(this._renderer,this.element,this.id,r,u)}onDone(r){this._listen("done",r)}onStart(r){this._listen("start",r)}onDestroy(r){this._listen("destroy",r)}init(){this._command("init")}hasStarted(){return this._started}play(){this._command("play"),this._started=!0}pause(){this._command("pause")}restart(){this._command("restart")}finish(){this._command("finish")}destroy(){this._command("destroy")}reset(){this._command("reset"),this._started=!1}setPosition(r){this._command("setPosition",r)}getPosition(){return this._renderer.engine.players[+this.id]?.getPosition()??0}}function JE(b,r,u,y,L){return b.setProperty(r,`@@${u}:${y}`,L)}const QE="@.disabled";class ub{constructor(r,u,y){this.delegate=r,this.engine=u,this._zone=y,this._currentId=0,this._microtaskId=1,this._animationCallbacksBuffer=[],this._rendererCache=new Map,this._cdRecurDepth=0,this.promise=Promise.resolve(0),u.onRemovalComplete=(L,G)=>{const Te=G?.parentNode(L);Te&&G.removeChild(Te,L)}}createRenderer(r,u){const L=this.delegate.createRenderer(r,u);if(!(r&&u&&u.data&&u.data.animation)){let Ot=this._rendererCache.get(L);if(!Ot){const sn=()=>this._rendererCache.delete(L);Ot=new qE("",L,this.engine,sn),this._rendererCache.set(L,Ot)}return Ot}const G=u.id,Te=u.id+"-"+this._currentId;this._currentId++,this.engine.register(Te,r);const Ze=Ot=>{Array.isArray(Ot)?Ot.forEach(Ze):this.engine.registerTrigger(G,Te,r,Ot.name,Ot)};return u.data.animation.forEach(Ze),new FS(this,Te,L,this.engine)}begin(){this._cdRecurDepth++,this.delegate.begin&&this.delegate.begin()}_scheduleCountTask(){this.promise.then(()=>{this._microtaskId++})}scheduleListenerCallback(r,u,y){r>=0&&r<this._microtaskId?this._zone.run(()=>u(y)):(0==this._animationCallbacksBuffer.length&&Promise.resolve(null).then(()=>{this._zone.run(()=>{this._animationCallbacksBuffer.forEach(L=>{const[G,Te]=L;G(Te)}),this._animationCallbacksBuffer=[]})}),this._animationCallbacksBuffer.push([u,y]))}end(){this._cdRecurDepth--,0==this._cdRecurDepth&&this._zone.runOutsideAngular(()=>{this._scheduleCountTask(),this.engine.flush(this._microtaskId)}),this.delegate.end&&this.delegate.end()}whenRenderingDone(){return this.engine.whenRenderingDone()}}ub.\u0275fac=function(r){return new(r||ub)(rt.LFG(rt.FYo),rt.LFG(VC),rt.LFG(rt.R0b))},ub.\u0275prov=rt.Yz7({token:ub,factory:ub.\u0275fac});class qE{constructor(r,u,y,L){this.namespaceId=r,this.delegate=u,this.engine=y,this._onDestroy=L,this.destroyNode=this.delegate.destroyNode?G=>u.destroyNode(G):null}get data(){return this.delegate.data}destroy(){this.engine.destroy(this.namespaceId,this.delegate),this.delegate.destroy(),this._onDestroy?.()}createElement(r,u){return this.delegate.createElement(r,u)}createComment(r){return this.delegate.createComment(r)}createText(r){return this.delegate.createText(r)}appendChild(r,u){this.delegate.appendChild(r,u),this.engine.onInsert(this.namespaceId,u,r,!1)}insertBefore(r,u,y,L=!0){this.delegate.insertBefore(r,u,y),this.engine.onInsert(this.namespaceId,u,r,L)}removeChild(r,u,y){this.engine.onRemove(this.namespaceId,u,this.delegate,y)}selectRootElement(r,u){return this.delegate.selectRootElement(r,u)}parentNode(r){return this.delegate.parentNode(r)}nextSibling(r){return this.delegate.nextSibling(r)}setAttribute(r,u,y,L){this.delegate.setAttribute(r,u,y,L)}removeAttribute(r,u,y){this.delegate.removeAttribute(r,u,y)}addClass(r,u){this.delegate.addClass(r,u)}removeClass(r,u){this.delegate.removeClass(r,u)}setStyle(r,u,y,L){this.delegate.setStyle(r,u,y,L)}removeStyle(r,u,y){this.delegate.removeStyle(r,u,y)}setProperty(r,u,y){"@"==u.charAt(0)&&u==QE?this.disableAnimations(r,!!y):this.delegate.setProperty(r,u,y)}setValue(r,u){this.delegate.setValue(r,u)}listen(r,u,y){return this.delegate.listen(r,u,y)}disableAnimations(r,u){this.engine.disableAnimations(r,u)}}class FS extends qE{constructor(r,u,y,L,G){super(u,y,L,G),this.factory=r,this.namespaceId=u}setProperty(r,u,y){"@"==u.charAt(0)?"."==u.charAt(1)&&u==QE?(y=void 0===y||!!y,this.disableAnimations(r,y)):this.engine.process(this.namespaceId,r,u.slice(1),y):this.delegate.setProperty(r,u,y)}listen(r,u,y){if("@"==u.charAt(0)){const L=function NS(b){switch(b){case"body":return document.body;case"document":return document;case"window":return window;default:return b}}(r);let G=u.slice(1),Te="";return"@"!=G.charAt(0)&&([G,Te]=function BS(b){const r=b.indexOf("."),u=b.substring(0,r),y=b.slice(r+1);return[u,y]}(G)),this.engine.listen(this.namespaceId,L,G,Te,Ze=>{const gt=Ze._data||-1;this.factory.scheduleListenerCallback(gt,y,Ze)})}return this.delegate.listen(r,u,y)}}class ZC extends VC{constructor(r,u,y,L){super(r.body,u,y)}ngOnDestroy(){this.flush()}}ZC.\u0275fac=function(r){return new(r||ZC)(rt.LFG(vd.K0),rt.LFG(U1),rt.LFG($E),rt.LFG(rt.z2F))},ZC.\u0275prov=rt.Yz7({token:ZC,factory:ZC.\u0275fac});const XE=[{provide:Ru._j,useClass:H0},{provide:$E,useFactory:function cT(){return new AS}},{provide:VC,useClass:ZC},{provide:rt.FYo,useFactory:function uT(b,r,u){return new ub(b,r,u)},deps:[o.se,VC,rt.R0b]}],dT=[{provide:U1,useFactory:()=>new zD},{provide:rt.QbO,useValue:"BrowserAnimations"},...XE],uy=[{provide:U1,useClass:oy},{provide:rt.QbO,useValue:"NoopAnimations"},...XE];class Xb{static withConfig(r){return{ngModule:Xb,providers:r.disableAnimations?uy:dT}}}Xb.\u0275fac=function(r){return new(r||Xb)},Xb.\u0275mod=rt.oAB({type:Xb}),Xb.\u0275inj=rt.cJS({providers:dT,imports:[o.b2]});class q1{}q1.\u0275fac=function(r){return new(r||q1)},q1.\u0275mod=rt.oAB({type:q1}),q1.\u0275inj=rt.cJS({providers:uy,imports:[o.b2]});var vf=p(9116),dy=p(80529),Ip=p(89383),GC=p(19832),V0=p(93795),nl=p(70191),Za=p(70655),yf=p(55419),py=function(b){function r(){return null!==b&&b.apply(this,arguments)||this}return(0,Za.__extends)(r,b),r.prototype.show=function(){return(0,yf.DM)(this,"show",{sync:!0},arguments)},r.prototype.hide=function(){return(0,yf.DM)(this,"hide",{sync:!0},arguments)},r.pluginName="SplashScreen",r.plugin="cordova-plugin-splashscreen",r.pluginRef="navigator.splashscreen",r.repo="https://github.com/apache/cordova-plugin-splashscreen",r.platforms=["Amazon Fire OS","Android","iOS","Windows"],r.\u0275fac=function(){var u;return function(L){return(u||(u=rt.n5z(r)))(L||r)}}(),r.\u0275prov=rt.Yz7({token:r,factory:function(u){return r.\u0275fac(u)}}),r}(yf.KY),pT=function(b){function r(){return null!==b&&b.apply(this,arguments)||this}return(0,Za.__extends)(r,b),r.prototype.overlaysWebView=function(u){return(0,yf.DM)(this,"overlaysWebView",{sync:!0},arguments)},r.prototype.styleDefault=function(){return(0,yf.DM)(this,"styleDefault",{sync:!0},arguments)},r.prototype.styleLightContent=function(){return(0,yf.DM)(this,"styleLightContent",{sync:!0},arguments)},r.prototype.styleBlackTranslucent=function(){return(0,yf.DM)(this,"styleBlackTranslucent",{sync:!0},arguments)},r.prototype.styleBlackOpaque=function(){return(0,yf.DM)(this,"styleBlackOpaque",{sync:!0},arguments)},r.prototype.backgroundColorByName=function(u){return(0,yf.DM)(this,"backgroundColorByName",{sync:!0},arguments)},r.prototype.backgroundColorByHexString=function(u){return(0,yf.DM)(this,"backgroundColorByHexString",{sync:!0},arguments)},r.prototype.hide=function(){return(0,yf.DM)(this,"hide",{sync:!0},arguments)},r.prototype.show=function(){return(0,yf.DM)(this,"show",{sync:!0},arguments)},Object.defineProperty(r.prototype,"isVisible",{get:function(){return(0,yf.J2)(this,"isVisible")},set:function(u){(0,yf.Iq)(this,"isVisible",u)},enumerable:!1,configurable:!0}),r.pluginName="StatusBar",r.plugin="cordova-plugin-statusbar",r.pluginRef="StatusBar",r.repo="https://github.com/apache/cordova-plugin-statusbar",r.platforms=["Android","iOS","Windows"],r.\u0275fac=function(){var u;return function(L){return(u||(u=rt.n5z(r)))(L||r)}}(),r.\u0275prov=rt.Yz7({token:r,factory:function(u){return r.\u0275fac(u)}}),r}(yf.KY),eM=p(25702),ef=p(15861),my=p(49594),db=p(17445),X1=p(39646),HD=p(50590),ys=p(18505),Sv=p(95698),bs=p(39300),tM=p(68675),WC=p(63900),Z0=p(70262),Dx=p(80071),As=p(88692),nM=p(64837),mT=p(62669),Gu=p(31943),ka=p(61135);const nC=class{constructor(r){this.router=r,this.storageKey="_siviTestToolEnabled",this.currentRoute$=new ka.X(null),this.listenForRouterEvents()}initialize(){return JSON.parse(localStorage.getItem(this.storageKey))}getCurrentRoute(){return this.currentRoute$.asObservable()}enable(){localStorage.setItem(this.storageKey,"true")}disable(){localStorage.setItem(this.storageKey,"false")}listenForRouterEvents(){this.router.events.pipe((0,bs.h)(r=>r instanceof vf.m2)).subscribe(()=>{try{let u,r=this.router.routerState.snapshot.root.firstChild;if(r)do{r=r.firstChild,r&&(u=r)}while(r);this.publishRoute(u)}catch(r){console.warn("SiviTesterService listenForRouterEvents error",r)}})}publishRoute(r){this.currentRoute$.next(r)}};let iM=nC;nC.\u0275fac=function(u){return new(u||nC)(rt.LFG(vf.F0))},nC.\u0275prov=rt.Yz7({token:nC,factory:nC.\u0275fac,providedIn:"root"});var wx,GD,hT,gT,fl,fy=p(77579),G0=p(39841),ug=p(54004),oc=p(24956),Sx=p(78372),Bg=p(82722),VD=p(22940),pb=p(95577),ZD=p(28746),rM=p(56451),fT=p(48382),s_=p(60515),Ax=p(32076);!function(b){b.APPLICATION="APPLICATION"}(wx||(wx={})),function(b){b.PUBLIC="PUBLIC",b.PRIVATE="PRIVATE"}(GD||(GD={})),function(b){b.SAVED="SAVED",b.DELETED="DELETED"}(hT||(hT={})),function(b){b.CHILD="CHILD",b.GROUP="GROUP"}(gT||(gT={})),function(b){b.APPLICATION_COMMENT="APPLICATION_COMMENT",b.CHILD_CREATION="CHILD_CREATION",b.MESSAGE_RECEIVED="MESSAGE_RECEIVED"}(fl||(fl={}));var _T=p(89947),oM=p(53377);const iC=class extends _T.i{constructor(r,u,y,L,G){super(r,u,G),this.http=r,this.authService=u,this.userSettingService=y,this.messagingService=L,this.environmentService=G}getNotifications(r=0,u=10){const L=this.getCommonPageableSearchOptions(r,u);return this.get("./api/sivi-messaging-api/notifications",L)}markNotificationAsRead(r){const u=`./api/sivi-messaging-api/notifications/${r}/read`;return this.put(null,u)}canReadMessage(r){const u=`./api/sivi-messaging-api/messages/${r}/can-read`;return this.get(u)}checkUncheckedNotifications(){return this.userSettingService.getUserSettingsByKey("selectedMunicipalityId").pipe((0,Sv.q)(1),(0,pb.z)(L=>this.put(null,(L=>`./api/sivi-messaging-api/notifications/${L}/check`)(L))))}getNotificationsChannel(){var r=this;return(0,ef.Z)(function*(){const u=yield r.getUserChannelOptions("notifications");return r.messagingService.subscribeChannel(u)})()}getUncheckedNotificationsCountChannel(){var r=this;return(0,ef.Z)(function*(){const u=yield r.getUserChannelOptions("unchecked-notifications-count");return r.messagingService.subscribeChannel(u)})()}getAllNotificationsCountChannel(){var r=this;return(0,ef.Z)(function*(){const u=yield r.getUserChannelOptions("all-notifications-count");return r.messagingService.subscribeChannel(u)})()}getDeviceInformation(){const r=this.authService.getUserPersonData().pipe((0,Sv.q)(1),(0,ug.U)(G=>G?.userId)),u=this.getCommonPageableSearchOptions(oc.gT.PAGE_NUMBER_FIRST,oc.gT.HIGH_API_RESPONSES);return r.pipe((0,pb.z)(G=>this.get((G=>`./api/sivi-accounts-api/devices/?personId=${G}`)(G),u)))}get userId$(){return this.authService.getUserPersonData().pipe((0,Sv.q)(1),(0,ug.U)(r=>r?.userId)).toPromise()}get municipalityId$(){return this.userSettingService.getUserSettingsByKey("selectedMunicipalityId").pipe((0,Sv.q)(1)).toPromise()}getUserChannelOptions(r){var u=this;return(0,ef.Z)(function*(){return{channelName:"user",channelId:`${yield u.userId$}/${yield u.municipalityId$}`,action:r}})()}};let $C=iC;iC.\u0275fac=function(u){return new(u||iC)(rt.LFG(dy.eN),rt.LFG(mT.e),rt.LFG(As.UserSettingsService),rt.LFG(As.MessagingService),rt.LFG(oM.L))},iC.\u0275prov=rt.Yz7({token:iC,factory:iC.\u0275fac,providedIn:"root"});class vT{getResourceId(r){return""}getResource(r){return(0,X1.of)()}onClick(r){return(0,ef.Z)(function*(){})()}}var Ix=p(3619);const KC=class extends vT{constructor(r,u,y){super(),this.personService=r,this.applicationService=u,this.modalCtrl=y}getResourceId(r){return(0,my.Z)(r,"first.authorId",null)}getResource(r){const u=this.getResourceId(r);return u?this.personService.getPersonMainPhoto(u):s_.E}onClick(r){var u=this;return(0,ef.Z)(function*(){try{const y=(0,my.Z)(r,"last.masterId"),L=yield u.applicationService.getApplication(y).toPromise(),G={component:Ix.w,cssClass:"modal-full-size",componentProps:{application:L}},Te=yield u.modalCtrl.create(G);yield Te.present(),yield Te.onDidDismiss()}catch(y){console.error("openApplication error",y)}})()}};let W0=KC;KC.\u0275fac=function(u){return new(u||KC)(rt.LFG(Gu.R_),rt.LFG(Gu.IX),rt.LFG(As.SiviModalController))},KC.\u0275prov=rt.Yz7({token:KC,factory:KC.\u0275fac});var aM=p(15439),yT=p.n(aM);const V_=class extends vT{constructor(r,u,y){super(),this.personService=r,this.router=u,this.userSettingService=y}getResourceId(r){return(0,my.Z)(r,"child.id",null)}getResource(r){const u=this.getResourceId(r);return this.personService.getPersonMainPhoto(u)}onClick(r){var u=this;return(0,ef.Z)(function*(){const y=yield u.userSettingService.getUserSettingsByKey("selectedMunicipalityId").pipe((0,Sv.q)(1)).toPromise(),L=u.getSearchTerm(r),G=u.router.createUrlTree([`municipalities/${y}/guardians-and-children`],{queryParams:{searchTerm:L},queryParamsHandling:"merge",preserveFragment:!0});yield u.router.navigateByUrl(G)})()}getSearchTerm(r){const u=(0,my.Z)(r,"child.birthdate");return u?yT()(u,As.DateFormats.STANDARD).format(As.DateFormats.PERSON_SEARCH_FILTER):""}};let bT=V_;V_.\u0275fac=function(u){return new(u||V_)(rt.LFG(Gu.R_),rt.LFG(vf.F0),rt.LFG(Gu.sF))},V_.\u0275prov=rt.Yz7({token:V_,factory:V_.\u0275fac});var US=p(83905);const Av=class extends vT{get isGuardian(){return this.auth.isGuardian()}constructor(r,u,y,L,G,Te){super(),this.personService=r,this.router=u,this.auth=y,this.organizationService=L,this.notificationsService=G,this.notify=Te}getResourceId(r){const u=this.isGuardian?"groupId":"childId";return r.first[u]}getResource(r){const u=this.getResourceId(r);return(0,fT.s)(()=>this.isGuardian,this.organizationService.getOrganizationPhoto(u),this.personService.getPersonMainPhoto(u))}onClick(r){var u=this;return(0,ef.Z)(function*(){try{const y=r.first;if(!(yield(0,US.z)(u.notificationsService.canReadMessage(y.id))))return void u.notify.alertNoPermissionError();yield u.navigateToMessage(y)}catch(y){console.error(y)}})()}navigateToMessage(r){var u=this;return(0,ef.Z)(function*(){const y=u.isGuardian?"home/messages":`group-home/${r.groupId}/messages`,L=u.router.createUrlTree([y],{queryParams:{"read-message":r.masterId||r.id,childId:r.childId},queryParamsHandling:"merge",preserveFragment:!0});yield u.router.navigateByUrl(L)})()}};let sM=Av;Av.\u0275fac=function(u){return new(u||Av)(rt.LFG(Gu.R_),rt.LFG(vf.F0),rt.LFG(Gu.e8),rt.LFG(As.OrganizationService),rt.LFG($C),rt.LFG(As.NotifyService))},Av.\u0275prov=rt.Yz7({token:Av,factory:Av.\u0275fac});const rC=class{get uncheckedCount$(){return this.uncheckedCountSubject$.asObservable()}get loadingStatus$(){return this.loading$.asObservable()}get notificationsCount$(){return this.notificationsSubject$.pipe((0,ug.U)(r=>r?.length))}get totalNotificationsCount$(){return this.totalNotificationCount$.asObservable()}get notifications$(){return this.notificationsSubject$.asObservable()}get images$(){return this.notificationsSubject$.pipe(this.getOneByOne(),this.getNotificationImage(),this.accumulateResources())}constructor(r,u,y,L,G){this.notificationsService=r,this.notify=u,this.applicationCommentStrategy=y,this.childCreationStrategy=L,this.messageReceivedStrategy=G,this.loadMore$=new fy.x,this.loading$=new ka.X(!1),this.destroy$=new fy.x,this.destroyNotifications$=new fy.x,this.notificationsSubject$=new ka.X([]),this.uncheckedCountSubject$=new ka.X(0),this.fetchedNotifications$=new ka.X([]),this.totalNotificationCount$=new ka.X(0),this.resourcesSubject$=new ka.X({}),this.page=0,this.notificationStrategies={[fl.APPLICATION_COMMENT]:this.applicationCommentStrategy,[fl.CHILD_CREATION]:this.childCreationStrategy,[fl.MESSAGE_RECEIVED]:this.messageReceivedStrategy}}init(){var r=this;return(0,ef.Z)(function*(){try{yield r.initChannels(),r.handleChannelsSubscriptions()}catch(u){return console.error("init failed",u),Promise.reject(u)}})()}subscribeNotifications(){this.handleLoadMore(),this.handleNotificationsSubscriptions()}unsubscribeNotifications(){this.destroyNotifications$.next(),this.destroyNotifications$.next()}destroy(){this.destroy$.next(),this.destroy$.complete(),this.closeChannels(),this.clearNotifications(),this.unsubscribeNotifications()}loadMore(){this.page++,this.loadMore$.next()}onNotificationClick(r){var u=this;return(0,ef.Z)(function*(){try{const y=u.getNotificationStrategy(r.type);yield Promise.all([u.markNotificationAsRead(r.id).toPromise(),y.onClick(r)])}catch(y){console.error("onNotificationClick failed",y)}})()}markNotificationAsRead(r){return this.notificationsService.markNotificationAsRead(r)}checkUncheckedNotifications(){return this.notificationsService.checkUncheckedNotifications()}clearNotifications(){this.page=0,this.notificationsSubject$.next([]),this.fetchedNotifications$.next([])}handleLoadMore(){this.loadMore$.pipe((0,Sx.b)(500),this.fetchNotifications(),(0,Bg.R)(this.destroyNotifications$)).subscribe(r=>this.fetchedNotifications$.next(r),r=>this.notify.alertBackendError(r))}handleNotificationsSubscriptions(){this.getAllNotifications().pipe((0,Bg.R)(this.destroyNotifications$)).subscribe(r=>this.notificationsSubject$.next(r),r=>this.notify.alertBackendError(r)),this.getResources().pipe((0,Bg.R)(this.destroyNotifications$)).subscribe(r=>this.resourcesSubject$.next(r),r=>this.notify.alertBackendError(r))}handleChannelsSubscriptions(){this.uncheckedCountChannel$.pipe(this.mapBodyContent(),(0,Bg.R)(this.destroy$)).subscribe(r=>this.uncheckedCountSubject$.next(Number(r))),this.totalCountChannel$.pipe(this.mapBodyContent(),(0,Bg.R)(this.destroy$)).subscribe(r=>this.totalNotificationCount$.next(Number(r)))}initChannels(){var r=this;return(0,ef.Z)(function*(){r.uncheckedCountChannel$=yield r.notificationsService.getUncheckedNotificationsCountChannel(),r.totalCountChannel$=yield r.notificationsService.getAllNotificationsCountChannel(),r.notificationChannel$=yield r.notificationsService.getNotificationsChannel()})()}getNotificationStrategy(r){return this.notificationStrategies[r]}getResourceId(r){return this.getNotificationStrategy(r.type)?.getResourceId(r)}getAllNotifications(){const r=this.notificationChannel$.pipe(this.mapBodyContent());return(0,rM.T)(r,this.fetchedNotifications$).pipe((0,VD.R)((L,G)=>As.Utils.patchImmutableCollectionBy(L,G,"id"),[]),(0,ug.U)(L=>L.sort((G,Te)=>As.Utils.compareByDate(G.date,Te.date))))}getNotificationImage(){return(0,pb.z)(r=>this.resourcesSubject$.pipe((0,ug.U)(u=>u?.[this.getResourceId(r)]),this.mapFileToResourceMap(r.id)))}getResources(){return this.notifications$.pipe(this.getOneByOne(),this.downloadMissingResource(),this.accumulateResources())}fetchNotifications(){return(0,pb.z)(()=>(this.loading$.next(!0),this.notificationsService.getNotifications(this.page,10).pipe((0,ug.U)(r=>r.content),(0,ZD.x)(()=>this.loading$.next(!1)),this.returnEmptyOnError())))}downloadMissingResource(){return(0,pb.z)(r=>{const u=this.getResourceId(r);return this.resourcesSubject$.pipe((0,Sv.q)(1),(()=>(0,pb.z)(G=>(0,fT.s)((G=>()=>void 0!==G[u])(G),s_.E,this.downloadResource(r))))())})}downloadResource(r){const u=this.getResourceId(r);if(!u)return s_.E;const L={[u]:null};return this.getNotificationStrategy(r.type).getResource(r).pipe(this.mapFileToResourceMap(u),this.returnEmptyOnError(),(0,tM.O)(L))}closeChannels(){[this.notificationChannel$,this.uncheckedCountChannel$,this.totalCountChannel$].forEach(u=>u&&u.close())}accumulateResources(){return(0,VD.R)((r,u)=>({...r,...u}),{})}mapBodyContent(){return(0,ug.U)(r=>r?.body?.content)}getOneByOne(){return(0,pb.z)(r=>(0,Ax.D)(r))}mapFileToResourceMap(r){return(0,ug.U)(u=>({[r]:u}))}returnEmptyOnError(){return(0,Z0.K)(r=>(console.log(r),s_.E))}};let CT=rC;rC.\u0275fac=function(u){return new(u||rC)(rt.LFG($C),rt.LFG(Gu.c),rt.LFG(W0),rt.LFG(bT),rt.LFG(sM))},rC.\u0275prov=rt.Yz7({token:rC,factory:rC.\u0275fac,providedIn:"root"});const JC=class{constructor(){this.notificationClick=new rt.vpe,this.placeholderImage="/assets/img/placeholder.svg"}get isNewTagVisible(){const{unreadCount:r,totalCount:u}=this.notification;return r===u&&0!==r}get date(){return this.getFormattedTimeOrDate(this.notification.date)}onNotificationClick(r){this.notificationClick.emit(r)}getFormattedTimeOrDate(r){const u=As.Utils.convertDateToLocalDate(r);return As.Utils.convertDateToTimeOrDate(u)}};let $0=JC;function ET(b,r){1&b&&(rt.TgZ(0,"cgi-tag",14),rt._uU(1),rt.ALo(2,"translate"),rt.qZA()),2&b&&(rt.xp6(1),rt.hij(" ",rt.lcZ(2,1,"General.Text.New")," "))}function zS(b,r){if(1&b&&(rt.TgZ(0,"cgi-badge",14),rt._uU(1),rt.qZA()),2&b){const u=rt.oxw(2);rt.xp6(1),rt.hij(" ",u.notification.unreadCount," ")}}JC.\u0275fac=function(u){return new(u||JC)},JC.\u0275dir=rt.lG2({type:JC,inputs:{notification:"notification",image:"image"},outputs:{notificationClick:"notificationClick"}});const lM=function(b){return{unchecked:b}};function JA(b,r){if(1&b&&(rt.TgZ(0,"div",15)(1,"div",7)(2,"h6",8),rt._uU(3),rt.qZA(),rt.TgZ(4,"p",9),rt._uU(5),rt.qZA()(),rt.TgZ(6,"div",10)(7,"div",11),rt._uU(8),rt.qZA(),rt.YNc(9,zS,2,1,"cgi-badge",12),rt.qZA()()),2&b){const u=rt.oxw();rt.Q6J("ngClass",rt.VKq(5,lM,u.notification.unreadCount>0)),rt.xp6(3),rt.hij(" ",u.notification.last.authorFullName," "),rt.xp6(2),rt.hij(" ",u.notification.last.content," "),rt.xp6(3),rt.hij(" ",u.getFormattedTimeOrDate(u.notification.last.createdDate)," "),rt.xp6(1),rt.Q6J("ngIf",u.notification.unreadCount>0)}}const sE=class extends $0{};let cM=sE;function e0(b,r){1&b&&(rt.TgZ(0,"cgi-tag",13),rt._uU(1),rt.ALo(2,"translate"),rt.qZA()),2&b&&(rt.xp6(1),rt.hij(" ",rt.lcZ(2,1,"General.Text.New")," "))}sE.\u0275fac=function(){let r;return function(y){return(r||(r=rt.n5z(sE)))(y||sE)}}(),sE.\u0275cmp=rt.Xpm({type:sE,selectors:[["sivi-application-comment-notification"]],inputs:{notification:"notification"},features:[rt.qOj],decls:18,vars:9,consts:[["siviKeyboardEvents","","tabindex","0","role","button",1,"notification",3,"siviClick"],[1,"ion-align-items-start"],["size","2"],[1,"avatar"],["width","42","height","42","random","",3,"src"],["size","10"],[1,"message","first",3,"ngClass"],[1,"content"],[1,"notification-title","text-ellipsis"],[1,"notification-body","text-ellipsis","ion-no-margin"],[1,"info"],[1,"date"],["color","primary",4,"ngIf"],["class","message last",3,"ngClass",4,"ngIf"],["color","primary"],[1,"message","last",3,"ngClass"]],template:function(u,y){1&u&&(rt.TgZ(0,"div",0),rt.NdJ("siviClick",function(){return y.onNotificationClick(y.notification)}),rt.TgZ(1,"ion-grid")(2,"ion-row",1)(3,"ion-col",2)(4,"div",3),rt._UZ(5,"cgi-shaped-image",4),rt.qZA()(),rt.TgZ(6,"ion-col",5)(7,"div",6)(8,"div",7)(9,"h6",8),rt._uU(10),rt.qZA(),rt.TgZ(11,"p",9),rt._uU(12),rt.qZA()(),rt.TgZ(13,"div",10)(14,"div",11),rt._uU(15),rt.qZA(),rt.YNc(16,ET,3,3,"cgi-tag",12),rt.qZA()(),rt.YNc(17,JA,10,7,"div",13),rt.qZA()()()()),2&u&&(rt.xp6(5),rt.Q6J("src",y.image?y.image.contentBase64:y.placeholderImage),rt.xp6(2),rt.Q6J("ngClass",rt.VKq(7,lM,y.isNewTagVisible)),rt.xp6(3),rt.hij(" ",y.notification.first.authorFullName," "),rt.xp6(2),rt.hij(" ",y.notification.first.content," "),rt.xp6(3),rt.hij(" ",y.getFormattedTimeOrDate(y.notification.first.createdDate)," "),rt.xp6(1),rt.Q6J("ngIf",y.isNewTagVisible),rt.xp6(1),rt.Q6J("ngIf",y.notification.first.id!==y.notification.last.id))},dependencies:[nl.wI,nl.jY,nl.Nd,vd.mk,vd.O5,As.KeyboardEventsDirective,Ip.X$],styles:[".message[_ngcontent-%COMP%]{display:flex;flex-flow:row;justify-content:space-around;align-items:flex-start}.message[_ngcontent-%COMP%]   .avatar[_ngcontent-%COMP%]{width:42px;height:42px}.message[_ngcontent-%COMP%]   .info[_ngcontent-%COMP%], .message[_ngcontent-%COMP%]   .date[_ngcontent-%COMP%]{font-weight:600;text-align:right}.message[_ngcontent-%COMP%]   .content[_ngcontent-%COMP%]{margin-right:auto;min-width:0}.message[_ngcontent-%COMP%]   .notification-title[_ngcontent-%COMP%]{font-weight:600;margin:2px 0}.message[_ngcontent-%COMP%]   .notification-body[_ngcontent-%COMP%]{margin-bottom:2px}.message[_ngcontent-%COMP%]   cgi-tag[_ngcontent-%COMP%]{margin-right:0}.message.last[_ngcontent-%COMP%]   .notification-title[_ngcontent-%COMP%], .message.last[_ngcontent-%COMP%]   .date[_ngcontent-%COMP%]{font-size:14px}.message.last[_ngcontent-%COMP%]   .content[_ngcontent-%COMP%]{margin-top:2px}.message.unchecked[_ngcontent-%COMP%]   .notification-title[_ngcontent-%COMP%], .message.unchecked[_ngcontent-%COMP%]   .date[_ngcontent-%COMP%]{font-weight:700}"]});const WD=function(b){return{unchecked:b}},oC=class extends $0{get child(){return this.notification?.child}get birthdate(){return this.getFormattedTimeOrDate(this.child.birthdate)}};let eE=oC;function QA(b,r){1&b&&(rt.TgZ(0,"cgi-tag",15),rt._uU(1),rt.ALo(2,"translate"),rt.qZA()),2&b&&(rt.xp6(1),rt.hij(" ",rt.lcZ(2,1,"General.Text.New")," "))}function MT(b,r){if(1&b&&(rt.TgZ(0,"cgi-badge",19),rt._uU(1),rt.qZA()),2&b){const u=r.ngIf;rt.xp6(1),rt.hij(" ",u," ")}}oC.\u0275fac=function(){let r;return function(y){return(r||(r=rt.n5z(oC)))(y||oC)}}(),oC.\u0275cmp=rt.Xpm({type:oC,selectors:[["sivi-child-creation-notification"]],inputs:{notification:"notification"},features:[rt.qOj],decls:19,vars:13,consts:[["siviKeyboardEvents","","tabindex","0","role","button",1,"notification",3,"siviClick"],[1,"ion-align-items-start"],["size","2"],[1,"avatar"],["width","42","height","42","random","",3,"src"],["size","10"],[1,"message",3,"ngClass"],[1,"content"],[1,"notification-title","text-ellipsis"],[1,"notification-body","text-ellipsis","ion-no-margin"],[1,"info"],[1,"date"],["color","primary",4,"ngIf"],["color","primary"]],template:function(u,y){1&u&&(rt.TgZ(0,"div",0),rt.NdJ("siviClick",function(){return y.onNotificationClick(y.notification)}),rt.TgZ(1,"ion-grid")(2,"ion-row",1)(3,"ion-col",2)(4,"div",3),rt._UZ(5,"cgi-shaped-image",4),rt.qZA()(),rt.TgZ(6,"ion-col",5)(7,"div",6)(8,"div",7)(9,"h6",8),rt._uU(10),rt.ALo(11,"firstNameLastName"),rt.qZA(),rt.TgZ(12,"p",9),rt._uU(13),rt.ALo(14,"translate"),rt.qZA()(),rt.TgZ(15,"div",10)(16,"div",11),rt._uU(17),rt.qZA(),rt.YNc(18,e0,3,3,"cgi-tag",12),rt.qZA()()()()()()),2&u&&(rt.xp6(5),rt.Q6J("src",y.image?y.image.contentBase64:y.placeholderImage),rt.xp6(2),rt.Q6J("ngClass",rt.VKq(11,WD,y.isNewTagVisible)),rt.xp6(3),rt.hij(" ",rt.lcZ(11,7,y.child)," "),rt.xp6(3),rt.AsE(" ",rt.lcZ(14,9,"General.Text.NewPersonAdded")," ",y.birthdate," "),rt.xp6(4),rt.hij(" ",y.date," "),rt.xp6(1),rt.Q6J("ngIf",y.isNewTagVisible))},dependencies:[nl.wI,nl.jY,nl.Nd,vd.mk,vd.O5,As.KeyboardEventsDirective,Ip.X$,As.firstNameLastNamePipe],styles:[".message[_ngcontent-%COMP%]{display:flex;flex-flow:row;justify-content:space-around;align-items:flex-start}.message[_ngcontent-%COMP%]   .avatar[_ngcontent-%COMP%]{width:42px;height:42px}.message[_ngcontent-%COMP%]   .info[_ngcontent-%COMP%], .message[_ngcontent-%COMP%]   .date[_ngcontent-%COMP%]{font-weight:600;text-align:right}.message[_ngcontent-%COMP%]   .content[_ngcontent-%COMP%]{margin-right:auto;min-width:0}.message[_ngcontent-%COMP%]   .notification-title[_ngcontent-%COMP%]{font-weight:600;margin:2px 0}.message[_ngcontent-%COMP%]   .notification-body[_ngcontent-%COMP%]{margin-bottom:2px}.message[_ngcontent-%COMP%]   cgi-tag[_ngcontent-%COMP%]{margin-right:0}.message.unchecked[_ngcontent-%COMP%]   .notification-title[_ngcontent-%COMP%], .message.unchecked[_ngcontent-%COMP%]   .date[_ngcontent-%COMP%]{font-weight:700}"]});const Px=function(b){return{unchecked:b}};function j0(b,r){if(1&b&&(rt.TgZ(0,"div",16)(1,"div",7)(2,"h6",8),rt._uU(3),rt.qZA(),rt.TgZ(4,"p",17),rt._uU(5),rt.qZA()(),rt.TgZ(6,"div",11)(7,"div",12),rt._uU(8),rt.qZA(),rt.YNc(9,MT,2,1,"cgi-badge",18),rt.qZA()()),2&b){const u=rt.oxw();rt.Q6J("ngClass",rt.VKq(5,Px,u.notification.unreadCount>0)),rt.xp6(3),rt.hij(" ",u.replySenderName," "),rt.xp6(2),rt.hij(" ",u.notification.last.content," "),rt.xp6(3),rt.hij(" ",u.getFormattedTimeOrDate(u.notification.last.createTime)," "),rt.xp6(1),rt.Q6J("ngIf",u.notification.totalReplies)}}const QC=class extends $0{get senderName(){const{childFullName:r,groupName:u,senderType:y}=this.notification.first;return y===gT.CHILD?r:u}get replySenderName(){const{childFullName:r,groupName:u,senderType:y}=this.notification.last;return y===gT.CHILD?r:u}constructor(r){super(),this.auth=r}ngOnInit(){this.isGuardian=this.auth.isGuardian()}};let Ox=QC;function K0(b,r){if(1&b){const u=rt.EpF();rt.TgZ(0,"sivi-application-comment-notification",5),rt.NdJ("notificationClick",function(L){rt.CHM(u);const G=rt.oxw(2);return rt.KtG(G.onNotificationClick(L))}),rt.qZA()}if(2&b){const u=rt.oxw().$implicit,y=rt.oxw();rt.Q6J("notification",y.getApplicationCommentNotification(u))("image",y.getImage(u))}}function tE(b,r){if(1&b){const u=rt.EpF();rt.TgZ(0,"sivi-child-creation-notification",5),rt.NdJ("notificationClick",function(L){rt.CHM(u);const G=rt.oxw(2);return rt.KtG(G.onNotificationClick(L))}),rt.qZA()}if(2&b){const u=rt.oxw().$implicit,y=rt.oxw();rt.Q6J("notification",y.getChildCreationNotification(u))("image",y.getImage(u))}}function Lx(b,r){if(1&b){const u=rt.EpF();rt.TgZ(0,"sivi-message-received-notification",5),rt.NdJ("notificationClick",function(L){rt.CHM(u);const G=rt.oxw(2);return rt.KtG(G.onNotificationClick(L))}),rt.qZA()}if(2&b){const u=rt.oxw().$implicit,y=rt.oxw();rt.Q6J("notification",y.getMessageReceivedNotification(u))("image",y.getImage(u))}}function uM(b,r){if(1&b&&(rt.TgZ(0,"div",2)(1,"div",3),rt.YNc(2,K0,1,2,"sivi-application-comment-notification",4),rt.YNc(3,tE,1,2,"sivi-child-creation-notification",4),rt.YNc(4,Lx,1,2,"sivi-message-received-notification",4),rt.qZA()()),2&b){const u=r.$implicit,y=rt.oxw();rt.xp6(1),rt.Q6J("ngSwitch",u.type),rt.xp6(1),rt.Q6J("ngSwitchCase",y.notificationType.APPLICATION_COMMENT),rt.xp6(1),rt.Q6J("ngSwitchCase",y.notificationType.CHILD_CREATION),rt.xp6(1),rt.Q6J("ngSwitchCase",y.notificationType.MESSAGE_RECEIVED)}}QC.\u0275fac=function(u){return new(u||QC)(rt.Y36(Gu.e8))},QC.\u0275cmp=rt.Xpm({type:QC,selectors:[["sivi-message-received-notification"]],inputs:{notification:"notification"},features:[rt.qOj],decls:20,vars:10,consts:[["siviKeyboardEvents","","tabindex","0","role","button",1,"notification",3,"siviClick"],[1,"ion-align-items-start"],["size","2"],[1,"avatar"],["width","42","height","42","random","",3,"src"],["size","10"],[1,"message",3,"ngClass"],[1,"content"],[1,"notification-title","text-ellipsis"],[1,"message-title","text-ellipsis","ion-no-margin"],[1,"text-ellipsis","ion-no-margin"],[1,"info"],[1,"date"],["color","primary",4,"ngIf"],["class","message last mt1",3,"ngClass",4,"ngIf"],["color","primary"],[1,"message","last","mt1",3,"ngClass"],[1,"notification-body","text-ellipsis","ion-no-margin"],["size","28","color","primary",4,"ngIf"],["size","28","color","primary"]],template:function(u,y){1&u&&(rt.TgZ(0,"div",0),rt.NdJ("siviClick",function(){return y.onNotificationClick(y.notification)}),rt.TgZ(1,"ion-grid")(2,"ion-row",1)(3,"ion-col",2)(4,"div",3),rt._UZ(5,"cgi-shaped-image",4),rt.qZA()(),rt.TgZ(6,"ion-col",5)(7,"div",6)(8,"div",7)(9,"h6",8),rt._uU(10),rt.qZA(),rt.TgZ(11,"p",9),rt._uU(12),rt.qZA(),rt.TgZ(13,"p",10),rt._uU(14),rt.qZA()(),rt.TgZ(15,"div",11)(16,"div",12),rt._uU(17),rt.qZA(),rt.YNc(18,QA,3,3,"cgi-tag",13),rt.qZA()(),rt.YNc(19,j0,10,7,"div",14),rt.qZA()()()()),2&u&&(rt.xp6(5),rt.Q6J("src",y.image?y.image.contentBase64:y.placeholderImage),rt.xp6(2),rt.Q6J("ngClass",rt.VKq(8,Px,y.isNewTagVisible)),rt.xp6(3),rt.hij(" ",y.senderName," "),rt.xp6(2),rt.hij(" ",y.notification.first.title," "),rt.xp6(2),rt.hij(" ",y.notification.first.content," "),rt.xp6(3),rt.hij(" ",y.getFormattedTimeOrDate(y.notification.first.createTime)," "),rt.xp6(1),rt.Q6J("ngIf",y.isNewTagVisible),rt.xp6(1),rt.Q6J("ngIf",y.notification.last))},dependencies:[nl.wI,nl.jY,nl.Nd,vd.mk,vd.O5,As.KeyboardEventsDirective,Ip.X$],styles:[".message[_ngcontent-%COMP%]{display:flex;flex-flow:row;justify-content:space-around;align-items:flex-start}.message[_ngcontent-%COMP%]   .avatar[_ngcontent-%COMP%]{width:42px;height:42px}.message[_ngcontent-%COMP%]   .info[_ngcontent-%COMP%], .message[_ngcontent-%COMP%]   .date[_ngcontent-%COMP%]{font-weight:600;text-align:right;line-height:normal}.message[_ngcontent-%COMP%]   .content[_ngcontent-%COMP%]{margin-right:auto;min-width:0}.message[_ngcontent-%COMP%]   .content[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{margin:0}.message[_ngcontent-%COMP%]   .notification-title[_ngcontent-%COMP%]{font-weight:600;margin:2px 0 8px}.message[_ngcontent-%COMP%]   .message-title[_ngcontent-%COMP%]{font-weight:600}.message[_ngcontent-%COMP%]   cgi-tag[_ngcontent-%COMP%]{margin-right:0}.message.unchecked[_ngcontent-%COMP%]   .notification-title[_ngcontent-%COMP%], .message.unchecked[_ngcontent-%COMP%]   .date[_ngcontent-%COMP%]{font-weight:700}"]});const vy=class extends As.SiviComponent{constructor(){super(),this.images={},this.notificationClick=new rt.vpe,this.notificationType=fl}getImage(r){return this.images[r.id]}onNotificationClick(r){this.notificationClick.emit(r)}getApplicationCommentNotification(r){return r}getChildCreationNotification(r){return r}getMessageReceivedNotification(r){return r}};let jC=vy;vy.\u0275fac=function(u){return new(u||vy)},vy.\u0275cmp=rt.Xpm({type:vy,selectors:[["sivi-notification-list"]],inputs:{notifications:"notifications",images:"images"},outputs:{notificationClick:"notificationClick"},features:[rt.qOj],decls:2,vars:2,consts:[[1,"notifications-list-container"],["class","notifications-list-item",4,"ngFor","ngForOf","ngForTrackBy"],[1,"notifications-list-item"],[3,"ngSwitch"],[3,"notification","image","notificationClick",4,"ngSwitchCase"],[3,"notification","image","notificationClick"]],template:function(u,y){1&u&&(rt.TgZ(0,"ion-list",0),rt.YNc(1,uM,5,4,"div",1),rt.qZA()),2&u&&(rt.xp6(1),rt.Q6J("ngForOf",y.notifications)("ngForTrackBy",y.trackByFn))},dependencies:[nl.q_,vd.sg,vd.RF,vd.n9,cM,eE,Ox],styles:["[_nghost-%COMP%]{display:block}.list-md.notifications-list-container[_ngcontent-%COMP%]{padding-top:0}.notifications-list-item[_ngcontent-%COMP%]{cursor:pointer}.notifications-list-item[_ngcontent-%COMP%]:nth-child(odd){background-color:var(--ion-color-light)}@media screen and (min-width: 600px) and (min-height: 500px){.scroll-content[_ngcontent-%COMP%]{height:45vh;min-height:300px;overflow-y:auto}}"]});const qA=["notificationContentLoader"];function TT(b,r){if(1&b){const u=rt.EpF();rt.TgZ(0,"ion-button",8),rt.NdJ("click",function(){rt.CHM(u);const L=rt.oxw();return rt.KtG(L.loadMore())}),rt.ALo(1,"async"),rt._uU(2),rt.ALo(3,"async"),rt.qZA()}if(2&b){const u=rt.oxw();rt.Q6J("disabled",rt.lcZ(1,2,u.isLoadMoreDisabled$)),rt.xp6(2),rt.hij(" ",rt.lcZ(3,4,u.buttonText$)," ")}}function dM(b,r){1&b&&rt._UZ(0,"ion-spinner",9)}const $D=function(b){return{"popover-content":b}},lE=class extends oc.xv{constructor(r,u,y,L,G,Te,Ze,gt){super(Te,y,gt),this.popoverCtrl=r,this.modalCtrl=u,this.translate=y,this.notificationController=L,this.applicationService=G,this.notify=Te,this.route=Ze,this.router=gt,this.destroy$=new fy.x}ngOnInit(){this.isLoading$=this.notificationController.loadingStatus$,this.notifications$=this.notificationController.notifications$,this.images$=this.notificationController.images$,this.notificationsCount$=this.notificationController.notificationsCount$,this.totalNotificationsCount$=this.notificationController.totalNotificationsCount$,this.isLoadMoreDisabled$=this.isLoadMoreDisabled(),this.buttonText$=this.getButtonText(),this.notificationController.subscribeNotifications()}ngOnDestroy(){this.notificationController.unsubscribeNotifications(),this.destroy$.next(),this.destroy$.complete()}loadMore(){this.notificationController.loadMore()}onDismiss(){var r=this;return(0,ef.Z)(function*(){"modal"===r.mode?yield r.modalCtrl.dismiss():yield r.popoverCtrl.dismiss()})()}markNotificationAsRead(r){return this.notificationController.markNotificationAsRead(r.id)}getButtonText(){return(0,G0.a)([this.notificationsCount$,this.totalNotificationsCount$]).pipe((0,ug.U)(([y,L])=>this.translate.instant("General.Buttons.LoadMore",{elements:y,totalCount:L})))}isLoadMoreDisabled(){return(0,G0.a)([this.notificationsCount$,this.totalNotificationsCount$]).pipe((0,ug.U)(([r,u])=>r===u))}onNotificationClick(r){var u=this;return(0,ef.Z)(function*(){try{u.contentLoader.showLoader(),yield Promise.all([u.notificationController.onNotificationClick(r),u.onDismiss()])}catch(y){console.error("onNotificationClick error",y)}finally{u.contentLoader.hideLoader()}})()}};let hy=lE;lE.\u0275fac=function(u){return new(u||lE)(rt.Y36(nl.Dh),rt.Y36(As.SiviModalController),rt.Y36(Ip.sK),rt.Y36(CT),rt.Y36(Gu.IX),rt.Y36(Gu.c),rt.Y36(vf.gz),rt.Y36(vf.F0))},lE.\u0275cmp=rt.Xpm({type:lE,selectors:[["sivi-notifications"]],viewQuery:function(u,y){if(1&u&&rt.Gf(qA,5),2&u){let L;rt.iGM(L=rt.CRH())&&(y.contentLoader=L.first)}},inputs:{mode:"mode"},features:[rt.qOj],decls:16,vars:18,consts:[[3,"hideNotifications","closeButton","closed"],["navbar-title",""],[3,"ngClass"],["notificationContentLoader",""],[3,"notifications","images","notificationClick"],[1,"actions-container","ion-text-center","ion-margin-vertical"],["no-min-width","","fill","outline","size","default",3,"disabled","click",4,"ngIf","ngIfElse"],["spinner",""],["no-min-width","","fill","outline","size","default",3,"disabled","click"],["color","secondary"]],template:function(u,y){if(1&u&&(rt.TgZ(0,"ion-header")(1,"sivi-lib-navbar",0),rt.NdJ("closed",function(){return y.onDismiss()}),rt.TgZ(2,"div",1),rt._uU(3),rt.ALo(4,"translate"),rt.qZA()()(),rt.TgZ(5,"ion-content",2)(6,"sivi-lib-content-loader",null,3)(8,"sivi-notification-list",4),rt.NdJ("notificationClick",function(G){return y.onNotificationClick(G)}),rt.ALo(9,"async"),rt.ALo(10,"async"),rt.qZA(),rt.TgZ(11,"div",5),rt.YNc(12,TT,4,6,"ion-button",6),rt.ALo(13,"async"),rt.YNc(14,dM,1,0,"ng-template",null,7,rt.W1O),rt.qZA()()()),2&u){const L=rt.MAs(15);rt.xp6(1),rt.Q6J("hideNotifications",!0)("closeButton",!0),rt.xp6(2),rt.hij(" ",rt.lcZ(4,8,"Notifications.PushPermissionExplanation.Title")," "),rt.xp6(2),rt.Q6J("ngClass",rt.VKq(16,$D,"popover"===y.mode)),rt.xp6(3),rt.Q6J("notifications",rt.lcZ(9,10,y.notifications$))("images",rt.lcZ(10,12,y.images$)),rt.xp6(4),rt.Q6J("ngIf",!1===rt.lcZ(13,14,y.isLoading$))("ngIfElse",L)}},dependencies:[nl.YG,nl.W2,nl.Gu,nl.PQ,vd.mk,vd.O5,As.ContentLoaderComponent,As.NavbarComponent,jC,vd.Ov,Ip.X$],styles:["[_nghost-%COMP%]{justify-content:flex-start}.popover-content[_ngcontent-%COMP%]{max-height:444px}ion-content[_ngcontent-%COMP%]{overflow-y:scroll}.actions-container[_ngcontent-%COMP%]{height:50px;display:flex;justify-content:center;align-items:center}"]});const aC=class{constructor(r,u,y,L,G,Te){this.messagingService=r,this.notificationController=u,this.eventBroadcaster=y,this.platformHelperService=L,this.modalCtrl=G,this.popoverCtrl=Te}userLoggedIn(){this.messagingService.wsConnect(),this.notificationController.init(),this.initNotificationsListeners()}userLoggedOut(){console.warn("userLoggedOut: disabling messaging"),this.messagingService.wsDisconnect(),this.notificationController.destroy(),this.eventQueue$&&this.eventQueue$.unsubscribe(),this.uncheckedCount$&&this.uncheckedCount$.unsubscribe()}initNotificationsListeners(){this.eventQueue$=this.eventBroadcaster.getEventQueueById(As.SiviEventTypes.NOTIFICATIONS_SHOW).subscribe(r=>{this.showNotificationsListComponent(r)}),this.uncheckedCount$=this.notificationController.uncheckedCount$.subscribe(r=>{this.eventBroadcaster.broadcastEvent(As.SiviEventTypes.NOTIFICATIONS_UNREAD_AMOUNT,r)})}showNotificationsListComponent(r){var u=this;return(0,ef.Z)(function*(){return u.notificationController.checkUncheckedNotifications().subscribe(()=>{},L=>console.log("failed to uncheck notifications",L)),u.platformHelperService.isMobilePlatform()&&!u.platformHelperService.isTabletPlatform()?(yield u.modalCtrl.create({component:hy,componentProps:{mode:"modal"}})).present():(yield u.popoverCtrl.create({component:hy,componentProps:{mode:"popover"},cssClass:"notification-results-popover",backdropDismiss:!0,event:r})).present()})()}};let t0=aC;aC.\u0275fac=function(u){return new(u||aC)(rt.LFG(As.MessagingService),rt.LFG(CT),rt.LFG(As.EventBroadcastService),rt.LFG(As.PlatformHelperService),rt.LFG(As.SiviModalController),rt.LFG(nl.Dh))},aC.\u0275prov=rt.Yz7({token:aC,factory:aC.\u0275fac,providedIn:"root"});function rp(){}rp.prototype.clearAllNotifications=function(){return window.FCM.clearAllNotifications()},rp.prototype.createNotificationChannel=function(b){return window.FCM.createNotificationChannel(b)},rp.prototype.deleteInstanceId=function(){return window.FCM.deleteInstanceId()},rp.prototype.getAPNSToken=function(){return window.FCM.getAPNSToken()},rp.prototype.getInitialPushPayload=function(){return window.FCM.getInitialPushPayload()},rp.prototype.getToken=function(){return window.FCM.getToken()},rp.prototype.hasPermission=function(){return window.FCM.hasPermission()},rp.prototype.onNotification=function(b){var r=new fy.x;return window.FCM.onNotification(function(y){return r.next(y)},b),r},rp.prototype.onTokenRefresh=function(b){var r=new fy.x;return window.FCM.onTokenRefresh(function(u){return r.next(u)},b),r},rp.prototype.requestPushPermission=function(b){return window.FCM.requestPushPermission(b)},rp.prototype.subscribeToTopic=function(b){return window.FCM.subscribeToTopic(b)},rp.prototype.unsubscribeFromTopic=function(b){return window.FCM.unsubscribeFromTopic(b)},rp.pluginName="FCM",rp.plugin="cordova-plugin-fcm-with-dependecy-updated",rp.pluginRef="FCM",rp.repo="https://github.com/andrehtissot/cordova-plugin-fcm-with-dependecy-updated",rp.platforms=["Android","iOS"],rp.installed=yf.KY.installed,rp.getPlugin=yf.KY.getPlugin,rp.getPluginName=yf.KY.getPluginName,rp.getPluginRef=yf.KY.getPluginRef,rp.getPluginInstallName=yf.KY.getPluginInstallName,rp.getSupportedPlatforms=yf.KY.getSupportedPlatforms,rp=function(b,r,u,y){var Te,L=arguments.length,G=L<3?r:null===y?y=Object.getOwnPropertyDescriptor(r,u):y;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)G=Reflect.decorate(b,r,u,y);else for(var Ze=b.length-1;Ze>=0;Ze--)(Te=b[Ze])&&(G=(L<3?Te(G):L>3?Te(r,u,G):Te(r,u))||G);return L>3&&G&&Object.defineProperty(r,u,G),G}([(0,rt.GSi)()],rp);const r0=class{getCurrentToken$(){return this.token$.asObservable()}constructor(r,u,y){this.fcm=r,this.platform=u,this.messageReceivedStrategy=y,this.destroy$=new fy.x,this.token$=new ka.X(null)}enableNotifications(){var r=this;return(0,ef.Z)(function*(){if(r.listenPushUpdates(),yield r.platform.ready(),!r.fcm.requestPushPermission())return;const y=yield r.fcm.getToken();r.token$.next(y)})()}stopListeningForNotifications(){this.token$.next(null)}destroy(){this.stopListeningForNotifications(),this.destroy$.next(),this.destroy$.complete()}listenPushUpdates(){this.getCurrentToken$().pipe((0,WC.w)(r=>(0,fT.s)(()=>!!r,this.fcm.onNotification(),s_.E)),(0,Z0.K)(r=>(console.error(r),s_.E)),(0,Bg.R)(this.destroy$)).subscribe(r=>{if(r.wasTapped){const u={id:r.messageId,masterId:r.masterMessageId,groupId:r.groupId,childId:r.childId};this.messageReceivedStrategy.navigateToMessage(u)}}),this.getCurrentToken$().pipe((0,WC.w)(r=>(0,fT.s)(()=>!!r,this.fcm.onTokenRefresh(),s_.E)),(0,Z0.K)(r=>(console.error(r),s_.E)),(0,Bg.R)(this.destroy$)).subscribe(r=>this.token$.next(r))}};let Fu=r0;r0.\u0275fac=function(u){return new(u||r0)(rt.LFG(rp),rt.LFG(nl.t4),rt.LFG(sM))},r0.\u0275prov=rt.Yz7({token:r0,factory:r0.\u0275fac});const cE=class extends As.AbstractRestService{constructor(r,u,y,L,G,Te){super(G,Te),this.mobilePushService=r,this.mobilePlatformService=u,this.platformHelper=y,this.authService=L,this.http=G,this.siviProjectsGatewayService=Te,this.destroy$=new fy.x,this.fcmToken$=new ka.X(null),this.decideServiceByPlatform(this.platformHelper.isMobileOrBrowser()),this.pushService?.getCurrentToken$().pipe((0,WC.w)(Ze=>Ze?this.put({token:Ze},"./api/sivi-messaging-api/push-notifications/register-device"):s_.E),(0,Z0.K)(Ze=>(console.log(Ze),s_.E))).subscribe()}tryEnablePushNotifications(){this.pushService?.enableNotifications()}stopListeningForNotifications(){this.pushService?.stopListeningForNotifications()}destroy(){try{this.destroy$.next(),this.destroy$.complete(),this.pushService&&this.pushService.destroy()}catch(r){console.error("PushNotificationsService destroy failed",r)}}getToken(){return this.fcmToken$.asObservable()}decideServiceByPlatform(r){"mobile"===r&&(this.pushService=this.mobilePushService,this._platformService=this.mobilePlatformService)}};let l_=cE;cE.\u0275fac=function(u){return new(u||cE)(rt.LFG(Fu),rt.LFG(As.MobilePlatformService),rt.LFG(As.PlatformHelperService),rt.LFG(Gu.e8),rt.LFG(dy.eN),rt.LFG(As.SiviProjectsGatewayService))},cE.\u0275prov=rt.Yz7({token:cE,factory:cE.\u0275fac});var pM=p(24006);function z_(b,r){if(1&b&&(rt.TgZ(0,"li"),rt._uU(1),rt.qZA()),2&b){const u=r.$implicit,y=rt.oxw(4);rt.ekj("selectedRole",y.userHasRole(u)),rt.xp6(1),rt.hij(" ",u," ")}}function mM(b,r){if(1&b&&(rt.TgZ(0,"div")(1,"ul"),rt.YNc(2,z_,2,3,"li",8),rt.qZA()()),2&b){const u=rt.oxw(3);rt.xp6(2),rt.Q6J("ngForOf",u.currentRoute.data.roles)("ngForTrackBy",u.trackByFnIndex)}}function fM(b,r){1&b&&(rt.TgZ(0,"div")(1,"b",9),rt._uU(2,"ERROR: Allowed roles are not defined for this page!"),rt.qZA()())}function xT(b,r){if(1&b&&(rt.TgZ(0,"div"),rt.YNc(1,mM,3,2,"div",4),rt.YNc(2,fM,3,0,"div",4),rt.qZA()),2&b){const u=rt.oxw(2);rt.Q6J("@collapseColumn",void 0),rt.xp6(1),rt.Q6J("ngIf",u.currentRoute.data.roles&&!0===u.show[0]),rt.xp6(1),rt.Q6J("ngIf",!u.currentRoute.data.roles)}}function YS(b,r){if(1&b){const u=rt.EpF();rt.TgZ(0,"ion-grid",2)(1,"ion-col")(2,"ion-button",7),rt.NdJ("click",function(){rt.CHM(u);const L=rt.oxw();return rt.KtG(L.toggleShow(0))}),rt._uU(3,"Allowed roles "),rt.qZA(),rt.YNc(4,xT,3,3,"div",4),rt.qZA()()}if(2&b){const u=rt.oxw();rt.xp6(4),rt.Q6J("ngIf",!0===u.show[0])}}function Ug(b,r){if(1&b){const u=rt.EpF();rt.TgZ(0,"ion-item",13)(1,"ion-grid")(2,"ion-row",14)(3,"ion-col"),rt._uU(4),rt.TgZ(5,"ion-icon",15),rt.NdJ("click",function(){const G=rt.CHM(u).$implicit,Te=rt.oxw(3);return rt.KtG(Te.deleteRole(G))}),rt.qZA()()(),rt.TgZ(6,"ion-row",14)(7,"ion-col"),rt._uU(8),rt.qZA()(),rt.TgZ(9,"ion-row",14)(10,"ion-col"),rt._uU(11),rt.qZA()()()()}if(2&b){const u=r.$implicit,y=rt.oxw(3);rt.ekj("selectedRole",y.pageRequiresRole(u.roleName)),rt.xp6(4),rt.hij("",u.roleName," "),rt.xp6(4),rt.hij(" Org: ",u.organizationName," "),rt.xp6(3),rt.hij(" Org id: ",u.organizationUuid," ")}}function DT(b,r){if(1&b&&(rt.TgZ(0,"ion-list"),rt.YNc(1,Ug,12,5,"ion-item",12),rt.qZA()),2&b){const u=rt.oxw(2);rt.Q6J("@collapseColumn",void 0),rt.xp6(1),rt.Q6J("ngForOf",u.roles)("ngForTrackBy",u.trackByFnIndex)}}function J0(b,r){if(1&b){const u=rt.EpF();rt.TgZ(0,"ion-grid",10),rt.NdJ("click",function(){rt.CHM(u);const L=rt.oxw();return rt.KtG(L.toggleShow(1))}),rt.TgZ(1,"ion-col")(2,"ion-button",11),rt._uU(3,"current roles"),rt.qZA(),rt.YNc(4,DT,2,3,"ion-list",4),rt.qZA()()}if(2&b){const u=rt.oxw();rt.xp6(4),rt.Q6J("ngIf",u.show[1])}}function nE(b,r){if(1&b&&(rt.TgZ(0,"ion-item")(1,"pre"),rt._uU(2),rt.ALo(3,"json"),rt.qZA()()),2&b){const u=rt.oxw();rt.Q6J("@collapseColumn",void 0),rt.xp6(2),rt.hij("    ",rt.lcZ(3,2,u.municipality),"\n    ")}}function gy(b,r){1&b&&(rt.TgZ(0,"div",2)(1,"b"),rt._uU(2,"Note that user has ADMIN role therefore is allowed to pass all role requirements."),rt.qZA()())}const uE=class extends oc.de{constructor(r,u,y,L){super(),this.auth=r,this.siviTesterService=u,this.appStateService=y,this.languageService=L,this.roles=[],this.show=[],this.explicitClose=new rt.vpe}ngOnInit(){this.prepareViewData()}toggleShow(r){this.show[r]=!this.show[r]}prepareViewData(){this.siviTesterService.getCurrentRoute().pipe((0,Bg.R)(this.destroy$)).subscribe(r=>{this.currentRoute=r}),this.auth.getAuthorities().pipe((0,Bg.R)(this.destroy$)).subscribe(r=>{this.roles=r}),this.appStateService.getMunicipality().pipe((0,Bg.R)(this.destroy$)).subscribe(r=>{this.municipality=r})}userHasRole(r){return this.auth.hasRole(r)}pageRequiresRole(r){return!(!this.currentRoute.data||!this.currentRoute.data.roles)&&this.currentRoute.data.roles.find(u=>u===r)}isAdmin(){return this.auth.isAdmin()}displayGrid(){console.log("toggle grid");const r=document.createElement("div");r.id="grid",document.querySelector("body").appendChild(r),this.explicitClose.emit()}onClose(){this.explicitClose.emit()}addGeneralAdminRole(){const r=[...this.roles,{authority:"ROLE_GENERAL_ADMIN",organizationName:"admin",organizationId:"FAKE-ID-BY-TEST-TOOL-ORG-ID",roleName:"ROLE_GENERAL_ADMIN",roleUuid:"FAKE-ID-BY-TEST-TOOL-ROLE-ID"}];this.auth._setAuthorities(r),this.roles=r}deleteRole(r){const u=this.roles.indexOf(r);void 0!==u&&this.roles.splice(u,1),this.auth._setAuthorities(this.roles)}toggleLocalizationKeysOrLanguage(r){this.languageService._showTranslations(!r.detail.checked)}};let mb=uE;uE.\u0275fac=function(u){return new(u||uE)(rt.Y36(Gu.e8),rt.Y36(iM),rt.Y36(Gu.ZQ),rt.Y36(Gu.TS))},uE.\u0275cmp=rt.Xpm({type:uE,selectors:[["sivi-tester"]],outputs:{explicitClose:"explicitClose"},features:[rt.qOj],decls:21,vars:4,consts:[["class","ion-text-center",4,"ngIf"],["class","ion-text-center",3,"click",4,"ngIf"],[1,"ion-text-center"],["fill","clear","color","light",3,"click"],[4,"ngIf"],["lines","none",1,"ion-text-center"],["color","danger",3,"ionChange"],["color","light","fill","clear",3,"click"],[3,"selectedRole",4,"ngFor","ngForOf","ngForTrackBy"],[1,"error"],[1,"ion-text-center",3,"click"],["fill","clear","color","light"],["class","test-tool-user-roles",3,"selectedRole",4,"ngFor","ngForOf","ngForTrackBy"],[1,"test-tool-user-roles"],[1,"text-align-right"],["name","trash",3,"click"]],template:function(u,y){1&u&&(rt.YNc(0,YS,5,1,"ion-grid",0),rt.YNc(1,J0,5,1,"ion-grid",1),rt.TgZ(2,"ion-grid",2)(3,"ion-col")(4,"ion-button",3),rt.NdJ("click",function(){return y.toggleShow(2)}),rt._uU(5,"municipality info"),rt.qZA(),rt.YNc(6,nE,4,4,"ion-item",4),rt.qZA()(),rt.YNc(7,gy,3,0,"div",0),rt.TgZ(8,"div",2)(9,"ion-button",3),rt.NdJ("click",function(){return y.addGeneralAdminRole()}),rt._uU(10," add ROLE_GENERAL_ADMIN "),rt.qZA()(),rt.TgZ(11,"div",2)(12,"ion-button",3),rt.NdJ("click",function(){return y.displayGrid()}),rt._uU(13," display grid "),rt.qZA()(),rt.TgZ(14,"ion-item",5)(15,"ion-label"),rt._uU(16,"SHOW LOCALIZATION KEYS"),rt.qZA(),rt.TgZ(17,"ion-toggle",6),rt.NdJ("ionChange",function(G){return y.toggleLocalizationKeysOrLanguage(G)}),rt.qZA()(),rt.TgZ(18,"div",2)(19,"ion-button",3),rt.NdJ("click",function(){return y.onClose()}),rt._uU(20," close "),rt.qZA()()),2&u&&(rt.Q6J("ngIf",y.currentRoute&&y.currentRoute.data),rt.xp6(1),rt.Q6J("ngIf",null==y.currentRoute?null:y.currentRoute.data),rt.xp6(5),rt.Q6J("ngIf",!0===y.show[2]),rt.xp6(1),rt.Q6J("ngIf",y.isAdmin()))},dependencies:[nl.YG,nl.wI,nl.jY,nl.gu,nl.Ie,nl.Q$,nl.q_,nl.Nd,nl.ho,nl.w,vd.sg,vd.O5,vd.Ts],styles:[".test-tool-user-roles[_ngcontent-%COMP%]{--color: #ffffff;font-size:13px}ion-label[_ngcontent-%COMP%]{--color: #ffffff !important;font-size:14px}.selectedRole[_ngcontent-%COMP%]{font-weight:700}.error[_ngcontent-%COMP%]{color:#dc3030}pre[_ngcontent-%COMP%]{font-size:13px;color:#fff;white-space:pre-wrap;white-space:-moz-pre-wrap;white-space:-pre-wrap;white-space:-o-pre-wrap;word-wrap:break-word}.column[_ngcontent-%COMP%]{display:flex;flex-direction:column}.label[_ngcontent-%COMP%]{font-size:20px;font-weight:700}"],data:{animation:[As.elementAnimations]}});var hM=p(71884),ST=p(34782),kx=p(73819),AT=p(42250),iE=p(94954);function rE(b,r){1&b&&(rt.TgZ(0,"div"),rt._UZ(1,"ion-progress-bar",2),rt.qZA())}function c_(b,r){if(1&b){const u=rt.EpF();rt.TgZ(0,"button",15),rt.NdJ("click",function(){rt.CHM(u);const L=rt.oxw(2);return rt.KtG(L.onLogout())}),rt.ALo(1,"translate"),rt.ALo(2,"async"),rt.O4$(),rt.TgZ(3,"svg",16)(4,"path",17)(5,"title"),rt._uU(6),rt.ALo(7,"translate"),rt.qZA()()()()}if(2&b){const u=rt.oxw(2);let y;rt.zWS("aria-label","",rt.lcZ(1,3,"General.Buttons.Logout")," ",null==(y=rt.lcZ(2,5,u.auth.getUserPersonData()))?null:y.firstNames,""),rt.xp6(6),rt.Oqu(rt.lcZ(7,7,"General.Buttons.Logout"))}}function HS(b,r){if(1&b&&(rt.TgZ(0,"cgi-badge",26),rt._uU(1),rt.ALo(2,"async"),rt.qZA()),2&b){const u=rt.oxw(5);rt.xp6(1),rt.hij(" ",rt.lcZ(2,1,u.receivedApplicationsCount$)," ")}}function Nf(b,r){if(1&b&&(rt.YNc(0,HS,3,3,"cgi-badge",25),rt.ALo(1,"async")),2&b){const u=rt.oxw(2).$implicit,y=rt.oxw(2);rt.Q6J("ngIf",rt.lcZ(1,1,y.canShowReceivedApplicationsCount(u.id)))}}function wl(b,r){if(1&b&&(rt.TgZ(0,"button",21)(1,"i",22),rt._uU(2),rt.qZA(),rt.TgZ(3,"span",23),rt._uU(4),rt.qZA(),rt.YNc(5,Nf,2,3,"ng-template",24),rt.qZA()),2&b){const u=rt.oxw().$implicit,y=rt.oxw(2);rt.xp6(2),rt.Oqu(u.icon),rt.xp6(2),rt.hij(" ",u.translatedTitle," "),rt.xp6(1),rt.Q6J("ngxPermissionsOnly",y.applicationsManagementRoles)}}const Bf=function(b,r,u){return{selected:b,hidden:r,"nav-item":u}};function wT(b,r){if(1&b){const u=rt.EpF();rt.TgZ(0,"ion-row",18),rt.NdJ("click",function(){const G=rt.CHM(u).$implicit,Te=rt.oxw(2);return Te.openPage(G,Te.municipalityId),rt.KtG(Te.closeMenu())}),rt.TgZ(1,"ion-menu-toggle",19),rt.YNc(2,wl,6,3,"button",20),rt.qZA()()}if(2&b){const u=r.$implicit,y=rt.oxw(2);rt.Q6J("ngClass",rt.kEZ(2,Bf,u.id===y.menuService.rootPage,!1===u.visible,y.isMenuOptionEnabled(u))),rt.xp6(2),rt.Q6J("ngIf",y.isMenuOptionEnabled(u))}}function IT(b,r){if(1&b&&(rt.TgZ(0,"nav",3)(1,"header",4)(2,"div",5)(3,"span",6),rt.ALo(4,"lastNameFirstName"),rt.ALo(5,"async"),rt._uU(6),rt.ALo(7,"lastNameFirstName"),rt.ALo(8,"async"),rt.qZA()(),rt._UZ(9,"sivi-lib-spinner",7),rt.YNc(10,c_,8,9,"button",8),rt.qZA(),rt.TgZ(11,"ion-grid",9)(12,"div",10),rt.YNc(13,wT,3,6,"ion-row",11),rt.qZA()(),rt._UZ(14,"img",12)(15,"img",13)(16,"img",14),rt.qZA()),2&b){const u=rt.oxw();rt.xp6(3),rt.s9C("title",rt.xi3(4,6,rt.lcZ(5,9,u.auth.getUserPersonData()),", ")),rt.xp6(3),rt.hij(" ",rt.xi3(7,11,rt.lcZ(8,14,u.auth.getUserPersonData()),", ")," "),rt.xp6(3),rt.Q6J("show",u.auth.isLoggingOut()),rt.xp6(1),rt.Q6J("ngIf",!u.auth.isLoggingOut()),rt.xp6(3),rt.Q6J("ngForOf",u.menuService.menuItems)("ngForTrackBy",u.trackByFn)}}const h=class extends oc.de{constructor(r,u,y,L,G,Te,Ze,gt,Ot,sn,ci){super(),this.auth=r,this.settingsService=u,this.router=y,this.menu=L,this.menuService=G,this.appState=Te,this.organizationCommonService=Ze,this.languageService=gt,this.attributesService=Ot,this.userSettingsService=sn,this.messagingService=ci,this.logout=new rt.vpe,this.browserRefresh=!1,this.menuLoading=!1,this.menuItemHasChanged$=new ka.X(null),this.applicationsManagementRoles=As.Permissions.Menu.CAN_ACCESS_APPLICATIONS,this.environment=oc.qA}ngOnInit(){this.menuLoading=!0,this._loadInitialData(),this._listenForUserPreferenceChanges(),this._listenForRefreshEvent(),this.listenForRouterEvents(),this.receivedApplicationsCount$=this.getReceivedApplicationsCount(),this.languageService.getUserLanguage().subscribe(()=>{this.translateMenuItems()})}translateMenuItems(){this.menuService.menuItems=this.menuService.menuItems.map(r=>(r.translatedTitle=this.languageService.instant(r.title),r)),this.menuItemHasChanged$.next(null)}getReceivedApplicationsCount(){const r=this.auth.getUserPersonData().pipe((0,ug.U)(G=>G?.userId),(0,Sv.q)(1)),u=this.userSettingsService.getSettings().pipe((0,ug.U)(G=>G?.selectedMunicipalityId),(0,bs.h)(G=>!!G),(0,hM.x)());let y;const L=(G,Te)=>(y=this.messagingService.subscribeChannel({channelName:"user",channelId:G,action:`${Te}/received-applications-count`}),y.pipe((0,ug.U)(Ze=>Ze?.body?.content)));return(0,G0.a)([r,u]).pipe((0,ys.b)(()=>y?y.close():null),(0,WC.w)(G=>L(...G)),(0,ST.d)())}canShowReceivedApplicationsCount(r){return this.receivedApplicationsCount$.pipe((0,ug.U)(u=>Number(u)>0&&r===oc.vD.APPLICATIONS_MANAGEMENT))}menuOptionsHandler(){this.menuService.getMenuCategoriesWithOptions().pipe((0,Bg.R)(this.destroy$),(0,WC.w)(r=>(this.menuCategoryWithOptions=this.filterUniqueOptions(r),this.auth.getUserPersonData()))).subscribe({next:r=>{if(r){const u=r.professional?"PROFESSIONAL":"GUARDIAN";this.setMenuItems(this.menuCategoryWithOptions[u])}},error:r=>console.error("menuOptionsHandler failed:",r)})}setMenuItems(r){r=r||[],this.menuService.menuItems=r.filter(u=>"education-group"!==u.component),this.translateMenuItems()}filterUniqueOptions(r){const u=oc.gT.ROLE_TYPE_PROFESSIONAL.toUpperCase(),L=r[u].reduce((G,Te)=>G.find(gt=>gt.id===Te.id)?G:G.concat([Te]),[]);return r={...r,[u]:L}}isMenuOptionEnabled(r){return this.auth.hasAnyRole(r.roles)&&r.visible}openPage(r,u){switch(this.menuService.rootPage=r.id,r.component){case oc.vD.MUNICIPALITY_SETTINGS:this.router.navigateByUrl("municipalities/"+u+"/municipality-settings");break;case oc.vD.CHILD:this.navigateToChild(r);break;case oc.vD.EDUCATION_GROUP:this.navigateToOrganization(r);break;case oc.vD.MUNICIPALITY:this.router.navigateByUrl("municipality/"+r.id);break;case oc.vD.ORGANIZATIONS:this.navigateToOrganizations(u);break;case oc.vD.APPLICATIONS_MANAGEMENT:this.router.navigateByUrl(oc.vD.APPLICATIONS_MANAGEMENT);break;case oc.vD.GUARDIANS_AND_CHILDREN:this.router.navigateByUrl("municipalities/"+u+"/guardians-and-children");break;case oc.vD.FEES:this.router.navigateByUrl("fee-handling");break;case oc.vD.INVOICING:this.router.navigateByUrl("invoicing");break;default:this.router.navigate([r.component])}}isGroupOrFamilyDaycare(r){return[oc.V6.DAYCAREPLACE_GROUP,oc.V6.DAYCAREPLACE_TYPE_FAMILY_DAYCARE,oc.V6.DAYCAREPLACE_TYPE_GROUP_FAMILY_DAYCARE].some(y=>r.includes(y))}navigateToOrganization(r){const y=this.organizationCommonService.isTypeOfGroup(r.type)?oc.V6.DAYCAREPLACE_GROUP_SHORT:oc.V6.DAYCAREPLACE_SHORT,L="municipalities/"+r.municipalityId+"/organizations/"+r.id+"/info/"+y;this.router.navigateByUrl(L)}refreshCurrentPage(r,u){if(u.includes("/municipalities/")&&!this.browserRefresh){let y;y=u.includes("/municipality-settings")?"municipalities/"+r+"/municipality-settings":u.includes("/applications-management")?"municipalities/"+r+"/applications-management":u.includes("/guardians-and-children")?"municipalities/"+r+"/guardians-and-children":"municipalities/"+r,this.router.navigateByUrl(y)}this.browserRefresh=!1}onLogout(){this.municipalityId="",this.menuService.setDefaultMenuCategoriesWithOptions(),this.destroy$.next(),this.destroy$.complete(),this.logout.emit()}closeMenu(){this.menu.close()}windowReload(){window.location.reload()}listenForRouterEvents(){(0,G0.a)([this.router.events.pipe((0,bs.h)(r=>r instanceof vf.m2)),this.menuItemHasChanged$]).pipe((0,Bg.R)(this.destroy$)).subscribe(()=>{this.menuService.setRootPage(this.router)})}navigateToChild(r){this.router.navigateByUrl("municipalities/"+r.municipalityId+"/children/"+r.id)}navigateToOrganizations(r){this.router.navigate(["municipalities/"+r+"/organizations/"+r+"/info/municipality"])}_loadInitialData(){this.auth.isAuthenticated$().pipe((0,bs.h)(u=>!!u)).subscribe({next:()=>{this.menuService.initMenuAttributesAndCategories(),this.menuService.initMenuService(),this.menuService.refreshOrganizations(this.municipalityId),this.menuOptionsHandler(),this.menuLoading=!1},error:u=>{this.menuLoading=!1,console.error("_loadInitialData failed: ",u)}})}_listenForUserPreferenceChanges(){this.auth.isAuthenticated$().pipe((0,bs.h)(u=>!!u),(0,pb.z)(()=>this.settingsService.getSettings()),(0,ys.b)(u=>{this.municipalityId=u.selectedMunicipalityId})).subscribe()}_listenForRefreshEvent(){this.router.events.pipe((0,Bg.R)(this.destroy$)).subscribe(r=>{r instanceof vf.OD&&(this.browserRefresh=!this.router.navigated)})}};let n0=h;h.\u0275fac=function(u){return new(u||h)(rt.Y36(Gu.e8),rt.Y36(Gu.sF),rt.Y36(vf.F0),rt.Y36(nl._q),rt.Y36(kx.h),rt.Y36(Gu.ZQ),rt.Y36(As.OrganizationCommonService),rt.Y36(Gu.TS),rt.Y36(AT.f),rt.Y36(Gu.sF),rt.Y36(As.MessagingService))},h.\u0275cmp=rt.Xpm({type:h,selectors:[["sivi-nav-side-menu"]],outputs:{logout:"logout"},features:[rt.qOj],decls:3,vars:2,consts:[[4,"ngIf","ngIfElse"],["menuLoaded",""],["color","secondary","type","indeterminate"],["role","menu",1,"side-menu-navigation"],[1,"ion-align-items-center","flex-nowrap","flex","ion-padding-horizontal"],[1,"flex-col-12","username"],[1,"pl1","weight-lighter","font-16px",3,"title"],[3,"show"],["class","btn-logout pointer","tabindex","0",3,"click",4,"ngIf"],["fixed",""],["role","menuitem","id","menuOptionList",1,"menu-options"],["menuClose","",3,"ngClass","click",4,"ngFor","ngForOf","ngForTrackBy"],["src","/assets/img/oval-red.svg","alt","","role","presentation",1,"oval","red"],["src","/assets/img/oval-blue.svg","alt","","role","presentation",1,"oval","blue"],["src","/assets/img/oval-orange.svg","alt","","role","presentation",1,"oval","orange"],["tabindex","0",1,"btn-logout","pointer",3,"click"],["viewBox","0 0 20 16","xmlns","http://www.w3.org/2000/svg"],["d","M14.777 10.872L15.926 12 20 8l-4.074-4-1.149 1.128L16.879 7.2H9v1.6h7.88l-2.103 2.072zM1.556 16h10.888c.864 0 1.556-.8 1.556-1.778v-3.555h-1.556v3.555H1.556V1.778h10.888v3.555H14V1.778C14 .8 13.308 0 12.444 0H1.556C.7 0 0 .8 0 1.778v12.444C0 15.2.7 16 1.556 16z"],["menuClose","",3,"ngClass","click"],["autoHide","false","menu","main-navigation-menu"],["role","link","class","pointer flex flex-nowrap flex-align-items-center",4,"ngIf"],["role","link",1,"pointer","flex","flex-nowrap","flex-align-items-center"],["aria-hidden","true",1,"ion-padding-end","material-icons"],[1,"text-ellipsis","size-14px"],[3,"ngxPermissionsOnly"],["class","received-applications-badge",4,"ngIf"],[1,"received-applications-badge"]],template:function(u,y){if(1&u&&(rt.YNc(0,rE,2,0,"div",0),rt.YNc(1,IT,17,16,"ng-template",null,1,rt.W1O)),2&u){const L=rt.MAs(2);rt.Q6J("ngIf",y.menuLoading)("ngIfElse",L)}},dependencies:[As.SpinnerComponent,nl.jY,nl.zc,nl.X7,nl.Nd,vd.mk,vd.sg,vd.O5,iE.gE,vd.Ov,Ip.X$,As.lastNameFirstNamePipe],styles:['.side-menu-content[_ngcontent-%COMP%]{overflow-x:hidden;overflow-y:auto;width:100%}.side-menu-content[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]{transition:all .2s}.side-menu-content[_ngcontent-%COMP%]   .material-icons[_ngcontent-%COMP%]{opacity:1}.oval[_ngcontent-%COMP%]{left:0;position:absolute;top:0}.oval.red[_ngcontent-%COMP%]{transform:translate(-40%,-5%)}.oval.blue[_ngcontent-%COMP%]{transform:translate(75%,-60%)}.oval.orange[_ngcontent-%COMP%]{transform:translate(155%,-55%)}header[_ngcontent-%COMP%]{height:56px}header[_ngcontent-%COMP%]:after{content:"";display:none}.btn-logout[_ngcontent-%COMP%]{width:36px;background-color:transparent;fill:var(--ion-color-primary)}.btn-logout[_ngcontent-%COMP%]   svg[_ngcontent-%COMP%]{height:16px;width:20px}.role-switcher[_ngcontent-%COMP%]{height:56px}.role-switcher[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]{background-color:transparent;border-bottom:3px solid var(--background-color);color:var(--ion-color-primary);font-size:24px;padding:8px 32px 5px}.role-switcher[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]:hover, .role-switcher[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]:active{background-color:#fff}.role-switcher[_ngcontent-%COMP%]   button.active[_ngcontent-%COMP%]{color:var(--ion-color-secondary);border-bottom-color:var(--ion-color-secondary)}.nav-item[_ngcontent-%COMP%]{color:var(--ion-color-primary);padding:8px 16px}.nav-item[_ngcontent-%COMP%]   ion-menu-toggle[_ngcontent-%COMP%]{width:100%}.nav-item[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]{background-color:transparent;border-left:3px solid transparent;color:var(--ion-color-primary);line-height:1.2;padding:8px 8px 8px 5px;width:100%}.nav-item[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]:hover, .nav-item[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]:active{background-color:#fff}.nav-item[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]   .label[_ngcontent-%COMP%]{margin:0}.nav-item.selected[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]{border-left-color:var(--ion-color-secondary);color:var(--ion-color-secondary)}.menu-options[_ngcontent-%COMP%]{max-height:calc(100vh - 80px);overflow-x:hidden;overflow-y:auto;padding-top:24px;width:100%}.help-request-container[_ngcontent-%COMP%]{bottom:0}.side-menu-footer[_ngcontent-%COMP%]{padding-left:8px;bottom:0;position:fixed}.side-menu-footer[_ngcontent-%COMP%]:before{background:none;display:none}.username[_ngcontent-%COMP%]{overflow-x:hidden}.username[_ngcontent-%COMP%] > span[_ngcontent-%COMP%]{text-overflow:ellipsis;display:inline-block;overflow-x:hidden;white-space:nowrap;max-width:100%;vertical-align:bottom;padding-right:4px}.received-applications-badge[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;margin-left:auto}']});var PT=p(10516);const VS=["hierarchyMenu"],jD=["app"];function ZS(b,r){if(1&b){const u=rt.EpF();rt.TgZ(0,"sivi-nav-side-menu",14),rt.NdJ("logout",function(){rt.CHM(u);const L=rt.oxw(2);return rt.KtG(L.onLogout())}),rt.qZA()}}function GS(b,r){if(1&b){const u=rt.EpF();rt.TgZ(0,"sivi-tester",15),rt.NdJ("explicitClose",function(){rt.CHM(u);const L=rt.oxw(2);return rt.KtG(L.preventSiviTester())}),rt.qZA()}}function Rx(b,r){if(1&b){const u=rt.EpF();rt.TgZ(0,"ion-split-pane",4)(1,"ion-menu",5),rt.YNc(2,ZS,1,0,"sivi-nav-side-menu",6),rt.qZA(),rt._UZ(3,"ion-router-outlet",7),rt.TgZ(4,"ion-menu",8),rt.YNc(5,GS,1,0,"sivi-tester",9),rt.TgZ(6,"div",10)(7,"ion-item",11)(8,"ion-label",12),rt._uU(9,"Menu size"),rt.qZA(),rt.TgZ(10,"ion-range",13),rt.NdJ("ngModelChange",function(L){rt.CHM(u);const G=rt.oxw();return rt.KtG(G.menuSize=L)})("ionChange",function(){rt.CHM(u);const L=rt.oxw();return rt.KtG(L.changeMenuSize())}),rt.qZA()()()()()}if(2&b){const u=rt.oxw();rt.xp6(1),rt.Q6J("disabled",!u.authenticated),rt.xp6(1),rt.Q6J("ngIf",u.showMenu),rt.xp6(2),rt.Q6J("disabled",!u.canShowSiviTestTool()),rt.xp6(1),rt.Q6J("ngIf",u.canShowSiviTestTool()),rt.xp6(5),rt.Q6J("ngModel",u.menuSize)}}const _=class{constructor(r,u,y,L,G,Te,Ze,gt,Ot,sn,ci,Ji,xr,Hr,Do,Zo,Ko,ma,Rl,Cc,km,Rm,Pp){this.platform=r,this.splashScreen=u,this.statusBar=y,this.auth=L,this.router=G,this.translate=Te,this.loadingController=Ze,this.settingsService=gt,this.languageService=Ot,this.route=sn,this.siviTesterService=ci,this.modalCtrl=Ji,this.messagingController=xr,this.permissionsController=Hr,this.environmentService=Do,this.focusTrapper=Zo,this.meta=Ko,this.el=ma,this.loginProviders=Rl,this.municipalityService=Cc,this.storageService=km,this.applicationHealthService=Rm,this.pushNotificationsService=Pp,this.authenticated=!1,this.allowHierarchySideMenu=!1,this.allowSiviTester=!1,this.neverShowSiviTester=!1,this.menuSize="medium",this.showContent=!0,this.showMenu=!1,this.initializeApp()}ngAfterContentInit(){this.focusTrapper.initialize(this.app.el),this.municipalityService.isInitialized().pipe((0,HD.P)(r=>!!r),(0,ys.b)(()=>this.showMenu=!0),(0,Sv.q)(1)).subscribe(()=>{this.listenForApplicationHealth()}),this.settingsService.getSettings().pipe((0,Sv.q)(1)).subscribe(r=>{this.languageService.setInitialLanguage(r.language)}),this.auth.authenticatedNow().pipe((0,bs.h)(r=>!!r)).subscribe(r=>{this.settingsService.setMunicipalityId(r.municipalityId),this.languageService.setLanguageByLanguageCode(r.language)})}initializeApp(){this.municipalityService.initializeMunicipalityOptions(),this.storageService.getUserSession().subscribe(u=>{const y="Mobile"===u.userPersonData?.firstNames&&"Test"===u.userPersonData.lastName;this.environmentService.setForceTestEnvironment(y)}),this.platform.ready().then(()=>{this.platform.is("cordova")&&(this.splashScreen.hide(),this.statusBar.overlaysWebView(!1),this.statusBar.styleLightContent(),this.statusBar.backgroundColorByHexString("#466f81"))}),this.isSupportedBrowser(this.getCurrentUserAgent())?(this.listenForLoggingOut(),this.listenForAuthStateChanges(),this.listenForSiviTestTool(),this.listenForBackButton()):this.router.navigate(["/error/not-supported-browser"]);const r=this.environmentService.getEnvironment();r.sentry&&r.sentry.dsn&&Dx.S1({dsn:r.sentry.dsn,environment:r.environmentName,release:"sivi-ui@"+nM.i}),this.languageService.getUserLanguage().subscribe(u=>{this.updateDOMLangAttribute((0,my.Z)(u,"language","fi"))}),this.addMetaTags(r.environmentName)}updateDOMLangAttribute(r){try{this.el.nativeElement.parentElement.parentElement.setAttribute("lang",r)}catch(u){console.error("updateDOMLangAttribute failed",u)}}listenForBackButton(){var r=this;window.addEventListener("popstate",(0,ef.Z)(function*(){r.logoutIfGuardianHasNoMandatoryAgreementsSigned();const u=yield r.modalCtrl.getTop();u&&(yield u.dismiss())}))}logoutIfGuardianHasNoMandatoryAgreementsSigned(){var r=this;return(0,ef.Z)(function*(){if(!r.auth.isAuthenticated())return;const u=yield r.auth.areMandatoryAgreementsSigned().pipe((0,Sv.q)(1)).toPromise();r.auth.isGuardian()&&!u&&r.onLogout()})()}listenForLoggingOut(){this.auth.isLoggingOut$.subscribe(r=>{r?this.presentLoading():setTimeout(()=>{this.loadingController.dismiss()},1e3)})}listenForApplicationHealth(){(0,db.F)(3e5).pipe((0,tM.O)(0),(0,WC.w)(()=>this.applicationHealthService.getApplicationHealth().pipe((0,Z0.K)(u=>(console.error("Error:",u),this.applicationHealthService.setLastVisitedUrl(this.router.url),this.applicationHealthService.setIsHealthyApplication(!1),this.applicationHealthService.setApplicationHealtStatus(As.ApplicationHealthStatus.DOWN),this.router.navigate([As.ErrorPageRouter.UPDATING_SERVICE]),(0,X1.of)({status:As.ApplicationHealthStatus.DOWN})))))).subscribe(u=>{this.applicationHealthService.setApplicationHealtStatus(u.status),this.navigateBasedOnAppHealth(u)})}navigateBasedOnAppHealth(r){if(r.status!==As.ApplicationHealthStatus.UP)return console.error("Updating the system:",r),this.applicationHealthService.setLastVisitedUrl(this.router.url),this.applicationHealthService.setIsHealthyApplication(!1),void this.router.navigate([As.ErrorPageRouter.UPDATING_SERVICE]);r.status===As.ApplicationHealthStatus.UP&&!this.applicationHealthService.getIsHealthyApplication()&&(this.applicationHealthService.setIsHealthyApplication(!0),this.router.navigate([this.applicationHealthService.getLastVisitedUrl()]))}presentLoading(){var r=this;return(0,ef.Z)(function*(){yield(yield r.loadingController.create({message:r.translate.instant("General.Loading.Wait")})).present()})()}listenForAuthStateChanges(){this.auth.isAuthenticated$().subscribe(r=>{try{!1===r?(this.authenticated=!1,this.messagingController.userLoggedOut(),this.permissionsController.userLoggedOut(),this.clearHierarchyMenu()):!0===r&&this.userHasAuthenticatedOnAppStart()}catch(u){console.error("listenForAuthStateChanges auth state change failed",u)}})}userHasAuthenticatedOnAppStart(){var r=this;return(0,ef.Z)(function*(){r.authenticated=!0,r.allowHierarchySideMenu=r.auth.hasAnyRole(As.Permissions.OrganizationsHierarchy.CAN_ACCESS);const u=yield r.settingsService.getSettings().pipe((0,Sv.q)(1)).toPromise();u.selectedMunicipalityUrls?.municipalityUrl&&r.environmentService.setAPI(u.selectedMunicipalityUrls.municipalityUrl),r.messagingController.userLoggedIn(),r.permissionsController.initPermissions(),r.pushNotificationsService.tryEnablePushNotifications()})()}listenForSiviTestTool(){const r=this.siviTesterService.initialize();this.allowSiviTester=r,this.route.queryParams.subscribe(u=>{u.tester&&(this.allowSiviTester=!0,this.siviTesterService.enable())})}changeMenuSize(){const r=document.getElementById("right-menu-test-tool");r.style.minWidth=this.menuSize.toString()+"px",r.style.maxWidth=this.menuSize.toString()+"px"}preventSiviTester(){this.neverShowSiviTester=!0,this.siviTesterService.disable()}canShowSiviTestTool(){return this.allowSiviTester&&!this.neverShowSiviTester}isSupportedBrowser(r){return!/Trident\/|MSIE/.test(r)}getCurrentUserAgent(){return window.navigator.userAgent}addMetaTags(r){("prod"!==r||this.getDocumentLocationHref().includes("https://landing.cgivesa.fi"))&&this.meta.addTag({name:"robots",content:"noindex,nofollow"})}getDocumentLocationHref(){return document.location.href}openHierarchyMenu(){this.hierarchyMenu.menuWillOpen()}clearHierarchyMenu(){this.hierarchyMenu&&this.hierarchyMenu.clearData()}onLogout(){this.auth.logout(),this.showContent=!1,setTimeout(()=>{this.showContent=!0},1e3)}};let oE=_;_.\u0275fac=function(u){return new(u||_)(rt.Y36(nl.t4),rt.Y36(py),rt.Y36(pT),rt.Y36(mT.e),rt.Y36(vf.F0),rt.Y36(Ip.sK),rt.Y36(nl.HT),rt.Y36(Gu.sF),rt.Y36(Gu.TS),rt.Y36(vf.gz),rt.Y36(iM),rt.Y36(As.SiviModalController),rt.Y36(t0),rt.Y36(As.PermissionsController),rt.Y36(Gu.L$),rt.Y36(Gu.Ky),rt.Y36(o.h_),rt.Y36(rt.SBq),rt.Y36(Gu.Ek),rt.Y36(Gu.CI),rt.Y36(As.StorageService),rt.Y36(As.ApplicationHealthService),rt.Y36(l_))},_.\u0275cmp=rt.Xpm({type:_,selectors:[["sivi-app-root"]],viewQuery:function(u,y){if(1&u&&(rt.Gf(VS,7),rt.Gf(jD,7)),2&u){let L;rt.iGM(L=rt.CRH())&&(y.hierarchyMenu=L.first),rt.iGM(L=rt.CRH())&&(y.app=L.first)}},decls:7,vars:3,consts:[["app",""],["when","(min-width: 1280px)","contentId","main-content",4,"ngIf"],["side","end","id","right-menu-hierarchy","contentId","main-content","menuId","menu-right-side-hierarchy",3,"swipeGesture","disabled","ionWillOpen"],["hierarchyMenu",""],["when","(min-width: 1280px)","contentId","main-content"],["menuId","main-navigation-menu","contentId","main-content",1,"left-navigation","no-print",3,"disabled"],[3,"logout",4,"ngIf"],["id","main-content"],["side","end","contentId","main-content","id","right-menu-test-tool",1,"right-navigation","text-white",3,"disabled"],[3,"explicitClose",4,"ngIf"],[1,"footer"],[1,"size-slider"],[1,"text-white"],["debounce","10","color","secondary","min","350","max","750",3,"ngModel","ngModelChange","ionChange"],[3,"logout"],[3,"explicitClose"]],template:function(u,y){1&u&&(rt.TgZ(0,"ion-app",null,0),rt.YNc(2,Rx,11,5,"ion-split-pane",1),rt.TgZ(3,"ion-menu",2),rt.NdJ("ionWillOpen",function(){return y.openHierarchyMenu()}),rt._UZ(4,"sivi-organizations-organizations-hierarchy",null,3),rt.qZA(),rt._UZ(6,"cgi-library-version"),rt.qZA()),2&u&&(rt.xp6(2),rt.Q6J("ngIf",y.showContent),rt.xp6(1),rt.Q6J("swipeGesture",!1)("disabled",!y.authenticated||!y.allowHierarchySideMenu))},dependencies:[vd.O5,nl.dr,nl.Ie,nl.Q$,nl.z0,nl.I_,nl.jI,nl.QI,nl.jP,pM.JJ,pM.On,mb,n0,PT.OrganizationsHierarchyComponent],styles:["[_nghost-%COMP%]{--ion-toolbar-background-color: var(--ion-color-primary);--ion-toolbar-text-color: var(--ion-color-primary-contrast)}ion-split-pane[_ngcontent-%COMP%]{--border: none}.left-navigation[_ngcontent-%COMP%]{--ion-background-color: #f8fafb;--menu-max-width: calc( 100vw / 12 * var(--menu-width-fractions) );--menu-min-width: calc( 960px / 12 * var(--menu-width-fractions) );--menu-width: calc( 100 / 12 * var(--menu-width-fractions) * 1vw );--menu-width-fractions: 3}.split-pane-md.split-pane-visible[_ngcontent-%COMP%] > .split-pane-side[_ngcontent-%COMP%]{max-width:var(--menu-max-width);min-width:var(--menu-min-width);width:var(--menu-width)}@media screen and (min-width: 1264px){.left-navigation[_ngcontent-%COMP%]{--menu-width-fractions: 2}}#right-menu-hierarchy[_ngcontent-%COMP%]{--menu-max-width: calc( 100vw / 12 * var(--menu-width-fractions) );--menu-width: calc( 100vw / 12 * var(--menu-width-fractions) );--menu-width-fractions: 11;--width: var(--menu-width);--max-width: var(--menu-max-width);--min-width: var(--menu-min-width)}@media screen and (min-width: 480px){#right-menu-hierarchy[_ngcontent-%COMP%]{--menu-width-fractions: 10}}@media screen and (min-width: 600px){#right-menu-hierarchy[_ngcontent-%COMP%]{--menu-width-fractions: 9}}@media screen and (min-width: 960px){#right-menu-hierarchy[_ngcontent-%COMP%]{--menu-width-fractions: 6}}@media screen and (min-width: 1264px){#right-menu-hierarchy[_ngcontent-%COMP%]{--menu-width-fractions: 4}}#right-menu-test-tool[_ngcontent-%COMP%]{--ion-background-color: rgb(42, 124, 206);--menu-max-width: calc( 100vw / 8 * var(--menu-width-fractions) );--menu-min-width: calc( 960px / 8 * var(--menu-width-fractions) );--menu-width: calc( 100 / 8 * var(--menu-width-fractions) * 1vw );--menu-width-fractions: 3;color:#fff}sivi-tester[_ngcontent-%COMP%]{overflow-y:auto;padding-bottom:60px}.text-white[_ngcontent-%COMP%]{color:#fff}.size-slider[_ngcontent-%COMP%]{width:350px;position:absolute;bottom:0;right:0;background:rgba(42,124,206,.6117647059)}@media screen and (min-width: 1264px){.right-navigation[_ngcontent-%COMP%]{--menu-width-fractions: 2}}"]});var fb=p(19227);const KD=[{path:"",redirectTo:"landing",pathMatch:"full"},{path:"landing",loadChildren:()=>p.e(3885).then(p.bind(p,43885)).then(b=>b.LandingPageModule),canActivate:[oc.JR]},{path:"info/:pageId",loadChildren:()=>p.e(1139).then(p.bind(p,11139)).then(b=>b.InfoPageModule)},{path:"login",loadChildren:()=>Promise.resolve().then(p.bind(p,61887)).then(b=>b.LoginPageModule),data:{preload:!0}},{path:"home",loadChildren:()=>Promise.all([p.e(8592),p.e(5745)]).then(p.bind(p,25745)).then(b=>b.HomePageModule),data:{preload:!0}},{path:"user",loadChildren:()=>Promise.all([p.e(8592),p.e(9321)]).then(p.bind(p,99321)).then(b=>b.UserModule)},{path:"municipalities/:municipalityId/organizations/:organizationId",loadChildren:()=>p.e(308).then(p.bind(p,60308)).then(b=>b.OrganizationPageModule)},{path:"municipalities/:municipalityId/guardian/:guardianId",loadChildren:()=>Promise.all([p.e(6947),p.e(9921)]).then(p.bind(p,39921)).then(b=>b.GuardianModule)},{path:"municipalities/:municipalityId/children/:childId",loadChildren:()=>Promise.all([p.e(6947),p.e(9921),p.e(2531),p.e(8592),p.e(5688)]).then(p.bind(p,45688)).then(b=>b.ChildPageModule),data:{roles:oc.Pl.Child.CAN_SEE_CHILD_PAGE},canActivate:[oc.pb]},{path:"municipalities/:municipalityId/guardians-and-children",loadChildren:()=>Promise.all([p.e(6947),p.e(9921),p.e(2368),p.e(2596)]).then(p.bind(p,42596)).then(b=>b.GuardiansAndChildrenPageModule),data:{roles:oc.Pl.Menu.CAN_ACESSS_GUARDIANS_AND_CHILDREN},canActivate:[oc.pb]},{path:"municipalities/:municipalityId/staff/:staffId",loadChildren:()=>Promise.resolve().then(p.bind(p,10516)).then(b=>b.StaffPageModule),data:{roles:oc.Pl.StaffMember.CAN_ACCESS_STAFF_BASIC_INFO},canActivate:[oc.pb]},{path:"municipalities/:municipalityId/municipality-settings",loadChildren:()=>Promise.resolve().then(p.bind(p,44438)).then(b=>b.MunicipalitySettingsPageModule),data:{roles:oc.Pl.Menu.CAN_ACCESS_MUNICIPALITY_SETTINGS},canActivate:[oc.pb]},{path:oc.vD.APPLICATIONS_MANAGEMENT,loadChildren:()=>p.e(4017).then(p.bind(p,24017)).then(b=>b.ApplicationsManagementPageModule)},{path:"attendance",loadChildren:()=>p.e(3755).then(p.bind(p,23755)).then(b=>b.AttendancePageModule),data:{roles:oc.Pl.Attendance.CAN_ACCESS},canActivate:[oc.pb]},{path:"fee-handling",loadChildren:()=>Promise.all([p.e(6947),p.e(8967)]).then(p.bind(p,58967)).then(b=>b.FeeHandlingModule),data:{roles:oc.Pl.Menu.CAN_ACCESS_FEES},canActivate:[oc.pb]},{path:"invoicing",loadChildren:()=>p.e(4143).then(p.bind(p,84143)).then(b=>b.InvoicingModule),data:{roles:oc.Pl.Menu.CAN_ACCESS_INVOICING},canActivate:[oc.pb]},{path:"reports",loadChildren:()=>p.e(2619).then(p.bind(p,22619)).then(b=>b.ReportsModule),data:{roles:oc.Pl.Menu.CAN_ACCESS_REPORTS},canActivate:[oc.pb]},{path:"other-decisions",loadChildren:()=>p.e(2531).then(p.bind(p,32531)).then(b=>b.OtherDecisionsModule),data:{roles:oc.Pl.Menu.CAN_ACCESS_OTHER_DECISIONS},canActivate:[oc.pb]},{path:"group-home/:groupId",loadChildren:()=>p.e(5057).then(p.bind(p,55057)).then(b=>b.GroupHomeModule),data:{roles:fb.MessagingPermissions.Messaging.CAN_NAVIGATE_GROUP_PAGE_MESSAGES},canActivate:[oc.pb]},{path:"error/not-supported-browser",loadChildren:()=>Promise.resolve().then(p.bind(p,88692)).then(b=>b.NotSupportedBrowserPage)},{path:"error/:errorCode",loadChildren:()=>Promise.resolve().then(p.bind(p,88692)).then(b=>b.ErrorPageModule)},{path:"**",redirectTo:"/error/not-found"}];class gM{preload(r,u){return r.data&&r.data.preload?u():(0,X1.of)(null)}}const A=class{};let OT=A;A.\u0275fac=function(u){return new(u||A)},A.\u0275mod=rt.oAB({type:A}),A.\u0275inj=rt.cJS({providers:[gM,Gu.Ky],imports:[vf.Bz.forRoot(KD,{preloadingStrategy:gM}),vf.Bz]});const z=class{};let LT=z;z.\u0275fac=function(u){return new(u||z)},z.\u0275mod=rt.oAB({type:z}),z.\u0275inj=rt.cJS({imports:[nl.Pc,vd.ez,nl.Pc,vd.ez,pM.u5]});var _M=p(31534);function Y_(b,r,u,y){return new(u||(u=Promise))(function(G,Te){function Ze(sn){try{Ot(y.next(sn))}catch(ci){Te(ci)}}function gt(sn){try{Ot(y.throw(sn))}catch(ci){Te(ci)}}function Ot(sn){sn.done?G(sn.value):function L(G){return G instanceof u?G:new u(function(Te){Te(G)})}(sn.value).then(Ze,gt)}Ot((y=y.apply(b,r||[])).next())})}var qD,Zx=p(90849);const Gx=new rt.OlP("STORAGE_CONFIG_TOKEN");class q0 extends Zx.K{constructor(){super()}create(){return Y_(this,void 0,void 0,function*(){return this})}defineDriver(){return Y_(this,void 0,void 0,function*(){})}get driver(){return"noop"}get(r){return Y_(this,void 0,void 0,function*(){return null})}set(r,u){return Y_(this,void 0,void 0,function*(){})}remove(r){return Y_(this,void 0,void 0,function*(){})}clear(){return Y_(this,void 0,void 0,function*(){})}length(){return Y_(this,void 0,void 0,function*(){return 0})}keys(){return Y_(this,void 0,void 0,function*(){return[]})}forEach(r){return Y_(this,void 0,void 0,function*(){})}setEncryptionKey(r){}}function Wx(b){return(0,vd.PM)(this.platformId)?new q0:new Zx.K(b)}let X0=qD=class{static forRoot(r=null){return{ngModule:qD,providers:[{provide:Gx,useValue:r},{provide:Zx.K,useFactory:Wx,deps:[Gx]}]}}};X0.\u0275fac=function(r){return new(r||X0)},X0.\u0275mod=rt.oAB({type:X0}),X0.\u0275inj=rt.cJS({});var $x=p(9646),QS=p(78903);const K=class{};let vM=K;K.\u0275fac=function(u){return new(u||K)},K.\u0275mod=rt.oAB({type:K}),K.\u0275inj=rt.cJS({providers:[kx.h,AT.f,QS.d],imports:[As.SiviCoreComponentModule,iE.VI.forChild(),As.PipesModule]});var jx=p(31111);const fe=class extends o.hm{buildHammer(r){const u=new window.Hammer(r);for(const y in this.overrides)y&&u.get(y).set(this.overrides[y]);return u}};let eC=fe;fe.\u0275fac=function(){let r;return function(y){return(r||(r=rt.n5z(fe)))(y||fe)}}(),fe.\u0275prov=rt.Yz7({token:fe,factory:fe.\u0275fac});var yM=p(36355),iw=p(90999);const Re=class{};let aE=Re;Re.\u0275fac=function(u){return new(u||Re)},Re.\u0275mod=rt.oAB({type:Re}),Re.\u0275inj=rt.cJS({providers:[W0,bT,sM,As.SiviModalController],imports:[nl.Pc,vd.ez,Ip.aw,yM.y,iw.E,As.SiviCorePageModule,As.PipesModule]});var XD=p(63834);const hb=void 0;const qS=["fi",[["ap.","ip."],hb,hb],hb,[["S","M","T","K","T","P","L"],["su","ma","ti","ke","to","pe","la"],["sunnuntaina","maanantaina","tiistaina","keskiviikkona","torstaina","perjantaina","lauantaina"],["su","ma","ti","ke","to","pe","la"]],[["S","M","T","K","T","P","L"],["su","ma","ti","ke","to","pe","la"],["sunnuntai","maanantai","tiistai","keskiviikko","torstai","perjantai","lauantai"],["su","ma","ti","ke","to","pe","la"]],[["T","H","M","H","T","K","H","E","S","L","M","J"],["tammik.","helmik.","maalisk.","huhtik.","toukok.","kes\xe4k.","hein\xe4k.","elok.","syysk.","lokak.","marrask.","jouluk."],["tammikuuta","helmikuuta","maaliskuuta","huhtikuuta","toukokuuta","kes\xe4kuuta","hein\xe4kuuta","elokuuta","syyskuuta","lokakuuta","marraskuuta","joulukuuta"]],[["T","H","M","H","T","K","H","E","S","L","M","J"],["tammi","helmi","maalis","huhti","touko","kes\xe4","hein\xe4","elo","syys","loka","marras","joulu"],["tammikuu","helmikuu","maaliskuu","huhtikuu","toukokuu","kes\xe4kuu","hein\xe4kuu","elokuu","syyskuu","lokakuu","marraskuu","joulukuu"]],[["eKr","jKr"],["eKr.","jKr."],["ennen Kristuksen syntym\xe4\xe4","j\xe4lkeen Kristuksen syntym\xe4n"]],1,[6,0],["d.M.y",hb,"d. MMMM y","cccc d. MMMM y"],["H.mm","H.mm.ss","H.mm.ss z","H.mm.ss zzzz"],["{1} {0}","{1} 'klo' {0}",hb,hb],[",","\xa0",";","%","+","\u2212","E","\xd7","\u2030","\u221e","ep\xe4luku","."],["#,##0.###","#,##0\xa0%","#,##0.00\xa0\xa4","#E0"],"EUR","\u20ac","euro",{AOA:[],ARS:[],AUD:[],BAM:[],BBD:[],BDT:[],BMD:[],BND:[],BOB:[],BRL:[],BSD:[],BWP:[],BZD:[],CAD:[],CLP:[],CNY:[],COP:[],CRC:[],CUC:[],CUP:[],CZK:[],DKK:[],DOP:[],EGP:[],ESP:[],FIM:["mk"],FJD:[],FKP:[],GEL:[],GIP:[],GNF:[],GTQ:[],GYD:[],HKD:[],HNL:[],HRK:[],HUF:[],IDR:[],ILS:[],INR:[],ISK:[],JMD:[],KHR:[],KMF:[],KPW:[],KRW:[],KYD:[],KZT:[],LAK:[],LBP:[],LKR:[],LRD:[],LTL:[],LVL:[],MGA:[],MMK:[],MNT:[],MUR:[],MXN:[],MYR:[],NAD:[],NGN:[],NIO:[],NOK:[],NPR:[],NZD:[],PHP:[],PKR:[],PLN:[],PYG:[],RON:[],RWF:[],SBD:[],SEK:[],SGD:[],SHP:[],SRD:[],SSP:[],STN:[hb,"STD"],SYP:[],THB:[],TOP:[],TRY:[],TTD:[],TWD:[],UAH:[],UYU:[],VEF:[],VND:[],XCD:[],XPF:[],XXX:[],ZAR:[],ZMW:[]},"ltr",function eS(b){const u=Math.floor(Math.abs(b)),y=b.toString().replace(/^[^.]*\.?/,"").length;return 1===u&&0===y?1:5}],tf=void 0;const nS=["sv",[["fm","em"],tf,tf],[["fm","em"],["f.m.","e.m."],["f\xf6rmiddag","eftermiddag"]],[["S","M","T","O","T","F","L"],["s\xf6n","m\xe5n","tis","ons","tors","fre","l\xf6r"],["s\xf6ndag","m\xe5ndag","tisdag","onsdag","torsdag","fredag","l\xf6rdag"],["s\xf6","m\xe5","ti","on","to","fr","l\xf6"]],tf,[["J","F","M","A","M","J","J","A","S","O","N","D"],["jan.","feb.","mars","apr.","maj","juni","juli","aug.","sep.","okt.","nov.","dec."],["januari","februari","mars","april","maj","juni","juli","augusti","september","oktober","november","december"]],tf,[["f.Kr.","e.Kr."],tf,["f\xf6re Kristus","efter Kristus"]],1,[6,0],["y-MM-dd","d MMM y","d MMMM y","EEEE d MMMM y"],["HH:mm","HH:mm:ss","HH:mm:ss z","HH:mm:ss zzzz"],["{1} {0}",tf,tf,tf],[",","\xa0",";","%","+","\u2212","\xd710^","\xd7","\u2030","\u221e","NaN",":"],["#,##0.###","#,##0\xa0%","#,##0.00\xa0\xa4","#E0"],"SEK","kr","svensk krona",{AUD:[tf,"$"],BBD:["Bds$","$"],BMD:["BM$","$"],BRL:["BR$","R$"],BSD:["BS$","$"],BYN:[tf,"\u0440."],BZD:["BZ$","$"],CNY:[tf,"\xa5"],DKK:["Dkr","kr"],DOP:["RD$","$"],EEK:["Ekr"],EGP:["EG\xa3","E\xa3"],ESP:[],GBP:[tf,"\xa3"],HKD:[tf,"$"],IEP:["IE\xa3"],INR:[tf,"\u20b9"],ISK:["Ikr","kr"],JMD:["JM$","$"],JPY:[tf,"\xa5"],KRW:[tf,"\u20a9"],NOK:["Nkr","kr"],NZD:[tf,"$"],PHP:[tf,"\u20b1"],RON:[tf,"L"],SEK:["kr"],TWD:[tf,"NT$"],USD:["US$","$"],VND:[tf,"\u20ab"]},"ltr",function tS(b){const u=Math.floor(Math.abs(b)),y=b.toString().replace(/^[^.]*\.?/,"").length;return 1===u&&0===y?1:5}];var Kx=p(69606),XS=p(24467),Jx=p(10266),RT=p(59549),_y=p(61887);const lt=class{};let FT=lt;function NT(b){return new GC.w(b,"/assets/i18n/",".json?cb="+(new Date).getTime())}function H_(b){return()=>b.loadSettings()}lt.\u0275fac=function(u){return new(u||lt)},lt.\u0275mod=rt.oAB({type:lt}),lt.\u0275inj=rt.cJS({providers:[Fu,l_,rp],imports:[nl.Pc,vd.ez]}),(0,vd.qS)(qS,"fi"),(0,vd.qS)(nS,"sv");const vt=class{};let Lm=vt;vt.\u0275fac=function(u){return new(u||vt)},vt.\u0275mod=rt.oAB({type:vt,bootstrap:[oE]}),vt.\u0275inj=rt.cJS({providers:[pT,py,Gu.V1,As.LanguageService,{provide:rt.qLn,useClass:As.SiviErrorHandler},{provide:dy.TP,useClass:As.HealthCheckInterceptor,multi:!0},{provide:rt.ip1,useFactory:H_,deps:[Gu.V1],multi:!0},{provide:vf.wN,useClass:nl.r4},V0.x0,eM.A,jx.$,_M.b,XD.u,$x.V1,As.PermissionsController,{provide:o.ok,useClass:eC},{provide:Jx.Jm,useValue:{showDelay:250,hideDelay:0,touchGestures:"off"}},{provide:RT.o2,useValue:{subscriptSizing:"dynamic"}},As.ApplicationHealthService,As.MessagingService,As.SiviModalController],imports:[o.b2,Xb,dy.JF,Ip.aw.forRoot({loader:{provide:Ip.Zw,useFactory:NT,deps:[dy.eN]}}),nl.Pc.forRoot({mode:"md",spinner:"crescent"}),OT,LT,As.SiviCoreComponentModule,vM,iE.VI.forRoot(),X0.forRoot(),As.SiviLibraryModule.forRoot({AuthService:Gu.e8},{TranslateService:Ip.sK},{AbstractRestService:_T.i},{EnvironmentService:Gu.L$},{AppStateService:Gu.ZQ}),As.DirectivesModule,yM.y,aE,Kx.$l.forRoot([]),XS.ns.forRoot(),_y.LoginPageModule,PT.OrganizationsHierarchyModule,FT]});var tC=p(92340);tC.N.production&&(0,rt.G48)(),console.log("[sivi-ui] version: ",nM.i),!tC.N.environmentName.includes("dev")&&!tC.N.environmentName.includes("sit")&&(window.console.log=function(){}),console.log("CGI Vesa env",tC.N),o.q6().bootstrapModule(Lm).catch(b=>console.log(b)),function ey(){var b=[];if(typeof window<"u"){let u=function(){try{var y=new URL("b","http://a");return y.pathname="c%20d","http://a/c%20d"===y.href&&y.searchParams}catch{return!1}};var r=window;(!r.customElements||r.Element&&(!r.Element.prototype.closest||!r.Element.prototype.matches||!r.Element.prototype.remove||!r.Element.prototype.getRootNode))&&b.push(p.e(6748).then(p.t.bind(p,15083,23))),("function"!=typeof Object.assign||!Object.entries||!Array.prototype.find||!Array.prototype.includes||!String.prototype.startsWith||!String.prototype.endsWith||r.NodeList&&!r.NodeList.prototype.forEach||!r.fetch||!u()||typeof WeakMap>"u")&&b.push(p.e(2214).then(p.t.bind(p,1953,23)))}return Promise.all(b)}().then(()=>{zM(window)})},64837:(qe,I,p)=>{"use strict";p.d(I,{i:()=>o});const o="4.3.0-98"},24467:(qe,I,p)=>{"use strict";p.d(I,{ns:()=>P});var o=p(94650),e=p(69606),l=p(70262),D=p(18505);const g=new o.OlP("NGXS_DEVTOOLS_OPTIONS");class E{constructor(B,Y,V){this._options=B,this._injector=Y,this._ngZone=V,this.devtoolsExtension=null,this.globalDevtools=o.dqk.__REDUX_DEVTOOLS_EXTENSION__||o.dqk.devToolsExtension,this.unsubscribe=null,this.connect()}ngOnDestroy(){null!==this.unsubscribe&&this.unsubscribe(),this.globalDevtools&&this.globalDevtools.disconnect()}get store(){return this._injector.get(e.yh)}handle(B,Y,V){return!this.devtoolsExtension||this._options.disabled?V(B,Y):V(B,Y).pipe((0,l.K)(ue=>{const he=this.store.snapshot();throw this.sendToDevTools(B,Y,he),ue}),(0,D.b)(ue=>{this.sendToDevTools(B,Y,ue)}))}sendToDevTools(B,Y,V){const ue=(0,e.f4)(Y);"@@INIT"===ue?this.devtoolsExtension.init(B):this.devtoolsExtension.send(Object.assign(Object.assign({},Y),{action:null,type:ue}),V)}dispatched(B){if("DISPATCH"===B.type){if("JUMP_TO_ACTION"===B.payload.type||"JUMP_TO_STATE"===B.payload.type){const Y=JSON.parse(B.state);Y.router&&Y.router.trigger&&(Y.router.trigger="devtools"),this.store.reset(Y)}else if("TOGGLE_ACTION"===B.payload.type)console.warn("Skip is not supported at this time.");else if("IMPORT_STATE"===B.payload.type){const{actionsById:Y,computedStates:V,currentStateIndex:ue}=B.payload.nextLiftedState;this.devtoolsExtension.init(V[0].state),Object.keys(Y).filter(he=>"0"!==he).forEach(he=>this.devtoolsExtension.send(Y[he],V[he].state)),this.store.reset(V[ue].state)}}else if("ACTION"===B.type){const Y=JSON.parse(B.payload);this.store.dispatch(Y)}}connect(){!this.globalDevtools||this._options.disabled||(this.devtoolsExtension=this._ngZone.runOutsideAngular(()=>this.globalDevtools.connect(this._options)),this.unsubscribe=this.devtoolsExtension.subscribe(B=>{("DISPATCH"===B.type||"ACTION"===B.type)&&this._ngZone.run(()=>{this.dispatched(B)})}))}}function T(w){return Object.assign({name:"NGXS"},w)}E.\u0275fac=function(B){return new(B||E)(o.LFG(g),o.LFG(o.zs3),o.LFG(o.R0b))},E.\u0275prov=o.Yz7({token:E,factory:E.\u0275fac});const n=new o.OlP("USER_OPTIONS");class P{static forRoot(B){return{ngModule:P,providers:[{provide:e.fN,useClass:E,multi:!0},{provide:n,useValue:B},{provide:g,useFactory:T,deps:[n]}]}}}P.\u0275fac=function(B){return new(B||P)},P.\u0275mod=o.oAB({type:P}),P.\u0275inj=o.cJS({})},59947:(qe,I,p)=>{"use strict";function l(he){return"function"==typeof he}function g(he){return"function"==typeof he}function E(he){return"number"==typeof he}function T(he){return Number.isNaN(he)||-1===he}function Y(he){return function(X){let ve=null;for(const ye in he){const ge=he[ye],ne=X?.[ye],pe=l(ge)?ge(ne):ge;pe!==ne&&(ve||(ve=Object.assign({},X)),ve[ye]=pe)}return ve||X}}function V(he,ae){return function(ve){let ye=-1;if(g(he)?ye=ve.findIndex(he):E(he)&&(ye=he),T(ye))return ve;let ge=null;const ne=ae;if(ge=l(ne)?ne(ve[ye]):ne,ge===ve[ye])return ve;const pe=ve.slice();return pe[ye]=ge,pe}}function ue(he){return function(X){let ve=-1;if(g(he)?ve=X.findIndex(he):E(he)&&(ve=he),T(ve))return X;const ye=X.slice();return ye.splice(ve,1),ye}}p.d(I,{$G:()=>V,cl:()=>ue,mQ:()=>l,r$:()=>Y})},69606:(qe,I,p)=>{"use strict";p.d(I,{aU:()=>Uo,fN:()=>je,$l:()=>Oa,Qf:()=>wa,ZM:()=>rl,yh:()=>er,f4:()=>nt,jC:()=>to,gr:()=>Si});var o=p(94650),e=p(4707);class l{constructor(){this.bootstrap$=new e.t(1)}get appBootstrapped$(){return this.bootstrap$.asObservable()}bootstrap(){this.bootstrap$.next(!0),this.bootstrap$.complete()}}function D(Jn,tn){return Jn===tn}function E(Jn,tn=D){let ti=null,_i=null;function ar(){return function g(Jn,tn,ti){if(null===tn||null===ti||tn.length!==ti.length)return!1;const _i=tn.length;for(let ar=0;ar<_i;ar++)if(!Jn(tn[ar],ti[ar]))return!1;return!0}(tn,ti,arguments)||(_i=Jn.apply(null,arguments)),ti=arguments,_i}return ar.reset=function(){ti=null,_i=null},ar}l.\u0275fac=function(tn){return new(tn||l)},l.\u0275prov=o.Yz7({token:l,factory:l.\u0275fac,providedIn:"root"});class T{static set(tn){this._value=tn}static pop(){const tn=this._value;return this._value={},tn}}T._value={};const n=new o.OlP("INITIAL_STATE_TOKEN",{providedIn:"root",factory:()=>T.pop()}),P=new o.OlP("\u0275NGXS_STATE_FACTORY"),w=new o.OlP("\u0275NGXS_STATE_CONTEXT_FACTORY");var B=p(36895),Y=p(69751),V=p(77579),ue=p(61135),he=p(39646),ae=p(4128),X=p(62843),ve=p(60515),ye=p(32076),ge=p(45191),ne=p(39300),pe=p(54004),Pe=p(13099),xe=p(34782),de=p(95698),re=p(36129),oe=p(95577),me=p(46590),be=p(70262),le=p(82722),Z=p(71884),Oe=p(18505),j=p(68675),ke=p(11520),Be=p(59947);function nt(Jn){return Jn.constructor&&Jn.constructor.type?Jn.constructor.type:Jn.type}const ut=(Jn,tn,ti)=>{Jn=Object.assign({},Jn);const _i=tn.split("."),ar=_i.length-1;return _i.reduce((vr,Qr,Li)=>(vr[Qr]=Li===ar?ti:Array.isArray(vr[Qr])?vr[Qr].slice():Object.assign({},vr[Qr]),vr&&vr[Qr]),Jn),Jn},Ve=(Jn,tn)=>tn.split(".").reduce((ti,_i)=>ti&&ti[_i],Jn),tt=Jn=>Jn&&"object"==typeof Jn&&!Array.isArray(Jn),Ne=(Jn,...tn)=>{if(!tn.length)return Jn;const ti=tn.shift();if(tt(Jn)&&tt(ti))for(const _i in ti)tt(ti[_i])?(Jn[_i]||Object.assign(Jn,{[_i]:{}}),Ne(Jn[_i],ti[_i])):Object.assign(Jn,{[_i]:ti[_i]});return Ne(Jn,...tn)};class mi{constructor(tn,ti){this._ngZone=tn,this._platformId=ti}enter(tn){return(0,B.PM)(this._platformId)?this.runInsideAngular(tn):this.runOutsideAngular(tn)}leave(tn){return this.runInsideAngular(tn)}runInsideAngular(tn){return o.R0b.isInAngularZone()?tn():this._ngZone.run(tn)}runOutsideAngular(tn){return o.R0b.isInAngularZone()?this._ngZone.runOutsideAngular(tn):tn()}}mi.\u0275fac=function(tn){return new(tn||mi)(o.LFG(o.R0b),o.LFG(o.Lbi))},mi.\u0275prov=o.Yz7({token:mi,factory:mi.\u0275fac,providedIn:"root"});const Bn=new o.OlP("ROOT_OPTIONS"),kn=new o.OlP("ROOT_STATE_TOKEN"),On=new o.OlP("FEATURE_STATE_TOKEN"),je=new o.OlP("NGXS_PLUGINS"),Bt="NGXS_META",xn="NGXS_OPTIONS_META",Fn="NGXS_SELECTOR_META";class ui{constructor(){this.defaultsState={},this.selectorOptions={injectContainerState:!0,suppressErrors:!0},this.compatibility={strictContentSecurityPolicy:!1},this.executionStrategy=mi}}ui.\u0275fac=function(tn){return new(tn||ui)},ui.\u0275prov=o.Yz7({token:ui,factory:function(tn){let ti=null;return tn?ti=new tn:(_i=o.LFG(Bn),ti=Ne(new ui,_i)),ti;var _i},providedIn:"root"});class Ai{constructor(tn,ti,_i){this.previousValue=tn,this.currentValue=ti,this.firstChange=_i}}class si{enter(tn){return tn()}leave(tn){return tn()}}si.\u0275fac=function(tn){return new(tn||si)},si.\u0275prov=o.Yz7({token:si,factory:si.\u0275fac,providedIn:"root"});const Vi=new o.OlP("USER_PROVIDED_NGXS_EXECUTION_STRATEGY"),Vn=new o.OlP("NGXS_EXECUTION_STRATEGY",{providedIn:"root",factory:()=>{const Jn=(0,o.f3M)(o.gxx),tn=Jn.get(Vi);return tn?Jn.get(tn):Jn.get(typeof o.dqk.Zone<"u"?mi:si)}});function Hn(Jn){if(!Jn.hasOwnProperty(Bt)){const tn={name:null,actions:{},defaults:{},path:null,makeRootSelector:ti=>ti.getStateGetter(tn.name),children:[]};Object.defineProperty(Jn,Bt,{value:tn})}return An(Jn)}function An(Jn){return Jn[Bt]}function vn(Jn){return Jn.hasOwnProperty(Fn)||Object.defineProperty(Jn,Fn,{value:{makeRootSelector:null,originalFn:null,containerClass:null,selectorName:null,getSelectorOptions:()=>({})}}),In(Jn)}function In(Jn){return Jn[Fn]}function Hi(Jn,tn){return tn&&tn.compatibility&&tn.compatibility.strictContentSecurityPolicy?function Zi(Jn){const tn=Jn.slice();return ti=>tn.reduce((_i,ar)=>_i&&_i[ar],ti)}(Jn):function gr(Jn){const tn=Jn;let ti="store."+tn[0],_i=0;const ar=tn.length;let vr=ti;for(;++_i<ar;)vr=vr+" && "+(ti=ti+"."+tn[_i]);return new Function("store","return "+vr+";")}(Jn)}function Yt(...Jn){return Sn(Jn,["DISPATCHED"])}function Sn(Jn,tn,ti=ai){const _i=function hn(Jn){return Jn.reduce((tn,ti)=>(tn[nt(ti)]=!0,tn),{})}(Jn),ar=tn&&function Le(Jn){return Jn.reduce((tn,ti)=>(tn[ti]=!0,tn),{})}(tn);return function(vr){return vr.pipe(function Pn(Jn,tn){return(0,ne.h)(ti=>{const _i=nt(ti.action),ar=Jn[_i],vr=!tn||tn[ti.status];return ar&&vr})}(_i,ar),ti())}}function ai(){return(0,pe.U)(Jn=>Jn.action)}function ce(Jn){return tn=>new Y.y(ti=>tn.subscribe({next(_i){Jn.leave(()=>ti.next(_i))},error(_i){Jn.leave(()=>ti.error(_i))},complete(){Jn.leave(()=>ti.complete())}}))}class we{constructor(tn){this._executionStrategy=tn}enter(tn){return this._executionStrategy.enter(tn)}leave(tn){return this._executionStrategy.leave(tn)}}function Qe(Jn){const tn=[];let ti=!1;return function(...ar){if(ti)tn.unshift(ar);else{for(ti=!0,Jn(...ar);tn.length>0;){const vr=tn.pop();vr&&Jn(...vr)}ti=!1}}}we.\u0275fac=function(tn){return new(tn||we)(o.LFG(Vn))},we.\u0275prov=o.Yz7({token:we,factory:we.\u0275fac,providedIn:"root"});class qt extends V.x{constructor(){super(...arguments),this._orderedNext=Qe(tn=>super.next(tn))}next(tn){this._orderedNext(tn)}}class Tn extends ue.X{constructor(tn){super(tn),this._orderedNext=Qe(ti=>super.next(ti)),this._currentValue=tn}getValue(){return this._currentValue}next(tn){this._currentValue=tn,this._orderedNext(tn)}}class lr extends qt{ngOnDestroy(){this.complete()}}lr.\u0275fac=function(){let Jn;return function(ti){return(Jn||(Jn=o.n5z(lr)))(ti||lr)}}(),lr.\u0275prov=o.Yz7({token:lr,factory:lr.\u0275fac,providedIn:"root"});class mo extends Y.y{constructor(tn,ti){const _i=tn.pipe(ce(ti),(0,Pe.B)());super(ar=>{const vr=_i.subscribe({next:Qr=>ar.next(Qr),error:Qr=>ar.error(Qr),complete:()=>ar.complete()});ar.add(vr)})}}mo.\u0275fac=function(tn){return new(tn||mo)(o.LFG(lr),o.LFG(we))},mo.\u0275prov=o.Yz7({token:mo,factory:mo.\u0275fac,providedIn:"root"});const rr=Jn=>(...tn)=>Jn.shift()(...tn,(..._i)=>rr(Jn)(..._i));class ea{constructor(tn){this._injector=tn,this._errorHandler=null}reportErrorSafely(tn){null===this._errorHandler&&(this._errorHandler=this._injector.get(o.qLn));try{this._errorHandler.handleError(tn)}catch{}}}ea.\u0275fac=function(tn){return new(tn||ea)(o.LFG(o.zs3))},ea.\u0275prov=o.Yz7({token:ea,factory:ea.\u0275fac,providedIn:"root"});class Bo extends Tn{constructor(){super({})}ngOnDestroy(){this.complete()}}Bo.\u0275fac=function(tn){return new(tn||Bo)},Bo.\u0275prov=o.Yz7({token:Bo,factory:Bo.\u0275fac,providedIn:"root"});class Ii{constructor(tn,ti){this._parentManager=tn,this._pluginHandlers=ti,this.plugins=[],this.registerHandlers()}get rootPlugins(){return this._parentManager&&this._parentManager.plugins||this.plugins}registerHandlers(){const tn=this.getPluginHandlers();this.rootPlugins.push(...tn)}getPluginHandlers(){return(this._pluginHandlers||[]).map(ti=>ti.handle?ti.handle.bind(ti):ti)}}Ii.\u0275fac=function(tn){return new(tn||Ii)(o.LFG(Ii,12),o.LFG(je,8))},Ii.\u0275prov=o.Yz7({token:Ii,factory:Ii.\u0275fac});class an extends V.x{}an.\u0275fac=function(){let Jn;return function(ti){return(Jn||(Jn=o.n5z(an)))(ti||an)}}(),an.\u0275prov=o.Yz7({token:an,factory:an.\u0275fac,providedIn:"root"});class Zn{constructor(tn,ti,_i,ar,vr,Qr){this._actions=tn,this._actionResults=ti,this._pluginManager=_i,this._stateStream=ar,this._ngxsExecutionStrategy=vr,this._internalErrorReporter=Qr}dispatch(tn){return this._ngxsExecutionStrategy.enter(()=>this.dispatchByEvents(tn)).pipe(function aa(Jn,tn){return ti=>{let _i=!1;return ti.subscribe({error:ar=>{tn.enter(()=>Promise.resolve().then(()=>{_i||tn.leave(()=>Jn.reportErrorSafely(ar))}))}}),new Y.y(ar=>(_i=!0,ti.pipe(ce(tn)).subscribe(ar)))}}(this._internalErrorReporter,this._ngxsExecutionStrategy))}dispatchByEvents(tn){return Array.isArray(tn)?0===tn.length?(0,he.of)(this._stateStream.getValue()):(0,ae.D)(tn.map(ti=>this.dispatchSingle(ti))):this.dispatchSingle(tn)}dispatchSingle(tn){const ti=this._stateStream.getValue(),_i=this._pluginManager.plugins;return rr([..._i,(ar,vr)=>{ar!==ti&&this._stateStream.next(ar);const Qr=this.getActionResultStream(vr);return Qr.subscribe(Li=>this._actions.next(Li)),this._actions.next({action:vr,status:"DISPATCHED"}),this.createDispatchObservable(Qr)}])(ti,tn).pipe((0,xe.d)())}getActionResultStream(tn){return this._actionResults.pipe((0,ne.h)(ti=>ti.action===tn&&"DISPATCHED"!==ti.status),(0,de.q)(1),(0,xe.d)())}createDispatchObservable(tn){return tn.pipe((0,re.z)(ti=>{switch(ti.status){case"SUCCESSFUL":return(0,he.of)(this._stateStream.getValue());case"ERRORED":return(0,X._)(ti.error);default:return ve.E}})).pipe((0,xe.d)())}}Zn.\u0275fac=function(tn){return new(tn||Zn)(o.LFG(lr),o.LFG(an),o.LFG(Ii),o.LFG(Bo),o.LFG(we),o.LFG(ea))},Zn.\u0275prov=o.Yz7({token:Zn,factory:Zn.\u0275fac,providedIn:"root"});class Xn{constructor(tn,ti,_i){this._stateStream=tn,this._dispatcher=ti,this._config=_i}getRootStateOperations(){return{getState:()=>this._stateStream.getValue(),setState:ti=>this._stateStream.next(ti),dispatch:ti=>this._dispatcher.dispatch(ti)}}setStateToTheCurrentWithNew(tn){const ti=this.getRootStateOperations(),_i=ti.getState();ti.setState(Object.assign(Object.assign({},_i),tn.defaults))}}Xn.\u0275fac=function(tn){return new(tn||Xn)(o.LFG(Bo),o.LFG(Zn),o.LFG(ui))},Xn.\u0275prov=o.Yz7({token:Xn,factory:Xn.\u0275fac,providedIn:"root"});class ei{constructor(tn){this._internalStateOperations=tn}createStateContext(tn){const ti=this._internalStateOperations.getRootStateOperations();return{getState:()=>Ut(ti.getState(),tn.path),patchState(_i){const ar=ti.getState(),vr=function gn(Jn){return tn=>{const ti=Object.assign({},tn);for(const _i in Jn)ti[_i]=Jn[_i];return ti}}(_i);return Ft(ti,ar,vr,tn.path)},setState(_i){const ar=ti.getState();return(0,Be.mQ)(_i)?Ft(ti,ar,_i,tn.path):un(ti,ar,_i,tn.path)},dispatch:_i=>ti.dispatch(_i)}}}function un(Jn,tn,ti,_i){const ar=ut(tn,_i,ti);return Jn.setState(ar),ar}function Ft(Jn,tn,ti,_i){return un(Jn,tn,ti(Ut(tn,_i)),_i)}function Ut(Jn,tn){return Ve(Jn,tn)}ei.\u0275fac=function(tn){return new(tn||ei)(o.LFG(Xn))},ei.\u0275prov=o.Yz7({token:ei,factory:ei.\u0275fac,providedIn:"root"});new RegExp("^[a-zA-Z0-9_]+$");class at{}at.type="@@INIT";class It{constructor(tn){this.addedStates=tn}}It.type="@@UPDATE_STATE";const Qt=new o.OlP("NGXS_DEVELOPMENT_OPTIONS",{providedIn:"root",factory:()=>({warnOnUnhandledActions:!0})});class St{constructor(tn){this._ignoredActions=new Set([at.type,It.type]),"object"==typeof tn.warnOnUnhandledActions&&this.ignoreActions(...tn.warnOnUnhandledActions.ignore)}ignoreActions(...tn){for(const ti of tn)this._ignoredActions.add(ti.type)}warn(tn){Array.from(this._ignoredActions).some(_i=>_i===nt(tn))||(tn=tn.constructor&&"Object"!==tn.constructor.name?tn.constructor.name:tn.type,console.warn(`The ${tn} action has been dispatched but hasn't been handled. This may happen if the state with an action handler for this action is not registered.`))}}St.\u0275fac=function(tn){return new(tn||St)(o.LFG(Qt))},St.\u0275prov=o.Yz7({token:St,factory:St.\u0275fac});class cn{constructor(tn,ti,_i,ar,vr,Qr,Li){this._injector=tn,this._config=ti,this._parentFactory=_i,this._actions=ar,this._actionResults=vr,this._stateContextFactory=Qr,this._initialState=Li,this._actionsSubscription=null,this._states=[],this._statesByName={},this._statePaths={},this.getRuntimeSelectorContext=E(()=>{const Ta=this;function La(is){const yt=Ta.statePaths[is];return yt?Hi(yt.split("."),Ta._config):null}return this._parentFactory?this._parentFactory.getRuntimeSelectorContext():{getStateGetter(is){let yt=La(is);return yt||((...Dt)=>(yt||(yt=La(is)),yt?yt(...Dt):void 0))},getSelectorOptions(is){const yt=Ta._config.selectorOptions;return Object.assign(Object.assign({},yt),is||{})}}})}get states(){return this._parentFactory?this._parentFactory.states:this._states}get statesByName(){return this._parentFactory?this._parentFactory.statesByName:this._statesByName}get statePaths(){return this._parentFactory?this._parentFactory.statePaths:this._statePaths}static _cloneDefaults(tn){let ti=tn;return Array.isArray(tn)?ti=tn.slice():function jn(Jn){return"object"==typeof Jn&&null!==Jn||"function"==typeof Jn}(tn)?ti=Object.assign({},tn):void 0===tn&&(ti={}),ti}ngOnDestroy(){var tn;null===(tn=this._actionsSubscription)||void 0===tn||tn.unsubscribe()}add(tn){const{newStates:ti}=this.addToStatesMap(tn);if(!ti.length)return[];const _i=function Gr(Jn){const tn=ti=>Jn.find(ar=>ar===ti)[Bt].name;return Jn.reduce((ti,_i)=>{const{name:ar,children:vr}=_i[Bt];return ti[ar]=(vr||[]).map(tn),ti},{})}(ti),ar=function mr(Jn){const tn=[],ti={},_i=(ar,vr=[])=>{Array.isArray(vr)||(vr=[]),vr.push(ar),ti[ar]=!0,Jn[ar].forEach(Qr=>{ti[Qr]||_i(Qr,vr.slice(0))}),tn.indexOf(ar)<0&&tn.push(ar)};return Object.keys(Jn).forEach(ar=>_i(ar)),tn.reverse()}(_i),vr=function Eo(Jn,tn={}){const ti=(_i,ar)=>{for(const vr in _i)if(_i.hasOwnProperty(vr)&&_i[vr].indexOf(ar)>=0){const Qr=ti(_i,vr);return null!==Qr?`${Qr}.${vr}`:vr}return null};for(const _i in Jn)if(Jn.hasOwnProperty(_i)){const ar=ti(Jn,_i);tn[_i]=ar?`${ar}.${_i}`:_i}return tn}(_i),Qr=function zr(Jn){return Jn.reduce((tn,ti)=>(tn[ti[Bt].name]=ti,tn),{})}(ti),Li=[];for(const Ta of ar){const La=Qr[Ta],Ps=vr[Ta],is=La[Bt];this.addRuntimeInfoToMeta(is,Ps);const yt={name:Ta,path:Ps,isInitialised:!1,actions:is.actions,instance:this._injector.get(La),defaults:cn._cloneDefaults(is.defaults)};this.hasBeenMountedAndBootstrapped(Ta,Ps)||Li.push(yt),this.states.push(yt)}return Li}addAndReturnDefaults(tn){const ti=tn||[],_i=this.add(ti);return{defaults:_i.reduce((vr,Qr)=>ut(vr,Qr.path,Qr.defaults),{}),states:_i}}connectActionHandlers(){if(this._parentFactory||null!==this._actionsSubscription)return;const tn=new V.x;this._actionsSubscription=this._actions.pipe((0,ne.h)(ti=>"DISPATCHED"===ti.status),(0,oe.z)(ti=>{tn.next(ti);const _i=ti.action;return this.invokeActions(tn,_i).pipe((0,pe.U)(()=>({action:_i,status:"SUCCESSFUL"})),(0,me.d)({action:_i,status:"CANCELED"}),(0,be.K)(ar=>(0,he.of)({action:_i,status:"ERRORED",error:ar})))})).subscribe(ti=>this._actionResults.next(ti))}invokeActions(tn,ti){const _i=nt(ti),ar=[];let vr=!1;for(const Qr of this.states){const Li=Qr.actions[_i];if(Li)for(const Ta of Li){const La=this._stateContextFactory.createStateContext(Qr);try{let Ps=Qr.instance[Ta.fn](La,ti);Ps instanceof Promise&&(Ps=(0,ye.D)(Ps)),(0,ge.b)(Ps)?(Ps=Ps.pipe((0,oe.z)(is=>is instanceof Promise?(0,ye.D)(is):(0,ge.b)(is)?is:(0,he.of)(is)),(0,me.d)({})),Ta.options.cancelUncompleted&&(Ps=Ps.pipe((0,le.R)(tn.pipe(Yt(ti)))))):Ps=(0,he.of)({}).pipe((0,xe.d)()),ar.push(Ps)}catch(Ps){ar.push((0,X._)(Ps))}vr=!0}}return ar.length||ar.push((0,he.of)({})),(0,ae.D)(ar)}addToStatesMap(tn){const ti=[],_i=this.statesByName;for(const ar of tn){const vr=An(ar).name;!_i[vr]&&(ti.push(ar),_i[vr]=ar)}return{newStates:ti}}addRuntimeInfoToMeta(tn,ti){this.statePaths[tn.name]=ti,tn.path=ti}hasBeenMountedAndBootstrapped(tn,ti){const _i=void 0!==Ve(this._initialState,ti);return this.statesByName[tn]&&_i}}function Ln(Jn,tn,ti){return _i=>{const{argumentSelectorFunctions:ar,selectorOptions:vr}=function hi(Jn,tn,ti=[]){const _i=tn.getSelectorOptions(),ar=Jn.getSelectorOptions(_i),Qr=function Ri(Jn=[],tn,ti){const _i=[],ar=0===Jn.length||tn.injectContainerState;return ti&&ar&&An(ti)&&_i.push(ti),Jn&&_i.push(...Jn),_i}(ti,ar,tn.containerClass).map(Li=>_r(Li)(Jn));return{selectorOptions:ar,argumentSelectorFunctions:Qr}}(_i,Jn,tn);return function(Li){const Ta=ar.map(La=>La(Li));try{return ti(...Ta)}catch(La){if(La instanceof TypeError&&vr.suppressErrors)return;throw La}}}}function _r(Jn){const tn=In(Jn)||An(Jn);return tn&&tn.makeRootSelector||(()=>Jn)}cn.\u0275fac=function(tn){return new(tn||cn)(o.LFG(o.zs3),o.LFG(ui),o.LFG(cn,12),o.LFG(lr),o.LFG(an),o.LFG(ei),o.LFG(n,8))},cn.\u0275prov=o.Yz7({token:cn,factory:cn.\u0275fac});class er{constructor(tn,ti,_i,ar,vr,Qr){this._stateStream=tn,this._internalStateOperations=ti,this._config=_i,this._internalExecutionStrategy=ar,this._stateFactory=vr,this._selectableStateStream=this._stateStream.pipe(ce(this._internalExecutionStrategy),(0,xe.d)({bufferSize:1,refCount:!0})),this.initStateStream(Qr)}dispatch(tn){return this._internalStateOperations.getRootStateOperations().dispatch(tn)}select(tn){const ti=this.getStoreBoundSelectorFn(tn);return this._selectableStateStream.pipe((0,pe.U)(ti),(0,be.K)(_i=>{const{suppressErrors:ar}=this._config.selectorOptions;return _i instanceof TypeError&&ar?(0,he.of)(void 0):(0,X._)(_i)}),(0,Z.x)(),ce(this._internalExecutionStrategy))}selectOnce(tn){return this.select(tn).pipe((0,de.q)(1))}selectSnapshot(tn){return this.getStoreBoundSelectorFn(tn)(this._stateStream.getValue())}subscribe(tn){return this._selectableStateStream.pipe(ce(this._internalExecutionStrategy)).subscribe(tn)}snapshot(){return this._internalStateOperations.getRootStateOperations().getState()}reset(tn){return this._internalStateOperations.getRootStateOperations().setState(tn)}getStoreBoundSelectorFn(tn){return _r(tn)(this._stateFactory.getRuntimeSelectorContext())}initStateStream(tn){const ti=this._stateStream.value;if(!ti||0===Object.keys(ti).length){const vr=Object.keys(this._config.defaultsState).length>0?Object.assign(Object.assign({},this._config.defaultsState),tn):tn;this._stateStream.next(vr)}}}er.\u0275fac=function(tn){return new(tn||er)(o.LFG(Bo),o.LFG(Xn),o.LFG(ui),o.LFG(we),o.LFG(cn),o.LFG(n,8))},er.\u0275prov=o.Yz7({token:er,factory:er.\u0275fac,providedIn:"root"});class Yr{constructor(tn,ti){Yr.store=tn,Yr.config=ti}ngOnDestroy(){Yr.store=null,Yr.config=null}}Yr.store=null,Yr.config=null,Yr.\u0275fac=function(tn){return new(tn||Yr)(o.LFG(er),o.LFG(ui))},Yr.\u0275prov=o.Yz7({token:Yr,factory:Yr.\u0275fac,providedIn:"root"});class _o{constructor(tn,ti,_i,ar,vr){this._store=tn,this._internalErrorReporter=ti,this._internalStateOperations=_i,this._stateContextFactory=ar,this._bootstrapper=vr,this._destroy$=new V.x}ngOnDestroy(){this._destroy$.next()}ngxsBootstrap(tn,ti){this._internalStateOperations.getRootStateOperations().dispatch(tn).pipe((0,ne.h)(()=>!!ti),(0,Oe.b)(()=>this._invokeInitOnStates(ti.states)),(0,oe.z)(()=>this._bootstrapper.appBootstrapped$),(0,ne.h)(_i=>!!_i),(0,be.K)(_i=>(this._internalErrorReporter.reportErrorSafely(_i),ve.E)),(0,le.R)(this._destroy$)).subscribe(()=>this._invokeBootstrapOnStates(ti.states))}_invokeInitOnStates(tn){for(const ti of tn){const _i=ti.instance;_i.ngxsOnChanges&&this._store.select(ar=>Ve(ar,ti.path)).pipe((0,j.O)(void 0),(0,ke.G)(),(0,le.R)(this._destroy$)).subscribe(([ar,vr])=>{const Qr=new Ai(ar,vr,!ti.isInitialised);_i.ngxsOnChanges(Qr)}),_i.ngxsOnInit&&_i.ngxsOnInit(this._getStateContext(ti)),ti.isInitialised=!0}}_invokeBootstrapOnStates(tn){for(const ti of tn){const _i=ti.instance;_i.ngxsAfterBootstrap&&_i.ngxsAfterBootstrap(this._getStateContext(ti))}}_getStateContext(tn){return this._stateContextFactory.createStateContext(tn)}}_o.\u0275fac=function(tn){return new(tn||_o)(o.LFG(er),o.LFG(ea),o.LFG(Xn),o.LFG(ei),o.LFG(l))},_o.\u0275prov=o.Yz7({token:_o,factory:_o.\u0275fac,providedIn:"root"});class Si{constructor(tn,ti,_i,ar,vr=[],Qr){const Li=tn.addAndReturnDefaults(vr);ti.setStateToTheCurrentWithNew(Li),tn.connectActionHandlers(),Qr.ngxsBootstrap(new at,Li)}}Si.\u0275fac=function(tn){return new(tn||Si)(o.LFG(cn),o.LFG(Xn),o.LFG(er),o.LFG(Yr),o.LFG(kn,8),o.LFG(_o))},Si.\u0275mod=o.oAB({type:Si}),Si.\u0275inj=o.cJS({});class to{constructor(tn,ti,_i,ar=[],vr){const Qr=to.flattenStates(ar),Li=_i.addAndReturnDefaults(Qr);Li.states.length&&(ti.setStateToTheCurrentWithNew(Li),vr.ngxsBootstrap(new It(Li.defaults),Li))}static flattenStates(tn=[]){return tn.reduce((ti,_i)=>ti.concat(_i),[])}}to.\u0275fac=function(tn){return new(tn||to)(o.LFG(er),o.LFG(Xn),o.LFG(cn),o.LFG(On,8),o.LFG(_o))},to.\u0275mod=o.oAB({type:to}),to.\u0275inj=o.cJS({});class Oa{static forRoot(tn=[],ti={}){return{ngModule:Si,providers:[cn,Ii,...tn,...Oa.ngxsTokenProviders(tn,ti)]}}static forFeature(tn=[]){return{ngModule:to,providers:[cn,Ii,...tn,{provide:On,multi:!0,useValue:tn}]}}static ngxsTokenProviders(tn,ti){return[{provide:Vi,useValue:ti.executionStrategy},{provide:kn,useValue:tn},{provide:Bn,useValue:ti},{provide:o.tb,useFactory:Oa.appBootstrapListenerFactory,multi:!0,deps:[l]},{provide:w,useExisting:ei},{provide:P,useExisting:cn}]}static appBootstrapListenerFactory(tn){return()=>tn.bootstrap()}}function Uo(Jn,tn){return(ti,_i)=>{const ar=Hn(ti.constructor);Array.isArray(Jn)||(Jn=[Jn]);for(const vr of Jn){const Qr=vr.type;ar.actions[Qr]||(ar.actions[Qr]=[]),ar.actions[Qr].push({fn:_i,options:tn||{},type:Qr})}}}function rl(Jn){return tn=>{const ti=tn,_i=Hn(ti),ar=Object.getPrototypeOf(ti),vr=function Vs(Jn,tn){const ti=Jn[xn]||{};return Object.assign(Object.assign({},ti),tn)}(ar,Jn);(function ps(Jn){const{meta:tn,inheritedStateClass:ti,optionsWithInheritance:_i}=Jn,{children:ar,defaults:vr,name:Qr}=_i,Li="string"==typeof Qr?Qr:Qr&&Qr.getName()||null;if(ti.hasOwnProperty(Bt)){const Ta=ti[Bt]||{};tn.actions=Object.assign(Object.assign({},tn.actions),Ta.actions)}tn.children=ar,tn.defaults=vr,tn.name=Li})({meta:_i,inheritedStateClass:ar,optionsWithInheritance:vr}),ti[xn]=vr}}Oa.\u0275fac=function(tn){return new(tn||Oa)},Oa.\u0275mod=o.oAB({type:Oa}),Oa.\u0275inj=o.cJS({});const Mi="NGXS_SELECTOR_OPTIONS_META",Di={getOptions:Jn=>Jn&&Jn[Mi]||{},defineOptions:(Jn,tn)=>{Jn&&(Jn[Mi]=tn)}};function Er(Jn,tn){const ti=vn(Jn);ti.originalFn=Jn;let _i=()=>({});tn&&(ti.containerClass=tn.containerClass,ti.selectorName=tn.selectorName||null,_i=tn.getSelectorOptions||_i);const ar=Object.assign({},ti);return ti.getSelectorOptions=()=>function ur(Jn,tn){return Object.assign(Object.assign(Object.assign(Object.assign({},Di.getOptions(Jn.containerClass)||{}),Di.getOptions(Jn.originalFn)||{}),Jn.getSelectorOptions()||{}),tn)}(ar,_i()),ti}function ja(Jn,tn,ti){const _i=function ii(Jn,tn){const ti=tn&&tn.containerClass,ar=E(function(...Qr){const Li=Jn.apply(ti,Qr);return Li instanceof Function?E.apply(null,[Li]):Li});return Object.setPrototypeOf(ar,Jn),ar}(tn,ti),ar=Er(tn,ti);return ar.makeRootSelector=Ln(ar,Jn,_i),_i}function wa(Jn){return(tn,ti,_i)=>{_i||(_i=Object.getOwnPropertyDescriptor(tn,ti));const ar=_i?.value,vr=ja(Jn,ar,{containerClass:tn,selectorName:ti.toString(),getSelectorOptions:()=>({})}),Qr={configurable:!0,get:()=>vr};return Qr.originalFn=ar,Qr}}class Cs{static forRoot(tn){return{ngModule:Cs,providers:[St,{provide:Qt,useValue:tn}]}}}Cs.\u0275fac=function(tn){return new(tn||Cs)},Cs.\u0275mod=o.oAB({type:Cs}),Cs.\u0275inj=o.cJS({})},3933:(qe,I,p)=>{Object.defineProperty(I,"__esModule",{value:!0});var o=p(66856),e=p(87695),l=p(15608),D=p(22787),g=p(88290),E=p(35887),T=function(n){function P(){return null!==n&&n.apply(this,arguments)||this}return o.__extends(P,n),P.prototype.eventFromException=function(w,B){return g.eventFromException(this._options,w,B)},P.prototype.eventFromMessage=function(w,B,Y){return void 0===B&&(B=l.Severity.Info),g.eventFromMessage(this._options,w,B,Y)},P.prototype._setupTransport=function(){if(!this._options.dsn)return n.prototype._setupTransport.call(this);var w=o.__assign(o.__assign({},this._options.transportOptions),{dsn:this._options.dsn,_metadata:this._options._metadata});return this._options.transport?new this._options.transport(w):D.supportsFetch()?new E.FetchTransport(w):new E.XHRTransport(w)},P}(e.BaseBackend);I.BrowserBackend=T},88290:(qe,I,p)=>{Object.defineProperty(I,"__esModule",{value:!0});var o=p(66856),e=p(15608),l=p(22787),D=p(29956),g=p(4794);function n(w,B,Y){var V;if(void 0===Y&&(Y={}),l.isErrorEvent(w)&&w.error)return w=w.error,V=D.eventFromStacktrace(g.computeStackTrace(w));if(l.isDOMError(w)||l.isDOMException(w)){var he=w,ae=he.name||(l.isDOMError(he)?"DOMError":"DOMException"),X=he.message?ae+": "+he.message:ae;return V=P(X,B,Y),l.addExceptionTypeValue(V,X),"code"in he&&(V.tags=o.__assign(o.__assign({},V.tags),{"DOMException.code":""+he.code})),V}if(l.isError(w))return V=D.eventFromStacktrace(g.computeStackTrace(w));if(l.isPlainObject(w)||l.isEvent(w)){var ve=w;return V=D.eventFromPlainObject(ve,B,Y.rejection),l.addExceptionMechanism(V,{synthetic:!0}),V}return V=P(w,B,Y),l.addExceptionTypeValue(V,""+w,void 0),l.addExceptionMechanism(V,{synthetic:!0}),V}function P(w,B,Y){void 0===Y&&(Y={});var V={message:w};if(Y.attachStacktrace&&B){var ue=g.computeStackTrace(B),he=D.prepareFramesForEvent(ue.stack);V.stacktrace={frames:he}}return V}I.eventFromException=function E(w,B,Y){var ue=n(B,Y&&Y.syntheticException||void 0,{attachStacktrace:w.attachStacktrace});return l.addExceptionMechanism(ue,{handled:!0,type:"generic"}),ue.level=e.Severity.Error,Y&&Y.event_id&&(ue.event_id=Y.event_id),l.SyncPromise.resolve(ue)},I.eventFromMessage=function T(w,B,Y,V){void 0===Y&&(Y=e.Severity.Info);var he=P(B,V&&V.syntheticException||void 0,{attachStacktrace:w.attachStacktrace});return he.level=Y,V&&V.event_id&&(he.event_id=V.event_id),l.SyncPromise.resolve(he)},I.eventFromUnknownInput=n,I.eventFromString=P},29956:(qe,I,p)=>{Object.defineProperty(I,"__esModule",{value:!0});var o=p(22787),e=p(4794),l=50;function D(n){var P=T(n.stack),w={type:n.name,value:n.message};return P&&P.length&&(w.stacktrace={frames:P}),void 0===w.type&&""===w.value&&(w.value="Unrecoverable error caught"),w}function T(n){if(!n||!n.length)return[];var P=n,w=P[0].func||"",B=P[P.length-1].func||"";return(-1!==w.indexOf("captureMessage")||-1!==w.indexOf("captureException"))&&(P=P.slice(1)),-1!==B.indexOf("sentryWrapped")&&(P=P.slice(0,-1)),P.slice(0,l).map(function(Y){return{colno:null===Y.column?void 0:Y.column,filename:Y.url||P[0].url,function:Y.func||"?",in_app:!0,lineno:null===Y.line?void 0:Y.line}}).reverse()}I.exceptionFromStacktrace=D,I.eventFromPlainObject=function g(n,P,w){var B={exception:{values:[{type:o.isEvent(n)?n.constructor.name:w?"UnhandledRejection":"Error",value:"Non-Error "+(w?"promise rejection":"exception")+" captured with keys: "+o.extractExceptionKeysForMessage(n)}]},extra:{__serialized__:o.normalizeToSize(n)}};if(P){var V=T(e.computeStackTrace(P).stack);B.stacktrace={frames:V}}return B},I.eventFromStacktrace=function E(n){return{exception:{values:[D(n)]}}},I.prepareFramesForEvent=T},4794:(qe,I,p)=>{Object.defineProperty(I,"__esModule",{value:!0});var o=p(66856),e="?",l=/^\s*at (?:(.*?) ?\()?((?:file|https?|blob|chrome-extension|address|native|eval|webpack|<anonymous>|[-a-z]+:|.*bundle|\/).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,D=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:file|https?|blob|chrome|webpack|resource|moz-extension|capacitor).*?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,g=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i,E=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,T=/\((\S*)(?::(\d+))(?::(\d+))\)/,n=/Minified React error #\d+;/i;function Y(ue,he){try{return o.__assign(o.__assign({},ue),{stack:ue.stack.slice(he)})}catch{return ue}}function V(ue){var he=ue&&ue.message;return he?he.error&&"string"==typeof he.error.message?he.error.message:he:"No error message"}I.computeStackTrace=function P(ue){var he=null,ae=0;ue&&("number"==typeof ue.framesToPop?ae=ue.framesToPop:n.test(ue.message)&&(ae=1));try{if(he=function B(ue){if(!ue||!ue.stacktrace)return null;for(var ge,he=ue.stacktrace,ae=/ line (\d+).*script (?:in )?(\S+)(?:: in function (\S+))?$/i,X=/ line (\d+), column (\d+)\s*(?:in (?:<anonymous function: ([^>]+)>|([^)]+))\((.*)\))? in (.*):\s*$/i,ve=he.split("\n"),ye=[],ne=0;ne<ve.length;ne+=2){var pe=null;(ge=ae.exec(ve[ne]))?pe={url:ge[2],func:ge[3],args:[],line:+ge[1],column:null}:(ge=X.exec(ve[ne]))&&(pe={url:ge[6],func:ge[3]||ge[4],args:ge[5]?ge[5].split(","):[],line:+ge[1],column:+ge[2]}),pe&&(!pe.func&&pe.line&&(pe.func=e),ye.push(pe))}return ye.length?{message:V(ue),name:ue.name,stack:ye}:null}(ue),he)return Y(he,ae)}catch{}try{if(he=function w(ue){if(!ue||!ue.stack)return null;for(var ve,ye,ge,he=[],ae=ue.stack.split("\n"),ne=0;ne<ae.length;++ne){if(ye=l.exec(ae[ne])){var pe=ye[2]&&0===ye[2].indexOf("native");ye[2]&&0===ye[2].indexOf("eval")&&(ve=T.exec(ye[2]))&&(ye[2]=ve[1],ye[3]=ve[2],ye[4]=ve[3]),ge={url:ye[2]&&0===ye[2].indexOf("address at ")?ye[2].substr(11):ye[2],func:ye[1]||e,args:pe?[ye[2]]:[],line:ye[3]?+ye[3]:null,column:ye[4]?+ye[4]:null}}else if(ye=g.exec(ae[ne]))ge={url:ye[2],func:ye[1]||e,args:[],line:+ye[3],column:ye[4]?+ye[4]:null};else{if(!(ye=D.exec(ae[ne])))continue;ye[3]&&ye[3].indexOf(" > eval")>-1&&(ve=E.exec(ye[3]))?(ye[1]=ye[1]||"eval",ye[3]=ve[1],ye[4]=ve[2],ye[5]=""):0===ne&&!ye[5]&&void 0!==ue.columnNumber&&(he[0].column=ue.columnNumber+1),ge={url:ye[3],func:ye[1]||e,args:ye[2]?ye[2].split(","):[],line:ye[4]?+ye[4]:null,column:ye[5]?+ye[5]:null}}!ge.func&&ge.line&&(ge.func=e),he.push(ge)}return he.length?{message:V(ue),name:ue.name,stack:he}:null}(ue),he)return Y(he,ae)}catch{}return{message:V(ue),name:ue&&ue.name,stack:[],failed:!0}}},43075:(qe,I,p)=>{Object.defineProperty(I,"__esModule",{value:!0});var o=p(66856),e=p(87695),l=p(15608),D=p(22787),g=function(){function E(T){this.options=T,this._buffer=new D.PromiseBuffer(30),this._rateLimits={},this._api=new e.API(T.dsn,T._metadata),this.url=this._api.getStoreEndpointWithUrlEncodedAuth()}return E.prototype.sendEvent=function(T){throw new D.SentryError("Transport Class has to implement `sendEvent` method")},E.prototype.close=function(T){return this._buffer.drain(T)},E.prototype._handleResponse=function(T){var n=T.requestType,P=T.response,w=T.headers,B=T.resolve,Y=T.reject,V=l.Status.fromHttpCode(P.status);this._handleRateLimit(w)&&D.logger.warn("Too many requests, backing off until: "+this._disabledUntil(n)),V!==l.Status.Success?Y(P):B({status:V})},E.prototype._disabledUntil=function(T){return this._rateLimits[T]||this._rateLimits.all},E.prototype._isRateLimited=function(T){return this._disabledUntil(T)>new Date(Date.now())},E.prototype._handleRateLimit=function(T){var n,P,w,B,Y=Date.now(),V=T["x-sentry-rate-limits"],ue=T["retry-after"];if(V){try{for(var he=o.__values(V.trim().split(",")),ae=he.next();!ae.done;ae=he.next()){var ve=ae.value.split(":",2),ye=parseInt(ve[0],10),ge=1e3*(isNaN(ye)?60:ye);try{for(var ne=(w=void 0,o.__values(ve[1].split(";"))),pe=ne.next();!pe.done;pe=ne.next()){var Pe=pe.value;this._rateLimits[Pe||"all"]=new Date(Y+ge)}}catch(xe){w={error:xe}}finally{try{pe&&!pe.done&&(B=ne.return)&&B.call(ne)}finally{if(w)throw w.error}}}}catch(xe){n={error:xe}}finally{try{ae&&!ae.done&&(P=he.return)&&P.call(he)}finally{if(n)throw n.error}}return!0}return!!ue&&(this._rateLimits.all=new Date(Y+D.parseRetryAfterHeader(Y,ue)),!0)},E}();I.BaseTransport=g},23335:(qe,I,p)=>{Object.defineProperty(I,"__esModule",{value:!0});var o=p(66856),e=p(87695),l=p(22787),D=p(43075),g=l.getGlobalObject(),E=function(T){function n(){return null!==T&&T.apply(this,arguments)||this}return o.__extends(n,T),n.prototype.sendEvent=function(P){return this._sendRequest(e.eventToSentryRequest(P,this._api),P)},n.prototype.sendSession=function(P){return this._sendRequest(e.sessionToSentryRequest(P,this._api),P)},n.prototype._sendRequest=function(P,w){var B=this;if(this._isRateLimited(P.type))return Promise.reject({event:w,type:P.type,reason:"Transport locked till "+this._disabledUntil(P.type)+" due to too many requests.",status:429});var Y={body:P.body,method:"POST",referrerPolicy:l.supportsReferrerPolicy()?"origin":""};return void 0!==this.options.fetchParameters&&Object.assign(Y,this.options.fetchParameters),void 0!==this.options.headers&&(Y.headers=this.options.headers),this._buffer.add(new l.SyncPromise(function(V,ue){g.fetch(P.url,Y).then(function(he){var ae={"x-sentry-rate-limits":he.headers.get("X-Sentry-Rate-Limits"),"retry-after":he.headers.get("Retry-After")};B._handleResponse({requestType:P.type,response:he,headers:ae,resolve:V,reject:ue})}).catch(ue)}))},n}(D.BaseTransport);I.FetchTransport=E},35887:(qe,I,p)=>{Object.defineProperty(I,"__esModule",{value:!0});var o=p(43075);I.BaseTransport=o.BaseTransport;var e=p(23335);I.FetchTransport=e.FetchTransport;var l=p(47160);I.XHRTransport=l.XHRTransport},47160:(qe,I,p)=>{Object.defineProperty(I,"__esModule",{value:!0});var o=p(66856),e=p(87695),l=p(22787),g=function(E){function T(){return null!==E&&E.apply(this,arguments)||this}return o.__extends(T,E),T.prototype.sendEvent=function(n){return this._sendRequest(e.eventToSentryRequest(n,this._api),n)},T.prototype.sendSession=function(n){return this._sendRequest(e.sessionToSentryRequest(n,this._api),n)},T.prototype._sendRequest=function(n,P){var w=this;return this._isRateLimited(n.type)?Promise.reject({event:P,type:n.type,reason:"Transport locked till "+this._disabledUntil(n.type)+" due to too many requests.",status:429}):this._buffer.add(new l.SyncPromise(function(B,Y){var V=new XMLHttpRequest;for(var ue in V.onreadystatechange=function(){if(4===V.readyState){var he={"x-sentry-rate-limits":V.getResponseHeader("X-Sentry-Rate-Limits"),"retry-after":V.getResponseHeader("Retry-After")};w._handleResponse({requestType:n.type,response:V,headers:he,resolve:B,reject:Y})}},V.open("POST",n.url),w.options.headers)w.options.headers.hasOwnProperty(ue)&&V.setRequestHeader(ue,w.options.headers[ue]);V.send(n.body)}))},T}(p(43075).BaseTransport);I.XHRTransport=g},84810:(qe,I,p)=>{"use strict";p.r(I),p.d(I,{BrowserClient:()=>On,Hub:()=>n.Xb,Integrations:()=>pr,SDK_NAME:()=>Yt,SDK_VERSION:()=>P.J,Scope:()=>E.s,Severity:()=>D.z,Status:()=>g.q,Transports:()=>e,addBreadcrumb:()=>T.n_,addGlobalEventProcessor:()=>E.c,captureEvent:()=>T.eN,captureException:()=>T.Tb,captureMessage:()=>T.uT,close:()=>mr,configureScope:()=>T.e,defaultIntegrations:()=>In,eventFromException:()=>Be,eventFromMessage:()=>nt,flush:()=>Eo,forceLoad:()=>Gr,getCurrentHub:()=>n.Gd,getHubFromCarrier:()=>n.vi,init:()=>Zi,injectReportDialog:()=>Gi,lastEventId:()=>Hi,makeMain:()=>n.pj,onLoad:()=>zr,setContext:()=>T.v,setExtra:()=>T.sU,setExtras:()=>T.rJ,setTag:()=>T.YA,setTags:()=>T.mG,setUser:()=>T.av,showReportDialog:()=>gr,startTransaction:()=>T.Yr,withScope:()=>T.$e,wrap:()=>jn});var o={};p.r(o),p.d(o,{Breadcrumbs:()=>kn,GlobalHandlers:()=>si,LinkedErrors:()=>Hn,TryCatch:()=>Ai,UserAgent:()=>vn});var e={};p.r(e),p.d(e,{BaseTransport:()=>ft,FetchTransport:()=>rn,XHRTransport:()=>He});var l=p(66856),D=p(1248),g=p(49174),E=p(10383),T=p(38076),n=p(19248),P=p(99853),w=p(22159),B=p(15535),Y=p(11446),V=p(73473),ue=p(8204),he=p(30509),ae=p(96412),X=p(57759),ve="?",ye=/^\s*at (?:(.*?) ?\()?((?:file|https?|blob|chrome-extension|address|native|eval|webpack|<anonymous>|[-a-z]+:|.*bundle|\/).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,ge=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:file|https?|blob|chrome|webpack|resource|moz-extension|capacitor).*?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,ne=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i,pe=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,Pe=/\((\S*)(?::(\d+))(?::(\d+))\)/,xe=/Minified React error #\d+;/i;function de(Sn){var Pn=null,Nt=0;Sn&&("number"==typeof Sn.framesToPop?Nt=Sn.framesToPop:xe.test(Sn.message)&&(Nt=1));try{if(Pn=function oe(Sn){if(!Sn||!Sn.stacktrace)return null;for(var ce,Pn=Sn.stacktrace,Nt=/ line (\d+).*script (?:in )?(\S+)(?:: in function (\S+))?$/i,ai=/ line (\d+), column (\d+)\s*(?:in (?:<anonymous function: ([^>]+)>|([^)]+))\((.*)\))? in (.*):\s*$/i,hn=Pn.split("\n"),Le=[],we=0;we<hn.length;we+=2){var Qe=null;(ce=Nt.exec(hn[we]))?Qe={url:ce[2],func:ce[3],args:[],line:+ce[1],column:null}:(ce=ai.exec(hn[we]))&&(Qe={url:ce[6],func:ce[3]||ce[4],args:ce[5]?ce[5].split(","):[],line:+ce[1],column:+ce[2]}),Qe&&(!Qe.func&&Qe.line&&(Qe.func=ve),Le.push(Qe))}return Le.length?{message:be(Sn),name:Sn.name,stack:Le}:null}(Sn),Pn)return me(Pn,Nt)}catch{}try{if(Pn=function re(Sn){if(!Sn||!Sn.stack)return null;for(var hn,Le,ce,Pn=[],Nt=Sn.stack.split("\n"),we=0;we<Nt.length;++we){if(Le=ye.exec(Nt[we])){var Qe=Le[2]&&0===Le[2].indexOf("native");Le[2]&&0===Le[2].indexOf("eval")&&(hn=Pe.exec(Le[2]))&&(Le[2]=hn[1],Le[3]=hn[2],Le[4]=hn[3]),ce={url:Le[2]&&0===Le[2].indexOf("address at ")?Le[2].substr(11):Le[2],func:Le[1]||ve,args:Qe?[Le[2]]:[],line:Le[3]?+Le[3]:null,column:Le[4]?+Le[4]:null}}else if(Le=ne.exec(Nt[we]))ce={url:Le[2],func:Le[1]||ve,args:[],line:+Le[3],column:Le[4]?+Le[4]:null};else{if(!(Le=ge.exec(Nt[we])))continue;Le[3]&&Le[3].indexOf(" > eval")>-1&&(hn=pe.exec(Le[3]))?(Le[1]=Le[1]||"eval",Le[3]=hn[1],Le[4]=hn[2],Le[5]=""):0===we&&!Le[5]&&void 0!==Sn.columnNumber&&(Pn[0].column=Sn.columnNumber+1),ce={url:Le[3],func:Le[1]||ve,args:Le[2]?Le[2].split(","):[],line:Le[4]?+Le[4]:null,column:Le[5]?+Le[5]:null}}!ce.func&&ce.line&&(ce.func=ve),Pn.push(ce)}return Pn.length?{message:be(Sn),name:Sn.name,stack:Pn}:null}(Sn),Pn)return me(Pn,Nt)}catch{}return{message:be(Sn),name:Sn&&Sn.name,stack:[],failed:!0}}function me(Sn,Pn){try{return(0,l.__assign)((0,l.__assign)({},Sn),{stack:Sn.stack.slice(Pn)})}catch{return Sn}}function be(Sn){var Pn=Sn&&Sn.message;return Pn?Pn.error&&"string"==typeof Pn.error.message?Pn.error.message:Pn:"No error message"}var le=50;function Z(Sn){var Pn=ke(Sn.stack),Nt={type:Sn.name,value:Sn.message};return Pn&&Pn.length&&(Nt.stacktrace={frames:Pn}),void 0===Nt.type&&""===Nt.value&&(Nt.value="Unrecoverable error caught"),Nt}function j(Sn){return{exception:{values:[Z(Sn)]}}}function ke(Sn){if(!Sn||!Sn.length)return[];var Pn=Sn,Nt=Pn[0].func||"",ai=Pn[Pn.length-1].func||"";return(-1!==Nt.indexOf("captureMessage")||-1!==Nt.indexOf("captureException"))&&(Pn=Pn.slice(1)),-1!==ai.indexOf("sentryWrapped")&&(Pn=Pn.slice(0,-1)),Pn.slice(0,le).map(function(hn){return{colno:null===hn.column?void 0:hn.column,filename:hn.url||Pn[0].url,function:hn.func||"?",in_app:!0,lineno:null===hn.line?void 0:hn.line}}).reverse()}function Be(Sn,Pn,Nt){var hn=mt(Pn,Nt&&Nt.syntheticException||void 0,{attachStacktrace:Sn.attachStacktrace});return(0,B.EG)(hn,{handled:!0,type:"generic"}),hn.level=D.z.Error,Nt&&Nt.event_id&&(hn.event_id=Nt.event_id),he.c.resolve(hn)}function nt(Sn,Pn,Nt,ai){void 0===Nt&&(Nt=D.z.Info);var Le=ut(Pn,ai&&ai.syntheticException||void 0,{attachStacktrace:Sn.attachStacktrace});return Le.level=Nt,ai&&ai.event_id&&(Le.event_id=ai.event_id),he.c.resolve(Le)}function mt(Sn,Pn,Nt){var ai;if(void 0===Nt&&(Nt={}),(0,ae.VW)(Sn)&&Sn.error)return ai=j(de(Sn=Sn.error));if((0,ae.TX)(Sn)||(0,ae.fm)(Sn)){var Le=Sn,ce=Le.name||((0,ae.TX)(Le)?"DOMError":"DOMException"),we=Le.message?ce+": "+Le.message:ce;return ai=ut(we,Pn,Nt),(0,B.Db)(ai,we),"code"in Le&&(ai.tags=(0,l.__assign)((0,l.__assign)({},ai.tags),{"DOMException.code":""+Le.code})),ai}return(0,ae.VZ)(Sn)?ai=j(de(Sn)):(0,ae.PO)(Sn)||(0,ae.cO)(Sn)?(ai=function Oe(Sn,Pn,Nt){var ai={exception:{values:[{type:(0,ae.cO)(Sn)?Sn.constructor.name:Nt?"UnhandledRejection":"Error",value:"Non-Error "+(Nt?"promise rejection":"exception")+" captured with keys: "+(0,X.zf)(Sn)}]},extra:{__serialized__:(0,X.Qy)(Sn)}};if(Pn){var Le=ke(de(Pn).stack);ai.stacktrace={frames:Le}}return ai}(Sn,Pn,Nt.rejection),(0,B.EG)(ai,{synthetic:!0}),ai):(ai=ut(Sn,Pn,Nt),(0,B.Db)(ai,""+Sn,void 0),(0,B.EG)(ai,{synthetic:!0}),ai)}function ut(Sn,Pn,Nt){void 0===Nt&&(Nt={});var ai={message:Sn};if(Nt.attachStacktrace&&Pn){var Le=ke(de(Pn).stack);ai.stacktrace={frames:Le}}return ai}var Ve=p(44641),tt=p(52376),Ne=p(61147),wt=p(36767),ft=function(){function Sn(Pn){this.options=Pn,this._buffer=new Ne.D(30),this._rateLimits={},this._api=new tt.b(Pn.dsn,Pn._metadata),this.url=this._api.getStoreEndpointWithUrlEncodedAuth()}return Sn.prototype.sendEvent=function(Pn){throw new wt.b("Transport Class has to implement `sendEvent` method")},Sn.prototype.close=function(Pn){return this._buffer.drain(Pn)},Sn.prototype._handleResponse=function(Pn){var Nt=Pn.requestType,ai=Pn.response,hn=Pn.headers,Le=Pn.resolve,ce=Pn.reject,we=g.q.fromHttpCode(ai.status);this._handleRateLimit(hn)&&Y.k.warn("Too many requests, backing off until: "+this._disabledUntil(Nt)),we!==g.q.Success?ce(ai):Le({status:we})},Sn.prototype._disabledUntil=function(Pn){return this._rateLimits[Pn]||this._rateLimits.all},Sn.prototype._isRateLimited=function(Pn){return this._disabledUntil(Pn)>new Date(Date.now())},Sn.prototype._handleRateLimit=function(Pn){var Nt,ai,hn,Le,ce=Date.now(),we=Pn["x-sentry-rate-limits"],Qe=Pn["retry-after"];if(we){try{for(var qt=(0,l.__values)(we.trim().split(",")),Tn=qt.next();!Tn.done;Tn=qt.next()){var mo=Tn.value.split(":",2),rr=parseInt(mo[0],10),aa=1e3*(isNaN(rr)?60:rr);try{for(var ea=(hn=void 0,(0,l.__values)(mo[1].split(";"))),Bo=ea.next();!Bo.done;Bo=ea.next()){var Ii=Bo.value;this._rateLimits[Ii||"all"]=new Date(ce+aa)}}catch(an){hn={error:an}}finally{try{Bo&&!Bo.done&&(Le=ea.return)&&Le.call(ea)}finally{if(hn)throw hn.error}}}}catch(an){Nt={error:an}}finally{try{Tn&&!Tn.done&&(ai=qt.return)&&ai.call(qt)}finally{if(Nt)throw Nt.error}}return!0}return!!Qe&&(this._rateLimits.all=new Date(ce+(0,B.JY)(ce,Qe)),!0)},Sn}(),Ct=(0,B.Rf)(),rn=function(Sn){function Pn(){return null!==Sn&&Sn.apply(this,arguments)||this}return(0,l.__extends)(Pn,Sn),Pn.prototype.sendEvent=function(Nt){return this._sendRequest((0,Ve.n)(Nt,this._api),Nt)},Pn.prototype.sendSession=function(Nt){return this._sendRequest((0,Ve.Q)(Nt,this._api),Nt)},Pn.prototype._sendRequest=function(Nt,ai){var hn=this;if(this._isRateLimited(Nt.type))return Promise.reject({event:ai,type:Nt.type,reason:"Transport locked till "+this._disabledUntil(Nt.type)+" due to too many requests.",status:429});var Le={body:Nt.body,method:"POST",referrerPolicy:(0,ue.hv)()?"origin":""};return void 0!==this.options.fetchParameters&&Object.assign(Le,this.options.fetchParameters),void 0!==this.options.headers&&(Le.headers=this.options.headers),this._buffer.add(new he.c(function(ce,we){Ct.fetch(Nt.url,Le).then(function(Qe){var qt={"x-sentry-rate-limits":Qe.headers.get("X-Sentry-Rate-Limits"),"retry-after":Qe.headers.get("Retry-After")};hn._handleResponse({requestType:Nt.type,response:Qe,headers:qt,resolve:ce,reject:we})}).catch(we)}))},Pn}(ft),He=function(Sn){function Pn(){return null!==Sn&&Sn.apply(this,arguments)||this}return(0,l.__extends)(Pn,Sn),Pn.prototype.sendEvent=function(Nt){return this._sendRequest((0,Ve.n)(Nt,this._api),Nt)},Pn.prototype.sendSession=function(Nt){return this._sendRequest((0,Ve.Q)(Nt,this._api),Nt)},Pn.prototype._sendRequest=function(Nt,ai){var hn=this;return this._isRateLimited(Nt.type)?Promise.reject({event:ai,type:Nt.type,reason:"Transport locked till "+this._disabledUntil(Nt.type)+" due to too many requests.",status:429}):this._buffer.add(new he.c(function(Le,ce){var we=new XMLHttpRequest;for(var Qe in we.onreadystatechange=function(){if(4===we.readyState){var qt={"x-sentry-rate-limits":we.getResponseHeader("X-Sentry-Rate-Limits"),"retry-after":we.getResponseHeader("Retry-After")};hn._handleResponse({requestType:Nt.type,response:we,headers:qt,resolve:Le,reject:ce})}},we.open("POST",Nt.url),hn.options.headers)hn.options.headers.hasOwnProperty(Qe)&&we.setRequestHeader(Qe,hn.options.headers[Qe]);we.send(Nt.body)}))},Pn}(ft),st=function(Sn){function Pn(){return null!==Sn&&Sn.apply(this,arguments)||this}return(0,l.__extends)(Pn,Sn),Pn.prototype.eventFromException=function(Nt,ai){return Be(this._options,Nt,ai)},Pn.prototype.eventFromMessage=function(Nt,ai,hn){return void 0===ai&&(ai=D.z.Info),nt(this._options,Nt,ai,hn)},Pn.prototype._setupTransport=function(){if(!this._options.dsn)return Sn.prototype._setupTransport.call(this);var Nt=(0,l.__assign)((0,l.__assign)({},this._options.transportOptions),{dsn:this._options.dsn,_metadata:this._options._metadata});return this._options.transport?new this._options.transport(Nt):(0,ue.Ak)()?new rn(Nt):new He(Nt)},Pn}(V.N),nn=0;function Dn(){return nn>0}function vi(Sn,Pn,Nt){if(void 0===Pn&&(Pn={}),"function"!=typeof Sn)return Sn;try{if(Sn.__sentry__)return Sn;if(Sn.__sentry_wrapped__)return Sn.__sentry_wrapped__}catch{return Sn}var ai=function(){var ce=Array.prototype.slice.call(arguments);try{Nt&&"function"==typeof Nt&&Nt.apply(this,arguments);var we=ce.map(function(Qe){return vi(Qe,Pn)});return Sn.handleEvent?Sn.handleEvent.apply(this,we):Sn.apply(this,we)}catch(Qe){throw function Mn(){nn+=1,setTimeout(function(){nn-=1})}(),(0,T.$e)(function(qt){qt.addEventProcessor(function(Tn){var lr=(0,l.__assign)({},Tn);return Pn.mechanism&&((0,B.Db)(lr,void 0,void 0),(0,B.EG)(lr,Pn.mechanism)),lr.extra=(0,l.__assign)((0,l.__assign)({},lr.extra),{arguments:ce}),lr}),(0,T.Tb)(Qe)}),Qe}};try{for(var hn in Sn)Object.prototype.hasOwnProperty.call(Sn,hn)&&(ai[hn]=Sn[hn])}catch{}Sn.prototype=Sn.prototype||{},ai.prototype=Sn.prototype,Object.defineProperty(Sn,"__sentry_wrapped__",{enumerable:!1,value:ai}),Object.defineProperties(ai,{__sentry__:{enumerable:!1,value:!0},__sentry_original__:{enumerable:!1,value:Sn}});try{Object.getOwnPropertyDescriptor(ai,"name").configurable&&Object.defineProperty(ai,"name",{get:function(){return Sn.name}})}catch{}return ai}function Gi(Sn){if(void 0===Sn&&(Sn={}),Sn.eventId)if(Sn.dsn){var Pn=document.createElement("script");Pn.async=!0,Pn.src=new tt.b(Sn.dsn).getReportDialogEndpoint(Sn),Sn.onLoad&&(Pn.onload=Sn.onLoad),(document.head||document.body).appendChild(Pn)}else Y.k.error("Missing dsn option in showReportDialog call");else Y.k.error("Missing eventId option in showReportDialog call")}var mi=p(43343),wi=p(21090),Bn=p(36477),kn=function(){function Sn(Pn){this.name=Sn.id,this._options=(0,l.__assign)({console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0},Pn)}return Sn.prototype.addSentryBreadcrumb=function(Pn){this._options.sentry&&(0,n.Gd)().addBreadcrumb({category:"sentry."+("transaction"===Pn.type?"transaction":"event"),event_id:Pn.event_id,level:Pn.level,message:(0,B.jH)(Pn)},{event:Pn})},Sn.prototype.setupOnce=function(){var Pn=this;this._options.console&&(0,mi.o)({callback:function(){for(var Nt=[],ai=0;ai<arguments.length;ai++)Nt[ai]=arguments[ai];Pn._consoleBreadcrumb.apply(Pn,(0,l.__spread)(Nt))},type:"console"}),this._options.dom&&(0,mi.o)({callback:function(){for(var Nt=[],ai=0;ai<arguments.length;ai++)Nt[ai]=arguments[ai];Pn._domBreadcrumb.apply(Pn,(0,l.__spread)(Nt))},type:"dom"}),this._options.xhr&&(0,mi.o)({callback:function(){for(var Nt=[],ai=0;ai<arguments.length;ai++)Nt[ai]=arguments[ai];Pn._xhrBreadcrumb.apply(Pn,(0,l.__spread)(Nt))},type:"xhr"}),this._options.fetch&&(0,mi.o)({callback:function(){for(var Nt=[],ai=0;ai<arguments.length;ai++)Nt[ai]=arguments[ai];Pn._fetchBreadcrumb.apply(Pn,(0,l.__spread)(Nt))},type:"fetch"}),this._options.history&&(0,mi.o)({callback:function(){for(var Nt=[],ai=0;ai<arguments.length;ai++)Nt[ai]=arguments[ai];Pn._historyBreadcrumb.apply(Pn,(0,l.__spread)(Nt))},type:"history"})},Sn.prototype._consoleBreadcrumb=function(Pn){var Nt={category:"console",data:{arguments:Pn.args,logger:"console"},level:D.z.fromString(Pn.level),message:(0,wi.nK)(Pn.args," ")};if("assert"===Pn.level){if(!1!==Pn.args[0])return;Nt.message="Assertion failed: "+((0,wi.nK)(Pn.args.slice(1)," ")||"console.assert"),Nt.data.arguments=Pn.args.slice(1)}(0,n.Gd)().addBreadcrumb(Nt,{input:Pn.args,level:Pn.level})},Sn.prototype._domBreadcrumb=function(Pn){var Nt;try{Nt=Pn.event.target?(0,Bn.R)(Pn.event.target):(0,Bn.R)(Pn.event)}catch{Nt="<unknown>"}0!==Nt.length&&(0,n.Gd)().addBreadcrumb({category:"ui."+Pn.name,message:Nt},{event:Pn.event,name:Pn.name,global:Pn.global})},Sn.prototype._xhrBreadcrumb=function(Pn){if(Pn.endTimestamp){if(Pn.xhr.__sentry_own_request__)return;var Nt=Pn.xhr.__sentry_xhr__||{},ai=Nt.method,hn=Nt.url,Le=Nt.status_code,ce=Nt.body;(0,n.Gd)().addBreadcrumb({category:"xhr",data:{method:ai,url:hn,status_code:Le},type:"http"},{xhr:Pn.xhr,input:ce})}else;},Sn.prototype._fetchBreadcrumb=function(Pn){Pn.endTimestamp&&(Pn.fetchData.url.match(/sentry_key/)&&"POST"===Pn.fetchData.method||(Pn.error?(0,n.Gd)().addBreadcrumb({category:"fetch",data:Pn.fetchData,level:D.z.Error,type:"http"},{data:Pn.error,input:Pn.args}):(0,n.Gd)().addBreadcrumb({category:"fetch",data:(0,l.__assign)((0,l.__assign)({},Pn.fetchData),{status_code:Pn.response.status}),type:"http"},{input:Pn.args,response:Pn.response})))},Sn.prototype._historyBreadcrumb=function(Pn){var Nt=(0,B.Rf)(),ai=Pn.from,hn=Pn.to,Le=(0,B.en)(Nt.location.href),ce=(0,B.en)(ai),we=(0,B.en)(hn);ce.path||(ce=Le),Le.protocol===we.protocol&&Le.host===we.host&&(hn=we.relative),Le.protocol===ce.protocol&&Le.host===ce.host&&(ai=ce.relative),(0,n.Gd)().addBreadcrumb({category:"navigation",data:{from:ai,to:hn}})},Sn.id="Breadcrumbs",Sn}(),On=function(Sn){function Pn(Nt){return void 0===Nt&&(Nt={}),Sn.call(this,st,Nt)||this}return(0,l.__extends)(Pn,Sn),Pn.prototype.showReportDialog=function(Nt){if(void 0===Nt&&(Nt={}),(0,B.Rf)().document){if(!this._isEnabled())return void Y.k.error("Trying to call showReportDialog with Sentry Client disabled");Gi((0,l.__assign)((0,l.__assign)({},Nt),{dsn:Nt.dsn||this.getDsn()}))}},Pn.prototype._prepareEvent=function(Nt,ai,hn){return Nt.platform=Nt.platform||"javascript",Sn.prototype._prepareEvent.call(this,Nt,ai,hn)},Pn.prototype._sendEvent=function(Nt){var ai=this.getIntegration(kn);ai&&ai.addSentryBreadcrumb(Nt),Sn.prototype._sendEvent.call(this,Nt)},Pn}(w.W),je=p(1752),Bt=p(44371),xn=p(59973),Fn=p(19725),ui=["EventTarget","Window","Node","ApplicationCache","AudioTrackList","ChannelMergerNode","CryptoOperation","EventSource","FileReader","HTMLUnknownElement","IDBDatabase","IDBRequest","IDBTransaction","KeyOperation","MediaController","MessagePort","ModalWindow","Notification","SVGElementInstance","Screen","TextTrack","TextTrackCue","TextTrackList","WebSocket","WebSocketWorker","Worker","XMLHttpRequest","XMLHttpRequestEventTarget","XMLHttpRequestUpload"],Ai=function(){function Sn(Pn){this.name=Sn.id,this._options=(0,l.__assign)({XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0},Pn)}return Sn.prototype.setupOnce=function(){var Pn=(0,B.Rf)();(this._options.setTimeout&&(0,X.hl)(Pn,"setTimeout",this._wrapTimeFunction.bind(this)),this._options.setInterval&&(0,X.hl)(Pn,"setInterval",this._wrapTimeFunction.bind(this)),this._options.requestAnimationFrame&&(0,X.hl)(Pn,"requestAnimationFrame",this._wrapRAF.bind(this)),this._options.XMLHttpRequest&&"XMLHttpRequest"in Pn&&(0,X.hl)(XMLHttpRequest.prototype,"send",this._wrapXHR.bind(this)),this._options.eventTarget)&&(Array.isArray(this._options.eventTarget)?this._options.eventTarget:ui).forEach(this._wrapEventTarget.bind(this))},Sn.prototype._wrapTimeFunction=function(Pn){return function(){for(var Nt=[],ai=0;ai<arguments.length;ai++)Nt[ai]=arguments[ai];var hn=Nt[0];return Nt[0]=vi(hn,{mechanism:{data:{function:(0,Fn.$)(Pn)},handled:!0,type:"instrument"}}),Pn.apply(this,Nt)}},Sn.prototype._wrapRAF=function(Pn){return function(Nt){return Pn.call(this,vi(Nt,{mechanism:{data:{function:"requestAnimationFrame",handler:(0,Fn.$)(Pn)},handled:!0,type:"instrument"}}))}},Sn.prototype._wrapEventTarget=function(Pn){var Nt=(0,B.Rf)(),ai=Nt[Pn]&&Nt[Pn].prototype;!ai||!ai.hasOwnProperty||!ai.hasOwnProperty("addEventListener")||((0,X.hl)(ai,"addEventListener",function(hn){return function(Le,ce,we){try{"function"==typeof ce.handleEvent&&(ce.handleEvent=vi(ce.handleEvent.bind(ce),{mechanism:{data:{function:"handleEvent",handler:(0,Fn.$)(ce),target:Pn},handled:!0,type:"instrument"}}))}catch{}return hn.call(this,Le,vi(ce,{mechanism:{data:{function:"addEventListener",handler:(0,Fn.$)(ce),target:Pn},handled:!0,type:"instrument"}}),we)}}),(0,X.hl)(ai,"removeEventListener",function(hn){return function(Le,ce,we){var Qe,qt=ce;try{var Tn=null===(Qe=qt)||void 0===Qe?void 0:Qe.__sentry_wrapped__;Tn&&hn.call(this,Le,Tn,we)}catch{}return hn.call(this,Le,qt,we)}}))},Sn.prototype._wrapXHR=function(Pn){return function(){for(var Nt=[],ai=0;ai<arguments.length;ai++)Nt[ai]=arguments[ai];var hn=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(function(ce){ce in hn&&"function"==typeof hn[ce]&&(0,X.hl)(hn,ce,function(we){var Qe={mechanism:{data:{function:ce,handler:(0,Fn.$)(we)},handled:!0,type:"instrument"}};return we.__sentry_original__&&(Qe.mechanism.data.handler=(0,Fn.$)(we.__sentry_original__)),vi(we,Qe)})}),Pn.apply(this,Nt)}},Sn.id="TryCatch",Sn}(),si=function(){function Sn(Pn){this.name=Sn.id,this._onErrorHandlerInstalled=!1,this._onUnhandledRejectionHandlerInstalled=!1,this._options=(0,l.__assign)({onerror:!0,onunhandledrejection:!0},Pn)}return Sn.prototype.setupOnce=function(){Error.stackTraceLimit=50,this._options.onerror&&(Y.k.log("Global Handler attached: onerror"),this._installGlobalOnErrorHandler()),this._options.onunhandledrejection&&(Y.k.log("Global Handler attached: onunhandledrejection"),this._installGlobalOnUnhandledRejectionHandler())},Sn.prototype._installGlobalOnErrorHandler=function(){var Pn=this;this._onErrorHandlerInstalled||((0,mi.o)({callback:function(Nt){var ai=Nt.error,hn=(0,n.Gd)(),Le=hn.getIntegration(Sn),ce=ai&&!0===ai.__sentry_own_request__;if(Le&&!Dn()&&!ce){var we=hn.getClient(),Qe=(0,ae.pt)(ai)?Pn._eventFromIncompleteOnError(Nt.msg,Nt.url,Nt.line,Nt.column):Pn._enhanceEventWithInitialFrame(mt(ai,void 0,{attachStacktrace:we&&we.getOptions().attachStacktrace,rejection:!1}),Nt.url,Nt.line,Nt.column);(0,B.EG)(Qe,{handled:!1,type:"onerror"}),hn.captureEvent(Qe,{originalException:ai})}},type:"error"}),this._onErrorHandlerInstalled=!0)},Sn.prototype._installGlobalOnUnhandledRejectionHandler=function(){var Pn=this;this._onUnhandledRejectionHandlerInstalled||((0,mi.o)({callback:function(Nt){var ai=Nt;try{"reason"in Nt?ai=Nt.reason:"detail"in Nt&&"reason"in Nt.detail&&(ai=Nt.detail.reason)}catch{}var hn=(0,n.Gd)(),Le=hn.getIntegration(Sn),ce=ai&&!0===ai.__sentry_own_request__;if(!Le||Dn()||ce)return!0;var we=hn.getClient(),Qe=(0,ae.pt)(ai)?Pn._eventFromRejectionWithPrimitive(ai):mt(ai,void 0,{attachStacktrace:we&&we.getOptions().attachStacktrace,rejection:!0});Qe.level=D.z.Error,(0,B.EG)(Qe,{handled:!1,type:"onunhandledrejection"}),hn.captureEvent(Qe,{originalException:ai})},type:"unhandledrejection"}),this._onUnhandledRejectionHandlerInstalled=!0)},Sn.prototype._eventFromIncompleteOnError=function(Pn,Nt,ai,hn){var we,ce=(0,ae.VW)(Pn)?Pn.message:Pn;if((0,ae.HD)(ce)){var Qe=ce.match(/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i);Qe&&(we=Qe[1],ce=Qe[2])}var qt={exception:{values:[{type:we||"Error",value:ce}]}};return this._enhanceEventWithInitialFrame(qt,Nt,ai,hn)},Sn.prototype._eventFromRejectionWithPrimitive=function(Pn){return{exception:{values:[{type:"UnhandledRejection",value:"Non-Error promise rejection captured with value: "+String(Pn)}]}}},Sn.prototype._enhanceEventWithInitialFrame=function(Pn,Nt,ai,hn){Pn.exception=Pn.exception||{},Pn.exception.values=Pn.exception.values||[],Pn.exception.values[0]=Pn.exception.values[0]||{},Pn.exception.values[0].stacktrace=Pn.exception.values[0].stacktrace||{},Pn.exception.values[0].stacktrace.frames=Pn.exception.values[0].stacktrace.frames||[];var Le=isNaN(parseInt(hn,10))?void 0:hn,ce=isNaN(parseInt(ai,10))?void 0:ai,we=(0,ae.HD)(Nt)&&Nt.length>0?Nt:(0,B.l4)();return 0===Pn.exception.values[0].stacktrace.frames.length&&Pn.exception.values[0].stacktrace.frames.push({colno:Le,filename:we,function:"?",in_app:!0,lineno:ce}),Pn},Sn.id="GlobalHandlers",Sn}(),Vi="cause",Vn=5,Hn=function(){function Sn(Pn){void 0===Pn&&(Pn={}),this.name=Sn.id,this._key=Pn.key||Vi,this._limit=Pn.limit||Vn}return Sn.prototype.setupOnce=function(){(0,E.c)(function(Pn,Nt){var ai=(0,n.Gd)().getIntegration(Sn);return ai?ai._handler(Pn,Nt):Pn})},Sn.prototype._handler=function(Pn,Nt){if(!(Pn.exception&&Pn.exception.values&&Nt&&(0,ae.V9)(Nt.originalException,Error)))return Pn;var ai=this._walkErrorTree(Nt.originalException,this._key);return Pn.exception.values=(0,l.__spread)(ai,Pn.exception.values),Pn},Sn.prototype._walkErrorTree=function(Pn,Nt,ai){if(void 0===ai&&(ai=[]),!(0,ae.V9)(Pn[Nt],Error)||ai.length+1>=this._limit)return ai;var Le=Z(de(Pn[Nt]));return this._walkErrorTree(Pn[Nt],Nt,(0,l.__spread)([Le],ai))},Sn.id="LinkedErrors",Sn}(),An=(0,B.Rf)(),vn=function(){function Sn(){this.name=Sn.id}return Sn.prototype.setupOnce=function(){(0,E.c)(function(Pn){var Nt,ai,hn;if((0,n.Gd)().getIntegration(Sn)){if(!An.navigator&&!An.location&&!An.document)return Pn;var Le=(null===(Nt=Pn.request)||void 0===Nt?void 0:Nt.url)||(null===(ai=An.location)||void 0===ai?void 0:ai.href),ce=(An.document||{}).referrer,we=(An.navigator||{}).userAgent,Qe=(0,l.__assign)((0,l.__assign)((0,l.__assign)({},null===(hn=Pn.request)||void 0===hn?void 0:hn.headers),ce&&{Referer:ce}),we&&{"User-Agent":we}),qt=(0,l.__assign)((0,l.__assign)({},Le&&{url:Le}),{headers:Qe});return(0,l.__assign)((0,l.__assign)({},Pn),{request:qt})}return Pn})},Sn.id="UserAgent",Sn}(),In=[new je.Q,new Bt.c,new Ai,new kn,new si,new Hn,new vn];function Zi(Sn){if(void 0===Sn&&(Sn={}),void 0===Sn.defaultIntegrations&&(Sn.defaultIntegrations=In),void 0===Sn.release){var Pn=(0,B.Rf)();Pn.SENTRY_RELEASE&&Pn.SENTRY_RELEASE.id&&(Sn.release=Pn.SENTRY_RELEASE.id)}void 0===Sn.autoSessionTracking&&(Sn.autoSessionTracking=!0),Sn._metadata=Sn._metadata||{},Sn._metadata.sdk={name:"sentry.javascript.browser",packages:[{name:"npm:@sentry/browser",version:P.J}],version:P.J},(0,xn.M)(On,Sn),Sn.autoSessionTracking&&function ct(){var Sn=(0,B.Rf)(),Pn=Sn.document;if(typeof Pn>"u")return void Y.k.warn("Session tracking in non-browser environment with @sentry/browser is not supported.");var Nt=(0,n.Gd)();Nt.startSession(),Nt.captureSession(),(0,mi.o)({callback:function(){Nt.startSession(),Nt.captureSession()},type:"history"})}()}function gr(Sn){void 0===Sn&&(Sn={}),Sn.eventId||(Sn.eventId=(0,n.Gd)().lastEventId());var Pn=(0,n.Gd)().getClient();Pn&&Pn.showReportDialog(Sn)}function Hi(){return(0,n.Gd)().lastEventId()}function Gr(){}function zr(Sn){Sn()}function Eo(Sn){var Pn=(0,n.Gd)().getClient();return Pn?Pn.flush(Sn):he.c.reject(!1)}function mr(Sn){var Pn=(0,n.Gd)().getClient();return Pn?Pn.close(Sn):he.c.reject(!1)}function jn(Sn){return vi(Sn)()}var Yt="sentry.javascript.browser",oi=p(57989),Ni={},Nn=(0,B.Rf)();Nn.Sentry&&Nn.Sentry.Integrations&&(Ni=Nn.Sentry.Integrations);var pr=(0,l.__assign)((0,l.__assign)((0,l.__assign)({},Ni),oi),o)},52376:(qe,I,p)=>{"use strict";p.d(I,{b:()=>D});var o=p(18438),e=p(57759),D=function(){function g(E,T){void 0===T&&(T={}),this.dsn=E,this._dsnObject=new o.l(E),this.metadata=T}return g.prototype.getDsn=function(){return this._dsnObject},g.prototype.getBaseApiEndpoint=function(){var E=this._dsnObject,T=E.protocol?E.protocol+":":"",n=E.port?":"+E.port:"";return T+"//"+E.host+n+(E.path?"/"+E.path:"")+"/api/"},g.prototype.getStoreEndpoint=function(){return this._getIngestEndpoint("store")},g.prototype.getStoreEndpointWithUrlEncodedAuth=function(){return this.getStoreEndpoint()+"?"+this._encodedAuth()},g.prototype.getEnvelopeEndpointWithUrlEncodedAuth=function(){return this._getEnvelopeEndpoint()+"?"+this._encodedAuth()},g.prototype.getStoreEndpointPath=function(){var E=this._dsnObject;return(E.path?"/"+E.path:"")+"/api/"+E.projectId+"/store/"},g.prototype.getRequestHeaders=function(E,T){var n=this._dsnObject,P=["Sentry sentry_version=7"];return P.push("sentry_client="+E+"/"+T),P.push("sentry_key="+n.publicKey),n.pass&&P.push("sentry_secret="+n.pass),{"Content-Type":"application/json","X-Sentry-Auth":P.join(", ")}},g.prototype.getReportDialogEndpoint=function(E){void 0===E&&(E={});var T=this._dsnObject,n=this.getBaseApiEndpoint()+"embed/error-page/",P=[];for(var w in P.push("dsn="+T.toString()),E)if("dsn"!==w)if("user"===w){if(!E.user)continue;E.user.name&&P.push("name="+encodeURIComponent(E.user.name)),E.user.email&&P.push("email="+encodeURIComponent(E.user.email))}else P.push(encodeURIComponent(w)+"="+encodeURIComponent(E[w]));return P.length?n+"?"+P.join("&"):n},g.prototype._getEnvelopeEndpoint=function(){return this._getIngestEndpoint("envelope")},g.prototype._getIngestEndpoint=function(E){return""+this.getBaseApiEndpoint()+this._dsnObject.projectId+"/"+E+"/"},g.prototype._encodedAuth=function(){var T={sentry_key:this._dsnObject.publicKey,sentry_version:"7"};return(0,e._j)(T)},g}()},73473:(qe,I,p)=>{"use strict";p.d(I,{N:()=>D});var o=p(11446),e=p(36767),l=p(98479),D=function(){function g(E){this._options=E,this._options.dsn||o.k.warn("No DSN provided, backend will not do anything."),this._transport=this._setupTransport()}return g.prototype.eventFromException=function(E,T){throw new e.b("Backend has to implement `eventFromException` method")},g.prototype.eventFromMessage=function(E,T,n){throw new e.b("Backend has to implement `eventFromMessage` method")},g.prototype.sendEvent=function(E){this._transport.sendEvent(E).then(null,function(T){o.k.error("Error while sending event: "+T)})},g.prototype.sendSession=function(E){this._transport.sendSession?this._transport.sendSession(E).then(null,function(T){o.k.error("Error while sending session: "+T)}):o.k.warn("Dropping session because custom transport doesn't implement sendSession")},g.prototype.getTransport=function(){return this._transport},g.prototype._setupTransport=function(){return new l.V},g}()},22159:(qe,I,p)=>{"use strict";p.d(I,{W:()=>ve});var o=p(51421),e=p(10383),l=p(11041),D=p(18438),g=p(96412),E=p(11446),T=p(30509),n=p(15535),P=p(43967),w=p(57759),B=p(21090),Y=p(36767),V=p(19248),ue=[];function X(ye){var ge={};return function he(ye){var ge=ye.defaultIntegrations&&(0,o.fl)(ye.defaultIntegrations)||[],ne=ye.integrations,pe=[];if(Array.isArray(ne)){var Pe=ne.map(function(oe){return oe.name}),xe=[];ge.forEach(function(oe){-1===Pe.indexOf(oe.name)&&-1===xe.indexOf(oe.name)&&(pe.push(oe),xe.push(oe.name))}),ne.forEach(function(oe){-1===xe.indexOf(oe.name)&&(pe.push(oe),xe.push(oe.name))})}else"function"==typeof ne?(pe=ne(ge),pe=Array.isArray(pe)?pe:[pe]):pe=(0,o.fl)(ge);var de=pe.map(function(oe){return oe.name});return-1!==de.indexOf("Debug")&&pe.push.apply(pe,(0,o.fl)(pe.splice(de.indexOf("Debug"),1))),pe}(ye).forEach(function(ne){ge[ne.name]=ne,function ae(ye){-1===ue.indexOf(ye.name)&&(ye.setupOnce(e.c,V.Gd),ue.push(ye.name),E.k.log("Integration installed: "+ye.name))}(ne)}),ge}var ve=function(){function ye(ge,ne){this._integrations={},this._processing=0,this._backend=new ge(ne),this._options=ne,ne.dsn&&(this._dsn=new D.l(ne.dsn))}return ye.prototype.captureException=function(ge,ne,pe){var Pe=this,xe=ne&&ne.event_id;return this._process(this._getBackend().eventFromException(ge,ne).then(function(de){return Pe._captureEvent(de,ne,pe)}).then(function(de){xe=de})),xe},ye.prototype.captureMessage=function(ge,ne,pe,Pe){var xe=this,de=pe&&pe.event_id,re=(0,g.pt)(ge)?this._getBackend().eventFromMessage(String(ge),ne,pe):this._getBackend().eventFromException(ge,pe);return this._process(re.then(function(oe){return xe._captureEvent(oe,pe,Pe)}).then(function(oe){de=oe})),de},ye.prototype.captureEvent=function(ge,ne,pe){var Pe=ne&&ne.event_id;return this._process(this._captureEvent(ge,ne,pe).then(function(xe){Pe=xe})),Pe},ye.prototype.captureSession=function(ge){ge.release?(this._sendSession(ge),ge.update({init:!1})):E.k.warn("Discarded session because of missing release")},ye.prototype.getDsn=function(){return this._dsn},ye.prototype.getOptions=function(){return this._options},ye.prototype.flush=function(ge){var ne=this;return this._isClientProcessing(ge).then(function(pe){return ne._getBackend().getTransport().close(ge).then(function(Pe){return pe&&Pe})})},ye.prototype.close=function(ge){var ne=this;return this.flush(ge).then(function(pe){return ne.getOptions().enabled=!1,pe})},ye.prototype.setupIntegrations=function(){this._isEnabled()&&(this._integrations=X(this._options))},ye.prototype.getIntegration=function(ge){try{return this._integrations[ge.id]||null}catch{return E.k.warn("Cannot retrieve integration "+ge.id+" from the current Client"),null}},ye.prototype._updateSessionFromEvent=function(ge,ne){var pe,Pe,re,xe=!1,de=!1,oe=ne.exception&&ne.exception.values;if(oe){de=!0;try{for(var me=(0,o.XA)(oe),be=me.next();!be.done;be=me.next()){var Z=be.value.mechanism;if(Z&&!1===Z.handled){xe=!0;break}}}catch(Be){pe={error:Be}}finally{try{be&&!be.done&&(Pe=me.return)&&Pe.call(me)}finally{if(pe)throw pe.error}}}var Oe=ne.user;if(!ge.userAgent){var j=ne.request?ne.request.headers:{};for(var ke in j)if("user-agent"===ke.toLowerCase()){re=j[ke];break}}ge.update((0,o.pi)((0,o.pi)({},xe&&{status:l.$.Crashed}),{user:Oe,userAgent:re,errors:ge.errors+Number(de||xe)})),this.captureSession(ge)},ye.prototype._sendSession=function(ge){this._getBackend().sendSession(ge)},ye.prototype._isClientProcessing=function(ge){var ne=this;return new T.c(function(pe){var Pe=0,de=setInterval(function(){0==ne._processing?(clearInterval(de),pe(!0)):(Pe+=1,ge&&Pe>=ge&&(clearInterval(de),pe(!1)))},1)})},ye.prototype._getBackend=function(){return this._backend},ye.prototype._isEnabled=function(){return!1!==this.getOptions().enabled&&void 0!==this._dsn},ye.prototype._prepareEvent=function(ge,ne,pe){var Pe=this,xe=this.getOptions().normalizeDepth,de=void 0===xe?3:xe,re=(0,o.pi)((0,o.pi)({},ge),{event_id:ge.event_id||(pe&&pe.event_id?pe.event_id:(0,n.DM)()),timestamp:ge.timestamp||(0,P.yW)()});this._applyClientOptions(re),this._applyIntegrationsMetadata(re);var oe=ne;pe&&pe.captureContext&&(oe=e.s.clone(oe).update(pe.captureContext));var me=T.c.resolve(re);return oe&&(me=oe.applyToEvent(re,pe)),me.then(function(be){return"number"==typeof de&&de>0?Pe._normalizeEvent(be,de):be})},ye.prototype._normalizeEvent=function(ge,ne){if(!ge)return null;var pe=(0,o.pi)((0,o.pi)((0,o.pi)((0,o.pi)((0,o.pi)({},ge),ge.breadcrumbs&&{breadcrumbs:ge.breadcrumbs.map(function(Pe){return(0,o.pi)((0,o.pi)({},Pe),Pe.data&&{data:(0,w.Fv)(Pe.data,ne)})})}),ge.user&&{user:(0,w.Fv)(ge.user,ne)}),ge.contexts&&{contexts:(0,w.Fv)(ge.contexts,ne)}),ge.extra&&{extra:(0,w.Fv)(ge.extra,ne)});return ge.contexts&&ge.contexts.trace&&(pe.contexts.trace=ge.contexts.trace),pe},ye.prototype._applyClientOptions=function(ge){var ne=this.getOptions(),pe=ne.environment,Pe=ne.release,xe=ne.dist,de=ne.maxValueLength,re=void 0===de?250:de;"environment"in ge||(ge.environment="environment"in ne?pe:"production"),void 0===ge.release&&void 0!==Pe&&(ge.release=Pe),void 0===ge.dist&&void 0!==xe&&(ge.dist=xe),ge.message&&(ge.message=(0,B.$G)(ge.message,re));var oe=ge.exception&&ge.exception.values&&ge.exception.values[0];oe&&oe.value&&(oe.value=(0,B.$G)(oe.value,re));var me=ge.request;me&&me.url&&(me.url=(0,B.$G)(me.url,re))},ye.prototype._applyIntegrationsMetadata=function(ge){var ne=ge.sdk,pe=Object.keys(this._integrations);ne&&pe.length>0&&(ne.integrations=pe)},ye.prototype._sendEvent=function(ge){this._getBackend().sendEvent(ge)},ye.prototype._captureEvent=function(ge,ne,pe){return this._processEvent(ge,ne,pe).then(function(Pe){return Pe.event_id},function(Pe){E.k.error(Pe)})},ye.prototype._processEvent=function(ge,ne,pe){var Pe=this,xe=this.getOptions(),de=xe.beforeSend,re=xe.sampleRate;if(!this._isEnabled())return T.c.reject(new Y.b("SDK not enabled, will not send event."));var oe="transaction"===ge.type;return!oe&&"number"==typeof re&&Math.random()>re?T.c.reject(new Y.b("Discarding event because it's not included in the random sample (sampling rate = "+re+")")):this._prepareEvent(ge,pe,ne).then(function(me){if(null===me)throw new Y.b("An event processor returned null, will not send event.");if(ne&&ne.data&&!0===ne.data.__sentry__||oe||!de)return me;var le=de(me,ne);if(typeof le>"u")throw new Y.b("`beforeSend` method has to return `null` or a valid event.");return(0,g.J8)(le)?le.then(function(Z){return Z},function(Z){throw new Y.b("beforeSend rejected with "+Z)}):le}).then(function(me){if(null===me)throw new Y.b("`beforeSend` returned `null`, will not send event.");var be=pe&&pe.getSession&&pe.getSession();return!oe&&be&&Pe._updateSessionFromEvent(be,me),Pe._sendEvent(me),me}).then(null,function(me){throw me instanceof Y.b?me:(Pe.captureException(me,{data:{__sentry__:!0},originalException:me}),new Y.b("Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.\nReason: "+me))})},ye.prototype._process=function(ge){var ne=this;this._processing+=1,ge.then(function(pe){return ne._processing-=1,pe},function(pe){return ne._processing-=1,pe})},ye}()},87695:(qe,I,p)=>{"use strict";p.r(I),p.d(I,{API:()=>D.b,BaseBackend:()=>E.N,BaseClient:()=>g.W,Hub:()=>l.Xb,Integrations:()=>B,NoopTransport:()=>P.V,SDK_VERSION:()=>w.J,Scope:()=>e.s,addBreadcrumb:()=>o.n_,addGlobalEventProcessor:()=>e.c,captureEvent:()=>o.eN,captureException:()=>o.Tb,captureMessage:()=>o.uT,configureScope:()=>o.e,eventToSentryRequest:()=>T.n,getCurrentHub:()=>l.Gd,getHubFromCarrier:()=>l.vi,initAndBind:()=>n.M,makeMain:()=>l.pj,sessionToSentryRequest:()=>T.Q,setContext:()=>o.v,setExtra:()=>o.sU,setExtras:()=>o.rJ,setTag:()=>o.YA,setTags:()=>o.mG,setUser:()=>o.av,startTransaction:()=>o.Yr,withScope:()=>o.$e});var o=p(38076),e=p(10383),l=p(19248),D=p(52376),g=p(22159),E=p(73473),T=p(44641),n=p(59973),P=p(98479),w=p(99853),B=p(57989)},44371:(qe,I,p)=>{"use strict";p.d(I,{c:()=>e});var o,e=function(){function l(){this.name=l.id}return l.prototype.setupOnce=function(){o=Function.prototype.toString,Function.prototype.toString=function(){for(var D=[],g=0;g<arguments.length;g++)D[g]=arguments[g];var E=this.__sentry_original__||this;return o.apply(E,D)}},l.id="FunctionToString",l}()},1752:(qe,I,p)=>{"use strict";p.d(I,{Q:()=>n});var o=p(51421),e=p(10383),l=p(19248),D=p(11446),g=p(15535),E=p(21090),T=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/],n=function(){function P(w){void 0===w&&(w={}),this._options=w,this.name=P.id}return P.prototype.setupOnce=function(){(0,e.c)(function(w){var B=(0,l.Gd)();if(!B)return w;var Y=B.getIntegration(P);if(Y){var V=B.getClient(),ue=V?V.getOptions():{},he=Y._mergeOptions(ue);if(Y._shouldDropEvent(w,he))return null}return w})},P.prototype._shouldDropEvent=function(w,B){return this._isSentryError(w,B)?(D.k.warn("Event dropped due to being internal Sentry Error.\nEvent: "+(0,g.jH)(w)),!0):this._isIgnoredError(w,B)?(D.k.warn("Event dropped due to being matched by `ignoreErrors` option.\nEvent: "+(0,g.jH)(w)),!0):this._isDeniedUrl(w,B)?(D.k.warn("Event dropped due to being matched by `denyUrls` option.\nEvent: "+(0,g.jH)(w)+".\nUrl: "+this._getEventFilterUrl(w)),!0):!this._isAllowedUrl(w,B)&&(D.k.warn("Event dropped due to not being matched by `allowUrls` option.\nEvent: "+(0,g.jH)(w)+".\nUrl: "+this._getEventFilterUrl(w)),!0)},P.prototype._isSentryError=function(w,B){if(!B.ignoreInternal)return!1;try{return w&&w.exception&&w.exception.values&&w.exception.values[0]&&"SentryError"===w.exception.values[0].type||!1}catch{return!1}},P.prototype._isIgnoredError=function(w,B){return!(!B.ignoreErrors||!B.ignoreErrors.length)&&this._getPossibleEventMessages(w).some(function(Y){return B.ignoreErrors.some(function(V){return(0,E.zC)(Y,V)})})},P.prototype._isDeniedUrl=function(w,B){if(!B.denyUrls||!B.denyUrls.length)return!1;var Y=this._getEventFilterUrl(w);return!!Y&&B.denyUrls.some(function(V){return(0,E.zC)(Y,V)})},P.prototype._isAllowedUrl=function(w,B){if(!B.allowUrls||!B.allowUrls.length)return!0;var Y=this._getEventFilterUrl(w);return!Y||B.allowUrls.some(function(V){return(0,E.zC)(Y,V)})},P.prototype._mergeOptions=function(w){return void 0===w&&(w={}),{allowUrls:(0,o.fl)(this._options.whitelistUrls||[],this._options.allowUrls||[],w.whitelistUrls||[],w.allowUrls||[]),denyUrls:(0,o.fl)(this._options.blacklistUrls||[],this._options.denyUrls||[],w.blacklistUrls||[],w.denyUrls||[]),ignoreErrors:(0,o.fl)(this._options.ignoreErrors||[],w.ignoreErrors||[],T),ignoreInternal:!(typeof this._options.ignoreInternal<"u")||this._options.ignoreInternal}},P.prototype._getPossibleEventMessages=function(w){if(w.message)return[w.message];if(w.exception)try{var B=w.exception.values&&w.exception.values[0]||{},Y=B.type,V=void 0===Y?"":Y,ue=B.value,he=void 0===ue?"":ue;return[""+he,V+": "+he]}catch{return D.k.error("Cannot extract message for event "+(0,g.jH)(w)),[]}return[]},P.prototype._getEventFilterUrl=function(w){try{if(w.stacktrace){var B=w.stacktrace.frames;return B&&B[B.length-1].filename||null}if(w.exception){var Y=w.exception.values&&w.exception.values[0].stacktrace&&w.exception.values[0].stacktrace.frames;return Y&&Y[Y.length-1].filename||null}return null}catch{return D.k.error("Cannot extract url for event "+(0,g.jH)(w)),null}},P.id="InboundFilters",P}()},57989:(qe,I,p)=>{"use strict";p.r(I),p.d(I,{FunctionToString:()=>o.c,InboundFilters:()=>e.Q});var o=p(44371),e=p(1752)},44641:(qe,I,p)=>{"use strict";p.d(I,{Q:()=>D,n:()=>g});var o=p(51421);function e(E){if(E.metadata&&E.metadata.sdk){var T=E.metadata.sdk;return{name:T.name,version:T.version}}}function l(E,T){return T&&(E.sdk=E.sdk||{name:T.name,version:T.version},E.sdk.name=E.sdk.name||T.name,E.sdk.version=E.sdk.version||T.version,E.sdk.integrations=(0,o.fl)(E.sdk.integrations||[],T.integrations||[]),E.sdk.packages=(0,o.fl)(E.sdk.packages||[],T.packages||[])),E}function D(E,T){var n=e(T);return{body:JSON.stringify((0,o.pi)({sent_at:(new Date).toISOString()},n&&{sdk:n}))+"\n"+JSON.stringify({type:"session"})+"\n"+JSON.stringify(E),type:"session",url:T.getEnvelopeEndpointWithUrlEncodedAuth()}}function g(E,T){var n=e(T),P=E.type||"event",w="transaction"===P,B=E.debug_meta||{},Y=B.transactionSampling,V=(0,o._T)(B,["transactionSampling"]),ue=Y||{},he=ue.method,ae=ue.rate;0===Object.keys(V).length?delete E.debug_meta:E.debug_meta=V;var X={body:JSON.stringify(n?l(E,T.metadata.sdk):E),type:P,url:w?T.getEnvelopeEndpointWithUrlEncodedAuth():T.getStoreEndpointWithUrlEncodedAuth()};if(w){var ge=JSON.stringify((0,o.pi)({event_id:E.event_id,sent_at:(new Date).toISOString()},n&&{sdk:n}))+"\n"+JSON.stringify({type:E.type,sample_rates:[{id:he,rate:ae}]})+"\n"+X.body;X.body=ge}return X}},59973:(qe,I,p)=>{"use strict";p.d(I,{M:()=>l});var o=p(19248),e=p(11446);function l(D,g){!0===g.debug&&e.k.enable();var E=(0,o.Gd)(),T=new D(g);E.bindClient(T)}},98479:(qe,I,p)=>{"use strict";p.d(I,{V:()=>l});var o=p(49174),e=p(30509),l=function(){function D(){}return D.prototype.sendEvent=function(g){return e.c.resolve({reason:"NoopTransport: Event has been skipped because no Dsn is configured.",status:o.q.Skipped})},D.prototype.close=function(g){return e.c.resolve(!0)},D}()},99853:(qe,I,p)=>{"use strict";p.d(I,{J:()=>o});var o="6.1.0"},19248:(qe,I,p)=>{"use strict";p.d(I,{Gd:()=>he,Xb:()=>Y,cu:()=>V,j0:()=>ge,pj:()=>ue,vc:()=>ae,vi:()=>ye});var o=p(68907),e=p(11041),l=p(15535),D=p(43967),g=p(11446),E=p(24864),T=p(10383),n=p(71539),P=3,Y=function(){function ne(pe,Pe,xe){void 0===Pe&&(Pe=new T.s),void 0===xe&&(xe=P),this._version=xe,this._stack=[{}],this.getStackTop().scope=Pe,this.bindClient(pe)}return ne.prototype.isOlderThan=function(pe){return this._version<pe},ne.prototype.bindClient=function(pe){this.getStackTop().client=pe,pe&&pe.setupIntegrations&&pe.setupIntegrations()},ne.prototype.pushScope=function(){var pe=T.s.clone(this.getScope());return this.getStack().push({client:this.getClient(),scope:pe}),pe},ne.prototype.popScope=function(){return!(this.getStack().length<=1)&&!!this.getStack().pop()},ne.prototype.withScope=function(pe){var Pe=this.pushScope();try{pe(Pe)}finally{this.popScope()}},ne.prototype.getClient=function(){return this.getStackTop().client},ne.prototype.getScope=function(){return this.getStackTop().scope},ne.prototype.getStack=function(){return this._stack},ne.prototype.getStackTop=function(){return this._stack[this._stack.length-1]},ne.prototype.captureException=function(pe,Pe){var xe=this._lastEventId=(0,l.DM)(),de=Pe;if(!Pe){var re=void 0;try{throw new Error("Sentry syntheticException")}catch(oe){re=oe}de={originalException:pe,syntheticException:re}}return this._invokeClient("captureException",pe,(0,o.pi)((0,o.pi)({},de),{event_id:xe})),xe},ne.prototype.captureMessage=function(pe,Pe,xe){var de=this._lastEventId=(0,l.DM)(),re=xe;if(!xe){var oe=void 0;try{throw new Error(pe)}catch(me){oe=me}re={originalException:pe,syntheticException:oe}}return this._invokeClient("captureMessage",pe,Pe,(0,o.pi)((0,o.pi)({},re),{event_id:de})),de},ne.prototype.captureEvent=function(pe,Pe){var xe=this._lastEventId=(0,l.DM)();return this._invokeClient("captureEvent",pe,(0,o.pi)((0,o.pi)({},Pe),{event_id:xe})),xe},ne.prototype.lastEventId=function(){return this._lastEventId},ne.prototype.addBreadcrumb=function(pe,Pe){var xe=this.getStackTop(),de=xe.scope,re=xe.client;if(de&&re){var oe=re.getOptions&&re.getOptions()||{},me=oe.beforeBreadcrumb,be=void 0===me?null:me,le=oe.maxBreadcrumbs,Z=void 0===le?100:le;if(!(Z<=0)){var Oe=(0,D.yW)(),j=(0,o.pi)({timestamp:Oe},pe),ke=be?(0,l.Cf)(function(){return be(j,Pe)}):j;null!==ke&&de.addBreadcrumb(ke,Math.min(Z,100))}}},ne.prototype.setUser=function(pe){var Pe=this.getScope();Pe&&Pe.setUser(pe)},ne.prototype.setTags=function(pe){var Pe=this.getScope();Pe&&Pe.setTags(pe)},ne.prototype.setExtras=function(pe){var Pe=this.getScope();Pe&&Pe.setExtras(pe)},ne.prototype.setTag=function(pe,Pe){var xe=this.getScope();xe&&xe.setTag(pe,Pe)},ne.prototype.setExtra=function(pe,Pe){var xe=this.getScope();xe&&xe.setExtra(pe,Pe)},ne.prototype.setContext=function(pe,Pe){var xe=this.getScope();xe&&xe.setContext(pe,Pe)},ne.prototype.configureScope=function(pe){var Pe=this.getStackTop(),xe=Pe.scope,de=Pe.client;xe&&de&&pe(xe)},ne.prototype.run=function(pe){var Pe=ue(this);try{pe(this)}finally{ue(Pe)}},ne.prototype.getIntegration=function(pe){var Pe=this.getClient();if(!Pe)return null;try{return Pe.getIntegration(pe)}catch{return g.k.warn("Cannot retrieve integration "+pe.id+" from the current Hub"),null}},ne.prototype.startSpan=function(pe){return this._callExtensionMethod("startSpan",pe)},ne.prototype.startTransaction=function(pe,Pe){return this._callExtensionMethod("startTransaction",pe,Pe)},ne.prototype.traceHeaders=function(){return this._callExtensionMethod("traceHeaders")},ne.prototype.captureSession=function(pe){if(void 0===pe&&(pe=!1),pe)return this.endSession();this._sendSessionUpdate()},ne.prototype.endSession=function(){var pe,Pe,xe,de,re;null===(xe=null===(Pe=null===(pe=this.getStackTop())||void 0===pe?void 0:pe.scope)||void 0===Pe?void 0:Pe.getSession())||void 0===xe||xe.close(),this._sendSessionUpdate(),null===(re=null===(de=this.getStackTop())||void 0===de?void 0:de.scope)||void 0===re||re.setSession()},ne.prototype.startSession=function(pe){var Pe=this.getStackTop(),xe=Pe.scope,de=Pe.client,re=de&&de.getOptions()||{},oe=re.release,me=re.environment,be=new n.z((0,o.pi)((0,o.pi)({release:oe,environment:me},xe&&{user:xe.getUser()}),pe));if(xe){var le=xe.getSession&&xe.getSession();le&&le.status===e.$.Ok&&le.update({status:e.$.Exited}),this.endSession(),xe.setSession(be)}return be},ne.prototype._sendSessionUpdate=function(){var pe=this.getStackTop(),Pe=pe.scope,xe=pe.client;if(Pe){var de=Pe.getSession&&Pe.getSession();de&&xe&&xe.captureSession&&xe.captureSession(de)}},ne.prototype._invokeClient=function(pe){for(var Pe,xe=[],de=1;de<arguments.length;de++)xe[de-1]=arguments[de];var re=this.getStackTop(),oe=re.scope,me=re.client;me&&me[pe]&&(Pe=me)[pe].apply(Pe,(0,o.fl)(xe,[oe]))},ne.prototype._callExtensionMethod=function(pe){for(var Pe=[],xe=1;xe<arguments.length;xe++)Pe[xe-1]=arguments[xe];var re=V().__SENTRY__;if(re&&re.extensions&&"function"==typeof re.extensions[pe])return re.extensions[pe].apply(this,Pe);g.k.warn("Extension method "+pe+" couldn't be found, doing nothing.")},ne}();function V(){var ne=(0,l.Rf)();return ne.__SENTRY__=ne.__SENTRY__||{extensions:{},hub:void 0},ne}function ue(ne){var pe=V(),Pe=ye(pe);return ge(pe,ne),Pe}function he(){var ne=V();return(!ve(ne)||ye(ne).isOlderThan(P))&&ge(ne,new Y),(0,E.K)()?function X(ne){var pe,Pe,xe;try{var de=null===(xe=null===(Pe=null===(pe=V().__SENTRY__)||void 0===pe?void 0:pe.extensions)||void 0===Pe?void 0:Pe.domain)||void 0===xe?void 0:xe.active;if(!de)return ye(ne);if(!ve(de)||ye(de).isOlderThan(P)){var re=ye(ne).getStackTop();ge(de,new Y(re.client,T.s.clone(re.scope)))}return ye(de)}catch{return ye(ne)}}(ne):ye(ne)}function ae(){g.k.warn("Function `getActiveDomain` is deprecated and will be removed in a future version.");var ne=V().__SENTRY__;return ne&&ne.extensions&&ne.extensions.domain&&ne.extensions.domain.active}function ve(ne){return!!(ne&&ne.__SENTRY__&&ne.__SENTRY__.hub)}function ye(ne){return ne&&ne.__SENTRY__&&ne.__SENTRY__.hub||(ne.__SENTRY__=ne.__SENTRY__||{},ne.__SENTRY__.hub=new Y),ne.__SENTRY__.hub}function ge(ne,pe){return!!ne&&(ne.__SENTRY__=ne.__SENTRY__||{},ne.__SENTRY__.hub=pe,!0)}},13627:(qe,I,p)=>{"use strict";p.r(I),p.d(I,{Hub:()=>l.Xb,Scope:()=>o.s,Session:()=>e.z,addGlobalEventProcessor:()=>o.c,getActiveDomain:()=>l.vc,getCurrentHub:()=>l.Gd,getHubFromCarrier:()=>l.vi,getMainCarrier:()=>l.cu,makeMain:()=>l.pj,setHubOnCarrier:()=>l.j0});var o=p(10383),e=p(71539),l=p(19248)},10383:(qe,I,p)=>{"use strict";p.d(I,{c:()=>n,s:()=>E});var o=p(68907),e=p(96412),l=p(43967),D=p(30509),g=p(15535),E=function(){function P(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._user={},this._tags={},this._extra={},this._contexts={}}return P.clone=function(w){var B=new P;return w&&(B._breadcrumbs=(0,o.fl)(w._breadcrumbs),B._tags=(0,o.pi)({},w._tags),B._extra=(0,o.pi)({},w._extra),B._contexts=(0,o.pi)({},w._contexts),B._user=w._user,B._level=w._level,B._span=w._span,B._session=w._session,B._transactionName=w._transactionName,B._fingerprint=w._fingerprint,B._eventProcessors=(0,o.fl)(w._eventProcessors)),B},P.prototype.addScopeListener=function(w){this._scopeListeners.push(w)},P.prototype.addEventProcessor=function(w){return this._eventProcessors.push(w),this},P.prototype.setUser=function(w){return this._user=w||{},this._session&&this._session.update({user:w}),this._notifyScopeListeners(),this},P.prototype.getUser=function(){return this._user},P.prototype.setTags=function(w){return this._tags=(0,o.pi)((0,o.pi)({},this._tags),w),this._notifyScopeListeners(),this},P.prototype.setTag=function(w,B){var Y;return this._tags=(0,o.pi)((0,o.pi)({},this._tags),((Y={})[w]=B,Y)),this._notifyScopeListeners(),this},P.prototype.setExtras=function(w){return this._extra=(0,o.pi)((0,o.pi)({},this._extra),w),this._notifyScopeListeners(),this},P.prototype.setExtra=function(w,B){var Y;return this._extra=(0,o.pi)((0,o.pi)({},this._extra),((Y={})[w]=B,Y)),this._notifyScopeListeners(),this},P.prototype.setFingerprint=function(w){return this._fingerprint=w,this._notifyScopeListeners(),this},P.prototype.setLevel=function(w){return this._level=w,this._notifyScopeListeners(),this},P.prototype.setTransactionName=function(w){return this._transactionName=w,this._notifyScopeListeners(),this},P.prototype.setTransaction=function(w){return this.setTransactionName(w)},P.prototype.setContext=function(w,B){var Y;return null===B?delete this._contexts[w]:this._contexts=(0,o.pi)((0,o.pi)({},this._contexts),((Y={})[w]=B,Y)),this._notifyScopeListeners(),this},P.prototype.setSpan=function(w){return this._span=w,this._notifyScopeListeners(),this},P.prototype.getSpan=function(){return this._span},P.prototype.getTransaction=function(){var w,B,Y,V,ue=this.getSpan();return null!==(w=ue)&&void 0!==w&&w.transaction?null===(B=ue)||void 0===B?void 0:B.transaction:null!==(V=null===(Y=ue)||void 0===Y?void 0:Y.spanRecorder)&&void 0!==V&&V.spans[0]?ue.spanRecorder.spans[0]:void 0},P.prototype.setSession=function(w){return w?this._session=w:delete this._session,this._notifyScopeListeners(),this},P.prototype.getSession=function(){return this._session},P.prototype.update=function(w){if(!w)return this;if("function"==typeof w){var B=w(this);return B instanceof P?B:this}return w instanceof P?(this._tags=(0,o.pi)((0,o.pi)({},this._tags),w._tags),this._extra=(0,o.pi)((0,o.pi)({},this._extra),w._extra),this._contexts=(0,o.pi)((0,o.pi)({},this._contexts),w._contexts),w._user&&Object.keys(w._user).length&&(this._user=w._user),w._level&&(this._level=w._level),w._fingerprint&&(this._fingerprint=w._fingerprint)):(0,e.PO)(w)&&(this._tags=(0,o.pi)((0,o.pi)({},this._tags),w.tags),this._extra=(0,o.pi)((0,o.pi)({},this._extra),w.extra),this._contexts=(0,o.pi)((0,o.pi)({},this._contexts),w.contexts),w.user&&(this._user=w.user),w.level&&(this._level=w.level),w.fingerprint&&(this._fingerprint=w.fingerprint)),this},P.prototype.clear=function(){return this._breadcrumbs=[],this._tags={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._span=void 0,this._session=void 0,this._notifyScopeListeners(),this},P.prototype.addBreadcrumb=function(w,B){var Y=(0,o.pi)({timestamp:(0,l.yW)()},w);return this._breadcrumbs=void 0!==B&&B>=0?(0,o.fl)(this._breadcrumbs,[Y]).slice(-B):(0,o.fl)(this._breadcrumbs,[Y]),this._notifyScopeListeners(),this},P.prototype.clearBreadcrumbs=function(){return this._breadcrumbs=[],this._notifyScopeListeners(),this},P.prototype.applyToEvent=function(w,B){var Y;if(this._extra&&Object.keys(this._extra).length&&(w.extra=(0,o.pi)((0,o.pi)({},this._extra),w.extra)),this._tags&&Object.keys(this._tags).length&&(w.tags=(0,o.pi)((0,o.pi)({},this._tags),w.tags)),this._user&&Object.keys(this._user).length&&(w.user=(0,o.pi)((0,o.pi)({},this._user),w.user)),this._contexts&&Object.keys(this._contexts).length&&(w.contexts=(0,o.pi)((0,o.pi)({},this._contexts),w.contexts)),this._level&&(w.level=this._level),this._transactionName&&(w.transaction=this._transactionName),this._span){w.contexts=(0,o.pi)({trace:this._span.getTraceContext()},w.contexts);var V=null===(Y=this._span.transaction)||void 0===Y?void 0:Y.name;V&&(w.tags=(0,o.pi)({transaction:V},w.tags))}return this._applyFingerprint(w),w.breadcrumbs=(0,o.fl)(w.breadcrumbs||[],this._breadcrumbs),w.breadcrumbs=w.breadcrumbs.length>0?w.breadcrumbs:void 0,this._notifyEventProcessors((0,o.fl)(T(),this._eventProcessors),w,B)},P.prototype._notifyEventProcessors=function(w,B,Y,V){var ue=this;return void 0===V&&(V=0),new D.c(function(he,ae){var X=w[V];if(null===B||"function"!=typeof X)he(B);else{var ve=X((0,o.pi)({},B),Y);(0,e.J8)(ve)?ve.then(function(ye){return ue._notifyEventProcessors(w,ye,Y,V+1).then(he)}).then(null,ae):ue._notifyEventProcessors(w,ve,Y,V+1).then(he).then(null,ae)}})},P.prototype._notifyScopeListeners=function(){var w=this;this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach(function(B){B(w)}),this._notifyingListeners=!1)},P.prototype._applyFingerprint=function(w){w.fingerprint=w.fingerprint?Array.isArray(w.fingerprint)?w.fingerprint:[w.fingerprint]:[],this._fingerprint&&(w.fingerprint=w.fingerprint.concat(this._fingerprint)),w.fingerprint&&!w.fingerprint.length&&delete w.fingerprint},P}();function T(){var P=(0,g.Rf)();return P.__SENTRY__=P.__SENTRY__||{},P.__SENTRY__.globalEventProcessors=P.__SENTRY__.globalEventProcessors||[],P.__SENTRY__.globalEventProcessors}function n(P){T().push(P)}},71539:(qe,I,p)=>{"use strict";p.d(I,{z:()=>D});var o=p(11041),e=p(15535),l=p(57759),D=function(){function g(E){this.errors=0,this.sid=(0,e.DM)(),this.timestamp=Date.now(),this.started=Date.now(),this.duration=0,this.status=o.$.Ok,this.init=!0,E&&this.update(E)}return g.prototype.update=function(E){void 0===E&&(E={}),E.user&&(E.user.ip_address&&(this.ipAddress=E.user.ip_address),E.did||(this.did=E.user.id||E.user.email||E.user.username)),this.timestamp=E.timestamp||Date.now(),E.sid&&(this.sid=32===E.sid.length?E.sid:(0,e.DM)()),void 0!==E.init&&(this.init=E.init),E.did&&(this.did=""+E.did),"number"==typeof E.started&&(this.started=E.started),"number"==typeof E.duration?this.duration=E.duration:this.duration=this.timestamp-this.started,E.release&&(this.release=E.release),E.environment&&(this.environment=E.environment),E.ipAddress&&(this.ipAddress=E.ipAddress),E.userAgent&&(this.userAgent=E.userAgent),"number"==typeof E.errors&&(this.errors=E.errors),E.status&&(this.status=E.status)},g.prototype.close=function(E){E?this.update({status:E}):this.status===o.$.Ok?this.update({status:o.$.Exited}):this.update()},g.prototype.toJSON=function(){return(0,l.Jr)({sid:""+this.sid,init:this.init,started:new Date(this.started).toISOString(),timestamp:new Date(this.timestamp).toISOString(),status:this.status,errors:this.errors,did:"number"==typeof this.did||"string"==typeof this.did?""+this.did:void 0,duration:this.duration,attrs:(0,l.Jr)({release:this.release,environment:this.environment,ip_address:this.ipAddress,user_agent:this.userAgent})})},g}()},38076:(qe,I,p)=>{"use strict";p.d(I,{n_:()=>Z,eN:()=>be,Tb:()=>oe,uT:()=>me,e:()=>le,v:()=>Oe,sU:()=>Be,rJ:()=>j,YA:()=>nt,mG:()=>ke,av:()=>mt,Yr:()=>tt,$e:()=>ut});var l=function(){return l=Object.assign||function(wt){for(var ft,Ct=1,rn=arguments.length;Ct<rn;Ct++)for(var He in ft=arguments[Ct])Object.prototype.hasOwnProperty.call(ft,He)&&(wt[He]=ft[He]);return wt},l.apply(this,arguments)};function V(Ne,wt){var ft="function"==typeof Symbol&&Ne[Symbol.iterator];if(!ft)return Ne;var rn,st,Ct=ft.call(Ne),He=[];try{for(;(void 0===wt||wt-- >0)&&!(rn=Ct.next()).done;)He.push(rn.value)}catch(nn){st={error:nn}}finally{try{rn&&!rn.done&&(ft=Ct.return)&&ft.call(Ct)}finally{if(st)throw st.error}}return He}var de=p(19248);function re(Ne){for(var wt=[],ft=1;ft<arguments.length;ft++)wt[ft-1]=arguments[ft];var Ct=(0,de.Gd)();if(Ct&&Ct[Ne])return Ct[Ne].apply(Ct,function ue(){for(var Ne=[],wt=0;wt<arguments.length;wt++)Ne=Ne.concat(V(arguments[wt]));return Ne}(wt));throw new Error("No hub defined or "+Ne+" was not found on the hub, please open a bug report.")}function oe(Ne,wt){var ft;try{throw new Error("Sentry syntheticException")}catch(Ct){ft=Ct}return re("captureException",Ne,{captureContext:wt,originalException:Ne,syntheticException:ft})}function me(Ne,wt){var ft;try{throw new Error(Ne)}catch(He){ft=He}return re("captureMessage",Ne,"string"==typeof wt?wt:void 0,l({originalException:Ne,syntheticException:ft},"string"!=typeof wt?{captureContext:wt}:void 0))}function be(Ne){return re("captureEvent",Ne)}function le(Ne){re("configureScope",Ne)}function Z(Ne){re("addBreadcrumb",Ne)}function Oe(Ne,wt){re("setContext",Ne,wt)}function j(Ne){re("setExtras",Ne)}function ke(Ne){re("setTags",Ne)}function Be(Ne,wt){re("setExtra",Ne,wt)}function nt(Ne,wt){re("setTag",Ne,wt)}function mt(Ne){re("setUser",Ne)}function ut(Ne){re("withScope",Ne)}function tt(Ne,wt){return re("startTransaction",l({},Ne),wt)}},15608:(qe,I,p)=>{"use strict";var o,E;p.r(I),p.d(I,{LogLevel:()=>o,SessionStatus:()=>e.$,Severity:()=>l.z,Status:()=>D.q,TransactionSamplingMethod:()=>g}),(E=o||(o={}))[E.None=0]="None",E[E.Error=1]="Error",E[E.Debug=2]="Debug",E[E.Verbose=3]="Verbose";var g,e=p(11041),l=p(1248),D=p(49174);!function(E){E.Explicit="explicitly_set",E.Sampler="client_sampler",E.Rate="client_rate",E.Inheritance="inheritance"}(g||(g={}))},11041:(qe,I,p)=>{"use strict";var o,e;p.d(I,{$:()=>o}),(e=o||(o={})).Ok="ok",e.Exited="exited",e.Crashed="crashed",e.Abnormal="abnormal"},1248:(qe,I,p)=>{"use strict";var o,e;p.d(I,{z:()=>o}),(e=o||(o={})).Fatal="fatal",e.Error="error",e.Warning="warning",e.Log="log",e.Info="info",e.Debug="debug",e.Critical="critical",function(e){e.fromString=function l(D){switch(D){case"debug":return e.Debug;case"info":return e.Info;case"warn":case"warning":return e.Warning;case"error":return e.Error;case"fatal":return e.Fatal;case"critical":return e.Critical;default:return e.Log}}}(o||(o={}))},49174:(qe,I,p)=>{"use strict";var o,e;p.d(I,{q:()=>o}),(e=o||(o={})).Unknown="unknown",e.Skipped="skipped",e.Success="success",e.RateLimit="rate_limit",e.Invalid="invalid",e.Failed="failed",function(e){e.fromHttpCode=function l(D){return D>=200&&D<300?e.Success:429===D?e.RateLimit:D>=400&&D<500?e.Invalid:D>=500?e.Failed:e.Unknown}}(o||(o={}))},36477:(qe,I,p)=>{"use strict";p.d(I,{R:()=>e});var o=p(96412);function e(D){try{for(var g=D,n=[],P=0,w=0,Y=" > ".length,V=void 0;g&&P++<5&&!("html"===(V=l(g))||P>1&&w+n.length*Y+V.length>=80);)n.push(V),w+=V.length,g=g.parentNode;return n.reverse().join(" > ")}catch{return"<unknown>"}}function l(D){var T,n,P,w,B,g=D,E=[];if(!g||!g.tagName)return"";if(E.push(g.tagName.toLowerCase()),g.id&&E.push("#"+g.id),(T=g.className)&&(0,o.HD)(T))for(n=T.split(/\s+/),B=0;B<n.length;B++)E.push("."+n[B]);var Y=["type","name","title","alt"];for(B=0;B<Y.length;B++)P=Y[B],(w=g.getAttribute(P))&&E.push("["+P+'="'+w+'"]');return E.join("")}},18438:(qe,I,p)=>{"use strict";p.d(I,{l:()=>g});var o=p(50832),e=p(36767),l=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+))?@)([\w.-]+)(?::(\d+))?\/(.+)/,D="Invalid Dsn",g=function(){function E(T){"string"==typeof T?this._fromString(T):this._fromComponents(T),this._validate()}return E.prototype.toString=function(T){void 0===T&&(T=!1);var n=this,P=n.host,w=n.path,B=n.pass,Y=n.port,V=n.projectId;return n.protocol+"://"+n.publicKey+(T&&B?":"+B:"")+"@"+P+(Y?":"+Y:"")+"/"+(w&&w+"/")+V},E.prototype._fromString=function(T){var n=l.exec(T);if(!n)throw new e.b(D);var P=(0,o.CR)(n.slice(1),6),w=P[0],B=P[1],Y=P[2],V=void 0===Y?"":Y,ue=P[3],he=P[4],ae=void 0===he?"":he,ve="",ye=P[5],ge=ye.split("/");if(ge.length>1&&(ve=ge.slice(0,-1).join("/"),ye=ge.pop()),ye){var ne=ye.match(/^\d+/);ne&&(ye=ne[0])}this._fromComponents({host:ue,pass:V,path:ve,projectId:ye,port:ae,protocol:w,publicKey:B})},E.prototype._fromComponents=function(T){"user"in T&&!("publicKey"in T)&&(T.publicKey=T.user),this.user=T.publicKey||"",this.protocol=T.protocol,this.publicKey=T.publicKey||"",this.pass=T.pass||"",this.host=T.host,this.port=T.port||"",this.path=T.path||"",this.projectId=T.projectId},E.prototype._validate=function(){var T=this;if(["protocol","publicKey","host","projectId"].forEach(function(n){if(!T[n])throw new e.b(D+": "+n+" missing")}),!this.projectId.match(/^\d+$/))throw new e.b(D+": Invalid projectId "+this.projectId);if("http"!==this.protocol&&"https"!==this.protocol)throw new e.b(D+": Invalid protocol "+this.protocol);if(this.port&&isNaN(parseInt(this.port,10)))throw new e.b(D+": Invalid port "+this.port)},E}()},36767:(qe,I,p)=>{"use strict";p.d(I,{b:()=>g});var o=p(50832),e=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function l(E,T){return E.__proto__=T,E}:function D(E,T){for(var n in T)E.hasOwnProperty(n)||(E[n]=T[n]);return E});var g=function(E){function T(n){var P=this.constructor,w=E.call(this,n)||this;return w.message=n,w.name=P.prototype.constructor.name,e(w,P.prototype),w}return(0,o.ZT)(T,E),T}(Error)},22787:(qe,I,p)=>{"use strict";function o(be){be.then(null,function(le){console.error(le)})}p.r(I),p.d(I,{Dsn:()=>l.l,Memo:()=>n._,PromiseBuffer:()=>Pe.D,SentryError:()=>D.b,SyncPromise:()=>oe.c,addContextToFrame:()=>P.go,addExceptionMechanism:()=>P.EG,addExceptionTypeValue:()=>P.Db,addInstrumentationHandler:()=>g.o,basename:()=>pe,browserPerformanceTimeOrigin:()=>me.Z1,consoleSandbox:()=>P.Cf,dateTimestampInSeconds:()=>me.yW,dirname:()=>ne,dropUndefinedKeys:()=>B.Jr,dynamicRequire:()=>w.l,extractExceptionKeysForMessage:()=>B.zf,fill:()=>B.hl,forget:()=>o,getEventDescription:()=>P.jH,getFunctionName:()=>xe.$,getGlobalObject:()=>P.Rf,getLocationHref:()=>P.l4,htmlTreeAsString:()=>e.R,isAbsolute:()=>ye,isDOMError:()=>E.TX,isDOMException:()=>E.fm,isElement:()=>E.kK,isError:()=>E.VZ,isErrorEvent:()=>E.VW,isEvent:()=>E.cO,isInstanceOf:()=>E.V9,isMatchingPattern:()=>de.zC,isNodeEnv:()=>w.K,isPlainObject:()=>E.PO,isPrimitive:()=>E.pt,isRegExp:()=>E.Kj,isString:()=>E.HD,isSyntheticEvent:()=>E.Cy,isThenable:()=>E.J8,join:()=>ge,logger:()=>T.k,normalize:()=>B.Fv,normalizePath:()=>ve,normalizeToSize:()=>B.Qy,parseRetryAfterHeader:()=>P.JY,parseSemver:()=>P.J4,parseUrl:()=>P.en,relative:()=>X,resolve:()=>he,safeJoin:()=>de.nK,snipLine:()=>de.JM,stripUrlQueryAndFragment:()=>P.rt,supportsDOMError:()=>re.zO,supportsDOMException:()=>re.fL,supportsErrorEvent:()=>re.S$,supportsFetch:()=>re.Ak,supportsHistory:()=>re.Bf,supportsNativeFetch:()=>re.t$,supportsReferrerPolicy:()=>re.hv,supportsReportingObserver:()=>re.zb,timestampInSeconds:()=>me.ph,timestampWithMs:()=>me._I,truncate:()=>de.$G,urlEncode:()=>B._j,usingPerformanceAPI:()=>me.sV,uuid4:()=>P.DM,walk:()=>B._p});var e=p(36477),l=p(18438),D=p(36767),g=p(43343),E=p(96412),T=p(11446),n=p(6250),P=p(15535),w=p(24864),B=p(57759);function Y(be,le){for(var Z=0,Oe=be.length-1;Oe>=0;Oe--){var j=be[Oe];"."===j?be.splice(Oe,1):".."===j?(be.splice(Oe,1),Z++):Z&&(be.splice(Oe,1),Z--)}if(le)for(;Z--;Z)be.unshift("..");return be}var V=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^/]+?|)(\.[^./]*|))(?:[/]*)$/;function ue(be){var le=V.exec(be);return le?le.slice(1):[]}function he(){for(var be=[],le=0;le<arguments.length;le++)be[le]=arguments[le];for(var Z="",Oe=!1,j=be.length-1;j>=-1&&!Oe;j--){var ke=j>=0?be[j]:"/";ke&&(Z=ke+"/"+Z,Oe="/"===ke.charAt(0))}return(Oe?"/":"")+(Z=Y(Z.split("/").filter(function(Be){return!!Be}),!Oe).join("/"))||"."}function ae(be){for(var le=0;le<be.length&&""===be[le];le++);for(var Z=be.length-1;Z>=0&&""===be[Z];Z--);return le>Z?[]:be.slice(le,Z-le+1)}function X(be,le){be=he(be).substr(1),le=he(le).substr(1);for(var Z=ae(be.split("/")),Oe=ae(le.split("/")),j=Math.min(Z.length,Oe.length),ke=j,Be=0;Be<j;Be++)if(Z[Be]!==Oe[Be]){ke=Be;break}var nt=[];for(Be=ke;Be<Z.length;Be++)nt.push("..");return(nt=nt.concat(Oe.slice(ke))).join("/")}function ve(be){var le=ye(be),Z="/"===be.substr(-1),Oe=Y(be.split("/").filter(function(j){return!!j}),!le).join("/");return!Oe&&!le&&(Oe="."),Oe&&Z&&(Oe+="/"),(le?"/":"")+Oe}function ye(be){return"/"===be.charAt(0)}function ge(){for(var be=[],le=0;le<arguments.length;le++)be[le]=arguments[le];return ve(be.join("/"))}function ne(be){var le=ue(be),Z=le[0],Oe=le[1];return Z||Oe?(Oe&&(Oe=Oe.substr(0,Oe.length-1)),Z+Oe):"."}function pe(be,le){var Z=ue(be)[2];return le&&Z.substr(-1*le.length)===le&&(Z=Z.substr(0,Z.length-le.length)),Z}var Pe=p(61147),xe=p(19725),de=p(21090),re=p(8204),oe=p(30509),me=p(43967)},43343:(qe,I,p)=>{"use strict";p.d(I,{o:()=>Y});var ye,o=p(50832),e=p(96412),l=p(11446),D=p(15535),g=p(57759),E=p(19725),T=p(8204),n=(0,D.Rf)(),P={},w={};function B(Oe){if(!w[Oe])switch(w[Oe]=!0,Oe){case"console":!function ue(){"console"in n&&["debug","info","warn","error","log","assert"].forEach(function(Oe){Oe in n.console&&(0,g.hl)(n.console,Oe,function(j){return function(){for(var ke=[],Be=0;Be<arguments.length;Be++)ke[Be]=arguments[Be];V("console",{args:ke,level:Oe}),j&&Function.prototype.apply.call(j,n.console,ke)}})})}();break;case"dom":!function oe(){if("document"in n){var Oe=V.bind(null,"dom"),j=re(Oe,!0);n.document.addEventListener("click",j,!1),n.document.addEventListener("keypress",j,!1),["EventTarget","Node"].forEach(function(ke){var Be=n[ke]&&n[ke].prototype;!Be||!Be.hasOwnProperty||!Be.hasOwnProperty("addEventListener")||((0,g.hl)(Be,"addEventListener",function(nt){return function(mt,ut,Ve){if("click"===mt||"keypress"==mt)try{var tt=this,Ne=tt.__sentry_instrumentation_handlers__=tt.__sentry_instrumentation_handlers__||{},wt=Ne[mt]=Ne[mt]||{refCount:0};if(!wt.handler){var ft=re(Oe);wt.handler=ft,nt.call(this,mt,ft,Ve)}wt.refCount+=1}catch{}return nt.call(this,mt,ut,Ve)}}),(0,g.hl)(Be,"removeEventListener",function(nt){return function(mt,ut,Ve){if("click"===mt||"keypress"==mt)try{var tt=this,Ne=tt.__sentry_instrumentation_handlers__||{},wt=Ne[mt];wt&&(wt.refCount-=1,wt.refCount<=0&&(nt.call(this,mt,wt.handler,Ve),wt.handler=void 0,delete Ne[mt]),0===Object.keys(Ne).length&&delete tt.__sentry_instrumentation_handlers__)}catch{}return nt.call(this,mt,ut,Ve)}}))})}}();break;case"xhr":!function ve(){if("XMLHttpRequest"in n){var Oe=[],j=[],ke=XMLHttpRequest.prototype;(0,g.hl)(ke,"open",function(Be){return function(){for(var nt=[],mt=0;mt<arguments.length;mt++)nt[mt]=arguments[mt];var ut=this,Ve=nt[1];ut.__sentry_xhr__={method:(0,e.HD)(nt[0])?nt[0].toUpperCase():nt[0],url:nt[1]},(0,e.HD)(Ve)&&"POST"===ut.__sentry_xhr__.method&&Ve.match(/sentry_key/)&&(ut.__sentry_own_request__=!0);var tt=function(){if(4===ut.readyState){try{ut.__sentry_xhr__&&(ut.__sentry_xhr__.status_code=ut.status)}catch{}try{var Ne=Oe.indexOf(ut);if(-1!==Ne){Oe.splice(Ne);var wt=j.splice(Ne)[0];ut.__sentry_xhr__&&void 0!==wt[0]&&(ut.__sentry_xhr__.body=wt[0])}}catch{}V("xhr",{args:nt,endTimestamp:Date.now(),startTimestamp:Date.now(),xhr:ut})}};return"onreadystatechange"in ut&&"function"==typeof ut.onreadystatechange?(0,g.hl)(ut,"onreadystatechange",function(Ne){return function(){for(var wt=[],ft=0;ft<arguments.length;ft++)wt[ft]=arguments[ft];return tt(),Ne.apply(ut,wt)}}):ut.addEventListener("readystatechange",tt),Be.apply(ut,nt)}}),(0,g.hl)(ke,"send",function(Be){return function(){for(var nt=[],mt=0;mt<arguments.length;mt++)nt[mt]=arguments[mt];return Oe.push(this),j.push(nt),V("xhr",{args:nt,startTimestamp:Date.now(),xhr:this}),Be.apply(this,nt)}})}}();break;case"fetch":!function he(){(0,T.t$)()&&(0,g.hl)(n,"fetch",function(Oe){return function(){for(var j=[],ke=0;ke<arguments.length;ke++)j[ke]=arguments[ke];var Be={args:j,fetchData:{method:ae(j),url:X(j)},startTimestamp:Date.now()};return V("fetch",(0,o.pi)({},Be)),Oe.apply(n,j).then(function(nt){return V("fetch",(0,o.pi)((0,o.pi)({},Be),{endTimestamp:Date.now(),response:nt})),nt},function(nt){throw V("fetch",(0,o.pi)((0,o.pi)({},Be),{endTimestamp:Date.now(),error:nt})),nt})}})}();break;case"history":!function ge(){if(!(0,T.Bf)())return;var Oe=n.onpopstate;function j(ke){return function(){for(var Be=[],nt=0;nt<arguments.length;nt++)Be[nt]=arguments[nt];var mt=Be.length>2?Be[2]:void 0;if(mt){var ut=ye,Ve=String(mt);ye=Ve,V("history",{from:ut,to:Ve})}return ke.apply(this,Be)}}n.onpopstate=function(){for(var ke=[],Be=0;Be<arguments.length;Be++)ke[Be]=arguments[Be];var nt=n.location.href,mt=ye;if(ye=nt,V("history",{from:mt,to:nt}),Oe)return Oe.apply(this,ke)},(0,g.hl)(n.history,"pushState",j),(0,g.hl)(n.history,"replaceState",j)}();break;case"error":!function be(){me=n.onerror,n.onerror=function(Oe,j,ke,Be,nt){return V("error",{column:Be,error:nt,line:ke,msg:Oe,url:j}),!!me&&me.apply(this,arguments)}}();break;case"unhandledrejection":!function Z(){le=n.onunhandledrejection,n.onunhandledrejection=function(Oe){return V("unhandledrejection",Oe),!le||le.apply(this,arguments)}}();break;default:l.k.warn("unknown instrumentation type:",Oe)}}function Y(Oe){!Oe||"string"!=typeof Oe.type||"function"!=typeof Oe.callback||(P[Oe.type]=P[Oe.type]||[],P[Oe.type].push(Oe.callback),B(Oe.type))}function V(Oe,j){var ke,Be;if(Oe&&P[Oe])try{for(var nt=(0,o.XA)(P[Oe]||[]),mt=nt.next();!mt.done;mt=nt.next()){var ut=mt.value;try{ut(j)}catch(Ve){l.k.error("Error while triggering instrumentation handler.\nType: "+Oe+"\nName: "+(0,E.$)(ut)+"\nError: "+Ve)}}}catch(Ve){ke={error:Ve}}finally{try{mt&&!mt.done&&(Be=nt.return)&&Be.call(nt)}finally{if(ke)throw ke.error}}}function ae(Oe){return void 0===Oe&&(Oe=[]),"Request"in n&&(0,e.V9)(Oe[0],Request)&&Oe[0].method?String(Oe[0].method).toUpperCase():Oe[1]&&Oe[1].method?String(Oe[1].method).toUpperCase():"GET"}function X(Oe){return void 0===Oe&&(Oe=[]),"string"==typeof Oe[0]?Oe[0]:"Request"in n&&(0,e.V9)(Oe[0],Request)?Oe[0].url:String(Oe[0])}var pe,Pe,ne=1e3;function re(Oe,j){return void 0===j&&(j=!1),function(ke){if(ke&&Pe!==ke&&!function de(Oe){if("keypress"!==Oe.type)return!1;try{var j=Oe.target;if(!j||!j.tagName)return!0;if("INPUT"===j.tagName||"TEXTAREA"===j.tagName||j.isContentEditable)return!1}catch{}return!0}(ke)){var Be="keypress"===ke.type?"input":ke.type;(void 0===pe||function xe(Oe,j){if(!Oe||Oe.type!==j.type)return!0;try{if(Oe.target!==j.target)return!0}catch{}return!1}(Pe,ke))&&(Oe({event:ke,name:Be,global:j}),Pe=ke),clearTimeout(pe),pe=n.setTimeout(function(){pe=void 0},ne)}}}var me=null;var le=null},96412:(qe,I,p)=>{"use strict";function o(ue){switch(Object.prototype.toString.call(ue)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return V(ue,Error)}}function e(ue){return"[object ErrorEvent]"===Object.prototype.toString.call(ue)}function l(ue){return"[object DOMError]"===Object.prototype.toString.call(ue)}function D(ue){return"[object DOMException]"===Object.prototype.toString.call(ue)}function g(ue){return"[object String]"===Object.prototype.toString.call(ue)}function E(ue){return null===ue||"object"!=typeof ue&&"function"!=typeof ue}function T(ue){return"[object Object]"===Object.prototype.toString.call(ue)}function n(ue){return typeof Event<"u"&&V(ue,Event)}function P(ue){return typeof Element<"u"&&V(ue,Element)}function w(ue){return"[object RegExp]"===Object.prototype.toString.call(ue)}function B(ue){return Boolean(ue&&ue.then&&"function"==typeof ue.then)}function Y(ue){return T(ue)&&"nativeEvent"in ue&&"preventDefault"in ue&&"stopPropagation"in ue}function V(ue,he){try{return ue instanceof he}catch{return!1}}p.d(I,{Cy:()=>Y,HD:()=>g,J8:()=>B,Kj:()=>w,PO:()=>T,TX:()=>l,V9:()=>V,VW:()=>e,VZ:()=>o,cO:()=>n,fm:()=>D,kK:()=>P,pt:()=>E})},11446:(qe,I,p)=>{"use strict";p.d(I,{k:()=>g});var o=p(15535),e=(0,o.Rf)(),l="Sentry Logger ",D=function(){function E(){this._enabled=!1}return E.prototype.disable=function(){this._enabled=!1},E.prototype.enable=function(){this._enabled=!0},E.prototype.log=function(){for(var T=[],n=0;n<arguments.length;n++)T[n]=arguments[n];this._enabled&&(0,o.Cf)(function(){e.console.log(l+"[Log]: "+T.join(" "))})},E.prototype.warn=function(){for(var T=[],n=0;n<arguments.length;n++)T[n]=arguments[n];this._enabled&&(0,o.Cf)(function(){e.console.warn(l+"[Warn]: "+T.join(" "))})},E.prototype.error=function(){for(var T=[],n=0;n<arguments.length;n++)T[n]=arguments[n];this._enabled&&(0,o.Cf)(function(){e.console.error(l+"[Error]: "+T.join(" "))})},E}();e.__SENTRY__=e.__SENTRY__||{};var g=e.__SENTRY__.logger||(e.__SENTRY__.logger=new D)},6250:(qe,I,p)=>{"use strict";p.d(I,{_:()=>o});var o=function(){function e(){this._hasWeakSet="function"==typeof WeakSet,this._inner=this._hasWeakSet?new WeakSet:[]}return e.prototype.memoize=function(l){if(this._hasWeakSet)return!!this._inner.has(l)||(this._inner.add(l),!1);for(var D=0;D<this._inner.length;D++){if(this._inner[D]===l)return!0}return this._inner.push(l),!1},e.prototype.unmemoize=function(l){if(this._hasWeakSet)this._inner.delete(l);else for(var D=0;D<this._inner.length;D++)if(this._inner[D]===l){this._inner.splice(D,1);break}},e}()},15535:(qe,I,p)=>{"use strict";p.d(I,{Cf:()=>n,DM:()=>g,Db:()=>P,EG:()=>w,J4:()=>V,JY:()=>he,Rf:()=>D,en:()=>E,go:()=>ae,jH:()=>T,l4:()=>B,rt:()=>X});var o=p(24864),e=p(21090),l={};function D(){return(0,o.K)()?global:typeof window<"u"?window:typeof self<"u"?self:l}function g(){var ve=D(),ye=ve.crypto||ve.msCrypto;if(void 0!==ye&&ye.getRandomValues){var ge=new Uint16Array(8);ye.getRandomValues(ge),ge[3]=4095&ge[3]|16384,ge[4]=16383&ge[4]|32768;var ne=function(pe){for(var Pe=pe.toString(16);Pe.length<4;)Pe="0"+Pe;return Pe};return ne(ge[0])+ne(ge[1])+ne(ge[2])+ne(ge[3])+ne(ge[4])+ne(ge[5])+ne(ge[6])+ne(ge[7])}return"xxxxxxxxxxxx4xxxyxxxxxxxxxxxxxxx".replace(/[xy]/g,function(pe){var Pe=16*Math.random()|0;return("x"===pe?Pe:3&Pe|8).toString(16)})}function E(ve){if(!ve)return{};var ye=ve.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!ye)return{};var ge=ye[6]||"",ne=ye[8]||"";return{host:ye[4],path:ye[5],protocol:ye[2],relative:ye[5]+ge+ne}}function T(ve){if(ve.message)return ve.message;if(ve.exception&&ve.exception.values&&ve.exception.values[0]){var ye=ve.exception.values[0];return ye.type&&ye.value?ye.type+": "+ye.value:ye.type||ye.value||ve.event_id||"<unknown>"}return ve.event_id||"<unknown>"}function n(ve){var ye=D();if(!("console"in ye))return ve();var ne=ye.console,pe={};["debug","info","warn","error","log","assert"].forEach(function(xe){xe in ye.console&&ne[xe].__sentry_original__&&(pe[xe]=ne[xe],ne[xe]=ne[xe].__sentry_original__)});var Pe=ve();return Object.keys(pe).forEach(function(xe){ne[xe]=pe[xe]}),Pe}function P(ve,ye,ge){ve.exception=ve.exception||{},ve.exception.values=ve.exception.values||[],ve.exception.values[0]=ve.exception.values[0]||{},ve.exception.values[0].value=ve.exception.values[0].value||ye||"",ve.exception.values[0].type=ve.exception.values[0].type||ge||"Error"}function w(ve,ye){void 0===ye&&(ye={});try{ve.exception.values[0].mechanism=ve.exception.values[0].mechanism||{},Object.keys(ye).forEach(function(ge){ve.exception.values[0].mechanism[ge]=ye[ge]})}catch{}}function B(){try{return document.location.href}catch{return""}}var Y=/^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$/;function V(ve){var ye=ve.match(Y)||[],ge=parseInt(ye[1],10),ne=parseInt(ye[2],10),pe=parseInt(ye[3],10);return{buildmetadata:ye[5],major:isNaN(ge)?void 0:ge,minor:isNaN(ne)?void 0:ne,patch:isNaN(pe)?void 0:pe,prerelease:ye[4]}}var ue=6e4;function he(ve,ye){if(!ye)return ue;var ge=parseInt(""+ye,10);if(!isNaN(ge))return 1e3*ge;var ne=Date.parse(""+ye);return isNaN(ne)?ue:ne-ve}function ae(ve,ye,ge){void 0===ge&&(ge=5);var ne=ye.lineno||0,pe=ve.length,Pe=Math.max(Math.min(pe,ne-1),0);ye.pre_context=ve.slice(Math.max(0,Pe-ge),Pe).map(function(xe){return(0,e.JM)(xe,0)}),ye.context_line=(0,e.JM)(ve[Math.min(pe-1,Pe)],ye.colno||0),ye.post_context=ve.slice(Math.min(Pe+1,pe),Pe+1+ge).map(function(xe){return(0,e.JM)(xe,0)})}function X(ve){return ve.split(/[\?#]/,1)[0]}},24864:(qe,I,p)=>{"use strict";function o(){return"[object process]"===Object.prototype.toString.call(typeof process<"u"?process:0)}function e(l,D){return l.require(D)}p.d(I,{K:()=>o,l:()=>e})},57759:(qe,I,p)=>{"use strict";p.d(I,{Fv:()=>ae,Jr:()=>ve,Qy:()=>Y,_j:()=>n,_p:()=>he,hl:()=>T,zf:()=>X});var o=p(50832),e=p(36477),l=p(96412),D=p(6250),g=p(19725),E=p(21090);function T(ye,ge,ne){if(ge in ye){var pe=ye[ge],Pe=ne(pe);if("function"==typeof Pe)try{Pe.prototype=Pe.prototype||{},Object.defineProperties(Pe,{__sentry_original__:{enumerable:!1,value:pe}})}catch{}ye[ge]=Pe}}function n(ye){return Object.keys(ye).map(function(ge){return encodeURIComponent(ge)+"="+encodeURIComponent(ye[ge])}).join("&")}function P(ye){if((0,l.VZ)(ye)){var ge=ye,ne={message:ge.message,name:ge.name,stack:ge.stack};for(var pe in ge)Object.prototype.hasOwnProperty.call(ge,pe)&&(ne[pe]=ge[pe]);return ne}if((0,l.cO)(ye)){var Pe=ye,xe={};xe.type=Pe.type;try{xe.target=(0,l.kK)(Pe.target)?(0,e.R)(Pe.target):Object.prototype.toString.call(Pe.target)}catch{xe.target="<unknown>"}try{xe.currentTarget=(0,l.kK)(Pe.currentTarget)?(0,e.R)(Pe.currentTarget):Object.prototype.toString.call(Pe.currentTarget)}catch{xe.currentTarget="<unknown>"}for(var pe in typeof CustomEvent<"u"&&(0,l.V9)(ye,CustomEvent)&&(xe.detail=Pe.detail),Pe)Object.prototype.hasOwnProperty.call(Pe,pe)&&(xe[pe]=Pe);return xe}return ye}function B(ye){return function w(ye){return~-encodeURI(ye).split(/%..|./).length}(JSON.stringify(ye))}function Y(ye,ge,ne){void 0===ge&&(ge=3),void 0===ne&&(ne=102400);var pe=ae(ye,ge);return B(pe)>ne?Y(ye,ge-1,ne):pe}function ue(ye,ge){return"domain"===ge&&ye&&"object"==typeof ye&&ye._events?"[Domain]":"domainEmitter"===ge?"[DomainEmitter]":typeof global<"u"&&ye===global?"[Global]":typeof window<"u"&&ye===window?"[Window]":typeof document<"u"&&ye===document?"[Document]":(0,l.Cy)(ye)?"[SyntheticEvent]":"number"==typeof ye&&ye!=ye?"[NaN]":void 0===ye?"[undefined]":"function"==typeof ye?"[Function: "+(0,g.$)(ye)+"]":"symbol"==typeof ye?"["+String(ye)+"]":"bigint"==typeof ye?"[BigInt: "+String(ye)+"]":ye}function he(ye,ge,ne,pe){if(void 0===ne&&(ne=1/0),void 0===pe&&(pe=new D._),0===ne)return function V(ye){var ge=Object.prototype.toString.call(ye);if("string"==typeof ye)return ye;if("[object Object]"===ge)return"[Object]";if("[object Array]"===ge)return"[Array]";var ne=ue(ye);return(0,l.pt)(ne)?ne:ge}(ge);if(null!=ge&&"function"==typeof ge.toJSON)return ge.toJSON();var Pe=ue(ge,ye);if((0,l.pt)(Pe))return Pe;var xe=P(ge),de=Array.isArray(ge)?[]:{};if(pe.memoize(ge))return"[Circular ~]";for(var re in xe)Object.prototype.hasOwnProperty.call(xe,re)&&(de[re]=he(re,xe[re],ne-1,pe));return pe.unmemoize(ge),de}function ae(ye,ge){try{return JSON.parse(JSON.stringify(ye,function(ne,pe){return he(ne,pe,ge)}))}catch{return"**non-serializable**"}}function X(ye,ge){void 0===ge&&(ge=40);var ne=Object.keys(P(ye));if(ne.sort(),!ne.length)return"[object has no keys]";if(ne[0].length>=ge)return(0,E.$G)(ne[0],ge);for(var pe=ne.length;pe>0;pe--){var Pe=ne.slice(0,pe).join(", ");if(!(Pe.length>ge))return pe===ne.length?Pe:(0,E.$G)(Pe,ge)}return""}function ve(ye){var ge,ne;if((0,l.PO)(ye)){var pe=ye,Pe={};try{for(var xe=(0,o.XA)(Object.keys(pe)),de=xe.next();!de.done;de=xe.next()){var re=de.value;typeof pe[re]<"u"&&(Pe[re]=ve(pe[re]))}}catch(oe){ge={error:oe}}finally{try{de&&!de.done&&(ne=xe.return)&&ne.call(xe)}finally{if(ge)throw ge.error}}return Pe}return Array.isArray(ye)?ye.map(ve):ye}},61147:(qe,I,p)=>{"use strict";p.d(I,{D:()=>l});var o=p(36767),e=p(30509),l=function(){function D(g){this._limit=g,this._buffer=[]}return D.prototype.isReady=function(){return void 0===this._limit||this.length()<this._limit},D.prototype.add=function(g){var E=this;return this.isReady()?(-1===this._buffer.indexOf(g)&&this._buffer.push(g),g.then(function(){return E.remove(g)}).then(null,function(){return E.remove(g).then(null,function(){})}),g):e.c.reject(new o.b("Not adding Promise due to buffer limit reached."))},D.prototype.remove=function(g){return this._buffer.splice(this._buffer.indexOf(g),1)[0]},D.prototype.length=function(){return this._buffer.length},D.prototype.drain=function(g){var E=this;return new e.c(function(T){var n=setTimeout(function(){g&&g>0&&T(!1)},g);e.c.all(E._buffer).then(function(){clearTimeout(n),T(!0)}).then(null,function(){T(!0)})})},D}()},19725:(qe,I,p)=>{"use strict";p.d(I,{$:()=>e});var o="<anonymous>";function e(l){try{return l&&"function"==typeof l&&l.name||o}catch{return o}}},21090:(qe,I,p)=>{"use strict";p.d(I,{$G:()=>e,JM:()=>l,nK:()=>D,zC:()=>g});var o=p(96412);function e(E,T){return void 0===T&&(T=0),"string"!=typeof E||0===T||E.length<=T?E:E.substr(0,T)+"..."}function l(E,T){var n=E,P=n.length;if(P<=150)return n;T>P&&(T=P);var w=Math.max(T-60,0);w<5&&(w=0);var B=Math.min(w+140,P);return B>P-5&&(B=P),B===P&&(w=Math.max(B-140,0)),n=n.slice(w,B),w>0&&(n="'{snip} "+n),B<P&&(n+=" {snip}"),n}function D(E,T){if(!Array.isArray(E))return"";for(var n=[],P=0;P<E.length;P++){var w=E[P];try{n.push(String(w))}catch{n.push("[value cannot be serialized]")}}return n.join(T)}function g(E,T){return!!(0,o.HD)(E)&&((0,o.Kj)(T)?T.test(E):"string"==typeof T&&-1!==E.indexOf(T))}},8204:(qe,I,p)=>{"use strict";p.d(I,{Ak:()=>E,Bf:()=>B,S$:()=>l,fL:()=>g,hv:()=>w,t$:()=>n,zO:()=>D,zb:()=>P});var o=p(11446),e=p(15535);function l(){try{return new ErrorEvent(""),!0}catch{return!1}}function D(){try{return new DOMError(""),!0}catch{return!1}}function g(){try{return new DOMException(""),!0}catch{return!1}}function E(){if(!("fetch"in(0,e.Rf)()))return!1;try{return new Headers,new Request(""),new Response,!0}catch{return!1}}function T(Y){return Y&&/^function fetch\(\)\s+\{\s+\[native code\]\s+\}$/.test(Y.toString())}function n(){if(!E())return!1;var Y=(0,e.Rf)();if(T(Y.fetch))return!0;var V=!1,ue=Y.document;if(ue&&"function"==typeof ue.createElement)try{var he=ue.createElement("iframe");he.hidden=!0,ue.head.appendChild(he),he.contentWindow&&he.contentWindow.fetch&&(V=T(he.contentWindow.fetch)),ue.head.removeChild(he)}catch(ae){o.k.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",ae)}return V}function P(){return"ReportingObserver"in(0,e.Rf)()}function w(){if(!E())return!1;try{return new Request("_",{referrerPolicy:"origin"}),!0}catch{return!1}}function B(){var Y=(0,e.Rf)(),V=Y.chrome,ue=V&&V.app&&V.app.runtime,he="history"in Y&&!!Y.history.pushState&&!!Y.history.replaceState;return!ue&&he}},30509:(qe,I,p)=>{"use strict";p.d(I,{c:()=>l});var e,D,o=p(96412);(D=e||(e={})).PENDING="PENDING",D.RESOLVED="RESOLVED",D.REJECTED="REJECTED";var l=function(){function D(g){var E=this;this._state=e.PENDING,this._handlers=[],this._resolve=function(T){E._setResult(e.RESOLVED,T)},this._reject=function(T){E._setResult(e.REJECTED,T)},this._setResult=function(T,n){if(E._state===e.PENDING){if((0,o.J8)(n))return void n.then(E._resolve,E._reject);E._state=T,E._value=n,E._executeHandlers()}},this._attachHandler=function(T){E._handlers=E._handlers.concat(T),E._executeHandlers()},this._executeHandlers=function(){if(E._state!==e.PENDING){var T=E._handlers.slice();E._handlers=[],T.forEach(function(n){n.done||(E._state===e.RESOLVED&&n.onfulfilled&&n.onfulfilled(E._value),E._state===e.REJECTED&&n.onrejected&&n.onrejected(E._value),n.done=!0)})}};try{g(this._resolve,this._reject)}catch(T){this._reject(T)}}return D.resolve=function(g){return new D(function(E){E(g)})},D.reject=function(g){return new D(function(E,T){T(g)})},D.all=function(g){return new D(function(E,T){if(Array.isArray(g))if(0!==g.length){var n=g.length,P=[];g.forEach(function(w,B){D.resolve(w).then(function(Y){P[B]=Y,0===(n-=1)&&E(P)}).then(null,T)})}else E([]);else T(new TypeError("Promise.all requires an array as input."))})},D.prototype.then=function(g,E){var T=this;return new D(function(n,P){T._attachHandler({done:!1,onfulfilled:function(w){if(g)try{return void n(g(w))}catch(B){return void P(B)}else n(w)},onrejected:function(w){if(E)try{return void n(E(w))}catch(B){return void P(B)}else P(w)}})})},D.prototype.catch=function(g){return this.then(function(E){return E},g)},D.prototype.finally=function(g){var E=this;return new D(function(T,n){var P,w;return E.then(function(B){w=!1,P=B,g&&g()},function(B){w=!0,P=B,g&&g()}).then(function(){w?n(P):T(P)})})},D.prototype.toString=function(){return"[object SyncPromise]"},D}()},43967:(qe,I,p)=>{"use strict";p.d(I,{Z1:()=>Y,_I:()=>w,ph:()=>P,sV:()=>B,yW:()=>n});var o=p(15535),e=p(24864);qe=p.hmd(qe);var l={nowSeconds:function(){return Date.now()/1e3}};var E=(0,e.K)()?function g(){try{return(0,e.l)(qe,"perf_hooks").performance}catch{return}}():function D(){var V=(0,o.Rf)().performance;if(V&&V.now)return{now:function(){return V.now()},timeOrigin:Date.now()-V.now()}}(),T=void 0===E?l:{nowSeconds:function(){return(E.timeOrigin+E.now())/1e3}},n=l.nowSeconds.bind(l),P=T.nowSeconds.bind(T),w=P,B=void 0!==E,Y=function(){var V=(0,o.Rf)().performance;if(V)return V.timeOrigin?V.timeOrigin:V.timing&&V.timing.navigationStart||Date.now()}()},64698:(qe,I)=>{"use strict";var o,X;I.c=void 0,(X=o||(o={})).FEMALE="female",X.MALE="male";class e{static parse(ve){if(!P.test(ve))throw new Error("Not valid SSN format");const ye=parseInt(ve.substring(0,2),10),ge=ve.substring(2,4),ne=ve.charAt(6),pe=parseInt(ve.substring(4,6),10)+l.get(ne),Pe=ve.substring(7,10),xe=ve.substring(10,11),de=parseInt(Pe,10)%2?this.MALE:this.FEMALE,re=V(pe,ge);if(!g.get(ge)||ye>re)throw new Error("Not valid SSN");const oe=parseInt(ve.substring(0,6)+Pe,10),me=new Date(pe,parseInt(ge,10)-1,ye,0,0,0,0),be=new Date;return{valid:xe===E[oe%31],sex:de,dateOfBirth:me,ageInYears:he(me,be)}}static validate(ve){try{return this.parse(ve).valid}catch{return!1}}static createWithAge(ve){if(ve<T||ve>n)throw new Error(`Given age (${ve}) is not between sensible age range of ${T} and ${n}`);const ye=new Date;let ge=ye.getFullYear()-ve;const ne=function w(){return`00${ue(12)}`.substr(-2,2)}(),pe=function Y(X,ve){const ye=V(X,ve);return`00${ue(ye)}`.substr(-2,2)}(ge,ne),Pe=ue(800)+99,xe=[];l.forEach((be,le)=>{be===100*Math.floor(ge/100)&&xe.push(le)});const de=xe[Math.floor(Math.random()*xe.length)];ae(new Date(ge,Number(ne)-1,Number(pe)),ye)||ge--,ge%=100;const re=function B(X){return X%100<10?`0${X}`:X.toString()}(ge),oe=parseInt(pe+ne+re+Pe,10);return pe+ne+re+de+Pe+E[oe%31]}static isLeapYear(ve){return ve%4==0&&ve%100!=0||ve%400==0}}I.c=e,e.FEMALE=o.FEMALE,e.MALE=o.MALE;const l=new Map;l.set("F",2e3),l.set("E",2e3),l.set("D",2e3),l.set("C",2e3),l.set("B",2e3),l.set("A",2e3),l.set("U",1900),l.set("V",1900),l.set("W",1900),l.set("X",1900),l.set("Y",1900),l.set("-",1900),l.set("+",1800);const D="02",g=new Map;g.set("01",31),g.set("02",28),g.set("03",31),g.set("04",30),g.set("05",31),g.set("06",30),g.set("07",31),g.set("08",31),g.set("09",30),g.set("10",31),g.set("11",30),g.set("12",31);const E="0123456789ABCDEFHJKLMNPRSTUVWXY".split(""),T=1,n=200,P=/^(0[1-9]|[12]\d|3[01])(0[1-9]|1[0-2])([5-9]\d\+|\d\d[-|U-Y]|[012]\d[A-F])\d{3}[\dA-Z]$/;function V(X,ve){const ye=g.get(ve);return ve===D&&e.isLeapYear(X)?ye+1:ye}function ue(X){return Math.floor(Math.random()*X)+1}function he(X,ve){return ve.getFullYear()-X.getFullYear()-(ae(X,ve)?0:1)}function ae(X,ve){return X.getMonth()<ve.getMonth()||X.getMonth()===ve.getMonth()&&X.getDate()<=ve.getDate()}},94424:qe=>{qe.exports=function e(l,D,g){function E(P,w){if(!D[P]){if(!l[P]){if(T)return T(P,!0);var Y=new Error("Cannot find module '"+P+"'");throw Y.code="MODULE_NOT_FOUND",Y}var V=D[P]={exports:{}};l[P][0].call(V.exports,function(ue){return E(l[P][1][ue]||ue)},V,V.exports,e,l,D,g)}return D[P].exports}for(var T=void 0,n=0;n<g.length;n++)E(g[n]);return E}({1:[function(e,l,D){(function(g){"use strict";var T,E=g.MutationObserver||g.WebKitMutationObserver;if(E){var n=0,P=new E(ue),w=g.document.createTextNode("");P.observe(w,{characterData:!0}),T=function(){w.data=n=++n%2}}else if(!g.setImmediate&&typeof g.MessageChannel<"u"){var B=new g.MessageChannel;B.port1.onmessage=ue,T=function(){B.port2.postMessage(0)}}else T="document"in g&&"onreadystatechange"in g.document.createElement("script")?function(){var ae=g.document.createElement("script");ae.onreadystatechange=function(){ue(),ae.onreadystatechange=null,ae.parentNode.removeChild(ae),ae=null},g.document.documentElement.appendChild(ae)}:function(){setTimeout(ue,0)};var Y,V=[];function ue(){Y=!0;for(var ae,X,ve=V.length;ve;){for(X=V,V=[],ae=-1;++ae<ve;)X[ae]();ve=V.length}Y=!1}function he(ae){1===V.push(ae)&&!Y&&T()}l.exports=he}).call(this,typeof global<"u"?global:typeof self<"u"?self:typeof window<"u"?window:{})},{}],2:[function(e,l,D){"use strict";var g=e(1);function E(){}var T={},n=["REJECTED"],P=["FULFILLED"],w=["PENDING"];function B(ne){if("function"!=typeof ne)throw new TypeError("resolver must be a function");this.state=w,this.queue=[],this.outcome=void 0,ne!==E&&he(this,ne)}function Y(ne,pe,Pe){this.promise=ne,"function"==typeof pe&&(this.onFulfilled=pe,this.callFulfilled=this.otherCallFulfilled),"function"==typeof Pe&&(this.onRejected=Pe,this.callRejected=this.otherCallRejected)}function V(ne,pe,Pe){g(function(){var xe;try{xe=pe(Pe)}catch(de){return T.reject(ne,de)}xe===ne?T.reject(ne,new TypeError("Cannot resolve promise with itself")):T.resolve(ne,xe)})}function ue(ne){var pe=ne&&ne.then;if(ne&&("object"==typeof ne||"function"==typeof ne)&&"function"==typeof pe)return function(){pe.apply(ne,arguments)}}function he(ne,pe){var Pe=!1;function xe(me){Pe||(Pe=!0,T.reject(ne,me))}function de(me){Pe||(Pe=!0,T.resolve(ne,me))}function re(){pe(de,xe)}var oe=ae(re);"error"===oe.status&&xe(oe.value)}function ae(ne,pe){var Pe={};try{Pe.value=ne(pe),Pe.status="success"}catch(xe){Pe.status="error",Pe.value=xe}return Pe}function X(ne){return ne instanceof this?ne:T.resolve(new this(E),ne)}function ve(ne){var pe=new this(E);return T.reject(pe,ne)}function ye(ne){var pe=this;if("[object Array]"!==Object.prototype.toString.call(ne))return this.reject(new TypeError("must be an array"));var Pe=ne.length,xe=!1;if(!Pe)return this.resolve([]);for(var de=new Array(Pe),re=0,oe=-1,me=new this(E);++oe<Pe;)be(ne[oe],oe);return me;function be(le,Z){function Oe(j){de[Z]=j,++re===Pe&&!xe&&(xe=!0,T.resolve(me,de))}pe.resolve(le).then(Oe,function(j){xe||(xe=!0,T.reject(me,j))})}}function ge(ne){var pe=this;if("[object Array]"!==Object.prototype.toString.call(ne))return this.reject(new TypeError("must be an array"));var Pe=ne.length,xe=!1;if(!Pe)return this.resolve([]);for(var de=-1,re=new this(E);++de<Pe;)oe(ne[de]);return re;function oe(me){pe.resolve(me).then(function(be){xe||(xe=!0,T.resolve(re,be))},function(be){xe||(xe=!0,T.reject(re,be))})}}l.exports=B,B.prototype.catch=function(ne){return this.then(null,ne)},B.prototype.then=function(ne,pe){if("function"!=typeof ne&&this.state===P||"function"!=typeof pe&&this.state===n)return this;var Pe=new this.constructor(E);return this.state!==w?V(Pe,this.state===P?ne:pe,this.outcome):this.queue.push(new Y(Pe,ne,pe)),Pe},Y.prototype.callFulfilled=function(ne){T.resolve(this.promise,ne)},Y.prototype.otherCallFulfilled=function(ne){V(this.promise,this.onFulfilled,ne)},Y.prototype.callRejected=function(ne){T.reject(this.promise,ne)},Y.prototype.otherCallRejected=function(ne){V(this.promise,this.onRejected,ne)},T.resolve=function(ne,pe){var Pe=ae(ue,pe);if("error"===Pe.status)return T.reject(ne,Pe.value);var xe=Pe.value;if(xe)he(ne,xe);else{ne.state=P,ne.outcome=pe;for(var de=-1,re=ne.queue.length;++de<re;)ne.queue[de].callFulfilled(pe)}return ne},T.reject=function(ne,pe){ne.state=n,ne.outcome=pe;for(var Pe=-1,xe=ne.queue.length;++Pe<xe;)ne.queue[Pe].callRejected(pe);return ne},B.resolve=X,B.reject=ve,B.all=ye,B.race=ge},{1:1}],3:[function(e,l,D){(function(g){"use strict";"function"!=typeof g.Promise&&(g.Promise=e(2))}).call(this,typeof global<"u"?global:typeof self<"u"?self:typeof window<"u"?window:{})},{2:2}],4:[function(e,l,D){"use strict";var g="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(en){return typeof en}:function(en){return en&&"function"==typeof Symbol&&en.constructor===Symbol&&en!==Symbol.prototype?"symbol":typeof en};function E(en,Wn){if(!(en instanceof Wn))throw new TypeError("Cannot call a class as a function")}function T(){try{if(typeof indexedDB<"u")return indexedDB;if(typeof webkitIndexedDB<"u")return webkitIndexedDB;if(typeof mozIndexedDB<"u")return mozIndexedDB;if(typeof OIndexedDB<"u")return OIndexedDB;if(typeof msIndexedDB<"u")return msIndexedDB}catch{return}}var n=T();function P(){try{if(!n||!n.open)return!1;var en=typeof openDatabase<"u"&&/(Safari|iPhone|iPad|iPod)/.test(navigator.userAgent)&&!/Chrome/.test(navigator.userAgent)&&!/BlackBerry/.test(navigator.platform),Wn="function"==typeof fetch&&-1!==fetch.toString().indexOf("[native code");return(!en||Wn)&&typeof indexedDB<"u"&&typeof IDBKeyRange<"u"}catch{return!1}}function w(en,Wn){en=en||[],Wn=Wn||{};try{return new Blob(en,Wn)}catch(St){if("TypeError"!==St.name)throw St;for(var It=new(typeof BlobBuilder<"u"?BlobBuilder:typeof MSBlobBuilder<"u"?MSBlobBuilder:typeof MozBlobBuilder<"u"?MozBlobBuilder:WebKitBlobBuilder),Qt=0;Qt<en.length;Qt+=1)It.append(en[Qt]);return It.getBlob(Wn.type)}}typeof Promise>"u"&&e(3);var B=Promise;function Y(en,Wn){Wn&&en.then(function(at){Wn(null,at)},function(at){Wn(at)})}function V(en,Wn,at){"function"==typeof Wn&&en.then(Wn),"function"==typeof at&&en.catch(at)}function ue(en){return"string"!=typeof en&&(console.warn(en+" used as a key, but it is not a string."),en=String(en)),en}function he(){if(arguments.length&&"function"==typeof arguments[arguments.length-1])return arguments[arguments.length-1]}var ae="local-forage-detect-blob-support",X=void 0,ve={},ye=Object.prototype.toString,ge="readonly",ne="readwrite";function pe(en){for(var Wn=en.length,at=new ArrayBuffer(Wn),It=new Uint8Array(at),Qt=0;Qt<Wn;Qt++)It[Qt]=en.charCodeAt(Qt);return at}function Pe(en){return new B(function(Wn){var at=en.transaction(ae,ne),It=w([""]);at.objectStore(ae).put(It,"key"),at.onabort=function(Qt){Qt.preventDefault(),Qt.stopPropagation(),Wn(!1)},at.oncomplete=function(){var Qt=navigator.userAgent.match(/Chrome\/(\d+)/),St=navigator.userAgent.match(/Edge\//);Wn(St||!Qt||parseInt(Qt[1],10)>=43)}}).catch(function(){return!1})}function xe(en){return"boolean"==typeof X?B.resolve(X):Pe(en).then(function(Wn){return X=Wn})}function de(en){var Wn=ve[en.name],at={};at.promise=new B(function(It,Qt){at.resolve=It,at.reject=Qt}),Wn.deferredOperations.push(at),Wn.dbReady?Wn.dbReady=Wn.dbReady.then(function(){return at.promise}):Wn.dbReady=at.promise}function re(en){var at=ve[en.name].deferredOperations.pop();if(at)return at.resolve(),at.promise}function oe(en,Wn){var It=ve[en.name].deferredOperations.pop();if(It)return It.reject(Wn),It.promise}function me(en,Wn){return new B(function(at,It){if(ve[en.name]=ve[en.name]||ut(),en.db){if(!Wn)return at(en.db);de(en),en.db.close()}var Qt=[en.name];Wn&&Qt.push(en.version);var St=n.open.apply(n,Qt);Wn&&(St.onupgradeneeded=function(Pt){var cn=St.result;try{cn.createObjectStore(en.storeName),Pt.oldVersion<=1&&cn.createObjectStore(ae)}catch(Ln){if("ConstraintError"!==Ln.name)throw Ln;console.warn('The database "'+en.name+'" has been upgraded from version '+Pt.oldVersion+" to version "+Pt.newVersion+', but the storage "'+en.storeName+'" already exists.')}}),St.onerror=function(Pt){Pt.preventDefault(),It(St.error)},St.onsuccess=function(){var Pt=St.result;Pt.onversionchange=function(cn){cn.target.close()},at(Pt),re(en)}})}function be(en){return me(en,!1)}function le(en){return me(en,!0)}function Z(en,Wn){if(!en.db)return!0;var at=!en.db.objectStoreNames.contains(en.storeName),It=en.version<en.db.version,Qt=en.version>en.db.version;if(It&&(en.version!==Wn&&console.warn('The database "'+en.name+"\" can't be downgraded from version "+en.db.version+" to version "+en.version+"."),en.version=en.db.version),Qt||at){if(at){var St=en.db.version+1;St>en.version&&(en.version=St)}return!0}return!1}function Oe(en){return new B(function(Wn,at){var It=new FileReader;It.onerror=at,It.onloadend=function(Qt){var St=btoa(Qt.target.result||"");Wn({__local_forage_encoded_blob:!0,data:St,type:en.type})},It.readAsBinaryString(en)})}function j(en){return w([pe(atob(en.data))],{type:en.type})}function ke(en){return en&&en.__local_forage_encoded_blob}function Be(en){var Wn=this,at=Wn._initReady().then(function(){var It=ve[Wn._dbInfo.name];if(It&&It.dbReady)return It.dbReady});return V(at,en,en),at}function nt(en){de(en);for(var Wn=ve[en.name],at=Wn.forages,It=0;It<at.length;It++){var Qt=at[It];Qt._dbInfo.db&&(Qt._dbInfo.db.close(),Qt._dbInfo.db=null)}return en.db=null,be(en).then(function(St){return en.db=St,Z(en)?le(en):St}).then(function(St){en.db=Wn.db=St;for(var Pt=0;Pt<at.length;Pt++)at[Pt]._dbInfo.db=St}).catch(function(St){throw oe(en,St),St})}function mt(en,Wn,at,It){void 0===It&&(It=1);try{var Qt=en.db.transaction(en.storeName,Wn);at(null,Qt)}catch(St){if(It>0&&(!en.db||"InvalidStateError"===St.name||"NotFoundError"===St.name))return B.resolve().then(function(){if(!en.db||"NotFoundError"===St.name&&!en.db.objectStoreNames.contains(en.storeName)&&en.version<=en.db.version)return en.db&&(en.version=en.db.version+1),le(en)}).then(function(){return nt(en).then(function(){mt(en,Wn,at,It-1)})}).catch(at);at(St)}}function ut(){return{forages:[],db:null,dbReady:null,deferredOperations:[]}}function Ve(en){var Wn=this,at={db:null};if(en)for(var It in en)at[It]=en[It];var Qt=ve[at.name];Qt||(Qt=ut(),ve[at.name]=Qt),Qt.forages.push(Wn),Wn._initReady||(Wn._initReady=Wn.ready,Wn.ready=Be);var St=[];function Pt(){return B.resolve()}for(var cn=0;cn<Qt.forages.length;cn++){var Ln=Qt.forages[cn];Ln!==Wn&&St.push(Ln._initReady().catch(Pt))}var ii=Qt.forages.slice(0);return B.all(St).then(function(){return at.db=Qt.db,be(at)}).then(function(hi){return at.db=hi,Z(at,Wn._defaultConfig.version)?le(at):hi}).then(function(hi){at.db=Qt.db=hi,Wn._dbInfo=at;for(var Ri=0;Ri<ii.length;Ri++){var _r=ii[Ri];_r!==Wn&&(_r._dbInfo.db=at.db,_r._dbInfo.version=at.version)}})}function tt(en,Wn){var at=this;en=ue(en);var It=new B(function(Qt,St){at.ready().then(function(){mt(at._dbInfo,ge,function(Pt,cn){if(Pt)return St(Pt);try{var ii=cn.objectStore(at._dbInfo.storeName).get(en);ii.onsuccess=function(){var hi=ii.result;void 0===hi&&(hi=null),ke(hi)&&(hi=j(hi)),Qt(hi)},ii.onerror=function(){St(ii.error)}}catch(hi){St(hi)}})}).catch(St)});return Y(It,Wn),It}function Ne(en,Wn){var at=this,It=new B(function(Qt,St){at.ready().then(function(){mt(at._dbInfo,ge,function(Pt,cn){if(Pt)return St(Pt);try{var ii=cn.objectStore(at._dbInfo.storeName).openCursor(),hi=1;ii.onsuccess=function(){var Ri=ii.result;if(Ri){var _r=Ri.value;ke(_r)&&(_r=j(_r));var er=en(_r,Ri.key,hi++);void 0!==er?Qt(er):Ri.continue()}else Qt()},ii.onerror=function(){St(ii.error)}}catch(Ri){St(Ri)}})}).catch(St)});return Y(It,Wn),It}function wt(en,Wn,at){var It=this;en=ue(en);var Qt=new B(function(St,Pt){var cn;It.ready().then(function(){return cn=It._dbInfo,"[object Blob]"===ye.call(Wn)?xe(cn.db).then(function(Ln){return Ln?Wn:Oe(Wn)}):Wn}).then(function(Ln){mt(It._dbInfo,ne,function(ii,hi){if(ii)return Pt(ii);try{var Ri=hi.objectStore(It._dbInfo.storeName);null===Ln&&(Ln=void 0);var _r=Ri.put(Ln,en);hi.oncomplete=function(){void 0===Ln&&(Ln=null),St(Ln)},hi.onabort=hi.onerror=function(){var er=_r.error?_r.error:_r.transaction.error;Pt(er)}}catch(er){Pt(er)}})}).catch(Pt)});return Y(Qt,at),Qt}function ft(en,Wn){var at=this;en=ue(en);var It=new B(function(Qt,St){at.ready().then(function(){mt(at._dbInfo,ne,function(Pt,cn){if(Pt)return St(Pt);try{var ii=cn.objectStore(at._dbInfo.storeName).delete(en);cn.oncomplete=function(){Qt()},cn.onerror=function(){St(ii.error)},cn.onabort=function(){var hi=ii.error?ii.error:ii.transaction.error;St(hi)}}catch(hi){St(hi)}})}).catch(St)});return Y(It,Wn),It}function Ct(en){var Wn=this,at=new B(function(It,Qt){Wn.ready().then(function(){mt(Wn._dbInfo,ne,function(St,Pt){if(St)return Qt(St);try{var Ln=Pt.objectStore(Wn._dbInfo.storeName).clear();Pt.oncomplete=function(){It()},Pt.onabort=Pt.onerror=function(){var ii=Ln.error?Ln.error:Ln.transaction.error;Qt(ii)}}catch(ii){Qt(ii)}})}).catch(Qt)});return Y(at,en),at}function rn(en){var Wn=this,at=new B(function(It,Qt){Wn.ready().then(function(){mt(Wn._dbInfo,ge,function(St,Pt){if(St)return Qt(St);try{var Ln=Pt.objectStore(Wn._dbInfo.storeName).count();Ln.onsuccess=function(){It(Ln.result)},Ln.onerror=function(){Qt(Ln.error)}}catch(ii){Qt(ii)}})}).catch(Qt)});return Y(at,en),at}function He(en,Wn){var at=this,It=new B(function(Qt,St){en<0?Qt(null):at.ready().then(function(){mt(at._dbInfo,ge,function(Pt,cn){if(Pt)return St(Pt);try{var Ln=cn.objectStore(at._dbInfo.storeName),ii=!1,hi=Ln.openKeyCursor();hi.onsuccess=function(){var Ri=hi.result;Ri?0===en||ii?Qt(Ri.key):(ii=!0,Ri.advance(en)):Qt(null)},hi.onerror=function(){St(hi.error)}}catch(Ri){St(Ri)}})}).catch(St)});return Y(It,Wn),It}function st(en){var Wn=this,at=new B(function(It,Qt){Wn.ready().then(function(){mt(Wn._dbInfo,ge,function(St,Pt){if(St)return Qt(St);try{var Ln=Pt.objectStore(Wn._dbInfo.storeName).openKeyCursor(),ii=[];Ln.onsuccess=function(){var hi=Ln.result;hi?(ii.push(hi.key),hi.continue()):It(ii)},Ln.onerror=function(){Qt(Ln.error)}}catch(hi){Qt(hi)}})}).catch(Qt)});return Y(at,en),at}function nn(en,Wn){Wn=he.apply(this,arguments);var at=this.config();(en="function"!=typeof en&&en||{}).name||(en.name=en.name||at.name,en.storeName=en.storeName||at.storeName);var Qt,It=this;if(en.name){var Pt=en.name===at.name&&It._dbInfo.db?B.resolve(It._dbInfo.db):be(en).then(function(cn){var Ln=ve[en.name],ii=Ln.forages;Ln.db=cn;for(var hi=0;hi<ii.length;hi++)ii[hi]._dbInfo.db=cn;return cn});Qt=en.storeName?Pt.then(function(cn){if(cn.objectStoreNames.contains(en.storeName)){var Ln=cn.version+1;de(en);var ii=ve[en.name],hi=ii.forages;cn.close();for(var Ri=0;Ri<hi.length;Ri++){var _r=hi[Ri];_r._dbInfo.db=null,_r._dbInfo.version=Ln}return new B(function(Yr,_o){var Si=n.open(en.name,Ln);Si.onerror=function(to){Si.result.close(),_o(to)},Si.onupgradeneeded=function(){Si.result.deleteObjectStore(en.storeName)},Si.onsuccess=function(){var to=Si.result;to.close(),Yr(to)}}).then(function(Yr){ii.db=Yr;for(var _o=0;_o<hi.length;_o++){var Si=hi[_o];Si._dbInfo.db=Yr,re(Si._dbInfo)}}).catch(function(Yr){throw(oe(en,Yr)||B.resolve()).catch(function(){}),Yr})}}):Pt.then(function(cn){de(en);var Ln=ve[en.name],ii=Ln.forages;cn.close();for(var hi=0;hi<ii.length;hi++)ii[hi]._dbInfo.db=null;return new B(function(er,Yr){var _o=n.deleteDatabase(en.name);_o.onerror=function(){var Si=_o.result;Si&&Si.close(),Yr(_o.error)},_o.onblocked=function(){console.warn('dropInstance blocked for database "'+en.name+'" until all open connections are closed')},_o.onsuccess=function(){var Si=_o.result;Si&&Si.close(),er(Si)}}).then(function(er){Ln.db=er;for(var Yr=0;Yr<ii.length;Yr++)re(ii[Yr]._dbInfo)}).catch(function(er){throw(oe(en,er)||B.resolve()).catch(function(){}),er})})}else Qt=B.reject("Invalid arguments");return Y(Qt,Wn),Qt}var Dn={_driver:"asyncStorage",_initStorage:Ve,_support:P(),iterate:Ne,getItem:tt,setItem:wt,removeItem:ft,clear:Ct,length:rn,key:He,keys:st,dropInstance:nn};function Mn(){return"function"==typeof openDatabase}var vi="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Gi="~~local_forage_type~",mi=/^~~local_forage_type~([^~]+)~/,wi="__lfsc__:",Bn=wi.length,kn="arbf",On="blob",je="si08",Bt="ui08",xn="uic8",Fn="si16",ui="si32",Ai="ur16",si="ui32",Vi="fl32",Vn="fl64",Hn=Bn+kn.length,An=Object.prototype.toString;function vn(en){var It,St,Pt,cn,Ln,Wn=.75*en.length,at=en.length,Qt=0;"="===en[en.length-1]&&(Wn--,"="===en[en.length-2]&&Wn--);var ii=new ArrayBuffer(Wn),hi=new Uint8Array(ii);for(It=0;It<at;It+=4)St=vi.indexOf(en[It]),Pt=vi.indexOf(en[It+1]),cn=vi.indexOf(en[It+2]),Ln=vi.indexOf(en[It+3]),hi[Qt++]=St<<2|Pt>>4,hi[Qt++]=(15&Pt)<<4|cn>>2,hi[Qt++]=(3&cn)<<6|63&Ln;return ii}function In(en){var It,Wn=new Uint8Array(en),at="";for(It=0;It<Wn.length;It+=3)at+=vi[Wn[It]>>2],at+=vi[(3&Wn[It])<<4|Wn[It+1]>>4],at+=vi[(15&Wn[It+1])<<2|Wn[It+2]>>6],at+=vi[63&Wn[It+2]];return Wn.length%3==2?at=at.substring(0,at.length-1)+"=":Wn.length%3==1&&(at=at.substring(0,at.length-2)+"=="),at}function Zi(en,Wn){var at="";if(en&&(at=An.call(en)),en&&("[object ArrayBuffer]"===at||en.buffer&&"[object ArrayBuffer]"===An.call(en.buffer))){var It,Qt=wi;en instanceof ArrayBuffer?(It=en,Qt+=kn):(It=en.buffer,"[object Int8Array]"===at?Qt+=je:"[object Uint8Array]"===at?Qt+=Bt:"[object Uint8ClampedArray]"===at?Qt+=xn:"[object Int16Array]"===at?Qt+=Fn:"[object Uint16Array]"===at?Qt+=Ai:"[object Int32Array]"===at?Qt+=ui:"[object Uint32Array]"===at?Qt+=si:"[object Float32Array]"===at?Qt+=Vi:"[object Float64Array]"===at?Qt+=Vn:Wn(new Error("Failed to get type for BinaryArray"))),Wn(Qt+In(It))}else if("[object Blob]"===at){var St=new FileReader;St.onload=function(){var Pt=Gi+en.type+"~"+In(this.result);Wn(wi+On+Pt)},St.readAsArrayBuffer(en)}else try{Wn(JSON.stringify(en))}catch(Pt){console.error("Couldn't convert value into a JSON string: ",en),Wn(null,Pt)}}function gr(en){if(en.substring(0,Bn)!==wi)return JSON.parse(en);var It,Wn=en.substring(Hn),at=en.substring(Bn,Hn);if(at===On&&mi.test(Wn)){var Qt=Wn.match(mi);It=Qt[1],Wn=Wn.substring(Qt[0].length)}var St=vn(Wn);switch(at){case kn:return St;case On:return w([St],{type:It});case je:return new Int8Array(St);case Bt:return new Uint8Array(St);case xn:return new Uint8ClampedArray(St);case Fn:return new Int16Array(St);case Ai:return new Uint16Array(St);case ui:return new Int32Array(St);case si:return new Uint32Array(St);case Vi:return new Float32Array(St);case Vn:return new Float64Array(St);default:throw new Error("Unkown type: "+at)}}var Hi={serialize:Zi,deserialize:gr,stringToBuffer:vn,bufferToString:In};function Gr(en,Wn,at,It){en.executeSql("CREATE TABLE IF NOT EXISTS "+Wn.storeName+" (id INTEGER PRIMARY KEY, key unique, value)",[],at,It)}function zr(en){var Wn=this,at={db:null};if(en)for(var It in en)at[It]="string"!=typeof en[It]?en[It].toString():en[It];var Qt=new B(function(St,Pt){try{at.db=openDatabase(at.name,String(at.version),at.description,at.size)}catch(cn){return Pt(cn)}at.db.transaction(function(cn){Gr(cn,at,function(){Wn._dbInfo=at,St()},function(Ln,ii){Pt(ii)})},Pt)});return at.serializer=Hi,Qt}function Eo(en,Wn,at,It,Qt,St){en.executeSql(at,It,Qt,function(Pt,cn){cn.code===cn.SYNTAX_ERR?Pt.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name = ?",[Wn.storeName],function(Ln,ii){ii.rows.length?St(Ln,cn):Gr(Ln,Wn,function(){Ln.executeSql(at,It,Qt,St)},St)},St):St(Pt,cn)},St)}function mr(en,Wn){var at=this;en=ue(en);var It=new B(function(Qt,St){at.ready().then(function(){var Pt=at._dbInfo;Pt.db.transaction(function(cn){Eo(cn,Pt,"SELECT * FROM "+Pt.storeName+" WHERE key = ? LIMIT 1",[en],function(Ln,ii){var hi=ii.rows.length?ii.rows.item(0).value:null;hi&&(hi=Pt.serializer.deserialize(hi)),Qt(hi)},function(Ln,ii){St(ii)})})}).catch(St)});return Y(It,Wn),It}function jn(en,Wn){var at=this,It=new B(function(Qt,St){at.ready().then(function(){var Pt=at._dbInfo;Pt.db.transaction(function(cn){Eo(cn,Pt,"SELECT * FROM "+Pt.storeName,[],function(Ln,ii){for(var hi=ii.rows,Ri=hi.length,_r=0;_r<Ri;_r++){var er=hi.item(_r),Yr=er.value;if(Yr&&(Yr=Pt.serializer.deserialize(Yr)),void 0!==(Yr=en(Yr,er.key,_r+1)))return void Qt(Yr)}Qt()},function(Ln,ii){St(ii)})})}).catch(St)});return Y(It,Wn),It}function ct(en,Wn,at,It){var Qt=this;en=ue(en);var St=new B(function(Pt,cn){Qt.ready().then(function(){void 0===Wn&&(Wn=null);var Ln=Wn,ii=Qt._dbInfo;ii.serializer.serialize(Wn,function(hi,Ri){Ri?cn(Ri):ii.db.transaction(function(_r){Eo(_r,ii,"INSERT OR REPLACE INTO "+ii.storeName+" (key, value) VALUES (?, ?)",[en,hi],function(){Pt(Ln)},function(er,Yr){cn(Yr)})},function(_r){if(_r.code===_r.QUOTA_ERR){if(It>0)return void Pt(ct.apply(Qt,[en,Ln,at,It-1]));cn(_r)}})})}).catch(cn)});return Y(St,at),St}function Yt(en,Wn,at){return ct.apply(this,[en,Wn,at,1])}function oi(en,Wn){var at=this;en=ue(en);var It=new B(function(Qt,St){at.ready().then(function(){var Pt=at._dbInfo;Pt.db.transaction(function(cn){Eo(cn,Pt,"DELETE FROM "+Pt.storeName+" WHERE key = ?",[en],function(){Qt()},function(Ln,ii){St(ii)})})}).catch(St)});return Y(It,Wn),It}function Ni(en){var Wn=this,at=new B(function(It,Qt){Wn.ready().then(function(){var St=Wn._dbInfo;St.db.transaction(function(Pt){Eo(Pt,St,"DELETE FROM "+St.storeName,[],function(){It()},function(cn,Ln){Qt(Ln)})})}).catch(Qt)});return Y(at,en),at}function Nn(en){var Wn=this,at=new B(function(It,Qt){Wn.ready().then(function(){var St=Wn._dbInfo;St.db.transaction(function(Pt){Eo(Pt,St,"SELECT COUNT(key) as c FROM "+St.storeName,[],function(cn,Ln){var ii=Ln.rows.item(0).c;It(ii)},function(cn,Ln){Qt(Ln)})})}).catch(Qt)});return Y(at,en),at}function pr(en,Wn){var at=this,It=new B(function(Qt,St){at.ready().then(function(){var Pt=at._dbInfo;Pt.db.transaction(function(cn){Eo(cn,Pt,"SELECT key FROM "+Pt.storeName+" WHERE id = ? LIMIT 1",[en+1],function(Ln,ii){var hi=ii.rows.length?ii.rows.item(0).key:null;Qt(hi)},function(Ln,ii){St(ii)})})}).catch(St)});return Y(It,Wn),It}function Sn(en){var Wn=this,at=new B(function(It,Qt){Wn.ready().then(function(){var St=Wn._dbInfo;St.db.transaction(function(Pt){Eo(Pt,St,"SELECT key FROM "+St.storeName,[],function(cn,Ln){for(var ii=[],hi=0;hi<Ln.rows.length;hi++)ii.push(Ln.rows.item(hi).key);It(ii)},function(cn,Ln){Qt(Ln)})})}).catch(Qt)});return Y(at,en),at}function Pn(en){return new B(function(Wn,at){en.transaction(function(It){It.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name <> '__WebKitDatabaseInfoTable__'",[],function(Qt,St){for(var Pt=[],cn=0;cn<St.rows.length;cn++)Pt.push(St.rows.item(cn).name);Wn({db:en,storeNames:Pt})},function(Qt,St){at(St)})},function(It){at(It)})})}function Nt(en,Wn){Wn=he.apply(this,arguments);var at=this.config();(en="function"!=typeof en&&en||{}).name||(en.name=en.name||at.name,en.storeName=en.storeName||at.storeName);var Qt,It=this;return Y(Qt=en.name?new B(function(St){var Pt;Pt=en.name===at.name?It._dbInfo.db:openDatabase(en.name,"","",0),en.storeName?St({db:Pt,storeNames:[en.storeName]}):St(Pn(Pt))}).then(function(St){return new B(function(Pt,cn){St.db.transaction(function(Ln){function ii(er){return new B(function(Yr,_o){Ln.executeSql("DROP TABLE IF EXISTS "+er,[],function(){Yr()},function(Si,to){_o(to)})})}for(var hi=[],Ri=0,_r=St.storeNames.length;Ri<_r;Ri++)hi.push(ii(St.storeNames[Ri]));B.all(hi).then(function(){Pt()}).catch(function(er){cn(er)})},function(Ln){cn(Ln)})})}):B.reject("Invalid arguments"),Wn),Qt}var ai={_driver:"webSQLStorage",_initStorage:zr,_support:Mn(),iterate:jn,getItem:mr,setItem:Yt,removeItem:oi,clear:Ni,length:Nn,key:pr,keys:Sn,dropInstance:Nt};function hn(){try{return typeof localStorage<"u"&&"setItem"in localStorage&&!!localStorage.setItem}catch{return!1}}function Le(en,Wn){var at=en.name+"/";return en.storeName!==Wn.storeName&&(at+=en.storeName+"/"),at}function ce(){var en="_localforage_support_test";try{return localStorage.setItem(en,!0),localStorage.removeItem(en),!1}catch{return!0}}function we(){return!ce()||localStorage.length>0}function Qe(en){var Wn=this,at={};if(en)for(var It in en)at[It]=en[It];return at.keyPrefix=Le(en,Wn._defaultConfig),we()?(Wn._dbInfo=at,at.serializer=Hi,B.resolve()):B.reject()}function qt(en){var Wn=this,at=Wn.ready().then(function(){for(var It=Wn._dbInfo.keyPrefix,Qt=localStorage.length-1;Qt>=0;Qt--){var St=localStorage.key(Qt);0===St.indexOf(It)&&localStorage.removeItem(St)}});return Y(at,en),at}function Tn(en,Wn){var at=this;en=ue(en);var It=at.ready().then(function(){var Qt=at._dbInfo,St=localStorage.getItem(Qt.keyPrefix+en);return St&&(St=Qt.serializer.deserialize(St)),St});return Y(It,Wn),It}function lr(en,Wn){var at=this,It=at.ready().then(function(){for(var Qt=at._dbInfo,St=Qt.keyPrefix,Pt=St.length,cn=localStorage.length,Ln=1,ii=0;ii<cn;ii++){var hi=localStorage.key(ii);if(0===hi.indexOf(St)){var Ri=localStorage.getItem(hi);if(Ri&&(Ri=Qt.serializer.deserialize(Ri)),void 0!==(Ri=en(Ri,hi.substring(Pt),Ln++)))return Ri}}});return Y(It,Wn),It}function mo(en,Wn){var at=this,It=at.ready().then(function(){var St,Qt=at._dbInfo;try{St=localStorage.key(en)}catch{St=null}return St&&(St=St.substring(Qt.keyPrefix.length)),St});return Y(It,Wn),It}function rr(en){var Wn=this,at=Wn.ready().then(function(){for(var It=Wn._dbInfo,Qt=localStorage.length,St=[],Pt=0;Pt<Qt;Pt++){var cn=localStorage.key(Pt);0===cn.indexOf(It.keyPrefix)&&St.push(cn.substring(It.keyPrefix.length))}return St});return Y(at,en),at}function aa(en){var at=this.keys().then(function(It){return It.length});return Y(at,en),at}function ea(en,Wn){var at=this;en=ue(en);var It=at.ready().then(function(){var Qt=at._dbInfo;localStorage.removeItem(Qt.keyPrefix+en)});return Y(It,Wn),It}function Bo(en,Wn,at){var It=this;en=ue(en);var Qt=It.ready().then(function(){void 0===Wn&&(Wn=null);var St=Wn;return new B(function(Pt,cn){var Ln=It._dbInfo;Ln.serializer.serialize(Wn,function(ii,hi){if(hi)cn(hi);else try{localStorage.setItem(Ln.keyPrefix+en,ii),Pt(St)}catch(Ri){("QuotaExceededError"===Ri.name||"NS_ERROR_DOM_QUOTA_REACHED"===Ri.name)&&cn(Ri),cn(Ri)}})})});return Y(Qt,at),Qt}function Ii(en,Wn){if(Wn=he.apply(this,arguments),!(en="function"!=typeof en&&en||{}).name){var at=this.config();en.name=en.name||at.name,en.storeName=en.storeName||at.storeName}var Qt,It=this;return Y(Qt=en.name?new B(function(St){en.storeName?St(Le(en,It._defaultConfig)):St(en.name+"/")}).then(function(St){for(var Pt=localStorage.length-1;Pt>=0;Pt--){var cn=localStorage.key(Pt);0===cn.indexOf(St)&&localStorage.removeItem(cn)}}):B.reject("Invalid arguments"),Wn),Qt}var an={_driver:"localStorageWrapper",_initStorage:Qe,_support:hn(),iterate:lr,getItem:Tn,setItem:Bo,removeItem:ea,clear:qt,length:aa,key:mo,keys:rr,dropInstance:Ii},Zn=function(Wn,at){return Wn===at||"number"==typeof Wn&&"number"==typeof at&&isNaN(Wn)&&isNaN(at)},Ci=function(Wn,at){for(var It=Wn.length,Qt=0;Qt<It;){if(Zn(Wn[Qt],at))return!0;Qt++}return!1},Xn=Array.isArray||function(en){return"[object Array]"===Object.prototype.toString.call(en)},Et={},gn={},ei={INDEXEDDB:Dn,WEBSQL:ai,LOCALSTORAGE:an},un=[ei.INDEXEDDB._driver,ei.WEBSQL._driver,ei.LOCALSTORAGE._driver],Ft=["dropInstance"],Ut=["clear","getItem","iterate","key","keys","length","removeItem","setItem"].concat(Ft),wn={description:"",driver:un.slice(),name:"localforage",size:4980736,storeName:"keyvaluepairs",version:1};function Gn(en,Wn){en[Wn]=function(){var at=arguments;return en.ready().then(function(){return en[Wn].apply(en,at)})}}function xi(){for(var en=1;en<arguments.length;en++){var Wn=arguments[en];if(Wn)for(var at in Wn)Wn.hasOwnProperty(at)&&(Xn(Wn[at])?arguments[0][at]=Wn[at].slice():arguments[0][at]=Wn[at])}return arguments[0]}var Cr=function(){function en(Wn){for(var at in E(this,en),ei)if(ei.hasOwnProperty(at)){var It=ei[at],Qt=It._driver;this[at]=Qt,Et[Qt]||this.defineDriver(It)}this._defaultConfig=xi({},wn),this._config=xi({},this._defaultConfig,Wn),this._driverSet=null,this._initDriver=null,this._ready=!1,this._dbInfo=null,this._wrapLibraryMethodsWithReady(),this.setDriver(this._config.driver).catch(function(){})}return en.prototype.config=function(at){if("object"===(typeof at>"u"?"undefined":g(at))){if(this._ready)return new Error("Can't call config() after localforage has been used.");for(var It in at){if("storeName"===It&&(at[It]=at[It].replace(/\W/g,"_")),"version"===It&&"number"!=typeof at[It])return new Error("Database version must be a number.");this._config[It]=at[It]}return!("driver"in at)||!at.driver||this.setDriver(this._config.driver)}return"string"==typeof at?this._config[at]:this._config},en.prototype.defineDriver=function(at,It,Qt){var St=new B(function(Pt,cn){try{var Ln=at._driver,ii=new Error("Custom driver not compliant; see https://mozilla.github.io/localForage/#definedriver");if(!at._driver)return void cn(ii);for(var hi=Ut.concat("_initStorage"),Ri=0,_r=hi.length;Ri<_r;Ri++){var er=hi[Ri];if((!Ci(Ft,er)||at[er])&&"function"!=typeof at[er])return void cn(ii)}var _o=function(){for(var Oa=function(ts){return function(){var gs=new Error("Method "+ts+" is not implemented by the current driver"),tc=B.reject(gs);return Y(tc,arguments[arguments.length-1]),tc}},Uo=0,rl=Ft.length;Uo<rl;Uo++){var Vs=Ft[Uo];at[Vs]||(at[Vs]=Oa(Vs))}};_o();var Si=function(Oa){Et[Ln]&&console.info("Redefining LocalForage driver: "+Ln),Et[Ln]=at,gn[Ln]=Oa,Pt()};"_support"in at?at._support&&"function"==typeof at._support?at._support().then(Si,cn):Si(!!at._support):Si(!0)}catch(to){cn(to)}});return V(St,It,Qt),St},en.prototype.driver=function(){return this._driver||null},en.prototype.getDriver=function(at,It,Qt){var St=Et[at]?B.resolve(Et[at]):B.reject(new Error("Driver not found."));return V(St,It,Qt),St},en.prototype.getSerializer=function(at){var It=B.resolve(Hi);return V(It,at),It},en.prototype.ready=function(at){var It=this,Qt=It._driverSet.then(function(){return null===It._ready&&(It._ready=It._initDriver()),It._ready});return V(Qt,at,at),Qt},en.prototype.setDriver=function(at,It,Qt){var St=this;Xn(at)||(at=[at]);var Pt=this._getSupportedDrivers(at);function cn(){St._config.driver=St.driver()}function Ln(Ri){return St._extend(Ri),cn(),St._ready=St._initStorage(St._config),St._ready}function ii(Ri){return function(){var _r=0;function er(){for(;_r<Ri.length;){var Yr=Ri[_r];return _r++,St._dbInfo=null,St._ready=null,St.getDriver(Yr).then(Ln).catch(er)}cn();var _o=new Error("No available storage method found.");return St._driverSet=B.reject(_o),St._driverSet}return er()}}var hi=null!==this._driverSet?this._driverSet.catch(function(){return B.resolve()}):B.resolve();return this._driverSet=hi.then(function(){var Ri=Pt[0];return St._dbInfo=null,St._ready=null,St.getDriver(Ri).then(function(_r){St._driver=_r._driver,cn(),St._wrapLibraryMethodsWithReady(),St._initDriver=ii(Pt)})}).catch(function(){cn();var Ri=new Error("No available storage method found.");return St._driverSet=B.reject(Ri),St._driverSet}),V(this._driverSet,It,Qt),this._driverSet},en.prototype.supports=function(at){return!!gn[at]},en.prototype._extend=function(at){xi(this,at)},en.prototype._getSupportedDrivers=function(at){for(var It=[],Qt=0,St=at.length;Qt<St;Qt++){var Pt=at[Qt];this.supports(Pt)&&It.push(Pt)}return It},en.prototype._wrapLibraryMethodsWithReady=function(){for(var at=0,It=Ut.length;at<It;at++)Gn(this,Ut[at])},en.prototype.createInstance=function(at){return new en(at)},en}(),Fr=new Cr;l.exports=Fr},{3:3}]},{},[4])(4)},17489:function(qe,I,p){var o;qe=p.nmd(qe),function(){var e,D=200,g="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",E="Expected a function",T="Invalid `variable` option passed into `_.template`",n="__lodash_hash_undefined__",P=500,w="__lodash_placeholder__",B=1,Y=2,V=4,ue=1,he=2,ae=1,X=2,ve=4,ye=8,ge=16,ne=32,pe=64,Pe=128,xe=256,de=512,re=30,oe="...",me=800,be=16,le=1,Z=2,j=1/0,ke=9007199254740991,Be=17976931348623157e292,nt=NaN,mt=4294967295,ut=mt-1,Ve=mt>>>1,tt=[["ary",Pe],["bind",ae],["bindKey",X],["curry",ye],["curryRight",ge],["flip",de],["partial",ne],["partialRight",pe],["rearg",xe]],Ne="[object Arguments]",wt="[object Array]",ft="[object AsyncFunction]",Ct="[object Boolean]",rn="[object Date]",He="[object DOMException]",st="[object Error]",nn="[object Function]",Dn="[object GeneratorFunction]",Mn="[object Map]",vi="[object Number]",Gi="[object Null]",mi="[object Object]",wi="[object Promise]",Bn="[object Proxy]",kn="[object RegExp]",On="[object Set]",je="[object String]",Bt="[object Symbol]",xn="[object Undefined]",Fn="[object WeakMap]",ui="[object WeakSet]",Ai="[object ArrayBuffer]",si="[object DataView]",Vi="[object Float32Array]",Vn="[object Float64Array]",Hn="[object Int8Array]",An="[object Int16Array]",vn="[object Int32Array]",In="[object Uint8Array]",Zi="[object Uint8ClampedArray]",gr="[object Uint16Array]",Hi="[object Uint32Array]",Gr=/\b__p \+= '';/g,zr=/\b(__p \+=) '' \+/g,Eo=/(__e\(.*?\)|\b__t\)) \+\n'';/g,mr=/&(?:amp|lt|gt|quot|#39);/g,jn=/[&<>"']/g,ct=RegExp(mr.source),Yt=RegExp(jn.source),oi=/<%-([\s\S]+?)%>/g,Ni=/<%([\s\S]+?)%>/g,Nn=/<%=([\s\S]+?)%>/g,pr=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Sn=/^\w*$/,Pn=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Nt=/[\\^$.*+?()[\]{}|]/g,ai=RegExp(Nt.source),hn=/^\s+/,Le=/\s/,ce=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,we=/\{\n\/\* \[wrapped with (.+)\] \*/,Qe=/,? & /,qt=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Tn=/[()=,{}\[\]\/\s]/,lr=/\\(\\)?/g,mo=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,rr=/\w*$/,aa=/^[-+]0x[0-9a-f]+$/i,ea=/^0b[01]+$/i,Bo=/^\[object .+?Constructor\]$/,Ii=/^0o[0-7]+$/i,an=/^(?:0|[1-9]\d*)$/,Zn=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Ci=/($^)/,Xn=/['\n\r\u2028\u2029\\]/g,Et="\\ud800-\\udfff",Ft="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",Ut="\\u2700-\\u27bf",wn="a-z\\xdf-\\xf6\\xf8-\\xff",en="A-Z\\xc0-\\xd6\\xd8-\\xde",Wn="\\ufe0e\\ufe0f",at="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",It="['\u2019]",Qt="["+Et+"]",St="["+at+"]",Pt="["+Ft+"]",cn="\\d+",Ln="["+Ut+"]",ii="["+wn+"]",hi="[^"+Et+at+cn+Ut+wn+en+"]",Ri="\\ud83c[\\udffb-\\udfff]",er="[^"+Et+"]",Yr="(?:\\ud83c[\\udde6-\\uddff]){2}",_o="[\\ud800-\\udbff][\\udc00-\\udfff]",Si="["+en+"]",Oa="(?:"+ii+"|"+hi+")",Uo="(?:"+Si+"|"+hi+")",rl="(?:['\u2019](?:d|ll|m|re|s|t|ve))?",Vs="(?:['\u2019](?:D|LL|M|RE|S|T|VE))?",ps="(?:"+Pt+"|"+Ri+")"+"?",ts="["+Wn+"]?",ln=ts+ps+("(?:\\u200d(?:"+[er,Yr,_o].join("|")+")"+ts+ps+")*"),Mi="(?:"+[Ln,Yr,_o].join("|")+")"+ln,Di="(?:"+[er+Pt+"?",Pt,Yr,_o,Qt].join("|")+")",Er=RegExp(It,"g"),ur=RegExp(Pt,"g"),gi=RegExp(Ri+"(?="+Ri+")|"+Di+ln,"g"),$t=RegExp([Si+"?"+ii+"+"+rl+"(?="+[St,Si,"$"].join("|")+")",Uo+"+"+Vs+"(?="+[St,Si+Oa,"$"].join("|")+")",Si+"?"+Oa+"+"+rl,Si+"+"+Vs,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",cn,Mi].join("|"),"g"),Ma=RegExp("[\\u200d"+Et+Ft+Wn+"]"),Vo=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Ds=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],ja=-1,wa={};wa[Vi]=wa[Vn]=wa[Hn]=wa[An]=wa[vn]=wa[In]=wa[Zi]=wa[gr]=wa[Hi]=!0,wa[Ne]=wa[wt]=wa[Ai]=wa[Ct]=wa[si]=wa[rn]=wa[st]=wa[nn]=wa[Mn]=wa[vi]=wa[mi]=wa[kn]=wa[On]=wa[je]=wa[Fn]=!1;var ns={};ns[Ne]=ns[wt]=ns[Ai]=ns[si]=ns[Ct]=ns[rn]=ns[Vi]=ns[Vn]=ns[Hn]=ns[An]=ns[vn]=ns[Mn]=ns[vi]=ns[mi]=ns[kn]=ns[On]=ns[je]=ns[Bt]=ns[In]=ns[Zi]=ns[gr]=ns[Hi]=!0,ns[st]=ns[nn]=ns[Fn]=!1;var Gl={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},ol=parseFloat,zc=parseInt,al="object"==typeof global&&global&&global.Object===Object&&global,Jn="object"==typeof self&&self&&self.Object===Object&&self,tn=al||Jn||Function("return this")(),ti=I&&!I.nodeType&&I,_i=ti&&qe&&!qe.nodeType&&qe,ar=_i&&_i.exports===ti,vr=ar&&al.process,Qr=function(){try{return _i&&_i.require&&_i.require("util").types||vr&&vr.binding&&vr.binding("util")}catch{}}(),Li=Qr&&Qr.isArrayBuffer,Ta=Qr&&Qr.isDate,La=Qr&&Qr.isMap,Ps=Qr&&Qr.isRegExp,is=Qr&&Qr.isSet,yt=Qr&&Qr.isTypedArray;function Dt(or,Dr,kr){switch(kr.length){case 0:return or.call(Dr);case 1:return or.call(Dr,kr[0]);case 2:return or.call(Dr,kr[0],kr[1]);case 3:return or.call(Dr,kr[0],kr[1],kr[2])}return or.apply(Dr,kr)}function We(or,Dr,kr,Qo){for(var oo=-1,da=null==or?0:or.length;++oo<da;){var ha=or[oo];Dr(Qo,ha,kr(ha),or)}return Qo}function Rt(or,Dr){for(var kr=-1,Qo=null==or?0:or.length;++kr<Qo&&!1!==Dr(or[kr],kr,or););return or}function Qn(or,Dr){for(var kr=null==or?0:or.length;kr--&&!1!==Dr(or[kr],kr,or););return or}function fi(or,Dr){for(var kr=-1,Qo=null==or?0:or.length;++kr<Qo;)if(!Dr(or[kr],kr,or))return!1;return!0}function Xi(or,Dr){for(var kr=-1,Qo=null==or?0:or.length,oo=0,da=[];++kr<Qo;){var ha=or[kr];Dr(ha,kr,or)&&(da[oo++]=ha)}return da}function wr(or,Dr){return!!(null==or?0:or.length)&&Jt(or,Dr,0)>-1}function Mo(or,Dr,kr){for(var Qo=-1,oo=null==or?0:or.length;++Qo<oo;)if(kr(Dr,or[Qo]))return!0;return!1}function ro(or,Dr){for(var kr=-1,Qo=null==or?0:or.length,oo=Array(Qo);++kr<Qo;)oo[kr]=Dr(or[kr],kr,or);return oo}function qr(or,Dr){for(var kr=-1,Qo=Dr.length,oo=or.length;++kr<Qo;)or[oo+kr]=Dr[kr];return or}function ho(or,Dr,kr,Qo){var oo=-1,da=null==or?0:or.length;for(Qo&&da&&(kr=or[++oo]);++oo<da;)kr=Dr(kr,or[oo],oo,or);return kr}function xa(or,Dr,kr,Qo){var oo=null==or?0:or.length;for(Qo&&oo&&(kr=or[--oo]);oo--;)kr=Dr(kr,or[oo],oo,or);return kr}function To(or,Dr){for(var kr=-1,Qo=null==or?0:or.length;++kr<Qo;)if(Dr(or[kr],kr,or))return!0;return!1}var Ao=Qi("length");function Ra(or,Dr,kr){var Qo;return kr(or,function(oo,da,ha){if(Dr(oo,da,ha))return Qo=da,!1}),Qo}function ba(or,Dr,kr,Qo){for(var oo=or.length,da=kr+(Qo?1:-1);Qo?da--:++da<oo;)if(Dr(or[da],da,or))return da;return-1}function Jt(or,Dr,kr){return Dr==Dr?function rs(or,Dr,kr){for(var Qo=kr-1,oo=or.length;++Qo<oo;)if(or[Qo]===Dr)return Qo;return-1}(or,Dr,kr):ba(or,bt,kr)}function De(or,Dr,kr,Qo){for(var oo=kr-1,da=or.length;++oo<da;)if(Qo(or[oo],Dr))return oo;return-1}function bt(or){return or!=or}function Xt(or,Dr){var kr=null==or?0:or.length;return kr?yi(or,Dr)/kr:nt}function Qi(or){return function(Dr){return null==Dr?e:Dr[or]}}function Kt(or){return function(Dr){return null==or?e:or[Dr]}}function Fe(or,Dr,kr,Qo,oo){return oo(or,function(da,ha,Ia){kr=Qo?(Qo=!1,da):Dr(kr,da,ha,Ia)}),kr}function yi(or,Dr){for(var kr,Qo=-1,oo=or.length;++Qo<oo;){var da=Dr(or[Qo]);da!==e&&(kr=kr===e?da:kr+da)}return kr}function Ki(or,Dr){for(var kr=-1,Qo=Array(or);++kr<or;)Qo[kr]=Dr(kr);return Qo}function Na(or){return or&&or.slice(0,_c(or)+1).replace(hn,"")}function qi(or){return function(Dr){return or(Dr)}}function ia(or,Dr){return ro(Dr,function(kr){return or[kr]})}function $o(or,Dr){return or.has(Dr)}function su(or,Dr){for(var kr=-1,Qo=or.length;++kr<Qo&&Jt(Dr,or[kr],0)>-1;);return kr}function Us(or,Dr){for(var kr=or.length;kr--&&Jt(Dr,or[kr],0)>-1;);return kr}var Tc=Kt({\u00c0:"A",\u00c1:"A",\u00c2:"A",\u00c3:"A",\u00c4:"A",\u00c5:"A",\u00e0:"a",\u00e1:"a",\u00e2:"a",\u00e3:"a",\u00e4:"a",\u00e5:"a",\u00c7:"C",\u00e7:"c",\u00d0:"D",\u00f0:"d",\u00c8:"E",\u00c9:"E",\u00ca:"E",\u00cb:"E",\u00e8:"e",\u00e9:"e",\u00ea:"e",\u00eb:"e",\u00cc:"I",\u00cd:"I",\u00ce:"I",\u00cf:"I",\u00ec:"i",\u00ed:"i",\u00ee:"i",\u00ef:"i",\u00d1:"N",\u00f1:"n",\u00d2:"O",\u00d3:"O",\u00d4:"O",\u00d5:"O",\u00d6:"O",\u00d8:"O",\u00f2:"o",\u00f3:"o",\u00f4:"o",\u00f5:"o",\u00f6:"o",\u00f8:"o",\u00d9:"U",\u00da:"U",\u00db:"U",\u00dc:"U",\u00f9:"u",\u00fa:"u",\u00fb:"u",\u00fc:"u",\u00dd:"Y",\u00fd:"y",\u00ff:"y",\u00c6:"Ae",\u00e6:"ae",\u00de:"Th",\u00fe:"th",\u00df:"ss",\u0100:"A",\u0102:"A",\u0104:"A",\u0101:"a",\u0103:"a",\u0105:"a",\u0106:"C",\u0108:"C",\u010a:"C",\u010c:"C",\u0107:"c",\u0109:"c",\u010b:"c",\u010d:"c",\u010e:"D",\u0110:"D",\u010f:"d",\u0111:"d",\u0112:"E",\u0114:"E",\u0116:"E",\u0118:"E",\u011a:"E",\u0113:"e",\u0115:"e",\u0117:"e",\u0119:"e",\u011b:"e",\u011c:"G",\u011e:"G",\u0120:"G",\u0122:"G",\u011d:"g",\u011f:"g",\u0121:"g",\u0123:"g",\u0124:"H",\u0126:"H",\u0125:"h",\u0127:"h",\u0128:"I",\u012a:"I",\u012c:"I",\u012e:"I",\u0130:"I",\u0129:"i",\u012b:"i",\u012d:"i",\u012f:"i",\u0131:"i",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u0138:"k",\u0139:"L",\u013b:"L",\u013d:"L",\u013f:"L",\u0141:"L",\u013a:"l",\u013c:"l",\u013e:"l",\u0140:"l",\u0142:"l",\u0143:"N",\u0145:"N",\u0147:"N",\u014a:"N",\u0144:"n",\u0146:"n",\u0148:"n",\u014b:"n",\u014c:"O",\u014e:"O",\u0150:"O",\u014d:"o",\u014f:"o",\u0151:"o",\u0154:"R",\u0156:"R",\u0158:"R",\u0155:"r",\u0157:"r",\u0159:"r",\u015a:"S",\u015c:"S",\u015e:"S",\u0160:"S",\u015b:"s",\u015d:"s",\u015f:"s",\u0161:"s",\u0162:"T",\u0164:"T",\u0166:"T",\u0163:"t",\u0165:"t",\u0167:"t",\u0168:"U",\u016a:"U",\u016c:"U",\u016e:"U",\u0170:"U",\u0172:"U",\u0169:"u",\u016b:"u",\u016d:"u",\u016f:"u",\u0171:"u",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017b:"Z",\u017d:"Z",\u017a:"z",\u017c:"z",\u017e:"z",\u0132:"IJ",\u0133:"ij",\u0152:"Oe",\u0153:"oe",\u0149:"'n",\u017f:"s"}),Qs=Kt({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"});function vu(or){return"\\"+Gl[or]}function Wl(or){return Ma.test(or)}function Da(or){var Dr=-1,kr=Array(or.size);return or.forEach(function(Qo,oo){kr[++Dr]=[oo,Qo]}),kr}function Pl(or,Dr){return function(kr){return or(Dr(kr))}}function gl(or,Dr){for(var kr=-1,Qo=or.length,oo=0,da=[];++kr<Qo;){var ha=or[kr];(ha===Dr||ha===w)&&(or[kr]=w,da[oo++]=kr)}return da}function ss(or){var Dr=-1,kr=Array(or.size);return or.forEach(function(Qo){kr[++Dr]=Qo}),kr}function ks(or){return Wl(or)?function lu(or){for(var Dr=gi.lastIndex=0;gi.test(or);)++Dr;return Dr}(or):Ao(or)}function Ol(or){return Wl(or)?function ac(or){return or.match(gi)||[]}(or):function Ha(or){return or.split("")}(or)}function _c(or){for(var Dr=or.length;Dr--&&Le.test(or.charAt(Dr)););return Dr}var Yc=Kt({"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"});var Oc=function or(Dr){var U,kr=(Dr=null==Dr?tn:Oc.defaults(tn.Object(),Dr,Oc.pick(tn,Ds))).Array,Qo=Dr.Date,oo=Dr.Error,da=Dr.Function,ha=Dr.Math,Ia=Dr.Object,cc=Dr.RegExp,Rs=Dr.String,xc=Dr.TypeError,Hc=kr.prototype,lp=da.prototype,kp=Ia.prototype,Ju=Dr["__core-js_shared__"],Su=lp.toString,qs=kp.hasOwnProperty,Cd=0,la=(U=/[^.]+$/.exec(Ju&&Ju.keys&&Ju.keys.IE_PROTO||""))?"Symbol(src)_1."+U:"",ht=kp.toString,Ke=Su.call(Ia),dn=tn._,Kn=cc("^"+Su.call(qs).replace(Nt,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),$i=ar?Dr.Buffer:e,sr=Dr.Symbol,lo=Dr.Uint8Array,ga=$i?$i.allocUnsafe:e,Zs=Pl(Ia.getPrototypeOf,Ia),Kr=Ia.create,os=kp.propertyIsEnumerable,_s=Hc.splice,ra=sr?sr.isConcatSpreadable:e,_a=sr?sr.iterator:e,xl=sr?sr.toStringTag:e,$l=function(){try{var U=hg(Ia,"defineProperty");return U({},"",{}),U}catch{}}(),Os=Dr.clearTimeout!==tn.clearTimeout&&Dr.clearTimeout,yu=Qo&&Qo.now!==tn.Date.now&&Qo.now,Ks=Dr.setTimeout!==tn.setTimeout&&Dr.setTimeout,_l=ha.ceil,Dc=ha.floor,Gs=Ia.getOwnPropertySymbols,Ed=$i?$i.isBuffer:e,zl=Dr.isFinite,vl=Hc.join,Lc=Pl(Ia.keys,Ia),Xe=ha.max,zt=ha.min,mn=Qo.now,ni=Dr.parseInt,Fi=ha.random,nr=Hc.reverse,zo=hg(Dr,"DataView"),oa=hg(Dr,"Map"),Ca=hg(Dr,"Promise"),Ba=hg(Dr,"Set"),Is=hg(Dr,"WeakMap"),ul=hg(Ia,"create"),bu=Is&&new Is,Zd={},Qu=Ac(zo),_t=Ac(oa),q=Ac(Ca),W=Ac(Ba),dt=Ac(Is),fn=sr?sr.prototype:e,Ei=fn?fn.valueOf:e,Po=fn?fn.toString:e;function En(U){if(Pd(U)&&!js(U)&&!(U instanceof cs)){if(U instanceof kc)return U;if(qs.call(U,"__wrapped__"))return pl(U)}return new kc(U)}var ls=function(){function U(){}return function(J){if(!$c(J))return{};if(Kr)return Kr(J);U.prototype=J;var Ue=new U;return U.prototype=e,Ue}}();function Au(){}function kc(U,J){this.__wrapped__=U,this.__actions__=[],this.__chain__=!!J,this.__index__=0,this.__values__=e}function cs(U){this.__wrapped__=U,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=mt,this.__views__=[]}function Cu(U){var J=-1,Ue=null==U?0:U.length;for(this.clear();++J<Ue;){var At=U[J];this.set(At[0],At[1])}}function Rc(U){var J=-1,Ue=null==U?0:U.length;for(this.clear();++J<Ue;){var At=U[J];this.set(At[0],At[1])}}function Xc(U){var J=-1,Ue=null==U?0:U.length;for(this.clear();++J<Ue;){var At=U[J];this.set(At[0],At[1])}}function Vc(U){var J=-1,Ue=null==U?0:U.length;for(this.__data__=new Xc;++J<Ue;)this.add(U[J])}function et(U){var J=this.__data__=new Rc(U);this.size=J.size}function li(U,J){var Ue=js(U),At=!Ue&&Xd(U),yn=!Ue&&!At&&fm(U),zn=!Ue&&!At&&!yn&&If(U),ki=Ue||At||yn||zn,ji=ki?Ki(U.length,Rs):[],br=ji.length;for(var io in U)(J||qs.call(U,io))&&(!ki||!("length"==io||yn&&("offset"==io||"parent"==io)||zn&&("buffer"==io||"byteLength"==io||"byteOffset"==io)||Js(io,br)))&&ji.push(io);return ji}function dr(U){var J=U.length;return J?U[us(0,J-1)]:e}function Sr(U,J){return af(cm(U),qo(J,0,U.length))}function fo(U){return af(cm(U))}function ms(U,J,Ue){(Ue!==e&&!Xf(U[J],Ue)||Ue===e&&!(J in U))&&sl(U,J,Ue)}function Nl(U,J,Ue){var At=U[J];(!qs.call(U,J)||!Xf(At,Ue)||Ue===e&&!(J in U))&&sl(U,J,Ue)}function Dl(U,J){for(var Ue=U.length;Ue--;)if(Xf(U[Ue][0],J))return Ue;return-1}function Yl(U,J,Ue,At){return Zc(U,function(yn,zn,ki){J(At,yn,Ue(yn),ki)}),At}function cu(U,J){return U&&um(J,ep(J),U)}function sl(U,J,Ue){"__proto__"==J&&$l?$l(U,J,{configurable:!0,enumerable:!0,value:Ue,writable:!0}):U[J]=Ue}function ld(U,J){for(var Ue=-1,At=J.length,yn=kr(At),zn=null==U;++Ue<At;)yn[Ue]=zn?e:Sp(U,J[Ue]);return yn}function qo(U,J,Ue){return U==U&&(Ue!==e&&(U=U<=Ue?U:Ue),J!==e&&(U=U>=J?U:J)),U}function ll(U,J,Ue,At,yn,zn){var ki,ji=J&B,br=J&Y,io=J&V;if(Ue&&(ki=yn?Ue(U,At,yn,zn):Ue(U)),ki!==e)return ki;if(!$c(U))return U;var uo=js(U);if(uo){if(ki=function Yh(U){var J=U.length,Ue=new U.constructor(J);return J&&"string"==typeof U[0]&&qs.call(U,"index")&&(Ue.index=U.index,Ue.input=U.input),Ue}(U),!ji)return cm(U,ki)}else{var Co=Lu(U),pa=Co==nn||Co==Dn;if(fm(U))return Gp(U,ji);if(Co==mi||Co==Ne||pa&&!yn){if(ki=br||pa?{}:gg(U),!ji)return br?function Sa(U,J){return um(U,yh(U),J)}(U,function Mr(U,J){return U&&um(J,rd(J),U)}(ki,U)):function Cl(U,J){return um(U,Am(U),J)}(U,cu(ki,U))}else{if(!ns[Co])return yn?U:{};ki=function Ym(U,J,Ue){var At=U.constructor;switch(J){case Ai:return td(U);case Ct:case rn:return new At(+U);case si:return function lm(U,J){var Ue=J?td(U.buffer):U.buffer;return new U.constructor(Ue,U.byteOffset,U.byteLength)}(U,Ue);case Vi:case Vn:case Hn:case An:case vn:case In:case Zi:case gr:case Hi:return pp(U,Ue);case Mn:return new At;case vi:case je:return new At(U);case kn:return function mg(U){var J=new U.constructor(U.source,rr.exec(U));return J.lastIndex=U.lastIndex,J}(U);case On:return new At;case Bt:return function Mf(U){return Ei?Ia(Ei.call(U)):{}}(U)}}(U,Co,ji)}}zn||(zn=new et);var Ea=zn.get(U);if(Ea)return Ea;zn.set(U,ki),Bv(U)?U.forEach(function(fs){ki.add(ll(fs,J,Ue,fs,U,zn))}):Xg(U)&&U.forEach(function(fs,Bs){ki.set(Bs,ll(fs,J,Ue,Bs,U,zn))});var El=uo?e:(io?br?Kf:Rp:br?rd:ep)(U);return Rt(El||U,function(fs,Bs){El&&(fs=U[Bs=fs]),Nl(ki,Bs,ll(fs,J,Ue,Bs,U,zn))}),ki}function Hl(U,J,Ue){var At=Ue.length;if(null==U)return!At;for(U=Ia(U);At--;){var yn=Ue[At],zn=J[yn],ki=U[yn];if(ki===e&&!(yn in U)||!zn(ki))return!1}return!0}function Fd(U,J,Ue){if("function"!=typeof U)throw new xc(E);return yp(function(){U.apply(e,Ue)},J)}function qu(U,J,Ue,At){var yn=-1,zn=wr,ki=!0,ji=U.length,br=[],io=J.length;if(!ji)return br;Ue&&(J=ro(J,qi(Ue))),At?(zn=Mo,ki=!1):J.length>=D&&(zn=$o,ki=!1,J=new Vc(J));e:for(;++yn<ji;){var uo=U[yn],Co=null==Ue?uo:Ue(uo);if(uo=At||0!==uo?uo:0,ki&&Co==Co){for(var pa=io;pa--;)if(J[pa]===Co)continue e;br.push(uo)}else zn(J,Co,At)||br.push(uo)}return br}En.templateSettings={escape:oi,evaluate:Ni,interpolate:Nn,variable:"",imports:{_:En}},En.prototype=Au.prototype,En.prototype.constructor=En,kc.prototype=ls(Au.prototype),kc.prototype.constructor=kc,cs.prototype=ls(Au.prototype),cs.prototype.constructor=cs,Cu.prototype.clear=function Gd(){this.__data__=ul?ul(null):{},this.size=0},Cu.prototype.delete=function Rd(U){var J=this.has(U)&&delete this.__data__[U];return this.size-=J?1:0,J},Cu.prototype.get=function Bu(U){var J=this.__data__;if(ul){var Ue=J[U];return Ue===n?e:Ue}return qs.call(J,U)?J[U]:e},Cu.prototype.has=function Wf(U){var J=this.__data__;return ul?J[U]!==e:qs.call(J,U)},Cu.prototype.set=function vc(U,J){var Ue=this.__data__;return this.size+=this.has(U)?0:1,Ue[U]=ul&&J===e?n:J,this},Rc.prototype.clear=function Go(){this.__data__=[],this.size=0},Rc.prototype.delete=function Md(U){var J=this.__data__,Ue=Dl(J,U);return!(Ue<0)&&(Ue==J.length-1?J.pop():_s.call(J,Ue,1),--this.size,!0)},Rc.prototype.get=function Mm(U){var J=this.__data__,Ue=Dl(J,U);return Ue<0?e:J[Ue][1]},Rc.prototype.has=function am(U){return Dl(this.__data__,U)>-1},Rc.prototype.set=function Ef(U,J){var Ue=this.__data__,At=Dl(Ue,U);return At<0?(++this.size,Ue.push([U,J])):Ue[At][1]=J,this},Xc.prototype.clear=function yc(){this.size=0,this.__data__={hash:new Cu,map:new(oa||Rc),string:new Cu}},Xc.prototype.delete=function Eu(U){var J=$p(this,U).delete(U);return this.size-=J?1:0,J},Xc.prototype.get=function Mu(U){return $p(this,U).get(U)},Xc.prototype.has=function ws(U){return $p(this,U).has(U)},Xc.prototype.set=function Ll(U,J){var Ue=$p(this,U),At=Ue.size;return Ue.set(U,J),this.size+=Ue.size==At?0:1,this},Vc.prototype.add=Vc.prototype.push=function Lo(U){return this.__data__.set(U,n),this},Vc.prototype.has=function Uu(U){return this.__data__.has(U)},et.prototype.clear=function Ae(){this.__data__=new Rc,this.size=0},et.prototype.delete=function Ge(U){var J=this.__data__,Ue=J.delete(U);return this.size=J.size,Ue},et.prototype.get=function xt(U){return this.__data__.get(U)},et.prototype.has=function Ht(U){return this.__data__.has(U)},et.prototype.set=function _n(U,J){var Ue=this.__data__;if(Ue instanceof Rc){var At=Ue.__data__;if(!oa||At.length<D-1)return At.push([U,J]),this.size=++Ue.size,this;Ue=this.__data__=new Xc(At)}return Ue.set(U,J),this.size=Ue.size,this};var Zc=zm(dl),uu=zm(Ti,!0);function Es(U,J){var Ue=!0;return Zc(U,function(At,yn,zn){return Ue=!!J(At,yn,zn)}),Ue}function mc(U,J,Ue){for(var At=-1,yn=U.length;++At<yn;){var zn=U[At],ki=J(zn);if(null!=ki&&(ji===e?ki==ki&&!rm(ki):Ue(ki,ji)))var ji=ki,br=zn}return br}function Fs(U,J){var Ue=[];return Zc(U,function(At,yn,zn){J(At,yn,zn)&&Ue.push(At)}),Ue}function nc(U,J,Ue,At,yn){var zn=-1,ki=U.length;for(Ue||(Ue=sc),yn||(yn=[]);++zn<ki;){var ji=U[zn];J>0&&Ue(ji)?J>1?nc(ji,J-1,Ue,At,yn):qr(yn,ji):At||(yn[yn.length]=ji)}return yn}var Pu=J_(),yl=J_(!0);function dl(U,J){return U&&Pu(U,J,ep)}function Ti(U,J){return U&&yl(U,J,ep)}function du(U,J){return Xi(J,function(Ue){return im(U[Ue])})}function Kc(U,J){for(var Ue=0,At=(J=Kd(J,U)).length;null!=U&&Ue<At;)U=U[Jc(J[Ue++])];return Ue&&Ue==At?U:e}function Wd(U,J,Ue){var At=J(U);return js(U)?At:qr(At,Ue(U))}function Vl(U){return null==U?U===e?xn:Gi:xl&&xl in Ia(U)?function Lt(U){var J=qs.call(U,xl),Ue=U[xl];try{U[xl]=e;var At=!0}catch{}var yn=ht.call(U);return At&&(J?U[xl]=Ue:delete U[xl]),yn}(U):function rv(U){return ht.call(U)}(U)}function bl(U,J){return U>J}function Sl(U,J){return null!=U&&qs.call(U,J)}function Nd(U,J){return null!=U&&J in Ia(U)}function eu(U,J,Ue){for(var At=Ue?Mo:wr,yn=U[0].length,zn=U.length,ki=zn,ji=kr(zn),br=1/0,io=[];ki--;){var uo=U[ki];ki&&J&&(uo=ro(uo,qi(J))),br=zt(uo.length,br),ji[ki]=!Ue&&(J||yn>=120&&uo.length>=120)?new Vc(ki&&uo):e}uo=U[0];var Co=-1,pa=ji[0];e:for(;++Co<yn&&io.length<br;){var Ea=uo[Co],xs=J?J(Ea):Ea;if(Ea=Ue||0!==Ea?Ea:0,!(pa?$o(pa,xs):At(io,xs,Ue))){for(ki=zn;--ki;){var El=ji[ki];if(!(El?$o(El,xs):At(U[ki],xs,Ue)))continue e}pa&&pa.push(xs),io.push(Ea)}}return io}function pu(U,J,Ue){var At=null==(U=_g(U,J=Kd(J,U)))?U:U[Jc(Mp(J))];return null==At?e:Dt(At,U,Ue)}function fc(U){return Pd(U)&&Vl(U)==Ne}function Ql(U,J,Ue,At,yn){return U===J||(null==U||null==J||!Pd(U)&&!Pd(J)?U!=U&&J!=J:function Tm(U,J,Ue,At,yn,zn){var ki=js(U),ji=js(J),br=ki?wt:Lu(U),io=ji?wt:Lu(J),uo=(br=br==Ne?mi:br)==mi,Co=(io=io==Ne?mi:io)==mi,pa=br==io;if(pa&&fm(U)){if(!fm(J))return!1;ki=!0,uo=!1}if(pa&&!uo)return zn||(zn=new et),ki||If(U)?zh(U,J,Ue,At,yn,zn):function Tf(U,J,Ue,At,yn,zn,ki){switch(Ue){case si:if(U.byteLength!=J.byteLength||U.byteOffset!=J.byteOffset)return!1;U=U.buffer,J=J.buffer;case Ai:return!(U.byteLength!=J.byteLength||!zn(new lo(U),new lo(J)));case Ct:case rn:case vi:return Xf(+U,+J);case st:return U.name==J.name&&U.message==J.message;case kn:case je:return U==J+"";case Mn:var ji=Da;case On:var br=At&ue;if(ji||(ji=ss),U.size!=J.size&&!br)return!1;var io=ki.get(U);if(io)return io==J;At|=he,ki.set(U,J);var uo=zh(ji(U),ji(J),At,yn,zn,ki);return ki.delete(U),uo;case Bt:if(Ei)return Ei.call(U)==Ei.call(J)}return!1}(U,J,br,Ue,At,yn,zn);if(!(Ue&ue)){var Ea=uo&&qs.call(U,"__wrapped__"),xs=Co&&qs.call(J,"__wrapped__");if(Ea||xs){var El=Ea?U.value():U,fs=xs?J.value():J;return zn||(zn=new et),yn(El,fs,Ue,At,zn)}}return!!pa&&(zn||(zn=new et),function xf(U,J,Ue,At,yn,zn){var ki=Ue&ue,ji=Rp(U),br=ji.length,io=Rp(J),uo=io.length;if(br!=uo&&!ki)return!1;for(var Co=br;Co--;){var pa=ji[Co];if(!(ki?pa in J:qs.call(J,pa)))return!1}var Ea=zn.get(U),xs=zn.get(J);if(Ea&&xs)return Ea==J&&xs==U;var El=!0;zn.set(U,J),zn.set(J,U);for(var fs=ki;++Co<br;){var Bs=U[pa=ji[Co]],Ys=J[pa];if(At)var ou=ki?At(Ys,Bs,pa,J,U,zn):At(Bs,Ys,pa,U,J,zn);if(!(ou===e?Bs===Ys||yn(Bs,Ys,Ue,At,zn):ou)){El=!1;break}fs||(fs="constructor"==pa)}if(El&&!fs){var au=U.constructor,Rf=J.constructor;au!=Rf&&"constructor"in U&&"constructor"in J&&!("function"==typeof au&&au instanceof au&&"function"==typeof Rf&&Rf instanceof Rf)&&(El=!1)}return zn.delete(U),zn.delete(J),El}(U,J,Ue,At,yn,zn))}(U,J,Ue,At,Ql,yn))}function Fo(U,J,Ue,At){var yn=Ue.length,zn=yn,ki=!At;if(null==U)return!zn;for(U=Ia(U);yn--;){var ji=Ue[yn];if(ki&&ji[2]?ji[1]!==U[ji[0]]:!(ji[0]in U))return!1}for(;++yn<zn;){var br=(ji=Ue[yn])[0],io=U[br],uo=ji[1];if(ki&&ji[2]){if(io===e&&!(br in U))return!1}else{var Co=new et;if(At)var pa=At(io,uo,br,U,J,Co);if(!(pa===e?Ql(uo,io,ue|he,At,Co):pa))return!1}}return!0}function vs(U){return!(!$c(U)||function nv(U){return!!la&&la in U}(U))&&(im(U)?Kn:Bo).test(Ac(U))}function Me(U){return"function"==typeof U?U:null==U?ru:"object"==typeof U?js(U)?Rr(U[0],U[1]):Vt(U):i_(U)}function N(U){if(!Vm(U))return Lc(U);var J=[];for(var Ue in Ia(U))qs.call(U,Ue)&&"constructor"!=Ue&&J.push(Ue);return J}function O(U){if(!$c(U))return function jg(U){var J=[];if(null!=U)for(var Ue in Ia(U))J.push(Ue);return J}(U);var J=Vm(U),Ue=[];for(var At in U)"constructor"==At&&(J||!qs.call(U,At))||Ue.push(At);return Ue}function Ce(U,J){return U<J}function Je(U,J){var Ue=-1,At=Vu(U)?kr(U.length):[];return Zc(U,function(yn,zn,ki){At[++Ue]=J(yn,zn,ki)}),At}function Vt(U){var J=tv(U);return 1==J.length&&J[0][2]?Jf(J[0][0],J[0][1]):function(Ue){return Ue===U||Fo(Ue,U,J)}}function Rr(U,J){return gp(U)&&Dd(J)?Jf(Jc(U),J):function(Ue){var At=Sp(Ue,U);return At===e&&At===J?Pb(Ue,U):Ql(J,At,ue|he)}}function wo(U,J,Ue,At,yn){U!==J&&Pu(J,function(zn,ki){if(yn||(yn=new et),$c(zn))!function ua(U,J,Ue,At,yn,zn,ki){var ji=Qd(U,Ue),br=Qd(J,Ue),io=ki.get(br);if(io)return void ms(U,Ue,io);var uo=zn?zn(ji,br,Ue+"",U,J,ki):e,Co=uo===e;if(Co){var pa=js(br),Ea=!pa&&fm(br),xs=!pa&&!Ea&&If(br);uo=br,pa||Ea||xs?js(ji)?uo=ji:dc(ji)?uo=cm(ji):Ea?(Co=!1,uo=Gp(br,!0)):xs?(Co=!1,uo=pp(br,!0)):uo=[]:Nv(br)||Xd(br)?(uo=ji,Xd(ji)?uo=DC(ji):(!$c(ji)||im(ji))&&(uo=gg(br))):Co=!1}Co&&(ki.set(br,uo),yn(uo,br,At,zn,ki),ki.delete(br)),ms(U,Ue,uo)}(U,J,ki,Ue,wo,At,yn);else{var ji=At?At(Qd(U,ki),zn,ki+"",U,J,yn):e;ji===e&&(ji=zn),ms(U,ki,ji)}},rd)}function Ls(U,J){var Ue=U.length;if(Ue)return Js(J+=J<0?Ue:0,Ue)?U[J]:e}function Ws(U,J,Ue){J=J.length?ro(J,function(zn){return js(zn)?function(ki){return Kc(ki,1===zn.length?zn[0]:zn)}:zn}):[ru];var At=-1;return J=ro(J,qi(Ja())),function Wt(or,Dr){var kr=or.length;for(or.sort(Dr);kr--;)or[kr]=or[kr].value;return or}(Je(U,function(zn,ki,ji){return{criteria:ro(J,function(io){return io(zn)}),index:++At,value:zn}}),function(zn,ki){return function Nh(U,J,Ue){for(var At=-1,yn=U.criteria,zn=J.criteria,ki=yn.length,ji=Ue.length;++At<ki;){var br=b_(yn[At],zn[At]);if(br)return At>=ji?br:br*("desc"==Ue[At]?-1:1)}return U.index-J.index}(zn,ki,Ue)})}function Sc(U,J,Ue){for(var At=-1,yn=J.length,zn={};++At<yn;){var ki=J[At],ji=Kc(U,ki);Ue(ji,ki)&&Dm(zn,Kd(ki,U),ji)}return zn}function ic(U,J,Ue,At){var yn=At?De:Jt,zn=-1,ki=J.length,ji=U;for(U===J&&(J=cm(J)),Ue&&(ji=ro(U,qi(Ue)));++zn<ki;)for(var br=0,io=J[zn],uo=Ue?Ue(io):io;(br=yn(ji,uo,br,At))>-1;)ji!==U&&_s.call(ji,br,1),_s.call(U,br,1);return U}function mu(U,J){for(var Ue=U?J.length:0,At=Ue-1;Ue--;){var yn=J[Ue];if(Ue==At||yn!==zn){var zn=yn;Js(yn)?_s.call(U,yn,1):gh(U,yn)}}return U}function us(U,J){return U+Dc(Fi()*(J-U+1))}function cd(U,J){var Ue="";if(!U||J<1||J>ke)return Ue;do{J%2&&(Ue+=U),(J=Dc(J/2))&&(U+=U)}while(J);return Ue}function ds(U,J){return Bl(vp(U,J,ru),U+"")}function xm(U){return dr(Lf(U))}function Ns(U,J){var Ue=Lf(U);return af(Ue,qo(J,0,Ue.length))}function Dm(U,J,Ue,At){if(!$c(U))return U;for(var yn=-1,zn=(J=Kd(J,U)).length,ki=zn-1,ji=U;null!=ji&&++yn<zn;){var br=Jc(J[yn]),io=Ue;if("__proto__"===br||"constructor"===br||"prototype"===br)return U;if(yn!=ki){var uo=ji[br];(io=At?At(uo,br,ji):e)===e&&(io=$c(uo)?uo:Js(J[yn+1])?[]:{})}Nl(ji,br,io),ji=ji[br]}return U}var rc=bu?function(U,J){return bu.set(U,J),U}:ru,sm=$l?function(U,J){return $l(U,"toString",{configurable:!0,enumerable:!1,value:th(J),writable:!0})}:ru;function Xu(U){return af(Lf(U))}function Td(U,J,Ue){var At=-1,yn=U.length;J<0&&(J=-J>yn?0:yn+J),(Ue=Ue>yn?yn:Ue)<0&&(Ue+=yn),yn=J>Ue?0:Ue-J>>>0,J>>>=0;for(var zn=kr(yn);++At<yn;)zn[At]=U[At+J];return zn}function pg(U,J){var Ue;return Zc(U,function(At,yn,zn){return!(Ue=J(At,yn,zn))}),!!Ue}function ud(U,J,Ue){var At=0,yn=null==U?At:U.length;if("number"==typeof J&&J==J&&yn<=Ve){for(;At<yn;){var zn=At+yn>>>1,ki=U[zn];null!==ki&&!rm(ki)&&(Ue?ki<=J:ki<J)?At=zn+1:yn=zn}return yn}return Vp(U,J,ru,Ue)}function Vp(U,J,Ue,At){var yn=0,zn=null==U?0:U.length;if(0===zn)return 0;for(var ki=(J=Ue(J))!=J,ji=null===J,br=rm(J),io=J===e;yn<zn;){var uo=Dc((yn+zn)/2),Co=Ue(U[uo]),pa=Co!==e,Ea=null===Co,xs=Co==Co,El=rm(Co);if(ki)var fs=At||xs;else fs=io?xs&&(At||pa):ji?xs&&pa&&(At||!Ea):br?xs&&pa&&!Ea&&(At||!El):!Ea&&!El&&(At?Co<=J:Co<J);fs?yn=uo+1:zn=uo}return zt(zn,ut)}function Wg(U,J){for(var Ue=-1,At=U.length,yn=0,zn=[];++Ue<At;){var ki=U[Ue],ji=J?J(ki):ki;if(!Ue||!Xf(ji,br)){var br=ji;zn[yn++]=0===ki?0:ki}}return zn}function ql(U){return"number"==typeof U?U:rm(U)?nt:+U}function Bd(U){if("string"==typeof U)return U;if(js(U))return ro(U,Bd)+"";if(rm(U))return Po?Po.call(U):"";var J=U+"";return"0"==J&&1/U==-j?"-0":J}function Xl(U,J,Ue){var At=-1,yn=wr,zn=U.length,ki=!0,ji=[],br=ji;if(Ue)ki=!1,yn=Mo;else if(zn>=D){var io=J?null:Wp(U);if(io)return ss(io);ki=!1,yn=$o,br=new Vc}else br=J?[]:ji;e:for(;++At<zn;){var uo=U[At],Co=J?J(uo):uo;if(uo=Ue||0!==uo?uo:0,ki&&Co==Co){for(var pa=br.length;pa--;)if(br[pa]===Co)continue e;J&&br.push(Co),ji.push(uo)}else yn(br,Co,Ue)||(br!==ji&&br.push(Co),ji.push(uo))}return ji}function gh(U,J){return null==(U=_g(U,J=Kd(J,U)))||delete U[Jc(Mp(J))]}function Zp(U,J,Ue,At){return Dm(U,J,Ue(Kc(U,J)),At)}function $d(U,J,Ue,At){for(var yn=U.length,zn=At?yn:-1;(At?zn--:++zn<yn)&&J(U[zn],zn,U););return Ue?Td(U,At?0:zn,At?zn+1:yn):Td(U,At?zn+1:0,At?yn:zn)}function dd(U,J){var Ue=U;return Ue instanceof cs&&(Ue=Ue.value()),ho(J,function(At,yn){return yn.func.apply(yn.thisArg,qr([At],yn.args))},Ue)}function fu(U,J,Ue){var At=U.length;if(At<2)return At?Xl(U[0]):[];for(var yn=-1,zn=kr(At);++yn<At;)for(var ki=U[yn],ji=-1;++ji<At;)ji!=yn&&(zn[yn]=qu(zn[yn]||ki,U[ji],J,Ue));return Xl(nc(zn,1),J,Ue)}function up(U,J,Ue){for(var At=-1,yn=U.length,zn=J.length,ki={};++At<yn;){var ji=At<zn?J[At]:e;Ue(ki,U[At],ji)}return ki}function jd(U){return dc(U)?U:[]}function hu(U){return"function"==typeof U?U:ru}function Kd(U,J){return js(U)?U:gp(U,J)?[U]:wm(Bc(U))}var as=ds;function ed(U,J,Ue){var At=U.length;return Ue=Ue===e?At:Ue,!J&&Ue>=At?U:Td(U,J,Ue)}var dp=Os||function(U){return tn.clearTimeout(U)};function Gp(U,J){if(J)return U.slice();var Ue=U.length,At=ga?ga(Ue):new U.constructor(Ue);return U.copy(At),At}function td(U){var J=new U.constructor(U.byteLength);return new lo(J).set(new lo(U)),J}function pp(U,J){var Ue=J?td(U.buffer):U.buffer;return new U.constructor(Ue,U.byteOffset,U.length)}function b_(U,J){if(U!==J){var Ue=U!==e,At=null===U,yn=U==U,zn=rm(U),ki=J!==e,ji=null===J,br=J==J,io=rm(J);if(!ji&&!io&&!zn&&U>J||zn&&ki&&br&&!ji&&!io||At&&ki&&br||!Ue&&br||!yn)return 1;if(!At&&!zn&&!io&&U<J||io&&Ue&&yn&&!At&&!zn||ji&&Ue&&yn||!ki&&yn||!br)return-1}return 0}function _h(U,J,Ue,At){for(var yn=-1,zn=U.length,ki=Ue.length,ji=-1,br=J.length,io=Xe(zn-ki,0),uo=kr(br+io),Co=!At;++ji<br;)uo[ji]=J[ji];for(;++yn<ki;)(Co||yn<zn)&&(uo[Ue[yn]]=U[yn]);for(;io--;)uo[ji++]=U[yn++];return uo}function Jd(U,J,Ue,At){for(var yn=-1,zn=U.length,ki=-1,ji=Ue.length,br=-1,io=J.length,uo=Xe(zn-ji,0),Co=kr(uo+io),pa=!At;++yn<uo;)Co[yn]=U[yn];for(var Ea=yn;++br<io;)Co[Ea+br]=J[br];for(;++ki<ji;)(pa||yn<zn)&&(Co[Ea+Ue[ki]]=U[yn++]);return Co}function cm(U,J){var Ue=-1,At=U.length;for(J||(J=kr(At));++Ue<At;)J[Ue]=U[Ue];return J}function um(U,J,Ue,At){var yn=!Ue;Ue||(Ue={});for(var zn=-1,ki=J.length;++zn<ki;){var ji=J[zn],br=At?At(Ue[ji],U[ji],ji,Ue,U):e;br===e&&(br=U[ji]),yn?sl(Ue,ji,br):Nl(Ue,ji,br)}return Ue}function pd(U,J){return function(Ue,At){var yn=js(Ue)?We:Yl,zn=J?J():{};return yn(Ue,U,Ja(At,2),zn)}}function Sm(U){return ds(function(J,Ue){var At=-1,yn=Ue.length,zn=yn>1?Ue[yn-1]:e,ki=yn>2?Ue[2]:e;for(zn=U.length>3&&"function"==typeof zn?(yn--,zn):e,ki&&zs(Ue[0],Ue[1],ki)&&(zn=yn<3?e:zn,yn=1),J=Ia(J);++At<yn;){var ji=Ue[At];ji&&U(J,ji,At,zn)}return J})}function zm(U,J){return function(Ue,At){if(null==Ue)return Ue;if(!Vu(Ue))return U(Ue,At);for(var yn=Ue.length,zn=J?yn:-1,ki=Ia(Ue);(J?zn--:++zn<yn)&&!1!==At(ki[zn],zn,ki););return Ue}}function J_(U){return function(J,Ue,At){for(var yn=-1,zn=Ia(J),ki=At(J),ji=ki.length;ji--;){var br=ki[U?ji:++yn];if(!1===Ue(zn[br],br,zn))break}return J}}function vh(U){return function(J){var Ue=Wl(J=Bc(J))?Ol(J):e,At=Ue?Ue[0]:J.charAt(0),yn=Ue?ed(Ue,1).join(""):J.slice(1);return At[U]()+yn}}function $g(U){return function(J){return ho(Yy(zp(J).replace(Er,"")),U,"")}}function C_(U){return function(){var J=arguments;switch(J.length){case 0:return new U;case 1:return new U(J[0]);case 2:return new U(J[0],J[1]);case 3:return new U(J[0],J[1],J[2]);case 4:return new U(J[0],J[1],J[2],J[3]);case 5:return new U(J[0],J[1],J[2],J[3],J[4]);case 6:return new U(J[0],J[1],J[2],J[3],J[4],J[5]);case 7:return new U(J[0],J[1],J[2],J[3],J[4],J[5],J[6])}var Ue=ls(U.prototype),At=U.apply(Ue,J);return $c(At)?At:Ue}}function Eb(U){return function(J,Ue,At){var yn=Ia(J);if(!Vu(J)){var zn=Ja(Ue,3);J=ep(J),Ue=function(ji){return zn(yn[ji],ji,yn)}}var ki=U(J,Ue,At);return ki>-1?yn[zn?J[ki]:ki]:e}}function Q_(U){return Ud(function(J){var Ue=J.length,At=Ue,yn=kc.prototype.thru;for(U&&J.reverse();At--;){var zn=J[At];if("function"!=typeof zn)throw new xc(E);if(yn&&!ki&&"wrapper"==jo(zn))var ki=new kc([],!0)}for(At=ki?At:Ue;++At<Ue;){var ji=jo(zn=J[At]),br="wrapper"==ji?fg(zn):e;ki=br&&_p(br[0])&&br[1]==(Pe|ye|ne|xe)&&!br[4].length&&1==br[9]?ki[jo(br[0])].apply(ki,br[3]):1==zn.length&&_p(zn)?ki[ji]():ki.thru(zn)}return function(){var io=arguments,uo=io[0];if(ki&&1==io.length&&js(uo))return ki.plant(uo).value();for(var Co=0,pa=Ue?J[Co].apply(this,io):uo;++Co<Ue;)pa=J[Co].call(this,pa);return pa}})}function xd(U,J,Ue,At,yn,zn,ki,ji,br,io){var uo=J&Pe,Co=J&ae,pa=J&X,Ea=J&(ye|ge),xs=J&de,El=pa?e:C_(U);return function fs(){for(var Bs=arguments.length,Ys=kr(Bs),ou=Bs;ou--;)Ys[ou]=arguments[ou];if(Ea)var au=Ou(fs),Rf=function Ka(or,Dr){for(var kr=or.length,Qo=0;kr--;)or[kr]===Dr&&++Qo;return Qo}(Ys,au);if(At&&(Ys=_h(Ys,At,yn,Ea)),zn&&(Ys=Jd(Ys,zn,ki,Ea)),Bs-=Rf,Ea&&Bs<io){var xu=gl(Ys,au);return mp(U,J,xd,fs.placeholder,Ue,Ys,xu,ji,br,io-Bs)}var vm=Co?Ue:this,wp=pa?vm[U]:U;return Bs=Ys.length,ji?Ys=function of(U,J){for(var Ue=U.length,At=zt(J.length,Ue),yn=cm(U);At--;){var zn=J[At];U[At]=Js(zn,Ue)?yn[zn]:e}return U}(Ys,ji):xs&&Bs>1&&Ys.reverse(),uo&&br<Bs&&(Ys.length=br),this&&this!==tn&&this instanceof fs&&(wp=El||C_(wp)),wp.apply(vm,Ys)}}function q_(U,J){return function(Ue,At){return function ta(U,J,Ue,At){return dl(U,function(yn,zn,ki){J(At,Ue(yn),zn,ki)}),At}(Ue,U,J(At),{})}}function $f(U,J){return function(Ue,At){var yn;if(Ue===e&&At===e)return J;if(Ue!==e&&(yn=Ue),At!==e){if(yn===e)return At;"string"==typeof Ue||"string"==typeof At?(Ue=Bd(Ue),At=Bd(At)):(Ue=ql(Ue),At=ql(At)),yn=U(Ue,At)}return yn}}function jf(U){return Ud(function(J){return J=ro(J,qi(Ja())),ds(function(Ue){var At=this;return U(J,function(yn){return Dt(yn,At,Ue)})})})}function rf(U,J){var Ue=(J=J===e?" ":Bd(J)).length;if(Ue<2)return Ue?cd(J,U):J;var At=cd(J,_l(U/ks(J)));return Wl(J)?ed(Ol(At),0,U).join(""):At.slice(0,U)}function nu(U){return function(J,Ue,At){return At&&"number"!=typeof At&&zs(J,Ue,At)&&(Ue=At=e),J=Xh(J),Ue===e?(Ue=J,J=0):Ue=Xh(Ue),function Gg(U,J,Ue,At){for(var yn=-1,zn=Xe(_l((J-U)/(Ue||1)),0),ki=kr(zn);zn--;)ki[At?zn:++yn]=U,U+=Ue;return ki}(J,Ue,At=At===e?J<Ue?1:-1:Xh(At),U)}}function Va(U){return function(J,Ue){return"string"==typeof J&&"string"==typeof Ue||(J=eg(J),Ue=eg(Ue)),U(J,Ue)}}function mp(U,J,Ue,At,yn,zn,ki,ji,br,io){var uo=J&ye;J|=uo?ne:pe,(J&=~(uo?pe:ne))&ve||(J&=~(ae|X));var El=[U,J,yn,uo?zn:e,uo?ki:e,uo?e:zn,uo?e:ki,ji,br,io],fs=Ue.apply(e,El);return _p(U)&&jp(fs,El),fs.placeholder=At,Kp(fs,U,J)}function M_(U){var J=ha[U];return function(Ue,At){if(Ue=eg(Ue),(At=null==At?0:zt(Kl(At),292))&&zl(Ue)){var yn=(Bc(Ue)+"e").split("e");return+((yn=(Bc(J(yn[0]+"e"+(+yn[1]+At)))+"e").split("e"))[0]+"e"+(+yn[1]-At))}return J(Ue)}}var Wp=Ba&&1/ss(new Ba([,-0]))[1]==j?function(U){return new Ba(U)}:Ph;function X_(U){return function(J){var Ue=Lu(J);return Ue==Mn?Da(J):Ue==On?function gc(or){var Dr=-1,kr=Array(or.size);return or.forEach(function(Qo){kr[++Dr]=[Qo,Qo]}),kr}(J):function ya(or,Dr){return ro(Dr,function(kr){return[kr,or[kr]]})}(J,U(J))}}function fp(U,J,Ue,At,yn,zn,ki,ji){var br=J&X;if(!br&&"function"!=typeof U)throw new xc(E);var io=At?At.length:0;if(io||(J&=~(ne|pe),At=yn=e),ki=ki===e?ki:Xe(Kl(ki),0),ji=ji===e?ji:Kl(ji),io-=yn?yn.length:0,J&pe){var uo=At,Co=yn;At=yn=e}var pa=br?e:fg(U),Ea=[U,J,Ue,At,yn,uo,Co,zn,ki,ji];if(pa&&function Sd(U,J){var Ue=U[1],At=J[1],yn=Ue|At,zn=yn<(ae|X|Pe),ki=At==Pe&&Ue==ye||At==Pe&&Ue==xe&&U[7].length<=J[8]||At==(Pe|xe)&&J[7].length<=J[8]&&Ue==ye;if(!zn&&!ki)return U;At&ae&&(U[2]=J[2],yn|=Ue&ae?0:ve);var ji=J[3];if(ji){var br=U[3];U[3]=br?_h(br,ji,J[4]):ji,U[4]=br?gl(U[3],w):J[4]}return ji=J[5],ji&&(br=U[5],U[5]=br?Jd(br,ji,J[6]):ji,U[6]=br?gl(U[5],w):J[6]),ji=J[7],ji&&(U[7]=ji),At&Pe&&(U[8]=null==U[8]?J[8]:zt(U[8],J[8])),null==U[9]&&(U[9]=J[9]),U[0]=J[0],U[1]=yn,U}(Ea,pa),U=Ea[0],J=Ea[1],Ue=Ea[2],At=Ea[3],yn=Ea[4],!(ji=Ea[9]=Ea[9]===e?br?0:U.length:Xe(Ea[9]-io,0))&&J&(ye|ge)&&(J&=~(ye|ge)),J&&J!=ae)xs=J==ye||J==ge?function yr(U,J,Ue){var At=C_(U);return function yn(){for(var zn=arguments.length,ki=kr(zn),ji=zn,br=Ou(yn);ji--;)ki[ji]=arguments[ji];var io=zn<3&&ki[0]!==br&&ki[zn-1]!==br?[]:gl(ki,br);return(zn-=io.length)<Ue?mp(U,J,xd,yn.placeholder,e,ki,io,e,e,Ue-zn):Dt(this&&this!==tn&&this instanceof yn?At:U,this,ki)}}(U,J,ji):J!=ne&&J!=(ae|ne)||yn.length?xd.apply(e,Ea):function E_(U,J,Ue,At){var yn=J&ae,zn=C_(U);return function ki(){for(var ji=-1,br=arguments.length,io=-1,uo=At.length,Co=kr(uo+br),pa=this&&this!==tn&&this instanceof ki?zn:U;++io<uo;)Co[io]=At[io];for(;br--;)Co[io++]=arguments[++ji];return Dt(pa,yn?Ue:this,Co)}}(U,J,Ue,At);else var xs=function uc(U,J,Ue){var At=J&ae,yn=C_(U);return function zn(){return(this&&this!==tn&&this instanceof zn?yn:U).apply(At?Ue:this,arguments)}}(U,J,Ue);return Kp((pa?rc:jp)(xs,Ea),U,J)}function Bh(U,J,Ue,At){return U===e||Xf(U,kp[Ue])&&!qs.call(At,Ue)?J:U}function Uh(U,J,Ue,At,yn,zn){return $c(U)&&$c(J)&&(zn.set(J,U),wo(U,J,e,Uh,zn),zn.delete(J)),U}function ev(U){return Nv(U)?e:U}function zh(U,J,Ue,At,yn,zn){var ki=Ue&ue,ji=U.length,br=J.length;if(ji!=br&&!(ki&&br>ji))return!1;var io=zn.get(U),uo=zn.get(J);if(io&&uo)return io==J&&uo==U;var Co=-1,pa=!0,Ea=Ue&he?new Vc:e;for(zn.set(U,J),zn.set(J,U);++Co<ji;){var xs=U[Co],El=J[Co];if(At)var fs=ki?At(El,xs,Co,J,U,zn):At(xs,El,Co,U,J,zn);if(fs!==e){if(fs)continue;pa=!1;break}if(Ea){if(!To(J,function(Bs,Ys){if(!$o(Ea,Ys)&&(xs===Bs||yn(xs,Bs,Ue,At,zn)))return Ea.push(Ys)})){pa=!1;break}}else if(xs!==El&&!yn(xs,El,Ue,At,zn)){pa=!1;break}}return zn.delete(U),zn.delete(J),pa}function Ud(U){return Bl(vp(U,e,Gh),U+"")}function Rp(U){return Wd(U,ep,Am)}function Kf(U){return Wd(U,rd,yh)}var fg=bu?function(U){return bu.get(U)}:Ph;function jo(U){for(var J=U.name+"",Ue=Zd[J],At=qs.call(Zd,J)?Ue.length:0;At--;){var yn=Ue[At],zn=yn.func;if(null==zn||zn==U)return yn.name}return J}function Ou(U){return(qs.call(En,"placeholder")?En:U).placeholder}function Ja(){var U=En.iteratee||Nb;return U=U===Nb?Me:U,arguments.length?U(arguments[0],arguments[1]):U}function $p(U,J){var Ue=U.__data__;return function zu(U){var J=typeof U;return"string"==J||"number"==J||"symbol"==J||"boolean"==J?"__proto__"!==U:null===U}(J)?Ue["string"==typeof J?"string":"hash"]:Ue.map}function tv(U){for(var J=ep(U),Ue=J.length;Ue--;){var At=J[Ue],yn=U[At];J[Ue]=[At,yn,Dd(yn)]}return J}function hg(U,J){var Ue=function hl(or,Dr){return null==or?e:or[Dr]}(U,J);return vs(Ue)?Ue:e}var Am=Gs?function(U){return null==U?[]:(U=Ia(U),Xi(Gs(U),function(J){return os.call(U,J)}))}:_m,yh=Gs?function(U){for(var J=[];U;)qr(J,Am(U)),U=Zs(U);return J}:_m,Lu=Vl;function hp(U,J,Ue){for(var At=-1,yn=(J=Kd(J,U)).length,zn=!1;++At<yn;){var ki=Jc(J[At]);if(!(zn=null!=U&&Ue(U,ki)))break;U=U[ki]}return zn||++At!=yn?zn:!!(yn=null==U?0:U.length)&&Tg(yn)&&Js(ki,yn)&&(js(U)||Xd(U))}function gg(U){return"function"!=typeof U.constructor||Vm(U)?{}:ls(Zs(U))}function sc(U){return js(U)||Xd(U)||!!(ra&&U&&U[ra])}function Js(U,J){var Ue=typeof U;return!!(J=J??ke)&&("number"==Ue||"symbol"!=Ue&&an.test(U))&&U>-1&&U%1==0&&U<J}function zs(U,J,Ue){if(!$c(Ue))return!1;var At=typeof J;return!!("number"==At?Vu(Ue)&&Js(J,Ue.length):"string"==At&&J in Ue)&&Xf(Ue[J],U)}function gp(U,J){if(js(U))return!1;var Ue=typeof U;return!("number"!=Ue&&"symbol"!=Ue&&"boolean"!=Ue&&null!=U&&!rm(U))||(Sn.test(U)||!pr.test(U)||null!=J&&U in Ia(J))}function _p(U){var J=jo(U),Ue=En[J];if("function"!=typeof Ue||!(J in cs.prototype))return!1;if(U===Ue)return!0;var At=fg(Ue);return!!At&&U===At[0]}(zo&&Lu(new zo(new ArrayBuffer(1)))!=si||oa&&Lu(new oa)!=Mn||Ca&&Lu(Ca.resolve())!=wi||Ba&&Lu(new Ba)!=On||Is&&Lu(new Is)!=Fn)&&(Lu=function(U){var J=Vl(U),Ue=J==mi?U.constructor:e,At=Ue?Ac(Ue):"";if(At)switch(At){case Qu:return si;case _t:return Mn;case q:return wi;case W:return On;case dt:return Fn}return J});var Hm=Ju?im:nh;function Vm(U){var J=U&&U.constructor;return U===("function"==typeof J&&J.prototype||kp)}function Dd(U){return U==U&&!$c(U)}function Jf(U,J){return function(Ue){return null!=Ue&&(Ue[U]===J&&(J!==e||U in Ia(Ue)))}}function vp(U,J,Ue){return J=Xe(J===e?U.length-1:J,0),function(){for(var At=arguments,yn=-1,zn=Xe(At.length-J,0),ki=kr(zn);++yn<zn;)ki[yn]=At[J+yn];yn=-1;for(var ji=kr(J+1);++yn<J;)ji[yn]=At[yn];return ji[J]=Ue(ki),Dt(U,this,ji)}}function _g(U,J){return J.length<2?U:Kc(U,Td(J,0,-1))}function Qd(U,J){if(("constructor"!==J||"function"!=typeof U[J])&&"__proto__"!=J)return U[J]}var jp=bp(rc),yp=Ks||function(U,J){return tn.setTimeout(U,J)},Bl=bp(sm);function Kp(U,J,Ue){var At=J+"";return Bl(U,function co(U,J){var Ue=J.length;if(!Ue)return U;var At=Ue-1;return J[At]=(Ue>1?"& ":"")+J[At],J=J.join(Ue>2?", ":" "),U.replace(ce,"{\n/* [wrapped with "+J+"] */\n")}(At,function sf(U,J){return Rt(tt,function(Ue){var At="_."+Ue[0];J&Ue[1]&&!wr(U,At)&&U.push(At)}),U.sort()}(function bh(U){var J=U.match(we);return J?J[1].split(Qe):[]}(At),Ue)))}function bp(U){var J=0,Ue=0;return function(){var At=mn(),yn=be-(At-Ue);if(Ue=At,yn>0){if(++J>=me)return arguments[0]}else J=0;return U.apply(e,arguments)}}function af(U,J){var Ue=-1,At=U.length,yn=At-1;for(J=J===e?At:J;++Ue<J;){var zn=us(Ue,yn),ki=U[zn];U[zn]=U[Ue],U[Ue]=ki}return U.length=J,U}var wm=function iv(U){var J=C(U,function(At){return Ue.size===P&&Ue.clear(),At}),Ue=J.cache;return J}(function(U){var J=[];return 46===U.charCodeAt(0)&&J.push(""),U.replace(Pn,function(Ue,At,yn,zn){J.push(yn?zn.replace(lr,"$1"):At||Ue)}),J});function Jc(U){if("string"==typeof U||rm(U))return U;var J=U+"";return"0"==J&&1/U==-j?"-0":J}function Ac(U){if(null!=U){try{return Su.call(U)}catch{}try{return U+""}catch{}}return""}function pl(U){if(U instanceof cs)return U.clone();var J=new kc(U.__wrapped__,U.__chain__);return J.__actions__=cm(U.__actions__),J.__index__=U.__index__,J.__values__=U.__values__,J}var Hh=ds(function(U,J){return dc(U)?qu(U,nc(J,1,dc,!0)):[]}),md=ds(function(U,J){var Ue=Mp(J);return dc(Ue)&&(Ue=e),dc(U)?qu(U,nc(J,1,dc,!0),Ja(Ue,2)):[]}),vg=ds(function(U,J){var Ue=Mp(J);return dc(Ue)&&(Ue=e),dc(U)?qu(U,nc(J,1,dc,!0),e,Ue):[]});function wc(U,J,Ue){var At=null==U?0:U.length;if(!At)return-1;var yn=null==Ue?0:Kl(Ue);return yn<0&&(yn=Xe(At+yn,0)),ba(U,Ja(J,3),yn)}function Ep(U,J,Ue){var At=null==U?0:U.length;if(!At)return-1;var yn=At-1;return Ue!==e&&(yn=Kl(Ue),yn=Ue<0?Xe(At+yn,0):zt(yn,At-1)),ba(U,Ja(J,3),yn,!0)}function Gh(U){return(null==U?0:U.length)?nc(U,1):[]}function Ch(U){return U&&U.length?U[0]:e}var yg=ds(function(U){var J=ro(U,jd);return J.length&&J[0]===U[0]?eu(J):[]}),Mb=ds(function(U){var J=Mp(U),Ue=ro(U,jd);return J===Mp(Ue)?J=e:Ue.pop(),Ue.length&&Ue[0]===U[0]?eu(Ue,Ja(J,2)):[]}),Tb=ds(function(U){var J=Mp(U),Ue=ro(U,jd);return(J="function"==typeof J?J:e)&&Ue.pop(),Ue.length&&Ue[0]===U[0]?eu(Ue,e,J):[]});function Mp(U){var J=null==U?0:U.length;return J?U[J-1]:e}var fd=ds(Wh);function Wh(U,J){return U&&U.length&&J&&J.length?ic(U,J):U}var Ga=Ud(function(U,J){var Ue=null==U?0:U.length,At=ld(U,J);return mu(U,ro(J,function(yn){return Js(yn,Ue)?+yn:yn}).sort(b_)),At});function Eh(U){return null==U?U:nr.call(U)}var qd=ds(function(U){return Xl(nc(U,1,dc,!0))}),Tp=ds(function(U){var J=Mp(U);return dc(J)&&(J=e),Xl(nc(U,1,dc,!0),Ja(J,2))}),df=ds(function(U){var J=Mp(U);return J="function"==typeof J?J:e,Xl(nc(U,1,dc,!0),e,J)});function nd(U){if(!U||!U.length)return[];var J=0;return U=Xi(U,function(Ue){if(dc(Ue))return J=Xe(Ue.length,J),!0}),Ki(J,function(Ue){return ro(U,Qi(Ue))})}function Df(U,J){if(!U||!U.length)return[];var Ue=nd(U);return null==J?Ue:ro(Ue,function(At){return Dt(J,e,At)})}var Db=ds(function(U,J){return dc(U)?qu(U,J):[]}),Sf=ds(function(U){return fu(Xi(U,dc))}),Mh=ds(function(U){var J=Mp(U);return dc(J)&&(J=e),fu(Xi(U,dc),Ja(J,2))}),Mg=ds(function(U){var J=Mp(U);return J="function"==typeof J?J:e,fu(Xi(U,dc),e,J)}),vC=ds(nd);var Pm=ds(function(U){var J=U.length,Ue=J>1?U[J-1]:e;return Ue="function"==typeof Ue?(U.pop(),Ue):e,Df(U,Ue)});function Af(U){var J=En(U);return J.__chain__=!0,J}function Gc(U,J){return J(U)}var gu=Ud(function(U){var J=U.length,Ue=J?U[0]:0,At=this.__wrapped__,yn=function(zn){return ld(zn,U)};return!(J>1||this.__actions__.length)&&At instanceof cs&&Js(Ue)?((At=At.slice(Ue,+Ue+(J?1:0))).__actions__.push({func:Gc,args:[yn],thisArg:e}),new kc(At,this.__chain__).thru(function(zn){return J&&!zn.length&&zn.push(e),zn})):this.thru(yn)});var yC=pd(function(U,J,Ue){qs.call(U,Ue)?++U[Ue]:sl(U,Ue,1)});var D_=Eb(wc),wf=Eb(Ep);function _d(U,J){return(js(U)?Rt:Zc)(U,Ja(J,3))}function xh(U,J){return(js(U)?Qn:uu)(U,Ja(J,3))}var iu=pd(function(U,J,Ue){qs.call(U,Ue)?U[Ue].push(J):sl(U,Ue,[J])});var kv=ds(function(U,J,Ue){var At=-1,yn="function"==typeof J,zn=Vu(U)?kr(U.length):[];return Zc(U,function(ki){zn[++At]=yn?Dt(J,ki,Ue):pu(ki,J,Ue)}),zn}),id=pd(function(U,J,Ue){sl(U,Ue,J)});function Dy(U,J){return(js(U)?ro:Je)(U,Ja(J,3))}var Sb=pd(function(U,J,Ue){U[Ue?0:1].push(J)},function(){return[[],[]]});var tm=ds(function(U,J){if(null==U)return[];var Ue=J.length;return Ue>1&&zs(U,J[0],J[1])?J=[]:Ue>2&&zs(J[0],J[1],J[2])&&(J=[J[0]]),Ws(U,nc(J,1),[])}),Hd=yu||function(){return tn.Date.now()};function Up(U,J,Ue){return J=Ue?e:J,J=U&&null==J?U.length:J,fp(U,Pe,e,e,e,e,J)}function Hu(U,J){var Ue;if("function"!=typeof J)throw new xc(E);return U=Kl(U),function(){return--U>0&&(Ue=J.apply(this,arguments)),U<=1&&(J=e),Ue}}var sv=ds(function(U,J,Ue){var At=ae;if(Ue.length){var yn=gl(Ue,Ou(sv));At|=ne}return fp(U,At,J,Ue,yn)}),Rv=ds(function(U,J,Ue){var At=ae|X;if(Ue.length){var yn=gl(Ue,Ou(Rv));At|=ne}return fp(J,At,U,Ue,yn)});function mm(U,J,Ue){var At,yn,zn,ki,ji,br,io=0,uo=!1,Co=!1,pa=!0;if("function"!=typeof U)throw new xc(E);function Ea(xu){var vm=At,wp=yn;return At=yn=e,io=xu,ki=U.apply(wp,vm)}function fs(xu){var vm=xu-br;return br===e||vm>=J||vm<0||Co&&xu-io>=zn}function Bs(){var xu=Hd();if(fs(xu))return Ys(xu);ji=yp(Bs,function El(xu){var k_=J-(xu-br);return Co?zt(k_,zn-(xu-io)):k_}(xu))}function Ys(xu){return ji=e,pa&&At?Ea(xu):(At=yn=e,ki)}function Rf(){var xu=Hd(),vm=fs(xu);if(At=arguments,yn=this,br=xu,vm){if(ji===e)return function xs(xu){return io=xu,ji=yp(Bs,J),uo?Ea(xu):ki}(br);if(Co)return dp(ji),ji=yp(Bs,J),Ea(br)}return ji===e&&(ji=yp(Bs,J)),ki}return J=eg(J)||0,$c(Ue)&&(uo=!!Ue.leading,zn=(Co="maxWait"in Ue)?Xe(eg(Ue.maxWait)||0,J):zn,pa="trailing"in Ue?!!Ue.trailing:pa),Rf.cancel=function ou(){ji!==e&&dp(ji),io=0,At=br=yn=ji=e},Rf.flush=function au(){return ji===e?ki:Ys(Hd())},Rf}var Sy=ds(function(U,J){return Fd(U,1,J)}),te=ds(function(U,J,Ue){return Fd(U,eg(J)||0,Ue)});function C(U,J){if("function"!=typeof U||null!=J&&"function"!=typeof J)throw new xc(E);var Ue=function(){var At=arguments,yn=J?J.apply(this,At):At[0],zn=Ue.cache;if(zn.has(yn))return zn.get(yn);var ki=U.apply(this,At);return Ue.cache=zn.set(yn,ki)||zn,ki};return Ue.cache=new(C.Cache||Xc),Ue}function Q(U){if("function"!=typeof U)throw new xc(E);return function(){var J=arguments;switch(J.length){case 0:return!U.call(this);case 1:return!U.call(this,J[0]);case 2:return!U.call(this,J[0],J[1]);case 3:return!U.call(this,J[0],J[1],J[2])}return!U.apply(this,J)}}C.Cache=Xc;var Zt=as(function(U,J){var Ue=(J=1==J.length&&js(J[0])?ro(J[0],qi(Ja())):ro(nc(J,1),qi(Ja()))).length;return ds(function(At){for(var yn=-1,zn=zt(At.length,Ue);++yn<zn;)At[yn]=J[yn].call(this,At[yn]);return Dt(U,this,At)})}),Pi=ds(function(U,J){var Ue=gl(J,Ou(Pi));return fp(U,ne,e,J,Ue)}),Ir=ds(function(U,J){var Ue=gl(J,Ou(Ir));return fp(U,pe,e,J,Ue)}),xo=Ud(function(U,J){return fp(U,xe,e,e,e,J)});function Xf(U,J){return U===J||U!=U&&J!=J}var EC=Va(bl),$m=Va(function(U,J){return U>=J}),Xd=fc(function(){return arguments}())?fc:function(U){return Pd(U)&&qs.call(U,"callee")&&!os.call(U,"callee")},js=kr.isArray,wy=Li?qi(Li):function Tu(U){return Pd(U)&&Vl(U)==Ai};function Vu(U){return null!=U&&Tg(U.length)&&!im(U)}function dc(U){return Pd(U)&&Vu(U)}var fm=Ed||nh,lv=Ta?qi(Ta):function cp(U){return Pd(U)&&Vl(U)==rn};function Iy(U){if(!Pd(U))return!1;var J=Vl(U);return J==st||J==He||"string"==typeof U.message&&"string"==typeof U.name&&!Nv(U)}function im(U){if(!$c(U))return!1;var J=Vl(U);return J==nn||J==Dn||J==ft||J==Bn}function _u(U){return"number"==typeof U&&U==Kl(U)}function Tg(U){return"number"==typeof U&&U>-1&&U%1==0&&U<=ke}function $c(U){var J=typeof U;return null!=U&&("object"==J||"function"==J)}function Pd(U){return null!=U&&"object"==typeof U}var Xg=La?qi(La):function Ro(U){return Pd(U)&&Lu(U)==Mn};function Fv(U){return"number"==typeof U||Pd(U)&&Vl(U)==vi}function Nv(U){if(!Pd(U)||Vl(U)!=mi)return!1;var J=Zs(U);if(null===J)return!0;var Ue=qs.call(J,"constructor")&&J.constructor;return"function"==typeof Ue&&Ue instanceof Ue&&Su.call(Ue)==Ke}var S_=Ps?qi(Ps):function _e(U){return Pd(U)&&Vl(U)==kn};var Bv=is?qi(is):function $e(U){return Pd(U)&&Lu(U)==On};function Uv(U){return"string"==typeof U||!js(U)&&Pd(U)&&Vl(U)==je}function rm(U){return"symbol"==typeof U||Pd(U)&&Vl(U)==Bt}var If=yt?qi(yt):function Tt(U){return Pd(U)&&Tg(U.length)&&!!wa[Vl(U)]};var g0=Va(Ce),_0=Va(function(U,J){return U<=J});function v0(U){if(!U)return[];if(Vu(U))return Uv(U)?Ol(U):cm(U);if(_a&&U[_a])return function Ku(or){for(var Dr,kr=[];!(Dr=or.next()).done;)kr.push(Dr.value);return kr}(U[_a]());var J=Lu(U);return(J==Mn?Da:J==On?ss:Lf)(U)}function Xh(U){return U?(U=eg(U))===j||U===-j?(U<0?-1:1)*Be:U==U?U:0:0===U?U:0}function Kl(U){var J=Xh(U),Ue=J%1;return J==J?Ue?J-Ue:J:0}function y0(U){return U?qo(Kl(U),0,mt):0}function eg(U){if("number"==typeof U)return U;if(rm(U))return nt;if($c(U)){var J="function"==typeof U.valueOf?U.valueOf():U;U=$c(J)?J+"":J}if("string"!=typeof U)return 0===U?U:+U;U=Na(U);var Ue=ea.test(U);return Ue||Ii.test(U)?zc(U.slice(2),Ue?2:8):aa.test(U)?nt:+U}function DC(U){return um(U,rd(U))}function Bc(U){return null==U?"":Bd(U)}var m1=Sm(function(U,J){if(Vm(J)||Vu(J))um(J,ep(J),U);else for(var Ue in J)qs.call(J,Ue)&&Nl(U,Ue,J[Ue])}),gE=Sm(function(U,J){um(J,rd(J),U)}),Ly=Sm(function(U,J,Ue,At){um(J,rd(J),U,At)}),f1=Sm(function(U,J,Ue,At){um(J,ep(J),U,At)}),ky=Ud(ld);var A_=ds(function(U,J){U=Ia(U);var Ue=-1,At=J.length,yn=At>2?J[2]:e;for(yn&&zs(J[0],J[1],yn)&&(At=1);++Ue<At;)for(var zn=J[Ue],ki=rd(zn),ji=-1,br=ki.length;++ji<br;){var io=ki[ji],uo=U[io];(uo===e||Xf(uo,kp[io])&&!qs.call(U,io))&&(U[io]=zn[io])}return U}),h1=ds(function(U){return U.push(e,Uh),Dt(Ry,e,U)});function Sp(U,J,Ue){var At=null==U?e:Kc(U,J);return At===e?Ue:At}function Pb(U,J){return null!=U&&hp(U,J,Nd)}var vE=q_(function(U,J,Ue){null!=J&&"function"!=typeof J.toString&&(J=ht.call(J)),U[J]=Ue},th(ru)),mf=q_(function(U,J,Ue){null!=J&&"function"!=typeof J.toString&&(J=ht.call(J)),qs.call(U,J)?U[J].push(Ue):U[J]=[Ue]},Ja),Ob=ds(pu);function ep(U){return Vu(U)?li(U):N(U)}function rd(U){return Vu(U)?li(U,!0):O(U)}var yE=Sm(function(U,J,Ue){wo(U,J,Ue)}),Ry=Sm(function(U,J,Ue,At){wo(U,J,Ue,At)}),t_=Ud(function(U,J){var Ue={};if(null==U)return Ue;var At=!1;J=ro(J,function(zn){return zn=Kd(zn,U),At||(At=zn.length>1),zn}),um(U,Kf(U),Ue),At&&(Ue=ll(Ue,B|Y|V,ev));for(var yn=J.length;yn--;)gh(Ue,J[yn]);return Ue});var bE=Ud(function(U,J){return null==U?{}:function tu(U,J){return Sc(U,J,function(Ue,At){return Pb(U,At)})}(U,J)});function dv(U,J){if(null==U)return{};var Ue=ro(Kf(U),function(At){return[At]});return J=Ja(J),Sc(U,Ue,function(At,yn){return J(At,yn[0])})}var Vv=X_(ep),b0=X_(rd);function Lf(U){return null==U?[]:ia(U,ep(U))}var Gv=$g(function(U,J,Ue){return J=J.toLowerCase(),U+(Ue?Wv(J):J)});function Wv(U){return Ag(Bc(U).toLowerCase())}function zp(U){return(U=Bc(U))&&U.replace(Zn,Tc).replace(ur,"")}var v1=$g(function(U,J,Ue){return U+(Ue?"-":"")+J.toLowerCase()}),EE=$g(function(U,J,Ue){return U+(Ue?" ":"")+J.toLowerCase()}),Rb=vh("toLowerCase");var Uy=$g(function(U,J,Ue){return U+(Ue?"_":"")+J.toLowerCase()});var xE=$g(function(U,J,Ue){return U+(Ue?" ":"")+Ag(J)});var zy=$g(function(U,J,Ue){return U+(Ue?" ":"")+J.toUpperCase()}),Ag=vh("toUpperCase");function Yy(U,J,Ue){return U=Bc(U),(J=Ue?e:J)===e?function sp(or){return Vo.test(or)}(U)?function bd(or){return or.match($t)||[]}(U):function Ho(or){return or.match(qt)||[]}(U):U.match(J)||[]}var E1=ds(function(U,J){try{return Dt(U,e,J)}catch(Ue){return Iy(Ue)?Ue:new oo(Ue)}}),C0=Ud(function(U,J){return Rt(J,function(Ue){Ue=Jc(Ue),sl(U,Ue,sv(U[Ue],U))}),U});function th(U){return function(){return U}}var fv=Q_(),E0=Q_(!0);function ru(U){return U}function Nb(U){return Me("function"==typeof U?U:ll(U,B))}var rg=ds(function(U,J){return function(Ue){return pu(Ue,U,J)}}),ff=ds(function(U,J){return function(Ue){return pu(U,Ue,J)}});function hf(U,J,Ue){var At=ep(J),yn=du(J,At);null==Ue&&(!$c(J)||!yn.length&&At.length)&&(Ue=J,J=U,U=this,yn=du(J,ep(J)));var zn=!($c(Ue)&&"chain"in Ue&&!Ue.chain),ki=im(U);return Rt(yn,function(ji){var br=J[ji];U[ji]=br,ki&&(U.prototype[ji]=function(){var io=this.__chain__;if(zn||io){var uo=U(this.__wrapped__);return(uo.__actions__=cm(this.__actions__)).push({func:br,args:arguments,thisArg:U}),uo.__chain__=io,uo}return br.apply(U,qr([this.value()],arguments))})}),U}function Ph(){}var hv=jf(ro),Hy=jf(fi),M0=jf(To);function i_(U){return gp(U)?Qi(Jc(U)):function Um(U){return function(J){return Kc(J,U)}}(U)}var Bb=nu(),wg=nu(!0);function _m(){return[]}function nh(){return!1}var Ub=$f(function(U,J){return U+J},0),zb=M_("ceil"),Jv=$f(function(U,J){return U/J},1),Pg=M_("floor");var gv=$f(function(U,J){return U*J},1),kf=M_("round"),ih=$f(function(U,J){return U-J},0);return En.after=function nm(U,J){if("function"!=typeof J)throw new xc(E);return U=Kl(U),function(){if(--U<1)return J.apply(this,arguments)}},En.ary=Up,En.assign=m1,En.assignIn=gE,En.assignInWith=Ly,En.assignWith=f1,En.at=ky,En.before=Hu,En.bind=sv,En.bindAll=C0,En.bindKey=Rv,En.castArray=function Ay(){if(!arguments.length)return[];var U=arguments[0];return js(U)?U:[U]},En.chain=Af,En.chunk=function Zm(U,J,Ue){J=(Ue?zs(U,J,Ue):J===e)?1:Xe(Kl(J),0);var At=null==U?0:U.length;if(!At||J<1)return[];for(var yn=0,zn=0,ki=kr(_l(At/J));yn<At;)ki[zn++]=Td(U,yn,yn+=J);return ki},En.compact=function Jp(U){for(var J=-1,Ue=null==U?0:U.length,At=0,yn=[];++J<Ue;){var zn=U[J];zn&&(yn[At++]=zn)}return yn},En.concat=function Cp(){var U=arguments.length;if(!U)return[];for(var J=kr(U-1),Ue=arguments[0],At=U;At--;)J[At-1]=arguments[At];return qr(js(Ue)?cm(Ue):[Ue],nc(J,1))},En.cond=function ig(U){var J=null==U?0:U.length,Ue=Ja();return U=J?ro(U,function(At){if("function"!=typeof At[1])throw new xc(E);return[Ue(At[0]),At[1]]}):[],ds(function(At){for(var yn=-1;++yn<J;){var zn=U[yn];if(Dt(zn[0],this,At))return Dt(zn[1],this,At)}})},En.conforms=function gm(U){return function y_(U){var J=ep(U);return function(Ue){return Hl(Ue,U,J)}}(ll(U,B))},En.constant=th,En.countBy=yC,En.create=function zv(U,J){var Ue=ls(U);return null==J?Ue:cu(Ue,J)},En.curry=function ml(U,J,Ue){var At=fp(U,ye,e,e,e,e,e,J=Ue?e:J);return At.placeholder=ml.placeholder,At},En.curryRight=function pf(U,J,Ue){var At=fp(U,ge,e,e,e,e,e,J=Ue?e:J);return At.placeholder=pf.placeholder,At},En.debounce=mm,En.defaults=A_,En.defaultsDeep=h1,En.defer=Sy,En.delay=te,En.difference=Hh,En.differenceBy=md,En.differenceWith=vg,En.drop=function Vh(U,J,Ue){var At=null==U?0:U.length;return At?Td(U,(J=Ue||J===e?1:Kl(J))<0?0:J,At):[]},En.dropRight=function Qp(U,J,Ue){var At=null==U?0:U.length;return At?Td(U,0,(J=At-(J=Ue||J===e?1:Kl(J)))<0?0:J):[]},En.dropRightWhile=function Kg(U,J){return U&&U.length?$d(U,Ja(J,3),!0,!0):[]},En.dropWhile=function Qc(U,J){return U&&U.length?$d(U,Ja(J,3),!0):[]},En.fill=function Zh(U,J,Ue,At){var yn=null==U?0:U.length;return yn?(Ue&&"number"!=typeof Ue&&zs(U,J,Ue)&&(Ue=0,At=yn),function Yp(U,J,Ue,At){var yn=U.length;for((Ue=Kl(Ue))<0&&(Ue=-Ue>yn?0:yn+Ue),(At=At===e||At>yn?yn:Kl(At))<0&&(At+=yn),At=Ue>At?0:y0(At);Ue<At;)U[Ue++]=J;return U}(U,J,Ue,At)):[]},En.filter=function Kh(U,J){return(js(U)?Xi:Fs)(U,Ja(J,3))},En.flatMap=function Qg(U,J){return nc(Dy(U,J),1)},En.flatMapDeep=function Np(U,J){return nc(Dy(U,J),j)},En.flatMapDepth=function em(U,J,Ue){return Ue=Ue===e?1:Kl(Ue),nc(Dy(U,J),Ue)},En.flatten=Gh,En.flattenDeep=function qp(U){return(null==U?0:U.length)?nc(U,j):[]},En.flattenDepth=function lf(U,J){return(null==U?0:U.length)?nc(U,J=J===e?1:Kl(J)):[]},En.flip=function M(U){return fp(U,de)},En.flow=fv,En.flowRight=E0,En.fromPairs=function dm(U){for(var J=-1,Ue=null==U?0:U.length,At={};++J<Ue;){var yn=U[J];At[yn[0]]=yn[1]}return At},En.functions=function _E(U){return null==U?[]:du(U,ep(U))},En.functionsIn=function uv(U){return null==U?[]:du(U,rd(U))},En.groupBy=iu,En.initial=function Qf(U){return(null==U?0:U.length)?Td(U,0,-1):[]},En.intersection=yg,En.intersectionBy=Mb,En.intersectionWith=Tb,En.invert=vE,En.invertBy=mf,En.invokeMap=kv,En.iteratee=Nb,En.keyBy=id,En.keys=ep,En.keysIn=rd,En.map=Dy,En.mapKeys=function Pf(U,J){var Ue={};return J=Ja(J,3),dl(U,function(At,yn,zn){sl(Ue,J(At,yn,zn),At)}),Ue},En.mapValues=function I_(U,J){var Ue={};return J=Ja(J,3),dl(U,function(At,yn,zn){sl(Ue,yn,J(At,yn,zn))}),Ue},En.matches=function Ap(U){return Vt(ll(U,B))},En.matchesProperty=function jv(U,J){return Rr(U,ll(J,B))},En.memoize=C,En.merge=yE,En.mergeWith=Ry,En.method=rg,En.methodOf=ff,En.mixin=hf,En.negate=Q,En.nthArg=function P_(U){return U=Kl(U),ds(function(J){return Ls(J,U)})},En.omit=t_,En.omitBy=function Lb(U,J){return dv(U,Q(Ja(J)))},En.once=function Ye(U){return Hu(2,U)},En.orderBy=function Jh(U,J,Ue,At){return null==U?[]:(js(J)||(J=null==J?[]:[J]),js(Ue=At?e:Ue)||(Ue=null==Ue?[]:[Ue]),Ws(U,J,Ue))},En.over=hv,En.overArgs=Zt,En.overEvery=Hy,En.overSome=M0,En.partial=Pi,En.partialRight=Ir,En.partition=Sb,En.pick=bE,En.pickBy=dv,En.property=i_,En.propertyOf=function r_(U){return function(J){return null==U?e:Kc(U,J)}},En.pull=fd,En.pullAll=Wh,En.pullAllBy=function Cg(U,J,Ue){return U&&U.length&&J&&J.length?ic(U,J,Ja(Ue,2)):U},En.pullAllWith=function zd(U,J,Ue){return U&&U.length&&J&&J.length?ic(U,J,e,Ue):U},En.pullAt=Ga,En.range=Bb,En.rangeRight=wg,En.rearg=xo,En.reject=function Dh(U,J){return(js(U)?Xi:Fs)(U,Q(Ja(J,3)))},En.remove=function hd(U,J){var Ue=[];if(!U||!U.length)return Ue;var At=-1,yn=[],zn=U.length;for(J=Ja(J,3);++At<zn;){var ki=U[At];J(ki,At,U)&&(Ue.push(ki),yn.push(At))}return mu(U,yn),Ue},En.rest=function Qa(U,J){if("function"!=typeof U)throw new xc(E);return ds(U,J=J===e?J:Kl(J))},En.reverse=Eh,En.sampleSize=function wd(U,J,Ue){return J=(Ue?zs(U,J,Ue):J===e)?1:Kl(J),(js(U)?Sr:Ns)(U,J)},En.set=function xg(U,J,Ue){return null==U?U:Dm(U,J,Ue)},En.setWith=function Dg(U,J,Ue,At){return At="function"==typeof At?At:e,null==U?U:Dm(U,J,Ue,At)},En.shuffle=function Qh(U){return(js(U)?fo:Xu)(U)},En.slice=function Al(U,J,Ue){var At=null==U?0:U.length;return At?(Ue&&"number"!=typeof Ue&&zs(U,J,Ue)?(J=0,Ue=At):(J=null==J?0:Kl(J),Ue=Ue===e?At:Kl(Ue)),Td(U,J,Ue)):[]},En.sortBy=tm,En.sortedUniq=function Fc(U){return U&&U.length?Wg(U):[]},En.sortedUniqBy=function gd(U,J){return U&&U.length?Wg(U,Ja(J,2)):[]},En.split=function Sg(U,J,Ue){return Ue&&"number"!=typeof Ue&&zs(U,J,Ue)&&(J=Ue=e),(Ue=Ue===e?mt:Ue>>>0)?(U=Bc(U))&&("string"==typeof J||null!=J&&!S_(J))&&(!(J=Bd(J))&&Wl(U))?ed(Ol(U),0,Ue):U.split(J,Ue):[]},En.spread=function ec(U,J){if("function"!=typeof U)throw new xc(E);return J=null==J?0:Xe(Kl(J),0),ds(function(Ue){var At=Ue[J],yn=ed(Ue,0,J);return At&&qr(yn,At),Dt(U,this,yn)})},En.tail=function xb(U){var J=null==U?0:U.length;return J?Td(U,1,J):[]},En.take=function uf(U,J,Ue){return U&&U.length?Td(U,0,(J=Ue||J===e?1:Kl(J))<0?0:J):[]},En.takeRight=function jl(U,J,Ue){var At=null==U?0:U.length;return At?Td(U,(J=At-(J=Ue||J===e?1:Kl(J)))<0?0:J,At):[]},En.takeRightWhile=function Eg(U,J){return U&&U.length?$d(U,Ja(J,3),!1,!0):[]},En.takeWhile=function Gm(U,J){return U&&U.length?$d(U,Ja(J,3)):[]},En.tap=function kl(U,J){return J(U),U},En.throttle=function Sh(U,J,Ue){var At=!0,yn=!0;if("function"!=typeof U)throw new xc(E);return $c(Ue)&&(At="leading"in Ue?!!Ue.leading:At,yn="trailing"in Ue?!!Ue.trailing:yn),mm(U,J,{leading:At,maxWait:J,trailing:yn})},En.thru=Gc,En.toArray=v0,En.toPairs=Vv,En.toPairsIn=b0,En.toPath=function Vy(U){return js(U)?ro(U,Jc):rm(U)?[U]:cm(wm(Bc(U)))},En.toPlainObject=DC,En.transform=function Zv(U,J,Ue){var At=js(U),yn=At||fm(U)||If(U);if(J=Ja(J,4),null==Ue){var zn=U&&U.constructor;Ue=yn?At?new zn:[]:$c(U)&&im(zn)?ls(Zs(U)):{}}return(yn?Rt:dl)(U,function(ki,ji,br){return J(Ue,ki,ji,br)}),Ue},En.unary=function qg(U){return Up(U,1)},En.union=qd,En.unionBy=Tp,En.unionWith=df,En.uniq=function Fp(U){return U&&U.length?Xl(U):[]},En.uniqBy=function xy(U,J){return U&&U.length?Xl(U,Ja(J,2)):[]},En.uniqWith=function Xs(U,J){return J="function"==typeof J?J:e,U&&U.length?Xl(U,e,J):[]},En.unset=function Of(U,J){return null==U||gh(U,J)},En.unzip=nd,En.unzipWith=Df,En.update=function tg(U,J,Ue){return null==U?U:Zp(U,J,hu(Ue))},En.updateWith=function Ih(U,J,Ue,At){return At="function"==typeof At?At:e,null==U?U:Zp(U,J,hu(Ue),At)},En.values=Lf,En.valuesIn=function CE(U){return null==U?[]:ia(U,rd(U))},En.without=Db,En.words=Yy,En.wrap=function ao(U,J){return Pi(hu(J),U)},En.xor=Sf,En.xorBy=Mh,En.xorWith=Mg,En.zip=vC,En.zipObject=function ov(U,J){return up(U||[],J||[],Nl)},En.zipObjectDeep=function Wm(U,J){return up(U||[],J||[],Dm)},En.zipWith=Pm,En.entries=Vv,En.entriesIn=b0,En.extend=gE,En.extendWith=Ly,hf(En,En),En.add=Ub,En.attempt=E1,En.camelCase=Gv,En.capitalize=Wv,En.ceil=zb,En.clamp=function Fy(U,J,Ue){return Ue===e&&(Ue=J,J=e),Ue!==e&&(Ue=(Ue=eg(Ue))==Ue?Ue:0),J!==e&&(J=(J=eg(J))==J?J:0),qo(eg(U),J,Ue)},En.clone=function Wc(U){return ll(U,V)},En.cloneDeep=function Ah(U){return ll(U,B|V)},En.cloneDeepWith=function CC(U,J){return ll(U,B|V,J="function"==typeof J?J:e)},En.cloneWith=function Dp(U,J){return ll(U,V,J="function"==typeof J?J:e)},En.conformsTo=function Id(U,J){return null==J||Hl(U,J,ep(J))},En.deburr=zp,En.defaultTo=function jm(U,J){return null==U||U!=U?J:U},En.divide=Jv,En.endsWith=function Ny(U,J,Ue){U=Bc(U),J=Bd(J);var At=U.length,yn=Ue=Ue===e?At:qo(Kl(Ue),0,At);return(Ue-=J.length)>=0&&U.slice(Ue,yn)==J},En.eq=Xf,En.escape=function kb(U){return(U=Bc(U))&&Yt.test(U)?U.replace(jn,Qs):U},En.escapeRegExp=function By(U){return(U=Bc(U))&&ai.test(U)?U.replace(Nt,"\\$&"):U},En.every=function jh(U,J,Ue){var At=js(U)?fi:Es;return Ue&&zs(U,J,Ue)&&(J=e),At(U,Ja(J,3))},En.find=D_,En.findIndex=wc,En.findKey=function hm(U,J){return Ra(U,Ja(J,3),dl)},En.findLast=wf,En.findLastIndex=Ep,En.findLastKey=function e_(U,J){return Ra(U,Ja(J,3),Ti)},En.floor=Pg,En.forEach=_d,En.forEachRight=xh,En.forIn=function eh(U,J){return null==U?U:Pu(U,Ja(J,3),rd)},En.forInRight=function SC(U,J){return null==U?U:yl(U,Ja(J,3),rd)},En.forOwn=function w_(U,J){return U&&dl(U,Ja(J,3))},En.forOwnRight=function AC(U,J){return U&&Ti(U,Ja(J,3))},En.get=Sp,En.gt=EC,En.gte=$m,En.has=function Yv(U,J){return null!=U&&hp(U,J,Sl)},En.hasIn=Pb,En.head=Ch,En.identity=ru,En.includes=function xp(U,J,Ue,At){U=Vu(U)?U:Lf(U),Ue=Ue&&!At?Kl(Ue):0;var yn=U.length;return Ue<0&&(Ue=Xe(yn+Ue,0)),Uv(U)?Ue<=yn&&U.indexOf(J,Ue)>-1:!!yn&&Jt(U,J,Ue)>-1},En.indexOf=function Ov(U,J,Ue){var At=null==U?0:U.length;if(!At)return-1;var yn=null==Ue?0:Kl(Ue);return yn<0&&(yn=Xe(At+yn,0)),Jt(U,J,yn)},En.inRange=function g1(U,J,Ue){return J=Xh(J),Ue===e?(Ue=J,J=0):Ue=Xh(Ue),function Hp(U,J,Ue){return U>=zt(J,Ue)&&U<Xe(J,Ue)}(U=eg(U),J,Ue)},En.invoke=Ob,En.isArguments=Xd,En.isArray=js,En.isArrayBuffer=wy,En.isArrayLike=Vu,En.isArrayLikeObject=dc,En.isBoolean=function MC(U){return!0===U||!1===U||Pd(U)&&Vl(U)==Ct},En.isBuffer=fm,En.isDate=lv,En.isElement=function cv(U){return Pd(U)&&1===U.nodeType&&!Nv(U)},En.isEmpty=function TC(U){if(null==U)return!0;if(Vu(U)&&(js(U)||"string"==typeof U||"function"==typeof U.splice||fm(U)||If(U)||Xd(U)))return!U.length;var J=Lu(U);if(J==Mn||J==On)return!U.size;if(Vm(U))return!N(U).length;for(var Ue in U)if(qs.call(U,Ue))return!1;return!0},En.isEqual=function Tr(U,J){return Ql(U,J)},En.isEqualWith=function qh(U,J,Ue){var At=(Ue="function"==typeof Ue?Ue:e)?Ue(U,J):e;return At===e?Ql(U,J,e,Ue):!!At},En.isError=Iy,En.isFinite=function u1(U){return"number"==typeof U&&zl(U)},En.isFunction=im,En.isInteger=_u,En.isLength=Tg,En.isMap=Xg,En.isMatch=function wb(U,J){return U===J||Fo(U,J,tv(J))},En.isMatchWith=function d1(U,J,Ue){return Ue="function"==typeof Ue?Ue:e,Fo(U,J,tv(J),Ue)},En.isNaN=function xC(U){return Fv(U)&&U!=+U},En.isNative=function p1(U){if(Hm(U))throw new oo(g);return vs(U)},En.isNil=function Py(U){return null==U},En.isNull=function Ib(U){return null===U},En.isNumber=Fv,En.isObject=$c,En.isObjectLike=Pd,En.isPlainObject=Nv,En.isRegExp=S_,En.isSafeInteger=function Oy(U){return _u(U)&&U>=-ke&&U<=ke},En.isSet=Bv,En.isString=Uv,En.isSymbol=rm,En.isTypedArray=If,En.isUndefined=function ku(U){return U===e},En.isWeakMap=function h0(U){return Pd(U)&&Lu(U)==Fn},En.isWeakSet=function Nc(U){return Pd(U)&&Vl(U)==ui},En.join=function x_(U,J){return null==U?"":vl.call(U,J)},En.kebabCase=v1,En.last=Mp,En.lastIndexOf=function Jg(U,J,Ue){var At=null==U?0:U.length;if(!At)return-1;var yn=At;return Ue!==e&&(yn=(yn=Kl(Ue))<0?Xe(At+yn,0):zt(yn,At-1)),J==J?function Pc(or,Dr,kr){for(var Qo=kr+1;Qo--;)if(or[Qo]===Dr)return Qo;return Qo}(U,J,yn):ba(U,bt,yn,!0)},En.lowerCase=EE,En.lowerFirst=Rb,En.lt=g0,En.lte=_0,En.max=function L_(U){return U&&U.length?mc(U,ru,bl):e},En.maxBy=function o_(U,J){return U&&U.length?mc(U,Ja(J,2),bl):e},En.mean=function x0(U){return Xt(U,ru)},En.meanBy=function Vd(U,J){return Xt(U,Ja(J,2))},En.min=function D0(U){return U&&U.length?mc(U,ru,Ce):e},En.minBy=function gf(U,J){return U&&U.length?mc(U,Ja(J,2),Ce):e},En.stubArray=_m,En.stubFalse=nh,En.stubObject=function O_(){return{}},En.stubString=function Ig(){return""},En.stubTrue=function M1(){return!0},En.multiply=gv,En.nth=function bg(U,J){return U&&U.length?Ls(U,Kl(J)):e},En.noConflict=function Kv(){return tn._===this&&(tn._=dn),this},En.noop=Ph,En.now=Hd,En.pad=function ME(U,J,Ue){U=Bc(U);var At=(J=Kl(J))?ks(U):0;if(!J||At>=J)return U;var yn=(J-At)/2;return rf(Dc(yn),Ue)+U+rf(_l(yn),Ue)},En.padEnd=function TE(U,J,Ue){U=Bc(U);var At=(J=Kl(J))?ks(U):0;return J&&At<J?U+rf(J-At,Ue):U},En.padStart=function y1(U,J,Ue){U=Bc(U);var At=(J=Kl(J))?ks(U):0;return J&&At<J?rf(J-At,Ue)+U:U},En.parseInt=function wC(U,J,Ue){return Ue||null==J?J=0:J&&(J=+J),ni(Bc(U).replace(hn,""),J||0)},En.random=function _1(U,J,Ue){if(Ue&&"boolean"!=typeof Ue&&zs(U,J,Ue)&&(J=Ue=e),Ue===e&&("boolean"==typeof J?(Ue=J,J=e):"boolean"==typeof U&&(Ue=U,U=e)),U===e&&J===e?(U=0,J=1):(U=Xh(U),J===e?(J=U,U=0):J=Xh(J)),U>J){var At=U;U=J,J=At}if(Ue||U%1||J%1){var yn=Fi();return zt(U+yn*(J-U+ol("1e-"+((yn+"").length-1))),J)}return us(U,J)},En.reduce=function f0(U,J,Ue){var At=js(U)?ho:Fe,yn=arguments.length<3;return At(U,Ja(J,4),Ue,yn,Zc)},En.reduceRight=function Ab(U,J,Ue){var At=js(U)?xa:Fe,yn=arguments.length<3;return At(U,Ja(J,4),Ue,yn,uu)},En.repeat=function pv(U,J,Ue){return J=(Ue?zs(U,J,Ue):J===e)?1:Kl(J),cd(Bc(U),J)},En.replace=function ng(){var U=arguments,J=Bc(U[0]);return U.length<3?J:J.replace(U[1],U[2])},En.result=function Hv(U,J,Ue){var At=-1,yn=(J=Kd(J,U)).length;for(yn||(yn=1,U=e);++At<yn;){var zn=null==U?e:U[Jc(J[At])];zn===e&&(At=yn,zn=Ue),U=im(zn)?zn.call(U):zn}return U},En.round=kf,En.runInContext=or,En.sample=function qf(U){return(js(U)?dr:xm)(U)},En.size=function bC(U){if(null==U)return 0;if(Vu(U))return Uv(U)?ks(U):U.length;var J=Lu(U);return J==Mn||J==On?U.size:N(U).length},En.snakeCase=Uy,En.some=function Bp(U,J,Ue){var At=js(U)?To:pg;return Ue&&zs(U,J,Ue)&&(J=e),At(U,Ja(J,3))},En.sortedIndex=function pm(U,J){return ud(U,J)},En.sortedIndexBy=function Yd(U,J,Ue){return Vp(U,J,Ja(Ue,2))},En.sortedIndexOf=function Ya(U,J){var Ue=null==U?0:U.length;if(Ue){var At=ud(U,J);if(At<Ue&&Xf(U[At],J))return At}return-1},En.sortedLastIndex=function Im(U,J){return ud(U,J,!0)},En.sortedLastIndexBy=function cf(U,J,Ue){return Vp(U,J,Ja(Ue,2),!0)},En.sortedLastIndexOf=function Lv(U,J){if(null==U?0:U.length){var At=ud(U,J,!0)-1;if(Xf(U[At],J))return At}return-1},En.startCase=xE,En.startsWith=function Fb(U,J,Ue){return U=Bc(U),Ue=null==Ue?0:qo(Kl(Ue),0,U.length),J=Bd(J),U.slice(Ue,Ue+J.length)==J},En.subtract=ih,En.sum=function _v(U){return U&&U.length?yi(U,ru):0},En.sumBy=function Qv(U,J){return U&&U.length?yi(U,Ja(J,2)):0},En.template=function mv(U,J,Ue){var At=En.templateSettings;Ue&&zs(U,J,Ue)&&(J=e),U=Bc(U),J=Ly({},J,At,Bh);var ji,br,yn=Ly({},J.imports,At.imports,Bh),zn=ep(yn),ki=ia(yn,zn),io=0,uo=J.interpolate||Ci,Co="__p += '",pa=cc((J.escape||Ci).source+"|"+uo.source+"|"+(uo===Nn?mo:Ci).source+"|"+(J.evaluate||Ci).source+"|$","g"),Ea="//# sourceURL="+(qs.call(J,"sourceURL")?(J.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++ja+"]")+"\n";U.replace(pa,function(fs,Bs,Ys,ou,au,Rf){return Ys||(Ys=ou),Co+=U.slice(io,Rf).replace(Xn,vu),Bs&&(ji=!0,Co+="' +\n__e("+Bs+") +\n'"),au&&(br=!0,Co+="';\n"+au+";\n__p += '"),Ys&&(Co+="' +\n((__t = ("+Ys+")) == null ? '' : __t) +\n'"),io=Rf+fs.length,fs}),Co+="';\n";var xs=qs.call(J,"variable")&&J.variable;if(xs){if(Tn.test(xs))throw new oo(T)}else Co="with (obj) {\n"+Co+"\n}\n";Co=(br?Co.replace(Gr,""):Co).replace(zr,"$1").replace(Eo,"$1;"),Co="function("+(xs||"obj")+") {\n"+(xs?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(ji?", __e = _.escape":"")+(br?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+Co+"return __p\n}";var El=E1(function(){return da(zn,Ea+"return "+Co).apply(e,ki)});if(El.source=Co,Iy(El))throw El;return El},En.times=function T0(U,J){if((U=Kl(U))<1||U>ke)return[];var Ue=mt,At=zt(U,mt);J=Ja(J),U-=mt;for(var yn=Ki(At,J);++Ue<U;)J(Ue);return yn},En.toFinite=Xh,En.toInteger=Kl,En.toLength=y0,En.toLower=function b1(U){return Bc(U).toLowerCase()},En.toNumber=eg,En.toSafeInteger=function wh(U){return U?qo(Kl(U),-ke,ke):0===U?U:0},En.toString=Bc,En.toUpper=function C1(U){return Bc(U).toUpperCase()},En.trim=function IC(U,J,Ue){if((U=Bc(U))&&(Ue||J===e))return Na(U);if(!U||!(J=Bd(J)))return U;var At=Ol(U),yn=Ol(J);return ed(At,su(At,yn),Us(At,yn)+1).join("")},En.trimEnd=function PC(U,J,Ue){if((U=Bc(U))&&(Ue||J===e))return U.slice(0,_c(U)+1);if(!U||!(J=Bd(J)))return U;var At=Ol(U);return ed(At,0,Us(At,Ol(J))+1).join("")},En.trimStart=function n_(U,J,Ue){if((U=Bc(U))&&(Ue||J===e))return U.replace(hn,"");if(!U||!(J=Bd(J)))return U;var At=Ol(U);return ed(At,su(At,Ol(J))).join("")},En.truncate=function $v(U,J){var Ue=re,At=oe;if($c(J)){var yn="separator"in J?J.separator:yn;Ue="length"in J?Kl(J.length):Ue,At="omission"in J?Bd(J.omission):At}var zn=(U=Bc(U)).length;if(Wl(U)){var ki=Ol(U);zn=ki.length}if(Ue>=zn)return U;var ji=Ue-ks(At);if(ji<1)return At;var br=ki?ed(ki,0,ji).join(""):U.slice(0,ji);if(yn===e)return br+At;if(ki&&(ji+=br.length-ji),S_(yn)){if(U.slice(ji).search(yn)){var io,uo=br;for(yn.global||(yn=cc(yn.source,Bc(rr.exec(yn))+"g")),yn.lastIndex=0;io=yn.exec(uo);)var Co=io.index;br=br.slice(0,Co===e?ji:Co)}}else if(U.indexOf(Bd(yn),ji)!=ji){var pa=br.lastIndexOf(yn);pa>-1&&(br=br.slice(0,pa))}return br+At},En.unescape=function OC(U){return(U=Bc(U))&&ct.test(U)?U.replace(mr,Yc):U},En.uniqueId=function Zy(U){var J=++Cd;return Bc(U)+J},En.upperCase=zy,En.upperFirst=Ag,En.each=_d,En.eachRight=xh,En.first=Ch,hf(En,function(){var U={};return dl(En,function(J,Ue){qs.call(En.prototype,Ue)||(U[Ue]=J)}),U}(),{chain:!1}),En.VERSION="4.17.21",Rt(["bind","bindKey","curry","curryRight","partial","partialRight"],function(U){En[U].placeholder=En}),Rt(["drop","take"],function(U,J){cs.prototype[U]=function(Ue){Ue=Ue===e?1:Xe(Kl(Ue),0);var At=this.__filtered__&&!J?new cs(this):this.clone();return At.__filtered__?At.__takeCount__=zt(Ue,At.__takeCount__):At.__views__.push({size:zt(Ue,mt),type:U+(At.__dir__<0?"Right":"")}),At},cs.prototype[U+"Right"]=function(Ue){return this.reverse()[U](Ue).reverse()}}),Rt(["filter","map","takeWhile"],function(U,J){var Ue=J+1,At=Ue==le||3==Ue;cs.prototype[U]=function(yn){var zn=this.clone();return zn.__iteratees__.push({iteratee:Ja(yn,3),type:Ue}),zn.__filtered__=zn.__filtered__||At,zn}}),Rt(["head","last"],function(U,J){var Ue="take"+(J?"Right":"");cs.prototype[U]=function(){return this[Ue](1).value()[0]}}),Rt(["initial","tail"],function(U,J){var Ue="drop"+(J?"":"Right");cs.prototype[U]=function(){return this.__filtered__?new cs(this):this[Ue](1)}}),cs.prototype.compact=function(){return this.filter(ru)},cs.prototype.find=function(U){return this.filter(U).head()},cs.prototype.findLast=function(U){return this.reverse().find(U)},cs.prototype.invokeMap=ds(function(U,J){return"function"==typeof U?new cs(this):this.map(function(Ue){return pu(Ue,U,J)})}),cs.prototype.reject=function(U){return this.filter(Q(Ja(U)))},cs.prototype.slice=function(U,J){U=Kl(U);var Ue=this;return Ue.__filtered__&&(U>0||J<0)?new cs(Ue):(U<0?Ue=Ue.takeRight(-U):U&&(Ue=Ue.drop(U)),J!==e&&(Ue=(J=Kl(J))<0?Ue.dropRight(-J):Ue.take(J-U)),Ue)},cs.prototype.takeRightWhile=function(U){return this.reverse().takeWhile(U).reverse()},cs.prototype.toArray=function(){return this.take(mt)},dl(cs.prototype,function(U,J){var Ue=/^(?:filter|find|map|reject)|While$/.test(J),At=/^(?:head|last)$/.test(J),yn=En[At?"take"+("last"==J?"Right":""):J],zn=At||/^find/.test(J);yn&&(En.prototype[J]=function(){var ki=this.__wrapped__,ji=At?[1]:arguments,br=ki instanceof cs,io=ji[0],uo=br||js(ki),Co=function(Bs){var Ys=yn.apply(En,qr([Bs],ji));return At&&pa?Ys[0]:Ys};uo&&Ue&&"function"==typeof io&&1!=io.length&&(br=uo=!1);var pa=this.__chain__,Ea=!!this.__actions__.length,xs=zn&&!pa,El=br&&!Ea;if(!zn&&uo){ki=El?ki:new cs(this);var fs=U.apply(ki,ji);return fs.__actions__.push({func:Gc,args:[Co],thisArg:e}),new kc(fs,pa)}return xs&&El?U.apply(this,ji):(fs=this.thru(Co),xs?At?fs.value()[0]:fs.value():fs)})}),Rt(["pop","push","shift","sort","splice","unshift"],function(U){var J=Hc[U],Ue=/^(?:push|sort|unshift)$/.test(U)?"tap":"thru",At=/^(?:pop|shift)$/.test(U);En.prototype[U]=function(){var yn=arguments;if(At&&!this.__chain__){var zn=this.value();return J.apply(js(zn)?zn:[],yn)}return this[Ue](function(ki){return J.apply(js(ki)?ki:[],yn)})}}),dl(cs.prototype,function(U,J){var Ue=En[J];if(Ue){var At=Ue.name+"";qs.call(Zd,At)||(Zd[At]=[]),Zd[At].push({name:J,func:Ue})}}),Zd[xd(e,X).name]=[{name:"wrapper",func:e}],cs.prototype.clone=function wu(){var U=new cs(this.__wrapped__);return U.__actions__=cm(this.__actions__),U.__dir__=this.__dir__,U.__filtered__=this.__filtered__,U.__iteratees__=cm(this.__iteratees__),U.__takeCount__=this.__takeCount__,U.__views__=cm(this.__views__),U},cs.prototype.reverse=function Iu(){if(this.__filtered__){var U=new cs(this);U.__dir__=-1,U.__filtered__=!0}else(U=this.clone()).__dir__*=-1;return U},cs.prototype.value=function sd(){var U=this.__wrapped__.value(),J=this.__dir__,Ue=js(U),At=J<0,yn=Ue?U.length:0,zn=function T_(U,J,Ue){for(var At=-1,yn=Ue.length;++At<yn;){var zn=Ue[At],ki=zn.size;switch(zn.type){case"drop":U+=ki;break;case"dropRight":J-=ki;break;case"take":J=zt(J,U+ki);break;case"takeRight":U=Xe(U,J-ki)}}return{start:U,end:J}}(0,yn,this.__views__),ki=zn.start,ji=zn.end,br=ji-ki,io=At?ji:ki-1,uo=this.__iteratees__,Co=uo.length,pa=0,Ea=zt(br,this.__takeCount__);if(!Ue||!At&&yn==br&&Ea==br)return dd(U,this.__actions__);var xs=[];e:for(;br--&&pa<Ea;){for(var El=-1,fs=U[io+=J];++El<Co;){var Bs=uo[El],Ys=Bs.iteratee,ou=Bs.type,au=Ys(fs);if(ou==Z)fs=au;else if(!au){if(ou==le)continue e;break e}}xs[pa++]=fs}return xs},En.prototype.at=gu,En.prototype.chain=function Ad(){return Af(this)},En.prototype.commit=function $s(){return new kc(this.value(),this.__chain__)},En.prototype.next=function $h(){this.__values__===e&&(this.__values__=v0(this.value()));var U=this.__index__>=this.__values__.length;return{done:U,value:U?e:this.__values__[this.__index__++]}},En.prototype.plant=function Yu(U){for(var J,Ue=this;Ue instanceof Au;){var At=pl(Ue);At.__index__=0,At.__values__=e,J?yn.__wrapped__=At:J=At;var yn=At;Ue=Ue.__wrapped__}return yn.__wrapped__=U,J},En.prototype.reverse=function Xp(){var U=this.__wrapped__;if(U instanceof cs){var J=U;return this.__actions__.length&&(J=new cs(this)),(J=J.reverse()).__actions__.push({func:Gc,args:[Eh],thisArg:e}),new kc(J,this.__chain__)}return this.thru(Eh)},En.prototype.toJSON=En.prototype.valueOf=En.prototype.value=function Th(){return dd(this.__wrapped__,this.__actions__)},En.prototype.first=En.prototype.head,_a&&(En.prototype[_a]=function av(){return this}),En}();tn._=Oc,(o=function(){return Oc}.call(I,p,I,qe))!==e&&(qe.exports=o)}.call(this)},27088:function(qe,I,p){!function(o){"use strict";o.defineLocale("af",{months:"Januarie_Februarie_Maart_April_Mei_Junie_Julie_Augustus_September_Oktober_November_Desember".split("_"),monthsShort:"Jan_Feb_Mrt_Apr_Mei_Jun_Jul_Aug_Sep_Okt_Nov_Des".split("_"),weekdays:"Sondag_Maandag_Dinsdag_Woensdag_Donderdag_Vrydag_Saterdag".split("_"),weekdaysShort:"Son_Maa_Din_Woe_Don_Vry_Sat".split("_"),weekdaysMin:"So_Ma_Di_Wo_Do_Vr_Sa".split("_"),meridiemParse:/vm|nm/i,isPM:function(l){return/^nm$/i.test(l)},meridiem:function(l,D,g){return l<12?g?"vm":"VM":g?"nm":"NM"},longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Vandag om] LT",nextDay:"[M\xf4re om] LT",nextWeek:"dddd [om] LT",lastDay:"[Gister om] LT",lastWeek:"[Laas] dddd [om] LT",sameElse:"L"},relativeTime:{future:"oor %s",past:"%s gelede",s:"'n paar sekondes",ss:"%d sekondes",m:"'n minuut",mm:"%d minute",h:"'n uur",hh:"%d ure",d:"'n dag",dd:"%d dae",M:"'n maand",MM:"%d maande",y:"'n jaar",yy:"%d jaar"},dayOfMonthOrdinalParse:/\d{1,2}(ste|de)/,ordinal:function(l){return l+(1===l||8===l||l>=20?"ste":"de")},week:{dow:1,doy:4}})}(p(15439))},52502:function(qe,I,p){!function(o){"use strict";var e=function(T){return 0===T?0:1===T?1:2===T?2:T%100>=3&&T%100<=10?3:T%100>=11?4:5},l={s:["\u0623\u0642\u0644 \u0645\u0646 \u062b\u0627\u0646\u064a\u0629","\u062b\u0627\u0646\u064a\u0629 \u0648\u0627\u062d\u062f\u0629",["\u062b\u0627\u0646\u064a\u062a\u0627\u0646","\u062b\u0627\u0646\u064a\u062a\u064a\u0646"],"%d \u062b\u0648\u0627\u0646","%d \u062b\u0627\u0646\u064a\u0629","%d \u062b\u0627\u0646\u064a\u0629"],m:["\u0623\u0642\u0644 \u0645\u0646 \u062f\u0642\u064a\u0642\u0629","\u062f\u0642\u064a\u0642\u0629 \u0648\u0627\u062d\u062f\u0629",["\u062f\u0642\u064a\u0642\u062a\u0627\u0646","\u062f\u0642\u064a\u0642\u062a\u064a\u0646"],"%d \u062f\u0642\u0627\u0626\u0642","%d \u062f\u0642\u064a\u0642\u0629","%d \u062f\u0642\u064a\u0642\u0629"],h:["\u0623\u0642\u0644 \u0645\u0646 \u0633\u0627\u0639\u0629","\u0633\u0627\u0639\u0629 \u0648\u0627\u062d\u062f\u0629",["\u0633\u0627\u0639\u062a\u0627\u0646","\u0633\u0627\u0639\u062a\u064a\u0646"],"%d \u0633\u0627\u0639\u0627\u062a","%d \u0633\u0627\u0639\u0629","%d \u0633\u0627\u0639\u0629"],d:["\u0623\u0642\u0644 \u0645\u0646 \u064a\u0648\u0645","\u064a\u0648\u0645 \u0648\u0627\u062d\u062f",["\u064a\u0648\u0645\u0627\u0646","\u064a\u0648\u0645\u064a\u0646"],"%d \u0623\u064a\u0627\u0645","%d \u064a\u0648\u0645\u064b\u0627","%d \u064a\u0648\u0645"],M:["\u0623\u0642\u0644 \u0645\u0646 \u0634\u0647\u0631","\u0634\u0647\u0631 \u0648\u0627\u062d\u062f",["\u0634\u0647\u0631\u0627\u0646","\u0634\u0647\u0631\u064a\u0646"],"%d \u0623\u0634\u0647\u0631","%d \u0634\u0647\u0631\u0627","%d \u0634\u0647\u0631"],y:["\u0623\u0642\u0644 \u0645\u0646 \u0639\u0627\u0645","\u0639\u0627\u0645 \u0648\u0627\u062d\u062f",["\u0639\u0627\u0645\u0627\u0646","\u0639\u0627\u0645\u064a\u0646"],"%d \u0623\u0639\u0648\u0627\u0645","%d \u0639\u0627\u0645\u064b\u0627","%d \u0639\u0627\u0645"]},D=function(T){return function(n,P,w,B){var Y=e(n),V=l[T][e(n)];return 2===Y&&(V=V[P?0:1]),V.replace(/%d/i,n)}},g=["\u062c\u0627\u0646\u0641\u064a","\u0641\u064a\u0641\u0631\u064a","\u0645\u0627\u0631\u0633","\u0623\u0641\u0631\u064a\u0644","\u0645\u0627\u064a","\u062c\u0648\u0627\u0646","\u062c\u0648\u064a\u0644\u064a\u0629","\u0623\u0648\u062a","\u0633\u0628\u062a\u0645\u0628\u0631","\u0623\u0643\u062a\u0648\u0628\u0631","\u0646\u0648\u0641\u0645\u0628\u0631","\u062f\u064a\u0633\u0645\u0628\u0631"];o.defineLocale("ar-dz",{months:g,monthsShort:g,weekdays:"\u0627\u0644\u0623\u062d\u062f_\u0627\u0644\u0625\u062b\u0646\u064a\u0646_\u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621_\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621_\u0627\u0644\u062e\u0645\u064a\u0633_\u0627\u0644\u062c\u0645\u0639\u0629_\u0627\u0644\u0633\u0628\u062a".split("_"),weekdaysShort:"\u0623\u062d\u062f_\u0625\u062b\u0646\u064a\u0646_\u062b\u0644\u0627\u062b\u0627\u0621_\u0623\u0631\u0628\u0639\u0627\u0621_\u062e\u0645\u064a\u0633_\u062c\u0645\u0639\u0629_\u0633\u0628\u062a".split("_"),weekdaysMin:"\u062d_\u0646_\u062b_\u0631_\u062e_\u062c_\u0633".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"D/\u200fM/\u200fYYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},meridiemParse:/\u0635|\u0645/,isPM:function(T){return"\u0645"===T},meridiem:function(T,n,P){return T<12?"\u0635":"\u0645"},calendar:{sameDay:"[\u0627\u0644\u064a\u0648\u0645 \u0639\u0646\u062f \u0627\u0644\u0633\u0627\u0639\u0629] LT",nextDay:"[\u063a\u062f\u064b\u0627 \u0639\u0646\u062f \u0627\u0644\u0633\u0627\u0639\u0629] LT",nextWeek:"dddd [\u0639\u0646\u062f \u0627\u0644\u0633\u0627\u0639\u0629] LT",lastDay:"[\u0623\u0645\u0633 \u0639\u0646\u062f \u0627\u0644\u0633\u0627\u0639\u0629] LT",lastWeek:"dddd [\u0639\u0646\u062f \u0627\u0644\u0633\u0627\u0639\u0629] LT",sameElse:"L"},relativeTime:{future:"\u0628\u0639\u062f %s",past:"\u0645\u0646\u0630 %s",s:D("s"),ss:D("s"),m:D("m"),mm:D("m"),h:D("h"),hh:D("h"),d:D("d"),dd:D("d"),M:D("M"),MM:D("M"),y:D("y"),yy:D("y")},postformat:function(T){return T.replace(/,/g,"\u060c")},week:{dow:0,doy:4}})}(p(15439))},30128:function(qe,I,p){!function(o){"use strict";o.defineLocale("ar-kw",{months:"\u064a\u0646\u0627\u064a\u0631_\u0641\u0628\u0631\u0627\u064a\u0631_\u0645\u0627\u0631\u0633_\u0623\u0628\u0631\u064a\u0644_\u0645\u0627\u064a_\u064a\u0648\u0646\u064a\u0648_\u064a\u0648\u0644\u064a\u0648\u0632_\u063a\u0634\u062a_\u0634\u062a\u0646\u0628\u0631_\u0623\u0643\u062a\u0648\u0628\u0631_\u0646\u0648\u0646\u0628\u0631_\u062f\u062c\u0646\u0628\u0631".split("_"),monthsShort:"\u064a\u0646\u0627\u064a\u0631_\u0641\u0628\u0631\u0627\u064a\u0631_\u0645\u0627\u0631\u0633_\u0623\u0628\u0631\u064a\u0644_\u0645\u0627\u064a_\u064a\u0648\u0646\u064a\u0648_\u064a\u0648\u0644\u064a\u0648\u0632_\u063a\u0634\u062a_\u0634\u062a\u0646\u0628\u0631_\u0623\u0643\u062a\u0648\u0628\u0631_\u0646\u0648\u0646\u0628\u0631_\u062f\u062c\u0646\u0628\u0631".split("_"),weekdays:"\u0627\u0644\u0623\u062d\u062f_\u0627\u0644\u0625\u062a\u0646\u064a\u0646_\u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621_\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621_\u0627\u0644\u062e\u0645\u064a\u0633_\u0627\u0644\u062c\u0645\u0639\u0629_\u0627\u0644\u0633\u0628\u062a".split("_"),weekdaysShort:"\u0627\u062d\u062f_\u0627\u062a\u0646\u064a\u0646_\u062b\u0644\u0627\u062b\u0627\u0621_\u0627\u0631\u0628\u0639\u0627\u0621_\u062e\u0645\u064a\u0633_\u062c\u0645\u0639\u0629_\u0633\u0628\u062a".split("_"),weekdaysMin:"\u062d_\u0646_\u062b_\u0631_\u062e_\u062c_\u0633".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[\u0627\u0644\u064a\u0648\u0645 \u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",nextDay:"[\u063a\u062f\u0627 \u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",nextWeek:"dddd [\u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",lastDay:"[\u0623\u0645\u0633 \u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",lastWeek:"dddd [\u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",sameElse:"L"},relativeTime:{future:"\u0641\u064a %s",past:"\u0645\u0646\u0630 %s",s:"\u062b\u0648\u0627\u0646",ss:"%d \u062b\u0627\u0646\u064a\u0629",m:"\u062f\u0642\u064a\u0642\u0629",mm:"%d \u062f\u0642\u0627\u0626\u0642",h:"\u0633\u0627\u0639\u0629",hh:"%d \u0633\u0627\u0639\u0627\u062a",d:"\u064a\u0648\u0645",dd:"%d \u0623\u064a\u0627\u0645",M:"\u0634\u0647\u0631",MM:"%d \u0623\u0634\u0647\u0631",y:"\u0633\u0646\u0629",yy:"%d \u0633\u0646\u0648\u0627\u062a"},week:{dow:0,doy:12}})}(p(15439))},84519:function(qe,I,p){!function(o){"use strict";var e={1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",0:"0"},l=function(n){return 0===n?0:1===n?1:2===n?2:n%100>=3&&n%100<=10?3:n%100>=11?4:5},D={s:["\u0623\u0642\u0644 \u0645\u0646 \u062b\u0627\u0646\u064a\u0629","\u062b\u0627\u0646\u064a\u0629 \u0648\u0627\u062d\u062f\u0629",["\u062b\u0627\u0646\u064a\u062a\u0627\u0646","\u062b\u0627\u0646\u064a\u062a\u064a\u0646"],"%d \u062b\u0648\u0627\u0646","%d \u062b\u0627\u0646\u064a\u0629","%d \u062b\u0627\u0646\u064a\u0629"],m:["\u0623\u0642\u0644 \u0645\u0646 \u062f\u0642\u064a\u0642\u0629","\u062f\u0642\u064a\u0642\u0629 \u0648\u0627\u062d\u062f\u0629",["\u062f\u0642\u064a\u0642\u062a\u0627\u0646","\u062f\u0642\u064a\u0642\u062a\u064a\u0646"],"%d \u062f\u0642\u0627\u0626\u0642","%d \u062f\u0642\u064a\u0642\u0629","%d \u062f\u0642\u064a\u0642\u0629"],h:["\u0623\u0642\u0644 \u0645\u0646 \u0633\u0627\u0639\u0629","\u0633\u0627\u0639\u0629 \u0648\u0627\u062d\u062f\u0629",["\u0633\u0627\u0639\u062a\u0627\u0646","\u0633\u0627\u0639\u062a\u064a\u0646"],"%d \u0633\u0627\u0639\u0627\u062a","%d \u0633\u0627\u0639\u0629","%d \u0633\u0627\u0639\u0629"],d:["\u0623\u0642\u0644 \u0645\u0646 \u064a\u0648\u0645","\u064a\u0648\u0645 \u0648\u0627\u062d\u062f",["\u064a\u0648\u0645\u0627\u0646","\u064a\u0648\u0645\u064a\u0646"],"%d \u0623\u064a\u0627\u0645","%d \u064a\u0648\u0645\u064b\u0627","%d \u064a\u0648\u0645"],M:["\u0623\u0642\u0644 \u0645\u0646 \u0634\u0647\u0631","\u0634\u0647\u0631 \u0648\u0627\u062d\u062f",["\u0634\u0647\u0631\u0627\u0646","\u0634\u0647\u0631\u064a\u0646"],"%d \u0623\u0634\u0647\u0631","%d \u0634\u0647\u0631\u0627","%d \u0634\u0647\u0631"],y:["\u0623\u0642\u0644 \u0645\u0646 \u0639\u0627\u0645","\u0639\u0627\u0645 \u0648\u0627\u062d\u062f",["\u0639\u0627\u0645\u0627\u0646","\u0639\u0627\u0645\u064a\u0646"],"%d \u0623\u0639\u0648\u0627\u0645","%d \u0639\u0627\u0645\u064b\u0627","%d \u0639\u0627\u0645"]},g=function(n){return function(P,w,B,Y){var V=l(P),ue=D[n][l(P)];return 2===V&&(ue=ue[w?0:1]),ue.replace(/%d/i,P)}},E=["\u064a\u0646\u0627\u064a\u0631","\u0641\u0628\u0631\u0627\u064a\u0631","\u0645\u0627\u0631\u0633","\u0623\u0628\u0631\u064a\u0644","\u0645\u0627\u064a\u0648","\u064a\u0648\u0646\u064a\u0648","\u064a\u0648\u0644\u064a\u0648","\u0623\u063a\u0633\u0637\u0633","\u0633\u0628\u062a\u0645\u0628\u0631","\u0623\u0643\u062a\u0648\u0628\u0631","\u0646\u0648\u0641\u0645\u0628\u0631","\u062f\u064a\u0633\u0645\u0628\u0631"];o.defineLocale("ar-ly",{months:E,monthsShort:E,weekdays:"\u0627\u0644\u0623\u062d\u062f_\u0627\u0644\u0625\u062b\u0646\u064a\u0646_\u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621_\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621_\u0627\u0644\u062e\u0645\u064a\u0633_\u0627\u0644\u062c\u0645\u0639\u0629_\u0627\u0644\u0633\u0628\u062a".split("_"),weekdaysShort:"\u0623\u062d\u062f_\u0625\u062b\u0646\u064a\u0646_\u062b\u0644\u0627\u062b\u0627\u0621_\u0623\u0631\u0628\u0639\u0627\u0621_\u062e\u0645\u064a\u0633_\u062c\u0645\u0639\u0629_\u0633\u0628\u062a".split("_"),weekdaysMin:"\u062d_\u0646_\u062b_\u0631_\u062e_\u062c_\u0633".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"D/\u200fM/\u200fYYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},meridiemParse:/\u0635|\u0645/,isPM:function(n){return"\u0645"===n},meridiem:function(n,P,w){return n<12?"\u0635":"\u0645"},calendar:{sameDay:"[\u0627\u0644\u064a\u0648\u0645 \u0639\u0646\u062f \u0627\u0644\u0633\u0627\u0639\u0629] LT",nextDay:"[\u063a\u062f\u064b\u0627 \u0639\u0646\u062f \u0627\u0644\u0633\u0627\u0639\u0629] LT",nextWeek:"dddd [\u0639\u0646\u062f \u0627\u0644\u0633\u0627\u0639\u0629] LT",lastDay:"[\u0623\u0645\u0633 \u0639\u0646\u062f \u0627\u0644\u0633\u0627\u0639\u0629] LT",lastWeek:"dddd [\u0639\u0646\u062f \u0627\u0644\u0633\u0627\u0639\u0629] LT",sameElse:"L"},relativeTime:{future:"\u0628\u0639\u062f %s",past:"\u0645\u0646\u0630 %s",s:g("s"),ss:g("s"),m:g("m"),mm:g("m"),h:g("h"),hh:g("h"),d:g("d"),dd:g("d"),M:g("M"),MM:g("M"),y:g("y"),yy:g("y")},preparse:function(n){return n.replace(/\u060c/g,",")},postformat:function(n){return n.replace(/\d/g,function(P){return e[P]}).replace(/,/g,"\u060c")},week:{dow:6,doy:12}})}(p(15439))},65443:function(qe,I,p){!function(o){"use strict";o.defineLocale("ar-ma",{months:"\u064a\u0646\u0627\u064a\u0631_\u0641\u0628\u0631\u0627\u064a\u0631_\u0645\u0627\u0631\u0633_\u0623\u0628\u0631\u064a\u0644_\u0645\u0627\u064a_\u064a\u0648\u0646\u064a\u0648_\u064a\u0648\u0644\u064a\u0648\u0632_\u063a\u0634\u062a_\u0634\u062a\u0646\u0628\u0631_\u0623\u0643\u062a\u0648\u0628\u0631_\u0646\u0648\u0646\u0628\u0631_\u062f\u062c\u0646\u0628\u0631".split("_"),monthsShort:"\u064a\u0646\u0627\u064a\u0631_\u0641\u0628\u0631\u0627\u064a\u0631_\u0645\u0627\u0631\u0633_\u0623\u0628\u0631\u064a\u0644_\u0645\u0627\u064a_\u064a\u0648\u0646\u064a\u0648_\u064a\u0648\u0644\u064a\u0648\u0632_\u063a\u0634\u062a_\u0634\u062a\u0646\u0628\u0631_\u0623\u0643\u062a\u0648\u0628\u0631_\u0646\u0648\u0646\u0628\u0631_\u062f\u062c\u0646\u0628\u0631".split("_"),weekdays:"\u0627\u0644\u0623\u062d\u062f_\u0627\u0644\u0625\u062b\u0646\u064a\u0646_\u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621_\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621_\u0627\u0644\u062e\u0645\u064a\u0633_\u0627\u0644\u062c\u0645\u0639\u0629_\u0627\u0644\u0633\u0628\u062a".split("_"),weekdaysShort:"\u0627\u062d\u062f_\u0627\u062b\u0646\u064a\u0646_\u062b\u0644\u0627\u062b\u0627\u0621_\u0627\u0631\u0628\u0639\u0627\u0621_\u062e\u0645\u064a\u0633_\u062c\u0645\u0639\u0629_\u0633\u0628\u062a".split("_"),weekdaysMin:"\u062d_\u0646_\u062b_\u0631_\u062e_\u062c_\u0633".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[\u0627\u0644\u064a\u0648\u0645 \u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",nextDay:"[\u063a\u062f\u0627 \u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",nextWeek:"dddd [\u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",lastDay:"[\u0623\u0645\u0633 \u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",lastWeek:"dddd [\u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",sameElse:"L"},relativeTime:{future:"\u0641\u064a %s",past:"\u0645\u0646\u0630 %s",s:"\u062b\u0648\u0627\u0646",ss:"%d \u062b\u0627\u0646\u064a\u0629",m:"\u062f\u0642\u064a\u0642\u0629",mm:"%d \u062f\u0642\u0627\u0626\u0642",h:"\u0633\u0627\u0639\u0629",hh:"%d \u0633\u0627\u0639\u0627\u062a",d:"\u064a\u0648\u0645",dd:"%d \u0623\u064a\u0627\u0645",M:"\u0634\u0647\u0631",MM:"%d \u0623\u0634\u0647\u0631",y:"\u0633\u0646\u0629",yy:"%d \u0633\u0646\u0648\u0627\u062a"},week:{dow:1,doy:4}})}(p(15439))},14523:function(qe,I,p){!function(o){"use strict";var e={1:"\u0661",2:"\u0662",3:"\u0663",4:"\u0664",5:"\u0665",6:"\u0666",7:"\u0667",8:"\u0668",9:"\u0669",0:"\u0660"},l={"\u0661":"1","\u0662":"2","\u0663":"3","\u0664":"4","\u0665":"5","\u0666":"6","\u0667":"7","\u0668":"8","\u0669":"9","\u0660":"0"};o.defineLocale("ar-ps",{months:"\u0643\u0627\u0646\u0648\u0646 \u0627\u0644\u062b\u0627\u0646\u064a_\u0634\u0628\u0627\u0637_\u0622\u0630\u0627\u0631_\u0646\u064a\u0633\u0627\u0646_\u0623\u064a\u0651\u0627\u0631_\u062d\u0632\u064a\u0631\u0627\u0646_\u062a\u0645\u0651\u0648\u0632_\u0622\u0628_\u0623\u064a\u0644\u0648\u0644_\u062a\u0634\u0631\u064a \u0627\u0644\u0623\u0648\u0651\u0644_\u062a\u0634\u0631\u064a\u0646 \u0627\u0644\u062b\u0627\u0646\u064a_\u0643\u0627\u0646\u0648\u0646 \u0627\u0644\u0623\u0648\u0651\u0644".split("_"),monthsShort:"\u0643\u0662_\u0634\u0628\u0627\u0637_\u0622\u0630\u0627\u0631_\u0646\u064a\u0633\u0627\u0646_\u0623\u064a\u0651\u0627\u0631_\u062d\u0632\u064a\u0631\u0627\u0646_\u062a\u0645\u0651\u0648\u0632_\u0622\u0628_\u0623\u064a\u0644\u0648\u0644_\u062a\u0661_\u062a\u0662_\u0643\u0661".split("_"),weekdays:"\u0627\u0644\u0623\u062d\u062f_\u0627\u0644\u0625\u062b\u0646\u064a\u0646_\u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621_\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621_\u0627\u0644\u062e\u0645\u064a\u0633_\u0627\u0644\u062c\u0645\u0639\u0629_\u0627\u0644\u0633\u0628\u062a".split("_"),weekdaysShort:"\u0623\u062d\u062f_\u0625\u062b\u0646\u064a\u0646_\u062b\u0644\u0627\u062b\u0627\u0621_\u0623\u0631\u0628\u0639\u0627\u0621_\u062e\u0645\u064a\u0633_\u062c\u0645\u0639\u0629_\u0633\u0628\u062a".split("_"),weekdaysMin:"\u062d_\u0646_\u062b_\u0631_\u062e_\u062c_\u0633".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},meridiemParse:/\u0635|\u0645/,isPM:function(g){return"\u0645"===g},meridiem:function(g,E,T){return g<12?"\u0635":"\u0645"},calendar:{sameDay:"[\u0627\u0644\u064a\u0648\u0645 \u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",nextDay:"[\u063a\u062f\u0627 \u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",nextWeek:"dddd [\u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",lastDay:"[\u0623\u0645\u0633 \u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",lastWeek:"dddd [\u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",sameElse:"L"},relativeTime:{future:"\u0641\u064a %s",past:"\u0645\u0646\u0630 %s",s:"\u062b\u0648\u0627\u0646",ss:"%d \u062b\u0627\u0646\u064a\u0629",m:"\u062f\u0642\u064a\u0642\u0629",mm:"%d \u062f\u0642\u0627\u0626\u0642",h:"\u0633\u0627\u0639\u0629",hh:"%d \u0633\u0627\u0639\u0627\u062a",d:"\u064a\u0648\u0645",dd:"%d \u0623\u064a\u0627\u0645",M:"\u0634\u0647\u0631",MM:"%d \u0623\u0634\u0647\u0631",y:"\u0633\u0646\u0629",yy:"%d \u0633\u0646\u0648\u0627\u062a"},preparse:function(g){return g.replace(/[\u0663\u0664\u0665\u0666\u0667\u0668\u0669\u0660]/g,function(E){return l[E]}).split("").reverse().join("").replace(/[\u0661\u0662](?![\u062a\u0643])/g,function(E){return l[E]}).split("").reverse().join("").replace(/\u060c/g,",")},postformat:function(g){return g.replace(/\d/g,function(E){return e[E]}).replace(/,/g,"\u060c")},week:{dow:0,doy:6}})}(p(15439))},17642:function(qe,I,p){!function(o){"use strict";var e={1:"\u0661",2:"\u0662",3:"\u0663",4:"\u0664",5:"\u0665",6:"\u0666",7:"\u0667",8:"\u0668",9:"\u0669",0:"\u0660"},l={"\u0661":"1","\u0662":"2","\u0663":"3","\u0664":"4","\u0665":"5","\u0666":"6","\u0667":"7","\u0668":"8","\u0669":"9","\u0660":"0"};o.defineLocale("ar-sa",{months:"\u064a\u0646\u0627\u064a\u0631_\u0641\u0628\u0631\u0627\u064a\u0631_\u0645\u0627\u0631\u0633_\u0623\u0628\u0631\u064a\u0644_\u0645\u0627\u064a\u0648_\u064a\u0648\u0646\u064a\u0648_\u064a\u0648\u0644\u064a\u0648_\u0623\u063a\u0633\u0637\u0633_\u0633\u0628\u062a\u0645\u0628\u0631_\u0623\u0643\u062a\u0648\u0628\u0631_\u0646\u0648\u0641\u0645\u0628\u0631_\u062f\u064a\u0633\u0645\u0628\u0631".split("_"),monthsShort:"\u064a\u0646\u0627\u064a\u0631_\u0641\u0628\u0631\u0627\u064a\u0631_\u0645\u0627\u0631\u0633_\u0623\u0628\u0631\u064a\u0644_\u0645\u0627\u064a\u0648_\u064a\u0648\u0646\u064a\u0648_\u064a\u0648\u0644\u064a\u0648_\u0623\u063a\u0633\u0637\u0633_\u0633\u0628\u062a\u0645\u0628\u0631_\u0623\u0643\u062a\u0648\u0628\u0631_\u0646\u0648\u0641\u0645\u0628\u0631_\u062f\u064a\u0633\u0645\u0628\u0631".split("_"),weekdays:"\u0627\u0644\u0623\u062d\u062f_\u0627\u0644\u0625\u062b\u0646\u064a\u0646_\u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621_\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621_\u0627\u0644\u062e\u0645\u064a\u0633_\u0627\u0644\u062c\u0645\u0639\u0629_\u0627\u0644\u0633\u0628\u062a".split("_"),weekdaysShort:"\u0623\u062d\u062f_\u0625\u062b\u0646\u064a\u0646_\u062b\u0644\u0627\u062b\u0627\u0621_\u0623\u0631\u0628\u0639\u0627\u0621_\u062e\u0645\u064a\u0633_\u062c\u0645\u0639\u0629_\u0633\u0628\u062a".split("_"),weekdaysMin:"\u062d_\u0646_\u062b_\u0631_\u062e_\u062c_\u0633".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},meridiemParse:/\u0635|\u0645/,isPM:function(g){return"\u0645"===g},meridiem:function(g,E,T){return g<12?"\u0635":"\u0645"},calendar:{sameDay:"[\u0627\u0644\u064a\u0648\u0645 \u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",nextDay:"[\u063a\u062f\u0627 \u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",nextWeek:"dddd [\u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",lastDay:"[\u0623\u0645\u0633 \u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",lastWeek:"dddd [\u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",sameElse:"L"},relativeTime:{future:"\u0641\u064a %s",past:"\u0645\u0646\u0630 %s",s:"\u062b\u0648\u0627\u0646",ss:"%d \u062b\u0627\u0646\u064a\u0629",m:"\u062f\u0642\u064a\u0642\u0629",mm:"%d \u062f\u0642\u0627\u0626\u0642",h:"\u0633\u0627\u0639\u0629",hh:"%d \u0633\u0627\u0639\u0627\u062a",d:"\u064a\u0648\u0645",dd:"%d \u0623\u064a\u0627\u0645",M:"\u0634\u0647\u0631",MM:"%d \u0623\u0634\u0647\u0631",y:"\u0633\u0646\u0629",yy:"%d \u0633\u0646\u0648\u0627\u062a"},preparse:function(g){return g.replace(/[\u0661\u0662\u0663\u0664\u0665\u0666\u0667\u0668\u0669\u0660]/g,function(E){return l[E]}).replace(/\u060c/g,",")},postformat:function(g){return g.replace(/\d/g,function(E){return e[E]}).replace(/,/g,"\u060c")},week:{dow:0,doy:6}})}(p(15439))},68592:function(qe,I,p){!function(o){"use strict";o.defineLocale("ar-tn",{months:"\u062c\u0627\u0646\u0641\u064a_\u0641\u064a\u0641\u0631\u064a_\u0645\u0627\u0631\u0633_\u0623\u0641\u0631\u064a\u0644_\u0645\u0627\u064a_\u062c\u0648\u0627\u0646_\u062c\u0648\u064a\u0644\u064a\u0629_\u0623\u0648\u062a_\u0633\u0628\u062a\u0645\u0628\u0631_\u0623\u0643\u062a\u0648\u0628\u0631_\u0646\u0648\u0641\u0645\u0628\u0631_\u062f\u064a\u0633\u0645\u0628\u0631".split("_"),monthsShort:"\u062c\u0627\u0646\u0641\u064a_\u0641\u064a\u0641\u0631\u064a_\u0645\u0627\u0631\u0633_\u0623\u0641\u0631\u064a\u0644_\u0645\u0627\u064a_\u062c\u0648\u0627\u0646_\u062c\u0648\u064a\u0644\u064a\u0629_\u0623\u0648\u062a_\u0633\u0628\u062a\u0645\u0628\u0631_\u0623\u0643\u062a\u0648\u0628\u0631_\u0646\u0648\u0641\u0645\u0628\u0631_\u062f\u064a\u0633\u0645\u0628\u0631".split("_"),weekdays:"\u0627\u0644\u0623\u062d\u062f_\u0627\u0644\u0625\u062b\u0646\u064a\u0646_\u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621_\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621_\u0627\u0644\u062e\u0645\u064a\u0633_\u0627\u0644\u062c\u0645\u0639\u0629_\u0627\u0644\u0633\u0628\u062a".split("_"),weekdaysShort:"\u0623\u062d\u062f_\u0625\u062b\u0646\u064a\u0646_\u062b\u0644\u0627\u062b\u0627\u0621_\u0623\u0631\u0628\u0639\u0627\u0621_\u062e\u0645\u064a\u0633_\u062c\u0645\u0639\u0629_\u0633\u0628\u062a".split("_"),weekdaysMin:"\u062d_\u0646_\u062b_\u0631_\u062e_\u062c_\u0633".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[\u0627\u0644\u064a\u0648\u0645 \u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",nextDay:"[\u063a\u062f\u0627 \u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",nextWeek:"dddd [\u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",lastDay:"[\u0623\u0645\u0633 \u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",lastWeek:"dddd [\u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",sameElse:"L"},relativeTime:{future:"\u0641\u064a %s",past:"\u0645\u0646\u0630 %s",s:"\u062b\u0648\u0627\u0646",ss:"%d \u062b\u0627\u0646\u064a\u0629",m:"\u062f\u0642\u064a\u0642\u0629",mm:"%d \u062f\u0642\u0627\u0626\u0642",h:"\u0633\u0627\u0639\u0629",hh:"%d \u0633\u0627\u0639\u0627\u062a",d:"\u064a\u0648\u0645",dd:"%d \u0623\u064a\u0627\u0645",M:"\u0634\u0647\u0631",MM:"%d \u0623\u0634\u0647\u0631",y:"\u0633\u0646\u0629",yy:"%d \u0633\u0646\u0648\u0627\u062a"},week:{dow:1,doy:4}})}(p(15439))},17038:function(qe,I,p){!function(o){"use strict";var e={1:"\u0661",2:"\u0662",3:"\u0663",4:"\u0664",5:"\u0665",6:"\u0666",7:"\u0667",8:"\u0668",9:"\u0669",0:"\u0660"},l={"\u0661":"1","\u0662":"2","\u0663":"3","\u0664":"4","\u0665":"5","\u0666":"6","\u0667":"7","\u0668":"8","\u0669":"9","\u0660":"0"},D=function(P){return 0===P?0:1===P?1:2===P?2:P%100>=3&&P%100<=10?3:P%100>=11?4:5},g={s:["\u0623\u0642\u0644 \u0645\u0646 \u062b\u0627\u0646\u064a\u0629","\u062b\u0627\u0646\u064a\u0629 \u0648\u0627\u062d\u062f\u0629",["\u062b\u0627\u0646\u064a\u062a\u0627\u0646","\u062b\u0627\u0646\u064a\u062a\u064a\u0646"],"%d \u062b\u0648\u0627\u0646","%d \u062b\u0627\u0646\u064a\u0629","%d \u062b\u0627\u0646\u064a\u0629"],m:["\u0623\u0642\u0644 \u0645\u0646 \u062f\u0642\u064a\u0642\u0629","\u062f\u0642\u064a\u0642\u0629 \u0648\u0627\u062d\u062f\u0629",["\u062f\u0642\u064a\u0642\u062a\u0627\u0646","\u062f\u0642\u064a\u0642\u062a\u064a\u0646"],"%d \u062f\u0642\u0627\u0626\u0642","%d \u062f\u0642\u064a\u0642\u0629","%d \u062f\u0642\u064a\u0642\u0629"],h:["\u0623\u0642\u0644 \u0645\u0646 \u0633\u0627\u0639\u0629","\u0633\u0627\u0639\u0629 \u0648\u0627\u062d\u062f\u0629",["\u0633\u0627\u0639\u062a\u0627\u0646","\u0633\u0627\u0639\u062a\u064a\u0646"],"%d \u0633\u0627\u0639\u0627\u062a","%d \u0633\u0627\u0639\u0629","%d \u0633\u0627\u0639\u0629"],d:["\u0623\u0642\u0644 \u0645\u0646 \u064a\u0648\u0645","\u064a\u0648\u0645 \u0648\u0627\u062d\u062f",["\u064a\u0648\u0645\u0627\u0646","\u064a\u0648\u0645\u064a\u0646"],"%d \u0623\u064a\u0627\u0645","%d \u064a\u0648\u0645\u064b\u0627","%d \u064a\u0648\u0645"],M:["\u0623\u0642\u0644 \u0645\u0646 \u0634\u0647\u0631","\u0634\u0647\u0631 \u0648\u0627\u062d\u062f",["\u0634\u0647\u0631\u0627\u0646","\u0634\u0647\u0631\u064a\u0646"],"%d \u0623\u0634\u0647\u0631","%d \u0634\u0647\u0631\u0627","%d \u0634\u0647\u0631"],y:["\u0623\u0642\u0644 \u0645\u0646 \u0639\u0627\u0645","\u0639\u0627\u0645 \u0648\u0627\u062d\u062f",["\u0639\u0627\u0645\u0627\u0646","\u0639\u0627\u0645\u064a\u0646"],"%d \u0623\u0639\u0648\u0627\u0645","%d \u0639\u0627\u0645\u064b\u0627","%d \u0639\u0627\u0645"]},E=function(P){return function(w,B,Y,V){var ue=D(w),he=g[P][D(w)];return 2===ue&&(he=he[B?0:1]),he.replace(/%d/i,w)}},T=["\u064a\u0646\u0627\u064a\u0631","\u0641\u0628\u0631\u0627\u064a\u0631","\u0645\u0627\u0631\u0633","\u0623\u0628\u0631\u064a\u0644","\u0645\u0627\u064a\u0648","\u064a\u0648\u0646\u064a\u0648","\u064a\u0648\u0644\u064a\u0648","\u0623\u063a\u0633\u0637\u0633","\u0633\u0628\u062a\u0645\u0628\u0631","\u0623\u0643\u062a\u0648\u0628\u0631","\u0646\u0648\u0641\u0645\u0628\u0631","\u062f\u064a\u0633\u0645\u0628\u0631"];o.defineLocale("ar",{months:T,monthsShort:T,weekdays:"\u0627\u0644\u0623\u062d\u062f_\u0627\u0644\u0625\u062b\u0646\u064a\u0646_\u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621_\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621_\u0627\u0644\u062e\u0645\u064a\u0633_\u0627\u0644\u062c\u0645\u0639\u0629_\u0627\u0644\u0633\u0628\u062a".split("_"),weekdaysShort:"\u0623\u062d\u062f_\u0625\u062b\u0646\u064a\u0646_\u062b\u0644\u0627\u062b\u0627\u0621_\u0623\u0631\u0628\u0639\u0627\u0621_\u062e\u0645\u064a\u0633_\u062c\u0645\u0639\u0629_\u0633\u0628\u062a".split("_"),weekdaysMin:"\u062d_\u0646_\u062b_\u0631_\u062e_\u062c_\u0633".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"D/\u200fM/\u200fYYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},meridiemParse:/\u0635|\u0645/,isPM:function(P){return"\u0645"===P},meridiem:function(P,w,B){return P<12?"\u0635":"\u0645"},calendar:{sameDay:"[\u0627\u0644\u064a\u0648\u0645 \u0639\u0646\u062f \u0627\u0644\u0633\u0627\u0639\u0629] LT",nextDay:"[\u063a\u062f\u064b\u0627 \u0639\u0646\u062f \u0627\u0644\u0633\u0627\u0639\u0629] LT",nextWeek:"dddd [\u0639\u0646\u062f \u0627\u0644\u0633\u0627\u0639\u0629] LT",lastDay:"[\u0623\u0645\u0633 \u0639\u0646\u062f \u0627\u0644\u0633\u0627\u0639\u0629] LT",lastWeek:"dddd [\u0639\u0646\u062f \u0627\u0644\u0633\u0627\u0639\u0629] LT",sameElse:"L"},relativeTime:{future:"\u0628\u0639\u062f %s",past:"\u0645\u0646\u0630 %s",s:E("s"),ss:E("s"),m:E("m"),mm:E("m"),h:E("h"),hh:E("h"),d:E("d"),dd:E("d"),M:E("M"),MM:E("M"),y:E("y"),yy:E("y")},preparse:function(P){return P.replace(/[\u0661\u0662\u0663\u0664\u0665\u0666\u0667\u0668\u0669\u0660]/g,function(w){return l[w]}).replace(/\u060c/g,",")},postformat:function(P){return P.replace(/\d/g,function(w){return e[w]}).replace(/,/g,"\u060c")},week:{dow:6,doy:12}})}(p(15439))},51213:function(qe,I,p){!function(o){"use strict";var e={1:"-inci",5:"-inci",8:"-inci",70:"-inci",80:"-inci",2:"-nci",7:"-nci",20:"-nci",50:"-nci",3:"-\xfcnc\xfc",4:"-\xfcnc\xfc",100:"-\xfcnc\xfc",6:"-nc\u0131",9:"-uncu",10:"-uncu",30:"-uncu",60:"-\u0131nc\u0131",90:"-\u0131nc\u0131"};o.defineLocale("az",{months:"yanvar_fevral_mart_aprel_may_iyun_iyul_avqust_sentyabr_oktyabr_noyabr_dekabr".split("_"),monthsShort:"yan_fev_mar_apr_may_iyn_iyl_avq_sen_okt_noy_dek".split("_"),weekdays:"Bazar_Bazar ert\u0259si_\xc7\u0259r\u015f\u0259nb\u0259 ax\u015fam\u0131_\xc7\u0259r\u015f\u0259nb\u0259_C\xfcm\u0259 ax\u015fam\u0131_C\xfcm\u0259_\u015e\u0259nb\u0259".split("_"),weekdaysShort:"Baz_BzE_\xc7Ax_\xc7\u0259r_CAx_C\xfcm_\u015e\u0259n".split("_"),weekdaysMin:"Bz_BE_\xc7A_\xc7\u0259_CA_C\xfc_\u015e\u0259".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[bug\xfcn saat] LT",nextDay:"[sabah saat] LT",nextWeek:"[g\u0259l\u0259n h\u0259ft\u0259] dddd [saat] LT",lastDay:"[d\xfcn\u0259n] LT",lastWeek:"[ke\xe7\u0259n h\u0259ft\u0259] dddd [saat] LT",sameElse:"L"},relativeTime:{future:"%s sonra",past:"%s \u0259vv\u0259l",s:"bir ne\xe7\u0259 saniy\u0259",ss:"%d saniy\u0259",m:"bir d\u0259qiq\u0259",mm:"%d d\u0259qiq\u0259",h:"bir saat",hh:"%d saat",d:"bir g\xfcn",dd:"%d g\xfcn",M:"bir ay",MM:"%d ay",y:"bir il",yy:"%d il"},meridiemParse:/gec\u0259|s\u0259h\u0259r|g\xfcnd\xfcz|ax\u015fam/,isPM:function(D){return/^(g\xfcnd\xfcz|ax\u015fam)$/.test(D)},meridiem:function(D,g,E){return D<4?"gec\u0259":D<12?"s\u0259h\u0259r":D<17?"g\xfcnd\xfcz":"ax\u015fam"},dayOfMonthOrdinalParse:/\d{1,2}-(\u0131nc\u0131|inci|nci|\xfcnc\xfc|nc\u0131|uncu)/,ordinal:function(D){if(0===D)return D+"-\u0131nc\u0131";var g=D%10,E=D%100-g,T=D>=100?100:null;return D+(e[g]||e[E]||e[T])},week:{dow:1,doy:7}})}(p(15439))},69191:function(qe,I,p){!function(o){"use strict";function e(g,E){var T=g.split("_");return E%10==1&&E%100!=11?T[0]:E%10>=2&&E%10<=4&&(E%100<10||E%100>=20)?T[1]:T[2]}function l(g,E,T){return"m"===T?E?"\u0445\u0432\u0456\u043b\u0456\u043d\u0430":"\u0445\u0432\u0456\u043b\u0456\u043d\u0443":"h"===T?E?"\u0433\u0430\u0434\u0437\u0456\u043d\u0430":"\u0433\u0430\u0434\u0437\u0456\u043d\u0443":g+" "+e({ss:E?"\u0441\u0435\u043a\u0443\u043d\u0434\u0430_\u0441\u0435\u043a\u0443\u043d\u0434\u044b_\u0441\u0435\u043a\u0443\u043d\u0434":"\u0441\u0435\u043a\u0443\u043d\u0434\u0443_\u0441\u0435\u043a\u0443\u043d\u0434\u044b_\u0441\u0435\u043a\u0443\u043d\u0434",mm:E?"\u0445\u0432\u0456\u043b\u0456\u043d\u0430_\u0445\u0432\u0456\u043b\u0456\u043d\u044b_\u0445\u0432\u0456\u043b\u0456\u043d":"\u0445\u0432\u0456\u043b\u0456\u043d\u0443_\u0445\u0432\u0456\u043b\u0456\u043d\u044b_\u0445\u0432\u0456\u043b\u0456\u043d",hh:E?"\u0433\u0430\u0434\u0437\u0456\u043d\u0430_\u0433\u0430\u0434\u0437\u0456\u043d\u044b_\u0433\u0430\u0434\u0437\u0456\u043d":"\u0433\u0430\u0434\u0437\u0456\u043d\u0443_\u0433\u0430\u0434\u0437\u0456\u043d\u044b_\u0433\u0430\u0434\u0437\u0456\u043d",dd:"\u0434\u0437\u0435\u043d\u044c_\u0434\u043d\u0456_\u0434\u0437\u0451\u043d",MM:"\u043c\u0435\u0441\u044f\u0446_\u043c\u0435\u0441\u044f\u0446\u044b_\u043c\u0435\u0441\u044f\u0446\u0430\u045e",yy:"\u0433\u043e\u0434_\u0433\u0430\u0434\u044b_\u0433\u0430\u0434\u043e\u045e"}[T],+g)}o.defineLocale("be",{months:{format:"\u0441\u0442\u0443\u0434\u0437\u0435\u043d\u044f_\u043b\u044e\u0442\u0430\u0433\u0430_\u0441\u0430\u043a\u0430\u0432\u0456\u043a\u0430_\u043a\u0440\u0430\u0441\u0430\u0432\u0456\u043a\u0430_\u0442\u0440\u0430\u045e\u043d\u044f_\u0447\u044d\u0440\u0432\u0435\u043d\u044f_\u043b\u0456\u043f\u0435\u043d\u044f_\u0436\u043d\u0456\u045e\u043d\u044f_\u0432\u0435\u0440\u0430\u0441\u043d\u044f_\u043a\u0430\u0441\u0442\u0440\u044b\u0447\u043d\u0456\u043a\u0430_\u043b\u0456\u0441\u0442\u0430\u043f\u0430\u0434\u0430_\u0441\u043d\u0435\u0436\u043d\u044f".split("_"),standalone:"\u0441\u0442\u0443\u0434\u0437\u0435\u043d\u044c_\u043b\u044e\u0442\u044b_\u0441\u0430\u043a\u0430\u0432\u0456\u043a_\u043a\u0440\u0430\u0441\u0430\u0432\u0456\u043a_\u0442\u0440\u0430\u0432\u0435\u043d\u044c_\u0447\u044d\u0440\u0432\u0435\u043d\u044c_\u043b\u0456\u043f\u0435\u043d\u044c_\u0436\u043d\u0456\u0432\u0435\u043d\u044c_\u0432\u0435\u0440\u0430\u0441\u0435\u043d\u044c_\u043a\u0430\u0441\u0442\u0440\u044b\u0447\u043d\u0456\u043a_\u043b\u0456\u0441\u0442\u0430\u043f\u0430\u0434_\u0441\u043d\u0435\u0436\u0430\u043d\u044c".split("_")},monthsShort:"\u0441\u0442\u0443\u0434_\u043b\u044e\u0442_\u0441\u0430\u043a_\u043a\u0440\u0430\u0441_\u0442\u0440\u0430\u0432_\u0447\u044d\u0440\u0432_\u043b\u0456\u043f_\u0436\u043d\u0456\u0432_\u0432\u0435\u0440_\u043a\u0430\u0441\u0442_\u043b\u0456\u0441\u0442_\u0441\u043d\u0435\u0436".split("_"),weekdays:{format:"\u043d\u044f\u0434\u0437\u0435\u043b\u044e_\u043f\u0430\u043d\u044f\u0434\u0437\u0435\u043b\u0430\u043a_\u0430\u045e\u0442\u043e\u0440\u0430\u043a_\u0441\u0435\u0440\u0430\u0434\u0443_\u0447\u0430\u0446\u0432\u0435\u0440_\u043f\u044f\u0442\u043d\u0456\u0446\u0443_\u0441\u0443\u0431\u043e\u0442\u0443".split("_"),standalone:"\u043d\u044f\u0434\u0437\u0435\u043b\u044f_\u043f\u0430\u043d\u044f\u0434\u0437\u0435\u043b\u0430\u043a_\u0430\u045e\u0442\u043e\u0440\u0430\u043a_\u0441\u0435\u0440\u0430\u0434\u0430_\u0447\u0430\u0446\u0432\u0435\u0440_\u043f\u044f\u0442\u043d\u0456\u0446\u0430_\u0441\u0443\u0431\u043e\u0442\u0430".split("_"),isFormat:/\[ ?[\u0423\u0443\u045e] ?(?:\u043c\u0456\u043d\u0443\u043b\u0443\u044e|\u043d\u0430\u0441\u0442\u0443\u043f\u043d\u0443\u044e)? ?\] ?dddd/},weekdaysShort:"\u043d\u0434_\u043f\u043d_\u0430\u0442_\u0441\u0440_\u0447\u0446_\u043f\u0442_\u0441\u0431".split("_"),weekdaysMin:"\u043d\u0434_\u043f\u043d_\u0430\u0442_\u0441\u0440_\u0447\u0446_\u043f\u0442_\u0441\u0431".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY \u0433.",LLL:"D MMMM YYYY \u0433., HH:mm",LLLL:"dddd, D MMMM YYYY \u0433., HH:mm"},calendar:{sameDay:"[\u0421\u0451\u043d\u043d\u044f \u045e] LT",nextDay:"[\u0417\u0430\u045e\u0442\u0440\u0430 \u045e] LT",lastDay:"[\u0423\u0447\u043e\u0440\u0430 \u045e] LT",nextWeek:function(){return"[\u0423] dddd [\u045e] LT"},lastWeek:function(){switch(this.day()){case 0:case 3:case 5:case 6:return"[\u0423 \u043c\u0456\u043d\u0443\u043b\u0443\u044e] dddd [\u045e] LT";case 1:case 2:case 4:return"[\u0423 \u043c\u0456\u043d\u0443\u043b\u044b] dddd [\u045e] LT"}},sameElse:"L"},relativeTime:{future:"\u043f\u0440\u0430\u0437 %s",past:"%s \u0442\u0430\u043c\u0443",s:"\u043d\u0435\u043a\u0430\u043b\u044c\u043a\u0456 \u0441\u0435\u043a\u0443\u043d\u0434",m:l,mm:l,h:l,hh:l,d:"\u0434\u0437\u0435\u043d\u044c",dd:l,M:"\u043c\u0435\u0441\u044f\u0446",MM:l,y:"\u0433\u043e\u0434",yy:l},meridiemParse:/\u043d\u043e\u0447\u044b|\u0440\u0430\u043d\u0456\u0446\u044b|\u0434\u043d\u044f|\u0432\u0435\u0447\u0430\u0440\u0430/,isPM:function(g){return/^(\u0434\u043d\u044f|\u0432\u0435\u0447\u0430\u0440\u0430)$/.test(g)},meridiem:function(g,E,T){return g<4?"\u043d\u043e\u0447\u044b":g<12?"\u0440\u0430\u043d\u0456\u0446\u044b":g<17?"\u0434\u043d\u044f":"\u0432\u0435\u0447\u0430\u0440\u0430"},dayOfMonthOrdinalParse:/\d{1,2}-(\u0456|\u044b|\u0433\u0430)/,ordinal:function(g,E){switch(E){case"M":case"d":case"DDD":case"w":case"W":return g%10!=2&&g%10!=3||g%100==12||g%100==13?g+"-\u044b":g+"-\u0456";case"D":return g+"-\u0433\u0430";default:return g}},week:{dow:1,doy:7}})}(p(15439))},90322:function(qe,I,p){!function(o){"use strict";o.defineLocale("bg",{months:"\u044f\u043d\u0443\u0430\u0440\u0438_\u0444\u0435\u0432\u0440\u0443\u0430\u0440\u0438_\u043c\u0430\u0440\u0442_\u0430\u043f\u0440\u0438\u043b_\u043c\u0430\u0439_\u044e\u043d\u0438_\u044e\u043b\u0438_\u0430\u0432\u0433\u0443\u0441\u0442_\u0441\u0435\u043f\u0442\u0435\u043c\u0432\u0440\u0438_\u043e\u043a\u0442\u043e\u043c\u0432\u0440\u0438_\u043d\u043e\u0435\u043c\u0432\u0440\u0438_\u0434\u0435\u043a\u0435\u043c\u0432\u0440\u0438".split("_"),monthsShort:"\u044f\u043d\u0443_\u0444\u0435\u0432_\u043c\u0430\u0440_\u0430\u043f\u0440_\u043c\u0430\u0439_\u044e\u043d\u0438_\u044e\u043b\u0438_\u0430\u0432\u0433_\u0441\u0435\u043f_\u043e\u043a\u0442_\u043d\u043e\u0435_\u0434\u0435\u043a".split("_"),weekdays:"\u043d\u0435\u0434\u0435\u043b\u044f_\u043f\u043e\u043d\u0435\u0434\u0435\u043b\u043d\u0438\u043a_\u0432\u0442\u043e\u0440\u043d\u0438\u043a_\u0441\u0440\u044f\u0434\u0430_\u0447\u0435\u0442\u0432\u044a\u0440\u0442\u044a\u043a_\u043f\u0435\u0442\u044a\u043a_\u0441\u044a\u0431\u043e\u0442\u0430".split("_"),weekdaysShort:"\u043d\u0435\u0434_\u043f\u043e\u043d_\u0432\u0442\u043e_\u0441\u0440\u044f_\u0447\u0435\u0442_\u043f\u0435\u0442_\u0441\u044a\u0431".split("_"),weekdaysMin:"\u043d\u0434_\u043f\u043d_\u0432\u0442_\u0441\u0440_\u0447\u0442_\u043f\u0442_\u0441\u0431".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"D.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY H:mm",LLLL:"dddd, D MMMM YYYY H:mm"},calendar:{sameDay:"[\u0414\u043d\u0435\u0441 \u0432] LT",nextDay:"[\u0423\u0442\u0440\u0435 \u0432] LT",nextWeek:"dddd [\u0432] LT",lastDay:"[\u0412\u0447\u0435\u0440\u0430 \u0432] LT",lastWeek:function(){switch(this.day()){case 0:case 3:case 6:return"[\u041c\u0438\u043d\u0430\u043b\u0430\u0442\u0430] dddd [\u0432] LT";case 1:case 2:case 4:case 5:return"[\u041c\u0438\u043d\u0430\u043b\u0438\u044f] dddd [\u0432] LT"}},sameElse:"L"},relativeTime:{future:"\u0441\u043b\u0435\u0434 %s",past:"\u043f\u0440\u0435\u0434\u0438 %s",s:"\u043d\u044f\u043a\u043e\u043b\u043a\u043e \u0441\u0435\u043a\u0443\u043d\u0434\u0438",ss:"%d \u0441\u0435\u043a\u0443\u043d\u0434\u0438",m:"\u043c\u0438\u043d\u0443\u0442\u0430",mm:"%d \u043c\u0438\u043d\u0443\u0442\u0438",h:"\u0447\u0430\u0441",hh:"%d \u0447\u0430\u0441\u0430",d:"\u0434\u0435\u043d",dd:"%d \u0434\u0435\u043d\u0430",w:"\u0441\u0435\u0434\u043c\u0438\u0446\u0430",ww:"%d \u0441\u0435\u0434\u043c\u0438\u0446\u0438",M:"\u043c\u0435\u0441\u0435\u0446",MM:"%d \u043c\u0435\u0441\u0435\u0446\u0430",y:"\u0433\u043e\u0434\u0438\u043d\u0430",yy:"%d \u0433\u043e\u0434\u0438\u043d\u0438"},dayOfMonthOrdinalParse:/\d{1,2}-(\u0435\u0432|\u0435\u043d|\u0442\u0438|\u0432\u0438|\u0440\u0438|\u043c\u0438)/,ordinal:function(l){var D=l%10,g=l%100;return 0===l?l+"-\u0435\u0432":0===g?l+"-\u0435\u043d":g>10&&g<20?l+"-\u0442\u0438":1===D?l+"-\u0432\u0438":2===D?l+"-\u0440\u0438":7===D||8===D?l+"-\u043c\u0438":l+"-\u0442\u0438"},week:{dow:1,doy:7}})}(p(15439))},28042:function(qe,I,p){!function(o){"use strict";o.defineLocale("bm",{months:"Zanwuyekalo_Fewuruyekalo_Marisikalo_Awirilikalo_M\u025bkalo_Zuw\u025bnkalo_Zuluyekalo_Utikalo_S\u025btanburukalo_\u0254kut\u0254burukalo_Nowanburukalo_Desanburukalo".split("_"),monthsShort:"Zan_Few_Mar_Awi_M\u025b_Zuw_Zul_Uti_S\u025bt_\u0254ku_Now_Des".split("_"),weekdays:"Kari_Nt\u025bn\u025bn_Tarata_Araba_Alamisa_Juma_Sibiri".split("_"),weekdaysShort:"Kar_Nt\u025b_Tar_Ara_Ala_Jum_Sib".split("_"),weekdaysMin:"Ka_Nt_Ta_Ar_Al_Ju_Si".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"MMMM [tile] D [san] YYYY",LLL:"MMMM [tile] D [san] YYYY [l\u025br\u025b] HH:mm",LLLL:"dddd MMMM [tile] D [san] YYYY [l\u025br\u025b] HH:mm"},calendar:{sameDay:"[Bi l\u025br\u025b] LT",nextDay:"[Sini l\u025br\u025b] LT",nextWeek:"dddd [don l\u025br\u025b] LT",lastDay:"[Kunu l\u025br\u025b] LT",lastWeek:"dddd [t\u025bm\u025bnen l\u025br\u025b] LT",sameElse:"L"},relativeTime:{future:"%s k\u0254n\u0254",past:"a b\u025b %s b\u0254",s:"sanga dama dama",ss:"sekondi %d",m:"miniti kelen",mm:"miniti %d",h:"l\u025br\u025b kelen",hh:"l\u025br\u025b %d",d:"tile kelen",dd:"tile %d",M:"kalo kelen",MM:"kalo %d",y:"san kelen",yy:"san %d"},week:{dow:1,doy:4}})}(p(15439))},65903:function(qe,I,p){!function(o){"use strict";var e={1:"\u09e7",2:"\u09e8",3:"\u09e9",4:"\u09ea",5:"\u09eb",6:"\u09ec",7:"\u09ed",8:"\u09ee",9:"\u09ef",0:"\u09e6"},l={"\u09e7":"1","\u09e8":"2","\u09e9":"3","\u09ea":"4","\u09eb":"5","\u09ec":"6","\u09ed":"7","\u09ee":"8","\u09ef":"9","\u09e6":"0"};o.defineLocale("bn-bd",{months:"\u099c\u09be\u09a8\u09c1\u09df\u09be\u09b0\u09bf_\u09ab\u09c7\u09ac\u09cd\u09b0\u09c1\u09df\u09be\u09b0\u09bf_\u09ae\u09be\u09b0\u09cd\u099a_\u098f\u09aa\u09cd\u09b0\u09bf\u09b2_\u09ae\u09c7_\u099c\u09c1\u09a8_\u099c\u09c1\u09b2\u09be\u0987_\u0986\u0997\u09b8\u09cd\u099f_\u09b8\u09c7\u09aa\u09cd\u099f\u09c7\u09ae\u09cd\u09ac\u09b0_\u0985\u0995\u09cd\u099f\u09cb\u09ac\u09b0_\u09a8\u09ad\u09c7\u09ae\u09cd\u09ac\u09b0_\u09a1\u09bf\u09b8\u09c7\u09ae\u09cd\u09ac\u09b0".split("_"),monthsShort:"\u099c\u09be\u09a8\u09c1_\u09ab\u09c7\u09ac\u09cd\u09b0\u09c1_\u09ae\u09be\u09b0\u09cd\u099a_\u098f\u09aa\u09cd\u09b0\u09bf\u09b2_\u09ae\u09c7_\u099c\u09c1\u09a8_\u099c\u09c1\u09b2\u09be\u0987_\u0986\u0997\u09b8\u09cd\u099f_\u09b8\u09c7\u09aa\u09cd\u099f_\u0985\u0995\u09cd\u099f\u09cb_\u09a8\u09ad\u09c7_\u09a1\u09bf\u09b8\u09c7".split("_"),weekdays:"\u09b0\u09ac\u09bf\u09ac\u09be\u09b0_\u09b8\u09cb\u09ae\u09ac\u09be\u09b0_\u09ae\u0999\u09cd\u0997\u09b2\u09ac\u09be\u09b0_\u09ac\u09c1\u09a7\u09ac\u09be\u09b0_\u09ac\u09c3\u09b9\u09b8\u09cd\u09aa\u09a4\u09bf\u09ac\u09be\u09b0_\u09b6\u09c1\u0995\u09cd\u09b0\u09ac\u09be\u09b0_\u09b6\u09a8\u09bf\u09ac\u09be\u09b0".split("_"),weekdaysShort:"\u09b0\u09ac\u09bf_\u09b8\u09cb\u09ae_\u09ae\u0999\u09cd\u0997\u09b2_\u09ac\u09c1\u09a7_\u09ac\u09c3\u09b9\u09b8\u09cd\u09aa\u09a4\u09bf_\u09b6\u09c1\u0995\u09cd\u09b0_\u09b6\u09a8\u09bf".split("_"),weekdaysMin:"\u09b0\u09ac\u09bf_\u09b8\u09cb\u09ae_\u09ae\u0999\u09cd\u0997\u09b2_\u09ac\u09c1\u09a7_\u09ac\u09c3\u09b9_\u09b6\u09c1\u0995\u09cd\u09b0_\u09b6\u09a8\u09bf".split("_"),longDateFormat:{LT:"A h:mm \u09b8\u09ae\u09df",LTS:"A h:mm:ss \u09b8\u09ae\u09df",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm \u09b8\u09ae\u09df",LLLL:"dddd, D MMMM YYYY, A h:mm \u09b8\u09ae\u09df"},calendar:{sameDay:"[\u0986\u099c] LT",nextDay:"[\u0986\u0997\u09be\u09ae\u09c0\u0995\u09be\u09b2] LT",nextWeek:"dddd, LT",lastDay:"[\u0997\u09a4\u0995\u09be\u09b2] LT",lastWeek:"[\u0997\u09a4] dddd, LT",sameElse:"L"},relativeTime:{future:"%s \u09aa\u09b0\u09c7",past:"%s \u0986\u0997\u09c7",s:"\u0995\u09df\u09c7\u0995 \u09b8\u09c7\u0995\u09c7\u09a8\u09cd\u09a1",ss:"%d \u09b8\u09c7\u0995\u09c7\u09a8\u09cd\u09a1",m:"\u098f\u0995 \u09ae\u09bf\u09a8\u09bf\u099f",mm:"%d \u09ae\u09bf\u09a8\u09bf\u099f",h:"\u098f\u0995 \u0998\u09a8\u09cd\u099f\u09be",hh:"%d \u0998\u09a8\u09cd\u099f\u09be",d:"\u098f\u0995 \u09a6\u09bf\u09a8",dd:"%d \u09a6\u09bf\u09a8",M:"\u098f\u0995 \u09ae\u09be\u09b8",MM:"%d \u09ae\u09be\u09b8",y:"\u098f\u0995 \u09ac\u099b\u09b0",yy:"%d \u09ac\u099b\u09b0"},preparse:function(g){return g.replace(/[\u09e7\u09e8\u09e9\u09ea\u09eb\u09ec\u09ed\u09ee\u09ef\u09e6]/g,function(E){return l[E]})},postformat:function(g){return g.replace(/\d/g,function(E){return e[E]})},meridiemParse:/\u09b0\u09be\u09a4|\u09ad\u09cb\u09b0|\u09b8\u0995\u09be\u09b2|\u09a6\u09c1\u09aa\u09c1\u09b0|\u09ac\u09bf\u0995\u09be\u09b2|\u09b8\u09a8\u09cd\u09a7\u09cd\u09af\u09be|\u09b0\u09be\u09a4/,meridiemHour:function(g,E){return 12===g&&(g=0),"\u09b0\u09be\u09a4"===E?g<4?g:g+12:"\u09ad\u09cb\u09b0"===E||"\u09b8\u0995\u09be\u09b2"===E?g:"\u09a6\u09c1\u09aa\u09c1\u09b0"===E?g>=3?g:g+12:"\u09ac\u09bf\u0995\u09be\u09b2"===E||"\u09b8\u09a8\u09cd\u09a7\u09cd\u09af\u09be"===E?g+12:void 0},meridiem:function(g,E,T){return g<4?"\u09b0\u09be\u09a4":g<6?"\u09ad\u09cb\u09b0":g<12?"\u09b8\u0995\u09be\u09b2":g<15?"\u09a6\u09c1\u09aa\u09c1\u09b0":g<18?"\u09ac\u09bf\u0995\u09be\u09b2":g<20?"\u09b8\u09a8\u09cd\u09a7\u09cd\u09af\u09be":"\u09b0\u09be\u09a4"},week:{dow:0,doy:6}})}(p(15439))},59620:function(qe,I,p){!function(o){"use strict";var e={1:"\u09e7",2:"\u09e8",3:"\u09e9",4:"\u09ea",5:"\u09eb",6:"\u09ec",7:"\u09ed",8:"\u09ee",9:"\u09ef",0:"\u09e6"},l={"\u09e7":"1","\u09e8":"2","\u09e9":"3","\u09ea":"4","\u09eb":"5","\u09ec":"6","\u09ed":"7","\u09ee":"8","\u09ef":"9","\u09e6":"0"};o.defineLocale("bn",{months:"\u099c\u09be\u09a8\u09c1\u09df\u09be\u09b0\u09bf_\u09ab\u09c7\u09ac\u09cd\u09b0\u09c1\u09df\u09be\u09b0\u09bf_\u09ae\u09be\u09b0\u09cd\u099a_\u098f\u09aa\u09cd\u09b0\u09bf\u09b2_\u09ae\u09c7_\u099c\u09c1\u09a8_\u099c\u09c1\u09b2\u09be\u0987_\u0986\u0997\u09b8\u09cd\u099f_\u09b8\u09c7\u09aa\u09cd\u099f\u09c7\u09ae\u09cd\u09ac\u09b0_\u0985\u0995\u09cd\u099f\u09cb\u09ac\u09b0_\u09a8\u09ad\u09c7\u09ae\u09cd\u09ac\u09b0_\u09a1\u09bf\u09b8\u09c7\u09ae\u09cd\u09ac\u09b0".split("_"),monthsShort:"\u099c\u09be\u09a8\u09c1_\u09ab\u09c7\u09ac\u09cd\u09b0\u09c1_\u09ae\u09be\u09b0\u09cd\u099a_\u098f\u09aa\u09cd\u09b0\u09bf\u09b2_\u09ae\u09c7_\u099c\u09c1\u09a8_\u099c\u09c1\u09b2\u09be\u0987_\u0986\u0997\u09b8\u09cd\u099f_\u09b8\u09c7\u09aa\u09cd\u099f_\u0985\u0995\u09cd\u099f\u09cb_\u09a8\u09ad\u09c7_\u09a1\u09bf\u09b8\u09c7".split("_"),weekdays:"\u09b0\u09ac\u09bf\u09ac\u09be\u09b0_\u09b8\u09cb\u09ae\u09ac\u09be\u09b0_\u09ae\u0999\u09cd\u0997\u09b2\u09ac\u09be\u09b0_\u09ac\u09c1\u09a7\u09ac\u09be\u09b0_\u09ac\u09c3\u09b9\u09b8\u09cd\u09aa\u09a4\u09bf\u09ac\u09be\u09b0_\u09b6\u09c1\u0995\u09cd\u09b0\u09ac\u09be\u09b0_\u09b6\u09a8\u09bf\u09ac\u09be\u09b0".split("_"),weekdaysShort:"\u09b0\u09ac\u09bf_\u09b8\u09cb\u09ae_\u09ae\u0999\u09cd\u0997\u09b2_\u09ac\u09c1\u09a7_\u09ac\u09c3\u09b9\u09b8\u09cd\u09aa\u09a4\u09bf_\u09b6\u09c1\u0995\u09cd\u09b0_\u09b6\u09a8\u09bf".split("_"),weekdaysMin:"\u09b0\u09ac\u09bf_\u09b8\u09cb\u09ae_\u09ae\u0999\u09cd\u0997\u09b2_\u09ac\u09c1\u09a7_\u09ac\u09c3\u09b9_\u09b6\u09c1\u0995\u09cd\u09b0_\u09b6\u09a8\u09bf".split("_"),longDateFormat:{LT:"A h:mm \u09b8\u09ae\u09df",LTS:"A h:mm:ss \u09b8\u09ae\u09df",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm \u09b8\u09ae\u09df",LLLL:"dddd, D MMMM YYYY, A h:mm \u09b8\u09ae\u09df"},calendar:{sameDay:"[\u0986\u099c] LT",nextDay:"[\u0986\u0997\u09be\u09ae\u09c0\u0995\u09be\u09b2] LT",nextWeek:"dddd, LT",lastDay:"[\u0997\u09a4\u0995\u09be\u09b2] LT",lastWeek:"[\u0997\u09a4] dddd, LT",sameElse:"L"},relativeTime:{future:"%s \u09aa\u09b0\u09c7",past:"%s \u0986\u0997\u09c7",s:"\u0995\u09df\u09c7\u0995 \u09b8\u09c7\u0995\u09c7\u09a8\u09cd\u09a1",ss:"%d \u09b8\u09c7\u0995\u09c7\u09a8\u09cd\u09a1",m:"\u098f\u0995 \u09ae\u09bf\u09a8\u09bf\u099f",mm:"%d \u09ae\u09bf\u09a8\u09bf\u099f",h:"\u098f\u0995 \u0998\u09a8\u09cd\u099f\u09be",hh:"%d \u0998\u09a8\u09cd\u099f\u09be",d:"\u098f\u0995 \u09a6\u09bf\u09a8",dd:"%d \u09a6\u09bf\u09a8",M:"\u098f\u0995 \u09ae\u09be\u09b8",MM:"%d \u09ae\u09be\u09b8",y:"\u098f\u0995 \u09ac\u099b\u09b0",yy:"%d \u09ac\u099b\u09b0"},preparse:function(g){return g.replace(/[\u09e7\u09e8\u09e9\u09ea\u09eb\u09ec\u09ed\u09ee\u09ef\u09e6]/g,function(E){return l[E]})},postformat:function(g){return g.replace(/\d/g,function(E){return e[E]})},meridiemParse:/\u09b0\u09be\u09a4|\u09b8\u0995\u09be\u09b2|\u09a6\u09c1\u09aa\u09c1\u09b0|\u09ac\u09bf\u0995\u09be\u09b2|\u09b0\u09be\u09a4/,meridiemHour:function(g,E){return 12===g&&(g=0),"\u09b0\u09be\u09a4"===E&&g>=4||"\u09a6\u09c1\u09aa\u09c1\u09b0"===E&&g<5||"\u09ac\u09bf\u0995\u09be\u09b2"===E?g+12:g},meridiem:function(g,E,T){return g<4?"\u09b0\u09be\u09a4":g<10?"\u09b8\u0995\u09be\u09b2":g<17?"\u09a6\u09c1\u09aa\u09c1\u09b0":g<20?"\u09ac\u09bf\u0995\u09be\u09b2":"\u09b0\u09be\u09a4"},week:{dow:0,doy:6}})}(p(15439))},69645:function(qe,I,p){!function(o){"use strict";var e={1:"\u0f21",2:"\u0f22",3:"\u0f23",4:"\u0f24",5:"\u0f25",6:"\u0f26",7:"\u0f27",8:"\u0f28",9:"\u0f29",0:"\u0f20"},l={"\u0f21":"1","\u0f22":"2","\u0f23":"3","\u0f24":"4","\u0f25":"5","\u0f26":"6","\u0f27":"7","\u0f28":"8","\u0f29":"9","\u0f20":"0"};o.defineLocale("bo",{months:"\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f51\u0f44\u0f0b\u0f54\u0f7c_\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f42\u0f49\u0f72\u0f66\u0f0b\u0f54_\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f42\u0f66\u0f74\u0f58\u0f0b\u0f54_\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f56\u0f5e\u0f72\u0f0b\u0f54_\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f63\u0f94\u0f0b\u0f54_\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f51\u0fb2\u0f74\u0f42\u0f0b\u0f54_\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f56\u0f51\u0f74\u0f53\u0f0b\u0f54_\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f56\u0f62\u0f92\u0fb1\u0f51\u0f0b\u0f54_\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f51\u0f42\u0f74\u0f0b\u0f54_\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f56\u0f45\u0f74\u0f0b\u0f54_\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f56\u0f45\u0f74\u0f0b\u0f42\u0f45\u0f72\u0f42\u0f0b\u0f54_\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f56\u0f45\u0f74\u0f0b\u0f42\u0f49\u0f72\u0f66\u0f0b\u0f54".split("_"),monthsShort:"\u0f5f\u0fb3\u0f0b1_\u0f5f\u0fb3\u0f0b2_\u0f5f\u0fb3\u0f0b3_\u0f5f\u0fb3\u0f0b4_\u0f5f\u0fb3\u0f0b5_\u0f5f\u0fb3\u0f0b6_\u0f5f\u0fb3\u0f0b7_\u0f5f\u0fb3\u0f0b8_\u0f5f\u0fb3\u0f0b9_\u0f5f\u0fb3\u0f0b10_\u0f5f\u0fb3\u0f0b11_\u0f5f\u0fb3\u0f0b12".split("_"),monthsShortRegex:/^(\u0f5f\u0fb3\u0f0b\d{1,2})/,monthsParseExact:!0,weekdays:"\u0f42\u0f5f\u0f60\u0f0b\u0f49\u0f72\u0f0b\u0f58\u0f0b_\u0f42\u0f5f\u0f60\u0f0b\u0f5f\u0fb3\u0f0b\u0f56\u0f0b_\u0f42\u0f5f\u0f60\u0f0b\u0f58\u0f72\u0f42\u0f0b\u0f51\u0f58\u0f62\u0f0b_\u0f42\u0f5f\u0f60\u0f0b\u0f63\u0fb7\u0f42\u0f0b\u0f54\u0f0b_\u0f42\u0f5f\u0f60\u0f0b\u0f55\u0f74\u0f62\u0f0b\u0f56\u0f74_\u0f42\u0f5f\u0f60\u0f0b\u0f54\u0f0b\u0f66\u0f44\u0f66\u0f0b_\u0f42\u0f5f\u0f60\u0f0b\u0f66\u0fa4\u0f7a\u0f53\u0f0b\u0f54\u0f0b".split("_"),weekdaysShort:"\u0f49\u0f72\u0f0b\u0f58\u0f0b_\u0f5f\u0fb3\u0f0b\u0f56\u0f0b_\u0f58\u0f72\u0f42\u0f0b\u0f51\u0f58\u0f62\u0f0b_\u0f63\u0fb7\u0f42\u0f0b\u0f54\u0f0b_\u0f55\u0f74\u0f62\u0f0b\u0f56\u0f74_\u0f54\u0f0b\u0f66\u0f44\u0f66\u0f0b_\u0f66\u0fa4\u0f7a\u0f53\u0f0b\u0f54\u0f0b".split("_"),weekdaysMin:"\u0f49\u0f72_\u0f5f\u0fb3_\u0f58\u0f72\u0f42_\u0f63\u0fb7\u0f42_\u0f55\u0f74\u0f62_\u0f66\u0f44\u0f66_\u0f66\u0fa4\u0f7a\u0f53".split("_"),longDateFormat:{LT:"A h:mm",LTS:"A h:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm",LLLL:"dddd, D MMMM YYYY, A h:mm"},calendar:{sameDay:"[\u0f51\u0f72\u0f0b\u0f62\u0f72\u0f44] LT",nextDay:"[\u0f66\u0f44\u0f0b\u0f49\u0f72\u0f53] LT",nextWeek:"[\u0f56\u0f51\u0f74\u0f53\u0f0b\u0f55\u0fb2\u0f42\u0f0b\u0f62\u0f97\u0f7a\u0f66\u0f0b\u0f58], LT",lastDay:"[\u0f41\u0f0b\u0f66\u0f44] LT",lastWeek:"[\u0f56\u0f51\u0f74\u0f53\u0f0b\u0f55\u0fb2\u0f42\u0f0b\u0f58\u0f50\u0f60\u0f0b\u0f58] dddd, LT",sameElse:"L"},relativeTime:{future:"%s \u0f63\u0f0b",past:"%s \u0f66\u0f94\u0f53\u0f0b\u0f63",s:"\u0f63\u0f58\u0f0b\u0f66\u0f44",ss:"%d \u0f66\u0f90\u0f62\u0f0b\u0f46\u0f0d",m:"\u0f66\u0f90\u0f62\u0f0b\u0f58\u0f0b\u0f42\u0f45\u0f72\u0f42",mm:"%d \u0f66\u0f90\u0f62\u0f0b\u0f58",h:"\u0f46\u0f74\u0f0b\u0f5a\u0f7c\u0f51\u0f0b\u0f42\u0f45\u0f72\u0f42",hh:"%d \u0f46\u0f74\u0f0b\u0f5a\u0f7c\u0f51",d:"\u0f49\u0f72\u0f53\u0f0b\u0f42\u0f45\u0f72\u0f42",dd:"%d \u0f49\u0f72\u0f53\u0f0b",M:"\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f42\u0f45\u0f72\u0f42",MM:"%d \u0f5f\u0fb3\u0f0b\u0f56",y:"\u0f63\u0f7c\u0f0b\u0f42\u0f45\u0f72\u0f42",yy:"%d \u0f63\u0f7c"},preparse:function(g){return g.replace(/[\u0f21\u0f22\u0f23\u0f24\u0f25\u0f26\u0f27\u0f28\u0f29\u0f20]/g,function(E){return l[E]})},postformat:function(g){return g.replace(/\d/g,function(E){return e[E]})},meridiemParse:/\u0f58\u0f5a\u0f53\u0f0b\u0f58\u0f7c|\u0f5e\u0f7c\u0f42\u0f66\u0f0b\u0f40\u0f66|\u0f49\u0f72\u0f53\u0f0b\u0f42\u0f74\u0f44|\u0f51\u0f42\u0f7c\u0f44\u0f0b\u0f51\u0f42|\u0f58\u0f5a\u0f53\u0f0b\u0f58\u0f7c/,meridiemHour:function(g,E){return 12===g&&(g=0),"\u0f58\u0f5a\u0f53\u0f0b\u0f58\u0f7c"===E&&g>=4||"\u0f49\u0f72\u0f53\u0f0b\u0f42\u0f74\u0f44"===E&&g<5||"\u0f51\u0f42\u0f7c\u0f44\u0f0b\u0f51\u0f42"===E?g+12:g},meridiem:function(g,E,T){return g<4?"\u0f58\u0f5a\u0f53\u0f0b\u0f58\u0f7c":g<10?"\u0f5e\u0f7c\u0f42\u0f66\u0f0b\u0f40\u0f66":g<17?"\u0f49\u0f72\u0f53\u0f0b\u0f42\u0f74\u0f44":g<20?"\u0f51\u0f42\u0f7c\u0f44\u0f0b\u0f51\u0f42":"\u0f58\u0f5a\u0f53\u0f0b\u0f58\u0f7c"},week:{dow:0,doy:6}})}(p(15439))},45020:function(qe,I,p){!function(o){"use strict";function e(he,ae,X){return he+" "+g({mm:"munutenn",MM:"miz",dd:"devezh"}[X],he)}function l(he){switch(D(he)){case 1:case 3:case 4:case 5:case 9:return he+" bloaz";default:return he+" vloaz"}}function D(he){return he>9?D(he%10):he}function g(he,ae){return 2===ae?E(he):he}function E(he){var ae={m:"v",b:"v",d:"z"};return void 0===ae[he.charAt(0)]?he:ae[he.charAt(0)]+he.substring(1)}var T=[/^gen/i,/^c[\u02bc\']hwe/i,/^meu/i,/^ebr/i,/^mae/i,/^(mez|eve)/i,/^gou/i,/^eos/i,/^gwe/i,/^her/i,/^du/i,/^ker/i],n=/^(genver|c[\u02bc\']hwevrer|meurzh|ebrel|mae|mezheven|gouere|eost|gwengolo|here|du|kerzu|gen|c[\u02bc\']hwe|meu|ebr|mae|eve|gou|eos|gwe|her|du|ker)/i,P=/^(genver|c[\u02bc\']hwevrer|meurzh|ebrel|mae|mezheven|gouere|eost|gwengolo|here|du|kerzu)/i,w=/^(gen|c[\u02bc\']hwe|meu|ebr|mae|eve|gou|eos|gwe|her|du|ker)/i,B=[/^sul/i,/^lun/i,/^meurzh/i,/^merc[\u02bc\']her/i,/^yaou/i,/^gwener/i,/^sadorn/i],Y=[/^Sul/i,/^Lun/i,/^Meu/i,/^Mer/i,/^Yao/i,/^Gwe/i,/^Sad/i],V=[/^Su/i,/^Lu/i,/^Me([^r]|$)/i,/^Mer/i,/^Ya/i,/^Gw/i,/^Sa/i];o.defineLocale("br",{months:"Genver_C\u02bchwevrer_Meurzh_Ebrel_Mae_Mezheven_Gouere_Eost_Gwengolo_Here_Du_Kerzu".split("_"),monthsShort:"Gen_C\u02bchwe_Meu_Ebr_Mae_Eve_Gou_Eos_Gwe_Her_Du_Ker".split("_"),weekdays:"Sul_Lun_Meurzh_Merc\u02bcher_Yaou_Gwener_Sadorn".split("_"),weekdaysShort:"Sul_Lun_Meu_Mer_Yao_Gwe_Sad".split("_"),weekdaysMin:"Su_Lu_Me_Mer_Ya_Gw_Sa".split("_"),weekdaysParse:V,fullWeekdaysParse:B,shortWeekdaysParse:Y,minWeekdaysParse:V,monthsRegex:n,monthsShortRegex:n,monthsStrictRegex:P,monthsShortStrictRegex:w,monthsParse:T,longMonthsParse:T,shortMonthsParse:T,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D [a viz] MMMM YYYY",LLL:"D [a viz] MMMM YYYY HH:mm",LLLL:"dddd, D [a viz] MMMM YYYY HH:mm"},calendar:{sameDay:"[Hiziv da] LT",nextDay:"[Warc\u02bchoazh da] LT",nextWeek:"dddd [da] LT",lastDay:"[Dec\u02bch da] LT",lastWeek:"dddd [paset da] LT",sameElse:"L"},relativeTime:{future:"a-benn %s",past:"%s \u02bczo",s:"un nebeud segondenno\xf9",ss:"%d eilenn",m:"ur vunutenn",mm:e,h:"un eur",hh:"%d eur",d:"un devezh",dd:e,M:"ur miz",MM:e,y:"ur bloaz",yy:l},dayOfMonthOrdinalParse:/\d{1,2}(a\xf1|vet)/,ordinal:function(he){return he+(1===he?"a\xf1":"vet")},week:{dow:1,doy:4},meridiemParse:/a.m.|g.m./,isPM:function(he){return"g.m."===he},meridiem:function(he,ae,X){return he<12?"a.m.":"g.m."}})}(p(15439))},64792:function(qe,I,p){!function(o){"use strict";function e(g,E,T,n){if("m"===T)return E?"jedna minuta":n?"jednu minutu":"jedne minute"}function l(g,E,T){var n=g+" ";switch(T){case"ss":return n+=1===g?"sekunda":2===g||3===g||4===g?"sekunde":"sekundi";case"mm":return n+=1===g?"minuta":2===g||3===g||4===g?"minute":"minuta";case"h":return"jedan sat";case"hh":return n+=1===g?"sat":2===g||3===g||4===g?"sata":"sati";case"dd":return n+=1===g?"dan":"dana";case"MM":return n+=1===g?"mjesec":2===g||3===g||4===g?"mjeseca":"mjeseci";case"yy":return n+=1===g?"godina":2===g||3===g||4===g?"godine":"godina"}}o.defineLocale("bs",{months:"januar_februar_mart_april_maj_juni_juli_august_septembar_oktobar_novembar_decembar".split("_"),monthsShort:"jan._feb._mar._apr._maj._jun._jul._aug._sep._okt._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"nedjelja_ponedjeljak_utorak_srijeda_\u010detvrtak_petak_subota".split("_"),weekdaysShort:"ned._pon._uto._sri._\u010det._pet._sub.".split("_"),weekdaysMin:"ne_po_ut_sr_\u010de_pe_su".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd, D. MMMM YYYY H:mm"},calendar:{sameDay:"[danas u] LT",nextDay:"[sutra u] LT",nextWeek:function(){switch(this.day()){case 0:return"[u] [nedjelju] [u] LT";case 3:return"[u] [srijedu] [u] LT";case 6:return"[u] [subotu] [u] LT";case 1:case 2:case 4:case 5:return"[u] dddd [u] LT"}},lastDay:"[ju\u010der u] LT",lastWeek:function(){switch(this.day()){case 0:case 3:return"[pro\u0161lu] dddd [u] LT";case 6:return"[pro\u0161le] [subote] [u] LT";case 1:case 2:case 4:case 5:return"[pro\u0161li] dddd [u] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"prije %s",s:"par sekundi",ss:l,m:e,mm:l,h:l,hh:l,d:"dan",dd:l,M:"mjesec",MM:l,y:"godinu",yy:l},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}})}(p(15439))},47980:function(qe,I,p){!function(o){"use strict";o.defineLocale("ca",{months:{standalone:"gener_febrer_mar\xe7_abril_maig_juny_juliol_agost_setembre_octubre_novembre_desembre".split("_"),format:"de gener_de febrer_de mar\xe7_d'abril_de maig_de juny_de juliol_d'agost_de setembre_d'octubre_de novembre_de desembre".split("_"),isFormat:/D[oD]?(\s)+MMMM/},monthsShort:"gen._febr._mar\xe7_abr._maig_juny_jul._ag._set._oct._nov._des.".split("_"),monthsParseExact:!0,weekdays:"diumenge_dilluns_dimarts_dimecres_dijous_divendres_dissabte".split("_"),weekdaysShort:"dg._dl._dt._dc._dj._dv._ds.".split("_"),weekdaysMin:"dg_dl_dt_dc_dj_dv_ds".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM [de] YYYY",ll:"D MMM YYYY",LLL:"D MMMM [de] YYYY [a les] H:mm",lll:"D MMM YYYY, H:mm",LLLL:"dddd D MMMM [de] YYYY [a les] H:mm",llll:"ddd D MMM YYYY, H:mm"},calendar:{sameDay:function(){return"[avui a "+(1!==this.hours()?"les":"la")+"] LT"},nextDay:function(){return"[dem\xe0 a "+(1!==this.hours()?"les":"la")+"] LT"},nextWeek:function(){return"dddd [a "+(1!==this.hours()?"les":"la")+"] LT"},lastDay:function(){return"[ahir a "+(1!==this.hours()?"les":"la")+"] LT"},lastWeek:function(){return"[el] dddd [passat a "+(1!==this.hours()?"les":"la")+"] LT"},sameElse:"L"},relativeTime:{future:"d'aqu\xed %s",past:"fa %s",s:"uns segons",ss:"%d segons",m:"un minut",mm:"%d minuts",h:"una hora",hh:"%d hores",d:"un dia",dd:"%d dies",M:"un mes",MM:"%d mesos",y:"un any",yy:"%d anys"},dayOfMonthOrdinalParse:/\d{1,2}(r|n|t|\xe8|a)/,ordinal:function(l,D){var g=1===l?"r":2===l?"n":3===l?"r":4===l?"t":"\xe8";return("w"===D||"W"===D)&&(g="a"),l+g},week:{dow:1,doy:4}})}(p(15439))},47322:function(qe,I,p){!function(o){"use strict";var e={standalone:"leden_\xfanor_b\u0159ezen_duben_kv\u011bten_\u010derven_\u010dervenec_srpen_z\xe1\u0159\xed_\u0159\xedjen_listopad_prosinec".split("_"),format:"ledna_\xfanora_b\u0159ezna_dubna_kv\u011btna_\u010dervna_\u010dervence_srpna_z\xe1\u0159\xed_\u0159\xedjna_listopadu_prosince".split("_"),isFormat:/DD?[o.]?(\[[^\[\]]*\]|\s)+MMMM/},l="led_\xfano_b\u0159e_dub_kv\u011b_\u010dvn_\u010dvc_srp_z\xe1\u0159_\u0159\xedj_lis_pro".split("_"),D=[/^led/i,/^\xfano/i,/^b\u0159e/i,/^dub/i,/^kv\u011b/i,/^(\u010dvn|\u010derven$|\u010dervna)/i,/^(\u010dvc|\u010dervenec|\u010dervence)/i,/^srp/i,/^z\xe1\u0159/i,/^\u0159\xedj/i,/^lis/i,/^pro/i],g=/^(leden|\xfanor|b\u0159ezen|duben|kv\u011bten|\u010dervenec|\u010dervence|\u010derven|\u010dervna|srpen|z\xe1\u0159\xed|\u0159\xedjen|listopad|prosinec|led|\xfano|b\u0159e|dub|kv\u011b|\u010dvn|\u010dvc|srp|z\xe1\u0159|\u0159\xedj|lis|pro)/i;function E(P){return P>1&&P<5&&1!=~~(P/10)}function T(P,w,B,Y){var V=P+" ";switch(B){case"s":return w||Y?"p\xe1r sekund":"p\xe1r sekundami";case"ss":return w||Y?V+(E(P)?"sekundy":"sekund"):V+"sekundami";case"m":return w?"minuta":Y?"minutu":"minutou";case"mm":return w||Y?V+(E(P)?"minuty":"minut"):V+"minutami";case"h":return w?"hodina":Y?"hodinu":"hodinou";case"hh":return w||Y?V+(E(P)?"hodiny":"hodin"):V+"hodinami";case"d":return w||Y?"den":"dnem";case"dd":return w||Y?V+(E(P)?"dny":"dn\xed"):V+"dny";case"M":return w||Y?"m\u011bs\xedc":"m\u011bs\xedcem";case"MM":return w||Y?V+(E(P)?"m\u011bs\xedce":"m\u011bs\xedc\u016f"):V+"m\u011bs\xedci";case"y":return w||Y?"rok":"rokem";case"yy":return w||Y?V+(E(P)?"roky":"let"):V+"lety"}}o.defineLocale("cs",{months:e,monthsShort:l,monthsRegex:g,monthsShortRegex:g,monthsStrictRegex:/^(leden|ledna|\xfanora|\xfanor|b\u0159ezen|b\u0159ezna|duben|dubna|kv\u011bten|kv\u011btna|\u010dervenec|\u010dervence|\u010derven|\u010dervna|srpen|srpna|z\xe1\u0159\xed|\u0159\xedjen|\u0159\xedjna|listopadu|listopad|prosinec|prosince)/i,monthsShortStrictRegex:/^(led|\xfano|b\u0159e|dub|kv\u011b|\u010dvn|\u010dvc|srp|z\xe1\u0159|\u0159\xedj|lis|pro)/i,monthsParse:D,longMonthsParse:D,shortMonthsParse:D,weekdays:"ned\u011ble_pond\u011bl\xed_\xfater\xfd_st\u0159eda_\u010dtvrtek_p\xe1tek_sobota".split("_"),weekdaysShort:"ne_po_\xfat_st_\u010dt_p\xe1_so".split("_"),weekdaysMin:"ne_po_\xfat_st_\u010dt_p\xe1_so".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd D. MMMM YYYY H:mm",l:"D. M. YYYY"},calendar:{sameDay:"[dnes v] LT",nextDay:"[z\xedtra v] LT",nextWeek:function(){switch(this.day()){case 0:return"[v ned\u011bli v] LT";case 1:case 2:return"[v] dddd [v] LT";case 3:return"[ve st\u0159edu v] LT";case 4:return"[ve \u010dtvrtek v] LT";case 5:return"[v p\xe1tek v] LT";case 6:return"[v sobotu v] LT"}},lastDay:"[v\u010dera v] LT",lastWeek:function(){switch(this.day()){case 0:return"[minulou ned\u011bli v] LT";case 1:case 2:return"[minul\xe9] dddd [v] LT";case 3:return"[minulou st\u0159edu v] LT";case 4:case 5:return"[minul\xfd] dddd [v] LT";case 6:return"[minulou sobotu v] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"p\u0159ed %s",s:T,ss:T,m:T,mm:T,h:T,hh:T,d:T,dd:T,M:T,MM:T,y:T,yy:T},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(p(15439))},90365:function(qe,I,p){!function(o){"use strict";o.defineLocale("cv",{months:"\u043a\u04d1\u0440\u043b\u0430\u0447_\u043d\u0430\u0440\u04d1\u0441_\u043f\u0443\u0448_\u0430\u043a\u0430_\u043c\u0430\u0439_\u04ab\u04d7\u0440\u0442\u043c\u0435_\u0443\u0442\u04d1_\u04ab\u0443\u0440\u043b\u0430_\u0430\u0432\u04d1\u043d_\u044e\u043f\u0430_\u0447\u04f3\u043a_\u0440\u0430\u0448\u0442\u0430\u0432".split("_"),monthsShort:"\u043a\u04d1\u0440_\u043d\u0430\u0440_\u043f\u0443\u0448_\u0430\u043a\u0430_\u043c\u0430\u0439_\u04ab\u04d7\u0440_\u0443\u0442\u04d1_\u04ab\u0443\u0440_\u0430\u0432\u043d_\u044e\u043f\u0430_\u0447\u04f3\u043a_\u0440\u0430\u0448".split("_"),weekdays:"\u0432\u044b\u0440\u0441\u0430\u0440\u043d\u0438\u043a\u0443\u043d_\u0442\u0443\u043d\u0442\u0438\u043a\u0443\u043d_\u044b\u0442\u043b\u0430\u0440\u0438\u043a\u0443\u043d_\u044e\u043d\u043a\u0443\u043d_\u043a\u04d7\u04ab\u043d\u0435\u0440\u043d\u0438\u043a\u0443\u043d_\u044d\u0440\u043d\u0435\u043a\u0443\u043d_\u0448\u04d1\u043c\u0430\u0442\u043a\u0443\u043d".split("_"),weekdaysShort:"\u0432\u044b\u0440_\u0442\u0443\u043d_\u044b\u0442\u043b_\u044e\u043d_\u043a\u04d7\u04ab_\u044d\u0440\u043d_\u0448\u04d1\u043c".split("_"),weekdaysMin:"\u0432\u0440_\u0442\u043d_\u044b\u0442_\u044e\u043d_\u043a\u04ab_\u044d\u0440_\u0448\u043c".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD-MM-YYYY",LL:"YYYY [\u04ab\u0443\u043b\u0445\u0438] MMMM [\u0443\u0439\u04d1\u0445\u04d7\u043d] D[-\u043c\u04d7\u0448\u04d7]",LLL:"YYYY [\u04ab\u0443\u043b\u0445\u0438] MMMM [\u0443\u0439\u04d1\u0445\u04d7\u043d] D[-\u043c\u04d7\u0448\u04d7], HH:mm",LLLL:"dddd, YYYY [\u04ab\u0443\u043b\u0445\u0438] MMMM [\u0443\u0439\u04d1\u0445\u04d7\u043d] D[-\u043c\u04d7\u0448\u04d7], HH:mm"},calendar:{sameDay:"[\u041f\u0430\u044f\u043d] LT [\u0441\u0435\u0445\u0435\u0442\u0440\u0435]",nextDay:"[\u042b\u0440\u0430\u043d] LT [\u0441\u0435\u0445\u0435\u0442\u0440\u0435]",lastDay:"[\u04d6\u043d\u0435\u0440] LT [\u0441\u0435\u0445\u0435\u0442\u0440\u0435]",nextWeek:"[\u04aa\u0438\u0442\u0435\u0441] dddd LT [\u0441\u0435\u0445\u0435\u0442\u0440\u0435]",lastWeek:"[\u0418\u0440\u0442\u043d\u04d7] dddd LT [\u0441\u0435\u0445\u0435\u0442\u0440\u0435]",sameElse:"L"},relativeTime:{future:function(l){return l+(/\u0441\u0435\u0445\u0435\u0442$/i.exec(l)?"\u0440\u0435\u043d":/\u04ab\u0443\u043b$/i.exec(l)?"\u0442\u0430\u043d":"\u0440\u0430\u043d")},past:"%s \u043a\u0430\u044f\u043b\u043b\u0430",s:"\u043f\u04d7\u0440-\u0438\u043a \u04ab\u0435\u043a\u043a\u0443\u043d\u0442",ss:"%d \u04ab\u0435\u043a\u043a\u0443\u043d\u0442",m:"\u043f\u04d7\u0440 \u043c\u0438\u043d\u0443\u0442",mm:"%d \u043c\u0438\u043d\u0443\u0442",h:"\u043f\u04d7\u0440 \u0441\u0435\u0445\u0435\u0442",hh:"%d \u0441\u0435\u0445\u0435\u0442",d:"\u043f\u04d7\u0440 \u043a\u0443\u043d",dd:"%d \u043a\u0443\u043d",M:"\u043f\u04d7\u0440 \u0443\u0439\u04d1\u0445",MM:"%d \u0443\u0439\u04d1\u0445",y:"\u043f\u04d7\u0440 \u04ab\u0443\u043b",yy:"%d \u04ab\u0443\u043b"},dayOfMonthOrdinalParse:/\d{1,2}-\u043c\u04d7\u0448/,ordinal:"%d-\u043c\u04d7\u0448",week:{dow:1,doy:7}})}(p(15439))},32092:function(qe,I,p){!function(o){"use strict";o.defineLocale("cy",{months:"Ionawr_Chwefror_Mawrth_Ebrill_Mai_Mehefin_Gorffennaf_Awst_Medi_Hydref_Tachwedd_Rhagfyr".split("_"),monthsShort:"Ion_Chwe_Maw_Ebr_Mai_Meh_Gor_Aws_Med_Hyd_Tach_Rhag".split("_"),weekdays:"Dydd Sul_Dydd Llun_Dydd Mawrth_Dydd Mercher_Dydd Iau_Dydd Gwener_Dydd Sadwrn".split("_"),weekdaysShort:"Sul_Llun_Maw_Mer_Iau_Gwe_Sad".split("_"),weekdaysMin:"Su_Ll_Ma_Me_Ia_Gw_Sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Heddiw am] LT",nextDay:"[Yfory am] LT",nextWeek:"dddd [am] LT",lastDay:"[Ddoe am] LT",lastWeek:"dddd [diwethaf am] LT",sameElse:"L"},relativeTime:{future:"mewn %s",past:"%s yn \xf4l",s:"ychydig eiliadau",ss:"%d eiliad",m:"munud",mm:"%d munud",h:"awr",hh:"%d awr",d:"diwrnod",dd:"%d diwrnod",M:"mis",MM:"%d mis",y:"blwyddyn",yy:"%d flynedd"},dayOfMonthOrdinalParse:/\d{1,2}(fed|ain|af|il|ydd|ed|eg)/,ordinal:function(l){var g="";return l>20?g=40===l||50===l||60===l||80===l||100===l?"fed":"ain":l>0&&(g=["","af","il","ydd","ydd","ed","ed","ed","fed","fed","fed","eg","fed","eg","eg","fed","eg","eg","fed","eg","fed"][l]),l+g},week:{dow:1,doy:4}})}(p(15439))},77387:function(qe,I,p){!function(o){"use strict";o.defineLocale("da",{months:"januar_februar_marts_april_maj_juni_juli_august_september_oktober_november_december".split("_"),monthsShort:"jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec".split("_"),weekdays:"s\xf8ndag_mandag_tirsdag_onsdag_torsdag_fredag_l\xf8rdag".split("_"),weekdaysShort:"s\xf8n_man_tir_ons_tor_fre_l\xf8r".split("_"),weekdaysMin:"s\xf8_ma_ti_on_to_fr_l\xf8".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY HH:mm",LLLL:"dddd [d.] D. MMMM YYYY [kl.] HH:mm"},calendar:{sameDay:"[i dag kl.] LT",nextDay:"[i morgen kl.] LT",nextWeek:"p\xe5 dddd [kl.] LT",lastDay:"[i g\xe5r kl.] LT",lastWeek:"[i] dddd[s kl.] LT",sameElse:"L"},relativeTime:{future:"om %s",past:"%s siden",s:"f\xe5 sekunder",ss:"%d sekunder",m:"et minut",mm:"%d minutter",h:"en time",hh:"%d timer",d:"en dag",dd:"%d dage",M:"en m\xe5ned",MM:"%d m\xe5neder",y:"et \xe5r",yy:"%d \xe5r"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(p(15439))},29459:function(qe,I,p){!function(o){"use strict";function e(D,g,E,T){var n={m:["eine Minute","einer Minute"],h:["eine Stunde","einer Stunde"],d:["ein Tag","einem Tag"],dd:[D+" Tage",D+" Tagen"],w:["eine Woche","einer Woche"],M:["ein Monat","einem Monat"],MM:[D+" Monate",D+" Monaten"],y:["ein Jahr","einem Jahr"],yy:[D+" Jahre",D+" Jahren"]};return g?n[E][0]:n[E][1]}o.defineLocale("de-at",{months:"J\xe4nner_Februar_M\xe4rz_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"J\xe4n._Feb._M\xe4rz_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.".split("_"),monthsParseExact:!0,weekdays:"Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag".split("_"),weekdaysShort:"So._Mo._Di._Mi._Do._Fr._Sa.".split("_"),weekdaysMin:"So_Mo_Di_Mi_Do_Fr_Sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY HH:mm",LLLL:"dddd, D. MMMM YYYY HH:mm"},calendar:{sameDay:"[heute um] LT [Uhr]",sameElse:"L",nextDay:"[morgen um] LT [Uhr]",nextWeek:"dddd [um] LT [Uhr]",lastDay:"[gestern um] LT [Uhr]",lastWeek:"[letzten] dddd [um] LT [Uhr]"},relativeTime:{future:"in %s",past:"vor %s",s:"ein paar Sekunden",ss:"%d Sekunden",m:e,mm:"%d Minuten",h:e,hh:"%d Stunden",d:e,dd:e,w:e,ww:"%d Wochen",M:e,MM:e,y:e,yy:e},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(p(15439))},73694:function(qe,I,p){!function(o){"use strict";function e(D,g,E,T){var n={m:["eine Minute","einer Minute"],h:["eine Stunde","einer Stunde"],d:["ein Tag","einem Tag"],dd:[D+" Tage",D+" Tagen"],w:["eine Woche","einer Woche"],M:["ein Monat","einem Monat"],MM:[D+" Monate",D+" Monaten"],y:["ein Jahr","einem Jahr"],yy:[D+" Jahre",D+" Jahren"]};return g?n[E][0]:n[E][1]}o.defineLocale("de-ch",{months:"Januar_Februar_M\xe4rz_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"Jan._Feb._M\xe4rz_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.".split("_"),monthsParseExact:!0,weekdays:"Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag".split("_"),weekdaysShort:"So_Mo_Di_Mi_Do_Fr_Sa".split("_"),weekdaysMin:"So_Mo_Di_Mi_Do_Fr_Sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY HH:mm",LLLL:"dddd, D. MMMM YYYY HH:mm"},calendar:{sameDay:"[heute um] LT [Uhr]",sameElse:"L",nextDay:"[morgen um] LT [Uhr]",nextWeek:"dddd [um] LT [Uhr]",lastDay:"[gestern um] LT [Uhr]",lastWeek:"[letzten] dddd [um] LT [Uhr]"},relativeTime:{future:"in %s",past:"vor %s",s:"ein paar Sekunden",ss:"%d Sekunden",m:e,mm:"%d Minuten",h:e,hh:"%d Stunden",d:e,dd:e,w:e,ww:"%d Wochen",M:e,MM:e,y:e,yy:e},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(p(15439))},54307:function(qe,I,p){!function(o){"use strict";function e(D,g,E,T){var n={m:["eine Minute","einer Minute"],h:["eine Stunde","einer Stunde"],d:["ein Tag","einem Tag"],dd:[D+" Tage",D+" Tagen"],w:["eine Woche","einer Woche"],M:["ein Monat","einem Monat"],MM:[D+" Monate",D+" Monaten"],y:["ein Jahr","einem Jahr"],yy:[D+" Jahre",D+" Jahren"]};return g?n[E][0]:n[E][1]}o.defineLocale("de",{months:"Januar_Februar_M\xe4rz_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"Jan._Feb._M\xe4rz_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.".split("_"),monthsParseExact:!0,weekdays:"Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag".split("_"),weekdaysShort:"So._Mo._Di._Mi._Do._Fr._Sa.".split("_"),weekdaysMin:"So_Mo_Di_Mi_Do_Fr_Sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY HH:mm",LLLL:"dddd, D. MMMM YYYY HH:mm"},calendar:{sameDay:"[heute um] LT [Uhr]",sameElse:"L",nextDay:"[morgen um] LT [Uhr]",nextWeek:"dddd [um] LT [Uhr]",lastDay:"[gestern um] LT [Uhr]",lastWeek:"[letzten] dddd [um] LT [Uhr]"},relativeTime:{future:"in %s",past:"vor %s",s:"ein paar Sekunden",ss:"%d Sekunden",m:e,mm:"%d Minuten",h:e,hh:"%d Stunden",d:e,dd:e,w:e,ww:"%d Wochen",M:e,MM:e,y:e,yy:e},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(p(15439))},39659:function(qe,I,p){!function(o){"use strict";var e=["\u0796\u07ac\u0782\u07aa\u0787\u07a6\u0783\u07a9","\u078a\u07ac\u0784\u07b0\u0783\u07aa\u0787\u07a6\u0783\u07a9","\u0789\u07a7\u0783\u07a8\u0797\u07aa","\u0787\u07ad\u0795\u07b0\u0783\u07a9\u078d\u07aa","\u0789\u07ad","\u0796\u07ab\u0782\u07b0","\u0796\u07aa\u078d\u07a6\u0787\u07a8","\u0787\u07af\u078e\u07a6\u0790\u07b0\u0793\u07aa","\u0790\u07ac\u0795\u07b0\u0793\u07ac\u0789\u07b0\u0784\u07a6\u0783\u07aa","\u0787\u07ae\u0786\u07b0\u0793\u07af\u0784\u07a6\u0783\u07aa","\u0782\u07ae\u0788\u07ac\u0789\u07b0\u0784\u07a6\u0783\u07aa","\u0791\u07a8\u0790\u07ac\u0789\u07b0\u0784\u07a6\u0783\u07aa"],l=["\u0787\u07a7\u078b\u07a8\u0787\u07b0\u078c\u07a6","\u0780\u07af\u0789\u07a6","\u0787\u07a6\u0782\u07b0\u078e\u07a7\u0783\u07a6","\u0784\u07aa\u078b\u07a6","\u0784\u07aa\u0783\u07a7\u0790\u07b0\u078a\u07a6\u078c\u07a8","\u0780\u07aa\u0786\u07aa\u0783\u07aa","\u0780\u07ae\u0782\u07a8\u0780\u07a8\u0783\u07aa"];o.defineLocale("dv",{months:e,monthsShort:e,weekdays:l,weekdaysShort:l,weekdaysMin:"\u0787\u07a7\u078b\u07a8_\u0780\u07af\u0789\u07a6_\u0787\u07a6\u0782\u07b0_\u0784\u07aa\u078b\u07a6_\u0784\u07aa\u0783\u07a7_\u0780\u07aa\u0786\u07aa_\u0780\u07ae\u0782\u07a8".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"D/M/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},meridiemParse:/\u0789\u0786|\u0789\u078a/,isPM:function(g){return"\u0789\u078a"===g},meridiem:function(g,E,T){return g<12?"\u0789\u0786":"\u0789\u078a"},calendar:{sameDay:"[\u0789\u07a8\u0787\u07a6\u078b\u07aa] LT",nextDay:"[\u0789\u07a7\u078b\u07a6\u0789\u07a7] LT",nextWeek:"dddd LT",lastDay:"[\u0787\u07a8\u0787\u07b0\u0794\u07ac] LT",lastWeek:"[\u078a\u07a7\u0787\u07a8\u078c\u07aa\u0788\u07a8] dddd LT",sameElse:"L"},relativeTime:{future:"\u078c\u07ac\u0783\u07ad\u078e\u07a6\u0787\u07a8 %s",past:"\u0786\u07aa\u0783\u07a8\u0782\u07b0 %s",s:"\u0790\u07a8\u0786\u07aa\u0782\u07b0\u078c\u07aa\u0786\u07ae\u0785\u07ac\u0787\u07b0",ss:"d% \u0790\u07a8\u0786\u07aa\u0782\u07b0\u078c\u07aa",m:"\u0789\u07a8\u0782\u07a8\u0793\u07ac\u0787\u07b0",mm:"\u0789\u07a8\u0782\u07a8\u0793\u07aa %d",h:"\u078e\u07a6\u0791\u07a8\u0787\u07a8\u0783\u07ac\u0787\u07b0",hh:"\u078e\u07a6\u0791\u07a8\u0787\u07a8\u0783\u07aa %d",d:"\u078b\u07aa\u0788\u07a6\u0780\u07ac\u0787\u07b0",dd:"\u078b\u07aa\u0788\u07a6\u0790\u07b0 %d",M:"\u0789\u07a6\u0780\u07ac\u0787\u07b0",MM:"\u0789\u07a6\u0790\u07b0 %d",y:"\u0787\u07a6\u0780\u07a6\u0783\u07ac\u0787\u07b0",yy:"\u0787\u07a6\u0780\u07a6\u0783\u07aa %d"},preparse:function(g){return g.replace(/\u060c/g,",")},postformat:function(g){return g.replace(/,/g,"\u060c")},week:{dow:7,doy:12}})}(p(15439))},3460:function(qe,I,p){!function(o){"use strict";function e(D){return typeof Function<"u"&&D instanceof Function||"[object Function]"===Object.prototype.toString.call(D)}o.defineLocale("el",{monthsNominativeEl:"\u0399\u03b1\u03bd\u03bf\u03c5\u03ac\u03c1\u03b9\u03bf\u03c2_\u03a6\u03b5\u03b2\u03c1\u03bf\u03c5\u03ac\u03c1\u03b9\u03bf\u03c2_\u039c\u03ac\u03c1\u03c4\u03b9\u03bf\u03c2_\u0391\u03c0\u03c1\u03af\u03bb\u03b9\u03bf\u03c2_\u039c\u03ac\u03b9\u03bf\u03c2_\u0399\u03bf\u03cd\u03bd\u03b9\u03bf\u03c2_\u0399\u03bf\u03cd\u03bb\u03b9\u03bf\u03c2_\u0391\u03cd\u03b3\u03bf\u03c5\u03c3\u03c4\u03bf\u03c2_\u03a3\u03b5\u03c0\u03c4\u03ad\u03bc\u03b2\u03c1\u03b9\u03bf\u03c2_\u039f\u03ba\u03c4\u03ce\u03b2\u03c1\u03b9\u03bf\u03c2_\u039d\u03bf\u03ad\u03bc\u03b2\u03c1\u03b9\u03bf\u03c2_\u0394\u03b5\u03ba\u03ad\u03bc\u03b2\u03c1\u03b9\u03bf\u03c2".split("_"),monthsGenitiveEl:"\u0399\u03b1\u03bd\u03bf\u03c5\u03b1\u03c1\u03af\u03bf\u03c5_\u03a6\u03b5\u03b2\u03c1\u03bf\u03c5\u03b1\u03c1\u03af\u03bf\u03c5_\u039c\u03b1\u03c1\u03c4\u03af\u03bf\u03c5_\u0391\u03c0\u03c1\u03b9\u03bb\u03af\u03bf\u03c5_\u039c\u03b1\u0390\u03bf\u03c5_\u0399\u03bf\u03c5\u03bd\u03af\u03bf\u03c5_\u0399\u03bf\u03c5\u03bb\u03af\u03bf\u03c5_\u0391\u03c5\u03b3\u03bf\u03cd\u03c3\u03c4\u03bf\u03c5_\u03a3\u03b5\u03c0\u03c4\u03b5\u03bc\u03b2\u03c1\u03af\u03bf\u03c5_\u039f\u03ba\u03c4\u03c9\u03b2\u03c1\u03af\u03bf\u03c5_\u039d\u03bf\u03b5\u03bc\u03b2\u03c1\u03af\u03bf\u03c5_\u0394\u03b5\u03ba\u03b5\u03bc\u03b2\u03c1\u03af\u03bf\u03c5".split("_"),months:function(D,g){return D?"string"==typeof g&&/D/.test(g.substring(0,g.indexOf("MMMM")))?this._monthsGenitiveEl[D.month()]:this._monthsNominativeEl[D.month()]:this._monthsNominativeEl},monthsShort:"\u0399\u03b1\u03bd_\u03a6\u03b5\u03b2_\u039c\u03b1\u03c1_\u0391\u03c0\u03c1_\u039c\u03b1\u03ca_\u0399\u03bf\u03c5\u03bd_\u0399\u03bf\u03c5\u03bb_\u0391\u03c5\u03b3_\u03a3\u03b5\u03c0_\u039f\u03ba\u03c4_\u039d\u03bf\u03b5_\u0394\u03b5\u03ba".split("_"),weekdays:"\u039a\u03c5\u03c1\u03b9\u03b1\u03ba\u03ae_\u0394\u03b5\u03c5\u03c4\u03ad\u03c1\u03b1_\u03a4\u03c1\u03af\u03c4\u03b7_\u03a4\u03b5\u03c4\u03ac\u03c1\u03c4\u03b7_\u03a0\u03ad\u03bc\u03c0\u03c4\u03b7_\u03a0\u03b1\u03c1\u03b1\u03c3\u03ba\u03b5\u03c5\u03ae_\u03a3\u03ac\u03b2\u03b2\u03b1\u03c4\u03bf".split("_"),weekdaysShort:"\u039a\u03c5\u03c1_\u0394\u03b5\u03c5_\u03a4\u03c1\u03b9_\u03a4\u03b5\u03c4_\u03a0\u03b5\u03bc_\u03a0\u03b1\u03c1_\u03a3\u03b1\u03b2".split("_"),weekdaysMin:"\u039a\u03c5_\u0394\u03b5_\u03a4\u03c1_\u03a4\u03b5_\u03a0\u03b5_\u03a0\u03b1_\u03a3\u03b1".split("_"),meridiem:function(D,g,E){return D>11?E?"\u03bc\u03bc":"\u039c\u039c":E?"\u03c0\u03bc":"\u03a0\u039c"},isPM:function(D){return"\u03bc"===(D+"").toLowerCase()[0]},meridiemParse:/[\u03a0\u039c]\.?\u039c?\.?/i,longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendarEl:{sameDay:"[\u03a3\u03ae\u03bc\u03b5\u03c1\u03b1 {}] LT",nextDay:"[\u0391\u03cd\u03c1\u03b9\u03bf {}] LT",nextWeek:"dddd [{}] LT",lastDay:"[\u03a7\u03b8\u03b5\u03c2 {}] LT",lastWeek:function(){return 6===this.day()?"[\u03c4\u03bf \u03c0\u03c1\u03bf\u03b7\u03b3\u03bf\u03cd\u03bc\u03b5\u03bd\u03bf] dddd [{}] LT":"[\u03c4\u03b7\u03bd \u03c0\u03c1\u03bf\u03b7\u03b3\u03bf\u03cd\u03bc\u03b5\u03bd\u03b7] dddd [{}] LT"},sameElse:"L"},calendar:function(D,g){var E=this._calendarEl[D],T=g&&g.hours();return e(E)&&(E=E.apply(g)),E.replace("{}",T%12==1?"\u03c3\u03c4\u03b7":"\u03c3\u03c4\u03b9\u03c2")},relativeTime:{future:"\u03c3\u03b5 %s",past:"%s \u03c0\u03c1\u03b9\u03bd",s:"\u03bb\u03af\u03b3\u03b1 \u03b4\u03b5\u03c5\u03c4\u03b5\u03c1\u03cc\u03bb\u03b5\u03c0\u03c4\u03b1",ss:"%d \u03b4\u03b5\u03c5\u03c4\u03b5\u03c1\u03cc\u03bb\u03b5\u03c0\u03c4\u03b1",m:"\u03ad\u03bd\u03b1 \u03bb\u03b5\u03c0\u03c4\u03cc",mm:"%d \u03bb\u03b5\u03c0\u03c4\u03ac",h:"\u03bc\u03af\u03b1 \u03ce\u03c1\u03b1",hh:"%d \u03ce\u03c1\u03b5\u03c2",d:"\u03bc\u03af\u03b1 \u03bc\u03ad\u03c1\u03b1",dd:"%d \u03bc\u03ad\u03c1\u03b5\u03c2",M:"\u03ad\u03bd\u03b1\u03c2 \u03bc\u03ae\u03bd\u03b1\u03c2",MM:"%d \u03bc\u03ae\u03bd\u03b5\u03c2",y:"\u03ad\u03bd\u03b1\u03c2 \u03c7\u03c1\u03cc\u03bd\u03bf\u03c2",yy:"%d \u03c7\u03c1\u03cc\u03bd\u03b9\u03b1"},dayOfMonthOrdinalParse:/\d{1,2}\u03b7/,ordinal:"%d\u03b7",week:{dow:1,doy:4}})}(p(15439))},94369:function(qe,I,p){!function(o){"use strict";o.defineLocale("en-au",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(l){var D=l%10;return l+(1==~~(l%100/10)?"th":1===D?"st":2===D?"nd":3===D?"rd":"th")},week:{dow:0,doy:4}})}(p(15439))},60530:function(qe,I,p){!function(o){"use strict";o.defineLocale("en-ca",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"YYYY-MM-DD",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(l){var D=l%10;return l+(1==~~(l%100/10)?"th":1===D?"st":2===D?"nd":3===D?"rd":"th")}})}(p(15439))},9998:function(qe,I,p){!function(o){"use strict";o.defineLocale("en-gb",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(l){var D=l%10;return l+(1==~~(l%100/10)?"th":1===D?"st":2===D?"nd":3===D?"rd":"th")},week:{dow:1,doy:4}})}(p(15439))},13391:function(qe,I,p){!function(o){"use strict";o.defineLocale("en-ie",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(l){var D=l%10;return l+(1==~~(l%100/10)?"th":1===D?"st":2===D?"nd":3===D?"rd":"th")},week:{dow:1,doy:4}})}(p(15439))},75414:function(qe,I,p){!function(o){"use strict";o.defineLocale("en-il",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(l){var D=l%10;return l+(1==~~(l%100/10)?"th":1===D?"st":2===D?"nd":3===D?"rd":"th")}})}(p(15439))},19615:function(qe,I,p){!function(o){"use strict";o.defineLocale("en-in",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(l){var D=l%10;return l+(1==~~(l%100/10)?"th":1===D?"st":2===D?"nd":3===D?"rd":"th")},week:{dow:0,doy:6}})}(p(15439))},21248:function(qe,I,p){!function(o){"use strict";o.defineLocale("en-nz",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(l){var D=l%10;return l+(1==~~(l%100/10)?"th":1===D?"st":2===D?"nd":3===D?"rd":"th")},week:{dow:1,doy:4}})}(p(15439))},13767:function(qe,I,p){!function(o){"use strict";o.defineLocale("en-sg",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(l){var D=l%10;return l+(1==~~(l%100/10)?"th":1===D?"st":2===D?"nd":3===D?"rd":"th")},week:{dow:1,doy:4}})}(p(15439))},84530:function(qe,I,p){!function(o){"use strict";o.defineLocale("eo",{months:"januaro_februaro_marto_aprilo_majo_junio_julio_a\u016dgusto_septembro_oktobro_novembro_decembro".split("_"),monthsShort:"jan_feb_mart_apr_maj_jun_jul_a\u016dg_sept_okt_nov_dec".split("_"),weekdays:"diman\u0109o_lundo_mardo_merkredo_\u0135a\u016ddo_vendredo_sabato".split("_"),weekdaysShort:"dim_lun_mard_merk_\u0135a\u016d_ven_sab".split("_"),weekdaysMin:"di_lu_ma_me_\u0135a_ve_sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"[la] D[-an de] MMMM, YYYY",LLL:"[la] D[-an de] MMMM, YYYY HH:mm",LLLL:"dddd[n], [la] D[-an de] MMMM, YYYY HH:mm",llll:"ddd, [la] D[-an de] MMM, YYYY HH:mm"},meridiemParse:/[ap]\.t\.m/i,isPM:function(l){return"p"===l.charAt(0).toLowerCase()},meridiem:function(l,D,g){return l>11?g?"p.t.m.":"P.T.M.":g?"a.t.m.":"A.T.M."},calendar:{sameDay:"[Hodia\u016d je] LT",nextDay:"[Morga\u016d je] LT",nextWeek:"dddd[n je] LT",lastDay:"[Hiera\u016d je] LT",lastWeek:"[pasintan] dddd[n je] LT",sameElse:"L"},relativeTime:{future:"post %s",past:"anta\u016d %s",s:"kelkaj sekundoj",ss:"%d sekundoj",m:"unu minuto",mm:"%d minutoj",h:"unu horo",hh:"%d horoj",d:"unu tago",dd:"%d tagoj",M:"unu monato",MM:"%d monatoj",y:"unu jaro",yy:"%d jaroj"},dayOfMonthOrdinalParse:/\d{1,2}a/,ordinal:"%da",week:{dow:1,doy:7}})}(p(15439))},18944:function(qe,I,p){!function(o){"use strict";var e="ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.".split("_"),l="ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic".split("_"),D=[/^ene/i,/^feb/i,/^mar/i,/^abr/i,/^may/i,/^jun/i,/^jul/i,/^ago/i,/^sep/i,/^oct/i,/^nov/i,/^dic/i],g=/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i;o.defineLocale("es-do",{months:"enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre".split("_"),monthsShort:function(T,n){return T?/-MMM-/.test(n)?l[T.month()]:e[T.month()]:e},monthsRegex:g,monthsShortRegex:g,monthsStrictRegex:/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,monthsShortStrictRegex:/^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,monthsParse:D,longMonthsParse:D,shortMonthsParse:D,weekdays:"domingo_lunes_martes_mi\xe9rcoles_jueves_viernes_s\xe1bado".split("_"),weekdaysShort:"dom._lun._mar._mi\xe9._jue._vie._s\xe1b.".split("_"),weekdaysMin:"do_lu_ma_mi_ju_vi_s\xe1".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY h:mm A",LLLL:"dddd, D [de] MMMM [de] YYYY h:mm A"},calendar:{sameDay:function(){return"[hoy a la"+(1!==this.hours()?"s":"")+"] LT"},nextDay:function(){return"[ma\xf1ana a la"+(1!==this.hours()?"s":"")+"] LT"},nextWeek:function(){return"dddd [a la"+(1!==this.hours()?"s":"")+"] LT"},lastDay:function(){return"[ayer a la"+(1!==this.hours()?"s":"")+"] LT"},lastWeek:function(){return"[el] dddd [pasado a la"+(1!==this.hours()?"s":"")+"] LT"},sameElse:"L"},relativeTime:{future:"en %s",past:"hace %s",s:"unos segundos",ss:"%d segundos",m:"un minuto",mm:"%d minutos",h:"una hora",hh:"%d horas",d:"un d\xeda",dd:"%d d\xedas",w:"una semana",ww:"%d semanas",M:"un mes",MM:"%d meses",y:"un a\xf1o",yy:"%d a\xf1os"},dayOfMonthOrdinalParse:/\d{1,2}\xba/,ordinal:"%d\xba",week:{dow:1,doy:4}})}(p(15439))},29116:function(qe,I,p){!function(o){"use strict";var e="ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.".split("_"),l="ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic".split("_"),D=[/^ene/i,/^feb/i,/^mar/i,/^abr/i,/^may/i,/^jun/i,/^jul/i,/^ago/i,/^sep/i,/^oct/i,/^nov/i,/^dic/i],g=/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i;o.defineLocale("es-mx",{months:"enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre".split("_"),monthsShort:function(T,n){return T?/-MMM-/.test(n)?l[T.month()]:e[T.month()]:e},monthsRegex:g,monthsShortRegex:g,monthsStrictRegex:/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,monthsShortStrictRegex:/^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,monthsParse:D,longMonthsParse:D,shortMonthsParse:D,weekdays:"domingo_lunes_martes_mi\xe9rcoles_jueves_viernes_s\xe1bado".split("_"),weekdaysShort:"dom._lun._mar._mi\xe9._jue._vie._s\xe1b.".split("_"),weekdaysMin:"do_lu_ma_mi_ju_vi_s\xe1".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY H:mm",LLLL:"dddd, D [de] MMMM [de] YYYY H:mm"},calendar:{sameDay:function(){return"[hoy a la"+(1!==this.hours()?"s":"")+"] LT"},nextDay:function(){return"[ma\xf1ana a la"+(1!==this.hours()?"s":"")+"] LT"},nextWeek:function(){return"dddd [a la"+(1!==this.hours()?"s":"")+"] LT"},lastDay:function(){return"[ayer a la"+(1!==this.hours()?"s":"")+"] LT"},lastWeek:function(){return"[el] dddd [pasado a la"+(1!==this.hours()?"s":"")+"] LT"},sameElse:"L"},relativeTime:{future:"en %s",past:"hace %s",s:"unos segundos",ss:"%d segundos",m:"un minuto",mm:"%d minutos",h:"una hora",hh:"%d horas",d:"un d\xeda",dd:"%d d\xedas",w:"una semana",ww:"%d semanas",M:"un mes",MM:"%d meses",y:"un a\xf1o",yy:"%d a\xf1os"},dayOfMonthOrdinalParse:/\d{1,2}\xba/,ordinal:"%d\xba",week:{dow:0,doy:4},invalidDate:"Fecha inv\xe1lida"})}(p(15439))},83609:function(qe,I,p){!function(o){"use strict";var e="ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.".split("_"),l="ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic".split("_"),D=[/^ene/i,/^feb/i,/^mar/i,/^abr/i,/^may/i,/^jun/i,/^jul/i,/^ago/i,/^sep/i,/^oct/i,/^nov/i,/^dic/i],g=/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i;o.defineLocale("es-us",{months:"enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre".split("_"),monthsShort:function(T,n){return T?/-MMM-/.test(n)?l[T.month()]:e[T.month()]:e},monthsRegex:g,monthsShortRegex:g,monthsStrictRegex:/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,monthsShortStrictRegex:/^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,monthsParse:D,longMonthsParse:D,shortMonthsParse:D,weekdays:"domingo_lunes_martes_mi\xe9rcoles_jueves_viernes_s\xe1bado".split("_"),weekdaysShort:"dom._lun._mar._mi\xe9._jue._vie._s\xe1b.".split("_"),weekdaysMin:"do_lu_ma_mi_ju_vi_s\xe1".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"MM/DD/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY h:mm A",LLLL:"dddd, D [de] MMMM [de] YYYY h:mm A"},calendar:{sameDay:function(){return"[hoy a la"+(1!==this.hours()?"s":"")+"] LT"},nextDay:function(){return"[ma\xf1ana a la"+(1!==this.hours()?"s":"")+"] LT"},nextWeek:function(){return"dddd [a la"+(1!==this.hours()?"s":"")+"] LT"},lastDay:function(){return"[ayer a la"+(1!==this.hours()?"s":"")+"] LT"},lastWeek:function(){return"[el] dddd [pasado a la"+(1!==this.hours()?"s":"")+"] LT"},sameElse:"L"},relativeTime:{future:"en %s",past:"hace %s",s:"unos segundos",ss:"%d segundos",m:"un minuto",mm:"%d minutos",h:"una hora",hh:"%d horas",d:"un d\xeda",dd:"%d d\xedas",w:"una semana",ww:"%d semanas",M:"un mes",MM:"%d meses",y:"un a\xf1o",yy:"%d a\xf1os"},dayOfMonthOrdinalParse:/\d{1,2}\xba/,ordinal:"%d\xba",week:{dow:0,doy:6}})}(p(15439))},86866:function(qe,I,p){!function(o){"use strict";var e="ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.".split("_"),l="ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic".split("_"),D=[/^ene/i,/^feb/i,/^mar/i,/^abr/i,/^may/i,/^jun/i,/^jul/i,/^ago/i,/^sep/i,/^oct/i,/^nov/i,/^dic/i],g=/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i;o.defineLocale("es",{months:"enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre".split("_"),monthsShort:function(T,n){return T?/-MMM-/.test(n)?l[T.month()]:e[T.month()]:e},monthsRegex:g,monthsShortRegex:g,monthsStrictRegex:/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,monthsShortStrictRegex:/^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,monthsParse:D,longMonthsParse:D,shortMonthsParse:D,weekdays:"domingo_lunes_martes_mi\xe9rcoles_jueves_viernes_s\xe1bado".split("_"),weekdaysShort:"dom._lun._mar._mi\xe9._jue._vie._s\xe1b.".split("_"),weekdaysMin:"do_lu_ma_mi_ju_vi_s\xe1".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY H:mm",LLLL:"dddd, D [de] MMMM [de] YYYY H:mm"},calendar:{sameDay:function(){return"[hoy a la"+(1!==this.hours()?"s":"")+"] LT"},nextDay:function(){return"[ma\xf1ana a la"+(1!==this.hours()?"s":"")+"] LT"},nextWeek:function(){return"dddd [a la"+(1!==this.hours()?"s":"")+"] LT"},lastDay:function(){return"[ayer a la"+(1!==this.hours()?"s":"")+"] LT"},lastWeek:function(){return"[el] dddd [pasado a la"+(1!==this.hours()?"s":"")+"] LT"},sameElse:"L"},relativeTime:{future:"en %s",past:"hace %s",s:"unos segundos",ss:"%d segundos",m:"un minuto",mm:"%d minutos",h:"una hora",hh:"%d horas",d:"un d\xeda",dd:"%d d\xedas",w:"una semana",ww:"%d semanas",M:"un mes",MM:"%d meses",y:"un a\xf1o",yy:"%d a\xf1os"},dayOfMonthOrdinalParse:/\d{1,2}\xba/,ordinal:"%d\xba",week:{dow:1,doy:4},invalidDate:"Fecha inv\xe1lida"})}(p(15439))},96725:function(qe,I,p){!function(o){"use strict";function e(D,g,E,T){var n={s:["m\xf5ne sekundi","m\xf5ni sekund","paar sekundit"],ss:[D+"sekundi",D+"sekundit"],m:["\xfche minuti","\xfcks minut"],mm:[D+" minuti",D+" minutit"],h:["\xfche tunni","tund aega","\xfcks tund"],hh:[D+" tunni",D+" tundi"],d:["\xfche p\xe4eva","\xfcks p\xe4ev"],M:["kuu aja","kuu aega","\xfcks kuu"],MM:[D+" kuu",D+" kuud"],y:["\xfche aasta","aasta","\xfcks aasta"],yy:[D+" aasta",D+" aastat"]};return g?n[E][2]?n[E][2]:n[E][1]:T?n[E][0]:n[E][1]}o.defineLocale("et",{months:"jaanuar_veebruar_m\xe4rts_aprill_mai_juuni_juuli_august_september_oktoober_november_detsember".split("_"),monthsShort:"jaan_veebr_m\xe4rts_apr_mai_juuni_juuli_aug_sept_okt_nov_dets".split("_"),weekdays:"p\xfchap\xe4ev_esmasp\xe4ev_teisip\xe4ev_kolmap\xe4ev_neljap\xe4ev_reede_laup\xe4ev".split("_"),weekdaysShort:"P_E_T_K_N_R_L".split("_"),weekdaysMin:"P_E_T_K_N_R_L".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd, D. MMMM YYYY H:mm"},calendar:{sameDay:"[T\xe4na,] LT",nextDay:"[Homme,] LT",nextWeek:"[J\xe4rgmine] dddd LT",lastDay:"[Eile,] LT",lastWeek:"[Eelmine] dddd LT",sameElse:"L"},relativeTime:{future:"%s p\xe4rast",past:"%s tagasi",s:e,ss:e,m:e,mm:e,h:e,hh:e,d:e,dd:"%d p\xe4eva",M:e,MM:e,y:e,yy:e},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(p(15439))},67931:function(qe,I,p){!function(o){"use strict";o.defineLocale("eu",{months:"urtarrila_otsaila_martxoa_apirila_maiatza_ekaina_uztaila_abuztua_iraila_urria_azaroa_abendua".split("_"),monthsShort:"urt._ots._mar._api._mai._eka._uzt._abu._ira._urr._aza._abe.".split("_"),monthsParseExact:!0,weekdays:"igandea_astelehena_asteartea_asteazkena_osteguna_ostirala_larunbata".split("_"),weekdaysShort:"ig._al._ar._az._og._ol._lr.".split("_"),weekdaysMin:"ig_al_ar_az_og_ol_lr".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"YYYY[ko] MMMM[ren] D[a]",LLL:"YYYY[ko] MMMM[ren] D[a] HH:mm",LLLL:"dddd, YYYY[ko] MMMM[ren] D[a] HH:mm",l:"YYYY-M-D",ll:"YYYY[ko] MMM D[a]",lll:"YYYY[ko] MMM D[a] HH:mm",llll:"ddd, YYYY[ko] MMM D[a] HH:mm"},calendar:{sameDay:"[gaur] LT[etan]",nextDay:"[bihar] LT[etan]",nextWeek:"dddd LT[etan]",lastDay:"[atzo] LT[etan]",lastWeek:"[aurreko] dddd LT[etan]",sameElse:"L"},relativeTime:{future:"%s barru",past:"duela %s",s:"segundo batzuk",ss:"%d segundo",m:"minutu bat",mm:"%d minutu",h:"ordu bat",hh:"%d ordu",d:"egun bat",dd:"%d egun",M:"hilabete bat",MM:"%d hilabete",y:"urte bat",yy:"%d urte"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}})}(p(15439))},56417:function(qe,I,p){!function(o){"use strict";var e={1:"\u06f1",2:"\u06f2",3:"\u06f3",4:"\u06f4",5:"\u06f5",6:"\u06f6",7:"\u06f7",8:"\u06f8",9:"\u06f9",0:"\u06f0"},l={"\u06f1":"1","\u06f2":"2","\u06f3":"3","\u06f4":"4","\u06f5":"5","\u06f6":"6","\u06f7":"7","\u06f8":"8","\u06f9":"9","\u06f0":"0"};o.defineLocale("fa",{months:"\u0698\u0627\u0646\u0648\u06cc\u0647_\u0641\u0648\u0631\u06cc\u0647_\u0645\u0627\u0631\u0633_\u0622\u0648\u0631\u06cc\u0644_\u0645\u0647_\u0698\u0648\u0626\u0646_\u0698\u0648\u0626\u06cc\u0647_\u0627\u0648\u062a_\u0633\u067e\u062a\u0627\u0645\u0628\u0631_\u0627\u06a9\u062a\u0628\u0631_\u0646\u0648\u0627\u0645\u0628\u0631_\u062f\u0633\u0627\u0645\u0628\u0631".split("_"),monthsShort:"\u0698\u0627\u0646\u0648\u06cc\u0647_\u0641\u0648\u0631\u06cc\u0647_\u0645\u0627\u0631\u0633_\u0622\u0648\u0631\u06cc\u0644_\u0645\u0647_\u0698\u0648\u0626\u0646_\u0698\u0648\u0626\u06cc\u0647_\u0627\u0648\u062a_\u0633\u067e\u062a\u0627\u0645\u0628\u0631_\u0627\u06a9\u062a\u0628\u0631_\u0646\u0648\u0627\u0645\u0628\u0631_\u062f\u0633\u0627\u0645\u0628\u0631".split("_"),weekdays:"\u06cc\u06a9\u200c\u0634\u0646\u0628\u0647_\u062f\u0648\u0634\u0646\u0628\u0647_\u0633\u0647\u200c\u0634\u0646\u0628\u0647_\u0686\u0647\u0627\u0631\u0634\u0646\u0628\u0647_\u067e\u0646\u062c\u200c\u0634\u0646\u0628\u0647_\u062c\u0645\u0639\u0647_\u0634\u0646\u0628\u0647".split("_"),weekdaysShort:"\u06cc\u06a9\u200c\u0634\u0646\u0628\u0647_\u062f\u0648\u0634\u0646\u0628\u0647_\u0633\u0647\u200c\u0634\u0646\u0628\u0647_\u0686\u0647\u0627\u0631\u0634\u0646\u0628\u0647_\u067e\u0646\u062c\u200c\u0634\u0646\u0628\u0647_\u062c\u0645\u0639\u0647_\u0634\u0646\u0628\u0647".split("_"),weekdaysMin:"\u06cc_\u062f_\u0633_\u0686_\u067e_\u062c_\u0634".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},meridiemParse:/\u0642\u0628\u0644 \u0627\u0632 \u0638\u0647\u0631|\u0628\u0639\u062f \u0627\u0632 \u0638\u0647\u0631/,isPM:function(g){return/\u0628\u0639\u062f \u0627\u0632 \u0638\u0647\u0631/.test(g)},meridiem:function(g,E,T){return g<12?"\u0642\u0628\u0644 \u0627\u0632 \u0638\u0647\u0631":"\u0628\u0639\u062f \u0627\u0632 \u0638\u0647\u0631"},calendar:{sameDay:"[\u0627\u0645\u0631\u0648\u0632 \u0633\u0627\u0639\u062a] LT",nextDay:"[\u0641\u0631\u062f\u0627 \u0633\u0627\u0639\u062a] LT",nextWeek:"dddd [\u0633\u0627\u0639\u062a] LT",lastDay:"[\u062f\u06cc\u0631\u0648\u0632 \u0633\u0627\u0639\u062a] LT",lastWeek:"dddd [\u067e\u06cc\u0634] [\u0633\u0627\u0639\u062a] LT",sameElse:"L"},relativeTime:{future:"\u062f\u0631 %s",past:"%s \u067e\u06cc\u0634",s:"\u0686\u0646\u062f \u062b\u0627\u0646\u06cc\u0647",ss:"%d \u062b\u0627\u0646\u06cc\u0647",m:"\u06cc\u06a9 \u062f\u0642\u06cc\u0642\u0647",mm:"%d \u062f\u0642\u06cc\u0642\u0647",h:"\u06cc\u06a9 \u0633\u0627\u0639\u062a",hh:"%d \u0633\u0627\u0639\u062a",d:"\u06cc\u06a9 \u0631\u0648\u0632",dd:"%d \u0631\u0648\u0632",M:"\u06cc\u06a9 \u0645\u0627\u0647",MM:"%d \u0645\u0627\u0647",y:"\u06cc\u06a9 \u0633\u0627\u0644",yy:"%d \u0633\u0627\u0644"},preparse:function(g){return g.replace(/[\u06f0-\u06f9]/g,function(E){return l[E]}).replace(/\u060c/g,",")},postformat:function(g){return g.replace(/\d/g,function(E){return e[E]}).replace(/,/g,"\u060c")},dayOfMonthOrdinalParse:/\d{1,2}\u0645/,ordinal:"%d\u0645",week:{dow:6,doy:12}})}(p(15439))},20944:function(qe,I,p){!function(o){"use strict";var e="nolla yksi kaksi kolme nelj\xe4 viisi kuusi seitsem\xe4n kahdeksan yhdeks\xe4n".split(" "),l=["nolla","yhden","kahden","kolmen","nelj\xe4n","viiden","kuuden",e[7],e[8],e[9]];function D(T,n,P,w){var B="";switch(P){case"s":return w?"muutaman sekunnin":"muutama sekunti";case"ss":B=w?"sekunnin":"sekuntia";break;case"m":return w?"minuutin":"minuutti";case"mm":B=w?"minuutin":"minuuttia";break;case"h":return w?"tunnin":"tunti";case"hh":B=w?"tunnin":"tuntia";break;case"d":return w?"p\xe4iv\xe4n":"p\xe4iv\xe4";case"dd":B=w?"p\xe4iv\xe4n":"p\xe4iv\xe4\xe4";break;case"M":return w?"kuukauden":"kuukausi";case"MM":B=w?"kuukauden":"kuukautta";break;case"y":return w?"vuoden":"vuosi";case"yy":B=w?"vuoden":"vuotta"}return B=g(T,w)+" "+B}function g(T,n){return T<10?n?l[T]:e[T]:T}o.defineLocale("fi",{months:"tammikuu_helmikuu_maaliskuu_huhtikuu_toukokuu_kes\xe4kuu_hein\xe4kuu_elokuu_syyskuu_lokakuu_marraskuu_joulukuu".split("_"),monthsShort:"tammi_helmi_maalis_huhti_touko_kes\xe4_hein\xe4_elo_syys_loka_marras_joulu".split("_"),weekdays:"sunnuntai_maanantai_tiistai_keskiviikko_torstai_perjantai_lauantai".split("_"),weekdaysShort:"su_ma_ti_ke_to_pe_la".split("_"),weekdaysMin:"su_ma_ti_ke_to_pe_la".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD.MM.YYYY",LL:"Do MMMM[ta] YYYY",LLL:"Do MMMM[ta] YYYY, [klo] HH.mm",LLLL:"dddd, Do MMMM[ta] YYYY, [klo] HH.mm",l:"D.M.YYYY",ll:"Do MMM YYYY",lll:"Do MMM YYYY, [klo] HH.mm",llll:"ddd, Do MMM YYYY, [klo] HH.mm"},calendar:{sameDay:"[t\xe4n\xe4\xe4n] [klo] LT",nextDay:"[huomenna] [klo] LT",nextWeek:"dddd [klo] LT",lastDay:"[eilen] [klo] LT",lastWeek:"[viime] dddd[na] [klo] LT",sameElse:"L"},relativeTime:{future:"%s p\xe4\xe4st\xe4",past:"%s sitten",s:D,ss:D,m:D,mm:D,h:D,hh:D,d:D,dd:D,M:D,MM:D,y:D,yy:D},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(p(15439))},61766:function(qe,I,p){!function(o){"use strict";o.defineLocale("fil",{months:"Enero_Pebrero_Marso_Abril_Mayo_Hunyo_Hulyo_Agosto_Setyembre_Oktubre_Nobyembre_Disyembre".split("_"),monthsShort:"Ene_Peb_Mar_Abr_May_Hun_Hul_Ago_Set_Okt_Nob_Dis".split("_"),weekdays:"Linggo_Lunes_Martes_Miyerkules_Huwebes_Biyernes_Sabado".split("_"),weekdaysShort:"Lin_Lun_Mar_Miy_Huw_Biy_Sab".split("_"),weekdaysMin:"Li_Lu_Ma_Mi_Hu_Bi_Sab".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"MM/D/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY HH:mm",LLLL:"dddd, MMMM DD, YYYY HH:mm"},calendar:{sameDay:"LT [ngayong araw]",nextDay:"[Bukas ng] LT",nextWeek:"LT [sa susunod na] dddd",lastDay:"LT [kahapon]",lastWeek:"LT [noong nakaraang] dddd",sameElse:"L"},relativeTime:{future:"sa loob ng %s",past:"%s ang nakalipas",s:"ilang segundo",ss:"%d segundo",m:"isang minuto",mm:"%d minuto",h:"isang oras",hh:"%d oras",d:"isang araw",dd:"%d araw",M:"isang buwan",MM:"%d buwan",y:"isang taon",yy:"%d taon"},dayOfMonthOrdinalParse:/\d{1,2}/,ordinal:function(l){return l},week:{dow:1,doy:4}})}(p(15439))},95867:function(qe,I,p){!function(o){"use strict";o.defineLocale("fo",{months:"januar_februar_mars_apr\xedl_mai_juni_juli_august_september_oktober_november_desember".split("_"),monthsShort:"jan_feb_mar_apr_mai_jun_jul_aug_sep_okt_nov_des".split("_"),weekdays:"sunnudagur_m\xe1nadagur_t\xfdsdagur_mikudagur_h\xf3sdagur_fr\xedggjadagur_leygardagur".split("_"),weekdaysShort:"sun_m\xe1n_t\xfds_mik_h\xf3s_fr\xed_ley".split("_"),weekdaysMin:"su_m\xe1_t\xfd_mi_h\xf3_fr_le".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D. MMMM, YYYY HH:mm"},calendar:{sameDay:"[\xcd dag kl.] LT",nextDay:"[\xcd morgin kl.] LT",nextWeek:"dddd [kl.] LT",lastDay:"[\xcd gj\xe1r kl.] LT",lastWeek:"[s\xed\xf0stu] dddd [kl] LT",sameElse:"L"},relativeTime:{future:"um %s",past:"%s s\xed\xf0ani",s:"f\xe1 sekund",ss:"%d sekundir",m:"ein minuttur",mm:"%d minuttir",h:"ein t\xedmi",hh:"%d t\xedmar",d:"ein dagur",dd:"%d dagar",M:"ein m\xe1na\xf0ur",MM:"%d m\xe1na\xf0ir",y:"eitt \xe1r",yy:"%d \xe1r"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(p(15439))},16848:function(qe,I,p){!function(o){"use strict";o.defineLocale("fr-ca",{months:"janvier_f\xe9vrier_mars_avril_mai_juin_juillet_ao\xfbt_septembre_octobre_novembre_d\xe9cembre".split("_"),monthsShort:"janv._f\xe9vr._mars_avr._mai_juin_juil._ao\xfbt_sept._oct._nov._d\xe9c.".split("_"),monthsParseExact:!0,weekdays:"dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi".split("_"),weekdaysShort:"dim._lun._mar._mer._jeu._ven._sam.".split("_"),weekdaysMin:"di_lu_ma_me_je_ve_sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[Aujourd\u2019hui \xe0] LT",nextDay:"[Demain \xe0] LT",nextWeek:"dddd [\xe0] LT",lastDay:"[Hier \xe0] LT",lastWeek:"dddd [dernier \xe0] LT",sameElse:"L"},relativeTime:{future:"dans %s",past:"il y a %s",s:"quelques secondes",ss:"%d secondes",m:"une minute",mm:"%d minutes",h:"une heure",hh:"%d heures",d:"un jour",dd:"%d jours",M:"un mois",MM:"%d mois",y:"un an",yy:"%d ans"},dayOfMonthOrdinalParse:/\d{1,2}(er|e)/,ordinal:function(l,D){switch(D){default:case"M":case"Q":case"D":case"DDD":case"d":return l+(1===l?"er":"e");case"w":case"W":return l+(1===l?"re":"e")}}})}(p(15439))},77773:function(qe,I,p){!function(o){"use strict";o.defineLocale("fr-ch",{months:"janvier_f\xe9vrier_mars_avril_mai_juin_juillet_ao\xfbt_septembre_octobre_novembre_d\xe9cembre".split("_"),monthsShort:"janv._f\xe9vr._mars_avr._mai_juin_juil._ao\xfbt_sept._oct._nov._d\xe9c.".split("_"),monthsParseExact:!0,weekdays:"dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi".split("_"),weekdaysShort:"dim._lun._mar._mer._jeu._ven._sam.".split("_"),weekdaysMin:"di_lu_ma_me_je_ve_sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[Aujourd\u2019hui \xe0] LT",nextDay:"[Demain \xe0] LT",nextWeek:"dddd [\xe0] LT",lastDay:"[Hier \xe0] LT",lastWeek:"dddd [dernier \xe0] LT",sameElse:"L"},relativeTime:{future:"dans %s",past:"il y a %s",s:"quelques secondes",ss:"%d secondes",m:"une minute",mm:"%d minutes",h:"une heure",hh:"%d heures",d:"un jour",dd:"%d jours",M:"un mois",MM:"%d mois",y:"un an",yy:"%d ans"},dayOfMonthOrdinalParse:/\d{1,2}(er|e)/,ordinal:function(l,D){switch(D){default:case"M":case"Q":case"D":case"DDD":case"d":return l+(1===l?"er":"e");case"w":case"W":return l+(1===l?"re":"e")}},week:{dow:1,doy:4}})}(p(15439))},1636:function(qe,I,p){!function(o){"use strict";var e=/^(janvier|f\xe9vrier|mars|avril|mai|juin|juillet|ao\xfbt|septembre|octobre|novembre|d\xe9cembre)/i,l=/(janv\.?|f\xe9vr\.?|mars|avr\.?|mai|juin|juil\.?|ao\xfbt|sept\.?|oct\.?|nov\.?|d\xe9c\.?)/i,D=/(janv\.?|f\xe9vr\.?|mars|avr\.?|mai|juin|juil\.?|ao\xfbt|sept\.?|oct\.?|nov\.?|d\xe9c\.?|janvier|f\xe9vrier|mars|avril|mai|juin|juillet|ao\xfbt|septembre|octobre|novembre|d\xe9cembre)/i,g=[/^janv/i,/^f\xe9vr/i,/^mars/i,/^avr/i,/^mai/i,/^juin/i,/^juil/i,/^ao\xfbt/i,/^sept/i,/^oct/i,/^nov/i,/^d\xe9c/i];o.defineLocale("fr",{months:"janvier_f\xe9vrier_mars_avril_mai_juin_juillet_ao\xfbt_septembre_octobre_novembre_d\xe9cembre".split("_"),monthsShort:"janv._f\xe9vr._mars_avr._mai_juin_juil._ao\xfbt_sept._oct._nov._d\xe9c.".split("_"),monthsRegex:D,monthsShortRegex:D,monthsStrictRegex:e,monthsShortStrictRegex:l,monthsParse:g,longMonthsParse:g,shortMonthsParse:g,weekdays:"dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi".split("_"),weekdaysShort:"dim._lun._mar._mer._jeu._ven._sam.".split("_"),weekdaysMin:"di_lu_ma_me_je_ve_sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[Aujourd\u2019hui \xe0] LT",nextDay:"[Demain \xe0] LT",nextWeek:"dddd [\xe0] LT",lastDay:"[Hier \xe0] LT",lastWeek:"dddd [dernier \xe0] LT",sameElse:"L"},relativeTime:{future:"dans %s",past:"il y a %s",s:"quelques secondes",ss:"%d secondes",m:"une minute",mm:"%d minutes",h:"une heure",hh:"%d heures",d:"un jour",dd:"%d jours",w:"une semaine",ww:"%d semaines",M:"un mois",MM:"%d mois",y:"un an",yy:"%d ans"},dayOfMonthOrdinalParse:/\d{1,2}(er|)/,ordinal:function(T,n){switch(n){case"D":return T+(1===T?"er":"");default:case"M":case"Q":case"DDD":case"d":return T+(1===T?"er":"e");case"w":case"W":return T+(1===T?"re":"e")}},week:{dow:1,doy:4}})}(p(15439))},14940:function(qe,I,p){!function(o){"use strict";var e="jan._feb._mrt._apr._mai_jun._jul._aug._sep._okt._nov._des.".split("_"),l="jan_feb_mrt_apr_mai_jun_jul_aug_sep_okt_nov_des".split("_");o.defineLocale("fy",{months:"jannewaris_febrewaris_maart_april_maaie_juny_july_augustus_septimber_oktober_novimber_desimber".split("_"),monthsShort:function(g,E){return g?/-MMM-/.test(E)?l[g.month()]:e[g.month()]:e},monthsParseExact:!0,weekdays:"snein_moandei_tiisdei_woansdei_tongersdei_freed_sneon".split("_"),weekdaysShort:"si._mo._ti._wo._to._fr._so.".split("_"),weekdaysMin:"Si_Mo_Ti_Wo_To_Fr_So".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD-MM-YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[hjoed om] LT",nextDay:"[moarn om] LT",nextWeek:"dddd [om] LT",lastDay:"[juster om] LT",lastWeek:"[\xf4fr\xfbne] dddd [om] LT",sameElse:"L"},relativeTime:{future:"oer %s",past:"%s lyn",s:"in pear sekonden",ss:"%d sekonden",m:"ien min\xfat",mm:"%d minuten",h:"ien oere",hh:"%d oeren",d:"ien dei",dd:"%d dagen",M:"ien moanne",MM:"%d moannen",y:"ien jier",yy:"%d jierren"},dayOfMonthOrdinalParse:/\d{1,2}(ste|de)/,ordinal:function(g){return g+(1===g||8===g||g>=20?"ste":"de")},week:{dow:1,doy:4}})}(p(15439))},91402:function(qe,I,p){!function(o){"use strict";var e=["Ean\xe1ir","Feabhra","M\xe1rta","Aibre\xe1n","Bealtaine","Meitheamh","I\xfail","L\xfanasa","Me\xe1n F\xf3mhair","Deireadh F\xf3mhair","Samhain","Nollaig"],l=["Ean","Feabh","M\xe1rt","Aib","Beal","Meith","I\xfail","L\xfan","M.F.","D.F.","Samh","Noll"],D=["D\xe9 Domhnaigh","D\xe9 Luain","D\xe9 M\xe1irt","D\xe9 C\xe9adaoin","D\xe9ardaoin","D\xe9 hAoine","D\xe9 Sathairn"],g=["Domh","Luan","M\xe1irt","C\xe9ad","D\xe9ar","Aoine","Sath"],E=["Do","Lu","M\xe1","C\xe9","D\xe9","A","Sa"];o.defineLocale("ga",{months:e,monthsShort:l,monthsParseExact:!0,weekdays:D,weekdaysShort:g,weekdaysMin:E,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Inniu ag] LT",nextDay:"[Am\xe1rach ag] LT",nextWeek:"dddd [ag] LT",lastDay:"[Inn\xe9 ag] LT",lastWeek:"dddd [seo caite] [ag] LT",sameElse:"L"},relativeTime:{future:"i %s",past:"%s \xf3 shin",s:"c\xfapla soicind",ss:"%d soicind",m:"n\xf3im\xe9ad",mm:"%d n\xf3im\xe9ad",h:"uair an chloig",hh:"%d uair an chloig",d:"l\xe1",dd:"%d l\xe1",M:"m\xed",MM:"%d m\xedonna",y:"bliain",yy:"%d bliain"},dayOfMonthOrdinalParse:/\d{1,2}(d|na|mh)/,ordinal:function(n){return n+(1===n?"d":n%10==2?"na":"mh")},week:{dow:1,doy:4}})}(p(15439))},46924:function(qe,I,p){!function(o){"use strict";var e=["Am Faoilleach","An Gearran","Am M\xe0rt","An Giblean","An C\xe8itean","An t-\xd2gmhios","An t-Iuchar","An L\xf9nastal","An t-Sultain","An D\xe0mhair","An t-Samhain","An D\xf9bhlachd"],l=["Faoi","Gear","M\xe0rt","Gibl","C\xe8it","\xd2gmh","Iuch","L\xf9n","Sult","D\xe0mh","Samh","D\xf9bh"],D=["Did\xf2mhnaich","Diluain","Dim\xe0irt","Diciadain","Diardaoin","Dihaoine","Disathairne"],g=["Did","Dil","Dim","Dic","Dia","Dih","Dis"],E=["D\xf2","Lu","M\xe0","Ci","Ar","Ha","Sa"];o.defineLocale("gd",{months:e,monthsShort:l,monthsParseExact:!0,weekdays:D,weekdaysShort:g,weekdaysMin:E,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[An-diugh aig] LT",nextDay:"[A-m\xe0ireach aig] LT",nextWeek:"dddd [aig] LT",lastDay:"[An-d\xe8 aig] LT",lastWeek:"dddd [seo chaidh] [aig] LT",sameElse:"L"},relativeTime:{future:"ann an %s",past:"bho chionn %s",s:"beagan diogan",ss:"%d diogan",m:"mionaid",mm:"%d mionaidean",h:"uair",hh:"%d uairean",d:"latha",dd:"%d latha",M:"m\xecos",MM:"%d m\xecosan",y:"bliadhna",yy:"%d bliadhna"},dayOfMonthOrdinalParse:/\d{1,2}(d|na|mh)/,ordinal:function(n){return n+(1===n?"d":n%10==2?"na":"mh")},week:{dow:1,doy:4}})}(p(15439))},16398:function(qe,I,p){!function(o){"use strict";o.defineLocale("gl",{months:"xaneiro_febreiro_marzo_abril_maio_xu\xf1o_xullo_agosto_setembro_outubro_novembro_decembro".split("_"),monthsShort:"xan._feb._mar._abr._mai._xu\xf1._xul._ago._set._out._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"domingo_luns_martes_m\xe9rcores_xoves_venres_s\xe1bado".split("_"),weekdaysShort:"dom._lun._mar._m\xe9r._xov._ven._s\xe1b.".split("_"),weekdaysMin:"do_lu_ma_m\xe9_xo_ve_s\xe1".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY H:mm",LLLL:"dddd, D [de] MMMM [de] YYYY H:mm"},calendar:{sameDay:function(){return"[hoxe "+(1!==this.hours()?"\xe1s":"\xe1")+"] LT"},nextDay:function(){return"[ma\xf1\xe1 "+(1!==this.hours()?"\xe1s":"\xe1")+"] LT"},nextWeek:function(){return"dddd ["+(1!==this.hours()?"\xe1s":"a")+"] LT"},lastDay:function(){return"[onte "+(1!==this.hours()?"\xe1":"a")+"] LT"},lastWeek:function(){return"[o] dddd [pasado "+(1!==this.hours()?"\xe1s":"a")+"] LT"},sameElse:"L"},relativeTime:{future:function(l){return 0===l.indexOf("un")?"n"+l:"en "+l},past:"hai %s",s:"uns segundos",ss:"%d segundos",m:"un minuto",mm:"%d minutos",h:"unha hora",hh:"%d horas",d:"un d\xeda",dd:"%d d\xedas",M:"un mes",MM:"%d meses",y:"un ano",yy:"%d anos"},dayOfMonthOrdinalParse:/\d{1,2}\xba/,ordinal:"%d\xba",week:{dow:1,doy:4}})}(p(15439))},72457:function(qe,I,p){!function(o){"use strict";function e(D,g,E,T){var n={s:["\u0925\u094b\u0921\u092f\u093e \u0938\u0945\u0915\u0902\u0921\u093e\u0902\u0928\u0940","\u0925\u094b\u0921\u0947 \u0938\u0945\u0915\u0902\u0921"],ss:[D+" \u0938\u0945\u0915\u0902\u0921\u093e\u0902\u0928\u0940",D+" \u0938\u0945\u0915\u0902\u0921"],m:["\u090f\u0915\u093e \u092e\u093f\u0923\u091f\u093e\u0928","\u090f\u0915 \u092e\u093f\u0928\u0942\u091f"],mm:[D+" \u092e\u093f\u0923\u091f\u093e\u0902\u0928\u0940",D+" \u092e\u093f\u0923\u091f\u093e\u0902"],h:["\u090f\u0915\u093e \u0935\u0930\u093e\u0928","\u090f\u0915 \u0935\u0930"],hh:[D+" \u0935\u0930\u093e\u0902\u0928\u0940",D+" \u0935\u0930\u093e\u0902"],d:["\u090f\u0915\u093e \u0926\u093f\u0938\u093e\u0928","\u090f\u0915 \u0926\u0940\u0938"],dd:[D+" \u0926\u093f\u0938\u093e\u0902\u0928\u0940",D+" \u0926\u0940\u0938"],M:["\u090f\u0915\u093e \u092e\u094d\u0939\u092f\u0928\u094d\u092f\u093e\u0928","\u090f\u0915 \u092e\u094d\u0939\u092f\u0928\u094b"],MM:[D+" \u092e\u094d\u0939\u092f\u0928\u094d\u092f\u093e\u0928\u0940",D+" \u092e\u094d\u0939\u092f\u0928\u0947"],y:["\u090f\u0915\u093e \u0935\u0930\u094d\u0938\u093e\u0928","\u090f\u0915 \u0935\u0930\u094d\u0938"],yy:[D+" \u0935\u0930\u094d\u0938\u093e\u0902\u0928\u0940",D+" \u0935\u0930\u094d\u0938\u093e\u0902"]};return T?n[E][0]:n[E][1]}o.defineLocale("gom-deva",{months:{standalone:"\u091c\u093e\u0928\u0947\u0935\u093e\u0930\u0940_\u092b\u0947\u092c\u094d\u0930\u0941\u0935\u093e\u0930\u0940_\u092e\u093e\u0930\u094d\u091a_\u090f\u092a\u094d\u0930\u0940\u0932_\u092e\u0947_\u091c\u0942\u0928_\u091c\u0941\u0932\u092f_\u0911\u0917\u0938\u094d\u091f_\u0938\u092a\u094d\u091f\u0947\u0902\u092c\u0930_\u0911\u0915\u094d\u091f\u094b\u092c\u0930_\u0928\u094b\u0935\u094d\u0939\u0947\u0902\u092c\u0930_\u0921\u093f\u0938\u0947\u0902\u092c\u0930".split("_"),format:"\u091c\u093e\u0928\u0947\u0935\u093e\u0930\u0940\u091a\u094d\u092f\u093e_\u092b\u0947\u092c\u094d\u0930\u0941\u0935\u093e\u0930\u0940\u091a\u094d\u092f\u093e_\u092e\u093e\u0930\u094d\u091a\u093e\u091a\u094d\u092f\u093e_\u090f\u092a\u094d\u0930\u0940\u0932\u093e\u091a\u094d\u092f\u093e_\u092e\u0947\u092f\u093e\u091a\u094d\u092f\u093e_\u091c\u0942\u0928\u093e\u091a\u094d\u092f\u093e_\u091c\u0941\u0932\u092f\u093e\u091a\u094d\u092f\u093e_\u0911\u0917\u0938\u094d\u091f\u093e\u091a\u094d\u092f\u093e_\u0938\u092a\u094d\u091f\u0947\u0902\u092c\u0930\u093e\u091a\u094d\u092f\u093e_\u0911\u0915\u094d\u091f\u094b\u092c\u0930\u093e\u091a\u094d\u092f\u093e_\u0928\u094b\u0935\u094d\u0939\u0947\u0902\u092c\u0930\u093e\u091a\u094d\u092f\u093e_\u0921\u093f\u0938\u0947\u0902\u092c\u0930\u093e\u091a\u094d\u092f\u093e".split("_"),isFormat:/MMMM(\s)+D[oD]?/},monthsShort:"\u091c\u093e\u0928\u0947._\u092b\u0947\u092c\u094d\u0930\u0941._\u092e\u093e\u0930\u094d\u091a_\u090f\u092a\u094d\u0930\u0940._\u092e\u0947_\u091c\u0942\u0928_\u091c\u0941\u0932._\u0911\u0917._\u0938\u092a\u094d\u091f\u0947\u0902._\u0911\u0915\u094d\u091f\u094b._\u0928\u094b\u0935\u094d\u0939\u0947\u0902._\u0921\u093f\u0938\u0947\u0902.".split("_"),monthsParseExact:!0,weekdays:"\u0906\u092f\u0924\u093e\u0930_\u0938\u094b\u092e\u093e\u0930_\u092e\u0902\u0917\u0933\u093e\u0930_\u092c\u0941\u0927\u0935\u093e\u0930_\u092c\u093f\u0930\u0947\u0938\u094d\u0924\u093e\u0930_\u0938\u0941\u0915\u094d\u0930\u093e\u0930_\u0936\u0947\u0928\u0935\u093e\u0930".split("_"),weekdaysShort:"\u0906\u092f\u0924._\u0938\u094b\u092e._\u092e\u0902\u0917\u0933._\u092c\u0941\u0927._\u092c\u094d\u0930\u0947\u0938\u094d\u0924._\u0938\u0941\u0915\u094d\u0930._\u0936\u0947\u0928.".split("_"),weekdaysMin:"\u0906_\u0938\u094b_\u092e\u0902_\u092c\u0941_\u092c\u094d\u0930\u0947_\u0938\u0941_\u0936\u0947".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"A h:mm [\u0935\u093e\u091c\u0924\u093e\u0902]",LTS:"A h:mm:ss [\u0935\u093e\u091c\u0924\u093e\u0902]",L:"DD-MM-YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY A h:mm [\u0935\u093e\u091c\u0924\u093e\u0902]",LLLL:"dddd, MMMM Do, YYYY, A h:mm [\u0935\u093e\u091c\u0924\u093e\u0902]",llll:"ddd, D MMM YYYY, A h:mm [\u0935\u093e\u091c\u0924\u093e\u0902]"},calendar:{sameDay:"[\u0906\u092f\u091c] LT",nextDay:"[\u092b\u093e\u0932\u094d\u092f\u093e\u0902] LT",nextWeek:"[\u092b\u0941\u0921\u0932\u094b] dddd[,] LT",lastDay:"[\u0915\u093e\u0932] LT",lastWeek:"[\u092b\u093e\u091f\u0932\u094b] dddd[,] LT",sameElse:"L"},relativeTime:{future:"%s",past:"%s \u0906\u0926\u0940\u0902",s:e,ss:e,m:e,mm:e,h:e,hh:e,d:e,dd:e,M:e,MM:e,y:e,yy:e},dayOfMonthOrdinalParse:/\d{1,2}(\u0935\u0947\u0930)/,ordinal:function(D,g){return"D"===g?D+"\u0935\u0947\u0930":D},week:{dow:0,doy:3},meridiemParse:/\u0930\u093e\u0924\u0940|\u0938\u0915\u093e\u0933\u0940\u0902|\u0926\u0928\u092a\u093e\u0930\u093e\u0902|\u0938\u093e\u0902\u091c\u0947/,meridiemHour:function(D,g){return 12===D&&(D=0),"\u0930\u093e\u0924\u0940"===g?D<4?D:D+12:"\u0938\u0915\u093e\u0933\u0940\u0902"===g?D:"\u0926\u0928\u092a\u093e\u0930\u093e\u0902"===g?D>12?D:D+12:"\u0938\u093e\u0902\u091c\u0947"===g?D+12:void 0},meridiem:function(D,g,E){return D<4?"\u0930\u093e\u0924\u0940":D<12?"\u0938\u0915\u093e\u0933\u0940\u0902":D<16?"\u0926\u0928\u092a\u093e\u0930\u093e\u0902":D<20?"\u0938\u093e\u0902\u091c\u0947":"\u0930\u093e\u0924\u0940"}})}(p(15439))},52545:function(qe,I,p){!function(o){"use strict";function e(D,g,E,T){var n={s:["thoddea sekondamni","thodde sekond"],ss:[D+" sekondamni",D+" sekond"],m:["eka mintan","ek minut"],mm:[D+" mintamni",D+" mintam"],h:["eka voran","ek vor"],hh:[D+" voramni",D+" voram"],d:["eka disan","ek dis"],dd:[D+" disamni",D+" dis"],M:["eka mhoinean","ek mhoino"],MM:[D+" mhoineamni",D+" mhoine"],y:["eka vorsan","ek voros"],yy:[D+" vorsamni",D+" vorsam"]};return T?n[E][0]:n[E][1]}o.defineLocale("gom-latn",{months:{standalone:"Janer_Febrer_Mars_Abril_Mai_Jun_Julai_Agost_Setembr_Otubr_Novembr_Dezembr".split("_"),format:"Janerachea_Febrerachea_Marsachea_Abrilachea_Maiachea_Junachea_Julaiachea_Agostachea_Setembrachea_Otubrachea_Novembrachea_Dezembrachea".split("_"),isFormat:/MMMM(\s)+D[oD]?/},monthsShort:"Jan._Feb._Mars_Abr._Mai_Jun_Jul._Ago._Set._Otu._Nov._Dez.".split("_"),monthsParseExact:!0,weekdays:"Aitar_Somar_Mongllar_Budhvar_Birestar_Sukrar_Son'var".split("_"),weekdaysShort:"Ait._Som._Mon._Bud._Bre._Suk._Son.".split("_"),weekdaysMin:"Ai_Sm_Mo_Bu_Br_Su_Sn".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"A h:mm [vazta]",LTS:"A h:mm:ss [vazta]",L:"DD-MM-YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY A h:mm [vazta]",LLLL:"dddd, MMMM Do, YYYY, A h:mm [vazta]",llll:"ddd, D MMM YYYY, A h:mm [vazta]"},calendar:{sameDay:"[Aiz] LT",nextDay:"[Faleam] LT",nextWeek:"[Fuddlo] dddd[,] LT",lastDay:"[Kal] LT",lastWeek:"[Fattlo] dddd[,] LT",sameElse:"L"},relativeTime:{future:"%s",past:"%s adim",s:e,ss:e,m:e,mm:e,h:e,hh:e,d:e,dd:e,M:e,MM:e,y:e,yy:e},dayOfMonthOrdinalParse:/\d{1,2}(er)/,ordinal:function(D,g){return"D"===g?D+"er":D},week:{dow:0,doy:3},meridiemParse:/rati|sokallim|donparam|sanje/,meridiemHour:function(D,g){return 12===D&&(D=0),"rati"===g?D<4?D:D+12:"sokallim"===g?D:"donparam"===g?D>12?D:D+12:"sanje"===g?D+12:void 0},meridiem:function(D,g,E){return D<4?"rati":D<12?"sokallim":D<16?"donparam":D<20?"sanje":"rati"}})}(p(15439))},42641:function(qe,I,p){!function(o){"use strict";var e={1:"\u0ae7",2:"\u0ae8",3:"\u0ae9",4:"\u0aea",5:"\u0aeb",6:"\u0aec",7:"\u0aed",8:"\u0aee",9:"\u0aef",0:"\u0ae6"},l={"\u0ae7":"1","\u0ae8":"2","\u0ae9":"3","\u0aea":"4","\u0aeb":"5","\u0aec":"6","\u0aed":"7","\u0aee":"8","\u0aef":"9","\u0ae6":"0"};o.defineLocale("gu",{months:"\u0a9c\u0abe\u0aa8\u0acd\u0aaf\u0ac1\u0a86\u0ab0\u0ac0_\u0aab\u0ac7\u0aac\u0acd\u0ab0\u0ac1\u0a86\u0ab0\u0ac0_\u0aae\u0abe\u0ab0\u0acd\u0a9a_\u0a8f\u0aaa\u0acd\u0ab0\u0abf\u0ab2_\u0aae\u0ac7_\u0a9c\u0ac2\u0aa8_\u0a9c\u0ac1\u0ab2\u0abe\u0a88_\u0a91\u0a97\u0ab8\u0acd\u0a9f_\u0ab8\u0aaa\u0acd\u0a9f\u0ac7\u0aae\u0acd\u0aac\u0ab0_\u0a91\u0a95\u0acd\u0a9f\u0acd\u0aac\u0ab0_\u0aa8\u0ab5\u0ac7\u0aae\u0acd\u0aac\u0ab0_\u0aa1\u0abf\u0ab8\u0ac7\u0aae\u0acd\u0aac\u0ab0".split("_"),monthsShort:"\u0a9c\u0abe\u0aa8\u0acd\u0aaf\u0ac1._\u0aab\u0ac7\u0aac\u0acd\u0ab0\u0ac1._\u0aae\u0abe\u0ab0\u0acd\u0a9a_\u0a8f\u0aaa\u0acd\u0ab0\u0abf._\u0aae\u0ac7_\u0a9c\u0ac2\u0aa8_\u0a9c\u0ac1\u0ab2\u0abe._\u0a91\u0a97._\u0ab8\u0aaa\u0acd\u0a9f\u0ac7._\u0a91\u0a95\u0acd\u0a9f\u0acd._\u0aa8\u0ab5\u0ac7._\u0aa1\u0abf\u0ab8\u0ac7.".split("_"),monthsParseExact:!0,weekdays:"\u0ab0\u0ab5\u0abf\u0ab5\u0abe\u0ab0_\u0ab8\u0acb\u0aae\u0ab5\u0abe\u0ab0_\u0aae\u0a82\u0a97\u0ab3\u0ab5\u0abe\u0ab0_\u0aac\u0ac1\u0aa7\u0acd\u0ab5\u0abe\u0ab0_\u0a97\u0ac1\u0ab0\u0ac1\u0ab5\u0abe\u0ab0_\u0ab6\u0ac1\u0a95\u0acd\u0ab0\u0ab5\u0abe\u0ab0_\u0ab6\u0aa8\u0abf\u0ab5\u0abe\u0ab0".split("_"),weekdaysShort:"\u0ab0\u0ab5\u0abf_\u0ab8\u0acb\u0aae_\u0aae\u0a82\u0a97\u0ab3_\u0aac\u0ac1\u0aa7\u0acd_\u0a97\u0ac1\u0ab0\u0ac1_\u0ab6\u0ac1\u0a95\u0acd\u0ab0_\u0ab6\u0aa8\u0abf".split("_"),weekdaysMin:"\u0ab0_\u0ab8\u0acb_\u0aae\u0a82_\u0aac\u0ac1_\u0a97\u0ac1_\u0ab6\u0ac1_\u0ab6".split("_"),longDateFormat:{LT:"A h:mm \u0ab5\u0abe\u0a97\u0acd\u0aaf\u0ac7",LTS:"A h:mm:ss \u0ab5\u0abe\u0a97\u0acd\u0aaf\u0ac7",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm \u0ab5\u0abe\u0a97\u0acd\u0aaf\u0ac7",LLLL:"dddd, D MMMM YYYY, A h:mm \u0ab5\u0abe\u0a97\u0acd\u0aaf\u0ac7"},calendar:{sameDay:"[\u0a86\u0a9c] LT",nextDay:"[\u0a95\u0abe\u0ab2\u0ac7] LT",nextWeek:"dddd, LT",lastDay:"[\u0a97\u0a87\u0a95\u0abe\u0ab2\u0ac7] LT",lastWeek:"[\u0aaa\u0abe\u0a9b\u0ab2\u0abe] dddd, LT",sameElse:"L"},relativeTime:{future:"%s \u0aae\u0abe",past:"%s \u0aaa\u0ab9\u0ac7\u0ab2\u0abe",s:"\u0a85\u0aae\u0ac1\u0a95 \u0aaa\u0ab3\u0acb",ss:"%d \u0ab8\u0ac7\u0a95\u0a82\u0aa1",m:"\u0a8f\u0a95 \u0aae\u0abf\u0aa8\u0abf\u0a9f",mm:"%d \u0aae\u0abf\u0aa8\u0abf\u0a9f",h:"\u0a8f\u0a95 \u0a95\u0ab2\u0abe\u0a95",hh:"%d \u0a95\u0ab2\u0abe\u0a95",d:"\u0a8f\u0a95 \u0aa6\u0abf\u0ab5\u0ab8",dd:"%d \u0aa6\u0abf\u0ab5\u0ab8",M:"\u0a8f\u0a95 \u0aae\u0ab9\u0abf\u0aa8\u0acb",MM:"%d \u0aae\u0ab9\u0abf\u0aa8\u0acb",y:"\u0a8f\u0a95 \u0ab5\u0ab0\u0acd\u0ab7",yy:"%d \u0ab5\u0ab0\u0acd\u0ab7"},preparse:function(g){return g.replace(/[\u0ae7\u0ae8\u0ae9\u0aea\u0aeb\u0aec\u0aed\u0aee\u0aef\u0ae6]/g,function(E){return l[E]})},postformat:function(g){return g.replace(/\d/g,function(E){return e[E]})},meridiemParse:/\u0ab0\u0abe\u0aa4|\u0aac\u0aaa\u0acb\u0ab0|\u0ab8\u0ab5\u0abe\u0ab0|\u0ab8\u0abe\u0a82\u0a9c/,meridiemHour:function(g,E){return 12===g&&(g=0),"\u0ab0\u0abe\u0aa4"===E?g<4?g:g+12:"\u0ab8\u0ab5\u0abe\u0ab0"===E?g:"\u0aac\u0aaa\u0acb\u0ab0"===E?g>=10?g:g+12:"\u0ab8\u0abe\u0a82\u0a9c"===E?g+12:void 0},meridiem:function(g,E,T){return g<4?"\u0ab0\u0abe\u0aa4":g<10?"\u0ab8\u0ab5\u0abe\u0ab0":g<17?"\u0aac\u0aaa\u0acb\u0ab0":g<20?"\u0ab8\u0abe\u0a82\u0a9c":"\u0ab0\u0abe\u0aa4"},week:{dow:0,doy:6}})}(p(15439))},7536:function(qe,I,p){!function(o){"use strict";o.defineLocale("he",{months:"\u05d9\u05e0\u05d5\u05d0\u05e8_\u05e4\u05d1\u05e8\u05d5\u05d0\u05e8_\u05de\u05e8\u05e5_\u05d0\u05e4\u05e8\u05d9\u05dc_\u05de\u05d0\u05d9_\u05d9\u05d5\u05e0\u05d9_\u05d9\u05d5\u05dc\u05d9_\u05d0\u05d5\u05d2\u05d5\u05e1\u05d8_\u05e1\u05e4\u05d8\u05de\u05d1\u05e8_\u05d0\u05d5\u05e7\u05d8\u05d5\u05d1\u05e8_\u05e0\u05d5\u05d1\u05de\u05d1\u05e8_\u05d3\u05e6\u05de\u05d1\u05e8".split("_"),monthsShort:"\u05d9\u05e0\u05d5\u05f3_\u05e4\u05d1\u05e8\u05f3_\u05de\u05e8\u05e5_\u05d0\u05e4\u05e8\u05f3_\u05de\u05d0\u05d9_\u05d9\u05d5\u05e0\u05d9_\u05d9\u05d5\u05dc\u05d9_\u05d0\u05d5\u05d2\u05f3_\u05e1\u05e4\u05d8\u05f3_\u05d0\u05d5\u05e7\u05f3_\u05e0\u05d5\u05d1\u05f3_\u05d3\u05e6\u05de\u05f3".split("_"),weekdays:"\u05e8\u05d0\u05e9\u05d5\u05df_\u05e9\u05e0\u05d9_\u05e9\u05dc\u05d9\u05e9\u05d9_\u05e8\u05d1\u05d9\u05e2\u05d9_\u05d7\u05de\u05d9\u05e9\u05d9_\u05e9\u05d9\u05e9\u05d9_\u05e9\u05d1\u05ea".split("_"),weekdaysShort:"\u05d0\u05f3_\u05d1\u05f3_\u05d2\u05f3_\u05d3\u05f3_\u05d4\u05f3_\u05d5\u05f3_\u05e9\u05f3".split("_"),weekdaysMin:"\u05d0_\u05d1_\u05d2_\u05d3_\u05d4_\u05d5_\u05e9".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D [\u05d1]MMMM YYYY",LLL:"D [\u05d1]MMMM YYYY HH:mm",LLLL:"dddd, D [\u05d1]MMMM YYYY HH:mm",l:"D/M/YYYY",ll:"D MMM YYYY",lll:"D MMM YYYY HH:mm",llll:"ddd, D MMM YYYY HH:mm"},calendar:{sameDay:"[\u05d4\u05d9\u05d5\u05dd \u05d1\u05be]LT",nextDay:"[\u05de\u05d7\u05e8 \u05d1\u05be]LT",nextWeek:"dddd [\u05d1\u05e9\u05e2\u05d4] LT",lastDay:"[\u05d0\u05ea\u05de\u05d5\u05dc \u05d1\u05be]LT",lastWeek:"[\u05d1\u05d9\u05d5\u05dd] dddd [\u05d4\u05d0\u05d7\u05e8\u05d5\u05df \u05d1\u05e9\u05e2\u05d4] LT",sameElse:"L"},relativeTime:{future:"\u05d1\u05e2\u05d5\u05d3 %s",past:"\u05dc\u05e4\u05e0\u05d9 %s",s:"\u05de\u05e1\u05e4\u05e8 \u05e9\u05e0\u05d9\u05d5\u05ea",ss:"%d \u05e9\u05e0\u05d9\u05d5\u05ea",m:"\u05d3\u05e7\u05d4",mm:"%d \u05d3\u05e7\u05d5\u05ea",h:"\u05e9\u05e2\u05d4",hh:function(l){return 2===l?"\u05e9\u05e2\u05ea\u05d9\u05d9\u05dd":l+" \u05e9\u05e2\u05d5\u05ea"},d:"\u05d9\u05d5\u05dd",dd:function(l){return 2===l?"\u05d9\u05d5\u05de\u05d9\u05d9\u05dd":l+" \u05d9\u05de\u05d9\u05dd"},M:"\u05d7\u05d5\u05d3\u05e9",MM:function(l){return 2===l?"\u05d7\u05d5\u05d3\u05e9\u05d9\u05d9\u05dd":l+" \u05d7\u05d5\u05d3\u05e9\u05d9\u05dd"},y:"\u05e9\u05e0\u05d4",yy:function(l){return 2===l?"\u05e9\u05e0\u05ea\u05d9\u05d9\u05dd":l%10==0&&10!==l?l+" \u05e9\u05e0\u05d4":l+" \u05e9\u05e0\u05d9\u05dd"}},meridiemParse:/\u05d0\u05d7\u05d4"\u05e6|\u05dc\u05e4\u05e0\u05d4"\u05e6|\u05d0\u05d7\u05e8\u05d9 \u05d4\u05e6\u05d4\u05e8\u05d9\u05d9\u05dd|\u05dc\u05e4\u05e0\u05d9 \u05d4\u05e6\u05d4\u05e8\u05d9\u05d9\u05dd|\u05dc\u05e4\u05e0\u05d5\u05ea \u05d1\u05d5\u05e7\u05e8|\u05d1\u05d1\u05d5\u05e7\u05e8|\u05d1\u05e2\u05e8\u05d1/i,isPM:function(l){return/^(\u05d0\u05d7\u05d4"\u05e6|\u05d0\u05d7\u05e8\u05d9 \u05d4\u05e6\u05d4\u05e8\u05d9\u05d9\u05dd|\u05d1\u05e2\u05e8\u05d1)$/.test(l)},meridiem:function(l,D,g){return l<5?"\u05dc\u05e4\u05e0\u05d5\u05ea \u05d1\u05d5\u05e7\u05e8":l<10?"\u05d1\u05d1\u05d5\u05e7\u05e8":l<12?g?'\u05dc\u05e4\u05e0\u05d4"\u05e6':"\u05dc\u05e4\u05e0\u05d9 \u05d4\u05e6\u05d4\u05e8\u05d9\u05d9\u05dd":l<18?g?'\u05d0\u05d7\u05d4"\u05e6':"\u05d0\u05d7\u05e8\u05d9 \u05d4\u05e6\u05d4\u05e8\u05d9\u05d9\u05dd":"\u05d1\u05e2\u05e8\u05d1"}})}(p(15439))},96335:function(qe,I,p){!function(o){"use strict";var e={1:"\u0967",2:"\u0968",3:"\u0969",4:"\u096a",5:"\u096b",6:"\u096c",7:"\u096d",8:"\u096e",9:"\u096f",0:"\u0966"},l={"\u0967":"1","\u0968":"2","\u0969":"3","\u096a":"4","\u096b":"5","\u096c":"6","\u096d":"7","\u096e":"8","\u096f":"9","\u0966":"0"},D=[/^\u091c\u0928/i,/^\u092b\u093c\u0930|\u092b\u0930/i,/^\u092e\u093e\u0930\u094d\u091a/i,/^\u0905\u092a\u094d\u0930\u0948/i,/^\u092e\u0908/i,/^\u091c\u0942\u0928/i,/^\u091c\u0941\u0932/i,/^\u0905\u0917/i,/^\u0938\u093f\u0924\u0902|\u0938\u093f\u0924/i,/^\u0905\u0915\u094d\u091f\u0942/i,/^\u0928\u0935|\u0928\u0935\u0902/i,/^\u0926\u093f\u0938\u0902|\u0926\u093f\u0938/i],g=[/^\u091c\u0928/i,/^\u092b\u093c\u0930/i,/^\u092e\u093e\u0930\u094d\u091a/i,/^\u0905\u092a\u094d\u0930\u0948/i,/^\u092e\u0908/i,/^\u091c\u0942\u0928/i,/^\u091c\u0941\u0932/i,/^\u0905\u0917/i,/^\u0938\u093f\u0924/i,/^\u0905\u0915\u094d\u091f\u0942/i,/^\u0928\u0935/i,/^\u0926\u093f\u0938/i];o.defineLocale("hi",{months:{format:"\u091c\u0928\u0935\u0930\u0940_\u092b\u093c\u0930\u0935\u0930\u0940_\u092e\u093e\u0930\u094d\u091a_\u0905\u092a\u094d\u0930\u0948\u0932_\u092e\u0908_\u091c\u0942\u0928_\u091c\u0941\u0932\u093e\u0908_\u0905\u0917\u0938\u094d\u0924_\u0938\u093f\u0924\u092e\u094d\u092c\u0930_\u0905\u0915\u094d\u091f\u0942\u092c\u0930_\u0928\u0935\u092e\u094d\u092c\u0930_\u0926\u093f\u0938\u092e\u094d\u092c\u0930".split("_"),standalone:"\u091c\u0928\u0935\u0930\u0940_\u092b\u0930\u0935\u0930\u0940_\u092e\u093e\u0930\u094d\u091a_\u0905\u092a\u094d\u0930\u0948\u0932_\u092e\u0908_\u091c\u0942\u0928_\u091c\u0941\u0932\u093e\u0908_\u0905\u0917\u0938\u094d\u0924_\u0938\u093f\u0924\u0902\u092c\u0930_\u0905\u0915\u094d\u091f\u0942\u092c\u0930_\u0928\u0935\u0902\u092c\u0930_\u0926\u093f\u0938\u0902\u092c\u0930".split("_")},monthsShort:"\u091c\u0928._\u092b\u093c\u0930._\u092e\u093e\u0930\u094d\u091a_\u0905\u092a\u094d\u0930\u0948._\u092e\u0908_\u091c\u0942\u0928_\u091c\u0941\u0932._\u0905\u0917._\u0938\u093f\u0924._\u0905\u0915\u094d\u091f\u0942._\u0928\u0935._\u0926\u093f\u0938.".split("_"),weekdays:"\u0930\u0935\u093f\u0935\u093e\u0930_\u0938\u094b\u092e\u0935\u093e\u0930_\u092e\u0902\u0917\u0932\u0935\u093e\u0930_\u092c\u0941\u0927\u0935\u093e\u0930_\u0917\u0941\u0930\u0942\u0935\u093e\u0930_\u0936\u0941\u0915\u094d\u0930\u0935\u093e\u0930_\u0936\u0928\u093f\u0935\u093e\u0930".split("_"),weekdaysShort:"\u0930\u0935\u093f_\u0938\u094b\u092e_\u092e\u0902\u0917\u0932_\u092c\u0941\u0927_\u0917\u0941\u0930\u0942_\u0936\u0941\u0915\u094d\u0930_\u0936\u0928\u093f".split("_"),weekdaysMin:"\u0930_\u0938\u094b_\u092e\u0902_\u092c\u0941_\u0917\u0941_\u0936\u0941_\u0936".split("_"),longDateFormat:{LT:"A h:mm \u092c\u091c\u0947",LTS:"A h:mm:ss \u092c\u091c\u0947",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm \u092c\u091c\u0947",LLLL:"dddd, D MMMM YYYY, A h:mm \u092c\u091c\u0947"},monthsParse:D,longMonthsParse:D,shortMonthsParse:g,monthsRegex:/^(\u091c\u0928\u0935\u0930\u0940|\u091c\u0928\.?|\u092b\u093c\u0930\u0935\u0930\u0940|\u092b\u0930\u0935\u0930\u0940|\u092b\u093c\u0930\.?|\u092e\u093e\u0930\u094d\u091a?|\u0905\u092a\u094d\u0930\u0948\u0932|\u0905\u092a\u094d\u0930\u0948\.?|\u092e\u0908?|\u091c\u0942\u0928?|\u091c\u0941\u0932\u093e\u0908|\u091c\u0941\u0932\.?|\u0905\u0917\u0938\u094d\u0924|\u0905\u0917\.?|\u0938\u093f\u0924\u092e\u094d\u092c\u0930|\u0938\u093f\u0924\u0902\u092c\u0930|\u0938\u093f\u0924\.?|\u0905\u0915\u094d\u091f\u0942\u092c\u0930|\u0905\u0915\u094d\u091f\u0942\.?|\u0928\u0935\u092e\u094d\u092c\u0930|\u0928\u0935\u0902\u092c\u0930|\u0928\u0935\.?|\u0926\u093f\u0938\u092e\u094d\u092c\u0930|\u0926\u093f\u0938\u0902\u092c\u0930|\u0926\u093f\u0938\.?)/i,monthsShortRegex:/^(\u091c\u0928\u0935\u0930\u0940|\u091c\u0928\.?|\u092b\u093c\u0930\u0935\u0930\u0940|\u092b\u0930\u0935\u0930\u0940|\u092b\u093c\u0930\.?|\u092e\u093e\u0930\u094d\u091a?|\u0905\u092a\u094d\u0930\u0948\u0932|\u0905\u092a\u094d\u0930\u0948\.?|\u092e\u0908?|\u091c\u0942\u0928?|\u091c\u0941\u0932\u093e\u0908|\u091c\u0941\u0932\.?|\u0905\u0917\u0938\u094d\u0924|\u0905\u0917\.?|\u0938\u093f\u0924\u092e\u094d\u092c\u0930|\u0938\u093f\u0924\u0902\u092c\u0930|\u0938\u093f\u0924\.?|\u0905\u0915\u094d\u091f\u0942\u092c\u0930|\u0905\u0915\u094d\u091f\u0942\.?|\u0928\u0935\u092e\u094d\u092c\u0930|\u0928\u0935\u0902\u092c\u0930|\u0928\u0935\.?|\u0926\u093f\u0938\u092e\u094d\u092c\u0930|\u0926\u093f\u0938\u0902\u092c\u0930|\u0926\u093f\u0938\.?)/i,monthsStrictRegex:/^(\u091c\u0928\u0935\u0930\u0940?|\u092b\u093c\u0930\u0935\u0930\u0940|\u092b\u0930\u0935\u0930\u0940?|\u092e\u093e\u0930\u094d\u091a?|\u0905\u092a\u094d\u0930\u0948\u0932?|\u092e\u0908?|\u091c\u0942\u0928?|\u091c\u0941\u0932\u093e\u0908?|\u0905\u0917\u0938\u094d\u0924?|\u0938\u093f\u0924\u092e\u094d\u092c\u0930|\u0938\u093f\u0924\u0902\u092c\u0930|\u0938\u093f\u0924?\.?|\u0905\u0915\u094d\u091f\u0942\u092c\u0930|\u0905\u0915\u094d\u091f\u0942\.?|\u0928\u0935\u092e\u094d\u092c\u0930|\u0928\u0935\u0902\u092c\u0930?|\u0926\u093f\u0938\u092e\u094d\u092c\u0930|\u0926\u093f\u0938\u0902\u092c\u0930?)/i,monthsShortStrictRegex:/^(\u091c\u0928\.?|\u092b\u093c\u0930\.?|\u092e\u093e\u0930\u094d\u091a?|\u0905\u092a\u094d\u0930\u0948\.?|\u092e\u0908?|\u091c\u0942\u0928?|\u091c\u0941\u0932\.?|\u0905\u0917\.?|\u0938\u093f\u0924\.?|\u0905\u0915\u094d\u091f\u0942\.?|\u0928\u0935\.?|\u0926\u093f\u0938\.?)/i,calendar:{sameDay:"[\u0906\u091c] LT",nextDay:"[\u0915\u0932] LT",nextWeek:"dddd, LT",lastDay:"[\u0915\u0932] LT",lastWeek:"[\u092a\u093f\u091b\u0932\u0947] dddd, LT",sameElse:"L"},relativeTime:{future:"%s \u092e\u0947\u0902",past:"%s \u092a\u0939\u0932\u0947",s:"\u0915\u0941\u091b \u0939\u0940 \u0915\u094d\u0937\u0923",ss:"%d \u0938\u0947\u0915\u0902\u0921",m:"\u090f\u0915 \u092e\u093f\u0928\u091f",mm:"%d \u092e\u093f\u0928\u091f",h:"\u090f\u0915 \u0918\u0902\u091f\u093e",hh:"%d \u0918\u0902\u091f\u0947",d:"\u090f\u0915 \u0926\u093f\u0928",dd:"%d \u0926\u093f\u0928",M:"\u090f\u0915 \u092e\u0939\u0940\u0928\u0947",MM:"%d \u092e\u0939\u0940\u0928\u0947",y:"\u090f\u0915 \u0935\u0930\u094d\u0937",yy:"%d \u0935\u0930\u094d\u0937"},preparse:function(T){return T.replace(/[\u0967\u0968\u0969\u096a\u096b\u096c\u096d\u096e\u096f\u0966]/g,function(n){return l[n]})},postformat:function(T){return T.replace(/\d/g,function(n){return e[n]})},meridiemParse:/\u0930\u093e\u0924|\u0938\u0941\u092c\u0939|\u0926\u094b\u092a\u0939\u0930|\u0936\u093e\u092e/,meridiemHour:function(T,n){return 12===T&&(T=0),"\u0930\u093e\u0924"===n?T<4?T:T+12:"\u0938\u0941\u092c\u0939"===n?T:"\u0926\u094b\u092a\u0939\u0930"===n?T>=10?T:T+12:"\u0936\u093e\u092e"===n?T+12:void 0},meridiem:function(T,n,P){return T<4?"\u0930\u093e\u0924":T<10?"\u0938\u0941\u092c\u0939":T<17?"\u0926\u094b\u092a\u0939\u0930":T<20?"\u0936\u093e\u092e":"\u0930\u093e\u0924"},week:{dow:0,doy:6}})}(p(15439))},7458:function(qe,I,p){!function(o){"use strict";function e(D,g,E){var T=D+" ";switch(E){case"ss":return T+=1===D?"sekunda":2===D||3===D||4===D?"sekunde":"sekundi";case"m":return g?"jedna minuta":"jedne minute";case"mm":return T+=1===D?"minuta":2===D||3===D||4===D?"minute":"minuta";case"h":return g?"jedan sat":"jednog sata";case"hh":return T+=1===D?"sat":2===D||3===D||4===D?"sata":"sati";case"dd":return T+=1===D?"dan":"dana";case"MM":return T+=1===D?"mjesec":2===D||3===D||4===D?"mjeseca":"mjeseci";case"yy":return T+=1===D?"godina":2===D||3===D||4===D?"godine":"godina"}}o.defineLocale("hr",{months:{format:"sije\u010dnja_velja\u010de_o\u017eujka_travnja_svibnja_lipnja_srpnja_kolovoza_rujna_listopada_studenoga_prosinca".split("_"),standalone:"sije\u010danj_velja\u010da_o\u017eujak_travanj_svibanj_lipanj_srpanj_kolovoz_rujan_listopad_studeni_prosinac".split("_")},monthsShort:"sij._velj._o\u017eu._tra._svi._lip._srp._kol._ruj._lis._stu._pro.".split("_"),monthsParseExact:!0,weekdays:"nedjelja_ponedjeljak_utorak_srijeda_\u010detvrtak_petak_subota".split("_"),weekdaysShort:"ned._pon._uto._sri._\u010det._pet._sub.".split("_"),weekdaysMin:"ne_po_ut_sr_\u010de_pe_su".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"Do MMMM YYYY",LLL:"Do MMMM YYYY H:mm",LLLL:"dddd, Do MMMM YYYY H:mm"},calendar:{sameDay:"[danas u] LT",nextDay:"[sutra u] LT",nextWeek:function(){switch(this.day()){case 0:return"[u] [nedjelju] [u] LT";case 3:return"[u] [srijedu] [u] LT";case 6:return"[u] [subotu] [u] LT";case 1:case 2:case 4:case 5:return"[u] dddd [u] LT"}},lastDay:"[ju\u010der u] LT",lastWeek:function(){switch(this.day()){case 0:return"[pro\u0161lu] [nedjelju] [u] LT";case 3:return"[pro\u0161lu] [srijedu] [u] LT";case 6:return"[pro\u0161le] [subote] [u] LT";case 1:case 2:case 4:case 5:return"[pro\u0161li] dddd [u] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"prije %s",s:"par sekundi",ss:e,m:e,mm:e,h:e,hh:e,d:"dan",dd:e,M:"mjesec",MM:e,y:"godinu",yy:e},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}})}(p(15439))},56540:function(qe,I,p){!function(o){"use strict";var e="vas\xe1rnap h\xe9tf\u0151n kedden szerd\xe1n cs\xfct\xf6rt\xf6k\xf6n p\xe9nteken szombaton".split(" ");function l(E,T,n,P){var w=E;switch(n){case"s":return P||T?"n\xe9h\xe1ny m\xe1sodperc":"n\xe9h\xe1ny m\xe1sodperce";case"ss":return w+(P||T)?" m\xe1sodperc":" m\xe1sodperce";case"m":return"egy"+(P||T?" perc":" perce");case"mm":return w+(P||T?" perc":" perce");case"h":return"egy"+(P||T?" \xf3ra":" \xf3r\xe1ja");case"hh":return w+(P||T?" \xf3ra":" \xf3r\xe1ja");case"d":return"egy"+(P||T?" nap":" napja");case"dd":return w+(P||T?" nap":" napja");case"M":return"egy"+(P||T?" h\xf3nap":" h\xf3napja");case"MM":return w+(P||T?" h\xf3nap":" h\xf3napja");case"y":return"egy"+(P||T?" \xe9v":" \xe9ve");case"yy":return w+(P||T?" \xe9v":" \xe9ve")}return""}function D(E){return(E?"":"[m\xfalt] ")+"["+e[this.day()]+"] LT[-kor]"}o.defineLocale("hu",{months:"janu\xe1r_febru\xe1r_m\xe1rcius_\xe1prilis_m\xe1jus_j\xfanius_j\xfalius_augusztus_szeptember_okt\xf3ber_november_december".split("_"),monthsShort:"jan._feb._m\xe1rc._\xe1pr._m\xe1j._j\xfan._j\xfal._aug._szept._okt._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"vas\xe1rnap_h\xe9tf\u0151_kedd_szerda_cs\xfct\xf6rt\xf6k_p\xe9ntek_szombat".split("_"),weekdaysShort:"vas_h\xe9t_kedd_sze_cs\xfct_p\xe9n_szo".split("_"),weekdaysMin:"v_h_k_sze_cs_p_szo".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"YYYY.MM.DD.",LL:"YYYY. MMMM D.",LLL:"YYYY. MMMM D. H:mm",LLLL:"YYYY. MMMM D., dddd H:mm"},meridiemParse:/de|du/i,isPM:function(E){return"u"===E.charAt(1).toLowerCase()},meridiem:function(E,T,n){return E<12?!0===n?"de":"DE":!0===n?"du":"DU"},calendar:{sameDay:"[ma] LT[-kor]",nextDay:"[holnap] LT[-kor]",nextWeek:function(){return D.call(this,!0)},lastDay:"[tegnap] LT[-kor]",lastWeek:function(){return D.call(this,!1)},sameElse:"L"},relativeTime:{future:"%s m\xfalva",past:"%s",s:l,ss:l,m:l,mm:l,h:l,hh:l,d:l,dd:l,M:l,MM:l,y:l,yy:l},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(p(15439))},65283:function(qe,I,p){!function(o){"use strict";o.defineLocale("hy-am",{months:{format:"\u0570\u0578\u0582\u0576\u057e\u0561\u0580\u056b_\u0583\u0565\u057f\u0580\u057e\u0561\u0580\u056b_\u0574\u0561\u0580\u057f\u056b_\u0561\u057a\u0580\u056b\u056c\u056b_\u0574\u0561\u0575\u056b\u057d\u056b_\u0570\u0578\u0582\u0576\u056b\u057d\u056b_\u0570\u0578\u0582\u056c\u056b\u057d\u056b_\u0585\u0563\u0578\u057d\u057f\u0578\u057d\u056b_\u057d\u0565\u057a\u057f\u0565\u0574\u0562\u0565\u0580\u056b_\u0570\u0578\u056f\u057f\u0565\u0574\u0562\u0565\u0580\u056b_\u0576\u0578\u0575\u0565\u0574\u0562\u0565\u0580\u056b_\u0564\u0565\u056f\u057f\u0565\u0574\u0562\u0565\u0580\u056b".split("_"),standalone:"\u0570\u0578\u0582\u0576\u057e\u0561\u0580_\u0583\u0565\u057f\u0580\u057e\u0561\u0580_\u0574\u0561\u0580\u057f_\u0561\u057a\u0580\u056b\u056c_\u0574\u0561\u0575\u056b\u057d_\u0570\u0578\u0582\u0576\u056b\u057d_\u0570\u0578\u0582\u056c\u056b\u057d_\u0585\u0563\u0578\u057d\u057f\u0578\u057d_\u057d\u0565\u057a\u057f\u0565\u0574\u0562\u0565\u0580_\u0570\u0578\u056f\u057f\u0565\u0574\u0562\u0565\u0580_\u0576\u0578\u0575\u0565\u0574\u0562\u0565\u0580_\u0564\u0565\u056f\u057f\u0565\u0574\u0562\u0565\u0580".split("_")},monthsShort:"\u0570\u0576\u057e_\u0583\u057f\u0580_\u0574\u0580\u057f_\u0561\u057a\u0580_\u0574\u0575\u057d_\u0570\u0576\u057d_\u0570\u056c\u057d_\u0585\u0563\u057d_\u057d\u057a\u057f_\u0570\u056f\u057f_\u0576\u0574\u0562_\u0564\u056f\u057f".split("_"),weekdays:"\u056f\u056b\u0580\u0561\u056f\u056b_\u0565\u0580\u056f\u0578\u0582\u0577\u0561\u0562\u0569\u056b_\u0565\u0580\u0565\u0584\u0577\u0561\u0562\u0569\u056b_\u0579\u0578\u0580\u0565\u0584\u0577\u0561\u0562\u0569\u056b_\u0570\u056b\u0576\u0563\u0577\u0561\u0562\u0569\u056b_\u0578\u0582\u0580\u0562\u0561\u0569_\u0577\u0561\u0562\u0561\u0569".split("_"),weekdaysShort:"\u056f\u0580\u056f_\u0565\u0580\u056f_\u0565\u0580\u0584_\u0579\u0580\u0584_\u0570\u0576\u0563_\u0578\u0582\u0580\u0562_\u0577\u0562\u0569".split("_"),weekdaysMin:"\u056f\u0580\u056f_\u0565\u0580\u056f_\u0565\u0580\u0584_\u0579\u0580\u0584_\u0570\u0576\u0563_\u0578\u0582\u0580\u0562_\u0577\u0562\u0569".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY \u0569.",LLL:"D MMMM YYYY \u0569., HH:mm",LLLL:"dddd, D MMMM YYYY \u0569., HH:mm"},calendar:{sameDay:"[\u0561\u0575\u057d\u0585\u0580] LT",nextDay:"[\u057e\u0561\u0572\u0568] LT",lastDay:"[\u0565\u0580\u0565\u056f] LT",nextWeek:function(){return"dddd [\u0585\u0580\u0568 \u056a\u0561\u0574\u0568] LT"},lastWeek:function(){return"[\u0561\u0576\u0581\u0561\u056e] dddd [\u0585\u0580\u0568 \u056a\u0561\u0574\u0568] LT"},sameElse:"L"},relativeTime:{future:"%s \u0570\u0565\u057f\u0578",past:"%s \u0561\u057c\u0561\u057b",s:"\u0574\u056b \u0584\u0561\u0576\u056b \u057e\u0561\u0575\u0580\u056f\u0575\u0561\u0576",ss:"%d \u057e\u0561\u0575\u0580\u056f\u0575\u0561\u0576",m:"\u0580\u0578\u057a\u0565",mm:"%d \u0580\u0578\u057a\u0565",h:"\u056a\u0561\u0574",hh:"%d \u056a\u0561\u0574",d:"\u0585\u0580",dd:"%d \u0585\u0580",M:"\u0561\u0574\u056b\u057d",MM:"%d \u0561\u0574\u056b\u057d",y:"\u057f\u0561\u0580\u056b",yy:"%d \u057f\u0561\u0580\u056b"},meridiemParse:/\u0563\u056b\u0577\u0565\u0580\u057e\u0561|\u0561\u057c\u0561\u057e\u0578\u057f\u057e\u0561|\u0581\u0565\u0580\u0565\u056f\u057e\u0561|\u0565\u0580\u0565\u056f\u0578\u0575\u0561\u0576/,isPM:function(l){return/^(\u0581\u0565\u0580\u0565\u056f\u057e\u0561|\u0565\u0580\u0565\u056f\u0578\u0575\u0561\u0576)$/.test(l)},meridiem:function(l){return l<4?"\u0563\u056b\u0577\u0565\u0580\u057e\u0561":l<12?"\u0561\u057c\u0561\u057e\u0578\u057f\u057e\u0561":l<17?"\u0581\u0565\u0580\u0565\u056f\u057e\u0561":"\u0565\u0580\u0565\u056f\u0578\u0575\u0561\u0576"},dayOfMonthOrdinalParse:/\d{1,2}|\d{1,2}-(\u056b\u0576|\u0580\u0564)/,ordinal:function(l,D){switch(D){case"DDD":case"w":case"W":case"DDDo":return 1===l?l+"-\u056b\u0576":l+"-\u0580\u0564";default:return l}},week:{dow:1,doy:7}})}(p(15439))},98780:function(qe,I,p){!function(o){"use strict";o.defineLocale("id",{months:"Januari_Februari_Maret_April_Mei_Juni_Juli_Agustus_September_Oktober_November_Desember".split("_"),monthsShort:"Jan_Feb_Mar_Apr_Mei_Jun_Jul_Agt_Sep_Okt_Nov_Des".split("_"),weekdays:"Minggu_Senin_Selasa_Rabu_Kamis_Jumat_Sabtu".split("_"),weekdaysShort:"Min_Sen_Sel_Rab_Kam_Jum_Sab".split("_"),weekdaysMin:"Mg_Sn_Sl_Rb_Km_Jm_Sb".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [pukul] HH.mm",LLLL:"dddd, D MMMM YYYY [pukul] HH.mm"},meridiemParse:/pagi|siang|sore|malam/,meridiemHour:function(l,D){return 12===l&&(l=0),"pagi"===D?l:"siang"===D?l>=11?l:l+12:"sore"===D||"malam"===D?l+12:void 0},meridiem:function(l,D,g){return l<11?"pagi":l<15?"siang":l<19?"sore":"malam"},calendar:{sameDay:"[Hari ini pukul] LT",nextDay:"[Besok pukul] LT",nextWeek:"dddd [pukul] LT",lastDay:"[Kemarin pukul] LT",lastWeek:"dddd [lalu pukul] LT",sameElse:"L"},relativeTime:{future:"dalam %s",past:"%s yang lalu",s:"beberapa detik",ss:"%d detik",m:"semenit",mm:"%d menit",h:"sejam",hh:"%d jam",d:"sehari",dd:"%d hari",M:"sebulan",MM:"%d bulan",y:"setahun",yy:"%d tahun"},week:{dow:0,doy:6}})}(p(15439))},14205:function(qe,I,p){!function(o){"use strict";function e(g){return g%100==11||g%10!=1}function l(g,E,T,n){var P=g+" ";switch(T){case"s":return E||n?"nokkrar sek\xfandur":"nokkrum sek\xfandum";case"ss":return e(g)?P+(E||n?"sek\xfandur":"sek\xfandum"):P+"sek\xfanda";case"m":return E?"m\xedn\xfata":"m\xedn\xfatu";case"mm":return e(g)?P+(E||n?"m\xedn\xfatur":"m\xedn\xfatum"):E?P+"m\xedn\xfata":P+"m\xedn\xfatu";case"hh":return e(g)?P+(E||n?"klukkustundir":"klukkustundum"):P+"klukkustund";case"d":return E?"dagur":n?"dag":"degi";case"dd":return e(g)?E?P+"dagar":P+(n?"daga":"d\xf6gum"):E?P+"dagur":P+(n?"dag":"degi");case"M":return E?"m\xe1nu\xf0ur":n?"m\xe1nu\xf0":"m\xe1nu\xf0i";case"MM":return e(g)?E?P+"m\xe1nu\xf0ir":P+(n?"m\xe1nu\xf0i":"m\xe1nu\xf0um"):E?P+"m\xe1nu\xf0ur":P+(n?"m\xe1nu\xf0":"m\xe1nu\xf0i");case"y":return E||n?"\xe1r":"\xe1ri";case"yy":return e(g)?P+(E||n?"\xe1r":"\xe1rum"):P+(E||n?"\xe1r":"\xe1ri")}}o.defineLocale("is",{months:"jan\xfaar_febr\xfaar_mars_apr\xedl_ma\xed_j\xfan\xed_j\xfal\xed_\xe1g\xfast_september_okt\xf3ber_n\xf3vember_desember".split("_"),monthsShort:"jan_feb_mar_apr_ma\xed_j\xfan_j\xfal_\xe1g\xfa_sep_okt_n\xf3v_des".split("_"),weekdays:"sunnudagur_m\xe1nudagur_\xferi\xf0judagur_mi\xf0vikudagur_fimmtudagur_f\xf6studagur_laugardagur".split("_"),weekdaysShort:"sun_m\xe1n_\xferi_mi\xf0_fim_f\xf6s_lau".split("_"),weekdaysMin:"Su_M\xe1_\xder_Mi_Fi_F\xf6_La".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY [kl.] H:mm",LLLL:"dddd, D. MMMM YYYY [kl.] H:mm"},calendar:{sameDay:"[\xed dag kl.] LT",nextDay:"[\xe1 morgun kl.] LT",nextWeek:"dddd [kl.] LT",lastDay:"[\xed g\xe6r kl.] LT",lastWeek:"[s\xed\xf0asta] dddd [kl.] LT",sameElse:"L"},relativeTime:{future:"eftir %s",past:"fyrir %s s\xed\xf0an",s:l,ss:l,m:l,mm:l,h:"klukkustund",hh:l,d:l,dd:l,M:l,MM:l,y:l,yy:l},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(p(15439))},29985:function(qe,I,p){!function(o){"use strict";o.defineLocale("it-ch",{months:"gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre".split("_"),monthsShort:"gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic".split("_"),weekdays:"domenica_luned\xec_marted\xec_mercoled\xec_gioved\xec_venerd\xec_sabato".split("_"),weekdaysShort:"dom_lun_mar_mer_gio_ven_sab".split("_"),weekdaysMin:"do_lu_ma_me_gi_ve_sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[Oggi alle] LT",nextDay:"[Domani alle] LT",nextWeek:"dddd [alle] LT",lastDay:"[Ieri alle] LT",lastWeek:function(){return 0===this.day()?"[la scorsa] dddd [alle] LT":"[lo scorso] dddd [alle] LT"},sameElse:"L"},relativeTime:{future:function(l){return(/^[0-9].+$/.test(l)?"tra":"in")+" "+l},past:"%s fa",s:"alcuni secondi",ss:"%d secondi",m:"un minuto",mm:"%d minuti",h:"un'ora",hh:"%d ore",d:"un giorno",dd:"%d giorni",M:"un mese",MM:"%d mesi",y:"un anno",yy:"%d anni"},dayOfMonthOrdinalParse:/\d{1,2}\xba/,ordinal:"%d\xba",week:{dow:1,doy:4}})}(p(15439))},34211:function(qe,I,p){!function(o){"use strict";o.defineLocale("it",{months:"gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre".split("_"),monthsShort:"gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic".split("_"),weekdays:"domenica_luned\xec_marted\xec_mercoled\xec_gioved\xec_venerd\xec_sabato".split("_"),weekdaysShort:"dom_lun_mar_mer_gio_ven_sab".split("_"),weekdaysMin:"do_lu_ma_me_gi_ve_sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:function(){return"[Oggi a"+(this.hours()>1?"lle ":0===this.hours()?" ":"ll'")+"]LT"},nextDay:function(){return"[Domani a"+(this.hours()>1?"lle ":0===this.hours()?" ":"ll'")+"]LT"},nextWeek:function(){return"dddd [a"+(this.hours()>1?"lle ":0===this.hours()?" ":"ll'")+"]LT"},lastDay:function(){return"[Ieri a"+(this.hours()>1?"lle ":0===this.hours()?" ":"ll'")+"]LT"},lastWeek:function(){return 0===this.day()?"[La scorsa] dddd [a"+(this.hours()>1?"lle ":0===this.hours()?" ":"ll'")+"]LT":"[Lo scorso] dddd [a"+(this.hours()>1?"lle ":0===this.hours()?" ":"ll'")+"]LT"},sameElse:"L"},relativeTime:{future:"tra %s",past:"%s fa",s:"alcuni secondi",ss:"%d secondi",m:"un minuto",mm:"%d minuti",h:"un'ora",hh:"%d ore",d:"un giorno",dd:"%d giorni",w:"una settimana",ww:"%d settimane",M:"un mese",MM:"%d mesi",y:"un anno",yy:"%d anni"},dayOfMonthOrdinalParse:/\d{1,2}\xba/,ordinal:"%d\xba",week:{dow:1,doy:4}})}(p(15439))},31003:function(qe,I,p){!function(o){"use strict";o.defineLocale("ja",{eras:[{since:"2019-05-01",offset:1,name:"\u4ee4\u548c",narrow:"\u32ff",abbr:"R"},{since:"1989-01-08",until:"2019-04-30",offset:1,name:"\u5e73\u6210",narrow:"\u337b",abbr:"H"},{since:"1926-12-25",until:"1989-01-07",offset:1,name:"\u662d\u548c",narrow:"\u337c",abbr:"S"},{since:"1912-07-30",until:"1926-12-24",offset:1,name:"\u5927\u6b63",narrow:"\u337d",abbr:"T"},{since:"1873-01-01",until:"1912-07-29",offset:6,name:"\u660e\u6cbb",narrow:"\u337e",abbr:"M"},{since:"0001-01-01",until:"1873-12-31",offset:1,name:"\u897f\u66a6",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"\u7d00\u5143\u524d",narrow:"BC",abbr:"BC"}],eraYearOrdinalRegex:/(\u5143|\d+)\u5e74/,eraYearOrdinalParse:function(l,D){return"\u5143"===D[1]?1:parseInt(D[1]||l,10)},months:"1\u6708_2\u6708_3\u6708_4\u6708_5\u6708_6\u6708_7\u6708_8\u6708_9\u6708_10\u6708_11\u6708_12\u6708".split("_"),monthsShort:"1\u6708_2\u6708_3\u6708_4\u6708_5\u6708_6\u6708_7\u6708_8\u6708_9\u6708_10\u6708_11\u6708_12\u6708".split("_"),weekdays:"\u65e5\u66dc\u65e5_\u6708\u66dc\u65e5_\u706b\u66dc\u65e5_\u6c34\u66dc\u65e5_\u6728\u66dc\u65e5_\u91d1\u66dc\u65e5_\u571f\u66dc\u65e5".split("_"),weekdaysShort:"\u65e5_\u6708_\u706b_\u6c34_\u6728_\u91d1_\u571f".split("_"),weekdaysMin:"\u65e5_\u6708_\u706b_\u6c34_\u6728_\u91d1_\u571f".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY\u5e74M\u6708D\u65e5",LLL:"YYYY\u5e74M\u6708D\u65e5 HH:mm",LLLL:"YYYY\u5e74M\u6708D\u65e5 dddd HH:mm",l:"YYYY/MM/DD",ll:"YYYY\u5e74M\u6708D\u65e5",lll:"YYYY\u5e74M\u6708D\u65e5 HH:mm",llll:"YYYY\u5e74M\u6708D\u65e5(ddd) HH:mm"},meridiemParse:/\u5348\u524d|\u5348\u5f8c/i,isPM:function(l){return"\u5348\u5f8c"===l},meridiem:function(l,D,g){return l<12?"\u5348\u524d":"\u5348\u5f8c"},calendar:{sameDay:"[\u4eca\u65e5] LT",nextDay:"[\u660e\u65e5] LT",nextWeek:function(l){return l.week()!==this.week()?"[\u6765\u9031]dddd LT":"dddd LT"},lastDay:"[\u6628\u65e5] LT",lastWeek:function(l){return this.week()!==l.week()?"[\u5148\u9031]dddd LT":"dddd LT"},sameElse:"L"},dayOfMonthOrdinalParse:/\d{1,2}\u65e5/,ordinal:function(l,D){switch(D){case"y":return 1===l?"\u5143\u5e74":l+"\u5e74";case"d":case"D":case"DDD":return l+"\u65e5";default:return l}},relativeTime:{future:"%s\u5f8c",past:"%s\u524d",s:"\u6570\u79d2",ss:"%d\u79d2",m:"1\u5206",mm:"%d\u5206",h:"1\u6642\u9593",hh:"%d\u6642\u9593",d:"1\u65e5",dd:"%d\u65e5",M:"1\u30f6\u6708",MM:"%d\u30f6\u6708",y:"1\u5e74",yy:"%d\u5e74"}})}(p(15439))},60420:function(qe,I,p){!function(o){"use strict";o.defineLocale("jv",{months:"Januari_Februari_Maret_April_Mei_Juni_Juli_Agustus_September_Oktober_Nopember_Desember".split("_"),monthsShort:"Jan_Feb_Mar_Apr_Mei_Jun_Jul_Ags_Sep_Okt_Nop_Des".split("_"),weekdays:"Minggu_Senen_Seloso_Rebu_Kemis_Jemuwah_Septu".split("_"),weekdaysShort:"Min_Sen_Sel_Reb_Kem_Jem_Sep".split("_"),weekdaysMin:"Mg_Sn_Sl_Rb_Km_Jm_Sp".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [pukul] HH.mm",LLLL:"dddd, D MMMM YYYY [pukul] HH.mm"},meridiemParse:/enjing|siyang|sonten|ndalu/,meridiemHour:function(l,D){return 12===l&&(l=0),"enjing"===D?l:"siyang"===D?l>=11?l:l+12:"sonten"===D||"ndalu"===D?l+12:void 0},meridiem:function(l,D,g){return l<11?"enjing":l<15?"siyang":l<19?"sonten":"ndalu"},calendar:{sameDay:"[Dinten puniko pukul] LT",nextDay:"[Mbenjang pukul] LT",nextWeek:"dddd [pukul] LT",lastDay:"[Kala wingi pukul] LT",lastWeek:"dddd [kepengker pukul] LT",sameElse:"L"},relativeTime:{future:"wonten ing %s",past:"%s ingkang kepengker",s:"sawetawis detik",ss:"%d detik",m:"setunggal menit",mm:"%d menit",h:"setunggal jam",hh:"%d jam",d:"sedinten",dd:"%d dinten",M:"sewulan",MM:"%d wulan",y:"setaun",yy:"%d taun"},week:{dow:1,doy:7}})}(p(15439))},40851:function(qe,I,p){!function(o){"use strict";o.defineLocale("ka",{months:"\u10d8\u10d0\u10dc\u10d5\u10d0\u10e0\u10d8_\u10d7\u10d4\u10d1\u10d4\u10e0\u10d5\u10d0\u10da\u10d8_\u10db\u10d0\u10e0\u10e2\u10d8_\u10d0\u10de\u10e0\u10d8\u10da\u10d8_\u10db\u10d0\u10d8\u10e1\u10d8_\u10d8\u10d5\u10dc\u10d8\u10e1\u10d8_\u10d8\u10d5\u10da\u10d8\u10e1\u10d8_\u10d0\u10d2\u10d5\u10d8\u10e1\u10e2\u10dd_\u10e1\u10d4\u10e5\u10e2\u10d4\u10db\u10d1\u10d4\u10e0\u10d8_\u10dd\u10e5\u10e2\u10dd\u10db\u10d1\u10d4\u10e0\u10d8_\u10dc\u10dd\u10d4\u10db\u10d1\u10d4\u10e0\u10d8_\u10d3\u10d4\u10d9\u10d4\u10db\u10d1\u10d4\u10e0\u10d8".split("_"),monthsShort:"\u10d8\u10d0\u10dc_\u10d7\u10d4\u10d1_\u10db\u10d0\u10e0_\u10d0\u10de\u10e0_\u10db\u10d0\u10d8_\u10d8\u10d5\u10dc_\u10d8\u10d5\u10da_\u10d0\u10d2\u10d5_\u10e1\u10d4\u10e5_\u10dd\u10e5\u10e2_\u10dc\u10dd\u10d4_\u10d3\u10d4\u10d9".split("_"),weekdays:{standalone:"\u10d9\u10d5\u10d8\u10e0\u10d0_\u10dd\u10e0\u10e8\u10d0\u10d1\u10d0\u10d7\u10d8_\u10e1\u10d0\u10db\u10e8\u10d0\u10d1\u10d0\u10d7\u10d8_\u10dd\u10d7\u10ee\u10e8\u10d0\u10d1\u10d0\u10d7\u10d8_\u10ee\u10e3\u10d7\u10e8\u10d0\u10d1\u10d0\u10d7\u10d8_\u10de\u10d0\u10e0\u10d0\u10e1\u10d9\u10d4\u10d5\u10d8_\u10e8\u10d0\u10d1\u10d0\u10d7\u10d8".split("_"),format:"\u10d9\u10d5\u10d8\u10e0\u10d0\u10e1_\u10dd\u10e0\u10e8\u10d0\u10d1\u10d0\u10d7\u10e1_\u10e1\u10d0\u10db\u10e8\u10d0\u10d1\u10d0\u10d7\u10e1_\u10dd\u10d7\u10ee\u10e8\u10d0\u10d1\u10d0\u10d7\u10e1_\u10ee\u10e3\u10d7\u10e8\u10d0\u10d1\u10d0\u10d7\u10e1_\u10de\u10d0\u10e0\u10d0\u10e1\u10d9\u10d4\u10d5\u10e1_\u10e8\u10d0\u10d1\u10d0\u10d7\u10e1".split("_"),isFormat:/(\u10ec\u10d8\u10dc\u10d0|\u10e8\u10d4\u10db\u10d3\u10d4\u10d2)/},weekdaysShort:"\u10d9\u10d5\u10d8_\u10dd\u10e0\u10e8_\u10e1\u10d0\u10db_\u10dd\u10d7\u10ee_\u10ee\u10e3\u10d7_\u10de\u10d0\u10e0_\u10e8\u10d0\u10d1".split("_"),weekdaysMin:"\u10d9\u10d5_\u10dd\u10e0_\u10e1\u10d0_\u10dd\u10d7_\u10ee\u10e3_\u10de\u10d0_\u10e8\u10d0".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[\u10d3\u10e6\u10d4\u10e1] LT[-\u10d6\u10d4]",nextDay:"[\u10ee\u10d5\u10d0\u10da] LT[-\u10d6\u10d4]",lastDay:"[\u10d2\u10e3\u10e8\u10d8\u10dc] LT[-\u10d6\u10d4]",nextWeek:"[\u10e8\u10d4\u10db\u10d3\u10d4\u10d2] dddd LT[-\u10d6\u10d4]",lastWeek:"[\u10ec\u10d8\u10dc\u10d0] dddd LT-\u10d6\u10d4",sameElse:"L"},relativeTime:{future:function(l){return l.replace(/(\u10ec\u10d0\u10db|\u10ec\u10e3\u10d7|\u10e1\u10d0\u10d0\u10d7|\u10ec\u10d4\u10da|\u10d3\u10e6|\u10d7\u10d5)(\u10d8|\u10d4)/,function(D,g,E){return"\u10d8"===E?g+"\u10e8\u10d8":g+E+"\u10e8\u10d8"})},past:function(l){return/(\u10ec\u10d0\u10db\u10d8|\u10ec\u10e3\u10d7\u10d8|\u10e1\u10d0\u10d0\u10d7\u10d8|\u10d3\u10e6\u10d4|\u10d7\u10d5\u10d4)/.test(l)?l.replace(/(\u10d8|\u10d4)$/,"\u10d8\u10e1 \u10ec\u10d8\u10dc"):/\u10ec\u10d4\u10da\u10d8/.test(l)?l.replace(/\u10ec\u10d4\u10da\u10d8$/,"\u10ec\u10da\u10d8\u10e1 \u10ec\u10d8\u10dc"):l},s:"\u10e0\u10d0\u10db\u10d3\u10d4\u10dc\u10d8\u10db\u10d4 \u10ec\u10d0\u10db\u10d8",ss:"%d \u10ec\u10d0\u10db\u10d8",m:"\u10ec\u10e3\u10d7\u10d8",mm:"%d \u10ec\u10e3\u10d7\u10d8",h:"\u10e1\u10d0\u10d0\u10d7\u10d8",hh:"%d \u10e1\u10d0\u10d0\u10d7\u10d8",d:"\u10d3\u10e6\u10d4",dd:"%d \u10d3\u10e6\u10d4",M:"\u10d7\u10d5\u10d4",MM:"%d \u10d7\u10d5\u10d4",y:"\u10ec\u10d4\u10da\u10d8",yy:"%d \u10ec\u10d4\u10da\u10d8"},dayOfMonthOrdinalParse:/0|1-\u10da\u10d8|\u10db\u10d4-\d{1,2}|\d{1,2}-\u10d4/,ordinal:function(l){return 0===l?l:1===l?l+"-\u10da\u10d8":l<20||l<=100&&l%20==0||l%100==0?"\u10db\u10d4-"+l:l+"-\u10d4"},week:{dow:1,doy:7}})}(p(15439))},16074:function(qe,I,p){!function(o){"use strict";var e={0:"-\u0448\u0456",1:"-\u0448\u0456",2:"-\u0448\u0456",3:"-\u0448\u0456",4:"-\u0448\u0456",5:"-\u0448\u0456",6:"-\u0448\u044b",7:"-\u0448\u0456",8:"-\u0448\u0456",9:"-\u0448\u044b",10:"-\u0448\u044b",20:"-\u0448\u044b",30:"-\u0448\u044b",40:"-\u0448\u044b",50:"-\u0448\u0456",60:"-\u0448\u044b",70:"-\u0448\u0456",80:"-\u0448\u0456",90:"-\u0448\u044b",100:"-\u0448\u0456"};o.defineLocale("kk",{months:"\u049b\u0430\u04a3\u0442\u0430\u0440_\u0430\u049b\u043f\u0430\u043d_\u043d\u0430\u0443\u0440\u044b\u0437_\u0441\u04d9\u0443\u0456\u0440_\u043c\u0430\u043c\u044b\u0440_\u043c\u0430\u0443\u0441\u044b\u043c_\u0448\u0456\u043b\u0434\u0435_\u0442\u0430\u043c\u044b\u0437_\u049b\u044b\u0440\u043a\u04af\u0439\u0435\u043a_\u049b\u0430\u0437\u0430\u043d_\u049b\u0430\u0440\u0430\u0448\u0430_\u0436\u0435\u043b\u0442\u043e\u049b\u0441\u0430\u043d".split("_"),monthsShort:"\u049b\u0430\u04a3_\u0430\u049b\u043f_\u043d\u0430\u0443_\u0441\u04d9\u0443_\u043c\u0430\u043c_\u043c\u0430\u0443_\u0448\u0456\u043b_\u0442\u0430\u043c_\u049b\u044b\u0440_\u049b\u0430\u0437_\u049b\u0430\u0440_\u0436\u0435\u043b".split("_"),weekdays:"\u0436\u0435\u043a\u0441\u0435\u043d\u0431\u0456_\u0434\u04af\u0439\u0441\u0435\u043d\u0431\u0456_\u0441\u0435\u0439\u0441\u0435\u043d\u0431\u0456_\u0441\u04d9\u0440\u0441\u0435\u043d\u0431\u0456_\u0431\u0435\u0439\u0441\u0435\u043d\u0431\u0456_\u0436\u04b1\u043c\u0430_\u0441\u0435\u043d\u0431\u0456".split("_"),weekdaysShort:"\u0436\u0435\u043a_\u0434\u04af\u0439_\u0441\u0435\u0439_\u0441\u04d9\u0440_\u0431\u0435\u0439_\u0436\u04b1\u043c_\u0441\u0435\u043d".split("_"),weekdaysMin:"\u0436\u043a_\u0434\u0439_\u0441\u0439_\u0441\u0440_\u0431\u0439_\u0436\u043c_\u0441\u043d".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[\u0411\u04af\u0433\u0456\u043d \u0441\u0430\u0493\u0430\u0442] LT",nextDay:"[\u0415\u0440\u0442\u0435\u04a3 \u0441\u0430\u0493\u0430\u0442] LT",nextWeek:"dddd [\u0441\u0430\u0493\u0430\u0442] LT",lastDay:"[\u041a\u0435\u0448\u0435 \u0441\u0430\u0493\u0430\u0442] LT",lastWeek:"[\u04e8\u0442\u043a\u0435\u043d \u0430\u043f\u0442\u0430\u043d\u044b\u04a3] dddd [\u0441\u0430\u0493\u0430\u0442] LT",sameElse:"L"},relativeTime:{future:"%s \u0456\u0448\u0456\u043d\u0434\u0435",past:"%s \u0431\u04b1\u0440\u044b\u043d",s:"\u0431\u0456\u0440\u043d\u0435\u0448\u0435 \u0441\u0435\u043a\u0443\u043d\u0434",ss:"%d \u0441\u0435\u043a\u0443\u043d\u0434",m:"\u0431\u0456\u0440 \u043c\u0438\u043d\u0443\u0442",mm:"%d \u043c\u0438\u043d\u0443\u0442",h:"\u0431\u0456\u0440 \u0441\u0430\u0493\u0430\u0442",hh:"%d \u0441\u0430\u0493\u0430\u0442",d:"\u0431\u0456\u0440 \u043a\u04af\u043d",dd:"%d \u043a\u04af\u043d",M:"\u0431\u0456\u0440 \u0430\u0439",MM:"%d \u0430\u0439",y:"\u0431\u0456\u0440 \u0436\u044b\u043b",yy:"%d \u0436\u044b\u043b"},dayOfMonthOrdinalParse:/\d{1,2}-(\u0448\u0456|\u0448\u044b)/,ordinal:function(D){var g=D%10,E=D>=100?100:null;return D+(e[D]||e[g]||e[E])},week:{dow:1,doy:7}})}(p(15439))},53343:function(qe,I,p){!function(o){"use strict";var e={1:"\u17e1",2:"\u17e2",3:"\u17e3",4:"\u17e4",5:"\u17e5",6:"\u17e6",7:"\u17e7",8:"\u17e8",9:"\u17e9",0:"\u17e0"},l={"\u17e1":"1","\u17e2":"2","\u17e3":"3","\u17e4":"4","\u17e5":"5","\u17e6":"6","\u17e7":"7","\u17e8":"8","\u17e9":"9","\u17e0":"0"};o.defineLocale("km",{months:"\u1798\u1780\u179a\u17b6_\u1780\u17bb\u1798\u17d2\u1797\u17c8_\u1798\u17b8\u1793\u17b6_\u1798\u17c1\u179f\u17b6_\u17a7\u179f\u1797\u17b6_\u1798\u17b7\u1790\u17bb\u1793\u17b6_\u1780\u1780\u17d2\u1780\u178a\u17b6_\u179f\u17b8\u17a0\u17b6_\u1780\u1789\u17d2\u1789\u17b6_\u178f\u17bb\u179b\u17b6_\u179c\u17b7\u1785\u17d2\u1786\u17b7\u1780\u17b6_\u1792\u17d2\u1793\u17bc".split("_"),monthsShort:"\u1798\u1780\u179a\u17b6_\u1780\u17bb\u1798\u17d2\u1797\u17c8_\u1798\u17b8\u1793\u17b6_\u1798\u17c1\u179f\u17b6_\u17a7\u179f\u1797\u17b6_\u1798\u17b7\u1790\u17bb\u1793\u17b6_\u1780\u1780\u17d2\u1780\u178a\u17b6_\u179f\u17b8\u17a0\u17b6_\u1780\u1789\u17d2\u1789\u17b6_\u178f\u17bb\u179b\u17b6_\u179c\u17b7\u1785\u17d2\u1786\u17b7\u1780\u17b6_\u1792\u17d2\u1793\u17bc".split("_"),weekdays:"\u17a2\u17b6\u1791\u17b7\u178f\u17d2\u1799_\u1785\u17d0\u1793\u17d2\u1791_\u17a2\u1784\u17d2\u1782\u17b6\u179a_\u1796\u17bb\u1792_\u1796\u17d2\u179a\u17a0\u179f\u17d2\u1794\u178f\u17b7\u17cd_\u179f\u17bb\u1780\u17d2\u179a_\u179f\u17c5\u179a\u17cd".split("_"),weekdaysShort:"\u17a2\u17b6_\u1785_\u17a2_\u1796_\u1796\u17d2\u179a_\u179f\u17bb_\u179f".split("_"),weekdaysMin:"\u17a2\u17b6_\u1785_\u17a2_\u1796_\u1796\u17d2\u179a_\u179f\u17bb_\u179f".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},meridiemParse:/\u1796\u17d2\u179a\u17b9\u1780|\u179b\u17d2\u1784\u17b6\u1785/,isPM:function(g){return"\u179b\u17d2\u1784\u17b6\u1785"===g},meridiem:function(g,E,T){return g<12?"\u1796\u17d2\u179a\u17b9\u1780":"\u179b\u17d2\u1784\u17b6\u1785"},calendar:{sameDay:"[\u1790\u17d2\u1784\u17c3\u1793\u17c1\u17c7 \u1798\u17c9\u17c4\u1784] LT",nextDay:"[\u179f\u17d2\u17a2\u17c2\u1780 \u1798\u17c9\u17c4\u1784] LT",nextWeek:"dddd [\u1798\u17c9\u17c4\u1784] LT",lastDay:"[\u1798\u17d2\u179f\u17b7\u179b\u1798\u17b7\u1789 \u1798\u17c9\u17c4\u1784] LT",lastWeek:"dddd [\u179f\u1794\u17d2\u178f\u17b6\u17a0\u17cd\u1798\u17bb\u1793] [\u1798\u17c9\u17c4\u1784] LT",sameElse:"L"},relativeTime:{future:"%s\u1791\u17c0\u178f",past:"%s\u1798\u17bb\u1793",s:"\u1794\u17c9\u17bb\u1793\u17d2\u1798\u17b6\u1793\u179c\u17b7\u1793\u17b6\u1791\u17b8",ss:"%d \u179c\u17b7\u1793\u17b6\u1791\u17b8",m:"\u1798\u17bd\u1799\u1793\u17b6\u1791\u17b8",mm:"%d \u1793\u17b6\u1791\u17b8",h:"\u1798\u17bd\u1799\u1798\u17c9\u17c4\u1784",hh:"%d \u1798\u17c9\u17c4\u1784",d:"\u1798\u17bd\u1799\u1790\u17d2\u1784\u17c3",dd:"%d \u1790\u17d2\u1784\u17c3",M:"\u1798\u17bd\u1799\u1781\u17c2",MM:"%d \u1781\u17c2",y:"\u1798\u17bd\u1799\u1786\u17d2\u1793\u17b6\u17c6",yy:"%d \u1786\u17d2\u1793\u17b6\u17c6"},dayOfMonthOrdinalParse:/\u1791\u17b8\d{1,2}/,ordinal:"\u1791\u17b8%d",preparse:function(g){return g.replace(/[\u17e1\u17e2\u17e3\u17e4\u17e5\u17e6\u17e7\u17e8\u17e9\u17e0]/g,function(E){return l[E]})},postformat:function(g){return g.replace(/\d/g,function(E){return e[E]})},week:{dow:1,doy:4}})}(p(15439))},44799:function(qe,I,p){!function(o){"use strict";var e={1:"\u0ce7",2:"\u0ce8",3:"\u0ce9",4:"\u0cea",5:"\u0ceb",6:"\u0cec",7:"\u0ced",8:"\u0cee",9:"\u0cef",0:"\u0ce6"},l={"\u0ce7":"1","\u0ce8":"2","\u0ce9":"3","\u0cea":"4","\u0ceb":"5","\u0cec":"6","\u0ced":"7","\u0cee":"8","\u0cef":"9","\u0ce6":"0"};o.defineLocale("kn",{months:"\u0c9c\u0ca8\u0cb5\u0cb0\u0cbf_\u0cab\u0cc6\u0cac\u0ccd\u0cb0\u0cb5\u0cb0\u0cbf_\u0cae\u0cbe\u0cb0\u0ccd\u0c9a\u0ccd_\u0c8f\u0caa\u0ccd\u0cb0\u0cbf\u0cb2\u0ccd_\u0cae\u0cc6\u0cd5_\u0c9c\u0cc2\u0ca8\u0ccd_\u0c9c\u0cc1\u0cb2\u0cc6\u0cd6_\u0c86\u0c97\u0cb8\u0ccd\u0c9f\u0ccd_\u0cb8\u0cc6\u0caa\u0ccd\u0c9f\u0cc6\u0c82\u0cac\u0cb0\u0ccd_\u0c85\u0c95\u0ccd\u0c9f\u0cc6\u0cc2\u0cd5\u0cac\u0cb0\u0ccd_\u0ca8\u0cb5\u0cc6\u0c82\u0cac\u0cb0\u0ccd_\u0ca1\u0cbf\u0cb8\u0cc6\u0c82\u0cac\u0cb0\u0ccd".split("_"),monthsShort:"\u0c9c\u0ca8_\u0cab\u0cc6\u0cac\u0ccd\u0cb0_\u0cae\u0cbe\u0cb0\u0ccd\u0c9a\u0ccd_\u0c8f\u0caa\u0ccd\u0cb0\u0cbf\u0cb2\u0ccd_\u0cae\u0cc6\u0cd5_\u0c9c\u0cc2\u0ca8\u0ccd_\u0c9c\u0cc1\u0cb2\u0cc6\u0cd6_\u0c86\u0c97\u0cb8\u0ccd\u0c9f\u0ccd_\u0cb8\u0cc6\u0caa\u0ccd\u0c9f\u0cc6\u0c82_\u0c85\u0c95\u0ccd\u0c9f\u0cc6\u0cc2\u0cd5_\u0ca8\u0cb5\u0cc6\u0c82_\u0ca1\u0cbf\u0cb8\u0cc6\u0c82".split("_"),monthsParseExact:!0,weekdays:"\u0cad\u0cbe\u0ca8\u0cc1\u0cb5\u0cbe\u0cb0_\u0cb8\u0cc6\u0cc2\u0cd5\u0cae\u0cb5\u0cbe\u0cb0_\u0cae\u0c82\u0c97\u0cb3\u0cb5\u0cbe\u0cb0_\u0cac\u0cc1\u0ca7\u0cb5\u0cbe\u0cb0_\u0c97\u0cc1\u0cb0\u0cc1\u0cb5\u0cbe\u0cb0_\u0cb6\u0cc1\u0c95\u0ccd\u0cb0\u0cb5\u0cbe\u0cb0_\u0cb6\u0ca8\u0cbf\u0cb5\u0cbe\u0cb0".split("_"),weekdaysShort:"\u0cad\u0cbe\u0ca8\u0cc1_\u0cb8\u0cc6\u0cc2\u0cd5\u0cae_\u0cae\u0c82\u0c97\u0cb3_\u0cac\u0cc1\u0ca7_\u0c97\u0cc1\u0cb0\u0cc1_\u0cb6\u0cc1\u0c95\u0ccd\u0cb0_\u0cb6\u0ca8\u0cbf".split("_"),weekdaysMin:"\u0cad\u0cbe_\u0cb8\u0cc6\u0cc2\u0cd5_\u0cae\u0c82_\u0cac\u0cc1_\u0c97\u0cc1_\u0cb6\u0cc1_\u0cb6".split("_"),longDateFormat:{LT:"A h:mm",LTS:"A h:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm",LLLL:"dddd, D MMMM YYYY, A h:mm"},calendar:{sameDay:"[\u0c87\u0c82\u0ca6\u0cc1] LT",nextDay:"[\u0ca8\u0cbe\u0cb3\u0cc6] LT",nextWeek:"dddd, LT",lastDay:"[\u0ca8\u0cbf\u0ca8\u0ccd\u0ca8\u0cc6] LT",lastWeek:"[\u0c95\u0cc6\u0cc2\u0ca8\u0cc6\u0caf] dddd, LT",sameElse:"L"},relativeTime:{future:"%s \u0ca8\u0c82\u0ca4\u0cb0",past:"%s \u0cb9\u0cbf\u0c82\u0ca6\u0cc6",s:"\u0c95\u0cc6\u0cb2\u0cb5\u0cc1 \u0c95\u0ccd\u0cb7\u0ca3\u0c97\u0cb3\u0cc1",ss:"%d \u0cb8\u0cc6\u0c95\u0cc6\u0c82\u0ca1\u0cc1\u0c97\u0cb3\u0cc1",m:"\u0c92\u0c82\u0ca6\u0cc1 \u0ca8\u0cbf\u0cae\u0cbf\u0cb7",mm:"%d \u0ca8\u0cbf\u0cae\u0cbf\u0cb7",h:"\u0c92\u0c82\u0ca6\u0cc1 \u0c97\u0c82\u0c9f\u0cc6",hh:"%d \u0c97\u0c82\u0c9f\u0cc6",d:"\u0c92\u0c82\u0ca6\u0cc1 \u0ca6\u0cbf\u0ca8",dd:"%d \u0ca6\u0cbf\u0ca8",M:"\u0c92\u0c82\u0ca6\u0cc1 \u0ca4\u0cbf\u0c82\u0c97\u0cb3\u0cc1",MM:"%d \u0ca4\u0cbf\u0c82\u0c97\u0cb3\u0cc1",y:"\u0c92\u0c82\u0ca6\u0cc1 \u0cb5\u0cb0\u0ccd\u0cb7",yy:"%d \u0cb5\u0cb0\u0ccd\u0cb7"},preparse:function(g){return g.replace(/[\u0ce7\u0ce8\u0ce9\u0cea\u0ceb\u0cec\u0ced\u0cee\u0cef\u0ce6]/g,function(E){return l[E]})},postformat:function(g){return g.replace(/\d/g,function(E){return e[E]})},meridiemParse:/\u0cb0\u0cbe\u0ca4\u0ccd\u0cb0\u0cbf|\u0cac\u0cc6\u0cb3\u0cbf\u0c97\u0ccd\u0c97\u0cc6|\u0cae\u0ca7\u0ccd\u0caf\u0cbe\u0cb9\u0ccd\u0ca8|\u0cb8\u0c82\u0c9c\u0cc6/,meridiemHour:function(g,E){return 12===g&&(g=0),"\u0cb0\u0cbe\u0ca4\u0ccd\u0cb0\u0cbf"===E?g<4?g:g+12:"\u0cac\u0cc6\u0cb3\u0cbf\u0c97\u0ccd\u0c97\u0cc6"===E?g:"\u0cae\u0ca7\u0ccd\u0caf\u0cbe\u0cb9\u0ccd\u0ca8"===E?g>=10?g:g+12:"\u0cb8\u0c82\u0c9c\u0cc6"===E?g+12:void 0},meridiem:function(g,E,T){return g<4?"\u0cb0\u0cbe\u0ca4\u0ccd\u0cb0\u0cbf":g<10?"\u0cac\u0cc6\u0cb3\u0cbf\u0c97\u0ccd\u0c97\u0cc6":g<17?"\u0cae\u0ca7\u0ccd\u0caf\u0cbe\u0cb9\u0ccd\u0ca8":g<20?"\u0cb8\u0c82\u0c9c\u0cc6":"\u0cb0\u0cbe\u0ca4\u0ccd\u0cb0\u0cbf"},dayOfMonthOrdinalParse:/\d{1,2}(\u0ca8\u0cc6\u0cd5)/,ordinal:function(g){return g+"\u0ca8\u0cc6\u0cd5"},week:{dow:0,doy:6}})}(p(15439))},13549:function(qe,I,p){!function(o){"use strict";o.defineLocale("ko",{months:"1\uc6d4_2\uc6d4_3\uc6d4_4\uc6d4_5\uc6d4_6\uc6d4_7\uc6d4_8\uc6d4_9\uc6d4_10\uc6d4_11\uc6d4_12\uc6d4".split("_"),monthsShort:"1\uc6d4_2\uc6d4_3\uc6d4_4\uc6d4_5\uc6d4_6\uc6d4_7\uc6d4_8\uc6d4_9\uc6d4_10\uc6d4_11\uc6d4_12\uc6d4".split("_"),weekdays:"\uc77c\uc694\uc77c_\uc6d4\uc694\uc77c_\ud654\uc694\uc77c_\uc218\uc694\uc77c_\ubaa9\uc694\uc77c_\uae08\uc694\uc77c_\ud1a0\uc694\uc77c".split("_"),weekdaysShort:"\uc77c_\uc6d4_\ud654_\uc218_\ubaa9_\uae08_\ud1a0".split("_"),weekdaysMin:"\uc77c_\uc6d4_\ud654_\uc218_\ubaa9_\uae08_\ud1a0".split("_"),longDateFormat:{LT:"A h:mm",LTS:"A h:mm:ss",L:"YYYY.MM.DD.",LL:"YYYY\ub144 MMMM D\uc77c",LLL:"YYYY\ub144 MMMM D\uc77c A h:mm",LLLL:"YYYY\ub144 MMMM D\uc77c dddd A h:mm",l:"YYYY.MM.DD.",ll:"YYYY\ub144 MMMM D\uc77c",lll:"YYYY\ub144 MMMM D\uc77c A h:mm",llll:"YYYY\ub144 MMMM D\uc77c dddd A h:mm"},calendar:{sameDay:"\uc624\ub298 LT",nextDay:"\ub0b4\uc77c LT",nextWeek:"dddd LT",lastDay:"\uc5b4\uc81c LT",lastWeek:"\uc9c0\ub09c\uc8fc dddd LT",sameElse:"L"},relativeTime:{future:"%s \ud6c4",past:"%s \uc804",s:"\uba87 \ucd08",ss:"%d\ucd08",m:"1\ubd84",mm:"%d\ubd84",h:"\ud55c \uc2dc\uac04",hh:"%d\uc2dc\uac04",d:"\ud558\ub8e8",dd:"%d\uc77c",M:"\ud55c \ub2ec",MM:"%d\ub2ec",y:"\uc77c \ub144",yy:"%d\ub144"},dayOfMonthOrdinalParse:/\d{1,2}(\uc77c|\uc6d4|\uc8fc)/,ordinal:function(l,D){switch(D){case"d":case"D":case"DDD":return l+"\uc77c";case"M":return l+"\uc6d4";case"w":case"W":return l+"\uc8fc";default:return l}},meridiemParse:/\uc624\uc804|\uc624\ud6c4/,isPM:function(l){return"\uc624\ud6c4"===l},meridiem:function(l,D,g){return l<12?"\uc624\uc804":"\uc624\ud6c4"}})}(p(15439))},63775:function(qe,I,p){!function(o){"use strict";function e(g,E,T,n){var P={s:["\xe7end san\xeeye","\xe7end san\xeeyeyan"],ss:[g+" san\xeeye",g+" san\xeeyeyan"],m:["deq\xeeqeyek","deq\xeeqeyek\xea"],mm:[g+" deq\xeeqe",g+" deq\xeeqeyan"],h:["saetek","saetek\xea"],hh:[g+" saet",g+" saetan"],d:["rojek","rojek\xea"],dd:[g+" roj",g+" rojan"],w:["hefteyek","hefteyek\xea"],ww:[g+" hefte",g+" hefteyan"],M:["mehek","mehek\xea"],MM:[g+" meh",g+" mehan"],y:["salek","salek\xea"],yy:[g+" sal",g+" salan"]};return E?P[T][0]:P[T][1]}function l(g){var E=(g=""+g).substring(g.length-1),T=g.length>1?g.substring(g.length-2):"";return 12==T||13==T||"2"!=E&&"3"!=E&&"50"!=T&&"70"!=E&&"80"!=E?"\xea":"y\xea"}o.defineLocale("ku-kmr",{months:"R\xeabendan_Sibat_Adar_N\xeesan_Gulan_Hez\xeeran_T\xeermeh_Tebax_\xcelon_Cotmeh_Mijdar_Berfanbar".split("_"),monthsShort:"R\xeab_Sib_Ada_N\xees_Gul_Hez_T\xeer_Teb_\xcelo_Cot_Mij_Ber".split("_"),monthsParseExact:!0,weekdays:"Yek\u015fem_Du\u015fem_S\xea\u015fem_\xc7ar\u015fem_P\xeanc\u015fem_\xcen_\u015eem\xee".split("_"),weekdaysShort:"Yek_Du_S\xea_\xc7ar_P\xean_\xcen_\u015eem".split("_"),weekdaysMin:"Ye_Du_S\xea_\xc7a_P\xea_\xcen_\u015ee".split("_"),meridiem:function(g,E,T){return g<12?T?"bn":"BN":T?"pn":"PN"},meridiemParse:/bn|BN|pn|PN/,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"Do MMMM[a] YYYY[an]",LLL:"Do MMMM[a] YYYY[an] HH:mm",LLLL:"dddd, Do MMMM[a] YYYY[an] HH:mm",ll:"Do MMM[.] YYYY[an]",lll:"Do MMM[.] YYYY[an] HH:mm",llll:"ddd[.], Do MMM[.] YYYY[an] HH:mm"},calendar:{sameDay:"[\xcero di saet] LT [de]",nextDay:"[Sib\xea di saet] LT [de]",nextWeek:"dddd [di saet] LT [de]",lastDay:"[Duh di saet] LT [de]",lastWeek:"dddd[a bor\xee di saet] LT [de]",sameElse:"L"},relativeTime:{future:"di %s de",past:"ber\xee %s",s:e,ss:e,m:e,mm:e,h:e,hh:e,d:e,dd:e,w:e,ww:e,M:e,MM:e,y:e,yy:e},dayOfMonthOrdinalParse:/\d{1,2}(?:y\xea|\xea|\.)/,ordinal:function(g,E){var T=E.toLowerCase();return T.includes("w")||T.includes("m")?g+".":g+l(g)},week:{dow:1,doy:4}})}(p(15439))},91037:function(qe,I,p){!function(o){"use strict";var e={1:"\u0661",2:"\u0662",3:"\u0663",4:"\u0664",5:"\u0665",6:"\u0666",7:"\u0667",8:"\u0668",9:"\u0669",0:"\u0660"},l={"\u0661":"1","\u0662":"2","\u0663":"3","\u0664":"4","\u0665":"5","\u0666":"6","\u0667":"7","\u0668":"8","\u0669":"9","\u0660":"0"},D=["\u06a9\u0627\u0646\u0648\u0646\u06cc \u062f\u0648\u0648\u06d5\u0645","\u0634\u0648\u0628\u0627\u062a","\u0626\u0627\u0632\u0627\u0631","\u0646\u06cc\u0633\u0627\u0646","\u0626\u0627\u06cc\u0627\u0631","\u062d\u0648\u0632\u06d5\u06cc\u0631\u0627\u0646","\u062a\u06d5\u0645\u0645\u0648\u0632","\u0626\u0627\u0628","\u0626\u06d5\u06cc\u0644\u0648\u0648\u0644","\u062a\u0634\u0631\u06cc\u0646\u06cc \u06cc\u06d5\u0643\u06d5\u0645","\u062a\u0634\u0631\u06cc\u0646\u06cc \u062f\u0648\u0648\u06d5\u0645","\u0643\u0627\u0646\u0648\u0646\u06cc \u06cc\u06d5\u06a9\u06d5\u0645"];o.defineLocale("ku",{months:D,monthsShort:D,weekdays:"\u06cc\u0647\u200c\u0643\u0634\u0647\u200c\u0645\u0645\u0647\u200c_\u062f\u0648\u0648\u0634\u0647\u200c\u0645\u0645\u0647\u200c_\u0633\u06ce\u0634\u0647\u200c\u0645\u0645\u0647\u200c_\u0686\u0648\u0627\u0631\u0634\u0647\u200c\u0645\u0645\u0647\u200c_\u067e\u06ce\u0646\u062c\u0634\u0647\u200c\u0645\u0645\u0647\u200c_\u0647\u0647\u200c\u06cc\u0646\u06cc_\u0634\u0647\u200c\u0645\u0645\u0647\u200c".split("_"),weekdaysShort:"\u06cc\u0647\u200c\u0643\u0634\u0647\u200c\u0645_\u062f\u0648\u0648\u0634\u0647\u200c\u0645_\u0633\u06ce\u0634\u0647\u200c\u0645_\u0686\u0648\u0627\u0631\u0634\u0647\u200c\u0645_\u067e\u06ce\u0646\u062c\u0634\u0647\u200c\u0645_\u0647\u0647\u200c\u06cc\u0646\u06cc_\u0634\u0647\u200c\u0645\u0645\u0647\u200c".split("_"),weekdaysMin:"\u06cc_\u062f_\u0633_\u0686_\u067e_\u0647_\u0634".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},meridiemParse:/\u0626\u06ce\u0648\u0627\u0631\u0647\u200c|\u0628\u0647\u200c\u06cc\u0627\u0646\u06cc/,isPM:function(E){return/\u0626\u06ce\u0648\u0627\u0631\u0647\u200c/.test(E)},meridiem:function(E,T,n){return E<12?"\u0628\u0647\u200c\u06cc\u0627\u0646\u06cc":"\u0626\u06ce\u0648\u0627\u0631\u0647\u200c"},calendar:{sameDay:"[\u0626\u0647\u200c\u0645\u0631\u06c6 \u0643\u0627\u062a\u0698\u0645\u06ce\u0631] LT",nextDay:"[\u0628\u0647\u200c\u06cc\u0627\u0646\u06cc \u0643\u0627\u062a\u0698\u0645\u06ce\u0631] LT",nextWeek:"dddd [\u0643\u0627\u062a\u0698\u0645\u06ce\u0631] LT",lastDay:"[\u062f\u0648\u06ce\u0646\u06ce \u0643\u0627\u062a\u0698\u0645\u06ce\u0631] LT",lastWeek:"dddd [\u0643\u0627\u062a\u0698\u0645\u06ce\u0631] LT",sameElse:"L"},relativeTime:{future:"\u0644\u0647\u200c %s",past:"%s",s:"\u0686\u0647\u200c\u0646\u062f \u0686\u0631\u0643\u0647\u200c\u06cc\u0647\u200c\u0643",ss:"\u0686\u0631\u0643\u0647\u200c %d",m:"\u06cc\u0647\u200c\u0643 \u062e\u0648\u0644\u0647\u200c\u0643",mm:"%d \u062e\u0648\u0644\u0647\u200c\u0643",h:"\u06cc\u0647\u200c\u0643 \u0643\u0627\u062a\u0698\u0645\u06ce\u0631",hh:"%d \u0643\u0627\u062a\u0698\u0645\u06ce\u0631",d:"\u06cc\u0647\u200c\u0643 \u0695\u06c6\u0698",dd:"%d \u0695\u06c6\u0698",M:"\u06cc\u0647\u200c\u0643 \u0645\u0627\u0646\u06af",MM:"%d \u0645\u0627\u0646\u06af",y:"\u06cc\u0647\u200c\u0643 \u0633\u0627\u06b5",yy:"%d \u0633\u0627\u06b5"},preparse:function(E){return E.replace(/[\u0661\u0662\u0663\u0664\u0665\u0666\u0667\u0668\u0669\u0660]/g,function(T){return l[T]}).replace(/\u060c/g,",")},postformat:function(E){return E.replace(/\d/g,function(T){return e[T]}).replace(/,/g,"\u060c")},week:{dow:6,doy:12}})}(p(15439))},93125:function(qe,I,p){!function(o){"use strict";var e={0:"-\u0447\u04af",1:"-\u0447\u0438",2:"-\u0447\u0438",3:"-\u0447\u04af",4:"-\u0447\u04af",5:"-\u0447\u0438",6:"-\u0447\u044b",7:"-\u0447\u0438",8:"-\u0447\u0438",9:"-\u0447\u0443",10:"-\u0447\u0443",20:"-\u0447\u044b",30:"-\u0447\u0443",40:"-\u0447\u044b",50:"-\u0447\u04af",60:"-\u0447\u044b",70:"-\u0447\u0438",80:"-\u0447\u0438",90:"-\u0447\u0443",100:"-\u0447\u04af"};o.defineLocale("ky",{months:"\u044f\u043d\u0432\u0430\u0440\u044c_\u0444\u0435\u0432\u0440\u0430\u043b\u044c_\u043c\u0430\u0440\u0442_\u0430\u043f\u0440\u0435\u043b\u044c_\u043c\u0430\u0439_\u0438\u044e\u043d\u044c_\u0438\u044e\u043b\u044c_\u0430\u0432\u0433\u0443\u0441\u0442_\u0441\u0435\u043d\u0442\u044f\u0431\u0440\u044c_\u043e\u043a\u0442\u044f\u0431\u0440\u044c_\u043d\u043e\u044f\u0431\u0440\u044c_\u0434\u0435\u043a\u0430\u0431\u0440\u044c".split("_"),monthsShort:"\u044f\u043d\u0432_\u0444\u0435\u0432_\u043c\u0430\u0440\u0442_\u0430\u043f\u0440_\u043c\u0430\u0439_\u0438\u044e\u043d\u044c_\u0438\u044e\u043b\u044c_\u0430\u0432\u0433_\u0441\u0435\u043d_\u043e\u043a\u0442_\u043d\u043e\u044f_\u0434\u0435\u043a".split("_"),weekdays:"\u0416\u0435\u043a\u0448\u0435\u043c\u0431\u0438_\u0414\u04af\u0439\u0448\u04e9\u043c\u0431\u04af_\u0428\u0435\u0439\u0448\u0435\u043c\u0431\u0438_\u0428\u0430\u0440\u0448\u0435\u043c\u0431\u0438_\u0411\u0435\u0439\u0448\u0435\u043c\u0431\u0438_\u0416\u0443\u043c\u0430_\u0418\u0448\u0435\u043c\u0431\u0438".split("_"),weekdaysShort:"\u0416\u0435\u043a_\u0414\u04af\u0439_\u0428\u0435\u0439_\u0428\u0430\u0440_\u0411\u0435\u0439_\u0416\u0443\u043c_\u0418\u0448\u0435".split("_"),weekdaysMin:"\u0416\u043a_\u0414\u0439_\u0428\u0439_\u0428\u0440_\u0411\u0439_\u0416\u043c_\u0418\u0448".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[\u0411\u04af\u0433\u04af\u043d \u0441\u0430\u0430\u0442] LT",nextDay:"[\u042d\u0440\u0442\u0435\u04a3 \u0441\u0430\u0430\u0442] LT",nextWeek:"dddd [\u0441\u0430\u0430\u0442] LT",lastDay:"[\u041a\u0435\u0447\u044d\u044d \u0441\u0430\u0430\u0442] LT",lastWeek:"[\u04e8\u0442\u043a\u04e9\u043d \u0430\u043f\u0442\u0430\u043d\u044b\u043d] dddd [\u043a\u04af\u043d\u04af] [\u0441\u0430\u0430\u0442] LT",sameElse:"L"},relativeTime:{future:"%s \u0438\u0447\u0438\u043d\u0434\u0435",past:"%s \u043c\u0443\u0440\u0443\u043d",s:"\u0431\u0438\u0440\u043d\u0435\u0447\u0435 \u0441\u0435\u043a\u0443\u043d\u0434",ss:"%d \u0441\u0435\u043a\u0443\u043d\u0434",m:"\u0431\u0438\u0440 \u043c\u04af\u043d\u04e9\u0442",mm:"%d \u043c\u04af\u043d\u04e9\u0442",h:"\u0431\u0438\u0440 \u0441\u0430\u0430\u0442",hh:"%d \u0441\u0430\u0430\u0442",d:"\u0431\u0438\u0440 \u043a\u04af\u043d",dd:"%d \u043a\u04af\u043d",M:"\u0431\u0438\u0440 \u0430\u0439",MM:"%d \u0430\u0439",y:"\u0431\u0438\u0440 \u0436\u044b\u043b",yy:"%d \u0436\u044b\u043b"},dayOfMonthOrdinalParse:/\d{1,2}-(\u0447\u0438|\u0447\u044b|\u0447\u04af|\u0447\u0443)/,ordinal:function(D){var g=D%10,E=D>=100?100:null;return D+(e[D]||e[g]||e[E])},week:{dow:1,doy:7}})}(p(15439))},69586:function(qe,I,p){!function(o){"use strict";function e(T,n,P,w){var B={m:["eng Minutt","enger Minutt"],h:["eng Stonn","enger Stonn"],d:["een Dag","engem Dag"],M:["ee Mount","engem Mount"],y:["ee Joer","engem Joer"]};return n?B[P][0]:B[P][1]}function l(T){return g(T.substr(0,T.indexOf(" ")))?"a "+T:"an "+T}function D(T){return g(T.substr(0,T.indexOf(" ")))?"viru "+T:"virun "+T}function g(T){if(T=parseInt(T,10),isNaN(T))return!1;if(T<0)return!0;if(T<10)return 4<=T&&T<=7;if(T<100){var n=T%10;return g(0===n?T/10:n)}if(T<1e4){for(;T>=10;)T/=10;return g(T)}return g(T/=1e3)}o.defineLocale("lb",{months:"Januar_Februar_M\xe4erz_Abr\xebll_Mee_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"Jan._Febr._Mrz._Abr._Mee_Jun._Jul._Aug._Sept._Okt._Nov._Dez.".split("_"),monthsParseExact:!0,weekdays:"Sonndeg_M\xe9indeg_D\xebnschdeg_M\xebttwoch_Donneschdeg_Freideg_Samschdeg".split("_"),weekdaysShort:"So._M\xe9._D\xeb._M\xeb._Do._Fr._Sa.".split("_"),weekdaysMin:"So_M\xe9_D\xeb_M\xeb_Do_Fr_Sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm [Auer]",LTS:"H:mm:ss [Auer]",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm [Auer]",LLLL:"dddd, D. MMMM YYYY H:mm [Auer]"},calendar:{sameDay:"[Haut um] LT",sameElse:"L",nextDay:"[Muer um] LT",nextWeek:"dddd [um] LT",lastDay:"[G\xebschter um] LT",lastWeek:function(){switch(this.day()){case 2:case 4:return"[Leschten] dddd [um] LT";default:return"[Leschte] dddd [um] LT"}}},relativeTime:{future:l,past:D,s:"e puer Sekonnen",ss:"%d Sekonnen",m:e,mm:"%d Minutten",h:e,hh:"%d Stonnen",d:e,dd:"%d Deeg",M:e,MM:"%d M\xe9int",y:e,yy:"%d Joer"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(p(15439))},32349:function(qe,I,p){!function(o){"use strict";o.defineLocale("lo",{months:"\u0ea1\u0eb1\u0e87\u0e81\u0ead\u0e99_\u0e81\u0eb8\u0ea1\u0e9e\u0eb2_\u0ea1\u0eb5\u0e99\u0eb2_\u0ec0\u0ea1\u0eaa\u0eb2_\u0e9e\u0eb6\u0e94\u0eaa\u0eb0\u0e9e\u0eb2_\u0ea1\u0eb4\u0e96\u0eb8\u0e99\u0eb2_\u0e81\u0ecd\u0ea5\u0eb0\u0e81\u0ebb\u0e94_\u0eaa\u0eb4\u0e87\u0eab\u0eb2_\u0e81\u0eb1\u0e99\u0e8d\u0eb2_\u0e95\u0eb8\u0ea5\u0eb2_\u0e9e\u0eb0\u0e88\u0eb4\u0e81_\u0e97\u0eb1\u0e99\u0ea7\u0eb2".split("_"),monthsShort:"\u0ea1\u0eb1\u0e87\u0e81\u0ead\u0e99_\u0e81\u0eb8\u0ea1\u0e9e\u0eb2_\u0ea1\u0eb5\u0e99\u0eb2_\u0ec0\u0ea1\u0eaa\u0eb2_\u0e9e\u0eb6\u0e94\u0eaa\u0eb0\u0e9e\u0eb2_\u0ea1\u0eb4\u0e96\u0eb8\u0e99\u0eb2_\u0e81\u0ecd\u0ea5\u0eb0\u0e81\u0ebb\u0e94_\u0eaa\u0eb4\u0e87\u0eab\u0eb2_\u0e81\u0eb1\u0e99\u0e8d\u0eb2_\u0e95\u0eb8\u0ea5\u0eb2_\u0e9e\u0eb0\u0e88\u0eb4\u0e81_\u0e97\u0eb1\u0e99\u0ea7\u0eb2".split("_"),weekdays:"\u0ead\u0eb2\u0e97\u0eb4\u0e94_\u0e88\u0eb1\u0e99_\u0ead\u0eb1\u0e87\u0e84\u0eb2\u0e99_\u0e9e\u0eb8\u0e94_\u0e9e\u0eb0\u0eab\u0eb1\u0e94_\u0eaa\u0eb8\u0e81_\u0ec0\u0eaa\u0ebb\u0eb2".split("_"),weekdaysShort:"\u0e97\u0eb4\u0e94_\u0e88\u0eb1\u0e99_\u0ead\u0eb1\u0e87\u0e84\u0eb2\u0e99_\u0e9e\u0eb8\u0e94_\u0e9e\u0eb0\u0eab\u0eb1\u0e94_\u0eaa\u0eb8\u0e81_\u0ec0\u0eaa\u0ebb\u0eb2".split("_"),weekdaysMin:"\u0e97_\u0e88_\u0ead\u0e84_\u0e9e_\u0e9e\u0eab_\u0eaa\u0e81_\u0eaa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"\u0ea7\u0eb1\u0e99dddd D MMMM YYYY HH:mm"},meridiemParse:/\u0e95\u0ead\u0e99\u0ec0\u0e8a\u0ebb\u0ec9\u0eb2|\u0e95\u0ead\u0e99\u0ec1\u0ea5\u0e87/,isPM:function(l){return"\u0e95\u0ead\u0e99\u0ec1\u0ea5\u0e87"===l},meridiem:function(l,D,g){return l<12?"\u0e95\u0ead\u0e99\u0ec0\u0e8a\u0ebb\u0ec9\u0eb2":"\u0e95\u0ead\u0e99\u0ec1\u0ea5\u0e87"},calendar:{sameDay:"[\u0ea1\u0eb7\u0ec9\u0e99\u0eb5\u0ec9\u0ec0\u0ea7\u0ea5\u0eb2] LT",nextDay:"[\u0ea1\u0eb7\u0ec9\u0ead\u0eb7\u0ec8\u0e99\u0ec0\u0ea7\u0ea5\u0eb2] LT",nextWeek:"[\u0ea7\u0eb1\u0e99]dddd[\u0edc\u0ec9\u0eb2\u0ec0\u0ea7\u0ea5\u0eb2] LT",lastDay:"[\u0ea1\u0eb7\u0ec9\u0ea7\u0eb2\u0e99\u0e99\u0eb5\u0ec9\u0ec0\u0ea7\u0ea5\u0eb2] LT",lastWeek:"[\u0ea7\u0eb1\u0e99]dddd[\u0ec1\u0ea5\u0ec9\u0ea7\u0e99\u0eb5\u0ec9\u0ec0\u0ea7\u0ea5\u0eb2] LT",sameElse:"L"},relativeTime:{future:"\u0ead\u0eb5\u0e81 %s",past:"%s\u0e9c\u0ec8\u0eb2\u0e99\u0ea1\u0eb2",s:"\u0e9a\u0ecd\u0ec8\u0ec0\u0e97\u0ebb\u0ec8\u0eb2\u0ec3\u0e94\u0ea7\u0eb4\u0e99\u0eb2\u0e97\u0eb5",ss:"%d \u0ea7\u0eb4\u0e99\u0eb2\u0e97\u0eb5",m:"1 \u0e99\u0eb2\u0e97\u0eb5",mm:"%d \u0e99\u0eb2\u0e97\u0eb5",h:"1 \u0e8a\u0ebb\u0ec8\u0ea7\u0ec2\u0ea1\u0e87",hh:"%d \u0e8a\u0ebb\u0ec8\u0ea7\u0ec2\u0ea1\u0e87",d:"1 \u0ea1\u0eb7\u0ec9",dd:"%d \u0ea1\u0eb7\u0ec9",M:"1 \u0ec0\u0e94\u0eb7\u0ead\u0e99",MM:"%d \u0ec0\u0e94\u0eb7\u0ead\u0e99",y:"1 \u0e9b\u0eb5",yy:"%d \u0e9b\u0eb5"},dayOfMonthOrdinalParse:/(\u0e97\u0eb5\u0ec8)\d{1,2}/,ordinal:function(l){return"\u0e97\u0eb5\u0ec8"+l}})}(p(15439))},92400:function(qe,I,p){!function(o){"use strict";var e={ss:"sekund\u0117_sekund\u017ei\u0173_sekundes",m:"minut\u0117_minut\u0117s_minut\u0119",mm:"minut\u0117s_minu\u010di\u0173_minutes",h:"valanda_valandos_valand\u0105",hh:"valandos_valand\u0173_valandas",d:"diena_dienos_dien\u0105",dd:"dienos_dien\u0173_dienas",M:"m\u0117nuo_m\u0117nesio_m\u0117nes\u012f",MM:"m\u0117nesiai_m\u0117nesi\u0173_m\u0117nesius",y:"metai_met\u0173_metus",yy:"metai_met\u0173_metus"};function l(P,w,B,Y){return w?"kelios sekund\u0117s":Y?"keli\u0173 sekund\u017ei\u0173":"kelias sekundes"}function D(P,w,B,Y){return w?E(B)[0]:Y?E(B)[1]:E(B)[2]}function g(P){return P%10==0||P>10&&P<20}function E(P){return e[P].split("_")}function T(P,w,B,Y){var V=P+" ";return 1===P?V+D(P,w,B[0],Y):w?V+(g(P)?E(B)[1]:E(B)[0]):Y?V+E(B)[1]:V+(g(P)?E(B)[1]:E(B)[2])}o.defineLocale("lt",{months:{format:"sausio_vasario_kovo_baland\u017eio_gegu\u017e\u0117s_bir\u017eelio_liepos_rugpj\u016b\u010dio_rugs\u0117jo_spalio_lapkri\u010dio_gruod\u017eio".split("_"),standalone:"sausis_vasaris_kovas_balandis_gegu\u017e\u0117_bir\u017eelis_liepa_rugpj\u016btis_rugs\u0117jis_spalis_lapkritis_gruodis".split("_"),isFormat:/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?|MMMM?(\[[^\[\]]*\]|\s)+D[oD]?/},monthsShort:"sau_vas_kov_bal_geg_bir_lie_rgp_rgs_spa_lap_grd".split("_"),weekdays:{format:"sekmadien\u012f_pirmadien\u012f_antradien\u012f_tre\u010diadien\u012f_ketvirtadien\u012f_penktadien\u012f_\u0161e\u0161tadien\u012f".split("_"),standalone:"sekmadienis_pirmadienis_antradienis_tre\u010diadienis_ketvirtadienis_penktadienis_\u0161e\u0161tadienis".split("_"),isFormat:/dddd HH:mm/},weekdaysShort:"Sek_Pir_Ant_Tre_Ket_Pen_\u0160e\u0161".split("_"),weekdaysMin:"S_P_A_T_K_Pn_\u0160".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"YYYY [m.] MMMM D [d.]",LLL:"YYYY [m.] MMMM D [d.], HH:mm [val.]",LLLL:"YYYY [m.] MMMM D [d.], dddd, HH:mm [val.]",l:"YYYY-MM-DD",ll:"YYYY [m.] MMMM D [d.]",lll:"YYYY [m.] MMMM D [d.], HH:mm [val.]",llll:"YYYY [m.] MMMM D [d.], ddd, HH:mm [val.]"},calendar:{sameDay:"[\u0160iandien] LT",nextDay:"[Rytoj] LT",nextWeek:"dddd LT",lastDay:"[Vakar] LT",lastWeek:"[Pra\u0117jus\u012f] dddd LT",sameElse:"L"},relativeTime:{future:"po %s",past:"prie\u0161 %s",s:l,ss:T,m:D,mm:T,h:D,hh:T,d:D,dd:T,M:D,MM:T,y:D,yy:T},dayOfMonthOrdinalParse:/\d{1,2}-oji/,ordinal:function(P){return P+"-oji"},week:{dow:1,doy:4}})}(p(15439))},39991:function(qe,I,p){!function(o){"use strict";var e={ss:"sekundes_sekund\u0113m_sekunde_sekundes".split("_"),m:"min\u016btes_min\u016bt\u0113m_min\u016bte_min\u016btes".split("_"),mm:"min\u016btes_min\u016bt\u0113m_min\u016bte_min\u016btes".split("_"),h:"stundas_stund\u0101m_stunda_stundas".split("_"),hh:"stundas_stund\u0101m_stunda_stundas".split("_"),d:"dienas_dien\u0101m_diena_dienas".split("_"),dd:"dienas_dien\u0101m_diena_dienas".split("_"),M:"m\u0113ne\u0161a_m\u0113ne\u0161iem_m\u0113nesis_m\u0113ne\u0161i".split("_"),MM:"m\u0113ne\u0161a_m\u0113ne\u0161iem_m\u0113nesis_m\u0113ne\u0161i".split("_"),y:"gada_gadiem_gads_gadi".split("_"),yy:"gada_gadiem_gads_gadi".split("_")};function l(n,P,w){return w?P%10==1&&P%100!=11?n[2]:n[3]:P%10==1&&P%100!=11?n[0]:n[1]}function D(n,P,w){return n+" "+l(e[w],n,P)}function g(n,P,w){return l(e[w],n,P)}function E(n,P){return P?"da\u017eas sekundes":"da\u017e\u0101m sekund\u0113m"}o.defineLocale("lv",{months:"janv\u0101ris_febru\u0101ris_marts_apr\u012blis_maijs_j\u016bnijs_j\u016blijs_augusts_septembris_oktobris_novembris_decembris".split("_"),monthsShort:"jan_feb_mar_apr_mai_j\u016bn_j\u016bl_aug_sep_okt_nov_dec".split("_"),weekdays:"sv\u0113tdiena_pirmdiena_otrdiena_tre\u0161diena_ceturtdiena_piektdiena_sestdiena".split("_"),weekdaysShort:"Sv_P_O_T_C_Pk_S".split("_"),weekdaysMin:"Sv_P_O_T_C_Pk_S".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY.",LL:"YYYY. [gada] D. MMMM",LLL:"YYYY. [gada] D. MMMM, HH:mm",LLLL:"YYYY. [gada] D. MMMM, dddd, HH:mm"},calendar:{sameDay:"[\u0160odien pulksten] LT",nextDay:"[R\u012bt pulksten] LT",nextWeek:"dddd [pulksten] LT",lastDay:"[Vakar pulksten] LT",lastWeek:"[Pag\u0101ju\u0161\u0101] dddd [pulksten] LT",sameElse:"L"},relativeTime:{future:"p\u0113c %s",past:"pirms %s",s:E,ss:D,m:g,mm:D,h:g,hh:D,d:g,dd:D,M:g,MM:D,y:g,yy:D},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(p(15439))},28477:function(qe,I,p){!function(o){"use strict";var e={words:{ss:["sekund","sekunda","sekundi"],m:["jedan minut","jednog minuta"],mm:["minut","minuta","minuta"],h:["jedan sat","jednog sata"],hh:["sat","sata","sati"],dd:["dan","dana","dana"],MM:["mjesec","mjeseca","mjeseci"],yy:["godina","godine","godina"]},correctGrammaticalCase:function(D,g){return 1===D?g[0]:D>=2&&D<=4?g[1]:g[2]},translate:function(D,g,E){var T=e.words[E];return 1===E.length?g?T[0]:T[1]:D+" "+e.correctGrammaticalCase(D,T)}};o.defineLocale("me",{months:"januar_februar_mart_april_maj_jun_jul_avgust_septembar_oktobar_novembar_decembar".split("_"),monthsShort:"jan._feb._mar._apr._maj_jun_jul_avg._sep._okt._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"nedjelja_ponedjeljak_utorak_srijeda_\u010detvrtak_petak_subota".split("_"),weekdaysShort:"ned._pon._uto._sri._\u010det._pet._sub.".split("_"),weekdaysMin:"ne_po_ut_sr_\u010de_pe_su".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd, D. MMMM YYYY H:mm"},calendar:{sameDay:"[danas u] LT",nextDay:"[sjutra u] LT",nextWeek:function(){switch(this.day()){case 0:return"[u] [nedjelju] [u] LT";case 3:return"[u] [srijedu] [u] LT";case 6:return"[u] [subotu] [u] LT";case 1:case 2:case 4:case 5:return"[u] dddd [u] LT"}},lastDay:"[ju\u010de u] LT",lastWeek:function(){return["[pro\u0161le] [nedjelje] [u] LT","[pro\u0161log] [ponedjeljka] [u] LT","[pro\u0161log] [utorka] [u] LT","[pro\u0161le] [srijede] [u] LT","[pro\u0161log] [\u010detvrtka] [u] LT","[pro\u0161log] [petka] [u] LT","[pro\u0161le] [subote] [u] LT"][this.day()]},sameElse:"L"},relativeTime:{future:"za %s",past:"prije %s",s:"nekoliko sekundi",ss:e.translate,m:e.translate,mm:e.translate,h:e.translate,hh:e.translate,d:"dan",dd:e.translate,M:"mjesec",MM:e.translate,y:"godinu",yy:e.translate},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}})}(p(15439))},55118:function(qe,I,p){!function(o){"use strict";o.defineLocale("mi",{months:"Kohi-t\u0101te_Hui-tanguru_Pout\u016b-te-rangi_Paenga-wh\u0101wh\u0101_Haratua_Pipiri_H\u014dngoingoi_Here-turi-k\u014dk\u0101_Mahuru_Whiringa-\u0101-nuku_Whiringa-\u0101-rangi_Hakihea".split("_"),monthsShort:"Kohi_Hui_Pou_Pae_Hara_Pipi_H\u014dngoi_Here_Mahu_Whi-nu_Whi-ra_Haki".split("_"),monthsRegex:/(?:['a-z\u0101\u014D\u016B]+\-?){1,3}/i,monthsStrictRegex:/(?:['a-z\u0101\u014D\u016B]+\-?){1,3}/i,monthsShortRegex:/(?:['a-z\u0101\u014D\u016B]+\-?){1,3}/i,monthsShortStrictRegex:/(?:['a-z\u0101\u014D\u016B]+\-?){1,2}/i,weekdays:"R\u0101tapu_Mane_T\u016brei_Wenerei_T\u0101ite_Paraire_H\u0101tarei".split("_"),weekdaysShort:"Ta_Ma_T\u016b_We_T\u0101i_Pa_H\u0101".split("_"),weekdaysMin:"Ta_Ma_T\u016b_We_T\u0101i_Pa_H\u0101".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [i] HH:mm",LLLL:"dddd, D MMMM YYYY [i] HH:mm"},calendar:{sameDay:"[i teie mahana, i] LT",nextDay:"[apopo i] LT",nextWeek:"dddd [i] LT",lastDay:"[inanahi i] LT",lastWeek:"dddd [whakamutunga i] LT",sameElse:"L"},relativeTime:{future:"i roto i %s",past:"%s i mua",s:"te h\u0113kona ruarua",ss:"%d h\u0113kona",m:"he meneti",mm:"%d meneti",h:"te haora",hh:"%d haora",d:"he ra",dd:"%d ra",M:"he marama",MM:"%d marama",y:"he tau",yy:"%d tau"},dayOfMonthOrdinalParse:/\d{1,2}\xba/,ordinal:"%d\xba",week:{dow:1,doy:4}})}(p(15439))},15943:function(qe,I,p){!function(o){"use strict";o.defineLocale("mk",{months:"\u0458\u0430\u043d\u0443\u0430\u0440\u0438_\u0444\u0435\u0432\u0440\u0443\u0430\u0440\u0438_\u043c\u0430\u0440\u0442_\u0430\u043f\u0440\u0438\u043b_\u043c\u0430\u0458_\u0458\u0443\u043d\u0438_\u0458\u0443\u043b\u0438_\u0430\u0432\u0433\u0443\u0441\u0442_\u0441\u0435\u043f\u0442\u0435\u043c\u0432\u0440\u0438_\u043e\u043a\u0442\u043e\u043c\u0432\u0440\u0438_\u043d\u043e\u0435\u043c\u0432\u0440\u0438_\u0434\u0435\u043a\u0435\u043c\u0432\u0440\u0438".split("_"),monthsShort:"\u0458\u0430\u043d_\u0444\u0435\u0432_\u043c\u0430\u0440_\u0430\u043f\u0440_\u043c\u0430\u0458_\u0458\u0443\u043d_\u0458\u0443\u043b_\u0430\u0432\u0433_\u0441\u0435\u043f_\u043e\u043a\u0442_\u043d\u043e\u0435_\u0434\u0435\u043a".split("_"),weekdays:"\u043d\u0435\u0434\u0435\u043b\u0430_\u043f\u043e\u043d\u0435\u0434\u0435\u043b\u043d\u0438\u043a_\u0432\u0442\u043e\u0440\u043d\u0438\u043a_\u0441\u0440\u0435\u0434\u0430_\u0447\u0435\u0442\u0432\u0440\u0442\u043e\u043a_\u043f\u0435\u0442\u043e\u043a_\u0441\u0430\u0431\u043e\u0442\u0430".split("_"),weekdaysShort:"\u043d\u0435\u0434_\u043f\u043e\u043d_\u0432\u0442\u043e_\u0441\u0440\u0435_\u0447\u0435\u0442_\u043f\u0435\u0442_\u0441\u0430\u0431".split("_"),weekdaysMin:"\u043de_\u043fo_\u0432\u0442_\u0441\u0440_\u0447\u0435_\u043f\u0435_\u0441a".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"D.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY H:mm",LLLL:"dddd, D MMMM YYYY H:mm"},calendar:{sameDay:"[\u0414\u0435\u043d\u0435\u0441 \u0432\u043e] LT",nextDay:"[\u0423\u0442\u0440\u0435 \u0432\u043e] LT",nextWeek:"[\u0412\u043e] dddd [\u0432\u043e] LT",lastDay:"[\u0412\u0447\u0435\u0440\u0430 \u0432\u043e] LT",lastWeek:function(){switch(this.day()){case 0:case 3:case 6:return"[\u0418\u0437\u043c\u0438\u043d\u0430\u0442\u0430\u0442\u0430] dddd [\u0432\u043e] LT";case 1:case 2:case 4:case 5:return"[\u0418\u0437\u043c\u0438\u043d\u0430\u0442\u0438\u043e\u0442] dddd [\u0432\u043e] LT"}},sameElse:"L"},relativeTime:{future:"\u0437\u0430 %s",past:"\u043f\u0440\u0435\u0434 %s",s:"\u043d\u0435\u043a\u043e\u043b\u043a\u0443 \u0441\u0435\u043a\u0443\u043d\u0434\u0438",ss:"%d \u0441\u0435\u043a\u0443\u043d\u0434\u0438",m:"\u0435\u0434\u043d\u0430 \u043c\u0438\u043d\u0443\u0442\u0430",mm:"%d \u043c\u0438\u043d\u0443\u0442\u0438",h:"\u0435\u0434\u0435\u043d \u0447\u0430\u0441",hh:"%d \u0447\u0430\u0441\u0430",d:"\u0435\u0434\u0435\u043d \u0434\u0435\u043d",dd:"%d \u0434\u0435\u043d\u0430",M:"\u0435\u0434\u0435\u043d \u043c\u0435\u0441\u0435\u0446",MM:"%d \u043c\u0435\u0441\u0435\u0446\u0438",y:"\u0435\u0434\u043d\u0430 \u0433\u043e\u0434\u0438\u043d\u0430",yy:"%d \u0433\u043e\u0434\u0438\u043d\u0438"},dayOfMonthOrdinalParse:/\d{1,2}-(\u0435\u0432|\u0435\u043d|\u0442\u0438|\u0432\u0438|\u0440\u0438|\u043c\u0438)/,ordinal:function(l){var D=l%10,g=l%100;return 0===l?l+"-\u0435\u0432":0===g?l+"-\u0435\u043d":g>10&&g<20?l+"-\u0442\u0438":1===D?l+"-\u0432\u0438":2===D?l+"-\u0440\u0438":7===D||8===D?l+"-\u043c\u0438":l+"-\u0442\u0438"},week:{dow:1,doy:7}})}(p(15439))},13849:function(qe,I,p){!function(o){"use strict";o.defineLocale("ml",{months:"\u0d1c\u0d28\u0d41\u0d35\u0d30\u0d3f_\u0d2b\u0d46\u0d2c\u0d4d\u0d30\u0d41\u0d35\u0d30\u0d3f_\u0d2e\u0d3e\u0d7c\u0d1a\u0d4d\u0d1a\u0d4d_\u0d0f\u0d2a\u0d4d\u0d30\u0d3f\u0d7d_\u0d2e\u0d47\u0d2f\u0d4d_\u0d1c\u0d42\u0d7a_\u0d1c\u0d42\u0d32\u0d48_\u0d13\u0d17\u0d38\u0d4d\u0d31\u0d4d\u0d31\u0d4d_\u0d38\u0d46\u0d2a\u0d4d\u0d31\u0d4d\u0d31\u0d02\u0d2c\u0d7c_\u0d12\u0d15\u0d4d\u0d1f\u0d4b\u0d2c\u0d7c_\u0d28\u0d35\u0d02\u0d2c\u0d7c_\u0d21\u0d3f\u0d38\u0d02\u0d2c\u0d7c".split("_"),monthsShort:"\u0d1c\u0d28\u0d41._\u0d2b\u0d46\u0d2c\u0d4d\u0d30\u0d41._\u0d2e\u0d3e\u0d7c._\u0d0f\u0d2a\u0d4d\u0d30\u0d3f._\u0d2e\u0d47\u0d2f\u0d4d_\u0d1c\u0d42\u0d7a_\u0d1c\u0d42\u0d32\u0d48._\u0d13\u0d17._\u0d38\u0d46\u0d2a\u0d4d\u0d31\u0d4d\u0d31._\u0d12\u0d15\u0d4d\u0d1f\u0d4b._\u0d28\u0d35\u0d02._\u0d21\u0d3f\u0d38\u0d02.".split("_"),monthsParseExact:!0,weekdays:"\u0d1e\u0d3e\u0d2f\u0d31\u0d3e\u0d34\u0d4d\u0d1a_\u0d24\u0d3f\u0d19\u0d4d\u0d15\u0d33\u0d3e\u0d34\u0d4d\u0d1a_\u0d1a\u0d4a\u0d35\u0d4d\u0d35\u0d3e\u0d34\u0d4d\u0d1a_\u0d2c\u0d41\u0d27\u0d28\u0d3e\u0d34\u0d4d\u0d1a_\u0d35\u0d4d\u0d2f\u0d3e\u0d34\u0d3e\u0d34\u0d4d\u0d1a_\u0d35\u0d46\u0d33\u0d4d\u0d33\u0d3f\u0d2f\u0d3e\u0d34\u0d4d\u0d1a_\u0d36\u0d28\u0d3f\u0d2f\u0d3e\u0d34\u0d4d\u0d1a".split("_"),weekdaysShort:"\u0d1e\u0d3e\u0d2f\u0d7c_\u0d24\u0d3f\u0d19\u0d4d\u0d15\u0d7e_\u0d1a\u0d4a\u0d35\u0d4d\u0d35_\u0d2c\u0d41\u0d27\u0d7b_\u0d35\u0d4d\u0d2f\u0d3e\u0d34\u0d02_\u0d35\u0d46\u0d33\u0d4d\u0d33\u0d3f_\u0d36\u0d28\u0d3f".split("_"),weekdaysMin:"\u0d1e\u0d3e_\u0d24\u0d3f_\u0d1a\u0d4a_\u0d2c\u0d41_\u0d35\u0d4d\u0d2f\u0d3e_\u0d35\u0d46_\u0d36".split("_"),longDateFormat:{LT:"A h:mm -\u0d28\u0d41",LTS:"A h:mm:ss -\u0d28\u0d41",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm -\u0d28\u0d41",LLLL:"dddd, D MMMM YYYY, A h:mm -\u0d28\u0d41"},calendar:{sameDay:"[\u0d07\u0d28\u0d4d\u0d28\u0d4d] LT",nextDay:"[\u0d28\u0d3e\u0d33\u0d46] LT",nextWeek:"dddd, LT",lastDay:"[\u0d07\u0d28\u0d4d\u0d28\u0d32\u0d46] LT",lastWeek:"[\u0d15\u0d34\u0d3f\u0d1e\u0d4d\u0d1e] dddd, LT",sameElse:"L"},relativeTime:{future:"%s \u0d15\u0d34\u0d3f\u0d1e\u0d4d\u0d1e\u0d4d",past:"%s \u0d2e\u0d41\u0d7b\u0d2a\u0d4d",s:"\u0d05\u0d7d\u0d2a \u0d28\u0d3f\u0d2e\u0d3f\u0d37\u0d19\u0d4d\u0d19\u0d7e",ss:"%d \u0d38\u0d46\u0d15\u0d4d\u0d15\u0d7b\u0d21\u0d4d",m:"\u0d12\u0d30\u0d41 \u0d2e\u0d3f\u0d28\u0d3f\u0d31\u0d4d\u0d31\u0d4d",mm:"%d \u0d2e\u0d3f\u0d28\u0d3f\u0d31\u0d4d\u0d31\u0d4d",h:"\u0d12\u0d30\u0d41 \u0d2e\u0d23\u0d3f\u0d15\u0d4d\u0d15\u0d42\u0d7c",hh:"%d \u0d2e\u0d23\u0d3f\u0d15\u0d4d\u0d15\u0d42\u0d7c",d:"\u0d12\u0d30\u0d41 \u0d26\u0d3f\u0d35\u0d38\u0d02",dd:"%d \u0d26\u0d3f\u0d35\u0d38\u0d02",M:"\u0d12\u0d30\u0d41 \u0d2e\u0d3e\u0d38\u0d02",MM:"%d \u0d2e\u0d3e\u0d38\u0d02",y:"\u0d12\u0d30\u0d41 \u0d35\u0d7c\u0d37\u0d02",yy:"%d \u0d35\u0d7c\u0d37\u0d02"},meridiemParse:/\u0d30\u0d3e\u0d24\u0d4d\u0d30\u0d3f|\u0d30\u0d3e\u0d35\u0d3f\u0d32\u0d46|\u0d09\u0d1a\u0d4d\u0d1a \u0d15\u0d34\u0d3f\u0d1e\u0d4d\u0d1e\u0d4d|\u0d35\u0d48\u0d15\u0d41\u0d28\u0d4d\u0d28\u0d47\u0d30\u0d02|\u0d30\u0d3e\u0d24\u0d4d\u0d30\u0d3f/i,meridiemHour:function(l,D){return 12===l&&(l=0),"\u0d30\u0d3e\u0d24\u0d4d\u0d30\u0d3f"===D&&l>=4||"\u0d09\u0d1a\u0d4d\u0d1a \u0d15\u0d34\u0d3f\u0d1e\u0d4d\u0d1e\u0d4d"===D||"\u0d35\u0d48\u0d15\u0d41\u0d28\u0d4d\u0d28\u0d47\u0d30\u0d02"===D?l+12:l},meridiem:function(l,D,g){return l<4?"\u0d30\u0d3e\u0d24\u0d4d\u0d30\u0d3f":l<12?"\u0d30\u0d3e\u0d35\u0d3f\u0d32\u0d46":l<17?"\u0d09\u0d1a\u0d4d\u0d1a \u0d15\u0d34\u0d3f\u0d1e\u0d4d\u0d1e\u0d4d":l<20?"\u0d35\u0d48\u0d15\u0d41\u0d28\u0d4d\u0d28\u0d47\u0d30\u0d02":"\u0d30\u0d3e\u0d24\u0d4d\u0d30\u0d3f"}})}(p(15439))},31977:function(qe,I,p){!function(o){"use strict";function e(D,g,E,T){switch(E){case"s":return g?"\u0445\u044d\u0434\u0445\u044d\u043d \u0441\u0435\u043a\u0443\u043d\u0434":"\u0445\u044d\u0434\u0445\u044d\u043d \u0441\u0435\u043a\u0443\u043d\u0434\u044b\u043d";case"ss":return D+(g?" \u0441\u0435\u043a\u0443\u043d\u0434":" \u0441\u0435\u043a\u0443\u043d\u0434\u044b\u043d");case"m":case"mm":return D+(g?" \u043c\u0438\u043d\u0443\u0442":" \u043c\u0438\u043d\u0443\u0442\u044b\u043d");case"h":case"hh":return D+(g?" \u0446\u0430\u0433":" \u0446\u0430\u0433\u0438\u0439\u043d");case"d":case"dd":return D+(g?" \u04e9\u0434\u04e9\u0440":" \u04e9\u0434\u0440\u0438\u0439\u043d");case"M":case"MM":return D+(g?" \u0441\u0430\u0440":" \u0441\u0430\u0440\u044b\u043d");case"y":case"yy":return D+(g?" \u0436\u0438\u043b":" \u0436\u0438\u043b\u0438\u0439\u043d");default:return D}}o.defineLocale("mn",{months:"\u041d\u044d\u0433\u0434\u04af\u0433\u044d\u044d\u0440 \u0441\u0430\u0440_\u0425\u043e\u0451\u0440\u0434\u0443\u0433\u0430\u0430\u0440 \u0441\u0430\u0440_\u0413\u0443\u0440\u0430\u0432\u0434\u0443\u0433\u0430\u0430\u0440 \u0441\u0430\u0440_\u0414\u04e9\u0440\u04e9\u0432\u0434\u04af\u0433\u044d\u044d\u0440 \u0441\u0430\u0440_\u0422\u0430\u0432\u0434\u0443\u0433\u0430\u0430\u0440 \u0441\u0430\u0440_\u0417\u0443\u0440\u0433\u0430\u0434\u0443\u0433\u0430\u0430\u0440 \u0441\u0430\u0440_\u0414\u043e\u043b\u0434\u0443\u0433\u0430\u0430\u0440 \u0441\u0430\u0440_\u041d\u0430\u0439\u043c\u0434\u0443\u0433\u0430\u0430\u0440 \u0441\u0430\u0440_\u0415\u0441\u0434\u04af\u0433\u044d\u044d\u0440 \u0441\u0430\u0440_\u0410\u0440\u0430\u0432\u0434\u0443\u0433\u0430\u0430\u0440 \u0441\u0430\u0440_\u0410\u0440\u0432\u0430\u043d \u043d\u044d\u0433\u0434\u04af\u0433\u044d\u044d\u0440 \u0441\u0430\u0440_\u0410\u0440\u0432\u0430\u043d \u0445\u043e\u0451\u0440\u0434\u0443\u0433\u0430\u0430\u0440 \u0441\u0430\u0440".split("_"),monthsShort:"1 \u0441\u0430\u0440_2 \u0441\u0430\u0440_3 \u0441\u0430\u0440_4 \u0441\u0430\u0440_5 \u0441\u0430\u0440_6 \u0441\u0430\u0440_7 \u0441\u0430\u0440_8 \u0441\u0430\u0440_9 \u0441\u0430\u0440_10 \u0441\u0430\u0440_11 \u0441\u0430\u0440_12 \u0441\u0430\u0440".split("_"),monthsParseExact:!0,weekdays:"\u041d\u044f\u043c_\u0414\u0430\u0432\u0430\u0430_\u041c\u044f\u0433\u043c\u0430\u0440_\u041b\u0445\u0430\u0433\u0432\u0430_\u041f\u04af\u0440\u044d\u0432_\u0411\u0430\u0430\u0441\u0430\u043d_\u0411\u044f\u043c\u0431\u0430".split("_"),weekdaysShort:"\u041d\u044f\u043c_\u0414\u0430\u0432_\u041c\u044f\u0433_\u041b\u0445\u0430_\u041f\u04af\u0440_\u0411\u0430\u0430_\u0411\u044f\u043c".split("_"),weekdaysMin:"\u041d\u044f_\u0414\u0430_\u041c\u044f_\u041b\u0445_\u041f\u04af_\u0411\u0430_\u0411\u044f".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"YYYY \u043e\u043d\u044b MMMM\u044b\u043d D",LLL:"YYYY \u043e\u043d\u044b MMMM\u044b\u043d D HH:mm",LLLL:"dddd, YYYY \u043e\u043d\u044b MMMM\u044b\u043d D HH:mm"},meridiemParse:/\u04ae\u04e8|\u04ae\u0425/i,isPM:function(D){return"\u04ae\u0425"===D},meridiem:function(D,g,E){return D<12?"\u04ae\u04e8":"\u04ae\u0425"},calendar:{sameDay:"[\u04e8\u043d\u04e9\u04e9\u0434\u04e9\u0440] LT",nextDay:"[\u041c\u0430\u0440\u0433\u0430\u0430\u0448] LT",nextWeek:"[\u0418\u0440\u044d\u0445] dddd LT",lastDay:"[\u04e8\u0447\u0438\u0433\u0434\u04e9\u0440] LT",lastWeek:"[\u04e8\u043d\u0433\u04e9\u0440\u0441\u04e9\u043d] dddd LT",sameElse:"L"},relativeTime:{future:"%s \u0434\u0430\u0440\u0430\u0430",past:"%s \u04e9\u043c\u043d\u04e9",s:e,ss:e,m:e,mm:e,h:e,hh:e,d:e,dd:e,M:e,MM:e,y:e,yy:e},dayOfMonthOrdinalParse:/\d{1,2} \u04e9\u0434\u04e9\u0440/,ordinal:function(D,g){switch(g){case"d":case"D":case"DDD":return D+" \u04e9\u0434\u04e9\u0440";default:return D}}})}(p(15439))},66184:function(qe,I,p){!function(o){"use strict";var e={1:"\u0967",2:"\u0968",3:"\u0969",4:"\u096a",5:"\u096b",6:"\u096c",7:"\u096d",8:"\u096e",9:"\u096f",0:"\u0966"},l={"\u0967":"1","\u0968":"2","\u0969":"3","\u096a":"4","\u096b":"5","\u096c":"6","\u096d":"7","\u096e":"8","\u096f":"9","\u0966":"0"};function D(E,T,n,P){var w="";if(T)switch(n){case"s":w="\u0915\u093e\u0939\u0940 \u0938\u0947\u0915\u0902\u0926";break;case"ss":w="%d \u0938\u0947\u0915\u0902\u0926";break;case"m":w="\u090f\u0915 \u092e\u093f\u0928\u093f\u091f";break;case"mm":w="%d \u092e\u093f\u0928\u093f\u091f\u0947";break;case"h":w="\u090f\u0915 \u0924\u093e\u0938";break;case"hh":w="%d \u0924\u093e\u0938";break;case"d":w="\u090f\u0915 \u0926\u093f\u0935\u0938";break;case"dd":w="%d \u0926\u093f\u0935\u0938";break;case"M":w="\u090f\u0915 \u092e\u0939\u093f\u0928\u093e";break;case"MM":w="%d \u092e\u0939\u093f\u0928\u0947";break;case"y":w="\u090f\u0915 \u0935\u0930\u094d\u0937";break;case"yy":w="%d \u0935\u0930\u094d\u0937\u0947"}else switch(n){case"s":w="\u0915\u093e\u0939\u0940 \u0938\u0947\u0915\u0902\u0926\u093e\u0902";break;case"ss":w="%d \u0938\u0947\u0915\u0902\u0926\u093e\u0902";break;case"m":w="\u090f\u0915\u093e \u092e\u093f\u0928\u093f\u091f\u093e";break;case"mm":w="%d \u092e\u093f\u0928\u093f\u091f\u093e\u0902";break;case"h":w="\u090f\u0915\u093e \u0924\u093e\u0938\u093e";break;case"hh":w="%d \u0924\u093e\u0938\u093e\u0902";break;case"d":w="\u090f\u0915\u093e \u0926\u093f\u0935\u0938\u093e";break;case"dd":w="%d \u0926\u093f\u0935\u0938\u093e\u0902";break;case"M":w="\u090f\u0915\u093e \u092e\u0939\u093f\u0928\u094d\u092f\u093e";break;case"MM":w="%d \u092e\u0939\u093f\u0928\u094d\u092f\u093e\u0902";break;case"y":w="\u090f\u0915\u093e \u0935\u0930\u094d\u0937\u093e";break;case"yy":w="%d \u0935\u0930\u094d\u0937\u093e\u0902"}return w.replace(/%d/i,E)}o.defineLocale("mr",{months:"\u091c\u093e\u0928\u0947\u0935\u093e\u0930\u0940_\u092b\u0947\u092c\u094d\u0930\u0941\u0935\u093e\u0930\u0940_\u092e\u093e\u0930\u094d\u091a_\u090f\u092a\u094d\u0930\u093f\u0932_\u092e\u0947_\u091c\u0942\u0928_\u091c\u0941\u0932\u0948_\u0911\u0917\u0938\u094d\u091f_\u0938\u092a\u094d\u091f\u0947\u0902\u092c\u0930_\u0911\u0915\u094d\u091f\u094b\u092c\u0930_\u0928\u094b\u0935\u094d\u0939\u0947\u0902\u092c\u0930_\u0921\u093f\u0938\u0947\u0902\u092c\u0930".split("_"),monthsShort:"\u091c\u093e\u0928\u0947._\u092b\u0947\u092c\u094d\u0930\u0941._\u092e\u093e\u0930\u094d\u091a._\u090f\u092a\u094d\u0930\u093f._\u092e\u0947._\u091c\u0942\u0928._\u091c\u0941\u0932\u0948._\u0911\u0917._\u0938\u092a\u094d\u091f\u0947\u0902._\u0911\u0915\u094d\u091f\u094b._\u0928\u094b\u0935\u094d\u0939\u0947\u0902._\u0921\u093f\u0938\u0947\u0902.".split("_"),monthsParseExact:!0,weekdays:"\u0930\u0935\u093f\u0935\u093e\u0930_\u0938\u094b\u092e\u0935\u093e\u0930_\u092e\u0902\u0917\u0933\u0935\u093e\u0930_\u092c\u0941\u0927\u0935\u093e\u0930_\u0917\u0941\u0930\u0942\u0935\u093e\u0930_\u0936\u0941\u0915\u094d\u0930\u0935\u093e\u0930_\u0936\u0928\u093f\u0935\u093e\u0930".split("_"),weekdaysShort:"\u0930\u0935\u093f_\u0938\u094b\u092e_\u092e\u0902\u0917\u0933_\u092c\u0941\u0927_\u0917\u0941\u0930\u0942_\u0936\u0941\u0915\u094d\u0930_\u0936\u0928\u093f".split("_"),weekdaysMin:"\u0930_\u0938\u094b_\u092e\u0902_\u092c\u0941_\u0917\u0941_\u0936\u0941_\u0936".split("_"),longDateFormat:{LT:"A h:mm \u0935\u093e\u091c\u0924\u093e",LTS:"A h:mm:ss \u0935\u093e\u091c\u0924\u093e",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm \u0935\u093e\u091c\u0924\u093e",LLLL:"dddd, D MMMM YYYY, A h:mm \u0935\u093e\u091c\u0924\u093e"},calendar:{sameDay:"[\u0906\u091c] LT",nextDay:"[\u0909\u0926\u094d\u092f\u093e] LT",nextWeek:"dddd, LT",lastDay:"[\u0915\u093e\u0932] LT",lastWeek:"[\u092e\u093e\u0917\u0940\u0932] dddd, LT",sameElse:"L"},relativeTime:{future:"%s\u092e\u0927\u094d\u092f\u0947",past:"%s\u092a\u0942\u0930\u094d\u0935\u0940",s:D,ss:D,m:D,mm:D,h:D,hh:D,d:D,dd:D,M:D,MM:D,y:D,yy:D},preparse:function(E){return E.replace(/[\u0967\u0968\u0969\u096a\u096b\u096c\u096d\u096e\u096f\u0966]/g,function(T){return l[T]})},postformat:function(E){return E.replace(/\d/g,function(T){return e[T]})},meridiemParse:/\u092a\u0939\u093e\u091f\u0947|\u0938\u0915\u093e\u0933\u0940|\u0926\u0941\u092a\u093e\u0930\u0940|\u0938\u093e\u092f\u0902\u0915\u093e\u0933\u0940|\u0930\u093e\u0924\u094d\u0930\u0940/,meridiemHour:function(E,T){return 12===E&&(E=0),"\u092a\u0939\u093e\u091f\u0947"===T||"\u0938\u0915\u093e\u0933\u0940"===T?E:"\u0926\u0941\u092a\u093e\u0930\u0940"===T||"\u0938\u093e\u092f\u0902\u0915\u093e\u0933\u0940"===T||"\u0930\u093e\u0924\u094d\u0930\u0940"===T?E>=12?E:E+12:void 0},meridiem:function(E,T,n){return E>=0&&E<6?"\u092a\u0939\u093e\u091f\u0947":E<12?"\u0938\u0915\u093e\u0933\u0940":E<17?"\u0926\u0941\u092a\u093e\u0930\u0940":E<20?"\u0938\u093e\u092f\u0902\u0915\u093e\u0933\u0940":"\u0930\u093e\u0924\u094d\u0930\u0940"},week:{dow:0,doy:6}})}(p(15439))},64524:function(qe,I,p){!function(o){"use strict";o.defineLocale("ms-my",{months:"Januari_Februari_Mac_April_Mei_Jun_Julai_Ogos_September_Oktober_November_Disember".split("_"),monthsShort:"Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ogs_Sep_Okt_Nov_Dis".split("_"),weekdays:"Ahad_Isnin_Selasa_Rabu_Khamis_Jumaat_Sabtu".split("_"),weekdaysShort:"Ahd_Isn_Sel_Rab_Kha_Jum_Sab".split("_"),weekdaysMin:"Ah_Is_Sl_Rb_Km_Jm_Sb".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [pukul] HH.mm",LLLL:"dddd, D MMMM YYYY [pukul] HH.mm"},meridiemParse:/pagi|tengahari|petang|malam/,meridiemHour:function(l,D){return 12===l&&(l=0),"pagi"===D?l:"tengahari"===D?l>=11?l:l+12:"petang"===D||"malam"===D?l+12:void 0},meridiem:function(l,D,g){return l<11?"pagi":l<15?"tengahari":l<19?"petang":"malam"},calendar:{sameDay:"[Hari ini pukul] LT",nextDay:"[Esok pukul] LT",nextWeek:"dddd [pukul] LT",lastDay:"[Kelmarin pukul] LT",lastWeek:"dddd [lepas pukul] LT",sameElse:"L"},relativeTime:{future:"dalam %s",past:"%s yang lepas",s:"beberapa saat",ss:"%d saat",m:"seminit",mm:"%d minit",h:"sejam",hh:"%d jam",d:"sehari",dd:"%d hari",M:"sebulan",MM:"%d bulan",y:"setahun",yy:"%d tahun"},week:{dow:1,doy:7}})}(p(15439))},70485:function(qe,I,p){!function(o){"use strict";o.defineLocale("ms",{months:"Januari_Februari_Mac_April_Mei_Jun_Julai_Ogos_September_Oktober_November_Disember".split("_"),monthsShort:"Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ogs_Sep_Okt_Nov_Dis".split("_"),weekdays:"Ahad_Isnin_Selasa_Rabu_Khamis_Jumaat_Sabtu".split("_"),weekdaysShort:"Ahd_Isn_Sel_Rab_Kha_Jum_Sab".split("_"),weekdaysMin:"Ah_Is_Sl_Rb_Km_Jm_Sb".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [pukul] HH.mm",LLLL:"dddd, D MMMM YYYY [pukul] HH.mm"},meridiemParse:/pagi|tengahari|petang|malam/,meridiemHour:function(l,D){return 12===l&&(l=0),"pagi"===D?l:"tengahari"===D?l>=11?l:l+12:"petang"===D||"malam"===D?l+12:void 0},meridiem:function(l,D,g){return l<11?"pagi":l<15?"tengahari":l<19?"petang":"malam"},calendar:{sameDay:"[Hari ini pukul] LT",nextDay:"[Esok pukul] LT",nextWeek:"dddd [pukul] LT",lastDay:"[Kelmarin pukul] LT",lastWeek:"dddd [lepas pukul] LT",sameElse:"L"},relativeTime:{future:"dalam %s",past:"%s yang lepas",s:"beberapa saat",ss:"%d saat",m:"seminit",mm:"%d minit",h:"sejam",hh:"%d jam",d:"sehari",dd:"%d hari",M:"sebulan",MM:"%d bulan",y:"setahun",yy:"%d tahun"},week:{dow:1,doy:7}})}(p(15439))},36681:function(qe,I,p){!function(o){"use strict";o.defineLocale("mt",{months:"Jannar_Frar_Marzu_April_Mejju_\u0120unju_Lulju_Awwissu_Settembru_Ottubru_Novembru_Di\u010bembru".split("_"),monthsShort:"Jan_Fra_Mar_Apr_Mej_\u0120un_Lul_Aww_Set_Ott_Nov_Di\u010b".split("_"),weekdays:"Il-\u0126add_It-Tnejn_It-Tlieta_L-Erbg\u0127a_Il-\u0126amis_Il-\u0120img\u0127a_Is-Sibt".split("_"),weekdaysShort:"\u0126ad_Tne_Tli_Erb_\u0126am_\u0120im_Sib".split("_"),weekdaysMin:"\u0126a_Tn_Tl_Er_\u0126a_\u0120i_Si".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Illum fil-]LT",nextDay:"[G\u0127ada fil-]LT",nextWeek:"dddd [fil-]LT",lastDay:"[Il-biera\u0127 fil-]LT",lastWeek:"dddd [li g\u0127adda] [fil-]LT",sameElse:"L"},relativeTime:{future:"f\u2019 %s",past:"%s ilu",s:"ftit sekondi",ss:"%d sekondi",m:"minuta",mm:"%d minuti",h:"sieg\u0127a",hh:"%d sieg\u0127at",d:"\u0121urnata",dd:"%d \u0121ranet",M:"xahar",MM:"%d xhur",y:"sena",yy:"%d sni"},dayOfMonthOrdinalParse:/\d{1,2}\xba/,ordinal:"%d\xba",week:{dow:1,doy:4}})}(p(15439))},52024:function(qe,I,p){!function(o){"use strict";var e={1:"\u1041",2:"\u1042",3:"\u1043",4:"\u1044",5:"\u1045",6:"\u1046",7:"\u1047",8:"\u1048",9:"\u1049",0:"\u1040"},l={"\u1041":"1","\u1042":"2","\u1043":"3","\u1044":"4","\u1045":"5","\u1046":"6","\u1047":"7","\u1048":"8","\u1049":"9","\u1040":"0"};o.defineLocale("my",{months:"\u1007\u1014\u103a\u1014\u101d\u102b\u101b\u102e_\u1016\u1031\u1016\u1031\u102c\u103a\u101d\u102b\u101b\u102e_\u1019\u1010\u103a_\u1027\u1015\u103c\u102e_\u1019\u1031_\u1007\u103d\u1014\u103a_\u1007\u1030\u101c\u102d\u102f\u1004\u103a_\u101e\u103c\u1002\u102f\u1010\u103a_\u1005\u1000\u103a\u1010\u1004\u103a\u1018\u102c_\u1021\u1031\u102c\u1000\u103a\u1010\u102d\u102f\u1018\u102c_\u1014\u102d\u102f\u101d\u1004\u103a\u1018\u102c_\u1012\u102e\u1007\u1004\u103a\u1018\u102c".split("_"),monthsShort:"\u1007\u1014\u103a_\u1016\u1031_\u1019\u1010\u103a_\u1015\u103c\u102e_\u1019\u1031_\u1007\u103d\u1014\u103a_\u101c\u102d\u102f\u1004\u103a_\u101e\u103c_\u1005\u1000\u103a_\u1021\u1031\u102c\u1000\u103a_\u1014\u102d\u102f_\u1012\u102e".split("_"),weekdays:"\u1010\u1014\u1004\u103a\u1039\u1002\u1014\u103d\u1031_\u1010\u1014\u1004\u103a\u1039\u101c\u102c_\u1021\u1004\u103a\u1039\u1002\u102b_\u1017\u102f\u1012\u1039\u1013\u101f\u1030\u1038_\u1000\u103c\u102c\u101e\u1015\u1010\u1031\u1038_\u101e\u1031\u102c\u1000\u103c\u102c_\u1005\u1014\u1031".split("_"),weekdaysShort:"\u1014\u103d\u1031_\u101c\u102c_\u1002\u102b_\u101f\u1030\u1038_\u1000\u103c\u102c_\u101e\u1031\u102c_\u1014\u1031".split("_"),weekdaysMin:"\u1014\u103d\u1031_\u101c\u102c_\u1002\u102b_\u101f\u1030\u1038_\u1000\u103c\u102c_\u101e\u1031\u102c_\u1014\u1031".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[\u101a\u1014\u1031.] LT [\u1019\u103e\u102c]",nextDay:"[\u1019\u1014\u1000\u103a\u1016\u103c\u1014\u103a] LT [\u1019\u103e\u102c]",nextWeek:"dddd LT [\u1019\u103e\u102c]",lastDay:"[\u1019\u1014\u1031.\u1000] LT [\u1019\u103e\u102c]",lastWeek:"[\u1015\u103c\u102e\u1038\u1001\u1032\u1037\u101e\u1031\u102c] dddd LT [\u1019\u103e\u102c]",sameElse:"L"},relativeTime:{future:"\u101c\u102c\u1019\u100a\u103a\u1037 %s \u1019\u103e\u102c",past:"\u101c\u103d\u1014\u103a\u1001\u1032\u1037\u101e\u1031\u102c %s \u1000",s:"\u1005\u1000\u1039\u1000\u1014\u103a.\u1021\u1014\u100a\u103a\u1038\u1004\u101a\u103a",ss:"%d \u1005\u1000\u1039\u1000\u1014\u1037\u103a",m:"\u1010\u1005\u103a\u1019\u102d\u1014\u1005\u103a",mm:"%d \u1019\u102d\u1014\u1005\u103a",h:"\u1010\u1005\u103a\u1014\u102c\u101b\u102e",hh:"%d \u1014\u102c\u101b\u102e",d:"\u1010\u1005\u103a\u101b\u1000\u103a",dd:"%d \u101b\u1000\u103a",M:"\u1010\u1005\u103a\u101c",MM:"%d \u101c",y:"\u1010\u1005\u103a\u1014\u103e\u1005\u103a",yy:"%d \u1014\u103e\u1005\u103a"},preparse:function(g){return g.replace(/[\u1041\u1042\u1043\u1044\u1045\u1046\u1047\u1048\u1049\u1040]/g,function(E){return l[E]})},postformat:function(g){return g.replace(/\d/g,function(E){return e[E]})},week:{dow:1,doy:4}})}(p(15439))},42688:function(qe,I,p){!function(o){"use strict";o.defineLocale("nb",{months:"januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember".split("_"),monthsShort:"jan._feb._mars_apr._mai_juni_juli_aug._sep._okt._nov._des.".split("_"),monthsParseExact:!0,weekdays:"s\xf8ndag_mandag_tirsdag_onsdag_torsdag_fredag_l\xf8rdag".split("_"),weekdaysShort:"s\xf8._ma._ti._on._to._fr._l\xf8.".split("_"),weekdaysMin:"s\xf8_ma_ti_on_to_fr_l\xf8".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY [kl.] HH:mm",LLLL:"dddd D. MMMM YYYY [kl.] HH:mm"},calendar:{sameDay:"[i dag kl.] LT",nextDay:"[i morgen kl.] LT",nextWeek:"dddd [kl.] LT",lastDay:"[i g\xe5r kl.] LT",lastWeek:"[forrige] dddd [kl.] LT",sameElse:"L"},relativeTime:{future:"om %s",past:"%s siden",s:"noen sekunder",ss:"%d sekunder",m:"ett minutt",mm:"%d minutter",h:"\xe9n time",hh:"%d timer",d:"\xe9n dag",dd:"%d dager",w:"\xe9n uke",ww:"%d uker",M:"\xe9n m\xe5ned",MM:"%d m\xe5neder",y:"ett \xe5r",yy:"%d \xe5r"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(p(15439))},68914:function(qe,I,p){!function(o){"use strict";var e={1:"\u0967",2:"\u0968",3:"\u0969",4:"\u096a",5:"\u096b",6:"\u096c",7:"\u096d",8:"\u096e",9:"\u096f",0:"\u0966"},l={"\u0967":"1","\u0968":"2","\u0969":"3","\u096a":"4","\u096b":"5","\u096c":"6","\u096d":"7","\u096e":"8","\u096f":"9","\u0966":"0"};o.defineLocale("ne",{months:"\u091c\u0928\u0935\u0930\u0940_\u092b\u0947\u092c\u094d\u0930\u0941\u0935\u0930\u0940_\u092e\u093e\u0930\u094d\u091a_\u0905\u092a\u094d\u0930\u093f\u0932_\u092e\u0908_\u091c\u0941\u0928_\u091c\u0941\u0932\u093e\u0908_\u0905\u0917\u0937\u094d\u091f_\u0938\u0947\u092a\u094d\u091f\u0947\u092e\u094d\u092c\u0930_\u0905\u0915\u094d\u091f\u094b\u092c\u0930_\u0928\u094b\u092d\u0947\u092e\u094d\u092c\u0930_\u0921\u093f\u0938\u0947\u092e\u094d\u092c\u0930".split("_"),monthsShort:"\u091c\u0928._\u092b\u0947\u092c\u094d\u0930\u0941._\u092e\u093e\u0930\u094d\u091a_\u0905\u092a\u094d\u0930\u093f._\u092e\u0908_\u091c\u0941\u0928_\u091c\u0941\u0932\u093e\u0908._\u0905\u0917._\u0938\u0947\u092a\u094d\u091f._\u0905\u0915\u094d\u091f\u094b._\u0928\u094b\u092d\u0947._\u0921\u093f\u0938\u0947.".split("_"),monthsParseExact:!0,weekdays:"\u0906\u0907\u0924\u092c\u093e\u0930_\u0938\u094b\u092e\u092c\u093e\u0930_\u092e\u0919\u094d\u0917\u0932\u092c\u093e\u0930_\u092c\u0941\u0927\u092c\u093e\u0930_\u092c\u093f\u0939\u093f\u092c\u093e\u0930_\u0936\u0941\u0915\u094d\u0930\u092c\u093e\u0930_\u0936\u0928\u093f\u092c\u093e\u0930".split("_"),weekdaysShort:"\u0906\u0907\u0924._\u0938\u094b\u092e._\u092e\u0919\u094d\u0917\u0932._\u092c\u0941\u0927._\u092c\u093f\u0939\u093f._\u0936\u0941\u0915\u094d\u0930._\u0936\u0928\u093f.".split("_"),weekdaysMin:"\u0906._\u0938\u094b._\u092e\u0902._\u092c\u0941._\u092c\u093f._\u0936\u0941._\u0936.".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"A\u0915\u094b h:mm \u092c\u091c\u0947",LTS:"A\u0915\u094b h:mm:ss \u092c\u091c\u0947",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A\u0915\u094b h:mm \u092c\u091c\u0947",LLLL:"dddd, D MMMM YYYY, A\u0915\u094b h:mm \u092c\u091c\u0947"},preparse:function(g){return g.replace(/[\u0967\u0968\u0969\u096a\u096b\u096c\u096d\u096e\u096f\u0966]/g,function(E){return l[E]})},postformat:function(g){return g.replace(/\d/g,function(E){return e[E]})},meridiemParse:/\u0930\u093e\u0924\u093f|\u092c\u093f\u0939\u093e\u0928|\u0926\u093f\u0909\u0901\u0938\u094b|\u0938\u093e\u0901\u091d/,meridiemHour:function(g,E){return 12===g&&(g=0),"\u0930\u093e\u0924\u093f"===E?g<4?g:g+12:"\u092c\u093f\u0939\u093e\u0928"===E?g:"\u0926\u093f\u0909\u0901\u0938\u094b"===E?g>=10?g:g+12:"\u0938\u093e\u0901\u091d"===E?g+12:void 0},meridiem:function(g,E,T){return g<3?"\u0930\u093e\u0924\u093f":g<12?"\u092c\u093f\u0939\u093e\u0928":g<16?"\u0926\u093f\u0909\u0901\u0938\u094b":g<20?"\u0938\u093e\u0901\u091d":"\u0930\u093e\u0924\u093f"},calendar:{sameDay:"[\u0906\u091c] LT",nextDay:"[\u092d\u094b\u0932\u093f] LT",nextWeek:"[\u0906\u0909\u0901\u0926\u094b] dddd[,] LT",lastDay:"[\u0939\u093f\u091c\u094b] LT",lastWeek:"[\u0917\u090f\u0915\u094b] dddd[,] LT",sameElse:"L"},relativeTime:{future:"%s\u092e\u093e",past:"%s \u0905\u0917\u093e\u0921\u093f",s:"\u0915\u0947\u0939\u0940 \u0915\u094d\u0937\u0923",ss:"%d \u0938\u0947\u0915\u0947\u0923\u094d\u0921",m:"\u090f\u0915 \u092e\u093f\u0928\u0947\u091f",mm:"%d \u092e\u093f\u0928\u0947\u091f",h:"\u090f\u0915 \u0918\u0923\u094d\u091f\u093e",hh:"%d \u0918\u0923\u094d\u091f\u093e",d:"\u090f\u0915 \u0926\u093f\u0928",dd:"%d \u0926\u093f\u0928",M:"\u090f\u0915 \u092e\u0939\u093f\u0928\u093e",MM:"%d \u092e\u0939\u093f\u0928\u093e",y:"\u090f\u0915 \u092c\u0930\u094d\u0937",yy:"%d \u092c\u0930\u094d\u0937"},week:{dow:0,doy:6}})}(p(15439))},52272:function(qe,I,p){!function(o){"use strict";var e="jan._feb._mrt._apr._mei_jun._jul._aug._sep._okt._nov._dec.".split("_"),l="jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec".split("_"),D=[/^jan/i,/^feb/i,/^(maart|mrt\.?)$/i,/^apr/i,/^mei$/i,/^jun[i.]?$/i,/^jul[i.]?$/i,/^aug/i,/^sep/i,/^okt/i,/^nov/i,/^dec/i],g=/^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december|jan\.?|feb\.?|mrt\.?|apr\.?|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i;o.defineLocale("nl-be",{months:"januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december".split("_"),monthsShort:function(T,n){return T?/-MMM-/.test(n)?l[T.month()]:e[T.month()]:e},monthsRegex:g,monthsShortRegex:g,monthsStrictRegex:/^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december)/i,monthsShortStrictRegex:/^(jan\.?|feb\.?|mrt\.?|apr\.?|mei|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i,monthsParse:D,longMonthsParse:D,shortMonthsParse:D,weekdays:"zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag".split("_"),weekdaysShort:"zo._ma._di._wo._do._vr._za.".split("_"),weekdaysMin:"zo_ma_di_wo_do_vr_za".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[vandaag om] LT",nextDay:"[morgen om] LT",nextWeek:"dddd [om] LT",lastDay:"[gisteren om] LT",lastWeek:"[afgelopen] dddd [om] LT",sameElse:"L"},relativeTime:{future:"over %s",past:"%s geleden",s:"een paar seconden",ss:"%d seconden",m:"\xe9\xe9n minuut",mm:"%d minuten",h:"\xe9\xe9n uur",hh:"%d uur",d:"\xe9\xe9n dag",dd:"%d dagen",M:"\xe9\xe9n maand",MM:"%d maanden",y:"\xe9\xe9n jaar",yy:"%d jaar"},dayOfMonthOrdinalParse:/\d{1,2}(ste|de)/,ordinal:function(T){return T+(1===T||8===T||T>=20?"ste":"de")},week:{dow:1,doy:4}})}(p(15439))},11758:function(qe,I,p){!function(o){"use strict";var e="jan._feb._mrt._apr._mei_jun._jul._aug._sep._okt._nov._dec.".split("_"),l="jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec".split("_"),D=[/^jan/i,/^feb/i,/^(maart|mrt\.?)$/i,/^apr/i,/^mei$/i,/^jun[i.]?$/i,/^jul[i.]?$/i,/^aug/i,/^sep/i,/^okt/i,/^nov/i,/^dec/i],g=/^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december|jan\.?|feb\.?|mrt\.?|apr\.?|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i;o.defineLocale("nl",{months:"januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december".split("_"),monthsShort:function(T,n){return T?/-MMM-/.test(n)?l[T.month()]:e[T.month()]:e},monthsRegex:g,monthsShortRegex:g,monthsStrictRegex:/^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december)/i,monthsShortStrictRegex:/^(jan\.?|feb\.?|mrt\.?|apr\.?|mei|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i,monthsParse:D,longMonthsParse:D,shortMonthsParse:D,weekdays:"zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag".split("_"),weekdaysShort:"zo._ma._di._wo._do._vr._za.".split("_"),weekdaysMin:"zo_ma_di_wo_do_vr_za".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD-MM-YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[vandaag om] LT",nextDay:"[morgen om] LT",nextWeek:"dddd [om] LT",lastDay:"[gisteren om] LT",lastWeek:"[afgelopen] dddd [om] LT",sameElse:"L"},relativeTime:{future:"over %s",past:"%s geleden",s:"een paar seconden",ss:"%d seconden",m:"\xe9\xe9n minuut",mm:"%d minuten",h:"\xe9\xe9n uur",hh:"%d uur",d:"\xe9\xe9n dag",dd:"%d dagen",w:"\xe9\xe9n week",ww:"%d weken",M:"\xe9\xe9n maand",MM:"%d maanden",y:"\xe9\xe9n jaar",yy:"%d jaar"},dayOfMonthOrdinalParse:/\d{1,2}(ste|de)/,ordinal:function(T){return T+(1===T||8===T||T>=20?"ste":"de")},week:{dow:1,doy:4}})}(p(15439))},41510:function(qe,I,p){!function(o){"use strict";o.defineLocale("nn",{months:"januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember".split("_"),monthsShort:"jan._feb._mars_apr._mai_juni_juli_aug._sep._okt._nov._des.".split("_"),monthsParseExact:!0,weekdays:"sundag_m\xe5ndag_tysdag_onsdag_torsdag_fredag_laurdag".split("_"),weekdaysShort:"su._m\xe5._ty._on._to._fr._lau.".split("_"),weekdaysMin:"su_m\xe5_ty_on_to_fr_la".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY [kl.] H:mm",LLLL:"dddd D. MMMM YYYY [kl.] HH:mm"},calendar:{sameDay:"[I dag klokka] LT",nextDay:"[I morgon klokka] LT",nextWeek:"dddd [klokka] LT",lastDay:"[I g\xe5r klokka] LT",lastWeek:"[F\xf8reg\xe5ande] dddd [klokka] LT",sameElse:"L"},relativeTime:{future:"om %s",past:"%s sidan",s:"nokre sekund",ss:"%d sekund",m:"eit minutt",mm:"%d minutt",h:"ein time",hh:"%d timar",d:"ein dag",dd:"%d dagar",w:"ei veke",ww:"%d veker",M:"ein m\xe5nad",MM:"%d m\xe5nader",y:"eit \xe5r",yy:"%d \xe5r"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(p(15439))},52797:function(qe,I,p){!function(o){"use strict";o.defineLocale("oc-lnc",{months:{standalone:"geni\xe8r_febri\xe8r_mar\xe7_abril_mai_junh_julhet_agost_setembre_oct\xf2bre_novembre_decembre".split("_"),format:"de geni\xe8r_de febri\xe8r_de mar\xe7_d'abril_de mai_de junh_de julhet_d'agost_de setembre_d'oct\xf2bre_de novembre_de decembre".split("_"),isFormat:/D[oD]?(\s)+MMMM/},monthsShort:"gen._febr._mar\xe7_abr._mai_junh_julh._ago._set._oct._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"dimenge_diluns_dimars_dim\xe8cres_dij\xf2us_divendres_dissabte".split("_"),weekdaysShort:"dg._dl._dm._dc._dj._dv._ds.".split("_"),weekdaysMin:"dg_dl_dm_dc_dj_dv_ds".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM [de] YYYY",ll:"D MMM YYYY",LLL:"D MMMM [de] YYYY [a] H:mm",lll:"D MMM YYYY, H:mm",LLLL:"dddd D MMMM [de] YYYY [a] H:mm",llll:"ddd D MMM YYYY, H:mm"},calendar:{sameDay:"[u\xe8i a] LT",nextDay:"[deman a] LT",nextWeek:"dddd [a] LT",lastDay:"[i\xe8r a] LT",lastWeek:"dddd [passat a] LT",sameElse:"L"},relativeTime:{future:"d'aqu\xed %s",past:"fa %s",s:"unas segondas",ss:"%d segondas",m:"una minuta",mm:"%d minutas",h:"una ora",hh:"%d oras",d:"un jorn",dd:"%d jorns",M:"un mes",MM:"%d meses",y:"un an",yy:"%d ans"},dayOfMonthOrdinalParse:/\d{1,2}(r|n|t|\xe8|a)/,ordinal:function(l,D){var g=1===l?"r":2===l?"n":3===l?"r":4===l?"t":"\xe8";return("w"===D||"W"===D)&&(g="a"),l+g},week:{dow:1,doy:4}})}(p(15439))},37944:function(qe,I,p){!function(o){"use strict";var e={1:"\u0a67",2:"\u0a68",3:"\u0a69",4:"\u0a6a",5:"\u0a6b",6:"\u0a6c",7:"\u0a6d",8:"\u0a6e",9:"\u0a6f",0:"\u0a66"},l={"\u0a67":"1","\u0a68":"2","\u0a69":"3","\u0a6a":"4","\u0a6b":"5","\u0a6c":"6","\u0a6d":"7","\u0a6e":"8","\u0a6f":"9","\u0a66":"0"};o.defineLocale("pa-in",{months:"\u0a1c\u0a28\u0a35\u0a30\u0a40_\u0a2b\u0a3c\u0a30\u0a35\u0a30\u0a40_\u0a2e\u0a3e\u0a30\u0a1a_\u0a05\u0a2a\u0a4d\u0a30\u0a48\u0a32_\u0a2e\u0a08_\u0a1c\u0a42\u0a28_\u0a1c\u0a41\u0a32\u0a3e\u0a08_\u0a05\u0a17\u0a38\u0a24_\u0a38\u0a24\u0a70\u0a2c\u0a30_\u0a05\u0a15\u0a24\u0a42\u0a2c\u0a30_\u0a28\u0a35\u0a70\u0a2c\u0a30_\u0a26\u0a38\u0a70\u0a2c\u0a30".split("_"),monthsShort:"\u0a1c\u0a28\u0a35\u0a30\u0a40_\u0a2b\u0a3c\u0a30\u0a35\u0a30\u0a40_\u0a2e\u0a3e\u0a30\u0a1a_\u0a05\u0a2a\u0a4d\u0a30\u0a48\u0a32_\u0a2e\u0a08_\u0a1c\u0a42\u0a28_\u0a1c\u0a41\u0a32\u0a3e\u0a08_\u0a05\u0a17\u0a38\u0a24_\u0a38\u0a24\u0a70\u0a2c\u0a30_\u0a05\u0a15\u0a24\u0a42\u0a2c\u0a30_\u0a28\u0a35\u0a70\u0a2c\u0a30_\u0a26\u0a38\u0a70\u0a2c\u0a30".split("_"),weekdays:"\u0a10\u0a24\u0a35\u0a3e\u0a30_\u0a38\u0a4b\u0a2e\u0a35\u0a3e\u0a30_\u0a2e\u0a70\u0a17\u0a32\u0a35\u0a3e\u0a30_\u0a2c\u0a41\u0a27\u0a35\u0a3e\u0a30_\u0a35\u0a40\u0a30\u0a35\u0a3e\u0a30_\u0a38\u0a3c\u0a41\u0a71\u0a15\u0a30\u0a35\u0a3e\u0a30_\u0a38\u0a3c\u0a28\u0a40\u0a1a\u0a30\u0a35\u0a3e\u0a30".split("_"),weekdaysShort:"\u0a10\u0a24_\u0a38\u0a4b\u0a2e_\u0a2e\u0a70\u0a17\u0a32_\u0a2c\u0a41\u0a27_\u0a35\u0a40\u0a30_\u0a38\u0a3c\u0a41\u0a15\u0a30_\u0a38\u0a3c\u0a28\u0a40".split("_"),weekdaysMin:"\u0a10\u0a24_\u0a38\u0a4b\u0a2e_\u0a2e\u0a70\u0a17\u0a32_\u0a2c\u0a41\u0a27_\u0a35\u0a40\u0a30_\u0a38\u0a3c\u0a41\u0a15\u0a30_\u0a38\u0a3c\u0a28\u0a40".split("_"),longDateFormat:{LT:"A h:mm \u0a35\u0a1c\u0a47",LTS:"A h:mm:ss \u0a35\u0a1c\u0a47",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm \u0a35\u0a1c\u0a47",LLLL:"dddd, D MMMM YYYY, A h:mm \u0a35\u0a1c\u0a47"},calendar:{sameDay:"[\u0a05\u0a1c] LT",nextDay:"[\u0a15\u0a32] LT",nextWeek:"[\u0a05\u0a17\u0a32\u0a3e] dddd, LT",lastDay:"[\u0a15\u0a32] LT",lastWeek:"[\u0a2a\u0a3f\u0a1b\u0a32\u0a47] dddd, LT",sameElse:"L"},relativeTime:{future:"%s \u0a35\u0a3f\u0a71\u0a1a",past:"%s \u0a2a\u0a3f\u0a1b\u0a32\u0a47",s:"\u0a15\u0a41\u0a1d \u0a38\u0a15\u0a3f\u0a70\u0a1f",ss:"%d \u0a38\u0a15\u0a3f\u0a70\u0a1f",m:"\u0a07\u0a15 \u0a2e\u0a3f\u0a70\u0a1f",mm:"%d \u0a2e\u0a3f\u0a70\u0a1f",h:"\u0a07\u0a71\u0a15 \u0a18\u0a70\u0a1f\u0a3e",hh:"%d \u0a18\u0a70\u0a1f\u0a47",d:"\u0a07\u0a71\u0a15 \u0a26\u0a3f\u0a28",dd:"%d \u0a26\u0a3f\u0a28",M:"\u0a07\u0a71\u0a15 \u0a2e\u0a39\u0a40\u0a28\u0a3e",MM:"%d \u0a2e\u0a39\u0a40\u0a28\u0a47",y:"\u0a07\u0a71\u0a15 \u0a38\u0a3e\u0a32",yy:"%d \u0a38\u0a3e\u0a32"},preparse:function(g){return g.replace(/[\u0a67\u0a68\u0a69\u0a6a\u0a6b\u0a6c\u0a6d\u0a6e\u0a6f\u0a66]/g,function(E){return l[E]})},postformat:function(g){return g.replace(/\d/g,function(E){return e[E]})},meridiemParse:/\u0a30\u0a3e\u0a24|\u0a38\u0a35\u0a47\u0a30|\u0a26\u0a41\u0a2a\u0a39\u0a3f\u0a30|\u0a38\u0a3c\u0a3e\u0a2e/,meridiemHour:function(g,E){return 12===g&&(g=0),"\u0a30\u0a3e\u0a24"===E?g<4?g:g+12:"\u0a38\u0a35\u0a47\u0a30"===E?g:"\u0a26\u0a41\u0a2a\u0a39\u0a3f\u0a30"===E?g>=10?g:g+12:"\u0a38\u0a3c\u0a3e\u0a2e"===E?g+12:void 0},meridiem:function(g,E,T){return g<4?"\u0a30\u0a3e\u0a24":g<10?"\u0a38\u0a35\u0a47\u0a30":g<17?"\u0a26\u0a41\u0a2a\u0a39\u0a3f\u0a30":g<20?"\u0a38\u0a3c\u0a3e\u0a2e":"\u0a30\u0a3e\u0a24"},week:{dow:0,doy:6}})}(p(15439))},1605:function(qe,I,p){!function(o){"use strict";var e="stycze\u0144_luty_marzec_kwiecie\u0144_maj_czerwiec_lipiec_sierpie\u0144_wrzesie\u0144_pa\u017adziernik_listopad_grudzie\u0144".split("_"),l="stycznia_lutego_marca_kwietnia_maja_czerwca_lipca_sierpnia_wrze\u015bnia_pa\u017adziernika_listopada_grudnia".split("_"),D=[/^sty/i,/^lut/i,/^mar/i,/^kwi/i,/^maj/i,/^cze/i,/^lip/i,/^sie/i,/^wrz/i,/^pa\u017a/i,/^lis/i,/^gru/i];function g(n){return n%10<5&&n%10>1&&~~(n/10)%10!=1}function E(n,P,w){var B=n+" ";switch(w){case"ss":return B+(g(n)?"sekundy":"sekund");case"m":return P?"minuta":"minut\u0119";case"mm":return B+(g(n)?"minuty":"minut");case"h":return P?"godzina":"godzin\u0119";case"hh":return B+(g(n)?"godziny":"godzin");case"ww":return B+(g(n)?"tygodnie":"tygodni");case"MM":return B+(g(n)?"miesi\u0105ce":"miesi\u0119cy");case"yy":return B+(g(n)?"lata":"lat")}}o.defineLocale("pl",{months:function(n,P){return n?/D MMMM/.test(P)?l[n.month()]:e[n.month()]:e},monthsShort:"sty_lut_mar_kwi_maj_cze_lip_sie_wrz_pa\u017a_lis_gru".split("_"),monthsParse:D,longMonthsParse:D,shortMonthsParse:D,weekdays:"niedziela_poniedzia\u0142ek_wtorek_\u015broda_czwartek_pi\u0105tek_sobota".split("_"),weekdaysShort:"ndz_pon_wt_\u015br_czw_pt_sob".split("_"),weekdaysMin:"Nd_Pn_Wt_\u015ar_Cz_Pt_So".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Dzi\u015b o] LT",nextDay:"[Jutro o] LT",nextWeek:function(){switch(this.day()){case 0:return"[W niedziel\u0119 o] LT";case 2:return"[We wtorek o] LT";case 3:return"[W \u015brod\u0119 o] LT";case 6:return"[W sobot\u0119 o] LT";default:return"[W] dddd [o] LT"}},lastDay:"[Wczoraj o] LT",lastWeek:function(){switch(this.day()){case 0:return"[W zesz\u0142\u0105 niedziel\u0119 o] LT";case 3:return"[W zesz\u0142\u0105 \u015brod\u0119 o] LT";case 6:return"[W zesz\u0142\u0105 sobot\u0119 o] LT";default:return"[W zesz\u0142y] dddd [o] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"%s temu",s:"kilka sekund",ss:E,m:E,mm:E,h:E,hh:E,d:"1 dzie\u0144",dd:"%d dni",w:"tydzie\u0144",ww:E,M:"miesi\u0105c",MM:E,y:"rok",yy:E},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(p(15439))},73840:function(qe,I,p){!function(o){"use strict";o.defineLocale("pt-br",{months:"janeiro_fevereiro_mar\xe7o_abril_maio_junho_julho_agosto_setembro_outubro_novembro_dezembro".split("_"),monthsShort:"jan_fev_mar_abr_mai_jun_jul_ago_set_out_nov_dez".split("_"),weekdays:"domingo_segunda-feira_ter\xe7a-feira_quarta-feira_quinta-feira_sexta-feira_s\xe1bado".split("_"),weekdaysShort:"dom_seg_ter_qua_qui_sex_s\xe1b".split("_"),weekdaysMin:"do_2\xaa_3\xaa_4\xaa_5\xaa_6\xaa_s\xe1".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY [\xe0s] HH:mm",LLLL:"dddd, D [de] MMMM [de] YYYY [\xe0s] HH:mm"},calendar:{sameDay:"[Hoje \xe0s] LT",nextDay:"[Amanh\xe3 \xe0s] LT",nextWeek:"dddd [\xe0s] LT",lastDay:"[Ontem \xe0s] LT",lastWeek:function(){return 0===this.day()||6===this.day()?"[\xdaltimo] dddd [\xe0s] LT":"[\xdaltima] dddd [\xe0s] LT"},sameElse:"L"},relativeTime:{future:"em %s",past:"h\xe1 %s",s:"poucos segundos",ss:"%d segundos",m:"um minuto",mm:"%d minutos",h:"uma hora",hh:"%d horas",d:"um dia",dd:"%d dias",M:"um m\xeas",MM:"%d meses",y:"um ano",yy:"%d anos"},dayOfMonthOrdinalParse:/\d{1,2}\xba/,ordinal:"%d\xba",invalidDate:"Data inv\xe1lida"})}(p(15439))},54225:function(qe,I,p){!function(o){"use strict";o.defineLocale("pt",{months:"janeiro_fevereiro_mar\xe7o_abril_maio_junho_julho_agosto_setembro_outubro_novembro_dezembro".split("_"),monthsShort:"jan_fev_mar_abr_mai_jun_jul_ago_set_out_nov_dez".split("_"),weekdays:"Domingo_Segunda-feira_Ter\xe7a-feira_Quarta-feira_Quinta-feira_Sexta-feira_S\xe1bado".split("_"),weekdaysShort:"Dom_Seg_Ter_Qua_Qui_Sex_S\xe1b".split("_"),weekdaysMin:"Do_2\xaa_3\xaa_4\xaa_5\xaa_6\xaa_S\xe1".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY HH:mm",LLLL:"dddd, D [de] MMMM [de] YYYY HH:mm"},calendar:{sameDay:"[Hoje \xe0s] LT",nextDay:"[Amanh\xe3 \xe0s] LT",nextWeek:"dddd [\xe0s] LT",lastDay:"[Ontem \xe0s] LT",lastWeek:function(){return 0===this.day()||6===this.day()?"[\xdaltimo] dddd [\xe0s] LT":"[\xdaltima] dddd [\xe0s] LT"},sameElse:"L"},relativeTime:{future:"em %s",past:"h\xe1 %s",s:"segundos",ss:"%d segundos",m:"um minuto",mm:"%d minutos",h:"uma hora",hh:"%d horas",d:"um dia",dd:"%d dias",w:"uma semana",ww:"%d semanas",M:"um m\xeas",MM:"%d meses",y:"um ano",yy:"%d anos"},dayOfMonthOrdinalParse:/\d{1,2}\xba/,ordinal:"%d\xba",week:{dow:1,doy:4}})}(p(15439))},45128:function(qe,I,p){!function(o){"use strict";function e(D,g,E){var n=" ";return(D%100>=20||D>=100&&D%100==0)&&(n=" de "),D+n+{ss:"secunde",mm:"minute",hh:"ore",dd:"zile",ww:"s\u0103pt\u0103m\xe2ni",MM:"luni",yy:"ani"}[E]}o.defineLocale("ro",{months:"ianuarie_februarie_martie_aprilie_mai_iunie_iulie_august_septembrie_octombrie_noiembrie_decembrie".split("_"),monthsShort:"ian._feb._mart._apr._mai_iun._iul._aug._sept._oct._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"duminic\u0103_luni_mar\u021bi_miercuri_joi_vineri_s\xe2mb\u0103t\u0103".split("_"),weekdaysShort:"Dum_Lun_Mar_Mie_Joi_Vin_S\xe2m".split("_"),weekdaysMin:"Du_Lu_Ma_Mi_Jo_Vi_S\xe2".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY H:mm",LLLL:"dddd, D MMMM YYYY H:mm"},calendar:{sameDay:"[azi la] LT",nextDay:"[m\xe2ine la] LT",nextWeek:"dddd [la] LT",lastDay:"[ieri la] LT",lastWeek:"[fosta] dddd [la] LT",sameElse:"L"},relativeTime:{future:"peste %s",past:"%s \xeen urm\u0103",s:"c\xe2teva secunde",ss:e,m:"un minut",mm:e,h:"o or\u0103",hh:e,d:"o zi",dd:e,w:"o s\u0103pt\u0103m\xe2n\u0103",ww:e,M:"o lun\u0103",MM:e,y:"un an",yy:e},week:{dow:1,doy:7}})}(p(15439))},35127:function(qe,I,p){!function(o){"use strict";function e(E,T){var n=E.split("_");return T%10==1&&T%100!=11?n[0]:T%10>=2&&T%10<=4&&(T%100<10||T%100>=20)?n[1]:n[2]}function l(E,T,n){return"m"===n?T?"\u043c\u0438\u043d\u0443\u0442\u0430":"\u043c\u0438\u043d\u0443\u0442\u0443":E+" "+e({ss:T?"\u0441\u0435\u043a\u0443\u043d\u0434\u0430_\u0441\u0435\u043a\u0443\u043d\u0434\u044b_\u0441\u0435\u043a\u0443\u043d\u0434":"\u0441\u0435\u043a\u0443\u043d\u0434\u0443_\u0441\u0435\u043a\u0443\u043d\u0434\u044b_\u0441\u0435\u043a\u0443\u043d\u0434",mm:T?"\u043c\u0438\u043d\u0443\u0442\u0430_\u043c\u0438\u043d\u0443\u0442\u044b_\u043c\u0438\u043d\u0443\u0442":"\u043c\u0438\u043d\u0443\u0442\u0443_\u043c\u0438\u043d\u0443\u0442\u044b_\u043c\u0438\u043d\u0443\u0442",hh:"\u0447\u0430\u0441_\u0447\u0430\u0441\u0430_\u0447\u0430\u0441\u043e\u0432",dd:"\u0434\u0435\u043d\u044c_\u0434\u043d\u044f_\u0434\u043d\u0435\u0439",ww:"\u043d\u0435\u0434\u0435\u043b\u044f_\u043d\u0435\u0434\u0435\u043b\u0438_\u043d\u0435\u0434\u0435\u043b\u044c",MM:"\u043c\u0435\u0441\u044f\u0446_\u043c\u0435\u0441\u044f\u0446\u0430_\u043c\u0435\u0441\u044f\u0446\u0435\u0432",yy:"\u0433\u043e\u0434_\u0433\u043e\u0434\u0430_\u043b\u0435\u0442"}[n],+E)}var D=[/^\u044f\u043d\u0432/i,/^\u0444\u0435\u0432/i,/^\u043c\u0430\u0440/i,/^\u0430\u043f\u0440/i,/^\u043c\u0430[\u0439\u044f]/i,/^\u0438\u044e\u043d/i,/^\u0438\u044e\u043b/i,/^\u0430\u0432\u0433/i,/^\u0441\u0435\u043d/i,/^\u043e\u043a\u0442/i,/^\u043d\u043e\u044f/i,/^\u0434\u0435\u043a/i];o.defineLocale("ru",{months:{format:"\u044f\u043d\u0432\u0430\u0440\u044f_\u0444\u0435\u0432\u0440\u0430\u043b\u044f_\u043c\u0430\u0440\u0442\u0430_\u0430\u043f\u0440\u0435\u043b\u044f_\u043c\u0430\u044f_\u0438\u044e\u043d\u044f_\u0438\u044e\u043b\u044f_\u0430\u0432\u0433\u0443\u0441\u0442\u0430_\u0441\u0435\u043d\u0442\u044f\u0431\u0440\u044f_\u043e\u043a\u0442\u044f\u0431\u0440\u044f_\u043d\u043e\u044f\u0431\u0440\u044f_\u0434\u0435\u043a\u0430\u0431\u0440\u044f".split("_"),standalone:"\u044f\u043d\u0432\u0430\u0440\u044c_\u0444\u0435\u0432\u0440\u0430\u043b\u044c_\u043c\u0430\u0440\u0442_\u0430\u043f\u0440\u0435\u043b\u044c_\u043c\u0430\u0439_\u0438\u044e\u043d\u044c_\u0438\u044e\u043b\u044c_\u0430\u0432\u0433\u0443\u0441\u0442_\u0441\u0435\u043d\u0442\u044f\u0431\u0440\u044c_\u043e\u043a\u0442\u044f\u0431\u0440\u044c_\u043d\u043e\u044f\u0431\u0440\u044c_\u0434\u0435\u043a\u0430\u0431\u0440\u044c".split("_")},monthsShort:{format:"\u044f\u043d\u0432._\u0444\u0435\u0432\u0440._\u043c\u0430\u0440._\u0430\u043f\u0440._\u043c\u0430\u044f_\u0438\u044e\u043d\u044f_\u0438\u044e\u043b\u044f_\u0430\u0432\u0433._\u0441\u0435\u043d\u0442._\u043e\u043a\u0442._\u043d\u043e\u044f\u0431._\u0434\u0435\u043a.".split("_"),standalone:"\u044f\u043d\u0432._\u0444\u0435\u0432\u0440._\u043c\u0430\u0440\u0442_\u0430\u043f\u0440._\u043c\u0430\u0439_\u0438\u044e\u043d\u044c_\u0438\u044e\u043b\u044c_\u0430\u0432\u0433._\u0441\u0435\u043d\u0442._\u043e\u043a\u0442._\u043d\u043e\u044f\u0431._\u0434\u0435\u043a.".split("_")},weekdays:{standalone:"\u0432\u043e\u0441\u043a\u0440\u0435\u0441\u0435\u043d\u044c\u0435_\u043f\u043e\u043d\u0435\u0434\u0435\u043b\u044c\u043d\u0438\u043a_\u0432\u0442\u043e\u0440\u043d\u0438\u043a_\u0441\u0440\u0435\u0434\u0430_\u0447\u0435\u0442\u0432\u0435\u0440\u0433_\u043f\u044f\u0442\u043d\u0438\u0446\u0430_\u0441\u0443\u0431\u0431\u043e\u0442\u0430".split("_"),format:"\u0432\u043e\u0441\u043a\u0440\u0435\u0441\u0435\u043d\u044c\u0435_\u043f\u043e\u043d\u0435\u0434\u0435\u043b\u044c\u043d\u0438\u043a_\u0432\u0442\u043e\u0440\u043d\u0438\u043a_\u0441\u0440\u0435\u0434\u0443_\u0447\u0435\u0442\u0432\u0435\u0440\u0433_\u043f\u044f\u0442\u043d\u0438\u0446\u0443_\u0441\u0443\u0431\u0431\u043e\u0442\u0443".split("_"),isFormat:/\[ ?[\u0412\u0432] ?(?:\u043f\u0440\u043e\u0448\u043b\u0443\u044e|\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e|\u044d\u0442\u0443)? ?] ?dddd/},weekdaysShort:"\u0432\u0441_\u043f\u043d_\u0432\u0442_\u0441\u0440_\u0447\u0442_\u043f\u0442_\u0441\u0431".split("_"),weekdaysMin:"\u0432\u0441_\u043f\u043d_\u0432\u0442_\u0441\u0440_\u0447\u0442_\u043f\u0442_\u0441\u0431".split("_"),monthsParse:D,longMonthsParse:D,shortMonthsParse:D,monthsRegex:/^(\u044f\u043d\u0432\u0430\u0440[\u044c\u044f]|\u044f\u043d\u0432\.?|\u0444\u0435\u0432\u0440\u0430\u043b[\u044c\u044f]|\u0444\u0435\u0432\u0440?\.?|\u043c\u0430\u0440\u0442\u0430?|\u043c\u0430\u0440\.?|\u0430\u043f\u0440\u0435\u043b[\u044c\u044f]|\u0430\u043f\u0440\.?|\u043c\u0430[\u0439\u044f]|\u0438\u044e\u043d[\u044c\u044f]|\u0438\u044e\u043d\.?|\u0438\u044e\u043b[\u044c\u044f]|\u0438\u044e\u043b\.?|\u0430\u0432\u0433\u0443\u0441\u0442\u0430?|\u0430\u0432\u0433\.?|\u0441\u0435\u043d\u0442\u044f\u0431\u0440[\u044c\u044f]|\u0441\u0435\u043d\u0442?\.?|\u043e\u043a\u0442\u044f\u0431\u0440[\u044c\u044f]|\u043e\u043a\u0442\.?|\u043d\u043e\u044f\u0431\u0440[\u044c\u044f]|\u043d\u043e\u044f\u0431?\.?|\u0434\u0435\u043a\u0430\u0431\u0440[\u044c\u044f]|\u0434\u0435\u043a\.?)/i,monthsShortRegex:/^(\u044f\u043d\u0432\u0430\u0440[\u044c\u044f]|\u044f\u043d\u0432\.?|\u0444\u0435\u0432\u0440\u0430\u043b[\u044c\u044f]|\u0444\u0435\u0432\u0440?\.?|\u043c\u0430\u0440\u0442\u0430?|\u043c\u0430\u0440\.?|\u0430\u043f\u0440\u0435\u043b[\u044c\u044f]|\u0430\u043f\u0440\.?|\u043c\u0430[\u0439\u044f]|\u0438\u044e\u043d[\u044c\u044f]|\u0438\u044e\u043d\.?|\u0438\u044e\u043b[\u044c\u044f]|\u0438\u044e\u043b\.?|\u0430\u0432\u0433\u0443\u0441\u0442\u0430?|\u0430\u0432\u0433\.?|\u0441\u0435\u043d\u0442\u044f\u0431\u0440[\u044c\u044f]|\u0441\u0435\u043d\u0442?\.?|\u043e\u043a\u0442\u044f\u0431\u0440[\u044c\u044f]|\u043e\u043a\u0442\.?|\u043d\u043e\u044f\u0431\u0440[\u044c\u044f]|\u043d\u043e\u044f\u0431?\.?|\u0434\u0435\u043a\u0430\u0431\u0440[\u044c\u044f]|\u0434\u0435\u043a\.?)/i,monthsStrictRegex:/^(\u044f\u043d\u0432\u0430\u0440[\u044f\u044c]|\u0444\u0435\u0432\u0440\u0430\u043b[\u044f\u044c]|\u043c\u0430\u0440\u0442\u0430?|\u0430\u043f\u0440\u0435\u043b[\u044f\u044c]|\u043c\u0430[\u044f\u0439]|\u0438\u044e\u043d[\u044f\u044c]|\u0438\u044e\u043b[\u044f\u044c]|\u0430\u0432\u0433\u0443\u0441\u0442\u0430?|\u0441\u0435\u043d\u0442\u044f\u0431\u0440[\u044f\u044c]|\u043e\u043a\u0442\u044f\u0431\u0440[\u044f\u044c]|\u043d\u043e\u044f\u0431\u0440[\u044f\u044c]|\u0434\u0435\u043a\u0430\u0431\u0440[\u044f\u044c])/i,monthsShortStrictRegex:/^(\u044f\u043d\u0432\.|\u0444\u0435\u0432\u0440?\.|\u043c\u0430\u0440[\u0442.]|\u0430\u043f\u0440\.|\u043c\u0430[\u044f\u0439]|\u0438\u044e\u043d[\u044c\u044f.]|\u0438\u044e\u043b[\u044c\u044f.]|\u0430\u0432\u0433\.|\u0441\u0435\u043d\u0442?\.|\u043e\u043a\u0442\.|\u043d\u043e\u044f\u0431?\.|\u0434\u0435\u043a\.)/i,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY \u0433.",LLL:"D MMMM YYYY \u0433., H:mm",LLLL:"dddd, D MMMM YYYY \u0433., H:mm"},calendar:{sameDay:"[\u0421\u0435\u0433\u043e\u0434\u043d\u044f, \u0432] LT",nextDay:"[\u0417\u0430\u0432\u0442\u0440\u0430, \u0432] LT",lastDay:"[\u0412\u0447\u0435\u0440\u0430, \u0432] LT",nextWeek:function(E){if(E.week()===this.week())return 2===this.day()?"[\u0412\u043e] dddd, [\u0432] LT":"[\u0412] dddd, [\u0432] LT";switch(this.day()){case 0:return"[\u0412 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435] dddd, [\u0432] LT";case 1:case 2:case 4:return"[\u0412 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439] dddd, [\u0432] LT";case 3:case 5:case 6:return"[\u0412 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e] dddd, [\u0432] LT"}},lastWeek:function(E){if(E.week()===this.week())return 2===this.day()?"[\u0412\u043e] dddd, [\u0432] LT":"[\u0412] dddd, [\u0432] LT";switch(this.day()){case 0:return"[\u0412 \u043f\u0440\u043e\u0448\u043b\u043e\u0435] dddd, [\u0432] LT";case 1:case 2:case 4:return"[\u0412 \u043f\u0440\u043e\u0448\u043b\u044b\u0439] dddd, [\u0432] LT";case 3:case 5:case 6:return"[\u0412 \u043f\u0440\u043e\u0448\u043b\u0443\u044e] dddd, [\u0432] LT"}},sameElse:"L"},relativeTime:{future:"\u0447\u0435\u0440\u0435\u0437 %s",past:"%s \u043d\u0430\u0437\u0430\u0434",s:"\u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u0435\u043a\u0443\u043d\u0434",ss:l,m:l,mm:l,h:"\u0447\u0430\u0441",hh:l,d:"\u0434\u0435\u043d\u044c",dd:l,w:"\u043d\u0435\u0434\u0435\u043b\u044f",ww:l,M:"\u043c\u0435\u0441\u044f\u0446",MM:l,y:"\u0433\u043e\u0434",yy:l},meridiemParse:/\u043d\u043e\u0447\u0438|\u0443\u0442\u0440\u0430|\u0434\u043d\u044f|\u0432\u0435\u0447\u0435\u0440\u0430/i,isPM:function(E){return/^(\u0434\u043d\u044f|\u0432\u0435\u0447\u0435\u0440\u0430)$/.test(E)},meridiem:function(E,T,n){return E<4?"\u043d\u043e\u0447\u0438":E<12?"\u0443\u0442\u0440\u0430":E<17?"\u0434\u043d\u044f":"\u0432\u0435\u0447\u0435\u0440\u0430"},dayOfMonthOrdinalParse:/\d{1,2}-(\u0439|\u0433\u043e|\u044f)/,ordinal:function(E,T){switch(T){case"M":case"d":case"DDD":return E+"-\u0439";case"D":return E+"-\u0433\u043e";case"w":case"W":return E+"-\u044f";default:return E}},week:{dow:1,doy:4}})}(p(15439))},32525:function(qe,I,p){!function(o){"use strict";var e=["\u062c\u0646\u0648\u0631\u064a","\u0641\u064a\u0628\u0631\u0648\u0631\u064a","\u0645\u0627\u0631\u0686","\u0627\u067e\u0631\u064a\u0644","\u0645\u0626\u064a","\u062c\u0648\u0646","\u062c\u0648\u0644\u0627\u0621\u0650","\u0622\u06af\u0633\u067d","\u0633\u064a\u067e\u067d\u0645\u0628\u0631","\u0622\u06aa\u067d\u0648\u0628\u0631","\u0646\u0648\u0645\u0628\u0631","\u068a\u0633\u0645\u0628\u0631"],l=["\u0622\u0686\u0631","\u0633\u0648\u0645\u0631","\u0627\u06b1\u0627\u0631\u0648","\u0627\u0631\u0628\u0639","\u062e\u0645\u064a\u0633","\u062c\u0645\u0639","\u0687\u0646\u0687\u0631"];o.defineLocale("sd",{months:e,monthsShort:e,weekdays:l,weekdaysShort:l,weekdaysMin:l,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd\u060c D MMMM YYYY HH:mm"},meridiemParse:/\u0635\u0628\u062d|\u0634\u0627\u0645/,isPM:function(g){return"\u0634\u0627\u0645"===g},meridiem:function(g,E,T){return g<12?"\u0635\u0628\u062d":"\u0634\u0627\u0645"},calendar:{sameDay:"[\u0627\u0684] LT",nextDay:"[\u0633\u0680\u0627\u06bb\u064a] LT",nextWeek:"dddd [\u0627\u06b3\u064a\u0646 \u0647\u0641\u062a\u064a \u062a\u064a] LT",lastDay:"[\u06aa\u0627\u0644\u0647\u0647] LT",lastWeek:"[\u06af\u0632\u0631\u064a\u0644 \u0647\u0641\u062a\u064a] dddd [\u062a\u064a] LT",sameElse:"L"},relativeTime:{future:"%s \u067e\u0648\u0621",past:"%s \u0627\u06b3",s:"\u0686\u0646\u062f \u0633\u064a\u06aa\u0646\u068a",ss:"%d \u0633\u064a\u06aa\u0646\u068a",m:"\u0647\u06aa \u0645\u0646\u067d",mm:"%d \u0645\u0646\u067d",h:"\u0647\u06aa \u06aa\u0644\u0627\u06aa",hh:"%d \u06aa\u0644\u0627\u06aa",d:"\u0647\u06aa \u068f\u064a\u0646\u0647\u0646",dd:"%d \u068f\u064a\u0646\u0647\u0646",M:"\u0647\u06aa \u0645\u0647\u064a\u0646\u0648",MM:"%d \u0645\u0647\u064a\u0646\u0627",y:"\u0647\u06aa \u0633\u0627\u0644",yy:"%d \u0633\u0627\u0644"},preparse:function(g){return g.replace(/\u060c/g,",")},postformat:function(g){return g.replace(/,/g,"\u060c")},week:{dow:1,doy:4}})}(p(15439))},59893:function(qe,I,p){!function(o){"use strict";o.defineLocale("se",{months:"o\u0111\u0111ajagem\xe1nnu_guovvam\xe1nnu_njuk\u010dam\xe1nnu_cuo\u014bom\xe1nnu_miessem\xe1nnu_geassem\xe1nnu_suoidnem\xe1nnu_borgem\xe1nnu_\u010dak\u010dam\xe1nnu_golggotm\xe1nnu_sk\xe1bmam\xe1nnu_juovlam\xe1nnu".split("_"),monthsShort:"o\u0111\u0111j_guov_njuk_cuo_mies_geas_suoi_borg_\u010dak\u010d_golg_sk\xe1b_juov".split("_"),weekdays:"sotnabeaivi_vuoss\xe1rga_ma\u014b\u014beb\xe1rga_gaskavahkku_duorastat_bearjadat_l\xe1vvardat".split("_"),weekdaysShort:"sotn_vuos_ma\u014b_gask_duor_bear_l\xe1v".split("_"),weekdaysMin:"s_v_m_g_d_b_L".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"MMMM D. [b.] YYYY",LLL:"MMMM D. [b.] YYYY [ti.] HH:mm",LLLL:"dddd, MMMM D. [b.] YYYY [ti.] HH:mm"},calendar:{sameDay:"[otne ti] LT",nextDay:"[ihttin ti] LT",nextWeek:"dddd [ti] LT",lastDay:"[ikte ti] LT",lastWeek:"[ovddit] dddd [ti] LT",sameElse:"L"},relativeTime:{future:"%s gea\u017ees",past:"ma\u014bit %s",s:"moadde sekunddat",ss:"%d sekunddat",m:"okta minuhta",mm:"%d minuhtat",h:"okta diimmu",hh:"%d diimmut",d:"okta beaivi",dd:"%d beaivvit",M:"okta m\xe1nnu",MM:"%d m\xe1nut",y:"okta jahki",yy:"%d jagit"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(p(15439))},33123:function(qe,I,p){!function(o){"use strict";o.defineLocale("si",{months:"\u0da2\u0db1\u0dc0\u0dcf\u0dbb\u0dd2_\u0db4\u0dd9\u0db6\u0dbb\u0dc0\u0dcf\u0dbb\u0dd2_\u0db8\u0dcf\u0dbb\u0dca\u0dad\u0dd4_\u0d85\u0db4\u0dca\u200d\u0dbb\u0dda\u0dbd\u0dca_\u0db8\u0dd0\u0dba\u0dd2_\u0da2\u0dd6\u0db1\u0dd2_\u0da2\u0dd6\u0dbd\u0dd2_\u0d85\u0d9c\u0ddd\u0dc3\u0dca\u0dad\u0dd4_\u0dc3\u0dd0\u0db4\u0dca\u0dad\u0dd0\u0db8\u0dca\u0db6\u0dbb\u0dca_\u0d94\u0d9a\u0dca\u0dad\u0ddd\u0db6\u0dbb\u0dca_\u0db1\u0ddc\u0dc0\u0dd0\u0db8\u0dca\u0db6\u0dbb\u0dca_\u0daf\u0dd9\u0dc3\u0dd0\u0db8\u0dca\u0db6\u0dbb\u0dca".split("_"),monthsShort:"\u0da2\u0db1_\u0db4\u0dd9\u0db6_\u0db8\u0dcf\u0dbb\u0dca_\u0d85\u0db4\u0dca_\u0db8\u0dd0\u0dba\u0dd2_\u0da2\u0dd6\u0db1\u0dd2_\u0da2\u0dd6\u0dbd\u0dd2_\u0d85\u0d9c\u0ddd_\u0dc3\u0dd0\u0db4\u0dca_\u0d94\u0d9a\u0dca_\u0db1\u0ddc\u0dc0\u0dd0_\u0daf\u0dd9\u0dc3\u0dd0".split("_"),weekdays:"\u0d89\u0dbb\u0dd2\u0daf\u0dcf_\u0dc3\u0db3\u0dd4\u0daf\u0dcf_\u0d85\u0d9f\u0dc4\u0dbb\u0dd4\u0dc0\u0dcf\u0daf\u0dcf_\u0db6\u0daf\u0dcf\u0daf\u0dcf_\u0db6\u0dca\u200d\u0dbb\u0dc4\u0dc3\u0dca\u0db4\u0dad\u0dd2\u0db1\u0dca\u0daf\u0dcf_\u0dc3\u0dd2\u0d9a\u0dd4\u0dbb\u0dcf\u0daf\u0dcf_\u0dc3\u0dd9\u0db1\u0dc3\u0dd4\u0dbb\u0dcf\u0daf\u0dcf".split("_"),weekdaysShort:"\u0d89\u0dbb\u0dd2_\u0dc3\u0db3\u0dd4_\u0d85\u0d9f_\u0db6\u0daf\u0dcf_\u0db6\u0dca\u200d\u0dbb\u0dc4_\u0dc3\u0dd2\u0d9a\u0dd4_\u0dc3\u0dd9\u0db1".split("_"),weekdaysMin:"\u0d89_\u0dc3_\u0d85_\u0db6_\u0db6\u0dca\u200d\u0dbb_\u0dc3\u0dd2_\u0dc3\u0dd9".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"a h:mm",LTS:"a h:mm:ss",L:"YYYY/MM/DD",LL:"YYYY MMMM D",LLL:"YYYY MMMM D, a h:mm",LLLL:"YYYY MMMM D [\u0dc0\u0dd0\u0db1\u0dd2] dddd, a h:mm:ss"},calendar:{sameDay:"[\u0d85\u0daf] LT[\u0da7]",nextDay:"[\u0dc4\u0dd9\u0da7] LT[\u0da7]",nextWeek:"dddd LT[\u0da7]",lastDay:"[\u0d8a\u0dba\u0dda] LT[\u0da7]",lastWeek:"[\u0db4\u0dc3\u0dd4\u0d9c\u0dd2\u0dba] dddd LT[\u0da7]",sameElse:"L"},relativeTime:{future:"%s\u0d9a\u0dd2\u0db1\u0dca",past:"%s\u0d9a\u0da7 \u0db4\u0dd9\u0dbb",s:"\u0dad\u0dad\u0dca\u0db4\u0dbb \u0d9a\u0dd2\u0dc4\u0dd2\u0db4\u0dba",ss:"\u0dad\u0dad\u0dca\u0db4\u0dbb %d",m:"\u0db8\u0dd2\u0db1\u0dd2\u0dad\u0dca\u0dad\u0dd4\u0dc0",mm:"\u0db8\u0dd2\u0db1\u0dd2\u0dad\u0dca\u0dad\u0dd4 %d",h:"\u0db4\u0dd0\u0dba",hh:"\u0db4\u0dd0\u0dba %d",d:"\u0daf\u0dd2\u0db1\u0dba",dd:"\u0daf\u0dd2\u0db1 %d",M:"\u0db8\u0dcf\u0dc3\u0dba",MM:"\u0db8\u0dcf\u0dc3 %d",y:"\u0dc0\u0dc3\u0dbb",yy:"\u0dc0\u0dc3\u0dbb %d"},dayOfMonthOrdinalParse:/\d{1,2} \u0dc0\u0dd0\u0db1\u0dd2/,ordinal:function(l){return l+" \u0dc0\u0dd0\u0db1\u0dd2"},meridiemParse:/\u0db4\u0dd9\u0dbb \u0dc0\u0dbb\u0dd4|\u0db4\u0dc3\u0dca \u0dc0\u0dbb\u0dd4|\u0db4\u0dd9.\u0dc0|\u0db4.\u0dc0./,isPM:function(l){return"\u0db4.\u0dc0."===l||"\u0db4\u0dc3\u0dca \u0dc0\u0dbb\u0dd4"===l},meridiem:function(l,D,g){return l>11?g?"\u0db4.\u0dc0.":"\u0db4\u0dc3\u0dca \u0dc0\u0dbb\u0dd4":g?"\u0db4\u0dd9.\u0dc0.":"\u0db4\u0dd9\u0dbb \u0dc0\u0dbb\u0dd4"}})}(p(15439))},59635:function(qe,I,p){!function(o){"use strict";var e="janu\xe1r_febru\xe1r_marec_apr\xedl_m\xe1j_j\xfan_j\xfal_august_september_okt\xf3ber_november_december".split("_"),l="jan_feb_mar_apr_m\xe1j_j\xfan_j\xfal_aug_sep_okt_nov_dec".split("_");function D(T){return T>1&&T<5}function g(T,n,P,w){var B=T+" ";switch(P){case"s":return n||w?"p\xe1r sek\xfand":"p\xe1r sekundami";case"ss":return n||w?B+(D(T)?"sekundy":"sek\xfand"):B+"sekundami";case"m":return n?"min\xfata":w?"min\xfatu":"min\xfatou";case"mm":return n||w?B+(D(T)?"min\xfaty":"min\xfat"):B+"min\xfatami";case"h":return n?"hodina":w?"hodinu":"hodinou";case"hh":return n||w?B+(D(T)?"hodiny":"hod\xedn"):B+"hodinami";case"d":return n||w?"de\u0148":"d\u0148om";case"dd":return n||w?B+(D(T)?"dni":"dn\xed"):B+"d\u0148ami";case"M":return n||w?"mesiac":"mesiacom";case"MM":return n||w?B+(D(T)?"mesiace":"mesiacov"):B+"mesiacmi";case"y":return n||w?"rok":"rokom";case"yy":return n||w?B+(D(T)?"roky":"rokov"):B+"rokmi"}}o.defineLocale("sk",{months:e,monthsShort:l,weekdays:"nede\u013ea_pondelok_utorok_streda_\u0161tvrtok_piatok_sobota".split("_"),weekdaysShort:"ne_po_ut_st_\u0161t_pi_so".split("_"),weekdaysMin:"ne_po_ut_st_\u0161t_pi_so".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd D. MMMM YYYY H:mm"},calendar:{sameDay:"[dnes o] LT",nextDay:"[zajtra o] LT",nextWeek:function(){switch(this.day()){case 0:return"[v nede\u013eu o] LT";case 1:case 2:return"[v] dddd [o] LT";case 3:return"[v stredu o] LT";case 4:return"[vo \u0161tvrtok o] LT";case 5:return"[v piatok o] LT";case 6:return"[v sobotu o] LT"}},lastDay:"[v\u010dera o] LT",lastWeek:function(){switch(this.day()){case 0:return"[minul\xfa nede\u013eu o] LT";case 1:case 2:case 4:case 5:return"[minul\xfd] dddd [o] LT";case 3:return"[minul\xfa stredu o] LT";case 6:return"[minul\xfa sobotu o] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"pred %s",s:g,ss:g,m:g,mm:g,h:g,hh:g,d:g,dd:g,M:g,MM:g,y:g,yy:g},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(p(15439))},78106:function(qe,I,p){!function(o){"use strict";function e(D,g,E,T){var n=D+" ";switch(E){case"s":return g||T?"nekaj sekund":"nekaj sekundami";case"ss":return n+=1===D?g?"sekundo":"sekundi":2===D?g||T?"sekundi":"sekundah":D<5?g||T?"sekunde":"sekundah":"sekund";case"m":return g?"ena minuta":"eno minuto";case"mm":return n+=1===D?g?"minuta":"minuto":2===D?g||T?"minuti":"minutama":D<5?g||T?"minute":"minutami":g||T?"minut":"minutami";case"h":return g?"ena ura":"eno uro";case"hh":return n+=1===D?g?"ura":"uro":2===D?g||T?"uri":"urama":D<5?g||T?"ure":"urami":g||T?"ur":"urami";case"d":return g||T?"en dan":"enim dnem";case"dd":return n+=1===D?g||T?"dan":"dnem":2===D?g||T?"dni":"dnevoma":g||T?"dni":"dnevi";case"M":return g||T?"en mesec":"enim mesecem";case"MM":return n+=1===D?g||T?"mesec":"mesecem":2===D?g||T?"meseca":"mesecema":D<5?g||T?"mesece":"meseci":g||T?"mesecev":"meseci";case"y":return g||T?"eno leto":"enim letom";case"yy":return n+=1===D?g||T?"leto":"letom":2===D?g||T?"leti":"letoma":D<5?g||T?"leta":"leti":g||T?"let":"leti"}}o.defineLocale("sl",{months:"januar_februar_marec_april_maj_junij_julij_avgust_september_oktober_november_december".split("_"),monthsShort:"jan._feb._mar._apr._maj._jun._jul._avg._sep._okt._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"nedelja_ponedeljek_torek_sreda_\u010detrtek_petek_sobota".split("_"),weekdaysShort:"ned._pon._tor._sre._\u010det._pet._sob.".split("_"),weekdaysMin:"ne_po_to_sr_\u010de_pe_so".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD. MM. YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd, D. MMMM YYYY H:mm"},calendar:{sameDay:"[danes ob] LT",nextDay:"[jutri ob] LT",nextWeek:function(){switch(this.day()){case 0:return"[v] [nedeljo] [ob] LT";case 3:return"[v] [sredo] [ob] LT";case 6:return"[v] [soboto] [ob] LT";case 1:case 2:case 4:case 5:return"[v] dddd [ob] LT"}},lastDay:"[v\u010deraj ob] LT",lastWeek:function(){switch(this.day()){case 0:return"[prej\u0161njo] [nedeljo] [ob] LT";case 3:return"[prej\u0161njo] [sredo] [ob] LT";case 6:return"[prej\u0161njo] [soboto] [ob] LT";case 1:case 2:case 4:case 5:return"[prej\u0161nji] dddd [ob] LT"}},sameElse:"L"},relativeTime:{future:"\u010dez %s",past:"pred %s",s:e,ss:e,m:e,mm:e,h:e,hh:e,d:e,dd:e,M:e,MM:e,y:e,yy:e},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}})}(p(15439))},88799:function(qe,I,p){!function(o){"use strict";o.defineLocale("sq",{months:"Janar_Shkurt_Mars_Prill_Maj_Qershor_Korrik_Gusht_Shtator_Tetor_N\xebntor_Dhjetor".split("_"),monthsShort:"Jan_Shk_Mar_Pri_Maj_Qer_Kor_Gus_Sht_Tet_N\xebn_Dhj".split("_"),weekdays:"E Diel_E H\xebn\xeb_E Mart\xeb_E M\xebrkur\xeb_E Enjte_E Premte_E Shtun\xeb".split("_"),weekdaysShort:"Die_H\xebn_Mar_M\xebr_Enj_Pre_Sht".split("_"),weekdaysMin:"D_H_Ma_M\xeb_E_P_Sh".split("_"),weekdaysParseExact:!0,meridiemParse:/PD|MD/,isPM:function(l){return"M"===l.charAt(0)},meridiem:function(l,D,g){return l<12?"PD":"MD"},longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Sot n\xeb] LT",nextDay:"[Nes\xebr n\xeb] LT",nextWeek:"dddd [n\xeb] LT",lastDay:"[Dje n\xeb] LT",lastWeek:"dddd [e kaluar n\xeb] LT",sameElse:"L"},relativeTime:{future:"n\xeb %s",past:"%s m\xeb par\xeb",s:"disa sekonda",ss:"%d sekonda",m:"nj\xeb minut\xeb",mm:"%d minuta",h:"nj\xeb or\xeb",hh:"%d or\xeb",d:"nj\xeb dit\xeb",dd:"%d dit\xeb",M:"nj\xeb muaj",MM:"%d muaj",y:"nj\xeb vit",yy:"%d vite"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(p(15439))},52872:function(qe,I,p){!function(o){"use strict";var e={words:{ss:["\u0441\u0435\u043a\u0443\u043d\u0434\u0430","\u0441\u0435\u043a\u0443\u043d\u0434\u0435","\u0441\u0435\u043a\u0443\u043d\u0434\u0438"],m:["\u0458\u0435\u0434\u0430\u043d \u043c\u0438\u043d\u0443\u0442","\u0458\u0435\u0434\u043d\u043e\u0433 \u043c\u0438\u043d\u0443\u0442\u0430"],mm:["\u043c\u0438\u043d\u0443\u0442","\u043c\u0438\u043d\u0443\u0442\u0430","\u043c\u0438\u043d\u0443\u0442\u0430"],h:["\u0458\u0435\u0434\u0430\u043d \u0441\u0430\u0442","\u0458\u0435\u0434\u043d\u043e\u0433 \u0441\u0430\u0442\u0430"],hh:["\u0441\u0430\u0442","\u0441\u0430\u0442\u0430","\u0441\u0430\u0442\u0438"],d:["\u0458\u0435\u0434\u0430\u043d \u0434\u0430\u043d","\u0458\u0435\u0434\u043d\u043e\u0433 \u0434\u0430\u043d\u0430"],dd:["\u0434\u0430\u043d","\u0434\u0430\u043d\u0430","\u0434\u0430\u043d\u0430"],M:["\u0458\u0435\u0434\u0430\u043d \u043c\u0435\u0441\u0435\u0446","\u0458\u0435\u0434\u043d\u043e\u0433 \u043c\u0435\u0441\u0435\u0446\u0430"],MM:["\u043c\u0435\u0441\u0435\u0446","\u043c\u0435\u0441\u0435\u0446\u0430","\u043c\u0435\u0441\u0435\u0446\u0438"],y:["\u0458\u0435\u0434\u043d\u0443 \u0433\u043e\u0434\u0438\u043d\u0443","\u0458\u0435\u0434\u043d\u0435 \u0433\u043e\u0434\u0438\u043d\u0435"],yy:["\u0433\u043e\u0434\u0438\u043d\u0443","\u0433\u043e\u0434\u0438\u043d\u0435","\u0433\u043e\u0434\u0438\u043d\u0430"]},correctGrammaticalCase:function(D,g){return D%10>=1&&D%10<=4&&(D%100<10||D%100>=20)?D%10==1?g[0]:g[1]:g[2]},translate:function(D,g,E,T){var P,n=e.words[E];return 1===E.length?"y"===E&&g?"\u0458\u0435\u0434\u043d\u0430 \u0433\u043e\u0434\u0438\u043d\u0430":T||g?n[0]:n[1]:(P=e.correctGrammaticalCase(D,n),"yy"===E&&g&&"\u0433\u043e\u0434\u0438\u043d\u0443"===P?D+" \u0433\u043e\u0434\u0438\u043d\u0430":D+" "+P)}};o.defineLocale("sr-cyrl",{months:"\u0458\u0430\u043d\u0443\u0430\u0440_\u0444\u0435\u0431\u0440\u0443\u0430\u0440_\u043c\u0430\u0440\u0442_\u0430\u043f\u0440\u0438\u043b_\u043c\u0430\u0458_\u0458\u0443\u043d_\u0458\u0443\u043b_\u0430\u0432\u0433\u0443\u0441\u0442_\u0441\u0435\u043f\u0442\u0435\u043c\u0431\u0430\u0440_\u043e\u043a\u0442\u043e\u0431\u0430\u0440_\u043d\u043e\u0432\u0435\u043c\u0431\u0430\u0440_\u0434\u0435\u0446\u0435\u043c\u0431\u0430\u0440".split("_"),monthsShort:"\u0458\u0430\u043d._\u0444\u0435\u0431._\u043c\u0430\u0440._\u0430\u043f\u0440._\u043c\u0430\u0458_\u0458\u0443\u043d_\u0458\u0443\u043b_\u0430\u0432\u0433._\u0441\u0435\u043f._\u043e\u043a\u0442._\u043d\u043e\u0432._\u0434\u0435\u0446.".split("_"),monthsParseExact:!0,weekdays:"\u043d\u0435\u0434\u0435\u0459\u0430_\u043f\u043e\u043d\u0435\u0434\u0435\u0459\u0430\u043a_\u0443\u0442\u043e\u0440\u0430\u043a_\u0441\u0440\u0435\u0434\u0430_\u0447\u0435\u0442\u0432\u0440\u0442\u0430\u043a_\u043f\u0435\u0442\u0430\u043a_\u0441\u0443\u0431\u043e\u0442\u0430".split("_"),weekdaysShort:"\u043d\u0435\u0434._\u043f\u043e\u043d._\u0443\u0442\u043e._\u0441\u0440\u0435._\u0447\u0435\u0442._\u043f\u0435\u0442._\u0441\u0443\u0431.".split("_"),weekdaysMin:"\u043d\u0435_\u043f\u043e_\u0443\u0442_\u0441\u0440_\u0447\u0435_\u043f\u0435_\u0441\u0443".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"D. M. YYYY.",LL:"D. MMMM YYYY.",LLL:"D. MMMM YYYY. H:mm",LLLL:"dddd, D. MMMM YYYY. H:mm"},calendar:{sameDay:"[\u0434\u0430\u043d\u0430\u0441 \u0443] LT",nextDay:"[\u0441\u0443\u0442\u0440\u0430 \u0443] LT",nextWeek:function(){switch(this.day()){case 0:return"[\u0443] [\u043d\u0435\u0434\u0435\u0459\u0443] [\u0443] LT";case 3:return"[\u0443] [\u0441\u0440\u0435\u0434\u0443] [\u0443] LT";case 6:return"[\u0443] [\u0441\u0443\u0431\u043e\u0442\u0443] [\u0443] LT";case 1:case 2:case 4:case 5:return"[\u0443] dddd [\u0443] LT"}},lastDay:"[\u0458\u0443\u0447\u0435 \u0443] LT",lastWeek:function(){return["[\u043f\u0440\u043e\u0448\u043b\u0435] [\u043d\u0435\u0434\u0435\u0459\u0435] [\u0443] LT","[\u043f\u0440\u043e\u0448\u043b\u043e\u0433] [\u043f\u043e\u043d\u0435\u0434\u0435\u0459\u043a\u0430] [\u0443] LT","[\u043f\u0440\u043e\u0448\u043b\u043e\u0433] [\u0443\u0442\u043e\u0440\u043a\u0430] [\u0443] LT","[\u043f\u0440\u043e\u0448\u043b\u0435] [\u0441\u0440\u0435\u0434\u0435] [\u0443] LT","[\u043f\u0440\u043e\u0448\u043b\u043e\u0433] [\u0447\u0435\u0442\u0432\u0440\u0442\u043a\u0430] [\u0443] LT","[\u043f\u0440\u043e\u0448\u043b\u043e\u0433] [\u043f\u0435\u0442\u043a\u0430] [\u0443] LT","[\u043f\u0440\u043e\u0448\u043b\u0435] [\u0441\u0443\u0431\u043e\u0442\u0435] [\u0443] LT"][this.day()]},sameElse:"L"},relativeTime:{future:"\u0437\u0430 %s",past:"\u043f\u0440\u0435 %s",s:"\u043d\u0435\u043a\u043e\u043b\u0438\u043a\u043e \u0441\u0435\u043a\u0443\u043d\u0434\u0438",ss:e.translate,m:e.translate,mm:e.translate,h:e.translate,hh:e.translate,d:e.translate,dd:e.translate,M:e.translate,MM:e.translate,y:e.translate,yy:e.translate},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}})}(p(15439))},97949:function(qe,I,p){!function(o){"use strict";var e={words:{ss:["sekunda","sekunde","sekundi"],m:["jedan minut","jednog minuta"],mm:["minut","minuta","minuta"],h:["jedan sat","jednog sata"],hh:["sat","sata","sati"],d:["jedan dan","jednog dana"],dd:["dan","dana","dana"],M:["jedan mesec","jednog meseca"],MM:["mesec","meseca","meseci"],y:["jednu godinu","jedne godine"],yy:["godinu","godine","godina"]},correctGrammaticalCase:function(D,g){return D%10>=1&&D%10<=4&&(D%100<10||D%100>=20)?D%10==1?g[0]:g[1]:g[2]},translate:function(D,g,E,T){var P,n=e.words[E];return 1===E.length?"y"===E&&g?"jedna godina":T||g?n[0]:n[1]:(P=e.correctGrammaticalCase(D,n),"yy"===E&&g&&"godinu"===P?D+" godina":D+" "+P)}};o.defineLocale("sr",{months:"januar_februar_mart_april_maj_jun_jul_avgust_septembar_oktobar_novembar_decembar".split("_"),monthsShort:"jan._feb._mar._apr._maj_jun_jul_avg._sep._okt._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"nedelja_ponedeljak_utorak_sreda_\u010detvrtak_petak_subota".split("_"),weekdaysShort:"ned._pon._uto._sre._\u010det._pet._sub.".split("_"),weekdaysMin:"ne_po_ut_sr_\u010de_pe_su".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"D. M. YYYY.",LL:"D. MMMM YYYY.",LLL:"D. MMMM YYYY. H:mm",LLLL:"dddd, D. MMMM YYYY. H:mm"},calendar:{sameDay:"[danas u] LT",nextDay:"[sutra u] LT",nextWeek:function(){switch(this.day()){case 0:return"[u] [nedelju] [u] LT";case 3:return"[u] [sredu] [u] LT";case 6:return"[u] [subotu] [u] LT";case 1:case 2:case 4:case 5:return"[u] dddd [u] LT"}},lastDay:"[ju\u010de u] LT",lastWeek:function(){return["[pro\u0161le] [nedelje] [u] LT","[pro\u0161log] [ponedeljka] [u] LT","[pro\u0161log] [utorka] [u] LT","[pro\u0161le] [srede] [u] LT","[pro\u0161log] [\u010detvrtka] [u] LT","[pro\u0161log] [petka] [u] LT","[pro\u0161le] [subote] [u] LT"][this.day()]},sameElse:"L"},relativeTime:{future:"za %s",past:"pre %s",s:"nekoliko sekundi",ss:e.translate,m:e.translate,mm:e.translate,h:e.translate,hh:e.translate,d:e.translate,dd:e.translate,M:e.translate,MM:e.translate,y:e.translate,yy:e.translate},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}})}(p(15439))},86167:function(qe,I,p){!function(o){"use strict";o.defineLocale("ss",{months:"Bhimbidvwane_Indlovana_Indlov'lenkhulu_Mabasa_Inkhwekhweti_Inhlaba_Kholwane_Ingci_Inyoni_Imphala_Lweti_Ingongoni".split("_"),monthsShort:"Bhi_Ina_Inu_Mab_Ink_Inh_Kho_Igc_Iny_Imp_Lwe_Igo".split("_"),weekdays:"Lisontfo_Umsombuluko_Lesibili_Lesitsatfu_Lesine_Lesihlanu_Umgcibelo".split("_"),weekdaysShort:"Lis_Umb_Lsb_Les_Lsi_Lsh_Umg".split("_"),weekdaysMin:"Li_Us_Lb_Lt_Ls_Lh_Ug".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendar:{sameDay:"[Namuhla nga] LT",nextDay:"[Kusasa nga] LT",nextWeek:"dddd [nga] LT",lastDay:"[Itolo nga] LT",lastWeek:"dddd [leliphelile] [nga] LT",sameElse:"L"},relativeTime:{future:"nga %s",past:"wenteka nga %s",s:"emizuzwana lomcane",ss:"%d mzuzwana",m:"umzuzu",mm:"%d emizuzu",h:"lihora",hh:"%d emahora",d:"lilanga",dd:"%d emalanga",M:"inyanga",MM:"%d tinyanga",y:"umnyaka",yy:"%d iminyaka"},meridiemParse:/ekuseni|emini|entsambama|ebusuku/,meridiem:function(l,D,g){return l<11?"ekuseni":l<15?"emini":l<19?"entsambama":"ebusuku"},meridiemHour:function(l,D){return 12===l&&(l=0),"ekuseni"===D?l:"emini"===D?l>=11?l:l+12:"entsambama"===D||"ebusuku"===D?0===l?0:l+12:void 0},dayOfMonthOrdinalParse:/\d{1,2}/,ordinal:"%d",week:{dow:1,doy:4}})}(p(15439))},39713:function(qe,I,p){!function(o){"use strict";o.defineLocale("sv",{months:"januari_februari_mars_april_maj_juni_juli_augusti_september_oktober_november_december".split("_"),monthsShort:"jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec".split("_"),weekdays:"s\xf6ndag_m\xe5ndag_tisdag_onsdag_torsdag_fredag_l\xf6rdag".split("_"),weekdaysShort:"s\xf6n_m\xe5n_tis_ons_tor_fre_l\xf6r".split("_"),weekdaysMin:"s\xf6_m\xe5_ti_on_to_fr_l\xf6".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [kl.] HH:mm",LLLL:"dddd D MMMM YYYY [kl.] HH:mm",lll:"D MMM YYYY HH:mm",llll:"ddd D MMM YYYY HH:mm"},calendar:{sameDay:"[Idag] LT",nextDay:"[Imorgon] LT",lastDay:"[Ig\xe5r] LT",nextWeek:"[P\xe5] dddd LT",lastWeek:"[I] dddd[s] LT",sameElse:"L"},relativeTime:{future:"om %s",past:"f\xf6r %s sedan",s:"n\xe5gra sekunder",ss:"%d sekunder",m:"en minut",mm:"%d minuter",h:"en timme",hh:"%d timmar",d:"en dag",dd:"%d dagar",M:"en m\xe5nad",MM:"%d m\xe5nader",y:"ett \xe5r",yy:"%d \xe5r"},dayOfMonthOrdinalParse:/\d{1,2}(\:e|\:a)/,ordinal:function(l){var D=l%10;return l+(1==~~(l%100/10)?":e":1===D||2===D?":a":":e")},week:{dow:1,doy:4}})}(p(15439))},41982:function(qe,I,p){!function(o){"use strict";o.defineLocale("sw",{months:"Januari_Februari_Machi_Aprili_Mei_Juni_Julai_Agosti_Septemba_Oktoba_Novemba_Desemba".split("_"),monthsShort:"Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ago_Sep_Okt_Nov_Des".split("_"),weekdays:"Jumapili_Jumatatu_Jumanne_Jumatano_Alhamisi_Ijumaa_Jumamosi".split("_"),weekdaysShort:"Jpl_Jtat_Jnne_Jtan_Alh_Ijm_Jmos".split("_"),weekdaysMin:"J2_J3_J4_J5_Al_Ij_J1".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"hh:mm A",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[leo saa] LT",nextDay:"[kesho saa] LT",nextWeek:"[wiki ijayo] dddd [saat] LT",lastDay:"[jana] LT",lastWeek:"[wiki iliyopita] dddd [saat] LT",sameElse:"L"},relativeTime:{future:"%s baadaye",past:"tokea %s",s:"hivi punde",ss:"sekunde %d",m:"dakika moja",mm:"dakika %d",h:"saa limoja",hh:"masaa %d",d:"siku moja",dd:"siku %d",M:"mwezi mmoja",MM:"miezi %d",y:"mwaka mmoja",yy:"miaka %d"},week:{dow:1,doy:7}})}(p(15439))},22732:function(qe,I,p){!function(o){"use strict";var e={1:"\u0be7",2:"\u0be8",3:"\u0be9",4:"\u0bea",5:"\u0beb",6:"\u0bec",7:"\u0bed",8:"\u0bee",9:"\u0bef",0:"\u0be6"},l={"\u0be7":"1","\u0be8":"2","\u0be9":"3","\u0bea":"4","\u0beb":"5","\u0bec":"6","\u0bed":"7","\u0bee":"8","\u0bef":"9","\u0be6":"0"};o.defineLocale("ta",{months:"\u0b9c\u0ba9\u0bb5\u0bb0\u0bbf_\u0baa\u0bbf\u0baa\u0bcd\u0bb0\u0bb5\u0bb0\u0bbf_\u0bae\u0bbe\u0bb0\u0bcd\u0b9a\u0bcd_\u0b8f\u0baa\u0bcd\u0bb0\u0bb2\u0bcd_\u0bae\u0bc7_\u0b9c\u0bc2\u0ba9\u0bcd_\u0b9c\u0bc2\u0bb2\u0bc8_\u0b86\u0b95\u0bb8\u0bcd\u0b9f\u0bcd_\u0b9a\u0bc6\u0baa\u0bcd\u0b9f\u0bc6\u0bae\u0bcd\u0baa\u0bb0\u0bcd_\u0b85\u0b95\u0bcd\u0b9f\u0bc7\u0bbe\u0baa\u0bb0\u0bcd_\u0ba8\u0bb5\u0bae\u0bcd\u0baa\u0bb0\u0bcd_\u0b9f\u0bbf\u0b9a\u0bae\u0bcd\u0baa\u0bb0\u0bcd".split("_"),monthsShort:"\u0b9c\u0ba9\u0bb5\u0bb0\u0bbf_\u0baa\u0bbf\u0baa\u0bcd\u0bb0\u0bb5\u0bb0\u0bbf_\u0bae\u0bbe\u0bb0\u0bcd\u0b9a\u0bcd_\u0b8f\u0baa\u0bcd\u0bb0\u0bb2\u0bcd_\u0bae\u0bc7_\u0b9c\u0bc2\u0ba9\u0bcd_\u0b9c\u0bc2\u0bb2\u0bc8_\u0b86\u0b95\u0bb8\u0bcd\u0b9f\u0bcd_\u0b9a\u0bc6\u0baa\u0bcd\u0b9f\u0bc6\u0bae\u0bcd\u0baa\u0bb0\u0bcd_\u0b85\u0b95\u0bcd\u0b9f\u0bc7\u0bbe\u0baa\u0bb0\u0bcd_\u0ba8\u0bb5\u0bae\u0bcd\u0baa\u0bb0\u0bcd_\u0b9f\u0bbf\u0b9a\u0bae\u0bcd\u0baa\u0bb0\u0bcd".split("_"),weekdays:"\u0b9e\u0bbe\u0baf\u0bbf\u0bb1\u0bcd\u0bb1\u0bc1\u0b95\u0bcd\u0b95\u0bbf\u0bb4\u0bae\u0bc8_\u0ba4\u0bbf\u0b99\u0bcd\u0b95\u0b9f\u0bcd\u0b95\u0bbf\u0bb4\u0bae\u0bc8_\u0b9a\u0bc6\u0bb5\u0bcd\u0bb5\u0bbe\u0baf\u0bcd\u0b95\u0bbf\u0bb4\u0bae\u0bc8_\u0baa\u0bc1\u0ba4\u0ba9\u0bcd\u0b95\u0bbf\u0bb4\u0bae\u0bc8_\u0bb5\u0bbf\u0baf\u0bbe\u0bb4\u0b95\u0bcd\u0b95\u0bbf\u0bb4\u0bae\u0bc8_\u0bb5\u0bc6\u0bb3\u0bcd\u0bb3\u0bbf\u0b95\u0bcd\u0b95\u0bbf\u0bb4\u0bae\u0bc8_\u0b9a\u0ba9\u0bbf\u0b95\u0bcd\u0b95\u0bbf\u0bb4\u0bae\u0bc8".split("_"),weekdaysShort:"\u0b9e\u0bbe\u0baf\u0bbf\u0bb1\u0bc1_\u0ba4\u0bbf\u0b99\u0bcd\u0b95\u0bb3\u0bcd_\u0b9a\u0bc6\u0bb5\u0bcd\u0bb5\u0bbe\u0baf\u0bcd_\u0baa\u0bc1\u0ba4\u0ba9\u0bcd_\u0bb5\u0bbf\u0baf\u0bbe\u0bb4\u0ba9\u0bcd_\u0bb5\u0bc6\u0bb3\u0bcd\u0bb3\u0bbf_\u0b9a\u0ba9\u0bbf".split("_"),weekdaysMin:"\u0b9e\u0bbe_\u0ba4\u0bbf_\u0b9a\u0bc6_\u0baa\u0bc1_\u0bb5\u0bbf_\u0bb5\u0bc6_\u0b9a".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, HH:mm",LLLL:"dddd, D MMMM YYYY, HH:mm"},calendar:{sameDay:"[\u0b87\u0ba9\u0bcd\u0bb1\u0bc1] LT",nextDay:"[\u0ba8\u0bbe\u0bb3\u0bc8] LT",nextWeek:"dddd, LT",lastDay:"[\u0ba8\u0bc7\u0bb1\u0bcd\u0bb1\u0bc1] LT",lastWeek:"[\u0b95\u0b9f\u0ba8\u0bcd\u0ba4 \u0bb5\u0bbe\u0bb0\u0bae\u0bcd] dddd, LT",sameElse:"L"},relativeTime:{future:"%s \u0b87\u0bb2\u0bcd",past:"%s \u0bae\u0bc1\u0ba9\u0bcd",s:"\u0b92\u0bb0\u0bc1 \u0b9a\u0bbf\u0bb2 \u0bb5\u0bbf\u0ba8\u0bbe\u0b9f\u0bbf\u0b95\u0bb3\u0bcd",ss:"%d \u0bb5\u0bbf\u0ba8\u0bbe\u0b9f\u0bbf\u0b95\u0bb3\u0bcd",m:"\u0b92\u0bb0\u0bc1 \u0ba8\u0bbf\u0bae\u0bbf\u0b9f\u0bae\u0bcd",mm:"%d \u0ba8\u0bbf\u0bae\u0bbf\u0b9f\u0b99\u0bcd\u0b95\u0bb3\u0bcd",h:"\u0b92\u0bb0\u0bc1 \u0bae\u0ba3\u0bbf \u0ba8\u0bc7\u0bb0\u0bae\u0bcd",hh:"%d \u0bae\u0ba3\u0bbf \u0ba8\u0bc7\u0bb0\u0bae\u0bcd",d:"\u0b92\u0bb0\u0bc1 \u0ba8\u0bbe\u0bb3\u0bcd",dd:"%d \u0ba8\u0bbe\u0b9f\u0bcd\u0b95\u0bb3\u0bcd",M:"\u0b92\u0bb0\u0bc1 \u0bae\u0bbe\u0ba4\u0bae\u0bcd",MM:"%d \u0bae\u0bbe\u0ba4\u0b99\u0bcd\u0b95\u0bb3\u0bcd",y:"\u0b92\u0bb0\u0bc1 \u0bb5\u0bb0\u0bc1\u0b9f\u0bae\u0bcd",yy:"%d \u0b86\u0ba3\u0bcd\u0b9f\u0bc1\u0b95\u0bb3\u0bcd"},dayOfMonthOrdinalParse:/\d{1,2}\u0bb5\u0ba4\u0bc1/,ordinal:function(g){return g+"\u0bb5\u0ba4\u0bc1"},preparse:function(g){return g.replace(/[\u0be7\u0be8\u0be9\u0bea\u0beb\u0bec\u0bed\u0bee\u0bef\u0be6]/g,function(E){return l[E]})},postformat:function(g){return g.replace(/\d/g,function(E){return e[E]})},meridiemParse:/\u0baf\u0bbe\u0bae\u0bae\u0bcd|\u0bb5\u0bc8\u0b95\u0bb1\u0bc8|\u0b95\u0bbe\u0bb2\u0bc8|\u0ba8\u0ba3\u0bcd\u0baa\u0b95\u0bb2\u0bcd|\u0b8e\u0bb1\u0bcd\u0baa\u0bbe\u0b9f\u0bc1|\u0bae\u0bbe\u0bb2\u0bc8/,meridiem:function(g,E,T){return g<2?" \u0baf\u0bbe\u0bae\u0bae\u0bcd":g<6?" \u0bb5\u0bc8\u0b95\u0bb1\u0bc8":g<10?" \u0b95\u0bbe\u0bb2\u0bc8":g<14?" \u0ba8\u0ba3\u0bcd\u0baa\u0b95\u0bb2\u0bcd":g<18?" \u0b8e\u0bb1\u0bcd\u0baa\u0bbe\u0b9f\u0bc1":g<22?" \u0bae\u0bbe\u0bb2\u0bc8":" \u0baf\u0bbe\u0bae\u0bae\u0bcd"},meridiemHour:function(g,E){return 12===g&&(g=0),"\u0baf\u0bbe\u0bae\u0bae\u0bcd"===E?g<2?g:g+12:"\u0bb5\u0bc8\u0b95\u0bb1\u0bc8"===E||"\u0b95\u0bbe\u0bb2\u0bc8"===E||"\u0ba8\u0ba3\u0bcd\u0baa\u0b95\u0bb2\u0bcd"===E&&g>=10?g:g+12},week:{dow:0,doy:6}})}(p(15439))},43636:function(qe,I,p){!function(o){"use strict";o.defineLocale("te",{months:"\u0c1c\u0c28\u0c35\u0c30\u0c3f_\u0c2b\u0c3f\u0c2c\u0c4d\u0c30\u0c35\u0c30\u0c3f_\u0c2e\u0c3e\u0c30\u0c4d\u0c1a\u0c3f_\u0c0f\u0c2a\u0c4d\u0c30\u0c3f\u0c32\u0c4d_\u0c2e\u0c47_\u0c1c\u0c42\u0c28\u0c4d_\u0c1c\u0c41\u0c32\u0c48_\u0c06\u0c17\u0c38\u0c4d\u0c1f\u0c41_\u0c38\u0c46\u0c2a\u0c4d\u0c1f\u0c46\u0c02\u0c2c\u0c30\u0c4d_\u0c05\u0c15\u0c4d\u0c1f\u0c4b\u0c2c\u0c30\u0c4d_\u0c28\u0c35\u0c02\u0c2c\u0c30\u0c4d_\u0c21\u0c3f\u0c38\u0c46\u0c02\u0c2c\u0c30\u0c4d".split("_"),monthsShort:"\u0c1c\u0c28._\u0c2b\u0c3f\u0c2c\u0c4d\u0c30._\u0c2e\u0c3e\u0c30\u0c4d\u0c1a\u0c3f_\u0c0f\u0c2a\u0c4d\u0c30\u0c3f._\u0c2e\u0c47_\u0c1c\u0c42\u0c28\u0c4d_\u0c1c\u0c41\u0c32\u0c48_\u0c06\u0c17._\u0c38\u0c46\u0c2a\u0c4d._\u0c05\u0c15\u0c4d\u0c1f\u0c4b._\u0c28\u0c35._\u0c21\u0c3f\u0c38\u0c46.".split("_"),monthsParseExact:!0,weekdays:"\u0c06\u0c26\u0c3f\u0c35\u0c3e\u0c30\u0c02_\u0c38\u0c4b\u0c2e\u0c35\u0c3e\u0c30\u0c02_\u0c2e\u0c02\u0c17\u0c33\u0c35\u0c3e\u0c30\u0c02_\u0c2c\u0c41\u0c27\u0c35\u0c3e\u0c30\u0c02_\u0c17\u0c41\u0c30\u0c41\u0c35\u0c3e\u0c30\u0c02_\u0c36\u0c41\u0c15\u0c4d\u0c30\u0c35\u0c3e\u0c30\u0c02_\u0c36\u0c28\u0c3f\u0c35\u0c3e\u0c30\u0c02".split("_"),weekdaysShort:"\u0c06\u0c26\u0c3f_\u0c38\u0c4b\u0c2e_\u0c2e\u0c02\u0c17\u0c33_\u0c2c\u0c41\u0c27_\u0c17\u0c41\u0c30\u0c41_\u0c36\u0c41\u0c15\u0c4d\u0c30_\u0c36\u0c28\u0c3f".split("_"),weekdaysMin:"\u0c06_\u0c38\u0c4b_\u0c2e\u0c02_\u0c2c\u0c41_\u0c17\u0c41_\u0c36\u0c41_\u0c36".split("_"),longDateFormat:{LT:"A h:mm",LTS:"A h:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm",LLLL:"dddd, D MMMM YYYY, A h:mm"},calendar:{sameDay:"[\u0c28\u0c47\u0c21\u0c41] LT",nextDay:"[\u0c30\u0c47\u0c2a\u0c41] LT",nextWeek:"dddd, LT",lastDay:"[\u0c28\u0c3f\u0c28\u0c4d\u0c28] LT",lastWeek:"[\u0c17\u0c24] dddd, LT",sameElse:"L"},relativeTime:{future:"%s \u0c32\u0c4b",past:"%s \u0c15\u0c4d\u0c30\u0c3f\u0c24\u0c02",s:"\u0c15\u0c4a\u0c28\u0c4d\u0c28\u0c3f \u0c15\u0c4d\u0c37\u0c23\u0c3e\u0c32\u0c41",ss:"%d \u0c38\u0c46\u0c15\u0c28\u0c4d\u0c32\u0c41",m:"\u0c12\u0c15 \u0c28\u0c3f\u0c2e\u0c3f\u0c37\u0c02",mm:"%d \u0c28\u0c3f\u0c2e\u0c3f\u0c37\u0c3e\u0c32\u0c41",h:"\u0c12\u0c15 \u0c17\u0c02\u0c1f",hh:"%d \u0c17\u0c02\u0c1f\u0c32\u0c41",d:"\u0c12\u0c15 \u0c30\u0c4b\u0c1c\u0c41",dd:"%d \u0c30\u0c4b\u0c1c\u0c41\u0c32\u0c41",M:"\u0c12\u0c15 \u0c28\u0c46\u0c32",MM:"%d \u0c28\u0c46\u0c32\u0c32\u0c41",y:"\u0c12\u0c15 \u0c38\u0c02\u0c35\u0c24\u0c4d\u0c38\u0c30\u0c02",yy:"%d \u0c38\u0c02\u0c35\u0c24\u0c4d\u0c38\u0c30\u0c3e\u0c32\u0c41"},dayOfMonthOrdinalParse:/\d{1,2}\u0c35/,ordinal:"%d\u0c35",meridiemParse:/\u0c30\u0c3e\u0c24\u0c4d\u0c30\u0c3f|\u0c09\u0c26\u0c2f\u0c02|\u0c2e\u0c27\u0c4d\u0c2f\u0c3e\u0c39\u0c4d\u0c28\u0c02|\u0c38\u0c3e\u0c2f\u0c02\u0c24\u0c4d\u0c30\u0c02/,meridiemHour:function(l,D){return 12===l&&(l=0),"\u0c30\u0c3e\u0c24\u0c4d\u0c30\u0c3f"===D?l<4?l:l+12:"\u0c09\u0c26\u0c2f\u0c02"===D?l:"\u0c2e\u0c27\u0c4d\u0c2f\u0c3e\u0c39\u0c4d\u0c28\u0c02"===D?l>=10?l:l+12:"\u0c38\u0c3e\u0c2f\u0c02\u0c24\u0c4d\u0c30\u0c02"===D?l+12:void 0},meridiem:function(l,D,g){return l<4?"\u0c30\u0c3e\u0c24\u0c4d\u0c30\u0c3f":l<10?"\u0c09\u0c26\u0c2f\u0c02":l<17?"\u0c2e\u0c27\u0c4d\u0c2f\u0c3e\u0c39\u0c4d\u0c28\u0c02":l<20?"\u0c38\u0c3e\u0c2f\u0c02\u0c24\u0c4d\u0c30\u0c02":"\u0c30\u0c3e\u0c24\u0c4d\u0c30\u0c3f"},week:{dow:0,doy:6}})}(p(15439))},2115:function(qe,I,p){!function(o){"use strict";o.defineLocale("tet",{months:"Janeiru_Fevereiru_Marsu_Abril_Maiu_Ju\xf1u_Jullu_Agustu_Setembru_Outubru_Novembru_Dezembru".split("_"),monthsShort:"Jan_Fev_Mar_Abr_Mai_Jun_Jul_Ago_Set_Out_Nov_Dez".split("_"),weekdays:"Domingu_Segunda_Tersa_Kuarta_Kinta_Sesta_Sabadu".split("_"),weekdaysShort:"Dom_Seg_Ters_Kua_Kint_Sest_Sab".split("_"),weekdaysMin:"Do_Seg_Te_Ku_Ki_Ses_Sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Ohin iha] LT",nextDay:"[Aban iha] LT",nextWeek:"dddd [iha] LT",lastDay:"[Horiseik iha] LT",lastWeek:"dddd [semana kotuk] [iha] LT",sameElse:"L"},relativeTime:{future:"iha %s",past:"%s liuba",s:"segundu balun",ss:"segundu %d",m:"minutu ida",mm:"minutu %d",h:"oras ida",hh:"oras %d",d:"loron ida",dd:"loron %d",M:"fulan ida",MM:"fulan %d",y:"tinan ida",yy:"tinan %d"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(l){var D=l%10;return l+(1==~~(l%100/10)?"th":1===D?"st":2===D?"nd":3===D?"rd":"th")},week:{dow:1,doy:4}})}(p(15439))},69801:function(qe,I,p){!function(o){"use strict";var e={0:"-\u0443\u043c",1:"-\u0443\u043c",2:"-\u044e\u043c",3:"-\u044e\u043c",4:"-\u0443\u043c",5:"-\u0443\u043c",6:"-\u0443\u043c",7:"-\u0443\u043c",8:"-\u0443\u043c",9:"-\u0443\u043c",10:"-\u0443\u043c",12:"-\u0443\u043c",13:"-\u0443\u043c",20:"-\u0443\u043c",30:"-\u044e\u043c",40:"-\u0443\u043c",50:"-\u0443\u043c",60:"-\u0443\u043c",70:"-\u0443\u043c",80:"-\u0443\u043c",90:"-\u0443\u043c",100:"-\u0443\u043c"};o.defineLocale("tg",{months:{format:"\u044f\u043d\u0432\u0430\u0440\u0438_\u0444\u0435\u0432\u0440\u0430\u043b\u0438_\u043c\u0430\u0440\u0442\u0438_\u0430\u043f\u0440\u0435\u043b\u0438_\u043c\u0430\u0439\u0438_\u0438\u044e\u043d\u0438_\u0438\u044e\u043b\u0438_\u0430\u0432\u0433\u0443\u0441\u0442\u0438_\u0441\u0435\u043d\u0442\u044f\u0431\u0440\u0438_\u043e\u043a\u0442\u044f\u0431\u0440\u0438_\u043d\u043e\u044f\u0431\u0440\u0438_\u0434\u0435\u043a\u0430\u0431\u0440\u0438".split("_"),standalone:"\u044f\u043d\u0432\u0430\u0440_\u0444\u0435\u0432\u0440\u0430\u043b_\u043c\u0430\u0440\u0442_\u0430\u043f\u0440\u0435\u043b_\u043c\u0430\u0439_\u0438\u044e\u043d_\u0438\u044e\u043b_\u0430\u0432\u0433\u0443\u0441\u0442_\u0441\u0435\u043d\u0442\u044f\u0431\u0440_\u043e\u043a\u0442\u044f\u0431\u0440_\u043d\u043e\u044f\u0431\u0440_\u0434\u0435\u043a\u0430\u0431\u0440".split("_")},monthsShort:"\u044f\u043d\u0432_\u0444\u0435\u0432_\u043c\u0430\u0440_\u0430\u043f\u0440_\u043c\u0430\u0439_\u0438\u044e\u043d_\u0438\u044e\u043b_\u0430\u0432\u0433_\u0441\u0435\u043d_\u043e\u043a\u0442_\u043d\u043e\u044f_\u0434\u0435\u043a".split("_"),weekdays:"\u044f\u043a\u0448\u0430\u043d\u0431\u0435_\u0434\u0443\u0448\u0430\u043d\u0431\u0435_\u0441\u0435\u0448\u0430\u043d\u0431\u0435_\u0447\u043e\u0440\u0448\u0430\u043d\u0431\u0435_\u043f\u0430\u043d\u04b7\u0448\u0430\u043d\u0431\u0435_\u04b7\u0443\u043c\u044a\u0430_\u0448\u0430\u043d\u0431\u0435".split("_"),weekdaysShort:"\u044f\u0448\u0431_\u0434\u0448\u0431_\u0441\u0448\u0431_\u0447\u0448\u0431_\u043f\u0448\u0431_\u04b7\u0443\u043c_\u0448\u043d\u0431".split("_"),weekdaysMin:"\u044f\u0448_\u0434\u0448_\u0441\u0448_\u0447\u0448_\u043f\u0448_\u04b7\u043c_\u0448\u0431".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[\u0418\u043c\u0440\u04ef\u0437 \u0441\u043e\u0430\u0442\u0438] LT",nextDay:"[\u0424\u0430\u0440\u0434\u043e \u0441\u043e\u0430\u0442\u0438] LT",lastDay:"[\u0414\u0438\u0440\u04ef\u0437 \u0441\u043e\u0430\u0442\u0438] LT",nextWeek:"dddd[\u0438] [\u04b3\u0430\u0444\u0442\u0430\u0438 \u043e\u044f\u043d\u0434\u0430 \u0441\u043e\u0430\u0442\u0438] LT",lastWeek:"dddd[\u0438] [\u04b3\u0430\u0444\u0442\u0430\u0438 \u0433\u0443\u0437\u0430\u0448\u0442\u0430 \u0441\u043e\u0430\u0442\u0438] LT",sameElse:"L"},relativeTime:{future:"\u0431\u0430\u044a\u0434\u0438 %s",past:"%s \u043f\u0435\u0448",s:"\u044f\u043a\u0447\u0430\u043d\u0434 \u0441\u043e\u043d\u0438\u044f",m:"\u044f\u043a \u0434\u0430\u049b\u0438\u049b\u0430",mm:"%d \u0434\u0430\u049b\u0438\u049b\u0430",h:"\u044f\u043a \u0441\u043e\u0430\u0442",hh:"%d \u0441\u043e\u0430\u0442",d:"\u044f\u043a \u0440\u04ef\u0437",dd:"%d \u0440\u04ef\u0437",M:"\u044f\u043a \u043c\u043e\u04b3",MM:"%d \u043c\u043e\u04b3",y:"\u044f\u043a \u0441\u043e\u043b",yy:"%d \u0441\u043e\u043b"},meridiemParse:/\u0448\u0430\u0431|\u0441\u0443\u0431\u04b3|\u0440\u04ef\u0437|\u0431\u0435\u0433\u043e\u04b3/,meridiemHour:function(D,g){return 12===D&&(D=0),"\u0448\u0430\u0431"===g?D<4?D:D+12:"\u0441\u0443\u0431\u04b3"===g?D:"\u0440\u04ef\u0437"===g?D>=11?D:D+12:"\u0431\u0435\u0433\u043e\u04b3"===g?D+12:void 0},meridiem:function(D,g,E){return D<4?"\u0448\u0430\u0431":D<11?"\u0441\u0443\u0431\u04b3":D<16?"\u0440\u04ef\u0437":D<19?"\u0431\u0435\u0433\u043e\u04b3":"\u0448\u0430\u0431"},dayOfMonthOrdinalParse:/\d{1,2}-(\u0443\u043c|\u044e\u043c)/,ordinal:function(D){var g=D%10,E=D>=100?100:null;return D+(e[D]||e[g]||e[E])},week:{dow:1,doy:7}})}(p(15439))},2868:function(qe,I,p){!function(o){"use strict";o.defineLocale("th",{months:"\u0e21\u0e01\u0e23\u0e32\u0e04\u0e21_\u0e01\u0e38\u0e21\u0e20\u0e32\u0e1e\u0e31\u0e19\u0e18\u0e4c_\u0e21\u0e35\u0e19\u0e32\u0e04\u0e21_\u0e40\u0e21\u0e29\u0e32\u0e22\u0e19_\u0e1e\u0e24\u0e29\u0e20\u0e32\u0e04\u0e21_\u0e21\u0e34\u0e16\u0e38\u0e19\u0e32\u0e22\u0e19_\u0e01\u0e23\u0e01\u0e0e\u0e32\u0e04\u0e21_\u0e2a\u0e34\u0e07\u0e2b\u0e32\u0e04\u0e21_\u0e01\u0e31\u0e19\u0e22\u0e32\u0e22\u0e19_\u0e15\u0e38\u0e25\u0e32\u0e04\u0e21_\u0e1e\u0e24\u0e28\u0e08\u0e34\u0e01\u0e32\u0e22\u0e19_\u0e18\u0e31\u0e19\u0e27\u0e32\u0e04\u0e21".split("_"),monthsShort:"\u0e21.\u0e04._\u0e01.\u0e1e._\u0e21\u0e35.\u0e04._\u0e40\u0e21.\u0e22._\u0e1e.\u0e04._\u0e21\u0e34.\u0e22._\u0e01.\u0e04._\u0e2a.\u0e04._\u0e01.\u0e22._\u0e15.\u0e04._\u0e1e.\u0e22._\u0e18.\u0e04.".split("_"),monthsParseExact:!0,weekdays:"\u0e2d\u0e32\u0e17\u0e34\u0e15\u0e22\u0e4c_\u0e08\u0e31\u0e19\u0e17\u0e23\u0e4c_\u0e2d\u0e31\u0e07\u0e04\u0e32\u0e23_\u0e1e\u0e38\u0e18_\u0e1e\u0e24\u0e2b\u0e31\u0e2a\u0e1a\u0e14\u0e35_\u0e28\u0e38\u0e01\u0e23\u0e4c_\u0e40\u0e2a\u0e32\u0e23\u0e4c".split("_"),weekdaysShort:"\u0e2d\u0e32\u0e17\u0e34\u0e15\u0e22\u0e4c_\u0e08\u0e31\u0e19\u0e17\u0e23\u0e4c_\u0e2d\u0e31\u0e07\u0e04\u0e32\u0e23_\u0e1e\u0e38\u0e18_\u0e1e\u0e24\u0e2b\u0e31\u0e2a_\u0e28\u0e38\u0e01\u0e23\u0e4c_\u0e40\u0e2a\u0e32\u0e23\u0e4c".split("_"),weekdaysMin:"\u0e2d\u0e32._\u0e08._\u0e2d._\u0e1e._\u0e1e\u0e24._\u0e28._\u0e2a.".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY \u0e40\u0e27\u0e25\u0e32 H:mm",LLLL:"\u0e27\u0e31\u0e19dddd\u0e17\u0e35\u0e48 D MMMM YYYY \u0e40\u0e27\u0e25\u0e32 H:mm"},meridiemParse:/\u0e01\u0e48\u0e2d\u0e19\u0e40\u0e17\u0e35\u0e48\u0e22\u0e07|\u0e2b\u0e25\u0e31\u0e07\u0e40\u0e17\u0e35\u0e48\u0e22\u0e07/,isPM:function(l){return"\u0e2b\u0e25\u0e31\u0e07\u0e40\u0e17\u0e35\u0e48\u0e22\u0e07"===l},meridiem:function(l,D,g){return l<12?"\u0e01\u0e48\u0e2d\u0e19\u0e40\u0e17\u0e35\u0e48\u0e22\u0e07":"\u0e2b\u0e25\u0e31\u0e07\u0e40\u0e17\u0e35\u0e48\u0e22\u0e07"},calendar:{sameDay:"[\u0e27\u0e31\u0e19\u0e19\u0e35\u0e49 \u0e40\u0e27\u0e25\u0e32] LT",nextDay:"[\u0e1e\u0e23\u0e38\u0e48\u0e07\u0e19\u0e35\u0e49 \u0e40\u0e27\u0e25\u0e32] LT",nextWeek:"dddd[\u0e2b\u0e19\u0e49\u0e32 \u0e40\u0e27\u0e25\u0e32] LT",lastDay:"[\u0e40\u0e21\u0e37\u0e48\u0e2d\u0e27\u0e32\u0e19\u0e19\u0e35\u0e49 \u0e40\u0e27\u0e25\u0e32] LT",lastWeek:"[\u0e27\u0e31\u0e19]dddd[\u0e17\u0e35\u0e48\u0e41\u0e25\u0e49\u0e27 \u0e40\u0e27\u0e25\u0e32] LT",sameElse:"L"},relativeTime:{future:"\u0e2d\u0e35\u0e01 %s",past:"%s\u0e17\u0e35\u0e48\u0e41\u0e25\u0e49\u0e27",s:"\u0e44\u0e21\u0e48\u0e01\u0e35\u0e48\u0e27\u0e34\u0e19\u0e32\u0e17\u0e35",ss:"%d \u0e27\u0e34\u0e19\u0e32\u0e17\u0e35",m:"1 \u0e19\u0e32\u0e17\u0e35",mm:"%d \u0e19\u0e32\u0e17\u0e35",h:"1 \u0e0a\u0e31\u0e48\u0e27\u0e42\u0e21\u0e07",hh:"%d \u0e0a\u0e31\u0e48\u0e27\u0e42\u0e21\u0e07",d:"1 \u0e27\u0e31\u0e19",dd:"%d \u0e27\u0e31\u0e19",w:"1 \u0e2a\u0e31\u0e1b\u0e14\u0e32\u0e2b\u0e4c",ww:"%d \u0e2a\u0e31\u0e1b\u0e14\u0e32\u0e2b\u0e4c",M:"1 \u0e40\u0e14\u0e37\u0e2d\u0e19",MM:"%d \u0e40\u0e14\u0e37\u0e2d\u0e19",y:"1 \u0e1b\u0e35",yy:"%d \u0e1b\u0e35"}})}(p(15439))},31310:function(qe,I,p){!function(o){"use strict";var e={1:"'inji",5:"'inji",8:"'inji",70:"'inji",80:"'inji",2:"'nji",7:"'nji",20:"'nji",50:"'nji",3:"'\xfcnji",4:"'\xfcnji",100:"'\xfcnji",6:"'njy",9:"'unjy",10:"'unjy",30:"'unjy",60:"'ynjy",90:"'ynjy"};o.defineLocale("tk",{months:"\xddanwar_Fewral_Mart_Aprel_Ma\xfd_I\xfdun_I\xfdul_Awgust_Sent\xfdabr_Okt\xfdabr_No\xfdabr_Dekabr".split("_"),monthsShort:"\xddan_Few_Mar_Apr_Ma\xfd_I\xfdn_I\xfdl_Awg_Sen_Okt_No\xfd_Dek".split("_"),weekdays:"\xddek\u015fenbe_Du\u015fenbe_Si\u015fenbe_\xc7ar\u015fenbe_Pen\u015fenbe_Anna_\u015eenbe".split("_"),weekdaysShort:"\xddek_Du\u015f_Si\u015f_\xc7ar_Pen_Ann_\u015een".split("_"),weekdaysMin:"\xddk_D\u015f_S\u015f_\xc7r_Pn_An_\u015en".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[bug\xfcn sagat] LT",nextDay:"[ertir sagat] LT",nextWeek:"[indiki] dddd [sagat] LT",lastDay:"[d\xfc\xfdn] LT",lastWeek:"[ge\xe7en] dddd [sagat] LT",sameElse:"L"},relativeTime:{future:"%s so\u0148",past:"%s \xf6\u0148",s:"birn\xe4\xe7e sekunt",m:"bir minut",mm:"%d minut",h:"bir sagat",hh:"%d sagat",d:"bir g\xfcn",dd:"%d g\xfcn",M:"bir a\xfd",MM:"%d a\xfd",y:"bir \xfdyl",yy:"%d \xfdyl"},ordinal:function(D,g){switch(g){case"d":case"D":case"Do":case"DD":return D;default:if(0===D)return D+"'unjy";var E=D%10,T=D%100-E,n=D>=100?100:null;return D+(e[E]||e[T]||e[n])}},week:{dow:1,doy:7}})}(p(15439))},22360:function(qe,I,p){!function(o){"use strict";o.defineLocale("tl-ph",{months:"Enero_Pebrero_Marso_Abril_Mayo_Hunyo_Hulyo_Agosto_Setyembre_Oktubre_Nobyembre_Disyembre".split("_"),monthsShort:"Ene_Peb_Mar_Abr_May_Hun_Hul_Ago_Set_Okt_Nob_Dis".split("_"),weekdays:"Linggo_Lunes_Martes_Miyerkules_Huwebes_Biyernes_Sabado".split("_"),weekdaysShort:"Lin_Lun_Mar_Miy_Huw_Biy_Sab".split("_"),weekdaysMin:"Li_Lu_Ma_Mi_Hu_Bi_Sab".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"MM/D/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY HH:mm",LLLL:"dddd, MMMM DD, YYYY HH:mm"},calendar:{sameDay:"LT [ngayong araw]",nextDay:"[Bukas ng] LT",nextWeek:"LT [sa susunod na] dddd",lastDay:"LT [kahapon]",lastWeek:"LT [noong nakaraang] dddd",sameElse:"L"},relativeTime:{future:"sa loob ng %s",past:"%s ang nakalipas",s:"ilang segundo",ss:"%d segundo",m:"isang minuto",mm:"%d minuto",h:"isang oras",hh:"%d oras",d:"isang araw",dd:"%d araw",M:"isang buwan",MM:"%d buwan",y:"isang taon",yy:"%d taon"},dayOfMonthOrdinalParse:/\d{1,2}/,ordinal:function(l){return l},week:{dow:1,doy:4}})}(p(15439))},66645:function(qe,I,p){!function(o){"use strict";var e="pagh_wa\u2019_cha\u2019_wej_loS_vagh_jav_Soch_chorgh_Hut".split("_");function l(n){var P=n;return P=-1!==n.indexOf("jaj")?P.slice(0,-3)+"leS":-1!==n.indexOf("jar")?P.slice(0,-3)+"waQ":-1!==n.indexOf("DIS")?P.slice(0,-3)+"nem":P+" pIq"}function D(n){var P=n;return P=-1!==n.indexOf("jaj")?P.slice(0,-3)+"Hu\u2019":-1!==n.indexOf("jar")?P.slice(0,-3)+"wen":-1!==n.indexOf("DIS")?P.slice(0,-3)+"ben":P+" ret"}function g(n,P,w,B){var Y=E(n);switch(w){case"ss":return Y+" lup";case"mm":return Y+" tup";case"hh":return Y+" rep";case"dd":return Y+" jaj";case"MM":return Y+" jar";case"yy":return Y+" DIS"}}function E(n){var P=Math.floor(n%1e3/100),w=Math.floor(n%100/10),B=n%10,Y="";return P>0&&(Y+=e[P]+"vatlh"),w>0&&(Y+=(""!==Y?" ":"")+e[w]+"maH"),B>0&&(Y+=(""!==Y?" ":"")+e[B]),""===Y?"pagh":Y}o.defineLocale("tlh",{months:"tera\u2019 jar wa\u2019_tera\u2019 jar cha\u2019_tera\u2019 jar wej_tera\u2019 jar loS_tera\u2019 jar vagh_tera\u2019 jar jav_tera\u2019 jar Soch_tera\u2019 jar chorgh_tera\u2019 jar Hut_tera\u2019 jar wa\u2019maH_tera\u2019 jar wa\u2019maH wa\u2019_tera\u2019 jar wa\u2019maH cha\u2019".split("_"),monthsShort:"jar wa\u2019_jar cha\u2019_jar wej_jar loS_jar vagh_jar jav_jar Soch_jar chorgh_jar Hut_jar wa\u2019maH_jar wa\u2019maH wa\u2019_jar wa\u2019maH cha\u2019".split("_"),monthsParseExact:!0,weekdays:"lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj".split("_"),weekdaysShort:"lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj".split("_"),weekdaysMin:"lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[DaHjaj] LT",nextDay:"[wa\u2019leS] LT",nextWeek:"LLL",lastDay:"[wa\u2019Hu\u2019] LT",lastWeek:"LLL",sameElse:"L"},relativeTime:{future:l,past:D,s:"puS lup",ss:g,m:"wa\u2019 tup",mm:g,h:"wa\u2019 rep",hh:g,d:"wa\u2019 jaj",dd:g,M:"wa\u2019 jar",MM:g,y:"wa\u2019 DIS",yy:g},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(p(15439))},98374:function(qe,I,p){!function(o){"use strict";var e={1:"'inci",5:"'inci",8:"'inci",70:"'inci",80:"'inci",2:"'nci",7:"'nci",20:"'nci",50:"'nci",3:"'\xfcnc\xfc",4:"'\xfcnc\xfc",100:"'\xfcnc\xfc",6:"'nc\u0131",9:"'uncu",10:"'uncu",30:"'uncu",60:"'\u0131nc\u0131",90:"'\u0131nc\u0131"};o.defineLocale("tr",{months:"Ocak_\u015eubat_Mart_Nisan_May\u0131s_Haziran_Temmuz_A\u011fustos_Eyl\xfcl_Ekim_Kas\u0131m_Aral\u0131k".split("_"),monthsShort:"Oca_\u015eub_Mar_Nis_May_Haz_Tem_A\u011fu_Eyl_Eki_Kas_Ara".split("_"),weekdays:"Pazar_Pazartesi_Sal\u0131_\xc7ar\u015famba_Per\u015fembe_Cuma_Cumartesi".split("_"),weekdaysShort:"Paz_Pzt_Sal_\xc7ar_Per_Cum_Cmt".split("_"),weekdaysMin:"Pz_Pt_Sa_\xc7a_Pe_Cu_Ct".split("_"),meridiem:function(D,g,E){return D<12?E?"\xf6\xf6":"\xd6\xd6":E?"\xf6s":"\xd6S"},meridiemParse:/\xf6\xf6|\xd6\xd6|\xf6s|\xd6S/,isPM:function(D){return"\xf6s"===D||"\xd6S"===D},longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[bug\xfcn saat] LT",nextDay:"[yar\u0131n saat] LT",nextWeek:"[gelecek] dddd [saat] LT",lastDay:"[d\xfcn] LT",lastWeek:"[ge\xe7en] dddd [saat] LT",sameElse:"L"},relativeTime:{future:"%s sonra",past:"%s \xf6nce",s:"birka\xe7 saniye",ss:"%d saniye",m:"bir dakika",mm:"%d dakika",h:"bir saat",hh:"%d saat",d:"bir g\xfcn",dd:"%d g\xfcn",w:"bir hafta",ww:"%d hafta",M:"bir ay",MM:"%d ay",y:"bir y\u0131l",yy:"%d y\u0131l"},ordinal:function(D,g){switch(g){case"d":case"D":case"Do":case"DD":return D;default:if(0===D)return D+"'\u0131nc\u0131";var E=D%10,T=D%100-E,n=D>=100?100:null;return D+(e[E]||e[T]||e[n])}},week:{dow:1,doy:7}})}(p(15439))},256:function(qe,I,p){!function(o){"use strict";o.defineLocale("tzl",{months:"Januar_Fevraglh_Mar\xe7_Avr\xefu_Mai_G\xfcn_Julia_Guscht_Setemvar_Listop\xe4ts_Noemvar_Zecemvar".split("_"),monthsShort:"Jan_Fev_Mar_Avr_Mai_G\xfcn_Jul_Gus_Set_Lis_Noe_Zec".split("_"),weekdays:"S\xfaladi_L\xfane\xe7i_Maitzi_M\xe1rcuri_Xh\xfaadi_Vi\xe9ner\xe7i_S\xe1turi".split("_"),weekdaysShort:"S\xfal_L\xfan_Mai_M\xe1r_Xh\xfa_Vi\xe9_S\xe1t".split("_"),weekdaysMin:"S\xfa_L\xfa_Ma_M\xe1_Xh_Vi_S\xe1".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD.MM.YYYY",LL:"D. MMMM [dallas] YYYY",LLL:"D. MMMM [dallas] YYYY HH.mm",LLLL:"dddd, [li] D. MMMM [dallas] YYYY HH.mm"},meridiemParse:/d\'o|d\'a/i,isPM:function(D){return"d'o"===D.toLowerCase()},meridiem:function(D,g,E){return D>11?E?"d'o":"D'O":E?"d'a":"D'A"},calendar:{sameDay:"[oxhi \xe0] LT",nextDay:"[dem\xe0 \xe0] LT",nextWeek:"dddd [\xe0] LT",lastDay:"[ieiri \xe0] LT",lastWeek:"[s\xfcr el] dddd [lasteu \xe0] LT",sameElse:"L"},relativeTime:{future:"osprei %s",past:"ja%s",s:l,ss:l,m:l,mm:l,h:l,hh:l,d:l,dd:l,M:l,MM:l,y:l,yy:l},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});function l(D,g,E,T){var n={s:["viensas secunds","'iensas secunds"],ss:[D+" secunds",D+" secunds"],m:["'n m\xedut","'iens m\xedut"],mm:[D+" m\xeduts",D+" m\xeduts"],h:["'n \xfeora","'iensa \xfeora"],hh:[D+" \xfeoras",D+" \xfeoras"],d:["'n ziua","'iensa ziua"],dd:[D+" ziuas",D+" ziuas"],M:["'n mes","'iens mes"],MM:[D+" mesen",D+" mesen"],y:["'n ar","'iens ar"],yy:[D+" ars",D+" ars"]};return T||g?n[E][0]:n[E][1]}}(p(15439))},61631:function(qe,I,p){!function(o){"use strict";o.defineLocale("tzm-latn",{months:"innayr_br\u02e4ayr\u02e4_mar\u02e4s\u02e4_ibrir_mayyw_ywnyw_ywlywz_\u0263w\u0161t_\u0161wtanbir_kt\u02e4wbr\u02e4_nwwanbir_dwjnbir".split("_"),monthsShort:"innayr_br\u02e4ayr\u02e4_mar\u02e4s\u02e4_ibrir_mayyw_ywnyw_ywlywz_\u0263w\u0161t_\u0161wtanbir_kt\u02e4wbr\u02e4_nwwanbir_dwjnbir".split("_"),weekdays:"asamas_aynas_asinas_akras_akwas_asimwas_asi\u1e0dyas".split("_"),weekdaysShort:"asamas_aynas_asinas_akras_akwas_asimwas_asi\u1e0dyas".split("_"),weekdaysMin:"asamas_aynas_asinas_akras_akwas_asimwas_asi\u1e0dyas".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[asdkh g] LT",nextDay:"[aska g] LT",nextWeek:"dddd [g] LT",lastDay:"[assant g] LT",lastWeek:"dddd [g] LT",sameElse:"L"},relativeTime:{future:"dadkh s yan %s",past:"yan %s",s:"imik",ss:"%d imik",m:"minu\u1e0d",mm:"%d minu\u1e0d",h:"sa\u025ba",hh:"%d tassa\u025bin",d:"ass",dd:"%d ossan",M:"ayowr",MM:"%d iyyirn",y:"asgas",yy:"%d isgasn"},week:{dow:6,doy:12}})}(p(15439))},61595:function(qe,I,p){!function(o){"use strict";o.defineLocale("tzm",{months:"\u2d49\u2d4f\u2d4f\u2d30\u2d62\u2d54_\u2d31\u2d55\u2d30\u2d62\u2d55_\u2d4e\u2d30\u2d55\u2d5a_\u2d49\u2d31\u2d54\u2d49\u2d54_\u2d4e\u2d30\u2d62\u2d62\u2d53_\u2d62\u2d53\u2d4f\u2d62\u2d53_\u2d62\u2d53\u2d4d\u2d62\u2d53\u2d63_\u2d56\u2d53\u2d5b\u2d5c_\u2d5b\u2d53\u2d5c\u2d30\u2d4f\u2d31\u2d49\u2d54_\u2d3d\u2d5f\u2d53\u2d31\u2d55_\u2d4f\u2d53\u2d61\u2d30\u2d4f\u2d31\u2d49\u2d54_\u2d37\u2d53\u2d4a\u2d4f\u2d31\u2d49\u2d54".split("_"),monthsShort:"\u2d49\u2d4f\u2d4f\u2d30\u2d62\u2d54_\u2d31\u2d55\u2d30\u2d62\u2d55_\u2d4e\u2d30\u2d55\u2d5a_\u2d49\u2d31\u2d54\u2d49\u2d54_\u2d4e\u2d30\u2d62\u2d62\u2d53_\u2d62\u2d53\u2d4f\u2d62\u2d53_\u2d62\u2d53\u2d4d\u2d62\u2d53\u2d63_\u2d56\u2d53\u2d5b\u2d5c_\u2d5b\u2d53\u2d5c\u2d30\u2d4f\u2d31\u2d49\u2d54_\u2d3d\u2d5f\u2d53\u2d31\u2d55_\u2d4f\u2d53\u2d61\u2d30\u2d4f\u2d31\u2d49\u2d54_\u2d37\u2d53\u2d4a\u2d4f\u2d31\u2d49\u2d54".split("_"),weekdays:"\u2d30\u2d59\u2d30\u2d4e\u2d30\u2d59_\u2d30\u2d62\u2d4f\u2d30\u2d59_\u2d30\u2d59\u2d49\u2d4f\u2d30\u2d59_\u2d30\u2d3d\u2d54\u2d30\u2d59_\u2d30\u2d3d\u2d61\u2d30\u2d59_\u2d30\u2d59\u2d49\u2d4e\u2d61\u2d30\u2d59_\u2d30\u2d59\u2d49\u2d39\u2d62\u2d30\u2d59".split("_"),weekdaysShort:"\u2d30\u2d59\u2d30\u2d4e\u2d30\u2d59_\u2d30\u2d62\u2d4f\u2d30\u2d59_\u2d30\u2d59\u2d49\u2d4f\u2d30\u2d59_\u2d30\u2d3d\u2d54\u2d30\u2d59_\u2d30\u2d3d\u2d61\u2d30\u2d59_\u2d30\u2d59\u2d49\u2d4e\u2d61\u2d30\u2d59_\u2d30\u2d59\u2d49\u2d39\u2d62\u2d30\u2d59".split("_"),weekdaysMin:"\u2d30\u2d59\u2d30\u2d4e\u2d30\u2d59_\u2d30\u2d62\u2d4f\u2d30\u2d59_\u2d30\u2d59\u2d49\u2d4f\u2d30\u2d59_\u2d30\u2d3d\u2d54\u2d30\u2d59_\u2d30\u2d3d\u2d61\u2d30\u2d59_\u2d30\u2d59\u2d49\u2d4e\u2d61\u2d30\u2d59_\u2d30\u2d59\u2d49\u2d39\u2d62\u2d30\u2d59".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[\u2d30\u2d59\u2d37\u2d45 \u2d34] LT",nextDay:"[\u2d30\u2d59\u2d3d\u2d30 \u2d34] LT",nextWeek:"dddd [\u2d34] LT",lastDay:"[\u2d30\u2d5a\u2d30\u2d4f\u2d5c \u2d34] LT",lastWeek:"dddd [\u2d34] LT",sameElse:"L"},relativeTime:{future:"\u2d37\u2d30\u2d37\u2d45 \u2d59 \u2d62\u2d30\u2d4f %s",past:"\u2d62\u2d30\u2d4f %s",s:"\u2d49\u2d4e\u2d49\u2d3d",ss:"%d \u2d49\u2d4e\u2d49\u2d3d",m:"\u2d4e\u2d49\u2d4f\u2d53\u2d3a",mm:"%d \u2d4e\u2d49\u2d4f\u2d53\u2d3a",h:"\u2d59\u2d30\u2d44\u2d30",hh:"%d \u2d5c\u2d30\u2d59\u2d59\u2d30\u2d44\u2d49\u2d4f",d:"\u2d30\u2d59\u2d59",dd:"%d o\u2d59\u2d59\u2d30\u2d4f",M:"\u2d30\u2d62o\u2d53\u2d54",MM:"%d \u2d49\u2d62\u2d62\u2d49\u2d54\u2d4f",y:"\u2d30\u2d59\u2d33\u2d30\u2d59",yy:"%d \u2d49\u2d59\u2d33\u2d30\u2d59\u2d4f"},week:{dow:6,doy:12}})}(p(15439))},6050:function(qe,I,p){!function(o){"use strict";o.defineLocale("ug-cn",{months:"\u064a\u0627\u0646\u06cb\u0627\u0631_\u0641\u06d0\u06cb\u0631\u0627\u0644_\u0645\u0627\u0631\u062a_\u0626\u0627\u067e\u0631\u06d0\u0644_\u0645\u0627\u064a_\u0626\u0649\u064a\u06c7\u0646_\u0626\u0649\u064a\u06c7\u0644_\u0626\u0627\u06cb\u063a\u06c7\u0633\u062a_\u0633\u06d0\u0646\u062a\u06d5\u0628\u0649\u0631_\u0626\u06c6\u0643\u062a\u06d5\u0628\u0649\u0631_\u0646\u0648\u064a\u0627\u0628\u0649\u0631_\u062f\u06d0\u0643\u0627\u0628\u0649\u0631".split("_"),monthsShort:"\u064a\u0627\u0646\u06cb\u0627\u0631_\u0641\u06d0\u06cb\u0631\u0627\u0644_\u0645\u0627\u0631\u062a_\u0626\u0627\u067e\u0631\u06d0\u0644_\u0645\u0627\u064a_\u0626\u0649\u064a\u06c7\u0646_\u0626\u0649\u064a\u06c7\u0644_\u0626\u0627\u06cb\u063a\u06c7\u0633\u062a_\u0633\u06d0\u0646\u062a\u06d5\u0628\u0649\u0631_\u0626\u06c6\u0643\u062a\u06d5\u0628\u0649\u0631_\u0646\u0648\u064a\u0627\u0628\u0649\u0631_\u062f\u06d0\u0643\u0627\u0628\u0649\u0631".split("_"),weekdays:"\u064a\u06d5\u0643\u0634\u06d5\u0646\u0628\u06d5_\u062f\u06c8\u0634\u06d5\u0646\u0628\u06d5_\u0633\u06d5\u064a\u0634\u06d5\u0646\u0628\u06d5_\u0686\u0627\u0631\u0634\u06d5\u0646\u0628\u06d5_\u067e\u06d5\u064a\u0634\u06d5\u0646\u0628\u06d5_\u062c\u06c8\u0645\u06d5_\u0634\u06d5\u0646\u0628\u06d5".split("_"),weekdaysShort:"\u064a\u06d5_\u062f\u06c8_\u0633\u06d5_\u0686\u0627_\u067e\u06d5_\u062c\u06c8_\u0634\u06d5".split("_"),weekdaysMin:"\u064a\u06d5_\u062f\u06c8_\u0633\u06d5_\u0686\u0627_\u067e\u06d5_\u062c\u06c8_\u0634\u06d5".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"YYYY-\u064a\u0649\u0644\u0649M-\u0626\u0627\u064a\u0646\u0649\u06adD-\u0643\u06c8\u0646\u0649",LLL:"YYYY-\u064a\u0649\u0644\u0649M-\u0626\u0627\u064a\u0646\u0649\u06adD-\u0643\u06c8\u0646\u0649\u060c HH:mm",LLLL:"dddd\u060c YYYY-\u064a\u0649\u0644\u0649M-\u0626\u0627\u064a\u0646\u0649\u06adD-\u0643\u06c8\u0646\u0649\u060c HH:mm"},meridiemParse:/\u064a\u06d0\u0631\u0649\u0645 \u0643\u06d0\u0686\u06d5|\u0633\u06d5\u06be\u06d5\u0631|\u0686\u06c8\u0634\u062a\u0649\u0646 \u0628\u06c7\u0631\u06c7\u0646|\u0686\u06c8\u0634|\u0686\u06c8\u0634\u062a\u0649\u0646 \u0643\u06d0\u064a\u0649\u0646|\u0643\u06d5\u0686/,meridiemHour:function(l,D){return 12===l&&(l=0),"\u064a\u06d0\u0631\u0649\u0645 \u0643\u06d0\u0686\u06d5"===D||"\u0633\u06d5\u06be\u06d5\u0631"===D||"\u0686\u06c8\u0634\u062a\u0649\u0646 \u0628\u06c7\u0631\u06c7\u0646"===D?l:"\u0686\u06c8\u0634\u062a\u0649\u0646 \u0643\u06d0\u064a\u0649\u0646"===D||"\u0643\u06d5\u0686"===D?l+12:l>=11?l:l+12},meridiem:function(l,D,g){var E=100*l+D;return E<600?"\u064a\u06d0\u0631\u0649\u0645 \u0643\u06d0\u0686\u06d5":E<900?"\u0633\u06d5\u06be\u06d5\u0631":E<1130?"\u0686\u06c8\u0634\u062a\u0649\u0646 \u0628\u06c7\u0631\u06c7\u0646":E<1230?"\u0686\u06c8\u0634":E<1800?"\u0686\u06c8\u0634\u062a\u0649\u0646 \u0643\u06d0\u064a\u0649\u0646":"\u0643\u06d5\u0686"},calendar:{sameDay:"[\u0628\u06c8\u06af\u06c8\u0646 \u0633\u0627\u0626\u06d5\u062a] LT",nextDay:"[\u0626\u06d5\u062a\u06d5 \u0633\u0627\u0626\u06d5\u062a] LT",nextWeek:"[\u0643\u06d0\u0644\u06d5\u0631\u0643\u0649] dddd [\u0633\u0627\u0626\u06d5\u062a] LT",lastDay:"[\u062a\u06c6\u0646\u06c8\u06af\u06c8\u0646] LT",lastWeek:"[\u0626\u0627\u0644\u062f\u0649\u0646\u0642\u0649] dddd [\u0633\u0627\u0626\u06d5\u062a] LT",sameElse:"L"},relativeTime:{future:"%s \u0643\u06d0\u064a\u0649\u0646",past:"%s \u0628\u06c7\u0631\u06c7\u0646",s:"\u0646\u06d5\u0686\u0686\u06d5 \u0633\u06d0\u0643\u0648\u0646\u062a",ss:"%d \u0633\u06d0\u0643\u0648\u0646\u062a",m:"\u0628\u0649\u0631 \u0645\u0649\u0646\u06c7\u062a",mm:"%d \u0645\u0649\u0646\u06c7\u062a",h:"\u0628\u0649\u0631 \u0633\u0627\u0626\u06d5\u062a",hh:"%d \u0633\u0627\u0626\u06d5\u062a",d:"\u0628\u0649\u0631 \u0643\u06c8\u0646",dd:"%d \u0643\u06c8\u0646",M:"\u0628\u0649\u0631 \u0626\u0627\u064a",MM:"%d \u0626\u0627\u064a",y:"\u0628\u0649\u0631 \u064a\u0649\u0644",yy:"%d \u064a\u0649\u0644"},dayOfMonthOrdinalParse:/\d{1,2}(-\u0643\u06c8\u0646\u0649|-\u0626\u0627\u064a|-\u06be\u06d5\u067e\u062a\u06d5)/,ordinal:function(l,D){switch(D){case"d":case"D":case"DDD":return l+"-\u0643\u06c8\u0646\u0649";case"w":case"W":return l+"-\u06be\u06d5\u067e\u062a\u06d5";default:return l}},preparse:function(l){return l.replace(/\u060c/g,",")},postformat:function(l){return l.replace(/,/g,"\u060c")},week:{dow:1,doy:7}})}(p(15439))},65610:function(qe,I,p){!function(o){"use strict";function e(T,n){var P=T.split("_");return n%10==1&&n%100!=11?P[0]:n%10>=2&&n%10<=4&&(n%100<10||n%100>=20)?P[1]:P[2]}function l(T,n,P){return"m"===P?n?"\u0445\u0432\u0438\u043b\u0438\u043d\u0430":"\u0445\u0432\u0438\u043b\u0438\u043d\u0443":"h"===P?n?"\u0433\u043e\u0434\u0438\u043d\u0430":"\u0433\u043e\u0434\u0438\u043d\u0443":T+" "+e({ss:n?"\u0441\u0435\u043a\u0443\u043d\u0434\u0430_\u0441\u0435\u043a\u0443\u043d\u0434\u0438_\u0441\u0435\u043a\u0443\u043d\u0434":"\u0441\u0435\u043a\u0443\u043d\u0434\u0443_\u0441\u0435\u043a\u0443\u043d\u0434\u0438_\u0441\u0435\u043a\u0443\u043d\u0434",mm:n?"\u0445\u0432\u0438\u043b\u0438\u043d\u0430_\u0445\u0432\u0438\u043b\u0438\u043d\u0438_\u0445\u0432\u0438\u043b\u0438\u043d":"\u0445\u0432\u0438\u043b\u0438\u043d\u0443_\u0445\u0432\u0438\u043b\u0438\u043d\u0438_\u0445\u0432\u0438\u043b\u0438\u043d",hh:n?"\u0433\u043e\u0434\u0438\u043d\u0430_\u0433\u043e\u0434\u0438\u043d\u0438_\u0433\u043e\u0434\u0438\u043d":"\u0433\u043e\u0434\u0438\u043d\u0443_\u0433\u043e\u0434\u0438\u043d\u0438_\u0433\u043e\u0434\u0438\u043d",dd:"\u0434\u0435\u043d\u044c_\u0434\u043d\u0456_\u0434\u043d\u0456\u0432",MM:"\u043c\u0456\u0441\u044f\u0446\u044c_\u043c\u0456\u0441\u044f\u0446\u0456_\u043c\u0456\u0441\u044f\u0446\u0456\u0432",yy:"\u0440\u0456\u043a_\u0440\u043e\u043a\u0438_\u0440\u043e\u043a\u0456\u0432"}[P],+T)}function D(T,n){var P={nominative:"\u043d\u0435\u0434\u0456\u043b\u044f_\u043f\u043e\u043d\u0435\u0434\u0456\u043b\u043e\u043a_\u0432\u0456\u0432\u0442\u043e\u0440\u043e\u043a_\u0441\u0435\u0440\u0435\u0434\u0430_\u0447\u0435\u0442\u0432\u0435\u0440_\u043f\u2019\u044f\u0442\u043d\u0438\u0446\u044f_\u0441\u0443\u0431\u043e\u0442\u0430".split("_"),accusative:"\u043d\u0435\u0434\u0456\u043b\u044e_\u043f\u043e\u043d\u0435\u0434\u0456\u043b\u043e\u043a_\u0432\u0456\u0432\u0442\u043e\u0440\u043e\u043a_\u0441\u0435\u0440\u0435\u0434\u0443_\u0447\u0435\u0442\u0432\u0435\u0440_\u043f\u2019\u044f\u0442\u043d\u0438\u0446\u044e_\u0441\u0443\u0431\u043e\u0442\u0443".split("_"),genitive:"\u043d\u0435\u0434\u0456\u043b\u0456_\u043f\u043e\u043d\u0435\u0434\u0456\u043b\u043a\u0430_\u0432\u0456\u0432\u0442\u043e\u0440\u043a\u0430_\u0441\u0435\u0440\u0435\u0434\u0438_\u0447\u0435\u0442\u0432\u0435\u0440\u0433\u0430_\u043f\u2019\u044f\u0442\u043d\u0438\u0446\u0456_\u0441\u0443\u0431\u043e\u0442\u0438".split("_")};return!0===T?P.nominative.slice(1,7).concat(P.nominative.slice(0,1)):T?P[/(\[[\u0412\u0432\u0423\u0443]\]) ?dddd/.test(n)?"accusative":/\[?(?:\u043c\u0438\u043d\u0443\u043b\u043e\u0457|\u043d\u0430\u0441\u0442\u0443\u043f\u043d\u043e\u0457)? ?\] ?dddd/.test(n)?"genitive":"nominative"][T.day()]:P.nominative}function g(T){return function(){return T+"\u043e"+(11===this.hours()?"\u0431":"")+"] LT"}}o.defineLocale("uk",{months:{format:"\u0441\u0456\u0447\u043d\u044f_\u043b\u044e\u0442\u043e\u0433\u043e_\u0431\u0435\u0440\u0435\u0437\u043d\u044f_\u043a\u0432\u0456\u0442\u043d\u044f_\u0442\u0440\u0430\u0432\u043d\u044f_\u0447\u0435\u0440\u0432\u043d\u044f_\u043b\u0438\u043f\u043d\u044f_\u0441\u0435\u0440\u043f\u043d\u044f_\u0432\u0435\u0440\u0435\u0441\u043d\u044f_\u0436\u043e\u0432\u0442\u043d\u044f_\u043b\u0438\u0441\u0442\u043e\u043f\u0430\u0434\u0430_\u0433\u0440\u0443\u0434\u043d\u044f".split("_"),standalone:"\u0441\u0456\u0447\u0435\u043d\u044c_\u043b\u044e\u0442\u0438\u0439_\u0431\u0435\u0440\u0435\u0437\u0435\u043d\u044c_\u043a\u0432\u0456\u0442\u0435\u043d\u044c_\u0442\u0440\u0430\u0432\u0435\u043d\u044c_\u0447\u0435\u0440\u0432\u0435\u043d\u044c_\u043b\u0438\u043f\u0435\u043d\u044c_\u0441\u0435\u0440\u043f\u0435\u043d\u044c_\u0432\u0435\u0440\u0435\u0441\u0435\u043d\u044c_\u0436\u043e\u0432\u0442\u0435\u043d\u044c_\u043b\u0438\u0441\u0442\u043e\u043f\u0430\u0434_\u0433\u0440\u0443\u0434\u0435\u043d\u044c".split("_")},monthsShort:"\u0441\u0456\u0447_\u043b\u044e\u0442_\u0431\u0435\u0440_\u043a\u0432\u0456\u0442_\u0442\u0440\u0430\u0432_\u0447\u0435\u0440\u0432_\u043b\u0438\u043f_\u0441\u0435\u0440\u043f_\u0432\u0435\u0440_\u0436\u043e\u0432\u0442_\u043b\u0438\u0441\u0442_\u0433\u0440\u0443\u0434".split("_"),weekdays:D,weekdaysShort:"\u043d\u0434_\u043f\u043d_\u0432\u0442_\u0441\u0440_\u0447\u0442_\u043f\u0442_\u0441\u0431".split("_"),weekdaysMin:"\u043d\u0434_\u043f\u043d_\u0432\u0442_\u0441\u0440_\u0447\u0442_\u043f\u0442_\u0441\u0431".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY \u0440.",LLL:"D MMMM YYYY \u0440., HH:mm",LLLL:"dddd, D MMMM YYYY \u0440., HH:mm"},calendar:{sameDay:g("[\u0421\u044c\u043e\u0433\u043e\u0434\u043d\u0456 "),nextDay:g("[\u0417\u0430\u0432\u0442\u0440\u0430 "),lastDay:g("[\u0412\u0447\u043e\u0440\u0430 "),nextWeek:g("[\u0423] dddd ["),lastWeek:function(){switch(this.day()){case 0:case 3:case 5:case 6:return g("[\u041c\u0438\u043d\u0443\u043b\u043e\u0457] dddd [").call(this);case 1:case 2:case 4:return g("[\u041c\u0438\u043d\u0443\u043b\u043e\u0433\u043e] dddd [").call(this)}},sameElse:"L"},relativeTime:{future:"\u0437\u0430 %s",past:"%s \u0442\u043e\u043c\u0443",s:"\u0434\u0435\u043a\u0456\u043b\u044c\u043a\u0430 \u0441\u0435\u043a\u0443\u043d\u0434",ss:l,m:l,mm:l,h:"\u0433\u043e\u0434\u0438\u043d\u0443",hh:l,d:"\u0434\u0435\u043d\u044c",dd:l,M:"\u043c\u0456\u0441\u044f\u0446\u044c",MM:l,y:"\u0440\u0456\u043a",yy:l},meridiemParse:/\u043d\u043e\u0447\u0456|\u0440\u0430\u043d\u043a\u0443|\u0434\u043d\u044f|\u0432\u0435\u0447\u043e\u0440\u0430/,isPM:function(T){return/^(\u0434\u043d\u044f|\u0432\u0435\u0447\u043e\u0440\u0430)$/.test(T)},meridiem:function(T,n,P){return T<4?"\u043d\u043e\u0447\u0456":T<12?"\u0440\u0430\u043d\u043a\u0443":T<17?"\u0434\u043d\u044f":"\u0432\u0435\u0447\u043e\u0440\u0430"},dayOfMonthOrdinalParse:/\d{1,2}-(\u0439|\u0433\u043e)/,ordinal:function(T,n){switch(n){case"M":case"d":case"DDD":case"w":case"W":return T+"-\u0439";case"D":return T+"-\u0433\u043e";default:return T}},week:{dow:1,doy:7}})}(p(15439))},86077:function(qe,I,p){!function(o){"use strict";var e=["\u062c\u0646\u0648\u0631\u06cc","\u0641\u0631\u0648\u0631\u06cc","\u0645\u0627\u0631\u0686","\u0627\u067e\u0631\u06cc\u0644","\u0645\u0626\u06cc","\u062c\u0648\u0646","\u062c\u0648\u0644\u0627\u0626\u06cc","\u0627\u06af\u0633\u062a","\u0633\u062a\u0645\u0628\u0631","\u0627\u06a9\u062a\u0648\u0628\u0631","\u0646\u0648\u0645\u0628\u0631","\u062f\u0633\u0645\u0628\u0631"],l=["\u0627\u062a\u0648\u0627\u0631","\u067e\u06cc\u0631","\u0645\u0646\u06af\u0644","\u0628\u062f\u06be","\u062c\u0645\u0639\u0631\u0627\u062a","\u062c\u0645\u0639\u06c1","\u06c1\u0641\u062a\u06c1"];o.defineLocale("ur",{months:e,monthsShort:e,weekdays:l,weekdaysShort:l,weekdaysMin:l,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd\u060c D MMMM YYYY HH:mm"},meridiemParse:/\u0635\u0628\u062d|\u0634\u0627\u0645/,isPM:function(g){return"\u0634\u0627\u0645"===g},meridiem:function(g,E,T){return g<12?"\u0635\u0628\u062d":"\u0634\u0627\u0645"},calendar:{sameDay:"[\u0622\u062c \u0628\u0648\u0642\u062a] LT",nextDay:"[\u06a9\u0644 \u0628\u0648\u0642\u062a] LT",nextWeek:"dddd [\u0628\u0648\u0642\u062a] LT",lastDay:"[\u06af\u0630\u0634\u062a\u06c1 \u0631\u0648\u0632 \u0628\u0648\u0642\u062a] LT",lastWeek:"[\u06af\u0630\u0634\u062a\u06c1] dddd [\u0628\u0648\u0642\u062a] LT",sameElse:"L"},relativeTime:{future:"%s \u0628\u0639\u062f",past:"%s \u0642\u0628\u0644",s:"\u0686\u0646\u062f \u0633\u06cc\u06a9\u0646\u0688",ss:"%d \u0633\u06cc\u06a9\u0646\u0688",m:"\u0627\u06cc\u06a9 \u0645\u0646\u0679",mm:"%d \u0645\u0646\u0679",h:"\u0627\u06cc\u06a9 \u06af\u06be\u0646\u0679\u06c1",hh:"%d \u06af\u06be\u0646\u0679\u06d2",d:"\u0627\u06cc\u06a9 \u062f\u0646",dd:"%d \u062f\u0646",M:"\u0627\u06cc\u06a9 \u0645\u0627\u06c1",MM:"%d \u0645\u0627\u06c1",y:"\u0627\u06cc\u06a9 \u0633\u0627\u0644",yy:"%d \u0633\u0627\u0644"},preparse:function(g){return g.replace(/\u060c/g,",")},postformat:function(g){return g.replace(/,/g,"\u060c")},week:{dow:1,doy:4}})}(p(15439))},12207:function(qe,I,p){!function(o){"use strict";o.defineLocale("uz-latn",{months:"Yanvar_Fevral_Mart_Aprel_May_Iyun_Iyul_Avgust_Sentabr_Oktabr_Noyabr_Dekabr".split("_"),monthsShort:"Yan_Fev_Mar_Apr_May_Iyun_Iyul_Avg_Sen_Okt_Noy_Dek".split("_"),weekdays:"Yakshanba_Dushanba_Seshanba_Chorshanba_Payshanba_Juma_Shanba".split("_"),weekdaysShort:"Yak_Dush_Sesh_Chor_Pay_Jum_Shan".split("_"),weekdaysMin:"Ya_Du_Se_Cho_Pa_Ju_Sha".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"D MMMM YYYY, dddd HH:mm"},calendar:{sameDay:"[Bugun soat] LT [da]",nextDay:"[Ertaga] LT [da]",nextWeek:"dddd [kuni soat] LT [da]",lastDay:"[Kecha soat] LT [da]",lastWeek:"[O'tgan] dddd [kuni soat] LT [da]",sameElse:"L"},relativeTime:{future:"Yaqin %s ichida",past:"Bir necha %s oldin",s:"soniya",ss:"%d soniya",m:"bir daqiqa",mm:"%d daqiqa",h:"bir soat",hh:"%d soat",d:"bir kun",dd:"%d kun",M:"bir oy",MM:"%d oy",y:"bir yil",yy:"%d yil"},week:{dow:1,doy:7}})}(p(15439))},22862:function(qe,I,p){!function(o){"use strict";o.defineLocale("uz",{months:"\u044f\u043d\u0432\u0430\u0440_\u0444\u0435\u0432\u0440\u0430\u043b_\u043c\u0430\u0440\u0442_\u0430\u043f\u0440\u0435\u043b_\u043c\u0430\u0439_\u0438\u044e\u043d_\u0438\u044e\u043b_\u0430\u0432\u0433\u0443\u0441\u0442_\u0441\u0435\u043d\u0442\u044f\u0431\u0440_\u043e\u043a\u0442\u044f\u0431\u0440_\u043d\u043e\u044f\u0431\u0440_\u0434\u0435\u043a\u0430\u0431\u0440".split("_"),monthsShort:"\u044f\u043d\u0432_\u0444\u0435\u0432_\u043c\u0430\u0440_\u0430\u043f\u0440_\u043c\u0430\u0439_\u0438\u044e\u043d_\u0438\u044e\u043b_\u0430\u0432\u0433_\u0441\u0435\u043d_\u043e\u043a\u0442_\u043d\u043e\u044f_\u0434\u0435\u043a".split("_"),weekdays:"\u042f\u043a\u0448\u0430\u043d\u0431\u0430_\u0414\u0443\u0448\u0430\u043d\u0431\u0430_\u0421\u0435\u0448\u0430\u043d\u0431\u0430_\u0427\u043e\u0440\u0448\u0430\u043d\u0431\u0430_\u041f\u0430\u0439\u0448\u0430\u043d\u0431\u0430_\u0416\u0443\u043c\u0430_\u0428\u0430\u043d\u0431\u0430".split("_"),weekdaysShort:"\u042f\u043a\u0448_\u0414\u0443\u0448_\u0421\u0435\u0448_\u0427\u043e\u0440_\u041f\u0430\u0439_\u0416\u0443\u043c_\u0428\u0430\u043d".split("_"),weekdaysMin:"\u042f\u043a_\u0414\u0443_\u0421\u0435_\u0427\u043e_\u041f\u0430_\u0416\u0443_\u0428\u0430".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"D MMMM YYYY, dddd HH:mm"},calendar:{sameDay:"[\u0411\u0443\u0433\u0443\u043d \u0441\u043e\u0430\u0442] LT [\u0434\u0430]",nextDay:"[\u042d\u0440\u0442\u0430\u0433\u0430] LT [\u0434\u0430]",nextWeek:"dddd [\u043a\u0443\u043d\u0438 \u0441\u043e\u0430\u0442] LT [\u0434\u0430]",lastDay:"[\u041a\u0435\u0447\u0430 \u0441\u043e\u0430\u0442] LT [\u0434\u0430]",lastWeek:"[\u0423\u0442\u0433\u0430\u043d] dddd [\u043a\u0443\u043d\u0438 \u0441\u043e\u0430\u0442] LT [\u0434\u0430]",sameElse:"L"},relativeTime:{future:"\u042f\u043a\u0438\u043d %s \u0438\u0447\u0438\u0434\u0430",past:"\u0411\u0438\u0440 \u043d\u0435\u0447\u0430 %s \u043e\u043b\u0434\u0438\u043d",s:"\u0444\u0443\u0440\u0441\u0430\u0442",ss:"%d \u0444\u0443\u0440\u0441\u0430\u0442",m:"\u0431\u0438\u0440 \u0434\u0430\u043a\u0438\u043a\u0430",mm:"%d \u0434\u0430\u043a\u0438\u043a\u0430",h:"\u0431\u0438\u0440 \u0441\u043e\u0430\u0442",hh:"%d \u0441\u043e\u0430\u0442",d:"\u0431\u0438\u0440 \u043a\u0443\u043d",dd:"%d \u043a\u0443\u043d",M:"\u0431\u0438\u0440 \u043e\u0439",MM:"%d \u043e\u0439",y:"\u0431\u0438\u0440 \u0439\u0438\u043b",yy:"%d \u0439\u0438\u043b"},week:{dow:1,doy:7}})}(p(15439))},48093:function(qe,I,p){!function(o){"use strict";o.defineLocale("vi",{months:"th\xe1ng 1_th\xe1ng 2_th\xe1ng 3_th\xe1ng 4_th\xe1ng 5_th\xe1ng 6_th\xe1ng 7_th\xe1ng 8_th\xe1ng 9_th\xe1ng 10_th\xe1ng 11_th\xe1ng 12".split("_"),monthsShort:"Thg 01_Thg 02_Thg 03_Thg 04_Thg 05_Thg 06_Thg 07_Thg 08_Thg 09_Thg 10_Thg 11_Thg 12".split("_"),monthsParseExact:!0,weekdays:"ch\u1ee7 nh\u1eadt_th\u1ee9 hai_th\u1ee9 ba_th\u1ee9 t\u01b0_th\u1ee9 n\u0103m_th\u1ee9 s\xe1u_th\u1ee9 b\u1ea3y".split("_"),weekdaysShort:"CN_T2_T3_T4_T5_T6_T7".split("_"),weekdaysMin:"CN_T2_T3_T4_T5_T6_T7".split("_"),weekdaysParseExact:!0,meridiemParse:/sa|ch/i,isPM:function(l){return/^ch$/i.test(l)},meridiem:function(l,D,g){return l<12?g?"sa":"SA":g?"ch":"CH"},longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM [n\u0103m] YYYY",LLL:"D MMMM [n\u0103m] YYYY HH:mm",LLLL:"dddd, D MMMM [n\u0103m] YYYY HH:mm",l:"DD/M/YYYY",ll:"D MMM YYYY",lll:"D MMM YYYY HH:mm",llll:"ddd, D MMM YYYY HH:mm"},calendar:{sameDay:"[H\xf4m nay l\xfac] LT",nextDay:"[Ng\xe0y mai l\xfac] LT",nextWeek:"dddd [tu\u1ea7n t\u1edbi l\xfac] LT",lastDay:"[H\xf4m qua l\xfac] LT",lastWeek:"dddd [tu\u1ea7n tr\u01b0\u1edbc l\xfac] LT",sameElse:"L"},relativeTime:{future:"%s t\u1edbi",past:"%s tr\u01b0\u1edbc",s:"v\xe0i gi\xe2y",ss:"%d gi\xe2y",m:"m\u1ed9t ph\xfat",mm:"%d ph\xfat",h:"m\u1ed9t gi\u1edd",hh:"%d gi\u1edd",d:"m\u1ed9t ng\xe0y",dd:"%d ng\xe0y",w:"m\u1ed9t tu\u1ea7n",ww:"%d tu\u1ea7n",M:"m\u1ed9t th\xe1ng",MM:"%d th\xe1ng",y:"m\u1ed9t n\u0103m",yy:"%d n\u0103m"},dayOfMonthOrdinalParse:/\d{1,2}/,ordinal:function(l){return l},week:{dow:1,doy:4}})}(p(15439))},25590:function(qe,I,p){!function(o){"use strict";o.defineLocale("x-pseudo",{months:"J~\xe1\xf1\xfa\xe1~r\xfd_F~\xe9br\xfa~\xe1r\xfd_~M\xe1rc~h_\xc1p~r\xedl_~M\xe1\xfd_~J\xfa\xf1\xe9~_J\xfal~\xfd_\xc1\xfa~g\xfast~_S\xe9p~t\xe9mb~\xe9r_\xd3~ct\xf3b~\xe9r_\xd1~\xf3v\xe9m~b\xe9r_~D\xe9c\xe9~mb\xe9r".split("_"),monthsShort:"J~\xe1\xf1_~F\xe9b_~M\xe1r_~\xc1pr_~M\xe1\xfd_~J\xfa\xf1_~J\xfal_~\xc1\xfag_~S\xe9p_~\xd3ct_~\xd1\xf3v_~D\xe9c".split("_"),monthsParseExact:!0,weekdays:"S~\xfa\xf1d\xe1~\xfd_M\xf3~\xf1d\xe1\xfd~_T\xfa\xe9~sd\xe1\xfd~_W\xe9d~\xf1\xe9sd~\xe1\xfd_T~h\xfars~d\xe1\xfd_~Fr\xedd~\xe1\xfd_S~\xe1t\xfar~d\xe1\xfd".split("_"),weekdaysShort:"S~\xfa\xf1_~M\xf3\xf1_~T\xfa\xe9_~W\xe9d_~Th\xfa_~Fr\xed_~S\xe1t".split("_"),weekdaysMin:"S~\xfa_M\xf3~_T\xfa_~W\xe9_T~h_Fr~_S\xe1".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[T~\xf3d\xe1~\xfd \xe1t] LT",nextDay:"[T~\xf3m\xf3~rr\xf3~w \xe1t] LT",nextWeek:"dddd [\xe1t] LT",lastDay:"[\xdd~\xe9st~\xe9rd\xe1~\xfd \xe1t] LT",lastWeek:"[L~\xe1st] dddd [\xe1t] LT",sameElse:"L"},relativeTime:{future:"\xed~\xf1 %s",past:"%s \xe1~g\xf3",s:"\xe1 ~f\xe9w ~s\xe9c\xf3~\xf1ds",ss:"%d s~\xe9c\xf3\xf1~ds",m:"\xe1 ~m\xed\xf1~\xfat\xe9",mm:"%d m~\xed\xf1\xfa~t\xe9s",h:"\xe1~\xf1 h\xf3~\xfar",hh:"%d h~\xf3\xfars",d:"\xe1 ~d\xe1\xfd",dd:"%d d~\xe1\xfds",M:"\xe1 ~m\xf3\xf1~th",MM:"%d m~\xf3\xf1t~hs",y:"\xe1 ~\xfd\xe9\xe1r",yy:"%d \xfd~\xe9\xe1rs"},dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(l){var D=l%10;return l+(1==~~(l%100/10)?"th":1===D?"st":2===D?"nd":3===D?"rd":"th")},week:{dow:1,doy:4}})}(p(15439))},9058:function(qe,I,p){!function(o){"use strict";o.defineLocale("yo",{months:"S\u1eb9\u0301r\u1eb9\u0301_E\u0300re\u0300le\u0300_\u1eb8r\u1eb9\u0300na\u0300_I\u0300gbe\u0301_E\u0300bibi_O\u0300ku\u0300du_Ag\u1eb9mo_O\u0300gu\u0301n_Owewe_\u1ecc\u0300wa\u0300ra\u0300_Be\u0301lu\u0301_\u1ecc\u0300p\u1eb9\u0300\u0300".split("_"),monthsShort:"S\u1eb9\u0301r_E\u0300rl_\u1eb8rn_I\u0300gb_E\u0300bi_O\u0300ku\u0300_Ag\u1eb9_O\u0300gu\u0301_Owe_\u1ecc\u0300wa\u0300_Be\u0301l_\u1ecc\u0300p\u1eb9\u0300\u0300".split("_"),weekdays:"A\u0300i\u0300ku\u0301_Aje\u0301_I\u0300s\u1eb9\u0301gun_\u1eccj\u1ecd\u0301ru\u0301_\u1eccj\u1ecd\u0301b\u1ecd_\u1eb8ti\u0300_A\u0300ba\u0301m\u1eb9\u0301ta".split("_"),weekdaysShort:"A\u0300i\u0300k_Aje\u0301_I\u0300s\u1eb9\u0301_\u1eccjr_\u1eccjb_\u1eb8ti\u0300_A\u0300ba\u0301".split("_"),weekdaysMin:"A\u0300i\u0300_Aj_I\u0300s_\u1eccr_\u1eccb_\u1eb8t_A\u0300b".split("_"),longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendar:{sameDay:"[O\u0300ni\u0300 ni] LT",nextDay:"[\u1ecc\u0300la ni] LT",nextWeek:"dddd [\u1eccs\u1eb9\u0300 to\u0301n'b\u1ecd] [ni] LT",lastDay:"[A\u0300na ni] LT",lastWeek:"dddd [\u1eccs\u1eb9\u0300 to\u0301l\u1ecd\u0301] [ni] LT",sameElse:"L"},relativeTime:{future:"ni\u0301 %s",past:"%s k\u1ecdja\u0301",s:"i\u0300s\u1eb9ju\u0301 aaya\u0301 die",ss:"aaya\u0301 %d",m:"i\u0300s\u1eb9ju\u0301 kan",mm:"i\u0300s\u1eb9ju\u0301 %d",h:"wa\u0301kati kan",hh:"wa\u0301kati %d",d:"\u1ecdj\u1ecd\u0301 kan",dd:"\u1ecdj\u1ecd\u0301 %d",M:"osu\u0300 kan",MM:"osu\u0300 %d",y:"\u1ecddu\u0301n kan",yy:"\u1ecddu\u0301n %d"},dayOfMonthOrdinalParse:/\u1ecdj\u1ecd\u0301\s\d{1,2}/,ordinal:"\u1ecdj\u1ecd\u0301 %d",week:{dow:1,doy:4}})}(p(15439))},77908:function(qe,I,p){!function(o){"use strict";o.defineLocale("zh-cn",{months:"\u4e00\u6708_\u4e8c\u6708_\u4e09\u6708_\u56db\u6708_\u4e94\u6708_\u516d\u6708_\u4e03\u6708_\u516b\u6708_\u4e5d\u6708_\u5341\u6708_\u5341\u4e00\u6708_\u5341\u4e8c\u6708".split("_"),monthsShort:"1\u6708_2\u6708_3\u6708_4\u6708_5\u6708_6\u6708_7\u6708_8\u6708_9\u6708_10\u6708_11\u6708_12\u6708".split("_"),weekdays:"\u661f\u671f\u65e5_\u661f\u671f\u4e00_\u661f\u671f\u4e8c_\u661f\u671f\u4e09_\u661f\u671f\u56db_\u661f\u671f\u4e94_\u661f\u671f\u516d".split("_"),weekdaysShort:"\u5468\u65e5_\u5468\u4e00_\u5468\u4e8c_\u5468\u4e09_\u5468\u56db_\u5468\u4e94_\u5468\u516d".split("_"),weekdaysMin:"\u65e5_\u4e00_\u4e8c_\u4e09_\u56db_\u4e94_\u516d".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY\u5e74M\u6708D\u65e5",LLL:"YYYY\u5e74M\u6708D\u65e5Ah\u70b9mm\u5206",LLLL:"YYYY\u5e74M\u6708D\u65e5ddddAh\u70b9mm\u5206",l:"YYYY/M/D",ll:"YYYY\u5e74M\u6708D\u65e5",lll:"YYYY\u5e74M\u6708D\u65e5 HH:mm",llll:"YYYY\u5e74M\u6708D\u65e5dddd HH:mm"},meridiemParse:/\u51cc\u6668|\u65e9\u4e0a|\u4e0a\u5348|\u4e2d\u5348|\u4e0b\u5348|\u665a\u4e0a/,meridiemHour:function(l,D){return 12===l&&(l=0),"\u51cc\u6668"===D||"\u65e9\u4e0a"===D||"\u4e0a\u5348"===D?l:"\u4e0b\u5348"===D||"\u665a\u4e0a"===D?l+12:l>=11?l:l+12},meridiem:function(l,D,g){var E=100*l+D;return E<600?"\u51cc\u6668":E<900?"\u65e9\u4e0a":E<1130?"\u4e0a\u5348":E<1230?"\u4e2d\u5348":E<1800?"\u4e0b\u5348":"\u665a\u4e0a"},calendar:{sameDay:"[\u4eca\u5929]LT",nextDay:"[\u660e\u5929]LT",nextWeek:function(l){return l.week()!==this.week()?"[\u4e0b]dddLT":"[\u672c]dddLT"},lastDay:"[\u6628\u5929]LT",lastWeek:function(l){return this.week()!==l.week()?"[\u4e0a]dddLT":"[\u672c]dddLT"},sameElse:"L"},dayOfMonthOrdinalParse:/\d{1,2}(\u65e5|\u6708|\u5468)/,ordinal:function(l,D){switch(D){case"d":case"D":case"DDD":return l+"\u65e5";case"M":return l+"\u6708";case"w":case"W":return l+"\u5468";default:return l}},relativeTime:{future:"%s\u540e",past:"%s\u524d",s:"\u51e0\u79d2",ss:"%d \u79d2",m:"1 \u5206\u949f",mm:"%d \u5206\u949f",h:"1 \u5c0f\u65f6",hh:"%d \u5c0f\u65f6",d:"1 \u5929",dd:"%d \u5929",w:"1 \u5468",ww:"%d \u5468",M:"1 \u4e2a\u6708",MM:"%d \u4e2a\u6708",y:"1 \u5e74",yy:"%d \u5e74"},week:{dow:1,doy:4}})}(p(15439))},8867:function(qe,I,p){!function(o){"use strict";o.defineLocale("zh-hk",{months:"\u4e00\u6708_\u4e8c\u6708_\u4e09\u6708_\u56db\u6708_\u4e94\u6708_\u516d\u6708_\u4e03\u6708_\u516b\u6708_\u4e5d\u6708_\u5341\u6708_\u5341\u4e00\u6708_\u5341\u4e8c\u6708".split("_"),monthsShort:"1\u6708_2\u6708_3\u6708_4\u6708_5\u6708_6\u6708_7\u6708_8\u6708_9\u6708_10\u6708_11\u6708_12\u6708".split("_"),weekdays:"\u661f\u671f\u65e5_\u661f\u671f\u4e00_\u661f\u671f\u4e8c_\u661f\u671f\u4e09_\u661f\u671f\u56db_\u661f\u671f\u4e94_\u661f\u671f\u516d".split("_"),weekdaysShort:"\u9031\u65e5_\u9031\u4e00_\u9031\u4e8c_\u9031\u4e09_\u9031\u56db_\u9031\u4e94_\u9031\u516d".split("_"),weekdaysMin:"\u65e5_\u4e00_\u4e8c_\u4e09_\u56db_\u4e94_\u516d".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY\u5e74M\u6708D\u65e5",LLL:"YYYY\u5e74M\u6708D\u65e5 HH:mm",LLLL:"YYYY\u5e74M\u6708D\u65e5dddd HH:mm",l:"YYYY/M/D",ll:"YYYY\u5e74M\u6708D\u65e5",lll:"YYYY\u5e74M\u6708D\u65e5 HH:mm",llll:"YYYY\u5e74M\u6708D\u65e5dddd HH:mm"},meridiemParse:/\u51cc\u6668|\u65e9\u4e0a|\u4e0a\u5348|\u4e2d\u5348|\u4e0b\u5348|\u665a\u4e0a/,meridiemHour:function(l,D){return 12===l&&(l=0),"\u51cc\u6668"===D||"\u65e9\u4e0a"===D||"\u4e0a\u5348"===D?l:"\u4e2d\u5348"===D?l>=11?l:l+12:"\u4e0b\u5348"===D||"\u665a\u4e0a"===D?l+12:void 0},meridiem:function(l,D,g){var E=100*l+D;return E<600?"\u51cc\u6668":E<900?"\u65e9\u4e0a":E<1200?"\u4e0a\u5348":1200===E?"\u4e2d\u5348":E<1800?"\u4e0b\u5348":"\u665a\u4e0a"},calendar:{sameDay:"[\u4eca\u5929]LT",nextDay:"[\u660e\u5929]LT",nextWeek:"[\u4e0b]ddddLT",lastDay:"[\u6628\u5929]LT",lastWeek:"[\u4e0a]ddddLT",sameElse:"L"},dayOfMonthOrdinalParse:/\d{1,2}(\u65e5|\u6708|\u9031)/,ordinal:function(l,D){switch(D){case"d":case"D":case"DDD":return l+"\u65e5";case"M":return l+"\u6708";case"w":case"W":return l+"\u9031";default:return l}},relativeTime:{future:"%s\u5f8c",past:"%s\u524d",s:"\u5e7e\u79d2",ss:"%d \u79d2",m:"1 \u5206\u9418",mm:"%d \u5206\u9418",h:"1 \u5c0f\u6642",hh:"%d \u5c0f\u6642",d:"1 \u5929",dd:"%d \u5929",M:"1 \u500b\u6708",MM:"%d \u500b\u6708",y:"1 \u5e74",yy:"%d \u5e74"}})}(p(15439))},31133:function(qe,I,p){!function(o){"use strict";o.defineLocale("zh-mo",{months:"\u4e00\u6708_\u4e8c\u6708_\u4e09\u6708_\u56db\u6708_\u4e94\u6708_\u516d\u6708_\u4e03\u6708_\u516b\u6708_\u4e5d\u6708_\u5341\u6708_\u5341\u4e00\u6708_\u5341\u4e8c\u6708".split("_"),monthsShort:"1\u6708_2\u6708_3\u6708_4\u6708_5\u6708_6\u6708_7\u6708_8\u6708_9\u6708_10\u6708_11\u6708_12\u6708".split("_"),weekdays:"\u661f\u671f\u65e5_\u661f\u671f\u4e00_\u661f\u671f\u4e8c_\u661f\u671f\u4e09_\u661f\u671f\u56db_\u661f\u671f\u4e94_\u661f\u671f\u516d".split("_"),weekdaysShort:"\u9031\u65e5_\u9031\u4e00_\u9031\u4e8c_\u9031\u4e09_\u9031\u56db_\u9031\u4e94_\u9031\u516d".split("_"),weekdaysMin:"\u65e5_\u4e00_\u4e8c_\u4e09_\u56db_\u4e94_\u516d".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"YYYY\u5e74M\u6708D\u65e5",LLL:"YYYY\u5e74M\u6708D\u65e5 HH:mm",LLLL:"YYYY\u5e74M\u6708D\u65e5dddd HH:mm",l:"D/M/YYYY",ll:"YYYY\u5e74M\u6708D\u65e5",lll:"YYYY\u5e74M\u6708D\u65e5 HH:mm",llll:"YYYY\u5e74M\u6708D\u65e5dddd HH:mm"},meridiemParse:/\u51cc\u6668|\u65e9\u4e0a|\u4e0a\u5348|\u4e2d\u5348|\u4e0b\u5348|\u665a\u4e0a/,meridiemHour:function(l,D){return 12===l&&(l=0),"\u51cc\u6668"===D||"\u65e9\u4e0a"===D||"\u4e0a\u5348"===D?l:"\u4e2d\u5348"===D?l>=11?l:l+12:"\u4e0b\u5348"===D||"\u665a\u4e0a"===D?l+12:void 0},meridiem:function(l,D,g){var E=100*l+D;return E<600?"\u51cc\u6668":E<900?"\u65e9\u4e0a":E<1130?"\u4e0a\u5348":E<1230?"\u4e2d\u5348":E<1800?"\u4e0b\u5348":"\u665a\u4e0a"},calendar:{sameDay:"[\u4eca\u5929] LT",nextDay:"[\u660e\u5929] LT",nextWeek:"[\u4e0b]dddd LT",lastDay:"[\u6628\u5929] LT",lastWeek:"[\u4e0a]dddd LT",sameElse:"L"},dayOfMonthOrdinalParse:/\d{1,2}(\u65e5|\u6708|\u9031)/,ordinal:function(l,D){switch(D){case"d":case"D":case"DDD":return l+"\u65e5";case"M":return l+"\u6708";case"w":case"W":return l+"\u9031";default:return l}},relativeTime:{future:"%s\u5167",past:"%s\u524d",s:"\u5e7e\u79d2",ss:"%d \u79d2",m:"1 \u5206\u9418",mm:"%d \u5206\u9418",h:"1 \u5c0f\u6642",hh:"%d \u5c0f\u6642",d:"1 \u5929",dd:"%d \u5929",M:"1 \u500b\u6708",MM:"%d \u500b\u6708",y:"1 \u5e74",yy:"%d \u5e74"}})}(p(15439))},83291:function(qe,I,p){!function(o){"use strict";o.defineLocale("zh-tw",{months:"\u4e00\u6708_\u4e8c\u6708_\u4e09\u6708_\u56db\u6708_\u4e94\u6708_\u516d\u6708_\u4e03\u6708_\u516b\u6708_\u4e5d\u6708_\u5341\u6708_\u5341\u4e00\u6708_\u5341\u4e8c\u6708".split("_"),monthsShort:"1\u6708_2\u6708_3\u6708_4\u6708_5\u6708_6\u6708_7\u6708_8\u6708_9\u6708_10\u6708_11\u6708_12\u6708".split("_"),weekdays:"\u661f\u671f\u65e5_\u661f\u671f\u4e00_\u661f\u671f\u4e8c_\u661f\u671f\u4e09_\u661f\u671f\u56db_\u661f\u671f\u4e94_\u661f\u671f\u516d".split("_"),weekdaysShort:"\u9031\u65e5_\u9031\u4e00_\u9031\u4e8c_\u9031\u4e09_\u9031\u56db_\u9031\u4e94_\u9031\u516d".split("_"),weekdaysMin:"\u65e5_\u4e00_\u4e8c_\u4e09_\u56db_\u4e94_\u516d".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY\u5e74M\u6708D\u65e5",LLL:"YYYY\u5e74M\u6708D\u65e5 HH:mm",LLLL:"YYYY\u5e74M\u6708D\u65e5dddd HH:mm",l:"YYYY/M/D",ll:"YYYY\u5e74M\u6708D\u65e5",lll:"YYYY\u5e74M\u6708D\u65e5 HH:mm",llll:"YYYY\u5e74M\u6708D\u65e5dddd HH:mm"},meridiemParse:/\u51cc\u6668|\u65e9\u4e0a|\u4e0a\u5348|\u4e2d\u5348|\u4e0b\u5348|\u665a\u4e0a/,meridiemHour:function(l,D){return 12===l&&(l=0),"\u51cc\u6668"===D||"\u65e9\u4e0a"===D||"\u4e0a\u5348"===D?l:"\u4e2d\u5348"===D?l>=11?l:l+12:"\u4e0b\u5348"===D||"\u665a\u4e0a"===D?l+12:void 0},meridiem:function(l,D,g){var E=100*l+D;return E<600?"\u51cc\u6668":E<900?"\u65e9\u4e0a":E<1130?"\u4e0a\u5348":E<1230?"\u4e2d\u5348":E<1800?"\u4e0b\u5348":"\u665a\u4e0a"},calendar:{sameDay:"[\u4eca\u5929] LT",nextDay:"[\u660e\u5929] LT",nextWeek:"[\u4e0b]dddd LT",lastDay:"[\u6628\u5929] LT",lastWeek:"[\u4e0a]dddd LT",sameElse:"L"},dayOfMonthOrdinalParse:/\d{1,2}(\u65e5|\u6708|\u9031)/,ordinal:function(l,D){switch(D){case"d":case"D":case"DDD":return l+"\u65e5";case"M":return l+"\u6708";case"w":case"W":return l+"\u9031";default:return l}},relativeTime:{future:"%s\u5f8c",past:"%s\u524d",s:"\u5e7e\u79d2",ss:"%d \u79d2",m:"1 \u5206\u9418",mm:"%d \u5206\u9418",h:"1 \u5c0f\u6642",hh:"%d \u5c0f\u6642",d:"1 \u5929",dd:"%d \u5929",M:"1 \u500b\u6708",MM:"%d \u500b\u6708",y:"1 \u5e74",yy:"%d \u5e74"}})}(p(15439))},15439:function(qe,I,p){(qe=p.nmd(qe)).exports=function(){"use strict";var o,ae;function e(){return o.apply(null,arguments)}function l(_e){o=_e}function D(_e){return _e instanceof Array||"[object Array]"===Object.prototype.toString.call(_e)}function g(_e){return null!=_e&&"[object Object]"===Object.prototype.toString.call(_e)}function E(_e,$e){return Object.prototype.hasOwnProperty.call(_e,$e)}function T(_e){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(_e).length;var $e;for($e in _e)if(E(_e,$e))return!1;return!0}function n(_e){return void 0===_e}function P(_e){return"number"==typeof _e||"[object Number]"===Object.prototype.toString.call(_e)}function w(_e){return _e instanceof Date||"[object Date]"===Object.prototype.toString.call(_e)}function B(_e,$e){var Me,Tt=[],N=_e.length;for(Me=0;Me<N;++Me)Tt.push($e(_e[Me],Me));return Tt}function Y(_e,$e){for(var Tt in $e)E($e,Tt)&&(_e[Tt]=$e[Tt]);return E($e,"toString")&&(_e.toString=$e.toString),E($e,"valueOf")&&(_e.valueOf=$e.valueOf),_e}function V(_e,$e,Tt,Me){return ia(_e,$e,Tt,Me,!0).utc()}function ue(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidEra:null,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],era:null,meridiem:null,rfc2822:!1,weekdayMismatch:!1}}function he(_e){return null==_e._pf&&(_e._pf=ue()),_e._pf}function X(_e){var $e=null,Tt=!1,Me=_e._d&&!isNaN(_e._d.getTime());return Me&&($e=he(_e),Tt=ae.call($e.parsedDateParts,function(N){return null!=N}),Me=$e.overflow<0&&!$e.empty&&!$e.invalidEra&&!$e.invalidMonth&&!$e.invalidWeekday&&!$e.weekdayMismatch&&!$e.nullInput&&!$e.invalidFormat&&!$e.userInvalidated&&(!$e.meridiem||$e.meridiem&&Tt),_e._strict&&(Me=Me&&0===$e.charsLeftOver&&0===$e.unusedTokens.length&&void 0===$e.bigHour)),null!=Object.isFrozen&&Object.isFrozen(_e)?Me:(_e._isValid=Me,_e._isValid)}function ve(_e){var $e=V(NaN);return null!=_e?Y(he($e),_e):he($e).userInvalidated=!0,$e}ae=Array.prototype.some?Array.prototype.some:function(_e){var Me,$e=Object(this),Tt=$e.length>>>0;for(Me=0;Me<Tt;Me++)if(Me in $e&&_e.call(this,$e[Me],Me,$e))return!0;return!1};var ye=e.momentProperties=[],ge=!1;function ne(_e,$e){var Tt,Me,N,O=ye.length;if(n($e._isAMomentObject)||(_e._isAMomentObject=$e._isAMomentObject),n($e._i)||(_e._i=$e._i),n($e._f)||(_e._f=$e._f),n($e._l)||(_e._l=$e._l),n($e._strict)||(_e._strict=$e._strict),n($e._tzm)||(_e._tzm=$e._tzm),n($e._isUTC)||(_e._isUTC=$e._isUTC),n($e._offset)||(_e._offset=$e._offset),n($e._pf)||(_e._pf=he($e)),n($e._locale)||(_e._locale=$e._locale),O>0)for(Tt=0;Tt<O;Tt++)n(N=$e[Me=ye[Tt]])||(_e[Me]=N);return _e}function pe(_e){ne(this,_e),this._d=new Date(null!=_e._d?_e._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),!1===ge&&(ge=!0,e.updateOffset(this),ge=!1)}function Pe(_e){return _e instanceof pe||null!=_e&&null!=_e._isAMomentObject}function xe(_e){!1===e.suppressDeprecationWarnings&&typeof console<"u"&&console.warn&&console.warn("Deprecation warning: "+_e)}function de(_e,$e){var Tt=!0;return Y(function(){if(null!=e.deprecationHandler&&e.deprecationHandler(null,_e),Tt){var N,O,Ce,Me=[],Je=arguments.length;for(O=0;O<Je;O++){if(N="","object"==typeof arguments[O]){for(Ce in N+="\n["+O+"] ",arguments[0])E(arguments[0],Ce)&&(N+=Ce+": "+arguments[0][Ce]+", ");N=N.slice(0,-2)}else N=arguments[O];Me.push(N)}xe(_e+"\nArguments: "+Array.prototype.slice.call(Me).join("")+"\n"+(new Error).stack),Tt=!1}return $e.apply(this,arguments)},$e)}var Oe,re={};function oe(_e,$e){null!=e.deprecationHandler&&e.deprecationHandler(_e,$e),re[_e]||(xe($e),re[_e]=!0)}function me(_e){return typeof Function<"u"&&_e instanceof Function||"[object Function]"===Object.prototype.toString.call(_e)}function be(_e){var $e,Tt;for(Tt in _e)E(_e,Tt)&&(me($e=_e[Tt])?this[Tt]=$e:this["_"+Tt]=$e);this._config=_e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function le(_e,$e){var Me,Tt=Y({},_e);for(Me in $e)E($e,Me)&&(g(_e[Me])&&g($e[Me])?(Tt[Me]={},Y(Tt[Me],_e[Me]),Y(Tt[Me],$e[Me])):null!=$e[Me]?Tt[Me]=$e[Me]:delete Tt[Me]);for(Me in _e)E(_e,Me)&&!E($e,Me)&&g(_e[Me])&&(Tt[Me]=Y({},Tt[Me]));return Tt}function Z(_e){null!=_e&&this.set(_e)}e.suppressDeprecationWarnings=!1,e.deprecationHandler=null,Oe=Object.keys?Object.keys:function(_e){var $e,Tt=[];for($e in _e)E(_e,$e)&&Tt.push($e);return Tt};var j={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function ke(_e,$e,Tt){var Me=this._calendar[_e]||this._calendar.sameElse;return me(Me)?Me.call($e,Tt):Me}function Be(_e,$e,Tt){var Me=""+Math.abs(_e),N=$e-Me.length;return(_e>=0?Tt?"+":"":"-")+Math.pow(10,Math.max(0,N)).toString().substr(1)+Me}var nt=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,mt=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,ut={},Ve={};function tt(_e,$e,Tt,Me){var N=Me;"string"==typeof Me&&(N=function(){return this[Me]()}),_e&&(Ve[_e]=N),$e&&(Ve[$e[0]]=function(){return Be(N.apply(this,arguments),$e[1],$e[2])}),Tt&&(Ve[Tt]=function(){return this.localeData().ordinal(N.apply(this,arguments),_e)})}function Ne(_e){return _e.match(/\[[\s\S]/)?_e.replace(/^\[|\]$/g,""):_e.replace(/\\/g,"")}function wt(_e){var Tt,Me,$e=_e.match(nt);for(Tt=0,Me=$e.length;Tt<Me;Tt++)Ve[$e[Tt]]?$e[Tt]=Ve[$e[Tt]]:$e[Tt]=Ne($e[Tt]);return function(N){var Ce,O="";for(Ce=0;Ce<Me;Ce++)O+=me($e[Ce])?$e[Ce].call(N,_e):$e[Ce];return O}}function ft(_e,$e){return _e.isValid()?($e=Ct($e,_e.localeData()),ut[$e]=ut[$e]||wt($e),ut[$e](_e)):_e.localeData().invalidDate()}function Ct(_e,$e){var Tt=5;function Me(N){return $e.longDateFormat(N)||N}for(mt.lastIndex=0;Tt>=0&&mt.test(_e);)_e=_e.replace(mt,Me),mt.lastIndex=0,Tt-=1;return _e}var rn={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function He(_e){var $e=this._longDateFormat[_e],Tt=this._longDateFormat[_e.toUpperCase()];return $e||!Tt?$e:(this._longDateFormat[_e]=Tt.match(nt).map(function(Me){return"MMMM"===Me||"MM"===Me||"DD"===Me||"dddd"===Me?Me.slice(1):Me}).join(""),this._longDateFormat[_e])}var st="Invalid date";function nn(){return this._invalidDate}var Dn="%d",Mn=/\d{1,2}/;function vi(_e){return this._ordinal.replace("%d",_e)}var Gi={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function mi(_e,$e,Tt,Me){var N=this._relativeTime[Tt];return me(N)?N(_e,$e,Tt,Me):N.replace(/%d/i,_e)}function wi(_e,$e){var Tt=this._relativeTime[_e>0?"future":"past"];return me(Tt)?Tt($e):Tt.replace(/%s/i,$e)}var Bn={D:"date",dates:"date",date:"date",d:"day",days:"day",day:"day",e:"weekday",weekdays:"weekday",weekday:"weekday",E:"isoWeekday",isoweekdays:"isoWeekday",isoweekday:"isoWeekday",DDD:"dayOfYear",dayofyears:"dayOfYear",dayofyear:"dayOfYear",h:"hour",hours:"hour",hour:"hour",ms:"millisecond",milliseconds:"millisecond",millisecond:"millisecond",m:"minute",minutes:"minute",minute:"minute",M:"month",months:"month",month:"month",Q:"quarter",quarters:"quarter",quarter:"quarter",s:"second",seconds:"second",second:"second",gg:"weekYear",weekyears:"weekYear",weekyear:"weekYear",GG:"isoWeekYear",isoweekyears:"isoWeekYear",isoweekyear:"isoWeekYear",w:"week",weeks:"week",week:"week",W:"isoWeek",isoweeks:"isoWeek",isoweek:"isoWeek",y:"year",years:"year",year:"year"};function kn(_e){return"string"==typeof _e?Bn[_e]||Bn[_e.toLowerCase()]:void 0}function On(_e){var Tt,Me,$e={};for(Me in _e)E(_e,Me)&&(Tt=kn(Me))&&($e[Tt]=_e[Me]);return $e}var je={date:9,day:11,weekday:11,isoWeekday:11,dayOfYear:4,hour:13,millisecond:16,minute:14,month:8,quarter:7,second:15,weekYear:1,isoWeekYear:1,week:5,isoWeek:5,year:1};function Bt(_e){var Tt,$e=[];for(Tt in _e)E(_e,Tt)&&$e.push({unit:Tt,priority:je[Tt]});return $e.sort(function(Me,N){return Me.priority-N.priority}),$e}var ct,xn=/\d/,Fn=/\d\d/,ui=/\d{3}/,Ai=/\d{4}/,si=/[+-]?\d{6}/,Vi=/\d\d?/,Vn=/\d\d\d\d?/,Hn=/\d\d\d\d\d\d?/,An=/\d{1,3}/,vn=/\d{1,4}/,In=/[+-]?\d{1,6}/,Zi=/\d+/,gr=/[+-]?\d+/,Hi=/Z|[+-]\d\d:?\d\d/gi,Gr=/Z|[+-]\d\d(?::?\d\d)?/gi,zr=/[+-]?\d+(\.\d{1,3})?/,Eo=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,mr=/^[1-9]\d?/,jn=/^([1-9]\d|\d)/;function Yt(_e,$e,Tt){ct[_e]=me($e)?$e:function(Me,N){return Me&&Tt?Tt:$e}}function oi(_e,$e){return E(ct,_e)?ct[_e]($e._strict,$e._locale):new RegExp(Ni(_e))}function Ni(_e){return Nn(_e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function($e,Tt,Me,N,O){return Tt||Me||N||O}))}function Nn(_e){return _e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function pr(_e){return _e<0?Math.ceil(_e)||0:Math.floor(_e)}function Sn(_e){var $e=+_e,Tt=0;return 0!==$e&&isFinite($e)&&(Tt=pr($e)),Tt}ct={};var Pn={};function Nt(_e,$e){var Tt,N,Me=$e;for("string"==typeof _e&&(_e=[_e]),P($e)&&(Me=function(O,Ce){Ce[$e]=Sn(O)}),N=_e.length,Tt=0;Tt<N;Tt++)Pn[_e[Tt]]=Me}function ai(_e,$e){Nt(_e,function(Tt,Me,N,O){N._w=N._w||{},$e(Tt,N._w,N,O)})}function hn(_e,$e,Tt){null!=$e&&E(Pn,_e)&&Pn[_e]($e,Tt._a,Tt,_e)}function Le(_e){return _e%4==0&&_e%100!=0||_e%400==0}var ce=0,we=1,Qe=2,qt=3,Tn=4,lr=5,mo=6,rr=7,aa=8;function ea(_e){return Le(_e)?366:365}tt("Y",0,0,function(){var _e=this.year();return _e<=9999?Be(_e,4):"+"+_e}),tt(0,["YY",2],0,function(){return this.year()%100}),tt(0,["YYYY",4],0,"year"),tt(0,["YYYYY",5],0,"year"),tt(0,["YYYYYY",6,!0],0,"year"),Yt("Y",gr),Yt("YY",Vi,Fn),Yt("YYYY",vn,Ai),Yt("YYYYY",In,si),Yt("YYYYYY",In,si),Nt(["YYYYY","YYYYYY"],ce),Nt("YYYY",function(_e,$e){$e[ce]=2===_e.length?e.parseTwoDigitYear(_e):Sn(_e)}),Nt("YY",function(_e,$e){$e[ce]=e.parseTwoDigitYear(_e)}),Nt("Y",function(_e,$e){$e[ce]=parseInt(_e,10)}),e.parseTwoDigitYear=function(_e){return Sn(_e)+(Sn(_e)>68?1900:2e3)};var ei,Bo=an("FullYear",!0);function Ii(){return Le(this.year())}function an(_e,$e){return function(Tt){return null!=Tt?(Ci(this,_e,Tt),e.updateOffset(this,$e),this):Zn(this,_e)}}function Zn(_e,$e){if(!_e.isValid())return NaN;var Tt=_e._d,Me=_e._isUTC;switch($e){case"Milliseconds":return Me?Tt.getUTCMilliseconds():Tt.getMilliseconds();case"Seconds":return Me?Tt.getUTCSeconds():Tt.getSeconds();case"Minutes":return Me?Tt.getUTCMinutes():Tt.getMinutes();case"Hours":return Me?Tt.getUTCHours():Tt.getHours();case"Date":return Me?Tt.getUTCDate():Tt.getDate();case"Day":return Me?Tt.getUTCDay():Tt.getDay();case"Month":return Me?Tt.getUTCMonth():Tt.getMonth();case"FullYear":return Me?Tt.getUTCFullYear():Tt.getFullYear();default:return NaN}}function Ci(_e,$e,Tt){var Me,N,O,Ce,Je;if(_e.isValid()&&!isNaN(Tt)){switch(Me=_e._d,N=_e._isUTC,$e){case"Milliseconds":return void(N?Me.setUTCMilliseconds(Tt):Me.setMilliseconds(Tt));case"Seconds":return void(N?Me.setUTCSeconds(Tt):Me.setSeconds(Tt));case"Minutes":return void(N?Me.setUTCMinutes(Tt):Me.setMinutes(Tt));case"Hours":return void(N?Me.setUTCHours(Tt):Me.setHours(Tt));case"Date":return void(N?Me.setUTCDate(Tt):Me.setDate(Tt));case"FullYear":break;default:return}O=Tt,Ce=_e.month(),Je=29!==(Je=_e.date())||1!==Ce||Le(O)?Je:28,N?Me.setUTCFullYear(O,Ce,Je):Me.setFullYear(O,Ce,Je)}}function Xn(_e){return me(this[_e=kn(_e)])?this[_e]():this}function Et(_e,$e){if("object"==typeof _e){var Me,Tt=Bt(_e=On(_e)),N=Tt.length;for(Me=0;Me<N;Me++)this[Tt[Me].unit](_e[Tt[Me].unit])}else if(me(this[_e=kn(_e)]))return this[_e]($e);return this}function gn(_e,$e){return(_e%$e+$e)%$e}function un(_e,$e){if(isNaN(_e)||isNaN($e))return NaN;var Tt=gn($e,12);return _e+=($e-Tt)/12,1===Tt?Le(_e)?29:28:31-Tt%7%2}ei=Array.prototype.indexOf?Array.prototype.indexOf:function(_e){var $e;for($e=0;$e<this.length;++$e)if(this[$e]===_e)return $e;return-1},tt("M",["MM",2],"Mo",function(){return this.month()+1}),tt("MMM",0,0,function(_e){return this.localeData().monthsShort(this,_e)}),tt("MMMM",0,0,function(_e){return this.localeData().months(this,_e)}),Yt("M",Vi,mr),Yt("MM",Vi,Fn),Yt("MMM",function(_e,$e){return $e.monthsShortRegex(_e)}),Yt("MMMM",function(_e,$e){return $e.monthsRegex(_e)}),Nt(["M","MM"],function(_e,$e){$e[we]=Sn(_e)-1}),Nt(["MMM","MMMM"],function(_e,$e,Tt,Me){var N=Tt._locale.monthsParse(_e,Me,Tt._strict);null!=N?$e[we]=N:he(Tt).invalidMonth=_e});var Ft="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),Ut="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),wn=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,Gn=Eo,xi=Eo;function Cr(_e,$e){return _e?D(this._months)?this._months[_e.month()]:this._months[(this._months.isFormat||wn).test($e)?"format":"standalone"][_e.month()]:D(this._months)?this._months:this._months.standalone}function Fr(_e,$e){return _e?D(this._monthsShort)?this._monthsShort[_e.month()]:this._monthsShort[wn.test($e)?"format":"standalone"][_e.month()]:D(this._monthsShort)?this._monthsShort:this._monthsShort.standalone}function en(_e,$e,Tt){var Me,N,O,Ce=_e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],Me=0;Me<12;++Me)O=V([2e3,Me]),this._shortMonthsParse[Me]=this.monthsShort(O,"").toLocaleLowerCase(),this._longMonthsParse[Me]=this.months(O,"").toLocaleLowerCase();return Tt?"MMM"===$e?-1!==(N=ei.call(this._shortMonthsParse,Ce))?N:null:-1!==(N=ei.call(this._longMonthsParse,Ce))?N:null:"MMM"===$e?-1!==(N=ei.call(this._shortMonthsParse,Ce))||-1!==(N=ei.call(this._longMonthsParse,Ce))?N:null:-1!==(N=ei.call(this._longMonthsParse,Ce))||-1!==(N=ei.call(this._shortMonthsParse,Ce))?N:null}function Wn(_e,$e,Tt){var Me,N,O;if(this._monthsParseExact)return en.call(this,_e,$e,Tt);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),Me=0;Me<12;Me++){if(N=V([2e3,Me]),Tt&&!this._longMonthsParse[Me]&&(this._longMonthsParse[Me]=new RegExp("^"+this.months(N,"").replace(".","")+"$","i"),this._shortMonthsParse[Me]=new RegExp("^"+this.monthsShort(N,"").replace(".","")+"$","i")),!Tt&&!this._monthsParse[Me]&&(O="^"+this.months(N,"")+"|^"+this.monthsShort(N,""),this._monthsParse[Me]=new RegExp(O.replace(".",""),"i")),Tt&&"MMMM"===$e&&this._longMonthsParse[Me].test(_e))return Me;if(Tt&&"MMM"===$e&&this._shortMonthsParse[Me].test(_e))return Me;if(!Tt&&this._monthsParse[Me].test(_e))return Me}}function at(_e,$e){if(!_e.isValid())return _e;if("string"==typeof $e)if(/^\d+$/.test($e))$e=Sn($e);else if(!P($e=_e.localeData().monthsParse($e)))return _e;var Tt=$e,Me=_e.date();return Me=Me<29?Me:Math.min(Me,un(_e.year(),Tt)),_e._isUTC?_e._d.setUTCMonth(Tt,Me):_e._d.setMonth(Tt,Me),_e}function It(_e){return null!=_e?(at(this,_e),e.updateOffset(this,!0),this):Zn(this,"Month")}function Qt(){return un(this.year(),this.month())}function St(_e){return this._monthsParseExact?(E(this,"_monthsRegex")||cn.call(this),_e?this._monthsShortStrictRegex:this._monthsShortRegex):(E(this,"_monthsShortRegex")||(this._monthsShortRegex=Gn),this._monthsShortStrictRegex&&_e?this._monthsShortStrictRegex:this._monthsShortRegex)}function Pt(_e){return this._monthsParseExact?(E(this,"_monthsRegex")||cn.call(this),_e?this._monthsStrictRegex:this._monthsRegex):(E(this,"_monthsRegex")||(this._monthsRegex=xi),this._monthsStrictRegex&&_e?this._monthsStrictRegex:this._monthsRegex)}function cn(){function _e(Vt,Rr){return Rr.length-Vt.length}var N,O,Ce,Je,$e=[],Tt=[],Me=[];for(N=0;N<12;N++)O=V([2e3,N]),Ce=Nn(this.monthsShort(O,"")),Je=Nn(this.months(O,"")),$e.push(Ce),Tt.push(Je),Me.push(Je),Me.push(Ce);$e.sort(_e),Tt.sort(_e),Me.sort(_e),this._monthsRegex=new RegExp("^("+Me.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+Tt.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+$e.join("|")+")","i")}function Ln(_e,$e,Tt,Me,N,O,Ce){var Je;return _e<100&&_e>=0?(Je=new Date(_e+400,$e,Tt,Me,N,O,Ce),isFinite(Je.getFullYear())&&Je.setFullYear(_e)):Je=new Date(_e,$e,Tt,Me,N,O,Ce),Je}function ii(_e){var $e,Tt;return _e<100&&_e>=0?((Tt=Array.prototype.slice.call(arguments))[0]=_e+400,$e=new Date(Date.UTC.apply(null,Tt)),isFinite($e.getUTCFullYear())&&$e.setUTCFullYear(_e)):$e=new Date(Date.UTC.apply(null,arguments)),$e}function hi(_e,$e,Tt){var Me=7+$e-Tt;return-(7+ii(_e,0,Me).getUTCDay()-$e)%7+Me-1}function Ri(_e,$e,Tt,Me,N){var Vt,Rr,Je=1+7*($e-1)+(7+Tt-Me)%7+hi(_e,Me,N);return Je<=0?Rr=ea(Vt=_e-1)+Je:Je>ea(_e)?(Vt=_e+1,Rr=Je-ea(_e)):(Vt=_e,Rr=Je),{year:Vt,dayOfYear:Rr}}function _r(_e,$e,Tt){var O,Ce,Me=hi(_e.year(),$e,Tt),N=Math.floor((_e.dayOfYear()-Me-1)/7)+1;return N<1?O=N+er(Ce=_e.year()-1,$e,Tt):N>er(_e.year(),$e,Tt)?(O=N-er(_e.year(),$e,Tt),Ce=_e.year()+1):(Ce=_e.year(),O=N),{week:O,year:Ce}}function er(_e,$e,Tt){var Me=hi(_e,$e,Tt),N=hi(_e+1,$e,Tt);return(ea(_e)-Me+N)/7}function Yr(_e){return _r(_e,this._week.dow,this._week.doy).week}tt("w",["ww",2],"wo","week"),tt("W",["WW",2],"Wo","isoWeek"),Yt("w",Vi,mr),Yt("ww",Vi,Fn),Yt("W",Vi,mr),Yt("WW",Vi,Fn),ai(["w","ww","W","WW"],function(_e,$e,Tt,Me){$e[Me.substr(0,1)]=Sn(_e)});var _o={dow:0,doy:6};function Si(){return this._week.dow}function to(){return this._week.doy}function Oa(_e){var $e=this.localeData().week(this);return null==_e?$e:this.add(7*(_e-$e),"d")}function Uo(_e){var $e=_r(this,1,4).week;return null==_e?$e:this.add(7*(_e-$e),"d")}function rl(_e,$e){return"string"!=typeof _e?_e:isNaN(_e)?"number"==typeof(_e=$e.weekdaysParse(_e))?_e:null:parseInt(_e,10)}function Vs(_e,$e){return"string"==typeof _e?$e.weekdaysParse(_e)%7||7:isNaN(_e)?null:_e}function ps(_e,$e){return _e.slice($e,7).concat(_e.slice(0,$e))}tt("d",0,"do","day"),tt("dd",0,0,function(_e){return this.localeData().weekdaysMin(this,_e)}),tt("ddd",0,0,function(_e){return this.localeData().weekdaysShort(this,_e)}),tt("dddd",0,0,function(_e){return this.localeData().weekdays(this,_e)}),tt("e",0,0,"weekday"),tt("E",0,0,"isoWeekday"),Yt("d",Vi),Yt("e",Vi),Yt("E",Vi),Yt("dd",function(_e,$e){return $e.weekdaysMinRegex(_e)}),Yt("ddd",function(_e,$e){return $e.weekdaysShortRegex(_e)}),Yt("dddd",function(_e,$e){return $e.weekdaysRegex(_e)}),ai(["dd","ddd","dddd"],function(_e,$e,Tt,Me){var N=Tt._locale.weekdaysParse(_e,Me,Tt._strict);null!=N?$e.d=N:he(Tt).invalidWeekday=_e}),ai(["d","e","E"],function(_e,$e,Tt,Me){$e[Me]=Sn(_e)});var ts="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),gs="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),tc="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),$a=Eo,ln=Eo,Mi=Eo;function Di(_e,$e){var Tt=D(this._weekdays)?this._weekdays:this._weekdays[_e&&!0!==_e&&this._weekdays.isFormat.test($e)?"format":"standalone"];return!0===_e?ps(Tt,this._week.dow):_e?Tt[_e.day()]:Tt}function Er(_e){return!0===_e?ps(this._weekdaysShort,this._week.dow):_e?this._weekdaysShort[_e.day()]:this._weekdaysShort}function ur(_e){return!0===_e?ps(this._weekdaysMin,this._week.dow):_e?this._weekdaysMin[_e.day()]:this._weekdaysMin}function gi(_e,$e,Tt){var Me,N,O,Ce=_e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],Me=0;Me<7;++Me)O=V([2e3,1]).day(Me),this._minWeekdaysParse[Me]=this.weekdaysMin(O,"").toLocaleLowerCase(),this._shortWeekdaysParse[Me]=this.weekdaysShort(O,"").toLocaleLowerCase(),this._weekdaysParse[Me]=this.weekdays(O,"").toLocaleLowerCase();return Tt?"dddd"===$e?-1!==(N=ei.call(this._weekdaysParse,Ce))?N:null:"ddd"===$e?-1!==(N=ei.call(this._shortWeekdaysParse,Ce))?N:null:-1!==(N=ei.call(this._minWeekdaysParse,Ce))?N:null:"dddd"===$e?-1!==(N=ei.call(this._weekdaysParse,Ce))||-1!==(N=ei.call(this._shortWeekdaysParse,Ce))||-1!==(N=ei.call(this._minWeekdaysParse,Ce))?N:null:"ddd"===$e?-1!==(N=ei.call(this._shortWeekdaysParse,Ce))||-1!==(N=ei.call(this._weekdaysParse,Ce))||-1!==(N=ei.call(this._minWeekdaysParse,Ce))?N:null:-1!==(N=ei.call(this._minWeekdaysParse,Ce))||-1!==(N=ei.call(this._weekdaysParse,Ce))||-1!==(N=ei.call(this._shortWeekdaysParse,Ce))?N:null}function $t(_e,$e,Tt){var Me,N,O;if(this._weekdaysParseExact)return gi.call(this,_e,$e,Tt);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),Me=0;Me<7;Me++){if(N=V([2e3,1]).day(Me),Tt&&!this._fullWeekdaysParse[Me]&&(this._fullWeekdaysParse[Me]=new RegExp("^"+this.weekdays(N,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[Me]=new RegExp("^"+this.weekdaysShort(N,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[Me]=new RegExp("^"+this.weekdaysMin(N,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[Me]||(O="^"+this.weekdays(N,"")+"|^"+this.weekdaysShort(N,"")+"|^"+this.weekdaysMin(N,""),this._weekdaysParse[Me]=new RegExp(O.replace(".",""),"i")),Tt&&"dddd"===$e&&this._fullWeekdaysParse[Me].test(_e))return Me;if(Tt&&"ddd"===$e&&this._shortWeekdaysParse[Me].test(_e))return Me;if(Tt&&"dd"===$e&&this._minWeekdaysParse[Me].test(_e))return Me;if(!Tt&&this._weekdaysParse[Me].test(_e))return Me}}function Ma(_e){if(!this.isValid())return null!=_e?this:NaN;var $e=Zn(this,"Day");return null!=_e?(_e=rl(_e,this.localeData()),this.add(_e-$e,"d")):$e}function Vo(_e){if(!this.isValid())return null!=_e?this:NaN;var $e=(this.day()+7-this.localeData()._week.dow)%7;return null==_e?$e:this.add(_e-$e,"d")}function Ds(_e){if(!this.isValid())return null!=_e?this:NaN;if(null!=_e){var $e=Vs(_e,this.localeData());return this.day(this.day()%7?$e:$e-7)}return this.day()||7}function ja(_e){return this._weekdaysParseExact?(E(this,"_weekdaysRegex")||Cs.call(this),_e?this._weekdaysStrictRegex:this._weekdaysRegex):(E(this,"_weekdaysRegex")||(this._weekdaysRegex=$a),this._weekdaysStrictRegex&&_e?this._weekdaysStrictRegex:this._weekdaysRegex)}function wa(_e){return this._weekdaysParseExact?(E(this,"_weekdaysRegex")||Cs.call(this),_e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(E(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=ln),this._weekdaysShortStrictRegex&&_e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function ns(_e){return this._weekdaysParseExact?(E(this,"_weekdaysRegex")||Cs.call(this),_e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(E(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=Mi),this._weekdaysMinStrictRegex&&_e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function Cs(){function _e(wo,ua){return ua.length-wo.length}var O,Ce,Je,Vt,Rr,$e=[],Tt=[],Me=[],N=[];for(O=0;O<7;O++)Ce=V([2e3,1]).day(O),Je=Nn(this.weekdaysMin(Ce,"")),Vt=Nn(this.weekdaysShort(Ce,"")),Rr=Nn(this.weekdays(Ce,"")),$e.push(Je),Tt.push(Vt),Me.push(Rr),N.push(Je),N.push(Vt),N.push(Rr);$e.sort(_e),Tt.sort(_e),Me.sort(_e),N.sort(_e),this._weekdaysRegex=new RegExp("^("+N.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+Me.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+Tt.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+$e.join("|")+")","i")}function $r(){return this.hours()%12||12}function Ts(){return this.hours()||24}function Gl(_e,$e){tt(_e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),$e)})}function ol(_e,$e){return $e._meridiemParse}function zc(_e){return"p"===(_e+"").toLowerCase().charAt(0)}tt("H",["HH",2],0,"hour"),tt("h",["hh",2],0,$r),tt("k",["kk",2],0,Ts),tt("hmm",0,0,function(){return""+$r.apply(this)+Be(this.minutes(),2)}),tt("hmmss",0,0,function(){return""+$r.apply(this)+Be(this.minutes(),2)+Be(this.seconds(),2)}),tt("Hmm",0,0,function(){return""+this.hours()+Be(this.minutes(),2)}),tt("Hmmss",0,0,function(){return""+this.hours()+Be(this.minutes(),2)+Be(this.seconds(),2)}),Gl("a",!0),Gl("A",!1),Yt("a",ol),Yt("A",ol),Yt("H",Vi,jn),Yt("h",Vi,mr),Yt("k",Vi,mr),Yt("HH",Vi,Fn),Yt("hh",Vi,Fn),Yt("kk",Vi,Fn),Yt("hmm",Vn),Yt("hmmss",Hn),Yt("Hmm",Vn),Yt("Hmmss",Hn),Nt(["H","HH"],qt),Nt(["k","kk"],function(_e,$e,Tt){var Me=Sn(_e);$e[qt]=24===Me?0:Me}),Nt(["a","A"],function(_e,$e,Tt){Tt._isPm=Tt._locale.isPM(_e),Tt._meridiem=_e}),Nt(["h","hh"],function(_e,$e,Tt){$e[qt]=Sn(_e),he(Tt).bigHour=!0}),Nt("hmm",function(_e,$e,Tt){var Me=_e.length-2;$e[qt]=Sn(_e.substr(0,Me)),$e[Tn]=Sn(_e.substr(Me)),he(Tt).bigHour=!0}),Nt("hmmss",function(_e,$e,Tt){var Me=_e.length-4,N=_e.length-2;$e[qt]=Sn(_e.substr(0,Me)),$e[Tn]=Sn(_e.substr(Me,2)),$e[lr]=Sn(_e.substr(N)),he(Tt).bigHour=!0}),Nt("Hmm",function(_e,$e,Tt){var Me=_e.length-2;$e[qt]=Sn(_e.substr(0,Me)),$e[Tn]=Sn(_e.substr(Me))}),Nt("Hmmss",function(_e,$e,Tt){var Me=_e.length-4,N=_e.length-2;$e[qt]=Sn(_e.substr(0,Me)),$e[Tn]=Sn(_e.substr(Me,2)),$e[lr]=Sn(_e.substr(N))});var al=/[ap]\.?m?\.?/i,Jn=an("Hours",!0);function tn(_e,$e,Tt){return _e>11?Tt?"pm":"PM":Tt?"am":"AM"}var vr,ti={calendar:j,longDateFormat:rn,invalidDate:st,ordinal:Dn,dayOfMonthOrdinalParse:Mn,relativeTime:Gi,months:Ft,monthsShort:Ut,week:_o,weekdays:ts,weekdaysMin:tc,weekdaysShort:gs,meridiemParse:al},_i={},ar={};function Qr(_e,$e){var Tt,Me=Math.min(_e.length,$e.length);for(Tt=0;Tt<Me;Tt+=1)if(_e[Tt]!==$e[Tt])return Tt;return Me}function Li(_e){return _e&&_e.toLowerCase().replace("_","-")}function Ta(_e){for(var Tt,Me,N,O,$e=0;$e<_e.length;){for(Tt=(O=Li(_e[$e]).split("-")).length,Me=(Me=Li(_e[$e+1]))?Me.split("-"):null;Tt>0;){if(N=Ps(O.slice(0,Tt).join("-")))return N;if(Me&&Me.length>=Tt&&Qr(O,Me)>=Tt-1)break;Tt--}$e++}return vr}function La(_e){return!(!_e||!_e.match("^[^/\\\\]*$"))}function Ps(_e){var $e=null;if(void 0===_i[_e]&&qe&&qe.exports&&La(_e))try{$e=vr._abbr,p(46700)("./"+_e),is($e)}catch{_i[_e]=null}return _i[_e]}function is(_e,$e){var Tt;return _e&&((Tt=n($e)?We(_e):yt(_e,$e))?vr=Tt:typeof console<"u"&&console.warn&&console.warn("Locale "+_e+" not found. Did you forget to load it?")),vr._abbr}function yt(_e,$e){if(null!==$e){var Tt,Me=ti;if($e.abbr=_e,null!=_i[_e])oe("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),Me=_i[_e]._config;else if(null!=$e.parentLocale)if(null!=_i[$e.parentLocale])Me=_i[$e.parentLocale]._config;else{if(null==(Tt=Ps($e.parentLocale)))return ar[$e.parentLocale]||(ar[$e.parentLocale]=[]),ar[$e.parentLocale].push({name:_e,config:$e}),null;Me=Tt._config}return _i[_e]=new Z(le(Me,$e)),ar[_e]&&ar[_e].forEach(function(N){yt(N.name,N.config)}),is(_e),_i[_e]}return delete _i[_e],null}function Dt(_e,$e){if(null!=$e){var Tt,Me,N=ti;null!=_i[_e]&&null!=_i[_e].parentLocale?_i[_e].set(le(_i[_e]._config,$e)):(null!=(Me=Ps(_e))&&(N=Me._config),$e=le(N,$e),null==Me&&($e.abbr=_e),(Tt=new Z($e)).parentLocale=_i[_e],_i[_e]=Tt),is(_e)}else null!=_i[_e]&&(null!=_i[_e].parentLocale?(_i[_e]=_i[_e].parentLocale,_e===is()&&is(_e)):null!=_i[_e]&&delete _i[_e]);return _i[_e]}function We(_e){var $e;if(_e&&_e._locale&&_e._locale._abbr&&(_e=_e._locale._abbr),!_e)return vr;if(!D(_e)){if($e=Ps(_e))return $e;_e=[_e]}return Ta(_e)}function Rt(){return Oe(_i)}function Qn(_e){var $e,Tt=_e._a;return Tt&&-2===he(_e).overflow&&($e=Tt[we]<0||Tt[we]>11?we:Tt[Qe]<1||Tt[Qe]>un(Tt[ce],Tt[we])?Qe:Tt[qt]<0||Tt[qt]>24||24===Tt[qt]&&(0!==Tt[Tn]||0!==Tt[lr]||0!==Tt[mo])?qt:Tt[Tn]<0||Tt[Tn]>59?Tn:Tt[lr]<0||Tt[lr]>59?lr:Tt[mo]<0||Tt[mo]>999?mo:-1,he(_e)._overflowDayOfYear&&($e<ce||$e>Qe)&&($e=Qe),he(_e)._overflowWeeks&&-1===$e&&($e=rr),he(_e)._overflowWeekday&&-1===$e&&($e=aa),he(_e).overflow=$e),_e}var fi=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Xi=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,wr=/Z|[+-]\d\d(?::?\d\d)?/,Mo=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],ro=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],qr=/^\/?Date\((-?\d+)/i,ho=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,xa={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function To(_e){var $e,Tt,O,Ce,Je,Vt,Me=_e._i,N=fi.exec(Me)||Xi.exec(Me),Rr=Mo.length,wo=ro.length;if(N){for(he(_e).iso=!0,$e=0,Tt=Rr;$e<Tt;$e++)if(Mo[$e][1].exec(N[1])){Ce=Mo[$e][0],O=!1!==Mo[$e][2];break}if(null==Ce)return void(_e._isValid=!1);if(N[3]){for($e=0,Tt=wo;$e<Tt;$e++)if(ro[$e][1].exec(N[3])){Je=(N[2]||" ")+ro[$e][0];break}if(null==Je)return void(_e._isValid=!1)}if(!O&&null!=Je)return void(_e._isValid=!1);if(N[4]){if(!wr.exec(N[4]))return void(_e._isValid=!1);Vt="Z"}_e._f=Ce+(Je||"")+(Vt||""),Fe(_e)}else _e._isValid=!1}function Ao(_e,$e,Tt,Me,N,O){var Ce=[Ha(_e),Ut.indexOf($e),parseInt(Tt,10),parseInt(Me,10),parseInt(N,10)];return O&&Ce.push(parseInt(O,10)),Ce}function Ha(_e){var $e=parseInt(_e,10);return $e<=49?2e3+$e:$e<=999?1900+$e:$e}function Ho(_e){return _e.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function Ra(_e,$e,Tt){return!_e||gs.indexOf(_e)===new Date($e[0],$e[1],$e[2]).getDay()||(he(Tt).weekdayMismatch=!0,Tt._isValid=!1,!1)}function ba(_e,$e,Tt){if(_e)return xa[_e];if($e)return 0;var Me=parseInt(Tt,10),N=Me%100;return(Me-N)/100*60+N}function Jt(_e){var Tt,$e=ho.exec(Ho(_e._i));if($e){if(Tt=Ao($e[4],$e[3],$e[2],$e[5],$e[6],$e[7]),!Ra($e[1],Tt,_e))return;_e._a=Tt,_e._tzm=ba($e[8],$e[9],$e[10]),_e._d=ii.apply(null,_e._a),_e._d.setUTCMinutes(_e._d.getUTCMinutes()-_e._tzm),he(_e).rfc2822=!0}else _e._isValid=!1}function De(_e){var $e=qr.exec(_e._i);null===$e?(To(_e),!1===_e._isValid&&(delete _e._isValid,Jt(_e),!1===_e._isValid&&(delete _e._isValid,_e._strict?_e._isValid=!1:e.createFromInputFallback(_e)))):_e._d=new Date(+$e[1])}function bt(_e,$e,Tt){return _e??$e??Tt}function Xt(_e){var $e=new Date(e.now());return _e._useUTC?[$e.getUTCFullYear(),$e.getUTCMonth(),$e.getUTCDate()]:[$e.getFullYear(),$e.getMonth(),$e.getDate()]}function Qi(_e){var $e,Tt,N,O,Ce,Me=[];if(!_e._d){for(N=Xt(_e),_e._w&&null==_e._a[Qe]&&null==_e._a[we]&&Kt(_e),null!=_e._dayOfYear&&(Ce=bt(_e._a[ce],N[ce]),(_e._dayOfYear>ea(Ce)||0===_e._dayOfYear)&&(he(_e)._overflowDayOfYear=!0),Tt=ii(Ce,0,_e._dayOfYear),_e._a[we]=Tt.getUTCMonth(),_e._a[Qe]=Tt.getUTCDate()),$e=0;$e<3&&null==_e._a[$e];++$e)_e._a[$e]=Me[$e]=N[$e];for(;$e<7;$e++)_e._a[$e]=Me[$e]=null==_e._a[$e]?2===$e?1:0:_e._a[$e];24===_e._a[qt]&&0===_e._a[Tn]&&0===_e._a[lr]&&0===_e._a[mo]&&(_e._nextDay=!0,_e._a[qt]=0),_e._d=(_e._useUTC?ii:Ln).apply(null,Me),O=_e._useUTC?_e._d.getUTCDay():_e._d.getDay(),null!=_e._tzm&&_e._d.setUTCMinutes(_e._d.getUTCMinutes()-_e._tzm),_e._nextDay&&(_e._a[qt]=24),_e._w&&typeof _e._w.d<"u"&&_e._w.d!==O&&(he(_e).weekdayMismatch=!0)}}function Kt(_e){var $e,Tt,Me,N,O,Ce,Je,Vt,Rr;null!=($e=_e._w).GG||null!=$e.W||null!=$e.E?(O=1,Ce=4,Tt=bt($e.GG,_e._a[ce],_r($o(),1,4).year),Me=bt($e.W,1),((N=bt($e.E,1))<1||N>7)&&(Vt=!0)):(O=_e._locale._week.dow,Ce=_e._locale._week.doy,Rr=_r($o(),O,Ce),Tt=bt($e.gg,_e._a[ce],Rr.year),Me=bt($e.w,Rr.week),null!=$e.d?((N=$e.d)<0||N>6)&&(Vt=!0):null!=$e.e?(N=$e.e+O,($e.e<0||$e.e>6)&&(Vt=!0)):N=O),Me<1||Me>er(Tt,O,Ce)?he(_e)._overflowWeeks=!0:null!=Vt?he(_e)._overflowWeekday=!0:(Je=Ri(Tt,Me,N,O,Ce),_e._a[ce]=Je.year,_e._dayOfYear=Je.dayOfYear)}function Fe(_e){if(_e._f!==e.ISO_8601)if(_e._f!==e.RFC_2822){_e._a=[],he(_e).empty=!0;var Tt,Me,N,O,Ce,Rr,wo,$e=""+_e._i,Je=$e.length,Vt=0;for(wo=(N=Ct(_e._f,_e._locale).match(nt)||[]).length,Tt=0;Tt<wo;Tt++)O=N[Tt],(Me=($e.match(oi(O,_e))||[])[0])&&((Ce=$e.substr(0,$e.indexOf(Me))).length>0&&he(_e).unusedInput.push(Ce),$e=$e.slice($e.indexOf(Me)+Me.length),Vt+=Me.length),Ve[O]?(Me?he(_e).empty=!1:he(_e).unusedTokens.push(O),hn(O,Me,_e)):_e._strict&&!Me&&he(_e).unusedTokens.push(O);he(_e).charsLeftOver=Je-Vt,$e.length>0&&he(_e).unusedInput.push($e),_e._a[qt]<=12&&!0===he(_e).bigHour&&_e._a[qt]>0&&(he(_e).bigHour=void 0),he(_e).parsedDateParts=_e._a.slice(0),he(_e).meridiem=_e._meridiem,_e._a[qt]=Wt(_e._locale,_e._a[qt],_e._meridiem),null!==(Rr=he(_e).era)&&(_e._a[ce]=_e._locale.erasConvertYear(Rr,_e._a[ce])),Qi(_e),Qn(_e)}else Jt(_e);else To(_e)}function Wt(_e,$e,Tt){var Me;return null==Tt?$e:null!=_e.meridiemHour?_e.meridiemHour($e,Tt):(null!=_e.isPM&&((Me=_e.isPM(Tt))&&$e<12&&($e+=12),!Me&&12===$e&&($e=0)),$e)}function yi(_e){var $e,Tt,Me,N,O,Ce,Je=!1,Vt=_e._f.length;if(0===Vt)return he(_e).invalidFormat=!0,void(_e._d=new Date(NaN));for(N=0;N<Vt;N++)O=0,Ce=!1,$e=ne({},_e),null!=_e._useUTC&&($e._useUTC=_e._useUTC),$e._f=_e._f[N],Fe($e),X($e)&&(Ce=!0),O+=he($e).charsLeftOver,O+=10*he($e).unusedTokens.length,he($e).score=O,Je?O<Me&&(Me=O,Tt=$e):(null==Me||O<Me||Ce)&&(Me=O,Tt=$e,Ce&&(Je=!0));Y(_e,Tt||$e)}function Ki(_e){if(!_e._d){var $e=On(_e._i),Tt=void 0===$e.day?$e.date:$e.day;_e._a=B([$e.year,$e.month,Tt,$e.hour,$e.minute,$e.second,$e.millisecond],function(Me){return Me&&parseInt(Me,10)}),Qi(_e)}}function ya(_e){var $e=new pe(Qn(Na(_e)));return $e._nextDay&&($e.add(1,"d"),$e._nextDay=void 0),$e}function Na(_e){var $e=_e._i,Tt=_e._f;return _e._locale=_e._locale||We(_e._l),null===$e||void 0===Tt&&""===$e?ve({nullInput:!0}):("string"==typeof $e&&(_e._i=$e=_e._locale.preparse($e)),Pe($e)?new pe(Qn($e)):(w($e)?_e._d=$e:D(Tt)?yi(_e):Tt?Fe(_e):qi(_e),X(_e)||(_e._d=null),_e))}function qi(_e){var $e=_e._i;n($e)?_e._d=new Date(e.now()):w($e)?_e._d=new Date($e.valueOf()):"string"==typeof $e?De(_e):D($e)?(_e._a=B($e.slice(0),function(Tt){return parseInt(Tt,10)}),Qi(_e)):g($e)?Ki(_e):P($e)?_e._d=new Date($e):e.createFromInputFallback(_e)}function ia(_e,$e,Tt,Me,N){var O={};return(!0===$e||!1===$e)&&(Me=$e,$e=void 0),(!0===Tt||!1===Tt)&&(Me=Tt,Tt=void 0),(g(_e)&&T(_e)||D(_e)&&0===_e.length)&&(_e=void 0),O._isAMomentObject=!0,O._useUTC=O._isUTC=N,O._l=Tt,O._i=_e,O._f=$e,O._strict=Me,ya(O)}function $o(_e,$e,Tt,Me){return ia(_e,$e,Tt,Me,!1)}e.createFromInputFallback=de("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(_e){_e._d=new Date(_e._i+(_e._useUTC?" UTC":""))}),e.ISO_8601=function(){},e.RFC_2822=function(){};var su=de("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var _e=$o.apply(null,arguments);return this.isValid()&&_e.isValid()?_e<this?this:_e:ve()}),Us=de("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var _e=$o.apply(null,arguments);return this.isValid()&&_e.isValid()?_e>this?this:_e:ve()});function Ka(_e,$e){var Tt,Me;if(1===$e.length&&D($e[0])&&($e=$e[0]),!$e.length)return $o();for(Tt=$e[0],Me=1;Me<$e.length;++Me)(!$e[Me].isValid()||$e[Me][_e](Tt))&&(Tt=$e[Me]);return Tt}function Tc(){return Ka("isBefore",[].slice.call(arguments,0))}function Qs(){return Ka("isAfter",[].slice.call(arguments,0))}var vu=function(){return Date.now?Date.now():+new Date},hl=["year","quarter","month","week","day","hour","minute","second","millisecond"];function Wl(_e){var $e,Me,Tt=!1,N=hl.length;for($e in _e)if(E(_e,$e)&&(-1===ei.call(hl,$e)||null!=_e[$e]&&isNaN(_e[$e])))return!1;for(Me=0;Me<N;++Me)if(_e[hl[Me]]){if(Tt)return!1;parseFloat(_e[hl[Me]])!==Sn(_e[hl[Me]])&&(Tt=!0)}return!0}function sp(){return this._isValid}function Ku(){return ha(NaN)}function Da(_e){var $e=On(_e),Tt=$e.year||0,Me=$e.quarter||0,N=$e.month||0,O=$e.week||$e.isoWeek||0,Ce=$e.day||0,Je=$e.hour||0,Vt=$e.minute||0,Rr=$e.second||0,wo=$e.millisecond||0;this._isValid=Wl($e),this._milliseconds=+wo+1e3*Rr+6e4*Vt+1e3*Je*60*60,this._days=+Ce+7*O,this._months=+N+3*Me+12*Tt,this._data={},this._locale=We(),this._bubble()}function Pl(_e){return _e instanceof Da}function gl(_e){return _e<0?-1*Math.round(-1*_e):Math.round(_e)}function ss(_e,$e,Tt){var Ce,Me=Math.min(_e.length,$e.length),N=Math.abs(_e.length-$e.length),O=0;for(Ce=0;Ce<Me;Ce++)(Tt&&_e[Ce]!==$e[Ce]||!Tt&&Sn(_e[Ce])!==Sn($e[Ce]))&&O++;return O+N}function gc(_e,$e){tt(_e,0,0,function(){var Tt=this.utcOffset(),Me="+";return Tt<0&&(Tt=-Tt,Me="-"),Me+Be(~~(Tt/60),2)+$e+Be(~~Tt%60,2)})}gc("Z",":"),gc("ZZ",""),Yt("Z",Gr),Yt("ZZ",Gr),Nt(["Z","ZZ"],function(_e,$e,Tt){Tt._useUTC=!0,Tt._tzm=Pc(Gr,_e)});var rs=/([\+\-]|\d\d)/gi;function Pc(_e,$e){var N,O,Tt=($e||"").match(_e);return null===Tt?null:0===(O=60*(N=((Tt[Tt.length-1]||[])+"").match(rs)||["-",0,0])[1]+Sn(N[2]))?0:"+"===N[0]?O:-O}function ks(_e,$e){var Tt,Me;return $e._isUTC?(Tt=$e.clone(),Me=(Pe(_e)||w(_e)?_e.valueOf():$o(_e).valueOf())-Tt.valueOf(),Tt._d.setTime(Tt._d.valueOf()+Me),e.updateOffset(Tt,!1),Tt):$o(_e).local()}function Ol(_e){return-Math.round(_e._d.getTimezoneOffset())}function _c(_e,$e,Tt){var N,Me=this._offset||0;if(!this.isValid())return null!=_e?this:NaN;if(null!=_e){if("string"==typeof _e){if(null===(_e=Pc(Gr,_e)))return this}else Math.abs(_e)<16&&!Tt&&(_e*=60);return!this._isUTC&&$e&&(N=Ol(this)),this._offset=_e,this._isUTC=!0,null!=N&&this.add(N,"m"),Me!==_e&&(!$e||this._changeInProgress?Hc(this,ha(_e-Me,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,e.updateOffset(this,!0),this._changeInProgress=null)),this}return this._isUTC?Me:Ol(this)}function Yc(_e,$e){return null!=_e?("string"!=typeof _e&&(_e=-_e),this.utcOffset(_e,$e),this):-this.utcOffset()}function lu(_e){return this.utcOffset(0,_e)}function ac(_e){return this._isUTC&&(this.utcOffset(0,_e),this._isUTC=!1,_e&&this.subtract(Ol(this),"m")),this}function bd(){if(null!=this._tzm)this.utcOffset(this._tzm,!1,!0);else if("string"==typeof this._i){var _e=Pc(Hi,this._i);null!=_e?this.utcOffset(_e):this.utcOffset(0,!0)}return this}function kd(_e){return!!this.isValid()&&(_e=_e?$o(_e).utcOffset():0,(this.utcOffset()-_e)%60==0)}function Oc(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function or(){if(!n(this._isDSTShifted))return this._isDSTShifted;var $e,_e={};return ne(_e,this),(_e=Na(_e))._a?($e=_e._isUTC?V(_e._a):$o(_e._a),this._isDSTShifted=this.isValid()&&ss(_e._a,$e.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function Dr(){return!!this.isValid()&&!this._isUTC}function kr(){return!!this.isValid()&&this._isUTC}function Qo(){return!!this.isValid()&&this._isUTC&&0===this._offset}e.updateOffset=function(){};var oo=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,da=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function ha(_e,$e){var N,O,Ce,Tt=_e,Me=null;return Pl(_e)?Tt={ms:_e._milliseconds,d:_e._days,M:_e._months}:P(_e)||!isNaN(+_e)?(Tt={},$e?Tt[$e]=+_e:Tt.milliseconds=+_e):(Me=oo.exec(_e))?(N="-"===Me[1]?-1:1,Tt={y:0,d:Sn(Me[Qe])*N,h:Sn(Me[qt])*N,m:Sn(Me[Tn])*N,s:Sn(Me[lr])*N,ms:Sn(gl(1e3*Me[mo]))*N}):(Me=da.exec(_e))?(N="-"===Me[1]?-1:1,Tt={y:Ia(Me[2],N),M:Ia(Me[3],N),w:Ia(Me[4],N),d:Ia(Me[5],N),h:Ia(Me[6],N),m:Ia(Me[7],N),s:Ia(Me[8],N)}):null==Tt?Tt={}:"object"==typeof Tt&&("from"in Tt||"to"in Tt)&&(Ce=Rs($o(Tt.from),$o(Tt.to)),(Tt={}).ms=Ce.milliseconds,Tt.M=Ce.months),O=new Da(Tt),Pl(_e)&&E(_e,"_locale")&&(O._locale=_e._locale),Pl(_e)&&E(_e,"_isValid")&&(O._isValid=_e._isValid),O}function Ia(_e,$e){var Tt=_e&&parseFloat(_e.replace(",","."));return(isNaN(Tt)?0:Tt)*$e}function cc(_e,$e){var Tt={};return Tt.months=$e.month()-_e.month()+12*($e.year()-_e.year()),_e.clone().add(Tt.months,"M").isAfter($e)&&--Tt.months,Tt.milliseconds=+$e-+_e.clone().add(Tt.months,"M"),Tt}function Rs(_e,$e){var Tt;return _e.isValid()&&$e.isValid()?($e=ks($e,_e),_e.isBefore($e)?Tt=cc(_e,$e):((Tt=cc($e,_e)).milliseconds=-Tt.milliseconds,Tt.months=-Tt.months),Tt):{milliseconds:0,months:0}}function xc(_e,$e){return function(Tt,Me){var O;return null!==Me&&!isNaN(+Me)&&(oe($e,"moment()."+$e+"(period, number) is deprecated. Please use moment()."+$e+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),O=Tt,Tt=Me,Me=O),Hc(this,ha(Tt,Me),_e),this}}function Hc(_e,$e,Tt,Me){var N=$e._milliseconds,O=gl($e._days),Ce=gl($e._months);_e.isValid()&&(Me=Me??!0,Ce&&at(_e,Zn(_e,"Month")+Ce*Tt),O&&Ci(_e,"Date",Zn(_e,"Date")+O*Tt),N&&_e._d.setTime(_e._d.valueOf()+N*Tt),Me&&e.updateOffset(_e,O||Ce))}ha.fn=Da.prototype,ha.invalid=Ku;var lp=xc(1,"add"),kp=xc(-1,"subtract");function Ju(_e){return"string"==typeof _e||_e instanceof String}function Su(_e){return Pe(_e)||w(_e)||Ju(_e)||P(_e)||Cd(_e)||qs(_e)||null==_e}function qs(_e){var N,O,$e=g(_e)&&!T(_e),Tt=!1,Me=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],Ce=Me.length;for(N=0;N<Ce;N+=1)O=Me[N],Tt=Tt||E(_e,O);return $e&&Tt}function Cd(_e){var $e=D(_e),Tt=!1;return $e&&(Tt=0===_e.filter(function(Me){return!P(Me)&&Ju(_e)}).length),$e&&Tt}function la(_e){var N,O,$e=g(_e)&&!T(_e),Tt=!1,Me=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"];for(N=0;N<Me.length;N+=1)O=Me[N],Tt=Tt||E(_e,O);return $e&&Tt}function ht(_e,$e){var Tt=_e.diff($e,"days",!0);return Tt<-6?"sameElse":Tt<-1?"lastWeek":Tt<0?"lastDay":Tt<1?"sameDay":Tt<2?"nextDay":Tt<7?"nextWeek":"sameElse"}function Ke(_e,$e){1===arguments.length&&(arguments[0]?Su(arguments[0])?(_e=arguments[0],$e=void 0):la(arguments[0])&&($e=arguments[0],_e=void 0):(_e=void 0,$e=void 0));var Tt=_e||$o(),Me=ks(Tt,this).startOf("day"),N=e.calendarFormat(this,Me)||"sameElse",O=$e&&(me($e[N])?$e[N].call(this,Tt):$e[N]);return this.format(O||this.localeData().calendar(N,this,$o(Tt)))}function dn(){return new pe(this)}function Kn(_e,$e){var Tt=Pe(_e)?_e:$o(_e);return!(!this.isValid()||!Tt.isValid())&&("millisecond"===($e=kn($e)||"millisecond")?this.valueOf()>Tt.valueOf():Tt.valueOf()<this.clone().startOf($e).valueOf())}function $i(_e,$e){var Tt=Pe(_e)?_e:$o(_e);return!(!this.isValid()||!Tt.isValid())&&("millisecond"===($e=kn($e)||"millisecond")?this.valueOf()<Tt.valueOf():this.clone().endOf($e).valueOf()<Tt.valueOf())}function sr(_e,$e,Tt,Me){var N=Pe(_e)?_e:$o(_e),O=Pe($e)?$e:$o($e);return!!(this.isValid()&&N.isValid()&&O.isValid())&&("("===(Me=Me||"()")[0]?this.isAfter(N,Tt):!this.isBefore(N,Tt))&&(")"===Me[1]?this.isBefore(O,Tt):!this.isAfter(O,Tt))}function lo(_e,$e){var Me,Tt=Pe(_e)?_e:$o(_e);return!(!this.isValid()||!Tt.isValid())&&("millisecond"===($e=kn($e)||"millisecond")?this.valueOf()===Tt.valueOf():(Me=Tt.valueOf(),this.clone().startOf($e).valueOf()<=Me&&Me<=this.clone().endOf($e).valueOf()))}function ga(_e,$e){return this.isSame(_e,$e)||this.isAfter(_e,$e)}function Zs(_e,$e){return this.isSame(_e,$e)||this.isBefore(_e,$e)}function Kr(_e,$e,Tt){var Me,N,O;if(!this.isValid())return NaN;if(!(Me=ks(_e,this)).isValid())return NaN;switch(N=6e4*(Me.utcOffset()-this.utcOffset()),$e=kn($e)){case"year":O=os(this,Me)/12;break;case"month":O=os(this,Me);break;case"quarter":O=os(this,Me)/3;break;case"second":O=(this-Me)/1e3;break;case"minute":O=(this-Me)/6e4;break;case"hour":O=(this-Me)/36e5;break;case"day":O=(this-Me-N)/864e5;break;case"week":O=(this-Me-N)/6048e5;break;default:O=this-Me}return Tt?O:pr(O)}function os(_e,$e){if(_e.date()<$e.date())return-os($e,_e);var O,Tt=12*($e.year()-_e.year())+($e.month()-_e.month()),Me=_e.clone().add(Tt,"months");return O=$e-Me<0?($e-Me)/(Me-_e.clone().add(Tt-1,"months")):($e-Me)/(_e.clone().add(Tt+1,"months")-Me),-(Tt+O)||0}function _s(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function ra(_e){if(!this.isValid())return null;var $e=!0!==_e,Tt=$e?this.clone().utc():this;return Tt.year()<0||Tt.year()>9999?ft(Tt,$e?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):me(Date.prototype.toISOString)?$e?this.toDate().toISOString():new Date(this.valueOf()+60*this.utcOffset()*1e3).toISOString().replace("Z",ft(Tt,"Z")):ft(Tt,$e?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function _a(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var Tt,Me,N,O,_e="moment",$e="";return this.isLocal()||(_e=0===this.utcOffset()?"moment.utc":"moment.parseZone",$e="Z"),Tt="["+_e+'("]',Me=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",N="-MM-DD[T]HH:mm:ss.SSS",O=$e+'[")]',this.format(Tt+Me+N+O)}function xl(_e){_e||(_e=this.isUtc()?e.defaultFormatUtc:e.defaultFormat);var $e=ft(this,_e);return this.localeData().postformat($e)}function $l(_e,$e){return this.isValid()&&(Pe(_e)&&_e.isValid()||$o(_e).isValid())?ha({to:this,from:_e}).locale(this.locale()).humanize(!$e):this.localeData().invalidDate()}function Os(_e){return this.from($o(),_e)}function yu(_e,$e){return this.isValid()&&(Pe(_e)&&_e.isValid()||$o(_e).isValid())?ha({from:this,to:_e}).locale(this.locale()).humanize(!$e):this.localeData().invalidDate()}function Ks(_e){return this.to($o(),_e)}function _l(_e){var $e;return void 0===_e?this._locale._abbr:(null!=($e=We(_e))&&(this._locale=$e),this)}e.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",e.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var Dc=de("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(_e){return void 0===_e?this.localeData():this.locale(_e)});function Gs(){return this._locale}var Ed=1e3,zl=60*Ed,vl=60*zl,Lc=3506328*vl;function Xe(_e,$e){return(_e%$e+$e)%$e}function zt(_e,$e,Tt){return _e<100&&_e>=0?new Date(_e+400,$e,Tt)-Lc:new Date(_e,$e,Tt).valueOf()}function mn(_e,$e,Tt){return _e<100&&_e>=0?Date.UTC(_e+400,$e,Tt)-Lc:Date.UTC(_e,$e,Tt)}function ni(_e){var $e,Tt;if(void 0===(_e=kn(_e))||"millisecond"===_e||!this.isValid())return this;switch(Tt=this._isUTC?mn:zt,_e){case"year":$e=Tt(this.year(),0,1);break;case"quarter":$e=Tt(this.year(),this.month()-this.month()%3,1);break;case"month":$e=Tt(this.year(),this.month(),1);break;case"week":$e=Tt(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":$e=Tt(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":$e=Tt(this.year(),this.month(),this.date());break;case"hour":$e=this._d.valueOf(),$e-=Xe($e+(this._isUTC?0:this.utcOffset()*zl),vl);break;case"minute":$e=this._d.valueOf(),$e-=Xe($e,zl);break;case"second":$e=this._d.valueOf(),$e-=Xe($e,Ed)}return this._d.setTime($e),e.updateOffset(this,!0),this}function Fi(_e){var $e,Tt;if(void 0===(_e=kn(_e))||"millisecond"===_e||!this.isValid())return this;switch(Tt=this._isUTC?mn:zt,_e){case"year":$e=Tt(this.year()+1,0,1)-1;break;case"quarter":$e=Tt(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":$e=Tt(this.year(),this.month()+1,1)-1;break;case"week":$e=Tt(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":$e=Tt(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":$e=Tt(this.year(),this.month(),this.date()+1)-1;break;case"hour":$e=this._d.valueOf(),$e+=vl-Xe($e+(this._isUTC?0:this.utcOffset()*zl),vl)-1;break;case"minute":$e=this._d.valueOf(),$e+=zl-Xe($e,zl)-1;break;case"second":$e=this._d.valueOf(),$e+=Ed-Xe($e,Ed)-1}return this._d.setTime($e),e.updateOffset(this,!0),this}function nr(){return this._d.valueOf()-6e4*(this._offset||0)}function zo(){return Math.floor(this.valueOf()/1e3)}function oa(){return new Date(this.valueOf())}function Ca(){var _e=this;return[_e.year(),_e.month(),_e.date(),_e.hour(),_e.minute(),_e.second(),_e.millisecond()]}function Ba(){var _e=this;return{years:_e.year(),months:_e.month(),date:_e.date(),hours:_e.hours(),minutes:_e.minutes(),seconds:_e.seconds(),milliseconds:_e.milliseconds()}}function Is(){return this.isValid()?this.toISOString():null}function ul(){return X(this)}function bu(){return Y({},he(this))}function Zd(){return he(this).overflow}function Qu(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}function _t(_e,$e){var Tt,Me,N,O=this._eras||We("en")._eras;for(Tt=0,Me=O.length;Tt<Me;++Tt)switch("string"==typeof O[Tt].since&&(N=e(O[Tt].since).startOf("day"),O[Tt].since=N.valueOf()),typeof O[Tt].until){case"undefined":O[Tt].until=1/0;break;case"string":N=e(O[Tt].until).startOf("day").valueOf(),O[Tt].until=N.valueOf()}return O}function q(_e,$e,Tt){var Me,N,Ce,Je,Vt,O=this.eras();for(_e=_e.toUpperCase(),Me=0,N=O.length;Me<N;++Me)if(Ce=O[Me].name.toUpperCase(),Je=O[Me].abbr.toUpperCase(),Vt=O[Me].narrow.toUpperCase(),Tt)switch($e){case"N":case"NN":case"NNN":if(Je===_e)return O[Me];break;case"NNNN":if(Ce===_e)return O[Me];break;case"NNNNN":if(Vt===_e)return O[Me]}else if([Ce,Je,Vt].indexOf(_e)>=0)return O[Me]}function W(_e,$e){var Tt=_e.since<=_e.until?1:-1;return void 0===$e?e(_e.since).year():e(_e.since).year()+($e-_e.offset)*Tt}function dt(){var _e,$e,Tt,Me=this.localeData().eras();for(_e=0,$e=Me.length;_e<$e;++_e)if(Tt=this.clone().startOf("day").valueOf(),Me[_e].since<=Tt&&Tt<=Me[_e].until||Me[_e].until<=Tt&&Tt<=Me[_e].since)return Me[_e].name;return""}function fn(){var _e,$e,Tt,Me=this.localeData().eras();for(_e=0,$e=Me.length;_e<$e;++_e)if(Tt=this.clone().startOf("day").valueOf(),Me[_e].since<=Tt&&Tt<=Me[_e].until||Me[_e].until<=Tt&&Tt<=Me[_e].since)return Me[_e].narrow;return""}function Ei(){var _e,$e,Tt,Me=this.localeData().eras();for(_e=0,$e=Me.length;_e<$e;++_e)if(Tt=this.clone().startOf("day").valueOf(),Me[_e].since<=Tt&&Tt<=Me[_e].until||Me[_e].until<=Tt&&Tt<=Me[_e].since)return Me[_e].abbr;return""}function Po(){var _e,$e,Tt,Me,N=this.localeData().eras();for(_e=0,$e=N.length;_e<$e;++_e)if(Tt=N[_e].since<=N[_e].until?1:-1,Me=this.clone().startOf("day").valueOf(),N[_e].since<=Me&&Me<=N[_e].until||N[_e].until<=Me&&Me<=N[_e].since)return(this.year()-e(N[_e].since).year())*Tt+N[_e].offset;return this.year()}function En(_e){return E(this,"_erasNameRegex")||sd.call(this),_e?this._erasNameRegex:this._erasRegex}function ls(_e){return E(this,"_erasAbbrRegex")||sd.call(this),_e?this._erasAbbrRegex:this._erasRegex}function Au(_e){return E(this,"_erasNarrowRegex")||sd.call(this),_e?this._erasNarrowRegex:this._erasRegex}function kc(_e,$e){return $e.erasAbbrRegex(_e)}function cs(_e,$e){return $e.erasNameRegex(_e)}function wu(_e,$e){return $e.erasNarrowRegex(_e)}function Iu(_e,$e){return $e._eraYearOrdinalRegex||Zi}function sd(){var N,O,Ce,Je,Vt,_e=[],$e=[],Tt=[],Me=[],Rr=this.eras();for(N=0,O=Rr.length;N<O;++N)Ce=Nn(Rr[N].name),Je=Nn(Rr[N].abbr),Vt=Nn(Rr[N].narrow),$e.push(Ce),_e.push(Je),Tt.push(Vt),Me.push(Ce),Me.push(Je),Me.push(Vt);this._erasRegex=new RegExp("^("+Me.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+$e.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+_e.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+Tt.join("|")+")","i")}function Cu(_e,$e){tt(0,[_e,_e.length],0,$e)}function Gd(_e){return Go.call(this,_e,this.week(),this.weekday()+this.localeData()._week.dow,this.localeData()._week.dow,this.localeData()._week.doy)}function Rd(_e){return Go.call(this,_e,this.isoWeek(),this.isoWeekday(),1,4)}function Bu(){return er(this.year(),1,4)}function Wf(){return er(this.isoWeekYear(),1,4)}function vc(){var _e=this.localeData()._week;return er(this.year(),_e.dow,_e.doy)}function Rc(){var _e=this.localeData()._week;return er(this.weekYear(),_e.dow,_e.doy)}function Go(_e,$e,Tt,Me,N){var O;return null==_e?_r(this,Me,N).year:($e>(O=er(_e,Me,N))&&($e=O),Md.call(this,_e,$e,Tt,Me,N))}function Md(_e,$e,Tt,Me,N){var O=Ri(_e,$e,Tt,Me,N),Ce=ii(O.year,0,O.dayOfYear);return this.year(Ce.getUTCFullYear()),this.month(Ce.getUTCMonth()),this.date(Ce.getUTCDate()),this}function Mm(_e){return null==_e?Math.ceil((this.month()+1)/3):this.month(3*(_e-1)+this.month()%3)}tt("N",0,0,"eraAbbr"),tt("NN",0,0,"eraAbbr"),tt("NNN",0,0,"eraAbbr"),tt("NNNN",0,0,"eraName"),tt("NNNNN",0,0,"eraNarrow"),tt("y",["y",1],"yo","eraYear"),tt("y",["yy",2],0,"eraYear"),tt("y",["yyy",3],0,"eraYear"),tt("y",["yyyy",4],0,"eraYear"),Yt("N",kc),Yt("NN",kc),Yt("NNN",kc),Yt("NNNN",cs),Yt("NNNNN",wu),Nt(["N","NN","NNN","NNNN","NNNNN"],function(_e,$e,Tt,Me){var N=Tt._locale.erasParse(_e,Me,Tt._strict);N?he(Tt).era=N:he(Tt).invalidEra=_e}),Yt("y",Zi),Yt("yy",Zi),Yt("yyy",Zi),Yt("yyyy",Zi),Yt("yo",Iu),Nt(["y","yy","yyy","yyyy"],ce),Nt(["yo"],function(_e,$e,Tt,Me){var N;Tt._locale._eraYearOrdinalRegex&&(N=_e.match(Tt._locale._eraYearOrdinalRegex)),Tt._locale.eraYearOrdinalParse?$e[ce]=Tt._locale.eraYearOrdinalParse(_e,N):$e[ce]=parseInt(_e,10)}),tt(0,["gg",2],0,function(){return this.weekYear()%100}),tt(0,["GG",2],0,function(){return this.isoWeekYear()%100}),Cu("gggg","weekYear"),Cu("ggggg","weekYear"),Cu("GGGG","isoWeekYear"),Cu("GGGGG","isoWeekYear"),Yt("G",gr),Yt("g",gr),Yt("GG",Vi,Fn),Yt("gg",Vi,Fn),Yt("GGGG",vn,Ai),Yt("gggg",vn,Ai),Yt("GGGGG",In,si),Yt("ggggg",In,si),ai(["gggg","ggggg","GGGG","GGGGG"],function(_e,$e,Tt,Me){$e[Me.substr(0,2)]=Sn(_e)}),ai(["gg","GG"],function(_e,$e,Tt,Me){$e[Me]=e.parseTwoDigitYear(_e)}),tt("Q",0,"Qo","quarter"),Yt("Q",xn),Nt("Q",function(_e,$e){$e[we]=3*(Sn(_e)-1)}),tt("D",["DD",2],"Do","date"),Yt("D",Vi,mr),Yt("DD",Vi,Fn),Yt("Do",function(_e,$e){return _e?$e._dayOfMonthOrdinalParse||$e._ordinalParse:$e._dayOfMonthOrdinalParseLenient}),Nt(["D","DD"],Qe),Nt("Do",function(_e,$e){$e[Qe]=Sn(_e.match(Vi)[0])});var am=an("Date",!0);function Ef(_e){var $e=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==_e?$e:this.add(_e-$e,"d")}tt("DDD",["DDDD",3],"DDDo","dayOfYear"),Yt("DDD",An),Yt("DDDD",ui),Nt(["DDD","DDDD"],function(_e,$e,Tt){Tt._dayOfYear=Sn(_e)}),tt("m",["mm",2],0,"minute"),Yt("m",Vi,jn),Yt("mm",Vi,Fn),Nt(["m","mm"],Tn);var Xc=an("Minutes",!1);tt("s",["ss",2],0,"second"),Yt("s",Vi,jn),Yt("ss",Vi,Fn),Nt(["s","ss"],lr);var Eu,Mu,yc=an("Seconds",!1);for(tt("S",0,0,function(){return~~(this.millisecond()/100)}),tt(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),tt(0,["SSS",3],0,"millisecond"),tt(0,["SSSS",4],0,function(){return 10*this.millisecond()}),tt(0,["SSSSS",5],0,function(){return 100*this.millisecond()}),tt(0,["SSSSSS",6],0,function(){return 1e3*this.millisecond()}),tt(0,["SSSSSSS",7],0,function(){return 1e4*this.millisecond()}),tt(0,["SSSSSSSS",8],0,function(){return 1e5*this.millisecond()}),tt(0,["SSSSSSSSS",9],0,function(){return 1e6*this.millisecond()}),Yt("S",An,xn),Yt("SS",An,Fn),Yt("SSS",An,ui),Eu="SSSS";Eu.length<=9;Eu+="S")Yt(Eu,Zi);function ws(_e,$e){$e[mo]=Sn(1e3*("0."+_e))}for(Eu="S";Eu.length<=9;Eu+="S")Nt(Eu,ws);function Ll(){return this._isUTC?"UTC":""}function Vc(){return this._isUTC?"Coordinated Universal Time":""}Mu=an("Milliseconds",!1),tt("z",0,0,"zoneAbbr"),tt("zz",0,0,"zoneName");var Lo=pe.prototype;function Uu(_e){return $o(1e3*_e)}function et(){return $o.apply(null,arguments).parseZone()}function Ae(_e){return _e}Lo.add=lp,Lo.calendar=Ke,Lo.clone=dn,Lo.diff=Kr,Lo.endOf=Fi,Lo.format=xl,Lo.from=$l,Lo.fromNow=Os,Lo.to=yu,Lo.toNow=Ks,Lo.get=Xn,Lo.invalidAt=Zd,Lo.isAfter=Kn,Lo.isBefore=$i,Lo.isBetween=sr,Lo.isSame=lo,Lo.isSameOrAfter=ga,Lo.isSameOrBefore=Zs,Lo.isValid=ul,Lo.lang=Dc,Lo.locale=_l,Lo.localeData=Gs,Lo.max=Us,Lo.min=su,Lo.parsingFlags=bu,Lo.set=Et,Lo.startOf=ni,Lo.subtract=kp,Lo.toArray=Ca,Lo.toObject=Ba,Lo.toDate=oa,Lo.toISOString=ra,Lo.inspect=_a,typeof Symbol<"u"&&null!=Symbol.for&&(Lo[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),Lo.toJSON=Is,Lo.toString=_s,Lo.unix=zo,Lo.valueOf=nr,Lo.creationData=Qu,Lo.eraName=dt,Lo.eraNarrow=fn,Lo.eraAbbr=Ei,Lo.eraYear=Po,Lo.year=Bo,Lo.isLeapYear=Ii,Lo.weekYear=Gd,Lo.isoWeekYear=Rd,Lo.quarter=Lo.quarters=Mm,Lo.month=It,Lo.daysInMonth=Qt,Lo.week=Lo.weeks=Oa,Lo.isoWeek=Lo.isoWeeks=Uo,Lo.weeksInYear=vc,Lo.weeksInWeekYear=Rc,Lo.isoWeeksInYear=Bu,Lo.isoWeeksInISOWeekYear=Wf,Lo.date=am,Lo.day=Lo.days=Ma,Lo.weekday=Vo,Lo.isoWeekday=Ds,Lo.dayOfYear=Ef,Lo.hour=Lo.hours=Jn,Lo.minute=Lo.minutes=Xc,Lo.second=Lo.seconds=yc,Lo.millisecond=Lo.milliseconds=Mu,Lo.utcOffset=_c,Lo.utc=lu,Lo.local=ac,Lo.parseZone=bd,Lo.hasAlignedHourOffset=kd,Lo.isDST=Oc,Lo.isLocal=Dr,Lo.isUtcOffset=kr,Lo.isUtc=Qo,Lo.isUTC=Qo,Lo.zoneAbbr=Ll,Lo.zoneName=Vc,Lo.dates=de("dates accessor is deprecated. Use date instead.",am),Lo.months=de("months accessor is deprecated. Use month instead",It),Lo.years=de("years accessor is deprecated. Use year instead",Bo),Lo.zone=de("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",Yc),Lo.isDSTShifted=de("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",or);var Ge=Z.prototype;function xt(_e,$e,Tt,Me){var N=We(),O=V().set(Me,$e);return N[Tt](O,_e)}function Ht(_e,$e,Tt){if(P(_e)&&($e=_e,_e=void 0),_e=_e||"",null!=$e)return xt(_e,$e,Tt,"month");var Me,N=[];for(Me=0;Me<12;Me++)N[Me]=xt(_e,Me,Tt,"month");return N}function _n(_e,$e,Tt,Me){"boolean"==typeof _e?(P($e)&&(Tt=$e,$e=void 0),$e=$e||""):(Tt=$e=_e,_e=!1,P($e)&&(Tt=$e,$e=void 0),$e=$e||"");var Ce,N=We(),O=_e?N._week.dow:0,Je=[];if(null!=Tt)return xt($e,(Tt+O)%7,Me,"day");for(Ce=0;Ce<7;Ce++)Je[Ce]=xt($e,(Ce+O)%7,Me,"day");return Je}function li(_e,$e){return Ht(_e,$e,"months")}function dr(_e,$e){return Ht(_e,$e,"monthsShort")}function Sr(_e,$e,Tt){return _n(_e,$e,Tt,"weekdays")}function fo(_e,$e,Tt){return _n(_e,$e,Tt,"weekdaysShort")}function ms(_e,$e,Tt){return _n(_e,$e,Tt,"weekdaysMin")}Ge.calendar=ke,Ge.longDateFormat=He,Ge.invalidDate=nn,Ge.ordinal=vi,Ge.preparse=Ae,Ge.postformat=Ae,Ge.relativeTime=mi,Ge.pastFuture=wi,Ge.set=be,Ge.eras=_t,Ge.erasParse=q,Ge.erasConvertYear=W,Ge.erasAbbrRegex=ls,Ge.erasNameRegex=En,Ge.erasNarrowRegex=Au,Ge.months=Cr,Ge.monthsShort=Fr,Ge.monthsParse=Wn,Ge.monthsRegex=Pt,Ge.monthsShortRegex=St,Ge.week=Yr,Ge.firstDayOfYear=to,Ge.firstDayOfWeek=Si,Ge.weekdays=Di,Ge.weekdaysMin=ur,Ge.weekdaysShort=Er,Ge.weekdaysParse=$t,Ge.weekdaysRegex=ja,Ge.weekdaysShortRegex=wa,Ge.weekdaysMinRegex=ns,Ge.isPM=zc,Ge.meridiem=tn,is("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(_e){var $e=_e%10;return _e+(1===Sn(_e%100/10)?"th":1===$e?"st":2===$e?"nd":3===$e?"rd":"th")}}),e.lang=de("moment.lang is deprecated. Use moment.locale instead.",is),e.langData=de("moment.langData is deprecated. Use moment.localeData instead.",We);var Nl=Math.abs;function Dl(){var _e=this._data;return this._milliseconds=Nl(this._milliseconds),this._days=Nl(this._days),this._months=Nl(this._months),_e.milliseconds=Nl(_e.milliseconds),_e.seconds=Nl(_e.seconds),_e.minutes=Nl(_e.minutes),_e.hours=Nl(_e.hours),_e.months=Nl(_e.months),_e.years=Nl(_e.years),this}function Yl(_e,$e,Tt,Me){var N=ha($e,Tt);return _e._milliseconds+=Me*N._milliseconds,_e._days+=Me*N._days,_e._months+=Me*N._months,_e._bubble()}function cu(_e,$e){return Yl(this,_e,$e,1)}function Mr(_e,$e){return Yl(this,_e,$e,-1)}function sl(_e){return _e<0?Math.floor(_e):Math.ceil(_e)}function ld(){var N,O,Ce,Je,Vt,_e=this._milliseconds,$e=this._days,Tt=this._months,Me=this._data;return _e>=0&&$e>=0&&Tt>=0||_e<=0&&$e<=0&&Tt<=0||(_e+=864e5*sl(ll(Tt)+$e),$e=0,Tt=0),Me.milliseconds=_e%1e3,N=pr(_e/1e3),Me.seconds=N%60,O=pr(N/60),Me.minutes=O%60,Ce=pr(O/60),Me.hours=Ce%24,$e+=pr(Ce/24),Tt+=Vt=pr(qo($e)),$e-=sl(ll(Vt)),Je=pr(Tt/12),Tt%=12,Me.days=$e,Me.months=Tt,Me.years=Je,this}function qo(_e){return 4800*_e/146097}function ll(_e){return 146097*_e/4800}function y_(_e){if(!this.isValid())return NaN;var $e,Tt,Me=this._milliseconds;if("month"===(_e=kn(_e))||"quarter"===_e||"year"===_e)switch($e=this._days+Me/864e5,Tt=this._months+qo($e),_e){case"month":return Tt;case"quarter":return Tt/3;case"year":return Tt/12}else switch($e=this._days+Math.round(ll(this._months)),_e){case"week":return $e/7+Me/6048e5;case"day":return $e+Me/864e5;case"hour":return 24*$e+Me/36e5;case"minute":return 1440*$e+Me/6e4;case"second":return 86400*$e+Me/1e3;case"millisecond":return Math.floor(864e5*$e)+Me;default:throw new Error("Unknown unit "+_e)}}function Hl(_e){return function(){return this.as(_e)}}var Fd=Hl("ms"),qu=Hl("s"),Zc=Hl("m"),uu=Hl("h"),Es=Hl("d"),mc=Hl("w"),Yp=Hl("M"),Fs=Hl("Q"),nc=Hl("y"),Pu=Fd;function yl(){return ha(this)}function dl(_e){return _e=kn(_e),this.isValid()?this[_e+"s"]():NaN}function Ti(_e){return function(){return this.isValid()?this._data[_e]:NaN}}var du=Ti("milliseconds"),Kc=Ti("seconds"),Wd=Ti("minutes"),Vl=Ti("hours"),bl=Ti("days"),Sl=Ti("months"),Nd=Ti("years");function Hp(){return pr(this.days()/7)}var eu=Math.round,ta={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function pu(_e,$e,Tt,Me,N){return N.relativeTime($e||1,!!Tt,_e,Me)}function fc(_e,$e,Tt,Me){var N=ha(_e).abs(),O=eu(N.as("s")),Ce=eu(N.as("m")),Je=eu(N.as("h")),Vt=eu(N.as("d")),Rr=eu(N.as("M")),wo=eu(N.as("w")),ua=eu(N.as("y")),Ls=O<=Tt.ss&&["s",O]||O<Tt.s&&["ss",O]||Ce<=1&&["m"]||Ce<Tt.m&&["mm",Ce]||Je<=1&&["h"]||Je<Tt.h&&["hh",Je]||Vt<=1&&["d"]||Vt<Tt.d&&["dd",Vt];return null!=Tt.w&&(Ls=Ls||wo<=1&&["w"]||wo<Tt.w&&["ww",wo]),(Ls=Ls||Rr<=1&&["M"]||Rr<Tt.M&&["MM",Rr]||ua<=1&&["y"]||["yy",ua])[2]=$e,Ls[3]=+_e>0,Ls[4]=Me,pu.apply(null,Ls)}function Tu(_e){return void 0===_e?eu:"function"==typeof _e&&(eu=_e,!0)}function cp(_e,$e){return void 0!==ta[_e]&&(void 0===$e?ta[_e]:(ta[_e]=$e,"s"===_e&&(ta.ss=$e-1),!0))}function Ql(_e,$e){if(!this.isValid())return this.localeData().invalidDate();var N,O,Tt=!1,Me=ta;return"object"==typeof _e&&($e=_e,_e=!1),"boolean"==typeof _e&&(Tt=_e),"object"==typeof $e&&(Me=Object.assign({},ta,$e),null!=$e.s&&null==$e.ss&&(Me.ss=$e.s-1)),O=fc(this,!Tt,Me,N=this.localeData()),Tt&&(O=N.pastFuture(+this,O)),N.postformat(O)}var Tm=Math.abs;function Ro(_e){return(_e>0)-(_e<0)||+_e}function Fo(){if(!this.isValid())return this.localeData().invalidDate();var Me,N,O,Ce,Vt,Rr,wo,ua,_e=Tm(this._milliseconds)/1e3,$e=Tm(this._days),Tt=Tm(this._months),Je=this.asSeconds();return Je?(Me=pr(_e/60),N=pr(Me/60),_e%=60,Me%=60,O=pr(Tt/12),Tt%=12,Ce=_e?_e.toFixed(3).replace(/\.?0+$/,""):"",Vt=Je<0?"-":"",Rr=Ro(this._months)!==Ro(Je)?"-":"",wo=Ro(this._days)!==Ro(Je)?"-":"",ua=Ro(this._milliseconds)!==Ro(Je)?"-":"",Vt+"P"+(O?Rr+O+"Y":"")+(Tt?Rr+Tt+"M":"")+($e?wo+$e+"D":"")+(N||Me||_e?"T":"")+(N?ua+N+"H":"")+(Me?ua+Me+"M":"")+(_e?ua+Ce+"S":"")):"P0D"}var vs=Da.prototype;return vs.isValid=sp,vs.abs=Dl,vs.add=cu,vs.subtract=Mr,vs.as=y_,vs.asMilliseconds=Fd,vs.asSeconds=qu,vs.asMinutes=Zc,vs.asHours=uu,vs.asDays=Es,vs.asWeeks=mc,vs.asMonths=Yp,vs.asQuarters=Fs,vs.asYears=nc,vs.valueOf=Pu,vs._bubble=ld,vs.clone=yl,vs.get=dl,vs.milliseconds=du,vs.seconds=Kc,vs.minutes=Wd,vs.hours=Vl,vs.days=bl,vs.weeks=Hp,vs.months=Sl,vs.years=Nd,vs.humanize=Ql,vs.toISOString=Fo,vs.toString=Fo,vs.toJSON=Fo,vs.locale=_l,vs.localeData=Gs,vs.toIsoString=de("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Fo),vs.lang=Dc,tt("X",0,0,"unix"),tt("x",0,0,"valueOf"),Yt("x",gr),Yt("X",zr),Nt("X",function(_e,$e,Tt){Tt._d=new Date(1e3*parseFloat(_e))}),Nt("x",function(_e,$e,Tt){Tt._d=new Date(Sn(_e))}),e.version="2.30.1",l($o),e.fn=Lo,e.min=Tc,e.max=Qs,e.now=vu,e.utc=V,e.unix=Uu,e.months=li,e.isDate=w,e.locale=is,e.invalid=ve,e.duration=ha,e.isMoment=Pe,e.weekdays=Sr,e.parseZone=et,e.localeData=We,e.isDuration=Pl,e.monthsShort=dr,e.weekdaysMin=ms,e.defineLocale=yt,e.updateLocale=Dt,e.locales=Rt,e.weekdaysShort=fo,e.normalizeUnits=kn,e.relativeTimeRounding=Tu,e.relativeTimeThreshold=cp,e.calendarFormat=ht,e.prototype=Lo,e.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},e}()},96895:(qe,I,p)=>{"use strict";var e=p(59974);I.y=e.Store},59974:(qe,I,p)=>{"use strict";Object.defineProperty(I,"__esModule",{value:!0});var o=p(76477),e=function(){function l(D){this._state$=new o.BehaviorSubject(D),this.state$=this._state$.asObservable()}return Object.defineProperty(l.prototype,"state",{get:function(){return this._state$.getValue()},enumerable:!0,configurable:!0}),l.prototype.setState=function(D){this._state$.next(D)},l}();I.Store=e},76477:function(qe,I,p){"use strict";var o=this&&this.__createBinding||(Object.create?function(vr,Qr,Li,Ta){void 0===Ta&&(Ta=Li),Object.defineProperty(vr,Ta,{enumerable:!0,get:function(){return Qr[Li]}})}:function(vr,Qr,Li,Ta){void 0===Ta&&(Ta=Li),vr[Ta]=Qr[Li]}),e=this&&this.__exportStar||function(vr,Qr){for(var Li in vr)"default"!==Li&&!Object.prototype.hasOwnProperty.call(Qr,Li)&&o(Qr,vr,Li)};Object.defineProperty(I,"__esModule",{value:!0}),I.interval=I.iif=I.generate=I.fromEventPattern=I.fromEvent=I.from=I.forkJoin=I.empty=I.defer=I.connectable=I.concat=I.combineLatest=I.bindNodeCallback=I.bindCallback=I.UnsubscriptionError=I.TimeoutError=I.SequenceError=I.ObjectUnsubscribedError=I.NotFoundError=I.EmptyError=I.ArgumentOutOfRangeError=I.firstValueFrom=I.lastValueFrom=I.isObservable=I.identity=I.noop=I.pipe=I.NotificationKind=I.Notification=I.Subscriber=I.Subscription=I.Scheduler=I.VirtualAction=I.VirtualTimeScheduler=I.animationFrameScheduler=I.animationFrame=I.queueScheduler=I.queue=I.asyncScheduler=I.async=I.asapScheduler=I.asap=I.AsyncSubject=I.ReplaySubject=I.BehaviorSubject=I.Subject=I.animationFrames=I.observable=I.ConnectableObservable=I.Observable=void 0,I.filter=I.expand=I.exhaustMap=I.exhaustAll=I.exhaust=I.every=I.endWith=I.elementAt=I.distinctUntilKeyChanged=I.distinctUntilChanged=I.distinct=I.dematerialize=I.delayWhen=I.delay=I.defaultIfEmpty=I.debounceTime=I.debounce=I.count=I.connect=I.concatWith=I.concatMapTo=I.concatMap=I.concatAll=I.combineLatestWith=I.combineLatestAll=I.combineAll=I.catchError=I.bufferWhen=I.bufferToggle=I.bufferTime=I.bufferCount=I.buffer=I.auditTime=I.audit=I.config=I.NEVER=I.EMPTY=I.scheduled=I.zip=I.using=I.timer=I.throwError=I.range=I.race=I.partition=I.pairs=I.onErrorResumeNext=I.of=I.never=I.merge=void 0,I.switchMap=I.switchAll=I.subscribeOn=I.startWith=I.skipWhile=I.skipUntil=I.skipLast=I.skip=I.single=I.shareReplay=I.share=I.sequenceEqual=I.scan=I.sampleTime=I.sample=I.refCount=I.retryWhen=I.retry=I.repeatWhen=I.repeat=I.reduce=I.raceWith=I.publishReplay=I.publishLast=I.publishBehavior=I.publish=I.pluck=I.pairwise=I.onErrorResumeNextWith=I.observeOn=I.multicast=I.min=I.mergeWith=I.mergeScan=I.mergeMapTo=I.mergeMap=I.flatMap=I.mergeAll=I.max=I.materialize=I.mapTo=I.map=I.last=I.isEmpty=I.ignoreElements=I.groupBy=I.first=I.findIndex=I.find=I.finalize=void 0,I.zipWith=I.zipAll=I.withLatestFrom=I.windowWhen=I.windowToggle=I.windowTime=I.windowCount=I.window=I.toArray=I.timestamp=I.timeoutWith=I.timeout=I.timeInterval=I.throwIfEmpty=I.throttleTime=I.throttle=I.tap=I.takeWhile=I.takeUntil=I.takeLast=I.take=I.switchScan=I.switchMapTo=void 0;var l=p(55821);Object.defineProperty(I,"Observable",{enumerable:!0,get:function(){return l.Observable}});var D=p(6686);Object.defineProperty(I,"ConnectableObservable",{enumerable:!0,get:function(){return D.ConnectableObservable}});var g=p(91689);Object.defineProperty(I,"observable",{enumerable:!0,get:function(){return g.observable}});var E=p(2946);Object.defineProperty(I,"animationFrames",{enumerable:!0,get:function(){return E.animationFrames}});var T=p(13768);Object.defineProperty(I,"Subject",{enumerable:!0,get:function(){return T.Subject}});var n=p(75482);Object.defineProperty(I,"BehaviorSubject",{enumerable:!0,get:function(){return n.BehaviorSubject}});var P=p(93406);Object.defineProperty(I,"ReplaySubject",{enumerable:!0,get:function(){return P.ReplaySubject}});var w=p(87606);Object.defineProperty(I,"AsyncSubject",{enumerable:!0,get:function(){return w.AsyncSubject}});var B=p(71212);Object.defineProperty(I,"asap",{enumerable:!0,get:function(){return B.asap}}),Object.defineProperty(I,"asapScheduler",{enumerable:!0,get:function(){return B.asapScheduler}});var Y=p(64006);Object.defineProperty(I,"async",{enumerable:!0,get:function(){return Y.async}}),Object.defineProperty(I,"asyncScheduler",{enumerable:!0,get:function(){return Y.asyncScheduler}});var V=p(65668);Object.defineProperty(I,"queue",{enumerable:!0,get:function(){return V.queue}}),Object.defineProperty(I,"queueScheduler",{enumerable:!0,get:function(){return V.queueScheduler}});var ue=p(91906);Object.defineProperty(I,"animationFrame",{enumerable:!0,get:function(){return ue.animationFrame}}),Object.defineProperty(I,"animationFrameScheduler",{enumerable:!0,get:function(){return ue.animationFrameScheduler}});var he=p(12018);Object.defineProperty(I,"VirtualTimeScheduler",{enumerable:!0,get:function(){return he.VirtualTimeScheduler}}),Object.defineProperty(I,"VirtualAction",{enumerable:!0,get:function(){return he.VirtualAction}});var ae=p(72716);Object.defineProperty(I,"Scheduler",{enumerable:!0,get:function(){return ae.Scheduler}});var X=p(76448);Object.defineProperty(I,"Subscription",{enumerable:!0,get:function(){return X.Subscription}});var ve=p(57052);Object.defineProperty(I,"Subscriber",{enumerable:!0,get:function(){return ve.Subscriber}});var ye=p(77262);Object.defineProperty(I,"Notification",{enumerable:!0,get:function(){return ye.Notification}}),Object.defineProperty(I,"NotificationKind",{enumerable:!0,get:function(){return ye.NotificationKind}});var ge=p(81471);Object.defineProperty(I,"pipe",{enumerable:!0,get:function(){return ge.pipe}});var ne=p(31);Object.defineProperty(I,"noop",{enumerable:!0,get:function(){return ne.noop}});var pe=p(77884);Object.defineProperty(I,"identity",{enumerable:!0,get:function(){return pe.identity}});var Pe=p(14341);Object.defineProperty(I,"isObservable",{enumerable:!0,get:function(){return Pe.isObservable}});var xe=p(65257);Object.defineProperty(I,"lastValueFrom",{enumerable:!0,get:function(){return xe.lastValueFrom}});var de=p(35754);Object.defineProperty(I,"firstValueFrom",{enumerable:!0,get:function(){return de.firstValueFrom}});var re=p(4769);Object.defineProperty(I,"ArgumentOutOfRangeError",{enumerable:!0,get:function(){return re.ArgumentOutOfRangeError}});var oe=p(48915);Object.defineProperty(I,"EmptyError",{enumerable:!0,get:function(){return oe.EmptyError}});var me=p(85477);Object.defineProperty(I,"NotFoundError",{enumerable:!0,get:function(){return me.NotFoundError}});var be=p(23965);Object.defineProperty(I,"ObjectUnsubscribedError",{enumerable:!0,get:function(){return be.ObjectUnsubscribedError}});var le=p(61551);Object.defineProperty(I,"SequenceError",{enumerable:!0,get:function(){return le.SequenceError}});var Z=p(75001);Object.defineProperty(I,"TimeoutError",{enumerable:!0,get:function(){return Z.TimeoutError}});var Oe=p(24970);Object.defineProperty(I,"UnsubscriptionError",{enumerable:!0,get:function(){return Oe.UnsubscriptionError}});var j=p(17532);Object.defineProperty(I,"bindCallback",{enumerable:!0,get:function(){return j.bindCallback}});var ke=p(33488);Object.defineProperty(I,"bindNodeCallback",{enumerable:!0,get:function(){return ke.bindNodeCallback}});var Be=p(36892);Object.defineProperty(I,"combineLatest",{enumerable:!0,get:function(){return Be.combineLatest}});var nt=p(93601);Object.defineProperty(I,"concat",{enumerable:!0,get:function(){return nt.concat}});var mt=p(79190);Object.defineProperty(I,"connectable",{enumerable:!0,get:function(){return mt.connectable}});var ut=p(39954);Object.defineProperty(I,"defer",{enumerable:!0,get:function(){return ut.defer}});var Ve=p(97406);Object.defineProperty(I,"empty",{enumerable:!0,get:function(){return Ve.empty}});var tt=p(67928);Object.defineProperty(I,"forkJoin",{enumerable:!0,get:function(){return tt.forkJoin}});var Ne=p(24996);Object.defineProperty(I,"from",{enumerable:!0,get:function(){return Ne.from}});var wt=p(52579);Object.defineProperty(I,"fromEvent",{enumerable:!0,get:function(){return wt.fromEvent}});var ft=p(13975);Object.defineProperty(I,"fromEventPattern",{enumerable:!0,get:function(){return ft.fromEventPattern}});var Ct=p(4318);Object.defineProperty(I,"generate",{enumerable:!0,get:function(){return Ct.generate}});var rn=p(3140);Object.defineProperty(I,"iif",{enumerable:!0,get:function(){return rn.iif}});var He=p(51836);Object.defineProperty(I,"interval",{enumerable:!0,get:function(){return He.interval}});var st=p(89248);Object.defineProperty(I,"merge",{enumerable:!0,get:function(){return st.merge}});var nn=p(2818);Object.defineProperty(I,"never",{enumerable:!0,get:function(){return nn.never}});var Dn=p(19677);Object.defineProperty(I,"of",{enumerable:!0,get:function(){return Dn.of}});var Mn=p(19978);Object.defineProperty(I,"onErrorResumeNext",{enumerable:!0,get:function(){return Mn.onErrorResumeNext}});var vi=p(75519);Object.defineProperty(I,"pairs",{enumerable:!0,get:function(){return vi.pairs}});var Gi=p(68221);Object.defineProperty(I,"partition",{enumerable:!0,get:function(){return Gi.partition}});var mi=p(28181);Object.defineProperty(I,"race",{enumerable:!0,get:function(){return mi.race}});var wi=p(14622);Object.defineProperty(I,"range",{enumerable:!0,get:function(){return wi.range}});var Bn=p(70338);Object.defineProperty(I,"throwError",{enumerable:!0,get:function(){return Bn.throwError}});var kn=p(33271);Object.defineProperty(I,"timer",{enumerable:!0,get:function(){return kn.timer}});var On=p(70924);Object.defineProperty(I,"using",{enumerable:!0,get:function(){return On.using}});var je=p(14842);Object.defineProperty(I,"zip",{enumerable:!0,get:function(){return je.zip}});var Bt=p(9341);Object.defineProperty(I,"scheduled",{enumerable:!0,get:function(){return Bt.scheduled}});var xn=p(97406);Object.defineProperty(I,"EMPTY",{enumerable:!0,get:function(){return xn.EMPTY}});var Fn=p(2818);Object.defineProperty(I,"NEVER",{enumerable:!0,get:function(){return Fn.NEVER}}),e(p(85256),I);var ui=p(73570);Object.defineProperty(I,"config",{enumerable:!0,get:function(){return ui.config}});var Ai=p(14815);Object.defineProperty(I,"audit",{enumerable:!0,get:function(){return Ai.audit}});var si=p(19034);Object.defineProperty(I,"auditTime",{enumerable:!0,get:function(){return si.auditTime}});var Vi=p(78544);Object.defineProperty(I,"buffer",{enumerable:!0,get:function(){return Vi.buffer}});var Vn=p(93999);Object.defineProperty(I,"bufferCount",{enumerable:!0,get:function(){return Vn.bufferCount}});var Hn=p(11392);Object.defineProperty(I,"bufferTime",{enumerable:!0,get:function(){return Hn.bufferTime}});var An=p(40555);Object.defineProperty(I,"bufferToggle",{enumerable:!0,get:function(){return An.bufferToggle}});var vn=p(67274);Object.defineProperty(I,"bufferWhen",{enumerable:!0,get:function(){return vn.bufferWhen}});var In=p(13251);Object.defineProperty(I,"catchError",{enumerable:!0,get:function(){return In.catchError}});var Zi=p(68996);Object.defineProperty(I,"combineAll",{enumerable:!0,get:function(){return Zi.combineAll}});var gr=p(68931);Object.defineProperty(I,"combineLatestAll",{enumerable:!0,get:function(){return gr.combineLatestAll}});var Hi=p(18947);Object.defineProperty(I,"combineLatestWith",{enumerable:!0,get:function(){return Hi.combineLatestWith}});var Gr=p(31557);Object.defineProperty(I,"concatAll",{enumerable:!0,get:function(){return Gr.concatAll}});var zr=p(44659);Object.defineProperty(I,"concatMap",{enumerable:!0,get:function(){return zr.concatMap}});var Eo=p(62993);Object.defineProperty(I,"concatMapTo",{enumerable:!0,get:function(){return Eo.concatMapTo}});var mr=p(75898);Object.defineProperty(I,"concatWith",{enumerable:!0,get:function(){return mr.concatWith}});var jn=p(59725);Object.defineProperty(I,"connect",{enumerable:!0,get:function(){return jn.connect}});var ct=p(1814);Object.defineProperty(I,"count",{enumerable:!0,get:function(){return ct.count}});var Yt=p(79784);Object.defineProperty(I,"debounce",{enumerable:!0,get:function(){return Yt.debounce}});var oi=p(97061);Object.defineProperty(I,"debounceTime",{enumerable:!0,get:function(){return oi.debounceTime}});var Ni=p(40926);Object.defineProperty(I,"defaultIfEmpty",{enumerable:!0,get:function(){return Ni.defaultIfEmpty}});var Nn=p(52096);Object.defineProperty(I,"delay",{enumerable:!0,get:function(){return Nn.delay}});var pr=p(63264);Object.defineProperty(I,"delayWhen",{enumerable:!0,get:function(){return pr.delayWhen}});var Sn=p(60533);Object.defineProperty(I,"dematerialize",{enumerable:!0,get:function(){return Sn.dematerialize}});var Pn=p(5045);Object.defineProperty(I,"distinct",{enumerable:!0,get:function(){return Pn.distinct}});var Nt=p(15794);Object.defineProperty(I,"distinctUntilChanged",{enumerable:!0,get:function(){return Nt.distinctUntilChanged}});var ai=p(48589);Object.defineProperty(I,"distinctUntilKeyChanged",{enumerable:!0,get:function(){return ai.distinctUntilKeyChanged}});var hn=p(11069);Object.defineProperty(I,"elementAt",{enumerable:!0,get:function(){return hn.elementAt}});var Le=p(94312);Object.defineProperty(I,"endWith",{enumerable:!0,get:function(){return Le.endWith}});var ce=p(19098);Object.defineProperty(I,"every",{enumerable:!0,get:function(){return ce.every}});var we=p(15429);Object.defineProperty(I,"exhaust",{enumerable:!0,get:function(){return we.exhaust}});var Qe=p(11399);Object.defineProperty(I,"exhaustAll",{enumerable:!0,get:function(){return Qe.exhaustAll}});var qt=p(82202);Object.defineProperty(I,"exhaustMap",{enumerable:!0,get:function(){return qt.exhaustMap}});var Tn=p(68678);Object.defineProperty(I,"expand",{enumerable:!0,get:function(){return Tn.expand}});var lr=p(74270);Object.defineProperty(I,"filter",{enumerable:!0,get:function(){return lr.filter}});var mo=p(21587);Object.defineProperty(I,"finalize",{enumerable:!0,get:function(){return mo.finalize}});var rr=p(42265);Object.defineProperty(I,"find",{enumerable:!0,get:function(){return rr.find}});var aa=p(8195);Object.defineProperty(I,"findIndex",{enumerable:!0,get:function(){return aa.findIndex}});var ea=p(28012);Object.defineProperty(I,"first",{enumerable:!0,get:function(){return ea.first}});var Bo=p(34075);Object.defineProperty(I,"groupBy",{enumerable:!0,get:function(){return Bo.groupBy}});var Ii=p(44041);Object.defineProperty(I,"ignoreElements",{enumerable:!0,get:function(){return Ii.ignoreElements}});var an=p(86478);Object.defineProperty(I,"isEmpty",{enumerable:!0,get:function(){return an.isEmpty}});var Zn=p(85126);Object.defineProperty(I,"last",{enumerable:!0,get:function(){return Zn.last}});var Ci=p(70752);Object.defineProperty(I,"map",{enumerable:!0,get:function(){return Ci.map}});var Xn=p(62182);Object.defineProperty(I,"mapTo",{enumerable:!0,get:function(){return Xn.mapTo}});var Et=p(90119);Object.defineProperty(I,"materialize",{enumerable:!0,get:function(){return Et.materialize}});var gn=p(99329);Object.defineProperty(I,"max",{enumerable:!0,get:function(){return gn.max}});var ei=p(43917);Object.defineProperty(I,"mergeAll",{enumerable:!0,get:function(){return ei.mergeAll}});var un=p(21463);Object.defineProperty(I,"flatMap",{enumerable:!0,get:function(){return un.flatMap}});var Ft=p(43010);Object.defineProperty(I,"mergeMap",{enumerable:!0,get:function(){return Ft.mergeMap}});var Ut=p(10929);Object.defineProperty(I,"mergeMapTo",{enumerable:!0,get:function(){return Ut.mergeMapTo}});var wn=p(42816);Object.defineProperty(I,"mergeScan",{enumerable:!0,get:function(){return wn.mergeScan}});var Gn=p(69684);Object.defineProperty(I,"mergeWith",{enumerable:!0,get:function(){return Gn.mergeWith}});var xi=p(16250);Object.defineProperty(I,"min",{enumerable:!0,get:function(){return xi.min}});var Cr=p(19872);Object.defineProperty(I,"multicast",{enumerable:!0,get:function(){return Cr.multicast}});var Fr=p(94928);Object.defineProperty(I,"observeOn",{enumerable:!0,get:function(){return Fr.observeOn}});var en=p(56236);Object.defineProperty(I,"onErrorResumeNextWith",{enumerable:!0,get:function(){return en.onErrorResumeNextWith}});var Wn=p(99526);Object.defineProperty(I,"pairwise",{enumerable:!0,get:function(){return Wn.pairwise}});var at=p(85199);Object.defineProperty(I,"pluck",{enumerable:!0,get:function(){return at.pluck}});var It=p(10955);Object.defineProperty(I,"publish",{enumerable:!0,get:function(){return It.publish}});var Qt=p(66750);Object.defineProperty(I,"publishBehavior",{enumerable:!0,get:function(){return Qt.publishBehavior}});var St=p(41003);Object.defineProperty(I,"publishLast",{enumerable:!0,get:function(){return St.publishLast}});var Pt=p(45530);Object.defineProperty(I,"publishReplay",{enumerable:!0,get:function(){return Pt.publishReplay}});var cn=p(32992);Object.defineProperty(I,"raceWith",{enumerable:!0,get:function(){return cn.raceWith}});var Ln=p(98587);Object.defineProperty(I,"reduce",{enumerable:!0,get:function(){return Ln.reduce}});var ii=p(68408);Object.defineProperty(I,"repeat",{enumerable:!0,get:function(){return ii.repeat}});var hi=p(97032);Object.defineProperty(I,"repeatWhen",{enumerable:!0,get:function(){return hi.repeatWhen}});var Ri=p(46069);Object.defineProperty(I,"retry",{enumerable:!0,get:function(){return Ri.retry}});var _r=p(35131);Object.defineProperty(I,"retryWhen",{enumerable:!0,get:function(){return _r.retryWhen}});var er=p(80904);Object.defineProperty(I,"refCount",{enumerable:!0,get:function(){return er.refCount}});var Yr=p(35032);Object.defineProperty(I,"sample",{enumerable:!0,get:function(){return Yr.sample}});var _o=p(52098);Object.defineProperty(I,"sampleTime",{enumerable:!0,get:function(){return _o.sampleTime}});var Si=p(50251);Object.defineProperty(I,"scan",{enumerable:!0,get:function(){return Si.scan}});var to=p(49788);Object.defineProperty(I,"sequenceEqual",{enumerable:!0,get:function(){return to.sequenceEqual}});var Oa=p(43222);Object.defineProperty(I,"share",{enumerable:!0,get:function(){return Oa.share}});var Uo=p(12186);Object.defineProperty(I,"shareReplay",{enumerable:!0,get:function(){return Uo.shareReplay}});var rl=p(695);Object.defineProperty(I,"single",{enumerable:!0,get:function(){return rl.single}});var Vs=p(44975);Object.defineProperty(I,"skip",{enumerable:!0,get:function(){return Vs.skip}});var ps=p(30728);Object.defineProperty(I,"skipLast",{enumerable:!0,get:function(){return ps.skipLast}});var ts=p(97409);Object.defineProperty(I,"skipUntil",{enumerable:!0,get:function(){return ts.skipUntil}});var gs=p(22863);Object.defineProperty(I,"skipWhile",{enumerable:!0,get:function(){return gs.skipWhile}});var tc=p(44930);Object.defineProperty(I,"startWith",{enumerable:!0,get:function(){return tc.startWith}});var $a=p(41698);Object.defineProperty(I,"subscribeOn",{enumerable:!0,get:function(){return $a.subscribeOn}});var ln=p(78044);Object.defineProperty(I,"switchAll",{enumerable:!0,get:function(){return ln.switchAll}});var Mi=p(90986);Object.defineProperty(I,"switchMap",{enumerable:!0,get:function(){return Mi.switchMap}});var Di=p(99309);Object.defineProperty(I,"switchMapTo",{enumerable:!0,get:function(){return Di.switchMapTo}});var Er=p(49499);Object.defineProperty(I,"switchScan",{enumerable:!0,get:function(){return Er.switchScan}});var ur=p(1333);Object.defineProperty(I,"take",{enumerable:!0,get:function(){return ur.take}});var gi=p(48306);Object.defineProperty(I,"takeLast",{enumerable:!0,get:function(){return gi.takeLast}});var $t=p(85716);Object.defineProperty(I,"takeUntil",{enumerable:!0,get:function(){return $t.takeUntil}});var Ma=p(39928);Object.defineProperty(I,"takeWhile",{enumerable:!0,get:function(){return Ma.takeWhile}});var Vo=p(66821);Object.defineProperty(I,"tap",{enumerable:!0,get:function(){return Vo.tap}});var Ds=p(14330);Object.defineProperty(I,"throttle",{enumerable:!0,get:function(){return Ds.throttle}});var ja=p(54029);Object.defineProperty(I,"throttleTime",{enumerable:!0,get:function(){return ja.throttleTime}});var wa=p(99194);Object.defineProperty(I,"throwIfEmpty",{enumerable:!0,get:function(){return wa.throwIfEmpty}});var ns=p(5904);Object.defineProperty(I,"timeInterval",{enumerable:!0,get:function(){return ns.timeInterval}});var Cs=p(75001);Object.defineProperty(I,"timeout",{enumerable:!0,get:function(){return Cs.timeout}});var $r=p(28308);Object.defineProperty(I,"timeoutWith",{enumerable:!0,get:function(){return $r.timeoutWith}});var Ts=p(20250);Object.defineProperty(I,"timestamp",{enumerable:!0,get:function(){return Ts.timestamp}});var Gl=p(42976);Object.defineProperty(I,"toArray",{enumerable:!0,get:function(){return Gl.toArray}});var ol=p(79374);Object.defineProperty(I,"window",{enumerable:!0,get:function(){return ol.window}});var zc=p(68427);Object.defineProperty(I,"windowCount",{enumerable:!0,get:function(){return zc.windowCount}});var al=p(22358);Object.defineProperty(I,"windowTime",{enumerable:!0,get:function(){return al.windowTime}});var Jn=p(46464);Object.defineProperty(I,"windowToggle",{enumerable:!0,get:function(){return Jn.windowToggle}});var tn=p(55424);Object.defineProperty(I,"windowWhen",{enumerable:!0,get:function(){return tn.windowWhen}});var ti=p(135);Object.defineProperty(I,"withLatestFrom",{enumerable:!0,get:function(){return ti.withLatestFrom}});var _i=p(78101);Object.defineProperty(I,"zipAll",{enumerable:!0,get:function(){return _i.zipAll}});var ar=p(59411);Object.defineProperty(I,"zipWith",{enumerable:!0,get:function(){return ar.zipWith}})},87606:function(qe,I,p){"use strict";var D,o=this&&this.__extends||(D=function(g,E){return(D=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(T,n){T.__proto__=n}||function(T,n){for(var P in n)Object.prototype.hasOwnProperty.call(n,P)&&(T[P]=n[P])})(g,E)},function(g,E){if("function"!=typeof E&&null!==E)throw new TypeError("Class extends value "+String(E)+" is not a constructor or null");function T(){this.constructor=g}D(g,E),g.prototype=null===E?Object.create(E):(T.prototype=E.prototype,new T)});Object.defineProperty(I,"__esModule",{value:!0}),I.AsyncSubject=void 0;var l=function(D){function g(){var E=null!==D&&D.apply(this,arguments)||this;return E._value=null,E._hasValue=!1,E._isComplete=!1,E}return o(g,D),g.prototype._checkFinalizedStatuses=function(E){var T=this,n=T.hasError,P=T._hasValue,w=T._value,B=T.thrownError,Y=T.isStopped,V=T._isComplete;n?E.error(B):(Y||V)&&(P&&E.next(w),E.complete())},g.prototype.next=function(E){this.isStopped||(this._value=E,this._hasValue=!0)},g.prototype.complete=function(){var E=this,T=E._hasValue,n=E._value;E._isComplete||(this._isComplete=!0,T&&D.prototype.next.call(this,n),D.prototype.complete.call(this))},g}(p(13768).Subject);I.AsyncSubject=l},75482:function(qe,I,p){"use strict";var D,o=this&&this.__extends||(D=function(g,E){return(D=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(T,n){T.__proto__=n}||function(T,n){for(var P in n)Object.prototype.hasOwnProperty.call(n,P)&&(T[P]=n[P])})(g,E)},function(g,E){if("function"!=typeof E&&null!==E)throw new TypeError("Class extends value "+String(E)+" is not a constructor or null");function T(){this.constructor=g}D(g,E),g.prototype=null===E?Object.create(E):(T.prototype=E.prototype,new T)});Object.defineProperty(I,"__esModule",{value:!0}),I.BehaviorSubject=void 0;var l=function(D){function g(E){var T=D.call(this)||this;return T._value=E,T}return o(g,D),Object.defineProperty(g.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),g.prototype._subscribe=function(E){var T=D.prototype._subscribe.call(this,E);return!T.closed&&E.next(this._value),T},g.prototype.getValue=function(){var E=this,T=E.hasError,n=E.thrownError,P=E._value;if(T)throw n;return this._throwIfClosed(),P},g.prototype.next=function(E){D.prototype.next.call(this,this._value=E)},g}(p(13768).Subject);I.BehaviorSubject=l},77262:(qe,I,p)=>{"use strict";Object.defineProperty(I,"__esModule",{value:!0}),I.observeNotification=I.Notification=I.NotificationKind=void 0;var n,o=p(97406),e=p(19677),l=p(70338),D=p(37104);(n=I.NotificationKind||(I.NotificationKind={})).NEXT="N",n.ERROR="E",n.COMPLETE="C";var E=function(){function n(P,w,B){this.kind=P,this.value=w,this.error=B,this.hasValue="N"===P}return n.prototype.observe=function(P){return T(this,P)},n.prototype.do=function(P,w,B){var Y=this,V=Y.kind,ue=Y.value,he=Y.error;return"N"===V?P?.(ue):"E"===V?w?.(he):B?.()},n.prototype.accept=function(P,w,B){var Y;return D.isFunction(null===(Y=P)||void 0===Y?void 0:Y.next)?this.observe(P):this.do(P,w,B)},n.prototype.toObservable=function(){var P=this,w=P.kind,B=P.value,Y=P.error,V="N"===w?e.of(B):"E"===w?l.throwError(function(){return Y}):"C"===w?o.EMPTY:0;if(!V)throw new TypeError("Unexpected notification kind "+w);return V},n.createNext=function(P){return new n("N",P)},n.createError=function(P){return new n("E",void 0,P)},n.createComplete=function(){return n.completeNotification},n.completeNotification=new n("C"),n}();function T(n,P){var w,B,Y,V=n,ue=V.kind,he=V.value,ae=V.error;if("string"!=typeof ue)throw new TypeError('Invalid notification, missing "kind"');"N"===ue?null===(w=P.next)||void 0===w||w.call(P,he):"E"===ue?null===(B=P.error)||void 0===B||B.call(P,ae):null===(Y=P.complete)||void 0===Y||Y.call(P)}I.Notification=E,I.observeNotification=T},46941:(qe,I)=>{"use strict";function e(l,D,g){return{kind:l,value:D,error:g}}Object.defineProperty(I,"__esModule",{value:!0}),I.createNotification=I.nextNotification=I.errorNotification=I.COMPLETE_NOTIFICATION=void 0,I.COMPLETE_NOTIFICATION=e("C",void 0,void 0),I.errorNotification=function p(l){return e("E",void 0,l)},I.nextNotification=function o(l){return e("N",l,void 0)},I.createNotification=e},55821:(qe,I,p)=>{"use strict";Object.defineProperty(I,"__esModule",{value:!0}),I.Observable=void 0;var o=p(57052),e=p(76448),l=p(91689),D=p(81471),g=p(73570),E=p(37104),T=p(45808),n=function(){function Y(V){V&&(this._subscribe=V)}return Y.prototype.lift=function(V){var ue=new Y;return ue.source=this,ue.operator=V,ue},Y.prototype.subscribe=function(V,ue,he){var ae=this,X=function B(Y){return Y&&Y instanceof o.Subscriber||function w(Y){return Y&&E.isFunction(Y.next)&&E.isFunction(Y.error)&&E.isFunction(Y.complete)}(Y)&&e.isSubscription(Y)}(V)?V:new o.SafeSubscriber(V,ue,he);return T.errorContext(function(){var ve=ae,ye=ve.operator,ge=ve.source;X.add(ye?ye.call(X,ge):ge?ae._subscribe(X):ae._trySubscribe(X))}),X},Y.prototype._trySubscribe=function(V){try{return this._subscribe(V)}catch(ue){V.error(ue)}},Y.prototype.forEach=function(V,ue){var he=this;return new(ue=P(ue))(function(ae,X){var ve=new o.SafeSubscriber({next:function(ye){try{V(ye)}catch(ge){X(ge),ve.unsubscribe()}},error:X,complete:ae});he.subscribe(ve)})},Y.prototype._subscribe=function(V){var ue;return null===(ue=this.source)||void 0===ue?void 0:ue.subscribe(V)},Y.prototype[l.observable]=function(){return this},Y.prototype.pipe=function(){for(var V=[],ue=0;ue<arguments.length;ue++)V[ue]=arguments[ue];return D.pipeFromArray(V)(this)},Y.prototype.toPromise=function(V){var ue=this;return new(V=P(V))(function(he,ae){var X;ue.subscribe(function(ve){return X=ve},function(ve){return ae(ve)},function(){return he(X)})})},Y.create=function(V){return new Y(V)},Y}();function P(Y){var V;return null!==(V=Y??g.config.Promise)&&void 0!==V?V:Promise}I.Observable=n},93406:function(qe,I,p){"use strict";var g,o=this&&this.__extends||(g=function(E,T){return(g=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,P){n.__proto__=P}||function(n,P){for(var w in P)Object.prototype.hasOwnProperty.call(P,w)&&(n[w]=P[w])})(E,T)},function(E,T){if("function"!=typeof T&&null!==T)throw new TypeError("Class extends value "+String(T)+" is not a constructor or null");function n(){this.constructor=E}g(E,T),E.prototype=null===T?Object.create(T):(n.prototype=T.prototype,new n)});Object.defineProperty(I,"__esModule",{value:!0}),I.ReplaySubject=void 0;var e=p(13768),l=p(68354),D=function(g){function E(T,n,P){void 0===T&&(T=1/0),void 0===n&&(n=1/0),void 0===P&&(P=l.dateTimestampProvider);var w=g.call(this)||this;return w._bufferSize=T,w._windowTime=n,w._timestampProvider=P,w._buffer=[],w._infiniteTimeWindow=!0,w._infiniteTimeWindow=n===1/0,w._bufferSize=Math.max(1,T),w._windowTime=Math.max(1,n),w}return o(E,g),E.prototype.next=function(T){var n=this,P=n.isStopped,w=n._buffer,B=n._infiniteTimeWindow,Y=n._timestampProvider,V=n._windowTime;P||(w.push(T),!B&&w.push(Y.now()+V)),this._trimBuffer(),g.prototype.next.call(this,T)},E.prototype._subscribe=function(T){this._throwIfClosed(),this._trimBuffer();for(var n=this._innerSubscribe(T),w=this._infiniteTimeWindow,Y=this._buffer.slice(),V=0;V<Y.length&&!T.closed;V+=w?1:2)T.next(Y[V]);return this._checkFinalizedStatuses(T),n},E.prototype._trimBuffer=function(){var T=this,n=T._bufferSize,P=T._timestampProvider,w=T._buffer,B=T._infiniteTimeWindow,Y=(B?1:2)*n;if(n<1/0&&Y<w.length&&w.splice(0,w.length-Y),!B){for(var V=P.now(),ue=0,he=1;he<w.length&&w[he]<=V;he+=2)ue=he;ue&&w.splice(0,ue+1)}},E}(e.Subject);I.ReplaySubject=D},72716:(qe,I,p)=>{"use strict";Object.defineProperty(I,"__esModule",{value:!0}),I.Scheduler=void 0;var o=p(68354),e=function(){function l(D,g){void 0===g&&(g=l.now),this.schedulerActionCtor=D,this.now=g}return l.prototype.schedule=function(D,g,E){return void 0===g&&(g=0),new this.schedulerActionCtor(this,D).schedule(E,g)},l.now=o.dateTimestampProvider.now,l}();I.Scheduler=e},13768:function(qe,I,p){"use strict";var w,o=this&&this.__extends||(w=function(B,Y){return(w=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(V,ue){V.__proto__=ue}||function(V,ue){for(var he in ue)Object.prototype.hasOwnProperty.call(ue,he)&&(V[he]=ue[he])})(B,Y)},function(B,Y){if("function"!=typeof Y&&null!==Y)throw new TypeError("Class extends value "+String(Y)+" is not a constructor or null");function V(){this.constructor=B}w(B,Y),B.prototype=null===Y?Object.create(Y):(V.prototype=Y.prototype,new V)}),e=this&&this.__values||function(w){var B="function"==typeof Symbol&&Symbol.iterator,Y=B&&w[B],V=0;if(Y)return Y.call(w);if(w&&"number"==typeof w.length)return{next:function(){return w&&V>=w.length&&(w=void 0),{value:w&&w[V++],done:!w}}};throw new TypeError(B?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(I,"__esModule",{value:!0}),I.AnonymousSubject=I.Subject=void 0;var l=p(55821),D=p(76448),g=p(23965),E=p(55137),T=p(45808),n=function(w){function B(){var Y=w.call(this)||this;return Y.closed=!1,Y.currentObservers=null,Y.observers=[],Y.isStopped=!1,Y.hasError=!1,Y.thrownError=null,Y}return o(B,w),B.prototype.lift=function(Y){var V=new P(this,this);return V.operator=Y,V},B.prototype._throwIfClosed=function(){if(this.closed)throw new g.ObjectUnsubscribedError},B.prototype.next=function(Y){var V=this;T.errorContext(function(){var ue,he;if(V._throwIfClosed(),!V.isStopped){V.currentObservers||(V.currentObservers=Array.from(V.observers));try{for(var ae=e(V.currentObservers),X=ae.next();!X.done;X=ae.next()){X.value.next(Y)}}catch(ye){ue={error:ye}}finally{try{X&&!X.done&&(he=ae.return)&&he.call(ae)}finally{if(ue)throw ue.error}}}})},B.prototype.error=function(Y){var V=this;T.errorContext(function(){if(V._throwIfClosed(),!V.isStopped){V.hasError=V.isStopped=!0,V.thrownError=Y;for(var ue=V.observers;ue.length;)ue.shift().error(Y)}})},B.prototype.complete=function(){var Y=this;T.errorContext(function(){if(Y._throwIfClosed(),!Y.isStopped){Y.isStopped=!0;for(var V=Y.observers;V.length;)V.shift().complete()}})},B.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(B.prototype,"observed",{get:function(){var Y;return(null===(Y=this.observers)||void 0===Y?void 0:Y.length)>0},enumerable:!1,configurable:!0}),B.prototype._trySubscribe=function(Y){return this._throwIfClosed(),w.prototype._trySubscribe.call(this,Y)},B.prototype._subscribe=function(Y){return this._throwIfClosed(),this._checkFinalizedStatuses(Y),this._innerSubscribe(Y)},B.prototype._innerSubscribe=function(Y){var V=this,he=this.hasError,ae=this.isStopped,X=this.observers;return he||ae?D.EMPTY_SUBSCRIPTION:(this.currentObservers=null,X.push(Y),new D.Subscription(function(){V.currentObservers=null,E.arrRemove(X,Y)}))},B.prototype._checkFinalizedStatuses=function(Y){var V=this,ue=V.hasError,he=V.thrownError,ae=V.isStopped;ue?Y.error(he):ae&&Y.complete()},B.prototype.asObservable=function(){var Y=new l.Observable;return Y.source=this,Y},B.create=function(Y,V){return new P(Y,V)},B}(l.Observable);I.Subject=n;var P=function(w){function B(Y,V){var ue=w.call(this)||this;return ue.destination=Y,ue.source=V,ue}return o(B,w),B.prototype.next=function(Y){var V,ue;null===(ue=null===(V=this.destination)||void 0===V?void 0:V.next)||void 0===ue||ue.call(V,Y)},B.prototype.error=function(Y){var V,ue;null===(ue=null===(V=this.destination)||void 0===V?void 0:V.error)||void 0===ue||ue.call(V,Y)},B.prototype.complete=function(){var Y,V;null===(V=null===(Y=this.destination)||void 0===Y?void 0:Y.complete)||void 0===V||V.call(Y)},B.prototype._subscribe=function(Y){var V,ue;return null!==(ue=null===(V=this.source)||void 0===V?void 0:V.subscribe(Y))&&void 0!==ue?ue:D.EMPTY_SUBSCRIPTION},B}(n);I.AnonymousSubject=P},57052:function(qe,I,p){"use strict";var ve,o=this&&this.__extends||(ve=function(ye,ge){return(ve=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(ne,pe){ne.__proto__=pe}||function(ne,pe){for(var Pe in pe)Object.prototype.hasOwnProperty.call(pe,Pe)&&(ne[Pe]=pe[Pe])})(ye,ge)},function(ye,ge){if("function"!=typeof ge&&null!==ge)throw new TypeError("Class extends value "+String(ge)+" is not a constructor or null");function ne(){this.constructor=ye}ve(ye,ge),ye.prototype=null===ge?Object.create(ge):(ne.prototype=ge.prototype,new ne)});Object.defineProperty(I,"__esModule",{value:!0}),I.EMPTY_OBSERVER=I.SafeSubscriber=I.Subscriber=void 0;var e=p(37104),l=p(76448),D=p(73570),g=p(74709),E=p(31),T=p(46941),n=p(33914),P=p(45808),w=function(ve){function ye(ge){var ne=ve.call(this)||this;return ne.isStopped=!1,ge?(ne.destination=ge,l.isSubscription(ge)&&ge.add(ne)):ne.destination=I.EMPTY_OBSERVER,ne}return o(ye,ve),ye.create=function(ge,ne,pe){return new ue(ge,ne,pe)},ye.prototype.next=function(ge){this.isStopped?X(T.nextNotification(ge),this):this._next(ge)},ye.prototype.error=function(ge){this.isStopped?X(T.errorNotification(ge),this):(this.isStopped=!0,this._error(ge))},ye.prototype.complete=function(){this.isStopped?X(T.COMPLETE_NOTIFICATION,this):(this.isStopped=!0,this._complete())},ye.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,ve.prototype.unsubscribe.call(this),this.destination=null)},ye.prototype._next=function(ge){this.destination.next(ge)},ye.prototype._error=function(ge){try{this.destination.error(ge)}finally{this.unsubscribe()}},ye.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},ye}(l.Subscription);I.Subscriber=w;var B=Function.prototype.bind;function Y(ve,ye){return B.call(ve,ye)}var V=function(){function ve(ye){this.partialObserver=ye}return ve.prototype.next=function(ye){var ge=this.partialObserver;if(ge.next)try{ge.next(ye)}catch(ne){he(ne)}},ve.prototype.error=function(ye){var ge=this.partialObserver;if(ge.error)try{ge.error(ye)}catch(ne){he(ne)}else he(ye)},ve.prototype.complete=function(){var ye=this.partialObserver;if(ye.complete)try{ye.complete()}catch(ge){he(ge)}},ve}(),ue=function(ve){function ye(ge,ne,pe){var xe,de,Pe=ve.call(this)||this;e.isFunction(ge)||!ge?xe={next:ge??void 0,error:ne??void 0,complete:pe??void 0}:Pe&&D.config.useDeprecatedNextContext?((de=Object.create(ge)).unsubscribe=function(){return Pe.unsubscribe()},xe={next:ge.next&&Y(ge.next,de),error:ge.error&&Y(ge.error,de),complete:ge.complete&&Y(ge.complete,de)}):xe=ge;return Pe.destination=new V(xe),Pe}return o(ye,ve),ye}(w);function he(ve){D.config.useDeprecatedSynchronousErrorHandling?P.captureError(ve):g.reportUnhandledError(ve)}function X(ve,ye){var ge=D.config.onStoppedNotification;ge&&n.timeoutProvider.setTimeout(function(){return ge(ve,ye)})}I.SafeSubscriber=ue,I.EMPTY_OBSERVER={closed:!0,next:E.noop,error:function ae(ve){throw ve},complete:E.noop}},76448:function(qe,I,p){"use strict";var o=this&&this.__values||function(w){var B="function"==typeof Symbol&&Symbol.iterator,Y=B&&w[B],V=0;if(Y)return Y.call(w);if(w&&"number"==typeof w.length)return{next:function(){return w&&V>=w.length&&(w=void 0),{value:w&&w[V++],done:!w}}};throw new TypeError(B?"Object is not iterable.":"Symbol.iterator is not defined.")},e=this&&this.__read||function(w,B){var Y="function"==typeof Symbol&&w[Symbol.iterator];if(!Y)return w;var ue,ae,V=Y.call(w),he=[];try{for(;(void 0===B||B-- >0)&&!(ue=V.next()).done;)he.push(ue.value)}catch(X){ae={error:X}}finally{try{ue&&!ue.done&&(Y=V.return)&&Y.call(V)}finally{if(ae)throw ae.error}}return he},l=this&&this.__spreadArray||function(w,B){for(var Y=0,V=B.length,ue=w.length;Y<V;Y++,ue++)w[ue]=B[Y];return w};Object.defineProperty(I,"__esModule",{value:!0}),I.isSubscription=I.EMPTY_SUBSCRIPTION=I.Subscription=void 0;var D=p(37104),g=p(24970),E=p(55137),T=function(){function w(B){this.initialTeardown=B,this.closed=!1,this._parentage=null,this._finalizers=null}return w.prototype.unsubscribe=function(){var B,Y,V,ue,he;if(!this.closed){this.closed=!0;var ae=this._parentage;if(ae)if(this._parentage=null,Array.isArray(ae))try{for(var X=o(ae),ve=X.next();!ve.done;ve=X.next()){ve.value.remove(this)}}catch(de){B={error:de}}finally{try{ve&&!ve.done&&(Y=X.return)&&Y.call(X)}finally{if(B)throw B.error}}else ae.remove(this);var ge=this.initialTeardown;if(D.isFunction(ge))try{ge()}catch(de){he=de instanceof g.UnsubscriptionError?de.errors:[de]}var ne=this._finalizers;if(ne){this._finalizers=null;try{for(var pe=o(ne),Pe=pe.next();!Pe.done;Pe=pe.next()){var xe=Pe.value;try{P(xe)}catch(de){he=he??[],de instanceof g.UnsubscriptionError?he=l(l([],e(he)),e(de.errors)):he.push(de)}}}catch(de){V={error:de}}finally{try{Pe&&!Pe.done&&(ue=pe.return)&&ue.call(pe)}finally{if(V)throw V.error}}}if(he)throw new g.UnsubscriptionError(he)}},w.prototype.add=function(B){var Y;if(B&&B!==this)if(this.closed)P(B);else{if(B instanceof w){if(B.closed||B._hasParent(this))return;B._addParent(this)}(this._finalizers=null!==(Y=this._finalizers)&&void 0!==Y?Y:[]).push(B)}},w.prototype._hasParent=function(B){var Y=this._parentage;return Y===B||Array.isArray(Y)&&Y.includes(B)},w.prototype._addParent=function(B){var Y=this._parentage;this._parentage=Array.isArray(Y)?(Y.push(B),Y):Y?[Y,B]:B},w.prototype._removeParent=function(B){var Y=this._parentage;Y===B?this._parentage=null:Array.isArray(Y)&&E.arrRemove(Y,B)},w.prototype.remove=function(B){var Y=this._finalizers;Y&&E.arrRemove(Y,B),B instanceof w&&B._removeParent(this)},w.EMPTY=((B=new w).closed=!0,B),w;var B}();function P(w){D.isFunction(w)?w():w.unsubscribe()}I.Subscription=T,I.EMPTY_SUBSCRIPTION=T.EMPTY,I.isSubscription=function n(w){return w instanceof T||w&&"closed"in w&&D.isFunction(w.remove)&&D.isFunction(w.add)&&D.isFunction(w.unsubscribe)}},73570:(qe,I)=>{"use strict";Object.defineProperty(I,"__esModule",{value:!0}),I.config=void 0,I.config={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1}},35754:(qe,I,p)=>{"use strict";Object.defineProperty(I,"__esModule",{value:!0}),I.firstValueFrom=void 0;var o=p(48915),e=p(57052);I.firstValueFrom=function l(D,g){var E="object"==typeof g;return new Promise(function(T,n){var P=new e.SafeSubscriber({next:function(w){T(w),P.unsubscribe()},error:n,complete:function(){E?T(g.defaultValue):n(new o.EmptyError)}});D.subscribe(P)})}},65257:(qe,I,p)=>{"use strict";Object.defineProperty(I,"__esModule",{value:!0}),I.lastValueFrom=void 0;var o=p(48915);I.lastValueFrom=function e(l,D){var g="object"==typeof D;return new Promise(function(E,T){var P,n=!1;l.subscribe({next:function(w){P=w,n=!0},error:T,complete:function(){n?E(P):g?E(D.defaultValue):T(new o.EmptyError)}})})}},6686:function(qe,I,p){"use strict";var n,o=this&&this.__extends||(n=function(P,w){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(B,Y){B.__proto__=Y}||function(B,Y){for(var V in Y)Object.prototype.hasOwnProperty.call(Y,V)&&(B[V]=Y[V])})(P,w)},function(P,w){if("function"!=typeof w&&null!==w)throw new TypeError("Class extends value "+String(w)+" is not a constructor or null");function B(){this.constructor=P}n(P,w),P.prototype=null===w?Object.create(w):(B.prototype=w.prototype,new B)});Object.defineProperty(I,"__esModule",{value:!0}),I.ConnectableObservable=void 0;var e=p(55821),l=p(76448),D=p(80904),g=p(83173),E=p(89216),T=function(n){function P(w,B){var Y=n.call(this)||this;return Y.source=w,Y.subjectFactory=B,Y._subject=null,Y._refCount=0,Y._connection=null,E.hasLift(w)&&(Y.lift=w.lift),Y}return o(P,n),P.prototype._subscribe=function(w){return this.getSubject().subscribe(w)},P.prototype.getSubject=function(){var w=this._subject;return(!w||w.isStopped)&&(this._subject=this.subjectFactory()),this._subject},P.prototype._teardown=function(){this._refCount=0;var w=this._connection;this._subject=this._connection=null,w?.unsubscribe()},P.prototype.connect=function(){var w=this,B=this._connection;if(!B){B=this._connection=new l.Subscription;var Y=this.getSubject();B.add(this.source.subscribe(g.createOperatorSubscriber(Y,void 0,function(){w._teardown(),Y.complete()},function(V){w._teardown(),Y.error(V)},function(){return w._teardown()}))),B.closed&&(this._connection=null,B=l.Subscription.EMPTY)}return B},P.prototype.refCount=function(){return D.refCount()(this)},P}(e.Observable);I.ConnectableObservable=T},17532:(qe,I,p)=>{"use strict";Object.defineProperty(I,"__esModule",{value:!0}),I.bindCallback=void 0;var o=p(94832);I.bindCallback=function e(l,D,g){return o.bindCallbackInternals(!1,l,D,g)}},94832:function(qe,I,p){"use strict";var o=this&&this.__read||function(w,B){var Y="function"==typeof Symbol&&w[Symbol.iterator];if(!Y)return w;var ue,ae,V=Y.call(w),he=[];try{for(;(void 0===B||B-- >0)&&!(ue=V.next()).done;)he.push(ue.value)}catch(X){ae={error:X}}finally{try{ue&&!ue.done&&(Y=V.return)&&Y.call(V)}finally{if(ae)throw ae.error}}return he},e=this&&this.__spreadArray||function(w,B){for(var Y=0,V=B.length,ue=w.length;Y<V;Y++,ue++)w[ue]=B[Y];return w};Object.defineProperty(I,"__esModule",{value:!0}),I.bindCallbackInternals=void 0;var l=p(1875),D=p(55821),g=p(41698),E=p(5280),T=p(94928),n=p(87606);I.bindCallbackInternals=function P(w,B,Y,V){if(Y){if(!l.isScheduler(Y))return function(){for(var ue=[],he=0;he<arguments.length;he++)ue[he]=arguments[he];return P(w,B,V).apply(this,ue).pipe(E.mapOneOrManyArgs(Y))};V=Y}return V?function(){for(var ue=[],he=0;he<arguments.length;he++)ue[he]=arguments[he];return P(w,B).apply(this,ue).pipe(g.subscribeOn(V),T.observeOn(V))}:function(){for(var ue=this,he=[],ae=0;ae<arguments.length;ae++)he[ae]=arguments[ae];var X=new n.AsyncSubject,ve=!0;return new D.Observable(function(ye){var ge=X.subscribe(ye);if(ve){ve=!1;var ne=!1,pe=!1;B.apply(ue,e(e([],o(he)),[function(){for(var Pe=[],xe=0;xe<arguments.length;xe++)Pe[xe]=arguments[xe];if(w){var de=Pe.shift();if(null!=de)return void X.error(de)}X.next(1<Pe.length?Pe:Pe[0]),pe=!0,ne&&X.complete()}])),pe&&X.complete(),ne=!0}return ge})}}},33488:(qe,I,p)=>{"use strict";Object.defineProperty(I,"__esModule",{value:!0}),I.bindNodeCallback=void 0;var o=p(94832);I.bindNodeCallback=function e(l,D,g){return o.bindCallbackInternals(!0,l,D,g)}},36892:(qe,I,p)=>{"use strict";Object.defineProperty(I,"__esModule",{value:!0}),I.combineLatestInit=I.combineLatest=void 0;var o=p(55821),e=p(59923),l=p(24996),D=p(77884),g=p(5280),E=p(31642),T=p(57598),n=p(83173),P=p(17238);function B(V,ue,he){return void 0===he&&(he=D.identity),function(ae){Y(ue,function(){for(var X=V.length,ve=new Array(X),ye=X,ge=X,ne=function(Pe){Y(ue,function(){var xe=l.from(V[Pe],ue),de=!1;xe.subscribe(n.createOperatorSubscriber(ae,function(re){ve[Pe]=re,de||(de=!0,ge--),ge||ae.next(he(ve.slice()))},function(){--ye||ae.complete()}))},ae)},pe=0;pe<X;pe++)ne(pe)},ae)}}function Y(V,ue,he){V?P.executeSchedule(he,V,ue):ue()}I.combineLatest=function w(){for(var V=[],ue=0;ue<arguments.length;ue++)V[ue]=arguments[ue];var he=E.popScheduler(V),ae=E.popResultSelector(V),X=e.argsArgArrayOrObject(V),ve=X.args,ye=X.keys;if(0===ve.length)return l.from([],he);var ge=new o.Observable(B(ve,he,ye?function(ne){return T.createObject(ye,ne)}:D.identity));return ae?ge.pipe(g.mapOneOrManyArgs(ae)):ge},I.combineLatestInit=B},93601:(qe,I,p)=>{"use strict";Object.defineProperty(I,"__esModule",{value:!0}),I.concat=void 0;var o=p(31557),e=p(31642),l=p(24996);I.concat=function D(){for(var g=[],E=0;E<arguments.length;E++)g[E]=arguments[E];return o.concatAll()(l.from(g,e.popScheduler(g)))}},79190:(qe,I,p)=>{"use strict";Object.defineProperty(I,"__esModule",{value:!0}),I.connectable=void 0;var o=p(13768),e=p(55821),l=p(39954),D={connector:function(){return new o.Subject},resetOnDisconnect:!0};I.connectable=function g(E,T){void 0===T&&(T=D);var n=null,P=T.connector,w=T.resetOnDisconnect,B=void 0===w||w,Y=P(),V=new e.Observable(function(ue){return Y.subscribe(ue)});return V.connect=function(){return(!n||n.closed)&&(n=l.defer(function(){return E}).subscribe(Y),B&&n.add(function(){return Y=P()})),n},V}},39954:(qe,I,p)=>{"use strict";Object.defineProperty(I,"__esModule",{value:!0}),I.defer=void 0;var o=p(55821),e=p(48767);I.defer=function l(D){return new o.Observable(function(g){e.innerFrom(D()).subscribe(g)})}},2946:(qe,I,p)=>{"use strict";Object.defineProperty(I,"__esModule",{value:!0}),I.animationFrames=void 0;var o=p(55821),e=p(61038),l=p(86343);function g(T){return new o.Observable(function(n){var P=T||e.performanceTimestampProvider,w=P.now(),B=0,Y=function(){n.closed||(B=l.animationFrameProvider.requestAnimationFrame(function(V){B=0;var ue=P.now();n.next({timestamp:T?ue:V,elapsed:ue-w}),Y()}))};return Y(),function(){B&&l.animationFrameProvider.cancelAnimationFrame(B)}})}I.animationFrames=function D(T){return T?g(T):E};var E=g()},97406:(qe,I,p)=>{"use strict";Object.defineProperty(I,"__esModule",{value:!0}),I.empty=I.EMPTY=void 0;var o=p(55821);I.EMPTY=new o.Observable(function(D){return D.complete()}),I.empty=function e(D){return D?function l(D){return new o.Observable(function(g){return D.schedule(function(){return g.complete()})})}(D):I.EMPTY}},67928:(qe,I,p)=>{"use strict";Object.defineProperty(I,"__esModule",{value:!0}),I.forkJoin=void 0;var o=p(55821),e=p(59923),l=p(48767),D=p(31642),g=p(83173),E=p(5280),T=p(57598);I.forkJoin=function n(){for(var P=[],w=0;w<arguments.length;w++)P[w]=arguments[w];var B=D.popResultSelector(P),Y=e.argsArgArrayOrObject(P),V=Y.args,ue=Y.keys,he=new o.Observable(function(ae){var X=V.length;if(X)for(var ve=new Array(X),ye=X,ge=X,ne=function(Pe){var xe=!1;l.innerFrom(V[Pe]).subscribe(g.createOperatorSubscriber(ae,function(de){xe||(xe=!0,ge--),ve[Pe]=de},function(){return ye--},void 0,function(){(!ye||!xe)&&(ge||ae.next(ue?T.createObject(ue,ve):ve),ae.complete())}))},pe=0;pe<X;pe++)ne(pe);else ae.complete()});return B?he.pipe(E.mapOneOrManyArgs(B)):he}},24996:(qe,I,p)=>{"use strict";Object.defineProperty(I,"__esModule",{value:!0}),I.from=void 0;var o=p(9341),e=p(48767);I.from=function l(D,g){return g?o.scheduled(D,g):e.innerFrom(D)}},52579:function(qe,I,p){"use strict";var o=this&&this.__read||function(ae,X){var ve="function"==typeof Symbol&&ae[Symbol.iterator];if(!ve)return ae;var ge,pe,ye=ve.call(ae),ne=[];try{for(;(void 0===X||X-- >0)&&!(ge=ye.next()).done;)ne.push(ge.value)}catch(Pe){pe={error:Pe}}finally{try{ge&&!ge.done&&(ve=ye.return)&&ve.call(ye)}finally{if(pe)throw pe.error}}return ne};Object.defineProperty(I,"__esModule",{value:!0}),I.fromEvent=void 0;var e=p(48767),l=p(55821),D=p(43010),g=p(70697),E=p(37104),T=p(5280),n=["addListener","removeListener"],P=["addEventListener","removeEventListener"],w=["on","off"];function Y(ae,X){return function(ve){return function(ye){return ae[ve](X,ye)}}}I.fromEvent=function B(ae,X,ve,ye){if(E.isFunction(ve)&&(ye=ve,ve=void 0),ye)return B(ae,X,ve).pipe(T.mapOneOrManyArgs(ye));var ge=o(function he(ae){return E.isFunction(ae.addEventListener)&&E.isFunction(ae.removeEventListener)}(ae)?P.map(function(Pe){return function(xe){return ae[Pe](X,xe,ve)}}):function V(ae){return E.isFunction(ae.addListener)&&E.isFunction(ae.removeListener)}(ae)?n.map(Y(ae,X)):function ue(ae){return E.isFunction(ae.on)&&E.isFunction(ae.off)}(ae)?w.map(Y(ae,X)):[],2),ne=ge[0],pe=ge[1];if(!ne&&g.isArrayLike(ae))return D.mergeMap(function(Pe){return B(Pe,X,ve)})(e.innerFrom(ae));if(!ne)throw new TypeError("Invalid event target");return new l.Observable(function(Pe){var xe=function(){for(var de=[],re=0;re<arguments.length;re++)de[re]=arguments[re];return Pe.next(1<de.length?de:de[0])};return ne(xe),function(){return pe(xe)}})}},13975:(qe,I,p)=>{"use strict";Object.defineProperty(I,"__esModule",{value:!0}),I.fromEventPattern=void 0;var o=p(55821),e=p(37104),l=p(5280);I.fromEventPattern=function D(g,E,T){return T?D(g,E).pipe(l.mapOneOrManyArgs(T)):new o.Observable(function(n){var P=function(){for(var B=[],Y=0;Y<arguments.length;Y++)B[Y]=arguments[Y];return n.next(1===B.length?B[0]:B)},w=g(P);return e.isFunction(E)?function(){return E(P,w)}:void 0})}},5107:(qe,I,p)=>{"use strict";Object.defineProperty(I,"__esModule",{value:!0}),I.fromSubscribable=void 0;var o=p(55821);I.fromSubscribable=function e(l){return new o.Observable(function(D){return l.subscribe(D)})}},4318:function(qe,I,p){"use strict";var o=this&&this.__generator||function(T,n){var w,B,Y,V,P={label:0,sent:function(){if(1&Y[0])throw Y[1];return Y[1]},trys:[],ops:[]};return V={next:ue(0),throw:ue(1),return:ue(2)},"function"==typeof Symbol&&(V[Symbol.iterator]=function(){return this}),V;function ue(ae){return function(X){return function he(ae){if(w)throw new TypeError("Generator is already executing.");for(;P;)try{if(w=1,B&&(Y=2&ae[0]?B.return:ae[0]?B.throw||((Y=B.return)&&Y.call(B),0):B.next)&&!(Y=Y.call(B,ae[1])).done)return Y;switch(B=0,Y&&(ae=[2&ae[0],Y.value]),ae[0]){case 0:case 1:Y=ae;break;case 4:return P.label++,{value:ae[1],done:!1};case 5:P.label++,B=ae[1],ae=[0];continue;case 7:ae=P.ops.pop(),P.trys.pop();continue;default:if(!(Y=(Y=P.trys).length>0&&Y[Y.length-1])&&(6===ae[0]||2===ae[0])){P=0;continue}if(3===ae[0]&&(!Y||ae[1]>Y[0]&&ae[1]<Y[3])){P.label=ae[1];break}if(6===ae[0]&&P.label<Y[1]){P.label=Y[1],Y=ae;break}if(Y&&P.label<Y[2]){P.label=Y[2],P.ops.push(ae);break}Y[2]&&P.ops.pop(),P.trys.pop();continue}ae=n.call(T,P)}catch(X){ae=[6,X],B=0}finally{w=Y=0}if(5&ae[0])throw ae[1];return{value:ae[0]?ae[1]:void 0,done:!0}}([ae,X])}}};Object.defineProperty(I,"__esModule",{value:!0}),I.generate=void 0;var e=p(77884),l=p(1875),D=p(39954),g=p(39049);I.generate=function E(T,n,P,w,B){var Y,V,ue,he;function ae(){var X;return o(this,function(ve){switch(ve.label){case 0:X=he,ve.label=1;case 1:return!n||n(X)?[4,ue(X)]:[3,4];case 2:ve.sent(),ve.label=3;case 3:return X=P(X),[3,1];case 4:return[2]}})}return 1===arguments.length?(he=(Y=T).initialState,n=Y.condition,P=Y.iterate,V=Y.resultSelector,ue=void 0===V?e.identity:V,B=Y.scheduler):(he=T,!w||l.isScheduler(w)?(ue=e.identity,B=w):ue=w),D.defer(B?function(){return g.scheduleIterable(ae(),B)}:ae)}},3140:(qe,I,p)=>{"use strict";Object.defineProperty(I,"__esModule",{value:!0}),I.iif=void 0;var o=p(39954);I.iif=function e(l,D,g){return o.defer(function(){return l()?D:g})}},48767:function(qe,I,p){"use strict";var o=this&&this.__awaiter||function(xe,de,re,oe){return new(re||(re=Promise))(function(be,le){function Z(ke){try{j(oe.next(ke))}catch(Be){le(Be)}}function Oe(ke){try{j(oe.throw(ke))}catch(Be){le(Be)}}function j(ke){ke.done?be(ke.value):function me(be){return be instanceof re?be:new re(function(le){le(be)})}(ke.value).then(Z,Oe)}j((oe=oe.apply(xe,de||[])).next())})},e=this&&this.__generator||function(xe,de){var oe,me,be,le,re={label:0,sent:function(){if(1&be[0])throw be[1];return be[1]},trys:[],ops:[]};return le={next:Z(0),throw:Z(1),return:Z(2)},"function"==typeof Symbol&&(le[Symbol.iterator]=function(){return this}),le;function Z(j){return function(ke){return function Oe(j){if(oe)throw new TypeError("Generator is already executing.");for(;re;)try{if(oe=1,me&&(be=2&j[0]?me.return:j[0]?me.throw||((be=me.return)&&be.call(me),0):me.next)&&!(be=be.call(me,j[1])).done)return be;switch(me=0,be&&(j=[2&j[0],be.value]),j[0]){case 0:case 1:be=j;break;case 4:return re.label++,{value:j[1],done:!1};case 5:re.label++,me=j[1],j=[0];continue;case 7:j=re.ops.pop(),re.trys.pop();continue;default:if(!(be=(be=re.trys).length>0&&be[be.length-1])&&(6===j[0]||2===j[0])){re=0;continue}if(3===j[0]&&(!be||j[1]>be[0]&&j[1]<be[3])){re.label=j[1];break}if(6===j[0]&&re.label<be[1]){re.label=be[1],be=j;break}if(be&&re.label<be[2]){re.label=be[2],re.ops.push(j);break}be[2]&&re.ops.pop(),re.trys.pop();continue}j=de.call(xe,re)}catch(ke){j=[6,ke],me=0}finally{oe=be=0}if(5&j[0])throw j[1];return{value:j[0]?j[1]:void 0,done:!0}}([j,ke])}}},l=this&&this.__asyncValues||function(xe){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var re,de=xe[Symbol.asyncIterator];return de?de.call(xe):(xe="function"==typeof D?D(xe):xe[Symbol.iterator](),re={},oe("next"),oe("throw"),oe("return"),re[Symbol.asyncIterator]=function(){return this},re);function oe(be){re[be]=xe[be]&&function(le){return new Promise(function(Z,Oe){(function me(be,le,Z,Oe){Promise.resolve(Oe).then(function(j){be({value:j,done:Z})},le)})(Z,Oe,(le=xe[be](le)).done,le.value)})}}},D=this&&this.__values||function(xe){var de="function"==typeof Symbol&&Symbol.iterator,re=de&&xe[de],oe=0;if(re)return re.call(xe);if(xe&&"number"==typeof xe.length)return{next:function(){return xe&&oe>=xe.length&&(xe=void 0),{value:xe&&xe[oe++],done:!xe}}};throw new TypeError(de?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(I,"__esModule",{value:!0}),I.fromReadableStreamLike=I.fromAsyncIterable=I.fromIterable=I.fromPromise=I.fromArrayLike=I.fromInteropObservable=I.innerFrom=void 0;var g=p(70697),E=p(25050),T=p(55821),n=p(17454),P=p(26175),w=p(36870),B=p(5431),Y=p(87128),V=p(37104),ue=p(74709),he=p(91689);function X(xe){return new T.Observable(function(de){var re=xe[he.observable]();if(V.isFunction(re.subscribe))return re.subscribe(de);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function ve(xe){return new T.Observable(function(de){for(var re=0;re<xe.length&&!de.closed;re++)de.next(xe[re]);de.complete()})}function ye(xe){return new T.Observable(function(de){xe.then(function(re){de.closed||(de.next(re),de.complete())},function(re){return de.error(re)}).then(null,ue.reportUnhandledError)})}function ge(xe){return new T.Observable(function(de){var re,oe;try{for(var me=D(xe),be=me.next();!be.done;be=me.next()){var le=be.value;if(de.next(le),de.closed)return}}catch(Z){re={error:Z}}finally{try{be&&!be.done&&(oe=me.return)&&oe.call(me)}finally{if(re)throw re.error}}de.complete()})}function ne(xe){return new T.Observable(function(de){(function Pe(xe,de){var re,oe,me,be;return o(this,void 0,void 0,function(){var le,Z;return e(this,function(Oe){switch(Oe.label){case 0:Oe.trys.push([0,5,6,11]),re=l(xe),Oe.label=1;case 1:return[4,re.next()];case 2:if((oe=Oe.sent()).done)return[3,4];if(le=oe.value,de.next(le),de.closed)return[2];Oe.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return Z=Oe.sent(),me={error:Z},[3,11];case 6:return Oe.trys.push([6,,9,10]),oe&&!oe.done&&(be=re.return)?[4,be.call(re)]:[3,8];case 7:Oe.sent(),Oe.label=8;case 8:return[3,10];case 9:if(me)throw me.error;return[7];case 10:return[7];case 11:return de.complete(),[2]}})})})(xe,de).catch(function(re){return de.error(re)})})}function pe(xe){return ne(Y.readableStreamLikeToAsyncGenerator(xe))}I.innerFrom=function ae(xe){if(xe instanceof T.Observable)return xe;if(null!=xe){if(n.isInteropObservable(xe))return X(xe);if(g.isArrayLike(xe))return ve(xe);if(E.isPromise(xe))return ye(xe);if(P.isAsyncIterable(xe))return ne(xe);if(B.isIterable(xe))return ge(xe);if(Y.isReadableStreamLike(xe))return pe(xe)}throw w.createInvalidObservableTypeError(xe)},I.fromInteropObservable=X,I.fromArrayLike=ve,I.fromPromise=ye,I.fromIterable=ge,I.fromAsyncIterable=ne,I.fromReadableStreamLike=pe},51836:(qe,I,p)=>{"use strict";Object.defineProperty(I,"__esModule",{value:!0}),I.interval=void 0;var o=p(64006),e=p(33271);I.interval=function l(D,g){return void 0===D&&(D=0),void 0===g&&(g=o.asyncScheduler),D<0&&(D=0),e.timer(D,D,g)}},89248:(qe,I,p)=>{"use strict";Object.defineProperty(I,"__esModule",{value:!0}),I.merge=void 0;var o=p(43917),e=p(48767),l=p(97406),D=p(31642),g=p(24996);I.merge=function E(){for(var T=[],n=0;n<arguments.length;n++)T[n]=arguments[n];var P=D.popScheduler(T),w=D.popNumber(T,1/0),B=T;return B.length?1===B.length?e.innerFrom(B[0]):o.mergeAll(w)(g.from(B,P)):l.EMPTY}},2818:(qe,I,p)=>{"use strict";Object.defineProperty(I,"__esModule",{value:!0}),I.never=I.NEVER=void 0;var o=p(55821),e=p(31);I.NEVER=new o.Observable(e.noop),I.never=function l(){return I.NEVER}},19677:(qe,I,p)=>{"use strict";Object.defineProperty(I,"__esModule",{value:!0}),I.of=void 0;var o=p(31642),e=p(24996);I.of=function l(){for(var D=[],g=0;g<arguments.length;g++)D[g]=arguments[g];var E=o.popScheduler(D);return e.from(D,E)}},19978:(qe,I,p)=>{"use strict";Object.defineProperty(I,"__esModule",{value:!0}),I.onErrorResumeNext=void 0;var o=p(55821),e=p(73531),l=p(83173),D=p(31),g=p(48767);I.onErrorResumeNext=function E(){for(var T=[],n=0;n<arguments.length;n++)T[n]=arguments[n];var P=e.argsOrArgArray(T);return new o.Observable(function(w){var B=0,Y=function(){if(B<P.length){var V=void 0;try{V=g.innerFrom(P[B++])}catch{return void Y()}var ue=new l.OperatorSubscriber(w,void 0,D.noop,D.noop);V.subscribe(ue),ue.add(Y)}else w.complete()};Y()})}},75519:(qe,I,p)=>{"use strict";Object.defineProperty(I,"__esModule",{value:!0}),I.pairs=void 0;var o=p(24996);I.pairs=function e(l,D){return o.from(Object.entries(l),D)}},68221:(qe,I,p)=>{"use strict";Object.defineProperty(I,"__esModule",{value:!0}),I.partition=void 0;var o=p(40963),e=p(74270),l=p(48767);I.partition=function D(g,E,T){return[e.filter(E,T)(l.innerFrom(g)),e.filter(o.not(E,T))(l.innerFrom(g))]}},28181:(qe,I,p)=>{"use strict";Object.defineProperty(I,"__esModule",{value:!0}),I.raceInit=I.race=void 0;var o=p(55821),e=p(48767),l=p(73531),D=p(83173);function E(T){return function(n){for(var P=[],w=function(Y){P.push(e.innerFrom(T[Y]).subscribe(D.createOperatorSubscriber(n,function(V){if(P){for(var ue=0;ue<P.length;ue++)ue!==Y&&P[ue].unsubscribe();P=null}n.next(V)})))},B=0;P&&!n.closed&&B<T.length;B++)w(B)}}I.race=function g(){for(var T=[],n=0;n<arguments.length;n++)T[n]=arguments[n];return 1===(T=l.argsOrArgArray(T)).length?e.innerFrom(T[0]):new o.Observable(E(T))},I.raceInit=E},14622:(qe,I,p)=>{"use strict";Object.defineProperty(I,"__esModule",{value:!0}),I.range=void 0;var o=p(55821),e=p(97406);I.range=function l(D,g,E){if(null==g&&(g=D,D=0),g<=0)return e.EMPTY;var T=g+D;return new o.Observable(E?function(n){var P=D;return E.schedule(function(){P<T?(n.next(P++),this.schedule()):n.complete()})}:function(n){for(var P=D;P<T&&!n.closed;)n.next(P++);n.complete()})}},70338:(qe,I,p)=>{"use strict";Object.defineProperty(I,"__esModule",{value:!0}),I.throwError=void 0;var o=p(55821),e=p(37104);I.throwError=function l(D,g){var E=e.isFunction(D)?D:function(){return D},T=function(n){return n.error(E())};return new o.Observable(g?function(n){return g.schedule(T,0,n)}:T)}},33271:(qe,I,p)=>{"use strict";Object.defineProperty(I,"__esModule",{value:!0}),I.timer=void 0;var o=p(55821),e=p(64006),l=p(1875),D=p(67323);I.timer=function g(E,T,n){void 0===E&&(E=0),void 0===n&&(n=e.async);var P=-1;return null!=T&&(l.isScheduler(T)?n=T:P=T),new o.Observable(function(w){var B=D.isValidDate(E)?+E-n.now():E;B<0&&(B=0);var Y=0;return n.schedule(function(){w.closed||(w.next(Y++),0<=P?this.schedule(void 0,P):w.complete())},B)})}},70924:(qe,I,p)=>{"use strict";Object.defineProperty(I,"__esModule",{value:!0}),I.using=void 0;var o=p(55821),e=p(48767),l=p(97406);I.using=function D(g,E){return new o.Observable(function(T){var n=g(),P=E(n);return(P?e.innerFrom(P):l.EMPTY).subscribe(T),function(){n&&n.unsubscribe()}})}},14842:function(qe,I,p){"use strict";var o=this&&this.__read||function(w,B){var Y="function"==typeof Symbol&&w[Symbol.iterator];if(!Y)return w;var ue,ae,V=Y.call(w),he=[];try{for(;(void 0===B||B-- >0)&&!(ue=V.next()).done;)he.push(ue.value)}catch(X){ae={error:X}}finally{try{ue&&!ue.done&&(Y=V.return)&&Y.call(V)}finally{if(ae)throw ae.error}}return he},e=this&&this.__spreadArray||function(w,B){for(var Y=0,V=B.length,ue=w.length;Y<V;Y++,ue++)w[ue]=B[Y];return w};Object.defineProperty(I,"__esModule",{value:!0}),I.zip=void 0;var l=p(55821),D=p(48767),g=p(73531),E=p(97406),T=p(83173),n=p(31642);I.zip=function P(){for(var w=[],B=0;B<arguments.length;B++)w[B]=arguments[B];var Y=n.popResultSelector(w),V=g.argsOrArgArray(w);return V.length?new l.Observable(function(ue){var he=V.map(function(){return[]}),ae=V.map(function(){return!1});ue.add(function(){he=ae=null});for(var X=function(ye){D.innerFrom(V[ye]).subscribe(T.createOperatorSubscriber(ue,function(ge){if(he[ye].push(ge),he.every(function(pe){return pe.length})){var ne=he.map(function(pe){return pe.shift()});ue.next(Y?Y.apply(void 0,e([],o(ne))):ne),he.some(function(pe,Pe){return!pe.length&&ae[Pe]})&&ue.complete()}},function(){ae[ye]=!0,!he[ye].length&&ue.complete()}))},ve=0;!ue.closed&&ve<V.length;ve++)X(ve);return function(){he=ae=null}}):E.EMPTY}},83173:function(qe,I,p){"use strict";var g,o=this&&this.__extends||(g=function(E,T){return(g=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,P){n.__proto__=P}||function(n,P){for(var w in P)Object.prototype.hasOwnProperty.call(P,w)&&(n[w]=P[w])})(E,T)},function(E,T){if("function"!=typeof T&&null!==T)throw new TypeError("Class extends value "+String(T)+" is not a constructor or null");function n(){this.constructor=E}g(E,T),E.prototype=null===T?Object.create(T):(n.prototype=T.prototype,new n)});Object.defineProperty(I,"__esModule",{value:!0}),I.OperatorSubscriber=I.createOperatorSubscriber=void 0;var e=p(57052);I.createOperatorSubscriber=function l(g,E,T,n,P){return new D(g,E,T,n,P)};var D=function(g){function E(T,n,P,w,B,Y){var V=g.call(this,T)||this;return V.onFinalize=B,V.shouldUnsubscribe=Y,V._next=n?function(ue){try{n(ue)}catch(he){T.error(he)}}:g.prototype._next,V._error=w?function(ue){try{w(ue)}catch(he){T.error(he)}finally{this.unsubscribe()}}:g.prototype._error,V._complete=P?function(){try{P()}catch(ue){T.error(ue)}finally{this.unsubscribe()}}:g.prototype._complete,V}return o(E,g),E.prototype.unsubscribe=function(){var T;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var n=this.closed;g.prototype.unsubscribe.call(this),!n&&(null===(T=this.onFinalize)||void 0===T||T.call(this))}},E}(e.Subscriber);I.OperatorSubscriber=D},14815:(qe,I,p)=>{"use strict";Object.defineProperty(I,"__esModule",{value:!0}),I.audit=void 0;var o=p(89216),e=p(48767),l=p(83173);I.audit=function D(g){return o.operate(function(E,T){var n=!1,P=null,w=null,B=!1,Y=function(){if(w?.unsubscribe(),w=null,n){n=!1;var ue=P;P=null,T.next(ue)}B&&T.complete()},V=function(){w=null,B&&T.complete()};E.subscribe(l.createOperatorSubscriber(T,function(ue){n=!0,P=ue,w||e.innerFrom(g(ue)).subscribe(w=l.createOperatorSubscriber(T,Y,V))},function(){B=!0,(!n||!w||w.closed)&&T.complete()}))})}},19034:(qe,I,p)=>{"use strict";Object.defineProperty(I,"__esModule",{value:!0}),I.auditTime=void 0;var o=p(64006),e=p(14815),l=p(33271);I.auditTime=function D(g,E){return void 0===E&&(E=o.asyncScheduler),e.audit(function(){return l.timer(g,E)})}},78544:(qe,I,p)=>{"use strict";Object.defineProperty(I,"__esModule",{value:!0}),I.buffer=void 0;var o=p(89216),e=p(31),l=p(83173),D=p(48767);I.buffer=function g(E){return o.operate(function(T,n){var P=[];return T.subscribe(l.createOperatorSubscriber(n,function(w){return P.push(w)},function(){n.next(P),n.complete()})),D.innerFrom(E).subscribe(l.createOperatorSubscriber(n,function(){var w=P;P=[],n.next(w)},e.noop)),function(){P=null}})}},93999:function(qe,I,p){"use strict";var o=this&&this.__values||function(E){var T="function"==typeof Symbol&&Symbol.iterator,n=T&&E[T],P=0;if(n)return n.call(E);if(E&&"number"==typeof E.length)return{next:function(){return E&&P>=E.length&&(E=void 0),{value:E&&E[P++],done:!E}}};throw new TypeError(T?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(I,"__esModule",{value:!0}),I.bufferCount=void 0;var e=p(89216),l=p(83173),D=p(55137);I.bufferCount=function g(E,T){return void 0===T&&(T=null),T=T??E,e.operate(function(n,P){var w=[],B=0;n.subscribe(l.createOperatorSubscriber(P,function(Y){var V,ue,he,ae,X=null;B++%T==0&&w.push([]);try{for(var ve=o(w),ye=ve.next();!ye.done;ye=ve.next()){(ge=ye.value).push(Y),E<=ge.length&&(X=X??[]).push(ge)}}catch(Pe){V={error:Pe}}finally{try{ye&&!ye.done&&(ue=ve.return)&&ue.call(ve)}finally{if(V)throw V.error}}if(X)try{for(var ne=o(X),pe=ne.next();!pe.done;pe=ne.next()){var ge=pe.value;D.arrRemove(w,ge),P.next(ge)}}catch(Pe){he={error:Pe}}finally{try{pe&&!pe.done&&(ae=ne.return)&&ae.call(ne)}finally{if(he)throw he.error}}},function(){var Y,V;try{for(var ue=o(w),he=ue.next();!he.done;he=ue.next()){var ae=he.value;P.next(ae)}}catch(X){Y={error:X}}finally{try{he&&!he.done&&(V=ue.return)&&V.call(ue)}finally{if(Y)throw Y.error}}P.complete()},void 0,function(){w=null}))})}},11392:function(qe,I,p){"use strict";var o=this&&this.__values||function(w){var B="function"==typeof Symbol&&Symbol.iterator,Y=B&&w[B],V=0;if(Y)return Y.call(w);if(w&&"number"==typeof w.length)return{next:function(){return w&&V>=w.length&&(w=void 0),{value:w&&w[V++],done:!w}}};throw new TypeError(B?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(I,"__esModule",{value:!0}),I.bufferTime=void 0;var e=p(76448),l=p(89216),D=p(83173),g=p(55137),E=p(64006),T=p(31642),n=p(17238);I.bufferTime=function P(w){for(var B,Y,V=[],ue=1;ue<arguments.length;ue++)V[ue-1]=arguments[ue];var he=null!==(B=T.popScheduler(V))&&void 0!==B?B:E.asyncScheduler,ae=null!==(Y=V[0])&&void 0!==Y?Y:null,X=V[1]||1/0;return l.operate(function(ve,ye){var ge=[],ne=!1,pe=function(de){var re=de.buffer;de.subs.unsubscribe(),g.arrRemove(ge,de),ye.next(re),ne&&Pe()},Pe=function(){if(ge){var de=new e.Subscription;ye.add(de);var oe={buffer:[],subs:de};ge.push(oe),n.executeSchedule(de,he,function(){return pe(oe)},w)}};null!==ae&&ae>=0?n.executeSchedule(ye,he,Pe,ae,!0):ne=!0,Pe();var xe=D.createOperatorSubscriber(ye,function(de){var re,oe,me=ge.slice();try{for(var be=o(me),le=be.next();!le.done;le=be.next()){var Z=le.value,Oe=Z.buffer;Oe.push(de),X<=Oe.length&&pe(Z)}}catch(j){re={error:j}}finally{try{le&&!le.done&&(oe=be.return)&&oe.call(be)}finally{if(re)throw re.error}}},function(){for(;ge?.length;)ye.next(ge.shift().buffer);xe?.unsubscribe(),ye.complete(),ye.unsubscribe()},void 0,function(){return ge=null});ve.subscribe(xe)})}},40555:function(qe,I,p){"use strict";var o=this&&this.__values||function(P){var w="function"==typeof Symbol&&Symbol.iterator,B=w&&P[w],Y=0;if(B)return B.call(P);if(P&&"number"==typeof P.length)return{next:function(){return P&&Y>=P.length&&(P=void 0),{value:P&&P[Y++],done:!P}}};throw new TypeError(w?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(I,"__esModule",{value:!0}),I.bufferToggle=void 0;var e=p(76448),l=p(89216),D=p(48767),g=p(83173),E=p(31),T=p(55137);I.bufferToggle=function n(P,w){return l.operate(function(B,Y){var V=[];D.innerFrom(P).subscribe(g.createOperatorSubscriber(Y,function(ue){var he=[];V.push(he);var ae=new e.Subscription;ae.add(D.innerFrom(w(ue)).subscribe(g.createOperatorSubscriber(Y,function(){T.arrRemove(V,he),Y.next(he),ae.unsubscribe()},E.noop)))},E.noop)),B.subscribe(g.createOperatorSubscriber(Y,function(ue){var he,ae;try{for(var X=o(V),ve=X.next();!ve.done;ve=X.next()){ve.value.push(ue)}}catch(ge){he={error:ge}}finally{try{ve&&!ve.done&&(ae=X.return)&&ae.call(X)}finally{if(he)throw he.error}}},function(){for(;V.length>0;)Y.next(V.shift());Y.complete()}))})}},67274:(qe,I,p)=>{"use strict";Object.defineProperty(I,"__esModule",{value:!0}),I.bufferWhen=void 0;var o=p(89216),e=p(31),l=p(83173),D=p(48767);I.bufferWhen=function g(E){return o.operate(function(T,n){var P=null,w=null,B=function(){w?.unsubscribe();var Y=P;P=[],Y&&n.next(Y),D.innerFrom(E()).subscribe(w=l.createOperatorSubscriber(n,B,e.noop))};B(),T.subscribe(l.createOperatorSubscriber(n,function(Y){return P?.push(Y)},function(){P&&n.next(P),n.complete()},void 0,function(){return P=w=null}))})}},13251:(qe,I,p)=>{"use strict";Object.defineProperty(I,"__esModule",{value:!0}),I.catchError=void 0;var o=p(48767),e=p(83173),l=p(89216);I.catchError=function D(g){return l.operate(function(E,T){var w,n=null,P=!1;n=E.subscribe(e.createOperatorSubscriber(T,void 0,void 0,function(B){w=o.innerFrom(g(B,D(g)(E))),n?(n.unsubscribe(),n=null,w.subscribe(T)):P=!0})),P&&(n.unsubscribe(),n=null,w.subscribe(T))})}},68996:(qe,I,p)=>{"use strict";Object.defineProperty(I,"__esModule",{value:!0}),I.combineAll=void 0;var o=p(68931);I.combineAll=o.combineLatestAll},75538:function(qe,I,p){"use strict";var o=this&&this.__read||function(w,B){var Y="function"==typeof Symbol&&w[Symbol.iterator];if(!Y)return w;var ue,ae,V=Y.call(w),he=[];try{for(;(void 0===B||B-- >0)&&!(ue=V.next()).done;)he.push(ue.value)}catch(X){ae={error:X}}finally{try{ue&&!ue.done&&(Y=V.return)&&Y.call(V)}finally{if(ae)throw ae.error}}return he},e=this&&this.__spreadArray||function(w,B){for(var Y=0,V=B.length,ue=w.length;Y<V;Y++,ue++)w[ue]=B[Y];return w};Object.defineProperty(I,"__esModule",{value:!0}),I.combineLatest=void 0;var l=p(36892),D=p(89216),g=p(73531),E=p(5280),T=p(81471),n=p(31642);I.combineLatest=function P(){for(var w=[],B=0;B<arguments.length;B++)w[B]=arguments[B];var Y=n.popResultSelector(w);return Y?T.pipe(P.apply(void 0,e([],o(w))),E.mapOneOrManyArgs(Y)):D.operate(function(V,ue){l.combineLatestInit(e([V],o(g.argsOrArgArray(w))))(ue)})}},68931:(qe,I,p)=>{"use strict";Object.defineProperty(I,"__esModule",{value:!0}),I.combineLatestAll=void 0;var o=p(36892),e=p(91277);I.combineLatestAll=function l(D){return e.joinAllInternals(o.combineLatest,D)}},18947:function(qe,I,p){"use strict";var o=this&&this.__read||function(g,E){var T="function"==typeof Symbol&&g[Symbol.iterator];if(!T)return g;var P,B,n=T.call(g),w=[];try{for(;(void 0===E||E-- >0)&&!(P=n.next()).done;)w.push(P.value)}catch(Y){B={error:Y}}finally{try{P&&!P.done&&(T=n.return)&&T.call(n)}finally{if(B)throw B.error}}return w},e=this&&this.__spreadArray||function(g,E){for(var T=0,n=E.length,P=g.length;T<n;T++,P++)g[P]=E[T];return g};Object.defineProperty(I,"__esModule",{value:!0}),I.combineLatestWith=void 0;var l=p(75538);I.combineLatestWith=function D(){for(var g=[],E=0;E<arguments.length;E++)g[E]=arguments[E];return l.combineLatest.apply(void 0,e([],o(g)))}},84656:function(qe,I,p){"use strict";var o=this&&this.__read||function(n,P){var w="function"==typeof Symbol&&n[Symbol.iterator];if(!w)return n;var Y,ue,B=w.call(n),V=[];try{for(;(void 0===P||P-- >0)&&!(Y=B.next()).done;)V.push(Y.value)}catch(he){ue={error:he}}finally{try{Y&&!Y.done&&(w=B.return)&&w.call(B)}finally{if(ue)throw ue.error}}return V},e=this&&this.__spreadArray||function(n,P){for(var w=0,B=P.length,Y=n.length;w<B;w++,Y++)n[Y]=P[w];return n};Object.defineProperty(I,"__esModule",{value:!0}),I.concat=void 0;var l=p(89216),D=p(31557),g=p(31642),E=p(24996);I.concat=function T(){for(var n=[],P=0;P<arguments.length;P++)n[P]=arguments[P];var w=g.popScheduler(n);return l.operate(function(B,Y){D.concatAll()(E.from(e([B],o(n)),w)).subscribe(Y)})}},31557:(qe,I,p)=>{"use strict";Object.defineProperty(I,"__esModule",{value:!0}),I.concatAll=void 0;var o=p(43917);I.concatAll=function e(){return o.mergeAll(1)}},44659:(qe,I,p)=>{"use strict";Object.defineProperty(I,"__esModule",{value:!0}),I.concatMap=void 0;var o=p(43010),e=p(37104);I.concatMap=function l(D,g){return e.isFunction(g)?o.mergeMap(D,g,1):o.mergeMap(D,1)}},62993:(qe,I,p)=>{"use strict";Object.defineProperty(I,"__esModule",{value:!0}),I.concatMapTo=void 0;var o=p(44659),e=p(37104);I.concatMapTo=function l(D,g){return e.isFunction(g)?o.concatMap(function(){return D},g):o.concatMap(function(){return D})}},75898:function(qe,I,p){"use strict";var o=this&&this.__read||function(g,E){var T="function"==typeof Symbol&&g[Symbol.iterator];if(!T)return g;var P,B,n=T.call(g),w=[];try{for(;(void 0===E||E-- >0)&&!(P=n.next()).done;)w.push(P.value)}catch(Y){B={error:Y}}finally{try{P&&!P.done&&(T=n.return)&&T.call(n)}finally{if(B)throw B.error}}return w},e=this&&this.__spreadArray||function(g,E){for(var T=0,n=E.length,P=g.length;T<n;T++,P++)g[P]=E[T];return g};Object.defineProperty(I,"__esModule",{value:!0}),I.concatWith=void 0;var l=p(84656);I.concatWith=function D(){for(var g=[],E=0;E<arguments.length;E++)g[E]=arguments[E];return l.concat.apply(void 0,e([],o(g)))}},59725:(qe,I,p)=>{"use strict";Object.defineProperty(I,"__esModule",{value:!0}),I.connect=void 0;var o=p(13768),e=p(48767),l=p(89216),D=p(5107),g={connector:function(){return new o.Subject}};I.connect=function E(T,n){void 0===n&&(n=g);var P=n.connector;return l.operate(function(w,B){var Y=P();e.innerFrom(T(D.fromSubscribable(Y))).subscribe(B),B.add(w.subscribe(Y))})}},1814:(qe,I,p)=>{"use strict";Object.defineProperty(I,"__esModule",{value:!0}),I.count=void 0;var o=p(98587);I.count=function e(l){return o.reduce(function(D,g,E){return!l||l(g,E)?D+1:D},0)}},79784:(qe,I,p)=>{"use strict";Object.defineProperty(I,"__esModule",{value:!0}),I.debounce=void 0;var o=p(89216),e=p(31),l=p(83173),D=p(48767);I.debounce=function g(E){return o.operate(function(T,n){var P=!1,w=null,B=null,Y=function(){if(B?.unsubscribe(),B=null,P){P=!1;var V=w;w=null,n.next(V)}};T.subscribe(l.createOperatorSubscriber(n,function(V){B?.unsubscribe(),P=!0,w=V,B=l.createOperatorSubscriber(n,Y,e.noop),D.innerFrom(E(V)).subscribe(B)},function(){Y(),n.complete()},void 0,function(){w=B=null}))})}},97061:(qe,I,p)=>{"use strict";Object.defineProperty(I,"__esModule",{value:!0}),I.debounceTime=void 0;var o=p(64006),e=p(89216),l=p(83173);I.debounceTime=function D(g,E){return void 0===E&&(E=o.asyncScheduler),e.operate(function(T,n){var P=null,w=null,B=null,Y=function(){if(P){P.unsubscribe(),P=null;var ue=w;w=null,n.next(ue)}};function V(){var ue=B+g,he=E.now();if(he<ue)return P=this.schedule(void 0,ue-he),void n.add(P);Y()}T.subscribe(l.createOperatorSubscriber(n,function(ue){w=ue,B=E.now(),P||(P=E.schedule(V,g),n.add(P))},function(){Y(),n.complete()},void 0,function(){w=P=null}))})}},40926:(qe,I,p)=>{"use strict";Object.defineProperty(I,"__esModule",{value:!0}),I.defaultIfEmpty=void 0;var o=p(89216),e=p(83173);I.defaultIfEmpty=function l(D){return o.operate(function(g,E){var T=!1;g.subscribe(e.createOperatorSubscriber(E,function(n){T=!0,E.next(n)},function(){T||E.next(D),E.complete()}))})}},52096:(qe,I,p)=>{"use strict";Object.defineProperty(I,"__esModule",{value:!0}),I.delay=void 0;var o=p(64006),e=p(63264),l=p(33271);I.delay=function D(g,E){void 0===E&&(E=o.asyncScheduler);var T=l.timer(g,E);return e.delayWhen(function(){return T})}},63264:(qe,I,p)=>{"use strict";Object.defineProperty(I,"__esModule",{value:!0}),I.delayWhen=void 0;var o=p(93601),e=p(1333),l=p(44041),D=p(62182),g=p(43010),E=p(48767);I.delayWhen=function T(n,P){return P?function(w){return o.concat(P.pipe(e.take(1),l.ignoreElements()),w.pipe(T(n)))}:g.mergeMap(function(w,B){return E.innerFrom(n(w,B)).pipe(e.take(1),D.mapTo(w))})}},60533:(qe,I,p)=>{"use strict";Object.defineProperty(I,"__esModule",{value:!0}),I.dematerialize=void 0;var o=p(77262),e=p(89216),l=p(83173);I.dematerialize=function D(){return e.operate(function(g,E){g.subscribe(l.createOperatorSubscriber(E,function(T){return o.observeNotification(T,E)}))})}},5045:(qe,I,p)=>{"use strict";Object.defineProperty(I,"__esModule",{value:!0}),I.distinct=void 0;var o=p(89216),e=p(83173),l=p(31),D=p(48767);I.distinct=function g(E,T){return o.operate(function(n,P){var w=new Set;n.subscribe(e.createOperatorSubscriber(P,function(B){var Y=E?E(B):B;w.has(Y)||(w.add(Y),P.next(B))})),T&&D.innerFrom(T).subscribe(e.createOperatorSubscriber(P,function(){return w.clear()},l.noop))})}},15794:(qe,I,p)=>{"use strict";Object.defineProperty(I,"__esModule",{value:!0}),I.distinctUntilChanged=void 0;var o=p(77884),e=p(89216),l=p(83173);function g(E,T){return E===T}I.distinctUntilChanged=function D(E,T){return void 0===T&&(T=o.identity),E=E??g,e.operate(function(n,P){var w,B=!0;n.subscribe(l.createOperatorSubscriber(P,function(Y){var V=T(Y);(B||!E(w,V))&&(B=!1,w=V,P.next(Y))}))})}},48589:(qe,I,p)=>{"use strict";Object.defineProperty(I,"__esModule",{value:!0}),I.distinctUntilKeyChanged=void 0;var o=p(15794);I.distinctUntilKeyChanged=function e(l,D){return o.distinctUntilChanged(function(g,E){return D?D(g[l],E[l]):g[l]===E[l]})}},11069:(qe,I,p)=>{"use strict";Object.defineProperty(I,"__esModule",{value:!0}),I.elementAt=void 0;var o=p(4769),e=p(74270),l=p(99194),D=p(40926),g=p(1333);I.elementAt=function E(T,n){if(T<0)throw new o.ArgumentOutOfRangeError;var P=arguments.length>=2;return function(w){return w.pipe(e.filter(function(B,Y){return Y===T}),g.take(1),P?D.defaultIfEmpty(n):l.throwIfEmpty(function(){return new o.ArgumentOutOfRangeError}))}}},94312:function(qe,I,p){"use strict";var o=this&&this.__read||function(E,T){var n="function"==typeof Symbol&&E[Symbol.iterator];if(!n)return E;var w,Y,P=n.call(E),B=[];try{for(;(void 0===T||T-- >0)&&!(w=P.next()).done;)B.push(w.value)}catch(V){Y={error:V}}finally{try{w&&!w.done&&(n=P.return)&&n.call(P)}finally{if(Y)throw Y.error}}return B},e=this&&this.__spreadArray||function(E,T){for(var n=0,P=T.length,w=E.length;n<P;n++,w++)E[w]=T[n];return E};Object.defineProperty(I,"__esModule",{value:!0}),I.endWith=void 0;var l=p(93601),D=p(19677);I.endWith=function g(){for(var E=[],T=0;T<arguments.length;T++)E[T]=arguments[T];return function(n){return l.concat(n,D.of.apply(void 0,e([],o(E))))}}},19098:(qe,I,p)=>{"use strict";Object.defineProperty(I,"__esModule",{value:!0}),I.every=void 0;var o=p(89216),e=p(83173);I.every=function l(D,g){return o.operate(function(E,T){var n=0;E.subscribe(e.createOperatorSubscriber(T,function(P){D.call(g,P,n++,E)||(T.next(!1),T.complete())},function(){T.next(!0),T.complete()}))})}},15429:(qe,I,p)=>{"use strict";Object.defineProperty(I,"__esModule",{value:!0}),I.exhaust=void 0;var o=p(11399);I.exhaust=o.exhaustAll},11399:(qe,I,p)=>{"use strict";Object.defineProperty(I,"__esModule",{value:!0}),I.exhaustAll=void 0;var o=p(82202),e=p(77884);I.exhaustAll=function l(){return o.exhaustMap(e.identity)}},82202:(qe,I,p)=>{"use strict";Object.defineProperty(I,"__esModule",{value:!0}),I.exhaustMap=void 0;var o=p(70752),e=p(48767),l=p(89216),D=p(83173);I.exhaustMap=function g(E,T){return T?function(n){return n.pipe(g(function(P,w){return e.innerFrom(E(P,w)).pipe(o.map(function(B,Y){return T(P,B,w,Y)}))}))}:l.operate(function(n,P){var w=0,B=null,Y=!1;n.subscribe(D.createOperatorSubscriber(P,function(V){B||(B=D.createOperatorSubscriber(P,void 0,function(){B=null,Y&&P.complete()}),e.innerFrom(E(V,w++)).subscribe(B))},function(){Y=!0,!B&&P.complete()}))})}},68678:(qe,I,p)=>{"use strict";Object.defineProperty(I,"__esModule",{value:!0}),I.expand=void 0;var o=p(89216),e=p(38457);I.expand=function l(D,g,E){return void 0===g&&(g=1/0),g=(g||0)<1?1/0:g,o.operate(function(T,n){return e.mergeInternals(T,n,D,g,void 0,!0,E)})}},74270:(qe,I,p)=>{"use strict";Object.defineProperty(I,"__esModule",{value:!0}),I.filter=void 0;var o=p(89216),e=p(83173);I.filter=function l(D,g){return o.operate(function(E,T){var n=0;E.subscribe(e.createOperatorSubscriber(T,function(P){return D.call(g,P,n++)&&T.next(P)}))})}},21587:(qe,I,p)=>{"use strict";Object.defineProperty(I,"__esModule",{value:!0}),I.finalize=void 0;var o=p(89216);I.finalize=function e(l){return o.operate(function(D,g){try{D.subscribe(g)}finally{g.add(l)}})}},42265:(qe,I,p)=>{"use strict";Object.defineProperty(I,"__esModule",{value:!0}),I.createFind=I.find=void 0;var o=p(89216),e=p(83173);function D(g,E,T){var n="index"===T;return function(P,w){var B=0;P.subscribe(e.createOperatorSubscriber(w,function(Y){var V=B++;g.call(E,Y,V,P)&&(w.next(n?V:Y),w.complete())},function(){w.next(n?-1:void 0),w.complete()}))}}I.find=function l(g,E){return o.operate(D(g,E,"value"))},I.createFind=D},8195:(qe,I,p)=>{"use strict";Object.defineProperty(I,"__esModule",{value:!0}),I.findIndex=void 0;var o=p(89216),e=p(42265);I.findIndex=function l(D,g){return o.operate(e.createFind(D,g,"index"))}},28012:(qe,I,p)=>{"use strict";Object.defineProperty(I,"__esModule",{value:!0}),I.first=void 0;var o=p(48915),e=p(74270),l=p(1333),D=p(40926),g=p(99194),E=p(77884);I.first=function T(n,P){var w=arguments.length>=2;return function(B){return B.pipe(n?e.filter(function(Y,V){return n(Y,V,B)}):E.identity,l.take(1),w?D.defaultIfEmpty(P):g.throwIfEmpty(function(){return new o.EmptyError}))}}},21463:(qe,I,p)=>{"use strict";Object.defineProperty(I,"__esModule",{value:!0}),I.flatMap=void 0;var o=p(43010);I.flatMap=o.mergeMap},34075:(qe,I,p)=>{"use strict";Object.defineProperty(I,"__esModule",{value:!0}),I.groupBy=void 0;var o=p(55821),e=p(48767),l=p(13768),D=p(89216),g=p(83173);I.groupBy=function E(T,n,P,w){return D.operate(function(B,Y){var V;n&&"function"!=typeof n?(P=n.duration,V=n.element,w=n.connector):V=n;var ue=new Map,he=function(ne){ue.forEach(ne),ne(Y)},ae=function(ne){return he(function(pe){return pe.error(ne)})},X=0,ve=!1,ye=new g.OperatorSubscriber(Y,function(ne){try{var pe=T(ne),Pe=ue.get(pe);if(!Pe){ue.set(pe,Pe=w?w():new l.Subject);var xe=function ge(ne,pe){var Pe=new o.Observable(function(xe){X++;var de=pe.subscribe(xe);return function(){de.unsubscribe(),0==--X&&ve&&ye.unsubscribe()}});return Pe.key=ne,Pe}(pe,Pe);if(Y.next(xe),P){var de=g.createOperatorSubscriber(Pe,function(){Pe.complete(),de?.unsubscribe()},void 0,void 0,function(){return ue.delete(pe)});ye.add(e.innerFrom(P(xe)).subscribe(de))}}Pe.next(V?V(ne):ne)}catch(re){ae(re)}},function(){return he(function(ne){return ne.complete()})},ae,function(){return ue.clear()},function(){return ve=!0,0===X});B.subscribe(ye)})}},44041:(qe,I,p)=>{"use strict";Object.defineProperty(I,"__esModule",{value:!0}),I.ignoreElements=void 0;var o=p(89216),e=p(83173),l=p(31);I.ignoreElements=function D(){return o.operate(function(g,E){g.subscribe(e.createOperatorSubscriber(E,l.noop))})}},86478:(qe,I,p)=>{"use strict";Object.defineProperty(I,"__esModule",{value:!0}),I.isEmpty=void 0;var o=p(89216),e=p(83173);I.isEmpty=function l(){return o.operate(function(D,g){D.subscribe(e.createOperatorSubscriber(g,function(){g.next(!1),g.complete()},function(){g.next(!0),g.complete()}))})}},91277:(qe,I,p)=>{"use strict";Object.defineProperty(I,"__esModule",{value:!0}),I.joinAllInternals=void 0;var o=p(77884),e=p(5280),l=p(81471),D=p(43010),g=p(42976);I.joinAllInternals=function E(T,n){return l.pipe(g.toArray(),D.mergeMap(function(P){return T(P)}),n?e.mapOneOrManyArgs(n):o.identity)}},85126:(qe,I,p)=>{"use strict";Object.defineProperty(I,"__esModule",{value:!0}),I.last=void 0;var o=p(48915),e=p(74270),l=p(48306),D=p(99194),g=p(40926),E=p(77884);I.last=function T(n,P){var w=arguments.length>=2;return function(B){return B.pipe(n?e.filter(function(Y,V){return n(Y,V,B)}):E.identity,l.takeLast(1),w?g.defaultIfEmpty(P):D.throwIfEmpty(function(){return new o.EmptyError}))}}},70752:(qe,I,p)=>{"use strict";Object.defineProperty(I,"__esModule",{value:!0}),I.map=void 0;var o=p(89216),e=p(83173);I.map=function l(D,g){return o.operate(function(E,T){var n=0;E.subscribe(e.createOperatorSubscriber(T,function(P){T.next(D.call(g,P,n++))}))})}},62182:(qe,I,p)=>{"use strict";Object.defineProperty(I,"__esModule",{value:!0}),I.mapTo=void 0;var o=p(70752);I.mapTo=function e(l){return o.map(function(){return l})}},90119:(qe,I,p)=>{"use strict";Object.defineProperty(I,"__esModule",{value:!0}),I.materialize=void 0;var o=p(77262),e=p(89216),l=p(83173);I.materialize=function D(){return e.operate(function(g,E){g.subscribe(l.createOperatorSubscriber(E,function(T){E.next(o.Notification.createNext(T))},function(){E.next(o.Notification.createComplete()),E.complete()},function(T){E.next(o.Notification.createError(T)),E.complete()}))})}},99329:(qe,I,p)=>{"use strict";Object.defineProperty(I,"__esModule",{value:!0}),I.max=void 0;var o=p(98587),e=p(37104);I.max=function l(D){return o.reduce(e.isFunction(D)?function(g,E){return D(g,E)>0?g:E}:function(g,E){return g>E?g:E})}},68789:function(qe,I,p){"use strict";var o=this&&this.__read||function(P,w){var B="function"==typeof Symbol&&P[Symbol.iterator];if(!B)return P;var V,he,Y=B.call(P),ue=[];try{for(;(void 0===w||w-- >0)&&!(V=Y.next()).done;)ue.push(V.value)}catch(ae){he={error:ae}}finally{try{V&&!V.done&&(B=Y.return)&&B.call(Y)}finally{if(he)throw he.error}}return ue},e=this&&this.__spreadArray||function(P,w){for(var B=0,Y=w.length,V=P.length;B<Y;B++,V++)P[V]=w[B];return P};Object.defineProperty(I,"__esModule",{value:!0}),I.merge=void 0;var l=p(89216),D=p(73531),g=p(43917),E=p(31642),T=p(24996);I.merge=function n(){for(var P=[],w=0;w<arguments.length;w++)P[w]=arguments[w];var B=E.popScheduler(P),Y=E.popNumber(P,1/0);return P=D.argsOrArgArray(P),l.operate(function(V,ue){g.mergeAll(Y)(T.from(e([V],o(P)),B)).subscribe(ue)})}},43917:(qe,I,p)=>{"use strict";Object.defineProperty(I,"__esModule",{value:!0}),I.mergeAll=void 0;var o=p(43010),e=p(77884);I.mergeAll=function l(D){return void 0===D&&(D=1/0),o.mergeMap(e.identity,D)}},38457:(qe,I,p)=>{"use strict";Object.defineProperty(I,"__esModule",{value:!0}),I.mergeInternals=void 0;var o=p(48767),e=p(17238),l=p(83173);I.mergeInternals=function D(g,E,T,n,P,w,B,Y){var V=[],ue=0,he=0,ae=!1,X=function(){ae&&!V.length&&!ue&&E.complete()},ve=function(ge){return ue<n?ye(ge):V.push(ge)},ye=function(ge){w&&E.next(ge),ue++;var ne=!1;o.innerFrom(T(ge,he++)).subscribe(l.createOperatorSubscriber(E,function(pe){P?.(pe),w?ve(pe):E.next(pe)},function(){ne=!0},void 0,function(){if(ne)try{ue--;for(var pe=function(){var Pe=V.shift();B?e.executeSchedule(E,B,function(){return ye(Pe)}):ye(Pe)};V.length&&ue<n;)pe();X()}catch(Pe){E.error(Pe)}}))};return g.subscribe(l.createOperatorSubscriber(E,ve,function(){ae=!0,X()})),function(){Y?.()}}},43010:(qe,I,p)=>{"use strict";Object.defineProperty(I,"__esModule",{value:!0}),I.mergeMap=void 0;var o=p(70752),e=p(48767),l=p(89216),D=p(38457),g=p(37104);I.mergeMap=function E(T,n,P){return void 0===P&&(P=1/0),g.isFunction(n)?E(function(w,B){return o.map(function(Y,V){return n(w,Y,B,V)})(e.innerFrom(T(w,B)))},P):("number"==typeof n&&(P=n),l.operate(function(w,B){return D.mergeInternals(w,B,T,P)}))}},10929:(qe,I,p)=>{"use strict";Object.defineProperty(I,"__esModule",{value:!0}),I.mergeMapTo=void 0;var o=p(43010),e=p(37104);I.mergeMapTo=function l(D,g,E){return void 0===E&&(E=1/0),e.isFunction(g)?o.mergeMap(function(){return D},g,E):("number"==typeof g&&(E=g),o.mergeMap(function(){return D},E))}},42816:(qe,I,p)=>{"use strict";Object.defineProperty(I,"__esModule",{value:!0}),I.mergeScan=void 0;var o=p(89216),e=p(38457);I.mergeScan=function l(D,g,E){return void 0===E&&(E=1/0),o.operate(function(T,n){var P=g;return e.mergeInternals(T,n,function(w,B){return D(P,w,B)},E,function(w){P=w},!1,void 0,function(){return P=null})})}},69684:function(qe,I,p){"use strict";var o=this&&this.__read||function(g,E){var T="function"==typeof Symbol&&g[Symbol.iterator];if(!T)return g;var P,B,n=T.call(g),w=[];try{for(;(void 0===E||E-- >0)&&!(P=n.next()).done;)w.push(P.value)}catch(Y){B={error:Y}}finally{try{P&&!P.done&&(T=n.return)&&T.call(n)}finally{if(B)throw B.error}}return w},e=this&&this.__spreadArray||function(g,E){for(var T=0,n=E.length,P=g.length;T<n;T++,P++)g[P]=E[T];return g};Object.defineProperty(I,"__esModule",{value:!0}),I.mergeWith=void 0;var l=p(68789);I.mergeWith=function D(){for(var g=[],E=0;E<arguments.length;E++)g[E]=arguments[E];return l.merge.apply(void 0,e([],o(g)))}},16250:(qe,I,p)=>{"use strict";Object.defineProperty(I,"__esModule",{value:!0}),I.min=void 0;var o=p(98587),e=p(37104);I.min=function l(D){return o.reduce(e.isFunction(D)?function(g,E){return D(g,E)<0?g:E}:function(g,E){return g<E?g:E})}},19872:(qe,I,p)=>{"use strict";Object.defineProperty(I,"__esModule",{value:!0}),I.multicast=void 0;var o=p(6686),e=p(37104),l=p(59725);I.multicast=function D(g,E){var T=e.isFunction(g)?g:function(){return g};return e.isFunction(E)?l.connect(E,{connector:T}):function(n){return new o.ConnectableObservable(n,T)}}},94928:(qe,I,p)=>{"use strict";Object.defineProperty(I,"__esModule",{value:!0}),I.observeOn=void 0;var o=p(17238),e=p(89216),l=p(83173);I.observeOn=function D(g,E){return void 0===E&&(E=0),e.operate(function(T,n){T.subscribe(l.createOperatorSubscriber(n,function(P){return o.executeSchedule(n,g,function(){return n.next(P)},E)},function(){return o.executeSchedule(n,g,function(){return n.complete()},E)},function(P){return o.executeSchedule(n,g,function(){return n.error(P)},E)}))})}},56236:function(qe,I,p){"use strict";var o=this&&this.__read||function(E,T){var n="function"==typeof Symbol&&E[Symbol.iterator];if(!n)return E;var w,Y,P=n.call(E),B=[];try{for(;(void 0===T||T-- >0)&&!(w=P.next()).done;)B.push(w.value)}catch(V){Y={error:V}}finally{try{w&&!w.done&&(n=P.return)&&n.call(P)}finally{if(Y)throw Y.error}}return B},e=this&&this.__spreadArray||function(E,T){for(var n=0,P=T.length,w=E.length;n<P;n++,w++)E[w]=T[n];return E};Object.defineProperty(I,"__esModule",{value:!0}),I.onErrorResumeNext=I.onErrorResumeNextWith=void 0;var l=p(73531),D=p(19978);function g(){for(var E=[],T=0;T<arguments.length;T++)E[T]=arguments[T];var n=l.argsOrArgArray(E);return function(P){return D.onErrorResumeNext.apply(void 0,e([P],o(n)))}}I.onErrorResumeNextWith=g,I.onErrorResumeNext=g},99526:(qe,I,p)=>{"use strict";Object.defineProperty(I,"__esModule",{value:!0}),I.pairwise=void 0;var o=p(89216),e=p(83173);I.pairwise=function l(){return o.operate(function(D,g){var E,T=!1;D.subscribe(e.createOperatorSubscriber(g,function(n){var P=E;E=n,T&&g.next([P,n]),T=!0}))})}},85199:(qe,I,p)=>{"use strict";Object.defineProperty(I,"__esModule",{value:!0}),I.pluck=void 0;var o=p(70752);I.pluck=function e(){for(var l=[],D=0;D<arguments.length;D++)l[D]=arguments[D];var g=l.length;if(0===g)throw new Error("list of properties cannot be empty.");return o.map(function(E){for(var T=E,n=0;n<g;n++){var P=T?.[l[n]];if(!(typeof P<"u"))return;T=P}return T})}},10955:(qe,I,p)=>{"use strict";Object.defineProperty(I,"__esModule",{value:!0}),I.publish=void 0;var o=p(13768),e=p(19872),l=p(59725);I.publish=function D(g){return g?function(E){return l.connect(g)(E)}:function(E){return e.multicast(new o.Subject)(E)}}},66750:(qe,I,p)=>{"use strict";Object.defineProperty(I,"__esModule",{value:!0}),I.publishBehavior=void 0;var o=p(75482),e=p(6686);I.publishBehavior=function l(D){return function(g){var E=new o.BehaviorSubject(D);return new e.ConnectableObservable(g,function(){return E})}}},41003:(qe,I,p)=>{"use strict";Object.defineProperty(I,"__esModule",{value:!0}),I.publishLast=void 0;var o=p(87606),e=p(6686);I.publishLast=function l(){return function(D){var g=new o.AsyncSubject;return new e.ConnectableObservable(D,function(){return g})}}},45530:(qe,I,p)=>{"use strict";Object.defineProperty(I,"__esModule",{value:!0}),I.publishReplay=void 0;var o=p(93406),e=p(19872),l=p(37104);I.publishReplay=function D(g,E,T,n){T&&!l.isFunction(T)&&(n=T);var P=l.isFunction(T)?T:void 0;return function(w){return e.multicast(new o.ReplaySubject(g,E,n),P)(w)}}},32992:function(qe,I,p){"use strict";var o=this&&this.__read||function(T,n){var P="function"==typeof Symbol&&T[Symbol.iterator];if(!P)return T;var B,V,w=P.call(T),Y=[];try{for(;(void 0===n||n-- >0)&&!(B=w.next()).done;)Y.push(B.value)}catch(ue){V={error:ue}}finally{try{B&&!B.done&&(P=w.return)&&P.call(w)}finally{if(V)throw V.error}}return Y},e=this&&this.__spreadArray||function(T,n){for(var P=0,w=n.length,B=T.length;P<w;P++,B++)T[B]=n[P];return T};Object.defineProperty(I,"__esModule",{value:!0}),I.raceWith=void 0;var l=p(28181),D=p(89216),g=p(77884);I.raceWith=function E(){for(var T=[],n=0;n<arguments.length;n++)T[n]=arguments[n];return T.length?D.operate(function(P,w){l.raceInit(e([P],o(T)))(w)}):g.identity}},98587:(qe,I,p)=>{"use strict";Object.defineProperty(I,"__esModule",{value:!0}),I.reduce=void 0;var o=p(53049),e=p(89216);I.reduce=function l(D,g){return e.operate(o.scanInternals(D,g,arguments.length>=2,!1,!0))}},80904:(qe,I,p)=>{"use strict";Object.defineProperty(I,"__esModule",{value:!0}),I.refCount=void 0;var o=p(89216),e=p(83173);I.refCount=function l(){return o.operate(function(D,g){var E=null;D._refCount++;var T=e.createOperatorSubscriber(g,void 0,void 0,void 0,function(){if(!D||D._refCount<=0||0<--D._refCount)E=null;else{var n=D._connection,P=E;E=null,n&&(!P||n===P)&&n.unsubscribe(),g.unsubscribe()}});D.subscribe(T),T.closed||(E=D.connect())})}},68408:(qe,I,p)=>{"use strict";Object.defineProperty(I,"__esModule",{value:!0}),I.repeat=void 0;var o=p(97406),e=p(89216),l=p(83173),D=p(48767),g=p(33271);I.repeat=function E(T){var n,w,P=1/0;return null!=T&&("object"==typeof T?(n=T.count,P=void 0===n?1/0:n,w=T.delay):P=T),P<=0?function(){return o.EMPTY}:e.operate(function(B,Y){var ue,V=0,he=function(){if(ue?.unsubscribe(),ue=null,null!=w){var X="number"==typeof w?g.timer(w):D.innerFrom(w(V)),ve=l.createOperatorSubscriber(Y,function(){ve.unsubscribe(),ae()});X.subscribe(ve)}else ae()},ae=function(){var X=!1;ue=B.subscribe(l.createOperatorSubscriber(Y,void 0,function(){++V<P?ue?he():X=!0:Y.complete()})),X&&he()};ae()})}},97032:(qe,I,p)=>{"use strict";Object.defineProperty(I,"__esModule",{value:!0}),I.repeatWhen=void 0;var o=p(48767),e=p(13768),l=p(89216),D=p(83173);I.repeatWhen=function g(E){return l.operate(function(T,n){var P,B,w=!1,Y=!1,V=!1,ue=function(){return V&&Y&&(n.complete(),!0)},ae=function(){V=!1,P=T.subscribe(D.createOperatorSubscriber(n,void 0,function(){V=!0,!ue()&&(B||(B=new e.Subject,o.innerFrom(E(B)).subscribe(D.createOperatorSubscriber(n,function(){P?ae():w=!0},function(){Y=!0,ue()}))),B).next()})),w&&(P.unsubscribe(),P=null,w=!1,ae())};ae()})}},46069:(qe,I,p)=>{"use strict";Object.defineProperty(I,"__esModule",{value:!0}),I.retry=void 0;var o=p(89216),e=p(83173),l=p(77884),D=p(33271),g=p(48767);I.retry=function E(T){var n;void 0===T&&(T=1/0);var P=(n=T&&"object"==typeof T?T:{count:T}).count,w=void 0===P?1/0:P,B=n.delay,Y=n.resetOnSuccess,V=void 0!==Y&&Y;return w<=0?l.identity:o.operate(function(ue,he){var X,ae=0,ve=function(){var ye=!1;X=ue.subscribe(e.createOperatorSubscriber(he,function(ge){V&&(ae=0),he.next(ge)},void 0,function(ge){if(ae++<w){var ne=function(){X?(X.unsubscribe(),X=null,ve()):ye=!0};if(null!=B){var pe="number"==typeof B?D.timer(B):g.innerFrom(B(ge,ae)),Pe=e.createOperatorSubscriber(he,function(){Pe.unsubscribe(),ne()},function(){he.complete()});pe.subscribe(Pe)}else ne()}else he.error(ge)})),ye&&(X.unsubscribe(),X=null,ve())};ve()})}},35131:(qe,I,p)=>{"use strict";Object.defineProperty(I,"__esModule",{value:!0}),I.retryWhen=void 0;var o=p(48767),e=p(13768),l=p(89216),D=p(83173);I.retryWhen=function g(E){return l.operate(function(T,n){var P,B,w=!1,Y=function(){P=T.subscribe(D.createOperatorSubscriber(n,void 0,void 0,function(V){B||(B=new e.Subject,o.innerFrom(E(B)).subscribe(D.createOperatorSubscriber(n,function(){return P?Y():w=!0}))),B&&B.next(V)})),w&&(P.unsubscribe(),P=null,w=!1,Y())};Y()})}},35032:(qe,I,p)=>{"use strict";Object.defineProperty(I,"__esModule",{value:!0}),I.sample=void 0;var o=p(48767),e=p(89216),l=p(31),D=p(83173);I.sample=function g(E){return e.operate(function(T,n){var P=!1,w=null;T.subscribe(D.createOperatorSubscriber(n,function(B){P=!0,w=B})),o.innerFrom(E).subscribe(D.createOperatorSubscriber(n,function(){if(P){P=!1;var B=w;w=null,n.next(B)}},l.noop))})}},52098:(qe,I,p)=>{"use strict";Object.defineProperty(I,"__esModule",{value:!0}),I.sampleTime=void 0;var o=p(64006),e=p(35032),l=p(51836);I.sampleTime=function D(g,E){return void 0===E&&(E=o.asyncScheduler),e.sample(l.interval(g,E))}},50251:(qe,I,p)=>{"use strict";Object.defineProperty(I,"__esModule",{value:!0}),I.scan=void 0;var o=p(89216),e=p(53049);I.scan=function l(D,g){return o.operate(e.scanInternals(D,g,arguments.length>=2,!0))}},53049:(qe,I,p)=>{"use strict";Object.defineProperty(I,"__esModule",{value:!0}),I.scanInternals=void 0;var o=p(83173);I.scanInternals=function e(l,D,g,E,T){return function(n,P){var w=g,B=D,Y=0;n.subscribe(o.createOperatorSubscriber(P,function(V){var ue=Y++;B=w?l(B,V,ue):(w=!0,V),E&&P.next(B)},T&&function(){w&&P.next(B),P.complete()}))}}},49788:(qe,I,p)=>{"use strict";Object.defineProperty(I,"__esModule",{value:!0}),I.sequenceEqual=void 0;var o=p(89216),e=p(83173),l=p(48767);I.sequenceEqual=function D(E,T){return void 0===T&&(T=function(n,P){return n===P}),o.operate(function(n,P){var w={buffer:[],complete:!1},B={buffer:[],complete:!1},Y=function(ue){P.next(ue),P.complete()},V=function(ue,he){var ae=e.createOperatorSubscriber(P,function(X){var ve=he.buffer,ye=he.complete;0===ve.length?ye?Y(!1):ue.buffer.push(X):!T(X,ve.shift())&&Y(!1)},function(){ue.complete=!0;var X=he.complete,ve=he.buffer;X&&Y(0===ve.length),ae?.unsubscribe()});return ae};n.subscribe(V(w,B)),l.innerFrom(E).subscribe(V(B,w))})}},43222:function(qe,I,p){"use strict";var o=this&&this.__read||function(P,w){var B="function"==typeof Symbol&&P[Symbol.iterator];if(!B)return P;var V,he,Y=B.call(P),ue=[];try{for(;(void 0===w||w-- >0)&&!(V=Y.next()).done;)ue.push(V.value)}catch(ae){he={error:ae}}finally{try{V&&!V.done&&(B=Y.return)&&B.call(Y)}finally{if(he)throw he.error}}return ue},e=this&&this.__spreadArray||function(P,w){for(var B=0,Y=w.length,V=P.length;B<Y;B++,V++)P[V]=w[B];return P};Object.defineProperty(I,"__esModule",{value:!0}),I.share=void 0;var l=p(48767),D=p(13768),g=p(57052),E=p(89216);function n(P,w){for(var B=[],Y=2;Y<arguments.length;Y++)B[Y-2]=arguments[Y];if(!0!==w){if(!1!==w){var V=new g.SafeSubscriber({next:function(){V.unsubscribe(),P()}});return l.innerFrom(w.apply(void 0,e([],o(B)))).subscribe(V)}}else P()}I.share=function T(P){void 0===P&&(P={});var w=P.connector,B=void 0===w?function(){return new D.Subject}:w,Y=P.resetOnError,V=void 0===Y||Y,ue=P.resetOnComplete,he=void 0===ue||ue,ae=P.resetOnRefCountZero,X=void 0===ae||ae;return function(ve){var ye,ge,ne,pe=0,Pe=!1,xe=!1,de=function(){ge?.unsubscribe(),ge=void 0},re=function(){de(),ye=ne=void 0,Pe=xe=!1},oe=function(){var me=ye;re(),me?.unsubscribe()};return E.operate(function(me,be){pe++,!xe&&!Pe&&de();var le=ne=ne??B();be.add(function(){0===--pe&&!xe&&!Pe&&(ge=n(oe,X))}),le.subscribe(be),!ye&&pe>0&&(ye=new g.SafeSubscriber({next:function(Z){return le.next(Z)},error:function(Z){xe=!0,de(),ge=n(re,V,Z),le.error(Z)},complete:function(){Pe=!0,de(),ge=n(re,he),le.complete()}}),l.innerFrom(me).subscribe(ye))})(ve)}}},12186:(qe,I,p)=>{"use strict";Object.defineProperty(I,"__esModule",{value:!0}),I.shareReplay=void 0;var o=p(93406),e=p(43222);I.shareReplay=function l(D,g,E){var T,n,P,w,B=!1;return D&&"object"==typeof D?(T=D.bufferSize,w=void 0===T?1/0:T,n=D.windowTime,g=void 0===n?1/0:n,B=void 0!==(P=D.refCount)&&P,E=D.scheduler):w=D??1/0,e.share({connector:function(){return new o.ReplaySubject(w,g,E)},resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:B})}},695:(qe,I,p)=>{"use strict";Object.defineProperty(I,"__esModule",{value:!0}),I.single=void 0;var o=p(48915),e=p(61551),l=p(85477),D=p(89216),g=p(83173);I.single=function E(T){return D.operate(function(n,P){var B,w=!1,Y=!1,V=0;n.subscribe(g.createOperatorSubscriber(P,function(ue){Y=!0,(!T||T(ue,V++,n))&&(w&&P.error(new e.SequenceError("Too many matching values")),w=!0,B=ue)},function(){w?(P.next(B),P.complete()):P.error(Y?new l.NotFoundError("No matching values"):new o.EmptyError)}))})}},44975:(qe,I,p)=>{"use strict";Object.defineProperty(I,"__esModule",{value:!0}),I.skip=void 0;var o=p(74270);I.skip=function e(l){return o.filter(function(D,g){return l<=g})}},30728:(qe,I,p)=>{"use strict";Object.defineProperty(I,"__esModule",{value:!0}),I.skipLast=void 0;var o=p(77884),e=p(89216),l=p(83173);I.skipLast=function D(g){return g<=0?o.identity:e.operate(function(E,T){var n=new Array(g),P=0;return E.subscribe(l.createOperatorSubscriber(T,function(w){var B=P++;if(B<g)n[B]=w;else{var Y=B%g,V=n[Y];n[Y]=w,T.next(V)}})),function(){n=null}})}},97409:(qe,I,p)=>{"use strict";Object.defineProperty(I,"__esModule",{value:!0}),I.skipUntil=void 0;var o=p(89216),e=p(83173),l=p(48767),D=p(31);I.skipUntil=function g(E){return o.operate(function(T,n){var P=!1,w=e.createOperatorSubscriber(n,function(){w?.unsubscribe(),P=!0},D.noop);l.innerFrom(E).subscribe(w),T.subscribe(e.createOperatorSubscriber(n,function(B){return P&&n.next(B)}))})}},22863:(qe,I,p)=>{"use strict";Object.defineProperty(I,"__esModule",{value:!0}),I.skipWhile=void 0;var o=p(89216),e=p(83173);I.skipWhile=function l(D){return o.operate(function(g,E){var T=!1,n=0;g.subscribe(e.createOperatorSubscriber(E,function(P){return(T||(T=!D(P,n++)))&&E.next(P)}))})}},44930:(qe,I,p)=>{"use strict";Object.defineProperty(I,"__esModule",{value:!0}),I.startWith=void 0;var o=p(93601),e=p(31642),l=p(89216);I.startWith=function D(){for(var g=[],E=0;E<arguments.length;E++)g[E]=arguments[E];var T=e.popScheduler(g);return l.operate(function(n,P){(T?o.concat(g,n,T):o.concat(g,n)).subscribe(P)})}},41698:(qe,I,p)=>{"use strict";Object.defineProperty(I,"__esModule",{value:!0}),I.subscribeOn=void 0;var o=p(89216);I.subscribeOn=function e(l,D){return void 0===D&&(D=0),o.operate(function(g,E){E.add(l.schedule(function(){return g.subscribe(E)},D))})}},78044:(qe,I,p)=>{"use strict";Object.defineProperty(I,"__esModule",{value:!0}),I.switchAll=void 0;var o=p(90986),e=p(77884);I.switchAll=function l(){return o.switchMap(e.identity)}},90986:(qe,I,p)=>{"use strict";Object.defineProperty(I,"__esModule",{value:!0}),I.switchMap=void 0;var o=p(48767),e=p(89216),l=p(83173);I.switchMap=function D(g,E){return e.operate(function(T,n){var P=null,w=0,B=!1,Y=function(){return B&&!P&&n.complete()};T.subscribe(l.createOperatorSubscriber(n,function(V){P?.unsubscribe();var ue=0,he=w++;o.innerFrom(g(V,he)).subscribe(P=l.createOperatorSubscriber(n,function(ae){return n.next(E?E(V,ae,he,ue++):ae)},function(){P=null,Y()}))},function(){B=!0,Y()}))})}},99309:(qe,I,p)=>{"use strict";Object.defineProperty(I,"__esModule",{value:!0}),I.switchMapTo=void 0;var o=p(90986),e=p(37104);I.switchMapTo=function l(D,g){return e.isFunction(g)?o.switchMap(function(){return D},g):o.switchMap(function(){return D})}},49499:(qe,I,p)=>{"use strict";Object.defineProperty(I,"__esModule",{value:!0}),I.switchScan=void 0;var o=p(90986),e=p(89216);I.switchScan=function l(D,g){return e.operate(function(E,T){var n=g;return o.switchMap(function(P,w){return D(n,P,w)},function(P,w){return n=w,w})(E).subscribe(T),function(){n=null}})}},1333:(qe,I,p)=>{"use strict";Object.defineProperty(I,"__esModule",{value:!0}),I.take=void 0;var o=p(97406),e=p(89216),l=p(83173);I.take=function D(g){return g<=0?function(){return o.EMPTY}:e.operate(function(E,T){var n=0;E.subscribe(l.createOperatorSubscriber(T,function(P){++n<=g&&(T.next(P),g<=n&&T.complete())}))})}},48306:function(qe,I,p){"use strict";var o=this&&this.__values||function(E){var T="function"==typeof Symbol&&Symbol.iterator,n=T&&E[T],P=0;if(n)return n.call(E);if(E&&"number"==typeof E.length)return{next:function(){return E&&P>=E.length&&(E=void 0),{value:E&&E[P++],done:!E}}};throw new TypeError(T?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(I,"__esModule",{value:!0}),I.takeLast=void 0;var e=p(97406),l=p(89216),D=p(83173);I.takeLast=function g(E){return E<=0?function(){return e.EMPTY}:l.operate(function(T,n){var P=[];T.subscribe(D.createOperatorSubscriber(n,function(w){P.push(w),E<P.length&&P.shift()},function(){var w,B;try{for(var Y=o(P),V=Y.next();!V.done;V=Y.next()){var ue=V.value;n.next(ue)}}catch(he){w={error:he}}finally{try{V&&!V.done&&(B=Y.return)&&B.call(Y)}finally{if(w)throw w.error}}n.complete()},void 0,function(){P=null}))})}},85716:(qe,I,p)=>{"use strict";Object.defineProperty(I,"__esModule",{value:!0}),I.takeUntil=void 0;var o=p(89216),e=p(83173),l=p(48767),D=p(31);I.takeUntil=function g(E){return o.operate(function(T,n){l.innerFrom(E).subscribe(e.createOperatorSubscriber(n,function(){return n.complete()},D.noop)),!n.closed&&T.subscribe(n)})}},39928:(qe,I,p)=>{"use strict";Object.defineProperty(I,"__esModule",{value:!0}),I.takeWhile=void 0;var o=p(89216),e=p(83173);I.takeWhile=function l(D,g){return void 0===g&&(g=!1),o.operate(function(E,T){var n=0;E.subscribe(e.createOperatorSubscriber(T,function(P){var w=D(P,n++);(w||g)&&T.next(P),!w&&T.complete()}))})}},66821:(qe,I,p)=>{"use strict";Object.defineProperty(I,"__esModule",{value:!0}),I.tap=void 0;var o=p(37104),e=p(89216),l=p(83173),D=p(77884);I.tap=function g(E,T,n){var P=o.isFunction(E)||T||n?{next:E,error:T,complete:n}:E;return P?e.operate(function(w,B){var Y;null===(Y=P.subscribe)||void 0===Y||Y.call(P);var V=!0;w.subscribe(l.createOperatorSubscriber(B,function(ue){var he;null===(he=P.next)||void 0===he||he.call(P,ue),B.next(ue)},function(){var ue;V=!1,null===(ue=P.complete)||void 0===ue||ue.call(P),B.complete()},function(ue){var he;V=!1,null===(he=P.error)||void 0===he||he.call(P,ue),B.error(ue)},function(){var ue,he;V&&(null===(ue=P.unsubscribe)||void 0===ue||ue.call(P)),null===(he=P.finalize)||void 0===he||he.call(P)}))}):D.identity}},14330:(qe,I,p)=>{"use strict";Object.defineProperty(I,"__esModule",{value:!0}),I.throttle=void 0;var o=p(89216),e=p(83173),l=p(48767);I.throttle=function D(g,E){return o.operate(function(T,n){var P=E??{},w=P.leading,B=void 0===w||w,Y=P.trailing,V=void 0!==Y&&Y,ue=!1,he=null,ae=null,X=!1,ve=function(){ae?.unsubscribe(),ae=null,V&&(ne(),X&&n.complete())},ye=function(){ae=null,X&&n.complete()},ge=function(pe){return ae=l.innerFrom(g(pe)).subscribe(e.createOperatorSubscriber(n,ve,ye))},ne=function(){if(ue){ue=!1;var pe=he;he=null,n.next(pe),!X&&ge(pe)}};T.subscribe(e.createOperatorSubscriber(n,function(pe){ue=!0,he=pe,(!ae||ae.closed)&&(B?ne():ge(pe))},function(){X=!0,(!(V&&ue&&ae)||ae.closed)&&n.complete()}))})}},54029:(qe,I,p)=>{"use strict";Object.defineProperty(I,"__esModule",{value:!0}),I.throttleTime=void 0;var o=p(64006),e=p(14330),l=p(33271);I.throttleTime=function D(g,E,T){void 0===E&&(E=o.asyncScheduler);var n=l.timer(g,E);return e.throttle(function(){return n},T)}},99194:(qe,I,p)=>{"use strict";Object.defineProperty(I,"__esModule",{value:!0}),I.throwIfEmpty=void 0;var o=p(48915),e=p(89216),l=p(83173);function g(){return new o.EmptyError}I.throwIfEmpty=function D(E){return void 0===E&&(E=g),e.operate(function(T,n){var P=!1;T.subscribe(l.createOperatorSubscriber(n,function(w){P=!0,n.next(w)},function(){return P?n.complete():n.error(E())}))})}},5904:(qe,I,p)=>{"use strict";Object.defineProperty(I,"__esModule",{value:!0}),I.TimeInterval=I.timeInterval=void 0;var o=p(64006),e=p(89216),l=p(83173);I.timeInterval=function D(E){return void 0===E&&(E=o.asyncScheduler),e.operate(function(T,n){var P=E.now();T.subscribe(l.createOperatorSubscriber(n,function(w){var B=E.now(),Y=B-P;P=B,n.next(new g(w,Y))}))})};var g=function E(T,n){this.value=T,this.interval=n};I.TimeInterval=g},75001:(qe,I,p)=>{"use strict";Object.defineProperty(I,"__esModule",{value:!0}),I.timeout=I.TimeoutError=void 0;var o=p(64006),e=p(67323),l=p(89216),D=p(48767),g=p(49703),E=p(83173),T=p(17238);function P(w){throw new I.TimeoutError(w)}I.TimeoutError=g.createErrorClass(function(w){return function(Y){void 0===Y&&(Y=null),w(this),this.message="Timeout has occurred",this.name="TimeoutError",this.info=Y}}),I.timeout=function n(w,B){var Y=e.isValidDate(w)?{first:w}:"number"==typeof w?{each:w}:w,V=Y.first,ue=Y.each,he=Y.with,ae=void 0===he?P:he,X=Y.scheduler,ve=void 0===X?B??o.asyncScheduler:X,ye=Y.meta,ge=void 0===ye?null:ye;if(null==V&&null==ue)throw new TypeError("No timeout provided.");return l.operate(function(ne,pe){var Pe,xe,de=null,re=0,oe=function(me){xe=T.executeSchedule(pe,ve,function(){try{Pe.unsubscribe(),D.innerFrom(ae({meta:ge,lastValue:de,seen:re})).subscribe(pe)}catch(be){pe.error(be)}},me)};Pe=ne.subscribe(E.createOperatorSubscriber(pe,function(me){xe?.unsubscribe(),re++,pe.next(de=me),ue>0&&oe(ue)},void 0,void 0,function(){xe?.closed||xe?.unsubscribe(),de=null})),!re&&oe(null!=V?"number"==typeof V?V:+V-ve.now():ue)})}},28308:(qe,I,p)=>{"use strict";Object.defineProperty(I,"__esModule",{value:!0}),I.timeoutWith=void 0;var o=p(64006),e=p(67323),l=p(75001);I.timeoutWith=function D(g,E,T){var n,P,w;if(T=T??o.async,e.isValidDate(g)?n=g:"number"==typeof g&&(P=g),!E)throw new TypeError("No observable provided to switch to");if(w=function(){return E},null==n&&null==P)throw new TypeError("No timeout provided.");return l.timeout({first:n,each:P,scheduler:T,with:w})}},20250:(qe,I,p)=>{"use strict";Object.defineProperty(I,"__esModule",{value:!0}),I.timestamp=void 0;var o=p(68354),e=p(70752);I.timestamp=function l(D){return void 0===D&&(D=o.dateTimestampProvider),e.map(function(g){return{value:g,timestamp:D.now()}})}},42976:(qe,I,p)=>{"use strict";Object.defineProperty(I,"__esModule",{value:!0}),I.toArray=void 0;var o=p(98587),e=p(89216),l=function(g,E){return g.push(E),g};I.toArray=function D(){return e.operate(function(g,E){o.reduce(l,[])(g).subscribe(E)})}},79374:(qe,I,p)=>{"use strict";Object.defineProperty(I,"__esModule",{value:!0}),I.window=void 0;var o=p(13768),e=p(89216),l=p(83173),D=p(31),g=p(48767);I.window=function E(T){return e.operate(function(n,P){var w=new o.Subject;P.next(w.asObservable());var B=function(Y){w.error(Y),P.error(Y)};return n.subscribe(l.createOperatorSubscriber(P,function(Y){return w?.next(Y)},function(){w.complete(),P.complete()},B)),g.innerFrom(T).subscribe(l.createOperatorSubscriber(P,function(){w.complete(),P.next(w=new o.Subject)},D.noop,B)),function(){w?.unsubscribe(),w=null}})}},68427:function(qe,I,p){"use strict";var o=this&&this.__values||function(E){var T="function"==typeof Symbol&&Symbol.iterator,n=T&&E[T],P=0;if(n)return n.call(E);if(E&&"number"==typeof E.length)return{next:function(){return E&&P>=E.length&&(E=void 0),{value:E&&E[P++],done:!E}}};throw new TypeError(T?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(I,"__esModule",{value:!0}),I.windowCount=void 0;var e=p(13768),l=p(89216),D=p(83173);I.windowCount=function g(E,T){void 0===T&&(T=0);var n=T>0?T:E;return l.operate(function(P,w){var B=[new e.Subject],V=0;w.next(B[0].asObservable()),P.subscribe(D.createOperatorSubscriber(w,function(ue){var he,ae;try{for(var X=o(B),ve=X.next();!ve.done;ve=X.next()){ve.value.next(ue)}}catch(pe){he={error:pe}}finally{try{ve&&!ve.done&&(ae=X.return)&&ae.call(X)}finally{if(he)throw he.error}}var ge=V-E+1;if(ge>=0&&ge%n==0&&B.shift().complete(),++V%n==0){var ne=new e.Subject;B.push(ne),w.next(ne.asObservable())}},function(){for(;B.length>0;)B.shift().complete();w.complete()},function(ue){for(;B.length>0;)B.shift().error(ue);w.error(ue)},function(){null,B=null}))})}},22358:(qe,I,p)=>{"use strict";Object.defineProperty(I,"__esModule",{value:!0}),I.windowTime=void 0;var o=p(13768),e=p(64006),l=p(76448),D=p(89216),g=p(83173),E=p(55137),T=p(31642),n=p(17238);I.windowTime=function P(w){for(var B,Y,V=[],ue=1;ue<arguments.length;ue++)V[ue-1]=arguments[ue];var he=null!==(B=T.popScheduler(V))&&void 0!==B?B:e.asyncScheduler,ae=null!==(Y=V[0])&&void 0!==Y?Y:null,X=V[1]||1/0;return D.operate(function(ve,ye){var ge=[],ne=!1,pe=function(re){var oe=re.window,me=re.subs;oe.complete(),me.unsubscribe(),E.arrRemove(ge,re),ne&&Pe()},Pe=function(){if(ge){var re=new l.Subscription;ye.add(re);var oe=new o.Subject,me={window:oe,subs:re,seen:0};ge.push(me),ye.next(oe.asObservable()),n.executeSchedule(re,he,function(){return pe(me)},w)}};null!==ae&&ae>=0?n.executeSchedule(ye,he,Pe,ae,!0):ne=!0,Pe();var xe=function(re){return ge.slice().forEach(re)},de=function(re){xe(function(oe){var me=oe.window;return re(me)}),re(ye),ye.unsubscribe()};return ve.subscribe(g.createOperatorSubscriber(ye,function(re){xe(function(oe){oe.window.next(re),X<=++oe.seen&&pe(oe)})},function(){return de(function(re){return re.complete()})},function(re){return de(function(oe){return oe.error(re)})})),function(){ge=null}})}},46464:function(qe,I,p){"use strict";var o=this&&this.__values||function(w){var B="function"==typeof Symbol&&Symbol.iterator,Y=B&&w[B],V=0;if(Y)return Y.call(w);if(w&&"number"==typeof w.length)return{next:function(){return w&&V>=w.length&&(w=void 0),{value:w&&w[V++],done:!w}}};throw new TypeError(B?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(I,"__esModule",{value:!0}),I.windowToggle=void 0;var e=p(13768),l=p(76448),D=p(89216),g=p(48767),E=p(83173),T=p(31),n=p(55137);I.windowToggle=function P(w,B){return D.operate(function(Y,V){var ue=[],he=function(ae){for(;0<ue.length;)ue.shift().error(ae);V.error(ae)};g.innerFrom(w).subscribe(E.createOperatorSubscriber(V,function(ae){var X=new e.Subject;ue.push(X);var ge,ve=new l.Subscription;try{ge=g.innerFrom(B(ae))}catch(ne){return void he(ne)}V.next(X.asObservable()),ve.add(ge.subscribe(E.createOperatorSubscriber(V,function(){n.arrRemove(ue,X),X.complete(),ve.unsubscribe()},T.noop,he)))},T.noop)),Y.subscribe(E.createOperatorSubscriber(V,function(ae){var X,ve,ye=ue.slice();try{for(var ge=o(ye),ne=ge.next();!ne.done;ne=ge.next()){ne.value.next(ae)}}catch(Pe){X={error:Pe}}finally{try{ne&&!ne.done&&(ve=ge.return)&&ve.call(ge)}finally{if(X)throw X.error}}},function(){for(;0<ue.length;)ue.shift().complete();V.complete()},he,function(){for(;0<ue.length;)ue.shift().unsubscribe()}))})}},55424:(qe,I,p)=>{"use strict";Object.defineProperty(I,"__esModule",{value:!0}),I.windowWhen=void 0;var o=p(13768),e=p(89216),l=p(83173),D=p(48767);I.windowWhen=function g(E){return e.operate(function(T,n){var P,w,B=function(V){P.error(V),n.error(V)},Y=function(){var V;w?.unsubscribe(),P?.complete(),P=new o.Subject,n.next(P.asObservable());try{V=D.innerFrom(E())}catch(ue){return void B(ue)}V.subscribe(w=l.createOperatorSubscriber(n,Y,Y,B))};Y(),T.subscribe(l.createOperatorSubscriber(n,function(V){return P.next(V)},function(){P.complete(),n.complete()},B,function(){w?.unsubscribe(),P=null}))})}},135:function(qe,I,p){"use strict";var o=this&&this.__read||function(w,B){var Y="function"==typeof Symbol&&w[Symbol.iterator];if(!Y)return w;var ue,ae,V=Y.call(w),he=[];try{for(;(void 0===B||B-- >0)&&!(ue=V.next()).done;)he.push(ue.value)}catch(X){ae={error:X}}finally{try{ue&&!ue.done&&(Y=V.return)&&Y.call(V)}finally{if(ae)throw ae.error}}return he},e=this&&this.__spreadArray||function(w,B){for(var Y=0,V=B.length,ue=w.length;Y<V;Y++,ue++)w[ue]=B[Y];return w};Object.defineProperty(I,"__esModule",{value:!0}),I.withLatestFrom=void 0;var l=p(89216),D=p(83173),g=p(48767),E=p(77884),T=p(31),n=p(31642);I.withLatestFrom=function P(){for(var w=[],B=0;B<arguments.length;B++)w[B]=arguments[B];var Y=n.popResultSelector(w);return l.operate(function(V,ue){for(var he=w.length,ae=new Array(he),X=w.map(function(){return!1}),ve=!1,ye=function(ne){g.innerFrom(w[ne]).subscribe(D.createOperatorSubscriber(ue,function(pe){ae[ne]=pe,!ve&&!X[ne]&&(X[ne]=!0,(ve=X.every(E.identity))&&(X=null))},T.noop))},ge=0;ge<he;ge++)ye(ge);V.subscribe(D.createOperatorSubscriber(ue,function(ne){if(ve){var pe=e([ne],o(ae));ue.next(Y?Y.apply(void 0,e([],o(pe))):pe)}}))})}},45573:function(qe,I,p){"use strict";var o=this&&this.__read||function(E,T){var n="function"==typeof Symbol&&E[Symbol.iterator];if(!n)return E;var w,Y,P=n.call(E),B=[];try{for(;(void 0===T||T-- >0)&&!(w=P.next()).done;)B.push(w.value)}catch(V){Y={error:V}}finally{try{w&&!w.done&&(n=P.return)&&n.call(P)}finally{if(Y)throw Y.error}}return B},e=this&&this.__spreadArray||function(E,T){for(var n=0,P=T.length,w=E.length;n<P;n++,w++)E[w]=T[n];return E};Object.defineProperty(I,"__esModule",{value:!0}),I.zip=void 0;var l=p(14842),D=p(89216);I.zip=function g(){for(var E=[],T=0;T<arguments.length;T++)E[T]=arguments[T];return D.operate(function(n,P){l.zip.apply(void 0,e([n],o(E))).subscribe(P)})}},78101:(qe,I,p)=>{"use strict";Object.defineProperty(I,"__esModule",{value:!0}),I.zipAll=void 0;var o=p(14842),e=p(91277);I.zipAll=function l(D){return e.joinAllInternals(o.zip,D)}},59411:function(qe,I,p){"use strict";var o=this&&this.__read||function(g,E){var T="function"==typeof Symbol&&g[Symbol.iterator];if(!T)return g;var P,B,n=T.call(g),w=[];try{for(;(void 0===E||E-- >0)&&!(P=n.next()).done;)w.push(P.value)}catch(Y){B={error:Y}}finally{try{P&&!P.done&&(T=n.return)&&T.call(n)}finally{if(B)throw B.error}}return w},e=this&&this.__spreadArray||function(g,E){for(var T=0,n=E.length,P=g.length;T<n;T++,P++)g[P]=E[T];return g};Object.defineProperty(I,"__esModule",{value:!0}),I.zipWith=void 0;var l=p(45573);I.zipWith=function D(){for(var g=[],E=0;E<arguments.length;E++)g[E]=arguments[E];return l.zip.apply(void 0,e([],o(g)))}},59611:(qe,I,p)=>{"use strict";Object.defineProperty(I,"__esModule",{value:!0}),I.scheduleArray=void 0;var o=p(55821);I.scheduleArray=function e(l,D){return new o.Observable(function(g){var E=0;return D.schedule(function(){E===l.length?g.complete():(g.next(l[E++]),g.closed||this.schedule())})})}},23009:(qe,I,p)=>{"use strict";Object.defineProperty(I,"__esModule",{value:!0}),I.scheduleAsyncIterable=void 0;var o=p(55821),e=p(17238);I.scheduleAsyncIterable=function l(D,g){if(!D)throw new Error("Iterable cannot be null");return new o.Observable(function(E){e.executeSchedule(E,g,function(){var T=D[Symbol.asyncIterator]();e.executeSchedule(E,g,function(){T.next().then(function(n){n.done?E.complete():E.next(n.value)})},0,!0)})})}},39049:(qe,I,p)=>{"use strict";Object.defineProperty(I,"__esModule",{value:!0}),I.scheduleIterable=void 0;var o=p(55821),e=p(34260),l=p(37104),D=p(17238);I.scheduleIterable=function g(E,T){return new o.Observable(function(n){var P;return D.executeSchedule(n,T,function(){P=E[e.iterator](),D.executeSchedule(n,T,function(){var w,B,Y;try{B=(w=P.next()).value,Y=w.done}catch(V){return void n.error(V)}Y?n.complete():n.next(B)},0,!0)}),function(){return l.isFunction(P?.return)&&P.return()}})}},7767:(qe,I,p)=>{"use strict";Object.defineProperty(I,"__esModule",{value:!0}),I.scheduleObservable=void 0;var o=p(48767),e=p(94928),l=p(41698);I.scheduleObservable=function D(g,E){return o.innerFrom(g).pipe(l.subscribeOn(E),e.observeOn(E))}},22247:(qe,I,p)=>{"use strict";Object.defineProperty(I,"__esModule",{value:!0}),I.schedulePromise=void 0;var o=p(48767),e=p(94928),l=p(41698);I.schedulePromise=function D(g,E){return o.innerFrom(g).pipe(l.subscribeOn(E),e.observeOn(E))}},93958:(qe,I,p)=>{"use strict";Object.defineProperty(I,"__esModule",{value:!0}),I.scheduleReadableStreamLike=void 0;var o=p(23009),e=p(87128);I.scheduleReadableStreamLike=function l(D,g){return o.scheduleAsyncIterable(e.readableStreamLikeToAsyncGenerator(D),g)}},9341:(qe,I,p)=>{"use strict";Object.defineProperty(I,"__esModule",{value:!0}),I.scheduled=void 0;var o=p(7767),e=p(22247),l=p(59611),D=p(39049),g=p(23009),E=p(17454),T=p(25050),n=p(70697),P=p(5431),w=p(26175),B=p(36870),Y=p(87128),V=p(93958);I.scheduled=function ue(he,ae){if(null!=he){if(E.isInteropObservable(he))return o.scheduleObservable(he,ae);if(n.isArrayLike(he))return l.scheduleArray(he,ae);if(T.isPromise(he))return e.schedulePromise(he,ae);if(w.isAsyncIterable(he))return g.scheduleAsyncIterable(he,ae);if(P.isIterable(he))return D.scheduleIterable(he,ae);if(Y.isReadableStreamLike(he))return V.scheduleReadableStreamLike(he,ae)}throw B.createInvalidObservableTypeError(he)}},91394:function(qe,I,p){"use strict";var D,o=this&&this.__extends||(D=function(g,E){return(D=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(T,n){T.__proto__=n}||function(T,n){for(var P in n)Object.prototype.hasOwnProperty.call(n,P)&&(T[P]=n[P])})(g,E)},function(g,E){if("function"!=typeof E&&null!==E)throw new TypeError("Class extends value "+String(E)+" is not a constructor or null");function T(){this.constructor=g}D(g,E),g.prototype=null===E?Object.create(E):(T.prototype=E.prototype,new T)});Object.defineProperty(I,"__esModule",{value:!0}),I.Action=void 0;var l=function(D){function g(E,T){return D.call(this)||this}return o(g,D),g.prototype.schedule=function(E,T){return void 0===T&&(T=0),this},g}(p(76448).Subscription);I.Action=l},90275:function(qe,I,p){"use strict";var g,o=this&&this.__extends||(g=function(E,T){return(g=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,P){n.__proto__=P}||function(n,P){for(var w in P)Object.prototype.hasOwnProperty.call(P,w)&&(n[w]=P[w])})(E,T)},function(E,T){if("function"!=typeof T&&null!==T)throw new TypeError("Class extends value "+String(T)+" is not a constructor or null");function n(){this.constructor=E}g(E,T),E.prototype=null===T?Object.create(T):(n.prototype=T.prototype,new n)});Object.defineProperty(I,"__esModule",{value:!0}),I.AnimationFrameAction=void 0;var e=p(34723),l=p(86343),D=function(g){function E(T,n){var P=g.call(this,T,n)||this;return P.scheduler=T,P.work=n,P}return o(E,g),E.prototype.requestAsyncId=function(T,n,P){return void 0===P&&(P=0),null!==P&&P>0?g.prototype.requestAsyncId.call(this,T,n,P):(T.actions.push(this),T._scheduled||(T._scheduled=l.animationFrameProvider.requestAnimationFrame(function(){return T.flush(void 0)})))},E.prototype.recycleAsyncId=function(T,n,P){var w;if(void 0===P&&(P=0),null!=P?P>0:this.delay>0)return g.prototype.recycleAsyncId.call(this,T,n,P);var B=T.actions;null!=n&&(null===(w=B[B.length-1])||void 0===w?void 0:w.id)!==n&&(l.animationFrameProvider.cancelAnimationFrame(n),T._scheduled=void 0)},E}(e.AsyncAction);I.AnimationFrameAction=D},13625:function(qe,I,p){"use strict";var D,o=this&&this.__extends||(D=function(g,E){return(D=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(T,n){T.__proto__=n}||function(T,n){for(var P in n)Object.prototype.hasOwnProperty.call(n,P)&&(T[P]=n[P])})(g,E)},function(g,E){if("function"!=typeof E&&null!==E)throw new TypeError("Class extends value "+String(E)+" is not a constructor or null");function T(){this.constructor=g}D(g,E),g.prototype=null===E?Object.create(E):(T.prototype=E.prototype,new T)});Object.defineProperty(I,"__esModule",{value:!0}),I.AnimationFrameScheduler=void 0;var l=function(D){function g(){return null!==D&&D.apply(this,arguments)||this}return o(g,D),g.prototype.flush=function(E){this._active=!0;var T=this._scheduled;this._scheduled=void 0;var P,n=this.actions;E=E||n.shift();do{if(P=E.execute(E.state,E.delay))break}while((E=n[0])&&E.id===T&&n.shift());if(this._active=!1,P){for(;(E=n[0])&&E.id===T&&n.shift();)E.unsubscribe();throw P}},g}(p(56216).AsyncScheduler);I.AnimationFrameScheduler=l},57046:function(qe,I,p){"use strict";var g,o=this&&this.__extends||(g=function(E,T){return(g=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,P){n.__proto__=P}||function(n,P){for(var w in P)Object.prototype.hasOwnProperty.call(P,w)&&(n[w]=P[w])})(E,T)},function(E,T){if("function"!=typeof T&&null!==T)throw new TypeError("Class extends value "+String(T)+" is not a constructor or null");function n(){this.constructor=E}g(E,T),E.prototype=null===T?Object.create(T):(n.prototype=T.prototype,new n)});Object.defineProperty(I,"__esModule",{value:!0}),I.AsapAction=void 0;var e=p(34723),l=p(97766),D=function(g){function E(T,n){var P=g.call(this,T,n)||this;return P.scheduler=T,P.work=n,P}return o(E,g),E.prototype.requestAsyncId=function(T,n,P){return void 0===P&&(P=0),null!==P&&P>0?g.prototype.requestAsyncId.call(this,T,n,P):(T.actions.push(this),T._scheduled||(T._scheduled=l.immediateProvider.setImmediate(T.flush.bind(T,void 0))))},E.prototype.recycleAsyncId=function(T,n,P){var w;if(void 0===P&&(P=0),null!=P?P>0:this.delay>0)return g.prototype.recycleAsyncId.call(this,T,n,P);var B=T.actions;null!=n&&(null===(w=B[B.length-1])||void 0===w?void 0:w.id)!==n&&(l.immediateProvider.clearImmediate(n),T._scheduled===n&&(T._scheduled=void 0))},E}(e.AsyncAction);I.AsapAction=D},73706:function(qe,I,p){"use strict";var D,o=this&&this.__extends||(D=function(g,E){return(D=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(T,n){T.__proto__=n}||function(T,n){for(var P in n)Object.prototype.hasOwnProperty.call(n,P)&&(T[P]=n[P])})(g,E)},function(g,E){if("function"!=typeof E&&null!==E)throw new TypeError("Class extends value "+String(E)+" is not a constructor or null");function T(){this.constructor=g}D(g,E),g.prototype=null===E?Object.create(E):(T.prototype=E.prototype,new T)});Object.defineProperty(I,"__esModule",{value:!0}),I.AsapScheduler=void 0;var l=function(D){function g(){return null!==D&&D.apply(this,arguments)||this}return o(g,D),g.prototype.flush=function(E){this._active=!0;var T=this._scheduled;this._scheduled=void 0;var P,n=this.actions;E=E||n.shift();do{if(P=E.execute(E.state,E.delay))break}while((E=n[0])&&E.id===T&&n.shift());if(this._active=!1,P){for(;(E=n[0])&&E.id===T&&n.shift();)E.unsubscribe();throw P}},g}(p(56216).AsyncScheduler);I.AsapScheduler=l},34723:function(qe,I,p){"use strict";var E,o=this&&this.__extends||(E=function(T,n){return(E=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(P,w){P.__proto__=w}||function(P,w){for(var B in w)Object.prototype.hasOwnProperty.call(w,B)&&(P[B]=w[B])})(T,n)},function(T,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function P(){this.constructor=T}E(T,n),T.prototype=null===n?Object.create(n):(P.prototype=n.prototype,new P)});Object.defineProperty(I,"__esModule",{value:!0}),I.AsyncAction=void 0;var e=p(91394),l=p(42444),D=p(55137),g=function(E){function T(n,P){var w=E.call(this,n,P)||this;return w.scheduler=n,w.work=P,w.pending=!1,w}return o(T,E),T.prototype.schedule=function(n,P){var w;if(void 0===P&&(P=0),this.closed)return this;this.state=n;var B=this.id,Y=this.scheduler;return null!=B&&(this.id=this.recycleAsyncId(Y,B,P)),this.pending=!0,this.delay=P,this.id=null!==(w=this.id)&&void 0!==w?w:this.requestAsyncId(Y,this.id,P),this},T.prototype.requestAsyncId=function(n,P,w){return void 0===w&&(w=0),l.intervalProvider.setInterval(n.flush.bind(n,this),w)},T.prototype.recycleAsyncId=function(n,P,w){if(void 0===w&&(w=0),null!=w&&this.delay===w&&!1===this.pending)return P;null!=P&&l.intervalProvider.clearInterval(P)},T.prototype.execute=function(n,P){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var w=this._execute(n,P);if(w)return w;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},T.prototype._execute=function(n,P){var B,w=!1;try{this.work(n)}catch(Y){w=!0,B=Y||new Error("Scheduled action threw falsy error")}if(w)return this.unsubscribe(),B},T.prototype.unsubscribe=function(){if(!this.closed){var P=this.id,w=this.scheduler,B=w.actions;this.work=this.state=this.scheduler=null,this.pending=!1,D.arrRemove(B,this),null!=P&&(this.id=this.recycleAsyncId(w,P,null)),this.delay=null,E.prototype.unsubscribe.call(this)}},T}(e.Action);I.AsyncAction=g},56216:function(qe,I,p){"use strict";var D,o=this&&this.__extends||(D=function(g,E){return(D=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(T,n){T.__proto__=n}||function(T,n){for(var P in n)Object.prototype.hasOwnProperty.call(n,P)&&(T[P]=n[P])})(g,E)},function(g,E){if("function"!=typeof E&&null!==E)throw new TypeError("Class extends value "+String(E)+" is not a constructor or null");function T(){this.constructor=g}D(g,E),g.prototype=null===E?Object.create(E):(T.prototype=E.prototype,new T)});Object.defineProperty(I,"__esModule",{value:!0}),I.AsyncScheduler=void 0;var e=p(72716),l=function(D){function g(E,T){void 0===T&&(T=e.Scheduler.now);var n=D.call(this,E,T)||this;return n.actions=[],n._active=!1,n}return o(g,D),g.prototype.flush=function(E){var T=this.actions;if(this._active)T.push(E);else{var n;this._active=!0;do{if(n=E.execute(E.state,E.delay))break}while(E=T.shift());if(this._active=!1,n){for(;E=T.shift();)E.unsubscribe();throw n}}},g}(e.Scheduler);I.AsyncScheduler=l},34954:function(qe,I,p){"use strict";var D,o=this&&this.__extends||(D=function(g,E){return(D=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(T,n){T.__proto__=n}||function(T,n){for(var P in n)Object.prototype.hasOwnProperty.call(n,P)&&(T[P]=n[P])})(g,E)},function(g,E){if("function"!=typeof E&&null!==E)throw new TypeError("Class extends value "+String(E)+" is not a constructor or null");function T(){this.constructor=g}D(g,E),g.prototype=null===E?Object.create(E):(T.prototype=E.prototype,new T)});Object.defineProperty(I,"__esModule",{value:!0}),I.QueueAction=void 0;var l=function(D){function g(E,T){var n=D.call(this,E,T)||this;return n.scheduler=E,n.work=T,n}return o(g,D),g.prototype.schedule=function(E,T){return void 0===T&&(T=0),T>0?D.prototype.schedule.call(this,E,T):(this.delay=T,this.state=E,this.scheduler.flush(this),this)},g.prototype.execute=function(E,T){return T>0||this.closed?D.prototype.execute.call(this,E,T):this._execute(E,T)},g.prototype.requestAsyncId=function(E,T,n){return void 0===n&&(n=0),null!=n&&n>0||null==n&&this.delay>0?D.prototype.requestAsyncId.call(this,E,T,n):(E.flush(this),0)},g}(p(34723).AsyncAction);I.QueueAction=l},10345:function(qe,I,p){"use strict";var D,o=this&&this.__extends||(D=function(g,E){return(D=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(T,n){T.__proto__=n}||function(T,n){for(var P in n)Object.prototype.hasOwnProperty.call(n,P)&&(T[P]=n[P])})(g,E)},function(g,E){if("function"!=typeof E&&null!==E)throw new TypeError("Class extends value "+String(E)+" is not a constructor or null");function T(){this.constructor=g}D(g,E),g.prototype=null===E?Object.create(E):(T.prototype=E.prototype,new T)});Object.defineProperty(I,"__esModule",{value:!0}),I.QueueScheduler=void 0;var l=function(D){function g(){return null!==D&&D.apply(this,arguments)||this}return o(g,D),g}(p(56216).AsyncScheduler);I.QueueScheduler=l},12018:function(qe,I,p){"use strict";var T,o=this&&this.__extends||(T=function(n,P){return(T=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(w,B){w.__proto__=B}||function(w,B){for(var Y in B)Object.prototype.hasOwnProperty.call(B,Y)&&(w[Y]=B[Y])})(n,P)},function(n,P){if("function"!=typeof P&&null!==P)throw new TypeError("Class extends value "+String(P)+" is not a constructor or null");function w(){this.constructor=n}T(n,P),n.prototype=null===P?Object.create(P):(w.prototype=P.prototype,new w)});Object.defineProperty(I,"__esModule",{value:!0}),I.VirtualAction=I.VirtualTimeScheduler=void 0;var e=p(34723),l=p(76448),g=function(T){function n(P,w){void 0===P&&(P=E),void 0===w&&(w=1/0);var B=T.call(this,P,function(){return B.frame})||this;return B.maxFrames=w,B.frame=0,B.index=-1,B}return o(n,T),n.prototype.flush=function(){for(var Y,V,w=this.actions,B=this.maxFrames;(V=w[0])&&V.delay<=B&&(w.shift(),this.frame=V.delay,!(Y=V.execute(V.state,V.delay))););if(Y){for(;V=w.shift();)V.unsubscribe();throw Y}},n.frameTimeFactor=10,n}(p(56216).AsyncScheduler);I.VirtualTimeScheduler=g;var E=function(T){function n(P,w,B){void 0===B&&(B=P.index+=1);var Y=T.call(this,P,w)||this;return Y.scheduler=P,Y.work=w,Y.index=B,Y.active=!0,Y.index=P.index=B,Y}return o(n,T),n.prototype.schedule=function(P,w){if(void 0===w&&(w=0),Number.isFinite(w)){if(!this.id)return T.prototype.schedule.call(this,P,w);this.active=!1;var B=new n(this.scheduler,this.work);return this.add(B),B.schedule(P,w)}return l.Subscription.EMPTY},n.prototype.requestAsyncId=function(P,w,B){void 0===B&&(B=0),this.delay=P.frame+B;var Y=P.actions;return Y.push(this),Y.sort(n.sortActions),1},n.prototype.recycleAsyncId=function(P,w,B){void 0===B&&(B=0)},n.prototype._execute=function(P,w){if(!0===this.active)return T.prototype._execute.call(this,P,w)},n.sortActions=function(P,w){return P.delay===w.delay?P.index===w.index?0:P.index>w.index?1:-1:P.delay>w.delay?1:-1},n}(e.AsyncAction);I.VirtualAction=E},91906:(qe,I,p)=>{"use strict";Object.defineProperty(I,"__esModule",{value:!0}),I.animationFrame=I.animationFrameScheduler=void 0;var o=p(90275),e=p(13625);I.animationFrameScheduler=new e.AnimationFrameScheduler(o.AnimationFrameAction),I.animationFrame=I.animationFrameScheduler},86343:function(qe,I,p){"use strict";var o=this&&this.__read||function(D,g){var E="function"==typeof Symbol&&D[Symbol.iterator];if(!E)return D;var n,w,T=E.call(D),P=[];try{for(;(void 0===g||g-- >0)&&!(n=T.next()).done;)P.push(n.value)}catch(B){w={error:B}}finally{try{n&&!n.done&&(E=T.return)&&E.call(T)}finally{if(w)throw w.error}}return P},e=this&&this.__spreadArray||function(D,g){for(var E=0,T=g.length,n=D.length;E<T;E++,n++)D[n]=g[E];return D};Object.defineProperty(I,"__esModule",{value:!0}),I.animationFrameProvider=void 0;var l=p(76448);I.animationFrameProvider={schedule:function(D){var g=requestAnimationFrame,E=cancelAnimationFrame,T=I.animationFrameProvider.delegate;T&&(g=T.requestAnimationFrame,E=T.cancelAnimationFrame);var n=g(function(P){E=void 0,D(P)});return new l.Subscription(function(){return E?.(n)})},requestAnimationFrame:function(){for(var D=[],g=0;g<arguments.length;g++)D[g]=arguments[g];return(I.animationFrameProvider.delegate?.requestAnimationFrame||requestAnimationFrame).apply(void 0,e([],o(D)))},cancelAnimationFrame:function(){for(var D=[],g=0;g<arguments.length;g++)D[g]=arguments[g];return(I.animationFrameProvider.delegate?.cancelAnimationFrame||cancelAnimationFrame).apply(void 0,e([],o(D)))},delegate:void 0}},71212:(qe,I,p)=>{"use strict";Object.defineProperty(I,"__esModule",{value:!0}),I.asap=I.asapScheduler=void 0;var o=p(57046),e=p(73706);I.asapScheduler=new e.AsapScheduler(o.AsapAction),I.asap=I.asapScheduler},64006:(qe,I,p)=>{"use strict";Object.defineProperty(I,"__esModule",{value:!0}),I.async=I.asyncScheduler=void 0;var o=p(34723),e=p(56216);I.asyncScheduler=new e.AsyncScheduler(o.AsyncAction),I.async=I.asyncScheduler},68354:(qe,I)=>{"use strict";Object.defineProperty(I,"__esModule",{value:!0}),I.dateTimestampProvider=void 0,I.dateTimestampProvider={now:function(){return(I.dateTimestampProvider.delegate||Date).now()},delegate:void 0}},97766:function(qe,I,p){"use strict";var o=this&&this.__read||function(E,T){var n="function"==typeof Symbol&&E[Symbol.iterator];if(!n)return E;var w,Y,P=n.call(E),B=[];try{for(;(void 0===T||T-- >0)&&!(w=P.next()).done;)B.push(w.value)}catch(V){Y={error:V}}finally{try{w&&!w.done&&(n=P.return)&&n.call(P)}finally{if(Y)throw Y.error}}return B},e=this&&this.__spreadArray||function(E,T){for(var n=0,P=T.length,w=E.length;n<P;n++,w++)E[w]=T[n];return E};Object.defineProperty(I,"__esModule",{value:!0}),I.immediateProvider=void 0;var l=p(40349),D=l.Immediate.setImmediate,g=l.Immediate.clearImmediate;I.immediateProvider={setImmediate:function(){for(var E=[],T=0;T<arguments.length;T++)E[T]=arguments[T];return(I.immediateProvider.delegate?.setImmediate||D).apply(void 0,e([],o(E)))},clearImmediate:function(E){return(I.immediateProvider.delegate?.clearImmediate||g)(E)},delegate:void 0}},42444:function(qe,I){"use strict";var p=this&&this.__read||function(e,l){var D="function"==typeof Symbol&&e[Symbol.iterator];if(!D)return e;var E,n,g=D.call(e),T=[];try{for(;(void 0===l||l-- >0)&&!(E=g.next()).done;)T.push(E.value)}catch(P){n={error:P}}finally{try{E&&!E.done&&(D=g.return)&&D.call(g)}finally{if(n)throw n.error}}return T},o=this&&this.__spreadArray||function(e,l){for(var D=0,g=l.length,E=e.length;D<g;D++,E++)e[E]=l[D];return e};Object.defineProperty(I,"__esModule",{value:!0}),I.intervalProvider=void 0,I.intervalProvider={setInterval:function(e,l){for(var D=[],g=2;g<arguments.length;g++)D[g-2]=arguments[g];var E=I.intervalProvider.delegate;return E?.setInterval?E.setInterval.apply(E,o([e,l],p(D))):setInterval.apply(void 0,o([e,l],p(D)))},clearInterval:function(e){return(I.intervalProvider.delegate?.clearInterval||clearInterval)(e)},delegate:void 0}},61038:(qe,I)=>{"use strict";Object.defineProperty(I,"__esModule",{value:!0}),I.performanceTimestampProvider=void 0,I.performanceTimestampProvider={now:function(){return(I.performanceTimestampProvider.delegate||performance).now()},delegate:void 0}},65668:(qe,I,p)=>{"use strict";Object.defineProperty(I,"__esModule",{value:!0}),I.queue=I.queueScheduler=void 0;var o=p(34954),e=p(10345);I.queueScheduler=new e.QueueScheduler(o.QueueAction),I.queue=I.queueScheduler},33914:function(qe,I){"use strict";var p=this&&this.__read||function(e,l){var D="function"==typeof Symbol&&e[Symbol.iterator];if(!D)return e;var E,n,g=D.call(e),T=[];try{for(;(void 0===l||l-- >0)&&!(E=g.next()).done;)T.push(E.value)}catch(P){n={error:P}}finally{try{E&&!E.done&&(D=g.return)&&D.call(g)}finally{if(n)throw n.error}}return T},o=this&&this.__spreadArray||function(e,l){for(var D=0,g=l.length,E=e.length;D<g;D++,E++)e[E]=l[D];return e};Object.defineProperty(I,"__esModule",{value:!0}),I.timeoutProvider=void 0,I.timeoutProvider={setTimeout:function(e,l){for(var D=[],g=2;g<arguments.length;g++)D[g-2]=arguments[g];var E=I.timeoutProvider.delegate;return E?.setTimeout?E.setTimeout.apply(E,o([e,l],p(D))):setTimeout.apply(void 0,o([e,l],p(D)))},clearTimeout:function(e){return(I.timeoutProvider.delegate?.clearTimeout||clearTimeout)(e)},delegate:void 0}},34260:(qe,I)=>{"use strict";function p(){return"function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator"}Object.defineProperty(I,"__esModule",{value:!0}),I.iterator=I.getSymbolIterator=void 0,I.getSymbolIterator=p,I.iterator=p()},91689:(qe,I)=>{"use strict";Object.defineProperty(I,"__esModule",{value:!0}),I.observable=void 0,I.observable="function"==typeof Symbol&&Symbol.observable||"@@observable"},85256:(qe,I)=>{"use strict";Object.defineProperty(I,"__esModule",{value:!0})},4769:(qe,I,p)=>{"use strict";Object.defineProperty(I,"__esModule",{value:!0}),I.ArgumentOutOfRangeError=void 0;var o=p(49703);I.ArgumentOutOfRangeError=o.createErrorClass(function(e){return function(){e(this),this.name="ArgumentOutOfRangeError",this.message="argument out of range"}})},48915:(qe,I,p)=>{"use strict";Object.defineProperty(I,"__esModule",{value:!0}),I.EmptyError=void 0;var o=p(49703);I.EmptyError=o.createErrorClass(function(e){return function(){e(this),this.name="EmptyError",this.message="no elements in sequence"}})},40349:(qe,I)=>{"use strict";Object.defineProperty(I,"__esModule",{value:!0}),I.TestTools=I.Immediate=void 0;var o,p=1,e={};function l(D){return D in e&&(delete e[D],!0)}I.Immediate={setImmediate:function(D){var g=p++;return e[g]=!0,o||(o=Promise.resolve()),o.then(function(){return l(g)&&D()}),g},clearImmediate:function(D){l(D)}},I.TestTools={pending:function(){return Object.keys(e).length}}},85477:(qe,I,p)=>{"use strict";Object.defineProperty(I,"__esModule",{value:!0}),I.NotFoundError=void 0;var o=p(49703);I.NotFoundError=o.createErrorClass(function(e){return function(D){e(this),this.name="NotFoundError",this.message=D}})},23965:(qe,I,p)=>{"use strict";Object.defineProperty(I,"__esModule",{value:!0}),I.ObjectUnsubscribedError=void 0;var o=p(49703);I.ObjectUnsubscribedError=o.createErrorClass(function(e){return function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}})},61551:(qe,I,p)=>{"use strict";Object.defineProperty(I,"__esModule",{value:!0}),I.SequenceError=void 0;var o=p(49703);I.SequenceError=o.createErrorClass(function(e){return function(D){e(this),this.name="SequenceError",this.message=D}})},24970:(qe,I,p)=>{"use strict";Object.defineProperty(I,"__esModule",{value:!0}),I.UnsubscriptionError=void 0;var o=p(49703);I.UnsubscriptionError=o.createErrorClass(function(e){return function(D){e(this),this.message=D?D.length+" errors occurred during unsubscription:\n"+D.map(function(g,E){return E+1+") "+g.toString()}).join("\n  "):"",this.name="UnsubscriptionError",this.errors=D}})},31642:(qe,I,p)=>{"use strict";Object.defineProperty(I,"__esModule",{value:!0}),I.popNumber=I.popScheduler=I.popResultSelector=void 0;var o=p(37104),e=p(1875);function l(T){return T[T.length-1]}I.popResultSelector=function D(T){return o.isFunction(l(T))?T.pop():void 0},I.popScheduler=function g(T){return e.isScheduler(l(T))?T.pop():void 0},I.popNumber=function E(T,n){return"number"==typeof l(T)?T.pop():n}},59923:(qe,I)=>{"use strict";Object.defineProperty(I,"__esModule",{value:!0}),I.argsArgArrayOrObject=void 0;var p=Array.isArray,o=Object.getPrototypeOf,e=Object.prototype,l=Object.keys;I.argsArgArrayOrObject=function D(E){if(1===E.length){var T=E[0];if(p(T))return{args:T,keys:null};if(function g(E){return E&&"object"==typeof E&&o(E)===e}(T)){var n=l(T);return{args:n.map(function(P){return T[P]}),keys:n}}}return{args:E,keys:null}}},73531:(qe,I)=>{"use strict";Object.defineProperty(I,"__esModule",{value:!0}),I.argsOrArgArray=void 0;var p=Array.isArray;I.argsOrArgArray=function o(e){return 1===e.length&&p(e[0])?e[0]:e}},55137:(qe,I)=>{"use strict";Object.defineProperty(I,"__esModule",{value:!0}),I.arrRemove=void 0,I.arrRemove=function p(o,e){if(o){var l=o.indexOf(e);0<=l&&o.splice(l,1)}}},49703:(qe,I)=>{"use strict";Object.defineProperty(I,"__esModule",{value:!0}),I.createErrorClass=void 0,I.createErrorClass=function p(o){var l=o(function(D){Error.call(D),D.stack=(new Error).stack});return l.prototype=Object.create(Error.prototype),l.prototype.constructor=l,l}},57598:(qe,I)=>{"use strict";Object.defineProperty(I,"__esModule",{value:!0}),I.createObject=void 0,I.createObject=function p(o,e){return o.reduce(function(l,D,g){return l[D]=e[g],l},{})}},45808:(qe,I,p)=>{"use strict";Object.defineProperty(I,"__esModule",{value:!0}),I.captureError=I.errorContext=void 0;var o=p(73570),e=null;I.errorContext=function l(g){if(o.config.useDeprecatedSynchronousErrorHandling){var E=!e;if(E&&(e={errorThrown:!1,error:null}),g(),E){var T=e,n=T.errorThrown,P=T.error;if(e=null,n)throw P}}else g()},I.captureError=function D(g){o.config.useDeprecatedSynchronousErrorHandling&&e&&(e.errorThrown=!0,e.error=g)}},17238:(qe,I)=>{"use strict";Object.defineProperty(I,"__esModule",{value:!0}),I.executeSchedule=void 0,I.executeSchedule=function p(o,e,l,D,g){void 0===D&&(D=0),void 0===g&&(g=!1);var E=e.schedule(function(){l(),g?o.add(this.schedule(null,D)):this.unsubscribe()},D);if(o.add(E),!g)return E}},77884:(qe,I)=>{"use strict";Object.defineProperty(I,"__esModule",{value:!0}),I.identity=void 0,I.identity=function p(o){return o}},70697:(qe,I)=>{"use strict";Object.defineProperty(I,"__esModule",{value:!0}),I.isArrayLike=void 0,I.isArrayLike=function(p){return p&&"number"==typeof p.length&&"function"!=typeof p}},26175:(qe,I,p)=>{"use strict";Object.defineProperty(I,"__esModule",{value:!0}),I.isAsyncIterable=void 0;var o=p(37104);I.isAsyncIterable=function e(l){return Symbol.asyncIterator&&o.isFunction(l?.[Symbol.asyncIterator])}},67323:(qe,I)=>{"use strict";Object.defineProperty(I,"__esModule",{value:!0}),I.isValidDate=void 0,I.isValidDate=function p(o){return o instanceof Date&&!isNaN(o)}},37104:(qe,I)=>{"use strict";Object.defineProperty(I,"__esModule",{value:!0}),I.isFunction=void 0,I.isFunction=function p(o){return"function"==typeof o}},17454:(qe,I,p)=>{"use strict";Object.defineProperty(I,"__esModule",{value:!0}),I.isInteropObservable=void 0;var o=p(91689),e=p(37104);I.isInteropObservable=function l(D){return e.isFunction(D[o.observable])}},5431:(qe,I,p)=>{"use strict";Object.defineProperty(I,"__esModule",{value:!0}),I.isIterable=void 0;var o=p(34260),e=p(37104);I.isIterable=function l(D){return e.isFunction(D?.[o.iterator])}},14341:(qe,I,p)=>{"use strict";Object.defineProperty(I,"__esModule",{value:!0}),I.isObservable=void 0;var o=p(55821),e=p(37104);I.isObservable=function l(D){return!!D&&(D instanceof o.Observable||e.isFunction(D.lift)&&e.isFunction(D.subscribe))}},25050:(qe,I,p)=>{"use strict";Object.defineProperty(I,"__esModule",{value:!0}),I.isPromise=void 0;var o=p(37104);I.isPromise=function e(l){return o.isFunction(l?.then)}},87128:function(qe,I,p){"use strict";var o=this&&this.__generator||function(T,n){var w,B,Y,V,P={label:0,sent:function(){if(1&Y[0])throw Y[1];return Y[1]},trys:[],ops:[]};return V={next:ue(0),throw:ue(1),return:ue(2)},"function"==typeof Symbol&&(V[Symbol.iterator]=function(){return this}),V;function ue(ae){return function(X){return function he(ae){if(w)throw new TypeError("Generator is already executing.");for(;P;)try{if(w=1,B&&(Y=2&ae[0]?B.return:ae[0]?B.throw||((Y=B.return)&&Y.call(B),0):B.next)&&!(Y=Y.call(B,ae[1])).done)return Y;switch(B=0,Y&&(ae=[2&ae[0],Y.value]),ae[0]){case 0:case 1:Y=ae;break;case 4:return P.label++,{value:ae[1],done:!1};case 5:P.label++,B=ae[1],ae=[0];continue;case 7:ae=P.ops.pop(),P.trys.pop();continue;default:if(!(Y=(Y=P.trys).length>0&&Y[Y.length-1])&&(6===ae[0]||2===ae[0])){P=0;continue}if(3===ae[0]&&(!Y||ae[1]>Y[0]&&ae[1]<Y[3])){P.label=ae[1];break}if(6===ae[0]&&P.label<Y[1]){P.label=Y[1],Y=ae;break}if(Y&&P.label<Y[2]){P.label=Y[2],P.ops.push(ae);break}Y[2]&&P.ops.pop(),P.trys.pop();continue}ae=n.call(T,P)}catch(X){ae=[6,X],B=0}finally{w=Y=0}if(5&ae[0])throw ae[1];return{value:ae[0]?ae[1]:void 0,done:!0}}([ae,X])}}},e=this&&this.__await||function(T){return this instanceof e?(this.v=T,this):new e(T)},l=this&&this.__asyncGenerator||function(T,n,P){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var B,w=P.apply(T,n||[]),Y=[];return B={},V("next"),V("throw"),V("return"),B[Symbol.asyncIterator]=function(){return this},B;function V(ye){w[ye]&&(B[ye]=function(ge){return new Promise(function(ne,pe){Y.push([ye,ge,ne,pe])>1||ue(ye,ge)})})}function ue(ye,ge){try{!function he(ye){ye.value instanceof e?Promise.resolve(ye.value.v).then(ae,X):ve(Y[0][2],ye)}(w[ye](ge))}catch(ne){ve(Y[0][3],ne)}}function ae(ye){ue("next",ye)}function X(ye){ue("throw",ye)}function ve(ye,ge){ye(ge),Y.shift(),Y.length&&ue(Y[0][0],Y[0][1])}};Object.defineProperty(I,"__esModule",{value:!0}),I.isReadableStreamLike=I.readableStreamLikeToAsyncGenerator=void 0;var D=p(37104);I.readableStreamLikeToAsyncGenerator=function g(T){return l(this,arguments,function(){var P,w,B;return o(this,function(V){switch(V.label){case 0:P=T.getReader(),V.label=1;case 1:V.trys.push([1,,9,10]),V.label=2;case 2:return[4,e(P.read())];case 3:return w=V.sent(),B=w.value,w.done?[4,e(void 0)]:[3,5];case 4:return[2,V.sent()];case 5:return[4,e(B)];case 6:return[4,V.sent()];case 7:return V.sent(),[3,2];case 8:return[3,10];case 9:return P.releaseLock(),[7];case 10:return[2]}})})},I.isReadableStreamLike=function E(T){return D.isFunction(T?.getReader)}},1875:(qe,I,p)=>{"use strict";Object.defineProperty(I,"__esModule",{value:!0}),I.isScheduler=void 0;var o=p(37104);I.isScheduler=function e(l){return l&&o.isFunction(l.schedule)}},89216:(qe,I,p)=>{"use strict";Object.defineProperty(I,"__esModule",{value:!0}),I.operate=I.hasLift=void 0;var o=p(37104);function e(D){return o.isFunction(D?.lift)}I.hasLift=e,I.operate=function l(D){return function(g){if(e(g))return g.lift(function(E){try{return D(E,this)}catch(T){this.error(T)}});throw new TypeError("Unable to lift unknown Observable type")}}},5280:function(qe,I,p){"use strict";var o=this&&this.__read||function(T,n){var P="function"==typeof Symbol&&T[Symbol.iterator];if(!P)return T;var B,V,w=P.call(T),Y=[];try{for(;(void 0===n||n-- >0)&&!(B=w.next()).done;)Y.push(B.value)}catch(ue){V={error:ue}}finally{try{B&&!B.done&&(P=w.return)&&P.call(w)}finally{if(V)throw V.error}}return Y},e=this&&this.__spreadArray||function(T,n){for(var P=0,w=n.length,B=T.length;P<w;P++,B++)T[B]=n[P];return T};Object.defineProperty(I,"__esModule",{value:!0}),I.mapOneOrManyArgs=void 0;var l=p(70752),D=Array.isArray;I.mapOneOrManyArgs=function E(T){return l.map(function(n){return function g(T,n){return D(n)?T.apply(void 0,e([],o(n))):T(n)}(T,n)})}},31:(qe,I)=>{"use strict";Object.defineProperty(I,"__esModule",{value:!0}),I.noop=void 0,I.noop=function p(){}},40963:(qe,I)=>{"use strict";Object.defineProperty(I,"__esModule",{value:!0}),I.not=void 0,I.not=function p(o,e){return function(l,D){return!o.call(e,l,D)}}},81471:(qe,I,p)=>{"use strict";Object.defineProperty(I,"__esModule",{value:!0}),I.pipeFromArray=I.pipe=void 0;var o=p(77884);function l(D){return 0===D.length?o.identity:1===D.length?D[0]:function(E){return D.reduce(function(T,n){return n(T)},E)}}I.pipe=function e(){for(var D=[],g=0;g<arguments.length;g++)D[g]=arguments[g];return l(D)},I.pipeFromArray=l},74709:(qe,I,p)=>{"use strict";Object.defineProperty(I,"__esModule",{value:!0}),I.reportUnhandledError=void 0;var o=p(73570),e=p(33914);I.reportUnhandledError=function l(D){e.timeoutProvider.setTimeout(function(){var g=o.config.onUnhandledError;if(!g)throw D;g(D)})}},36870:(qe,I)=>{"use strict";Object.defineProperty(I,"__esModule",{value:!0}),I.createInvalidObservableTypeError=void 0,I.createInvalidObservableTypeError=function p(o){return new TypeError("You provided "+(null!==o&&"object"==typeof o?"an invalid object":"'"+o+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}},61135:(qe,I,p)=>{"use strict";p.d(I,{X:()=>e});var o=p(77579);class e extends o.x{constructor(D){super(),this._value=D}get value(){return this.getValue()}_subscribe(D){const g=super._subscribe(D);return!g.closed&&D.next(this._value),g}getValue(){const{hasError:D,thrownError:g,_value:E}=this;if(D)throw g;return this._throwIfClosed(),E}next(D){super.next(this._value=D)}}},69751:(qe,I,p)=>{"use strict";p.d(I,{y:()=>n});var o=p(70930),e=p(50727),l=p(48822),D=p(89635),g=p(42416),E=p(30576),T=p(72806);class n{constructor(V){V&&(this._subscribe=V)}lift(V){const ue=new n;return ue.source=this,ue.operator=V,ue}subscribe(V,ue,he){const ae=function B(Y){return Y&&Y instanceof o.Lv||function w(Y){return Y&&(0,E.m)(Y.next)&&(0,E.m)(Y.error)&&(0,E.m)(Y.complete)}(Y)&&(0,e.Nn)(Y)}(V)?V:new o.Hp(V,ue,he);return(0,T.x)(()=>{const{operator:X,source:ve}=this;ae.add(X?X.call(ae,ve):ve?this._subscribe(ae):this._trySubscribe(ae))}),ae}_trySubscribe(V){try{return this._subscribe(V)}catch(ue){V.error(ue)}}forEach(V,ue){return new(ue=P(ue))((he,ae)=>{const X=new o.Hp({next:ve=>{try{V(ve)}catch(ye){ae(ye),X.unsubscribe()}},error:ae,complete:he});this.subscribe(X)})}_subscribe(V){var ue;return null===(ue=this.source)||void 0===ue?void 0:ue.subscribe(V)}[l.L](){return this}pipe(...V){return(0,D.U)(V)(this)}toPromise(V){return new(V=P(V))((ue,he)=>{let ae;this.subscribe(X=>ae=X,X=>he(X),()=>ue(ae))})}}function P(Y){var V;return null!==(V=Y??g.v.Promise)&&void 0!==V?V:Promise}n.create=Y=>new n(Y)},4707:(qe,I,p)=>{"use strict";p.d(I,{t:()=>l});var o=p(77579),e=p(26063);class l extends o.x{constructor(g=1/0,E=1/0,T=e.l){super(),this._bufferSize=g,this._windowTime=E,this._timestampProvider=T,this._buffer=[],this._infiniteTimeWindow=!0,this._infiniteTimeWindow=E===1/0,this._bufferSize=Math.max(1,g),this._windowTime=Math.max(1,E)}next(g){const{isStopped:E,_buffer:T,_infiniteTimeWindow:n,_timestampProvider:P,_windowTime:w}=this;E||(T.push(g),!n&&T.push(P.now()+w)),this._trimBuffer(),super.next(g)}_subscribe(g){this._throwIfClosed(),this._trimBuffer();const E=this._innerSubscribe(g),{_infiniteTimeWindow:T,_buffer:n}=this,P=n.slice();for(let w=0;w<P.length&&!g.closed;w+=T?1:2)g.next(P[w]);return this._checkFinalizedStatuses(g),E}_trimBuffer(){const{_bufferSize:g,_timestampProvider:E,_buffer:T,_infiniteTimeWindow:n}=this,P=(n?1:2)*g;if(g<1/0&&P<T.length&&T.splice(0,T.length-P),!n){const w=E.now();let B=0;for(let Y=1;Y<T.length&&T[Y]<=w;Y+=2)B=Y;B&&T.splice(0,B+1)}}}},77579:(qe,I,p)=>{"use strict";p.d(I,{x:()=>T});var o=p(69751),e=p(50727);const D=(0,p(83888).d)(P=>function(){P(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"});var g=p(38737),E=p(72806);class T extends o.y{constructor(){super(),this.closed=!1,this.currentObservers=null,this.observers=[],this.isStopped=!1,this.hasError=!1,this.thrownError=null}lift(w){const B=new n(this,this);return B.operator=w,B}_throwIfClosed(){if(this.closed)throw new D}next(w){(0,E.x)(()=>{if(this._throwIfClosed(),!this.isStopped){this.currentObservers||(this.currentObservers=Array.from(this.observers));for(const B of this.currentObservers)B.next(w)}})}error(w){(0,E.x)(()=>{if(this._throwIfClosed(),!this.isStopped){this.hasError=this.isStopped=!0,this.thrownError=w;const{observers:B}=this;for(;B.length;)B.shift().error(w)}})}complete(){(0,E.x)(()=>{if(this._throwIfClosed(),!this.isStopped){this.isStopped=!0;const{observers:w}=this;for(;w.length;)w.shift().complete()}})}unsubscribe(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null}get observed(){var w;return(null===(w=this.observers)||void 0===w?void 0:w.length)>0}_trySubscribe(w){return this._throwIfClosed(),super._trySubscribe(w)}_subscribe(w){return this._throwIfClosed(),this._checkFinalizedStatuses(w),this._innerSubscribe(w)}_innerSubscribe(w){const{hasError:B,isStopped:Y,observers:V}=this;return B||Y?e.Lc:(this.currentObservers=null,V.push(w),new e.w0(()=>{this.currentObservers=null,(0,g.P)(V,w)}))}_checkFinalizedStatuses(w){const{hasError:B,thrownError:Y,isStopped:V}=this;B?w.error(Y):V&&w.complete()}asObservable(){const w=new o.y;return w.source=this,w}}T.create=(P,w)=>new n(P,w);class n extends T{constructor(w,B){super(),this.destination=w,this.source=B}next(w){var B,Y;null===(Y=null===(B=this.destination)||void 0===B?void 0:B.next)||void 0===Y||Y.call(B,w)}error(w){var B,Y;null===(Y=null===(B=this.destination)||void 0===B?void 0:B.error)||void 0===Y||Y.call(B,w)}complete(){var w,B;null===(B=null===(w=this.destination)||void 0===w?void 0:w.complete)||void 0===B||B.call(w)}_subscribe(w){var B,Y;return null!==(Y=null===(B=this.source)||void 0===B?void 0:B.subscribe(w))&&void 0!==Y?Y:e.Lc}}},70930:(qe,I,p)=>{"use strict";p.d(I,{Hp:()=>ae,Lv:()=>Y});var o=p(30576),e=p(50727),l=p(42416),D=p(87849),g=p(25032);const E=P("C",void 0,void 0);function P(ne,pe,Pe){return{kind:ne,value:pe,error:Pe}}var w=p(43410),B=p(72806);class Y extends e.w0{constructor(pe){super(),this.isStopped=!1,pe?(this.destination=pe,(0,e.Nn)(pe)&&pe.add(this)):this.destination=ge}static create(pe,Pe,xe){return new ae(pe,Pe,xe)}next(pe){this.isStopped?ye(function n(ne){return P("N",ne,void 0)}(pe),this):this._next(pe)}error(pe){this.isStopped?ye(function T(ne){return P("E",void 0,ne)}(pe),this):(this.isStopped=!0,this._error(pe))}complete(){this.isStopped?ye(E,this):(this.isStopped=!0,this._complete())}unsubscribe(){this.closed||(this.isStopped=!0,super.unsubscribe(),this.destination=null)}_next(pe){this.destination.next(pe)}_error(pe){try{this.destination.error(pe)}finally{this.unsubscribe()}}_complete(){try{this.destination.complete()}finally{this.unsubscribe()}}}const V=Function.prototype.bind;function ue(ne,pe){return V.call(ne,pe)}class he{constructor(pe){this.partialObserver=pe}next(pe){const{partialObserver:Pe}=this;if(Pe.next)try{Pe.next(pe)}catch(xe){X(xe)}}error(pe){const{partialObserver:Pe}=this;if(Pe.error)try{Pe.error(pe)}catch(xe){X(xe)}else X(pe)}complete(){const{partialObserver:pe}=this;if(pe.complete)try{pe.complete()}catch(Pe){X(Pe)}}}class ae extends Y{constructor(pe,Pe,xe){let de;if(super(),(0,o.m)(pe)||!pe)de={next:pe??void 0,error:Pe??void 0,complete:xe??void 0};else{let re;this&&l.v.useDeprecatedNextContext?(re=Object.create(pe),re.unsubscribe=()=>this.unsubscribe(),de={next:pe.next&&ue(pe.next,re),error:pe.error&&ue(pe.error,re),complete:pe.complete&&ue(pe.complete,re)}):de=pe}this.destination=new he(de)}}function X(ne){l.v.useDeprecatedSynchronousErrorHandling?(0,B.O)(ne):(0,D.h)(ne)}function ye(ne,pe){const{onStoppedNotification:Pe}=l.v;Pe&&w.z.setTimeout(()=>Pe(ne,pe))}const ge={closed:!0,next:g.Z,error:function ve(ne){throw ne},complete:g.Z}},50727:(qe,I,p)=>{"use strict";p.d(I,{Lc:()=>E,w0:()=>g,Nn:()=>T});var o=p(30576);const l=(0,p(83888).d)(P=>function(B){P(this),this.message=B?`${B.length} errors occurred during unsubscription:\n${B.map((Y,V)=>`${V+1}) ${Y.toString()}`).join("\n  ")}`:"",this.name="UnsubscriptionError",this.errors=B});var D=p(38737);class g{constructor(w){this.initialTeardown=w,this.closed=!1,this._parentage=null,this._finalizers=null}unsubscribe(){let w;if(!this.closed){this.closed=!0;const{_parentage:B}=this;if(B)if(this._parentage=null,Array.isArray(B))for(const ue of B)ue.remove(this);else B.remove(this);const{initialTeardown:Y}=this;if((0,o.m)(Y))try{Y()}catch(ue){w=ue instanceof l?ue.errors:[ue]}const{_finalizers:V}=this;if(V){this._finalizers=null;for(const ue of V)try{n(ue)}catch(he){w=w??[],he instanceof l?w=[...w,...he.errors]:w.push(he)}}if(w)throw new l(w)}}add(w){var B;if(w&&w!==this)if(this.closed)n(w);else{if(w instanceof g){if(w.closed||w._hasParent(this))return;w._addParent(this)}(this._finalizers=null!==(B=this._finalizers)&&void 0!==B?B:[]).push(w)}}_hasParent(w){const{_parentage:B}=this;return B===w||Array.isArray(B)&&B.includes(w)}_addParent(w){const{_parentage:B}=this;this._parentage=Array.isArray(B)?(B.push(w),B):B?[B,w]:w}_removeParent(w){const{_parentage:B}=this;B===w?this._parentage=null:Array.isArray(B)&&(0,D.P)(B,w)}remove(w){const{_finalizers:B}=this;B&&(0,D.P)(B,w),w instanceof g&&w._removeParent(this)}}g.EMPTY=(()=>{const P=new g;return P.closed=!0,P})();const E=g.EMPTY;function T(P){return P instanceof g||P&&"closed"in P&&(0,o.m)(P.remove)&&(0,o.m)(P.add)&&(0,o.m)(P.unsubscribe)}function n(P){(0,o.m)(P)?P():P.unsubscribe()}},42416:(qe,I,p)=>{"use strict";p.d(I,{v:()=>o});const o={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1}},83905:(qe,I,p)=>{"use strict";p.d(I,{z:()=>l});var o=p(86805),e=p(70930);function l(D,g){const E="object"==typeof g;return new Promise((T,n)=>{const P=new e.Hp({next:w=>{T(w),P.unsubscribe()},error:n,complete:()=>{E?T(g.defaultValue):n(new o.K)}});D.subscribe(P)})}},49808:(qe,I,p)=>{"use strict";p.d(I,{n:()=>e});var o=p(86805);function e(l,D){const g="object"==typeof D;return new Promise((E,T)=>{let P,n=!1;l.subscribe({next:w=>{P=w,n=!0},error:T,complete:()=>{n?E(P):g?E(D.defaultValue):T(new o.K)}})})}},94033:(qe,I,p)=>{"use strict";p.d(I,{c:()=>E});var o=p(69751),e=p(50727),l=p(38343),D=p(25403),g=p(54482);class E extends o.y{constructor(n,P){super(),this.source=n,this.subjectFactory=P,this._subject=null,this._refCount=0,this._connection=null,(0,g.A)(n)&&(this.lift=n.lift)}_subscribe(n){return this.getSubject().subscribe(n)}getSubject(){const n=this._subject;return(!n||n.isStopped)&&(this._subject=this.subjectFactory()),this._subject}_teardown(){this._refCount=0;const{_connection:n}=this;this._subject=this._connection=null,n?.unsubscribe()}connect(){let n=this._connection;if(!n){n=this._connection=new e.w0;const P=this.getSubject();n.add(this.source.subscribe((0,D.x)(P,void 0,()=>{this._teardown(),P.complete()},w=>{this._teardown(),P.error(w)},()=>this._teardown()))),n.closed&&(this._connection=null,n=e.w0.EMPTY)}return n}refCount(){return(0,l.x)()(this)}}},39841:(qe,I,p)=>{"use strict";p.d(I,{a:()=>w});var o=p(69751),e=p(54742),l=p(32076),D=p(44671),g=p(83268),E=p(63269),T=p(31810),n=p(25403),P=p(39672);function w(...V){const ue=(0,E.yG)(V),he=(0,E.jO)(V),{args:ae,keys:X}=(0,e.D)(V);if(0===ae.length)return(0,l.D)([],ue);const ve=new o.y(function B(V,ue,he=D.y){return ae=>{Y(ue,()=>{const{length:X}=V,ve=new Array(X);let ye=X,ge=X;for(let ne=0;ne<X;ne++)Y(ue,()=>{const pe=(0,l.D)(V[ne],ue);let Pe=!1;pe.subscribe((0,n.x)(ae,xe=>{ve[ne]=xe,Pe||(Pe=!0,ge--),ge||ae.next(he(ve.slice()))},()=>{--ye||ae.complete()}))},ae)},ae)}}(ae,ue,X?ye=>(0,T.n)(X,ye):D.y));return he?ve.pipe((0,g.Z)(he)):ve}function Y(V,ue,he){V?(0,P.f)(he,V,ue):ue()}},97272:(qe,I,p)=>{"use strict";p.d(I,{z:()=>g});var o=p(8189);var l=p(63269),D=p(32076);function g(...E){return function e(){return(0,o.J)(1)}()((0,D.D)(E,(0,l.yG)(E)))}},49770:(qe,I,p)=>{"use strict";p.d(I,{P:()=>l});var o=p(69751),e=p(38421);function l(D){return new o.y(g=>{(0,e.Xf)(D()).subscribe(g)})}},60515:(qe,I,p)=>{"use strict";p.d(I,{E:()=>e});const e=new(p(69751).y)(g=>g.complete())},4128:(qe,I,p)=>{"use strict";p.d(I,{D:()=>n});var o=p(69751),e=p(54742),l=p(38421),D=p(63269),g=p(25403),E=p(83268),T=p(31810);function n(...P){const w=(0,D.jO)(P),{args:B,keys:Y}=(0,e.D)(P),V=new o.y(ue=>{const{length:he}=B;if(!he)return void ue.complete();const ae=new Array(he);let X=he,ve=he;for(let ye=0;ye<he;ye++){let ge=!1;(0,l.Xf)(B[ye]).subscribe((0,g.x)(ue,ne=>{ge||(ge=!0,ve--),ae[ye]=ne},()=>X--,void 0,()=>{(!X||!ge)&&(ve||ue.next(Y?(0,T.n)(Y,ae):ae),ue.complete())}))}});return w?V.pipe((0,E.Z)(w)):V}},32076:(qe,I,p)=>{"use strict";p.d(I,{D:()=>xe});var o=p(38421),e=p(39672),l=p(54482),D=p(25403);function g(de,re=0){return(0,l.e)((oe,me)=>{oe.subscribe((0,D.x)(me,be=>(0,e.f)(me,de,()=>me.next(be),re),()=>(0,e.f)(me,de,()=>me.complete(),re),be=>(0,e.f)(me,de,()=>me.error(be),re)))})}function E(de,re=0){return(0,l.e)((oe,me)=>{me.add(de.schedule(()=>oe.subscribe(me),re))})}var P=p(69751);var B=p(2202),Y=p(30576);function ue(de,re){if(!de)throw new Error("Iterable cannot be null");return new P.y(oe=>{(0,e.f)(oe,re,()=>{const me=de[Symbol.asyncIterator]();(0,e.f)(oe,re,()=>{me.next().then(be=>{be.done?oe.complete():oe.next(be.value)})},0,!0)})})}var he=p(93670),ae=p(28239),X=p(81144),ve=p(26495),ye=p(12206),ge=p(44532),ne=p(53260);function Pe(de,re){if(null!=de){if((0,he.c)(de))return function T(de,re){return(0,o.Xf)(de).pipe(E(re),g(re))}(de,re);if((0,X.z)(de))return function w(de,re){return new P.y(oe=>{let me=0;return re.schedule(function(){me===de.length?oe.complete():(oe.next(de[me++]),oe.closed||this.schedule())})})}(de,re);if((0,ae.t)(de))return function n(de,re){return(0,o.Xf)(de).pipe(E(re),g(re))}(de,re);if((0,ye.D)(de))return ue(de,re);if((0,ve.T)(de))return function V(de,re){return new P.y(oe=>{let me;return(0,e.f)(oe,re,()=>{me=de[B.h](),(0,e.f)(oe,re,()=>{let be,le;try{({value:be,done:le}=me.next())}catch(Z){return void oe.error(Z)}le?oe.complete():oe.next(be)},0,!0)}),()=>(0,Y.m)(me?.return)&&me.return()})}(de,re);if((0,ne.L)(de))return function pe(de,re){return ue((0,ne.Q)(de),re)}(de,re)}throw(0,ge.z)(de)}function xe(de,re){return re?Pe(de,re):(0,o.Xf)(de)}},54968:(qe,I,p)=>{"use strict";p.d(I,{R:()=>w});var o=p(38421),e=p(69751),l=p(95577),D=p(81144),g=p(30576),E=p(83268);const T=["addListener","removeListener"],n=["addEventListener","removeEventListener"],P=["on","off"];function w(he,ae,X,ve){if((0,g.m)(X)&&(ve=X,X=void 0),ve)return w(he,ae,X).pipe((0,E.Z)(ve));const[ye,ge]=function ue(he){return(0,g.m)(he.addEventListener)&&(0,g.m)(he.removeEventListener)}(he)?n.map(ne=>pe=>he[ne](ae,pe,X)):function Y(he){return(0,g.m)(he.addListener)&&(0,g.m)(he.removeListener)}(he)?T.map(B(he,ae)):function V(he){return(0,g.m)(he.on)&&(0,g.m)(he.off)}(he)?P.map(B(he,ae)):[];if(!ye&&(0,D.z)(he))return(0,l.z)(ne=>w(ne,ae,X))((0,o.Xf)(he));if(!ye)throw new TypeError("Invalid event target");return new e.y(ne=>{const pe=(...Pe)=>ne.next(1<Pe.length?Pe:Pe[0]);return ye(pe),()=>ge(pe)})}function B(he,ae){return X=>ve=>he[X](ae,ve)}},48382:(qe,I,p)=>{"use strict";p.d(I,{s:()=>e});var o=p(49770);function e(l,D,g){return(0,o.P)(()=>l()?D:g)}},38421:(qe,I,p)=>{"use strict";p.d(I,{Xf:()=>V,p4:()=>ae});var o=p(70655),e=p(81144),l=p(28239),D=p(69751),g=p(93670),E=p(12206),T=p(44532),n=p(26495),P=p(53260),w=p(30576),B=p(87849),Y=p(48822);function V(ne){if(ne instanceof D.y)return ne;if(null!=ne){if((0,g.c)(ne))return function ue(ne){return new D.y(pe=>{const Pe=ne[Y.L]();if((0,w.m)(Pe.subscribe))return Pe.subscribe(pe);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}(ne);if((0,e.z)(ne))return function he(ne){return new D.y(pe=>{for(let Pe=0;Pe<ne.length&&!pe.closed;Pe++)pe.next(ne[Pe]);pe.complete()})}(ne);if((0,l.t)(ne))return ae(ne);if((0,E.D)(ne))return ve(ne);if((0,n.T)(ne))return function X(ne){return new D.y(pe=>{for(const Pe of ne)if(pe.next(Pe),pe.closed)return;pe.complete()})}(ne);if((0,P.L)(ne))return function ye(ne){return ve((0,P.Q)(ne))}(ne)}throw(0,T.z)(ne)}function ae(ne){return new D.y(pe=>{ne.then(Pe=>{pe.closed||(pe.next(Pe),pe.complete())},Pe=>pe.error(Pe)).then(null,B.h)})}function ve(ne){return new D.y(pe=>{(function ge(ne,pe){var Pe,xe,de,re;return(0,o.__awaiter)(this,void 0,void 0,function*(){try{for(Pe=(0,o.__asyncValues)(ne);!(xe=yield Pe.next()).done;){const oe=xe.value;if(pe.next(oe),pe.closed)return}}catch(oe){de={error:oe}}finally{try{xe&&!xe.done&&(re=Pe.return)&&(yield re.call(Pe))}finally{if(de)throw de.error}}pe.complete()})})(ne,pe).catch(Pe=>pe.error(Pe))})}},17445:(qe,I,p)=>{"use strict";p.d(I,{F:()=>l});var o=p(34986),e=p(5963);function l(D=0,g=o.z){return D<0&&(D=0),(0,e.H)(D,D,g)}},56451:(qe,I,p)=>{"use strict";p.d(I,{T:()=>E});var o=p(8189),e=p(38421),l=p(60515),D=p(63269),g=p(32076);function E(...T){const n=(0,D.yG)(T),P=(0,D._6)(T,1/0),w=T;return w.length?1===w.length?(0,e.Xf)(w[0]):(0,o.J)(P)((0,g.D)(w,n)):l.E}},39646:(qe,I,p)=>{"use strict";p.d(I,{of:()=>l});var o=p(63269),e=p(32076);function l(...D){const g=(0,o.yG)(D);return(0,e.D)(D,g)}},62843:(qe,I,p)=>{"use strict";p.d(I,{_:()=>l});var o=p(69751),e=p(30576);function l(D,g){const E=(0,e.m)(D)?D:()=>D,T=n=>n.error(E());return new o.y(g?n=>g.schedule(T,0,n):T)}},5963:(qe,I,p)=>{"use strict";p.d(I,{H:()=>g});var o=p(69751),e=p(34986),l=p(93532);function g(E=0,T,n=e.P){let P=-1;return null!=T&&((0,l.K)(T)?n=T:P=T),new o.y(w=>{let B=function D(E){return E instanceof Date&&!isNaN(E)}(E)?+E-n.now():E;B<0&&(B=0);let Y=0;return n.schedule(function(){w.closed||(w.next(Y++),0<=P?this.schedule(void 0,P):w.complete())},B)})}},25403:(qe,I,p)=>{"use strict";p.d(I,{x:()=>e});var o=p(70930);function e(D,g,E,T,n){return new l(D,g,E,T,n)}class l extends o.Lv{constructor(g,E,T,n,P,w){super(g),this.onFinalize=P,this.shouldUnsubscribe=w,this._next=E?function(B){try{E(B)}catch(Y){g.error(Y)}}:super._next,this._error=n?function(B){try{n(B)}catch(Y){g.error(Y)}finally{this.unsubscribe()}}:super._error,this._complete=T?function(){try{T()}catch(B){g.error(B)}finally{this.unsubscribe()}}:super._complete}unsubscribe(){var g;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){const{closed:E}=this;super.unsubscribe(),!E&&(null===(g=this.onFinalize)||void 0===g||g.call(this))}}}},23601:(qe,I,p)=>{"use strict";p.d(I,{e:()=>T});var o=p(34986),e=p(54482),l=p(38421),D=p(25403);var E=p(5963);function T(n,P=o.z){return function g(n){return(0,e.e)((P,w)=>{let B=!1,Y=null,V=null,ue=!1;const he=()=>{if(V?.unsubscribe(),V=null,B){B=!1;const X=Y;Y=null,w.next(X)}ue&&w.complete()},ae=()=>{V=null,ue&&w.complete()};P.subscribe((0,D.x)(w,X=>{B=!0,Y=X,V||(0,l.Xf)(n(X)).subscribe(V=(0,D.x)(w,he,ae))},()=>{ue=!0,(!B||!V||V.closed)&&w.complete()}))})}(()=>(0,E.H)(n,P))}},70262:(qe,I,p)=>{"use strict";p.d(I,{K:()=>D});var o=p(38421),e=p(25403),l=p(54482);function D(g){return(0,l.e)((E,T)=>{let w,n=null,P=!1;n=E.subscribe((0,e.x)(T,void 0,void 0,B=>{w=(0,o.Xf)(g(B,D(g)(E))),n?(n.unsubscribe(),n=null,w.subscribe(T)):P=!0})),P&&(n.unsubscribe(),n=null,w.subscribe(T))})}},24351:(qe,I,p)=>{"use strict";p.d(I,{b:()=>l});var o=p(95577),e=p(30576);function l(D,g){return(0,e.m)(g)?(0,o.z)(D,g,1):(0,o.z)(D,1)}},78372:(qe,I,p)=>{"use strict";p.d(I,{b:()=>D});var o=p(34986),e=p(54482),l=p(25403);function D(g,E=o.z){return(0,e.e)((T,n)=>{let P=null,w=null,B=null;const Y=()=>{if(P){P.unsubscribe(),P=null;const ue=w;w=null,n.next(ue)}};function V(){const ue=B+g,he=E.now();if(he<ue)return P=this.schedule(void 0,ue-he),void n.add(P);Y()}T.subscribe((0,l.x)(n,ue=>{w=ue,B=E.now(),P||(P=E.schedule(V,g),n.add(P))},()=>{Y(),n.complete()},void 0,()=>{w=P=null}))})}},46590:(qe,I,p)=>{"use strict";p.d(I,{d:()=>l});var o=p(54482),e=p(25403);function l(D){return(0,o.e)((g,E)=>{let T=!1;g.subscribe((0,e.x)(E,n=>{T=!0,E.next(n)},()=>{T||E.next(D),E.complete()}))})}},91005:(qe,I,p)=>{"use strict";p.d(I,{g:()=>V});var o=p(34986),e=p(97272),l=p(95698),D=p(54482),g=p(25403),E=p(25032);var n=p(69718),P=p(95577),w=p(38421);function B(ue,he){return he?ae=>(0,e.z)(he.pipe((0,l.q)(1),function T(){return(0,D.e)((ue,he)=>{ue.subscribe((0,g.x)(he,E.Z))})}()),ae.pipe(B(ue))):(0,P.z)((ae,X)=>(0,w.Xf)(ue(ae,X)).pipe((0,l.q)(1),(0,n.h)(ae)))}var Y=p(5963);function V(ue,he=o.z){const ae=(0,Y.H)(ue,he);return B(()=>ae)}},71884:(qe,I,p)=>{"use strict";p.d(I,{x:()=>D});var o=p(44671),e=p(54482),l=p(25403);function D(E,T=o.y){return E=E??g,(0,e.e)((n,P)=>{let w,B=!0;n.subscribe((0,l.x)(P,Y=>{const V=T(Y);(B||!E(w,V))&&(B=!1,w=V,P.next(Y))}))})}function g(E,T){return E===T}},36129:(qe,I,p)=>{"use strict";p.d(I,{z:()=>g});var o=p(54004),e=p(38421),l=p(54482),D=p(25403);function g(E,T){return T?n=>n.pipe(g((P,w)=>(0,e.Xf)(E(P,w)).pipe((0,o.U)((B,Y)=>T(P,B,w,Y))))):(0,l.e)((n,P)=>{let w=0,B=null,Y=!1;n.subscribe((0,D.x)(P,V=>{B||(B=(0,D.x)(P,void 0,()=>{B=null,Y&&P.complete()}),(0,e.Xf)(E(V,w++)).subscribe(B))},()=>{Y=!0,!B&&P.complete()}))})}},39300:(qe,I,p)=>{"use strict";p.d(I,{h:()=>l});var o=p(54482),e=p(25403);function l(D,g){return(0,o.e)((E,T)=>{let n=0;E.subscribe((0,e.x)(T,P=>D.call(g,P,n++)&&T.next(P)))})}},28746:(qe,I,p)=>{"use strict";p.d(I,{x:()=>e});var o=p(54482);function e(l){return(0,o.e)((D,g)=>{try{D.subscribe(g)}finally{g.add(l)}})}},50590:(qe,I,p)=>{"use strict";p.d(I,{P:()=>T});var o=p(86805),e=p(39300),l=p(95698),D=p(46590),g=p(18068),E=p(44671);function T(n,P){const w=arguments.length>=2;return B=>B.pipe(n?(0,e.h)((Y,V)=>n(Y,V,B)):E.y,(0,l.q)(1),w?(0,D.d)(P):(0,g.T)(()=>new o.K))}},54004:(qe,I,p)=>{"use strict";p.d(I,{U:()=>l});var o=p(54482),e=p(25403);function l(D,g){return(0,o.e)((E,T)=>{let n=0;E.subscribe((0,e.x)(T,P=>{T.next(D.call(g,P,n++))}))})}},69718:(qe,I,p)=>{"use strict";p.d(I,{h:()=>e});var o=p(54004);function e(l){return(0,o.U)(()=>l)}},8189:(qe,I,p)=>{"use strict";p.d(I,{J:()=>l});var o=p(95577),e=p(44671);function l(D=1/0){return(0,o.z)(e.y,D)}},95577:(qe,I,p)=>{"use strict";p.d(I,{z:()=>n});var o=p(54004),e=p(38421),l=p(54482),D=p(39672),g=p(25403);var T=p(30576);function n(P,w,B=1/0){return(0,T.m)(w)?n((Y,V)=>(0,o.U)((ue,he)=>w(Y,ue,V,he))((0,e.Xf)(P(Y,V))),B):("number"==typeof w&&(B=w),(0,l.e)((Y,V)=>function E(P,w,B,Y,V,ue,he,ae){const X=[];let ve=0,ye=0,ge=!1;const ne=()=>{ge&&!X.length&&!ve&&w.complete()},pe=xe=>ve<Y?Pe(xe):X.push(xe),Pe=xe=>{ue&&w.next(xe),ve++;let de=!1;(0,e.Xf)(B(xe,ye++)).subscribe((0,g.x)(w,re=>{V?.(re),ue?pe(re):w.next(re)},()=>{de=!0},void 0,()=>{if(de)try{for(ve--;X.length&&ve<Y;){const re=X.shift();he?(0,D.f)(w,he,()=>Pe(re)):Pe(re)}ne()}catch(re){w.error(re)}}))};return P.subscribe((0,g.x)(w,pe,()=>{ge=!0,ne()})),()=>{ae?.()}}(Y,V,P,B)))}},11520:(qe,I,p)=>{"use strict";p.d(I,{G:()=>l});var o=p(54482),e=p(25403);function l(){return(0,o.e)((D,g)=>{let E,T=!1;D.subscribe((0,e.x)(g,n=>{const P=E;E=n,T&&g.next([P,n]),T=!0}))})}},70207:(qe,I,p)=>{"use strict";p.d(I,{u:()=>l});var o=p(57359),e=p(54482);function l(D,g){return(0,e.e)((0,o.U)(D,g,arguments.length>=2,!1,!0))}},38343:(qe,I,p)=>{"use strict";p.d(I,{x:()=>l});var o=p(54482),e=p(25403);function l(){return(0,o.e)((D,g)=>{let E=null;D._refCount++;const T=(0,e.x)(g,void 0,void 0,void 0,()=>{if(!D||D._refCount<=0||0<--D._refCount)return void(E=null);const n=D._connection,P=E;E=null,n&&(!P||n===P)&&n.unsubscribe(),g.unsubscribe()});D.subscribe(T),T.closed||(E=D.connect())})}},22940:(qe,I,p)=>{"use strict";p.d(I,{R:()=>l});var o=p(54482),e=p(57359);function l(D,g){return(0,o.e)((0,e.U)(D,g,arguments.length>=2,!0))}},57359:(qe,I,p)=>{"use strict";p.d(I,{U:()=>e});var o=p(25403);function e(l,D,g,E,T){return(n,P)=>{let w=g,B=D,Y=0;n.subscribe((0,o.x)(P,V=>{const ue=Y++;B=w?l(B,V,ue):(w=!0,V),E&&P.next(B)},T&&(()=>{w&&P.next(B),P.complete()})))}}},13099:(qe,I,p)=>{"use strict";p.d(I,{B:()=>g});var o=p(38421),e=p(77579),l=p(70930),D=p(54482);function g(T={}){const{connector:n=(()=>new e.x),resetOnError:P=!0,resetOnComplete:w=!0,resetOnRefCountZero:B=!0}=T;return Y=>{let V,ue,he,ae=0,X=!1,ve=!1;const ye=()=>{ue?.unsubscribe(),ue=void 0},ge=()=>{ye(),V=he=void 0,X=ve=!1},ne=()=>{const pe=V;ge(),pe?.unsubscribe()};return(0,D.e)((pe,Pe)=>{ae++,!ve&&!X&&ye();const xe=he=he??n();Pe.add(()=>{ae--,0===ae&&!ve&&!X&&(ue=E(ne,B))}),xe.subscribe(Pe),!V&&ae>0&&(V=new l.Hp({next:de=>xe.next(de),error:de=>{ve=!0,ye(),ue=E(ge,P,de),xe.error(de)},complete:()=>{X=!0,ye(),ue=E(ge,w),xe.complete()}}),(0,o.Xf)(pe).subscribe(V))})(Y)}}function E(T,n,...P){if(!0===n)return void T();if(!1===n)return;const w=new l.Hp({next:()=>{w.unsubscribe(),T()}});return(0,o.Xf)(n(...P)).subscribe(w)}},34782:(qe,I,p)=>{"use strict";p.d(I,{d:()=>l});var o=p(4707),e=p(13099);function l(D,g,E){let T,n=!1;return D&&"object"==typeof D?({bufferSize:T=1/0,windowTime:g=1/0,refCount:n=!1,scheduler:E}=D):T=D??1/0,(0,e.B)({connector:()=>new o.t(T,g,E),resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:n})}},35684:(qe,I,p)=>{"use strict";p.d(I,{T:()=>e});var o=p(39300);function e(l){return(0,o.h)((D,g)=>l<=g)}},87111:(qe,I,p)=>{"use strict";p.d(I,{u:()=>g});var o=p(54482),e=p(25403),l=p(38421),D=p(25032);function g(E){return(0,o.e)((T,n)=>{let P=!1;const w=(0,e.x)(n,()=>{w?.unsubscribe(),P=!0},D.Z);(0,l.Xf)(E).subscribe(w),T.subscribe((0,e.x)(n,B=>P&&n.next(B)))})}},68675:(qe,I,p)=>{"use strict";p.d(I,{O:()=>D});var o=p(97272),e=p(63269),l=p(54482);function D(...g){const E=(0,e.yG)(g);return(0,l.e)((T,n)=>{(E?(0,o.z)(g,T,E):(0,o.z)(g,T)).subscribe(n)})}},63900:(qe,I,p)=>{"use strict";p.d(I,{w:()=>D});var o=p(38421),e=p(54482),l=p(25403);function D(g,E){return(0,e.e)((T,n)=>{let P=null,w=0,B=!1;const Y=()=>B&&!P&&n.complete();T.subscribe((0,l.x)(n,V=>{P?.unsubscribe();let ue=0;const he=w++;(0,o.Xf)(g(V,he)).subscribe(P=(0,l.x)(n,ae=>n.next(E?E(V,ae,he,ue++):ae),()=>{P=null,Y()}))},()=>{B=!0,Y()}))})}},95698:(qe,I,p)=>{"use strict";p.d(I,{q:()=>D});var o=p(60515),e=p(54482),l=p(25403);function D(g){return g<=0?()=>o.E:(0,e.e)((E,T)=>{let n=0;E.subscribe((0,l.x)(T,P=>{++n<=g&&(T.next(P),g<=n&&T.complete())}))})}},82722:(qe,I,p)=>{"use strict";p.d(I,{R:()=>g});var o=p(54482),e=p(25403),l=p(38421),D=p(25032);function g(E){return(0,o.e)((T,n)=>{(0,l.Xf)(E).subscribe((0,e.x)(n,()=>n.complete(),D.Z)),!n.closed&&T.subscribe(n)})}},22529:(qe,I,p)=>{"use strict";p.d(I,{o:()=>l});var o=p(54482),e=p(25403);function l(D,g=!1){return(0,o.e)((E,T)=>{let n=0;E.subscribe((0,e.x)(T,P=>{const w=D(P,n++);(w||g)&&T.next(P),!w&&T.complete()}))})}},18505:(qe,I,p)=>{"use strict";p.d(I,{b:()=>g});var o=p(30576),e=p(54482),l=p(25403),D=p(44671);function g(E,T,n){const P=(0,o.m)(E)||T||n?{next:E,error:T,complete:n}:E;return P?(0,e.e)((w,B)=>{var Y;null===(Y=P.subscribe)||void 0===Y||Y.call(P);let V=!0;w.subscribe((0,l.x)(B,ue=>{var he;null===(he=P.next)||void 0===he||he.call(P,ue),B.next(ue)},()=>{var ue;V=!1,null===(ue=P.complete)||void 0===ue||ue.call(P),B.complete()},ue=>{var he;V=!1,null===(he=P.error)||void 0===he||he.call(P,ue),B.error(ue)},()=>{var ue,he;V&&(null===(ue=P.unsubscribe)||void 0===ue||ue.call(P)),null===(he=P.finalize)||void 0===he||he.call(P)}))}):D.y}},18068:(qe,I,p)=>{"use strict";p.d(I,{T:()=>D});var o=p(86805),e=p(54482),l=p(25403);function D(E=g){return(0,e.e)((T,n)=>{let P=!1;T.subscribe((0,l.x)(n,w=>{P=!0,n.next(w)},()=>P?n.complete():n.error(E())))})}function g(){return new o.K}},32518:(qe,I,p)=>{"use strict";p.d(I,{q:()=>D});var o=p(70207),e=p(54482);const l=(g,E)=>(g.push(E),g);function D(){return(0,e.e)((g,E)=>{(0,o.u)(l,[])(g).subscribe(E)})}},11365:(qe,I,p)=>{"use strict";p.d(I,{M:()=>T});var o=p(54482),e=p(25403),l=p(38421),D=p(44671),g=p(25032),E=p(63269);function T(...n){const P=(0,E.jO)(n);return(0,o.e)((w,B)=>{const Y=n.length,V=new Array(Y);let ue=n.map(()=>!1),he=!1;for(let ae=0;ae<Y;ae++)(0,l.Xf)(n[ae]).subscribe((0,e.x)(B,X=>{V[ae]=X,!he&&!ue[ae]&&(ue[ae]=!0,(he=ue.every(D.y))&&(ue=null))},g.Z));w.subscribe((0,e.x)(B,ae=>{if(he){const X=[ae,...V];B.next(P?P(...X):X)}}))})}},84408:(qe,I,p)=>{"use strict";p.d(I,{o:()=>g});var o=p(50727);class e extends o.w0{constructor(T,n){super()}schedule(T,n=0){return this}}const l={setInterval(E,T,...n){const{delegate:P}=l;return P?.setInterval?P.setInterval(E,T,...n):setInterval(E,T,...n)},clearInterval(E){const{delegate:T}=l;return(T?.clearInterval||clearInterval)(E)},delegate:void 0};var D=p(38737);class g extends e{constructor(T,n){super(T,n),this.scheduler=T,this.work=n,this.pending=!1}schedule(T,n=0){var P;if(this.closed)return this;this.state=T;const w=this.id,B=this.scheduler;return null!=w&&(this.id=this.recycleAsyncId(B,w,n)),this.pending=!0,this.delay=n,this.id=null!==(P=this.id)&&void 0!==P?P:this.requestAsyncId(B,this.id,n),this}requestAsyncId(T,n,P=0){return l.setInterval(T.flush.bind(T,this),P)}recycleAsyncId(T,n,P=0){if(null!=P&&this.delay===P&&!1===this.pending)return n;null!=n&&l.clearInterval(n)}execute(T,n){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;const P=this._execute(T,n);if(P)return P;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))}_execute(T,n){let w,P=!1;try{this.work(T)}catch(B){P=!0,w=B||new Error("Scheduled action threw falsy error")}if(P)return this.unsubscribe(),w}unsubscribe(){if(!this.closed){const{id:T,scheduler:n}=this,{actions:P}=n;this.work=this.state=this.scheduler=null,this.pending=!1,(0,D.P)(P,this),null!=T&&(this.id=this.recycleAsyncId(n,T,null)),this.delay=null,super.unsubscribe()}}}},97565:(qe,I,p)=>{"use strict";p.d(I,{v:()=>l});var o=p(26063);class e{constructor(g,E=e.now){this.schedulerActionCtor=g,this.now=E}schedule(g,E=0,T){return new this.schedulerActionCtor(this,g).schedule(T,E)}}e.now=o.l.now;class l extends e{constructor(g,E=e.now){super(g,E),this.actions=[],this._active=!1}flush(g){const{actions:E}=this;if(this._active)return void E.push(g);let T;this._active=!0;do{if(T=g.execute(g.state,g.delay))break}while(g=E.shift());if(this._active=!1,T){for(;g=E.shift();)g.unsubscribe();throw T}}}},66406:(qe,I,p)=>{"use strict";p.d(I,{Z:()=>T});var o=p(84408),e=p(50727);const l={schedule(P){let w=requestAnimationFrame,B=cancelAnimationFrame;const{delegate:Y}=l;Y&&(w=Y.requestAnimationFrame,B=Y.cancelAnimationFrame);const V=w(ue=>{B=void 0,P(ue)});return new e.w0(()=>B?.(V))},requestAnimationFrame(...P){const{delegate:w}=l;return(w?.requestAnimationFrame||requestAnimationFrame)(...P)},cancelAnimationFrame(...P){const{delegate:w}=l;return(w?.cancelAnimationFrame||cancelAnimationFrame)(...P)},delegate:void 0};class D extends o.o{constructor(w,B){super(w,B),this.scheduler=w,this.work=B}requestAsyncId(w,B,Y=0){return null!==Y&&Y>0?super.requestAsyncId(w,B,Y):(w.actions.push(this),w._scheduled||(w._scheduled=l.requestAnimationFrame(()=>w.flush(void 0))))}recycleAsyncId(w,B,Y=0){var V;if(null!=Y?Y>0:this.delay>0)return super.recycleAsyncId(w,B,Y);const{actions:ue}=w;null!=B&&(null===(V=ue[ue.length-1])||void 0===V?void 0:V.id)!==B&&(l.cancelAnimationFrame(B),w._scheduled=void 0)}}var g=p(97565);class E extends g.v{flush(w){this._active=!0;const B=this._scheduled;this._scheduled=void 0;const{actions:Y}=this;let V;w=w||Y.shift();do{if(V=w.execute(w.state,w.delay))break}while((w=Y[0])&&w.id===B&&Y.shift());if(this._active=!1,V){for(;(w=Y[0])&&w.id===B&&Y.shift();)w.unsubscribe();throw V}}}const T=new E(D)},53101:(qe,I,p)=>{"use strict";p.d(I,{E:()=>ue});var o=p(84408);let l,e=1;const D={};function g(ae){return ae in D&&(delete D[ae],!0)}const E={setImmediate(ae){const X=e++;return D[X]=!0,l||(l=Promise.resolve()),l.then(()=>g(X)&&ae()),X},clearImmediate(ae){g(ae)}},{setImmediate:n,clearImmediate:P}=E,w={setImmediate(...ae){const{delegate:X}=w;return(X?.setImmediate||n)(...ae)},clearImmediate(ae){const{delegate:X}=w;return(X?.clearImmediate||P)(ae)},delegate:void 0};class B extends o.o{constructor(X,ve){super(X,ve),this.scheduler=X,this.work=ve}requestAsyncId(X,ve,ye=0){return null!==ye&&ye>0?super.requestAsyncId(X,ve,ye):(X.actions.push(this),X._scheduled||(X._scheduled=w.setImmediate(X.flush.bind(X,void 0))))}recycleAsyncId(X,ve,ye=0){var ge;if(null!=ye?ye>0:this.delay>0)return super.recycleAsyncId(X,ve,ye);const{actions:ne}=X;null!=ve&&(null===(ge=ne[ne.length-1])||void 0===ge?void 0:ge.id)!==ve&&(w.clearImmediate(ve),X._scheduled===ve&&(X._scheduled=void 0))}}var Y=p(97565);class V extends Y.v{flush(X){this._active=!0;const ve=this._scheduled;this._scheduled=void 0;const{actions:ye}=this;let ge;X=X||ye.shift();do{if(ge=X.execute(X.state,X.delay))break}while((X=ye[0])&&X.id===ve&&ye.shift());if(this._active=!1,ge){for(;(X=ye[0])&&X.id===ve&&ye.shift();)X.unsubscribe();throw ge}}}const ue=new V(B)},34986:(qe,I,p)=>{"use strict";p.d(I,{P:()=>D,z:()=>l});var o=p(84408);const l=new(p(97565).v)(o.o),D=l},26063:(qe,I,p)=>{"use strict";p.d(I,{l:()=>o});const o={now:()=>(o.delegate||Date).now(),delegate:void 0}},43410:(qe,I,p)=>{"use strict";p.d(I,{z:()=>o});const o={setTimeout(e,l,...D){const{delegate:g}=o;return g?.setTimeout?g.setTimeout(e,l,...D):setTimeout(e,l,...D)},clearTimeout(e){const{delegate:l}=o;return(l?.clearTimeout||clearTimeout)(e)},delegate:void 0}},2202:(qe,I,p)=>{"use strict";p.d(I,{h:()=>e});const e=function o(){return"function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator"}()},48822:(qe,I,p)=>{"use strict";p.d(I,{L:()=>o});const o="function"==typeof Symbol&&Symbol.observable||"@@observable"},86805:(qe,I,p)=>{"use strict";p.d(I,{K:()=>e});const e=(0,p(83888).d)(l=>function(){l(this),this.name="EmptyError",this.message="no elements in sequence"})},63269:(qe,I,p)=>{"use strict";p.d(I,{_6:()=>E,jO:()=>D,yG:()=>g});var o=p(30576),e=p(93532);function l(T){return T[T.length-1]}function D(T){return(0,o.m)(l(T))?T.pop():void 0}function g(T){return(0,e.K)(l(T))?T.pop():void 0}function E(T,n){return"number"==typeof l(T)?T.pop():n}},54742:(qe,I,p)=>{"use strict";p.d(I,{D:()=>g});const{isArray:o}=Array,{getPrototypeOf:e,prototype:l,keys:D}=Object;function g(T){if(1===T.length){const n=T[0];if(o(n))return{args:n,keys:null};if(function E(T){return T&&"object"==typeof T&&e(T)===l}(n)){const P=D(n);return{args:P.map(w=>n[w]),keys:P}}}return{args:T,keys:null}}},38737:(qe,I,p)=>{"use strict";function o(e,l){if(e){const D=e.indexOf(l);0<=D&&e.splice(D,1)}}p.d(I,{P:()=>o})},83888:(qe,I,p)=>{"use strict";function o(e){const D=e(g=>{Error.call(g),g.stack=(new Error).stack});return D.prototype=Object.create(Error.prototype),D.prototype.constructor=D,D}p.d(I,{d:()=>o})},31810:(qe,I,p)=>{"use strict";function o(e,l){return e.reduce((D,g,E)=>(D[g]=l[E],D),{})}p.d(I,{n:()=>o})},72806:(qe,I,p)=>{"use strict";p.d(I,{O:()=>D,x:()=>l});var o=p(42416);let e=null;function l(g){if(o.v.useDeprecatedSynchronousErrorHandling){const E=!e;if(E&&(e={errorThrown:!1,error:null}),g(),E){const{errorThrown:T,error:n}=e;if(e=null,T)throw n}}else g()}function D(g){o.v.useDeprecatedSynchronousErrorHandling&&e&&(e.errorThrown=!0,e.error=g)}},39672:(qe,I,p)=>{"use strict";function o(e,l,D,g=0,E=!1){const T=l.schedule(function(){D(),E?e.add(this.schedule(null,g)):this.unsubscribe()},g);if(e.add(T),!E)return T}p.d(I,{f:()=>o})},44671:(qe,I,p)=>{"use strict";function o(e){return e}p.d(I,{y:()=>o})},81144:(qe,I,p)=>{"use strict";p.d(I,{z:()=>o});const o=e=>e&&"number"==typeof e.length&&"function"!=typeof e},12206:(qe,I,p)=>{"use strict";p.d(I,{D:()=>e});var o=p(30576);function e(l){return Symbol.asyncIterator&&(0,o.m)(l?.[Symbol.asyncIterator])}},30576:(qe,I,p)=>{"use strict";function o(e){return"function"==typeof e}p.d(I,{m:()=>o})},93670:(qe,I,p)=>{"use strict";p.d(I,{c:()=>l});var o=p(48822),e=p(30576);function l(D){return(0,e.m)(D[o.L])}},26495:(qe,I,p)=>{"use strict";p.d(I,{T:()=>l});var o=p(2202),e=p(30576);function l(D){return(0,e.m)(D?.[o.h])}},45191:(qe,I,p)=>{"use strict";p.d(I,{b:()=>l});var o=p(69751),e=p(30576);function l(D){return!!D&&(D instanceof o.y||(0,e.m)(D.lift)&&(0,e.m)(D.subscribe))}},28239:(qe,I,p)=>{"use strict";p.d(I,{t:()=>e});var o=p(30576);function e(l){return(0,o.m)(l?.then)}},53260:(qe,I,p)=>{"use strict";p.d(I,{L:()=>D,Q:()=>l});var o=p(70655),e=p(30576);function l(g){return(0,o.__asyncGenerator)(this,arguments,function*(){const T=g.getReader();try{for(;;){const{value:n,done:P}=yield(0,o.__await)(T.read());if(P)return yield(0,o.__await)(void 0);yield yield(0,o.__await)(n)}}finally{T.releaseLock()}})}function D(g){return(0,e.m)(g?.getReader)}},93532:(qe,I,p)=>{"use strict";p.d(I,{K:()=>e});var o=p(30576);function e(l){return l&&(0,o.m)(l.schedule)}},54482:(qe,I,p)=>{"use strict";p.d(I,{A:()=>e,e:()=>l});var o=p(30576);function e(D){return(0,o.m)(D?.lift)}function l(D){return g=>{if(e(g))return g.lift(function(E){try{return D(E,this)}catch(T){this.error(T)}});throw new TypeError("Unable to lift unknown Observable type")}}},83268:(qe,I,p)=>{"use strict";p.d(I,{Z:()=>D});var o=p(54004);const{isArray:e}=Array;function D(g){return(0,o.U)(E=>function l(g,E){return e(E)?g(...E):g(E)}(g,E))}},25032:(qe,I,p)=>{"use strict";function o(){}p.d(I,{Z:()=>o})},89635:(qe,I,p)=>{"use strict";p.d(I,{U:()=>l,z:()=>e});var o=p(44671);function e(...D){return l(D)}function l(D){return 0===D.length?o.y:1===D.length?D[0]:function(E){return D.reduce((T,n)=>n(T),E)}}},87849:(qe,I,p)=>{"use strict";p.d(I,{h:()=>l});var o=p(42416),e=p(43410);function l(D){e.z.setTimeout(()=>{const{onUnhandledError:g}=o.v;if(!g)throw D;g(D)})}},44532:(qe,I,p)=>{"use strict";function o(e){return new TypeError(`You provided ${null!==e&&"object"==typeof e?"an invalid object":`'${e}'`} where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.`)}p.d(I,{z:()=>o})},68433:(qe,I,p)=>{Object.defineProperty(I,"__esModule",{value:!0}),I.withSentryIonicErrorHandler=void 0;var o=p(70655),e=p(87695);I.withSentryIonicErrorHandler=function(D){var g=function(E){function T(){return null!==E&&E.apply(this,arguments)||this}return o.__extends(T,E),T.prototype.handleError=function(n){var P;E.prototype.handleError.call(this,n),e.captureException(null!==(P=n.originalError)&&void 0!==P?P:n)},T}(D);return g}},32303:(qe,I,p)=>{Object.defineProperty(I,"__esModule",{value:!0}),I.CordovaBackend=void 0;var o=p(70655),e=p(3933),l=p(87695),D=p(15608),g=p(22787),E=p(54191),T=p(69480),n=function(P){function w(B){var Y=P.call(this,B)||this;return Y._options=B,Y._browserBackend=new e.BrowserBackend(B),Y._isCordova()&&!1!==B.enableNative&&(Y._deviceReadyCallback=function(){Y._startOnNative()},g.getGlobalObject().document.addEventListener("deviceready",Y._deviceReadyCallback)),Y}return o.__extends(w,P),w.prototype.eventFromException=function(B,Y){return this._browserBackend.eventFromException(B,Y)},w.prototype.eventFromMessage=function(B,Y,V){return void 0===Y&&(Y=D.Severity.Info),this._browserBackend.eventFromMessage(B,Y,V)},w.prototype._setupTransport=function(){if(!this._options.dsn)return new l.NoopTransport;var B=o.__assign(o.__assign({},this._options.transportOptions),{dsn:this._options.dsn});return this._options.transport?new this._options.transport(B):new E.CordovaTransport(B)},w.prototype._startOnNative=function(){this._deviceReadyCallback&&(g.getGlobalObject().document.removeEventListener("deviceready",this._deviceReadyCallback),g.forget(T.NATIVE.startWithOptions(this._options)))},w.prototype._isCordova=function(){return void 0!==g.getGlobalObject().cordova||void 0!==g.getGlobalObject().Cordova},w}(l.BaseBackend);I.CordovaBackend=n},94081:(qe,I,p)=>{Object.defineProperty(I,"__esModule",{value:!0}),I.CordovaClient=void 0;var o=p(70655),e=p(87695),l=p(32303),D=p(57687),g=function(E){function T(n){return E.call(this,l.CordovaBackend,n)||this}return o.__extends(T,E),T.prototype._prepareEvent=function(n,P,w){return n.platform=n.platform||"javascript",n.sdk=o.__assign(o.__assign({},n.sdk),{name:D.SDK_NAME,packages:o.__spread(n.sdk&&n.sdk.packages||[],[{name:"npm:sentry-cordova",version:D.SDK_VERSION}]),version:D.SDK_VERSION}),n.tags||(n.tags={}),n.tags["event.origin"]="cordova",n.tags["event.environment"]="javascript",E.prototype._prepareEvent.call(this,n,P,w)},T}(e.BaseClient);I.CordovaClient=g},62191:(qe,I,p)=>{Object.defineProperty(I,"__esModule",{value:!0}),I.Cordova=void 0;var o=p(87695),e=p(99073),l=function(){function D(){this.name=D.id}return D.prototype.setupOnce=function(){o.addGlobalEventProcessor(function(g){return o.getCurrentHub().getIntegration(D)?e.normalizeData(g):g})},D.id="Cordova",D}();I.Cordova=l},46943:(qe,I,p)=>{Object.defineProperty(I,"__esModule",{value:!0});var o=p(62191);Object.defineProperty(I,"Cordova",{enumerable:!0,get:function(){return o.Cordova}})},99073:(qe,I)=>{Object.defineProperty(I,"__esModule",{value:!0}),I.normalizeData=I.normalizeUrl=void 0;var p=/^.*\/[^.]+(\.app|CodePush|.*(?=\/))/;function o(l,D){return"app://"+l.replace(/^file:\/\//,"").replace(D,"")}I.normalizeUrl=o,I.normalizeData=function e(l){l.culprit&&(l.culprit=o(l.culprit,p));var D=l.stacktrace||l.exception&&l.exception.values&&l.exception.values[0].stacktrace;return D&&D.frames.forEach(function(g){"[native code]"!==g.filename&&"<anonymous>"!==g.filename&&(g.filename=o(g.filename,p))}),l}},37787:(qe,I,p)=>{Object.defineProperty(I,"__esModule",{value:!0}),I.CordovaScope=void 0;var o=p(70655),e=p(13627),l=p(69480),D=function(g){function E(){return null!==g&&g.apply(this,arguments)||this}return o.__extends(E,g),E.prototype.setUser=function(T){return l.NATIVE.setUser(T),g.prototype.setUser.call(this,T)},E.prototype.setTag=function(T,n){return l.NATIVE.setTag(T,n),g.prototype.setTag.call(this,T,n)},E.prototype.setTags=function(T){return Object.keys(T).forEach(function(n){l.NATIVE.setTag(n,T[n])}),g.prototype.setTags.call(this,T)},E.prototype.setExtras=function(T){return Object.keys(T).forEach(function(n){l.NATIVE.setExtra(n,T[n])}),g.prototype.setExtras.call(this,T)},E.prototype.setExtra=function(T,n){return l.NATIVE.setExtra(T,n),g.prototype.setExtra.call(this,T,n)},E.prototype.addBreadcrumb=function(T,n){return l.NATIVE.addBreadcrumb(T),g.prototype.addBreadcrumb.call(this,T,n)},E.prototype.clearBreadcrumbs=function(){return l.NATIVE.clearBreadcrumbs(),g.prototype.clearBreadcrumbs.call(this)},E.prototype.setContext=function(T,n){return l.NATIVE.setContext(T,n),g.prototype.setContext.call(this,T,n)},E}(e.Scope);I.CordovaScope=D},63081:(qe,I,p)=>{Object.defineProperty(I,"__esModule",{value:!0}),I.nativeCrash=I.init=void 0;var o=p(70655),e=p(84810),l=p(87695),D=p(22787),g=p(94081),E=p(46943),T=p(37787),n=p(69480),w={enableNative:!0,defaultIntegrations:o.__spread(e.defaultIntegrations,[new E.Cordova]),enableAutoSessionTracking:!0,enableNdkScopeSync:!1,attachThreads:!1};I.init=function B(V){var ue,he=D.getGlobalObject(),ae=o.__assign(o.__assign(o.__assign({},w),{release:null===(ue=he?.SENTRY_RELEASE)||void 0===ue?void 0:ue.id}),V),X=new l.Hub(void 0,new T.CordovaScope);l.makeMain(X),l.initAndBind(g.CordovaClient,ae)},I.nativeCrash=function Y(){n.NATIVE.isNativeClientAvailable()&&n.NATIVE.crash()}},80071:(qe,I,p)=>{var e=p(15608);var l=p(87695);Object.defineProperty(I,"Tb",{enumerable:!0,get:function(){return l.captureException}});var D=p(84810);var g=p(32303);var E=p(94081);var T=p(63081);Object.defineProperty(I,"S1",{enumerable:!0,get:function(){return T.init}});var n=p(57687);p(46943);var w=p(68433)},54191:(qe,I,p)=>{Object.defineProperty(I,"__esModule",{value:!0}),I.CordovaTransport=void 0;var o=p(70655),e=p(35887),l=p(22787),D=p(69480),g=function(){function E(T){this._buffer=new l.PromiseBuffer(30),l.supportsFetch()?this._fallbackTransport=new e.FetchTransport(T):this._fallbackTransport=new e.XHRTransport(T)}return E.prototype.sendEvent=function(T){return D.NATIVE.isNativeTransportAvailable()?this._buffer.isReady()?this._buffer.add(D.NATIVE.sendEvent(T)):Promise.reject(new l.SentryError("Not adding Promise due to buffer limit reached.")):this._fallbackTransport.sendEvent(T)},E.prototype.close=function(T){return Promise.all([this._buffer.drain(T),this._fallbackTransport.close()]).then(function(n){var P=o.__read(n,2),w=P[0],B=P[1];return w&&B})},E}();I.CordovaTransport=g},42051:(qe,I)=>{var o;Object.defineProperty(I,"__esModule",{value:!0}),I.CordovaPlatformType=void 0,(o=I.CordovaPlatformType||(I.CordovaPlatformType={})).Ios="ios",o.Android="android",o.Browser="browser"},67346:(qe,I,p)=>{Object.defineProperty(I,"__esModule",{value:!0}),I.getPlatform=I.processLevel=I.serializeObject=void 0;var o=p(15608),e=p(22787),l=p(42051);I.serializeObject=function(D){var g={};return Object.keys(D).forEach(function(E){var T=D[E];g[E]="string"==typeof T?T:JSON.stringify(T)}),g},I.processLevel=function(D){return D===o.Severity.Critical?o.Severity.Fatal:D===o.Severity.Log?o.Severity.Debug:D},I.getPlatform=function(){var D,E=null===(D=e.getGlobalObject()?.cordova)||void 0===D?void 0:D.platformId;return(!E||!Object.values(l.CordovaPlatformType).includes(E))&&(E=l.CordovaPlatformType.Browser),E}},57687:(qe,I)=>{Object.defineProperty(I,"__esModule",{value:!0}),I.SDK_VERSION=I.SDK_NAME=void 0,I.SDK_NAME="sentry.javascript.cordova",I.SDK_VERSION="1.0.4"},69480:(qe,I,p)=>{Object.defineProperty(I,"__esModule",{value:!0}),I.NATIVE=void 0;var o=p(70655),e=p(22787),l=p(42051),D=p(67346);I.NATIVE={PLUGIN_NAME:"Sentry",SUPPORTS_NATIVE_TRANSPORT:[l.CordovaPlatformType.Ios,l.CordovaPlatformType.Android],SUPPORTS_NATIVE_SCOPE_SYNC:[l.CordovaPlatformType.Ios,l.CordovaPlatformType.Android],SUPPORTS_NATIVE_SDK:[l.CordovaPlatformType.Android,l.CordovaPlatformType.Ios],startWithOptions:function(g){return o.__awaiter(this,void 0,void 0,function(){var E,Y,V=this;return o.__generator(this,function(ue){return this.SUPPORTS_NATIVE_SDK.includes(D.getPlatform())?(E=o.__assign({enableNative:!0},g),this.enableNative=E.enableNative,E.enableNative?E.dsn?(E.beforeSend,E.beforeBreadcrumb,E.integrations,E.defaultIntegrations,E.transport,Y=o.__rest(E,["beforeSend","beforeBreadcrumb","integrations","defaultIntegrations","transport"]),[2,this._nativeCall("startWithOptions",Y).then(function(){return V._nativeInitialized=!0,!0}).catch(function(){return V._nativeInitialized=!1,e.logger.warn("Warning: Native SDK was not initialized."),!1})]):(e.logger.warn("Warning: No DSN was provided. The Sentry SDK will be disabled. Native SDK will also not be initialized."),[2,!1]):[2,!1]):(this._nativeInitialized=!1,[2,!1])})})},sendEvent:function(g){var E;return o.__awaiter(this,void 0,void 0,function(){var T,n,P,w,B,Y;return o.__generator(this,function(V){if(!this.isNativeClientAvailable())throw this._NativeClientError;if(!this.isNativeTransportAvailable())throw this._NativeTransportError;return g.level=g.level?D.processLevel(g.level):void 0,T={event_id:g.event_id,sdk:g.sdk},n=o.__assign(o.__assign({},g),{message:{message:g.message}}),D.getPlatform()===l.CordovaPlatformType.Android?(P=JSON.stringify(T),w=JSON.stringify(n),B=null!==(E=n.type)&&void 0!==E?E:"event",[2,this._nativeCall("captureEnvelope",P,w,B)]):(Y=JSON.parse(JSON.stringify(n)),[2,this._nativeCall("captureEnvelope",T,Y)])})})},_nativeCall:function(g){for(var E=[],T=1;T<arguments.length;T++)E[T-1]=arguments[T];return o.__awaiter(this,void 0,void 0,function(){var n=this;return o.__generator(this,function(P){return[2,new Promise(function(w,B){if(n.enableNative){var Y=e.getGlobalObject();if(Y&&Y.Cordova&&Y.Cordova.exec)try{Y.Cordova.exec(w,B,n.PLUGIN_NAME,g,E)}catch{B("Cordova.exec not available")}else B("Cordova.exec not available")}else B("enableNative = false, using browser transport")})]})})},setUser:function(g){if(this.isNativeScopeSyncAvailable()){var E=null,T=null;if(g){var n=g.id,P=g.ip_address,w=g.email,B=g.username,Y=o.__rest(g,["id","ip_address","email","username"]);E=D.serializeObject({email:w,id:n,ip_address:P,username:B}),T=D.serializeObject(Y)}this._nativeCall("setUser",E,T)}},setTag:function(g,E){if(this.isNativeScopeSyncAvailable()){var T="string"==typeof E?E:JSON.stringify(E);this._nativeCall("setTag",g,T)}},setExtra:function(g,E){if(this.isNativeScopeSyncAvailable()){var T="string"==typeof E?E:JSON.stringify(E);this._nativeCall("setExtra",g,T)}},addBreadcrumb:function(g){this.isNativeScopeSyncAvailable()&&this._nativeCall("addBreadcrumb",o.__assign(o.__assign({},g),{level:g.level?D.processLevel(g.level):void 0,data:g.data?D.serializeObject(g.data):void 0}))},clearBreadcrumbs:function(){this.isNativeScopeSyncAvailable()&&this._nativeCall("clearBreadcrumbs")},setContext:function(g,E){this.isNativeScopeSyncAvailable()&&this._nativeCall("setContext",g,null!==E?D.serializeObject(E):null)},crash:function(){if(this.enableNative){if(!this.isNativeClientAvailable())throw this._NativeClientError;this._nativeCall("crash")}},isNativeClientAvailable:function(){return this.enableNative&&this._nativeInitialized},isNativeTransportAvailable:function(){return this.isNativeClientAvailable()&&this.SUPPORTS_NATIVE_TRANSPORT.includes(D.getPlatform())},isNativeScopeSyncAvailable:function(){return this.isNativeClientAvailable()&&this.SUPPORTS_NATIVE_SCOPE_SYNC.includes(D.getPlatform())},_NativeClientError:new e.SentryError("Native Client is not available."),_NativeTransportError:new e.SentryError("Native Transport is not available."),enableNative:!0,_nativeInitialized:!1,_didGetPlatform:!1}},63036:()=>{tinymce.IconManager.add("default",{icons:{"accessibility-check":'<svg width="24" height="24"><path d="M12 2a2 2 0 012 2 2 2 0 01-2 2 2 2 0 01-2-2c0-1.1.9-2 2-2zm8 7h-5v12c0 .6-.4 1-1 1a1 1 0 01-1-1v-5c0-.6-.4-1-1-1a1 1 0 00-1 1v5c0 .6-.4 1-1 1a1 1 0 01-1-1V9H4a1 1 0 110-2h16c.6 0 1 .4 1 1s-.4 1-1 1z" fill-rule="nonzero"/></svg>',"action-next":'<svg width="24" height="24"><path fill-rule="nonzero" d="M5.7 7.3a1 1 0 00-1.4 1.4l7.7 7.7 7.7-7.7a1 1 0 10-1.4-1.4L12 13.6 5.7 7.3z"/></svg>',"action-prev":'<svg width="24" height="24"><path fill-rule="nonzero" d="M18.3 15.7a1 1 0 001.4-1.4L12 6.6l-7.7 7.7a1 1 0 001.4 1.4L12 9.4l6.3 6.3z"/></svg>',"align-center":'<svg width="24" height="24"><path d="M5 5h14c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 110-2zm3 4h8c.6 0 1 .4 1 1s-.4 1-1 1H8a1 1 0 110-2zm0 8h8c.6 0 1 .4 1 1s-.4 1-1 1H8a1 1 0 010-2zm-3-4h14c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 010-2z" fill-rule="evenodd"/></svg>',"align-justify":'<svg width="24" height="24"><path d="M5 5h14c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 110-2zm0 4h14c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 110-2zm0 4h14c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 010-2zm0 4h14c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 010-2z" fill-rule="evenodd"/></svg>',"align-left":'<svg width="24" height="24"><path d="M5 5h14c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 110-2zm0 4h8c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 110-2zm0 8h8c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 010-2zm0-4h14c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 010-2z" fill-rule="evenodd"/></svg>',"align-none":'<svg width="24" height="24"><path d="M14.2 5L13 7H5a1 1 0 110-2h9.2zm4 0h.8a1 1 0 010 2h-2l1.2-2zm-6.4 4l-1.2 2H5a1 1 0 010-2h6.8zm4 0H19a1 1 0 010 2h-4.4l1.2-2zm-6.4 4l-1.2 2H5a1 1 0 010-2h4.4zm4 0H19a1 1 0 010 2h-6.8l1.2-2zM7 17l-1.2 2H5a1 1 0 010-2h2zm4 0h8a1 1 0 010 2H9.8l1.2-2zm5.2-13.5l1.3.7-9.7 16.3-1.3-.7 9.7-16.3z" fill-rule="evenodd"/></svg>',"align-right":'<svg width="24" height="24"><path d="M5 5h14c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 110-2zm6 4h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 010-2zm0 8h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 010-2zm-6-4h14c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 010-2z" fill-rule="evenodd"/></svg>',"arrow-left":'<svg width="24" height="24"><path d="M5.6 13l12 6a1 1 0 001.4-1V6a1 1 0 00-1.4-.9l-12 6a1 1 0 000 1.8z" fill-rule="evenodd"/></svg>',"arrow-right":'<svg width="24" height="24"><path d="M18.5 13l-12 6A1 1 0 015 18V6a1 1 0 011.4-.9l12 6a1 1 0 010 1.8z" fill-rule="evenodd"/></svg>',bold:'<svg width="24" height="24"><path d="M7.8 19c-.3 0-.5 0-.6-.2l-.2-.5V5.7c0-.2 0-.4.2-.5l.6-.2h5c1.5 0 2.7.3 3.5 1 .7.6 1.1 1.4 1.1 2.5a3 3 0 01-.6 1.9c-.4.6-1 1-1.6 1.2.4.1.9.3 1.3.6s.8.7 1 1.2c.4.4.5 1 .5 1.6 0 1.3-.4 2.3-1.3 3-.8.7-2.1 1-3.8 1H7.8zm5-8.3c.6 0 1.2-.1 1.6-.5.4-.3.6-.7.6-1.3 0-1.1-.8-1.7-2.3-1.7H9.3v3.5h3.4zm.5 6c.7 0 1.3-.1 1.7-.4.4-.4.6-.9.6-1.5s-.2-1-.7-1.4c-.4-.3-1-.4-2-.4H9.4v3.8h4z" fill-rule="evenodd"/></svg>',bookmark:'<svg width="24" height="24"><path d="M6 4v17l6-4 6 4V4c0-.6-.4-1-1-1H7a1 1 0 00-1 1z" fill-rule="nonzero"/></svg>',"border-style":'<svg width="24" height="24"><g fill-rule="evenodd"><rect width="18" height="2" x="3" y="6" rx="1"/><rect width="2.8" height="2" x="3" y="16" rx="1"/><rect width="2.8" height="2" x="6.8" y="16" rx="1"/><rect width="2.8" height="2" x="10.6" y="16" rx="1"/><rect width="2.8" height="2" x="14.4" y="16" rx="1"/><rect width="2.8" height="2" x="18.2" y="16" rx="1"/><rect width="8" height="2" x="3" y="11" rx="1"/><rect width="8" height="2" x="13" y="11" rx="1"/></g></svg>',"border-width":'<svg width="24" height="24"><g fill-rule="evenodd"><rect width="18" height="5" x="3" y="5" rx="1"/><rect width="18" height="3.5" x="3" y="11.5" rx="1"/><rect width="18" height="2" x="3" y="17" rx="1"/></g></svg>',brightness:'<svg width="24" height="24"><path d="M12 17c.3 0 .5.1.7.3.2.2.3.4.3.7v1c0 .3-.1.5-.3.7a1 1 0 01-.7.3 1 1 0 01-.7-.3 1 1 0 01-.3-.7v-1c0-.3.1-.5.3-.7.2-.2.4-.3.7-.3zm0-10a1 1 0 01-.7-.3A1 1 0 0111 6V5c0-.3.1-.5.3-.7.2-.2.4-.3.7-.3.3 0 .5.1.7.3.2.2.3.4.3.7v1c0 .3-.1.5-.3.7a1 1 0 01-.7.3zm7 4c.3 0 .5.1.7.3.2.2.3.4.3.7 0 .3-.1.5-.3.7a1 1 0 01-.7.3h-1a1 1 0 01-.7-.3 1 1 0 01-.3-.7c0-.3.1-.5.3-.7.2-.2.4-.3.7-.3h1zM7 12c0 .3-.1.5-.3.7a1 1 0 01-.7.3H5a1 1 0 01-.7-.3A1 1 0 014 12c0-.3.1-.5.3-.7.2-.2.4-.3.7-.3h1c.3 0 .5.1.7.3.2.2.3.4.3.7zm10 3.5l.7.8c.2.1.3.4.3.6 0 .3-.1.6-.3.8a1 1 0 01-.8.3 1 1 0 01-.6-.3l-.8-.7a1 1 0 01-.3-.8c0-.2.1-.5.3-.7a1 1 0 011.4 0zm-10-7l-.7-.8a1 1 0 01-.3-.6c0-.3.1-.6.3-.8.2-.2.5-.3.8-.3.2 0 .5.1.7.3l.7.7c.2.2.3.5.3.8 0 .2-.1.5-.3.7a1 1 0 01-.7.3 1 1 0 01-.8-.3zm10 0a1 1 0 01-.8.3 1 1 0 01-.7-.3 1 1 0 01-.3-.7c0-.3.1-.6.3-.8l.8-.7c.1-.2.4-.3.6-.3.3 0 .6.1.8.3.2.2.3.5.3.8 0 .2-.1.5-.3.7l-.7.7zm-10 7c.2-.2.5-.3.8-.3.2 0 .5.1.7.3a1 1 0 010 1.4l-.8.8a1 1 0 01-.6.3 1 1 0 01-.8-.3 1 1 0 01-.3-.8c0-.2.1-.5.3-.6l.7-.8zM12 8a4 4 0 013.7 2.4 4 4 0 010 3.2A4 4 0 0112 16a4 4 0 01-3.7-2.4 4 4 0 010-3.2A4 4 0 0112 8zm0 6.5c.7 0 1.3-.2 1.8-.7.5-.5.7-1.1.7-1.8s-.2-1.3-.7-1.8c-.5-.5-1.1-.7-1.8-.7s-1.3.2-1.8.7c-.5.5-.7 1.1-.7 1.8s.2 1.3.7 1.8c.5.5 1.1.7 1.8.7z" fill-rule="evenodd"/></svg>',browse:'<svg width="24" height="24"><path d="M19 4a2 2 0 012 2v12a2 2 0 01-2 2h-4v-2h4V8H5v10h4v2H5a2 2 0 01-2-2V6c0-1.1.9-2 2-2h14zm-8 9.4l-2.3 2.3a1 1 0 11-1.4-1.4l4-4a1 1 0 011.4 0l4 4a1 1 0 01-1.4 1.4L13 13.4V20a1 1 0 01-2 0v-6.6z" fill-rule="nonzero"/></svg>',cancel:'<svg width="24" height="24"><path d="M12 4.6a7.4 7.4 0 110 14.8 7.4 7.4 0 010-14.8zM12 3a9 9 0 100 18 9 9 0 000-18zm0 8L14.8 8l1 1.1-2.7 2.8 2.7 2.7-1.1 1.1-2.7-2.7-2.7 2.7-1-1.1 2.6-2.7-2.7-2.7 1-1.1 2.8 2.7z" fill-rule="nonzero"/></svg>',"cell-background-color":'<svg width="24" height="24"><path d="M15.7 2l1.6 1.6-2.7 2.6 5.9 5.8c.7.7.7 1.7 0 2.4l-6.3 6.1a1.7 1.7 0 01-2.4 0l-6.3-6.1c-.7-.7-.7-1.7 0-2.4L15.7 2zM18 12l-4.5-4L9 12h9zM4 16s2 2.4 2 3.8C6 21 5.1 22 4 22s-2-1-2-2.2C2 18.4 4 16 4 16z"/></svg>',"cell-border-color":'<svg width="24" height="24"><g fill-rule="evenodd"><path fill-rule="nonzero" d="M5 13v5h2v2H5a2 2 0 01-2-2v-5h2zm8-7V4h6a2 2 0 012 2h-8z" opacity=".2"/><path fill-rule="nonzero" d="M13 4v2H5v7H3V6c0-1.1.9-2 2-2h8zm-2.6 14.1l.1-.1.1.1.2.3.2.2.2.2c.4.6.8 1.2.8 1.7 0 .8-.7 1.5-1.5 1.5S9 21.3 9 20.5c0-.5.4-1.1.8-1.7l.2-.2.2-.2.2-.3z"/><path d="M13 11l-2 2H5v-2h6V6h2z"/><path fill-rule="nonzero" d="M18.4 8l1 1-1.8 1.9 4 4c.5.4.5 1.1 0 1.6l-4.3 4.2a1.2 1.2 0 01-1.6 0l-4.4-4.2c-.4-.5-.4-1.2 0-1.7l7-6.8zm1.6 7l-3-3-3 3h6z"/></g></svg>',"change-case":'<svg width="24" height="24"><path d="M18.4 18.2v-.6c-.5.8-1.3 1.2-2.4 1.2-2.2 0-3.3-1.6-3.3-4.8 0-3.1 1-4.7 3.3-4.7 1.1 0 1.8.3 2.4 1.1v-.6c0-.5.4-.8.8-.8s.8.3.8.8v8.4c0 .5-.4.8-.8.8a.8.8 0 01-.8-.8zm-2-7.4c-1.3 0-1.8.9-1.8 3.2 0 2.4.5 3.3 1.7 3.3 1.3 0 1.8-.9 1.8-3.2 0-2.4-.5-3.3-1.7-3.3zM10 15.7H5.5l-.8 2.6a1 1 0 01-1 .7h-.2a.7.7 0 01-.7-1l4-12a1 1 0 012 0l4 12a.7.7 0 01-.8 1h-.2a1 1 0 01-1-.7l-.8-2.6zm-.3-1.5l-2-6.5-1.9 6.5h3.9z" fill-rule="evenodd"/></svg>',"character-count":'<svg width="24" height="24"><path d="M4 11.5h16v1H4v-1zm4.8-6.8V10H7.7V5.8h-1v-1h2zM11 8.3V9h2v1h-3V7.7l2-1v-.9h-2v-1h3v2.4l-2 1zm6.3-3.4V10h-3.1V9h2.1V8h-2.1V6.8h2.1v-1h-2.1v-1h3.1zM5.8 16.4c0-.5.2-.8.5-1 .2-.2.6-.3 1.2-.3l.8.1c.2 0 .4.2.5.3l.4.4v2.8l.2.3H8.2v-.1-.2l-.6.3H7c-.4 0-.7 0-1-.2a1 1 0 01-.3-.9c0-.3 0-.6.3-.8.3-.2.7-.4 1.2-.4l.6-.2h.3v-.2l-.1-.2a.8.8 0 00-.5-.1 1 1 0 00-.4 0l-.3.4h-1zm2.3.8h-.2l-.2.1-.4.1a1 1 0 00-.4.2l-.2.2.1.3.5.1h.4l.4-.4v-.6zm2-3.4h1.2v1.7l.5-.3h.5c.5 0 .9.1 1.2.5.3.4.5.8.5 1.4 0 .6-.2 1.1-.5 1.5-.3.4-.7.6-1.3.6l-.6-.1-.4-.4v.4h-1.1v-5.4zm1.1 3.3c0 .3 0 .6.2.8a.7.7 0 001.2 0l.2-.8c0-.4 0-.6-.2-.8a.7.7 0 00-.6-.3l-.6.3-.2.8zm6.1-.5c0-.2 0-.3-.2-.4a.8.8 0 00-.5-.2c-.3 0-.5.1-.6.3l-.2.9c0 .3 0 .6.2.8.1.2.3.3.6.3.2 0 .4 0 .5-.2l.2-.4h1.1c0 .5-.3.8-.6 1.1a2 2 0 01-1.3.4c-.5 0-1-.2-1.3-.6a2 2 0 01-.5-1.4c0-.6.1-1.1.5-1.5.3-.4.8-.5 1.4-.5.5 0 1 0 1.2.3.4.3.5.7.5 1.2h-1v-.1z" fill-rule="evenodd"/></svg>',"checklist-rtl":'<svg width="24" height="24"><path d="M5 17h8c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 010-2zm0-6h8c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 010-2zm0-6h8c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 110-2zm14.2 11c.2-.4.6-.5.9-.3.3.2.4.6.2 1L18 20c-.2.3-.7.4-1 0l-1.3-1.3a.7.7 0 010-1c.3-.2.7-.2 1 0l.7.9 1.7-2.8zm0-6c.2-.4.6-.5.9-.3.3.2.4.6.2 1L18 14c-.2.3-.7.4-1 0l-1.3-1.3a.7.7 0 010-1c.3-.2.7-.2 1 0l.7.9 1.7-2.8zm0-6c.2-.4.6-.5.9-.3.3.2.4.6.2 1L18 8c-.2.3-.7.4-1 0l-1.3-1.3a.7.7 0 010-1c.3-.2.7-.2 1 0l.7.9 1.7-2.8z" fill-rule="evenodd"/></svg>',checklist:'<svg width="24" height="24"><path d="M11 17h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 010-2zm0-6h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 010-2zm0-6h8a1 1 0 010 2h-8a1 1 0 010-2zM7.2 16c.2-.4.6-.5.9-.3.3.2.4.6.2 1L6 20c-.2.3-.7.4-1 0l-1.3-1.3a.7.7 0 010-1c.3-.2.7-.2 1 0l.7.9 1.7-2.8zm0-6c.2-.4.6-.5.9-.3.3.2.4.6.2 1L6 14c-.2.3-.7.4-1 0l-1.3-1.3a.7.7 0 010-1c.3-.2.7-.2 1 0l.7.9 1.7-2.8zm0-6c.2-.4.6-.5.9-.3.3.2.4.6.2 1L6 8c-.2.3-.7.4-1 0L3.8 6.9a.7.7 0 010-1c.3-.2.7-.2 1 0l.7.9 1.7-2.8z" fill-rule="evenodd"/></svg>',checkmark:'<svg width="24" height="24"><path d="M18.2 5.4a1 1 0 011.6 1.2l-8 12a1 1 0 01-1.5.1l-5-5a1 1 0 111.4-1.4l4.1 4.1 7.4-11z" fill-rule="nonzero"/></svg>',"chevron-down":'<svg width="10" height="10"><path d="M8.7 2.2c.3-.3.8-.3 1 0 .4.4.4.9 0 1.2L5.7 7.8c-.3.3-.9.3-1.2 0L.2 3.4a.8.8 0 010-1.2c.3-.3.8-.3 1.1 0L5 6l3.7-3.8z" fill-rule="nonzero"/></svg>',"chevron-left":'<svg width="10" height="10"><path d="M7.8 1.3L4 5l3.8 3.7c.3.3.3.8 0 1-.4.4-.9.4-1.2 0L2.2 5.7a.8.8 0 010-1.2L6.6.2C7 0 7.4 0 7.8.2c.3.3.3.8 0 1.1z" fill-rule="nonzero"/></svg>',"chevron-right":'<svg width="10" height="10"><path d="M2.2 1.3a.8.8 0 010-1c.4-.4.9-.4 1.2 0l4.4 4.1c.3.4.3.9 0 1.2L3.4 9.8c-.3.3-.8.3-1.2 0a.8.8 0 010-1.1L6 5 2.2 1.3z" fill-rule="nonzero"/></svg>',"chevron-up":'<svg width="10" height="10"><path d="M8.7 7.8L5 4 1.3 7.8c-.3.3-.8.3-1 0a.8.8 0 010-1.2l4.1-4.4c.3-.3.9-.3 1.2 0l4.2 4.4c.3.3.3.9 0 1.2-.3.3-.8.3-1.1 0z" fill-rule="nonzero"/></svg>',close:'<svg width="24" height="24"><path d="M17.3 8.2L13.4 12l3.9 3.8a1 1 0 01-1.5 1.5L12 13.4l-3.8 3.9a1 1 0 01-1.5-1.5l3.9-3.8-3.9-3.8a1 1 0 011.5-1.5l3.8 3.9 3.8-3.9a1 1 0 011.5 1.5z" fill-rule="evenodd"/></svg>',"code-sample":'<svg width="24" height="26"><path d="M7.1 11a2.8 2.8 0 01-.8 2 2.8 2.8 0 01.8 2v1.7c0 .3.1.6.4.8.2.3.5.4.8.4.3 0 .4.2.4.4v.8c0 .2-.1.4-.4.4-.7 0-1.4-.3-2-.8-.5-.6-.8-1.3-.8-2V15c0-.3-.1-.6-.4-.8-.2-.3-.5-.4-.8-.4a.4.4 0 01-.4-.4v-.8c0-.2.2-.4.4-.4.3 0 .6-.1.8-.4.3-.2.4-.5.4-.8V9.3c0-.7.3-1.4.8-2 .6-.5 1.3-.8 2-.8.3 0 .4.2.4.4v.8c0 .2-.1.4-.4.4-.3 0-.6.1-.8.4-.3.2-.4.5-.4.8V11zm9.8 0V9.3c0-.3-.1-.6-.4-.8-.2-.3-.5-.4-.8-.4a.4.4 0 01-.4-.4V7c0-.2.1-.4.4-.4.7 0 1.4.3 2 .8.5.6.8 1.3.8 2V11c0 .3.1.6.4.8.2.3.5.4.8.4.2 0 .4.2.4.4v.8c0 .2-.2.4-.4.4-.3 0-.6.1-.8.4-.3.2-.4.5-.4.8v1.7c0 .7-.3 1.4-.8 2-.6.5-1.3.8-2 .8a.4.4 0 01-.4-.4v-.8c0-.2.1-.4.4-.4.3 0 .6-.1.8-.4.3-.2.4-.5.4-.8V15a2.8 2.8 0 01.8-2 2.8 2.8 0 01-.8-2zm-3.3-.4c0 .4-.1.8-.5 1.1-.3.3-.7.5-1.1.5-.4 0-.8-.2-1.1-.5-.4-.3-.5-.7-.5-1.1 0-.5.1-.9.5-1.2.3-.3.7-.4 1.1-.4.4 0 .8.1 1.1.4.4.3.5.7.5 1.2zM12 13c.4 0 .8.1 1.1.5.4.3.5.7.5 1.1 0 1-.1 1.6-.5 2a3 3 0 01-1.1 1c-.4.3-.8.4-1.1.4a.5.5 0 01-.5-.5V17a3 3 0 001-.2l.6-.6c-.6 0-1-.2-1.3-.5-.2-.3-.3-.7-.3-1 0-.5.1-1 .5-1.2.3-.4.7-.5 1.1-.5z" fill-rule="evenodd"/></svg>',"color-levels":'<svg width="24" height="24"><path d="M17.5 11.4A9 9 0 0118 14c0 .5 0 1-.2 1.4 0 .4-.3.9-.5 1.3a6.2 6.2 0 01-3.7 3 5.7 5.7 0 01-3.2 0A5.9 5.9 0 017.6 18a6.2 6.2 0 01-1.4-2.6 6.7 6.7 0 010-2.8c0-.4.1-.9.3-1.3a13.6 13.6 0 012.3-4A20 20 0 0112 4a26.4 26.4 0 013.2 3.4 18.2 18.2 0 012.3 4zm-2 4.5c.4-.7.5-1.4.5-2a7.3 7.3 0 00-1-3.2c.2.6.2 1.2.2 1.9a4.5 4.5 0 01-1.3 3 5.3 5.3 0 01-2.3 1.5 4.9 4.9 0 01-2 .1 4.3 4.3 0 002.4.8 4 4 0 002-.6 4 4 0 001.5-1.5z" fill-rule="evenodd"/></svg>',"color-picker":'<svg width="24" height="24"><path d="M12 3a9 9 0 000 18 1.5 1.5 0 001.1-2.5c-.2-.3-.4-.6-.4-1 0-.8.7-1.5 1.5-1.5H16a5 5 0 005-5c0-4.4-4-8-9-8zm-5.5 9a1.5 1.5 0 110-3 1.5 1.5 0 010 3zm3-4a1.5 1.5 0 110-3 1.5 1.5 0 010 3zm5 0a1.5 1.5 0 110-3 1.5 1.5 0 010 3zm3 4a1.5 1.5 0 110-3 1.5 1.5 0 010 3z" fill-rule="nonzero"/></svg>',"color-swatch-remove-color":'<svg width="24" height="24"><path stroke="#000" stroke-width="2" d="M21 3L3 21" fill-rule="evenodd"/></svg>',"color-swatch":'<svg width="24" height="24"><rect x="3" y="3" width="18" height="18" rx="1" fill-rule="evenodd"/></svg>',"comment-add":'<svg width="24" height="24"><g fill-rule="nonzero"><path d="M9 19l3-2h7c.6 0 1-.4 1-1V6c0-.6-.4-1-1-1H5a1 1 0 00-1 1v10c0 .6.4 1 1 1h4v2zm-2 4v-4H5a3 3 0 01-3-3V6a3 3 0 013-3h14a3 3 0 013 3v10a3 3 0 01-3 3h-6.4L7 23z"/><path d="M13 10h2a1 1 0 010 2h-2v2a1 1 0 01-2 0v-2H9a1 1 0 010-2h2V8a1 1 0 012 0v2z"/></g></svg>',comment:'<svg width="24" height="24"><path fill-rule="nonzero" d="M9 19l3-2h7c.6 0 1-.4 1-1V6c0-.6-.4-1-1-1H5a1 1 0 00-1 1v10c0 .6.4 1 1 1h4v2zm-2 4v-4H5a3 3 0 01-3-3V6a3 3 0 013-3h14a3 3 0 013 3v10a3 3 0 01-3 3h-6.4L7 23z"/></svg>',contrast:'<svg width="24" height="24"><path d="M12 4a7.8 7.8 0 015.7 2.3A8 8 0 1112 4zm-6 8a6 6 0 006 6V6a6 6 0 00-6 6z" fill-rule="evenodd"/></svg>',copy:'<svg width="24" height="24"><path d="M16 3H6a2 2 0 00-2 2v11h2V5h10V3zm1 4a2 2 0 012 2v10a2 2 0 01-2 2h-7a2 2 0 01-2-2V9c0-1.2.9-2 2-2h7zm0 12V9h-7v10h7z" fill-rule="nonzero"/></svg>',crop:'<svg width="24" height="24"><path d="M17 8v7h2c.6 0 1 .4 1 1s-.4 1-1 1h-2v2c0 .6-.4 1-1 1a1 1 0 01-1-1v-2H7V9H5a1 1 0 110-2h2V5c0-.6.4-1 1-1s1 .4 1 1v2h7l3-3 1 1-3 3zM9 9v5l5-5H9zm1 6h5v-5l-5 5z" fill-rule="evenodd"/></svg>',"cut-column":'<svg width="24" height="24"><path fill-rule="evenodd" d="M7.2 4.5c.9 0 1.6.4 2.2 1A3.7 3.7 0 0110.5 8v.5l1 1 4-4 1-.5a3.3 3.3 0 012 0c.4 0 .7.3 1 .5L17 8h4v13h-6V10l-1.5 1.5.5.5v4l-2.5-2.5-1 1v.5c0 .4 0 .8-.3 1.2-.2.5-.4.9-.8 1.2-.6.7-1.3 1-2.2 1-.8.2-1.5 0-2-.6l-.5-.8-.2-1c0-.4 0-.8.3-1.2A3.9 3.9 0 017 12.7c.5-.2 1-.3 1.5-.2l1-1-1-1c-.5 0-1 0-1.5-.2-.5-.1-1-.4-1.4-.9-.4-.3-.6-.7-.8-1.2L4.5 7c0-.4 0-.7.2-1 0-.3.3-.6.5-.8.5-.5 1.2-.8 2-.7zm12.3 5h-3v10h3v-10zM8 13.8h-.3l-.4.2a2.8 2.8 0 00-.7.4v.1a2.8 2.8 0 00-.6.8l-.1.4v.7l.2.5.5.2h.7a2.6 2.6 0 00.8-.3 2.4 2.4 0 00.7-.7 2.5 2.5 0 00.3-.8 1.5 1.5 0 000-.8 1 1 0 00-.2-.4 1 1 0 00-.5-.2H8zm3.5-3.7c-.4 0-.7.1-1 .4-.3.3-.4.6-.4 1s.1.7.4 1c.3.3.6.4 1 .4s.7-.1 1-.4c.3-.3.4-.6.4-1s-.1-.7-.4-1c-.3-.3-.6-.4-1-.4zM7 5.8h-.4a1 1 0 00-.5.3 1 1 0 00-.2.5v.7a2.5 2.5 0 00.3.8l.2.3h.1l.4.4.4.2.4.1h.7L9 9l.2-.4a1.6 1.6 0 000-.8 2.6 2.6 0 00-.3-.8A2.5 2.5 0 007.7 6l-.4-.1H7z"/></svg>',"cut-row":'<svg width="24" height="24"><path fill-rule="evenodd" d="M22 3v5H9l3 3 2-2h4l-4 4 1 1h.5c.4 0 .8 0 1.2.3.5.2.9.4 1.2.8.7.6 1 1.3 1 2.2.2.8 0 1.5-.6 2l-.8.5-1 .2c-.4 0-.8 0-1.2-.3a3.9 3.9 0 01-2.1-2.2c-.2-.5-.3-1-.2-1.5l-1-1-1 1c0 .5 0 1-.2 1.5-.1.5-.4 1-.9 1.4-.3.4-.7.6-1.2.8l-1.2.3c-.4 0-.7 0-1-.2-.3 0-.6-.3-.8-.5-.5-.5-.8-1.2-.7-2 0-.9.4-1.6 1-2.2A3.7 3.7 0 018.6 14H9l1-1-4-4-.5-1a3.3 3.3 0 010-2c0-.4.3-.7.5-1l2 2V3h14zM8.5 15.3h-.3a2.6 2.6 0 00-.8.4 2.5 2.5 0 00-.9 1.1l-.1.4v.7l.2.5.5.2h.7a2.5 2.5 0 00.8-.3L9 18V18l.4-.4.2-.4.1-.4v-.3-.4a1 1 0 00-.2-.5 1 1 0 00-.4-.2h-.5zm7 0H15a1 1 0 00-.4.3 1 1 0 00-.2.5 1.5 1.5 0 000 .7v.4a2.8 2.8 0 00.5.7h.1a2.8 2.8 0 00.8.6l.4.1h.7l.5-.2.2-.5v-.4-.3a2.6 2.6 0 00-.3-.8 2.4 2.4 0 00-.7-.7 2.5 2.5 0 00-.8-.3h-.3zM12 11.6c-.4 0-.7.1-1 .4-.3.3-.4.6-.4 1s.1.7.4 1c.3.3.6.4 1 .4s.7-.1 1-.4c.3-.3.4-.6.4-1s-.1-.7-.4-1c-.3-.3-.6-.4-1-.4zm8.5-7.1h-11v2h11v-2z"/></svg>',cut:'<svg width="24" height="24"><path d="M18 15c.6.7 1 1.4 1 2.3 0 .8-.2 1.5-.7 2l-.8.5-1 .2c-.4 0-.8 0-1.2-.3a3.9 3.9 0 01-2.1-2.2c-.2-.5-.3-1-.2-1.5l-1-1-1 1c0 .5 0 1-.2 1.5-.1.5-.4 1-.9 1.4-.3.4-.7.6-1.2.8l-1.2.3c-.4 0-.7 0-1-.2-.3 0-.6-.3-.8-.5-.5-.5-.8-1.2-.7-2 0-.9.4-1.6 1-2.2A3.7 3.7 0 018.6 14H9l1-1-4-4-.5-1a3.3 3.3 0 010-2c0-.4.3-.7.5-1l6 6 6-6 .5 1a3.3 3.3 0 010 2c0 .4-.3.7-.5 1l-4 4 1 1h.5c.4 0 .8 0 1.2.3.5.2.9.4 1.2.8zm-8.5 2.2l.1-.4v-.3-.4a1 1 0 00-.2-.5 1 1 0 00-.4-.2 1.6 1.6 0 00-.8 0 2.6 2.6 0 00-.8.3 2.5 2.5 0 00-.9 1.1l-.1.4v.7l.2.5.5.2h.7a2.5 2.5 0 00.8-.3 2.8 2.8 0 001-1zm2.5-2.8c.4 0 .7-.1 1-.4.3-.3.4-.6.4-1s-.1-.7-.4-1c-.3-.3-.6-.4-1-.4s-.7.1-1 .4c-.3.3-.4.6-.4 1s.1.7.4 1c.3.3.6.4 1 .4zm5.4 4l.2-.5v-.4-.3a2.6 2.6 0 00-.3-.8 2.4 2.4 0 00-.7-.7 2.5 2.5 0 00-.8-.3 1.5 1.5 0 00-.8 0 1 1 0 00-.4.2 1 1 0 00-.2.5 1.5 1.5 0 000 .7v.4l.3.4.3.4a2.8 2.8 0 00.8.5l.4.1h.7l.5-.2z" fill-rule="evenodd"/></svg>',"document-properties":'<svg width="24" height="24"><path d="M14.4 3H7a2 2 0 00-2 2v14c0 1.1.9 2 2 2h10a2 2 0 002-2V7.6L14.4 3zM17 19H7V5h6v4h4v10z" fill-rule="nonzero"/></svg>',drag:'<svg width="24" height="24"><path d="M13 5h2v2h-2V5zm0 4h2v2h-2V9zM9 9h2v2H9V9zm4 4h2v2h-2v-2zm-4 0h2v2H9v-2zm0 4h2v2H9v-2zm4 0h2v2h-2v-2zM9 5h2v2H9V5z" fill-rule="evenodd"/></svg>',"duplicate-column":'<svg width="24" height="24"><path d="M17 6v16h-7V6h7zm-2 2h-3v12h3V8zm-2-6v2H8v15H6V2h7z"/></svg>',"duplicate-row":'<svg width="24" height="24"><path d="M22 11v7H6v-7h16zm-2 2H8v3h12v-3zm-1-6v2H4v5H2V7h17z"/></svg>',duplicate:'<svg width="24" height="24"><g fill-rule="nonzero"><path d="M16 3v2H6v11H4V5c0-1.1.9-2 2-2h10zm3 8h-2V9h-7v10h9a2 2 0 01-2 2h-7a2 2 0 01-2-2V9c0-1.2.9-2 2-2h7a2 2 0 012 2v2z"/><path d="M17 14h1a1 1 0 010 2h-1v1a1 1 0 01-2 0v-1h-1a1 1 0 010-2h1v-1a1 1 0 012 0v1z"/></g></svg>',"edit-block":'<svg width="24" height="24"><path fill-rule="nonzero" d="M19.8 8.8l-9.4 9.4c-.2.2-.5.4-.9.4l-5.4 1.2 1.2-5.4.5-.8 9.4-9.4c.7-.7 1.8-.7 2.5 0l2.1 2.1c.7.7.7 1.8 0 2.5zm-2-.2l1-.9v-.3l-2.2-2.2a.3.3 0 00-.3 0l-1 1L18 8.5zm-1 1l-2.5-2.4-6 6 2.5 2.5 6-6zm-7 7.1l-2.6-2.4-.3.3-.1.2-.7 3 3.1-.6h.1l.4-.5z"/></svg>',"edit-image":'<svg width="24" height="24"><path d="M18 16h2V7a2 2 0 00-2-2H7v2h11v9zM6 17h15a1 1 0 010 2h-1v1a1 1 0 01-2 0v-1H6a2 2 0 01-2-2V7H3a1 1 0 110-2h1V4a1 1 0 112 0v13zm3-5.3l1.3 2 3-4.7 3.7 6H7l2-3.3z" fill-rule="nonzero"/></svg>',"embed-page":'<svg width="24" height="24"><path d="M19 6V5H5v14h2A13 13 0 0119 6zm0 1.4c-.8.8-1.6 2.4-2.2 4.6H19V7.4zm0 5.6h-2.4c-.4 1.8-.6 3.8-.6 6h3v-6zm-4 6c0-2.2.2-4.2.6-6H13c-.7 1.8-1.1 3.8-1.1 6h3zm-4 0c0-2.2.4-4.2 1-6H9.6A12 12 0 008 19h3zM4 3h16c.6 0 1 .4 1 1v16c0 .6-.4 1-1 1H4a1 1 0 01-1-1V4c0-.6.4-1 1-1zm11.8 9c.4-1.9 1-3.4 1.8-4.5a9.2 9.2 0 00-4 4.5h2.2zm-3.4 0a12 12 0 012.8-4 12 12 0 00-5 4h2.2z" fill-rule="nonzero"/></svg>',embed:'<svg width="24" height="24"><path d="M4 3h16c.6 0 1 .4 1 1v16c0 .6-.4 1-1 1H4a1 1 0 01-1-1V4c0-.6.4-1 1-1zm1 2v14h14V5H5zm4.8 2.6l5.6 4a.5.5 0 010 .8l-5.6 4A.5.5 0 019 16V8a.5.5 0 01.8-.4z" fill-rule="nonzero"/></svg>',emoji:'<svg width="24" height="24"><path d="M9 11c.6 0 1-.4 1-1s-.4-1-1-1a1 1 0 00-1 1c0 .6.4 1 1 1zm6 0c.6 0 1-.4 1-1s-.4-1-1-1a1 1 0 00-1 1c0 .6.4 1 1 1zm-3 5.5c2.1 0 4-1.5 4.4-3.5H7.6c.5 2 2.3 3.5 4.4 3.5zM12 4a8 8 0 100 16 8 8 0 000-16zm0 14.5a6.5 6.5 0 110-13 6.5 6.5 0 010 13z" fill-rule="nonzero"/></svg>',export:'<svg width="24" height="24"><g fill-rule="nonzero"><path d="M14.4 3L18 7v1h-5V5H7v14h9a1 1 0 012 0c0 1-.8 2-1.9 2H7c-1 0-2-.8-2-1.9V5c0-1 .8-2 1.9-2h7.5z"/><path d="M18.1 12c.5 0 .9.4.9 1 0 .5-.3 1-.8 1h-7.3c-.5 0-.9-.4-.9-1 0-.5.3-1 .8-1h7.3z"/><path d="M16.4 9.2a1 1 0 011.4.2l2.4 3.6-2.4 3.6a1 1 0 01-1.7-1v-.2l1.7-2.4-1.6-2.4a1 1 0 01.2-1.4z"/></g></svg>',fill:'<svg width="24" height="26"><path d="M16.6 12l-9-9-1.4 1.4 2.4 2.4-5.2 5.1c-.5.6-.5 1.6 0 2.2L9 19.6a1.5 1.5 0 002.2 0l5.5-5.5c.5-.6.5-1.6 0-2.2zM5.2 13L10 8.2l4.8 4.8H5.2zM19 14.5s-2 2.2-2 3.5c0 1.1.9 2 2 2a2 2 0 002-2c0-1.3-2-3.5-2-3.5z" fill-rule="nonzero"/></svg>',"flip-horizontally":'<svg width="24" height="24"><path d="M14 19h2v-2h-2v2zm4-8h2V9h-2v2zM4 7v10c0 1.1.9 2 2 2h3v-2H6V7h3V5H6a2 2 0 00-2 2zm14-2v2h2a2 2 0 00-2-2zm-7 16h2V3h-2v18zm7-6h2v-2h-2v2zm-4-8h2V5h-2v2zm4 12a2 2 0 002-2h-2v2z" fill-rule="nonzero"/></svg>',"flip-vertically":'<svg width="24" height="24"><path d="M5 14v2h2v-2H5zm8 4v2h2v-2h-2zm4-14H7a2 2 0 00-2 2v3h2V6h10v3h2V6a2 2 0 00-2-2zm2 14h-2v2a2 2 0 002-2zM3 11v2h18v-2H3zm6 7v2h2v-2H9zm8-4v2h2v-2h-2zM5 18c0 1.1.9 2 2 2v-2H5z" fill-rule="nonzero"/></svg>',"format-painter":'<svg width="24" height="24"><path d="M18 5V4c0-.5-.4-1-1-1H5a1 1 0 00-1 1v4c0 .6.5 1 1 1h12c.6 0 1-.4 1-1V7h1v4H9v9c0 .6.4 1 1 1h2c.6 0 1-.4 1-1v-7h8V5h-3z" fill-rule="nonzero"/></svg>',format:'<svg width="24" height="24"><path fill-rule="evenodd" d="M17 5a1 1 0 010 2h-4v11a1 1 0 01-2 0V7H7a1 1 0 110-2h10z"/></svg>',fullscreen:'<svg width="24" height="24"><path d="M15.3 10l-1.2-1.3 2.9-3h-2.3a.9.9 0 110-1.7H19c.5 0 .9.4.9.9v4.4a.9.9 0 11-1.8 0V7l-2.9 3zm0 4l3 3v-2.3a.9.9 0 111.7 0V19c0 .5-.4.9-.9.9h-4.4a.9.9 0 110-1.8H17l-3-2.9 1.3-1.2zM10 15.4l-2.9 3h2.3a.9.9 0 110 1.7H5a.9.9 0 01-.9-.9v-4.4a.9.9 0 111.8 0V17l2.9-3 1.2 1.3zM8.7 10L5.7 7v2.3a.9.9 0 01-1.7 0V5c0-.5.4-.9.9-.9h4.4a.9.9 0 010 1.8H7l3 2.9-1.3 1.2z" fill-rule="nonzero"/></svg>',gallery:'<svg width="24" height="24"><path fill-rule="nonzero" d="M5 15.7l2.3-2.2c.3-.3.7-.3 1 0L11 16l5.1-5c.3-.4.8-.4 1 0l2 1.9V8H5v7.7zM5 18V19h3l1.8-1.9-2-2L5 17.9zm14-3l-2.5-2.4-6.4 6.5H19v-4zM4 6h16c.6 0 1 .4 1 1v13c0 .6-.4 1-1 1H4a1 1 0 01-1-1V7c0-.6.4-1 1-1zm6 7a2 2 0 110-4 2 2 0 010 4zM4.5 4h15a.5.5 0 110 1h-15a.5.5 0 010-1zm2-2h11a.5.5 0 110 1h-11a.5.5 0 010-1z"/></svg>',gamma:'<svg width="24" height="24"><path d="M4 3h16c.6 0 1 .4 1 1v16c0 .6-.4 1-1 1H4a1 1 0 01-1-1V4c0-.6.4-1 1-1zm1 2v14h14V5H5zm6.5 11.8V14L9.2 8.7a5.1 5.1 0 00-.4-.8l-.1-.2H8 8v-1l.3-.1.3-.1h.7a1 1 0 01.6.5l.1.3a8.5 8.5 0 01.3.6l1.9 4.6 2-5.2a1 1 0 011-.6.5.5 0 01.5.6L13 14v2.8a.7.7 0 01-1.4 0z" fill-rule="nonzero"/></svg>',help:'<svg width="24" height="24"><g fill-rule="evenodd"><path d="M12 5.5a6.5 6.5 0 00-6 9 6.3 6.3 0 001.4 2l1 1a6.3 6.3 0 003.6 1 6.5 6.5 0 006-9 6.3 6.3 0 00-1.4-2l-1-1a6.3 6.3 0 00-3.6-1zM12 4a7.8 7.8 0 015.7 2.3A8 8 0 1112 4z"/><path d="M9.6 9.7a.7.7 0 01-.7-.8c0-1.1 1.5-1.8 3.2-1.8 1.8 0 3.2.8 3.2 2.4 0 1.4-.4 2.1-1.5 2.8-.2 0-.3.1-.3.2a2 2 0 00-.8.8.8.8 0 01-1.4-.6c.3-.7.8-1 1.3-1.5l.4-.2c.7-.4.8-.6.8-1.5 0-.5-.6-.9-1.7-.9-.5 0-1 .1-1.4.3-.2 0-.3.1-.3.2v-.2c0 .4-.4.8-.8.8z" fill-rule="nonzero"/><circle cx="12" cy="16" r="1"/></g></svg>',"highlight-bg-color":'<svg width="24" height="24"><g fill-rule="evenodd"><path id="tox-icon-highlight-bg-color__color" d="M3 18h18v3H3z"/><path fill-rule="nonzero" d="M7.7 16.7H3l3.3-3.3-.7-.8L10.2 8l4 4.1-4 4.2c-.2.2-.6.2-.8 0l-.6-.7-1.1 1.1zm5-7.5L11 7.4l3-2.9a2 2 0 012.6 0L18 6c.7.7.7 2 0 2.7l-2.9 2.9-1.8-1.8-.5-.6"/></g></svg>',home:'<svg width="24" height="24"><path fill-rule="nonzero" d="M10 20v-6h4v6h5v-8h3L12 3 2 12h3v8z"/></svg>',"horizontal-rule":'<svg width="24" height="24"><path d="M4 11h16v2H4z" fill-rule="evenodd"/></svg>',"image-options":'<svg width="24" height="24"><path d="M6 10a2 2 0 00-2 2c0 1.1.9 2 2 2a2 2 0 002-2 2 2 0 00-2-2zm12 0a2 2 0 00-2 2c0 1.1.9 2 2 2a2 2 0 002-2 2 2 0 00-2-2zm-6 0a2 2 0 00-2 2c0 1.1.9 2 2 2a2 2 0 002-2 2 2 0 00-2-2z" fill-rule="nonzero"/></svg>',image:'<svg width="24" height="24"><path d="M5 15.7l3.3-3.2c.3-.3.7-.3 1 0L12 15l4.1-4c.3-.4.8-.4 1 0l2 1.9V5H5v10.7zM5 18V19h3l2.8-2.9-2-2L5 17.9zm14-3l-2.5-2.4-6.4 6.5H19v-4zM4 3h16c.6 0 1 .4 1 1v16c0 .6-.4 1-1 1H4a1 1 0 01-1-1V4c0-.6.4-1 1-1zm6 8a2 2 0 100-4 2 2 0 000 4z" fill-rule="nonzero"/></svg>',indent:'<svg width="24" height="24"><path d="M7 5h12c.6 0 1 .4 1 1s-.4 1-1 1H7a1 1 0 110-2zm5 4h7c.6 0 1 .4 1 1s-.4 1-1 1h-7a1 1 0 010-2zm0 4h7c.6 0 1 .4 1 1s-.4 1-1 1h-7a1 1 0 010-2zm-5 4h12a1 1 0 010 2H7a1 1 0 010-2zm-2.6-3.8L6.2 12l-1.8-1.2a1 1 0 011.2-1.6l3 2a1 1 0 010 1.6l-3 2a1 1 0 11-1.2-1.6z" fill-rule="evenodd"/></svg>',info:'<svg width="24" height="24"><path d="M12 4a7.8 7.8 0 015.7 2.3A8 8 0 1112 4zm-1 3v2h2V7h-2zm3 10v-1h-1v-5h-3v1h1v4h-1v1h4z" fill-rule="evenodd"/></svg>',"insert-character":'<svg width="24" height="24"><path d="M15 18h4l1-2v4h-6v-3.3l1.4-1a6 6 0 001.8-2.9 6.3 6.3 0 00-.1-4.1 5.8 5.8 0 00-3-3.2c-.6-.3-1.3-.5-2.1-.5a5.1 5.1 0 00-3.9 1.8 6.3 6.3 0 00-1.3 6 6.2 6.2 0 001.8 3l1.4.9V20H4v-4l1 2h4v-.5l-2-1L5.4 15A6.5 6.5 0 014 11c0-1 .2-1.9.6-2.7A7 7 0 016.3 6C7.1 5.4 8 5 9 4.5c1-.3 2-.5 3.1-.5a8.8 8.8 0 015.7 2 7 7 0 011.7 2.3 6 6 0 01.2 4.8c-.2.7-.6 1.3-1 1.9a7.6 7.6 0 01-3.6 2.5v.5z" fill-rule="evenodd"/></svg>',"insert-time":'<svg width="24" height="24"><g fill-rule="nonzero"><path d="M12 19a7 7 0 100-14 7 7 0 000 14zm0 2a9 9 0 110-18 9 9 0 010 18z"/><path d="M16 12h-3V7c0-.6-.4-1-1-1a1 1 0 00-1 1v7h5c.6 0 1-.4 1-1s-.4-1-1-1z"/></g></svg>',invert:'<svg width="24" height="24"><path d="M18 19.3L16.5 18a5.8 5.8 0 01-3.1 1.9 6.1 6.1 0 01-5.5-1.6A5.8 5.8 0 016 14v-.3l.1-1.2A13.9 13.9 0 017.7 9l-3-3 .7-.8 2.8 2.9 9 8.9 1.5 1.6-.7.6zm0-5.5v.3l-.1 1.1-.4 1-1.2-1.2a4.3 4.3 0 00.2-1v-.2c0-.4 0-.8-.2-1.3l-.5-1.4a14.8 14.8 0 00-3-4.2L12 6a26.1 26.1 0 00-2.2 2.5l-1-1a20.9 20.9 0 012.9-3.3L12 4l1 .8a22.2 22.2 0 014 5.4c.6 1.2 1 2.4 1 3.6z" fill-rule="evenodd"/></svg>',italic:'<svg width="24" height="24"><path d="M16.7 4.7l-.1.9h-.3c-.6 0-1 0-1.4.3-.3.3-.4.6-.5 1.1l-2.1 9.8v.6c0 .5.4.8 1.4.8h.2l-.2.8H8l.2-.8h.2c1.1 0 1.8-.5 2-1.5l2-9.8.1-.5c0-.6-.4-.8-1.4-.8h-.3l.2-.9h5.8z" fill-rule="evenodd"/></svg>',language:'<svg width="24" height="24"><path d="M12 3a9 9 0 110 18 9 9 0 010-18zm4.3 13.3c-.5 1-1.2 2-2 2.9a7.5 7.5 0 003.2-2.1l-.2-.2a6 6 0 00-1-.6zm-8.6 0c-.5.2-.9.5-1.2.8.9 1 2 1.7 3.2 2a10 10 0 01-2-2.8zm3.6-.8c-.8 0-1.6.1-2.2.3.5 1 1.2 1.9 2.1 2.7zm1.5 0v3c.9-.8 1.6-1.7 2.1-2.7-.6-.2-1.4-.3-2.1-.3zm-6-2.7H4.5c.2 1 .5 2.1 1 3h.3l1.3-1a10 10 0 01-.3-2zm12.7 0h-2.3c0 .7-.1 1.4-.3 2l1.6 1.1c.5-1 .9-2 1-3.1zm-3.8 0h-3V14c1 0 2 .1 2.7.4.2-.5.3-1 .3-1.6zm-4.4 0h-3l.3 1.6c.8-.3 1.7-.4 2.7-.4v-1.3zm-5.5-5c-.7 1-1.1 2.2-1.3 3.5h2.3c0-1 .2-1.8.5-2.6l-1.5-1zm2.9 1.4v.1c-.2.6-.4 1.3-.4 2h3V9.4c-1 0-1.8-.1-2.6-.3zm6.6 0h-.1l-2.4.3v1.8h3l-.5-2.1zm3-1.4l-.3.1-1.3.8c.3.8.5 1.6.5 2.6h2.3a7.5 7.5 0 00-1.3-3.5zm-9 0l2 .2V5.5a9 9 0 00-2 2.2zm3.5-2.3V8c.6 0 1.3 0 1.9-.2a9 9 0 00-2-2.3zm-3-.7h-.1c-1.1.4-2.1 1-3 1.8l1.2.7a10 10 0 011.9-2.5zm4.4 0l.1.1a10 10 0 011.8 2.4l1.1-.7a7.5 7.5 0 00-3-1.8z"/></svg>',"line-height":'<svg width="24" height="24"><path d="M21 5a1 1 0 01.1 2H13a1 1 0 01-.1-2H21zm0 4a1 1 0 01.1 2H13a1 1 0 01-.1-2H21zm0 4a1 1 0 01.1 2H13a1 1 0 01-.1-2H21zm0 4a1 1 0 01.1 2H13a1 1 0 01-.1-2H21zM7 3.6l3.7 3.7a1 1 0 01-1.3 1.5h-.1L8 7.3v9.2l1.3-1.3a1 1 0 011.3 0h.1c.4.4.4 1 0 1.3v.1L7 20.4l-3.7-3.7a1 1 0 011.3-1.5h.1L6 16.7V7.4L4.7 8.7a1 1 0 01-1.3 0h-.1a1 1 0 010-1.3v-.1L7 3.6z"/></svg>',line:'<svg width="24" height="24"><path d="M15 9l-8 8H4v-3l8-8 3 3zm1-1l-3-3 1-1h1c-.2 0 0 0 0 0l2 2s0 .2 0 0v1l-1 1zM4 18h16v2H4v-2z" fill-rule="evenodd"/></svg>',link:'<svg width="24" height="24"><path d="M6.2 12.3a1 1 0 011.4 1.4l-2.1 2a2 2 0 102.7 2.8l4.8-4.8a1 1 0 000-1.4 1 1 0 111.4-1.3 2.9 2.9 0 010 4L9.6 20a3.9 3.9 0 01-5.5-5.5l2-2zm11.6-.6a1 1 0 01-1.4-1.4l2-2a2 2 0 10-2.6-2.8L11 10.3a1 1 0 000 1.4A1 1 0 119.6 13a2.9 2.9 0 010-4L14.4 4a3.9 3.9 0 015.5 5.5l-2 2z" fill-rule="nonzero"/></svg>',"list-bull-circle":'<svg width="48" height="48"><g fill-rule="evenodd"><path d="M11 16a2 2 0 100-4 2 2 0 000 4zm0 1a3 3 0 110-6 3 3 0 010 6zM11 26a2 2 0 100-4 2 2 0 000 4zm0 1a3 3 0 110-6 3 3 0 010 6zM11 36a2 2 0 100-4 2 2 0 000 4zm0 1a3 3 0 110-6 3 3 0 010 6z" fill-rule="nonzero"/><path opacity=".2" d="M18 12h22v4H18zM18 22h22v4H18zM18 32h22v4H18z"/></g></svg>',"list-bull-default":'<svg width="48" height="48"><g fill-rule="evenodd"><circle cx="11" cy="14" r="3"/><circle cx="11" cy="24" r="3"/><circle cx="11" cy="34" r="3"/><path opacity=".2" d="M18 12h22v4H18zM18 22h22v4H18zM18 32h22v4H18z"/></g></svg>',"list-bull-square":'<svg width="48" height="48"><g fill-rule="evenodd"><path d="M8 11h6v6H8zM8 21h6v6H8zM8 31h6v6H8z"/><path opacity=".2" d="M18 12h22v4H18zM18 22h22v4H18zM18 32h22v4H18z"/></g></svg>',"list-num-default-rtl":'<svg width="48" height="48"><g fill-rule="evenodd"><path opacity=".2" d="M8 12h22v4H8zM8 22h22v4H8zM8 32h22v4H8z"/><path d="M37.4 17v-4.8l-1.6 1v-1.1l1.6-1h1.2V17zM33.3 17.1c-.5 0-.8-.3-.8-.7 0-.4.3-.7.8-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7zm1.7 5.7c0-1.2 1-2 2.2-2 1.3 0 2.1.8 2.1 1.8 0 .7-.3 1.2-1.3 2.2l-1.2 1v.2h2.6v1h-4.3v-.9l2-1.9c.8-.8 1-1.1 1-1.5 0-.5-.4-.8-1-.8-.5 0-.9.3-.9.9H35zm-1.7 4.3c-.5 0-.8-.3-.8-.7 0-.4.3-.7.8-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7zm3.2 7.3v-1h.7c.6 0 1-.3 1-.8 0-.4-.4-.7-1-.7s-1 .3-1 .8H35c0-1.1 1-1.8 2.2-1.8 1.2 0 2.1.6 2.1 1.6 0 .7-.4 1.2-1 1.3v.1c.7.1 1.3.7 1.3 1.4 0 1-1 1.9-2.4 1.9-1.3 0-2.2-.8-2.3-2h1.2c0 .6.5 1 1.1 1 .6 0 1-.4 1-1 0-.5-.3-.8-1-.8h-.7zm-3.3 2.7c-.4 0-.7-.3-.7-.7 0-.4.3-.7.7-.7.5 0 .8.3.8.7 0 .4-.3.7-.8.7z"/></g></svg>',"list-num-default":'<svg width="48" height="48"><g fill-rule="evenodd"><path opacity=".2" d="M18 12h22v4H18zM18 22h22v4H18zM18 32h22v4H18z"/><path d="M10 17v-4.8l-1.5 1v-1.1l1.6-1h1.2V17h-1.2zm3.6.1c-.4 0-.7-.3-.7-.7 0-.4.3-.7.7-.7.5 0 .7.3.7.7 0 .4-.2.7-.7.7zm-5 5.7c0-1.2.8-2 2.1-2s2.1.8 2.1 1.8c0 .7-.3 1.2-1.4 2.2l-1.1 1v.2h2.6v1H8.6v-.9l2-1.9c.8-.8 1-1.1 1-1.5 0-.5-.4-.8-1-.8-.5 0-.9.3-.9.9H8.5zm6.3 4.3c-.5 0-.7-.3-.7-.7 0-.4.2-.7.7-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7zM10 34.4v-1h.7c.6 0 1-.3 1-.8 0-.4-.4-.7-1-.7s-1 .3-1 .8H8.6c0-1.1 1-1.8 2.2-1.8 1.3 0 2.1.6 2.1 1.6 0 .7-.4 1.2-1 1.3v.1c.8.1 1.3.7 1.3 1.4 0 1-1 1.9-2.4 1.9-1.3 0-2.2-.8-2.3-2h1.2c0 .6.5 1 1.1 1 .7 0 1-.4 1-1 0-.5-.3-.8-1-.8h-.7zm4.7 2.7c-.4 0-.7-.3-.7-.7 0-.4.3-.7.7-.7.5 0 .8.3.8.7 0 .4-.3.7-.8.7z"/></g></svg>',"list-num-lower-alpha-rtl":'<svg width="48" height="48"><g fill-rule="evenodd"><path opacity=".2" d="M8 12h22v4H8zM8 22h22v4H8zM8 32h22v4H8z"/><path d="M36.5 16c-.9 0-1.5-.5-1.5-1.3s.6-1.3 1.8-1.4h1v-.4c0-.4-.2-.6-.7-.6-.4 0-.7.1-.8.4h-1.1c0-.8.8-1.4 2-1.4S39 12 39 13V16h-1.2v-.6c-.3.4-.8.7-1.4.7zm.4-.8c.6 0 1-.4 1-.9V14h-1c-.5.1-.7.3-.7.6 0 .4.3.6.7.6zM33.1 16.1c-.4 0-.7-.3-.7-.7 0-.4.3-.7.7-.7.5 0 .8.3.8.7 0 .4-.3.7-.8.7zM37.7 26c-.7 0-1.2-.2-1.5-.7v.7H35v-6.3h1.2v2.5c.3-.5.8-.9 1.5-.9 1.1 0 1.8 1 1.8 2.4 0 1.5-.7 2.4-1.8 2.4zm-.5-3.6c-.6 0-1 .5-1 1.3s.4 1.4 1 1.4c.7 0 1-.6 1-1.4 0-.8-.3-1.3-1-1.3zM33.2 26.1c-.4 0-.7-.3-.7-.7 0-.4.3-.7.7-.7.5 0 .8.3.8.7 0 .4-.3.7-.8.7zm6 7h-1c-.1-.5-.4-.8-1-.8s-1 .5-1 1.4c0 1 .4 1.4 1 1.4.5 0 .9-.2 1-.7h1c0 1-.8 1.7-2 1.7-1.4 0-2.2-.9-2.2-2.4s.8-2.4 2.2-2.4c1.2 0 2 .7 2 1.7zm-6.1 3c-.5 0-.7-.3-.7-.7 0-.4.2-.7.7-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7z"/></g></svg>',"list-num-lower-alpha":'<svg width="48" height="48"><g fill-rule="evenodd"><path opacity=".2" d="M18 12h22v4H18zM18 22h22v4H18zM18 32h22v4H18z"/><path d="M10.3 15.2c.5 0 1-.4 1-.9V14h-1c-.5.1-.8.3-.8.6 0 .4.3.6.8.6zm-.4.9c-1 0-1.5-.6-1.5-1.4 0-.8.6-1.3 1.7-1.4h1.1v-.4c0-.4-.2-.6-.7-.6-.5 0-.8.1-.9.4h-1c0-.8.8-1.4 2-1.4 1.1 0 1.8.6 1.8 1.6V16h-1.1v-.6h-.1c-.2.4-.7.7-1.3.7zm4.6 0c-.5 0-.7-.3-.7-.7 0-.4.2-.7.7-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7zm-3.2 10c-.6 0-1.2-.3-1.4-.8v.7H8.5v-6.3H10v2.5c.3-.5.8-.9 1.4-.9 1.2 0 1.9 1 1.9 2.4 0 1.5-.7 2.4-1.9 2.4zm-.4-3.7c-.7 0-1 .5-1 1.3s.3 1.4 1 1.4c.6 0 1-.6 1-1.4 0-.8-.4-1.3-1-1.3zm4 3.7c-.5 0-.7-.3-.7-.7 0-.4.2-.7.7-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7zm-2.2 7h-1.2c0-.5-.4-.8-.9-.8-.6 0-1 .5-1 1.4 0 1 .4 1.4 1 1.4.5 0 .8-.2 1-.7h1c0 1-.8 1.7-2 1.7-1.4 0-2.2-.9-2.2-2.4s.8-2.4 2.2-2.4c1.2 0 2 .7 2 1.7zm1.8 3c-.5 0-.8-.3-.8-.7 0-.4.3-.7.8-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7z"/></g></svg>',"list-num-lower-greek-rtl":'<svg width="48" height="48"><g fill-rule="evenodd"><path opacity=".2" d="M8 12h22v4H8zM8 22h22v4H8zM8 32h22v4H8z"/><path d="M37.4 16c-1.2 0-2-.8-2-2.3 0-1.5.8-2.4 2-2.4.6 0 1 .4 1.3 1v-.9H40v3.2c0 .4.1.5.4.5h.2v.9h-.6c-.6 0-1-.2-1-.7h-.2c-.2.4-.7.8-1.3.8zm.3-1c.6 0 1-.5 1-1.3s-.4-1.3-1-1.3-1 .5-1 1.3.4 1.4 1 1.4zM33.3 16.1c-.5 0-.8-.3-.8-.7 0-.4.3-.7.8-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7zM36 21.9c0-1.5.8-2.3 2.1-2.3 1.2 0 2 .6 2 1.6 0 .6-.3 1-.9 1.3.9.3 1.3.8 1.3 1.7 0 1.2-.7 1.9-1.8 1.9-.6 0-1.1-.3-1.4-.8v2.2H36V22zm1.8 1.2v-1h.3c.5 0 .9-.2.9-.7 0-.5-.3-.8-.9-.8-.5 0-.8.3-.8 1v2.2c0 .8.4 1.3 1 1.3s1-.4 1-1-.4-1-1.2-1h-.3zM33.3 26.1c-.5 0-.8-.3-.8-.7 0-.4.3-.7.8-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7zM37.1 34.6L34.8 30h1.4l1.7 3.5 1.7-3.5h1.1l-2.2 4.6v.1c.5.8.7 1.4.7 1.8 0 .4-.2.8-.4 1-.2.2-.6.3-1 .3-.9 0-1.3-.4-1.3-1.2 0-.5.2-1 .5-1.7l.1-.2zm.7 1a2 2 0 00-.4.9c0 .3.1.4.4.4.3 0 .4-.1.4-.4 0-.2-.1-.6-.4-1zM33.3 36.1c-.5 0-.8-.3-.8-.7 0-.4.3-.7.8-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7z"/></g></svg>',"list-num-lower-greek":'<svg width="48" height="48"><g fill-rule="evenodd"><path opacity=".2" d="M18 12h22v4H18zM18 22h22v4H18zM18 32h22v4H18z"/><path d="M10.5 15c.7 0 1-.5 1-1.3s-.3-1.3-1-1.3c-.5 0-.9.5-.9 1.3s.4 1.4 1 1.4zm-.3 1c-1.1 0-1.8-.8-1.8-2.3 0-1.5.7-2.4 1.8-2.4.7 0 1.1.4 1.3 1h.1v-.9h1.2v3.2c0 .4.1.5.4.5h.2v.9h-.6c-.6 0-1-.2-1.1-.7h-.1c-.2.4-.7.8-1.4.8zm5 .1c-.5 0-.8-.3-.8-.7 0-.4.3-.7.7-.7.5 0 .8.3.8.7 0 .4-.3.7-.8.7zm-4.9 7v-1h.3c.6 0 1-.2 1-.7 0-.5-.4-.8-1-.8-.5 0-.8.3-.8 1v2.2c0 .8.4 1.3 1.1 1.3.6 0 1-.4 1-1s-.5-1-1.3-1h-.3zM8.6 22c0-1.5.7-2.3 2-2.3 1.2 0 2 .6 2 1.6 0 .6-.3 1-.8 1.3.8.3 1.3.8 1.3 1.7 0 1.2-.8 1.9-1.9 1.9-.6 0-1.1-.3-1.3-.8v2.2H8.5V22zm6.2 4.2c-.4 0-.7-.3-.7-.7 0-.4.3-.7.7-.7.5 0 .7.3.7.7 0 .4-.2.7-.7.7zm-4.5 8.5L8 30h1.4l1.7 3.5 1.7-3.5h1.1l-2.2 4.6v.1c.5.8.7 1.4.7 1.8 0 .4-.1.8-.4 1-.2.2-.6.3-1 .3-.9 0-1.3-.4-1.3-1.2 0-.5.2-1 .5-1.7l.1-.2zm.7 1a2 2 0 00-.4.9c0 .3.1.4.4.4.3 0 .4-.1.4-.4 0-.2-.1-.6-.4-1zm4.5.5c-.5 0-.8-.3-.8-.7 0-.4.3-.7.8-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7z"/></g></svg>',"list-num-lower-roman-rtl":'<svg width="48" height="48"><g fill-rule="evenodd"><path opacity=".2" d="M8 12h22v4H8zM8 22h22v4H8zM8 32h22v4H8z"/><path d="M32.9 16v-1.2h-1.3V16H33zm0 10v-1.2h-1.3V26H33zm0 10v-1.2h-1.3V36H33z"/><path fill-rule="nonzero" d="M36 21h-1.5v5H36zM36 31h-1.5v5H36zM39 21h-1.5v5H39zM39 31h-1.5v5H39zM42 31h-1.5v5H42zM36 11h-1.5v5H36zM36 19h-1.5v1H36zM36 29h-1.5v1H36zM39 19h-1.5v1H39zM39 29h-1.5v1H39zM42 29h-1.5v1H42zM36 9h-1.5v1H36z"/></g></svg>',"list-num-lower-roman":'<svg width="48" height="48"><g fill-rule="evenodd"><path opacity=".2" d="M18 12h22v4H18zM18 22h22v4H18zM18 32h22v4H18z"/><path d="M15.1 16v-1.2h1.3V16H15zm0 10v-1.2h1.3V26H15zm0 10v-1.2h1.3V36H15z"/><path fill-rule="nonzero" d="M12 21h1.5v5H12zM12 31h1.5v5H12zM9 21h1.5v5H9zM9 31h1.5v5H9zM6 31h1.5v5H6zM12 11h1.5v5H12zM12 19h1.5v1H12zM12 29h1.5v1H12zM9 19h1.5v1H9zM9 29h1.5v1H9zM6 29h1.5v1H6zM12 9h1.5v1H12z"/></g></svg>',"list-num-upper-alpha-rtl":'<svg width="48" height="48"><g fill-rule="evenodd"><path opacity=".2" d="M8 12h22v4H8zM8 22h22v4H8zM8 32h22v4H8z"/><path d="M39.3 17l-.5-1.4h-2l-.5 1.4H35l2-6h1.6l2 6h-1.3zm-1.6-4.7l-.7 2.3h1.6l-.8-2.3zM33.4 17c-.4 0-.7-.3-.7-.7 0-.4.3-.7.7-.7.5 0 .7.3.7.7 0 .4-.2.7-.7.7zm4.7 9.9h-2.7v-6H38c1.2 0 1.9.6 1.9 1.5 0 .6-.5 1.2-1 1.3.7.1 1.3.7 1.3 1.5 0 1-.8 1.7-2 1.7zm-1.4-5v1.5h1c.6 0 1-.3 1-.8 0-.4-.4-.7-1-.7h-1zm0 4h1.1c.7 0 1.1-.3 1.1-.8 0-.6-.4-.9-1.1-.9h-1.1V26zM33 27.1c-.5 0-.8-.3-.8-.7 0-.4.3-.7.8-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7zm4.9 10c-1.8 0-2.8-1.1-2.8-3.1s1-3.1 2.8-3.1c1.4 0 2.5.9 2.6 2.2h-1.3c0-.7-.6-1.1-1.3-1.1-1 0-1.6.7-1.6 2s.6 2 1.6 2c.7 0 1.2-.4 1.4-1h1.2c-.1 1.3-1.2 2.2-2.6 2.2zm-4.5 0c-.5 0-.8-.3-.8-.7 0-.4.3-.7.8-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7z"/></g></svg>',"list-num-upper-alpha":'<svg width="48" height="48"><g fill-rule="evenodd"><path opacity=".2" d="M18 12h22v4H18zM18 22h22v4H18zM18 32h22v4H18z"/><path d="M12.6 17l-.5-1.4h-2L9.5 17H8.3l2-6H12l2 6h-1.3zM11 12.3l-.7 2.3h1.6l-.8-2.3zm4.7 4.8c-.4 0-.7-.3-.7-.7 0-.4.3-.7.7-.7.5 0 .7.3.7.7 0 .4-.2.7-.7.7zM11.4 27H8.7v-6h2.6c1.2 0 1.9.6 1.9 1.5 0 .6-.5 1.2-1 1.3.7.1 1.3.7 1.3 1.5 0 1-.8 1.7-2 1.7zM10 22v1.5h1c.6 0 1-.3 1-.8 0-.4-.4-.7-1-.7h-1zm0 4H11c.7 0 1.1-.3 1.1-.8 0-.6-.4-.9-1.1-.9H10V26zm5.4 1.1c-.5 0-.8-.3-.8-.7 0-.4.3-.7.8-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7zm-4.1 10c-1.8 0-2.8-1.1-2.8-3.1s1-3.1 2.8-3.1c1.4 0 2.5.9 2.6 2.2h-1.3c0-.7-.6-1.1-1.3-1.1-1 0-1.6.7-1.6 2s.6 2 1.6 2c.7 0 1.2-.4 1.4-1h1.2c-.1 1.3-1.2 2.2-2.6 2.2zm4.5 0c-.5 0-.8-.3-.8-.7 0-.4.3-.7.8-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7z"/></g></svg>',"list-num-upper-roman-rtl":'<svg width="48" height="48"><g fill-rule="evenodd"><path opacity=".2" d="M8 12h22v4H8zM8 22h22v4H8zM8 32h22v4H8z"/><path d="M31.6 17v-1.2H33V17h-1.3zm0 10v-1.2H33V27h-1.3zm0 10v-1.2H33V37h-1.3z"/><path fill-rule="nonzero" d="M34.5 20H36v7h-1.5zM34.5 30H36v7h-1.5zM37.5 20H39v7h-1.5zM37.5 30H39v7h-1.5zM40.5 30H42v7h-1.5zM34.5 10H36v7h-1.5z"/></g></svg>',"list-num-upper-roman":'<svg width="48" height="48"><g fill-rule="evenodd"><path opacity=".2" d="M18 12h22v4H18zM18 22h22v4H18zM18 32h22v4H18z"/><path d="M15.1 17v-1.2h1.3V17H15zm0 10v-1.2h1.3V27H15zm0 10v-1.2h1.3V37H15z"/><path fill-rule="nonzero" d="M12 20h1.5v7H12zM12 30h1.5v7H12zM9 20h1.5v7H9zM9 30h1.5v7H9zM6 30h1.5v7H6zM12 10h1.5v7H12z"/></g></svg>',lock:'<svg width="24" height="24"><path d="M16.3 11c.2 0 .3 0 .5.2l.2.6v7.4c0 .3 0 .4-.2.6l-.6.2H7.8c-.3 0-.4 0-.6-.2a.7.7 0 01-.2-.6v-7.4c0-.3 0-.4.2-.6l.5-.2H8V8c0-.8.3-1.5.9-2.1.6-.6 1.3-.9 2.1-.9h2c.8 0 1.5.3 2.1.9.6.6.9 1.3.9 2.1v3h.3zM10 8v3h4V8a1 1 0 00-.3-.7A1 1 0 0013 7h-2a1 1 0 00-.7.3 1 1 0 00-.3.7z" fill-rule="evenodd"/></svg>',ltr:'<svg width="24" height="24"><path d="M11 5h7a1 1 0 010 2h-1v11a1 1 0 01-2 0V7h-2v11a1 1 0 01-2 0v-6c-.5 0-1 0-1.4-.3A3.4 3.4 0 017.8 10a3.3 3.3 0 010-2.8 3.4 3.4 0 011.8-1.8L11 5zM4.4 16.2L6.2 15l-1.8-1.2a1 1 0 011.2-1.6l3 2a1 1 0 010 1.6l-3 2a1 1 0 11-1.2-1.6z" fill-rule="evenodd"/></svg>',"more-drawer":'<svg width="24" height="24"><path d="M6 10a2 2 0 00-2 2c0 1.1.9 2 2 2a2 2 0 002-2 2 2 0 00-2-2zm12 0a2 2 0 00-2 2c0 1.1.9 2 2 2a2 2 0 002-2 2 2 0 00-2-2zm-6 0a2 2 0 00-2 2c0 1.1.9 2 2 2a2 2 0 002-2 2 2 0 00-2-2z" fill-rule="nonzero"/></svg>',"new-document":'<svg width="24" height="24"><path d="M14.4 3H7a2 2 0 00-2 2v14c0 1.1.9 2 2 2h10a2 2 0 002-2V7.6L14.4 3zM17 19H7V5h6v4h4v10z" fill-rule="nonzero"/></svg>',"new-tab":'<svg width="24" height="24"><path d="M15 13l2-2v8H5V7h8l-2 2H7v8h8v-4zm4-8v5.5l-2-2-5.6 5.5H10v-1.4L15.5 7l-2-2H19z" fill-rule="evenodd"/></svg>',"non-breaking":'<svg width="24" height="24"><path d="M11 11H8a1 1 0 110-2h3V6c0-.6.4-1 1-1s1 .4 1 1v3h3c.6 0 1 .4 1 1s-.4 1-1 1h-3v3c0 .6-.4 1-1 1a1 1 0 01-1-1v-3zm10 4v5H3v-5c0-.6.4-1 1-1s1 .4 1 1v3h14v-3c0-.6.4-1 1-1s1 .4 1 1z" fill-rule="evenodd"/></svg>',notice:'<svg width="24" height="24"><path d="M17.8 9.8L15.4 4 20 8.5v7L15.5 20h-7L4 15.5v-7L8.5 4h7l2.3 5.8zm0 0l2.2 5.7-2.3-5.8zM13 17v-2h-2v2h2zm0-4V7h-2v6h2z" fill-rule="evenodd"/></svg>',"ordered-list-rtl":'<svg width="24" height="24"><path d="M6 17h8a1 1 0 010 2H6a1 1 0 010-2zm0-6h8a1 1 0 010 2H6a1 1 0 010-2zm0-6h8a1 1 0 010 2H6a1 1 0 110-2zm13-1v3.5a.5.5 0 11-1 0V5h-.5a.5.5 0 110-1H19zm-1 8.8l.2.2h1.3a.5.5 0 110 1h-1.6a1 1 0 01-.9-1V13c0-.4.3-.8.6-1l1.2-.4.2-.3a.2.2 0 00-.2-.2h-1.3a.5.5 0 01-.5-.5c0-.3.2-.5.5-.5h1.6c.5 0 .9.4.9 1v.1c0 .4-.3.8-.6 1l-1.2.4-.2.3zm2 4.2v2c0 .6-.4 1-1 1h-1.5a.5.5 0 010-1h1.2a.3.3 0 100-.6h-1.3a.4.4 0 110-.8h1.3a.3.3 0 000-.6h-1.2a.5.5 0 110-1H19c.6 0 1 .4 1 1z" fill-rule="evenodd"/></svg>',"ordered-list":'<svg width="24" height="24"><path d="M10 17h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 010-2zm0-6h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 010-2zm0-6h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 110-2zM6 4v3.5c0 .3-.2.5-.5.5a.5.5 0 01-.5-.5V5h-.5a.5.5 0 010-1H6zm-1 8.8l.2.2h1.3c.3 0 .5.2.5.5s-.2.5-.5.5H4.9a1 1 0 01-.9-1V13c0-.4.3-.8.6-1l1.2-.4.2-.3a.2.2 0 00-.2-.2H4.5a.5.5 0 01-.5-.5c0-.3.2-.5.5-.5h1.6c.5 0 .9.4.9 1v.1c0 .4-.3.8-.6 1l-1.2.4-.2.3zM7 17v2c0 .6-.4 1-1 1H4.5a.5.5 0 010-1h1.2c.2 0 .3-.1.3-.3 0-.2-.1-.3-.3-.3H4.4a.4.4 0 110-.8h1.3c.2 0 .3-.1.3-.3 0-.2-.1-.3-.3-.3H4.5a.5.5 0 110-1H6c.6 0 1 .4 1 1z" fill-rule="evenodd"/></svg>',orientation:'<svg width="24" height="24"><path d="M7.3 6.4L1 13l6.4 6.5 6.5-6.5-6.5-6.5zM3.7 13l3.6-3.7L11 13l-3.7 3.7-3.6-3.7zM12 6l2.8 2.7c.3.3.3.8 0 1-.3.4-.9.4-1.2 0L9.2 5.7a.8.8 0 010-1.2L13.6.2c.3-.3.9-.3 1.2 0 .3.3.3.8 0 1.1L12 4h1a9 9 0 11-4.3 16.9l1.5-1.5A7 7 0 1013 6h-1z" fill-rule="nonzero"/></svg>',outdent:'<svg width="24" height="24"><path d="M7 5h12c.6 0 1 .4 1 1s-.4 1-1 1H7a1 1 0 110-2zm5 4h7c.6 0 1 .4 1 1s-.4 1-1 1h-7a1 1 0 010-2zm0 4h7c.6 0 1 .4 1 1s-.4 1-1 1h-7a1 1 0 010-2zm-5 4h12a1 1 0 010 2H7a1 1 0 010-2zm1.6-3.8a1 1 0 01-1.2 1.6l-3-2a1 1 0 010-1.6l3-2a1 1 0 011.2 1.6L6.8 12l1.8 1.2z" fill-rule="evenodd"/></svg>',"page-break":'<svg width="24" height="24"><g fill-rule="evenodd"><path d="M5 11c.6 0 1 .4 1 1s-.4 1-1 1a1 1 0 010-2zm3 0h1c.6 0 1 .4 1 1s-.4 1-1 1H8a1 1 0 010-2zm4 0c.6 0 1 .4 1 1s-.4 1-1 1a1 1 0 010-2zm3 0h1c.6 0 1 .4 1 1s-.4 1-1 1h-1a1 1 0 010-2zm4 0c.6 0 1 .4 1 1s-.4 1-1 1a1 1 0 010-2zM7 3v5h10V3c0-.6.4-1 1-1s1 .4 1 1v7H5V3c0-.6.4-1 1-1s1 .4 1 1zM6 22a1 1 0 01-1-1v-7h14v7c0 .6-.4 1-1 1a1 1 0 01-1-1v-5H7v5c0 .6-.4 1-1 1z"/></g></svg>',paragraph:'<svg width="24" height="24"><path fill-rule="evenodd" d="M10 5h7a1 1 0 010 2h-1v11a1 1 0 01-2 0V7h-2v11a1 1 0 01-2 0v-6c-.5 0-1 0-1.4-.3A3.4 3.4 0 016.8 10a3.3 3.3 0 010-2.8 3.4 3.4 0 011.8-1.8L10 5z"/></svg>',"paste-column-after":'<svg width="24" height="24"><path fill-rule="evenodd" d="M12 1a3 3 0 012.8 2H18c1 0 2 .8 2 1.9V7h-2V5h-2v1c0 .6-.4 1-1 1H9a1 1 0 01-1-1V5H6v13h7v2H6c-1 0-2-.8-2-1.9V5c0-1 .8-2 1.9-2H9.2A3 3 0 0112 1zm8 7v12h-6V8h6zm-1.5 1.5h-3v9h3v-9zM12 3a1 1 0 100 2 1 1 0 000-2z"/></svg>',"paste-column-before":'<svg width="24" height="24"><path fill-rule="evenodd" d="M12 1a3 3 0 012.8 2H18c1 0 2 .8 2 1.9V18c0 1-.8 2-1.9 2H11v-2h7V5h-2v1c0 .6-.4 1-1 1H9a1 1 0 01-1-1V5H6v2H4V5c0-1 .8-2 1.9-2H9.2A3 3 0 0112 1zm-2 7v12H4V8h6zM8.5 9.5h-3v9h3v-9zM12 3a1 1 0 100 2 1 1 0 000-2z"/></svg>',"paste-row-after":'<svg width="24" height="24"><path fill-rule="evenodd" d="M12 1a3 3 0 012.8 2H18c1 0 2 .8 2 1.9V11h-2V5h-2v1c0 .6-.4 1-1 1H9a1 1 0 01-1-1V5H6v13h14c0 1-.8 2-1.9 2H6c-1 0-2-.8-2-1.9V5c0-1 .8-2 1.9-2H9.2A3 3 0 0112 1zm10 11v5H8v-5h14zm-1.5 1.5h-11v2h11v-2zM12 3a1 1 0 100 2 1 1 0 000-2z"/></svg>',"paste-row-before":'<svg width="24" height="24"><path fill-rule="evenodd" d="M12 1a3 3 0 012.8 2H18c1 0 2 .8 2 1.9V7h-2V5h-2v1c0 .6-.4 1-1 1H9a1 1 0 01-1-1V5H6v13h12v-4h2v4c0 1-.8 2-1.9 2H6c-1 0-2-.8-2-1.9V5c0-1 .8-2 1.9-2H9.2A3 3 0 0112 1zm10 7v5H8V8h14zm-1.5 1.5h-11v2h11v-2zM12 3a1 1 0 100 2 1 1 0 000-2z"/></svg>',"paste-text":'<svg width="24" height="24"><path d="M18 9V5h-2v1c0 .6-.4 1-1 1H9a1 1 0 01-1-1V5H6v13h3V9h9zM9 20H6a2 2 0 01-2-2V5c0-1.1.9-2 2-2h3.2A3 3 0 0112 1a3 3 0 012.8 2H18a2 2 0 012 2v4h1v12H9v-1zm1.5-9.5v9h9v-9h-9zM12 3a1 1 0 00-1 1c0 .5.4 1 1 1s1-.5 1-1-.4-1-1-1zm0 9h6v2h-.5l-.5-1h-1v4h.8v1h-3.6v-1h.8v-4h-1l-.5 1H12v-2z" fill-rule="nonzero"/></svg>',paste:'<svg width="24" height="24"><path d="M18 9V5h-2v1c0 .6-.4 1-1 1H9a1 1 0 01-1-1V5H6v13h3V9h9zM9 20H6a2 2 0 01-2-2V5c0-1.1.9-2 2-2h3.2A3 3 0 0112 1a3 3 0 012.8 2H18a2 2 0 012 2v4h1v12H9v-1zm1.5-9.5v9h9v-9h-9zM12 3a1 1 0 00-1 1c0 .5.4 1 1 1s1-.5 1-1-.4-1-1-1z" fill-rule="nonzero"/></svg>',"permanent-pen":'<svg width="24" height="24"><path d="M10.5 17.5L8 20H3v-3l3.5-3.5a2 2 0 010-3L14 3l1 1-7.3 7.3a1 1 0 000 1.4l3.6 3.6c.4.4 1 .4 1.4 0L20 9l1 1-7.6 7.6a2 2 0 01-2.8 0l-.1-.1z" fill-rule="nonzero"/></svg>',plus:'<svg width="24" height="24"><path d="M12 4c.5 0 1 .4 1 .9V11h6a1 1 0 01.1 2H13v6a1 1 0 01-2 .1V13H5a1 1 0 01-.1-2H11V5c0-.6.4-1 1-1z"/></svg>',preferences:'<svg width="24" height="24"><path d="M20.1 13.5l-1.9.2a5.8 5.8 0 01-.6 1.5l1.2 1.5c.4.4.3 1 0 1.4l-.7.7a1 1 0 01-1.4 0l-1.5-1.2a6.2 6.2 0 01-1.5.6l-.2 1.9c0 .5-.5.9-1 .9h-1a1 1 0 01-1-.9l-.2-1.9a5.8 5.8 0 01-1.5-.6l-1.5 1.2a1 1 0 01-1.4 0l-.7-.7a1 1 0 010-1.4l1.2-1.5a6.2 6.2 0 01-.6-1.5l-1.9-.2a1 1 0 01-.9-1v-1c0-.5.4-1 .9-1l1.9-.2a5.8 5.8 0 01.6-1.5L5.2 7.3a1 1 0 010-1.4l.7-.7a1 1 0 011.4 0l1.5 1.2a6.2 6.2 0 011.5-.6l.2-1.9c0-.5.5-.9 1-.9h1c.5 0 1 .4 1 .9l.2 1.9a5.8 5.8 0 011.5.6l1.5-1.2a1 1 0 011.4 0l.7.7c.3.4.4 1 0 1.4l-1.2 1.5a6.2 6.2 0 01.6 1.5l1.9.2c.5 0 .9.5.9 1v1c0 .5-.4 1-.9 1zM12 15a3 3 0 100-6 3 3 0 000 6z" fill-rule="evenodd"/></svg>',preview:'<svg width="24" height="24"><path d="M3.5 12.5c.5.8 1.1 1.6 1.8 2.3 2 2 4.2 3.2 6.7 3.2s4.7-1.2 6.7-3.2a16.2 16.2 0 002.1-2.8 15.7 15.7 0 00-2.1-2.8c-2-2-4.2-3.2-6.7-3.2a9.3 9.3 0 00-6.7 3.2A16.2 16.2 0 003.2 12c0 .2.2.3.3.5zm-2.4-1l.7-1.2L4 7.8C6.2 5.4 8.9 4 12 4c3 0 5.8 1.4 8.1 3.8a18.2 18.2 0 012.8 3.7v1l-.7 1.2-2.1 2.5c-2.3 2.4-5 3.8-8.1 3.8-3 0-5.8-1.4-8.1-3.8a18.2 18.2 0 01-2.8-3.7 1 1 0 010-1zm12-3.3a2 2 0 102.7 2.6 4 4 0 11-2.6-2.6z" fill-rule="nonzero"/></svg>',print:'<svg width="24" height="24"><path d="M18 8H6a3 3 0 00-3 3v6h2v3h14v-3h2v-6a3 3 0 00-3-3zm-1 10H7v-4h10v4zm.5-5c-.8 0-1.5-.7-1.5-1.5s.7-1.5 1.5-1.5 1.5.7 1.5 1.5-.7 1.5-1.5 1.5zm.5-8H6v2h12V5z" fill-rule="nonzero"/></svg>',quote:'<svg width="24" height="24"><path d="M7.5 17h.9c.4 0 .7-.2.9-.6L11 13V8c0-.6-.4-1-1-1H6a1 1 0 00-1 1v4c0 .6.4 1 1 1h2l-1.3 2.7a1 1 0 00.8 1.3zm8 0h.9c.4 0 .7-.2.9-.6L19 13V8c0-.6-.4-1-1-1h-4a1 1 0 00-1 1v4c0 .6.4 1 1 1h2l-1.3 2.7a1 1 0 00.8 1.3z" fill-rule="nonzero"/></svg>',redo:'<svg width="24" height="24"><path d="M17.6 10H12c-2.8 0-4.4 1.4-4.9 3.5-.4 2 .3 4 1.4 4.6a1 1 0 11-1 1.8c-2-1.2-2.9-4.1-2.3-6.8.6-3 3-5.1 6.8-5.1h5.6l-3.3-3.3a1 1 0 111.4-1.4l5 5a1 1 0 010 1.4l-5 5a1 1 0 01-1.4-1.4l3.3-3.3z" fill-rule="nonzero"/></svg>',reload:'<svg width="24" height="24"><g fill-rule="nonzero"><path d="M5 22.1l-1.2-4.7v-.2a1 1 0 011-1l5 .4a1 1 0 11-.2 2l-2.2-.2a7.8 7.8 0 008.4.2 7.5 7.5 0 003.5-6.4 1 1 0 112 0 9.5 9.5 0 01-4.5 8 9.9 9.9 0 01-10.2 0l.4 1.4a1 1 0 11-2 .5zM13.6 7.4c0-.5.5-1 1-.9l2.8.2a8 8 0 00-9.5-1 7.5 7.5 0 00-3.6 7 1 1 0 01-2 0 9.5 9.5 0 014.5-8.6 10 10 0 0110.9.3l-.3-1a1 1 0 012-.5l1.1 4.8a1 1 0 01-1 1.2l-5-.4a1 1 0 01-.9-1z"/></g></svg>',"remove-formatting":'<svg width="24" height="24"><path d="M13.2 6a1 1 0 010 .2l-2.6 10a1 1 0 01-1 .8h-.2a.8.8 0 01-.8-1l2.6-10H8a1 1 0 110-2h9a1 1 0 010 2h-3.8zM5 18h7a1 1 0 010 2H5a1 1 0 010-2zm13 1.5L16.5 18 15 19.5a.7.7 0 01-1-1l1.5-1.5-1.5-1.5a.7.7 0 011-1l1.5 1.5 1.5-1.5a.7.7 0 011 1L17.5 17l1.5 1.5a.7.7 0 01-1 1z" fill-rule="evenodd"/></svg>',remove:'<svg width="24" height="24"><path d="M16 7h3a1 1 0 010 2h-1v9a3 3 0 01-3 3H9a3 3 0 01-3-3V9H5a1 1 0 110-2h3V6a3 3 0 013-3h2a3 3 0 013 3v1zm-2 0V6c0-.6-.4-1-1-1h-2a1 1 0 00-1 1v1h4zm2 2H8v9c0 .6.4 1 1 1h6c.6 0 1-.4 1-1V9zm-7 3a1 1 0 012 0v4a1 1 0 01-2 0v-4zm4 0a1 1 0 012 0v4a1 1 0 01-2 0v-4z" fill-rule="nonzero"/></svg>',"resize-handle":'<svg width="10" height="10"><g fill-rule="nonzero"><path d="M8.1 1.1A.5.5 0 119 2l-7 7A.5.5 0 111 8l7-7zM8.1 5.1A.5.5 0 119 6l-3 3A.5.5 0 115 8l3-3z"/></g></svg>',resize:'<svg width="24" height="24"><path d="M4 5c0-.3.1-.5.3-.7.2-.2.4-.3.7-.3h6c.3 0 .5.1.7.3.2.2.3.4.3.7 0 .3-.1.5-.3.7a1 1 0 01-.7.3H7.4L18 16.6V13c0-.3.1-.5.3-.7.2-.2.4-.3.7-.3.3 0 .5.1.7.3.2.2.3.4.3.7v6c0 .3-.1.5-.3.7a1 1 0 01-.7.3h-6a1 1 0 01-.7-.3 1 1 0 01-.3-.7c0-.3.1-.5.3-.7.2-.2.4-.3.7-.3h3.6L6 7.4V11c0 .3-.1.5-.3.7a1 1 0 01-.7.3 1 1 0 01-.7-.3A1 1 0 014 11V5z" fill-rule="evenodd"/></svg>',"restore-draft":'<svg width="24" height="24"><g fill-rule="evenodd"><path d="M17 13c0 .6-.4 1-1 1h-4V8c0-.6.4-1 1-1s1 .4 1 1v4h2c.6 0 1 .4 1 1z"/><path d="M4.7 10H9a1 1 0 010 2H3a1 1 0 01-1-1V5a1 1 0 112 0v3l2.5-2.4a9.2 9.2 0 0110.8-1.5A9 9 0 0113.4 21c-2.4.1-4.7-.7-6.5-2.2a1 1 0 111.3-1.5 7.2 7.2 0 0011.6-3.7 7 7 0 00-3.5-7.7A7.2 7.2 0 008 7L4.7 10z" fill-rule="nonzero"/></g></svg>',"rotate-left":'<svg width="24" height="24"><path d="M4.7 10H9a1 1 0 010 2H3a1 1 0 01-1-1V5a1 1 0 112 0v3l2.5-2.4a9.2 9.2 0 0110.8-1.5A9 9 0 0113.4 21c-2.4.1-4.7-.7-6.5-2.2a1 1 0 111.3-1.5 7.2 7.2 0 0011.6-3.7 7 7 0 00-3.5-7.7A7.2 7.2 0 008 7L4.7 10z" fill-rule="nonzero"/></svg>',"rotate-right":'<svg width="24" height="24"><path d="M20 8V5a1 1 0 012 0v6c0 .6-.4 1-1 1h-6a1 1 0 010-2h4.3L16 7A7.2 7.2 0 007.7 6a7 7 0 003 13.1c1.9.1 3.7-.5 5-1.7a1 1 0 011.4 1.5A9.2 9.2 0 012.2 14c-.9-3.9 1-8 4.5-9.9 3.5-1.9 8-1.3 10.8 1.5L20 8z" fill-rule="nonzero"/></svg>',rtl:'<svg width="24" height="24"><path d="M8 5h8v2h-2v12h-2V7h-2v12H8v-7c-.5 0-1 0-1.4-.3A3.4 3.4 0 014.8 10a3.3 3.3 0 010-2.8 3.4 3.4 0 011.8-1.8L8 5zm12 11.2a1 1 0 11-1 1.6l-3-2a1 1 0 010-1.6l3-2a1 1 0 111 1.6L18.4 15l1.8 1.2z" fill-rule="evenodd"/></svg>',save:'<svg width="24" height="24"><path d="M5 16h14a2 2 0 012 2v2a2 2 0 01-2 2H5a2 2 0 01-2-2v-2c0-1.1.9-2 2-2zm0 2v2h14v-2H5zm10 0h2v2h-2v-2zm-4-6.4L8.7 9.3a1 1 0 10-1.4 1.4l4 4c.4.4 1 .4 1.4 0l4-4a1 1 0 10-1.4-1.4L13 11.6V4a1 1 0 00-2 0v7.6z" fill-rule="nonzero"/></svg>',search:'<svg width="24" height="24"><path d="M16 17.3a8 8 0 111.4-1.4l4.3 4.4a1 1 0 01-1.4 1.4l-4.4-4.3zm-5-.3a6 6 0 100-12 6 6 0 000 12z" fill-rule="nonzero"/></svg>',"select-all":'<svg width="24" height="24"><path d="M3 5h2V3a2 2 0 00-2 2zm0 8h2v-2H3v2zm4 8h2v-2H7v2zM3 9h2V7H3v2zm10-6h-2v2h2V3zm6 0v2h2a2 2 0 00-2-2zM5 21v-2H3c0 1.1.9 2 2 2zm-2-4h2v-2H3v2zM9 3H7v2h2V3zm2 18h2v-2h-2v2zm8-8h2v-2h-2v2zm0 8a2 2 0 002-2h-2v2zm0-12h2V7h-2v2zm0 8h2v-2h-2v2zm-4 4h2v-2h-2v2zm0-16h2V3h-2v2zM7 17h10V7H7v10zm2-8h6v6H9V9z" fill-rule="nonzero"/></svg>',selected:'<svg width="24" height="24"><path fill-rule="nonzero" d="M6 4h12a2 2 0 012 2v12a2 2 0 01-2 2H6a2 2 0 01-2-2V6c0-1.1.9-2 2-2zm3.6 10.9L7 12.3a.7.7 0 00-1 1L9.6 17 18 8.6a.7.7 0 000-1 .7.7 0 00-1 0l-7.4 7.3z"/></svg>',settings:'<svg width="24" height="24"><path d="M11 6h8c.6 0 1 .4 1 1s-.4 1-1 1h-8v.3c0 .2 0 .3-.2.5l-.6.2H7.8c-.3 0-.4 0-.6-.2a.7.7 0 01-.2-.6V8H5a1 1 0 110-2h2v-.3c0-.2 0-.3.2-.5l.5-.2h2.5c.3 0 .4 0 .6.2l.2.5V6zM8 8h2V6H8v2zm9 2.8v.2h2c.6 0 1 .4 1 1s-.4 1-1 1h-2v.3c0 .2 0 .3-.2.5l-.6.2h-2.4c-.3 0-.4 0-.6-.2a.7.7 0 01-.2-.6V13H5a1 1 0 010-2h8v-.3c0-.2 0-.3.2-.5l.6-.2h2.4c.3 0 .4 0 .6.2l.2.6zM14 13h2v-2h-2v2zm-3 2.8v.2h8c.6 0 1 .4 1 1s-.4 1-1 1h-8v.3c0 .2 0 .3-.2.5l-.6.2H7.8c-.3 0-.4 0-.6-.2a.7.7 0 01-.2-.6V18H5a1 1 0 010-2h2v-.3c0-.2 0-.3.2-.5l.5-.2h2.5c.3 0 .4 0 .6.2l.2.6zM8 18h2v-2H8v2z" fill-rule="evenodd"/></svg>',sharpen:'<svg width="24" height="24"><path d="M16 6l4 4-8 9-8-9 4-4h8zm-4 10.2l5.5-6.2-.1-.1H12v-.3h5.1l-.2-.2H12V9h4.6l-.2-.2H12v-.3h4.1l-.2-.2H12V8h3.6l-.2-.2H8.7L6.5 10l.1.1H12v.3H6.9l.2.2H12v.3H7.3l.2.2H12v.3H7.7l.3.2h4v.3H8.2l.2.2H12v.3H8.6l.3.2H12v.3H9l.3.2H12v.3H9.5l.2.2H12v.3h-2l.2.2H12v.3h-1.6l.2.2H12v.3h-1.1l.2.2h.9v.3h-.7l.2.2h.5v.3h-.3l.3.2z" fill-rule="evenodd"/></svg>',sourcecode:'<svg width="24" height="24"><g fill-rule="nonzero"><path d="M9.8 15.7c.3.3.3.8 0 1-.3.4-.9.4-1.2 0l-4.4-4.1a.8.8 0 010-1.2l4.4-4.2c.3-.3.9-.3 1.2 0 .3.3.3.8 0 1.1L6 12l3.8 3.7zM14.2 15.7c-.3.3-.3.8 0 1 .4.4.9.4 1.2 0l4.4-4.1c.3-.3.3-.9 0-1.2l-4.4-4.2a.8.8 0 00-1.2 0c-.3.3-.3.8 0 1.1L18 12l-3.8 3.7z"/></g></svg>',"spell-check":'<svg width="24" height="24"><path d="M6 8v3H5V5c0-.3.1-.5.3-.7.2-.2.4-.3.7-.3h2c.3 0 .5.1.7.3.2.2.3.4.3.7v6H8V8H6zm0-3v2h2V5H6zm13 0h-3v5h3v1h-3a1 1 0 01-.7-.3 1 1 0 01-.3-.7V5c0-.3.1-.5.3-.7.2-.2.4-.3.7-.3h3v1zm-5 1.5l-.1.7c-.1.2-.3.3-.6.3.3 0 .5.1.6.3l.1.7V10c0 .3-.1.5-.3.7a1 1 0 01-.7.3h-3V4h3c.3 0 .5.1.7.3.2.2.3.4.3.7v1.5zM13 10V8h-2v2h2zm0-3V5h-2v2h2zm3 5l1 1-6.5 7L7 15.5l1.3-1 2.2 2.2L16 12z" fill-rule="evenodd"/></svg>',"strike-through":'<svg width="24" height="24"><g fill-rule="evenodd"><path d="M15.6 8.5c-.5-.7-1-1.1-1.3-1.3-.6-.4-1.3-.6-2-.6-2.7 0-2.8 1.7-2.8 2.1 0 1.6 1.8 2 3.2 2.3 4.4.9 4.6 2.8 4.6 3.9 0 1.4-.7 4.1-5 4.1A6.2 6.2 0 017 16.4l1.5-1.1c.4.6 1.6 2 3.7 2 1.6 0 2.5-.4 3-1.2.4-.8.3-2-.8-2.6-.7-.4-1.6-.7-2.9-1-1-.2-3.9-.8-3.9-3.6C7.6 6 10.3 5 12.4 5c2.9 0 4.2 1.6 4.7 2.4l-1.5 1.1z"/><path d="M5 11h14a1 1 0 010 2H5a1 1 0 010-2z" fill-rule="nonzero"/></g></svg>',subscript:'<svg width="24" height="24"><path d="M10.4 10l4.6 4.6-1.4 1.4L9 11.4 4.4 16 3 14.6 7.6 10 3 5.4 4.4 4 9 8.6 13.6 4 15 5.4 10.4 10zM21 19h-5v-1l1-.8 1.7-1.6c.3-.4.5-.8.5-1.2 0-.3 0-.6-.2-.7-.2-.2-.5-.3-.9-.3a2 2 0 00-.8.2l-.7.3-.4-1.1 1-.6 1.2-.2c.8 0 1.4.3 1.8.7.4.4.6.9.6 1.5s-.2 1.1-.5 1.6a8 8 0 01-1.3 1.3l-.6.6h2.6V19z" fill-rule="nonzero"/></svg>',superscript:'<svg width="24" height="24"><path d="M15 9.4L10.4 14l4.6 4.6-1.4 1.4L9 15.4 4.4 20 3 18.6 7.6 14 3 9.4 4.4 8 9 12.6 13.6 8 15 9.4zm5.9 1.6h-5v-1l1-.8 1.7-1.6c.3-.5.5-.9.5-1.3 0-.3 0-.5-.2-.7-.2-.2-.5-.3-.9-.3l-.8.2-.7.4-.4-1.2c.2-.2.5-.4 1-.5.3-.2.8-.2 1.2-.2.8 0 1.4.2 1.8.6.4.4.6 1 .6 1.6 0 .5-.2 1-.5 1.5l-1.3 1.4-.6.5h2.6V11z" fill-rule="nonzero"/></svg>',"table-caption":'<svg width="24" height="24"><g fill-rule="nonzero"><rect width="12" height="2" x="3" y="4" rx="1"/><path d="M19 8a2 2 0 012 2v8a2 2 0 01-2 2H5a2 2 0 01-2-2v-8c0-1.1.9-2 2-2h14zM5 15v3h6v-3H5zm14 0h-6v3h6v-3zm0-5h-6v3h6v-3zM5 13h6v-3H5v3z"/></g></svg>',"table-cell-classes":'<svg width="24" height="24"><g fill-rule="evenodd"><path fill-rule="nonzero" d="M13 4v9H3V6c0-1.1.9-2 2-2h8zm-2 2H5v5h6V6z"/><path fill-rule="nonzero" d="M13 4h6a2 2 0 012 2v7h-8v-2h6V6h-6V4z" opacity=".2"/><path d="M18 20l-2.6 1.6.7-3-2.4-2 3.1-.2 1.2-2.9 1.2 2.9 3 .2-2.3 2 .7 3z"/><path fill-rule="nonzero" d="M3 13v5c0 1.1.9 2 2 2h8v-7h-2v5H5v-5H3z" opacity=".2"/></g></svg>',"table-cell-properties":'<svg width="24" height="24"><path fill-rule="nonzero" d="M19 4a2 2 0 012 2v12a2 2 0 01-2 2H5a2 2 0 01-2-2V6c0-1.1.9-2 2-2h14zm-8 9H5v5h6v-5zm8 0h-6v5h6v-5zm-8-7H5v5h6V6z"/></svg>',"table-cell-select-all":'<svg width="24" height="24"><g fill-rule="evenodd"><path fill-rule="nonzero" d="M19 4a2 2 0 012 2v12a2 2 0 01-2 2H5a2 2 0 01-2-2V6c0-1.1.9-2 2-2h14zm0 2H5v12h14V6z"/><path d="M13 6v5h6v2h-6v5h-2v-5H5v-2h6V6h2z" opacity=".2"/></g></svg>',"table-cell-select-inner":'<svg width="24" height="24"><g fill-rule="evenodd"><path fill-rule="nonzero" d="M19 4a2 2 0 012 2v12a2 2 0 01-2 2H5a2 2 0 01-2-2V6c0-1.1.9-2 2-2h14zm0 2H5v12h14V6z" opacity=".2"/><path d="M13 6v5h6v2h-6v5h-2v-5H5v-2h6V6h2z"/></g></svg>',"table-classes":'<svg width="24" height="24"><g fill-rule="evenodd"><path fill-rule="nonzero" d="M19 4a2 2 0 012 2v7h-8v7H5a2 2 0 01-2-2V6c0-1.1.9-2 2-2h14zm-8 9H5v5h6v-5zm8-7h-6v5h6V6zm-8 0H5v5h6V6z"/><path d="M18 20l-2.6 1.6.7-3-2.4-2 3.1-.2 1.2-2.9 1.2 2.9 3 .2-2.3 2 .7 3z"/></g></svg>',"table-delete-column":'<svg width="24" height="24"><path fill-rule="nonzero" d="M19 4a2 2 0 012 2v12a2 2 0 01-2 2H5a2 2 0 01-2-2V6c0-1.1.9-2 2-2h14zm-4 4h-2V6h-2v2H9V6H5v12h4v-2h2v2h2v-2h2v2h4V6h-4v2zm.3.5l1 1.2-3 2.3 3 2.3-1 1.2L12 13l-3.3 2.6-1-1.2 3-2.3-3-2.3 1-1.2L12 11l3.3-2.5z"/></svg>',"table-delete-row":'<svg width="24" height="24"><path fill-rule="nonzero" d="M19 4a2 2 0 012 2v12a2 2 0 01-2 2H5a2 2 0 01-2-2V6c0-1.1.9-2 2-2h14zm0 2H5v3h2.5v2H5v2h2.5v2H5v3h14v-3h-2.5v-2H19v-2h-2.5V9H19V6zm-4.7 1.8l1.2 1L13 12l2.6 3.3-1.2 1-2.3-3-2.3 3-1.2-1L11 12 8.5 8.7l1.2-1 2.3 3 2.3-3z"/></svg>',"table-delete-table":'<svg width="24" height="24"><g fill-rule="nonzero"><path d="M19 4a2 2 0 012 2v12a2 2 0 01-2 2H5a2 2 0 01-2-2V6c0-1.1.9-2 2-2h14zM5 6v12h14V6H5z"/><path d="M14.4 8.6l1 1-2.3 2.4 2.3 2.4-1 1-2.4-2.3-2.4 2.3-1-1 2.3-2.4-2.3-2.4 1-1 2.4 2.3z"/></g></svg>',"table-insert-column-after":'<svg width="24" height="24"><path fill-rule="nonzero" d="M20 4c.6 0 1 .4 1 1v2a1 1 0 01-2 0V6h-8v12h8v-1a1 1 0 012 0v2c0 .5-.4 1-.9 1H5a2 2 0 01-2-2V6c0-1.1.9-2 2-2h15zM9 13H5v5h4v-5zm7-5c.5 0 1 .4 1 .9V11h2a1 1 0 01.1 2H17v2a1 1 0 01-2 .1V13h-2a1 1 0 01-.1-2H15V9c0-.6.4-1 1-1zM9 6H5v5h4V6z"/></svg>',"table-insert-column-before":'<svg width="24" height="24"><path fill-rule="nonzero" d="M19 4a2 2 0 012 2v12a2 2 0 01-2 2H4a1 1 0 01-1-1v-2a1 1 0 012 0v1h8V6H5v1a1 1 0 11-2 0V5c0-.6.4-1 1-1h15zm0 9h-4v5h4v-5zM8 8c.5 0 1 .4 1 .9V11h2a1 1 0 01.1 2H9v2a1 1 0 01-2 .1V13H5a1 1 0 01-.1-2H7V9c0-.6.4-1 1-1zm11-2h-4v5h4V6z"/></svg>',"table-insert-row-above":'<svg width="24" height="24"><path fill-rule="nonzero" d="M6 4a1 1 0 110 2H5v6h14V6h-1a1 1 0 010-2h2c.6 0 1 .4 1 1v13a2 2 0 01-2 2H5a2 2 0 01-2-2V5c0-.6.4-1 1-1h2zm5 10H5v4h6v-4zm8 0h-6v4h6v-4zM12 3c.5 0 1 .4 1 .9V6h2a1 1 0 010 2h-2v2a1 1 0 01-2 .1V8H9a1 1 0 010-2h2V4c0-.6.4-1 1-1z"/></svg>',"table-insert-row-after":'<svg width="24" height="24"><path fill-rule="nonzero" d="M12 13c.5 0 1 .4 1 .9V16h2a1 1 0 01.1 2H13v2a1 1 0 01-2 .1V18H9a1 1 0 01-.1-2H11v-2c0-.6.4-1 1-1zm6 7a1 1 0 010-2h1v-6H5v6h1a1 1 0 010 2H4a1 1 0 01-1-1V6c0-1.1.9-2 2-2h14a2 2 0 012 2v13c0 .5-.4 1-.9 1H18zM11 6H5v4h6V6zm8 0h-6v4h6V6z"/></svg>',"table-left-header":'<svg width="24" height="24"><path d="M19 4a2 2 0 012 2v12a2 2 0 01-2 2H5a2 2 0 01-2-2V6c0-1.1.9-2 2-2h14zm0 9h-4v5h4v-5zm-6 0H9v5h4v-5zm0-7H9v5h4V6zm6 0h-4v5h4V6z"/></svg>',"table-merge-cells":'<svg width="24" height="24"><path fill-rule="nonzero" d="M19 4a2 2 0 012 2v12a2 2 0 01-2 2H5a2 2 0 01-2-2V6c0-1.1.9-2 2-2h14zM5 15.5V18h3v-2.5H5zm14-5h-9V18h9v-7.5zM19 6h-4v2.5h4V6zM8 6H5v2.5h3V6zm5 0h-3v2.5h3V6zm-8 7.5h3v-3H5v3z"/></svg>',"table-row-numbering-rtl":'<svg width="24" height="24"><path d="M6 4a2 2 0 00-2 2v13c0 1.1.9 2 2 2h12a2 2 0 002-2V6a2 2 0 00-2-2H6zm0 12h8v3H6v-3zm11 0c.6 0 1 .4 1 1v1a1 1 0 01-2 0v-1c0-.6.4-1 1-1zM6 11h8v3H6v-3zm11 0c.6 0 1 .4 1 1v1a1 1 0 01-2 0v-1c0-.6.4-1 1-1zM6 6h8v3H6V6zm11 0c.6 0 1 .4 1 1v1a1 1 0 11-2 0V7c0-.6.4-1 1-1z"/></svg>',"table-row-numbering":'<svg width="24" height="24"><path d="M18 4a2 2 0 012 2v13a2 2 0 01-2 2H6a2 2 0 01-2-2V6c0-1.1.9-2 2-2h12zm0 12h-8v3h8v-3zM7 16a1 1 0 00-1 1v1a1 1 0 002 0v-1c0-.6-.4-1-1-1zm11-5h-8v3h8v-3zM7 11a1 1 0 00-1 1v1a1 1 0 002 0v-1c0-.6-.4-1-1-1zm11-5h-8v3h8V6zM7 6a1 1 0 00-1 1v1a1 1 0 102 0V7c0-.6-.4-1-1-1z"/></svg>',"table-row-properties":'<svg width="24" height="24"><path fill-rule="nonzero" d="M19 4a2 2 0 012 2v12a2 2 0 01-2 2H5a2 2 0 01-2-2V6c0-1.1.9-2 2-2h14zM5 15v3h6v-3H5zm14 0h-6v3h6v-3zm0-9h-6v3h6V6zM5 9h6V6H5v3z"/></svg>',"table-split-cells":'<svg width="24" height="24"><path fill-rule="nonzero" d="M19 4a2 2 0 012 2v12a2 2 0 01-2 2H5a2 2 0 01-2-2V6c0-1.1.9-2 2-2h14zM8 15.5H5V18h3v-2.5zm11-5h-9V18h9v-7.5zm-2.5 1l1 1-2 2 2 2-1 1-2-2-2 2-1-1 2-2-2-2 1-1 2 2 2-2zm-8.5-1H5v3h3v-3zM19 6h-4v2.5h4V6zM8 6H5v2.5h3V6zm5 0h-3v2.5h3V6z"/></svg>',"table-top-header":'<svg width="24" height="24"><path d="M19 4a2 2 0 012 2v12a2 2 0 01-2 2H5a2 2 0 01-2-2V6c0-1.1.9-2 2-2h14zm-8 11H5v3h6v-3zm8 0h-6v3h6v-3zm0-5h-6v3h6v-3zM5 13h6v-3H5v3z"/></svg>',table:'<svg width="24" height="24"><path fill-rule="nonzero" d="M19 4a2 2 0 012 2v12a2 2 0 01-2 2H5a2 2 0 01-2-2V6c0-1.1.9-2 2-2h14zM5 14v4h6v-4H5zm14 0h-6v4h6v-4zm0-6h-6v4h6V8zM5 12h6V8H5v4z"/></svg>',template:'<svg width="24" height="24"><path d="M19 19v-1H5v1h14zM9 16v-4a5 5 0 116 0v4h4a2 2 0 012 2v3H3v-3c0-1.1.9-2 2-2h4zm4 0v-5l.8-.6a3 3 0 10-3.6 0l.8.6v5h2z" fill-rule="nonzero"/></svg>',"temporary-placeholder":'<svg width="24" height="24"><g fill-rule="evenodd"><path d="M9 7.6V6h2.5V4.5a.5.5 0 111 0V6H15v1.6a8 8 0 11-6 0zm-2.6 5.3a.5.5 0 00.3.6c.3 0 .6 0 .6-.3l.1-.2a5 5 0 013.3-2.8c.3-.1.4-.4.4-.6-.1-.3-.4-.5-.6-.4a6 6 0 00-4.1 3.7z"/><circle cx="14" cy="4" r="1"/><circle cx="12" cy="2" r="1"/><circle cx="10" cy="4" r="1"/></g></svg>',"text-color":'<svg width="24" height="24"><g fill-rule="evenodd"><path id="tox-icon-text-color__color" d="M3 18h18v3H3z"/><path d="M8.7 16h-.8a.5.5 0 01-.5-.6l2.7-9c.1-.3.3-.4.5-.4h2.8c.2 0 .4.1.5.4l2.7 9a.5.5 0 01-.5.6h-.8a.5.5 0 01-.4-.4l-.7-2.2c0-.3-.3-.4-.5-.4h-3.4c-.2 0-.4.1-.5.4l-.7 2.2c0 .3-.2.4-.4.4zm2.6-7.6l-.6 2a.5.5 0 00.5.6h1.6a.5.5 0 00.5-.6l-.6-2c0-.3-.3-.4-.5-.4h-.4c-.2 0-.4.1-.5.4z"/></g></svg>',toc:'<svg width="24" height="24"><path d="M5 5c.6 0 1 .4 1 1s-.4 1-1 1a1 1 0 110-2zm3 0h11c.6 0 1 .4 1 1s-.4 1-1 1H8a1 1 0 110-2zm-3 8c.6 0 1 .4 1 1s-.4 1-1 1a1 1 0 010-2zm3 0h11c.6 0 1 .4 1 1s-.4 1-1 1H8a1 1 0 010-2zm0-4c.6 0 1 .4 1 1s-.4 1-1 1a1 1 0 110-2zm3 0h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 010-2zm-3 8c.6 0 1 .4 1 1s-.4 1-1 1a1 1 0 010-2zm3 0h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 010-2z" fill-rule="evenodd"/></svg>',translate:'<svg width="24" height="24"><path d="M12.7 14.3l-.3.7-.4.7-2.2-2.2-3.1 3c-.3.4-.8.4-1 0a.7.7 0 010-1l3.1-3A12.4 12.4 0 016.7 9H8a10.1 10.1 0 001.7 2.4c.5-.5 1-1.1 1.4-1.8l.9-2H4.7a.7.7 0 110-1.5h4.4v-.7c0-.4.3-.8.7-.8.4 0 .7.4.7.8v.7H15c.4 0 .8.3.8.7 0 .4-.4.8-.8.8h-1.4a12.3 12.3 0 01-1 2.4 13.5 13.5 0 01-1.7 2.3l1.9 1.8zm4.3-3l2.7 7.3a.5.5 0 01-.4.7 1 1 0 01-1-.7l-.6-1.5h-3.4l-.6 1.5a1 1 0 01-1 .7.5.5 0 01-.4-.7l2.7-7.4a1 1 0 012 0zm-2.2 4.4h2.4L16 12.5l-1.2 3.2z" fill-rule="evenodd"/></svg>',underline:'<svg width="24" height="24"><path d="M16 5c.6 0 1 .4 1 1v5.5a4 4 0 01-.4 1.8l-1 1.4a5.3 5.3 0 01-5.5 1 5 5 0 01-1.6-1c-.5-.4-.8-.9-1.1-1.4a4 4 0 01-.4-1.8V6c0-.6.4-1 1-1s1 .4 1 1v5.5c0 .3 0 .6.2 1l.6.7a3.3 3.3 0 002.2.8 3.4 3.4 0 002.2-.8c.3-.2.4-.5.6-.8l.2-.9V6c0-.6.4-1 1-1zM8 17h8c.6 0 1 .4 1 1s-.4 1-1 1H8a1 1 0 010-2z" fill-rule="evenodd"/></svg>',undo:'<svg width="24" height="24"><path d="M6.4 8H12c3.7 0 6.2 2 6.8 5.1.6 2.7-.4 5.6-2.3 6.8a1 1 0 01-1-1.8c1.1-.6 1.8-2.7 1.4-4.6-.5-2.1-2.1-3.5-4.9-3.5H6.4l3.3 3.3a1 1 0 11-1.4 1.4l-5-5a1 1 0 010-1.4l5-5a1 1 0 011.4 1.4L6.4 8z" fill-rule="nonzero"/></svg>',unlink:'<svg width="24" height="24"><path d="M6.2 12.3a1 1 0 011.4 1.4l-2 2a2 2 0 102.6 2.8l4.8-4.8a1 1 0 000-1.4 1 1 0 111.4-1.3 2.9 2.9 0 010 4L9.6 20a3.9 3.9 0 01-5.5-5.5l2-2zm11.6-.6a1 1 0 01-1.4-1.4l2.1-2a2 2 0 10-2.7-2.8L11 10.3a1 1 0 000 1.4A1 1 0 119.6 13a2.9 2.9 0 010-4L14.4 4a3.9 3.9 0 015.5 5.5l-2 2zM7.6 6.3a.8.8 0 01-1 1.1L3.3 4.2a.7.7 0 111-1l3.2 3.1zM5.1 8.6a.8.8 0 010 1.5H3a.8.8 0 010-1.5H5zm5-3.5a.8.8 0 01-1.5 0V3a.8.8 0 011.5 0V5zm6 11.8a.8.8 0 011-1l3.2 3.2a.8.8 0 01-1 1L16 17zm-2.2 2a.8.8 0 011.5 0V21a.8.8 0 01-1.5 0V19zm5-3.5a.7.7 0 110-1.5H21a.8.8 0 010 1.5H19z" fill-rule="nonzero"/></svg>',unlock:'<svg width="24" height="24"><path d="M16 5c.8 0 1.5.3 2.1.9.6.6.9 1.3.9 2.1v3h-2V8a1 1 0 00-.3-.7A1 1 0 0016 7h-2a1 1 0 00-.7.3 1 1 0 00-.3.7v3h.3c.2 0 .3 0 .5.2l.2.6v7.4c0 .3 0 .4-.2.6l-.6.2H4.8c-.3 0-.4 0-.6-.2a.7.7 0 01-.2-.6v-7.4c0-.3 0-.4.2-.6l.5-.2H11V8c0-.8.3-1.5.9-2.1.6-.6 1.3-.9 2.1-.9h2z" fill-rule="evenodd"/></svg>',"unordered-list":'<svg width="24" height="24"><path d="M11 5h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 010-2zm0 6h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 010-2zm0 6h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 010-2zM4.5 6c0-.4.1-.8.4-1 .3-.4.7-.5 1.1-.5.4 0 .8.1 1 .4.4.3.5.7.5 1.1 0 .4-.1.8-.4 1-.3.4-.7.5-1.1.5-.4 0-.8-.1-1-.4-.4-.3-.5-.7-.5-1.1zm0 6c0-.4.1-.8.4-1 .3-.4.7-.5 1.1-.5.4 0 .8.1 1 .4.4.3.5.7.5 1.1 0 .4-.1.8-.4 1-.3.4-.7.5-1.1.5-.4 0-.8-.1-1-.4-.4-.3-.5-.7-.5-1.1zm0 6c0-.4.1-.8.4-1 .3-.4.7-.5 1.1-.5.4 0 .8.1 1 .4.4.3.5.7.5 1.1 0 .4-.1.8-.4 1-.3.4-.7.5-1.1.5-.4 0-.8-.1-1-.4-.4-.3-.5-.7-.5-1.1z" fill-rule="evenodd"/></svg>',unselected:'<svg width="24" height="24"><path fill-rule="nonzero" d="M6 4h12a2 2 0 012 2v12a2 2 0 01-2 2H6a2 2 0 01-2-2V6c0-1.1.9-2 2-2zm0 1a1 1 0 00-1 1v12c0 .6.4 1 1 1h12c.6 0 1-.4 1-1V6c0-.6-.4-1-1-1H6z"/></svg>',upload:'<svg width="24" height="24"><path d="M18 19v-2a1 1 0 012 0v3c0 .6-.4 1-1 1H5a1 1 0 01-1-1v-3a1 1 0 012 0v2h12zM11 6.4L8.7 8.7a1 1 0 01-1.4-1.4l4-4a1 1 0 011.4 0l4 4a1 1 0 11-1.4 1.4L13 6.4V16a1 1 0 01-2 0V6.4z" fill-rule="nonzero"/></svg>',user:'<svg width="24" height="24"><path d="M12 24a12 12 0 110-24 12 12 0 010 24zm-8.7-5.3a11 11 0 0017.4 0C19.4 16.3 14.6 15 12 15c-2.6 0-7.4 1.3-8.7 3.7zM12 13c2.2 0 4-2 4-4.5S14.2 4 12 4 8 6 8 8.5 9.8 13 12 13z" fill-rule="nonzero"/></svg>',"vertical-align":'<svg width="24" height="24"><g fill-rule="nonzero"><rect width="18" height="2" x="3" y="11" rx="1"/><path d="M12 2c.6 0 1 .4 1 1v4l2-1.3a1 1 0 011.2 1.5l-.1.1-4.1 3-4-3a1 1 0 011-1.7l2 1.5V3c0-.6.4-1 1-1zm0 11.8l4 2.9a1 1 0 01-1 1.7l-2-1.5V21c0 .5-.4 1-.9 1H12a1 1 0 01-1-1v-4l-2 1.3a1 1 0 01-1.2-.1l-.1-.1a1 1 0 01.1-1.3l.1-.1 4.1-3z"/></g></svg>',visualblocks:'<svg width="24" height="24"><path d="M9 19v2H7v-2h2zm-4 0v2a2 2 0 01-2-2h2zm8 0v2h-2v-2h2zm8 0a2 2 0 01-2 2v-2h2zm-4 0v2h-2v-2h2zM15 7a1 1 0 010 2v7a1 1 0 01-2 0V9h-1v7a1 1 0 01-2 0v-4a2.5 2.5 0 01-.2-5H15zM5 15v2H3v-2h2zm16 0v2h-2v-2h2zM5 11v2H3v-2h2zm16 0v2h-2v-2h2zM5 7v2H3V7h2zm16 0v2h-2V7h2zM5 3v2H3c0-1.1.9-2 2-2zm8 0v2h-2V3h2zm6 0a2 2 0 012 2h-2V3zM9 3v2H7V3h2zm8 0v2h-2V3h2z" fill-rule="evenodd"/></svg>',visualchars:'<svg width="24" height="24"><path d="M10 5h7a1 1 0 010 2h-1v11a1 1 0 01-2 0V7h-2v11a1 1 0 01-2 0v-6c-.5 0-1 0-1.4-.3A3.4 3.4 0 016.8 10a3.3 3.3 0 010-2.8 3.4 3.4 0 011.8-1.8L10 5z" fill-rule="evenodd"/></svg>',warning:'<svg width="24" height="24"><path d="M19.8 18.3c.2.5.3.9 0 1.2-.1.3-.5.5-1 .5H5.2c-.5 0-.9-.2-1-.5-.3-.3-.2-.7 0-1.2L11 4.7l.5-.5.5-.2c.2 0 .3 0 .5.2.2 0 .3.3.5.5l6.8 13.6zM12 18c.3 0 .5-.1.7-.3.2-.2.3-.4.3-.7a1 1 0 00-.3-.7 1 1 0 00-.7-.3 1 1 0 00-.7.3 1 1 0 00-.3.7c0 .3.1.5.3.7.2.2.4.3.7.3zm.7-3l.3-4a1 1 0 00-.3-.7 1 1 0 00-.7-.3 1 1 0 00-.7.3 1 1 0 00-.3.7l.3 4h1.4z" fill-rule="evenodd"/></svg>',"zoom-in":'<svg width="24" height="24"><path d="M16 17.3a8 8 0 111.4-1.4l4.3 4.4a1 1 0 01-1.4 1.4l-4.4-4.3zm-5-.3a6 6 0 100-12 6 6 0 000 12zm-1-9a1 1 0 012 0v6a1 1 0 01-2 0V8zm-2 4a1 1 0 010-2h6a1 1 0 010 2H8z" fill-rule="nonzero"/></svg>',"zoom-out":'<svg width="24" height="24"><path d="M16 17.3a8 8 0 111.4-1.4l4.3 4.4a1 1 0 01-1.4 1.4l-4.4-4.3zm-5-.3a6 6 0 100-12 6 6 0 000 12zm-3-5a1 1 0 010-2h6a1 1 0 010 2H8z" fill-rule="nonzero"/></svg>'}})},84306:(qe,I,p)=>{p(63036)},40944:(qe,I,p)=>{p(96823)},96823:()=>{!function(){"use strict";var oe,me,qe=tinymce.util.Tools.resolve("tinymce.PluginManager"),I=function(oe,me,be){var le="UL"===me?"InsertUnorderedList":"InsertOrderedList";oe.execCommand(le,!1,!1===be?null:{"list-style-type":be})},p=function(oe){oe.addCommand("ApplyUnorderedListStyle",function(me,be){I(oe,"UL",be["list-style-type"])}),oe.addCommand("ApplyOrderedListStyle",function(me,be){I(oe,"OL",be["list-style-type"])})},o=tinymce.util.Tools.resolve("tinymce.util.Tools"),D=function(){},g=function(oe){return function(){return oe}},E=function(oe){return oe},T=g(!1),n=g(!0),P=function(){return w},w={fold:function(le,Z){return le()},isSome:T,isNone:n,getOr:me=E,getOrThunk:oe=function(le){return le()},getOrDie:function(le){throw new Error(le||"error: getOrDie called on none.")},getOrNull:g(null),getOrUndefined:g(void 0),or:me,orThunk:oe,map:P,each:D,bind:P,exists:T,forall:n,filter:function(){return P()},toArray:function(){return[]},toString:g("none()")},B=function(oe){var me=g(oe),be=function(){return Z},le=function(Oe){return Oe(oe)},Z={fold:function(Oe,j){return j(oe)},isSome:n,isNone:T,getOr:me,getOrThunk:me,getOrDie:me,getOrNull:me,getOrUndefined:me,or:be,orThunk:be,map:function(Oe){return B(Oe(oe))},each:function(Oe){Oe(oe)},bind:le,exists:le,forall:le,filter:function(Oe){return Oe(oe)?Z:w},toArray:function(){return[oe]},toString:function(){return"some("+oe+")"}};return Z},V_from=function(oe){return null==oe?w:B(oe)},he=function(oe){return oe&&/^(TH|TD)$/.test(oe.nodeName)},ne=function(oe,me){return function(be){var le=function(Z){be.setActive(function(oe,me,be){var le=function(oe,me){for(var be=0;be<oe.length;be++)if(me(oe[be]))return be;return-1}(me.parents,he),Z=-1!==le?me.parents.slice(0,le):me.parents,Oe=o.grep(Z,function(oe){return function(me){return me&&/^(OL|UL|DL)$/.test(me.nodeName)&&function(oe,me){return oe.$.contains(oe.getBody(),me)}(oe,me)}}(oe));return Oe.length>0&&Oe[0].nodeName===be}(oe,Z,me))};return oe.on("NodeChange",le),function(){return oe.off("NodeChange",le)}}},pe=function(oe,me,be,le,Z,Oe){oe.ui.registry.addSplitButton(me,{tooltip:be,icon:"OL"===Z?"ordered-list":"unordered-list",presets:"listpreview",columns:3,fetch:function(j){var ke=o.map(Oe,function(Be){var nt="OL"===Z?"num":"bull",mt="disc"===Be||"decimal"===Be?"default":Be,ut="default"===Be?"":Be,Ve=function(oe){return oe.replace(/\-/g," ").replace(/\b\w/g,function(me){return me.toUpperCase()})}(Be);return{type:"choiceitem",value:ut,icon:"list-"+nt+"-"+mt,text:Ve}});j(ke)},onAction:function(){return oe.execCommand(le)},onItemAction:function(j,ke){I(oe,Z,ke)},select:function(j){var ke=function(oe){var me=oe.dom.getParent(oe.selection.getNode(),"ol,ul"),be=oe.dom.getStyle(me,"listStyleType");return V_from(be)}(oe);return ke.map(function(Be){return j===Be}).getOr(!1)},onSetup:ne(oe,Z)})},xe=function(oe,me,be,le,Z,Oe){Oe.length>1?pe(oe,me,be,le,Z,Oe):function(oe,me,be,le,Z,Oe){oe.ui.registry.addToggleButton(me,{active:!1,tooltip:be,icon:"OL"===Z?"ordered-list":"unordered-list",onSetup:ne(oe,Z),onAction:function(){return oe.execCommand(le)}})}(oe,me,be,le,Z)},de=function(oe){xe(oe,"numlist","Numbered list","InsertOrderedList","OL",function(oe){var me=oe.getParam("advlist_number_styles","default,lower-alpha,lower-greek,lower-roman,upper-alpha,upper-roman");return me?me.split(/[ ,]/):[]}(oe)),xe(oe,"bullist","Bullet list","InsertUnorderedList","UL",function(oe){var me=oe.getParam("advlist_bullet_styles","default,circle,square");return me?me.split(/[ ,]/):[]}(oe))};!function re(){qe.add("advlist",function(oe){oe.hasPlugin("lists")?(de(oe),p(oe)):console.error("Please use the Lists plugin together with the Advanced List plugin.")})}()}()},66827:(qe,I,p)=>{p(51032)},51032:()=>{!function(){"use strict";var yt,qe=tinymce.util.Tools.resolve("tinymce.PluginManager"),I=function(){return I=Object.assign||function(Dt){for(var We,Rt=1,Qn=arguments.length;Rt<Qn;Rt++)for(var fi in We=arguments[Rt])Object.prototype.hasOwnProperty.call(We,fi)&&(Dt[fi]=We[fi]);return Dt},I.apply(this,arguments)},o=function(yt){return function(Dt){return function(yt){var Dt=typeof yt;return null===yt?"null":"object"===Dt&&(Array.prototype.isPrototypeOf(yt)||yt.constructor&&"Array"===yt.constructor.name)?"array":"object"===Dt&&(String.prototype.isPrototypeOf(yt)||yt.constructor&&"String"===yt.constructor.name)?"string":Dt}(Dt)===yt}},e=function(yt){return function(Dt){return typeof Dt===yt}},D=o("string"),g=o("object"),E=o("array"),T=(yt=null,function(Dt){return yt===Dt}),n=e("boolean"),w=function(yt){return!function(yt){return null==yt}(yt)},B=e("function"),Y=e("number"),V=function(){},ue=function(yt){return function(){return yt}},he=function(yt){return yt},ae=ue(!1),X=ue(!0),ve=function(){return ye},ye=function(){var yt=function(Rt){return Rt()},Dt=he;return{fold:function(Rt,Qn){return Rt()},isSome:ae,isNone:X,getOr:Dt,getOrThunk:yt,getOrDie:function(Rt){throw new Error(Rt||"error: getOrDie called on none.")},getOrNull:ue(null),getOrUndefined:ue(void 0),or:Dt,orThunk:yt,map:ve,each:V,bind:ve,exists:ae,forall:X,filter:function(){return ve()},toArray:function(){return[]},toString:ue("none()")}}(),ge=function(yt){var Dt=ue(yt),We=function(){return Qn},Rt=function(fi){return fi(yt)},Qn={fold:function(fi,Xi){return Xi(yt)},isSome:X,isNone:ae,getOr:Dt,getOrThunk:Dt,getOrDie:Dt,getOrNull:Dt,getOrUndefined:Dt,or:We,orThunk:We,map:function(fi){return ge(fi(yt))},each:function(fi){fi(yt)},bind:Rt,exists:Rt,forall:Rt,filter:function(fi){return fi(yt)?Qn:ye},toArray:function(){return[yt]},toString:function(){return"some("+yt+")"}};return Qn},pe={some:ge,none:ve,from:function(yt){return null==yt?ye:ge(yt)}},Pe=Object.keys,xe=Object.hasOwnProperty,oe=function(yt,Dt,We,Rt){return function(yt,Dt){for(var We=Pe(yt),Rt=0,Qn=We.length;Rt<Qn;Rt++){var fi=We[Rt];Dt(yt[fi],fi)}}(yt,function(fi,Xi){(Dt(fi,Xi)?We:Rt)(fi,Xi)}),{}},be=function(yt,Dt){return xe.call(yt,Dt)},Z=Array.prototype.push,Oe=function(yt){for(var Dt=[],We=0,Rt=yt.length;We<Rt;++We){if(!E(yt[We]))throw new Error("Arr.flatten item "+We+" was not an array, input: "+yt);Z.apply(Dt,yt[We])}return Dt},ke=function(yt){return function(yt,Dt){return Dt>=0&&Dt<yt.length?pe.some(yt[Dt]):pe.none()}(yt,0)};typeof window<"u"||Function("return this;")();var mt=function(yt,Dt,We){!function(yt,Dt,We){if(!(D(We)||n(We)||Y(We)))throw console.error("Invalid call to Attribute.set. Key ",Dt,":: Value ",We,":: Element ",yt),new Error("Attribute value was not simple");yt.setAttribute(Dt,We+"")}(yt.dom,Dt,We)},wt=function(yt){if(null==yt)throw new Error("Node cannot be null or undefined");return{dom:yt}},Ct={fromHtml:function(yt,Dt){var Rt=(Dt||document).createElement("div");if(Rt.innerHTML=yt,!Rt.hasChildNodes()||Rt.childNodes.length>1)throw console.error("HTML does not have a single root node",yt),new Error("HTML must have a single root node");return wt(Rt.childNodes[0])},fromTag:function(yt,Dt){var Rt=(Dt||document).createElement(yt);return wt(Rt)},fromText:function(yt,Dt){var Rt=(Dt||document).createTextNode(yt);return wt(Rt)},fromDom:wt,fromPoint:function(yt,Dt,We){return pe.from(yt.dom.elementFromPoint(Dt,We)).map(wt)}},rn=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),He=tinymce.util.Tools.resolve("tinymce.util.Promise"),st=tinymce.util.Tools.resolve("tinymce.util.URI"),nn=tinymce.util.Tools.resolve("tinymce.util.XHR"),Dn=function(yt){return yt.getParam("image_dimensions",!0,"boolean")},ui=function(yt,Dt){return Math.max(parseInt(yt,10),parseInt(Dt,10))},si=function(yt){return yt&&(yt=yt.replace(/px$/,"")),yt},Vi=function(yt){return yt.length>0&&/^[0-9]+$/.test(yt)&&(yt+="px"),yt},Vn=function(yt){if(yt.margin){var Dt=String(yt.margin).split(" ");switch(Dt.length){case 1:yt["margin-top"]=yt["margin-top"]||Dt[0],yt["margin-right"]=yt["margin-right"]||Dt[0],yt["margin-bottom"]=yt["margin-bottom"]||Dt[0],yt["margin-left"]=yt["margin-left"]||Dt[0];break;case 2:yt["margin-top"]=yt["margin-top"]||Dt[0],yt["margin-right"]=yt["margin-right"]||Dt[1],yt["margin-bottom"]=yt["margin-bottom"]||Dt[0],yt["margin-left"]=yt["margin-left"]||Dt[1];break;case 3:yt["margin-top"]=yt["margin-top"]||Dt[0],yt["margin-right"]=yt["margin-right"]||Dt[1],yt["margin-bottom"]=yt["margin-bottom"]||Dt[2],yt["margin-left"]=yt["margin-left"]||Dt[1];break;case 4:yt["margin-top"]=yt["margin-top"]||Dt[0],yt["margin-right"]=yt["margin-right"]||Dt[1],yt["margin-bottom"]=yt["margin-bottom"]||Dt[2],yt["margin-left"]=yt["margin-left"]||Dt[3]}delete yt.margin}return yt},In=function(yt){return"IMG"===yt.nodeName&&(yt.hasAttribute("data-mce-object")||yt.hasAttribute("data-mce-placeholder"))},Zi=function(yt,Dt){return st.isDomSafe(Dt,"img",yt.settings)},gr=rn.DOM,Hi=function(yt){return yt.style.marginLeft&&yt.style.marginRight&&yt.style.marginLeft===yt.style.marginRight?si(yt.style.marginLeft):""},Gr=function(yt){return yt.style.marginTop&&yt.style.marginBottom&&yt.style.marginTop===yt.style.marginBottom?si(yt.style.marginTop):""},zr=function(yt){return yt.style.borderWidth?si(yt.style.borderWidth):""},Eo=function(yt,Dt){return yt.hasAttribute(Dt)?yt.getAttribute(Dt):""},mr=function(yt,Dt){return yt.style[Dt]?yt.style[Dt]:""},jn=function(yt){return null!==yt.parentNode&&"FIGURE"===yt.parentNode.nodeName},ct=function(yt,Dt,We){""===We?yt.removeAttribute(Dt):yt.setAttribute(Dt,We)},Ni=function(yt){jn(yt)?function(yt){var Dt=yt.parentNode;gr.insertAfter(yt,Dt),gr.remove(Dt)}(yt):function(yt){var Dt=gr.create("figure",{class:"image"});gr.insertAfter(Dt,yt),Dt.appendChild(yt),Dt.appendChild(gr.create("figcaption",{contentEditable:"true"},"Caption")),Dt.contentEditable="false"}(yt)},Nn=function(yt,Dt){var We=yt.getAttribute("style"),Rt=Dt(null!==We?We:"");Rt.length>0?(yt.setAttribute("style",Rt),yt.setAttribute("data-mce-style",Rt)):yt.removeAttribute("style")},pr=function(yt,Dt){return function(We,Rt,Qn){We.style[Rt]?(We.style[Rt]=Vi(Qn),Nn(We,Dt)):ct(We,Rt,Qn)}},Sn=function(yt,Dt){return yt.style[Dt]?si(yt.style[Dt]):Eo(yt,Dt)},Pn=function(yt,Dt){var We=Vi(Dt);yt.style.marginLeft=We,yt.style.marginRight=We},Nt=function(yt,Dt){var We=Vi(Dt);yt.style.marginTop=We,yt.style.marginBottom=We},ai=function(yt,Dt){var We=Vi(Dt);yt.style.borderWidth=We},hn=function(yt,Dt){yt.style.borderStyle=Dt},ce=function(yt){return"FIGURE"===yt.nodeName},Qe=function(yt){return 0===gr.getAttrib(yt,"alt").length&&"presentation"===gr.getAttrib(yt,"role")},qt=function(yt){return Qe(yt)?"":Eo(yt,"alt")},lr=function(yt,Dt){var We=document.createElement("img");return ct(We,"style",Dt.style),(Hi(We)||""!==Dt.hspace)&&Pn(We,Dt.hspace),(Gr(We)||""!==Dt.vspace)&&Nt(We,Dt.vspace),(zr(We)||""!==Dt.border)&&ai(We,Dt.border),(function(yt){return mr(yt,"borderStyle")}(We)||""!==Dt.borderStyle)&&hn(We,Dt.borderStyle),yt(We.getAttribute("style"))},rr=function(yt,Dt){return{src:Eo(Dt,"src"),alt:qt(Dt),title:Eo(Dt,"title"),width:Sn(Dt,"width"),height:Sn(Dt,"height"),class:Eo(Dt,"class"),style:yt(Eo(Dt,"style")),caption:jn(Dt),hspace:Hi(Dt),vspace:Gr(Dt),border:zr(Dt),borderStyle:mr(Dt,"borderStyle"),isDecorative:Qe(Dt)}},aa=function(yt,Dt,We,Rt,Qn){We[Rt]!==Dt[Rt]&&Qn(yt,Rt,We[Rt])},ea=function(yt,Dt,We){if(We){gr.setAttrib(yt,"role","presentation");var Rt=Ct.fromDom(yt);mt(Rt,"alt","")}else{if(T(Dt)){!function(yt,Dt){yt.dom.removeAttribute(Dt)}(Rt=Ct.fromDom(yt),"alt")}else{Rt=Ct.fromDom(yt);mt(Rt,"alt",Dt)}"presentation"===gr.getAttrib(yt,"role")&&gr.setAttrib(yt,"role","")}},Ii=function(yt,Dt){return function(We,Rt,Qn){yt(We,Qn),Nn(We,Dt)}},an=function(yt,Dt,We){var Rt=rr(yt,We);aa(We,Rt,Dt,"caption",function(Qn,fi,Xi){return Ni(Qn)}),aa(We,Rt,Dt,"src",ct),aa(We,Rt,Dt,"title",ct),aa(We,Rt,Dt,"width",pr(0,yt)),aa(We,Rt,Dt,"height",pr(0,yt)),aa(We,Rt,Dt,"class",ct),aa(We,Rt,Dt,"style",Ii(function(Qn,fi){return ct(Qn,"style",fi)},yt)),aa(We,Rt,Dt,"hspace",Ii(Pn,yt)),aa(We,Rt,Dt,"vspace",Ii(Nt,yt)),aa(We,Rt,Dt,"border",Ii(ai,yt)),aa(We,Rt,Dt,"borderStyle",Ii(hn,yt)),function(yt,Dt,We){(We.alt!==Dt.alt||We.isDecorative!==Dt.isDecorative)&&ea(yt,We.alt,We.isDecorative)}(We,Rt,Dt)},Zn=function(yt,Dt){var We=yt.dom.styles.parse(Dt),Rt=Vn(We),Qn=yt.dom.styles.parse(yt.dom.styles.serialize(Rt));return yt.dom.styles.serialize(Qn)},Ci=function(yt){var Dt=yt.selection.getNode(),We=yt.dom.getParent(Dt,"figure.image");return We?yt.dom.select("img",We)[0]:Dt&&("IMG"!==Dt.nodeName||In(Dt))?null:Dt},Xn=function(yt,Dt){var We=yt.dom,Rt=function(yt,Dt){var We={};return oe(yt,Dt,function(yt){return function(Dt,We){yt[We]=Dt}}(We),V),We}(yt.schema.getTextBlockElements(),function(fi,Xi){return!yt.schema.isValidChild(Xi,"figure")}),Qn=We.getParent(Dt.parentNode,function(fi){return function(yt,Dt){return be(yt,Dt)&&void 0!==yt[Dt]&&null!==yt[Dt]}(Rt,fi.nodeName)},yt.getBody());return Qn?We.split(Qn,Dt):Dt},gn=function(yt,Dt){var We=function(yt,Dt){var We=document.createElement("img");if(an(yt,I(I({},Dt),{caption:!1}),We),ea(We,Dt.alt,Dt.isDecorative),Dt.caption){var Rt=gr.create("figure",{class:"image"});return Rt.appendChild(We),Rt.appendChild(gr.create("figcaption",{contentEditable:"true"},"Caption")),Rt.contentEditable="false",Rt}return We}(function(fi){return Zn(yt,fi)},Dt);yt.dom.setAttrib(We,"data-mce-id","__mcenew"),yt.focus(),yt.selection.setContent(We.outerHTML);var Rt=yt.dom.select('*[data-mce-id="__mcenew"]')[0];if(yt.dom.setAttrib(Rt,"data-mce-id",null),ce(Rt)){var Qn=Xn(yt,Rt);yt.selection.select(Qn)}else yt.selection.select(Rt)},Ft=function(yt,Dt){var We=Ci(yt);if(an(function(Qn){return Zn(yt,Qn)},Dt,We),function(yt,Dt){yt.dom.setAttrib(Dt,"src",Dt.getAttribute("src"))}(yt,We),ce(We.parentNode)){var Rt=We.parentNode;Xn(yt,Rt),yt.selection.select(We.parentNode)}else yt.selection.select(We),function(yt,Dt,We){var Rt=function(){We.onload=We.onerror=null,yt.selection&&(yt.selection.select(We),yt.nodeChanged())};We.onload=function(){!Dt.width&&!Dt.height&&Dn(yt)&&yt.dom.setAttribs(We,{width:String(We.clientWidth),height:String(We.clientHeight)}),Rt()},We.onerror=Rt}(yt,Dt,We)},wn=function(yt,Dt){var We=Ci(yt);if(We){var Rt=rr(function(Xi){return Zn(yt,Xi)},We),Qn=I(I({},Rt),Dt),fi=function(yt,Dt){var We=Dt.src;return I(I({},Dt),{src:Zi(yt,We)?We:""})}(yt,Qn);Qn.src?Ft(yt,fi):function(yt,Dt){if(Dt){var We=yt.dom.is(Dt.parentNode,"figure.image")?Dt.parentNode:Dt;yt.dom.remove(We),yt.focus(),yt.nodeChanged(),yt.dom.isEmpty(yt.getBody())&&(yt.setContent(""),yt.selection.setCursorLocation())}}(yt,We)}else Dt.src&&gn(yt,I(I({},{src:"",alt:"",title:"",width:"",height:"",class:"",style:"",caption:!1,hspace:"",vspace:"",border:"",borderStyle:"",isDecorative:!1}),Dt))},Cr=function(yt){return function(){for(var Dt=[],We=0;We<arguments.length;We++)Dt[We]=arguments[We];if(0===Dt.length)throw new Error("Can't merge zero objects");for(var Rt={},Qn=0;Qn<Dt.length;Qn++){var fi=Dt[Qn];for(var Xi in fi)be(fi,Xi)&&(Rt[Xi]=yt(Rt[Xi],fi[Xi]))}return Rt}}(function(yt,Dt){return g(yt)&&g(Dt)?Cr(yt,Dt):Dt}),en=tinymce.util.Tools.resolve("tinymce.util.ImageUploader"),Wn=tinymce.util.Tools.resolve("tinymce.util.Tools"),at=function(yt){return D(yt.value)?yt.value:""},Qt=function(yt,Dt){var We=[];return Wn.each(yt,function(Rt){var Qn=function(yt){return D(yt.text)?yt.text:D(yt.title)?yt.title:""}(Rt);if(void 0!==Rt.menu){var fi=Qt(Rt.menu,Dt);We.push({text:Qn,items:fi})}else{var Xi=Dt(Rt);We.push({text:Qn,value:Xi})}}),We},St=function(yt){return void 0===yt&&(yt=at),function(Dt){return Dt?pe.from(Dt).map(function(We){return Qt(We,yt)}):pe.none()}},Ln=function(yt,Dt){return function(yt,Dt){for(var We=0;We<yt.length;We++){var Rt=Dt(yt[We],We);if(Rt.isSome())return Rt}return pe.none()}(yt,function(We){return function(yt){return be(yt,"items")}(We)?Ln(We.items,Dt):We.value===Dt?pe.some(We):pe.none()})},hi_sanitizer=St,hi_sanitize=function(yt){return St(at)(yt)},hi_findEntry=function(yt,Dt){return yt.bind(function(We){return Ln(We,Dt)})},_r_makeTab=function(yt){return{title:"Advanced",name:"advanced",items:[{type:"input",label:"Style",name:"style"},{type:"grid",columns:2,items:[{type:"input",label:"Vertical space",name:"vspace",inputMode:"numeric"},{type:"input",label:"Horizontal space",name:"hspace",inputMode:"numeric"},{type:"input",label:"Border width",name:"border",inputMode:"numeric"},{type:"listbox",name:"borderstyle",label:"Border style",items:[{text:"Select...",value:""},{text:"Solid",value:"solid"},{text:"Dotted",value:"dotted"},{text:"Dashed",value:"dashed"},{text:"Double",value:"double"},{text:"Groove",value:"groove"},{text:"Ridge",value:"ridge"},{text:"Inset",value:"inset"},{text:"Outset",value:"outset"},{text:"None",value:"none"},{text:"Hidden",value:"hidden"}]}]}]}},er=function(yt){var Dt=hi_sanitizer(function(Ho){return yt.convertURL(Ho.value||Ho.url,"src")}),We=new He(function(Ho){!function(yt,Dt){var We=function(yt){return yt.getParam("image_list",!1)}(yt);D(We)?nn.send({url:We,success:function(Rt){Dt(JSON.parse(Rt))}}):B(We)?We(Dt):Dt(We)}(yt,function(Ra){Ho(Dt(Ra).map(function(ba){return Oe([[{text:"None",value:""}],ba])}))})}),Rt=hi_sanitize(function(yt){return yt.getParam("image_class_list")}(yt)),Qn=function(yt){return yt.getParam("image_advtab",!1,"boolean")}(yt),fi=function(yt){return yt.getParam("image_uploadtab",!0,"boolean")}(yt),Xi=function(yt){return w(yt.getParam("images_upload_url"))}(yt),wr=function(yt){return w(yt.getParam("images_upload_handler"))}(yt),Mo=function(yt){var Dt=Ci(yt);return Dt?rr(function(We){return Zn(yt,We)},Dt):{src:"",alt:"",title:"",width:"",height:"",class:"",style:"",caption:!1,hspace:"",vspace:"",border:"",borderStyle:"",isDecorative:!1}}(yt),ro=function(yt){return yt.getParam("image_description",!0,"boolean")}(yt),qr=function(yt){return yt.getParam("image_title",!1,"boolean")}(yt),ho=Dn(yt),xa=function(yt){return yt.getParam("image_caption",!1,"boolean")}(yt),To=function(yt){return yt.getParam("a11y_advanced_options",!1,"boolean")}(yt),Ao=function(yt){return yt.getParam("automatic_uploads",!0,"boolean")}(yt),Ha=pe.some(function(yt){return yt.getParam("image_prepend_url","","string")}(yt)).filter(function(Ho){return D(Ho)&&Ho.length>0});return We.then(function(Ho){return{image:Mo,imageList:Ho,classList:Rt,hasAdvTab:Qn,hasUploadTab:fi,hasUploadUrl:Xi,hasUploadHandler:wr,hasDescription:ro,hasImageTitle:qr,hasDimensions:ho,hasImageCaption:xa,prependURL:Ha,hasAccessibilityOptions:To,automaticUploads:Ao}})},Yr=function(yt){var qr,We=yt.imageList.map(function(qr){return{name:"images",type:"listbox",label:"Image list",items:qr}}),Rt={name:"alt",type:"input",label:"Alternative description",disabled:yt.hasAccessibilityOptions&&yt.image.isDecorative},wr=yt.classList.map(function(qr){return{name:"classes",type:"listbox",label:"Class",items:qr}});return Oe([[{name:"src",type:"urlinput",filetype:"image",label:"Source"}],We.toArray(),yt.hasAccessibilityOptions&&yt.hasDescription?[{type:"label",label:"Accessibility",items:[{name:"isDecorative",type:"checkbox",label:"Image is decorative"}]}]:[],yt.hasDescription?[Rt]:[],yt.hasImageTitle?[{name:"title",type:"input",label:"Image title"}]:[],yt.hasDimensions?[{name:"dimensions",type:"sizeinput"}]:[],[I(I({},(qr=yt.classList.isSome()&&yt.hasImageCaption,qr?{type:"grid",columns:2}:{type:"panel"})),{items:Oe([wr.toArray(),yt.hasImageCaption?[{type:"label",label:"Caption",items:[{type:"checkbox",name:"caption",label:"Show caption"}]}]:[]])})]])},Si_makeTab=function(yt){return{title:"General",name:"general",items:Yr(yt)}},Si_makeItems=Yr,Oa_makeTab=function(yt){return{title:"Upload",name:"upload",items:[{type:"dropzone",name:"fileinput"}]}},rl=function(yt){return{src:{value:yt.src,meta:{}},images:yt.src,alt:yt.alt,title:yt.title,dimensions:{width:yt.width,height:yt.height},classes:yt.class,caption:yt.caption,style:yt.style,vspace:yt.vspace,border:yt.border,hspace:yt.hspace,borderstyle:yt.borderStyle,fileinput:[],isDecorative:yt.isDecorative}},Vs=function(yt,Dt){return{src:yt.src.value,alt:0===yt.alt.length&&Dt?null:yt.alt,title:yt.title,width:yt.dimensions.width,height:yt.dimensions.height,class:yt.classes,style:yt.style,caption:yt.caption,hspace:yt.hspace,vspace:yt.vspace,border:yt.border,borderStyle:yt.borderstyle,isDecorative:yt.isDecorative}},ts=function(yt,Dt){var We=Dt.getData();(function(yt,Dt){return/^(?:[a-zA-Z]+:)?\/\//.test(Dt)?pe.none():yt.prependURL.bind(function(We){return Dt.substring(0,We.length)!==We?pe.some(We+Dt):pe.none()})})(yt,We.src.value).each(function(Rt){Dt.setData({src:{value:Rt,meta:We.src.meta}})})},tc=function(yt,Dt){var We=Dt.getData(),Rt=We.src.meta;if(void 0!==Rt){var Qn=Cr({},We);(function(yt,Dt,We){yt.hasDescription&&D(We.alt)&&(Dt.alt=We.alt),yt.hasAccessibilityOptions&&(Dt.isDecorative=We.isDecorative||Dt.isDecorative||!1),yt.hasImageTitle&&D(We.title)&&(Dt.title=We.title),yt.hasDimensions&&(D(We.width)&&(Dt.dimensions.width=We.width),D(We.height)&&(Dt.dimensions.height=We.height)),D(We.class)&&hi_findEntry(yt.classList,We.class).each(function(Rt){Dt.classes=Rt.value}),yt.hasImageCaption&&n(We.caption)&&(Dt.caption=We.caption),yt.hasAdvTab&&(D(We.style)&&(Dt.style=We.style),D(We.vspace)&&(Dt.vspace=We.vspace),D(We.border)&&(Dt.border=We.border),D(We.hspace)&&(Dt.hspace=We.hspace),D(We.borderstyle)&&(Dt.borderstyle=We.borderstyle))})(yt,Qn,Rt),Dt.setData(Qn)}},Mi=function(yt,Dt,We,Rt){ts(Dt,Rt),tc(Dt,Rt),function(yt,Dt,We,Rt){var Qn=Rt.getData(),fi=Qn.src.value,Xi=Qn.src.meta||{};!Xi.width&&!Xi.height&&Dt.hasDimensions&&(function(yt){return yt.length>0}(fi)?yt.imageSize(fi).then(function(wr){We.open&&Rt.setData({dimensions:wr})}).catch(function(wr){return console.error(wr)}):Rt.setData({dimensions:{width:"",height:""}}))}(yt,Dt,We,Rt),function(yt,Dt,We){var Rt=We.getData(),Qn=hi_findEntry(yt.imageList,Rt.src.value);Dt.prevImage=Qn,We.setData({images:Qn.map(function(fi){return fi.value}).getOr("")})}(Dt,We,Rt)},Vo=function(yt,Dt,We){var Rt=Vn(yt(We.style)),Qn=Cr({},We);return Qn.vspace=function(yt){return yt["margin-top"]&&yt["margin-bottom"]&&yt["margin-top"]===yt["margin-bottom"]?si(String(yt["margin-top"])):""}(Rt),Qn.hspace=function(yt){return yt["margin-right"]&&yt["margin-left"]&&yt["margin-right"]===yt["margin-left"]?si(String(yt["margin-right"])):""}(Rt),Qn.border=function(yt){return yt["border-width"]?si(String(yt["border-width"])):""}(Rt),Qn.borderstyle=function(yt){return yt["border-style"]?String(yt["border-style"]):""}(Rt),Qn.style=function(yt,Dt,We){return Dt(yt(Dt(We)))}(yt,Dt,Rt),Qn},wa=function(yt,Dt,We,Rt){var Qn=Rt.getData();Rt.block("Uploading image"),ke(Qn.fileinput).fold(function(){Rt.unblock()},function(fi){var Xi=URL.createObjectURL(fi),wr=function(){Rt.unblock(),URL.revokeObjectURL(Xi)},Mo=function(ro){Rt.setData({src:{value:ro,meta:{}}}),Rt.showTab("general"),Mi(yt,Dt,We,Rt)};(function(yt){return new He(function(Dt,We){var Rt=new FileReader;Rt.onload=function(){Dt(Rt.result)},Rt.onerror=function(){We(Rt.error.message)},Rt.readAsDataURL(yt)})})(fi).then(function(ro){var qr=yt.createBlobCache(fi,Xi,ro);Dt.automaticUploads?yt.uploadImage(qr).then(function(ho){Mo(ho.url),wr()}).catch(function(ho){wr(),yt.alertErr(ho)}):(yt.addToBlobCache(qr),Mo(qr.blobUri()),Rt.unblock())})})},ns=function(yt,Dt,We){return function(Rt,Qn){"src"===Qn.name?Mi(yt,Dt,We,Rt):"images"===Qn.name?function(yt,Dt,We,Rt){var Qn=Rt.getData(),fi=hi_findEntry(Dt.imageList,Qn.images);fi.each(function(Xi){""===Qn.alt||We.prevImage.map(function(Mo){return Mo.text===Qn.alt}).getOr(!1)?""===Xi.value?Rt.setData({src:Xi,alt:We.prevAlt}):Rt.setData({src:Xi,alt:Xi.text}):Rt.setData({src:Xi})}),We.prevImage=fi,Mi(yt,Dt,We,Rt)}(yt,Dt,We,Rt):"alt"===Qn.name?We.prevAlt=Rt.getData().alt:"style"===Qn.name?function(yt,Dt){var We=Dt.getData(),Rt=Vo(yt.parseStyle,yt.serializeStyle,We);Dt.setData(Rt)}(yt,Rt):"vspace"===Qn.name||"hspace"===Qn.name||"border"===Qn.name||"borderstyle"===Qn.name?function(yt,Dt,We){var Rt=Cr(rl(Dt.image),We.getData()),Qn=lr(yt.normalizeCss,Vs(Rt,!1));We.setData({style:Qn})}(yt,Dt,Rt):"fileinput"===Qn.name?wa(yt,Dt,We,Rt):"isDecorative"===Qn.name&&(Rt.getData().isDecorative?Rt.disable("alt"):Rt.enable("alt"))}},Cs=function(yt){return function(){yt.open=!1}},$r=function(yt){return yt.hasAdvTab||yt.hasUploadUrl||yt.hasUploadHandler?{type:"tabpanel",tabs:Oe([[Si_makeTab(yt)],yt.hasAdvTab?[_r_makeTab(yt)]:[],yt.hasUploadTab&&(yt.hasUploadUrl||yt.hasUploadHandler)?[Oa_makeTab(yt)]:[]])}:{type:"panel",items:Si_makeItems(yt)}},Ts=function(yt){return function(Dt){var We=function(yt){return{prevImage:hi_findEntry(yt.imageList,yt.image.src),prevAlt:yt.image.alt,open:!0}}(Dt);return{title:"Insert/Edit Image",size:"normal",body:$r(Dt),buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],initialData:rl(Dt.image),onSubmit:yt.onSubmit(Dt),onChange:ns(yt,Dt,We),onClose:Cs(We)}}},Gl=function(yt){return function(Dt){return function(We){var Rt=Cr(rl(Dt.image),We.getData());yt.execCommand("mceUpdateImage",!1,Vs(Rt,Dt.hasAccessibilityOptions)),yt.editorUpload.uploadImagesAuto(),We.close()}}},ol=function(yt){return function(Dt){return Zi(yt,Dt)?function(yt){return new He(function(Dt){var We=document.createElement("img"),Rt=function(fi){We.onload=We.onerror=null,We.parentNode&&We.parentNode.removeChild(We),Dt(fi)};We.onload=function(){var wr={width:ui(We.width,We.clientWidth),height:ui(We.height,We.clientHeight)};Rt(He.resolve(wr))},We.onerror=function(){Rt(He.reject("Failed to get image dimensions for: "+yt))};var Qn=We.style;Qn.visibility="hidden",Qn.position="fixed",Qn.bottom=Qn.left="0px",Qn.width=Qn.height="auto",document.body.appendChild(We),We.src=yt})}(yt.documentBaseURI.toAbsolute(Dt)).then(function(We){return{width:String(We.width),height:String(We.height)}}):He.resolve({width:"",height:""})}},zc=function(yt){return function(Dt,We,Rt){return yt.editorUpload.blobCache.create({blob:Dt,blobUri:We,name:Dt.name?Dt.name.replace(/\.[^\.]+$/,""):null,filename:Dt.name,base64:Rt.split(",")[1]})}},al=function(yt){return function(Dt){yt.editorUpload.blobCache.add(Dt)}},Jn=function(yt){return function(Dt){yt.windowManager.alert(Dt)}},tn=function(yt){return function(Dt){return Zn(yt,Dt)}},ti=function(yt){return function(Dt){return yt.dom.parseStyle(Dt)}},_i=function(yt){return function(Dt,We){return yt.dom.serializeStyle(Dt,We)}},ar=function(yt){return function(Dt){return en(yt).upload([Dt],!1).then(function(We){return 0===We.length?He.reject("Failed to upload image"):!1===We[0].status?He.reject(We[0].error.message):We[0]})}},vr=function(yt){var Dt={onSubmit:Gl(yt),imageSize:ol(yt),addToBlobCache:al(yt),createBlobCache:zc(yt),alertErr:Jn(yt),normalizeCss:tn(yt),parseStyle:ti(yt),serializeStyle:_i(yt),uploadImage:ar(yt)};return{open:function(){er(yt).then(Ts(Dt)).then(yt.windowManager.open)}}},Qr=function(yt){yt.addCommand("mceImage",vr(yt).open),yt.addCommand("mceUpdateImage",function(Dt,We){yt.undoManager.transact(function(){return wn(yt,We)})})},Li=function(yt){var Dt=yt.attr("class");return Dt&&/\bimage\b/.test(Dt)},Ta=function(yt){return function(Dt){for(var We=Dt.length,Rt=function(fi){fi.attr("contenteditable",yt?"true":null)};We--;){var Qn=Dt[We];Li(Qn)&&(Qn.attr("contenteditable",yt?"false":null),Wn.each(Qn.getAll("figcaption"),Rt))}}},La=function(yt){yt.on("PreInit",function(){yt.parser.addNodeFilter("figure",Ta(!0)),yt.serializer.addNodeFilter("figure",Ta(!1))})},Ps=function(yt){yt.ui.registry.addToggleButton("image",{icon:"image",tooltip:"Insert/edit image",onAction:vr(yt).open,onSetup:function(Dt){return Dt.setActive(w(Ci(yt))),yt.selection.selectorChangedWithUnbind("img:not([data-mce-object],[data-mce-placeholder]),figure.image",Dt.setActive).unbind}}),yt.ui.registry.addMenuItem("image",{icon:"image",text:"Image...",onAction:vr(yt).open}),yt.ui.registry.addContextMenu("image",{update:function(Dt){return ce(Dt)||function(yt){return"IMG"===yt.nodeName}(Dt)&&!In(Dt)?["image"]:[]}})};!function is(){qe.add("image",function(yt){La(yt),Ps(yt),Qr(yt)})}()}()},14219:(qe,I,p)=>{p(30436)},30436:()=>{!function(){"use strict";var ln,qe=tinymce.util.Tools.resolve("tinymce.PluginManager"),I=tinymce.util.Tools.resolve("tinymce.util.VK"),o=function(ln){return function(Mi){return function(ln){var Mi=typeof ln;return null===ln?"null":"object"===Mi&&(Array.prototype.isPrototypeOf(ln)||ln.constructor&&"Array"===ln.constructor.name)?"array":"object"===Mi&&(String.prototype.isPrototypeOf(ln)||ln.constructor&&"String"===ln.constructor.name)?"string":Mi}(Mi)===ln}},e=function(ln){return function(Mi){return typeof Mi===ln}},D=o("string"),g=o("array"),E=(ln=null,function(Mi){return ln===Mi}),T=e("boolean"),n=e("function"),P=function(){},w=function(ln){return function(){return ln}},B=function(ln){return ln},Y=function(ln,Mi){return ln===Mi},V=w(!1),ue=w(!0),he=function(){return ae},ae=function(){var ln=function(Er){return Er()},Mi=B;return{fold:function(Er,ur){return Er()},isSome:V,isNone:ue,getOr:Mi,getOrThunk:ln,getOrDie:function(Er){throw new Error(Er||"error: getOrDie called on none.")},getOrNull:w(null),getOrUndefined:w(void 0),or:Mi,orThunk:ln,map:he,each:P,bind:he,exists:V,forall:ue,filter:function(){return he()},toArray:function(){return[]},toString:w("none()")}}(),X=function(ln){var Mi=w(ln),Di=function(){return ur},Er=function(gi){return gi(ln)},ur={fold:function(gi,$t){return $t(ln)},isSome:ue,isNone:V,getOr:Mi,getOrThunk:Mi,getOrDie:Mi,getOrNull:Mi,getOrUndefined:Mi,or:Di,orThunk:Di,map:function(gi){return X(gi(ln))},each:function(gi){gi(ln)},bind:Er,exists:Er,forall:Er,filter:function(gi){return gi(ln)?ur:ae},toArray:function(){return[ln]},toString:function(){return"some("+ln+")"}};return ur},ye={some:X,none:he,from:function(ln){return null==ln?ae:X(ln)}},ge=Array.prototype.indexOf,ne=Array.prototype.push,Pe=function(ln,Mi){return function(ln,Mi){return ge.call(ln,Mi)}(ln,Mi)>-1},oe=function(ln){for(var Mi=[],Di=0,Er=ln.length;Di<Er;++Di){if(!g(ln[Di]))throw new Error("Arr.flatten item "+Di+" was not an array, input: "+ln);ne.apply(Mi,ln[Di])}return Mi},me=function(ln,Mi){return oe(function(ln,Mi){for(var Di=ln.length,Er=new Array(Di),ur=0;ur<Di;ur++){var gi=ln[ur];Er[ur]=Mi(gi,ur)}return Er}(ln,Mi))},be=function(ln,Mi){for(var Di=0;Di<ln.length;Di++){var Er=Mi(ln[Di],Di);if(Er.isSome())return Er}return ye.none()},le=function(ln,Mi,Di){return void 0===Di&&(Di=Y),ln.exists(function(Er){return Di(Er,Mi)})},Z=function(ln){for(var Mi=[],Di=function(ur){Mi.push(ur)},Er=0;Er<ln.length;Er++)ln[Er].each(Di);return Mi},Oe=function(ln,Mi){return ln?ye.some(Mi):ye.none()},j=function(ln){var Mi=ln.getParam("link_assume_external_targets",!1);return T(Mi)&&Mi?1:!D(Mi)||"http"!==Mi&&"https"!==Mi?0:Mi},nt=function(ln){return ln.getParam("default_link_target")},mt=function(ln){return ln.getParam("target_list",!0)},ut=function(ln){return ln.getParam("rel_list",[],"array")},tt=function(ln){return ln.getParam("link_title",!0,"boolean")},Ne=function(ln){return ln.getParam("allow_unsafe_link_target",!1,"boolean")},ft=function(ln){return ln.getParam("link_default_protocol","http","string")},Ct=tinymce.util.Tools.resolve("tinymce.util.Tools"),rn=function(ln){return D(ln.value)?ln.value:""},st=function(ln,Mi){var Di=[];return Ct.each(ln,function(Er){var ur=function(ln){return D(ln.text)?ln.text:D(ln.title)?ln.title:""}(Er);if(void 0!==Er.menu){var gi=st(Er.menu,Mi);Di.push({text:ur,items:gi})}else{var $t=Mi(Er);Di.push({text:ur,value:$t})}}),Di},nn=function(ln){return void 0===ln&&(ln=rn),function(Mi){return ye.from(Mi).map(function(Di){return st(Di,ln)})}},vi={sanitize:function(ln){return nn(rn)(ln)},sanitizeWith:nn,createUi:function(ln,Mi){return function(Di){return{name:ln,type:"listbox",label:Mi,items:Di}}},getValue:rn},Gi=function(){return Gi=Object.assign||function(Mi){for(var Di,Er=1,ur=arguments.length;Er<ur;Er++)for(var gi in Di=arguments[Er])Object.prototype.hasOwnProperty.call(Di,gi)&&(Mi[gi]=Di[gi]);return Mi},Gi.apply(this,arguments)},mi=Object.keys,wi=Object.hasOwnProperty,On=function(ln,Mi,Di,Er){return function(ln,Mi){for(var Di=mi(ln),Er=0,ur=Di.length;Er<ur;Er++){var gi=Di[Er];Mi(ln[gi],gi)}}(ln,function(gi,$t){(Mi(gi,$t)?Di:Er)(gi,$t)}),{}},Bt=function(ln,Mi){return wi.call(ln,Mi)},Fn=tinymce.util.Tools.resolve("tinymce.dom.TreeWalker"),ui=tinymce.util.Tools.resolve("tinymce.util.URI"),Ai=function(ln){return ln&&"a"===ln.nodeName.toLowerCase()},si=function(ln){return Ai(ln)&&!!Hn(ln)},Vi=function(ln,Mi){if(ln.collapsed)return[];var Di=ln.cloneContents(),Er=new Fn(Di.firstChild,Di),ur=[],gi=Di.firstChild;do{Mi(gi)&&ur.push(gi)}while(gi=Er.next());return ur},Vn=function(ln){return/^\w+:/i.test(ln)},Hn=function(ln){return ln.getAttribute("data-mce-href")||ln.getAttribute("href")},An=function(ln,Mi){var Vo,Di=["noopener"],Er=ln?ln.split(/\s+/):[],$t=function(Vo){return Vo.filter(function(Ds){return-1===Ct.inArray(Di,Ds)})},Ma=Mi?(Vo=$t(Vo=Er)).length>0?Vo.concat(Di):Di:$t(Er);return Ma.length>0?function(Vo){return Ct.trim(Vo.sort().join(" "))}(Ma):""},In=function(ln,Mi){return Mi=Mi||ln.selection.getNode(),zr(Mi)?ln.dom.select("a[href]",Mi)[0]:ln.dom.getParent(Mi,"a[href]")},Zi=function(ln,Mi){return function(ln){return ln.replace(/\uFEFF/g,"")}(Mi?Mi.innerText||Mi.textContent:ln.getContent({format:"text"}))},gr=function(ln){return Ct.grep(ln,si).length>0},Gr=function(ln){var Mi=ln.schema.getTextInlineElements();return 0===Vi(ln.selection.getRng(),function(ur){return 1===ur.nodeType&&!Ai(ur)&&!Bt(Mi,ur.nodeName.toLowerCase())}).length},zr=function(ln){return ln&&"FIGURE"===ln.nodeName&&/\bimage\b/i.test(ln.className)},jn=function(ln,Mi){var Di=Gi({},Mi);if(!(ut(ln).length>0)&&!1===Ne(ln)){var Er=An(Di.rel,"_blank"===Di.target);Di.rel=Er||null}return ye.from(Di.target).isNone()&&!1===mt(ln)&&(Di.target=nt(ln)),Di.href=function(ln,Mi){return"http"!==Mi&&"https"!==Mi||Vn(ln)?ln:Mi+"://"+ln}(Di.href,j(ln)),Di},oi=function(ln,Mi,Di){var Er=ln.selection.getNode(),ur=In(ln,Er),gi=jn(ln,function(ln){return function(ln,Mi,Di){return function(ln,Mi){for(var Di=0,Er=ln.length;Di<Er;Di++)Mi(ln[Di],Di)}(ln,function(Er,ur){Di=Mi(Di,Er,ur)}),Di}(["title","rel","class","target"],function(Di,Er){return ln[Er].each(function(ur){Di[Er]=ur.length>0?ur:null}),Di},{href:ln.href})}(Di));ln.undoManager.transact(function(){Di.href===Mi.href&&Mi.attach(),ur?(ln.focus(),function(ln,Mi,Di,Er){Di.each(function(ur){Bt(Mi,"innerText")?Mi.innerText=ur:Mi.textContent=ur}),ln.dom.setAttribs(Mi,Er),ln.selection.select(Mi)}(ln,ur,Di.text,gi)):function(ln,Mi,Di,Er){zr(Mi)?hn(ln,Mi,Er):Di.fold(function(){ln.execCommand("mceInsertLink",!1,Er)},function(ur){ln.insertContent(ln.dom.createHTML("a",Er,ln.dom.encode(ur)))})}(ln,Er,Di.text,gi)})},pr=function(ln){var Mi=ln.class,Di=ln.href,Er=ln.rel,ur=ln.target,gi=ln.text,$t=ln.title;return function(ln,Mi){var Di={};return On(ln,Mi,function(ln){return function(Mi,Di){ln[Di]=Mi}}(Di),P),Di}({class:Mi.getOrNull(),href:Di,rel:Er.getOrNull(),target:ur.getOrNull(),text:gi.getOrNull(),title:$t.getOrNull()},function(Ma,Vo){return!1===E(Ma)})},Pn=function(ln,Mi,Di){var Er=function(ln,Mi){var Di=Mi.href;return Gi(Gi({},Mi),{href:ui.isDomSafe(Di,"a",ln.settings)?Di:""})}(ln,Di);ln.hasPlugin("rtc",!0)?ln.execCommand("createlink",!1,pr(Er)):oi(ln,Mi,Er)},Nt=function(ln){ln.hasPlugin("rtc",!0)?ln.execCommand("unlink"):function(ln){ln.undoManager.transact(function(){var Mi=ln.selection.getNode();zr(Mi)?ai(ln,Mi):function(ln){var Mi=ln.dom,Di=ln.selection,Er=Di.getBookmark(),ur=Di.getRng().cloneRange(),gi=Mi.getParent(ur.startContainer,"a[href]",ln.getBody()),$t=Mi.getParent(ur.endContainer,"a[href]",ln.getBody());gi&&ur.setStartBefore(gi),$t&&ur.setEndAfter($t),Di.setRng(ur),ln.execCommand("unlink"),Di.moveToBookmark(Er)}(ln),ln.focus()})}(ln)},ai=function(ln,Mi){var Di=ln.dom.select("img",Mi)[0];if(Di){var Er=ln.dom.getParents(Di,"a[href]",Mi)[0];Er&&(Er.parentNode.insertBefore(Di,Er),ln.dom.remove(Er))}},hn=function(ln,Mi,Di){var Er=ln.dom.select("img",Mi)[0];if(Er){var ur=ln.dom.create("a",Di);Er.parentNode.insertBefore(ur,Er),ur.appendChild(Er)}},Le=function(ln){return function(ln,Mi){return Bt(ln,Mi)&&void 0!==ln[Mi]&&null!==ln[Mi]}(ln,"items")},ce=function(ln,Mi){return be(Mi,function(Di){return Le(Di)?ce(ln,Di.items):Oe(Di.value===ln,Di)})},we=function(ln,Mi,Di,Er){var ur=Er[Mi],gi=ln.length>0;return void 0!==ur?ce(ur,Di).map(function($t){return{url:{value:$t.value,meta:{text:gi?ln:$t.text,attach:P}},text:gi?ln:$t.text}}):ye.none()},Tn_init=function(ln,Mi){var Di={text:ln.text,title:ln.title},gi=function(Vo){var Ds=function(Vo){return Oe(Di.text.length<=0,ye.from(Vo.meta.text).getOr(Vo.value))}(Vo.url),ja=function(Vo){return Oe(Di.title.length<=0,ye.from(Vo.meta.title).getOr(""))}(Vo.url);return Ds.isSome()||ja.isSome()?ye.some(Gi(Gi({},Ds.map(function(wa){return{text:wa}}).getOr({})),ja.map(function(wa){return{title:wa}}).getOr({}))):ye.none()},$t=function(Vo,Ds){var ja=function(ln,Mi){return"link"===Mi?ln.link:"anchor"===Mi?ln.anchor:ye.none()}(Mi,Ds.name).getOr([]);return we(Di.text,Ds.name,ja,Vo)};return{onChange:function(Vo,Ds){var ja=Ds.name;return"url"===ja?gi(Vo()):Pe(["anchor","link"],ja)?$t(Vo(),Ds):(("text"===ja||"title"===ja)&&(Di[ja]=Vo()[ja]),ye.none())}}},lr=tinymce.util.Tools.resolve("tinymce.util.Delay"),mo=tinymce.util.Tools.resolve("tinymce.util.Promise"),aa=function(ln){var Mi=ln.href;return Mi.indexOf("@")>0&&-1===Mi.indexOf("/")&&-1===Mi.indexOf("mailto:")?ye.some({message:"The URL you entered seems to be an email address. Do you want to add the required mailto: prefix?",preprocess:function(Er){return Gi(Gi({},Er),{href:"mailto:"+Mi})}}):ye.none()},ea=function(ln,Mi){return function(Di){var Er=Di.href;return 1===ln&&!Vn(Er)||0===ln&&/^\s*www(\.|\d\.)/i.test(Er)?ye.some({message:"The URL you entered seems to be an external link. Do you want to add the required "+Mi+":// prefix?",preprocess:function(gi){return Gi(Gi({},gi),{href:Mi+"://"+Er})}}):ye.none()}},Ii_preprocess=function(ln,Mi){return be([aa,ea(j(ln),ft(ln))],function(Di){return Di(Mi)}).fold(function(){return mo.resolve(Mi)},function(Di){return new mo(function(Er){!function(ln,Mi,Di){var Er=ln.selection.getRng();lr.setEditorTimeout(ln,function(){ln.windowManager.confirm(Mi,function(ur){ln.selection.setRng(Er),Di(ur)})})}(ln,Di.message,function(ur){Er(ur?Di.preprocess(Mi):Mi)})})})},Zn_getAnchors=function(ln){var Mi=ln.dom.select("a:not([href])"),Di=me(Mi,function(Er){var ur=Er.name||Er.id;return ur?[{text:ur,value:"#"+ur}]:[]});return Di.length>0?ye.some([{text:"None",value:""}].concat(Di)):ye.none()},Xn_getClasses=function(ln){var Mi=function(ln){return ln.getParam("link_class_list",[],"array")}(ln);return Mi.length>0?vi.sanitize(Mi):ye.none()},Et=tinymce.util.Tools.resolve("tinymce.util.XHR"),un_getLinks=function(ln){var Mi=function(Er){return ln.convertURL(Er.value||Er.url,"href")},Di=function(ln){return ln.getParam("link_list")}(ln);return new mo(function(Er){D(Di)?Et.send({url:Di,success:function(ur){return Er(function(ln){try{return ye.some(JSON.parse(ln))}catch{return ye.none()}}(ur))},error:function(ur){return Er(ye.none())}}):n(Di)?Di(function(ur){return Er(ye.some(ur))}):Er(ye.from(Di))}).then(function(Er){return Er.bind(vi.sanitizeWith(Mi)).map(function(ur){if(ur.length>0){return[{text:"None",value:""}].concat(ur)}return ur})})},Ut_getRels=function(ln,Mi){var Di=ut(ln);if(Di.length>0){var Er=le(Mi,"_blank");return(!1===Ne(ln)?vi.sanitizeWith(function(Ma){return An(vi.getValue(Ma),Er)}):vi.sanitize)(Di)}return ye.none()},wn=[{text:"Current window",value:""},{text:"New window",value:"_blank"}],xi_getTargets=function(ln){var Mi=mt(ln);return g(Mi)?vi.sanitize(Mi).orThunk(function(){return ye.some(wn)}):!1===Mi?ye.none():ye.some(wn)},Cr=function(ln,Mi,Di){var Er=ln.getAttrib(Mi,Di);return null!==Er&&Er.length>0?ye.some(Er):ye.none()},Wn_collect=function(ln,Mi){return un_getLinks(ln).then(function(Di){var Er=function(ln,Mi){var Di=ln.dom,ur=Gr(ln)?ye.some(Zi(ln.selection,Mi)):ye.none(),gi=Mi?ye.some(Di.getAttrib(Mi,"href")):ye.none(),$t=Mi?ye.from(Di.getAttrib(Mi,"target")):ye.none(),Ma=Cr(Di,Mi,"rel"),Vo=Cr(Di,Mi,"class");return{url:gi,text:ur,title:Cr(Di,Mi,"title"),target:$t,rel:Ma,linkClass:Vo}}(ln,Mi);return{anchor:Er,catalogs:{targets:xi_getTargets(ln),rels:Ut_getRels(ln,Er.target),classes:Xn_getClasses(ln),anchor:Zn_getAnchors(ln),link:Di},optNode:ye.from(Mi),flags:{titleEnabled:tt(ln)}}})},Pt=function(ln){var Mi=function(ln){var Mi=In(ln);return Wn_collect(ln,Mi)}(ln);Mi.then(function(Di){var Er=function(ln,Mi){return function(Di){var Er=Di.getData();if(!Er.url.value)return Nt(ln),void Di.close();var ur=function(Ma){return ye.from(Er[Ma]).filter(function(Vo){return!le(Mi.anchor[Ma],Vo)})},gi={href:Er.url.value,text:ur("text"),target:ur("target"),rel:ur("rel"),class:ur("linkClass"),title:ur("title")},$t={href:Er.url.value,attach:void 0!==Er.url.meta&&Er.url.meta.attach?Er.url.meta.attach:P};Ii_preprocess(ln,gi).then(function(Ma){Pn(ln,$t,Ma)}),Di.close()}}(ln,Di);return function(ln,Mi,Di){var ur=ln.anchor.text.map(function(){return{name:"text",type:"input",label:"Text to display"}}).toArray(),gi=ln.flags.titleEnabled?[{name:"title",type:"input",label:"Title"}]:[],Ma=function(ln,Mi){var Di=ln.anchor,Er=Di.url.getOr("");return{url:{value:Er,meta:{original:{value:Er}}},text:Di.text.getOr(""),title:Di.title.getOr(""),anchor:Er,link:Er,rel:Di.rel.getOr(""),target:Di.target.or(Mi).getOr(""),linkClass:Di.linkClass.getOr("")}}(ln,ye.from(nt(Di))),Vo=ln.catalogs,Ds=Tn_init(Ma,Vo);return{title:"Insert/Edit Link",size:"normal",body:{type:"panel",items:oe([[{name:"url",type:"urlinput",filetype:"file",label:"URL"}],ur,gi,Z([Vo.anchor.map(vi.createUi("anchor","Anchors")),Vo.rels.map(vi.createUi("rel","Rel")),Vo.targets.map(vi.createUi("target","Open link in...")),Vo.link.map(vi.createUi("link","Link list")),Vo.classes.map(vi.createUi("linkClass","Class"))])])},buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],initialData:Ma,onChange:function(wa,ns){var Cs=ns.name;Ds.onChange(wa.getData,{name:Cs}).each(function($r){wa.setData($r)})},onSubmit:Mi}}(Di,Er,ln)}).then(function(Di){ln.windowManager.open(Di)})},Ln=function(ln){var Mi=document.createElement("a");Mi.target="_blank",Mi.href=ln,Mi.rel="noreferrer noopener";var Di=document.createEvent("MouseEvents");Di.initMouseEvent("click",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),function(ln,Mi){document.body.appendChild(ln),ln.dispatchEvent(Mi),document.body.removeChild(ln)}(Mi,Di)},ii=function(ln,Mi){return ln.dom.getParent(Mi,"a[href]")},hi=function(ln){return ii(ln,ln.selection.getStart())},_r=function(ln,Mi){if(Mi){var Di=Hn(Mi);if(/^#/.test(Di)){var Er=ln.$(Di);Er.length&&ln.selection.scrollIntoView(Er[0],!0)}else Ln(Mi.href)}},er=function(ln){return function(){Pt(ln)}},Yr=function(ln){return function(){_r(ln,hi(ln))}},_o=function(ln){ln.on("click",function(Mi){var Di=ii(ln,Mi.target);Di&&I.metaKeyPressed(Mi)&&(Mi.preventDefault(),_r(ln,Di))}),ln.on("keydown",function(Mi){var Di=hi(ln);Di&&13===Mi.keyCode&&function(ln){return!0===ln.altKey&&!1===ln.shiftKey&&!1===ln.ctrlKey&&!1===ln.metaKey}(Mi)&&(Mi.preventDefault(),_r(ln,Di))})},Si=function(ln,Mi){return ln.on("NodeChange",Mi),function(){return ln.off("NodeChange",Mi)}},to=function(ln){return function(Mi){var Di=function(){return Mi.setActive(!ln.mode.isReadOnly()&&null!==In(ln,ln.selection.getNode()))};return Di(),Si(ln,Di)}},Oa=function(ln){return function(Mi){var Di=function(){return Mi.setDisabled(null===In(ln,ln.selection.getNode()))};return Di(),Si(ln,Di)}},Uo=function(ln){return function(Mi){var Di=function(ur){return gr(ur)||function(ln){return Vi(ln,si).length>0}(ln.selection.getRng())},Er=ln.dom.getParents(ln.selection.getStart());return Mi.setDisabled(!Di(Er)),Si(ln,function(ur){return Mi.setDisabled(!Di(ur.parents))})}},rl=function(ln){ln.addCommand("mceLink",function(){!function(ln){return ln.getParam("link_quicklink",!1,"boolean")}(ln)?er(ln)():ln.fire("contexttoolbar-show",{toolbarKey:"quicklink"})})},Vs=function(ln){ln.addShortcut("Meta+K","",function(){ln.execCommand("mceLink")})},ps=function(ln){ln.ui.registry.addToggleButton("link",{icon:"link",tooltip:"Insert/edit link",onAction:er(ln),onSetup:to(ln)}),ln.ui.registry.addButton("openlink",{icon:"new-tab",tooltip:"Open link",onAction:Yr(ln),onSetup:Oa(ln)}),ln.ui.registry.addButton("unlink",{icon:"unlink",tooltip:"Remove link",onAction:function(){return Nt(ln)},onSetup:Uo(ln)})},ts=function(ln){ln.ui.registry.addMenuItem("openlink",{text:"Open link",icon:"new-tab",onAction:Yr(ln),onSetup:Oa(ln)}),ln.ui.registry.addMenuItem("link",{icon:"link",text:"Link...",shortcut:"Meta+K",onAction:er(ln)}),ln.ui.registry.addMenuItem("unlink",{icon:"unlink",text:"Remove link",onAction:function(){return Nt(ln)},onSetup:Uo(ln)})},gs=function(ln){ln.ui.registry.addContextMenu("link",{update:function(Er){return gr(ln.dom.getParents(Er,"a"))?"link unlink openlink":"link"}})},tc=function(ln){var Di=function(ur){var gi=ln.selection.getNode();return ur.setDisabled(!In(ln,gi)),P};ln.ui.registry.addContextForm("quicklink",{launch:{type:"contextformtogglebutton",icon:"link",tooltip:"Link",onSetup:to(ln)},label:"Link",predicate:function(ur){return!!In(ln,ur)&&function(ln){return ln.getParam("link_context_toolbar",!1,"boolean")}(ln)},initValue:function(){var ur=In(ln);return ur?Hn(ur):""},commands:[{type:"contextformtogglebutton",icon:"link",tooltip:"Link",primary:!0,onSetup:function(ur){var gi=ln.selection.getNode();return ur.setActive(!!In(ln,gi)),to(ln)(ur)},onAction:function(ur){var gi=ur.getValue(),$t=function(ur){var gi=In(ln),$t=Gr(ln);if(!gi&&$t){var Ma=Zi(ln.selection,gi);return ye.some(Ma.length>0?Ma:ur)}return ye.none()}(gi);Pn(ln,{href:gi,attach:P},{href:gi,text:$t,title:ye.none(),rel:ye.none(),target:ye.none(),class:ye.none()}),function(ur){ur.selection.collapse(!1)}(ln),ur.hide()}},{type:"contextformbutton",icon:"unlink",tooltip:"Remove link",onSetup:Di,onAction:function(ur){Nt(ln),ur.hide()}},{type:"contextformbutton",icon:"new-tab",tooltip:"Open link",onSetup:Di,onAction:function(ur){Yr(ln)(),ur.hide()}}]})};!function $a(){qe.add("link",function(ln){ps(ln),ts(ln),gs(ln),tc(ln),_o(ln),rl(ln),Vs(ln)})}()}()},77743:(qe,I,p)=>{p(64489)},64489:()=>{!function(){"use strict";var Xe,zt,qe=tinymce.util.Tools.resolve("tinymce.PluginManager"),p=function(Xe){return function(zt){return function(Xe){var zt=typeof Xe;return null===Xe?"null":"object"===zt&&(Array.prototype.isPrototypeOf(Xe)||Xe.constructor&&"Array"===Xe.constructor.name)?"array":"object"===zt&&(String.prototype.isPrototypeOf(Xe)||Xe.constructor&&"String"===Xe.constructor.name)?"string":zt}(zt)===Xe}},o=function(Xe){return function(zt){return typeof zt===Xe}},e=p("string"),l=p("object"),D=p("array"),g=o("boolean"),E=o("function"),T=o("number"),n=function(){},P=function(Xe){return function(){return Xe}},w=function(Xe){return Xe},B=function(Xe,zt){return Xe===zt},Y=function(Xe){return function(zt){return!Xe(zt)}},V=P(!1),ue=P(!0),he=function(){return ae},ae={fold:function(ni,Fi){return ni()},isSome:V,isNone:ue,getOr:zt=w,getOrThunk:Xe=function(ni){return ni()},getOrDie:function(ni){throw new Error(ni||"error: getOrDie called on none.")},getOrNull:P(null),getOrUndefined:P(void 0),or:zt,orThunk:Xe,map:he,each:n,bind:he,exists:V,forall:ue,filter:function(){return he()},toArray:function(){return[]},toString:P("none()")},X=function(Xe){var zt=P(Xe),mn=function(){return Fi},ni=function(nr){return nr(Xe)},Fi={fold:function(nr,zo){return zo(Xe)},isSome:ue,isNone:V,getOr:zt,getOrThunk:zt,getOrDie:zt,getOrNull:zt,getOrUndefined:zt,or:mn,orThunk:mn,map:function(nr){return X(nr(Xe))},each:function(nr){nr(Xe)},bind:ni,exists:ni,forall:ni,filter:function(nr){return nr(Xe)?Fi:ae},toArray:function(){return[Xe]},toString:function(){return"some("+Xe+")"}};return Fi},ye={some:X,none:he,from:function(Xe){return null==Xe?ae:X(Xe)}},ge=Array.prototype.slice,ne=Array.prototype.push,pe=function(Xe,zt){for(var mn=Xe.length,ni=new Array(mn),Fi=0;Fi<mn;Fi++){var nr=Xe[Fi];ni[Fi]=zt(nr,Fi)}return ni},Pe=function(Xe,zt){for(var mn=0,ni=Xe.length;mn<ni;mn++){zt(Xe[mn],mn)}},xe=function(Xe,zt){for(var mn=[],ni=0,Fi=Xe.length;ni<Fi;ni++){var nr=Xe[ni];zt(nr,ni)&&mn.push(nr)}return mn},re=function(Xe,zt,mn){return Pe(Xe,function(ni,Fi){mn=zt(mn,ni,Fi)}),mn},oe=function(Xe,zt,mn){for(var ni=0,Fi=Xe.length;ni<Fi;ni++){var nr=Xe[ni];if(zt(nr,ni))return ye.some(nr);if(mn(nr,ni))break}return ye.none()},me=function(Xe,zt){return oe(Xe,zt,V)},le=function(Xe,zt){return function(Xe){for(var zt=[],mn=0,ni=Xe.length;mn<ni;++mn){if(!D(Xe[mn]))throw new Error("Arr.flatten item "+mn+" was not an array, input: "+Xe);ne.apply(zt,Xe[mn])}return zt}(pe(Xe,zt))},Z=function(Xe){var zt=ge.call(Xe,0);return zt.reverse(),zt},Oe=function(Xe,zt){return zt>=0&&zt<Xe.length?ye.some(Xe[zt]):ye.none()},j=function(Xe){return Oe(Xe,0)},ke=function(Xe){return Oe(Xe,Xe.length-1)},nt=function(){return nt=Object.assign||function(zt){for(var mn,ni=1,Fi=arguments.length;ni<Fi;ni++)for(var nr in mn=arguments[ni])Object.prototype.hasOwnProperty.call(mn,nr)&&(zt[nr]=mn[nr]);return zt},nt.apply(this,arguments)};var ft=function(){return Ct(0,0)},Ct=function(Xe,zt){return{major:Xe,minor:zt}},rn={nu:Ct,detect:function(Xe,zt){var mn=String(zt).toLowerCase();return 0===Xe.length?ft():function(Xe,zt){var mn=function(Xe,zt){for(var mn=0;mn<Xe.length;mn++){var ni=Xe[mn];if(ni.test(zt))return ni}}(Xe,zt);if(!mn)return{major:0,minor:0};var ni=function(Fi){return Number(zt.replace(mn,"$"+Fi))};return Ct(ni(1),ni(2))}(Xe,mn)},unknown:ft},He=function(Xe,zt){return function(Xe,zt){for(var mn=0;mn<Xe.length;mn++){var ni=zt(Xe[mn],mn);if(ni.isSome())return ni}return ye.none()}(zt.brands,function(mn){var ni=mn.brand.toLowerCase();return me(Xe,function(Fi){var nr;return ni===(null===(nr=Fi.brand)||void 0===nr?void 0:nr.toLowerCase())}).map(function(Fi){return{current:Fi.name,version:rn.nu(parseInt(mn.version,10),0)}})})},st=function(Xe,zt){var mn=String(zt).toLowerCase();return me(Xe,function(ni){return ni.search(mn)})},Mn=function(Xe,zt){return-1!==Xe.indexOf(zt)},Gi=function(Xe){return function(zt){return zt.replace(Xe,"")}}(/^\s+|\s+$/g),Bn=/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,kn=function(Xe){return function(zt){return Mn(zt,Xe)}},On=[{name:"Edge",versionRegexes:[/.*?edge\/ ?([0-9]+)\.([0-9]+)$/],search:function(Xe){return Mn(Xe,"edge/")&&Mn(Xe,"chrome")&&Mn(Xe,"safari")&&Mn(Xe,"applewebkit")}},{name:"Chrome",brand:"Chromium",versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/,Bn],search:function(Xe){return Mn(Xe,"chrome")&&!Mn(Xe,"chromeframe")}},{name:"IE",versionRegexes:[/.*?msie\ ?([0-9]+)\.([0-9]+).*/,/.*?rv:([0-9]+)\.([0-9]+).*/],search:function(Xe){return Mn(Xe,"msie")||Mn(Xe,"trident")}},{name:"Opera",versionRegexes:[Bn,/.*?opera\/([0-9]+)\.([0-9]+).*/],search:kn("opera")},{name:"Firefox",versionRegexes:[/.*?firefox\/\ ?([0-9]+)\.([0-9]+).*/],search:kn("firefox")},{name:"Safari",versionRegexes:[Bn,/.*?cpu os ([0-9]+)_([0-9]+).*/],search:function(Xe){return(Mn(Xe,"safari")||Mn(Xe,"mobile/"))&&Mn(Xe,"applewebkit")}}],je=[{name:"Windows",search:kn("win"),versionRegexes:[/.*?windows\ nt\ ?([0-9]+)\.([0-9]+).*/]},{name:"iOS",search:function(Xe){return Mn(Xe,"iphone")||Mn(Xe,"ipad")},versionRegexes:[/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,/.*cpu os ([0-9]+)_([0-9]+).*/,/.*cpu iphone os ([0-9]+)_([0-9]+).*/]},{name:"Android",search:kn("android"),versionRegexes:[/.*?android\ ?([0-9]+)\.([0-9]+).*/]},{name:"OSX",search:kn("mac os x"),versionRegexes:[/.*?mac\ os\ x\ ?([0-9]+)_([0-9]+).*/]},{name:"Linux",search:kn("linux"),versionRegexes:[]},{name:"Solaris",search:kn("sunos"),versionRegexes:[]},{name:"FreeBSD",search:kn("freebsd"),versionRegexes:[]},{name:"ChromeOS",search:kn("cros"),versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/]}],Bt={browsers:P(On),oses:P(je)},si="Firefox",Hn=function(Xe){var zt=Xe.current,mn=Xe.version,ni=function(Fi){return function(){return zt===Fi}};return{current:zt,version:mn,isEdge:ni("Edge"),isChrome:ni("Chrome"),isIE:ni("IE"),isOpera:ni("Opera"),isFirefox:ni(si),isSafari:ni("Safari")}},An={unknown:function(){return Hn({current:void 0,version:rn.unknown()})},nu:Hn,edge:P("Edge"),chrome:P("Chrome"),ie:P("IE"),opera:P("Opera"),firefox:P(si),safari:P("Safari")},vn="Windows",Zi="Android",Gr="Solaris",zr="FreeBSD",Eo="ChromeOS",jn=function(Xe){var zt=Xe.current,mn=Xe.version,ni=function(Fi){return function(){return zt===Fi}};return{current:zt,version:mn,isWindows:ni(vn),isiOS:ni("iOS"),isAndroid:ni(Zi),isOSX:ni("OSX"),isLinux:ni("Linux"),isSolaris:ni(Gr),isFreeBSD:ni(zr),isChromeOS:ni(Eo)}},ct={unknown:function(){return jn({current:void 0,version:rn.unknown()})},nu:jn,windows:P(vn),ios:P("iOS"),android:P(Zi),linux:P("Linux"),osx:P("OSX"),solaris:P(Gr),freebsd:P(zr),chromeos:P(Eo)},oi_detect=function(Xe,zt,mn){var ni=Bt.browsers(),Fi=Bt.oses(),nr=zt.bind(function(Ca){return He(ni,Ca)}).orThunk(function(){return function(Xe,zt){return st(Xe,zt).map(function(mn){var ni=rn.detect(mn.versionRegexes,zt);return{current:mn.name,version:ni}})}(ni,Xe)}).fold(An.unknown,An.nu),zo=function(Xe,zt){return st(Xe,zt).map(function(mn){var ni=rn.detect(mn.versionRegexes,zt);return{current:mn.name,version:ni}})}(Fi,Xe).fold(ct.unknown,ct.nu),oa=function(Xe,zt,mn,ni){var Fi=Xe.isiOS()&&!0===/ipad/i.test(mn),nr=Xe.isiOS()&&!Fi,zo=Xe.isiOS()||Xe.isAndroid(),oa=zo||ni("(pointer:coarse)"),Ca=Fi||!nr&&zo&&ni("(min-device-width:768px)"),Ba=nr||zo&&!Ca,Is=zt.isSafari()&&Xe.isiOS()&&!1===/safari/i.test(mn),ul=!Ba&&!Ca&&!Is;return{isiPad:P(Fi),isiPhone:P(nr),isTablet:P(Ca),isPhone:P(Ba),isTouch:P(oa),isAndroid:Xe.isAndroid,isiOS:Xe.isiOS,isWebView:P(Is),isDesktop:P(ul)}}(zo,nr,Xe,mn);return{browser:nr,os:zo,deviceType:oa}},Ni=function(Xe){return window.matchMedia(Xe).matches},Nn=function(Xe){var mn,zt=!1;return function(){for(var ni=[],Fi=0;Fi<arguments.length;Fi++)ni[Fi]=arguments[Fi];return zt||(zt=!0,mn=Xe.apply(null,ni)),mn}}(function(){return oi_detect(navigator.userAgent,ye.from(navigator.userAgentData),Ni)}),ce=function(Xe){if(null==Xe)throw new Error("Node cannot be null or undefined");return{dom:Xe}},Qe={fromHtml:function(Xe,zt){var ni=(zt||document).createElement("div");if(ni.innerHTML=Xe,!ni.hasChildNodes()||ni.childNodes.length>1)throw console.error("HTML does not have a single root node",Xe),new Error("HTML must have a single root node");return ce(ni.childNodes[0])},fromTag:function(Xe,zt){var ni=(zt||document).createElement(Xe);return ce(ni)},fromText:function(Xe,zt){var ni=(zt||document).createTextNode(Xe);return ce(ni)},fromDom:ce,fromPoint:function(Xe,zt,mn){return ye.from(Xe.dom.elementFromPoint(zt,mn)).map(ce)}},Tn=function(Xe,zt){return Xe.dom===zt.dom},mo=function(Xe,zt){return function(Xe,zt){return function(Xe,zt,mn){return 0!=(Xe.compareDocumentPosition(zt)&mn)}(Xe,zt,Node.DOCUMENT_POSITION_CONTAINED_BY)}(Xe.dom,zt.dom)},rr=function(Xe,zt){return Nn().browser.isIE()?mo(Xe,zt):function(Xe,zt){var mn=Xe.dom,ni=zt.dom;return mn!==ni&&mn.contains(ni)}(Xe,zt)},aa=function(Xe,zt){var mn=Xe.dom;if(1!==mn.nodeType)return!1;var ni=mn;if(void 0!==ni.matches)return ni.matches(zt);if(void 0!==ni.msMatchesSelector)return ni.msMatchesSelector(zt);if(void 0!==ni.webkitMatchesSelector)return ni.webkitMatchesSelector(zt);if(void 0!==ni.mozMatchesSelector)return ni.mozMatchesSelector(zt);throw new Error("Browser lacks native selectors")},ea=tinymce.util.Tools.resolve("tinymce.dom.RangeUtils"),Bo=tinymce.util.Tools.resolve("tinymce.dom.TreeWalker"),Ii=tinymce.util.Tools.resolve("tinymce.util.VK"),an=Object.keys,Zn=function(Xe,zt){for(var mn=an(Xe),ni=0,Fi=mn.length;ni<Fi;ni++){var nr=mn[ni];zt(Xe[nr],nr)}},Et=function(Xe,zt){var mn={};return function(Xe,zt,mn,ni){Zn(Xe,function(nr,zo){(zt(nr,zo)?mn:ni)(nr,zo)})}(Xe,zt,function(Xe){return function(zt,mn){Xe[mn]=zt}}(mn),n),mn};typeof window<"u"||Function("return this;")();var gn=function(Xe){return Xe.dom.nodeName.toLowerCase()},Ft=function(Xe){return function(zt){return function(Xe){return Xe.dom.nodeType}(zt)===Xe}}(1),Ut=function(Xe){return function(zt){return Ft(zt)&&gn(zt)===Xe}},Gn=function(Xe,zt){var mn=Xe.dom;Zn(zt,function(ni,Fi){!function(Xe,zt,mn){if(!(e(mn)||g(mn)||T(mn)))throw console.error("Invalid call to Attribute.set. Key ",zt,":: Value ",mn,":: Element ",Xe),new Error("Attribute value was not simple");Xe.setAttribute(zt,mn+"")}(mn,Fi,ni)})},xi=function(Xe){return re(Xe.dom.attributes,function(zt,mn){return zt[mn.name]=mn.value,zt},{})},Cr=function(Xe){return ye.from(Xe.dom.parentNode).map(Qe.fromDom)},Fr=function(Xe){return pe(Xe.dom.childNodes,Qe.fromDom)},en=function(Xe,zt){var mn=Xe.dom.childNodes;return ye.from(mn[zt]).map(Qe.fromDom)},Wn=function(Xe){return en(Xe,0)},at=function(Xe){return en(Xe,Xe.dom.childNodes.length-1)},It=function(Xe,zt){Cr(Xe).each(function(ni){ni.dom.insertBefore(zt.dom,Xe.dom)})},Qt=function(Xe,zt){Xe.dom.appendChild(zt.dom)},Pt=function(Xe,zt){Pe(zt,function(mn){Qt(Xe,mn)})},cn=function(Xe){var zt=Xe.dom;null!==zt.parentNode&&zt.parentNode.removeChild(zt)},ii=function(Xe){return function(Xe,zt){return Qe.fromDom(Xe.dom.cloneNode(zt))}(Xe,!0)},Ri=function(Xe,zt){var mn=function(Xe,zt){var mn=Qe.fromTag(zt),ni=xi(Xe);return Gn(mn,ni),mn}(Xe,zt);It(Xe,mn);var ni=Fr(Xe);return Pt(mn,ni),cn(Xe),mn},_r=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),er=tinymce.util.Tools.resolve("tinymce.util.Tools"),Yr=function(Xe){return function(zt){return zt&&zt.nodeName.toLowerCase()===Xe}},_o=function(Xe){return function(zt){return zt&&Xe.test(zt.nodeName)}},Si=function(Xe){return Xe&&3===Xe.nodeType},to=_o(/^(OL|UL|DL)$/),Oa=_o(/^(OL|UL)$/),Uo=Yr("ol"),rl=_o(/^(LI|DT|DD)$/),Vs=_o(/^(DT|DD)$/),ps=_o(/^(TH|TD)$/),ts=Yr("br"),tc=function(Xe,zt){return zt&&!!Xe.schema.getTextBlockElements()[zt.nodeName]},$a=function(Xe,zt){return Xe&&Xe.nodeName in zt},Mi=function(Xe,zt,mn){var ni=Xe.isEmpty(zt);return!(mn&&Xe.select("span[data-mce-type=bookmark]",zt).length>0)&&ni},Di=function(Xe,zt){return Xe.isChildOf(zt,Xe.getRoot())},$t=function(Xe,zt){var zo,oa,Ca,mn=Xe.dom,ni=Xe.schema.getBlockElements(),Fi=mn.createFragment(),nr=function(Xe){var zt=Xe.getParam("forced_root_block","p");return!1===zt?"":!0===zt?"p":zt}(Xe);if(nr&&((oa=mn.create(nr)).tagName===nr.toUpperCase()&&mn.setAttribs(oa,function(Xe){return Xe.getParam("forced_root_block_attrs",{})}(Xe)),$a(zt.firstChild,ni)||Fi.appendChild(oa)),zt)for(;zo=zt.firstChild;){var Ba=zo.nodeName;!Ca&&("SPAN"!==Ba||"bookmark"!==zo.getAttribute("data-mce-type"))&&(Ca=!0),$a(zo,ni)?(Fi.appendChild(zo),oa=null):nr?(oa||(oa=mn.create(nr),Fi.appendChild(oa)),oa.appendChild(zo)):Fi.appendChild(zo)}return nr?Ca||oa.appendChild(mn.create("br",{"data-mce-bogus":"1"})):Fi.appendChild(mn.create("br")),Fi},Ma=_r.DOM,Ds=Ut("dd"),ja=Ut("dt"),wa=function(Xe,zt){Ds(zt)?Ri(zt,"dt"):ja(zt)&&Cr(zt).each(function(mn){return function(Xe,zt,mn){var Ba,Fi=Ma.select('span[data-mce-type="bookmark"]',zt),nr=$t(Xe,mn),zo=Ma.createRng();zo.setStartAfter(mn),zo.setEndAfter(zt);for(var oa=zo.extractContents(),Ca=oa.firstChild;Ca;Ca=Ca.firstChild)if("LI"===Ca.nodeName&&Xe.dom.isEmpty(Ca)){Ma.remove(Ca);break}Xe.dom.isEmpty(oa)||Ma.insertAfter(oa,zt),Ma.insertAfter(nr,zt),Mi(Xe.dom,mn.parentNode)&&(Ba=mn.parentNode,er.each(Fi,function(Is){Ba.parentNode.insertBefore(Is,mn.parentNode)}),Ma.remove(Ba)),Ma.remove(mn),Mi(Xe.dom,zt)&&Ma.remove(zt)}(Xe,mn.dom,zt.dom)})},ns=function(Xe){ja(Xe)&&Ri(Xe,"dd")},$r=function(Xe,zt){if(Si(Xe))return{container:Xe,offset:zt};var mn=ea.getNode(Xe,zt);return Si(mn)?{container:mn,offset:zt>=Xe.childNodes.length?mn.data.length:0}:mn.previousSibling&&Si(mn.previousSibling)?{container:mn.previousSibling,offset:mn.previousSibling.data.length}:mn.nextSibling&&Si(mn.nextSibling)?{container:mn.nextSibling,offset:0}:{container:Xe,offset:zt}},Ts=function(Xe){var zt=Xe.cloneRange(),mn=$r(Xe.startContainer,Xe.startOffset);zt.setStart(mn.container,mn.offset);var ni=$r(Xe.endContainer,Xe.endOffset);return zt.setEnd(ni.container,ni.offset),zt},Gl=tinymce.util.Tools.resolve("tinymce.dom.DomQuery"),ol=function(Xe,zt){var mn=zt||Xe.selection.getStart(!0);return Xe.dom.getParent(mn,"OL,UL,DL",ar(Xe,mn))},Jn=function(Xe){var zt=ol(Xe),mn=Xe.selection.getSelectedBlocks();return function(Xe,zt){return Xe&&1===zt.length&&zt[0]===Xe}(zt,mn)?function(Xe){return xe(Xe.querySelectorAll("ol,ul,dl"),to)}(zt):xe(mn,function(ni){return to(ni)&&zt!==ni})},ti=function(Xe){var zt=Xe.selection.getSelectedBlocks();return xe(function(Xe,zt){var mn=er.map(zt,function(ni){return Xe.dom.getParent(ni,"li,dd,dt",ar(Xe,ni))||ni});return Gl.unique(mn)}(Xe,zt),rl)},ar=function(Xe,zt){var mn=Xe.dom.getParents(zt,"TD,TH");return mn.length>0?mn[0]:Xe.getBody()},vr=function(Xe,zt){var mn=Xe.dom.getParents(zt,"ol,ul",ar(Xe,zt));return ke(mn)},Li=function(Xe){var zt=function(Xe){var zt=vr(Xe,Xe.selection.getStart()),mn=xe(Xe.selection.getSelectedBlocks(),Oa);return zt.toArray().concat(mn)}(Xe);return Ta(Xe,zt)},Ta=function(Xe,zt){var mn=pe(zt,function(ni){return vr(Xe,ni).getOr(ni)});return Gl.unique(mn)},La=function(Xe,zt,mn){return void 0===mn&&(mn=B),Xe.exists(function(ni){return mn(ni,zt)})},Ps=function(Xe,zt,mn){return Xe.isSome()&&zt.isSome()?ye.some(mn(Xe.getOrDie(),zt.getOrDie())):ye.none()},yt=function(Xe,zt,mn){return Xe.fire("ListMutation",{action:zt,element:mn})},We=function(Xe,zt,mn){if(!e(mn))throw console.error("Invalid call to CSS.set. Property ",zt,":: Value ",mn,":: Element ",Xe),new Error("CSS value must be a string: "+mn);(function(Xe){return void 0!==Xe.style&&E(Xe.style.getPropertyValue)})(Xe)&&Xe.style.setProperty(zt,mn)},Rt=function(Xe,zt,mn){var ni=Xe.dom;We(ni,zt,mn)},Qn=function(Xe,zt){Qt(Xe.item,zt.list)},wr=function(Xe,zt){var mn={list:Qe.fromTag(zt,Xe),item:Qe.fromTag("li",Xe)};return Qt(mn.list,mn.item),mn},To=function(Xe,zt,mn){var ni=zt.slice(0,mn.depth);return ke(ni).each(function(Fi){var nr=function(Xe,zt,mn){var ni=Qe.fromTag("li",Xe);return Gn(ni,zt),Pt(ni,mn),ni}(Xe,mn.itemAttributes,mn.content);(function(Xe,zt){Qt(Xe.list,zt),Xe.item=zt})(Fi,nr),function(Xe,zt){gn(Xe.list)!==zt.listType&&(Xe.list=Ri(Xe.list,zt.listType)),Gn(Xe.list,zt.listAttributes)}(Fi,mn)}),ni},Ao=function(Xe,zt,mn){var ni=function(Xe,zt,mn){for(var ni=[],Fi=0;Fi<mn;Fi++)ni.push(wr(Xe,zt.listType));return ni}(Xe,mn,mn.depth-zt.length);return function(Xe){for(var zt=1;zt<Xe.length;zt++)Qn(Xe[zt-1],Xe[zt])}(ni),function(Xe,zt){for(var mn=0;mn<Xe.length-1;mn++)Rt(Xe[mn].item,"list-style-type","none");ke(Xe).each(function(ni){Gn(ni.list,zt.listAttributes),Gn(ni.item,zt.itemAttributes),Pt(ni.item,zt.content)})}(ni,mn),function(Xe,zt){Ps(ke(Xe),j(zt),Qn)}(zt,ni),zt.concat(ni)},Ho=function(Xe){return aa(Xe,"OL,UL")},Ra=function(Xe){return Wn(Xe).exists(Ho)},Jt=function(Xe){return Xe.depth>0},De=function(Xe){return Xe.isSelected},bt=function(Xe){var zt=Fr(Xe),mn=function(Xe){return at(Xe).exists(Ho)}(Xe)?zt.slice(0,-1):zt;return pe(mn,ii)},yi=function(Xe){return Pe(Xe,function(zt,mn){(function(Xe,zt){var mn=Xe[zt].depth,ni=function(nr){return nr.depth===mn&&!nr.dirty},Fi=function(nr){return nr.depth<mn};return oe(Z(Xe.slice(0,zt)),ni,Fi).orThunk(function(){return oe(Xe.slice(zt+1),ni,Fi)})})(Xe,mn).fold(function(){zt.dirty&&function(Xe){Xe.listAttributes=Et(Xe.listAttributes,function(zt,mn){return"start"!==mn})}(zt)},function(ni){return function(Xe,zt){Xe.listType=zt.listType,Xe.listAttributes=nt({},zt.listAttributes)}(zt,ni)})}),Xe},ya=function(Xe,zt,mn,ni){return Wn(ni).filter(Ho).fold(function(){zt.each(function(zo){Tn(zo.start,ni)&&mn.set(!0)});var Fi=function(Xe,zt,mn){return Cr(Xe).filter(Ft).map(function(ni){return{depth:zt,dirty:!1,isSelected:mn,content:bt(Xe),itemAttributes:xi(Xe),listAttributes:xi(ni),listType:gn(ni)}})}(ni,Xe,mn.get());zt.each(function(zo){Tn(zo.end,ni)&&mn.set(!1)});var nr=at(ni).filter(Ho).map(function(zo){return Na(Xe,zt,mn,zo)}).getOr([]);return Fi.toArray().concat(nr)},function(Fi){return Na(Xe,zt,mn,Fi)})},Na=function(Xe,zt,mn,ni){return le(Fr(ni),function(Fi){return(Ho(Fi)?Na:ya)(Xe+1,zt,mn,Fi)})},ia=function(Xe,zt){var mn=yi(zt);return pe(mn,function(ni){var Fi=function(Xe,zt){var ni=(zt||document).createDocumentFragment();return Pe(Xe,function(Fi){ni.appendChild(Fi.dom)}),Qe.fromDom(ni)}(ni.content);return Qe.fromDom($t(Xe,Fi.dom))})},$o=function(Xe,zt){var mn=yi(zt);return function(Xe,zt){var mn=re(zt,function(ni,Fi){return Fi.depth>ni.length?Ao(Xe,ni,Fi):To(Xe,ni,Fi)},[]);return j(mn).map(function(ni){return ni.list})}(Xe.contentDocument,mn).toArray()},Tc=function(Xe,zt,mn){var ni=function(Xe,zt){var mn=function(Xe){var zt=!1;return{get:function(){return zt},set:function(Fi){zt=Fi}}}();return pe(Xe,function(Fi){return{sourceList:Fi,entries:Na(0,zt,mn,Fi)}})}(zt,function(Xe){var zt=pe(ti(Xe),Qe.fromDom);return Ps(me(zt,Y(Ra)),me(Z(zt),Y(Ra)),function(mn,ni){return{start:mn,end:ni}})}(Xe));Pe(ni,function(Fi){!function(Xe,zt){Pe(xe(Xe,De),function(mn){return function(Xe,zt){switch(Xe){case"Indent":zt.depth++;break;case"Outdent":zt.depth--;break;case"Flatten":zt.depth=0}zt.dirty=!0}(zt,mn)})}(Fi.entries,mn);var nr=function(Xe,zt){return le(function(Xe,zt){if(0===Xe.length)return[];for(var mn=zt(Xe[0]),ni=[],Fi=[],nr=0,zo=Xe.length;nr<zo;nr++){var oa=Xe[nr],Ca=zt(oa);Ca!==mn&&(ni.push(Fi),Fi=[]),mn=Ca,Fi.push(oa)}return 0!==Fi.length&&ni.push(Fi),ni}(zt,Jt),function(mn){return j(mn).exists(Jt)?$o(Xe,mn):ia(Xe,mn)})}(Xe,Fi.entries);Pe(nr,function(zo){yt(Xe,"Indent"===mn?"IndentList":"OutdentList",zo.dom)}),function(Xe,zt){Pe(zt,function(mn){It(Xe,mn)})}(Fi.sourceList,nr),cn(Fi.sourceList)})},Qs=function(Xe,zt){var mn=pe(Li(Xe),Qe.fromDom),ni=pe(function(Xe){return xe(ti(Xe),Vs)}(Xe),Qe.fromDom),Fi=!1;if(mn.length||ni.length){var nr=Xe.selection.getBookmark();Tc(Xe,mn,zt),function(Xe,zt,mn){Pe(mn,"Indent"===zt?ns:function(ni){return wa(Xe,ni)})}(Xe,zt,ni),Xe.selection.moveToBookmark(nr),Xe.selection.setRng(Ts(Xe.selection.getRng())),Xe.nodeChanged(),Fi=!0}return Fi},vu=function(Xe){return Qs(Xe,"Indent")},hl=function(Xe){return Qs(Xe,"Outdent")},Wl=function(Xe){return Qs(Xe,"Flatten")},sp=tinymce.util.Tools.resolve("tinymce.dom.BookmarkManager"),Ku=_r.DOM,Da=function(Xe){var zt={},mn=function(ni){var Fi=Xe[ni?"startContainer":"endContainer"],nr=Xe[ni?"startOffset":"endOffset"];if(1===Fi.nodeType){var zo=Ku.create("span",{"data-mce-type":"bookmark"});Fi.hasChildNodes()?(nr=Math.min(nr,Fi.childNodes.length-1),ni?Fi.insertBefore(zo,Fi.childNodes[nr]):Ku.insertAfter(zo,Fi.childNodes[nr])):Fi.appendChild(zo),Fi=zo,nr=0}zt[ni?"startContainer":"endContainer"]=Fi,zt[ni?"startOffset":"endOffset"]=nr};return mn(!0),Xe.collapsed||mn(),zt},Pl=function(Xe){var zt=function(ni){var Fi,zo=Fi=Xe[ni?"startContainer":"endContainer"],oa=Xe[ni?"startOffset":"endOffset"];zo&&(1===zo.nodeType&&(oa=function(Ca){for(var Ba=Ca.parentNode.firstChild,Is=0;Ba;){if(Ba===Ca)return Is;(1!==Ba.nodeType||"bookmark"!==Ba.getAttribute("data-mce-type"))&&Is++,Ba=Ba.nextSibling}return-1}(zo),zo=zo.parentNode,Ku.remove(Fi),!zo.hasChildNodes()&&Ku.isBlock(zo)&&zo.appendChild(Ku.create("br"))),Xe[ni?"startContainer":"endContainer"]=zo,Xe[ni?"startOffset":"endOffset"]=oa)};zt(!0),zt();var mn=Ku.createRng();return mn.setStart(Xe.startContainer,Xe.startOffset),Xe.endContainer&&mn.setEnd(Xe.endContainer,Xe.endOffset),Ts(mn)},gl=function(Xe){switch(Xe){case"UL":return"ToggleUlList";case"OL":return"ToggleOlList";case"DL":return"ToggleDLList"}},ss=function(Xe){return/\btox\-/.test(Xe.className)},gc=function(Xe,zt,mn){var ni=function(nr){var zo=oe(nr.parents,to,ps).filter(function(oa){return oa.nodeName===zt&&!ss(oa)}).isSome();mn(zo)},Fi=Xe.dom.getParents(Xe.selection.getNode());return ni({parents:Fi}),Xe.on("NodeChange",ni),function(){return Xe.off("NodeChange",ni)}},Pc=function(Xe,zt){er.each(zt,function(mn,ni){Xe.setAttribute(ni,mn)})},Ol=function(Xe,zt,mn){(function(Xe,zt,mn){var ni=mn["list-style-type"]?mn["list-style-type"]:null;Xe.setStyle(zt,"list-style-type",ni)})(Xe,zt,mn),function(Xe,zt,mn){Pc(zt,mn["list-attributes"]),er.each(Xe.select("li",zt),function(ni){Pc(ni,mn["list-item-attributes"])})}(Xe,zt,mn)},Yc=function(Xe,zt,mn,ni){var Fi=zt[mn?"startContainer":"endContainer"],nr=zt[mn?"startOffset":"endOffset"];for(1===Fi.nodeType&&(Fi=Fi.childNodes[Math.min(nr,Fi.childNodes.length-1)]||Fi),!mn&&ts(Fi.nextSibling)&&(Fi=Fi.nextSibling);Fi.parentNode!==ni;){if(tc(Xe,Fi)||/^(TD|TH)$/.test(Fi.parentNode.nodeName))return Fi;Fi=Fi.parentNode}return Fi},bd=function(Xe,zt,mn){var ni=Xe.selection.getRng(),Fi="LI",nr=ar(Xe,Xe.selection.getStart(!0)),zo=Xe.dom;if("false"!==zo.getContentEditable(Xe.selection.getNode())){"DL"===(zt=zt.toUpperCase())&&(Fi="DT");var oa=Da(ni),Ca=function(Xe,zt,mn){for(var oa,ni=[],Fi=Xe.dom,nr=Yc(Xe,zt,!0,mn),zo=Yc(Xe,zt,!1,mn),Ca=[],Ba=nr;Ba&&(Ca.push(Ba),Ba!==zo);Ba=Ba.nextSibling);return er.each(Ca,function(Is){if(tc(Xe,Is))return ni.push(Is),void(oa=null);if(Fi.isBlock(Is)||ts(Is))return ts(Is)&&Fi.remove(Is),void(oa=null);var ul=Is.nextSibling;sp.isBookmarkNode(Is)&&(to(ul)||tc(Xe,ul)||!ul&&Is.parentNode===mn)?oa=null:(oa||(oa=Fi.create("p"),Is.parentNode.insertBefore(oa,Is),ni.push(oa)),oa.appendChild(Is))}),ni}(Xe,ni,nr);er.each(Ca,function(Ba){var Is,ul=Ba.previousSibling,bu=Ba.parentNode;rl(bu)||(ul&&to(ul)&&ul.nodeName===zt&&function(Xe,zt,mn){var ni=Xe.getStyle(zt,"list-style-type"),Fi=mn?mn["list-style-type"]:"";return ni===(null===Fi?"":Fi)}(zo,ul,mn)?(Is=ul,Ba=zo.rename(Ba,Fi),ul.appendChild(Ba)):(Is=zo.create(zt),Ba.parentNode.insertBefore(Is,Ba),Is.appendChild(Ba),Ba=zo.rename(Ba,Fi)),function(Xe,zt,mn){er.each(mn,function(ni){var Fi;return Xe.setStyle(zt,((Fi={})[ni]="",Fi))})}(zo,Ba,["margin","margin-right","margin-bottom","margin-left","margin-top","padding","padding-right","padding-bottom","padding-left","padding-top"]),Ol(zo,Is,mn),kr(Xe.dom,Is))}),Xe.selection.setRng(Pl(oa))}},Dr=function(Xe,zt,mn){return function(Xe,zt){return Xe&&zt&&to(Xe)&&Xe.nodeName===zt.nodeName}(zt,mn)&&function(Xe,zt,mn){return Xe.getStyle(zt,"list-style-type",!0)===Xe.getStyle(mn,"list-style-type",!0)}(Xe,zt,mn)&&function(Xe,zt){return Xe.className===zt.className}(zt,mn)},kr=function(Xe,zt){var mn,ni;if(mn=zt.nextSibling,Dr(Xe,zt,mn)){for(;ni=mn.firstChild;)zt.appendChild(ni);Xe.remove(mn)}if(mn=zt.previousSibling,Dr(Xe,zt,mn)){for(;ni=mn.lastChild;)zt.insertBefore(ni,zt.firstChild);Xe.remove(mn)}},oo=function(Xe,zt,mn,ni,Fi){var nr=to(zt);if(nr&&zt.nodeName===ni&&!da(Fi))Wl(Xe);else{bd(Xe,ni,Fi);var zo=Da(Xe.selection.getRng()),oa=nr?function mt(Xe,zt,mn){if(mn||2===arguments.length)for(var nr,ni=0,Fi=zt.length;ni<Fi;ni++)(nr||!(ni in zt))&&(nr||(nr=Array.prototype.slice.call(zt,0,ni)),nr[ni]=zt[ni]);return Xe.concat(nr||Array.prototype.slice.call(zt))}([zt],mn,!0):mn;er.each(oa,function(Ca){!function(Xe,zt,mn,ni){if(zt.nodeName!==mn){var Fi=Xe.dom.rename(zt,mn);Ol(Xe.dom,Fi,ni),yt(Xe,gl(mn),Fi)}else Ol(Xe.dom,zt,ni),yt(Xe,gl(mn),zt)}(Xe,Ca,ni,Fi)}),Xe.selection.setRng(Pl(zo))}},da=function(Xe){return"list-style-type"in Xe},Ia=function(Xe,zt,mn){var ni=ol(Xe),Fi=Jn(Xe),nr=l(mn)?mn:{};Fi.length>0?oo(Xe,ni,Fi,zt,nr):function(Xe,zt,mn,ni){if(zt!==Xe.getBody())if(zt)if(zt.nodeName!==mn||da(ni)||ss(zt)){var Fi=Da(Xe.selection.getRng());Ol(Xe.dom,zt,ni);var nr=Xe.dom.rename(zt,mn);kr(Xe.dom,nr),Xe.selection.setRng(Pl(Fi)),bd(Xe,mn,ni),yt(Xe,gl(mn),nr)}else Wl(Xe);else bd(Xe,mn,ni),yt(Xe,gl(mn),zt)}(Xe,ni,zt,nr)},cc=_r.DOM,xc=function(Xe,zt){var mn=er.grep(Xe.select("ol,ul",zt));er.each(mn,function(ni){!function(Xe,zt){var ni,mn=zt.parentNode;"LI"===mn.nodeName&&mn.firstChild===zt&&((ni=mn.previousSibling)&&"LI"===ni.nodeName?(ni.appendChild(zt),Mi(Xe,mn)&&cc.remove(mn)):cc.setStyle(mn,"listStyleType","none")),to(mn)&&(ni=mn.previousSibling)&&"LI"===ni.nodeName&&ni.appendChild(zt)}(Xe,ni)})},Hc=function(Xe,zt,mn,ni){var Fi=zt.startContainer,nr=zt.startOffset;if(Si(Fi)&&(mn?nr<Fi.data.length:nr>0))return Fi;var zo=Xe.schema.getNonEmptyElements();1===Fi.nodeType&&(Fi=ea.getNode(Fi,nr));var oa=new Bo(Fi,ni);for(mn&&function(Xe,zt){return!!ts(zt)&&Xe.isBlock(zt.nextSibling)&&!ts(zt.previousSibling)}(Xe.dom,Fi)&&oa.next();Fi=oa[mn?"next":"prev2"]();)if("LI"===Fi.nodeName&&!Fi.hasChildNodes()||zo[Fi.nodeName]||Si(Fi)&&Fi.data.length>0)return Fi},lp=function(Xe,zt){var mn=zt.childNodes;return 1===mn.length&&!to(mn[0])&&Xe.isBlock(mn[0])},Ju=function(Xe,zt,mn){var ni,Fi=lp(Xe,mn)?mn.firstChild:mn;if(function(Xe,zt){lp(Xe,zt)&&Xe.remove(zt.firstChild,!0)}(Xe,zt),!Mi(Xe,zt,!0))for(;ni=zt.firstChild;)Fi.appendChild(ni)},Su=function(Xe,zt,mn){var ni,Fi=zt.parentNode;if(Di(Xe,zt)&&Di(Xe,mn)){to(mn.lastChild)&&(ni=mn.lastChild),Fi===mn.lastChild&&ts(Fi.previousSibling)&&Xe.remove(Fi.previousSibling);var nr=mn.lastChild;nr&&ts(nr)&&zt.hasChildNodes()&&Xe.remove(nr),Mi(Xe,mn,!0)&&Xe.$(mn).empty(),Ju(Xe,zt,mn),ni&&mn.appendChild(ni);var oa=rr(Qe.fromDom(mn),Qe.fromDom(zt))?Xe.getParents(zt,to,mn):[];Xe.remove(zt),Pe(oa,function(Ca){Mi(Xe,Ca)&&Ca!==Xe.getRoot()&&Xe.remove(Ca)})}},Cd=function(Xe,zt,mn,ni){var Fi=Xe.dom;if(Fi.isEmpty(ni))!function(Xe,zt,mn){Xe.dom.$(mn).empty(),Su(Xe.dom,zt,mn),Xe.selection.setCursorLocation(mn,0)}(Xe,mn,ni);else{var nr=Da(zt);Su(Fi,mn,ni),Xe.selection.setRng(Pl(nr))}},ht=function(Xe,zt){var mn=Xe.dom,ni=Xe.selection,Fi=ni.getStart(),nr=ar(Xe,Fi),zo=mn.getParent(ni.getStart(),"LI",nr);if(zo){var oa=zo.parentNode;if(oa===Xe.getBody()&&Mi(mn,oa))return!0;var Ca=Ts(ni.getRng()),Ba=mn.getParent(Hc(Xe,Ca,zt,nr),"LI",nr);if(Ba&&Ba!==zo)return Xe.undoManager.transact(function(){zt?Cd(Xe,Ca,Ba,zo):function(Xe){return Xe.parentNode.firstChild===Xe}(zo)?hl(Xe):function(Xe,zt,mn,ni){var Fi=Da(zt);Su(Xe.dom,mn,ni);var nr=Pl(Fi);Xe.selection.setRng(nr)}(Xe,Ca,zo,Ba)}),!0;if(!Ba&&!zt&&0===Ca.startOffset&&0===Ca.endOffset)return Xe.undoManager.transact(function(){Wl(Xe)}),!0}return!1},Kn=function(Xe,zt){return ht(Xe,zt)||function(Xe,zt){var mn=Xe.dom,ni=Xe.selection.getStart(),Fi=ar(Xe,ni),nr=mn.getParent(ni,mn.isBlock,Fi);if(nr&&mn.isEmpty(nr)){var zo=Ts(Xe.selection.getRng()),oa=mn.getParent(Hc(Xe,zo,zt,Fi),"LI",Fi);if(oa)return Xe.undoManager.transact(function(){(function(Xe,zt,mn){var ni=Xe.getParent(zt.parentNode,Xe.isBlock,mn);Xe.remove(zt),ni&&Xe.isEmpty(ni)&&Xe.remove(ni)})(mn,nr,Fi),kr(mn,oa.parentNode),Xe.selection.select(oa,!0),Xe.selection.collapse(zt)}),!0}return!1}(Xe,zt)},sr=function(Xe,zt){return Xe.selection.isCollapsed()?Kn(Xe,zt):function(Xe){var zt=Xe.selection.getStart(),mn=ar(Xe,zt);return!!(Xe.dom.getParent(zt,"LI,DT,DD",mn)||ti(Xe).length>0)&&(Xe.undoManager.transact(function(){Xe.execCommand("Delete"),xc(Xe.dom,Xe.getBody())}),!0)}(Xe)},ga=function(Xe){return{backspaceDelete:function(zt){sr(Xe,zt)}}},Kr=function(Xe){var zt=Z(Gi(Xe).split("")),mn=pe(zt,function(ni,Fi){var nr=ni.toUpperCase().charCodeAt(0)-"A".charCodeAt(0)+1;return Math.pow(26,Fi)*nr});return re(mn,function(ni,Fi){return ni+Fi},0)},os=function(Xe){if(--Xe<0)return"";var zt=Xe%26,mn=Math.floor(Xe/26);return os(mn)+String.fromCharCode("A".charCodeAt(0)+zt)},Os=function(Xe){var zt=parseInt(Xe.start,10);return La(Xe.listStyleType,"upper-alpha")?os(zt):La(Xe.listStyleType,"lower-alpha")?os(zt).toLowerCase():Xe.start},yu=function(Xe){var zt=ol(Xe);Uo(zt)&&Xe.windowManager.open({title:"List Properties",body:{type:"panel",items:[{type:"input",name:"start",label:"Start list at number",inputMode:"numeric"}]},initialData:{start:Os({start:Xe.dom.getAttrib(zt,"start","1"),listStyleType:ye.some(Xe.dom.getStyle(zt,"list-style-type"))})},buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],onSubmit:function(mn){(function(Xe){switch(function(Xe){return function(Xe){return/^[0-9]+$/.test(Xe)}(Xe)?2:function(Xe){return/^[A-Z]+$/.test(Xe)}(Xe)?0:function(Xe){return/^[a-z]+$/.test(Xe)}(Xe)?1:function(Xe){return!function(Xe){return Xe.length>0}(Xe)}(Xe)?3:4}(Xe)){case 2:return ye.some({listStyleType:ye.none(),start:Xe});case 0:return ye.some({listStyleType:ye.some("upper-alpha"),start:Kr(Xe).toString()});case 1:return ye.some({listStyleType:ye.some("lower-alpha"),start:Kr(Xe).toString()});case 3:return ye.some({listStyleType:ye.none(),start:""});case 4:return ye.none()}})(mn.getData().start).each(function(Fi){Xe.execCommand("mceListUpdate",!1,{attrs:{start:"1"===Fi.start?"":Fi.start},styles:{"list-style-type":Fi.listStyleType.getOr("")}})}),mn.close()}})},Ks=function(Xe,zt){return function(){var mn=ol(Xe);return mn&&mn.nodeName===zt}},_l=function(Xe){Xe.addCommand("mceListProps",function(){yu(Xe)})},Dc=function(Xe){Xe.on("BeforeExecCommand",function(zt){var mn=zt.command.toLowerCase();"indent"===mn?vu(Xe):"outdent"===mn&&hl(Xe)}),Xe.addCommand("InsertUnorderedList",function(zt,mn){Ia(Xe,"UL",mn)}),Xe.addCommand("InsertOrderedList",function(zt,mn){Ia(Xe,"OL",mn)}),Xe.addCommand("InsertDefinitionList",function(zt,mn){Ia(Xe,"DL",mn)}),Xe.addCommand("RemoveList",function(){Wl(Xe)}),_l(Xe),Xe.addCommand("mceListUpdate",function(zt,mn){l(mn)&&function(Xe,zt){var mn=ol(Xe);Xe.undoManager.transact(function(){l(zt.styles)&&Xe.dom.setStyles(mn,zt.styles),l(zt.attrs)&&Zn(zt.attrs,function(ni,Fi){return Xe.dom.setAttrib(mn,Fi,ni)})})}(Xe,mn)}),Xe.addQueryStateHandler("InsertUnorderedList",Ks(Xe,"UL")),Xe.addQueryStateHandler("InsertOrderedList",Ks(Xe,"OL")),Xe.addQueryStateHandler("InsertDefinitionList",Ks(Xe,"DL"))},Ed=function(Xe){(function(Xe){return Xe.getParam("lists_indent_on_tab",!0)})(Xe)&&function(Xe){Xe.on("keydown",function(zt){zt.keyCode!==Ii.TAB||Ii.metaKeyPressed(zt)||Xe.undoManager.transact(function(){(zt.shiftKey?hl(Xe):vu(Xe))&&zt.preventDefault()})})}(Xe),function(Xe){Xe.on("keydown",function(zt){zt.keyCode===Ii.BACKSPACE?sr(Xe,!1)&&zt.preventDefault():zt.keyCode===Ii.DELETE&&sr(Xe,!0)&&zt.preventDefault()})}(Xe)},zl=function(Xe){var zt=function(mn){return function(){return Xe.execCommand(mn)}};Xe.hasPlugin("advlist")||(Xe.ui.registry.addToggleButton("numlist",{icon:"ordered-list",active:!1,tooltip:"Numbered list",onAction:zt("InsertOrderedList"),onSetup:function(mn){return gc(Xe,"OL",mn.setActive)}}),Xe.ui.registry.addToggleButton("bullist",{icon:"unordered-list",active:!1,tooltip:"Bullet list",onAction:zt("InsertUnorderedList"),onSetup:function(mn){return gc(Xe,"UL",mn.setActive)}}))},vl=function(Xe){var zt={text:"List properties...",icon:"ordered-list",onAction:function(){return Xe.execCommand("mceListProps")},onSetup:function(mn){return gc(Xe,"OL",function(ni){return mn.setDisabled(!ni)})}};Xe.ui.registry.addMenuItem("listprops",zt),Xe.ui.registry.addContextMenu("lists",{update:function(mn){var ni=ol(Xe,mn);return Uo(ni)?["listprops"]:[]}})};!function Lc(){qe.add("lists",function(Xe){return!1===Xe.hasPlugin("rtc",!0)?(Ed(Xe),Dc(Xe)):_l(Xe),zl(Xe),vl(Xe),ga(Xe)})}()}()},54797:(qe,I,p)=>{p(15269)},15269:()=>{!function(){"use strict";var We,qe=function(We){var Rt=We;return{get:function(){return Rt},set:function(Xi){Rt=Xi}}},I=tinymce.util.Tools.resolve("tinymce.PluginManager"),p=function(We){return!!We.hasPlugin("powerpaste",!0)&&(typeof window.console<"u"&&window.console.log&&window.console.log("PowerPaste is incompatible with Paste plugin! Remove 'paste' from the 'plugins' option."),!0)},o=function(We){return{clipboard:We}},g=(We="array",function(Rt){return function(We){var Rt=typeof We;return null===We?"null":"object"===Rt&&(Array.prototype.isPrototypeOf(We)||We.constructor&&"Array"===We.constructor.name)?"array":"object"===Rt&&(String.prototype.isPrototypeOf(We)||We.constructor&&"String"===We.constructor.name)?"string":Rt}(Rt)===We}),T=function(We){return!function(We){return null==We}(We)},n=function(We){return function(Rt){return typeof Rt===We}}("function"),P=function(){},w=function(We){return function(){return We}},B=function(We){return We},Y=w(!1),V=w(!0),ue=function(){return he},he=function(){var We=function(fi){return fi()},Rt=B;return{fold:function(fi,Xi){return fi()},isSome:Y,isNone:V,getOr:Rt,getOrThunk:We,getOrDie:function(fi){throw new Error(fi||"error: getOrDie called on none.")},getOrNull:w(null),getOrUndefined:w(void 0),or:Rt,orThunk:We,map:ue,each:P,bind:ue,exists:Y,forall:V,filter:function(){return ue()},toArray:function(){return[]},toString:w("none()")}}(),ae=function(We){var Rt=w(We),Qn=function(){return Xi},fi=function(wr){return wr(We)},Xi={fold:function(wr,Mo){return Mo(We)},isSome:V,isNone:Y,getOr:Rt,getOrThunk:Rt,getOrDie:Rt,getOrNull:Rt,getOrUndefined:Rt,or:Qn,orThunk:Qn,map:function(wr){return ae(wr(We))},each:function(wr){wr(We)},bind:fi,exists:fi,forall:fi,filter:function(wr){return wr(We)?Xi:he},toArray:function(){return[We]},toString:function(){return"some("+We+")"}};return Xi},ve={some:ae,none:ue,from:function(We){return null==We?he:ae(We)}},ye=Array.prototype.slice,ge=Array.prototype.push,ne=function(We,Rt){for(var Qn=0,fi=We.length;Qn<fi;Qn++){if(Rt(We[Qn],Qn))return!0}return!1},pe=function(We,Rt){for(var Qn=We.length,fi=new Array(Qn),Xi=0;Xi<Qn;Xi++){var wr=We[Xi];fi[Xi]=Rt(wr,Xi)}return fi},Pe=function(We,Rt){for(var Qn=0,fi=We.length;Qn<fi;Qn++){Rt(We[Qn],Qn)}},oe=function(We,Rt){return function(We){for(var Rt=[],Qn=0,fi=We.length;Qn<fi;++Qn){if(!g(We[Qn]))throw new Error("Arr.flatten item "+Qn+" was not an array, input: "+We);ge.apply(Rt,We[Qn])}return Rt}(pe(We,Rt))},me=n(Array.from)?Array.from:function(We){return ye.call(We)},be=function(){return be=Object.assign||function(Rt){for(var Qn,fi=1,Xi=arguments.length;fi<Xi;fi++)for(var wr in Qn=arguments[fi])Object.prototype.hasOwnProperty.call(Qn,wr)&&(Rt[wr]=Qn[wr]);return Rt},be.apply(this,arguments)},Z=function(){var We=function(We){var Rt=qe(ve.none()),Qn=function(){return Rt.get().each(We)};return{clear:function(){Qn(),Rt.set(ve.none())},isSet:function(){return Rt.get().isSome()},get:function(){return Rt.get()},set:function(ro){Qn(),Rt.set(ve.some(ro))}}}(P);return be(be({},We),{on:function(Qn){return We.get().each(Qn)}})},Oe=function(We,Rt,Qn){return""===Rt||We.length>=Rt.length&&We.substr(Qn,Qn+Rt.length)===Rt},nt=tinymce.util.Tools.resolve("tinymce.Env"),mt=tinymce.util.Tools.resolve("tinymce.util.Delay"),ut=tinymce.util.Tools.resolve("tinymce.util.Promise"),Ve=tinymce.util.Tools.resolve("tinymce.util.VK"),wt=function(We,Rt){return We.fire("PastePlainTextToggle",{state:Rt})},Ct=tinymce.util.Tools.resolve("tinymce.util.Tools"),He=function(We){return We.getParam("paste_data_images",!1)},Gi=function(We){return We.getParam("paste_merge_formats",!0)},wi=function(We){return We.getParam("paste_as_text",!1)},Bn=function(We){return We.getParam("paste_retain_style_properties")},Bt=function(We){return We.getParam("validate")},xn=function(We){return We.getParam("allow_html_data_urls",!1,"boolean")},Fn=function(We){return We.getParam("paste_data_images",!1,"boolean")},Hn=function(We){return Ct.explode(We.getParam("images_file_types","jpeg,jpg,jpe,jfi,jif,jfif,png,gif,bmp,webp","string"))},An="x-tinymce/html",vn="\x3c!-- "+An+" --\x3e",gr=function(We){return-1!==We.indexOf(vn)},Hi=w(An),Gr=Object.hasOwnProperty,zr=function(We,Rt){return Gr.call(We,Rt)},Eo=tinymce.util.Tools.resolve("tinymce.html.Entities"),Yt=function(We,Rt,Qn){var fi=We.split(/\n\n/),Xi=function(We,Rt){var Qn=[],fi="<"+We;if("object"==typeof Rt){for(var Xi in Rt)zr(Rt,Xi)&&Qn.push(Xi+'="'+Eo.encodeAllRaw(Rt[Xi])+'"');Qn.length&&(fi+=" "+Qn.join(" "))}return fi+">"}(Rt,Qn),wr="</"+Rt+">",Mo=Ct.map(fi,function(qr){return qr.split(/\n/).join("<br />")});return 1===Mo.length?Mo[0]:Ct.map(Mo,function(qr){return Xi+qr+wr}).join("")},Ni=tinymce.util.Tools.resolve("tinymce.html.DomParser"),Nn=tinymce.util.Tools.resolve("tinymce.html.Serializer"),Sn=tinymce.util.Tools.resolve("tinymce.html.Node"),Pn=tinymce.util.Tools.resolve("tinymce.html.Schema"),ai=function(We,Rt){return Ct.each(Rt,function(Qn){We=function(We){return We.constructor===RegExp}(Qn)?We.replace(Qn,""):We.replace(Qn[0],Qn[1])}),We},Le=function(We){return We=ai(We,[/^[\s\S]*<body[^>]*>\s*|\s*<\/body[^>]*>[\s\S]*$/gi,/<!--StartFragment-->|<!--EndFragment-->/g,[/( ?)<span class="Apple-converted-space">\u00a0<\/span>( ?)/g,function(Qn,fi,Xi){return fi||Xi?"\xa0":" "}],/<br class="Apple-interchange-newline">/g,/<br>$/i])},Qe=function(We){return/<font face="Times New Roman"|class="?Mso|style="[^"]*\bmso-|style='[^']*\bmso-|w:WordDocument/i.test(We)||/class="OutlineElement/.test(We)||/id="?docs\-internal\-guid\-/.test(We)},qt=function(We){var Rt=!1;return We=We.replace(/^[\u00a0 ]+/,""),Ct.each([/^[IVXLMCD]+\.[ \u00a0]/,/^[ivxlmcd]+\.[ \u00a0]/,/^[a-z]{1,2}[\.\)][ \u00a0]/,/^[A-Z]{1,2}[\.\)][ \u00a0]/,/^[0-9]+\.[ \u00a0]/,/^[\u3007\u4e00\u4e8c\u4e09\u56db\u4e94\u516d\u4e03\u516b\u4e5d]+\.[ \u00a0]/,/^[\u58f1\u5f10\u53c2\u56db\u4f0d\u516d\u4e03\u516b\u4e5d\u62fe]+\.[ \u00a0]/],function(fi){if(fi.test(We))return Rt=!0,!1}),Rt},Tn=function(We){return/^[\s\u00a0]*[\u2022\u00b7\u00a7\u25CF]\s*/.test(We)},mo=function(We,Rt,Qn,fi){var Xi={},wr=We.dom.parseStyle(fi);return Ct.each(wr,function(ro,qr){switch(qr){case"mso-list":var ho=/\w+ \w+([0-9]+)/i.exec(fi);ho&&(Qn._listLevel=parseInt(ho[1],10)),/Ignore/i.test(ro)&&Qn.firstChild&&(Qn._listIgnore=!0,Qn.firstChild._listIgnore=!0);break;case"horiz-align":qr="text-align";break;case"vert-align":qr="vertical-align";break;case"font-color":case"mso-foreground":qr="color";break;case"mso-background":case"mso-highlight":qr="background";break;case"font-weight":case"font-style":return void("normal"!==ro&&(Xi[qr]=ro));case"mso-element":if(/^(comment|comment-list)$/i.test(ro))return void Qn.remove()}0!==qr.indexOf("mso-comment")?0!==qr.indexOf("mso-")&&("all"===Bn(We)||Rt&&Rt[qr])&&(Xi[qr]=ro):Qn.remove()}),/(bold)/i.test(Xi["font-weight"])&&(delete Xi["font-weight"],Qn.wrap(new Sn("b",1))),/(italic)/i.test(Xi["font-style"])&&(delete Xi["font-style"],Qn.wrap(new Sn("i",1))),We.dom.serializeStyle(Xi,Qn.name)||null},rr=function(We,Rt){var Qn,fi=Bn(We);fi&&(Qn=Ct.makeMap(fi.split(/[, ]/))),Rt=ai(Rt,[/<br class="?Apple-interchange-newline"?>/gi,/<b[^>]+id="?docs-internal-[^>]*>/gi,/<!--[\s\S]+?-->/gi,/<(!|script[^>]*>.*?<\/script(?=[>\s])|\/?(\?xml(:\w+)?|img|meta|link|style|\w:\w+)(?=[\s\/>]))[^>]*>/gi,[/<(\/?)s>/gi,"<$1strike>"],[/&nbsp;/gi,"\xa0"],[/<span\s+style\s*=\s*"\s*mso-spacerun\s*:\s*yes\s*;?\s*"\s*>([\s\u00a0]*)<\/span>/gi,function(qr,ho){return ho.length>0?ho.replace(/./," ").slice(Math.floor(ho.length/2)).split("").join("\xa0"):""}]]);var Xi=function(We){return We.getParam("paste_word_valid_elements","-strong/b,-em/i,-u,-span,-p,-ol,-ul,-li,-h1,-h2,-h3,-h4,-h5,-h6,-p/div,-a[href|name],sub,sup,strike,br,del,table[width],tr,td[colspan|rowspan|width],th[colspan|rowspan|width],thead,tfoot,tbody")}(We),wr=Pn({valid_elements:Xi,valid_children:"-li[p]"});Ct.each(wr.elements,function(qr){qr.attributes.class||(qr.attributes.class={},qr.attributesOrder.push("class")),qr.attributes.style||(qr.attributes.style={},qr.attributesOrder.push("style"))});var Mo=Ni({},wr);Mo.addAttributeFilter("style",function(qr){for(var xa,ho=qr.length;ho--;)(xa=qr[ho]).attr("style",mo(We,Qn,xa,xa.attr("style"))),"span"===xa.name&&xa.parent&&!xa.attributes.length&&xa.unwrap()}),Mo.addAttributeFilter("class",function(qr){for(var xa,To,ho=qr.length;ho--;)To=(xa=qr[ho]).attr("class"),/^(MsoCommentReference|MsoCommentText|msoDel)$/i.test(To)&&xa.remove(),xa.attr("class",null)}),Mo.addNodeFilter("del",function(qr){for(var ho=qr.length;ho--;)qr[ho].remove()}),Mo.addNodeFilter("a",function(qr){for(var xa,To,Ao,ho=qr.length;ho--;)if(To=(xa=qr[ho]).attr("href"),Ao=xa.attr("name"),To&&-1!==To.indexOf("#_msocom_"))xa.remove();else if(To&&0===To.indexOf("file://")&&((To=To.split("#")[1])&&(To="#"+To)),To||Ao){if(Ao&&!/^_?(?:toc|edn|ftn)/i.test(Ao)){xa.unwrap();continue}xa.attr({href:To,name:Ao})}else xa.unwrap()});var ro=Mo.parse(Rt);return function(We){return We.getParam("paste_convert_word_fake_lists",!0)}(We)&&function(We){for(var Rt,Qn,fi=1,Xi=function(Ho){var Ra="";if(3===Ho.type)return Ho.value;if(Ho=Ho.firstChild)do{Ra+=Xi(Ho)}while(Ho=Ho.next);return Ra},wr=function(Ho,Ra){if(3===Ho.type&&Ra.test(Ho.value))return Ho.value=Ho.value.replace(Ra,""),!1;if(Ho=Ho.firstChild)do{if(!wr(Ho,Ra))return!1}while(Ho=Ho.next);return!0},Mo=function(Ho){if(Ho._listIgnore)Ho.remove();else if(Ho=Ho.firstChild)do{Mo(Ho)}while(Ho=Ho.next)},ro=function(Ho,Ra,ba){var Jt=Ho._listLevel||fi;Jt!==fi&&(Jt<fi?Rt&&(Rt=Rt.parent.parent):(Qn=Rt,Rt=null)),Rt&&Rt.name===Ra?Rt.append(Ho):(Qn=Qn||Rt,Rt=new Sn(Ra,1),ba>1&&Rt.attr("start",""+ba),Ho.wrap(Rt)),Ho.name="li",Jt>fi&&Qn&&Qn.lastChild.append(Rt),fi=Jt,Mo(Ho),wr(Ho,/^\u00a0+/),wr(Ho,/^\s*([\u2022\u00b7\u00a7\u25CF]|\w+\.)/),wr(Ho,/^\u00a0+/)},qr=[],ho=We.firstChild;typeof ho<"u"&&null!==ho;)if(qr.push(ho),null!==(ho=ho.walk()))for(;typeof ho<"u"&&ho.parent!==We;)ho=ho.walk();for(var xa=0;xa<qr.length;xa++)if("p"===(We=qr[xa]).name&&We.firstChild){var To=Xi(We);if(Tn(To)){ro(We,"ul");continue}if(qt(To)){var Ao=/([0-9]+)\./.exec(To),Ha=1;Ao&&(Ha=parseInt(Ao[1],10)),ro(We,"ol",Ha);continue}if(We._listLevel){ro(We,"ul",1);continue}Rt=null}else Qn=Rt,Rt=null}(ro),Rt=Nn({validate:Bt(We)},wr).serialize(ro)},Bo=function(We,Rt){return{content:We,cancelled:Rt}},an=function(We,Rt,Qn,fi){var Xi=function(We,Rt,Qn,fi){return We.fire("PastePreProcess",{content:Rt,internal:Qn,wordContent:fi})}(We,Rt,Qn,fi),wr=function(We,Rt){var Qn=Ni({},We.schema);Qn.addNodeFilter("meta",function(Xi){Ct.each(Xi,function(wr){wr.remove()})});var fi=Qn.parse(Rt,{forced_root_block:!1,isRootContent:!0});return Nn({validate:Bt(We)},We.schema).serialize(fi)}(We,Xi.content);return We.hasEventListeners("PastePostProcess")&&!Xi.isDefaultPrevented()?function(We,Rt,Qn,fi){var Xi=We.dom.create("div",{style:"display:none"},Rt),wr=function(We,Rt,Qn,fi){return We.fire("PastePostProcess",{node:Rt,internal:Qn,wordContent:fi})}(We,Xi,Qn,fi);return Bo(wr.node.innerHTML,wr.isDefaultPrevented())}(We,wr,Qn,fi):Bo(wr,Xi.isDefaultPrevented())},Zn=function(We,Rt,Qn){var fi=Qe(Rt),Xi=fi?function(We,Rt){return function(We){return We.getParam("paste_enable_default_filters",!0)}(We)?rr(We,Rt):Rt}(We,Rt):Rt;return an(We,Xi,Qn,fi)},Ci=function(We,Rt){return We.insertContent(Rt,{merge:Gi(We),paste:!0}),!0},Xn=function(We){return/^https?:\/\/[\w\-\/+=.,!;:&%@^~(){}?#]+$/i.test(We)},Et=function(We,Rt){return Xn(Rt)&&ne(Hn(We),function(Qn){return function(We,Rt){return Oe(We,Rt,We.length-Rt.length)}(Rt.toLowerCase(),"."+Qn.toLowerCase())})},un=function(We,Rt,Qn){return!(!1!==We.selection.isCollapsed()||!Xn(Rt))&&function(We,Rt,Qn){return We.undoManager.extra(function(){Qn(We,Rt)},function(){We.execCommand("mceInsertLink",!1,Rt)}),!0}(We,Rt,Qn)},Ft=function(We,Rt,Qn){return!!Et(We,Rt)&&function(We,Rt,Qn){return We.undoManager.extra(function(){Qn(We,Rt)},function(){We.insertContent('<img src="'+Rt+'">')}),!0}(We,Rt,Qn)},wn=function(We,Rt,Qn){Qn||!1===function(We){return We.getParam("smart_paste",!0)}(We)?Ci(We,Rt):function(We,Rt){Ct.each([un,Ft,Ci],function(Qn){return!0!==Qn(We,Rt,Ci)})}(We,Rt)},xi=function(We){return"\n"===We||"\r"===We},Fr=function(We,Rt){var Qn=function(We,Rt){return Rt<=0?"":new Array(Rt+1).join(We)}(" ",function(We){return We.getParam("paste_tab_spaces",4,"number")}(We)),fi=Rt.replace(/\t/g,Qn),Xi=function(We,Rt,Qn){return Pe(We,function(fi,Xi){Qn=Rt(Qn,fi,Xi)}),Qn}(fi,function(wr,Mo){return function(We){return-1!==" \f\t\v".indexOf(We)}(Mo)||"\xa0"===Mo?wr.pcIsSpace||""===wr.str||wr.str.length===fi.length-1||function(We,Rt){return Rt<We.length&&Rt>=0&&xi(We[Rt])}(fi,wr.str.length+1)?{pcIsSpace:!1,str:wr.str+"\xa0"}:{pcIsSpace:!0,str:wr.str+" "}:{pcIsSpace:xi(Mo),str:wr.str+Mo}},{pcIsSpace:!1,str:""});return Xi.str},en=function(We,Rt,Qn,fi){var Xi=Zn(We,Rt,Qn);!1===Xi.cancelled&&wn(We,Xi.content,fi)},Wn=function(We,Rt,Qn){var fi=Qn||gr(Rt);en(We,function(We){return We.replace(vn,"")}(Rt),fi,!1)},at=function(We,Rt){var Qn=We.dom.encode(Rt).replace(/\r\n/g,"\n"),Xi=function(We,Rt,Qn){return Rt?Yt(We,!0===Rt?"p":Rt,Qn):function(We){return We.replace(/\r?\n/g,"<br>")}(We)}(Fr(We,Qn),function(We){return We.getParam("forced_root_block")}(We),function(We){return We.getParam("forced_root_block_attrs")}(We));en(We,Xi,!1,!0)},It=function(We){var Rt={};if(We){if(We.getData){var fi=We.getData("Text");fi&&fi.length>0&&-1===fi.indexOf("data:text/mce-internal,")&&(Rt["text/plain"]=fi)}if(We.types)for(var Xi=0;Xi<We.types.length;Xi++){var wr=We.types[Xi];try{Rt[wr]=We.getData(wr)}catch{Rt[wr]=""}}}return Rt},St=function(We,Rt){return Rt in We&&We[Rt].length>0},Pt=function(We){return St(We,"text/html")||St(We,"text/plain")},hi=function(We){var Rt=0;return function(){return We+Rt++}}("mceclip"),Ri=function(We,Rt){var Qn=function(We){var Rt=/data:([^;]+);base64,([a-z0-9\+\/=]+)/i.exec(We);return Rt?{type:Rt[1],data:decodeURIComponent(Rt[2])}:{type:null,data:null}}(Rt.uri),fi=Qn.data,Xi=Qn.type,wr=hi(),Mo=Rt.blob,ro=new Image;if(ro.src=Rt.uri,function(We,Rt){var Qn=function(We){return We.getParam("images_dataimg_filter")}(We);return!Qn||Qn(Rt)}(We,ro)){var qr=We.editorUpload.blobCache,ho=void 0,xa=qr.getByData(fi,Xi);if(xa)ho=xa;else{var To=function(We){return We.getParam("images_reuse_filename")}(We)&&T(Mo.name),Ao=To?function(We,Rt){var Qn=Rt.match(/([\s\S]+?)(?:\.[a-z0-9.]+)$/i);return T(Qn)?We.dom.encode(Qn[1]):null}(We,Mo.name):wr,Ha=To?Mo.name:void 0;ho=qr.create(wr,Mo,fi,Ao,Ha),qr.add(ho)}Wn(We,'<img src="'+ho.blobUri()+'">',!1)}else Wn(We,'<img src="'+Rt.uri+'">',!1)},Yr=function(We){return ut.all(pe(We,function(Rt){return new ut(function(Qn){var fi=function(We){return T(We.getAsFile)}(Rt)?Rt.getAsFile():Rt,Xi=new window.FileReader;Xi.onload=function(){Qn({blob:fi,uri:Xi.result})},Xi.readAsDataURL(fi)})}))},_o=function(We){var Rt=Hn(We);return function(Qn){return function(We,Rt){return Oe(We,Rt,0)}(Qn.type,"image/")&&ne(Rt,function(fi){return function(We){var Rt=We.toLowerCase(),Qn={jpg:"jpeg",jpe:"jpeg",jfi:"jpeg",jif:"jpeg",jfif:"jpeg",pjpeg:"jpeg",pjp:"jpeg",svg:"svg+xml"};return Ct.hasOwn(Qn,Rt)?"image/"+Qn[Rt]:"image/"+Rt}(fi)===Qn.type})}},to=function(We,Rt,Qn){var fi=function(We){return"paste"===We.type}(Rt)?Rt.clipboardData:Rt.dataTransfer;if(Fn(We)&&fi){var Xi=function(We,Rt){var Qn=Rt.items?oe(me(Rt.items),function(Xi){return"file"===Xi.kind?[Xi.getAsFile()]:[]}):[],fi=Rt.files?me(Rt.files):[];return function(We,Rt){for(var Qn=[],fi=0,Xi=We.length;fi<Xi;fi++){var wr=We[fi];Rt(wr,fi)&&Qn.push(wr)}return Qn}(Qn.length>0?Qn:fi,_o(We))}(We,fi);if(Xi.length>0)return Rt.preventDefault(),Yr(Xi).then(function(wr){Qn&&We.selection.setRng(Qn),Pe(wr,function(Mo){Ri(We,Mo)})}),!0}return!1},Uo=function(We){return Ve.metaKeyPressed(We)&&86===We.keyCode||We.shiftKey&&45===We.keyCode},rl=function(We,Rt,Qn){var wr,fi=Z(),Xi=Z();We.on("keyup",Xi.clear),We.on("keydown",function(qr){var ho=function(xa){Uo(xa)&&!xa.isDefaultPrevented()&&Rt.remove()};if(Uo(qr)&&!qr.isDefaultPrevented()){if((wr=qr.shiftKey&&86===qr.keyCode)&&nt.webkit&&-1!==navigator.userAgent.indexOf("Version/"))return;if(qr.stopImmediatePropagation(),fi.set(qr),Xi.set(!0),nt.ie&&wr)return qr.preventDefault(),void function(We,Rt){We.fire("paste",{ieFake:Rt})}(We,!0);Rt.remove(),Rt.create(),We.once("keyup",ho),We.once("paste",function(){We.off("keyup",ho)})}});var Mo=function(qr,ho,xa,To,Ao){var Ha;St(ho,"text/html")?Ha=ho["text/html"]:(Ha=Rt.getHtml(),Ao=Ao||gr(Ha),Rt.isDefaultContent(Ha)&&(To=!0)),Ha=Le(Ha),Rt.remove();var Ho=!1===Ao&&function(We){return!/<(?:\/?(?!(?:div|p|br|span)>)\w+|(?:(?!(?:span style="white-space:\s?pre;?">)|br\s?\/>))\w+\s[^>]+)>/i.test(We)}(Ha),Ra=Xn(Ha);(!Ha.length||Ho&&!Ra)&&(To=!0),(To||Ra)&&(Ha=St(ho,"text/plain")&&Ho?ho["text/plain"]:function(We){var Rt=Pn(),Qn=Ni({},Rt),fi="",Xi=Rt.getShortEndedElements(),wr=Ct.makeMap("script noscript style textarea video audio iframe object"," "),Mo=Rt.getBlockElements(),ro=function(qr){var ho=qr.name,xa=qr;if("br"!==ho){if("wbr"!==ho){if(Xi[ho]&&(fi+=" "),wr[ho])return void(fi+=" ");if(3===qr.type&&(fi+=qr.value),!qr.shortEnded&&(qr=qr.firstChild))do{ro(qr)}while(qr=qr.next);Mo[ho]&&xa.next&&(fi+="\n","p"===ho&&(fi+="\n"))}}else fi+="\n"};return We=ai(We,[/<!\[[^\]]+\]>/g]),ro(Qn.parse(We)),fi}(Ha)),Rt.isDefaultContent(Ha)?xa||qr.windowManager.alert("Please use Ctrl+V/Cmd+V keyboard shortcuts to paste contents."):To?at(qr,Ha):Wn(qr,Ha,Ao)};We.on("paste",function(qr){var ho=fi.isSet()||Xi.isSet();ho&&fi.clear();var xa=function(We,Rt){return It(Rt.clipboardData||We.getDoc().dataTransfer)}(We,qr),To="text"===Qn.get()||wr,Ao=St(xa,Hi());wr=!1,qr.isDefaultPrevented()||function(We){var Rt=We.clipboardData;return-1!==navigator.userAgent.indexOf("Android")&&Rt&&Rt.items&&0===Rt.items.length}(qr)?Rt.remove():Pt(xa)||!to(We,qr,Rt.getLastRng()||We.selection.getRng())?(ho||qr.preventDefault(),nt.ie&&(!ho||qr.ieFake)&&!St(xa,"text/html")&&(Rt.create(),We.dom.bind(Rt.getEl(),"paste",function(Ha){Ha.stopPropagation()}),We.getDoc().execCommand("Paste",!1,null),xa["text/html"]=Rt.getHtml()),St(xa,"text/html")?(qr.preventDefault(),Ao||(Ao=gr(xa["text/html"])),Mo(We,xa,ho,To,Ao)):mt.setEditorTimeout(We,function(){Mo(We,xa,ho,To,Ao)},0)):Rt.remove()})},ps=function(We){return nt.ie&&We.inline?document.body:We.getBody()},gs=function(We,Rt,Qn){(function(We){return ps(We)!==We.getBody()})(We)&&We.dom.bind(Rt,"paste keyup",function(fi){ur(We,Qn)||We.fire("paste")})},ln=function(We){return We.dom.get("mcepastebin")},Di=function(We,Rt){return Rt===We},ur=function(We,Rt){var Qn=ln(We);return function(We){return We&&"mcepastebin"===We.id}(Qn)&&Di(Rt,Qn.innerHTML)},gi=function(We){var Rt=qe(null),Qn="%MCEPASTEBIN%";return{create:function(){return function(We,Rt,Qn){var fi=We.dom,Xi=We.getBody();Rt.set(We.selection.getRng());var wr=We.dom.add(ps(We),"div",{id:"mcepastebin",class:"mce-pastebin",contentEditable:!0,"data-mce-bogus":"all",style:"position: fixed; top: 50%; width: 10px; height: 10px; overflow: hidden; opacity: 0"},Qn);(nt.ie||nt.gecko)&&fi.setStyle(wr,"left","rtl"===fi.getStyle(Xi,"direction",!0)?65535:-65535),fi.bind(wr,"beforedeactivate focusin focusout",function(Mo){Mo.stopPropagation()}),gs(We,wr,Qn),wr.focus(),We.selection.select(wr,!0)}(We,Rt,Qn)},remove:function(){return function(We,Rt){if(ln(We)){for(var Qn=void 0,fi=Rt.get();Qn=We.dom.get("mcepastebin");)We.dom.remove(Qn),We.dom.unbind(Qn);fi&&We.selection.setRng(fi)}Rt.set(null)}(We,Rt)},getEl:function(){return ln(We)},getHtml:function(){return function(We){var Rt=function(ro,qr){ro.appendChild(qr),We.dom.remove(qr,!0)},Qn=Ct.grep(ps(We).childNodes,function(ro){return"mcepastebin"===ro.id}),fi=Qn.shift();Ct.each(Qn,function(ro){Rt(fi,ro)});for(var Xi=We.dom.select("div[id=mcepastebin]",fi),wr=Xi.length-1;wr>=0;wr--){var Mo=We.dom.create("div");fi.insertBefore(Mo,Xi[wr]),Rt(Mo,Xi[wr])}return fi?fi.innerHTML:""}(We)},getLastRng:Rt.get,isDefault:function(){return ur(We,Qn)},isDefaultContent:function(fi){return Di(Qn,fi)}}},$t=function(We,Rt){var Qn=gi(We);return We.on("PreInit",function(){return function(We,Rt,Qn){var fi;rl(We,Rt,Qn),We.parser.addNodeFilter("img",function(Xi,wr,Mo){var Ao,qr=function(Ao){!Ao.attr("data-mce-object")&&fi!==nt.transparentSrc&&Ao.remove()},ho=function(Ao){return 0===Ao.indexOf("webkit-fake-url")},xa=function(Ao){return 0===Ao.indexOf("data:")};if(!Fn(We)&&(Ao=Mo).data&&!0===Ao.data.paste)for(var To=Xi.length;To--;)(fi=Xi[To].attr("src"))&&(ho(fi)||!xn(We)&&xa(fi))&&qr(Xi[To])})}(We,Qn,Rt)}),{pasteFormat:Rt,pasteHtml:function(fi,Xi){return Wn(We,fi,Xi)},pasteText:function(fi){return at(We,fi)},pasteImageData:function(fi,Xi){return to(We,fi,Xi)},getDataTransferItems:It,hasHtmlOrText:Pt,hasContentType:St}},Vo=function(We,Rt){We.addCommand("mceTogglePlainTextPaste",function(){!function(We,Rt){"text"===Rt.pasteFormat.get()?(Rt.pasteFormat.set("html"),wt(We,!1)):(Rt.pasteFormat.set("text"),wt(We,!0)),We.focus()}(We,Rt)}),We.addCommand("mceInsertClipboardContent",function(Qn,fi){fi.content&&Rt.pasteHtml(fi.content,fi.internal),fi.text&&Rt.pasteText(fi.text)})},ja=function(We,Rt,Qn){if(!function(We){return!1===nt.iOS&&"function"==typeof We?.setData}(We))return!1;try{return We.clearData(),We.setData("text/html",Rt),We.setData("text/plain",Qn),We.setData(Hi(),Rt),!0}catch{return!1}},wa=function(We,Rt,Qn,fi){ja(We.clipboardData,Rt.html,Rt.text)?(We.preventDefault(),fi()):Qn(Rt.html,fi)},ns=function(We){return function(Rt,Qn){var fi=function(We){return vn+We}(Rt),Xi=We.dom.create("div",{contenteditable:"false","data-mce-bogus":"all"}),wr=We.dom.create("div",{contenteditable:"true"},fi);We.dom.setStyles(Xi,{position:"fixed",top:"0",left:"-3000px",width:"1000px",overflow:"hidden"}),Xi.appendChild(wr),We.dom.add(We.getBody(),Xi);var Mo=We.selection.getRng();wr.focus();var ro=We.dom.createRng();ro.selectNodeContents(wr),We.selection.setRng(ro),mt.setTimeout(function(){We.selection.setRng(Mo),Xi.parentNode.removeChild(Xi),Qn()},0)}},Cs=function(We){return{html:We.selection.getContent({contextual:!0}),text:We.selection.getContent({format:"text"})}},Ts=function(We){return!We.selection.isCollapsed()||function(We){return!!We.dom.getParent(We.selection.getStart(),"td[data-mce-selected],th[data-mce-selected]",We.getBody())}(We)},zc=function(We){We.on("cut",function(We){return function(Rt){Ts(We)&&wa(Rt,Cs(We),ns(We),function(){if(nt.browser.isChrome()||nt.browser.isFirefox()){var Qn=We.selection.getRng();mt.setEditorTimeout(We,function(){We.selection.setRng(Qn),We.execCommand("Delete")},0)}else We.execCommand("Delete")})}}(We)),We.on("copy",function(We){return function(Rt){Ts(We)&&wa(Rt,Cs(We),ns(We),P)}}(We))},al=tinymce.util.Tools.resolve("tinymce.dom.RangeUtils"),Jn=function(We,Rt){return al.getCaretRangeFromPoint(Rt.clientX,Rt.clientY,We.getDoc())},ti=function(We,Rt){We.focus(),We.selection.setRng(Rt)},_i=function(We,Rt,Qn){(function(We){return We.getParam("paste_block_drop",!1)})(We)&&We.on("dragend dragover draggesture dragdrop drop drag",function(fi){fi.preventDefault(),fi.stopPropagation()}),He(We)||We.on("drop",function(fi){var Xi=fi.dataTransfer;Xi&&Xi.files&&Xi.files.length>0&&fi.preventDefault()}),We.on("drop",function(fi){var Xi=Jn(We,fi);if(!fi.isDefaultPrevented()&&!Qn.get()){var wr=Rt.getDataTransferItems(fi.dataTransfer),Mo=Rt.hasContentType(wr,Hi());if((Rt.hasHtmlOrText(wr)&&!function(We){var Rt=We["text/plain"];return!!Rt&&0===Rt.indexOf("file://")}(wr)||!Rt.pasteImageData(fi,Xi))&&Xi&&function(We){return We.getParam("paste_filter_drop",!0)}(We)){var ro=wr["mce-internal"]||wr["text/html"]||wr["text/plain"];ro&&(fi.preventDefault(),mt.setEditorTimeout(We,function(){We.undoManager.transact(function(){wr["mce-internal"]&&We.execCommand("Delete"),ti(We,Xi),ro=Le(ro),wr["text/html"]?Rt.pasteHtml(ro,Mo):Rt.pasteText(ro)})}))}}}),We.on("dragstart",function(fi){Qn.set(!0)}),We.on("dragover dragend",function(fi){He(We)&&!1===Qn.get()&&(fi.preventDefault(),ti(We,Jn(We,fi))),"dragend"===fi.type&&Qn.set(!1)})},ar=function(We){var Rt=We.plugins.paste,Qn=function(We){return We.getParam("paste_preprocess")}(We);Qn&&We.on("PastePreProcess",function(Xi){Qn.call(Rt,Rt,Xi)});var fi=function(We){return We.getParam("paste_postprocess")}(We);fi&&We.on("PastePostProcess",function(Xi){fi.call(Rt,Rt,Xi)})},vr=function(We,Rt){We.on("PastePreProcess",function(Qn){Qn.content=Rt(We,Qn.content,Qn.internal,Qn.wordContent)})},Li=function(We,Rt){if(!Qe(Rt))return Rt;var Qn=[];Ct.each(We.schema.getBlockElements(),function(Xi,wr){Qn.push(wr)});var fi=new RegExp("(?:<br>&nbsp;[\\s\\r\\n]+|<br>)*(<\\/?("+Qn.join("|")+")[^>]*>)(?:<br>&nbsp;[\\s\\r\\n]+|<br>)*","g");return Rt=ai(Rt,[[fi,"$1"]]),Rt=ai(Rt,[[/<br><br>/g,"<BR><BR>"],[/<br>/g," "],[/<BR><BR>/g,"<br>"]])},Ta=function(We,Rt,Qn,fi){if(fi||Qn)return Rt;var wr,Xi=function(We){return We.getParam("paste_webkit_styles")}(We);if(!1===function(We){return We.getParam("paste_remove_styles_if_webkit",!0)}(We)||"all"===Xi)return Rt;if(Xi&&(wr=Xi.split(/[, ]/)),wr){var Mo=We.dom,ro=We.selection.getNode();Rt=Rt.replace(/(<[^>]+) style="([^"]*)"([^>]*>)/gi,function(qr,ho,xa,To){var Ao=Mo.parseStyle(Mo.decode(xa)),Ha={};if("none"===wr)return ho+To;for(var Ho=0;Ho<wr.length;Ho++){var Ra=Ao[wr[Ho]],ba=Mo.getStyle(ro,wr[Ho],!0);/color/.test(wr[Ho])&&(Ra=Mo.toHex(Ra),ba=Mo.toHex(ba)),ba!==Ra&&(Ha[wr[Ho]]=Ra)}var Jt=Mo.serializeStyle(Ha,"span");return Jt?ho+' style="'+Jt+'"'+To:ho+To})}else Rt=Rt.replace(/(<[^>]+) style="([^"]*)"([^>]*>)/gi,"$1$3");return Rt=Rt.replace(/(<[^>]+) data-mce-style="([^"]+)"([^>]*>)/gi,function(qr,ho,xa,To){return ho+' style="'+xa+'"'+To})},La=function(We,Rt){We.$("a",Rt).find("font,u").each(function(Qn,fi){We.dom.remove(fi,!0)})},Ps=function(We){nt.webkit&&vr(We,Ta),nt.ie&&(vr(We,Li),function(We,Rt){We.on("PastePostProcess",function(Qn){Rt(We,Qn.node)})}(We,La))},is=function(We,Rt){return function(Qn){Qn.setActive("text"===Rt.pasteFormat.get());var fi=function(Xi){return Qn.setActive(Xi.state)};return We.on("PastePlainTextToggle",fi),function(){return We.off("PastePlainTextToggle",fi)}}},yt=function(We,Rt){var Qn=function(){return We.execCommand("mceTogglePlainTextPaste")};We.ui.registry.addToggleButton("pastetext",{active:!1,icon:"paste-text",tooltip:"Paste as text",onAction:Qn,onSetup:is(We,Rt)}),We.ui.registry.addToggleMenuItem("pastetext",{text:"Paste as text",icon:"paste-text",onAction:Qn,onSetup:is(We,Rt)})};!function Dt(){I.add("paste",function(We){if(!1===p(We)){var Rt=qe(!1),Qn=qe(wi(We)?"text":"html"),fi=$t(We,Qn);return Ps(We),yt(We,fi),Vo(We,fi),ar(We),zc(We),_i(We,fi,Rt),o(fi)}})}()}()},35642:(qe,I,p)=>{p(14950)},14950:()=>{!function(){"use strict";var I=function(i){return function(c){return function(i){var c=typeof i;return null===i?"null":"object"===c&&(Array.prototype.isPrototypeOf(i)||i.constructor&&"Array"===i.constructor.name)?"array":"object"===c&&(String.prototype.isPrototypeOf(i)||i.constructor&&"String"===i.constructor.name)?"string":c}(c)===i}},p=function(i){return function(c){return typeof c===i}},o=function(i){return function(c){return i===c}},e=I("string"),l=I("object"),D=I("array"),g=o(null),E=p("boolean"),T=o(void 0),n=function(i){return null==i},P=function(i){return!n(i)},w=p("function"),B=p("number"),Y=function(i,c){if(D(i)){for(var f=0,x=i.length;f<x;++f)if(!c(i[f]))return!1;return!0}return!1},V=function(){},ue=function(i){return function(){return i()}},he=function(i,c){return function(){for(var f=[],x=0;x<arguments.length;x++)f[x]=arguments[x];return i(c.apply(null,f))}},X=function(i){return function(){return i}},ve=function(i){return i},ye=function(i,c){return i===c};function ge(i){for(var c=[],f=1;f<arguments.length;f++)c[f-1]=arguments[f];return function(){for(var x=[],F=0;F<arguments.length;F++)x[F]=arguments[F];var $=c.concat(x);return i.apply(null,$)}}var ne=function(i){return function(c){return!i(c)}},pe=function(i){return function(){throw new Error(i)}},Pe=X(!1),xe=X(!0),de=tinymce.util.Tools.resolve("tinymce.ThemeManager"),re=function(){return re=Object.assign||function(c){for(var f,x=1,F=arguments.length;x<F;x++)for(var $ in f=arguments[x])Object.prototype.hasOwnProperty.call(f,$)&&(c[$]=f[$]);return c},re.apply(this,arguments)};function oe(i,c){var f={};for(var x in i)Object.prototype.hasOwnProperty.call(i,x)&&c.indexOf(x)<0&&(f[x]=i[x]);if(null!=i&&"function"==typeof Object.getOwnPropertySymbols){var F=0;for(x=Object.getOwnPropertySymbols(i);F<x.length;F++)c.indexOf(x[F])<0&&Object.prototype.propertyIsEnumerable.call(i,x[F])&&(f[x[F]]=i[x[F]])}return f}function me(i,c,f){if(f||2===arguments.length)for(var $,x=0,F=c.length;x<F;x++)($||!(x in c))&&($||($=Array.prototype.slice.call(c,0,x)),$[x]=c[x]);return i.concat($||Array.prototype.slice.call(c))}var i,c,be=function(){return le},le={fold:function(x,F){return x()},isSome:Pe,isNone:xe,getOr:c=ve,getOrThunk:i=function(x){return x()},getOrDie:function(x){throw new Error(x||"error: getOrDie called on none.")},getOrNull:X(null),getOrUndefined:X(void 0),or:c,orThunk:i,map:be,each:V,bind:be,exists:Pe,forall:xe,filter:function(){return be()},toArray:function(){return[]},toString:X("none()")},Z=function(i){var c=X(i),f=function(){return F},x=function($){return $(i)},F={fold:function($,se){return se(i)},isSome:xe,isNone:Pe,getOr:c,getOrThunk:c,getOrDie:c,getOrNull:c,getOrUndefined:c,or:f,orThunk:f,map:function($){return Z($(i))},each:function($){$(i)},bind:x,exists:x,forall:x,filter:function($){return $(i)?F:le},toArray:function(){return[i]},toString:function(){return"some("+i+")"}};return F},j={some:Z,none:be,from:function(i){return null==i?le:Z(i)}},ke=Array.prototype.slice,Be=Array.prototype.indexOf,nt=Array.prototype.push,mt=function(i,c){return Be.call(i,c)},ut=function(i,c){var f=mt(i,c);return-1===f?j.none():j.some(f)},Ve=function(i,c){return mt(i,c)>-1},tt=function(i,c){for(var f=0,x=i.length;f<x;f++){if(c(i[f],f))return!0}return!1},Ne=function(i,c){for(var f=[],x=0;x<i;x++)f.push(c(x));return f},wt=function(i,c){for(var f=[],x=0;x<i.length;x+=c){var F=ke.call(i,x,x+c);f.push(F)}return f},ft=function(i,c){for(var f=i.length,x=new Array(f),F=0;F<f;F++){var $=i[F];x[F]=c($,F)}return x},Ct=function(i,c){for(var f=0,x=i.length;f<x;f++){c(i[f],f)}},He=function(i,c){for(var f=[],x=[],F=0,$=i.length;F<$;F++){var se=i[F];(c(se,F)?f:x).push(se)}return{pass:f,fail:x}},st=function(i,c){for(var f=[],x=0,F=i.length;x<F;x++){var $=i[x];c($,x)&&f.push($)}return f},nn=function(i,c,f){return function(i,c){for(var f=i.length-1;f>=0;f--)c(i[f],f)}(i,function(x,F){f=c(f,x,F)}),f},Dn=function(i,c,f){return Ct(i,function(x,F){f=c(f,x,F)}),f},vi=function(i,c){return function(i,c,f){for(var x=0,F=i.length;x<F;x++){var $=i[x];if(c($,x))return j.some($);if(f($,x))break}return j.none()}(i,c,Pe)},Gi=function(i,c){for(var f=0,x=i.length;f<x;f++){if(c(i[f],f))return j.some(f)}return j.none()},mi=function(i){for(var c=[],f=0,x=i.length;f<x;++f){if(!D(i[f]))throw new Error("Arr.flatten item "+f+" was not an array, input: "+i);nt.apply(c,i[f])}return c},wi=function(i,c){return mi(ft(i,c))},Bn=function(i,c){for(var f=0,x=i.length;f<x;++f){if(!0!==c(i[f],f))return!1}return!0},kn=function(i){var c=ke.call(i,0);return c.reverse(),c},On=function(i,c){return st(i,function(f){return!Ve(c,f)})},je=function(i,c){for(var f={},x=0,F=i.length;x<F;x++){var $=i[x];f[String($)]=c($,x)}return f},Bt=function(i){return[i]},xn=function(i,c){var f=ke.call(i,0);return f.sort(c),f},Fn=function(i,c){return c>=0&&c<i.length?j.some(i[c]):j.none()},ui=function(i){return Fn(i,0)},Ai=function(i){return Fn(i,i.length-1)},si=w(Array.from)?Array.from:function(i){return ke.call(i)},Vi=function(i,c){for(var f=0;f<i.length;f++){var x=c(i[f],f);if(x.isSome())return x}return j.none()},Vn=Object.keys,Hn=Object.hasOwnProperty,An=function(i,c){for(var f=Vn(i),x=0,F=f.length;x<F;x++){var $=f[x];c(i[$],$)}},vn=function(i,c){return In(i,function(f,x){return{k:x,v:c(f,x)}})},In=function(i,c){var f={};return An(i,function(x,F){var $=c(x,F);f[$.k]=$.v}),f},Hi=function(i,c){var f={};return function(i,c,f,x){An(i,function($,se){(c($,se)?f:x)($,se)})}(i,c,function(i){return function(c,f){i[f]=c}}(f),V),f},Gr=function(i,c){var f=[];return An(i,function(x,F){f.push(c(x,F))}),f},zr=function(i,c){for(var f=Vn(i),x=0,F=f.length;x<F;x++){var $=f[x],se=i[$];if(c(se,$,i))return j.some(se)}return j.none()},Eo=function(i){return Gr(i,ve)},mr=function(i,c){return jn(i,c)?j.from(i[c]):j.none()},jn=function(i,c){return Hn.call(i,c)},ct=function(i,c){return jn(i,c)&&void 0!==i[c]&&null!==i[c]},Yt=function(i,c,f){return void 0===f&&(f=ye),i.exists(function(x){return f(x,c)})},Ni=function(i){for(var c=[],f=function(F){c.push(F)},x=0;x<i.length;x++)i[x].each(f);return c},pr=function(i,c,f){return i.isSome()&&c.isSome()?j.some(f(i.getOrDie(),c.getOrDie())):j.none()},Nt=function(i,c){return i?j.some(c):j.none()},Le=function(i,c,f){return""===c||i.length>=c.length&&i.substr(f,f+c.length)===c},Qe=function(i,c){return-1!==i.indexOf(c)},qt=function(i,c){return Le(i,c,0)},Tn=function(i,c){return Le(i,c,i.length-c.length)},mo=function(i){return function(c){return c.replace(i,"")}}(/^\s+|\s+$/g),rr=function(i){return i.length>0},ea=function(i){return void 0!==i.style&&w(i.style.getPropertyValue)},Zn=function(i){if(null==i)throw new Error("Node cannot be null or undefined");return{dom:i}},Xn={fromHtml:function(i,c){var x=(c||document).createElement("div");if(x.innerHTML=i,!x.hasChildNodes()||x.childNodes.length>1)throw console.error("HTML does not have a single root node",i),new Error("HTML must have a single root node");return Zn(x.childNodes[0])},fromTag:function(i,c){var x=(c||document).createElement(i);return Zn(x)},fromText:function(i,c){var x=(c||document).createTextNode(i);return Zn(x)},fromDom:Zn,fromPoint:function(i,c,f){return j.from(i.dom.elementFromPoint(c,f)).map(Zn)}};typeof window<"u"||Function("return this;")();var _a,Ft=function(i){return i.dom.nodeName.toLowerCase()},wn=function(i){return function(c){return function(i){return i.dom.nodeType}(c)===i}},Gn=wn(1),xi=wn(3),Cr=wn(9),Fr=wn(11),en=function(i){var f,c=!1;return function(){for(var x=[],F=0;F<arguments.length;F++)x[F]=arguments[F];return c||(c=!0,f=i.apply(null,x)),f}},St=function(){return Pt(0,0)},Pt=function(i,c){return{major:i,minor:c}},cn={nu:Pt,detect:function(i,c){var f=String(c).toLowerCase();return 0===i.length?St():function(i,c){var f=function(i,c){for(var f=0;f<i.length;f++){var x=i[f];if(x.test(c))return x}}(i,c);if(!f)return{major:0,minor:0};var x=function(F){return Number(c.replace(f,"$"+F))};return Pt(x(1),x(2))}(i,f)},unknown:St},ii=function(i,c){var f=String(c).toLowerCase();return vi(i,function(x){return x.search(f)})},_r=/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,er=function(i){return function(c){return Qe(c,i)}},Yr=[{name:"Edge",versionRegexes:[/.*?edge\/ ?([0-9]+)\.([0-9]+)$/],search:function(i){return Qe(i,"edge/")&&Qe(i,"chrome")&&Qe(i,"safari")&&Qe(i,"applewebkit")}},{name:"Chrome",brand:"Chromium",versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/,_r],search:function(i){return Qe(i,"chrome")&&!Qe(i,"chromeframe")}},{name:"IE",versionRegexes:[/.*?msie\ ?([0-9]+)\.([0-9]+).*/,/.*?rv:([0-9]+)\.([0-9]+).*/],search:function(i){return Qe(i,"msie")||Qe(i,"trident")}},{name:"Opera",versionRegexes:[_r,/.*?opera\/([0-9]+)\.([0-9]+).*/],search:er("opera")},{name:"Firefox",versionRegexes:[/.*?firefox\/\ ?([0-9]+)\.([0-9]+).*/],search:er("firefox")},{name:"Safari",versionRegexes:[_r,/.*?cpu os ([0-9]+)_([0-9]+).*/],search:function(i){return(Qe(i,"safari")||Qe(i,"mobile/"))&&Qe(i,"applewebkit")}}],_o=[{name:"Windows",search:er("win"),versionRegexes:[/.*?windows\ nt\ ?([0-9]+)\.([0-9]+).*/]},{name:"iOS",search:function(i){return Qe(i,"iphone")||Qe(i,"ipad")},versionRegexes:[/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,/.*cpu os ([0-9]+)_([0-9]+).*/,/.*cpu iphone os ([0-9]+)_([0-9]+).*/]},{name:"Android",search:er("android"),versionRegexes:[/.*?android\ ?([0-9]+)\.([0-9]+).*/]},{name:"OSX",search:er("mac os x"),versionRegexes:[/.*?mac\ os\ x\ ?([0-9]+)_([0-9]+).*/]},{name:"Linux",search:er("linux"),versionRegexes:[]},{name:"Solaris",search:er("sunos"),versionRegexes:[]},{name:"FreeBSD",search:er("freebsd"),versionRegexes:[]},{name:"ChromeOS",search:er("cros"),versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/]}],Si={browsers:X(Yr),oses:X(_o)},Vs="Firefox",gs=function(i){var c=i.current,f=i.version,x=function(F){return function(){return c===F}};return{current:c,version:f,isEdge:x("Edge"),isChrome:x("Chrome"),isIE:x("IE"),isOpera:x("Opera"),isFirefox:x(Vs),isSafari:x("Safari")}},tc={unknown:function(){return gs({current:void 0,version:cn.unknown()})},nu:gs,edge:X("Edge"),chrome:X("Chrome"),ie:X("IE"),opera:X("Opera"),firefox:X(Vs),safari:X("Safari")},$a="Windows",Mi="Android",ur="Solaris",gi="FreeBSD",$t="ChromeOS",Vo=function(i){var c=i.current,f=i.version,x=function(F){return function(){return c===F}};return{current:c,version:f,isWindows:x($a),isiOS:x("iOS"),isAndroid:x(Mi),isOSX:x("OSX"),isLinux:x("Linux"),isSolaris:x(ur),isFreeBSD:x(gi),isChromeOS:x($t)}},Ds={unknown:function(){return Vo({current:void 0,version:cn.unknown()})},nu:Vo,windows:X($a),ios:X("iOS"),android:X(Mi),linux:X("Linux"),osx:X("OSX"),solaris:X(ur),freebsd:X(gi),chromeos:X($t)},wa_detect=function(i,c,f){var x=Si.browsers(),F=Si.oses(),$=c.bind(function(ze){return function(i,c){return Vi(c.brands,function(f){var x=f.brand.toLowerCase();return vi(i,function(F){var $;return x===(null===($=F.brand)||void 0===$?void 0:$.toLowerCase())}).map(function(F){return{current:F.name,version:cn.nu(parseInt(f.version,10),0)}})})}(x,ze)}).orThunk(function(){return function(i,c){return ii(i,c).map(function(f){var x=cn.detect(f.versionRegexes,c);return{current:f.name,version:x}})}(x,i)}).fold(tc.unknown,tc.nu),se=function(i,c){return ii(i,c).map(function(f){var x=cn.detect(f.versionRegexes,c);return{current:f.name,version:x}})}(F,i).fold(Ds.unknown,Ds.nu),Ie=function(i,c,f,x){var F=i.isiOS()&&!0===/ipad/i.test(f),$=i.isiOS()&&!F,se=i.isiOS()||i.isAndroid(),Ie=se||x("(pointer:coarse)"),ze=F||!$&&se&&x("(min-device-width:768px)"),it=$||se&&!ze,Mt=c.isSafari()&&i.isiOS()&&!1===/safari/i.test(f),kt=!it&&!ze&&!Mt;return{isiPad:X(F),isiPhone:X($),isTablet:X(ze),isPhone:X(it),isTouch:X(Ie),isAndroid:i.isAndroid,isiOS:i.isiOS,isWebView:X(Mt),isDesktop:X(kt)}}(se,$,i,f);return{browser:$,os:se,deviceType:Ie}},ns=function(i){return window.matchMedia(i).matches},Cs=en(function(){return wa_detect(navigator.userAgent,j.from(navigator.userAgentData),ns)}),$r=function(){return Cs()},ol=function(i,c){var f=i.dom;if(1!==f.nodeType)return!1;var x=f;if(void 0!==x.matches)return x.matches(c);if(void 0!==x.msMatchesSelector)return x.msMatchesSelector(c);if(void 0!==x.webkitMatchesSelector)return x.webkitMatchesSelector(c);if(void 0!==x.mozMatchesSelector)return x.mozMatchesSelector(c);throw new Error("Browser lacks native selectors")},zc=function(i){return 1!==i.nodeType&&9!==i.nodeType&&11!==i.nodeType||0===i.childElementCount},tn=function(i,c){return i.dom===c.dom},_i=function(i,c){return function(i,c){return function(i,c,f){return 0!=(i.compareDocumentPosition(c)&f)}(i,c,Node.DOCUMENT_POSITION_CONTAINED_BY)}(i.dom,c.dom)},ar=function(i,c){return $r().browser.isIE()?_i(i,c):function(i,c){var f=i.dom,x=c.dom;return f!==x&&f.contains(x)}(i,c)},vr=function(i){return Xn.fromDom(i.dom.ownerDocument)},Qr=function(i){return Cr(i)?i:vr(i)},Li=function(i){return Xn.fromDom(Qr(i).dom.documentElement)},Ta=function(i){return Xn.fromDom(Qr(i).dom.defaultView)},La=function(i){return j.from(i.dom.parentNode).map(Xn.fromDom)},is=function(i){return j.from(i.dom.offsetParent).map(Xn.fromDom)},Dt=function(i){return ft(i.dom.childNodes,Xn.fromDom)},We=function(i,c){var f=i.dom.childNodes;return j.from(f[c]).map(Xn.fromDom)},Qn=function(i,c){return{element:i,offset:c}},fi=function(i,c){var f=Dt(i);return f.length>0&&c<f.length?Qn(f[c],0):Qn(i,c)},Xi=function(i){return Fr(i)&&P(i.dom.host)},wr=w(Element.prototype.attachShadow)&&w(Node.prototype.getRootNode),Mo=X(wr),ro=wr?function(i){return Xn.fromDom(i.dom.getRootNode())}:Qr,qr=function(i){return Xi(i)?i:Xn.fromDom(Qr(i).dom.body)},xa=function(i){var c=ro(i);return Xi(c)?j.some(c):j.none()},To=function(i){return Xn.fromDom(i.dom.host)},Ha=function(i){return P(i.dom.shadowRoot)},Ho=function(i){var c=xi(i)?i.dom.parentNode:i.dom;if(null==c||null===c.ownerDocument)return!1;var f=c.ownerDocument;return xa(Xn.fromDom(c)).fold(function(){return f.body.contains(c)},function(i,c){return function(f){return i(c(f))}}(Ho,To))},Ra=function(){return ba(Xn.fromDom(document))},ba=function(i){var c=i.dom.body;if(null==c)throw new Error("Body is not available yet");return Xn.fromDom(c)},Jt=function(i,c,f){if(!(e(f)||E(f)||B(f)))throw console.error("Invalid call to Attribute.set. Key ",c,":: Value ",f,":: Element ",i),new Error("Attribute value was not simple");i.setAttribute(c,f+"")},De=function(i,c,f){Jt(i.dom,c,f)},bt=function(i,c){var f=i.dom;An(c,function(x,F){Jt(f,F,x)})},Xt=function(i,c){var f=i.dom.getAttribute(c);return null===f?void 0:f},Qi=function(i,c){return j.from(Xt(i,c))},Kt=function(i,c){var f=i.dom;return!(!f||!f.hasAttribute)&&f.hasAttribute(c)},Fe=function(i,c){i.dom.removeAttribute(c)},Wt=function(i,c,f){if(!e(f))throw console.error("Invalid call to CSS.set. Property ",c,":: Value ",f,":: Element ",i),new Error("CSS value must be a string: "+f);ea(i)&&i.style.setProperty(c,f)},yi=function(i,c){ea(i)&&i.style.removeProperty(c)},Ki=function(i,c,f){var x=i.dom;Wt(x,c,f)},ya=function(i,c){var f=i.dom;An(c,function(x,F){Wt(f,F,x)})},Na=function(i,c){var f=i.dom;An(c,function(x,F){x.fold(function(){yi(f,F)},function($){Wt(f,F,$)})})},qi=function(i,c){var f=i.dom,F=window.getComputedStyle(f).getPropertyValue(c);return""!==F||Ho(i)?F:ia(f,c)},ia=function(i,c){return ea(i)?i.style.getPropertyValue(c):""},$o=function(i,c){var f=i.dom,x=ia(f,c);return j.from(x).filter(function(F){return F.length>0})},su=function(i){var c={},f=i.dom;if(ea(f))for(var x=0;x<f.style.length;x++){var F=f.style.item(x);c[F]=f.style[F]}return c},Us=function(i,c,f){var x=Xn.fromTag(i);return Ki(x,c,f),$o(x,c).isSome()},Ka=function(i,c){var f=i.dom;yi(f,c),Yt(Qi(i,"style").map(mo),"")&&Fe(i,"style")},Tc=function(i){return i.dom.offsetWidth},Qs=function(i,c){var x=function(Ie){var ze=c(Ie);if(ze<=0||null===ze){var it=qi(Ie,i);return parseFloat(it)||0}return ze},$=function(Ie,ze){return Dn(ze,function(it,Mt){var kt=qi(Ie,Mt),pn=void 0===kt?0:parseInt(kt,10);return isNaN(pn)?it:it+pn},0)};return{set:function(Ie,ze){if(!B(ze)&&!ze.match(/^[0-9]+$/))throw new Error(i+".set accepts only positive integer values. Value was "+ze);var it=Ie.dom;ea(it)&&(it.style[i]=ze+"px")},get:x,getOuter:x,aggregate:$,max:function(Ie,ze,it){var Mt=$(Ie,it);return ze>Mt?ze-Mt:0}}},vu=Qs("height",function(i){var c=i.dom;return Ho(i)?c.getBoundingClientRect().height:c.offsetHeight}),hl=function(i){return vu.get(i)},Wl=function(i){return vu.getOuter(i)},Ku=function(i,c){return{left:i,top:c,translate:function(x,F){return Ku(i+x,c+F)}}},Da=Ku,gl=function(i,c){return void 0!==i?i:void 0!==c?c:0},ss=function(i){var c=i.dom.ownerDocument,f=c.body,x=c.defaultView,F=c.documentElement;if(f===i.dom)return Da(f.offsetLeft,f.offsetTop);var $=gl(x?.pageYOffset,F.scrollTop),se=gl(x?.pageXOffset,F.scrollLeft),Ie=gl(F.clientTop,f.clientTop),ze=gl(F.clientLeft,f.clientLeft);return gc(i).translate(se-ze,$-Ie)},gc=function(i){var c=i.dom,x=c.ownerDocument.body;return x===c?Da(x.offsetLeft,x.offsetTop):Ho(i)?function(i){var c=i.getBoundingClientRect();return Da(c.left,c.top)}(c):Da(0,0)},rs=Qs("width",function(i){return i.dom.offsetWidth}),ks=function(i){return rs.get(i)},Ol=function(i){return rs.getOuter(i)},lu=function(i){var c=Xn.fromDom(function(i){if(Mo()&&P(i.target)){var c=Xn.fromDom(i.target);if(Gn(c)&&Ha(c)&&i.composed&&i.composedPath){var f=i.composedPath();if(f)return ui(f)}}return j.from(i.target)}(i).getOr(i.target)),f=function(){return i.stopPropagation()},x=function(){return i.preventDefault()},F=he(x,f);return function(i,c,f,x,F,$,se){return{target:i,x:c,y:f,stop:x,prevent:F,kill:$,raw:se}}(c,i.clientX,i.clientY,f,x,F,i)},bd=function(i,c,f,x,F){var $=function(i,c){return function(f){i(f)&&c(lu(f))}}(f,x);return i.dom.addEventListener(c,$,F),{unbind:ge(or,i,c,$,F)}},or=function(i,c,f,x){i.dom.removeEventListener(c,f,x)},Dr=function(i,c){La(i).each(function(x){x.dom.insertBefore(c.dom,i.dom)})},kr=function(i,c){var f=function(i){return j.from(i.dom.nextSibling).map(Xn.fromDom)}(i);f.fold(function(){La(i).each(function(F){oo(F,c)})},function(x){Dr(x,c)})},Qo=function(i,c){var f=function(i){return We(i,0)}(i);f.fold(function(){oo(i,c)},function(x){i.dom.insertBefore(c.dom,x.dom)})},oo=function(i,c){i.dom.appendChild(c.dom)},Ia=function(i,c){Ct(c,function(f){oo(i,f)})},cc=function(i){i.dom.textContent="",Ct(Dt(i),function(c){Rs(c)})},Rs=function(i){var c=i.dom;null!==c.parentNode&&c.parentNode.removeChild(c)},xc=function(i){var c=Dt(i);c.length>0&&function(i,c){Ct(c,function(f){Dr(i,f)})}(i,c),Rs(i)},Hc=function(i){var c=void 0!==i?i.dom:document,f=c.body.scrollLeft||c.documentElement.scrollLeft,x=c.body.scrollTop||c.documentElement.scrollTop;return Da(f,x)},lp=function(i,c,f){var F=(void 0!==f?f.dom:document).defaultView;F&&F.scrollTo(i,c)},Ju=function(i,c,f,x){return{x:i,y:c,width:f,height:x,right:i+f,bottom:c+x}},Su=function(i){var c=void 0===i?window:i,f=c.document,x=Hc(Xn.fromDom(f));return function(i){var c=void 0===i?window:i;return $r().browser.isFirefox()?j.none():j.from(c.visualViewport)}(c).fold(function(){var F=c.document.documentElement,$=F.clientWidth,se=F.clientHeight;return Ju(x.left,x.top,$,se)},function(F){return Ju(Math.max(F.pageLeft,x.left),Math.max(F.pageTop,x.top),F.width,F.height)})},qs=function(i,c){return i.view(c).fold(X([]),function(x){var F=i.owner(x),$=qs(i,F);return[x].concat($)})},Ke=Object.freeze({__proto__:null,view:function(i){var c;return(i.dom===document?j.none():j.from(null===(c=i.dom.defaultView)||void 0===c?void 0:c.frameElement)).map(Xn.fromDom)},owner:function(i){return vr(i)}}),dn=function(i){var c=Xn.fromDom(document),f=Hc(c),x=function(i,c){var f=c.owner(i),x=qs(c,f);return j.some(x)}(i,Ke);return x.fold(ge(ss,i),function(F){var $=gc(i),se=nn(F,function(Ie,ze){var it=gc(ze);return{left:Ie.left+it.left,top:Ie.top+it.top}},{left:0,top:0});return Da(se.left+$.left+f.left,se.top+$.top+f.top)})},sr=function(i,c,f,x){return{x:i,y:c,width:f,height:x,right:i+f,bottom:c+x}},lo=function(i){var c=ss(i),f=Ol(i),x=Wl(i);return sr(c.left,c.top,f,x)},ga=function(i){var c=dn(i),f=Ol(i),x=Wl(i);return sr(c.left,c.top,f,x)},Zs=function(){return Su(window)},Kr=function(i){return{isValue:xe,isError:Pe,getOr:X(i),getOrThunk:X(i),getOrDie:X(i),or:function(kt){return Kr(i)},orThunk:function(kt){return Kr(i)},fold:function(kt,pn){return pn(i)},map:function(kt){return Kr(kt(i))},mapError:function(kt){return Kr(i)},each:function(kt){kt(i)},bind:function(kt){return kt(i)},exists:function(kt){return kt(i)},forall:function(kt){return kt(i)},toOptional:function(){return j.some(i)}}},os=function(i){return{isValue:Pe,isError:xe,getOr:ve,getOrThunk:function(it){return it()},getOrDie:function(){return pe(String(i))()},or:ve,orThunk:function(it){return it()},fold:function(it,Mt){return it(i)},map:function(it){return os(i)},mapError:function(it){return os(it(i))},each:V,bind:function(it){return os(i)},exists:Pe,forall:xe,toOptional:j.none}},ra={value:Kr,error:os,fromOption:function(i,c){return i.fold(function(){return os(c)},Kr)}};!function(i){i[i.Error=0]="Error",i[i.Value=1]="Value"}(_a||(_a={}));var xl=function(i,c,f){return i.stype===_a.Error?c(i.serror):f(i.svalue)},Dc=function(i){return{stype:_a.Value,svalue:i}},Gs=function(i){return{stype:_a.Error,serror:i}},vl_fromResult=function(i){return i.fold(Gs,Dc)},vl_toResult=function(i){return xl(i,ra.error,ra.value)},vl_svalue=Dc,vl_partition=function(i){var c=[],f=[];return Ct(i,function(x){xl(x,function(F){return f.push(F)},function(F){return c.push(F)})}),{values:c,errors:f}},vl_serror=Gs,vl_bind=function(i,c){return i.stype===_a.Value?c(i.svalue):i},vl_bindError=function(i,c){return i.stype===_a.Error?c(i.serror):i},vl_map=function(i,c){return i.stype===_a.Value?{stype:_a.Value,svalue:c(i.svalue)}:i},vl_mapError=function(i,c){return i.stype===_a.Error?{stype:_a.Error,serror:c(i.serror)}:i},vl_fold=xl,Lc=function(i,c,f,x){return{tag:"field",key:i,newKey:c,presence:f,prop:x}},zt=function(i,c,f){switch(i.tag){case"field":return c(i.key,i.newKey,i.presence,i.prop);case"custom":return f(i.newKey,i.instantiator)}},Fi=function(i){return function(){for(var c=[],f=0;f<arguments.length;f++)c[f]=arguments[f];if(0===c.length)throw new Error("Can't merge zero objects");for(var x={},F=0;F<c.length;F++){var $=c[F];for(var se in $)jn($,se)&&(x[se]=i(x[se],$[se]))}return x}},nr=Fi(function(i,c){return l(i)&&l(c)?nr(i,c):c}),zo=Fi(function(i,c){return c}),Ca=function(i){return{tag:"defaultedThunk",process:i}},Ba=function(i){return Ca(X(i))},ul=function(i){return{tag:"mergeWithThunk",process:i}},Qu=function(i){return he(vl_serror,mi)(i)},W_consolidateArr=function(i){var c=vl_partition(i);return c.errors.length>0?Qu(c.errors):vl_svalue(c.values)},dt=function(i){return l(i)&&Vn(i).length>100?" removed due to size":JSON.stringify(i,null,2)},Ei=function(i,c){return vl_serror([{path:i,getErrorInfo:c}])},cs=function(i){return{extract:function(x,F){return vl_bindError(i(F),function($){return function(i,c){return Ei(i,X(c))}(x,$)})},toString:X("val")}},wu=cs(vl_svalue),Iu=function(i,c,f,x){return mr(c,f).fold(function(){return function(i,c,f){return Ei(i,function(){return'Could not find valid *required* value for "'+c+'" in '+dt(f)})}(i,f,c)},x)},sd=function(i,c,f,x){return x(mr(i,c).getOrThunk(function(){return f(i)}))},Rd=function(i,c,f,x,F){var $=function(Ie){return F.extract(c.concat([x]),Ie)},se=function(Ie){return Ie.fold(function(){return vl_svalue(j.none())},function(ze){var it=F.extract(c.concat([x]),ze);return vl_map(it,j.some)})};switch(i.tag){case"required":return Iu(c,f,x,$);case"defaultedThunk":return sd(f,x,i.process,$);case"option":return function(i,c,f){return f(mr(i,c))}(f,x,se);case"defaultedOptionThunk":return function(i,c,f,x){return x(mr(i,c).map(function($){return!0===$?f(i):$}))}(f,x,i.process,se);case"mergeWithThunk":return sd(f,x,X({}),function(Ie){var ze=nr(i.process(f),Ie);return $(ze)})}},Wf=function(i){return{extract:function(x,F){return i().extract(x,F)},toString:function(){return i().toString()}}},Rc=function(i){var c=Go(i),f=nn(i,function(F,$){return zt($,function(se){var Ie;return nr(F,((Ie={})[se]=!0,Ie))},X(F))},{});return{extract:function(F,$){var se=E($)?[]:function(i){return Vn(Hi(i,P))}($),Ie=st(se,function(ze){return!ct(f,ze)});return 0===Ie.length?c.extract(F,$):function(i,c){return Ei(i,function(){return"There are unsupported fields: ["+c.join(", ")+"] specified"})}(F,Ie)},toString:c.toString}},Go=function(i){return{extract:function(x,F){return function(i,c,f){for(var x={},F=[],$=0,se=f;$<se.length;$++){var Ie=se[$];zt(Ie,function(ze,it,Mt,kt){var pn=Rd(Mt,i,c,ze,kt);vl_fold(pn,function(bn){F.push.apply(F,bn)},function(bn){x[it]=bn})},function(ze,it){x[ze]=it(c)})}return F.length>0?vl_serror(F):vl_svalue(x)}(x,F,i)},toString:function(){return"obj{\n"+ft(i,function(F){return zt(F,function($,se,Ie,ze){return $+" -> "+ze.toString()},function($,se){return"state("+$+")"})}).join("\n")+"}"}}},Md=function(i){return{extract:function(x,F){var $=ft(F,function(se,Ie){return i.extract(x.concat(["["+Ie+"]"]),se)});return W_consolidateArr($)},toString:function(){return"array("+i.toString()+")"}}},Mm=function(i){return{extract:function(x,F){for(var $=[],se=0,Ie=i;se<Ie.length;se++){var it=Ie[se].extract(x,F);if(it.stype===_a.Value)return it;$.push(it)}return W_consolidateArr($)},toString:function(){return"oneOf("+ft(i,function(x){return x.toString()}).join(", ")+")"}}},am=function(i,c){return{extract:function($,se){var Ie=Vn(se),ze=function($,se){return Md(cs(i)).extract($,se)}($,Ie);return vl_bind(ze,function(it){var Mt=ft(it,function(kt){return Lc(kt,kt,{tag:"required",process:{}},c)});return Go(Mt).extract($,se)})},toString:function(){return"setOf("+c.toString()+")"}}},Xc=he(Md,Go),yc=X(wu),Eu=function(i,c){return cs(function(f){var x=typeof f;return i(f)?vl_svalue(f):vl_serror("Expected type: "+c+" but got: "+x)})},Mu=Eu(B,"number"),ws=Eu(e,"string"),Ll=Eu(E,"boolean"),Vc=Eu(w,"function"),Lo=function(i){if(Object(i)!==i)return!0;switch({}.toString.call(i).slice(8,-1)){case"Boolean":case"Number":case"String":case"Date":case"RegExp":case"Blob":case"FileList":case"ImageData":case"ImageBitmap":case"ArrayBuffer":return!0;case"Array":case"Object":return Object.keys(i).every(function(c){return Lo(i[c])});default:return!1}},Uu=cs(function(i){return Lo(i)?vl_svalue(i):vl_serror("Expected value to be acceptable for sending via postMessage")}),et=function(i,c,f,x){return mr(f,x).fold(function(){return function(i,c,f){return Ei(i,function(){return'The chosen schema: "'+f+'" did not exist in branches: '+dt(c)})}(i,f,x)},function($){return $.extract(i.concat(["branch: "+x]),c)})},Ae=function(i,c){return{extract:function(F,$){return mr($,i).fold(function(){return function(i,c){return Ei(i,function(){return'Choice schema did not contain choice key: "'+c+'"'})}(F,i)},function(Ie){return et(F,$,c,Ie)})},toString:function(){return"chooseOn("+i+"). Possible values: "+Vn(c)}}},xt=function(i){return cs(function(c){return i(c).fold(vl_serror,vl_svalue)})},Ht=function(i,c){return am(function(f){return vl_fromResult(i(f))},c)},li=function(i,c,f){return vl_toResult(function(i,c,f){var x=c.extract([i],f);return vl_mapError(x,function(F){return{input:f,errors:F}})}(i,c,f))},dr=function(i){return i.fold(function(c){throw new Error(fo(c))},ve)},Sr=function(i,c,f){return dr(li(i,c,f))},fo=function(i){return"Errors: \n"+function(i){var c=i.length>10?i.slice(0,10).concat([{path:[],getErrorInfo:X("... (only showing first ten failures)")}]):i;return ft(c,function(f){return"Failed path: ("+f.path.join(" > ")+")\n"+f.getErrorInfo()})}(i.errors).join("\n")+"\n\nInput object: "+dt(i.input)},ms=function(i,c){return Ae(i,vn(c,Go))},Dl=Lc,Yl=function(i,c){return{tag:"custom",newKey:i,instantiator:c}},cu=function(i){return xt(function(c){return Ve(i,c)?ra.value(c):ra.error('Unsupported value: "'+c+'", choose one of "'+i.join(", ")+'".')})},Mr=function(i){return Dl(i,i,{tag:"required",process:{}},yc())},sl=function(i,c){return Dl(i,i,{tag:"required",process:{}},c)},ld=function(i){return sl(i,Mu)},qo=function(i){return sl(i,ws)},ll=function(i,c){return Dl(i,i,{tag:"required",process:{}},cu(c))},Hl=function(i){return sl(i,Vc)},qu=function(i,c){return Dl(i,i,{tag:"required",process:{}},Go(c))},Zc=function(i,c){return Dl(i,i,{tag:"required",process:{}},Xc(c))},uu=function(i,c){return Dl(i,i,{tag:"required",process:{}},Md(c))},Es=function(i){return Dl(i,i,{tag:"option",process:{}},yc())},mc=function(i,c){return Dl(i,i,{tag:"option",process:{}},c)},Yp=function(i){return mc(i,Mu)},Fs=function(i){return mc(i,ws)},nc=function(i){return mc(i,Vc)},Pu=function(i,c){return mc(i,Md(c))},yl=function(i,c){return mc(i,Go(c))},dl=function(i,c){return mc(i,Rc(c))},Ti=function(i,c){return Dl(i,i,Ba(c),yc())},du=function(i,c,f){return Dl(i,i,Ba(c),f)},Kc=function(i,c){return du(i,c,Mu)},Wd=function(i,c){return du(i,c,ws)},Vl=function(i,c,f){return du(i,c,cu(f))},bl=function(i,c){return du(i,c,Ll)},Sl=function(i,c){return du(i,c,Vc)},Hp=function(i,c,f){return du(i,c,Md(f))},eu=function(i,c,f){return du(i,c,Go(f))},ta=function(i){var c=i;return{get:function(){return c},set:function(F){c=F}}},fc_generate=function(i){if(!D(i))throw new Error("cases must be an array");if(0===i.length)throw new Error("there must be at least one case");var c=[],f={};return Ct(i,function(x,F){var $=Vn(x);if(1!==$.length)throw new Error("one and only one name per case");var se=$[0],Ie=x[se];if(void 0!==f[se])throw new Error("duplicate key detected:"+se);if("cata"===se)throw new Error("cannot have a case named cata (sorry)");if(!D(Ie))throw new Error("case arguments must be an array");c.push(se),f[se]=function(){for(var ze=[],it=0;it<arguments.length;it++)ze[it]=arguments[it];var Mt=ze.length;if(Mt!==Ie.length)throw new Error("Wrong number of arguments to case "+se+". Expected "+Ie.length+" ("+Ie+"), got "+Mt);return{fold:function(){for(var pn=[],bn=0;bn<arguments.length;bn++)pn[bn]=arguments[bn];if(pn.length!==i.length)throw new Error("Wrong number of arguments to fold. Expected "+i.length+", got "+pn.length);return pn[F].apply(null,ze)},match:function(pn){var bn=Vn(pn);if(c.length!==bn.length)throw new Error("Wrong number of arguments to match. Expected: "+c.join(",")+"\nActual: "+bn.join(","));if(!Bn(c,function(di){return Ve(bn,di)}))throw new Error("Not all branches were specified when using match. Specified: "+bn.join(", ")+"\nRequired: "+c.join(", "));return pn[se].apply(null,ze)},log:function(pn){console.log(pn,{constructors:c,constructor:se,params:ze})}}}}),f};fc_generate([{bothErrors:["error1","error2"]},{firstError:["error1","value2"]},{secondError:["value1","error2"]},{bothValues:["value1","value2"]}]);var wm,Ro=function(i,c){return function(i,c){var f={};return An(i,function(x,F){Ve(c,F)||(f[F]=x)}),f}(i,c)},Fo=function(i,c){return function(i,c){var f;return(f={})[i]=c,f}(i,c)},vs=function(i){return function(i){var c={};return Ct(i,function(f){c[f.key]=f.value}),c}(i)},Tt=function(i,c){var f=function(i){var c=[],f=[];return Ct(i,function(x){x.fold(function(F){c.push(F)},function(F){f.push(F)})}),{errors:c,values:f}}(i);return f.errors.length>0?function(i){return ra.error(mi(i))}(f.errors):function(i,c){return 0===i.length?ra.value(c):ra.value(nr(c,zo.apply(void 0,i)))}(f.values,c)},Me=function(i){return w(i)?i:Pe},N=function(i,c,f){for(var x=i.dom,F=Me(f);x.parentNode;){x=x.parentNode;var $=Xn.fromDom(x),se=c($);if(se.isSome())return se;if(F($))break}return j.none()},O=function(i,c,f){var x=c(i),F=Me(f);return x.orThunk(function(){return F(i)?j.none():N(i,c,F)})},Ce=function(i,c){return tn(i.element,c.event.target)},Je={can:xe,abort:Pe,run:V},Vt=function(i){if(!ct(i,"can")&&!ct(i,"abort")&&!ct(i,"run"))throw new Error("EventHandler defined by: "+JSON.stringify(i,null,2)+" does not have can, abort, or run!");return re(re({},Je),i)},Ls=function(i){var c=function(i,c){return function(){for(var f=[],x=0;x<arguments.length;x++)f[x]=arguments[x];return Dn(i,function(F,$){return F&&c($).apply(void 0,f)},!0)}}(i,function(F){return F.can}),f=function(i,c){return function(){for(var f=[],x=0;x<arguments.length;x++)f[x]=arguments[x];return Dn(i,function(F,$){return F||c($).apply(void 0,f)},!1)}}(i,function(F){return F.abort});return{can:c,abort:f,run:function(){for(var F=[],$=0;$<arguments.length;$++)F[$]=arguments[$];Ct(i,function(se){se.run.apply(void 0,F)})}}},Ws=X,tu=Ws("touchstart"),Sc=Ws("touchmove"),Um=Ws("touchend"),ic=Ws("touchcancel"),mu=Ws("mousedown"),us=Ws("mousemove"),Gg=Ws("mouseout"),cd=Ws("mouseup"),ds=Ws("mouseover"),xm=Ws("focusin"),Ns=Ws("focusout"),Dm=Ws("keydown"),rc=Ws("keyup"),sm=Ws("input"),Xu=Ws("change"),Td=Ws("click"),pg=Ws("transitioncancel"),ud=Ws("transitionend"),Vp=Ws("transitionstart"),Wg=Ws("selectstart"),ql=function(i){return X("alloy."+i)},Bd={tap:ql("tap")},Xl=ql("focus"),gh=ql("blur.post"),Zp=ql("paste.post"),$d=ql("receive"),dd=ql("execute"),fu=ql("focus.item"),up=Bd.tap,jd=ql("longpress"),hu=ql("sandbox.close"),Kd=ql("typeahead.cancel"),as=ql("system.init"),ed=ql("system.touchmove"),dp=ql("system.touchend"),Gp=ql("system.scroll"),td=ql("system.resize"),lm=ql("system.attached"),mg=ql("system.detached"),Mf=ql("system.dismissRequested"),pp=ql("system.repositionRequested"),b_=ql("focusmanager.shifted"),Nh=ql("slotcontainer.visibility"),_h=ql("change.tab"),Jd=ql("dismiss.tab"),cm=ql("highlight"),um=ql("dehighlight"),Cl=function(i,c){zm(i,i.element,c,{})},Sa=function(i,c,f){zm(i,i.element,c,f)},pd=function(i){Cl(i,dd())},Sm=function(i,c,f){zm(i,c,f,{})},zm=function(i,c,f,x){var F=re({target:c},x);i.getSystem().triggerEvent(f,c,F)},J_=function(i,c,f,x){i.getSystem().triggerEvent(f,c,x.event)},uc=function(i){return vs(i)},vh=function(i,c){return{key:i,value:Vt({abort:c})}},C_=function(i){return{key:i,value:Vt({run:function(c,f){f.event.prevent()}})}},yr=function(i,c){return{key:i,value:Vt({run:c})}},Eb=function(i,c,f){return{key:i,value:Vt({run:function(x,F){c.apply(void 0,[x,F].concat(f))}})}},xd=function(i){return function(c){return{key:i,value:Vt({run:function(f,x){Ce(f,x)&&c(f,x)}})}}},$f=function(i,c,f){return function(i,c){return yr(i,function(f,x){f.getSystem().getByUid(c).each(function(F){J_(F,F.element,i,x)})})}(i,c.partUids[f])},jf=function(i,c){return yr(i,function(f,x){var F=x.event,$=f.getSystem().getByDom(F.target).getOrThunk(function(){return O(F.target,function(Ie){return f.getSystem().getByDom(Ie).toOptional()},Pe).getOr(f)});c(f,$,x)})},rf=function(i){return yr(i,function(c,f){f.cut()})},E_=function(i){return yr(i,function(c,f){f.stop()})},nu=function(i,c){return xd(i)(c)},Va=xd(lm()),mp=xd(mg()),M_=xd(as()),Wp=function(i){return function(c){return yr(i,c)}}(dd()),fp=function(i){return i.dom.innerHTML},Bh=function(i,c){var x=vr(i).dom,F=Xn.fromDom(x.createDocumentFragment()),$=function(i,c){var x=(c||document).createElement("div");return x.innerHTML=i,Dt(Xn.fromDom(x))}(c,x);Ia(F,$),cc(i),oo(i,F)},zh=function(i){return function(i,c){return Xn.fromDom(i.dom.cloneNode(c))}(i,!1)},Tf=function(i){return Xi(i)?"#shadow-root":function(i){var c=Xn.fromTag("div"),f=Xn.fromDom(i.dom.cloneNode(!0));return oo(c,f),fp(c)}(zh(i))},xf=function(i){return Tf(i)},Rp=uc([function(i,c){return{key:i,value:Vt({can:c})}}(Xl(),function(i,c){var f=c.event,x=f.originator,F=f.target;return!function(i,c,f){return tn(c,i.element)&&!tn(c,f)}(i,x,F)||(console.warn(Xl()+" did not get interpreted by the desired target. \nOriginator: "+xf(x)+"\nTarget: "+xf(F)+"\nCheck the "+Xl()+" event handlers"),!1)})]),Kf=Object.freeze({__proto__:null,events:Rp}),fg=0,jo=function(i){var f=(new Date).getTime();return i+"_"+Math.floor(1e9*Math.random())+ ++fg+String(f)},Ou=X("alloy-id-"),Ja=X("data-alloy-id"),$p=Ou(),tv=Ja(),Lt=function(i,c){Object.defineProperty(i.dom,tv,{value:c,writable:!0})},Am=function(i){var c=Gn(i)?i.dom[tv]:null;return j.from(c)},yh=function(i){return jo(i)},Lu=ve,T_=function(i){var c=function(F){return"The component must be in a context to execute: "+F+(i?"\n"+xf(i().element)+" is not in context.":"")},f=function(F){return function(){throw new Error(c(F))}},x=function(F){return function(){console.warn(c(F))}};return{debugInfo:X("fake"),triggerEvent:x("triggerEvent"),triggerFocus:x("triggerFocus"),triggerEscape:x("triggerEscape"),broadcast:x("broadcast"),broadcastOn:x("broadcastOn"),broadcastEvent:x("broadcastEvent"),build:f("build"),addToWorld:f("addToWorld"),removeFromWorld:f("removeFromWorld"),addToGui:f("addToGui"),removeFromGui:f("removeFromGui"),getByUid:f("getByUid"),getByDom:f("getByDom"),isConnected:Pe}},bh=T_(),Yh=function(i){return ft(i,function(c){return Tn(c,"/*")?c.substring(0,c.length-2):c})},gg=function(i,c){var f=i.toString(),x=f.indexOf(")")+1,F=f.indexOf("("),$=f.substring(F+1,x-1).split(/,\s*/);return i.toFunctionAnnotation=function(){return{name:c,parameters:Yh($)}},i},co=jo("alloy-premade"),sc=function(i){return Fo(co,i)},zs=function(i){return function(i,c){var f=c.toString(),x=f.indexOf(")")+1,F=f.indexOf("("),$=f.substring(F+1,x-1).split(/,\s*/);return i.toFunctionAnnotation=function(){return{name:"OVERRIDE",parameters:Yh($.slice(1))}},i}(function(c){for(var f=[],x=1;x<arguments.length;x++)f[x-1]=arguments[x];return i.apply(void 0,me([c.getApis(),c],f,!1))},i)},gp={init:function(){return zu({readState:X("No State required")})}},zu=function(i){return i},Vm=function(i,c){var f={};return An(i,function(x,F){An(x,function($,se){var Ie=mr(f,se).getOr([]);f[se]=Ie.concat([c(F,$)])})}),f},Dd=function(i){return{classes:T(i.classes)?[]:i.classes,attributes:T(i.attributes)?{}:i.attributes,styles:T(i.styles)?{}:i.styles}},_g=function(i){return i.cHandler},of=function(i,c){return{name:i,handler:c}},jp=function(i,c,f){var x=re(re({},f),function(i,c){var f={};return Ct(i,function(x){f[x.name()]=x.handlers(c)}),f}(c,i));return Vm(x,of)},Bl=function(i){var c=function(i){return w(i)?{can:xe,abort:Pe,run:i}:i}(i);return function(f,x){for(var F=[],$=2;$<arguments.length;$++)F[$-2]=arguments[$];var se=[f,x].concat(F);c.abort.apply(void 0,se)?x.stop():c.can.apply(void 0,se)&&c.run.apply(void 0,se)}},bp=function(i,c,f){var x=c[f];return x?function(i,c,f,x){try{var F=xn(f,function($,se){var Ie=$[c],ze=se[c],it=x.indexOf(Ie),Mt=x.indexOf(ze);if(-1===it)throw new Error("The ordering for "+i+" does not have an entry for "+Ie+".\nOrder specified: "+JSON.stringify(x,null,2));if(-1===Mt)throw new Error("The ordering for "+i+" does not have an entry for "+ze+".\nOrder specified: "+JSON.stringify(x,null,2));return it<Mt?-1:Mt<it?1:0});return ra.value(F)}catch($){return ra.error([$])}}("Event: "+f,"name",i,x).map(function(F){var $=ft(F,function(se){return se.handler});return Ls($)}):function(i,c){return ra.error(["The event ("+i+') has more than one behaviour that listens to it.\nWhen this occurs, you must specify an event ordering for the behaviours in your spec (e.g. [ "listing", "toggling" ]).\nThe behaviours that can trigger it are: '+JSON.stringify(ft(c,function(f){return f.name}),null,2)])}(f,i)},af=function(i,c){var f=Gr(i,function(x,F){return(1===x.length?ra.value(x[0].handler):bp(x,c,F)).map(function(se){var Ie=Bl(se),ze=x.length>1?st(c[F],function(it){return tt(x,function(Mt){return Mt.name===it})}).join(" > "):x[0].name;return Fo(F,function(i,c){return{handler:i,purpose:c}}(Ie,ze))})});return Tt(f,{})},Jc="alloy.base.behaviour",Ac=Go([Dl("dom","dom",{tag:"required",process:{}},Go([Mr("tag"),Ti("styles",{}),Ti("classes",[]),Ti("attributes",{}),Es("value"),Es("innerHtml")])),Mr("components"),Mr("uid"),Ti("events",{}),Ti("apis",{}),Dl("eventOrder","eventOrder",function(i){return ul(X(i))}((wm={},wm[dd()]=["disabling",Jc,"toggling","typeaheadevents"],wm[Xl()]=[Jc,"focusing","keying"],wm[as()]=[Jc,"disabling","toggling","representing"],wm[sm()]=[Jc,"representing","streaming","invalidating"],wm[mg()]=[Jc,"representing","item-events","tooltipping"],wm[mu()]=["focusing",Jc,"item-type-events"],wm[tu()]=["focusing",Jc,"item-type-events"],wm[ds()]=["item-type-events","tooltipping"],wm[$d()]=["receiving","reflecting","tooltipping"],wm)),yc()),Es("domModification")]),Jp=function(i){return i.events},Cp=function(i,c){var f=Xt(i,c);return void 0===f||""===f?[]:f.split(" ")},vg=function(i){return void 0!==i.dom.classList},Qp=function(i,c){return function(i,c,f){var F=Cp(i,c).concat([f]);return De(i,c,F.join(" ")),!0}(i,"class",c)},Kg=function(i,c){return function(i,c,f){var x=st(Cp(i,c),function(F){return F!==f});return x.length>0?De(i,c,x.join(" ")):Fe(i,c),!1}(i,"class",c)},Qc=function(i,c){vg(i)?i.dom.classList.add(c):Qp(i,c)},Zh=function(i){var c=vg(i)?i.dom.classList:function(i){return Cp(i,"class")}(i);0===c.length&&Fe(i,"class")},wc=function(i,c){vg(i)?i.dom.classList.remove(c):Kg(i,c);Zh(i)},Ep=function(i,c){return vg(i)&&i.dom.classList.contains(c)},Gh=function(i,c){Ct(c,function(f){Qc(i,f)})},qp=function(i,c){Ct(c,function(f){wc(i,f)})},dm=function(i){return i.dom.value},Ch=function(i,c){if(void 0===c)throw new Error("Value.set was undefined");i.dom.value=c},yg=function(i,c){return function(i,c){var f=ft(c,function(F){return yl(F.name(),[Mr("config"),Ti("state",gp)])}),x=li("component.behaviours",Go(f),i.behaviours).fold(function(F){throw new Error(fo(F)+"\nComplete spec:\n"+JSON.stringify(i,null,2))},ve);return{list:c,data:vn(x,function(F){var $=F.map(function(se){return{config:se.config,state:se.state.init(se.config)}});return X($)})}}(i,c)},Mb=function(i){var c=function(i){var c=mr(i,"behaviours").getOr({});return wi(Vn(c),function(f){var x=c[f];return P(x)?[x.me]:[]})}(i);return yg(i,c)},Tb=function(i,c,f){var x=function(i){return re(re({},i.dom),{uid:i.uid,domChildren:ft(i.components,function(c){return c.element})})}(i),F=function(i){return i.domModification.fold(function(){return Dd({})},Dd)}(i),$={"alloy.base.modification":F},se=c.length>0?function(i,c,f,x){var F=re({},c);Ct(f,function(Mt){F[Mt.name()]=Mt.exhibit(i,x)});var $=Vm(F,function(Mt,kt){return{name:Mt,modification:kt}}),se=function(Mt){return nn(Mt,function(kt,pn){return re(re({},pn.modification),kt)},{})},Ie=nn($.classes,function(Mt,kt){return kt.modification.concat(Mt)},[]),ze=se($.attributes),it=se($.styles);return Dd({classes:Ie,attributes:ze,styles:it})}(f,$,c,x):F;return function(i,c){return re(re({},i),{attributes:re(re({},i.attributes),c.attributes),styles:re(re({},i.styles),c.styles),classes:i.classes.concat(c.classes)})}(x,se)},x_=function(i,c,f){var x={"alloy.base.behaviour":Jp(i)};return function(i,c,f,x){var F=jp(i,f,x);return af(F,c)}(f,i.eventOrder,c,x).getOrDie()},Mp=function(i){var c=function(){return Yi},f=ta(bh),x=dr(function(i){return li("custom.definition",Ac,i)}(i)),F=Mb(i),$=function(i){return i.list}(F),se=function(i){return i.data}(F),ze=function(i){var c=Xn.fromTag(i.tag);bt(c,i.attributes),Gh(c,i.classes),ya(c,i.styles),i.innerHtml.each(function(x){return Bh(c,x)});var f=i.domChildren;return Ia(c,f),i.value.each(function(x){Ch(c,x)}),i.uid,Lt(c,i.uid),c}(Tb(x,$,se)),it=x_(x,$,se),Mt=ta(x.components),Yi={uid:i.uid,getSystem:f.get,config:function(Or){var Pr=se;return(w(Pr[Or.name()])?Pr[Or.name()]:function(){throw new Error("Could not find "+Or.name()+" in "+JSON.stringify(i,null,2))})()},hasConfigured:function(Or){return w(se[Or.name()])},spec:i,readState:function(Or){return se[Or]().map(function(Pr){return Pr.state.readState()}).getOr("not enabled")},getApis:function(){return x.apis},connect:function(Or){f.set(Or)},disconnect:function(){f.set(T_(c))},element:ze,syncComponents:function(){var Or=Dt(ze),Pr=wi(Or,function(zi){return f.get().getByDom(zi).fold(function(){return[]},Bt)});Mt.set(Pr)},components:Mt.get,events:it};return Yi},bg=function(i){var c=Lu(i),f=c.events,x=oe(c,["events"]),F=function(i){var c=mr(i,"components").getOr([]);return ft(c,Ga)}(x),$=re(re({},x),{events:re(re({},Kf),f),components:F});return ra.value(Mp($))},fd=function(i){var c=Xn.fromText(i);return Wh({element:c})},Wh=function(i){var c=Sr("external.component",Rc([Mr("element"),Es("uid")]),i),f=ta(T_()),$=c.uid.getOrThunk(function(){return yh("external")});Lt(c.element,$);var se={uid:$,getSystem:f.get,config:j.none,hasConfigured:Pe,connect:function(Ie){f.set(Ie)},disconnect:function(){f.set(T_(function(){return se}))},getApis:function(){return{}},element:c.element,spec:i,readState:X("No state"),syncComponents:V,components:X([]),events:{}};return sc(se)},Cg=yh,Ga=function(i){return function(i){return mr(i,co)}(i).getOrThunk(function(){var c=function(i){return jn(i,"uid")}(i)?i:re({uid:Cg("")},i);return bg(c).getOrDie()})},hd=sc;function Eh(i,c,f,x,F){return i(f,x)?j.some(f):w(F)&&F(f)?j.none():c(f,x,F)}var qd,Al=function(i,c,f){for(var x=i.dom,F=w(f)?f:Pe;x.parentNode;){x=x.parentNode;var $=Xn.fromDom(x);if(c($))return j.some($);if(F($))break}return j.none()},pm=function(i,c,f){return Eh(function(F,$){return $(F)},Al,i,c,f)},Im=function(i,c,f){return pm(i,c,f).isSome()},cf=function(i,c,f){return Al(i,function(x){return ol(x,c)},f)},Lv=function(i,c){return function(i,c){return vi(i.dom.childNodes,function(F){return c(Xn.fromDom(F))}).map(Xn.fromDom)}(i,function(f){return ol(f,c)})},Fc=function(i,c){return function(i,c){var f=void 0===c?document:c.dom;return zc(f)?j.none():j.from(f.querySelector(i)).map(Xn.fromDom)}(c,i)},gd=function(i,c,f){return Eh(function(F,$){return ol(F,$)},cf,i,c,f)},uf=function(){var i=jo("aria-owns");return{id:i,link:function(x){De(x,"aria-owns",i)},unlink:function(x){Fe(x,"aria-owns")}}},jl=function(i,c){return function(i){return pm(i,function(f){if(!Gn(f))return!1;var x=Xt(f,"id");return void 0!==x&&x.indexOf("aria-owns")>-1}).bind(function(f){var x=Xt(f,"id"),F=ro(f);return Fc(F,'[aria-owns="'+x+'"]')})}(c).exists(function(f){return Eg(i,f)})},Eg=function(i,c){return Im(c,function(f){return tn(f,i.element)},Pe)||jl(i,c)},Gm="unknown";!function(i){i[i.STOP=0]="STOP",i[i.NORMAL=1]="NORMAL",i[i.LOGGING=2]="LOGGING"}(qd||(qd={}));var Tp=ta({}),Fp=function(i,c,f){switch(mr(Tp.get(),i).orThunk(function(){var se=Vn(Tp.get());return Vi(se,function(Ie){return i.indexOf(Ie)>-1?j.some(Tp.get()[Ie]):j.none()})}).getOr(qd.NORMAL)){case qd.NORMAL:return f(Db());case qd.LOGGING:var F=function(i,c){var f=[],x=(new Date).getTime();return{logEventCut:function(F,$,se){f.push({outcome:"cut",target:$,purpose:se})},logEventStopped:function(F,$,se){f.push({outcome:"stopped",target:$,purpose:se})},logNoParent:function(F,$,se){f.push({outcome:"no-parent",target:$,purpose:se})},logEventNoHandlers:function(F,$){f.push({outcome:"no-handlers-left",target:$})},logEventResponse:function(F,$,se){f.push({outcome:"response",purpose:se,target:$})},write:function(){var F=(new Date).getTime();Ve(["mousemove","mouseover","mouseout",as()],i)||console.log(i,{event:i,time:F-x,target:c.dom,sequence:ft(f,function($){return Ve(["cut","stopped","response"],$.outcome)?"{"+$.purpose+"} "+$.outcome+" at ("+xf($.target)+")":$.outcome})})}}}(i,c),$=f(F);return F.write(),$;case qd.STOP:return!0}},xy=["alloy/data/Fields","alloy/debugging/Debugging"],Df=function(i,c,f){return Fp(i,c,f)},Db=X({logEventCut:V,logEventStopped:V,logNoParent:V,logEventNoHandlers:V,logEventResponse:V,write:V}),Sf=X([Mr("menu"),Mr("selectedMenu")]),Mh=X([Mr("item"),Mr("selectedItem")]);X(Go(Mh().concat(Sf())));var Mg=X(Go(Mh())),vC=qu("initSize",[Mr("numColumns"),Mr("numRows")]),Wm=function(){return qu("markers",[Mr("backgroundMenu")].concat(Sf()).concat(Mh()))},Pm=function(i){return qu("markers",ft(i,Mr))},Af=function(i,c,f){return function(){var i=new Error;if(void 0!==i.stack){var c=i.stack.split("\n");return vi(c,function(f){return f.indexOf("alloy")>0&&!tt(xy,function(x){return f.indexOf(x)>-1})}).getOr(Gm)}}(),Dl(c,c,f,xt(function(x){return ra.value(function(){for(var F=[],$=0;$<arguments.length;$++)F[$]=arguments[$];return x.apply(void 0,F)})}))},kl=function(i){return Af(0,i,Ba(V))},Gc=function(i){return Af(0,i,Ba(j.none))},gu=function(i){return Af(0,i,{tag:"required",process:{}})},Ad=function(i){return Af(0,i,{tag:"required",process:{}})},$s=function(i,c){return Yl(i,X(c))},$h=function(i){return Yl(i,ve)},av=X(vC),Yu=function(i,c,f,x,F,$,se,Ie){return void 0===Ie&&(Ie=!1),{x:i,y:c,bubble:f,direction:x,placement:F,restriction:$,label:se+"-"+F,alwaysFit:Ie}},Xp=fc_generate([{southeast:[]},{southwest:[]},{northeast:[]},{northwest:[]},{south:[]},{north:[]},{east:[]},{west:[]}]),Kh=Xp.southeast,D_=Xp.southwest,wf=Xp.northeast,Qg=Xp.northwest,Np=Xp.south,em=Xp.north,_d=Xp.east,xh=Xp.west,iu=function(i,c,f,x){var F=i+c;return F>x?f:F<f?x:F},xp=function(i,c,f){return Math.min(Math.max(i,c),f)},id=function(i,c){return je(["left","right","top","bottom"],function(f){return mr(c,f).map(function(x){return function(i,c){switch(c){case 1:return i.x;case 0:return i.x+i.width;case 2:return i.y;case 3:return i.y+i.height}}(i,x)})})},Jh="layout",Sb=function(i){return i.x},f0=function(i,c){return i.x+i.width/2-c.width/2},Ab=function(i,c){return i.x+i.width-c.width},Dh=function(i,c){return i.y-c.height},qf=function(i){return i.y+i.height},wd=function(i,c){return i.y+i.height/2-c.height/2},Bp=function(i,c,f){return Yu(Sb(i),qf(i),f.southeast(),Kh(),"southeast",id(i,{left:1,top:3}),Jh)},tm=function(i,c,f){return Yu(Ab(i,c),qf(i),f.southwest(),D_(),"southwest",id(i,{right:0,top:3}),Jh)},Hd=function(i,c,f){return Yu(Sb(i),Dh(i,c),f.northeast(),wf(),"northeast",id(i,{left:1,bottom:2}),Jh)},nm=function(i,c,f){return Yu(Ab(i,c),Dh(i,c),f.northwest(),Qg(),"northwest",id(i,{right:0,bottom:2}),Jh)},Up=function(i,c,f){return Yu(f0(i,c),Dh(i,c),f.north(),em(),"north",id(i,{bottom:2}),Jh)},Hu=function(i,c,f){return Yu(f0(i,c),qf(i),f.south(),Np(),"south",id(i,{top:3}),Jh)},sv=function(i,c,f){return Yu(function(i){return i.x+i.width}(i),wd(i,c),f.east(),_d(),"east",id(i,{left:0}),Jh)},Rv=function(i,c,f){return Yu(function(i,c){return i.x-c.width}(i,c),wd(i,c),f.west(),xh(),"west",id(i,{right:1}),Jh)},ml=function(){return[Bp,tm,Hd,nm,Hu,Up,sv,Rv]},pf=function(){return[tm,Bp,nm,Hd,Hu,Up,sv,Rv]},mm=function(){return[Hd,nm,Bp,tm,Up,Hu]},Sy=function(){return[nm,Hd,tm,Bp,Up,Hu]},te=function(){return[Bp,tm,Hd,nm,Hu,Up]},M=function(){return[tm,Bp,nm,Hd,Hu,Up]},Ye=Object.freeze({__proto__:null,events:function(i){return uc([yr($d(),function(c,f){var x=i.channels,F=Vn(x),$=f,se=function(i,c){return c.universal?i:st(i,function(f){return Ve(c.channels,f)})}(F,$);Ct(se,function(Ie){var ze=x[Ie],it=ze.schema,Mt=Sr("channel["+Ie+"] data\nReceiver: "+xf(c.element),it,$.data);ze.onReceive(c,Mt)})})])}}),Zt=[sl("channels",Ht(ra.value,Rc([gu("onReceive"),Ti("schema",yc())])))],Ir=function(i,c,f){return M_(function(x,F){f(x,i,c)})},ec=function(i,c,f){return function(i,c,f){var x=f.toString(),F=x.indexOf(")")+1,$=x.indexOf("("),se=x.substring($+1,F-1).split(/,\s*/);return i.toFunctionAnnotation=function(){return{name:c,parameters:Yh(se.slice(0,1).concat(se.slice(3)))}},i}(function(F){for(var $=[],se=1;se<arguments.length;se++)$[se-1]=arguments[se];var Ie=[F].concat($);return F.config({name:X(i)}).fold(function(){throw new Error("We could not find any behaviour configuration for: "+i+". Using API: "+f)},function(ze){var it=Array.prototype.slice.call(Ie,1);return c.apply(void 0,[F,ze.config,ze.state].concat(it))})},f,c)},Sh=function(i){return{key:i,value:void 0}},qg=function(i,c,f,x,F,$,se){var Ie=function(kt){return ct(kt,f)?kt[f]():j.none()},ze=vn(F,function(kt,pn){return ec(f,kt,pn)}),it=vn($,function(kt,pn){return gg(kt,pn)}),Mt=re(re(re({},it),ze),{revoke:ge(Sh,f),config:function(kt){var pn=Sr(f+"-config",i,kt);return{key:f,value:{config:pn,me:Mt,configAsRaw:en(function(){return Sr(f+"-config",i,kt)}),initialConfig:kt,state:se}}},schema:X(c),exhibit:function(kt,pn){return pr(Ie(kt),mr(x,"exhibit"),function(bn,Un){return Un(pn,bn.config,bn.state)}).getOrThunk(function(){return Dd({})})},name:X(f),handlers:function(kt){return Ie(kt).map(function(pn){return mr(x,"events").getOr(function(){return{}})(pn.config,pn.state)}).getOr({})}});return Mt},ao=function(i){return vs(i)},Ay=Rc([Mr("fields"),Mr("name"),Ti("active",{}),Ti("apis",{}),Ti("state",gp),Ti("extra",{})]),Wc=function(i){var c=Sr("Creating behaviour: "+i.name,Ay,i);return function(i,c,f,x,F,$){var se=Rc(i),Ie=yl(c,[dl("config",i)]);return qg(se,Ie,c,f,x,F,$)}(c.fields,c.name,c.active,c.apis,c.extra,c.state)},Dp=Rc([Mr("branchKey"),Mr("branches"),Mr("name"),Ti("active",{}),Ti("apis",{}),Ti("state",gp),Ti("extra",{})]),Ah=function(i){var c=Sr("Creating behaviour: "+i.name,Dp,i);return function(i,c,f,x,F,$){var se=i,Ie=yl(c,[mc("config",i)]);return qg(se,Ie,c,f,x,F,$)}(ms(c.branchKey,c.branches),c.name,c.active,c.apis,c.extra,c.state)},CC=X(void 0),Id=Wc({fields:Zt,name:"receiving",active:Ye}),EC=Object.freeze({__proto__:null,exhibit:function(i,c){return Dd({classes:[],styles:c.useFixed()?{}:{position:"relative"}})}}),$m=function(){return Xn.fromDom(document)},Xd=function(i){return i.dom.focus()},wy=function(i){var c=ro(i).dom;return i.dom===c.activeElement},Vu=function(i){return void 0===i&&(i=$m()),j.from(i.dom.activeElement).map(Xn.fromDom)},dc=function(i){return Vu(ro(i)).filter(function(c){return i.dom.contains(c.dom)})},MC=function(i,c){var f=ro(c),x=Vu(f).bind(function($){var se=function(Ie){return tn($,Ie)};return se(c)?j.some(c):function(i,c){var f=function(x){for(var F=0;F<x.childNodes.length;F++){var $=Xn.fromDom(x.childNodes[F]);if(c($))return j.some($);var se=f(x.childNodes[F]);if(se.isSome())return se}return j.none()};return f(i.dom)}(c,se)}),F=i(c);return x.each(function($){Vu(f).filter(function(se){return tn(se,$)}).fold(function(){Xd($)},V)}),F},fm=function(i,c,f,x,F){var $=function(se){return se+"px"};return{position:i,left:c.map($),top:f.map($),right:x.map($),bottom:F.map($)}},cv=function(i,c){Na(i,function(i){return re(re({},i),{position:j.some(i.position)})}(c))},TC=fc_generate([{none:[]},{relative:["x","y","width","height"]},{fixed:["x","y","width","height"]}]),Tr=function(i,c,f,x,F,$){var se=c.rect,Ie=se.x-f,ze=se.y-x,kt=F-(Ie+se.width),pn=$-(ze+se.height),bn=j.some(Ie),Un=j.some(ze),di=j.some(kt),Ui=j.some(pn),ri=j.none();return function(i,c,f,x,F,$,se,Ie,ze){return i.fold(c,f,x,F,$,se,Ie,ze)}(c.direction,function(){return fm(i,bn,Un,ri,ri)},function(){return fm(i,ri,Un,di,ri)},function(){return fm(i,bn,ri,ri,Ui)},function(){return fm(i,ri,ri,di,Ui)},function(){return fm(i,bn,Un,ri,ri)},function(){return fm(i,bn,ri,ri,Ui)},function(){return fm(i,bn,Un,ri,ri)},function(){return fm(i,ri,Un,di,ri)})},qh=function(i,c){return i.fold(function(){var f=c.rect;return fm("absolute",j.some(f.x),j.some(f.y),j.none(),j.none())},function(f,x,F,$){return Tr("absolute",c,f,x,F,$)},function(f,x,F,$){return Tr("fixed",c,f,x,F,$)})},Iy=function(i,c){var f=ge(dn,c),x=i.fold(f,f,function(){var se=Hc();return dn(c).translate(-se.left,-se.top)}),F=Ol(c),$=Wl(c);return sr(x.left,x.top,F,$)},u1=function(i,c){return c.fold(function(){return i.fold(Zs,Zs,sr)},function(f){return i.fold(f,f,function(){var x=f(),F=im(i,x.x,x.y);return sr(F.left,F.top,x.width,x.height)})})},im=function(i,c,f){var x=Da(c,f);return i.fold(X(x),X(x),function(){var $=Hc();return x.translate(-$.left,-$.top)})};TC.none;var mf,Tg=TC.relative,$c=TC.fixed,wb="data-alloy-placement",xC=function(i){return Qi(i,wb)},Ib=fc_generate([{fit:["reposition"]},{nofit:["reposition","visibleW","visibleH","isVisible"]}]),S_=function(i,c,f,x){var F=i.bubble,$=F.offset,se=function(i,c,f){var x=function(ze,it){return c[ze].map(function(Mt){var kt="top"===ze||"bottom"===ze,pn=kt?f.top:f.left,Un=("left"===ze||"top"===ze?Math.max:Math.min)(Mt,it)+pn;return kt?xp(Un,i.y,i.bottom):xp(Un,i.x,i.right)}).getOr(it)},F=x("left",i.x),$=x("top",i.y),se=x("right",i.right),Ie=x("bottom",i.bottom);return sr(F,$,se-F,Ie-$)}(x,i.restriction,$),Ie=i.x+$.left,ze=i.y+$.top,it=sr(Ie,ze,c,f),Mt=function(i,c){var f=c.x,x=c.y,F=c.right,$=c.bottom,se=i.x,Ie=i.y,ze=i.right,it=i.bottom,Mt=i.width,kt=i.height;return{originInBounds:se>=f&&se<=F&&Ie>=x&&Ie<=$,sizeInBounds:ze<=F&&ze>=f&&it<=$&&it>=x,visibleW:Math.min(Mt,se>=f?F-se:ze-f),visibleH:Math.min(kt,Ie>=x?$-Ie:it-x)}}(it,se),kt=Mt.originInBounds,pn=Mt.sizeInBounds,bn=Mt.visibleW,Un=Mt.visibleH,di=kt&&pn,Ui=di?it:function(i,c){var f=c.x,x=c.y,F=c.right,$=c.bottom,se=i.x,Ie=i.y,ze=i.width,it=i.height,Mt=Math.max(f,F-ze),kt=Math.max(x,$-it),pn=xp(se,f,Mt),bn=xp(Ie,x,kt),Un=Math.min(pn+ze,F)-pn,di=Math.min(bn+it,$)-bn;return sr(pn,bn,Un,di)}(it,se),ri=Ui.width>0&&Ui.height>0,Yi=function(i,c,f){var x=X(c.bottom-f.y),F=X(f.bottom-c.y),$=function(i,c,f,x){return i.fold(c,c,x,x,c,x,f,f)}(i,F,F,x),se=X(c.right-f.x),Ie=X(f.right-c.x),ze=function(i,c,f,x){return i.fold(c,x,c,x,f,f,c,x)}(i,Ie,Ie,se);return{maxWidth:ze,maxHeight:$}}(i.direction,Ui,x),Or=Yi.maxWidth,zi={rect:Ui,maxHeight:Yi.maxHeight,maxWidth:Or,direction:i.direction,placement:i.placement,classes:{on:F.classesOn,off:F.classesOff},layout:i.label,testY:ze};return di||i.alwaysFit?Ib.fit(zi):Ib.nofit(zi,bn,Un,ri)},Bv=function(i){var c=ta(j.none()),f=function(){return c.get().each(i)};return{clear:function(){f(),c.set(j.none())},isSet:function(){return c.get().isSome()},get:function(){return c.get()},set:function(Ie){f(),c.set(j.some(Ie))}}},Uv=function(){return Bv(function(i){return i.destroy()})},rm=function(){return Bv(function(i){return i.unbind()})},ku=function(){var i=Bv(V);return re(re({},i),{on:function(f){return i.get().each(f)}})},h0=xe,Nc=function(i,c,f){return function(i,c,f,x){return bd(i,c,f,x,!1)}(i,c,h0,f)},g0=function(i,c,f){return function(i,c,f,x){return bd(i,c,f,x,!0)}(i,c,h0,f)},_0=lu,v0=["top","bottom","right","left"],Xh="data-alloy-transition-timer",Kl=function(i,c){return function(i,c){return Bn(c,function(f){return Ep(i,f)})}(i,c.classes)},eg=function(i,c){var f=function(x){return parseFloat(x).toFixed(3)};return zr(c,function(x,F){return!function(i,c,f){return void 0===f&&(f=ye),pr(i,c,f).getOr(i.isNone()&&c.isNone())}(i[F].map(f),x.map(f))}).isSome()},wh=function(i,c){var F,f=rm(),x=rm(),$=function(Mt){var kt,pn=null!==(kt=Mt.raw.pseudoElement)&&void 0!==kt?kt:"";return tn(Mt.target,i)&&function(i){return!rr(i)}(pn)&&Ve(v0,Mt.raw.propertyName)},se=function(Mt){if(n(Mt)||$(Mt)){f.clear(),x.clear();var kt=Mt?.raw.type;(n(kt)||kt===ud())&&(clearTimeout(F),Fe(i,Xh),qp(i,c.classes))}},Ie=function(){f.set(Nc(i,ud(),se)),x.set(Nc(i,pg(),se))};if("ontransitionstart"in i.dom)var ze=Nc(i,Vp(),function(Mt){$(Mt)&&(ze.unbind(),Ie())});else Ie();var it=function(i){var c=function($){var se=qi(i,$),Ie=e(se)?se.split(/\s*,\s*/):[];return st(Ie,rr)},f=function($){if(e($)&&/^[\d.]+/.test($)){var se=parseFloat($);return Tn($,"ms")?se:1e3*se}return 0},x=c("transition-delay"),F=c("transition-duration");return Dn(F,function($,se,Ie){var ze=f(x[Ie])+f(se);return Math.max($,ze)},0)}(i);requestAnimationFrame(function(){F=setTimeout(se,it+17),De(i,Xh,F)})},m1=function(i,c,f,x,F,$){var se=function(i,c,f){return f.exists(function(x){var F=i.mode;return"all"===F||x[F]!==c[F]})}(x,F,$);if(se||Kl(i,x)){Ki(i,"position",f.position);var Ie=Iy(c,i),ze=qh(c,re(re({},F),{rect:Ie})),it=je(v0,function(Mt){return ze[Mt]});eg(f,it)&&(Na(i,it),se&&function(i,c){Gh(i,c.classes),Qi(i,Xh).each(function(f){clearTimeout(parseInt(f,10)),Fe(i,Xh)}),wh(i,c)}(i,x),Tc(i))}else qp(i,x.classes)},Ly=function(i,c,f,x){Ka(c,"max-height"),Ka(c,"max-width");var F=function(i){return{width:Ol(i),height:Wl(i)}}(c);return function(i,c,f,x,F,$){var se=x.width,Ie=x.height,ze=function(Mt,kt,pn,bn,Un){var di=Mt(f,x,F,i,$),Ui=S_(di,se,Ie,$);return Ui.fold(X(Ui),function(ri,Yi,Or,Pr){return(Un===Pr?Or>bn||Yi>pn:!Un&&Pr)?Ui:Ib.nofit(kt,pn,bn,Un)})};return Dn(c,function(Mt,kt){var pn=ge(ze,kt);return Mt.fold(X(Mt),pn)},Ib.nofit({rect:f,maxHeight:x.height,maxWidth:x.width,direction:Kh(),placement:"southeast",classes:{on:[],off:[]},layout:"none",testY:f.y},-1,-1,!1)).fold(ve,ve)}(c,x.preference,i,F,f,x.bounds)},h1=function(i,c){!function(i,c){De(i,wb,c)}(i,c.placement)},hm=function(i,c){!function(i,c){var x=vu.max(i,c,["margin-top","border-top-width","padding-top","padding-bottom","border-bottom-width","margin-bottom"]);Ki(i,"max-height",x+"px")}(i,Math.floor(c))},e_=X(function(i,c){hm(i,c),ya(i,{"overflow-x":"hidden","overflow-y":"auto"})}),eh=X(function(i,c){hm(i,c)}),SC=function(i,c,f){return void 0===i[c]?f:i[c]},AC=function(i,c,f,x){var F=Ly(i,c,f,x);return function(i,c,f){var x=qh(f.origin,c);f.transition.each(function(F){m1(i,f.origin,x,F,c,f.lastPlacement)}),cv(i,x)}(c,F,x),h1(c,F),function(i,c){var f=c.classes;qp(i,f.off),Gh(i,f.on)}(c,F),function(i,c,f){(0,f.maxHeightFunction)(i,c.maxHeight)}(c,F,x),function(i,c,f){(0,f.maxWidthFunction)(i,c.maxWidth)}(c,F,x),{layout:F.layout,placement:F.placement}},_E=["valignCentre","alignLeft","alignRight","alignCentre","top","bottom","left","right","inset"],uv=function(i,c,f,x){void 0===x&&(x=1);var F=i*x,$=c*x,se=function(ze){return mr(f,ze).getOr([])},Ie=function(ze,it,Mt){var kt=On(_E,Mt);return{offset:Da(ze,it),classesOn:wi(Mt,se),classesOff:wi(kt,se)}};return{southeast:function(){return Ie(-i,c,["top","alignLeft"])},southwest:function(){return Ie(i,c,["top","alignRight"])},south:function(){return Ie(-i/2,c,["top","alignCentre"])},northeast:function(){return Ie(-i,-c,["bottom","alignLeft"])},northwest:function(){return Ie(i,-c,["bottom","alignRight"])},north:function(){return Ie(-i/2,-c,["bottom","alignCentre"])},east:function(){return Ie(i,-c/2,["valignCentre","left"])},west:function(){return Ie(-i,-c/2,["valignCentre","right"])},insetNortheast:function(){return Ie(F,$,["top","alignLeft","inset"])},insetNorthwest:function(){return Ie(-F,$,["top","alignRight","inset"])},insetNorth:function(){return Ie(-F/2,$,["top","alignCentre","inset"])},insetSoutheast:function(){return Ie(F,-$,["bottom","alignLeft","inset"])},insetSouthwest:function(){return Ie(-F,-$,["bottom","alignRight","inset"])},insetSouth:function(){return Ie(-F/2,-$,["bottom","alignCentre","inset"])},insetEast:function(){return Ie(-F,-$/2,["valignCentre","right","inset"])},insetWest:function(){return Ie(F,-$/2,["valignCentre","left","inset"])}}},Sp=function(){return uv(0,0,{})},Yv=ve,Pb=function(i,c){return function(f){return"rtl"===vE(f)?c:i}},vE=function(i){return"rtl"===qi(i,"direction")?"rtl":"ltr"};!function(i){i.TopToBottom="toptobottom",i.BottomToTop="bottomtotop"}(mf||(mf={}));var Ob="data-alloy-vertical-dir",ep=function(i){return Im(i,function(c){return Gn(c)&&Xt(c,"data-alloy-vertical-dir")===mf.BottomToTop})},rd=function(){return yl("layouts",[Mr("onLtr"),Mr("onRtl"),Es("onBottomLtr"),Es("onBottomRtl")])},Pf=function(i,c,f,x,F,$,se){var Ie=se.map(ep).getOr(!1),ze=c.layouts.map(function(bn){return bn.onLtr(i)}),it=c.layouts.map(function(bn){return bn.onRtl(i)}),Mt=Ie?c.layouts.bind(function(bn){return bn.onBottomLtr.map(function(Un){return Un(i)})}).or(ze).getOr(F):ze.getOr(f),kt=Ie?c.layouts.bind(function(bn){return bn.onBottomRtl.map(function(Un){return Un(i)})}).or(it).getOr($):it.getOr(x);return Pb(Mt,kt)(i)},yE=[Mr("hotspot"),Es("bubble"),Ti("overrides",{}),rd(),$s("placement",function(i,c,f){var x=c.hotspot,F=Iy(f,x.element),$=Pf(i.element,c,te(),M(),mm(),Sy(),j.some(c.hotspot.element));return j.some(Yv({anchorBox:F,bubble:c.bubble.getOr(Sp()),overrides:c.overrides,layouts:$,placer:j.none()}))})],t_=[Mr("x"),Mr("y"),Ti("height",0),Ti("width",0),Ti("bubble",Sp()),Ti("overrides",{}),rd(),$s("placement",function(i,c,f){var x=im(f,c.x,c.y),F=sr(x.left,x.top,c.width,c.height),$=Pf(i.element,c,ml(),pf(),ml(),pf(),j.none());return j.some(Yv({anchorBox:F,bubble:c.bubble,overrides:c.overrides,layouts:$,placer:j.none()}))})],Lb=fc_generate([{screen:["point"]},{absolute:["point","scrollLeft","scrollTop"]}]),bE=function(i){return i.fold(ve,function(c,f,x){return c.translate(-f,-x)})},dv=function(i){return i.fold(ve,ve)},Hv=function(i){return Dn(i,function(c,f){return c.translate(f.left,f.top)},Da(0,0))},Dg=function(i){var c=ft(i,dv);return Hv(c)},Vv=Lb.screen,b0=Lb.absolute,Of=function(i,c,f){var x=vr(i.element),F=Hc(x),$=function(i,c,f){var x=Ta(f.root).dom;return j.from(x.frameElement).map(Xn.fromDom).filter(function($){var se=vr($),Ie=vr(i.element);return tn(se,Ie)}).map(ss)}(i,0,f).getOr(F);return b0($,F.left,F.top)},tg=function(i,c,f,x){var F=Vv(Da(i,c));return j.some(function(i,c,f){return{point:i,width:c,height:f}}(F,f,x))},Ih=function(i,c,f,x,F){return i.map(function($){var se=[c,$.point],Ie=function(i,c,f,x){return i.fold(c,f,x)}(x,function(){return Dg(se)},function(){return Dg(se)},function(){return function(i){var c=ft(i,bE);return Hv(c)}(se)}),ze=function(i,c,f,x){return{x:i,y:c,width:f,height:x}}(Ie.left,Ie.top,$.width,$.height),it=f.showAbove?mm():te(),Mt=f.showAbove?Sy():M(),kt=Pf(F,f,it,Mt,it,Mt,j.none());return Yv({anchorBox:ze,bubble:f.bubble.getOr(Sp()),overrides:f.overrides,layouts:kt,placer:j.none()})})},CE=[Mr("node"),Mr("root"),Es("bubble"),rd(),Ti("overrides",{}),Ti("showAbove",!1),$s("placement",function(i,c,f){var x=Of(i,0,c);return c.node.filter(Ho).bind(function(F){var $=F.dom.getBoundingClientRect(),se=tg($.left,$.top,$.width,$.height),Ie=c.node.getOr(i.element);return Ih(se,x,c,f,Ie)})})],Gv_create=function(i,c,f,x){return{start:i,soffset:c,finish:f,foffset:x}},Wv=fc_generate([{before:["element"]},{on:["element","offset"]},{after:["element"]}]),EE_getStart=(Wv.before,Wv.on,Wv.after,function(i){return i.fold(ve,ve,ve)}),Rb=fc_generate([{domRange:["rng"]},{relative:["startSitu","finishSitu"]},{exact:["start","soffset","finish","foffset"]}]),Sg={domRange:Rb.domRange,relative:Rb.relative,exact:Rb.exact,exactFromRange:function(i){return Rb.exact(i.start,i.soffset,i.finish,i.foffset)},getWin:function(i){var c=function(i){return i.match({domRange:function(c){return Xn.fromDom(c.startContainer)},relative:function(c,f){return EE_getStart(c)},exact:function(c,f,x,F){return c}})}(i);return Ta(c)},range:Gv_create},mv=function(i,c,f){var x=i.document.createRange();return function(i,c){c.fold(function(f){i.setStartBefore(f.dom)},function(f,x){i.setStart(f.dom,x)},function(f){i.setStartAfter(f.dom)})}(x,c),function(i,c){c.fold(function(f){i.setEndBefore(f.dom)},function(f,x){i.setEnd(f.dom,x)},function(f){i.setEndAfter(f.dom)})}(x,f),x},b1=function(i,c,f,x,F){var $=i.document.createRange();return $.setStart(c.dom,f),$.setEnd(x.dom,F),$},C1=function(i){return{left:i.left,top:i.top,right:i.right,bottom:i.bottom,width:i.width,height:i.height}},n_=fc_generate([{ltr:["start","soffset","finish","foffset"]},{rtl:["start","soffset","finish","foffset"]}]),$v=function(i,c,f){return c(Xn.fromDom(f.startContainer),f.startOffset,Xn.fromDom(f.endContainer),f.endOffset)},Ag=function(i,c){var f=function(i,c){return c.match({domRange:function(f){return{ltr:X(f),rtl:j.none}},relative:function(f,x){return{ltr:en(function(){return mv(i,f,x)}),rtl:en(function(){return j.some(mv(i,x,f))})}},exact:function(f,x,F,$){return{ltr:en(function(){return b1(i,f,x,F,$)}),rtl:en(function(){return j.some(b1(i,F,$,f,x))})}}})}(i,c);return function(i,c){var f=c.ltr();return f.collapsed?c.rtl().filter(function(F){return!1===F.collapsed}).map(function(F){return n_.rtl(Xn.fromDom(F.endContainer),F.endOffset,Xn.fromDom(F.startContainer),F.startOffset)}).getOrThunk(function(){return $v(0,n_.ltr,f)}):$v(0,n_.ltr,f)}(0,f)},Yy=function(i,c){return Ag(i,c).match({ltr:function(x,F,$,se){var Ie=i.document.createRange();return Ie.setStart(x.dom,F),Ie.setEnd($.dom,se),Ie},rtl:function(x,F,$,se){var Ie=i.document.createRange();return Ie.setStart($.dom,se),Ie.setEnd(x.dom,F),Ie}})};n_.ltr,n_.rtl;var ip,C0=function(i,c){var x=function($){return i($)?j.from($.dom.nodeValue):j.none()};return{get:function($){if(!i($))throw new Error("Can only get "+c+" value of a "+c+" node");return x($).getOr("")},getOption:x,set:function($,se){if(!i($))throw new Error("Can only set raw "+c+" value of a "+c+" node");$.dom.nodeValue=se}}}(xi,"text"),gm=function(i){return C0.getOption(i)},fv=["img","br"],E0=function(i){var c=function(i){return gm(i).filter(function(c){return 0!==c.trim().length||c.indexOf("\xa0")>-1}).isSome()}(i);return c||Ve(fv,Ft(i))},Nb=function(i,c){var f=function(x){for(var F=Dt(x),$=F.length-1;$>=0;$--){var se=F[$];if(c(se))return j.some(se);var Ie=f(se);if(Ie.isSome())return Ie}return j.none()};return f(i)},Ap=function(i,c){return function(i,c){var f=void 0===c?document:c.dom;return zc(f)?[]:ft(f.querySelectorAll(i),Xn.fromDom)}(c,i)},rg=function(i,c,f,x){var F=function(i,c,f,x){var $=vr(i).dom.createRange();return $.setStart(i.dom,c),$.setEnd(f.dom,x),$}(i,c,f,x),$=tn(i,f)&&c===x;return F.collapsed&&!$},hf=function(i){if(i.rangeCount>0){var c=i.getRangeAt(0),f=i.getRangeAt(i.rangeCount-1);return j.some(Gv_create(Xn.fromDom(c.startContainer),c.startOffset,Xn.fromDom(f.endContainer),f.endOffset))}return j.none()},Kv=function(i){if(null===i.anchorNode||null===i.focusNode)return hf(i);var c=Xn.fromDom(i.anchorNode),f=Xn.fromDom(i.focusNode);return rg(c,i.anchorOffset,f,i.focusOffset)?j.some(Gv_create(c,i.anchorOffset,f,i.focusOffset)):hf(i)},Ph=function(i){return function(i){return j.from(i.getSelection())}(i).filter(function(c){return c.rangeCount>0}).bind(Kv)},P_=function(i,c){return function(i){var c=i.getClientRects(),f=c.length>0?c[0]:i.getBoundingClientRect();return f.width>0||f.height>0?j.some(f).map(C1):j.none()}(Yy(i,c))},hv=function(i,c){return function(i){var c=i.getBoundingClientRect();return c.width>0||c.height>0?j.some(c).map(C1):j.none()}(Yy(i,c))},Hy=function(i,c){return{element:i,offset:c}},M0=function(i,c){var f=Dt(i);if(0===f.length)return Hy(i,c);if(c<f.length)return Hy(f[c],0);var x=f[f.length-1],F=xi(x)?function(i){return C0.get(i)}(x).length:Dt(x).length;return Hy(x,F)},i_=function(i,c){return xi(i)?Hy(i,c):M0(i,c)},r_=function(i,c){return c.getSelection.getOrThunk(function(){return function(){return Ph(i)}})().map(function(x){var F=i_(x.start,x.soffset),$=i_(x.finish,x.foffset);return Sg.range(F.element,F.offset,$.element,$.offset)})},wg=[Es("getSelection"),Mr("root"),Es("bubble"),rd(),Ti("overrides",{}),Ti("showAbove",!1),$s("placement",function(i,c,f){var x=Ta(c.root).dom,F=Of(i,0,c),$=r_(x,c).bind(function(ze){return hv(x,Sg.exactFromRange(ze)).orThunk(function(){var Mt=Xn.fromText("\ufeff");Dr(ze.start,Mt);var kt=P_(x,Sg.exact(Mt,0,Mt,1));return Rs(Mt),kt}).bind(function(Mt){return tg(Mt.left,Mt.top,Mt.width,Mt.height)})}),se=r_(x,c).bind(function(ze){return Gn(ze.start)?j.some(ze.start):function(i){return La(i)}(ze.start)}),Ie=se.getOr(i.element);return Ih($,F,c,f,Ie)})],_m="link-layout",nh=function(i){return i.x+i.width},O_=function(i,c){return i.x-c.width},Ig=function(i,c){return i.y-c.height+i.height},M1=function(i){return i.y},T0=function(i,c,f){return Yu(nh(i),M1(i),f.southeast(),Kh(),"southeast",id(i,{left:0,top:2}),_m)},Vy=function(i,c,f){return Yu(O_(i,c),M1(i),f.southwest(),D_(),"southwest",id(i,{right:1,top:2}),_m)},Zy=function(i,c,f){return Yu(nh(i),Ig(i,c),f.northeast(),wf(),"northeast",id(i,{left:0,bottom:3}),_m)},Ub=function(i,c,f){return Yu(O_(i,c),Ig(i,c),f.northwest(),Qg(),"northwest",id(i,{right:1,bottom:3}),_m)},zb=function(){return[T0,Vy,Zy,Ub]},Jv=function(){return[Vy,T0,Ub,Zy]},L_=[Mr("item"),rd(),Ti("overrides",{}),$s("placement",function(i,c,f){var x=Iy(f,c.item.element),F=Pf(i.element,c,zb(),Jv(),zb(),Jv(),j.none());return j.some(Yv({anchorBox:x,bubble:Sp(),overrides:c.overrides,layouts:F,placer:j.none()}))})],o_=ms("type",{selection:wg,node:CE,hotspot:yE,submenu:L_,makeshift:t_}),x0=[uu("classes",ws),Vl("mode","all",["all","layout","placement"])],Vd=[Ti("useFixed",Pe),Es("getBounds")],D0=[sl("anchor",o_),yl("transition",x0)],kf=function(i,c,f,x,F,$,se){var Ie=function(i,c){return function(i,c){return{anchorBox:i,origin:c}}(i,c)}(f.anchorBox,c);return function(i,c,f,x,F,$,se,Ie){var ze=SC(se,"maxHeightFunction",e_()),it=SC(se,"maxWidthFunction",V),Mt=i.anchorBox,kt=i.origin,pn={bounds:u1(kt,$),origin:kt,preference:x,maxHeightFunction:ze,maxWidthFunction:it,lastPlacement:F,transition:Ie};return AC(Mt,c,f,pn)}(Ie,F.element,f.bubble,f.layouts,$,x,f.overrides,se)},_v=function(i,c,f,x,F,$){var se=$.map(lo);return Qv(i,c,f,x,F,se)},Qv=function(i,c,f,x,F,$){var se=Sr("placement.info",Go(D0),F),Ie=se.anchor,ze=x.element,it=f.get(x.uid);MC(function(){Ki(ze,"position","fixed");var Mt=$o(ze,"visibility");Ki(ze,"visibility","hidden");var kt=c.useFixed()?function(){var i=document.documentElement;return $c(0,0,i.clientWidth,i.clientHeight)}():function(i){var c=ss(i.element),f=i.element.dom.getBoundingClientRect();return Tg(c.left,c.top,f.width,f.height)}(i),pn=Ie.placement,bn=$.map(X).or(c.getBounds);pn(i,Ie,kt).each(function(Un){var Ui=Un.placer.getOr(kf)(i,kt,Un,bn,x,it,se.transition);f.set(x.uid,Ui)}),Mt.fold(function(){Ka(ze,"visibility")},function(Un){Ki(ze,"visibility",Un)}),$o(ze,"left").isNone()&&$o(ze,"top").isNone()&&$o(ze,"right").isNone()&&$o(ze,"bottom").isNone()&&Yt($o(ze,"position"),"fixed")&&Ka(ze,"position")},ze)},Ue=Object.freeze({__proto__:null,position:function(i,c,f,x,F){_v(i,c,f,x,F,j.none())},positionWithin:_v,positionWithinBounds:Qv,getMode:function(i,c,f){return c.useFixed()?"fixed":"absolute"},reset:function(i,c,f,x){var F=x.element;Ct(["position","left","right","top","bottom"],function($){return Ka(F,$)}),function(i){Fe(i,wb)}(F),f.clear(x.uid)}}),yn=Object.freeze({__proto__:null,init:function(){var i={};return zu({readState:function(){return i},clear:function(F){P(F)?delete i[F]:i={}},set:function(F,$){i[F]=$},get:function(F){return mr(i,F)}})}}),zn=Wc({fields:Vd,name:"positioning",active:EC,apis:Ue,state:yn}),ki=function(i){Cl(i,mg());var c=i.components();Ct(c,ki)},ji=function(i){var c=i.components();Ct(c,ji),Cl(i,lm())},br=function(i,c){oo(i.element,c.element)},uo=function(i,c){var f=i.components();!function(i){Ct(i.components(),function(c){return Rs(c.element)}),cc(i.element),i.syncComponents()}(i);var x=On(f,c);Ct(x,function(F){ki(F),i.getSystem().removeFromWorld(F)}),Ct(c,function(F){F.getSystem().isConnected()?br(i,F):(i.getSystem().addToWorld(F),br(i,F),Ho(i.element)&&ji(F)),i.syncComponents()})},Co=function(i,c){pa(i,c,oo)},pa=function(i,c,f){i.getSystem().addToWorld(c),f(i.element,c.element),Ho(i.element)&&ji(c),i.syncComponents()},Ea=function(i){ki(i),Rs(i.element),i.getSystem().removeFromWorld(i)},xs=function(i){var c=La(i.element).bind(function(f){return i.getSystem().getByDom(f).toOptional()});Ea(i),c.each(function(f){f.syncComponents()})},El=function(i){var c=i.components();Ct(c,Ea),cc(i.element),i.syncComponents()},fs=function(i,c){Ys(i,c,oo)},Ys=function(i,c,f){f(i,c.element);var x=Dt(c.element);Ct(x,function(F){c.getByDom(F).each(ji)})},ou=function(i){var c=Dt(i.element);Ct(c,function(f){i.getByDom(f).each(ki)}),Rs(i.element)},au=function(i,c,f,x){f.get().each(function(se){El(i)});var F=c.getAttachPoint(i);Co(F,i);var $=i.getSystem().build(x);return Co(i,$),f.set($),$},Rf=function(i,c,f,x){var F=au(i,c,f,x);return c.onOpen(i,F),F},wp=function(i,c,f){f.get().each(function(x){El(i),xs(i),c.onClose(i,x),f.clear()})},k_=function(i,c,f){return f.isOpen()},SE=function(i,c,f){var x=c.getAttachPoint(i);Ki(i.element,"position",zn.getMode(x)),function(i,c,f,x){$o(i.element,c).fold(function(){Fe(i.element,f)},function(F){De(i.element,f,F)}),Ki(i.element,c,x)}(i,"visibility",c.cloakVisibilityAttr,"hidden")},AE=function(i,c,f){(function(i){return tt(["top","left","right","bottom"],function(c){return $o(i,c).isSome()})})(i.element)||Ka(i.element,"position"),function(i,c,f){Qi(i.element,f).fold(function(){return Ka(i.element,c)},function(x){return Ki(i.element,c,x)})}(i,"visibility",c.cloakVisibilityAttr)},wE=Object.freeze({__proto__:null,cloak:SE,decloak:AE,open:Rf,openWhileCloaked:function(i,c,f,x,F){SE(i,c),Rf(i,c,f,x),F(),AE(i,c)},close:wp,isOpen:k_,isPartOf:function(i,c,f,x){return k_(0,0,f)&&f.get().exists(function(F){return c.isPartOf(i,F,x)})},getState:function(i,c,f){return f.get()},setContent:function(i,c,f,x){return f.get().map(function(){return au(i,c,f,x)})}}),IE=Object.freeze({__proto__:null,events:function(i,c){return uc([yr(hu(),function(f,x){wp(f,i,c)})])}}),PE=[kl("onOpen"),kl("onClose"),Mr("isPartOf"),Mr("getAttachPoint"),Ti("cloakVisibilityAttr","data-precloak-visibility")],NM=Object.freeze({__proto__:null,init:function(){var i=ku(),c=X("not-implemented");return zu({readState:c,isOpen:i.isSet,clear:i.clear,set:i.set,get:i.get})}}),el=Wc({fields:PE,name:"sandboxing",active:IE,apis:wE,state:NM}),ag=X("dismiss.popups"),Og=X("reposition.popups"),Wy=X("mouse.released"),$y=Rc([Ti("isExtraPart",Pe),yl("fireEventInstead",[Ti("event",Mf())])]),Km=function(i){var c,f=Sr("Dismissal",$y,i);return(c={})[ag()]={schema:Rc([Mr("target")]),onReceive:function(x,F){el.isOpen(x)&&(el.isPartOf(x,F.target)||f.isExtraPart(x,F.target)||f.fireEventInstead.fold(function(){return el.close(x)},function(se){return Cl(x,se.event)}))}},c},LC=Rc([yl("fireEventInstead",[Ti("event",pp())]),Hl("doReposition")]),sg=function(i){var c,f=Sr("Reposition",LC,i);return(c={})[Og()]={onReceive:function(x){el.isOpen(x)&&f.fireEventInstead.fold(function(){return f.doReposition(x)},function(F){return Cl(x,F.event)})}},c},Lg=function(i,c,f){c.store.manager.onLoad(i,c,f)},S0=function(i,c,f){c.store.manager.onUnload(i,c,f)},_f=Object.freeze({__proto__:null,onLoad:Lg,onUnload:S0,setValue:function(i,c,f,x){c.store.manager.setValue(i,c,f,x)},getValue:function(i,c,f){return c.store.manager.getValue(i,c,f)},getState:function(i,c,f){return f}}),ym=Object.freeze({__proto__:null,events:function(i,c){var f=i.resetOnDom?[Va(function(x,F){Lg(x,i,c)}),mp(function(x,F){S0(x,i,c)})]:[Ir(i,c,Lg)];return uc(f)}}),oh=function(){var i=ta(null);return zu({set:i.set,get:i.get,isNotSet:function(){return null===i.get()},clear:function(){i.set(null)},readState:function(){return{mode:"memory",value:i.get()}}})},ah=function(){var i=ta({}),c=ta({});return zu({readState:function(){return{mode:"dataset",dataByValue:i.get(),dataByText:c.get()}},lookup:function(se){return mr(i.get(),se).orThunk(function(){return mr(c.get(),se)})},update:function(se){var Ie=i.get(),ze=c.get(),it={},Mt={};Ct(se,function(kt){it[kt.value]=kt,mr(kt,"meta").each(function(pn){mr(pn,"text").each(function(bn){Mt[bn]=kt})})}),i.set(re(re({},Ie),it)),c.set(re(re({},ze),Mt))},clear:function(){i.set({}),c.set({})}})},Yb=Object.freeze({__proto__:null,memory:oh,dataset:ah,manual:function(){return zu({readState:V})},init:function(i){return i.store.manager.state(i)}}),vv=function(i,c,f,x){var F=c.store;f.update([x]),F.setValue(i,x),c.onSetValue(i,x)},RC=[Es("initialValue"),Mr("getFallbackEntry"),Mr("getDataKey"),Mr("setValue"),$s("manager",{setValue:vv,getValue:function(i,c,f){var x=c.store,F=x.getDataKey(i);return f.lookup(F).getOrThunk(function(){return x.getFallbackEntry(F)})},onLoad:function(i,c,f){c.store.initialValue.each(function(F){vv(i,c,f,F)})},onUnload:function(i,c,f){f.clear()},state:ah})],w0=[Mr("getValue"),Ti("setValue",V),Es("initialValue"),$s("manager",{setValue:function(i,c,f,x){c.store.setValue(i,x),c.onSetValue(i,x)},getValue:function(i,c,f){return c.store.getValue(i)},onLoad:function(i,c,f){c.store.initialValue.each(function(x){c.store.setValue(i,x)})},onUnload:V,state:gp.init})],BM=[Es("initialValue"),$s("manager",{setValue:function(i,c,f,x){f.set(x),c.onSetValue(i,x)},getValue:function(i,c,f){return f.get()},onLoad:function(i,c,f){c.store.initialValue.each(function(x){f.isNotSet()&&f.set(x)})},onUnload:function(i,c,f){f.clear()},state:oh})],UM=[du("store",{mode:"memory"},ms("mode",{memory:BM,manual:w0,dataset:RC})),kl("onSetValue"),Ti("resetOnDom",!1)],Io=Wc({fields:UM,name:"representing",active:ym,apis:_f,extra:{setValueFrom:function(i,c){var f=Io.getValue(c);Io.setValue(i,f)}},state:Yb}),Zu=function(i,c){return eu(i,{},ft(c,function(f){return function(i,c){return Dl(i,i,{tag:"option",process:{}},cs(function(f){return vl_serror("The field: "+i+" is forbidden. "+c)}))}(f.name(),"Cannot configure "+f.name()+" for "+i)}).concat([Yl("dump",ve)]))},lg=function(i){return i.dump},Od=function(i,c){return re(re({},ao(c)),i.dump)},Lh_field=Zu,Lh_augment=Od,OE="placeholder",I0=fc_generate([{single:["required","valueThunk"]},{multiple:["required","valueThunks"]}]),Xv=function(i){return jn(i,"uiType")},LE=function(i,c,f,x){return Xv(f)&&f.uiType===OE?function(i,c,f,x){return i.exists(function(F){return F!==f.owner})?I0.single(!0,X(f)):mr(x,f.name).fold(function(){throw new Error("Unknown placeholder component: "+f.name+"\nKnown: ["+Vn(x)+"]\nNamespace: "+i.getOr("none")+"\nSpec: "+JSON.stringify(f,null,2))},function(F){return F.replace()})}(i,0,f,x):I0.single(!1,X(f))},Ky=function(i,c,f,x){return LE(i,0,f,x).fold(function($,se){var Ie=Xv(f)?se(c,f.config,f.validated):se(c),ze=mr(Ie,"components").getOr([]),it=wi(ze,function(Mt){return Ky(i,c,Mt,x)});return[re(re({},Ie),{components:it})]},function($,se){if(Xv(f)){var Ie=se(c,f.config,f.validated);return f.validated.preprocess.getOr(ve)(Ie)}return se(c)})},rx=function(i,c,f,x){var F=vn(x,function(se,Ie){return function(i,c){var f=!1;return{name:X(i),required:function(){return c.fold(function(se,Ie){return se},function(se,Ie){return se})},used:function(){return f},replace:function(){if(f)throw new Error("Trying to use the same placeholder more than once: "+i);return f=!0,c}}}(Ie,se)}),$=function(i,c,f,x){return wi(f,function(F){return Ky(i,c,F,x)})}(i,c,f,F);return An(F,function(se){if(!1===se.used()&&se.required())throw new Error("Placeholder: "+se.name()+" was not found in components list\nNamespace: "+i.getOr("none")+"\nComponents: "+JSON.stringify(c.components,null,2))}),$},P0=I0.single,ox=I0.multiple,rt=X(OE),ey=fc_generate([{required:["data"]},{external:["data"]},{optional:["data"]},{group:["data"]}]),bv=Ti("factory",{sketch:ve}),Vb=Ti("schema",[]),D1=Mr("name"),RE=Dl("pname","pname",Ca(function(i){return"<alloy."+jo(i.name)+">"}),yc()),zM=Yl("schema",function(){return[Es("preprocess")]}),Ru=Ti("defaults",X({})),NC=Ti("overrides",X({})),S1=Go([bv,Vb,D1,RE,Ru,NC]),Jy=Go([bv,Vb,D1,Ru,NC]),Qy=Go([bv,Vb,D1,RE,Ru,NC]),A1=Go([bv,zM,D1,Mr("unit"),RE,Ru,NC]),qy=function(i){return i.fold(j.some,j.none,j.some,j.some)},Zb=function(i){var c=function(f){return f.name};return i.fold(c,c,c,c)},ty=function(i,c){return function(f){var x=Sr("Converting part type",c,f);return i(x)}},tp=ty(ey.required,S1),kg=ty(ey.external,Jy),Rg=ty(ey.optional,Qy),w1=ty(ey.group,A1),Cv=X("entirety"),I1=Object.freeze({__proto__:null,required:tp,external:kg,optional:Rg,group:w1,asNamedPart:qy,name:Zb,asCommon:function(i){return i.fold(ve,ve,ve,ve)},original:Cv}),Fg=function(i,c,f,x){return nr(c.defaults(i,f,x),f,{uid:i.partUids[c.name]},c.overrides(i,f,x))},BC=function(i,c){var f={};return Ct(c,function(x){qy(x).each(function(F){var $=L0(i,F.pname);f[F.name]=function(se){var Ie=Sr("Part: "+F.name+" in "+i,Go(F.schema),se);return re(re({},$),{config:se,validated:Ie})}})}),f},L0=function(i,c){return{uiType:rt(),owner:i,name:c}},FE=function(i,c,f){return{uiType:rt(),owner:i,name:c,config:f,validated:{}}},P1=function(i){return wi(i,function(c){return c.fold(j.none,j.some,j.none,j.none).map(function(f){return qu(f.name,f.schema.concat([$h(Cv())]))}).toArray()})},ax=function(i){return ft(i,Zb)},O1=function(i,c,f){return function(i,c,f){var x={},F={};return Ct(f,function($){$.fold(function(se){x[se.pname]=P0(!0,function(Ie,ze,it){return se.factory.sketch(Fg(Ie,se,ze,it))})},function(se){var Ie=c.parts[se.name];F[se.name]=X(se.factory.sketch(Fg(c,se,Ie[Cv()]),Ie))},function(se){x[se.pname]=P0(!1,function(Ie,ze,it){return se.factory.sketch(Fg(Ie,se,ze,it))})},function(se){x[se.pname]=ox(!0,function(Ie,ze,it){var Mt=Ie[se.name];return ft(Mt,function(kt){return se.factory.sketch(nr(se.defaults(Ie,kt,it),kt,se.overrides(Ie,kt)))})})})}),{internals:X(x),externals:X(F)}}(0,c,f)},L1=function(i,c,f){return rx(j.some(i),c,c.components,f)},qc=function(i,c,f){var x=c.partUids[f];return i.getSystem().getByUid(x).toOptional()},sh=function(i,c,f){return qc(i,c,f).getOrDie("Could not find part: "+f)},eb=function(i,c,f){var x={},F=c.partUids,$=i.getSystem();return Ct(f,function(se){x[se]=X($.getByUid(F[se]))}),x},k1=function(i,c){var f=i.getSystem();return vn(c.partUids,function(x,F){return X(f.getByUid(x))})},YM=function(i){return Vn(i.partUids)},ny=function(i,c,f){var x={},F=c.partUids,$=i.getSystem();return Ct(f,function(se){x[se]=X($.getByUid(F[se]).getOrDie())}),x},NE=function(i,c){var f=ax(c);return vs(ft(f,function(x){return{key:x,value:i+"-"+x}}))},tb=function(i){return Dl("partUids","partUids",ul(function(c){return NE(c.uid,i)}),yc())},Ua=Object.freeze({__proto__:null,generate:BC,generateOne:FE,schemas:P1,names:ax,substitutes:O1,components:L1,defaultUids:NE,defaultUidsSchema:tb,getAllParts:k1,getAllPartNames:YM,getPart:qc,getPartOrDie:sh,getParts:eb,getPartsOrDie:ny}),lh=function(i,c,f,x,F){var $=function(i,c){return(i.length>0?[qu("parts",i)]:[]).concat([Mr("uid"),Ti("dom",{}),Ti("components",[]),$h("originalSpec"),Ti("debug.sketcher",{})]).concat(c)}(x,F);return Sr(i+" [SpecSchema]",Rc($.concat(c)),f)},R1=function(i,c,f,x,F){var $=BE(F),se=P1(f),Ie=tb(f),ze=lh(i,c,$,se,[Ie]),it=O1(0,ze,f);return x(ze,L1(i,ze,it.internals()),$,it.externals())},BE=function(i){return function(i){return jn(i,"uid")}(i)?i:re(re({},i),{uid:yh("uid")})},N_=Rc([Mr("name"),Mr("factory"),Mr("configFields"),Ti("apis",{}),Ti("extraApis",{})]),UE=Rc([Mr("name"),Mr("factory"),Mr("configFields"),Mr("partFields"),Ti("apis",{}),Ti("extraApis",{})]),ch=function(i){var c=Sr("Sketcher for "+i.name,N_,i),x=vn(c.apis,zs),F=vn(c.extraApis,function($,se){return gg($,se)});return re(re({name:c.name,configFields:c.configFields,sketch:function($){return function(i,c,f,x){var F=BE(x);return f(lh(i,c,F,[],[]),F)}(c.name,c.configFields,c.factory,$)}},x),F)},qm=function(i){var c=Sr("Sketcher for "+i.name,UE,i),x=BC(c.name,c.partFields),F=vn(c.apis,zs),$=vn(c.extraApis,function(se,Ie){return gg(se,Ie)});return re(re({name:c.name,partFields:c.partFields,configFields:c.configFields,sketch:function(se){return R1(c.name,c.configFields,c.partFields,c.factory,se)},parts:x},F),$)},B_=function(i){return"input"===Ft(i)&&"radio"!==Xt(i,"type")||"textarea"===Ft(i)},HM=Object.freeze({__proto__:null,getCurrent:function(i,c,f){return c.find(i)}}),F1=[Mr("find")],Ml=Wc({fields:F1,name:"composing",apis:HM}),UC=["input","button","textarea","select"],Gb=function(i,c,f){(c.disabled()?B1:Wb)(i,c)},N1=function(i,c){return!0===c.useNative&&Ve(UC,Ft(i.element))},Ev=function(i){De(i.element,"disabled","disabled")},iy=function(i){Fe(i.element,"disabled")},ID=function(i){De(i.element,"aria-disabled","true")},lx=function(i){De(i.element,"aria-disabled","false")},B1=function(i,c,f){c.disableClass.each(function(F){Qc(i.element,F)}),(N1(i,c)?Ev:ID)(i),c.onDisabled(i)},Wb=function(i,c,f){c.disableClass.each(function(F){wc(i.element,F)}),(N1(i,c)?iy:lx)(i),c.onEnabled(i)},zE=function(i,c){return N1(i,c)?function(i){return Kt(i.element,"disabled")}(i):function(i){return"true"===Xt(i.element,"aria-disabled")}(i)},U1=Object.freeze({__proto__:null,enable:Wb,disable:B1,isDisabled:zE,onLoad:Gb,set:function(i,c,f,x){(x?B1:Wb)(i,c)}}),ib=Object.freeze({__proto__:null,exhibit:function(i,c){return Dd({classes:c.disabled()?c.disableClass.toArray():[]})},events:function(i,c){return uc([vh(dd(),function(f,x){return zE(f,i)}),Ir(i,c,Gb)])}}),$b=[Sl("disabled",Pe),Ti("useNative",!0),Es("disableClass"),kl("onDisabled"),kl("onEnabled")],Aa=Wc({fields:$b,name:"disabling",active:ib,apis:U1}),z1=function(i,c,f,x){var F=Ap(i.element,"."+c.highlightClass);Ct(F,function($){tt(x,function(se){return se.element===$})||(wc($,c.highlightClass),i.getSystem().getByDom($).each(function(se){c.onDehighlight(i,se),Cl(se,um())}))})},Mv=function(i,c,f,x){z1(i,c,0,[x]),jb(i,c,f,x)||(Qc(x.element,c.highlightClass),c.onHighlight(i,x),Cl(x,cm()))},jb=function(i,c,f,x){return Ep(x.element,c.highlightClass)},GM=function(i,c,f,x){var F=Ap(i.element,"."+c.itemClass);return j.from(F[x]).fold(function(){return ra.error(new Error("No element found with index "+x))},i.getSystem().getByDom)},Z1=function(i,c,f){return Fc(i.element,"."+c.itemClass).bind(function(x){return i.getSystem().getByDom(x).toOptional()})},ay=function(i,c,f){var x=Ap(i.element,"."+c.itemClass);return(x.length>0?j.some(x[x.length-1]):j.none()).bind(function($){return i.getSystem().getByDom($).toOptional()})},HE=function(i,c,f,x){var F=Ap(i.element,"."+c.itemClass);return Gi(F,function(se){return Ep(se,c.highlightClass)}).bind(function(se){var Ie=iu(se,x,0,F.length-1);return i.getSystem().getByDom(F[Ie]).toOptional()})},Ng=function(i,c,f){var x=Ap(i.element,"."+c.itemClass);return Ni(ft(x,function(F){return i.getSystem().getByDom(F).toOptional()}))},cg=Object.freeze({__proto__:null,dehighlightAll:function(i,c,f){return z1(i,c,0,[])},dehighlight:function(i,c,f,x){jb(i,c,f,x)&&(wc(x.element,c.highlightClass),c.onDehighlight(i,x),Cl(x,um()))},highlight:Mv,highlightFirst:function(i,c,f){Z1(i,c).each(function(x){Mv(i,c,f,x)})},highlightLast:function(i,c,f){ay(i,c).each(function(x){Mv(i,c,f,x)})},highlightAt:function(i,c,f,x){GM(i,c,f,x).fold(function(F){throw F},function(F){Mv(i,c,f,F)})},highlightBy:function(i,c,f,x){var F=Ng(i,c);vi(F,x).each(function(se){Mv(i,c,f,se)})},isHighlighted:jb,getHighlighted:function(i,c,f){return Fc(i.element,"."+c.highlightClass).bind(function(x){return i.getSystem().getByDom(x).toOptional()})},getFirst:Z1,getLast:ay,getPrevious:function(i,c,f){return HE(i,c,0,-1)},getNext:function(i,c,f){return HE(i,c,0,1)},getCandidates:Ng}),xv=[Mr("highlightClass"),Mr("itemClass"),kl("onHighlight"),kl("onDehighlight")],Jl=Wc({fields:xv,name:"highlighting",apis:cg}),Kb=[8],H=[9],s=[13],d=[27],k=[32],ie=[37],ot=[38],Cn=[39],ir=[40],Yo=function(i,c,f){var x=kn(i.slice(0,c)),F=kn(i.slice(c+1));return vi(x.concat(F),f)},tl=function(i,c,f){var x=kn(i.slice(0,c));return vi(x,f)},bc=function(i,c,f){var x=i.slice(0,c),F=i.slice(c+1);return vi(F.concat(x),f)},np=function(i,c,f){var x=i.slice(c+1);return vi(x,f)},Ss=function(i){return function(c){var f=c.raw;return Ve(i,f.which)}},Xm=function(i){return function(c){return Bn(i,function(f){return f(c)})}},Du=function(i){return!0===i.raw.shiftKey},HC=function(i){return!0===i.raw.ctrlKey},sy=ne(Du),Tl=function(i,c){return{matches:i,classification:c}},$M=function(i,c,f){c.exists(function(F){return f.exists(function($){return tn($,F)})})||Sa(i,b_(),{prevFocus:c,newFocus:f})},ob=function(){var i=function(f){return dc(f.element)};return{get:i,set:function(f,x){var F=i(f);f.getSystem().triggerFocus(x,f.element);var $=i(f);$M(f,F,$)}}},Jb=function(){var i=function(f){return Jl.getHighlighted(f).map(function(x){return x.element})};return{get:i,set:function(f,x){var F=i(f);f.getSystem().getByDom(x).fold(V,function(se){Jl.highlight(f,se)});var $=i(f);$M(f,F,$)}}};!function(i){i.OnFocusMode="onFocus",i.OnEnterOrSpaceMode="onEnterOrSpace",i.OnApiMode="onApi"}(ip||(ip={}));var uh=function(i,c,f,x,F){var se=function(it,Mt,kt,pn,bn){return function(i,c){return vi(i,function(x){return x.matches(c)}).map(function(x){return x.classification})}(kt(it,Mt,pn,bn),Mt.event).bind(function(di){return di(it,Mt,pn,bn)})},ze={schema:function(){return i.concat([Ti("focusManager",ob()),du("focusInside","onFocus",xt(function(it){return Ve(["onFocus","onEnterOrSpace","onApi"],it)?ra.value(it):ra.error("Invalid value for focusInside")})),$s("handler",ze),$s("state",c),$s("sendFocusIn",F)])},processKey:se,toEvents:function(it,Mt){var kt=it.focusInside!==ip.OnFocusMode?j.none():F(it).map(function(Un){return yr(Xl(),function(di,Ui){Un(di,it,Mt),Ui.stop()})}),bn=[yr(Dm(),function(Un,di){se(Un,di,f,it,Mt).fold(function(){!function(Un,di){var Ui=Ss(k.concat(s))(di.event);it.focusInside===ip.OnEnterOrSpaceMode&&Ui&&Ce(Un,di)&&F(it).each(function(ri){ri(Un,it,Mt),di.stop()})}(Un,di)},function(Ui){di.stop()})}),yr(rc(),function(Un,di){se(Un,di,x,it,Mt).each(function(Ui){di.stop()})})];return uc(kt.toArray().concat(bn))}};return ze},Qb=function(i){var c=[Es("onEscape"),Es("onEnter"),Ti("selector",'[data-alloy-tabstop="true"]:not(:disabled)'),Ti("firstTabstop",0),Ti("useTabstopAt",xe),Es("visibilitySelector")].concat([i]),f=function(di,Ui){var ri=di.visibilitySelector.bind(function(Yi){return gd(Ui,Yi)}).getOr(Ui);return hl(ri)>0},se=function(di,Ui,ri){(function(di,Ui){var ri=Ap(di.element,Ui.selector),Yi=st(ri,function(Or){return f(Ui,Or)});return j.from(Yi[Ui.firstTabstop])})(di,Ui).each(function(Yi){Ui.focusManager.set(di,Yi)})},Ie=function(di,Ui,ri,Yi,Or){return Or(Ui,ri,function(Pr){return function(di,Ui){return f(di,Ui)&&di.useTabstopAt(Ui)}(Yi,Pr)}).fold(function(){return Yi.cyclic?j.some(!0):j.none()},function(Pr){return Yi.focusManager.set(di,Pr),j.some(!0)})},ze=function(di,Ui,ri,Yi){var Or=Ap(di.element,ri.selector);return function(di,Ui){return Ui.focusManager.get(di).bind(function(ri){return gd(ri,Ui.selector)})}(di,ri).bind(function(Pr){return Gi(Or,ge(tn,Pr)).bind(function(hr){return Ie(di,Or,hr,ri,Yi)})})},bn=X([Tl(Xm([Du,Ss(H)]),function(di,Ui,ri){var Yi=ri.cyclic?Yo:tl;return ze(di,0,ri,Yi)}),Tl(Ss(H),function(di,Ui,ri){var Yi=ri.cyclic?bc:np;return ze(di,0,ri,Yi)}),Tl(Ss(d),function(di,Ui,ri){return ri.onEscape.bind(function(Yi){return Yi(di,Ui)})}),Tl(Xm([sy,Ss(s)]),function(di,Ui,ri){return ri.onEnter.bind(function(Yi){return Yi(di,Ui)})})]),Un=X([]);return uh(c,gp.init,bn,Un,function(){return j.some(se)})},F0=Qb(Yl("cyclic",Pe)),jM=Qb(Yl("cyclic",xe)),VE=function(i,c,f){return B_(f)&&Ss(k)(c.event)?j.none():function(i,c,f){return Sm(i,f,dd()),j.some(!0)}(i,0,f)},G1=function(i,c){return j.some(!0)},cx=[Ti("execute",VE),Ti("useSpace",!1),Ti("useEnter",!0),Ti("useControlEnter",!1),Ti("useDown",!1)],KM=function(i,c,f){return f.execute(i,c,i.element)},GE=uh(cx,gp.init,function(i,c,f,x){var F=f.useSpace&&!B_(i.element)?k:[],$=f.useEnter?s:[],se=f.useDown?ir:[],Ie=F.concat($).concat(se);return[Tl(Ss(Ie),KM)].concat(f.useControlEnter?[Tl(Xm([HC,Ss(s)]),KM)]:[])},function(i,c,f,x){return f.useSpace&&!B_(i.element)?[Tl(Ss(k),G1)]:[]},function(){return j.none()}),JM=function(){var i=ku();return zu({readState:function(){return i.get().map(function(F){return{numRows:String(F.numRows),numColumns:String(F.numColumns)}}).getOr({numRows:"?",numColumns:"?"})},setGridSize:function(F,$){i.set({numRows:F,numColumns:$})},getNumRows:function(){return i.get().map(function(F){return F.numRows})},getNumColumns:function(){return i.get().map(function(F){return F.numColumns})}})},OD=Object.freeze({__proto__:null,flatgrid:JM,init:function(i){return i.state(i)}}),ux=function(i){return function(c,f,x,F){var $=i(c.element);return px($,c,f,x,F)}},N0=function(i,c){var f=Pb(i,c);return ux(f)},QM=function(i,c){var f=Pb(c,i);return ux(f)},dx=function(i){return function(c,f,x,F){return px(i,c,f,x,F)}},px=function(i,c,f,x,F){return x.focusManager.get(c).bind(function(se){return i(c.element,se,x,F)}).map(function(se){return x.focusManager.set(c,se),!0})},mx=dx,ly=dx,B0=dx,WE=function(i){return!function(i){return i.offsetWidth<=0&&i.offsetHeight<=0}(i.dom)},qM=function(i,c,f){var F=Ap(i,f);return function(i,c){return Gi(i,c).map(function(f){return{index:f,candidates:i}})}(st(F,WE),function(se){return tn(se,c)})},LD=function(i,c){return Gi(i,function(f){return tn(c,f)})},$E=function(i,c,f,x){return x(Math.floor(c/f),c%f).bind(function(se){var Ie=se.row*f+se.column;return Ie>=0&&Ie<i.length?j.some(i[Ie]):j.none()})},kD=function(i,c,f,x,F){return $E(i,c,x,function($,se){var ze=$===f-1?i.length-$*x:x,it=iu(se,F,0,ze-1);return j.some({row:$,column:it})})},fx=function(i,c,f,x,F){return $E(i,c,x,function($,se){var Ie=iu($,F,0,f-1),it=Ie===f-1?i.length-Ie*x:x,Mt=xp(se,0,it-1);return j.some({row:Ie,column:Mt})})},wS=[Mr("selector"),Ti("execute",VE),Gc("onEscape"),Ti("captureTab",!1),av()],jA=function(i,c,f){Fc(i.element,c.selector).each(function(x){c.focusManager.set(i,x)})},ab=function(i){return function(c,f,x,F){return qM(c,f,x.selector).bind(function($){return i($.candidates,$.index,F.getNumRows().getOr(x.initSize.numRows),F.getNumColumns().getOr(x.initSize.numColumns))})}},PS=function(i,c,f){return f.captureTab?j.some(!0):j.none()},K1=ab(function(i,c,f,x){return kD(i,c,f,x,-1)}),hx=ab(function(i,c,f,x){return kD(i,c,f,x,1)}),gx=ab(function(i,c,f,x){return fx(i,c,f,x,-1)}),tT=ab(function(i,c,f,x){return fx(i,c,f,x,1)}),_x=X([Tl(Ss(ie),N0(K1,hx)),Tl(Ss(Cn),QM(K1,hx)),Tl(Ss(ot),mx(gx)),Tl(Ss(ir),ly(tT)),Tl(Xm([Du,Ss(H)]),PS),Tl(Xm([sy,Ss(H)]),PS),Tl(Ss(d),function(i,c,f){return f.onEscape(i,c)}),Tl(Ss(k.concat(s)),function(i,c,f,x){return function(i,c){return c.focusManager.get(i).bind(function(f){return gd(f,c.selector)})}(i,f).bind(function(F){return f.execute(i,c,F)})})]),jE=X([Tl(Ss(k),G1)]),LS=uh(wS,JM,_x,jE,function(){return j.some(jA)}),nT=function(i,c,f,x){var $=function(se,Ie,ze){var it=iu(Ie,x,0,ze.length-1);return it===se?j.none():function(se){return"button"===Ft(se)&&"disabled"===Xt(se,"disabled")}(ze[it])?$(se,it,ze):j.from(ze[it])};return qM(i,f,c).bind(function(se){var Ie=se.index,ze=se.candidates;return $(Ie,Ie,ze)})},kS=[Mr("selector"),Ti("getInitial",j.none),Ti("execute",VE),Gc("onEscape"),Ti("executeOnMove",!1),Ti("allowVertical",!0)],iT=function(i,c,f){return function(i,c){return c.focusManager.get(i).bind(function(f){return gd(f,c.selector)})}(i,f).bind(function(x){return f.execute(i,c,x)})},U0=function(i,c,f){c.getInitial(i).orThunk(function(){return Fc(i.element,c.selector)}).each(function(x){c.focusManager.set(i,x)})},a_=function(i,c,f){return nT(i,f.selector,c,-1)},J1=function(i,c,f){return nT(i,f.selector,c,1)},dh=function(i){return function(c,f,x,F){return i(c,f,x,F).bind(function(){return x.executeOnMove?iT(c,f,x):j.some(!0)})}},rT=function(i,c,f){return f.onEscape(i,c)},ND=X([Tl(Ss(k),G1)]),aT=uh(kS,gp.init,function(i,c,f,x){var F=ie.concat(f.allowVertical?ot:[]),$=Cn.concat(f.allowVertical?ir:[]);return[Tl(Ss(F),dh(N0(a_,J1))),Tl(Ss($),dh(QM(a_,J1))),Tl(Ss(s),iT),Tl(Ss(k),iT),Tl(Ss(d),rT)]},ND,function(){return j.some(U0)}),yx=function(i,c,f){return j.from(i[c]).bind(function(x){return j.from(x[f]).map(function(F){return{rowIndex:c,columnIndex:f,cell:F}})})},bx=function(i,c,f,x){var $=i[c].length,se=iu(f,x,0,$-1);return yx(i,c,se)},Q1=function(i,c,f,x){var F=iu(f,x,0,i.length-1),$=i[F].length,se=xp(c,0,$-1);return yx(i,F,se)},Cx=function(i,c,f,x){var $=i[c].length,se=xp(f+x,0,$-1);return yx(i,c,se)},sT=function(i,c,f,x){var F=xp(f+x,0,i.length-1),$=i[F].length,se=xp(c,0,$-1);return yx(i,F,se)},BD=[qu("selectors",[Mr("row"),Mr("cell")]),Ti("cycles",!0),Ti("previousSelector",j.none),Ti("execute",VE)],VC=function(i,c,f){c.previousSelector(i).orThunk(function(){var F=c.selectors;return Fc(i.element,F.cell)}).each(function(F){c.focusManager.set(i,F)})},cb=function(i,c){return function(f,x,F){var $=F.cycles?i:c;return gd(x,F.selectors.row).bind(function(se){var Ie=Ap(se,F.selectors.cell);return LD(Ie,x).bind(function(ze){var it=Ap(f,F.selectors.row);return LD(it,se).bind(function(Mt){var kt=function(i,c){return ft(i,function(f){return Ap(f,c.selectors.cell)})}(it,F);return $(kt,Mt,ze).map(function(pn){return pn.cell})})})})}},UD=cb(function(i,c,f){return bx(i,c,f,-1)},function(i,c,f){return Cx(i,c,f,-1)}),Tx=cb(function(i,c,f){return bx(i,c,f,1)},function(i,c,f){return Cx(i,c,f,1)}),zD=cb(function(i,c,f){return Q1(i,f,c,-1)},function(i,c,f){return sT(i,f,c,-1)}),vd=cb(function(i,c,f){return Q1(i,f,c,1)},function(i,c,f){return sT(i,f,c,1)}),H0=X([Tl(Ss(ie),N0(UD,Tx)),Tl(Ss(Cn),QM(UD,Tx)),Tl(Ss(ot),mx(zD)),Tl(Ss(ir),ly(vd)),Tl(Ss(k.concat(s)),function(i,c,f){return dc(i.element).bind(function(x){return f.execute(i,c,x)})})]),xx=X([Tl(Ss(k),G1)]),lT=uh(BD,gp.init,H0,xx,function(){return j.some(VC)}),JE=[Mr("selector"),Ti("execute",VE),Ti("moveOnTab",!1)],cy=function(i,c,f){return f.focusManager.get(i).bind(function(x){return f.execute(i,c,x)})},QE=function(i,c,f){Fc(i.element,c.selector).each(function(x){c.focusManager.set(i,x)})},ub=function(i,c,f){return nT(i,f.selector,c,-1)},qE=function(i,c,f){return nT(i,f.selector,c,1)},BS=X([Tl(Ss(ot),B0(ub)),Tl(Ss(ir),B0(qE)),Tl(Xm([Du,Ss(H)]),function(i,c,f,x){return f.moveOnTab?B0(ub)(i,c,f,x):j.none()}),Tl(Xm([sy,Ss(H)]),function(i,c,f,x){return f.moveOnTab?B0(qE)(i,c,f,x):j.none()}),Tl(Ss(s),cy),Tl(Ss(k),cy)]),ZC=X([Tl(Ss(k),G1)]),cT=uh(JE,gp.init,BS,ZC,function(){return j.some(QE)}),uT=[Gc("onSpace"),Gc("onEnter"),Gc("onShiftEnter"),Gc("onLeft"),Gc("onRight"),Gc("onTab"),Gc("onShiftTab"),Gc("onUp"),Gc("onDown"),Gc("onEscape"),Ti("stopSpaceKeyup",!1),Es("focusIn")],uy=uh(uT,gp.init,function(i,c,f){return[Tl(Ss(k),f.onSpace),Tl(Xm([sy,Ss(s)]),f.onEnter),Tl(Xm([Du,Ss(s)]),f.onShiftEnter),Tl(Xm([Du,Ss(H)]),f.onShiftTab),Tl(Xm([sy,Ss(H)]),f.onTab),Tl(Ss(ot),f.onUp),Tl(Ss(ir),f.onDown),Tl(Ss(ie),f.onLeft),Tl(Ss(Cn),f.onRight),Tl(Ss(k),f.onSpace),Tl(Ss(d),f.onEscape)]},function(i,c,f){return f.stopSpaceKeyup?[Tl(Ss(k),G1)]:[]},function(i){return i.focusIn}),Xb=F0.schema(),YD=jM.schema(),q1=aT.schema(),KA=LS.schema(),vf=lT.schema(),dy=GE.schema(),Ip=cT.schema(),GC=uy.schema(),Za=Ah({branchKey:"mode",branches:Object.freeze({__proto__:null,acyclic:Xb,cyclic:YD,flow:q1,flatgrid:KA,matrix:vf,execution:dy,menu:Ip,special:GC}),name:"keying",active:{events:function(i,c){return i.handler.toEvents(i,c)}},apis:{focusIn:function(i,c,f){c.sendFocusIn(c).fold(function(){i.getSystem().triggerFocus(i.element,i.element)},function(x){x(i,c,f)})},setGridSize:function(i,c,f,x,F){!function(i){return ct(i,"setGridSize")}(f)?console.error("Layout does not support setGridSize"):f.setGridSize(x,F)}},state:OD}),py=function(i,c,f,x){var F=i.getSystem().build(x);pa(i,F,f)},ef=function(i,c,f,x){var F=my(i);vi(F,function(se){return tn(x.element,se.element)}).each(xs)},my=function(i,c){return i.components()},db=function(i,c,f,x,F){var $=my(i);return j.from($[x]).map(function(se){return ef(i,0,0,se),F.each(function(Ie){py(i,0,function(ze,it){!function(i,c,f){We(i,f).fold(function(){oo(i,c)},function(x){Dr(x,c)})}(ze,it,x)},Ie)}),se})},HD=Object.freeze({__proto__:null,append:function(i,c,f,x){py(i,0,oo,x)},prepend:function(i,c,f,x){py(i,0,Qo,x)},remove:ef,replaceAt:db,replaceBy:function(i,c,f,x,F){var $=my(i);return Gi($,x).bind(function(se){return db(i,0,0,se,F)})},set:function(i,c,f,x){MC(function(){var F=ft(x,i.getSystem().build);uo(i,F)},i.element)},contents:my}),ys=Wc({fields:[],name:"replacing",apis:HD}),bs=function(i,c){var f=function(i,c){var f=uc(c);return Wc({fields:[Mr("enabled")],name:i,active:{events:X(f)}})}(i,c);return{key:i,value:{config:{},me:f,configAsRaw:X({}),initialConfig:{},state:gp}}},tM=function(i,c){c.ignore||(Xd(i.element),c.onFocus(i))},Dx=Object.freeze({__proto__:null,focus:tM,blur:function(i,c){c.ignore||function(i){i.dom.blur()}(i.element)},isFocused:function(i){return wy(i.element)}}),mT=Object.freeze({__proto__:null,exhibit:function(i,c){var f=c.ignore?{}:{attributes:{tabindex:"-1"}};return Dd(f)},events:function(i){return uc([yr(Xl(),function(c,f){tM(c,i),f.stop()})].concat(i.stopMousedown?[yr(mu(),function(c,f){f.event.prevent()})]:[]))}}),Gu=[kl("onFocus"),Ti("stopMousedown",!1),Ti("ignore",!1)],ka=Wc({fields:Gu,name:"focusing",active:mT,apis:Dx}),fy=function(i,c,f){var x=c.aria;x.update(i,x,f.get())},G0=function(i,c,f){c.toggleClass.each(function(x){f.get()?Qc(i.element,x):wc(i.element,x)})},ug=function(i,c,f){Bg(i,c,f,!f.get())},oc=function(i,c,f){f.set(!0),G0(i,c,f),fy(i,c,f)},Sx=function(i,c,f){f.set(!1),G0(i,c,f),fy(i,c,f)},Bg=function(i,c,f,x){(x?oc:Sx)(i,c,f)},pb=function(i,c,f){Bg(i,c,f,c.selected)},ZD=Object.freeze({__proto__:null,onLoad:pb,toggle:ug,isOn:function(i,c,f){return f.get()},on:oc,off:Sx,set:Bg}),s_=Object.freeze({__proto__:null,exhibit:function(){return Dd({})},events:function(i,c){var f=function(i,c,f){return Wp(function(x){f(x,i,c)})}(i,c,ug),x=Ir(i,c,pb);return uc(mi([i.toggleOnExecute?[f]:[],[x]]))}}),hT=function(i,c,f){De(i.element,"aria-expanded",f)},gT=[Ti("selected",!1),Es("toggleClass"),Ti("toggleOnExecute",!0),du("aria",{mode:"none"},ms("mode",{pressed:[Ti("syncWithExpanded",!1),$s("update",function(i,c,f){De(i.element,"aria-pressed",f),c.syncWithExpanded&&hT(i,c,f)})],checked:[$s("update",function(i,c,f){De(i.element,"aria-checked",f)})],expanded:[$s("update",hT)],selected:[$s("update",function(i,c,f){De(i.element,"aria-selected",f)})],none:[$s("update",V)]}))],fl=Wc({fields:gT,name:"toggling",active:s_,apis:ZD,state:function(i){return{init:function(){var f=ta(i);return{get:function(){return f.get()},set:function(Ie){return f.set(Ie)},clear:function(){return f.set(i)},readState:function(){return f.get()}}}}}(!1)}),_T=function(){var i=function(c,f){f.stop(),pd(c)};return[yr(Td(),i),yr(up(),i),rf(tu()),rf(mu())]},oM=function(i){return uc(mi([i.map(function(f){return Wp(function(x,F){f(x),F.stop()})}).toArray(),_T()]))},$C="alloy.item-hover",vT="alloy.item-focus",Ix=function(i){(dc(i.element).isNone()||ka.isFocused(i))&&(ka.isFocused(i)||ka.focus(i),Sa(i,$C,{item:i}))},W0=function(i){Sa(i,vT,{item:i})},aM=X($C),yT=X(vT),US=[Mr("data"),Mr("components"),Mr("dom"),Ti("hasSubmenu",!1),Es("toggling"),Lh_field("itemBehaviours",[fl,ka,Za,Io]),Ti("ignoreFocus",!1),Ti("domModification",{}),$s("builder",function(i){return{dom:i.dom,domModification:re(re({},i.domModification),{attributes:re(re(re({role:i.toggling.isSome()?"menuitemcheckbox":"menuitem"},i.domModification.attributes),{"aria-haspopup":i.hasSubmenu}),i.hasSubmenu?{"aria-expanded":!1}:{})}),behaviours:Lh_augment(i.itemBehaviours,[i.toggling.fold(fl.revoke,function(c){return fl.config(re({aria:{mode:"checked"}},c))}),ka.config({ignore:i.ignoreFocus,stopMousedown:i.ignoreFocus,onFocus:function(c){W0(c)}}),Za.config({mode:"execution"}),Io.config({store:{mode:"memory",initialValue:i.data}}),bs("item-type-events",me(me([],_T(),!0),[yr(ds(),Ix),yr(fu(),ka.focus)],!1))]),components:i.components,eventOrder:i.eventOrder}}),Ti("eventOrder",{})],CT=[Mr("dom"),Mr("components"),$s("builder",function(i){return{dom:i.dom,components:i.components,events:uc([E_(fu())])}})],$0=X("item-widget"),ET=X([tp({name:"widget",overrides:function(i){return{behaviours:ao([Io.config({store:{mode:"manual",getValue:function(c){return i.data},setValue:V}})])}}})]),lM=[Mr("uid"),Mr("data"),Mr("components"),Mr("dom"),Ti("autofocus",!1),Ti("ignoreFocus",!1),Lh_field("widgetBehaviours",[Io,ka,Za]),Ti("domModification",{}),tb(ET()),$s("builder",function(i){var c=O1($0(),i,ET()),f=L1($0(),i,c.internals()),x=function($){return qc($,i,"widget").map(function(se){return Za.focusIn(se),se})},F=function($,se){return B_(se.event.target)||i.autofocus&&se.setSource($.element),j.none()};return{dom:i.dom,components:f,domModification:i.domModification,events:uc([Wp(function($,se){x($).each(function(Ie){se.stop()})}),yr(ds(),Ix),yr(fu(),function($,se){i.autofocus?x($):ka.focus($)})]),behaviours:Lh_augment(i.widgetBehaviours,[Io.config({store:{mode:"memory",initialValue:i.data}}),ka.config({ignore:i.ignoreFocus,onFocus:function($){W0($)}}),Za.config({mode:"special",focusIn:i.autofocus?function($){x($)}:CC(),onLeft:F,onRight:F,onEscape:function($,se){return ka.isFocused($)||i.autofocus?(i.autofocus&&se.setSource($.element),j.none()):(ka.focus($),j.some(!0))}})])}})],JA=ms("type",{widget:lM,item:US,separator:CT}),eE=X([w1({factory:{sketch:function(i){var c=Sr("menu.spec item",JA,i);return c.builder(c)}},name:"items",unit:"item",defaults:function(i,c){return jn(c,"uid")?c:re(re({},c),{uid:yh("item")})},overrides:function(i,c){return{type:c.type,ignoreFocus:i.fakeFocus,domModification:{classes:[i.markers.item]}}}})]),QA=X([Mr("value"),Mr("items"),Mr("dom"),Mr("components"),Ti("eventOrder",{}),Zu("menuBehaviours",[Jl,Io,Ml,Za]),du("movement",{mode:"menu",moveOnTab:!0},ms("mode",{grid:[av(),$s("config",function(i,c){return{mode:"flatgrid",selector:"."+i.markers.item,initSize:{numColumns:c.initSize.numColumns,numRows:c.initSize.numRows},focusManager:i.focusManager}})],matrix:[$s("config",function(i,c){return{mode:"matrix",selectors:{row:c.rowSelector,cell:"."+i.markers.item},focusManager:i.focusManager}}),Mr("rowSelector")],menu:[Ti("moveOnTab",!0),$s("config",function(i,c){return{mode:"menu",selector:"."+i.markers.item,moveOnTab:c.moveOnTab,focusManager:i.focusManager}})]})),sl("markers",Mg()),Ti("fakeFocus",!1),Ti("focusManager",ob()),kl("onHighlight")]),MT=X("alloy.menu-focus"),j0=qm({name:"Menu",configFields:QA(),partFields:eE(),factory:function(i,c,f,x){return{uid:i.uid,dom:i.dom,markers:i.markers,behaviours:Od(i.menuBehaviours,[Jl.config({highlightClass:i.markers.selectedItem,itemClass:i.markers.item,onHighlight:i.onHighlight}),Io.config({store:{mode:"memory",initialValue:i.value}}),Ml.config({find:j.some}),Za.config(i.movement.config(i,i.movement))]),events:uc([yr(yT(),function(F,$){var se=$.event;F.getSystem().getByDom(se.target).each(function(Ie){Jl.highlight(F,Ie),$.stop(),Sa(F,MT(),{menu:F,item:Ie})})}),yr(aM(),function(F,$){var se=$.event.item;Jl.highlight(F,se)})]),components:c,eventOrder:i.eventOrder,domModification:{attributes:{role:"menu"}}}}}),K0=function(i,c,f,x){return mr(f,x).bind(function(F){return mr(i,F).bind(function($){var se=K0(i,c,f,$);return j.some([$].concat(se))})}).getOr([])},tE=function(i,c){var f={};An(i,function(se,Ie){Ct(se,function(ze){f[ze]=Ie})});var x=c,F=function(i){return In(i,function(c,f){return{k:c,v:f}})}(c),$=vn(F,function(se,Ie){return[Ie].concat(K0(f,x,F,Ie))});return vn(f,function(se){return mr($,se).getOr([se])})},uM=function(i){return"prepared"===i.type?j.some(i.menu):j.none()},jC={init:function(){var i=ta({}),c=ta({}),f=ta({}),x=ku(),F=ta({}),Mt=function(zi,hr,Br){return di(zi).bind(function(ko){return function(zi){return zr(i.get(),function(hr,Br){return hr===zi})}(zi).bind(function(Zr){return hr(Zr).map(function(No){return{triggeredMenu:ko,triggeringItem:No,triggeringPath:Br}})})})},di=function(zi){return Ui(zi).bind(uM)},Ui=function(zi){return mr(c.get(),zi)},ri=function(zi){return mr(i.get(),zi)};return{setMenuBuilt:function(zi,hr){var Br;c.set(re(re({},c.get()),((Br={})[zi]={type:"prepared",menu:hr},Br)))},setContents:function(zi,hr,Br,ko){x.set(zi),i.set(Br),c.set(hr),F.set(ko);var Zr=tE(ko,Br);f.set(Zr)},expand:function(zi){return mr(i.get(),zi).map(function(hr){var Br=mr(f.get(),zi).getOr([]);return[hr].concat(Br)})},refresh:function(zi){return mr(f.get(),zi)},collapse:function(zi){return mr(f.get(),zi).bind(function(hr){return hr.length>1?j.some(hr.slice(1)):j.none()})},lookupMenu:Ui,lookupItem:ri,otherMenus:function(zi){var hr=F.get();return On(Vn(hr),zi)},getPrimary:function(){return x.get().bind(di)},getMenus:function(){return c.get()},clear:function(){i.set({}),c.set({}),f.set({}),x.clear()},isClear:function(){return x.get().isNone()},getTriggeringPath:function(zi,hr){var Br=st(ri(zi).toArray(),function(ko){return di(ko).isSome()});return mr(f.get(),zi).bind(function(ko){var Zr=kn(Br.concat(ko));return function(i){for(var c=[],f=0;f<i.length;f++){var x=i[f];if(!x.isSome())return j.none();c.push(x.getOrDie())}return j.some(c)}(wi(Zr,function(jr,Nr){return Mt(jr,hr,Zr.slice(0,Nr+1)).fold(function(){return Yt(x.get(),jr)?[]:[j.none()]},function(bo){return[j.some(bo)]})}))})}}},extractPreparedMenu:uM},TT=X("collapse-item"),t0=ch({name:"TieredMenu",configFields:[Ad("onExecute"),Ad("onEscape"),gu("onOpenMenu"),gu("onOpenSubmenu"),kl("onRepositionMenu"),kl("onCollapseMenu"),Ti("highlightImmediately",!0),qu("data",[Mr("primary"),Mr("menus"),Mr("expansions")]),Ti("fakeFocus",!1),kl("onHighlight"),kl("onHover"),Wm(),Mr("dom"),Ti("navigateOnHover",!0),Ti("stayInDom",!1),Zu("tmenuBehaviours",[Za,Jl,Ml,ys]),Ti("eventOrder",{})],apis:{collapseMenu:function(i,c){i.collapseMenu(c)},highlightPrimary:function(i,c){i.highlightPrimary(c)},repositionMenus:function(i,c){i.repositionMenus(c)}},factory:function(i,c){var di,Vr,f=ku(),F=jC.init(),$=function(Vr){var sa=function(Vr,sa,Pa){return vn(Pa,function(Zl,Uc){var yd=function(){return j0.sketch(re(re({},Zl),{value:Uc,markers:i.markers,fakeFocus:i.fakeFocus,onHighlight:i.onHighlight,focusManager:i.fakeFocus?Jb():ob()}))};return Uc===sa?{type:"prepared",menu:Vr.getSystem().build(yd())}:{type:"notbuilt",nbMenu:yd}})}(Vr,i.data.primary,i.data.menus),Pa=ze();return F.setContents(i.data.primary,sa,i.data.expansions,Pa),F.getPrimary()},se=function(Vr){return Io.getValue(Vr).value},ze=function(Vr){return vn(i.data.menus,function(sa,Pa){return wi(sa.items,function(Zl){return"separator"===Zl.type?[]:[Zl.data.value]})})},it=function(Vr,sa){Jl.highlight(Vr,sa),Jl.getHighlighted(sa).orThunk(function(){return Jl.getFirst(sa)}).each(function(Pa){Sm(Vr,Pa.element,fu())})},Mt=function(Vr,sa){return Ni(ft(sa,function(Pa){return Vr.lookupMenu(Pa).bind(function(Zl){return"prepared"===Zl.type?j.some(Zl.menu):j.none()})}))},kt=function(Vr,sa,Pa){var Zl=Mt(sa,sa.otherMenus(Pa));Ct(Zl,function(Uc){qp(Uc.element,[i.markers.backgroundMenu]),i.stayInDom||ys.remove(Vr,Uc)})},bn=function(Vr,sa){var Pa=function(Vr){return f.get().getOrThunk(function(){var sa={},Pa=Ap(Vr.element,"."+i.markers.item),Zl=st(Pa,function(Uc){return"true"===Xt(Uc,"aria-haspopup")});return Ct(Zl,function(Uc){Vr.getSystem().getByDom(Uc).each(function(yd){var Lp=se(yd);sa[Lp]=yd})}),f.set(sa),sa})}(Vr);An(Pa,function(Zl,Uc){var yd=Ve(sa,Uc);De(Zl.element,"aria-expanded",yd)})},Un=function(Vr,sa,Pa){return j.from(Pa[0]).bind(function(Zl){return sa.lookupMenu(Zl).bind(function(Uc){if("notbuilt"===Uc.type)return j.none();var yd=Uc.menu,Lp=Mt(sa,Pa.slice(1));return Ct(Lp,function(Ey){Qc(Ey.element,i.markers.backgroundMenu)}),Ho(yd.element)||ys.append(Vr,hd(yd)),qp(yd.element,[i.markers.backgroundMenu]),it(Vr,yd),kt(Vr,sa,Pa),j.some(yd)})})};(Vr=di||(di={}))[Vr.HighlightSubmenu=0]="HighlightSubmenu",Vr[Vr.HighlightParent=1]="HighlightParent";var ri=function(Vr,sa,Pa){if(void 0===Pa&&(Pa=di.HighlightSubmenu),sa.hasConfigured(Aa)&&Aa.isDisabled(sa))return j.some(sa);var Zl=se(sa);return F.expand(Zl).bind(function(Uc){return bn(Vr,Uc),j.from(Uc[0]).bind(function(yd){return F.lookupMenu(yd).bind(function(Lp){var Ey=function(Vr,sa,Pa){if("notbuilt"===Pa.type){var Zl=Vr.getSystem().build(Pa.nbMenu());return F.setMenuBuilt(sa,Zl),Zl}return Pa.menu}(Vr,yd,Lp);return Ho(Ey.element)||ys.append(Vr,hd(Ey)),i.onOpenSubmenu(Vr,sa,Ey,kn(Uc)),Pa===di.HighlightSubmenu?(Jl.highlightFirst(Ey),Un(Vr,F,Uc)):(Jl.dehighlightAll(Ey),j.some(sa))})})})},Yi=function(Vr,sa){var Pa=se(sa);return F.collapse(Pa).bind(function(Zl){return bn(Vr,Zl),Un(Vr,F,Zl).map(function(Uc){return i.onCollapseMenu(Vr,sa,Uc),Uc})})},Br=function(Vr){return function(sa,Pa){return gd(Pa.getSource(),"."+i.markers.item).bind(function(Zl){return sa.getSystem().getByDom(Zl).toOptional().bind(function(Uc){return Vr(sa,Uc).map(xe)})})}},ko=uc([yr(MT(),function(Vr,sa){var Pa=sa.event.item;F.lookupItem(se(Pa)).each(function(){var Zl=sa.event.menu;Jl.highlight(Vr,Zl);var Uc=se(sa.event.item);F.refresh(Uc).each(function(yd){return kt(Vr,F,yd)})})}),Wp(function(Vr,sa){var Pa=sa.event.target;Vr.getSystem().getByDom(Pa).each(function(Zl){0===se(Zl).indexOf("collapse-item")&&Yi(Vr,Zl),ri(Vr,Zl,di.HighlightSubmenu).fold(function(){i.onExecute(Vr,Zl)},V)})}),Va(function(Vr,sa){$(Vr).each(function(Pa){ys.append(Vr,hd(Pa)),i.onOpenMenu(Vr,Pa),i.highlightImmediately&&it(Vr,Pa)})})].concat(i.navigateOnHover?[yr(aM(),function(Vr,sa){var Pa=sa.event.item;(function(Vr,sa){var Pa=se(sa);F.refresh(Pa).bind(function(Zl){return bn(Vr,Zl),Un(Vr,F,Zl)})})(Vr,Pa),ri(Vr,Pa,di.HighlightParent),i.onHover(Vr,Pa)})]:[])),Zr=function(Vr){return Jl.getHighlighted(Vr).bind(Jl.getHighlighted)},fa={collapseMenu:function(Vr){Zr(Vr).each(function(sa){Yi(Vr,sa)})},highlightPrimary:function(Vr){F.getPrimary().each(function(sa){it(Vr,sa)})},repositionMenus:function(Vr){F.getPrimary().bind(function(Pa){return Zr(Vr).bind(function(Zl){var Uc=se(Zl),yd=Eo(F.getMenus()),Lp=Ni(ft(yd,jC.extractPreparedMenu));return F.getTriggeringPath(Uc,function(Ey){return function(Vr,sa,Pa){return Vi(sa,function(Zl){if(!Zl.getSystem().isConnected())return j.none();var Uc=Jl.getCandidates(Zl);return vi(Uc,function(yd){return se(yd)===Pa})})}(0,Lp,Ey)})}).map(function(Zl){return{primary:Pa,triggeringPath:Zl}})}).fold(function(){(function(Vr){return j.from(Vr.components()[0]).filter(function(sa){return"menu"===Xt(sa.element,"role")})})(Vr).each(function(Pa){i.onRepositionMenu(Vr,Pa,[])})},function(Pa){var Zl=Pa.primary,Uc=Pa.triggeringPath;i.onRepositionMenu(Vr,Zl,Uc)})}};return{uid:i.uid,dom:i.dom,markers:i.markers,behaviours:Od(i.tmenuBehaviours,[Za.config({mode:"special",onRight:Br(function(Vr,sa){return B_(sa.element)?j.none():ri(Vr,sa,di.HighlightSubmenu)}),onLeft:Br(function(Vr,sa){return B_(sa.element)?j.none():Yi(Vr,sa)}),onEscape:Br(function(Vr,sa){return Yi(Vr,sa).orThunk(function(){return i.onEscape(Vr,sa).map(function(){return Vr})})}),focusIn:function(Vr,sa){F.getPrimary().each(function(Pa){Sm(Vr,Pa.element,fu())})}}),Jl.config({highlightClass:i.markers.selectedMenu,itemClass:i.markers.menu}),Ml.config({find:function(Vr){return Jl.getHighlighted(Vr)}}),ys.config({})]),eventOrder:i.eventOrder,apis:fa,events:ko}},extraApis:{tieredData:function(i,c,f){return{primary:i,menus:c,expansions:f}},singleData:function(i,c){return{primary:i,menus:Fo(i,c),expansions:{}}},collapseItem:function(i){return{value:jo(TT()),meta:{text:i}}}}}),Fu=ch({name:"InlineView",configFields:[Mr("lazySink"),kl("onShow"),kl("onHide"),nc("onEscape"),Zu("inlineBehaviours",[el,Io,Id]),yl("fireDismissalEventInstead",[Ti("event",Mf())]),yl("fireRepositionEventInstead",[Ti("event",pp())]),Ti("getRelated",j.none),Ti("isExtraPart",Pe),Ti("eventOrder",j.none)],factory:function(i,c){var $=function(bn,Un,di,Ui){se(bn,Un,di,function(){return Ui.map(function(ri){return lo(ri)})})},se=function(bn,Un,di,Ui){var ri=i.lazySink(bn).getOrDie();el.openWhileCloaked(bn,Un,function(){return zn.positionWithinBounds(ri,bn,di,Ui())}),Io.setValue(bn,j.some({mode:"position",config:di,getBounds:Ui}))},ze=function(bn,Un,di,Ui){var ri=function(i,c,f,x,F){var $=function(){return i.lazySink(c)},se="horizontal"===x.type?{layouts:{onLtr:function(){return te()},onRtl:function(){return M()}}}:{},ze=function(it){return function(it){return 2===it.length}(it)?se:{}};return t0.sketch({dom:{tag:"div"},data:x.data,markers:x.menu.markers,highlightImmediately:x.menu.highlightImmediately,onEscape:function(){return el.close(c),i.onEscape.map(function(it){return it(c)}),j.some(!0)},onExecute:function(){return j.some(!0)},onOpenMenu:function(it,Mt){zn.positionWithinBounds($().getOrDie(),Mt,f,F())},onOpenSubmenu:function(it,Mt,kt,pn){var bn=$().getOrDie();zn.position(bn,kt,{anchor:re({type:"submenu",item:Mt},ze(pn))})},onRepositionMenu:function(it,Mt,kt){var pn=$().getOrDie();zn.positionWithinBounds(pn,Mt,f,F()),Ct(kt,function(bn){var Un=ze(bn.triggeringPath);zn.position(pn,bn.triggeredMenu,{anchor:re({type:"submenu",item:bn.triggeringItem},Un)})})}})}(i,bn,Un,di,Ui);el.open(bn,ri),Io.setValue(bn,j.some({mode:"menu",menu:ri}))},kt=function(bn){el.isOpen(bn)&&Io.getValue(bn).each(function(Un){switch(Un.mode){case"menu":el.getState(bn).each(t0.repositionMenus);break;case"position":var di=i.lazySink(bn).getOrDie();zn.positionWithinBounds(di,bn,Un.config,Un.getBounds())}})},pn={setContent:function(bn,Un){el.setContent(bn,Un)},showAt:function(bn,Un,di){$(bn,Un,di,j.none())},showWithin:$,showWithinBounds:se,showMenuAt:function(bn,Un,di){ze(bn,Un,di,j.none)},showMenuWithinBounds:ze,hide:function(bn){el.isOpen(bn)&&(Io.setValue(bn,j.none()),el.close(bn))},getContent:function(bn){return el.getState(bn)},reposition:kt,isOpen:el.isOpen};return{uid:i.uid,dom:i.dom,behaviours:Od(i.inlineBehaviours,[el.config({isPartOf:function(bn,Un,di){return Eg(Un,di)||function(bn,Un){return i.getRelated(bn).exists(function(Ui){return Eg(Ui,Un)})}(bn,di)},getAttachPoint:function(bn){return i.lazySink(bn).getOrDie()},onOpen:function(bn){i.onShow(bn)},onClose:function(bn){i.onHide(bn)}}),Io.config({store:{mode:"memory",initialValue:j.none()}}),Id.config({channels:re(re({},Km(re({isExtraPart:c.isExtraPart},i.fireDismissalEventInstead.map(function(bn){return{fireEventInstead:{event:bn.event}}}).getOr({})))),sg(re(re({},i.fireRepositionEventInstead.map(function(bn){return{fireEventInstead:{event:bn.event}}}).getOr({})),{doReposition:kt})))})]),eventOrder:i.eventOrder,apis:pn}},apis:{showAt:function(i,c,f,x){i.showAt(c,f,x)},showWithin:function(i,c,f,x,F){i.showWithin(c,f,x,F)},showWithinBounds:function(i,c,f,x,F){i.showWithinBounds(c,f,x,F)},showMenuAt:function(i,c,f,x){i.showMenuAt(c,f,x)},showMenuWithinBounds:function(i,c,f,x,F){i.showMenuWithinBounds(c,f,x,F)},hide:function(i,c){i.hide(c)},isOpen:function(i,c){return i.isOpen(c)},getContent:function(i,c){return i.getContent(c)},setContent:function(i,c,f){i.setContent(c,f)},reposition:function(i,c){i.reposition(c)}}}),l_="layout-inset",pM=function(i){return i.x},z_=function(i,c){return i.x+i.width/2-c.width/2},mM=function(i,c){return i.x+i.width-c.width},fM=function(i){return i.y},xT=function(i,c){return i.y+i.height-c.height},YS=function(i,c){return i.y+i.height/2-c.height/2},Ug=function(i,c,f){return Yu(mM(i,c),xT(i,c),f.insetSouthwest(),Qg(),"southwest",id(i,{right:0,bottom:3}),l_)},DT=function(i,c,f){return Yu(pM(i),xT(i,c),f.insetSoutheast(),wf(),"southeast",id(i,{left:1,bottom:3}),l_)},J0=function(i,c,f){return Yu(mM(i,c),fM(i),f.insetNorthwest(),D_(),"northwest",id(i,{right:0,top:2}),l_)},nE=function(i,c,f){return Yu(pM(i),fM(i),f.insetNortheast(),Kh(),"northeast",id(i,{left:1,top:2}),l_)},gy=function(i,c,f){return Yu(z_(i,c),fM(i),f.insetNorth(),Np(),"north",id(i,{top:2}),l_)},mb=function(i,c,f){return Yu(z_(i,c),xT(i,c),f.insetSouth(),em(),"south",id(i,{bottom:3}),l_)},hM=function(i,c,f){return Yu(mM(i,c),YS(i,c),f.insetEast(),xh(),"east",id(i,{right:0}),l_)},ST=function(i,c,f){return Yu(pM(i),YS(i,c),f.insetWest(),_d(),"west",id(i,{left:1}),l_)},kx=function(i){switch(i){case"north":return gy;case"northeast":return nE;case"northwest":return J0;case"south":return mb;case"southeast":return DT;case"southwest":return Ug;case"east":return hM;case"west":return ST}},AT=function(i,c,f,x,F){return xC(x).map(kx).getOr(gy)(i,c,f,x,F)},iE=function(i){switch(i){case"north":return mb;case"northeast":return DT;case"northwest":return Ug;case"south":return gy;case"southeast":return nE;case"southwest":return J0;case"east":return ST;case"west":return hM}},rE=function(i,c,f,x,F){return xC(x).map(iE).getOr(gy)(i,c,f,x,F)},c_=tinymce.util.Tools.resolve("tinymce.util.Delay"),Nf=ch({name:"Button",factory:function(i){var c=oM(i.action),f=i.dom.tag,x=function($){return mr(i.dom,"attributes").bind(function(se){return mr(se,$)})};return{uid:i.uid,dom:i.dom,components:i.components,events:c,behaviours:Lh_augment(i.buttonBehaviours,[ka.config({}),Za.config({mode:"execution",useSpace:!0,useEnter:!0})]),domModification:{attributes:function(){if("button"===f){var $=x("type").getOr("button"),se=x("role").map(function(ze){return{role:ze}}).getOr({});return re({type:$},se)}return{role:x("role").getOr("button")}}()},eventOrder:i.eventOrder}},configFields:[Ti("uid",void 0),Mr("dom"),Ti("components",[]),Lh_field("buttonBehaviours",[ka,Za]),Es("action"),Es("role"),Ti("eventOrder",{})]}),wl=function(i){var c=function(i){return void 0!==i.uid}(i)&&ct(i,"uid")?i.uid:yh("memento");return{get:function($){return $.getSystem().getByUid(c).getOrDie()},getOpt:function($){return $.getSystem().getByUid(c).toOptional()},asSpec:function(){return re(re({},i),{uid:c})}}},Bf=tinymce.util.Tools.resolve("tinymce.util.I18n"),wT={indent:!0,outdent:!0,"table-insert-column-after":!0,"table-insert-column-before":!0,"paste-column-after":!0,"paste-column-before":!0,"unordered-list":!0,"list-bull-circle":!0,"list-bull-default":!0,"list-bull-square":!0},IT="temporary-placeholder",n0=function(i){return function(){return mr(i,IT).getOr("!not found!")}},PT=function(i,c){var f=i.toLowerCase();if(Bf.isRtl()){var x=function(i,c){return Tn(i,c)?i:function(i,c){return i+c}(i,c)}(f,"-rtl");return jn(c,x)?x:f}return f},VS=function(i,c){return mr(c,PT(i,c))},jD=function(i,c){var f=c();return VS(i,f).getOrThunk(n0(f))},Rx=function(){return bs("add-focusable",[Va(function(i){Lv(i.element,"svg").each(function(c){return De(c,"focusable","false")})})])},oE=function(i,c,f,x){var F,$,se=function(i){return!!Bf.isRtl()&&jn(wT,i)}(c)?["tox-icon--flip"]:[],Ie=mr(f,PT(c,f)).or(x).getOrThunk(n0(f));return{dom:{tag:i.tag,attributes:null!==(F=i.attributes)&&void 0!==F?F:{},classes:i.classes.concat(se),innerHtml:Ie},behaviours:ao(me(me([],null!==($=i.behaviours)&&void 0!==$?$:[],!0),[Rx()],!1))}},fb=function(i,c,f,x){return void 0===x&&(x=j.none()),oE(c,i,f(),x)},gM={success:"checkmark",error:"warning",err:"error",warning:"warning",warn:"warning",info:"info"},LT=ch({name:"Notification",factory:function(i){var c=wl({dom:{tag:"p",innerHtml:i.translationProvider(i.text)},behaviours:ao([ys.config({})])}),f=function(bn){return{dom:{tag:"div",classes:["tox-bar"],attributes:{style:"width: "+bn+"%"}}}},x=function(bn){return{dom:{tag:"div",classes:["tox-text"],innerHtml:bn+"%"}}},F=wl({dom:{tag:"div",classes:i.progress?["tox-progress-bar","tox-progress-indicator"]:["tox-progress-bar"]},components:[{dom:{tag:"div",classes:["tox-bar-container"]},components:[f(0)]},x(0)],behaviours:ao([ys.config({})])}),Ie={updateProgress:function(bn,Un){bn.getSystem().isConnected()&&F.getOpt(bn).each(function(di){ys.set(di,[{dom:{tag:"div",classes:["tox-bar-container"]},components:[f(Un)]},x(Un)])})},updateText:function(bn,Un){if(bn.getSystem().isConnected()){var di=c.get(bn);ys.set(di,[fd(Un)])}}},ze=mi([i.icon.toArray(),i.level.toArray(),i.level.bind(function(bn){return j.from(gM[bn])}).toArray()]),it=wl(Nf.sketch({dom:{tag:"button",classes:["tox-notification__dismiss","tox-button","tox-button--naked","tox-button--icon"]},components:[fb("close",{tag:"div",classes:["tox-icon"],attributes:{"aria-label":i.translationProvider("Close")}},i.iconProvider)],action:function(bn){i.onAction(bn)}})),Mt=function(i,c,f){var x=f(),F=vi(i,function($){return jn(x,PT($,x))});return oE(c,F.getOr(IT),x,j.none())}(ze,{tag:"div",classes:["tox-notification__icon"]},i.iconProvider),pn=[Mt,{dom:{tag:"div",classes:["tox-notification__body"]},components:[c.asSpec()],behaviours:ao([ys.config({})])}];return{uid:i.uid,dom:{tag:"div",attributes:{role:"alert"},classes:i.level.map(function(bn){return["tox-notification","tox-notification--in","tox-notification--"+bn]}).getOr(["tox-notification","tox-notification--in"])},behaviours:ao([ka.config({}),bs("notification-events",[yr(xm(),function(bn){it.getOpt(bn).each(ka.focus)})])]),components:pn.concat(i.progress?[F.asSpec()]:[]).concat(i.closeButton?[it.asSpec()]:[]),apis:Ie}},configFields:[Es("level"),Mr("progress"),Mr("icon"),Mr("onAction"),Mr("text"),Mr("iconProvider"),Mr("translationProvider"),bl("closeButton",!0)],apis:{updateProgress:function(i,c,f){i.updateProgress(c,f)},updateText:function(i,c,f){i.updateText(c,f)}}});function _M(i,c,f){var x=c.backstage.shared;return{open:function(it,Mt){var kt=!it.closeButton&&it.timeout&&(it.timeout>0||it.timeout<0),pn=function(){Mt(),Fu.hide(Un)},bn=Ga(LT.sketch({text:it.text,level:Ve(["success","error","warning","warn","info"],it.type)?it.type:void 0,progress:!0===it.progressBar,icon:j.from(it.icon),closeButton:!kt,onAction:pn,iconProvider:x.providers.icons,translationProvider:x.providers.translate})),Un=Ga(Fu.sketch(re({dom:{tag:"div",classes:["tox-notifications-container"]},lazySink:x.getSink,fireDismissalEventInstead:{}},x.header.isPositionedAtTop()?{}:{fireRepositionEventInstead:{}})));f.add(Un),it.timeout>0&&c_.setTimeout(function(){pn()},it.timeout);var di=function(){var Ui=lo(Xn.fromDom(i.getContentAreaContainer())),ri=Zs(),Yi=xp(ri.x,Ui.x,Ui.right),Or=xp(ri.y,Ui.y,Ui.bottom),Pr=Math.max(Ui.right,ri.right),zi=Math.max(Ui.bottom,ri.bottom);return j.some(sr(Yi,Or,Pr-Yi,zi-Or))};return{close:pn,moveTo:function(Ui,ri){Fu.showAt(Un,hd(bn),{anchor:{type:"makeshift",x:Ui,y:ri}})},moveRel:function(Ui,ri){var Yi=hd(bn),Or={maxHeightFunction:eh()};if("banner"!==ri&&P(Ui)){var Pr=function(it){switch(it){case"bc-bc":return mb;case"tc-tc":return gy;case"tc-bc":return Up;default:return Hu}}(ri),zi={type:"node",root:Ra(),node:j.some(Xn.fromDom(Ui)),overrides:Or,layouts:{onRtl:function(){return[Pr]},onLtr:function(){return[Pr]}}};Fu.showWithinBounds(Un,Yi,{anchor:zi},di)}else{var hr=re(re({},x.anchors.banner()),{overrides:Or});Fu.showWithinBounds(Un,Yi,{anchor:hr},di)}},text:function(Ui){LT.updateText(bn,Ui)},settings:it,getEl:function(){return bn.element.dom},progressBar:{value:function(Ui){LT.updateProgress(bn,Ui)}}}},close:function(it){it.close()},reposition:function(it){it.length>0&&Ct(it,function(Mt,kt){0===kt?Mt.moveRel(null,"banner"):Mt.moveRel(it[kt-1].getEl(),"bc-tc")})},getArgs:function(it){return it.settings}}}var H_,Fx=function(i,c){var f=null,x=function(){g(f)||(clearTimeout(f),f=null)};return{cancel:x,throttle:function(){for(var $=[],se=0;se<arguments.length;se++)$[se]=arguments[se];x(),f=setTimeout(function(){f=null,i.apply(null,$)},c)}}},Nx=tinymce.util.Tools.resolve("tinymce.dom.TextSeeker"),JD=function(i,c,f,x,F){var $=Nx(i,function(se){return function(i,c){return i.isBlock(c)||Ve(["BR","IMG","HR","INPUT"],c.nodeName)||"false"===i.getContentEditable(c)}(i,se)});return j.from($.backwards(c,f,x,F))},Bx=function(i,c){return Y_(Xn.fromDom(i.selection.getNode())).getOrThunk(function(){var f=Xn.fromHtml('<span data-mce-autocompleter="1" data-mce-bogus="1"></span>',i.getDoc());return oo(f,Xn.fromDom(c.extractContents())),c.insertNode(f.dom),La(f).each(function(x){return x.dom.normalize()}),function(i){return Nb(i,E0)}(f).map(function(x){i.selection.setCursorLocation(x.dom,function(i){return"img"===Ft(i)?1:gm(i).fold(function(){return Dt(i).length},function(c){return c.length})}(x))}),f})},Y_=function(i){return gd(i,"[data-mce-autocompleter]")},tw=function(i){return i.toString().replace(/\u00A0/g," ").replace(/\uFEFF/g,"")},$S=function(i){return""!==i&&-1!==" \xa0\f\n\r\t\v".indexOf(i)},Ux=function(i,c){return i.substring(c.length)},jS=function(i,c,f,x){if(void 0===x&&(x=0),!function(i){return i.collapsed&&3===i.startContainer.nodeType}(c))return j.none();var $=i.getParent(c.startContainer,i.isBlock)||i.getRoot();return JD(i,c.startContainer,c.startOffset,function(se,Ie,ze){return function(i,c,f){var x;for(x=c-1;x>=0;x--){var F=i.charAt(x);if($S(F))return j.none();if(F===f)break}return j.some(x)}(ze,Ie,f).getOr(Ie)},$).bind(function(se){var Ie=c.cloneRange();if(Ie.setStart(se.container,se.offset),Ie.setEnd(c.endContainer,c.endOffset),Ie.collapsed)return j.none();var ze=tw(Ie);return 0!==ze.lastIndexOf(f)||Ux(ze,f).length<x?j.none():j.some({text:Ux(ze,f),range:Ie,triggerChar:f})})},zx=function(i,c,f,x){return void 0===x&&(x=0),Y_(Xn.fromDom(c.startContainer)).fold(function(){return jS(i,c,f,x)},function(F){var $=i.createRng();$.selectNode(F.dom);var se=tw($);return j.some({range:$,text:Ux(se,f),triggerChar:f})})},KS_setup=function(i,c){c.on("keypress compositionend",i.onKeypress.throttle),c.on("remove",i.onKeypress.cancel);var f=function(x,F){Sa(x,Dm(),{raw:F})};c.on("keydown",function(x){var F=function(){return i.getView().bind(Jl.getHighlighted)};8===x.which&&i.onKeypress.throttle(x),i.isActive()&&(27===x.which&&i.cancelIfNecessary(),i.isMenuOpen()?13===x.which?(F().each(pd),x.preventDefault()):40===x.which?(F().fold(function(){i.getView().each(Jl.highlightFirst)},function($){f($,x)}),x.preventDefault(),x.stopImmediatePropagation()):(37===x.which||38===x.which||39===x.which)&&F().each(function($){f($,x),x.preventDefault(),x.stopImmediatePropagation()}):(13===x.which||38===x.which||40===x.which)&&i.cancelIfNecessary())}),c.on("NodeChange",function(x){i.isActive()&&!i.isProcessingAction()&&Y_(Xn.fromDom(x.element)).isNone()&&i.cancelIfNecessary()})},Yx=tinymce.util.Tools.resolve("tinymce.util.Promise"),JS=function(i,c){return{container:i,offset:c}},nw=function(i){if(function(i){return 3===i.nodeType}(i))return JS(i,i.data.length);var c=i.childNodes;return c.length>0?nw(c[c.length-1]):JS(i,c.length)},Hx=function(i,c){var f=i.childNodes;return f.length>0&&c<f.length?Hx(f[c],0):f.length>0&&function(i){return 1===i.nodeType}(i)&&f.length===c?nw(f[f.length-1]):JS(i,c)},Zx=function(i){return function(c){var f=Hx(c.startContainer,c.startOffset);return!function(i,c){return JD(i,c.container,c.offset,function(f,x){return 0===x?-1:x},i.getRoot()).filter(function(f){var x=f.container.data.charAt(f.offset-1);return!$S(x)}).isSome()}(i,f)}},Gx=function(i,c){var f=c(),x=i.selection.getRng();return function(i,c,f){return Vi(f.triggerChars,function(x){return zx(i,c,x)})}(i.dom,x,f).bind(function(F){return q0(i,c,F)})},q0=function(i,c,f,x){void 0===x&&(x={});var F=c(),se=i.selection.getRng().startContainer.nodeValue,Ie=st(F.lookupByChar(f.triggerChar),function(it){return f.text.length>=it.minChars&&it.matches.getOrThunk(function(){return Zx(i.dom)})(f.range,se,f.text)});if(0===Ie.length)return j.none();var ze=Yx.all(ft(Ie,function(it){return it.fetch(f.text,it.maxResults,x).then(function(kt){return{matchText:f.text,items:kt,columns:it.columns,onAction:it.onAction,highlightOn:it.highlightOn}})}));return j.some({lookupData:ze,context:f})},Wx=Go([qo("type"),Fs("text")]),$x=Go([Ti("type","autocompleteitem"),Ti("active",!1),Ti("disabled",!1),Ti("meta",{}),qo("value"),Fs("text"),Fs("icon")]),QS=Go([qo("type"),qo("ch"),Kc("minChars",1),Ti("columns",1),Kc("maxResults",10),nc("matches"),Hl("fetch"),Hl("onAction"),Hp("highlightOn",[],ws)]),yM=[bl("disabled",!1),Fs("tooltip"),Fs("icon"),Fs("text"),Sl("onSetup",function(){return V})],iw=Go([qo("type"),Hl("onAction")].concat(yM)),rw=function(i){return li("toolbarbutton",iw,i)},aE=[bl("active",!1)].concat(yM),XD=Go(aE.concat([qo("type"),Hl("onAction")])),hb=function(i){return li("ToggleButton",XD,i)},eS=[Sl("predicate",Pe),Vl("scope","node",["node","editor"]),Vl("position","selection",["node","selection","line"])],qS=yM.concat([Ti("type","contextformbutton"),Ti("primary",!1),Hl("onAction"),Yl("original",ve)]),tf=aE.concat([Ti("type","contextformbutton"),Ti("primary",!1),Hl("onAction"),Yl("original",ve)]),tS=yM.concat([Ti("type","contextformbutton")]),nS=aE.concat([Ti("type","contextformtogglebutton")]),Kx=ms("type",{contextformbutton:qS,contextformtogglebutton:tf}),XS=Go([Ti("type","contextform"),Sl("initValue",X("")),Fs("label"),uu("commands",Kx),mc("launch",ms("type",{contextformbutton:tS,contextformtogglebutton:nS}))].concat(eS)),RT=Go([Ti("type","contexttoolbar"),qo("items")].concat(eS)),NT=function(i){var c=i.ui.registry.getAll().popups,f=vn(c,function(se){return function(i){return li("Autocompleter",QS,i)}(se).fold(function(Ie){throw new Error(fo(Ie))},ve)}),x=function(i){var c={};return Ct(i,function(f){c[f]={}}),Vn(c)}(Gr(f,function(se){return se.ch})),F=Eo(f);return{dataset:f,triggerChars:x,lookupByChar:function(se){return st(F,function(Ie){return Ie.ch===se})}}};!function(i){i[i.CLOSE_ON_EXECUTE=0]="CLOSE_ON_EXECUTE",i[i.BUBBLE_TO_SANDBOX=1]="BUBBLE_TO_SANDBOX"}(H_||(H_={}));var _b,Lm=H_,tC="tox-menu-nav__js",nC="tox-collection__item",iC="tox-swatch",KC={normal:tC,color:iC},V_="tox-collection__item--enabled",rC="tox-collection__item-icon",JC="tox-collection__item-label",oC="tox-collection__item-caret",vy="tox-collection__item--active",lE="tox-collection__item-container",r0="tox-collection__item-container--row",z=function(i){return mr(KC,i).getOr(tC)},K=function(i){return"color"===i?"tox-swatches":"tox-menu"},fe=function(i){return{backgroundMenu:"tox-background-menu",selectedMenu:"tox-selected-menu",selectedItem:"tox-collection__item--active",hasIcons:"tox-menu--has-icons",menu:K(i),tieredMenu:"tox-tiered-menu"}},Re=function(i){var c=fe(i);return{backgroundMenu:c.backgroundMenu,selectedMenu:c.selectedMenu,menu:c.menu,selectedItem:c.selectedItem,item:z(i)}},lt=function(i,c,f){var x=fe(f);return{tag:"div",classes:mi([[x.menu,"tox-menu-"+c+"-column"],i?[x.hasIcons]:[]])}},vt=[j0.parts.items({})],b=function(i,c,f){var x=fe(f);return{dom:{tag:"div",classes:mi([[x.tieredMenu]])},markers:Re(f)}},r=function(i,c){return function(f){var x=wt(f,c);return ft(x,function(F){return{dom:i,components:F}})}},L=function(i,c){var f=[],x=[];return Ct(i,function(F,$){c(F,$)?(x.length>0&&f.push(x),x=[],jn(F.dom,"innerHtml")&&x.push(F)):x.push(F)}),x.length>0&&f.push(x),ft(f,function(F){return{dom:{tag:"div",classes:["tox-collection__group"]},components:F}})},G=function(i,c,f){return{dom:{tag:"div",classes:["tox-menu","tox-collection"].concat(1===i?["tox-collection--list"]:["tox-collection--grid"])},components:[j0.parts.items({preprocess:function(x){return"auto"!==i&&i>1?r({tag:"div",classes:["tox-collection__group"]},i)(x):L(x,function(F,$){return"separator"===c[$].type})}})]}},Ze=function(i){return tt(i,function(c){return"icon"in c&&void 0!==c.icon})},gt=function(i){return console.error(fo(i)),console.log(i),j.none()},Ot=function(i,c,f,x,F){var $=function(i,c){return{dom:{tag:"div",classes:["tox-collection","tox-collection--horizontal"]},components:[j0.parts.items({preprocess:function(f){return L(f,function(x,F){return"separator"===i[F].type})}})]}}(f);return{value:i,dom:$.dom,components:$.components,items:f}},sn=function(i,c,f,x,F){if("color"===F){var $=function(i){return{dom:{tag:"div",classes:["tox-menu","tox-swatches-menu"]},components:[{dom:{tag:"div",classes:["tox-swatches"]},components:[j0.parts.items({preprocess:"auto"!==i?r({tag:"div",classes:["tox-swatches__row"]},i):ve})]}]}}(x);return{value:i,dom:$.dom,components:$.components,items:f}}if("normal"===F&&"auto"===x)return{value:i,dom:($=G(x,f)).dom,components:$.components,items:f};if("normal"===F&&1===x)return{value:i,dom:($=G(1,f)).dom,components:$.components,items:f};if("normal"===F)return{value:i,dom:($=G(x,f)).dom,components:$.components,items:f};if("listpreview"===F&&"auto"!==x){$=function(i){return{dom:{tag:"div",classes:["tox-menu","tox-collection","tox-collection--toolbar","tox-collection--toolbar-lg"]},components:[j0.parts.items({preprocess:r({tag:"div",classes:["tox-collection__group"]},i)})]}}(x);return{value:i,dom:$.dom,components:$.components,items:f}}return{value:i,dom:lt(c,x,F),components:vt,items:f}},ci=[qo("type"),qo("src"),Fs("alt"),Hp("classes",[],ws)],Ji=Go(ci),xr=[qo("type"),qo("text"),Fs("name"),Hp("classes",["tox-collection__item-label"],ws)],Hr=Go(xr),Do=Wf(function(){return Ae("type",{cardimage:Ji,cardtext:Hr,cardcontainer:Zo})}),Zo=Go([qo("type"),Wd("direction","horizontal"),Wd("align","left"),Wd("valign","middle"),uu("items",Do)]),Ko=[bl("disabled",!1),Fs("text"),Fs("shortcut"),Dl("value","value",Ca(function(){return jo("menuitem-value")}),yc()),Ti("meta",{})],ma=Go([qo("type"),Fs("label"),uu("items",Do),Sl("onSetup",function(){return V}),Sl("onAction",V)].concat(Ko)),Cc=Go([qo("type"),bl("active",!1),Fs("icon")].concat(Ko)),Rm=[qo("type"),qo("fancytype"),Sl("onAction",V)],Pp=[Ti("initData",{})].concat(Rm),Uf=[eu("initData",{},[bl("allowCustomColors",!0),Pu("colors",yc())])].concat(Rm),hs=ms("fancytype",{inserttable:Pp,colorswatch:Uf}),ad=Go([qo("type"),Sl("onSetup",function(){return V}),Sl("onAction",V),Fs("icon")].concat(Ko)),u_=Go([qo("type"),Hl("getSubmenuItems"),Sl("onSetup",function(){return V}),Fs("icon")].concat(Ko)),sC=Go([qo("type"),Fs("icon"),bl("active",!1),Sl("onSetup",function(){return V}),Hl("onAction")].concat(Ko)),Ms=function(i,c,f){var x=Ap(i.element,"."+f);if(x.length>0){var F=Gi(x,function($){var se=$.dom.getBoundingClientRect().top,Ie=x[0].dom.getBoundingClientRect().top;return Math.abs(se-Ie)>c}).getOr(x.length);return j.some({numColumns:F,numRows:Math.ceil(x.length/F)})}return j.none()},Il=function(i,c){return ao([bs(i,c)])},zf_unnamedEvents=function(i){return Il(jo("unnamed-events"),i)},o0=jo("tooltip.exclusive"),zg=jo("tooltip.show"),gb=jo("tooltip.hide"),Fm=function(i,c,f){i.getSystem().broadcastOn([o0],{})},LI=Object.freeze({__proto__:null,hideAllExclusive:Fm,setComponents:function(i,c,f,x){f.getTooltip().each(function(F){F.getSystem().isConnected()&&ys.set(F,x)})}}),qC=Object.freeze({__proto__:null,events:function(i,c){var f=function(F){c.getTooltip().each(function($){xs($),i.onHide(F,$),c.clearTooltip()}),c.clearTimer()};return uc(mi([[yr(zg,function(F){c.resetTimer(function(){!function(F){if(!c.isShowing()){Fm(F);var $=i.lazySink(F).getOrDie(),se=F.getSystem().build({dom:i.tooltipDom,components:i.tooltipComponents,events:uc("normal"===i.mode?[yr(ds(),function(Ie){Cl(F,zg)}),yr(Gg(),function(Ie){Cl(F,gb)})]:[]),behaviours:ao([ys.config({})])});c.setTooltip(se),Co($,se),i.onShow(F,se),zn.position($,se,{anchor:i.anchor(F)})}}(F)},i.delay)}),yr(gb,function(F){c.resetTimer(function(){f(F)},i.delay)}),yr($d(),function(F,$){var se=$;se.universal||Ve(se.channels,o0)&&f(F)}),mp(function(F){f(F)})],"normal"===i.mode?[yr(xm(),function(F){Cl(F,zg)}),yr(gh(),function(F){Cl(F,gb)}),yr(ds(),function(F){Cl(F,zg)}),yr(Gg(),function(F){Cl(F,gb)})]:[yr(cm(),function(F,$){Cl(F,zg)}),yr(um(),function(F){Cl(F,gb)})]]))}}),yy=[Mr("lazySink"),Mr("tooltipDom"),Ti("exclusive",!0),Ti("tooltipComponents",[]),Ti("delay",300),Vl("mode","normal",["normal","follow-highlight"]),Ti("anchor",function(i){return{type:"hotspot",hotspot:i,layouts:{onLtr:X([Hu,Up,Bp,Hd,tm,nm]),onRtl:X([Hu,Up,Bp,Hd,tm,nm])}}}),kl("onHide"),kl("onShow")],rS=Object.freeze({__proto__:null,init:function(){var i=ku(),c=ku(),f=function(){i.on(clearTimeout)},F=X("not-implemented");return zu({getTooltip:c.get,isShowing:c.isSet,setTooltip:c.set,clearTooltip:c.clear,clearTimer:f,resetTimer:function($,se){f(),i.set(setTimeout($,se))},readState:F})}}),kI=Wc({fields:yy,name:"tooltipping",active:qC,state:rS,apis:LI}),oS=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),b3=tinymce.util.Tools.resolve("tinymce.EditorManager"),ow=function(i){return i.getParam("height",Math.max(i.getElement().offsetHeight,200))},aw=function(i){return i.getParam("width",oS.DOM.getStyle(i.getElement(),"width"))},RI=function(i){return j.from(i.getParam("min_width")).filter(B)},UO=function(i){return j.from(i.getParam("min_height")).filter(B)},sw=function(i){return j.from(i.getParam("max_width")).filter(B)},zO=function(i){return j.from(i.getParam("max_height")).filter(B)},FI=function(i){return!1!==i.getParam("menubar",!0,"boolean")},NI=function(i){var c=i.getParam("toolbar",!0),f=!0===c,x=e(c),F=D(c)&&c.length>0;return!lw(i)&&(F||x||f)},ZO=function(i){var c=Ne(9,function(x){return i.getParam("toolbar"+(x+1),!1,"string")}),f=st(c,function(x){return"string"==typeof x});return f.length>0?j.some(f):j.none()},lw=function(i){return ZO(i).fold(function(){return i.getParam("toolbar",[],"string[]").length>0},xe)};!function(i){i.default="wrap",i.floating="floating",i.sliding="sliding",i.scrolling="scrolling"}(_b||(_b={}));var qx,eA=function(i){return i.getParam("toolbar_mode","","string")};!function(i){i.auto="auto",i.top="top",i.bottom="bottom"}(qx||(qx={}));var pw,GO=function(i){return i.getParam("toolbar_location",qx.auto,"string")},WO=function(i){return GO(i)===qx.bottom},jO=function(i){if(!i.inline)return j.none();var c=function(i){return i.getParam("fixed_toolbar_container","","string")}(i);if(c.length>0)return Fc(Ra(),c);var f=function(i){return i.getParam("fixed_toolbar_container_target")}(i);return P(f)?j.some(Xn.fromDom(f)):j.none()},cw=function(i){return i.inline&&jO(i).isSome()},KO=function(i){return jO(i).getOrThunk(function(){return qr(ro(Xn.fromDom(i.getElement())))})},JO=function(i){return i.inline&&!FI(i)&&!NI(i)&&!lw(i)},uw=function(i){return(i.getParam("toolbar_sticky",!1,"boolean")||i.inline)&&!cw(i)&&!JO(i)},w3=function(i){var c=i.getParam("menu");return c?vn(c,function(f){return re(re({},f),{items:f.items})}):{}},I3=function(i){return i.getParam("menubar")},XO=function(i){return i.getParam("anchor_top","#top")},k3=function(i){return i.getParam("anchor_bottom","#bottom")},UI="silver.readonly",R3=Go([function(i){return sl(i,Ll)}("readonly")]),aS=function(i,c){var x=i.outerContainer.element;c&&(i.mothership.broadcastOn([ag()],{target:x}),i.uiMothership.broadcastOn([ag()],{target:x})),i.mothership.broadcastOn([UI],{readonly:c}),i.uiMothership.broadcastOn([UI],{readonly:c})},t2=function(i,c){i.on("init",function(){i.mode.isReadOnly()&&aS(c,!0)}),i.on("SwitchMode",function(){return aS(c,i.mode.isReadOnly())}),function(i){return i.getParam("readonly",!1,"boolean")}(i)&&i.setMode("readonly")},bf=function(){var i;return Id.config({channels:(i={},i[UI]={schema:R3,onReceive:function(c,f){Aa.set(c,f.readonly)}},i)})},lC_item=function(i){return Aa.config({disabled:i,disableClass:"tox-collection__item--state-disabled"})},lC_button=function(i){return Aa.config({disabled:i})},lC_splitButton=function(i){return Aa.config({disabled:i,disableClass:"tox-tbtn--disabled"})},lC_toolbarButton=function(i){return Aa.config({disabled:i,disableClass:"tox-tbtn--disabled",useNative:!1})},sS=function(i,c){var f=i.getApi(c);return function(x){x(f)}},Xx=function(i,c){return Va(function(f){sS(i,f)(function(F){var $=i.onSetup(F);w($)&&c.set($)})})},eD=function(i,c){return mp(function(f){return sS(i,f)(c.get())})},z3=function(i,c){return Wp(function(f,x){sS(i,f)(i.onAction),!i.triggersSubmenu&&c===Lm.CLOSE_ON_EXECUTE&&(Cl(f,hu()),x.stop())})},Y3=((pw={})[dd()]=["disabling","alloy.base.behaviour","toggling","item-events"],pw),bM=Ni,BT=function(i,c,f,x){var F=ta(V);return{type:"item",dom:c.dom,components:bM(c.optComponents),data:i.data,eventOrder:Y3,hasSubmenu:i.triggersSubmenu,itemBehaviours:ao([bs("item-events",[z3(i,f),Xx(i,F),eD(i,F)]),lC_item(function(){return i.disabled||x.isDisabled()}),bf(),ys.config({})].concat(i.itemBehaviours))}},CM=function(i){return{value:i.value,meta:re({text:i.text.getOr("")},i.meta)}},mw=tinymce.util.Tools.resolve("tinymce.Env"),H3=function(i){var x=mw.mac?{alt:"&#x2325;",ctrl:"&#x2303;",shift:"&#x21E7;",meta:"&#x2318;",access:"&#x2303;&#x2325;"}:{meta:"Ctrl",access:"Shift+Alt"},F=i.split("+"),$=ft(F,function(se){var Ie=se.toLowerCase().trim();return jn(x,Ie)?x[Ie]:se});return mw.mac?$.join(""):$.join("+")},zI=function(i,c,f){return void 0===f&&(f=[rC]),fb(i,{tag:"div",classes:f},c)},n2=function(i){return{dom:{tag:"div",classes:[JC]},components:[fd(Bf.translate(i))]}},i2=function(i,c){return{dom:{tag:"div",classes:c,innerHtml:i}}},V3=function(i,c){return{dom:{tag:"div",classes:[JC]},components:[{dom:{tag:i.tag,styles:i.styles},components:[fd(Bf.translate(c))]}]}},Z3=function(i){return{dom:{tag:"div",classes:["tox-collection__item-accessory"],innerHtml:H3(i)}}},r2=function(i){return zI("checkmark",i,["tox-collection__item-checkmark"])},K3=function(i,c,f){var it,Mt,pn,$=i.ariaLabel,se=i.value,Ie=i.iconContent.map(function(it){return function(i,c,f){var x=c();return VS(i,x).or(f).getOrThunk(n0(x))}(it,c.icons,f)});return{dom:(it=iC,Mt=Ie.getOr(""),pn={tag:"div",attributes:$.map(function(bn){return{title:c.translate(bn)}}).getOr({}),classes:[it]},re(re({},pn),"custom"===se?{tag:"button",classes:me(me([],pn.classes,!0),["tox-swatches__picker-btn"],!1),innerHtml:Mt}:"remove"===se?{classes:me(me([],pn.classes,!0),["tox-swatch--remove"],!1),innerHtml:Mt}:{attributes:re(re({},pn.attributes),{"data-mce-color":se}),styles:{"background-color":se}})),optComponents:[]}},o2=function(i){var c=i.map(function(f){return{attributes:{title:Bf.translate(f)}}}).getOr({});return re({tag:"div",classes:[tC,nC]},c)},tA=function(i,c,f,x){return void 0===x&&(x=j.none()),"color"===i.presets?K3(i,c,x):function(i,c,f,x){var F={tag:"div",classes:[rC]},Ie=f?i.iconContent.map(function(pn){return fb(pn,F,c.icons,x)}).orThunk(function(){return j.some({dom:F})}):j.none(),ze=i.checkMark,it=j.from(i.meta).fold(function(){return n2},function(pn){return jn(pn,"style")?ge(V3,pn.style):n2}),Mt=i.htmlContent.fold(function(){return i.textContent.map(it)},function(pn){return j.some(i2(pn,[JC]))});return{dom:o2(i.ariaLabel),optComponents:[Ie,Mt,i.shortcutContent.map(Z3),ze,i.caret]}}(i,c,f,x)},s2=function(i,c){return mr(i,"tooltipWorker").map(function(f){return[kI.config({lazySink:c.getSink,tooltipDom:{tag:"div",classes:["tox-tooltip-worker-container"]},tooltipComponents:[],anchor:function(x){return{type:"submenu",item:x,overrides:{maxHeightFunction:eh}}},mode:"follow-highlight",onShow:function(x,F){f(function($){kI.setComponents(x,[Wh({element:Xn.fromDom($)})])})}})]}).getOr([])},l2=function(i,c){var x=function(i){return oS.DOM.encode(i)}(Bf.translate(i));if(c.length>0){var F=new RegExp(function(i){return i.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}(c),"gi");return x.replace(F,function($){return'<span class="tox-autocompleter-highlight">'+$+"</span>"})}return x},fw=function(i,c){return ft(i,function(f){switch(f.type){case"cardcontainer":return function(i,c){var f="vertical"===i.direction?"tox-collection__item-container--column":r0,x="left"===i.align?"tox-collection__item-container--align-left":"tox-collection__item-container--align-right";return{dom:{tag:"div",classes:[lE,f,x,function(){switch(i.valign){case"top":return"tox-collection__item-container--valign-top";case"middle":return"tox-collection__item-container--valign-middle";case"bottom":return"tox-collection__item-container--valign-bottom"}}()]},components:c}}(f,fw(f.items,c));case"cardimage":return function(i,c,f){return{dom:{tag:"img",classes:c,attributes:{src:i,alt:f.getOr("")}}}}(f.src,f.classes,f.alt);case"cardtext":var F=f.name.exists(function($){return Ve(c.cardText.highlightOn,$)})?j.from(c.cardText.matchText).getOr(""):"";return i2(l2(f.text,F),f.classes)}})},c2=BC($0(),ET()),u2=function(i){return{value:i}},d2=/^#?([a-f\d])([a-f\d])([a-f\d])$/i,p2=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,m2=function(i){return d2.test(i)||p2.test(i)},q3=function(i){return function(i,c){return qt(i,c)?function(i,c){return i.substring(c)}(i,c.length):i}(i,"#").toUpperCase()},tF=function(i){var c=function(i){return{value:i.value.replace(d2,function(f,x,F,$){return x+x+F+F+$+$})}}(i),f=p2.exec(c.value);return null===f?["FFFFFF","FF","FF","FF"]:f},YI=function(i){var c=i.toString(16);return(1===c.length?"0"+c:c).toUpperCase()},nA=function(i){var c=YI(i.red)+YI(i.green)+YI(i.blue);return u2(c)},f2=Math.min,h2=Math.max,hw=Math.round,nF=/^rgb\((\d+),\s*(\d+),\s*(\d+)\)/,iF=/^rgba\((\d+),\s*(\d+),\s*(\d+),\s*(\d?(?:\.\d+)?)\)/,UT=function(i,c,f,x){return{red:i,green:c,blue:f,alpha:x}},HI=function(i){var c=parseInt(i,10);return c.toString()===i&&c>=0&&c<=255},g2=function(i){var c,f,x,F=(i.hue||0)%360,$=i.saturation/100,se=i.value/100;if($=h2(0,f2($,1)),se=h2(0,f2(se,1)),0===$)return c=f=x=hw(255*se),UT(c,f,x,1);var Ie=F/60,ze=se*$,it=ze*(1-Math.abs(Ie%2-1)),Mt=se-ze;switch(Math.floor(Ie)){case 0:c=ze,f=it,x=0;break;case 1:c=it,f=ze,x=0;break;case 2:c=0,f=ze,x=it;break;case 3:c=0,f=it,x=ze;break;case 4:c=it,f=0,x=ze;break;case 5:c=ze,f=0,x=it;break;default:c=f=x=0}return c=hw(255*(c+Mt)),f=hw(255*(f+Mt)),x=hw(255*(x+Mt)),UT(c,f,x,1)},iA=function(i){var c=tF(i),f=parseInt(c[1],16),x=parseInt(c[2],16),F=parseInt(c[3],16);return UT(f,x,F,1)},_2=function(i,c,f,x){var F=parseInt(i,10),$=parseInt(c,10),se=parseInt(f,10),Ie=parseFloat(x);return UT(F,$,se,Ie)},v2=function(i){if("transparent"===i)return j.some(UT(0,0,0,0));var c=nF.exec(i);if(null!==c)return j.some(_2(c[1],c[2],c[3],"1"));var f=iF.exec(i);return null!==f?j.some(_2(f[1],f[2],f[3],f[4])):j.none()},y2=function(i){return"rgba("+i.red+","+i.green+","+i.blue+","+i.alpha+")"},b2=UT(255,0,0,1),VI=function(i,c){return i.fire("ResizeContent",c)},rA=function(i,c,f){return{hue:i,saturation:c,value:f}},ZI=function(i){var f,c=0,x=0,F=i.red/255,$=i.green/255,se=i.blue/255,Ie=Math.min(F,Math.min($,se)),ze=Math.max(F,Math.max($,se));return Ie===ze?rA(0,0,100*(x=Ie)):(c=60*((c=F===Ie?3:se===Ie?1:5)-(F===Ie?$-se:se===Ie?F-$:se-F)/(ze-Ie)),f=(ze-Ie)/ze,x=ze,rA(Math.round(c),Math.round(100*f),Math.round(100*x)))},M2=function(i){return nA(g2(i))},T2=function(i){return function(i){return m2(i)?j.some({value:q3(i)}):j.none()}(i).orThunk(function(){return v2(i).map(nA)}).getOrThunk(function(){var c=document.createElement("canvas");c.height=1,c.width=1;var f=c.getContext("2d");f.clearRect(0,0,c.width,c.height),f.fillStyle="#FFFFFF",f.fillStyle=i,f.fillRect(0,0,1,1);var x=f.getImageData(0,0,1,1).data,F=x[0],$=x[1],se=x[2],Ie=x[3];return nA(UT(F,$,se,Ie))})},gw=tinymce.util.Tools.resolve("tinymce.util.LocalStorage"),GI="tinymce-custom-colors";var aA,Yf="choiceitem",D2=[{type:Yf,text:"Light Green",value:"#BFEDD2"},{type:Yf,text:"Light Yellow",value:"#FBEEB8"},{type:Yf,text:"Light Red",value:"#F8CAC6"},{type:Yf,text:"Light Purple",value:"#ECCAFA"},{type:Yf,text:"Light Blue",value:"#C2E0F4"},{type:Yf,text:"Green",value:"#2DC26B"},{type:Yf,text:"Yellow",value:"#F1C40F"},{type:Yf,text:"Red",value:"#E03E2D"},{type:Yf,text:"Purple",value:"#B96AD9"},{type:Yf,text:"Blue",value:"#3598DB"},{type:Yf,text:"Dark Turquoise",value:"#169179"},{type:Yf,text:"Orange",value:"#E67E23"},{type:Yf,text:"Dark Red",value:"#BA372A"},{type:Yf,text:"Dark Purple",value:"#843FA1"},{type:Yf,text:"Dark Blue",value:"#236FA1"},{type:Yf,text:"Light Gray",value:"#ECF0F1"},{type:Yf,text:"Medium Gray",value:"#CED4D9"},{type:Yf,text:"Gray",value:"#95A5A6"},{type:Yf,text:"Dark Gray",value:"#7E8C8D"},{type:Yf,text:"Navy Blue",value:"#34495E"},{type:Yf,text:"Black",value:"#000000"},{type:Yf,text:"White",value:"#ffffff"}],S2=function x2(i){void 0===i&&(i=10);var ze,c=gw.getItem(GI),f=e(c)?JSON.parse(c):[],F=i-(ze=f).length<0?ze.slice(0,i):ze,se=function(ze){F.splice(ze,1)};return{add:function(ze){ut(F,ze).each(se),F.unshift(ze),F.length>i&&F.pop(),gw.setItem(GI,JSON.stringify(F))},state:function(){return F.slice(0)}}}(10),A2=function(i){return!1!==i.getParam("custom_colors")},WI=function(i){var c=function(i){return i.getParam("color_map")}(i);return void 0!==c?function(i){for(var c=[],f=0;f<i.length;f+=2)c.push({text:i[f+1],value:"#"+T2(i[f]).value,type:"choiceitem"});return c}(c):D2},jI=function(i){S2.add(i)},KI="#000000",I2=function(i){var f=function(i){return Math.max(5,Math.ceil(Math.sqrt(i)))}(WI(i).length);return function(i,c){return i.getParam("color_cols",c,"number")}(i,f)},P2=function(i){var c="choiceitem",f={type:c,text:"Remove color",icon:"color-swatch-remove-color",value:"remove"};return i?[f,{type:c,text:"Custom color",icon:"color-picker",value:"custom"}]:[f]},oA=function(i,c,f,x){"custom"===f?R2(i)(function($){$.each(function(se){jI(se),i.execCommand("mceApplyTextcolor",c,se),x(se)})},KI):"remove"===f?(x(""),i.execCommand("mceRemoveTextcolor",c)):(x(f),i.execCommand("mceApplyTextcolor",c,f))},O2=function(i,c){return i.concat(ft(S2.state(),function(i){return{type:Yf,text:i,value:i}}).concat(P2(c)))},QI=function(i,c){return function(f){f(O2(i,c))}},L2=function(i,c,f){var x="forecolor"===c?"tox-icon-text-color__color":"tox-icon-highlight-bg-color__color";i.setIconFill(x,f)},lS=function(i,c,f,x,F){i.ui.registry.addSplitButton(c,{tooltip:x,presets:"color",icon:"forecolor"===c?"text-color":"highlight-bg-color",select:function($){var se=function(i,c){var f;return i.dom.getParents(i.selection.getStart(),function(x){var F;(F=x.style["forecolor"===c?"color":"background-color"])&&(f=f||F)}),j.from(f)}(i,f);return se.bind(function(Ie){return v2(Ie).map(function(ze){var it=nA(ze).value;return Qe($.toLowerCase(),it)})}).getOr(!1)},columns:I2(i),fetch:QI(WI(i),A2(i)),onAction:function($){oA(i,f,F.get(),V)},onItemAction:function($,se){oA(i,f,se,function(Ie){F.set(Ie),function(i,c){i.fire("TextColorChange",c)}(i,{name:c,color:Ie})})},onSetup:function($){L2($,c,F.get());var se=function(Ie){Ie.name===c&&L2($,Ie.name,Ie.color)};return i.on("TextColorChange",se),function(){i.off("TextColorChange",se)}}})},k2=function(i,c,f,x){i.ui.registry.addNestedMenuItem(c,{text:x,icon:"forecolor"===c?"text-color":"highlight-bg-color",getSubmenuItems:function(){return[{type:"fancymenuitem",fancytype:"colorswatch",onAction:function(F){oA(i,f,F.value,V)}}]}})},R2=function(i){return function(c,f){var x=!1,se={colorpicker:f};i.windowManager.open({title:"Color Picker",size:"normal",body:{type:"panel",items:[{type:"colorpicker",name:"colorpicker",label:"Color"}]},buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],initialData:se,onAction:function(Ie,ze){"hex-valid"===ze.name&&(x=ze.value)},onSubmit:function(Ie){var it=Ie.getData().colorpicker;x?(c(j.from(it)),Ie.close()):i.windowManager.alert(i.translate(["Invalid hex color code: {0}",it]))},onClose:V,onCancel:function(){c(j.none())}})}},qI=function(i,c,f,x,F,$,se,Ie){var ze=Ze(c),Mt=hF(c,f,x,"color"!==F?"normal":"color",$,se,Ie);return sn(i,ze,Mt,x,F)},hF=function(i,c,f,x,F,$,se){return Ni(ft(i,function(Ie){return"choiceitem"===Ie.type?function(i){return li("choicemenuitem",Cc,i)}(Ie).fold(gt,function(ze){return j.some(function(i,c,f,x,F,$,se,Ie){void 0===Ie&&(Ie=!0);var it=tA({presets:f,textContent:c?i.text:j.none(),htmlContent:j.none(),ariaLabel:i.text,iconContent:i.icon,shortcutContent:c?i.shortcut:j.none(),checkMark:c?j.some(r2(se.icons)):j.none(),caret:j.none(),value:i.value},se,Ie);return nr(BT({data:CM(i),disabled:i.disabled,getApi:function(Mt){return{setActive:function(kt){fl.set(Mt,kt)},isActive:function(){return fl.isOn(Mt)},isDisabled:function(){return Aa.isDisabled(Mt)},setDisabled:function(kt){return Aa.set(Mt,kt)}}},onAction:function(Mt){return x(i.value)},onSetup:function(Mt){return Mt.setActive(F),V},triggersSubmenu:!1,itemBehaviours:[]},it,$,se),{toggling:{toggleClass:V_,toggleOnExecute:!1,selected:i.active}})}(ze,1===f,x,c,$(Ie.value),F,se,Ze(i)))}):j.none()}))},_w=function(i,c){var f=Re(c);return 1===i?{mode:"menu",moveOnTab:!0}:"auto"===i?{mode:"grid",selector:"."+f.item,initSize:{numColumns:1,numRows:1}}:{mode:"matrix",rowSelector:"."+("color"===c?"tox-swatches__row":"tox-collection__group")}},F2=function(i,c){return 1===i?{mode:"menu",moveOnTab:!1,selector:".tox-collection__item"}:"auto"===i?{mode:"flatgrid",selector:".tox-collection__item",initSize:{numColumns:1,numRows:1}}:{mode:"matrix",selectors:{row:"color"===c?".tox-swatches__row":".tox-collection__group",cell:"color"===c?"."+iC:"."+nC}}},B2=function(i,c){var f=i.initData.allowCustomColors&&c.colorinput.hasCustomColors();return i.initData.colors.fold(function(){return O2(c.colorinput.getColors(),f)},function(x){return x.concat(P2(f))})},U2=jo("cell-over"),vw=jo("cell-execute"),gF=function(i,c,f){var x,$=function(Ie){return Sa(Ie,vw,{row:i,col:c})},se=function(Ie,ze){ze.stop(),$(Ie)};return Ga({dom:{tag:"div",attributes:(x={role:"button"},x["aria-labelledby"]=f,x)},behaviours:ao([bs("insert-table-picker-cell",[yr(ds(),ka.focus),yr(dd(),$),yr(Td(),se),yr(up(),se)]),fl.config({toggleClass:"tox-insert-table-picker__selected",toggleOnExecute:!1}),ka.config({onFocus:function(Ie){return Sa(Ie,U2,{row:i,col:c})}})])})},yF=function(i){return wi(i,function(c){return ft(c,hd)})},z2=function(i,c){return fd(c+"x"+i)},CF={inserttable:function(i){var x=jo("size-label"),F=function(i,c,f){for(var x=[],F=0;F<c;F++){for(var $=[],se=0;se<f;se++)$.push(gF(F,se,i));x.push($)}return x}(x,10,10),$=z2(0,0),se=wl({dom:{tag:"span",classes:["tox-insert-table-picker__label"],attributes:{id:x}},components:[$],behaviours:ao([ys.config({})])});return{type:"widget",data:{value:jo("widget-id")},dom:{tag:"div",classes:["tox-fancymenuitem"]},autofocus:!0,components:[c2.widget({dom:{tag:"div",classes:["tox-insert-table-picker"]},components:yF(F).concat(se.asSpec()),behaviours:ao([bs("insert-table-picker",[Va(function(Ie){ys.set(se.get(Ie),[$])}),jf(U2,function(Ie,ze,it){var Mt=it.event,kt=Mt.row,pn=Mt.col;(function(i,c,f,x,F){for(var $=0;$<x;$++)for(var se=0;se<F;se++)fl.set(i[$][se],$<=c&&se<=f)})(F,kt,pn,10,10),ys.set(se.get(Ie),[z2(kt+1,pn+1)])}),jf(vw,function(Ie,ze,it){var Mt=it.event,kt=Mt.row,pn=Mt.col;i.onAction({numRows:kt+1,numColumns:pn+1}),Cl(Ie,hu())})]),Za.config({initSize:{numRows:10,numColumns:10},mode:"flatgrid",selector:'[role="button"]'})])})]}},colorswatch:function(i,c){var f=B2(i,c),x=c.colorinput.getColorCols(),F="color",$=qI(jo("menu-value"),f,function(Ie){i.onAction({value:Ie})},x,F,Lm.CLOSE_ON_EXECUTE,Pe,c.shared.providers),se=re(re({},$),{markers:Re(F),movement:_w(x,F)});return{type:"widget",data:{value:jo("widget-id")},dom:{tag:"div",classes:["tox-fancymenuitem"]},autofocus:!0,components:[c2.widget(j0.sketch(se))]}}},Y2=function(i,c,f,x,F,$,se,Ie){void 0===Ie&&(Ie=!0);var ze=tA({presets:x,textContent:j.none(),htmlContent:f?i.text.map(function(it){return l2(it,c)}):j.none(),ariaLabel:i.text,iconContent:i.icon,shortcutContent:j.none(),checkMark:j.none(),caret:j.none(),value:i.value},se.providers,Ie,i.icon);return BT({data:CM(i),disabled:i.disabled,getApi:X({}),onAction:function(it){return F(i.value,i.meta)},onSetup:X(V),triggersSubmenu:!1,itemBehaviours:s2(i.meta,se)},ze,$,se.providers)},H2=function(i){var c=i.text.fold(function(){return{}},function(f){return{innerHtml:f}});return{type:"separator",dom:re({tag:"div",classes:[nC,"tox-collection__group-heading"]},c),components:[]}},SF=function(i,c,f,x){void 0===x&&(x=!0);var $=tA({presets:"normal",iconContent:i.icon,textContent:i.text,htmlContent:j.none(),ariaLabel:i.text,caret:j.none(),checkMark:j.none(),shortcutContent:i.shortcut},f,x);return BT({data:CM(i),getApi:function(se){return{isDisabled:function(){return Aa.isDisabled(se)},setDisabled:function(Ie){return Aa.set(se,Ie)}}},disabled:i.disabled,onAction:i.onAction,onSetup:i.onSetup,triggersSubmenu:!1,itemBehaviours:[]},$,c,f)},XI=function(i,c,f,x,F){void 0===x&&(x=!0),void 0===F&&(F=!1);var $=F?function(i){return zI("chevron-down",i,[oC])}(f.icons):function(i){return zI("chevron-right",i,[oC])}(f.icons),Ie=tA({presets:"normal",iconContent:i.icon,textContent:i.text,htmlContent:j.none(),ariaLabel:i.text,caret:j.some($),checkMark:j.none(),shortcutContent:i.shortcut},f,x);return BT({data:CM(i),getApi:function(ze){return{isDisabled:function(){return Aa.isDisabled(ze)},setDisabled:function(it){return Aa.set(ze,it)}}},disabled:i.disabled,onAction:V,onSetup:i.onSetup,triggersSubmenu:!0,itemBehaviours:[]},Ie,c,f)},yw=function(i,c,f,x){void 0===x&&(x=!0);var $=tA({iconContent:i.icon,textContent:i.text,htmlContent:j.none(),ariaLabel:i.text,checkMark:j.some(r2(f.icons)),caret:j.none(),shortcutContent:i.shortcut,presets:"normal",meta:i.meta},f,x);return nr(BT({data:CM(i),disabled:i.disabled,getApi:function(se){return{setActive:function(Ie){fl.set(se,Ie)},isActive:function(){return fl.isOn(se)},isDisabled:function(){return Aa.isDisabled(se)},setDisabled:function(Ie){return Aa.set(se,Ie)}}},onAction:i.onAction,onSetup:i.onSetup,triggersSubmenu:!1,itemBehaviours:[]},$,c,f),{toggling:{toggleClass:V_,toggleOnExecute:!1,selected:i.active}})},AF=function(i,c){return mr(CF,i.fancytype).map(function(f){return f(i,c)})},bw=function(i,c,f,x){var $={dom:o2(i.label),optComponents:[j.some({dom:{tag:"div",classes:[lE,r0]},components:fw(i.items,x)})]};return BT({data:CM(re({text:j.none()},i)),disabled:i.disabled,getApi:function(se){return{isDisabled:function(){return Aa.isDisabled(se)},setDisabled:function(Ie){Aa.set(se,Ie),Ct(Ap(se.element,"*"),function(ze){se.getSystem().getByDom(ze).each(function(it){it.hasConfigured(Aa)&&Aa.set(it,Ie)})})}}},onAction:i.onAction,onSetup:i.onSetup,triggersSubmenu:!1,itemBehaviours:j.from(x.itemBehaviours).getOr([])},$,c,f.providers)};!function(i){i[i.ContentFocus=0]="ContentFocus",i[i.UiFocus=1]="UiFocus"}(aA||(aA={}));var wF=function(i,c,f,x,F){var $=f.shared.providers,se=function(Ie){return F?re(re({},Ie),{shortcut:j.none(),icon:Ie.text.isSome()?j.none():Ie.icon}):Ie};switch(i.type){case"menuitem":return function(i){return li("menuitem",ad,i)}(i).fold(gt,function(Ie){return j.some(SF(se(Ie),c,$,x))});case"nestedmenuitem":return function(i){return li("nestedmenuitem",u_,i)}(i).fold(gt,function(Ie){return j.some(XI(se(Ie),c,$,x,F))});case"togglemenuitem":return function(i){return li("togglemenuitem",sC,i)}(i).fold(gt,function(Ie){return j.some(yw(se(Ie),c,$,x))});case"separator":return function(i){return li("separatormenuitem",Wx,i)}(i).fold(gt,function(Ie){return j.some(H2(Ie))});case"fancymenuitem":return function(i){return li("fancymenuitem",hs,i)}(i).fold(gt,function(Ie){return AF(se(Ie),f)});default:return console.error("Unknown item in general menu",i),j.none()}},IF=function(i,c,f,x,F,$,se){var Ie=1===x,ze=!Ie||Ze(i);return Ni(ft(i,function(it){switch(it.type){case"separator":return function(i){return li("Autocompleter.Separator",Wx,i)}(it).fold(gt,function(Mt){return j.some(H2(Mt))});case"cardmenuitem":return function(i){return li("cardmenuitem",ma,i)}(it).fold(gt,function(Mt){return j.some(bw(re(re({},Mt),{onAction:function(kt){Mt.onAction(kt),f(Mt.value,Mt.meta)}}),F,$,{itemBehaviours:s2(Mt.meta,$),cardText:{matchText:c,highlightOn:se}}))});default:return function(i){return li("Autocompleter.Item",$x,i)}(it).fold(gt,function(Mt){return j.some(Y2(Mt,c,Ie,"normal",f,F,$,ze))})}}))},V2=function(i,c,f,x,F){var $=Ze(c),se=Ni(ft(c,function(ze){var Mt=function(kt){return wF(kt,f,x,function(kt){return F?!jn(kt,"text"):$}(kt),F)};return"nestedmenuitem"===ze.type&&ze.getSubmenuItems().length<=0?Mt(re(re({},ze),{disabled:!0})):Mt(ze)}));return(F?Ot:sn)(i,$,se,1,"normal")},Z2=function(i){return t0.singleData(i.value,i)},OF={register:function(i,c){var f=ku(),x=ta(!1),F=Ga(Fu.sketch({dom:{tag:"div",classes:["tox-autocompleter"]},components:[],fireDismissalEventInstead:{},inlineBehaviours:ao([bs("dismissAutocompleter",[yr(Mf(),function(){return ze()})])]),lazySink:c.getSink})),se=function(){return f.get().isSome()},Ie=function(){se()&&Fu.hide(F)},ze=function(){if(se()){var ri=f.get().map(function(Yi){return Yi.element});Y_(ri.getOr(Xn.fromDom(i.selection.getNode()))).each(xc),Ie(),f.clear(),x.set(!1)}},it=en(function(){return NT(i)}),pn=function(ri,Yi,Or,Pr){ri.matchLength=Yi.text.length;var zi=Vi(Or,function(hr){return j.from(hr.columns)}).getOr(1);Fu.showAt(F,j0.sketch(function(i,c,f,x){var F=f===aA.ContentFocus?Jb():ob(),$=_w(c,x),se=Re(x);return{dom:i.dom,components:i.components,items:i.items,value:i.value,markers:{selectedItem:se.selectedItem,item:se.item},movement:$,fakeFocus:f===aA.ContentFocus,focusManager:F,menuBehaviours:zf_unnamedEvents("auto"!==c?[]:[Va(function(Ie,ze){Ms(Ie,4,se.item).each(function(it){var Mt=it.numColumns,kt=it.numRows;Za.setGridSize(Ie,kt,Mt)})})])}}(sn("autocompleter-value",!0,Pr,zi,"normal"),zi,aA.ContentFocus,"normal")),{anchor:{type:"node",root:Xn.fromDom(i.getBody()),node:j.from(ri.element)}}),Fu.getContent(F).each(Jl.highlightFirst)},Un=function(ri){(function(ri){return f.get().map(function(Yi){return zx(i.dom,i.selection.getRng(),Yi.triggerChar).bind(function(Or){return q0(i,it,Or,ri)})}).getOrThunk(function(){return Gx(i,it)})})(ri).fold(ze,function(Yi){(function(ri){if(!se()){var Yi=Bx(i,ri.range);f.set({triggerChar:ri.triggerChar,element:Yi,matchLength:ri.text.length}),x.set(!1)}})(Yi.context),Yi.lookupData.then(function(Or){f.get().map(function(Pr){var zi=Yi.context;if(Pr.triggerChar===zi.triggerChar){var hr=function(ri,Yi){var Or=Vi(Yi,function(Pr){return j.from(Pr.columns)}).getOr(1);return wi(Yi,function(Pr){var zi=Pr.items;return IF(zi,Pr.matchText,function(hr,Br){var ko=i.selection.getRng();zx(i.dom,ko,ri).fold(function(){return console.error("Lost context. Cursor probably moved")},function(Zr){var No=Zr.range,jr={hide:function(){ze()},reload:function(Nr){Ie(),Un(Nr)}};x.set(!0),Pr.onAction(jr,No,hr,Br),x.set(!1)})},Or,Lm.BUBBLE_TO_SANDBOX,c,Pr.highlightOn)})}(zi.triggerChar,Or);hr.length>0?pn(Pr,zi,Or,hr):zi.text.length-Pr.matchLength>=10?ze():Ie()}})})})},Ui={onKeypress:Fx(function(ri){27!==ri.which&&Un()},50),cancelIfNecessary:ze,isMenuOpen:function(){return Fu.isOpen(F)},isActive:se,isProcessingAction:x.get,getView:function(){return Fu.getContent(F)}};!1===i.hasPlugin("rtc")&&KS_setup(Ui,i)}},sA=function(i,c,f){return gd(i,c,f).isSome()},W2=function(i,c){var f=null;return{cancel:function(){null!==f&&(clearTimeout(f),f=null)},schedule:function(){for(var $=[],se=0;se<arguments.length;se++)$[se]=arguments[se];f=setTimeout(function(){i.apply(null,$),f=null},c)}}},j2=function(i){var c=i.raw;return void 0===c.touches||1!==c.touches.length?j.none():j.some(c.touches[0])},eP=function(i){var c=ku(),f=ta(!1),x=W2(function(it){i.triggerEvent(jd(),it),f.set(!0)},400),Ie=vs([{key:tu(),value:function(it){return j2(it).each(function(Mt){x.cancel();var kt={x:Mt.clientX,y:Mt.clientY,target:it.target};x.schedule(it),f.set(!1),c.set(kt)}),j.none()}},{key:Sc(),value:function(it){return x.cancel(),j2(it).each(function(Mt){c.on(function(kt){(function(i,c){var f=Math.abs(i.clientX-c.x),x=Math.abs(i.clientY-c.y);return f>5||x>5})(Mt,kt)&&c.clear()})}),j.none()}},{key:Um(),value:function(it){x.cancel();return c.get().filter(function(kt){return tn(kt.target,it.target)}).map(function(kt){return f.get()?(it.prevent(),!1):i.triggerEvent(up(),it)})}}]);return{fireIfReady:function(it,Mt){return mr(Ie,Mt).bind(function(kt){return kt(it)})}}},tP=function(){return $r().browser.isFirefox()},K2=function(i,c){var f=re({stopBackspace:!0},c),F=eP(f),$=ft(["touchstart","touchmove","touchend","touchcancel","gesturestart","mousedown","mouseup","mouseover","mousemove","mouseout","click"].concat(["selectstart","input","contextmenu","change","transitionend","transitioncancel","drag","dragstart","dragend","dragenter","dragleave","dragover","drop","keyup"]),function(bn){return Nc(i,bn,function(Un){F.fireIfReady(Un,bn).each(function(Ui){Ui&&Un.kill()}),f.triggerEvent(bn,Un)&&Un.kill()})}),se=ku(),Ie=Nc(i,"paste",function(bn){F.fireIfReady(bn,"paste").each(function(di){di&&bn.kill()}),f.triggerEvent("paste",bn)&&bn.kill(),se.set(setTimeout(function(){f.triggerEvent(Zp(),bn)},0))}),ze=Nc(i,"keydown",function(bn){f.triggerEvent("keydown",bn)?bn.kill():f.stopBackspace&&function(i){return i.raw.which===Kb[0]&&!Ve(["input","textarea"],Ft(i.target))&&!sA(i.target,'[contenteditable="true"]')}(bn)&&bn.prevent()}),it=function(i,c){return tP()?g0(i,"focus",c):Nc(i,"focusin",c)}(i,function(bn){f.triggerEvent("focusin",bn)&&bn.kill()}),Mt=ku(),kt=function(i,c){return tP()?g0(i,"blur",c):Nc(i,"focusout",c)}(i,function(bn){f.triggerEvent("focusout",bn)&&bn.kill(),Mt.set(setTimeout(function(){f.triggerEvent(gh(),bn)},0))});return{unbind:function(){Ct($,function(bn){bn.unbind()}),ze.unbind(),it.unbind(),kt.unbind(),Ie.unbind(),se.on(clearTimeout),Mt.on(clearTimeout)}}},cS=function(i,c){var f=mr(i,"target").getOr(c);return ta(f)},lA=fc_generate([{stopped:[]},{resume:["element"]},{complete:[]}]),cA=function(i,c,f,x,F,$){var se=i(c,x),Ie=function(i,c){var f=ta(!1),x=ta(!1);return{stop:function(){f.set(!0)},cut:function(){x.set(!0)},isStopped:f.get,isCut:x.get,event:i,setSource:c.set,getSource:c.get}}(f,F);return se.fold(function(){return $.logEventNoHandlers(c,x),lA.complete()},function(ze){var it=ze.descHandler;return _g(it)(Ie),Ie.isStopped()?($.logEventStopped(c,ze.element,it.purpose),lA.stopped()):Ie.isCut()?($.logEventCut(c,ze.element,it.purpose),lA.complete()):La(ze.element).fold(function(){return $.logNoParent(c,ze.element,it.purpose),lA.complete()},function(kt){return $.logEventResponse(c,ze.element,it.purpose),lA.resume(kt)})})},J2=function(i,c,f,x,F,$){return cA(i,c,f,x,F,$).fold(xe,function(se){return J2(i,c,f,se,F,$)},Pe)},Q2=function(i,c,f){var x=function(i){var c=ta(!1);return{stop:function(){c.set(!0)},cut:V,isStopped:c.get,isCut:Pe,event:i,setSource:pe("Cannot set source of a broadcasted event"),getSource:pe("Cannot get source of a broadcasted event")}}(c);return Ct(i,function(F){var $=F.descHandler;_g($)(x)}),x.isStopped()},q2=function(i,c,f,x,F){var $=cS(f,x);return J2(i,c,f,x,$,F)},ZF=function(){var i={};return{registerId:function(se,Ie,ze){An(ze,function(it,Mt){var kt=void 0!==i[Mt]?i[Mt]:{};kt[Ie]=function(i,c){return function(i,c){return{cHandler:i,purpose:c}}(ge.apply(void 0,[i.handler].concat(c)),i.purpose)}(it,se),i[Mt]=kt})},unregisterId:function(se){An(i,function(Ie,ze){jn(Ie,se)&&delete Ie[se]})},filterByType:function(se){return mr(i,se).map(function(Ie){return Gr(Ie,function(ze,it){return function(i,c){return{id:i,descHandler:c}}(it,ze)})}).getOr([])},find:function(se,Ie,ze){return mr(i,Ie).bind(function(it){return O(ze,function(Mt){return function(se,Ie){return Am(Ie).bind(function(ze){return mr(se,ze)}).map(function(ze){return function(i,c){return{element:i,descHandler:c}}(Ie,ze)})}(it,Mt)},se)})}}},GF=function(){var i=ZF(),c={},f=function(it){var Mt=it.element;return Am(Mt).getOrThunk(function(){return function(i,c){var f=jo($p+i);return Lt(c,f),f}("uid-",it.element)})},$=function(it){Am(it.element).each(function(Mt){delete c[Mt],i.unregisterId(Mt)})};return{find:function(it,Mt,kt){return i.find(it,Mt,kt)},filter:function(it){return i.filterByType(it)},register:function(it){var Mt=f(it);ct(c,Mt)&&function(it,Mt){var kt=c[Mt];if(kt!==it)throw new Error('The tagId "'+Mt+'" is already used by: '+xf(kt.element)+"\nCannot use it for: "+xf(it.element)+"\nThe conflicting element is"+(Ho(kt.element)?" ":" not ")+"already in the DOM");$(it)}(it,Mt);var kt=[it];i.registerId(kt,Mt,it.events),c[Mt]=it},unregister:$,getById:function(it){return mr(c,it)}}},Yg=ch({name:"Container",factory:function(i){var c=i.dom,f=c.attributes,x=oe(c,["attributes"]);return{uid:i.uid,dom:re({tag:"div",attributes:re({role:"presentation"},f)},x),components:i.components,behaviours:lg(i.containerBehaviours),events:i.events,domModification:i.domModification,eventOrder:i.eventOrder}},configFields:[Ti("components",[]),Zu("containerBehaviours",[]),Ti("events",{}),Ti("domModification",{}),Ti("eventOrder",{})]}),X2=function(i){var c=function(ri){return La(i.element).fold(xe,function(Yi){return tn(ri,Yi)})},f=GF(),x=function(ri,Yi){return f.find(c,ri,Yi)},F=K2(i.element,{triggerEvent:function(ri,Yi){return Df(ri,Yi.target,function(Or){return function(i,c,f,x){return q2(i,c,f,f.target,x)}(x,ri,Yi,Or)})}}),$={debugInfo:X("real"),triggerEvent:function(ri,Yi,Or){Df(ri,Yi,function(Pr){return q2(x,ri,Or,Yi,Pr)})},triggerFocus:function(ri,Yi){Am(ri).fold(function(){Xd(ri)},function(Or){Df(Xl(),ri,function(Pr){return function(i,c,f,x,F){var $=cS(f,x);cA(i,c,f,x,$,F)}(x,Xl(),{originator:Yi,kill:V,prevent:V,target:ri},ri,Pr),!1})})},triggerEscape:function(ri,Yi){$.triggerEvent("keydown",ri.element,Yi.event)},getByUid:function(ri){return di(ri)},getByDom:function(ri){return Ui(ri)},build:Ga,addToGui:function(ri){ze(ri)},removeFromGui:function(ri){it(ri)},addToWorld:function(ri){se(ri)},removeFromWorld:function(ri){Ie(ri)},broadcast:function(ri){pn(ri)},broadcastOn:function(ri,Yi){bn(ri,Yi)},broadcastEvent:function(ri,Yi){Un(ri,Yi)},isConnected:xe},se=function(ri){ri.connect($),xi(ri.element)||(f.register(ri),Ct(ri.components(),se),$.triggerEvent(as(),ri.element,{target:ri.element}))},Ie=function(ri){xi(ri.element)||(Ct(ri.components(),Ie),f.unregister(ri)),ri.disconnect()},ze=function(ri){Co(i,ri)},it=function(ri){xs(ri)},kt=function(ri){var Yi=f.filter($d());Ct(Yi,function(Or){var Pr=Or.descHandler;_g(Pr)(ri)})},pn=function(ri){kt({universal:!0,data:ri})},bn=function(ri,Yi){kt({universal:!1,channels:ri,data:Yi})},Un=function(ri,Yi){var Or=f.filter(ri);return Q2(Or,Yi)},di=function(ri){return f.getById(ri).fold(function(){return ra.error(new Error('Could not find component with uid: "'+ri+'" in system.'))},ra.value)},Ui=function(ri){var Yi=Am(ri).getOr("not found");return di(Yi)};return se(i),{root:i,element:i.element,destroy:function(){F.unbind(),Rs(i.element)},add:ze,remove:it,getByUid:di,getByDom:Ui,addToWorld:se,removeFromWorld:Ie,broadcast:pn,broadcastOn:bn,broadcastEvent:Un}},$F=X([Ti("prefix","form-field"),Zu("fieldBehaviours",[Ml,Io])]),jF=X([Rg({schema:[Mr("dom")],name:"label"}),Rg({factory:{sketch:function(i){return{uid:i.uid,dom:{tag:"span",styles:{display:"none"},attributes:{"aria-hidden":"true"},innerHtml:i.text}}}},schema:[Mr("text")],name:"aria-descriptor"}),tp({factory:{sketch:function(i){var c=Ro(i,["factory"]);return i.factory.sketch(c)}},schema:[Mr("factory")],name:"field"})]),Ec=qm({name:"FormField",configFields:$F(),partFields:jF(),factory:function(i,c,f,x){var F=Od(i.fieldBehaviours,[Ml.config({find:function(Ie){return qc(Ie,i,"field")}}),Io.config({store:{mode:"manual",getValue:function(Ie){return Ml.getCurrent(Ie).bind(Io.getValue)},setValue:function(Ie,ze){Ml.getCurrent(Ie).each(function(it){Io.setValue(it,ze)})}}})]),$=uc([Va(function(Ie,ze){var it=eb(Ie,i,["label","field","aria-descriptor"]);it.field().each(function(Mt){var kt=jo(i.prefix);it.label().each(function(pn){De(pn.element,"for",kt),De(Mt.element,"id",kt)}),it["aria-descriptor"]().each(function(pn){var bn=jo(i.prefix);De(pn.element,"id",bn),De(Mt.element,"aria-describedby",bn)})})})]),se={getField:function(Ie){return qc(Ie,i,"field")},getLabel:function(Ie){return qc(Ie,i,"label")}};return{uid:i.uid,dom:i.dom,components:c,behaviours:F,events:$,apis:se}},apis:{getField:function(i,c){return i.getField(c)},getLabel:function(i,c){return i.getLabel(c)}}}),eL=Object.freeze({__proto__:null,exhibit:function(i,c){return Dd({attributes:vs([{key:c.tabAttr,value:"true"}])})}}),tL=[Ti("tabAttr","data-alloy-tabstop")],bm=Wc({fields:tL,name:"tabstopping",active:eL}),JF=tinymce.util.Tools.resolve("tinymce.html.Entities"),uA=function(i,c,f,x){var F=qF(i,c,f,x);return Ec.sketch(F)},qF=function(i,c,f,x){return{dom:nL(f),components:i.toArray().concat([c]),fieldBehaviours:ao(x)}},nL=function(i){return{tag:"div",classes:["tox-form__group"].concat(i)}},MM=function(i,c){return Ec.parts.label({dom:{tag:"label",classes:["tox-label"],innerHtml:c.translate(i)}})},vb=jo("form-component-change"),dA=jo("form-close"),nD=jo("form-cancel"),XC=jo("form-action"),by=jo("form-submit"),dE=jo("form-block"),nP=jo("form-unblock"),iP=jo("form-tabchange"),rP=jo("form-resize"),Ew=function(i,c){var f,x=i.label.map(function(kt){return MM(kt,c)}),F=function(kt){return function(pn,bn){gd(bn.event.target,"[data-collection-item-value]").each(function(Un){kt(pn,bn,Un,Xt(Un,"data-collection-item-value"))})}},se=F(function(kt,pn,bn,Un){pn.stop(),c.isDisabled()||Sa(kt,XC,{name:i.name,value:Un})}),Ie=[yr(ds(),F(function(kt,pn,bn){Xd(bn)})),yr(Td(),se),yr(up(),se),yr(xm(),F(function(kt,pn,bn){Fc(kt.element,"."+vy).each(function(Un){wc(Un,vy)}),Qc(bn,vy)})),yr(Ns(),F(function(kt){Fc(kt.element,"."+vy).each(function(pn){wc(pn,vy)})})),Wp(F(function(kt,pn,bn,Un){Sa(kt,XC,{name:i.name,value:Un})}))],ze=function(kt,pn){return ft(Ap(kt.element,".tox-collection__item"),pn)},it=Ec.parts.field({dom:{tag:"div",classes:["tox-collection"].concat(1!==i.columns?["tox-collection--grid"]:["tox-collection--list"])},components:[],factory:{sketch:ve},behaviours:ao([Aa.config({disabled:c.isDisabled,onDisabled:function(kt){ze(kt,function(pn){Qc(pn,"tox-collection__item--state-disabled"),De(pn,"aria-disabled",!0)})},onEnabled:function(kt){ze(kt,function(pn){wc(pn,"tox-collection__item--state-disabled"),Fe(pn,"aria-disabled")})}}),bf(),ys.config({}),Io.config({store:{mode:"memory",initialValue:[]},onSetValue:function(kt,pn){(function(kt,pn){var bn=ft(pn,function(Ui){var ri=Bf.translate(Ui.text),Yi=1===i.columns?'<div class="tox-collection__item-label">'+ri+"</div>":"",Or='<div class="tox-collection__item-icon">'+Ui.icon+"</div>",Pr={_:" "," - ":" ","-":" "},zi=ri.replace(/\_| \- |\-/g,function(Br){return Pr[Br]});return'<div class="tox-collection__item'+(c.isDisabled()?" tox-collection__item--state-disabled":"")+'" tabindex="-1" data-collection-item-value="'+JF.encodeAllRaw(Ui.value)+'" title="'+zi+'" aria-label="'+zi+'">'+Or+Yi+"</div>"}),Un="auto"!==i.columns&&i.columns>1?wt(bn,i.columns):[bn],di=ft(Un,function(Ui){return'<div class="tox-collection__group">'+Ui.join("")+"</div>"});Bh(kt.element,di.join(""))})(kt,pn),"auto"===i.columns&&Ms(kt,5,"tox-collection__item").each(function(bn){var Un=bn.numRows,di=bn.numColumns;Za.setGridSize(kt,Un,di)}),Cl(kt,rP)}}),bm.config({}),Za.config(F2(i.columns,"normal")),bs("collection-events",Ie)]),eventOrder:(f={},f[dd()]=["disabling","alloy.base.behaviour","collection-events"],f)});return uA(x,it,["tox-form__group--collection"],[])},iL=X([Es("data"),Ti("inputAttributes",{}),Ti("inputStyles",{}),Ti("tag","input"),Ti("inputClasses",[]),kl("onSetValue"),Ti("styles",{}),Ti("eventOrder",{}),Zu("inputBehaviours",[Io,ka]),Ti("selectOnFocus",!0)]),Mw=function(i){return ao([ka.config({onFocus:i.selectOnFocus?function(c){var f=c.element,x=dm(f);f.dom.setSelectionRange(0,x.length)}:V})])},oP=function(i){return re(re({},Mw(i)),Od(i.inputBehaviours,[Io.config({store:re(re({mode:"manual"},i.data.map(function(c){return{initialValue:c}}).getOr({})),{getValue:function(c){return dm(c.element)},setValue:function(c,f){dm(c.element)!==f&&Ch(c.element,f)}}),onSetValue:i.onSetValue})]))},Tw=function(i){return{tag:i.tag,attributes:re({type:"text"},i.inputAttributes),styles:i.inputStyles,classes:i.inputClasses}},pA=ch({name:"Input",configFields:iL(),factory:function(i,c){return{uid:i.uid,dom:Tw(i),components:[],behaviours:oP(i),eventOrder:i.eventOrder}}}),rL={},mA={exports:rL};!function(i,c,f,x){var F,$;F=this,$=function(){var it,F=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},$={exports:{}};it=$,function(Mt){var kt=setTimeout;function pn(){}function Un(zi){if("object"!=typeof this)throw new TypeError("Promises must be constructed via new");if("function"!=typeof zi)throw new TypeError("not a function");this._state=0,this._handled=!1,this._value=void 0,this._deferreds=[],Pr(zi,this)}function di(zi,hr){for(;3===zi._state;)zi=zi._value;0!==zi._state?(zi._handled=!0,Un._immediateFn(function(){var Br=1===zi._state?hr.onFulfilled:hr.onRejected;if(null!==Br){var ko;try{ko=Br(zi._value)}catch(Zr){return void ri(hr.promise,Zr)}Ui(hr.promise,ko)}else(1===zi._state?Ui:ri)(hr.promise,zi._value)})):zi._deferreds.push(hr)}function Ui(zi,hr){try{if(hr===zi)throw new TypeError("A promise cannot be resolved with itself.");if(hr&&("object"==typeof hr||"function"==typeof hr)){var Br=hr.then;if(hr instanceof Un)return zi._state=3,zi._value=hr,void Yi(zi);if("function"==typeof Br)return void Pr(function bn(zi,hr){return function(){zi.apply(hr,arguments)}}(Br,hr),zi)}zi._state=1,zi._value=hr,Yi(zi)}catch(ko){ri(zi,ko)}}function ri(zi,hr){zi._state=2,zi._value=hr,Yi(zi)}function Yi(zi){2===zi._state&&0===zi._deferreds.length&&Un._immediateFn(function(){zi._handled||Un._unhandledRejectionFn(zi._value)});for(var hr=0,Br=zi._deferreds.length;hr<Br;hr++)di(zi,zi._deferreds[hr]);zi._deferreds=null}function Or(zi,hr,Br){this.onFulfilled="function"==typeof zi?zi:null,this.onRejected="function"==typeof hr?hr:null,this.promise=Br}function Pr(zi,hr){var Br=!1;try{zi(function(ko){Br||(Br=!0,Ui(hr,ko))},function(ko){Br||(Br=!0,ri(hr,ko))})}catch(ko){if(Br)return;Br=!0,ri(hr,ko)}}Un.prototype.catch=function(zi){return this.then(null,zi)},Un.prototype.then=function(zi,hr){var Br=new this.constructor(pn);return di(this,new Or(zi,hr,Br)),Br},Un.all=function(zi){var hr=Array.prototype.slice.call(zi);return new Un(function(Br,ko){if(0===hr.length)return Br([]);var Zr=hr.length;function No(Nr,bo){try{if(bo&&("object"==typeof bo||"function"==typeof bo)){var fa=bo.then;if("function"==typeof fa)return void fa.call(bo,function(Vr){No(Nr,Vr)},ko)}hr[Nr]=bo,0==--Zr&&Br(hr)}catch(Vr){ko(Vr)}}for(var jr=0;jr<hr.length;jr++)No(jr,hr[jr])})},Un.resolve=function(zi){return zi&&"object"==typeof zi&&zi.constructor===Un?zi:new Un(function(hr){hr(zi)})},Un.reject=function(zi){return new Un(function(hr,Br){Br(zi)})},Un.race=function(zi){return new Un(function(hr,Br){for(var ko=0,Zr=zi.length;ko<Zr;ko++)zi[ko].then(hr,Br)})},Un._immediateFn="function"==typeof setImmediate?function(zi){setImmediate(zi)}:function(zi){kt(zi,0)},Un._unhandledRejectionFn=function(hr){typeof console<"u"&&console&&console.warn("Possible Unhandled Promise Rejection:",hr)},Un._setImmediateFn=function(hr){Un._immediateFn=hr},Un._setUnhandledRejectionFn=function(hr){Un._unhandledRejectionFn=hr},it.exports?it.exports=Un:Mt.Promise||(Mt.Promise=Un)}(F);var se=$.exports;return{boltExport:(typeof window<"u"?window:Function("return this;")()).Promise||se}},"object"==typeof c&&typeof f<"u"?f.exports=$():(F=typeof globalThis<"u"?globalThis:F||self).EphoxContactWrapper=$()}(0,rL,mA);var cC,TM=mA.exports.boltExport,aP=function(i){var c=j.none(),f=[],F=function(it){se()?ze(it):f.push(it)},se=function(){return c.isSome()},Ie=function(it){Ct(it,ze)},ze=function(it){c.each(function(Mt){setTimeout(function(){it(Mt)},0)})};return i(function(it){se()||(c=j.some(it),Ie(f),f=[])}),{get:F,map:function(it){return aP(function(Mt){F(function(kt){Mt(it(kt))})})},isReady:se}},oL={nu:aP,pure:function(i){return aP(function(c){c(i)})}},nN=function(i){setTimeout(function(){throw i},0)},iD=function(i){var c=function(ze){i().then(ze,nN)};return{map:function(ze){return iD(function(){return i().then(ze)})},bind:function(ze){return iD(function(){return i().then(function(it){return ze(it).toPromise()})})},anonBind:function(ze){return iD(function(){return i().then(function(){return ze.toPromise()})})},toLazy:function(){return oL.nu(c)},toCached:function(){var ze=null;return iD(function(){return null===ze&&(ze=i()),ze})},toPromise:i,get:c}},Fh_nu=function(i){return iD(function(){return new TM(i)})},Fh_pure=function(i){return iD(function(){return TM.resolve(i)})},oN=["input","textarea"],aL=function(i){var c=Ft(i);return Ve(oN,c)},sP=function(i,c){var f=c.getRoot(i).getOr(i.element);wc(f,c.invalidClass),c.notify.each(function(x){aL(i.element)&&De(i.element,"aria-invalid",!1),x.getContainer(i).each(function(F){Bh(F,x.validHtml)}),x.onValid(i)})},lP=function(i,c,f,x){var F=c.getRoot(i).getOr(i.element);Qc(F,c.invalidClass),c.notify.each(function($){aL(i.element)&&De(i.element,"aria-invalid",!0),$.getContainer(i).each(function(se){Bh(se,x)}),$.onInvalid(i,x)})},sL=function(i,c,f){return c.validator.fold(function(){return Fh_pure(ra.value(!0))},function(x){return x.validate(i)})},cP=function(i,c,f){return c.notify.each(function(x){x.onValidate(i)}),sL(i,c).map(function(x){return i.getSystem().isConnected()?x.fold(function(F){return lP(i,c,0,F),ra.error(F)},function(F){return sP(i,c),ra.value(F)}):ra.error("No longer in system")})},sN=Object.freeze({__proto__:null,markValid:sP,markInvalid:lP,query:sL,run:cP,isInvalid:function(i,c){var f=c.getRoot(i).getOr(i.element);return Ep(f,c.invalidClass)}}),xw=Object.freeze({__proto__:null,events:function(i,c){return i.validator.map(function(f){return uc([yr(f.onEvent,function(x){cP(x,i).get(ve)})].concat(f.validateOnLoad?[Va(function(x){cP(x,i).get(V)})]:[]))}).getOr({})}}),Z_=[Mr("invalidClass"),Ti("getRoot",j.none),yl("notify",[Ti("aria","alert"),Ti("getContainer",j.none),Ti("validHtml",""),kl("onValid"),kl("onInvalid"),kl("onValidate")]),yl("validator",[Mr("validate"),Ti("onEvent","input"),Ti("validateOnLoad",!0)])],e1=Wc({fields:Z_,name:"invalidating",active:xw,apis:sN,extra:{validation:function(i){return function(c){var f=Io.getValue(c);return Fh_pure(i(f))}}}}),uN=Object.freeze({__proto__:null,getCoupled:function(i,c,f,x){return f.getOrCreate(i,c,x)}}),dN=[sl("others",Ht(ra.value,yc()))],lL=Object.freeze({__proto__:null,init:function(){var i={},f=X({});return zu({readState:f,getOrCreate:function(x,F,$){var se=Vn(F.others);if(se)return mr(i,$).getOrThunk(function(){var ze=mr(F.others,$).getOrDie("No information found for coupled component: "+$)(x),it=x.getSystem().build(ze);return i[$]=it,it});throw new Error("Cannot find coupled component: "+$+". Known coupled components: "+JSON.stringify(se,null,2))}})}}),Cm=Wc({fields:dN,name:"coupling",apis:uN,state:lL}),cL=X("sink"),uL=X(Rg({name:cL(),overrides:X({dom:{tag:"div"},behaviours:ao([zn.config({useFixed:xe})]),events:uc([rf(Dm()),rf(mu()),rf(Td())])})}));!function(i){i[i.HighlightFirst=0]="HighlightFirst",i[i.HighlightNone=1]="HighlightNone"}(cC||(cC={}));var jP,dL=function(i,c){var f=i.getHotspot(c).getOr(c),x="hotspot",F=i.getAnchorOverrides();return i.layouts.fold(function(){return{type:x,hotspot:f,overrides:F}},function($){return{type:x,hotspot:f,overrides:F,layouts:$}})},Dw=function(i,c,f,x,F,$,se){var ze=function(i,c,f,x,F,$,se){var Ie=function(i,c,f){return(0,i.fetch)(f).map(c)}(i,c,x),ze=fL(x,i);return Ie.map(function(it){return it.bind(function(Mt){return j.from(t0.sketch(re(re({},$.menu()),{uid:yh(""),data:Mt,highlightImmediately:se===cC.HighlightFirst,onOpenMenu:function(kt,pn){var bn=ze().getOrDie();zn.position(bn,pn,{anchor:f}),el.decloak(F)},onOpenSubmenu:function(kt,pn,bn){var Un=ze().getOrDie();zn.position(Un,bn,{anchor:{type:"submenu",item:pn}}),el.decloak(F)},onRepositionMenu:function(kt,pn,bn){var Un=ze().getOrDie();zn.position(Un,pn,{anchor:f}),Ct(bn,function(di){zn.position(Un,di.triggeredMenu,{anchor:{type:"submenu",item:di.triggeringItem}})})},onEscape:function(){return ka.focus(x),el.close(F),j.some(!0)}})))})})}(i,c,dL(i,f),f,x,F,se);return ze.map(function(it){return it.fold(function(){el.isOpen(x)&&el.close(x)},function(Mt){el.cloak(x),el.open(x,Mt),$(x)}),x})},mN=function(i,c,f,x,F,$,se){return el.close(x),Fh_pure(x)},uS=function(i,c,f,x,F,$){var se=Cm.getCoupled(f,"sandbox");return(el.isOpen(se)?mN:Dw)(i,c,f,se,x,F,$)},fN=function(i,c,f){var x=Ml.getCurrent(c).getOr(c),F=ks(i.element);f?Ki(x.element,"min-width",F+"px"):function(i,c){rs.set(i,c)}(x.element,F)},fL=function(i,c){return i.getSystem().getByUid(c.uid+"-"+cL()).map(function(f){return function(){return ra.value(f)}}).getOrThunk(function(){return c.lazySink.fold(function(){return function(){return ra.error(new Error("No internal sink is specified, nor could an external sink be found"))}},function(f){return function(){return f(i)}})})},hL=function(i){el.getState(i).each(function(c){t0.repositionMenus(c)})},uP=function(i,c,f){var x=uf(),se=fL(c,i);return{dom:{tag:"div",classes:i.sandboxClasses,attributes:{id:x.id,role:"listbox"}},behaviours:Lh_augment(i.sandboxBehaviours,[Io.config({store:{mode:"memory",initialValue:c}}),el.config({onOpen:function(Ie,ze){var it=dL(i,c);x.link(c.element),i.matchWidth&&fN(it.hotspot,ze,i.useMinWidth),i.onOpen(it,Ie,ze),void 0!==f&&void 0!==f.onOpen&&f.onOpen(Ie,ze)},onClose:function(Ie,ze){x.unlink(c.element),void 0!==f&&void 0!==f.onClose&&f.onClose(Ie,ze)},isPartOf:function(Ie,ze,it){return Eg(ze,it)||Eg(c,it)},getAttachPoint:function(){return se().getOrDie()}}),Ml.config({find:function(Ie){return el.getState(Ie).bind(function(ze){return Ml.getCurrent(ze)})}}),Id.config({channels:re(re({},Km({isExtraPart:Pe})),sg({doReposition:hL}))})])}},zT=function(i){var c=Cm.getCoupled(i,"sandbox");hL(c)},dP=function(){return[Ti("sandboxClasses",[]),Lh_field("sandboxBehaviours",[Ml,Id,el,Io])]},hN=X([Mr("dom"),Mr("fetch"),kl("onOpen"),Gc("onExecute"),Ti("getHotspot",j.some),Ti("getAnchorOverrides",X({})),rd(),Zu("dropdownBehaviours",[fl,Cm,Za,ka]),Mr("toggleClass"),Ti("eventOrder",{}),Es("lazySink"),Ti("matchWidth",!1),Ti("useMinWidth",!1),Es("role")].concat(dP())),YT=X([kg({schema:[Wm()],name:"menu",defaults:function(i){return{onExecute:i.onExecute}}}),uL()]),uC=qm({name:"Dropdown",configFields:hN(),partFields:YT(),factory:function(i,c,f,x){var F,Mt,se=function(Mt){el.getState(Mt).each(function(kt){t0.highlightPrimary(kt)})},ze={expand:function(Mt){fl.isOn(Mt)||uS(i,ve,Mt,x,V,cC.HighlightNone).get(V)},open:function(Mt){fl.isOn(Mt)||uS(i,ve,Mt,x,V,cC.HighlightFirst).get(V)},isOpen:fl.isOn,close:function(Mt){fl.isOn(Mt)&&uS(i,ve,Mt,x,V,cC.HighlightFirst).get(V)},repositionMenus:function(Mt){fl.isOn(Mt)&&zT(Mt)}},it=function(Mt,kt){return pd(Mt),j.some(!0)};return{uid:i.uid,dom:i.dom,components:c,behaviours:Od(i.dropdownBehaviours,[fl.config({toggleClass:i.toggleClass,aria:{mode:"expanded"}}),Cm.config({others:{sandbox:function(Mt){return uP(i,Mt,{onOpen:function(){return fl.on(Mt)},onClose:function(){return fl.off(Mt)}})}}}),Za.config({mode:"special",onSpace:it,onEnter:it,onDown:function(Mt,kt){if(uC.isOpen(Mt)){var pn=Cm.getCoupled(Mt,"sandbox");se(pn)}else uC.open(Mt);return j.some(!0)},onEscape:function(Mt,kt){return uC.isOpen(Mt)?(uC.close(Mt),j.some(!0)):j.none()}}),ka.config({})]),events:oM(j.some(function(Mt){uS(i,ve,Mt,x,se,cC.HighlightFirst).get(V)})),eventOrder:re(re({},i.eventOrder),(F={},F[dd()]=["disabling","toggling","alloy.base.behaviour"],F)),apis:ze,domModification:{attributes:re(re({"aria-haspopup":"true"},i.role.fold(function(){return{}},function(Mt){return{role:Mt}})),"button"===i.dom.tag?{type:(Mt="type",mr(i.dom,"attributes").bind(function(kt){return mr(kt,Mt)})).getOr("button")}:{})}}},apis:{open:function(i,c){return i.open(c)},expand:function(i,c){return i.expand(c)},close:function(i,c){return i.close(c)},isOpen:function(i,c){return i.isOpen(c)},repositionMenus:function(i,c){return i.repositionMenus(c)}}}),_L=Object.freeze({__proto__:null,events:function(){return uc([vh(Wg(),xe)])},exhibit:function(){return Dd({styles:{"-webkit-user-select":"none","user-select":"none","-ms-user-select":"none","-moz-user-select":"-moz-none"},attributes:{unselectable:"on"}})}}),fA=Wc({fields:[],name:"unselecting",active:_L}),hA=jo("color-input-change"),vL=jo("color-swatch-change"),pP=jo("color-picker-cancel"),vN=function(i,c,f){var x=Ec.parts.field({factory:pA,inputClasses:["tox-textfield"],onSetValue:function(ze){return e1.run(ze).get(V)},inputBehaviours:ao([Aa.config({disabled:c.providers.isDisabled}),bf(),bm.config({}),e1.config({invalidClass:"tox-textbox-field-invalid",getRoot:function(ze){return La(ze.element)},notify:{onValid:function(ze){var it=Io.getValue(ze);Sa(ze,hA,{color:it})}},validator:{validateOnLoad:!1,validate:function(ze){var it=Io.getValue(ze);if(0===it.length)return Fh_pure(ra.value(!0));var Mt=Xn.fromTag("span");Ki(Mt,"background-color",it);var kt=$o(Mt,"background-color").fold(function(){return ra.error("blah")},function(pn){return ra.value(it)});return Fh_pure(kt)}}})]),selectOnFocus:!1}),F=i.label.map(function(ze){return MM(ze,c.providers)}),$=function(ze,it){Sa(ze,vL,{value:it})},Ie=wl(function(i,c){return uC.sketch({dom:i.dom,components:i.components,toggleClass:"mce-active",dropdownBehaviours:ao([lC_button(c.providers.isDisabled),bf(),fA.config({}),bm.config({})]),layouts:i.layouts,sandboxClasses:["tox-dialog__popups"],lazySink:c.getSink,fetch:function(f){return Fh_nu(function(x){return i.fetch(x)}).map(function(x){return j.from(Z2(nr(qI(jo("menu-value"),x,function(F){i.onItemAction(f,F)},i.columns,i.presets,Lm.CLOSE_ON_EXECUTE,Pe,c.providers),{movement:_w(i.columns,i.presets)})))})},parts:{menu:b(0,0,i.presets)}})}({dom:{tag:"span",attributes:{"aria-label":c.providers.translate("Color swatch")}},layouts:{onRtl:function(){return[tm,Bp,Hu]},onLtr:function(){return[Bp,tm,Hu]}},components:[],fetch:QI(f.getColors(),f.hasCustomColors()),columns:f.getColorCols(),presets:"color",onItemAction:function(ze,it){Ie.getOpt(ze).each(function(Mt){"custom"===it?f.colorPicker(function(kt){kt.fold(function(){return Cl(Mt,pP)},function(pn){$(Mt,pn),jI(pn)})},"#ffffff"):$(Mt,"remove"===it?"":it)})}},c));return Ec.sketch({dom:{tag:"div",classes:["tox-form__group"]},components:F.toArray().concat([{dom:{tag:"div",classes:["tox-color-input"]},components:[x,Ie.asSpec()]}]),fieldBehaviours:ao([bs("form-field-events",[yr(hA,function(ze,it){Ie.getOpt(ze).each(function(Mt){Ki(Mt.element,"background-color",it.event.color)}),Sa(ze,vb,{name:i.name})}),yr(vL,function(ze,it){Ec.getField(ze).each(function(Mt){Io.setValue(Mt,it.event.value),Ml.getCurrent(ze).each(ka.focus)})}),yr(pP,function(ze,it){Ec.getField(ze).each(function(Mt){Ml.getCurrent(ze).each(ka.focus)})})])])})},yN=Rg({schema:[Mr("dom")],name:"label"}),HT=function(i){return Rg({name:i+"-edge",overrides:function(c){return c.model.manager.edgeActions[i].fold(function(){return{}},function(x){return{events:uc([Eb(tu(),function(F,$,se){return x(F,se)},[c]),Eb(mu(),function(F,$,se){return x(F,se)},[c]),Eb(us(),function(F,$,se){se.mouseIsDown.get()&&x(F,se)},[c])])}})}})},mP=HT("top-left"),bN=HT("top"),CN=HT("top-right"),EN=HT("right"),MN=HT("bottom-right"),TN=HT("bottom"),xN=HT("bottom-left"),DN=HT("left"),yL=tp({name:"thumb",defaults:X({dom:{styles:{position:"absolute"}}}),overrides:function(i){return{events:uc([$f(tu(),i,"spectrum"),$f(Sc(),i,"spectrum"),$f(Um(),i,"spectrum"),$f(mu(),i,"spectrum"),$f(us(),i,"spectrum"),$f(cd(),i,"spectrum")])}}}),bL=tp({schema:[Yl("mouseIsDown",function(){return ta(!1)})],name:"spectrum",overrides:function(i){var f=i.model.manager,x=function(F,$){return f.getValueFromEvent($).map(function(se){return f.setValueFrom(F,i,se)})};return{behaviours:ao([Za.config({mode:"special",onLeft:function(F){return f.onLeft(F,i)},onRight:function(F){return f.onRight(F,i)},onUp:function(F){return f.onUp(F,i)},onDown:function(F){return f.onDown(F,i)}}),ka.config({})]),events:uc([yr(tu(),x),yr(Sc(),x),yr(mu(),x),yr(us(),function(F,$){i.mouseIsDown.get()&&x(F,$)})])}}}),SN=[yN,DN,EN,bN,TN,mP,CN,xN,MN,yL,bL],gA=X("slider.change.value"),fP=function(i){var c=i.event.raw;if(function(i){return-1!==i.type.indexOf("touch")}(c)){var f=c;return void 0!==f.touches&&1===f.touches.length?j.some(f.touches[0]).map(function(F){return Da(F.clientX,F.clientY)}):j.none()}var x=c;return void 0!==x.clientX?j.some(x).map(function(F){return Da(F.clientX,F.clientY)}):j.none()},rD=function(i){return i.model.minX},VT=function(i){return i.model.minY},Aw=function(i){return i.model.minX-1},ww=function(i){return i.model.minY-1},oD=function(i){return i.model.maxX},aD=function(i){return i.model.maxY},sD=function(i){return i.model.maxX+1},Iw=function(i){return i.model.maxY+1},TL=function(i,c,f){return c(i)-f(i)},t1=function(i){return TL(i,oD,rD)},hP=function(i){return TL(i,aD,VT)},lD=function(i){return t1(i)/2},gP=function(i){return hP(i)/2},ZT=function(i){return i.stepSize},xL=function(i){return i.snapToGrid},DL=function(i){return i.snapStart},SL=function(i){return i.rounded},_A=function(i,c){return void 0!==i[c+"-edge"]},AL=function(i){return _A(i,"left")},vA=function(i){return _A(i,"right")},wL=function(i){return _A(i,"top")},Cy=function(i){return _A(i,"bottom")},xM=function(i){return i.model.value.get()},IL=function(i){return{x:i}},_P=function(i){return{y:i}},DM=function(i,c){return{x:i,y:c}},dC=function(i,c){Sa(i,gA(),{value:c})},vP=function(i,c,f,x){return i<c?i:i>f?f:i===c?c-1:Math.max(c,i-x)},dS=function(i,c,f,x){return i>f?i:i<c?c:i===f?f+1:Math.min(f,i+x)},cD=function(i,c,f){return Math.max(c,Math.min(f,i))},yP=function(i){var c=i.min,f=i.max,x=i.range,F=i.value,$=i.step,se=i.snap,Ie=i.snapStart,ze=i.rounded,it=i.hasMinEdge,Mt=i.hasMaxEdge,kt=i.minBound,pn=i.maxBound,bn=i.screenRange,Un=it?c-1:c,di=Mt?f+1:f;if(F<kt)return Un;if(F>pn)return di;var Ui=function(i,c,f){return Math.min(f,Math.max(i,c))-c}(F,kt,pn),ri=cD(Ui/bn*x+c,Un,di);return se&&ri>=c&&ri<=f?function(i,c,f,x,F){return F.fold(function(){var $=i-c,se=Math.round($/x)*x;return cD(c+se,c-1,f+1)},function($){var se=(i-$)%x,Ie=Math.round(se/x),ze=Math.floor((i-$)/x),it=Math.floor((f-$)/x),kt=$+Math.min(it,ze+Ie)*x;return Math.max($,kt)})}(ri,c,f,$,Ie):ze?Math.round(ri):ri},RL=function(i){var c=i.min,f=i.max,x=i.range,F=i.value,$=i.hasMinEdge,se=i.hasMaxEdge,Ie=i.maxBound,ze=i.maxOffset,it=i.centerMinEdge,Mt=i.centerMaxEdge;return F<c?$?0:it:F>f?se?Ie:Mt:(F-c)/x*ze},CP="left",pC=function(i){return i.element.dom.getBoundingClientRect()},s0=function(i,c){return i[c]},dg=function(i){var c=pC(i);return s0(c,CP)},EP=function(i){var c=pC(i);return s0(c,"right")},Ow=function(i){var c=pC(i);return s0(c,"top")},UL=function(i){var c=pC(i);return s0(c,"bottom")},MP=function(i){var c=pC(i);return s0(c,"width")},zL=function(i){var c=pC(i);return s0(c,"height")},YL=function(i,c,f){return(i+c)/2-f},HL=function(i,c){var f=pC(i),x=pC(c),F=s0(f,CP),$=s0(f,"right"),se=s0(x,CP);return YL(F,$,se)},TP=function(i,c){var f=pC(i),x=pC(c),F=s0(f,"top"),$=s0(f,"bottom"),se=s0(x,"top");return YL(F,$,se)},l0=function(i,c){Sa(i,gA(),{value:c})},pS=function(i){return{x:i}},Lw=function(i,c,f){var x={min:rD(c),max:oD(c),range:t1(c),value:f,step:ZT(c),snap:xL(c),snapStart:DL(c),rounded:SL(c),hasMinEdge:AL(c),hasMaxEdge:vA(c),minBound:dg(i),maxBound:EP(i),screenRange:MP(i)};return yP(x)},VL=function(i){return function(c,f){return function(i,c,f){var F=(i>0?dS:vP)(xM(f).x,rD(f),oD(f),ZT(f));return l0(c,pS(F)),j.some(F)}(i,c,f).map(xe)}},bA=function(i,c,f,x,F,$){var se=function(i,c,f,x,F){var se=MP(i),Ie=x.bind(function(Mt){return j.some(HL(Mt,i))}).getOr(0),ze=F.bind(function(Mt){return j.some(HL(Mt,i))}).getOr(se),it={min:rD(c),max:oD(c),range:t1(c),value:f,hasMinEdge:AL(c),hasMaxEdge:vA(c),minBound:dg(i),minOffset:0,maxBound:EP(i),maxOffset:se,centerMinEdge:Ie,centerMaxEdge:ze};return RL(it)}(c,$,f,x,F);return dg(c)-dg(i)+se},ZL=VL(-1),ZN=VL(1),pE=j.none,Rw=j.none,GN={"top-left":j.none(),top:j.none(),"top-right":j.none(),right:j.some(function(i,c){dC(i,IL(sD(c)))}),"bottom-right":j.none(),bottom:j.none(),"bottom-left":j.none(),left:j.some(function(i,c){dC(i,IL(Aw(c)))})},WN=Object.freeze({__proto__:null,setValueFrom:function(i,c,f){var x=Lw(i,c,f),F=pS(x);return l0(i,F),x},setToMin:function(i,c){var f=rD(c);l0(i,pS(f))},setToMax:function(i,c){var f=oD(c);l0(i,pS(f))},findValueOfOffset:Lw,getValueFromEvent:function(i){return fP(i).map(function(f){return f.left})},findPositionOfValue:bA,setPositionFromValue:function(i,c,f,x){var F=xM(f),$=bA(i,x.getSpectrum(i),F.x,x.getLeftEdge(i),x.getRightEdge(i),f),se=ks(c.element)/2;Ki(c.element,"left",$-se+"px")},onLeft:ZL,onRight:ZN,onUp:pE,onDown:Rw,edgeActions:GN}),CA=function(i,c){Sa(i,gA(),{value:c})},EA=function(i){return{y:i}},MA=function(i,c,f){var x={min:VT(c),max:aD(c),range:hP(c),value:f,step:ZT(c),snap:xL(c),snapStart:DL(c),rounded:SL(c),hasMinEdge:wL(c),hasMaxEdge:Cy(c),minBound:Ow(i),maxBound:UL(i),screenRange:zL(i)};return yP(x)},WL=function(i){return function(c,f){return function(i,c,f){var F=(i>0?dS:vP)(xM(f).y,VT(f),aD(f),ZT(f));return CA(c,EA(F)),j.some(F)}(i,c,f).map(xe)}},DP=function(i,c,f,x,F,$){var se=function(i,c,f,x,F){var se=zL(i),Ie=x.bind(function(Mt){return j.some(TP(Mt,i))}).getOr(0),ze=F.bind(function(Mt){return j.some(TP(Mt,i))}).getOr(se),it={min:VT(c),max:aD(c),range:hP(c),value:f,hasMinEdge:wL(c),hasMaxEdge:Cy(c),minBound:Ow(i),minOffset:0,maxBound:UL(i),maxOffset:se,centerMinEdge:Ie,centerMaxEdge:ze};return RL(it)}(c,$,f,x,F);return Ow(c)-Ow(i)+se},QN=j.none,SP=j.none,uD=WL(-1),qN=WL(1),$L={"top-left":j.none(),top:j.some(function(i,c){dC(i,_P(ww(c)))}),"top-right":j.none(),right:j.none(),"bottom-right":j.none(),bottom:j.some(function(i,c){dC(i,_P(Iw(c)))}),"bottom-left":j.none(),left:j.none()},XN=Object.freeze({__proto__:null,setValueFrom:function(i,c,f){var x=MA(i,c,f),F=EA(x);return CA(i,F),x},setToMin:function(i,c){var f=VT(c);CA(i,EA(f))},setToMax:function(i,c){var f=aD(c);CA(i,EA(f))},findValueOfOffset:MA,getValueFromEvent:function(i){return fP(i).map(function(f){return f.top})},findPositionOfValue:DP,setPositionFromValue:function(i,c,f,x){var F=xM(f),$=DP(i,x.getSpectrum(i),F.y,x.getTopEdge(i),x.getBottomEdge(i),f),se=hl(c.element)/2;Ki(c.element,"top",$-se+"px")},onLeft:QN,onRight:SP,onUp:uD,onDown:qN,edgeActions:$L}),Fw=function(i,c){Sa(i,gA(),{value:c})},Nw=function(i,c){return{x:i,y:c}},DA=function(i,c){return function(f,x){return function(i,c,f,x){var F=i>0?dS:vP,$=c?xM(x).x:F(xM(x).x,rD(x),oD(x),ZT(x)),se=c?F(xM(x).y,VT(x),aD(x),ZT(x)):xM(x).y;return Fw(f,Nw($,se)),j.some($)}(i,c,f,x).map(xe)}},IP=DA(-1,!1),KL=DA(1,!1),i6=DA(-1,!0),r6=DA(1,!0),Bw={"top-left":j.some(function(i,c){dC(i,DM(Aw(c),ww(c)))}),top:j.some(function(i,c){dC(i,DM(lD(c),ww(c)))}),"top-right":j.some(function(i,c){dC(i,DM(sD(c),ww(c)))}),right:j.some(function(i,c){dC(i,DM(sD(c),gP(c)))}),"bottom-right":j.some(function(i,c){dC(i,DM(sD(c),Iw(c)))}),bottom:j.some(function(i,c){dC(i,DM(lD(c),Iw(c)))}),"bottom-left":j.some(function(i,c){dC(i,DM(Aw(c),Iw(c)))}),left:j.some(function(i,c){dC(i,DM(Aw(c),gP(c)))})},JL=Object.freeze({__proto__:null,setValueFrom:function(i,c,f){var x=Lw(i,c,f.left),F=MA(i,c,f.top),$=Nw(x,F);return Fw(i,$),$},setToMin:function(i,c){var f=rD(c),x=VT(c);Fw(i,Nw(f,x))},setToMax:function(i,c){var f=oD(c),x=aD(c);Fw(i,Nw(f,x))},getValueFromEvent:function(i){return fP(i)},setPositionFromValue:function(i,c,f,x){var F=xM(f),$=bA(i,x.getSpectrum(i),F.x,x.getLeftEdge(i),x.getRightEdge(i),f),se=DP(i,x.getSpectrum(i),F.y,x.getTopEdge(i),x.getBottomEdge(i),f),Ie=ks(c.element)/2,ze=hl(c.element)/2;Ki(c.element,"left",$-Ie+"px"),Ki(c.element,"top",se-ze+"px")},onLeft:IP,onRight:KL,onUp:i6,onDown:r6,edgeActions:Bw}),o6=[Ti("stepSize",1),Ti("onChange",V),Ti("onChoose",V),Ti("onInit",V),Ti("onDragStart",V),Ti("onDragEnd",V),Ti("snapToGrid",!1),Ti("rounded",!0),Es("snapStart"),sl("model",ms("mode",{x:[Ti("minX",0),Ti("maxX",100),Yl("value",function(i){return ta(i.mode.minX)}),Mr("getInitialValue"),$s("manager",WN)],y:[Ti("minY",0),Ti("maxY",100),Yl("value",function(i){return ta(i.mode.minY)}),Mr("getInitialValue"),$s("manager",XN)],xy:[Ti("minX",0),Ti("maxX",100),Ti("minY",0),Ti("maxY",100),Yl("value",function(i){return ta({x:i.mode.minX,y:i.mode.minY})}),Mr("getInitialValue"),$s("manager",JL)]})),Zu("sliderBehaviours",[Za,Io]),Yl("mouseIsDown",function(){return ta(!1)})],mC=qm({name:"Slider",configFields:o6,partFields:SN,factory:function(i,c,f,x){var F,$=function(zi){return sh(zi,i,"thumb")},se=function(zi){return sh(zi,i,"spectrum")},Ie=function(zi){return qc(zi,i,"left-edge")},ze=function(zi){return qc(zi,i,"right-edge")},it=function(zi){return qc(zi,i,"top-edge")},Mt=function(zi){return qc(zi,i,"bottom-edge")},kt=i.model,pn=kt.manager,bn=function(zi,hr){pn.setPositionFromValue(zi,hr,i,{getLeftEdge:Ie,getRightEdge:ze,getTopEdge:it,getBottomEdge:Mt,getSpectrum:se})},Un=function(zi,hr){kt.value.set(hr);var Br=$(zi);bn(zi,Br)},Yi=function(zi){var Br=i.mouseIsDown.get();i.mouseIsDown.set(!1),Br&&qc(zi,i,"thumb").each(function(ko){var Zr=kt.value.get();i.onChoose(zi,ko,Zr)})},Or=function(zi,hr){hr.stop(),i.mouseIsDown.set(!0),i.onDragStart(zi,$(zi))},Pr=function(zi,hr){hr.stop(),i.onDragEnd(zi,$(zi)),Yi(zi)};return{uid:i.uid,dom:i.dom,components:c,behaviours:Od(i.sliderBehaviours,[Za.config({mode:"special",focusIn:function(zi){return qc(zi,i,"spectrum").map(Za.focusIn).map(xe)}}),Io.config({store:{mode:"manual",getValue:function(zi){return kt.value.get()}}}),Id.config({channels:(F={},F[Wy()]={onReceive:Yi},F)})]),events:uc([yr(gA(),function(zi,hr){!function(zi,hr){Un(zi,hr);var Br=$(zi);i.onChange(zi,Br,hr),j.some(!0)}(zi,hr.event.value)}),Va(function(zi,hr){var Br=kt.getInitialValue();kt.value.set(Br);var ko=$(zi);bn(zi,ko);var Zr=se(zi);i.onInit(zi,ko,Zr,kt.value.get())}),yr(tu(),Or),yr(Um(),Pr),yr(mu(),Or),yr(cd(),Pr)]),apis:{resetToMin:function(zi){pn.setToMin(zi,i)},resetToMax:function(zi){pn.setToMax(zi,i)},setValue:Un,refresh:bn},domModification:{styles:{position:"relative"}}}},apis:{setValue:function(i,c,f){i.setValue(c,f)},resetToMin:function(i,c){i.resetToMin(c)},resetToMax:function(i,c){i.resetToMax(c)},refresh:function(i,c){i.refresh(c)}}}),PP=jo("rgb-hex-update"),mE=jo("slider-update"),Uw=jo("palette-update"),LP=[Zu("formBehaviours",[Io])],kP=function(i){return"<alloy.field."+i+">"},XL=function(i,c){return{uid:i.uid,dom:i.dom,components:c,behaviours:Od(i.formBehaviours,[Io.config({store:{mode:"manual",getValue:function(f){var x=k1(f,i);return vn(x,function(F,$){return F().bind(function(se){return function(i,c){return i.fold(function(){return ra.error(c)},ra.value)}(Ml.getCurrent(se),new Error("Cannot find a current component to extract the value from for form part '"+$+"': "+xf(se.element)))}).map(Io.getValue)})},setValue:function(f,x){An(x,function(F,$){qc(f,i,$).each(function(se){Ml.getCurrent(se).each(function(Ie){Io.setValue(Ie,F)})})})}}})]),apis:{getField:function(f,x){return qc(f,i,x).bind(Ml.getCurrent)}}}},mS={getField:zs(function(i,c,f){return i.getField(c,f)}),sketch:function(i){var $,c={field:function(Ie,ze){return $.push(Ie),FE("form",kP(Ie),ze)},record:X($=[])},f=i(c),x=c.record(),F=ft(x,function($){return tp({name:$,pname:kP($)})});return R1("form",LP,F,XL,f)}},ek=jo("valid-input"),tk=jo("invalid-input"),nk=jo("validating-input"),Yw="colorcustom.rgb.",ik=function(i,c,f,x){var F=function(pn,bn){return e1.config({invalidClass:c("invalid"),notify:{onValidate:function(Un){Sa(Un,nk,{type:pn})},onValid:function(Un){Sa(Un,ek,{type:pn,value:Io.getValue(Un)})},onInvalid:function(Un){Sa(Un,tk,{type:pn,value:Io.getValue(Un)})}},validator:{validate:function(Un){var di=Io.getValue(Un),Ui=bn(di)?ra.value(!0):ra.error(i("aria.input.invalid"));return Fh_pure(Ui)},validateOnLoad:!1}})},$=function(pn,bn,Un,di,Ui){var ri=i(Yw+"range"),Pr=[Ec.parts.label({dom:{tag:"label",innerHtml:Un,attributes:{"aria-label":di}}}),Ec.parts.field({data:Ui,factory:pA,inputAttributes:re({type:"text"},"hex"===bn?{"aria-live":"polite"}:{}),inputClasses:[c("textfield")],inputBehaviours:ao([F(bn,pn),bm.config({})]),onSetValue:function(Br){e1.isInvalid(Br)&&e1.run(Br).get(V)}})],zi="hex"!==bn?[Ec.parts["aria-descriptor"]({text:ri})]:[];return{dom:{tag:"div",attributes:{role:"presentation"}},components:Pr.concat(zi)}},Ie=function(pn,bn){var Un=bn.red,di=bn.green,Ui=bn.blue;Io.setValue(pn,{red:Un,green:di,blue:Ui})},ze=wl({dom:{tag:"div",classes:[c("rgba-preview")],styles:{"background-color":"white"},attributes:{role:"presentation"}}}),it=function(pn,bn){ze.getOpt(pn).each(function(Un){Ki(Un.element,"background-color","#"+bn.value)})};return ch({factory:function(){var pn={red:ta(j.some(255)),green:ta(j.some(255)),blue:ta(j.some(255)),hex:ta(j.some("ffffff"))},Un=function(Nr){return pn[Nr].get()},di=function(Nr,bo){pn[Nr].set(bo)},ri=function(Nr){var bo=Nr.red,fa=Nr.green,Vr=Nr.blue;di("red",j.some(bo)),di("green",j.some(fa)),di("blue",j.some(Vr))},Yi=function(Nr,bo){var fa=bo.event;"hex"!==fa.type?di(fa.type,j.none()):x(Nr)},Pr=function(Nr,bo,fa){var Vr=parseInt(fa,10);di(bo,j.some(Vr)),Un("red").bind(function(Nr){return Un("green").bind(function(bo){return Un("blue").map(function(fa){return UT(Nr,bo,fa,1)})})}).each(function(sa){var Pa=function(pn,bn){var Un=nA(bn);return mS.getField(pn,"hex").each(function(di){ka.isFocused(di)||Io.setValue(pn,{hex:Un.value})}),Un}(Nr,sa);Sa(Nr,PP,{hex:Pa}),it(Nr,Pa)})},hr=function(Nr,bo){var fa=bo.event;!function(Nr){return"hex"===Nr.type}(fa)?Pr(Nr,fa.type,fa.value):function(Nr,bo){f(Nr);var fa=u2(bo);di("hex",j.some(bo));var Vr=iA(fa);Ie(Nr,Vr),ri(Vr),Sa(Nr,PP,{hex:fa}),it(Nr,fa)}(Nr,fa.value)},Br=function(Nr){return{label:i(Yw+Nr+".label"),description:i(Yw+Nr+".description")}},ko=Br("red"),Zr=Br("green"),No=Br("blue"),jr=Br("hex");return nr(mS.sketch(function(Nr){return{dom:{tag:"form",classes:[c("rgb-form")],attributes:{"aria-label":i("aria.color.picker")}},components:[Nr.field("red",Ec.sketch($(HI,"red",ko.label,ko.description,255))),Nr.field("green",Ec.sketch($(HI,"green",Zr.label,Zr.description,255))),Nr.field("blue",Ec.sketch($(HI,"blue",No.label,No.description,255))),Nr.field("hex",Ec.sketch($(m2,"hex",jr.label,jr.description,"ffffff"))),ze.asSpec()],formBehaviours:ao([e1.config({invalidClass:c("form-invalid")}),bs("rgb-form-events",[yr(ek,hr),yr(tk,Yi),yr(nk,Yi)])])}}),{apis:{updateHex:function(Nr,bo){Io.setValue(Nr,{hex:bo.value}),function(Nr,bo){var fa=iA(bo);Ie(Nr,fa),ri(fa)}(Nr,bo),it(Nr,bo)}}})},name:"RgbForm",configFields:[],apis:{updateHex:function(pn,bn,Un){pn.updateHex(bn,Un)}},extraApis:{}})},s6=function(i,c){var f=mC.parts.spectrum({dom:{tag:"canvas",attributes:{role:"presentation"},classes:[c("sv-palette-spectrum")]}}),x=mC.parts.thumb({dom:{tag:"div",attributes:{role:"presentation"},classes:[c("sv-palette-thumb")],innerHtml:"<div class="+c("sv-palette-inner-thumb")+' role="presentation"></div>'}}),F=function(it,Mt){var kt=it.width,pn=it.height,bn=it.getContext("2d");if(null!==bn){bn.fillStyle=Mt,bn.fillRect(0,0,kt,pn);var Un=bn.createLinearGradient(0,0,kt,0);Un.addColorStop(0,"rgba(255,255,255,1)"),Un.addColorStop(1,"rgba(255,255,255,0)"),bn.fillStyle=Un,bn.fillRect(0,0,kt,pn);var di=bn.createLinearGradient(0,0,0,pn);di.addColorStop(0,"rgba(0,0,0,0)"),di.addColorStop(1,"rgba(0,0,0,1)"),bn.fillStyle=di,bn.fillRect(0,0,kt,pn)}};return ch({factory:function(it){var Mt=X({x:0,y:0}),bn=ao([Ml.config({find:j.some}),ka.config({})]);return mC.sketch({dom:{tag:"div",attributes:{role:"presentation"},classes:[c("sv-palette")]},model:{mode:"xy",getInitialValue:Mt},rounded:!1,components:[f,x],onChange:function(Un,di,Ui){Sa(Un,Uw,{value:Ui})},onInit:function(Un,di,Ui,ri){F(Ui.element.dom,y2(b2))},sliderBehaviours:bn})},name:"SaturationBrightnessPalette",configFields:[],apis:{setHue:function(it,Mt,kt){!function(it,Mt){var kt=it.components()[0].element.dom,pn=rA(Mt,100,100),bn=g2(pn);F(kt,y2(bn))}(Mt,kt)},setThumb:function(it,Mt,kt){!function(it,Mt){var kt=ZI(iA(Mt));mC.setValue(it,{x:kt.saturation,y:100-kt.value})}(Mt,kt)}},extraApis:{}})},l6=function(i,c){var x=ch({name:"ColourPicker",configFields:[Mr("dom"),Ti("onValidHex",V),Ti("onInvalidHex",V)],factory:function(F){var hr,$=ik(i,c,F.onValidHex,F.onInvalidHex),se=s6(0,c),ze=function(hr){return 100-hr/360*100},it={paletteRgba:ta(b2),paletteHue:ta(0)},Mt=wl(function(i,c){var f=mC.parts.spectrum({dom:{tag:"div",classes:[c("hue-slider-spectrum")],attributes:{role:"presentation"}}}),x=mC.parts.thumb({dom:{tag:"div",classes:[c("hue-slider-thumb")],attributes:{role:"presentation"}}});return mC.sketch({dom:{tag:"div",classes:[c("hue-slider")],attributes:{role:"presentation"}},rounded:!1,model:{mode:"y",getInitialValue:X({y:0})},components:[f,x],sliderBehaviours:ao([ka.config({})]),onChange:function(F,$,se){Sa(F,mE,{value:se})}})}(0,c)),kt=wl(se.sketch({})),pn=wl($.sketch({})),bn=function(hr,Br,ko){kt.getOpt(hr).each(function(Zr){se.setHue(Zr,ko)})},Un=function(hr,Br){pn.getOpt(hr).each(function(ko){$.updateHex(ko,Br)})},di=function(hr,Br,ko){Mt.getOpt(hr).each(function(Zr){mC.setValue(Zr,{y:ze(ko)})})},Ui=function(hr,Br){kt.getOpt(hr).each(function(ko){se.setThumb(ko,Br)})},Yi=function(hr,Br,ko,Zr){(function(hr,Br){var ko=iA(hr);it.paletteRgba.set(ko),it.paletteHue.set(Br)})(Br,ko),Ct(Zr,function(No){No(hr,Br,ko)})};return{uid:F.uid,dom:F.dom,components:[kt.asSpec(),Mt.asSpec(),pn.asSpec()],behaviours:ao([bs("colour-picker-events",[yr(PP,(hr=[bn,di,Ui],function(Br,ko){var Zr=ko.event.hex,No=function(i){return ZI(iA(i))}(Zr);Yi(Br,Zr,No.hue,hr)})),yr(Uw,function(){var hr=[Un];return function(Br,ko){var Zr=ko.event.value,No=it.paletteHue.get(),jr=rA(No,Zr.x,100-Zr.y),Nr=M2(jr);Yi(Br,Nr,No,hr)}}()),yr(mE,function(){var hr=[bn,Un];return function(Br,ko){var Zr=function(hr){return(100-hr)/100*360}(ko.event.value.y),No=it.paletteRgba.get(),jr=ZI(No),Nr=rA(Zr,jr.saturation,jr.value),bo=M2(Nr);Yi(Br,bo,Zr,hr)}}())]),Ml.config({find:function(hr){return pn.getOpt(hr)}}),Za.config({mode:"acyclic"})])}}});return x},n1_self=function(){return Ml.config({find:j.some})},n1_memento=function(i){return Ml.config({find:i.getOpt})},n1_childAt=function(i){return Ml.config({find:function(c){return We(c.element,i).bind(function(f){return c.getSystem().getByDom(f).toOptional()})}})},rk={"colorcustom.rgb.red.label":"R","colorcustom.rgb.red.description":"Red component","colorcustom.rgb.green.label":"G","colorcustom.rgb.green.description":"Green component","colorcustom.rgb.blue.label":"B","colorcustom.rgb.blue.description":"Blue component","colorcustom.rgb.hex.label":"#","colorcustom.rgb.hex.description":"Hex color code","colorcustom.rgb.range":"Range 0 to 255","colorcustom.sb.saturation":"Saturation","colorcustom.sb.brightness":"Brightness","colorcustom.sb.picker":"Saturation and Brightness Picker","colorcustom.sb.palette":"Saturation and Brightness Palette","colorcustom.sb.instructions":"Use arrow keys to select saturation and brightness, on x and y axes","colorcustom.hue.hue":"Hue","colorcustom.hue.slider":"Hue Slider","colorcustom.hue.palette":"Hue Palette","colorcustom.hue.instructions":"Use arrow keys to select a hue","aria.color.picker":"Color Picker","aria.input.invalid":"Invalid input"},d6=function(i){return function(i){return rk[i]}(i)},Vw=tinymce.util.Tools.resolve("tinymce.Resource"),GT=tinymce.util.Tools.resolve("tinymce.util.Tools"),h6=Go([Ti("preprocess",ve),Ti("postprocess",ve)]),Gw=function(i,c,f){return Io.config(nr({store:{mode:"manual",getValue:c,setValue:f}},i.map(function(x){return{store:{initialValue:x}}}).getOr({})))},RP=function(i,c,f){return Gw(i,function(x){return c(x.element)},function(x,F){return f(x.element,F)})},SM_memento=function(i,c){var f=Sr("RepresentingConfigs.memento processors",h6,c);return Io.config({store:{mode:"manual",getValue:function(x){var F=i.get(x),$=Io.getValue(F);return f.postprocess($)},setValue:function(x,F){var $=f.preprocess(F),se=i.get(x);Io.setValue(se,$)}}})},SM_withComp=Gw,SM_domHtml=function(i){return RP(i,fp,Bh)},SM_memory=function(i){return Io.config({store:{mode:"memory",initialValue:i}})},y6=function(i,c){var f=function(kt,pn){pn.stop()},x=function(kt){return function(pn,bn){Ct(kt,function(Un){Un(pn,bn)})}},F=function(kt,pn){if(!Aa.isDisabled(kt)){var bn=pn.event.raw;se(kt,bn.dataTransfer.files)}},$=function(kt,pn){var bn=pn.event.raw.target;se(kt,bn.files)},se=function(kt,pn){Io.setValue(kt,function(i,c){var f=GT.explode(c.getSetting("images_file_types","jpeg,jpg,jpe,jfi,jif,jfif,png,gif,bmp,webp","string"));return st(si(i),function(F){return tt(f,function($){return Tn(F.name.toLowerCase(),"."+$.toLowerCase())})})}(pn,c)),Sa(kt,vb,{name:i.name})},Ie=wl({dom:{tag:"input",attributes:{type:"file",accept:"image/*"},styles:{display:"none"}},behaviours:ao([bs("input-file-events",[rf(Td()),rf(up())])])}),it=i.label.map(function(kt){return MM(kt,c)}),Mt=Ec.parts.field({factory:{sketch:function(kt){return{uid:kt.uid,dom:{tag:"div",classes:["tox-dropzone-container"]},behaviours:ao([SM_memory([]),n1_self(),Aa.config({}),fl.config({toggleClass:"dragenter",toggleOnExecute:!1}),bs("dropzone-events",[yr("dragenter",x([f,fl.toggle])),yr("dragleave",x([f,fl.toggle])),yr("dragover",f),yr("drop",x([f,F])),yr(Xu(),$)])]),components:[{dom:{tag:"div",classes:["tox-dropzone"],styles:{}},components:[{dom:{tag:"p",innerHtml:c.translate("Drop an image here")}},Nf.sketch({dom:{tag:"button",innerHtml:c.translate("Browse for an image"),styles:{position:"relative"},classes:["tox-button","tox-button--secondary"]},components:[Ie.asSpec()],action:function(pn){Ie.get(pn).element.dom.click()},buttonBehaviours:ao([bm.config({}),lC_button(c.isDisabled),bf()])})]}]}}}});return uA(it,Mt,["tox-form__group--stretched"],[])},$w=jo("alloy-fake-before-tabstop"),FP=jo("alloy-fake-after-tabstop"),NP=function(i){return{dom:{tag:"div",styles:{width:"1px",height:"1px",outline:"none"},attributes:{tabindex:"0"},classes:i},behaviours:ao([ka.config({ignore:!0}),bm.config({})])}},BP=function(i){return{dom:{tag:"div",classes:["tox-navobj"]},components:[NP([$w]),i,NP([FP])],behaviours:ao([n1_childAt(1)])}},UP=function(i,c){Sa(i,Dm(),{raw:{which:9,shiftKey:c}})},lk=function(i,c){var f=c.element;Ep(f,$w)?UP(i,!0):Ep(f,FP)&&UP(i,!1)},SA=function(i){return sA(i,["."+$w,"."+FP].join(","),Pe)},b6=!($r().browser.isIE()||$r().browser.isEdge()),ck=function(i,c){var f=b6&&i.sandboxed,x=re(re({},i.label.map(function(ze){return{title:ze}}).getOr({})),f?{sandbox:"allow-scripts allow-same-origin"}:{}),F=function(i){var c=ta("");return{getValue:function(f){return c.get()},setValue:function(f,x){if(i)De(f.element,"srcdoc",x);else{De(f.element,"src","javascript:''");var F=f.element.dom.contentWindow.document;F.open(),F.write(x),F.close()}c.set(x)}}}(f),$=i.label.map(function(ze){return MM(ze,c)}),Ie=Ec.parts.field({factory:{sketch:function(ze){return BP({uid:ze.uid,dom:{tag:"iframe",attributes:x},behaviours:ao([bm.config({}),ka.config({}),SM_withComp(j.none(),F.getValue,F.setValue)])})}}});return uA($,Ie,["tox-form__group--stretched"],[])},fS=function(i,c){return E6(document.createElement("canvas"),i,c)},uk=function(i){var c=fS(i.width,i.height);return AM(c).drawImage(i,0,0),c},AM=function(i){return i.getContext("2d")},E6=function(i,c,f){return i.width=c,i.height=f,i},AA=function(i){return i.naturalWidth||i.width},zP=function(i){return i.naturalHeight||i.height},x6=function(i){return new TM(function(c,f){(function(i){var c=i.split(","),f=/data:([^;]+)/.exec(c[0]);if(!f)return j.none();for(var x=f[1],F=c[1],$=1024,se=atob(F),Ie=se.length,ze=Math.ceil(Ie/$),it=new Array(ze),Mt=0;Mt<ze;++Mt){for(var kt=Mt*$,pn=Math.min(kt+$,Ie),bn=new Array(pn-kt),Un=kt,di=0;Un<pn;++di,++Un)bn[di]=se[Un].charCodeAt(0);it[Mt]=new Uint8Array(bn)}return j.some(new Blob(it,{type:x}))})(i).fold(function(){f("uri is not base64: "+i)},c)})},dk=function(i,c,f){return c=c||"image/png",w(HTMLCanvasElement.prototype.toBlob)?new TM(function(x,F){i.toBlob(function($){$?x($):F()},c,f)}):x6(i.toDataURL(c,f))},S6=function(i){return function(i){return new TM(function(c,f){var x=URL.createObjectURL(i),F=new Image,$=function(){F.removeEventListener("load",se),F.removeEventListener("error",Ie)},se=function(){$(),c(F)},Ie=function(){$(),f("Unable to load data of type "+i.type+": "+x)};F.addEventListener("load",se),F.addEventListener("error",Ie),F.src=x,F.complete&&setTimeout(se,0)})}(i).then(function(c){A6(c);var f=fS(AA(c),zP(c));return AM(f).drawImage(c,0,0),f})},A6=function(i){URL.revokeObjectURL(i.src)},mk=function(i,c,f){var x=c.type,F=X(x),se=X(f),it=function(pn,bn){return i.then(function(Un){return function(i,c,f){return c=c||"image/png",i.toDataURL(c,f)}(Un,pn,bn)})};return{getType:F,toBlob:function(){return TM.resolve(c)},toDataURL:se,toBase64:function(){return f.split(",")[1]},toAdjustedBlob:function(pn,bn){return i.then(function(Un){return dk(Un,pn,bn)})},toAdjustedDataURL:it,toAdjustedBase64:function(pn,bn){return it(pn,bn).then(function(Un){return Un.split(",")[1]})},toCanvas:function(){return i.then(uk)}}},fk=function(i){return function(i){return new TM(function(c){var f=new FileReader;f.onloadend=function(){c(f.result)},f.readAsDataURL(i)})}(i).then(function(c){return mk(S6(i),i,c)})},dD=function(i,c){return dk(i,c).then(function(f){return mk(TM.resolve(i),f,i.toDataURL())})},wA=function(i,c,f){var x="string"==typeof i?parseFloat(i):i;return x>f?x=f:x<c&&(x=c),x},HP=[0,.01,.02,.04,.05,.06,.07,.08,.1,.11,.12,.14,.15,.16,.17,.18,.2,.21,.22,.24,.25,.27,.28,.3,.32,.34,.36,.38,.4,.42,.44,.46,.48,.5,.53,.56,.59,.62,.65,.68,.71,.74,.77,.8,.83,.86,.89,.92,.95,.98,1,1.06,1.12,1.18,1.24,1.3,1.36,1.42,1.48,1.54,1.6,1.66,1.72,1.78,1.84,1.9,1.96,2,2.12,2.25,2.37,2.5,2.62,2.75,2.87,3,3.2,3.4,3.6,3.8,4,4.3,4.7,4.9,5,5.5,6,6.5,6.8,7,7.3,7.5,7.8,8,8.4,8.7,9,9.4,9.6,9.8,10],VP=function(i,c){for(var F,f=[],x=new Array(25),$=0;$<5;$++){for(var se=0;se<5;se++)f[se]=c[se+5*$];for(se=0;se<5;se++){F=0;for(var Ie=0;Ie<5;Ie++)F+=i[se+5*Ie]*f[Ie];x[se+5*$]=F}}return x},ZP=function(i,c){return i.toCanvas().then(function(f){return vk(f,i.getType(),c)})},vk=function(i,c,f){var x=AM(i),$=function(se,Ie){for(var ze,it,Mt,kt,pn=se.data,bn=Ie[0],Un=Ie[1],di=Ie[2],Ui=Ie[3],ri=Ie[4],Yi=Ie[5],Or=Ie[6],Pr=Ie[7],zi=Ie[8],hr=Ie[9],Br=Ie[10],ko=Ie[11],Zr=Ie[12],No=Ie[13],jr=Ie[14],Nr=Ie[15],bo=Ie[16],fa=Ie[17],Vr=Ie[18],sa=Ie[19],Pa=0;Pa<pn.length;Pa+=4)ze=pn[Pa],it=pn[Pa+1],Mt=pn[Pa+2],kt=pn[Pa+3],pn[Pa]=ze*bn+it*Un+Mt*di+kt*Ui+ri,pn[Pa+1]=ze*Yi+it*Or+Mt*Pr+kt*zi+hr,pn[Pa+2]=ze*Br+it*ko+Mt*Zr+kt*No+jr,pn[Pa+3]=ze*Nr+it*bo+Mt*fa+kt*Vr+sa;return se}(x.getImageData(0,0,i.width,i.height),f);return x.putImageData($,0,0),dD(i,c)},I6=function(i,c,f){var x=AM(i),$=x.getImageData(0,0,i.width,i.height),se=x.getImageData(0,0,i.width,i.height);return se=function(Ie,ze,it){for(var Mt=function(bo,fa,Vr){return bo>Vr?bo=Vr:bo<fa&&(bo=fa),bo},kt=Math.round(Math.sqrt(it.length)),pn=Math.floor(kt/2),bn=Ie.data,Un=ze.data,di=Ie.width,Ui=Ie.height,ri=0;ri<Ui;ri++)for(var Yi=0;Yi<di;Yi++){for(var Or=0,Pr=0,zi=0,hr=0;hr<kt;hr++)for(var Br=0;Br<kt;Br++){var ko=Mt(Yi+Br-pn,0,di-1),No=4*(Mt(ri+hr-pn,0,Ui-1)*di+ko),jr=it[hr*kt+Br];Or+=bn[No]*jr,Pr+=bn[No+1]*jr,zi+=bn[No+2]*jr}var Nr=4*(ri*di+Yi);Un[Nr]=Mt(Or,0,255),Un[Nr+1]=Mt(Pr,0,255),Un[Nr+2]=Mt(zi,0,255)}return ze}($,se,f),x.putImageData(se,0,0),dD(i,c)},bk=function(i){return function(c,f){return ZP(c,i([1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1],f))}},k6=function(i){return function(c){return ZP(c,i)}}([-1,0,0,0,255,0,-1,0,0,255,0,0,-1,0,255,0,0,0,1,0,0,0,0,0,1]),Ck=bk(function(i,c){return c=wA(255*c,-255,255),VP(i,[1,0,0,0,c,0,1,0,0,c,0,0,1,0,c,0,0,0,1,0,0,0,0,0,1])}),R6=bk(function(i,c){var f;return c=wA(c,-1,1),(c*=100)<0?f=127+c/100*127:f=127*(f=0===(f=c%1)?HP[c]:HP[Math.floor(c)]*(1-f)+HP[Math.floor(c)+1]*f)+127,VP(i,[f/127,0,0,0,.5*(127-f),0,f/127,0,0,.5*(127-f),0,0,f/127,0,.5*(127-f),0,0,0,1,0,0,0,0,0,1])}),F6=function(i,c,f,x){return ZP(i,function(i,c,f,x){return c=wA(c,0,2),f=wA(f,0,2),x=wA(x,0,2),VP(i,[c,0,0,0,0,0,f,0,0,0,0,0,x,0,0,0,0,0,1,0,0,0,0,0,1])}([1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1],c,f,x))},N6=function(i){return function(c){return function(i,c){return i.toCanvas().then(function(f){return I6(f,i.getType(),c)})}(c,i)}}([0,-1,0,-1,5,-1,0,-1,0]),lc=function(i){return function(f,x){return f.toCanvas().then(function(F){return function(f,x,F){for(var $=AM(f),se=new Array(256),ze=0;ze<se.length;ze++)se[ze]=i(ze,F);var it=function(Mt,kt){for(var pn=Mt.data,bn=0;bn<pn.length;bn+=4)pn[bn]=kt[pn[bn]],pn[bn+1]=kt[pn[bn+1]],pn[bn+2]=kt[pn[bn+2]];return Mt}($.getImageData(0,0,f.width,f.height),se);return $.putImageData(it,0,0),dD(f,x)}(F,f.getType(),x)})}}(function(i,c){return 255*Math.pow(i/255,1-c)}),pD=function(i,c,f){var x=AA(i),F=zP(i),$=c/x,se=f/F,Ie=!1;($<.5||$>2)&&($=$<.5?.5:2,Ie=!0),(se<.5||se>2)&&(se=se<.5?.5:2,Ie=!0);var ze=Ek(i,$,se);return Ie?ze.then(function(it){return pD(it,c,f)}):ze},Ek=function(i,c,f){return new TM(function(x){var F=AA(i),$=zP(i),se=Math.floor(F*c),Ie=Math.floor($*f),ze=fS(se,Ie);AM(ze).drawImage(i,0,0,F,$,0,0,se,Ie),x(ze)})},GP=function(i,c){void 0===c&&(c=2);var f=Math.pow(10,c),x=Math.round(i*f);return Math.ceil(x/f)},B6=function(i,c,f){var F=(f<0?360+f:f)*Math.PI/180,$=i.width,se=i.height,Ie=Math.sin(F),ze=Math.cos(F),it=GP(Math.abs($*ze)+Math.abs(se*Ie)),Mt=GP(Math.abs($*Ie)+Math.abs(se*ze)),kt=fS(it,Mt),pn=AM(kt);return pn.translate(it/2,Mt/2),pn.rotate(F),pn.drawImage(i,-$/2,-se/2),dD(kt,c)},z6=function(i,c,f){var x=fS(i.width,i.height),F=AM(x);return"v"===f?(F.scale(1,-1),F.drawImage(i,0,-x.height)):(F.scale(-1,1),F.drawImage(i,-x.width,0)),dD(x,c)},Y6=function(i,c,f,x,F,$){var se=fS(F,$);return AM(se).drawImage(i,-f,-x),dD(se,c)},V6=function(i){return k6(i)},Z6=function(i){return N6(i)},G6=function(i,c){return lc(i,c)},$6=function(i,c){return Ck(i,c)},j6=function(i,c){return R6(i,c)},xk=function(i,c){return function(i,c){return i.toCanvas().then(function(f){return z6(f,i.getType(),c)})}(i,c)},K6=function(i,c,f,x,F){return function(i,c,f,x,F){return i.toCanvas().then(function($){return Y6($,i.getType(),c,f,x,F)})}(i,c,f,x,F)},J6=function(i,c,f){return function(i,c,f){return i.toCanvas().then(function(x){return pD(x,c,f).then(function(F){return dD(F,i.getType())})})}(i,c,f)},WP=function(i,c){return function(i,c){return i.toCanvas().then(function(f){return B6(f,i.getType(),c)})}(i,c)},Dk=function(i,c,f){return fb(i,{tag:"span",classes:["tox-icon","tox-tbtn__icon-wrap"],behaviours:f},c)},jw=function(i,c){return Dk(i,c,[])},Sk=function(i,c){return Dk(i,c,[ys.config({})])},$P=function(i,c,f){return{dom:{tag:"span",innerHtml:f.translate(i),classes:[c+"__select-label"]},behaviours:ao([ys.config({})])}},Ak=jo("toolbar.button.execute"),wk=function(i){return Wp(function(c,f){sS(i,c)(function(x){Sa(c,Ak,{buttonApi:x}),i.onAction(x)})})},Ik=((jP={})[dd()]=["disabling","alloy.base.behaviour","toggling","toolbar-button-events"],jP),mD=jo("update-menu-text"),Pk=jo("update-menu-icon"),Kw=function(i,c,f){var x=ta(V),F=i.text.map(function(kt){return wl($P(kt,c,f.providers))}),$=i.icon.map(function(kt){return wl(Sk(kt,f.providers.icons))}),se=function(kt,pn){var bn=Io.getValue(kt);return ka.focus(bn),Sa(bn,"keydown",{raw:pn.event.raw}),uC.close(bn),j.some(!0)},Ie=i.role.fold(function(){return{}},function(kt){return{role:kt}}),ze=i.tooltip.fold(function(){return{}},function(kt){var pn=f.providers.translate(kt);return{title:pn,"aria-label":pn}}),it=fb("chevron-down",{tag:"div",classes:[c+"__select-chevron"]},f.providers.icons);return wl(uC.sketch(re(re(re({},i.uid?{uid:i.uid}:{}),Ie),{dom:{tag:"button",classes:[c,c+"--select"].concat(ft(i.classes,function(kt){return c+"--"+kt})),attributes:re({},ze)},components:bM([$.map(function(kt){return kt.asSpec()}),F.map(function(kt){return kt.asSpec()}),j.some(it)]),matchWidth:!0,useMinWidth:!0,dropdownBehaviours:ao(me(me([],i.dropdownBehaviours,!0),[lC_button(function(){return i.disabled||f.providers.isDisabled()}),bf(),fA.config({}),ys.config({}),bs("dropdown-events",[Xx(i,x),eD(i,x)]),bs("menubutton-update-display-text",[yr(mD,function(kt,pn){F.bind(function(bn){return bn.getOpt(kt)}).each(function(bn){ys.set(bn,[fd(f.providers.translate(pn.event.text))])})}),yr(Pk,function(kt,pn){$.bind(function(bn){return bn.getOpt(kt)}).each(function(bn){ys.set(bn,[Sk(pn.event.icon,f.providers.icons)])})})])],!1)),eventOrder:nr(Ik,{mousedown:["focusing","alloy.base.behaviour","item-type-events","normal-dropdown-events"]}),sandboxBehaviours:ao([Za.config({mode:"special",onLeft:se,onRight:se})]),lazySink:f.getSink,toggleClass:c+"--active",parts:{menu:b(0,i.columns,i.presets)},fetch:function(kt){return Fh_nu(ge(i.fetch,kt))}}))).asSpec()},Jw=function(i){return"separator"===i.type},q6={type:"separator"},X6=function(i,c){var f=Dn(i,function(x,F){return function(i){return e(i)}(F)?""===F?x:"|"===F?x.length>0&&!Jw(x[x.length-1])?x.concat([q6]):x:jn(c,F.toLowerCase())?x.concat([c[F.toLowerCase()]]):x:x.concat([F])},[]);return f.length>0&&Jw(f[f.length-1])&&f.pop(),f},tB=function(i,c){return function(i){return jn(i,"getSubmenuItems")}(i)?function(i,c){var f=i.getSubmenuItems(),x=hS(f,c);return{item:i,menus:nr(x.menus,Fo(i.value,x.items)),expansions:nr(x.expansions,Fo(i.value,i.value))}}(i,c):{item:i,menus:{},expansions:{}}},hS=function(i,c){var f=X6(e(i)?i.split(" "):i,c);return nn(f,function(x,F){var $=function(i){if(Jw(i))return i;var c=mr(i,"value").getOrThunk(function(){return jo("generated-menu-item")});return nr({value:c},i)}(F),se=tB($,c);return{menus:nr(x.menus,se.menus),items:[se.item].concat(x.items),expansions:nr(x.expansions,se.expansions)}},{menus:{},expansions:{},items:[]})},gS=function(i,c,f,x){var F=jo("primary-menu"),$=hS(i,f.shared.providers.menuItems());if(0===$.items.length)return j.none();var se=V2(F,$.items,c,f,x),Ie=vn($.menus,function(it,Mt){return V2(Mt,it,c,f,!1)}),ze=nr(Ie,Fo(F,se));return j.from(t0.tieredData(F,ze,$.expansions))},KP=function(i){return{isDisabled:function(){return Aa.isDisabled(i)},setDisabled:function(c){return Aa.set(i,c)},setActive:function(c){var f=i.element;c?(Qc(f,"tox-tbtn--enabled"),De(f,"aria-pressed",!0)):(wc(f,"tox-tbtn--enabled"),Fe(f,"aria-pressed"))},isActive:function(){return Ep(i.element,"tox-tbtn--enabled")}}},JP=function(i,c,f,x){return Kw({text:i.text,icon:i.icon,tooltip:i.tooltip,role:x,fetch:function(F,$){i.fetch(function(se){$(gS(se,Lm.CLOSE_ON_EXECUTE,f,!1))})},onSetup:i.onSetup,getApi:KP,columns:1,presets:"normal",classes:[],dropdownBehaviours:[bm.config({})]},c,f.shared)},iB=function(i,c,f){var x=function($){return function(se){var Ie=!se.isActive();se.setActive(Ie),$.storage.set(Ie),f.shared.getSink().each(function(ze){c().getOpt(ze).each(function(it){Xd(it.element),Sa(it,XC,{name:$.name,value:$.storage.get()})})})}},F=function($){return function(se){se.setActive($.storage.get())}};return function($){$(ft(i,function(se){var Ie=se.text.fold(function(){return{}},function(ze){return{text:ze}});return re(re({type:se.type,active:!1},Ie),{onAction:x(se),onSetup:F(se)})}))}},Lk=function(i,c,f,x,F,$){void 0===f&&(f=[]);var se=c.fold(function(){return{}},function(it){return{action:it}}),Ie=re({buttonBehaviours:ao([lC_button(function(){return i.disabled||$.isDisabled()}),bf(),bm.config({}),bs("button press",[C_("click"),C_("mousedown")])].concat(f)),eventOrder:{click:["button press","alloy.base.behaviour"],mousedown:["button press","alloy.base.behaviour"]}},se),ze=nr(Ie,{dom:x});return nr(ze,{components:F})},kk=function(i,c,f,x){void 0===x&&(x=[]);var $={tag:"button",classes:["tox-tbtn"],attributes:i.tooltip.map(function(ze){return{"aria-label":f.translate(ze),title:f.translate(ze)}}).getOr({})},se=i.icon.map(function(ze){return jw(ze,f.icons)}),Ie=bM([se]);return Lk(i,c,x,$,Ie,f)},QP=function(i,c,f,x){void 0===x&&(x=[]);var F=kk(i,j.some(c),f,x);return Nf.sketch(F)},qP=function(i,c,f,x,F){void 0===x&&(x=[]),void 0===F&&(F=[]);var $=f.translate(i.text),se=i.icon?i.icon.map(function(kt){return jw(kt,f.icons)}):j.none(),Ie=se.isSome()?bM([se]):[],ze=se.isSome()?{}:{innerHtml:$},it=me(me(me(me([],i.primary||i.borderless?["tox-button"]:["tox-button","tox-button--secondary"],!0),se.isSome()?["tox-button--icon"]:[],!0),i.borderless?["tox-button--naked"]:[],!0),F,!0),Mt=re(re({tag:"button",classes:it},ze),{attributes:{title:$}});return Lk(i,c,x,Mt,Ie,f)},XP=function(i,c,f,x,F){void 0===x&&(x=[]),void 0===F&&(F=[]);var $=qP(i,j.some(c),f,x,F);return Nf.sketch($)},IA=function(i,c){return function(f){"custom"===c?Sa(f,XC,{name:i,value:{}}):"submit"===c?Cl(f,by):"cancel"===c?Cl(f,nD):console.error("Unknown button type: ",c)}},qw=function(i,c,f){if(function(i,c){return"menu"===c}(0,c)){var F=i,$=re(re({},i),{onSetup:function(it){return it.setDisabled(i.disabled),V},fetch:iB(F.items,function(){return se},f)}),se=wl(JP($,"tox-tbtn",f,j.none()));return se.asSpec()}if(function(i,c){return"custom"===c||"cancel"===c||"submit"===c}(0,c)){var Ie=IA(i.name,c),ze=re(re({},i),{borderless:!1});return XP(ze,Ie,f.shared.providers,[])}console.error("Unknown footer button type: ",c)},oB=function(i,c){var f=IA(i.name,"custom");return function(i,c){return uA(i,c,[],[])}(j.none(),Ec.parts.field(re({factory:Nf},qP(i,j.some(f),c,[SM_memory(""),n1_self()]))))},aB=X([Ti("field1Name","field1"),Ti("field2Name","field2"),gu("onLockedChange"),Pm(["lockClass"]),Ti("locked",!1),Lh_field("coupledFieldBehaviours",[Ml,Io])]),Xw=function(i,c){return tp({factory:Ec,name:i,overrides:function(f){return{fieldBehaviours:ao([bs("coupled-input-behaviour",[yr(sm(),function(x){(function(i,c,f){return qc(i,c,f).bind(Ml.getCurrent)})(x,f,c).each(function(F){qc(x,f,"lock").each(function($){fl.isOn($)&&f.onLockedChange(x,F,$)})})})])])}}})},Rk=X([Xw("field1","field2"),Xw("field2","field1"),tp({factory:Nf,schema:[Mr("dom")],name:"lock",overrides:function(i){return{buttonBehaviours:ao([fl.config({selected:i.locked,toggleClass:i.markers.lockClass,aria:{mode:"pressed"}})])}}})]),wv=qm({name:"FormCoupledInputs",configFields:aB(),partFields:Rk(),factory:function(i,c,f,x){return{uid:i.uid,dom:i.dom,components:c,behaviours:Lh_augment(i.coupledFieldBehaviours,[Ml.config({find:j.some}),Io.config({store:{mode:"manual",getValue:function(F){var $,se=ny(F,i,["field1","field2"]);return($={})[i.field1Name]=Io.getValue(se.field1()),$[i.field2Name]=Io.getValue(se.field2()),$},setValue:function(F,$){var se=ny(F,i,["field1","field2"]);ct($,i.field1Name)&&Io.setValue(se.field1(),$[i.field1Name]),ct($,i.field2Name)&&Io.setValue(se.field2(),$[i.field2Name])}}})]),apis:{getField1:function(F){return qc(F,i,"field1")},getField2:function(F){return qc(F,i,"field2")},getLock:function(F){return qc(F,i,"lock")}}}},apis:{getField1:function(i,c){return i.getField1(c)},getField2:function(i,c){return i.getField2(c)},getLock:function(i,c){return i.getLock(c)}}}),tO=function(i){var f=/^\s*(\d+(?:\.\d+)?)\s*(|cm|mm|in|px|pt|pc|em|ex|ch|rem|vw|vh|vmin|vmax|%)\s*$/.exec(i);if(null!==f){var x=parseFloat(f[1]),F=f[2];return ra.value({value:x,unit:F})}return ra.error(i)},nO=function(i,c){var f={"":96,px:96,pt:72,cm:2.54,pc:12,mm:25.4,in:1},x=function(F){return jn(f,F)};return i.unit===c?j.some(i.value):x(i.unit)&&x(c)?f[i.unit]===f[c]?j.some(i.value):j.some(i.value/f[i.unit]*f[c]):j.none()},iO=function(i){return j.none()},cB=function(i,c){var f=tO(i).toOptional(),x=tO(c).toOptional();return pr(f,x,function(F,$){return nO(F,$.unit).map(function(se){return $.value/se}).map(function(se){return function(i,c){return function(f){return nO(f,c).map(function(x){return{value:x*i,unit:c}})}}(se,$.unit)}).getOr(iO)}).getOr(iO)},Fk=function(i,c){var f=iO,x=jo("ratio-event"),F=function(kt){return fb(kt,{tag:"span",classes:["tox-icon","tox-lock-icon__"+kt]},c.icons)},$=wv.parts.lock({dom:{tag:"button",classes:["tox-lock","tox-button","tox-button--naked","tox-button--icon"],attributes:{title:c.translate(i.label.getOr("Constrain proportions"))}},components:[F("lock"),F("unlock")],buttonBehaviours:ao([Aa.config({disabled:function(){return i.disabled||c.isDisabled()}}),bf(),bm.config({})])}),se=function(kt){return{dom:{tag:"div",classes:["tox-form__group"]},components:kt}},Ie=function(kt){return Ec.parts.field({factory:pA,inputClasses:["tox-textfield"],inputBehaviours:ao([Aa.config({disabled:function(){return i.disabled||c.isDisabled()}}),bf(),bm.config({}),bs("size-input-events",[yr(xm(),function(pn,bn){Sa(pn,x,{isField1:kt})}),yr(Xu(),function(pn,bn){Sa(pn,vb,{name:i.name})})])]),selectOnFocus:!1})},ze=function(kt){return{dom:{tag:"label",classes:["tox-label"],innerHtml:c.translate(kt)}}},it=wv.parts.field1(se([Ec.parts.label(ze("Width")),Ie(!0)])),Mt=wv.parts.field2(se([Ec.parts.label(ze("Height")),Ie(!1)]));return wv.sketch({dom:{tag:"div",classes:["tox-form__group"]},components:[{dom:{tag:"div",classes:["tox-form__controls-h-stack"]},components:[it,Mt,se([ze("&nbsp;"),$])]}],field1Name:"width",field2Name:"height",locked:!0,markers:{lockClass:"tox-locked"},onLockedChange:function(kt,pn,bn){tO(Io.getValue(kt)).each(function(Un){f(Un).each(function(di){Io.setValue(pn,function(i){var F,c={"":0,px:0,pt:1,mm:1,pc:2,ex:2,em:2,ch:2,rem:2,cm:3,in:4,"%":4},x=i.value.toFixed((F=i.unit)in c?c[F]:1);return-1!==x.indexOf(".")&&(x=x.replace(/\.?0*$/,"")),x+i.unit}(di))})})},coupledFieldBehaviours:ao([Aa.config({disabled:function(){return i.disabled||c.isDisabled()},onDisabled:function(kt){wv.getField1(kt).bind(Ec.getField).each(Aa.disable),wv.getField2(kt).bind(Ec.getField).each(Aa.disable),wv.getLock(kt).each(Aa.disable)},onEnabled:function(kt){wv.getField1(kt).bind(Ec.getField).each(Aa.enable),wv.getField2(kt).bind(Ec.getField).each(Aa.enable),wv.getLock(kt).each(Aa.enable)}}),bf(),bs("size-input-events2",[yr(x,function(kt,pn){var bn=pn.event.isField1,Un=bn?wv.getField1(kt):wv.getField2(kt),di=bn?wv.getField2(kt):wv.getField1(kt),Ui=Un.map(Io.getValue).getOr(""),ri=di.map(Io.getValue).getOr("");f=cB(Ui,ri)})])])})},Hg={undo:X(jo("undo")),redo:X(jo("redo")),zoom:X(jo("zoom")),back:X(jo("back")),apply:X(jo("apply")),swap:X(jo("swap")),transform:X(jo("transform")),tempTransform:X(jo("temp-transform")),transformApply:X(jo("transform-apply"))},_B=X("save-state"),vB=X("disable"),Uk=X("enable"),G_={formActionEvent:XC,saveState:_B,disable:vB,enable:Uk},yB=function(i,c){var f=function(Jo,il,jc,ap){return wl(XP({name:Jo,text:Jo,disabled:jc,primary:ap,icon:j.none(),borderless:!1},il,c))},x=function(Jo,il,jc,ap){return wl(QP({name:Jo,icon:j.some(Jo),tooltip:j.some(il),disabled:ap,primary:!1,borderless:!1},jc,c))},F=function(Jo,il){Jo.map(function(jc){var ap=jc.get(il);ap.hasConfigured(Aa)&&Aa.disable(ap)})},$=function(Jo,il){Jo.map(function(jc){var ap=jc.get(il);ap.hasConfigured(Aa)&&Aa.enable(ap)})},se={tag:"div",classes:["tox-image-tools__toolbar","tox-image-tools-edit-panel"]},Ie=V,ze=function(Jo,il,jc){Sa(Jo,il,jc)},it=function(Jo){return Cl(Jo,G_.disable())},Mt=function(Jo){return Cl(Jo,G_.enable())},kt=function(Jo,il){it(Jo),ze(Jo,Hg.transform(),{transform:il}),Mt(Jo)},bn=function(Jo){return function(){c1.getOpt(Jo).each(function(il){ys.set(il,[ex])})}},Un=function(Jo,il){it(Jo),ze(Jo,Hg.transformApply(),{transform:il,swap:bn(Jo)}),Mt(Jo)},di=function(){return f("Back",function(Jo){return ze(Jo,Hg.back(),{swap:bn(Jo)})},!1,!1)},Ui=function(){return wl({dom:{tag:"div",classes:["tox-spacer"]},behaviours:ao([Aa.config({})])})},ri=function(){return f("Apply",function(Jo){return ze(Jo,Hg.apply(),{swap:bn(Jo)})},!0,!0)},Or=[di(),Ui(),f("Apply",function(Jo){var il=function(Jo){var il=i.getRect();return K6(Jo,il.x,il.y,il.w,il.h)};Un(Jo,il),i.hideCrop()},!1,!0)],Pr=Yg.sketch({dom:se,components:Or.map(function(Jo){return Jo.asSpec()}),containerBehaviours:ao([bs("image-tools-crop-buttons-events",[yr(G_.disable(),function(Jo,il){F(Or,Jo)}),yr(G_.enable(),function(Jo,il){$(Or,Jo)})])])}),zi=wl(Fk({name:"size",label:j.none(),constrain:!0,disabled:!1},c)),Br=[di(),Ui(),zi,Ui(),f("Apply",function(Jo){zi.getOpt(Jo).each(function(il){var jc=Io.getValue(il),v_=function(Jo,il){return function(jc){return J6(jc,Jo,il)}}(parseInt(jc.width,10),parseInt(jc.height,10));Un(Jo,v_)})},!1,!0)],ko=Yg.sketch({dom:se,components:Br.map(function(Jo){return Jo.asSpec()}),containerBehaviours:ao([bs("image-tools-resize-buttons-events",[yr(G_.disable(),function(Jo,il){F(Br,Jo)}),yr(G_.enable(),function(Jo,il){$(Br,Jo)})])])}),Zr=function(Jo,il){return function(jc){return Jo(jc,il)}},No=Zr(xk,"h"),jr=Zr(xk,"v"),Nr=Zr(WP,-90),bo=Zr(WP,90),fa=function(Jo,il){!function(Jo,il){it(Jo),ze(Jo,Hg.tempTransform(),{transform:il}),Mt(Jo)}(Jo,il)},Vr=[di(),Ui(),x("flip-horizontally","Flip horizontally",function(Jo){fa(Jo,No)},!1),x("flip-vertically","Flip vertically",function(Jo){fa(Jo,jr)},!1),x("rotate-left","Rotate counterclockwise",function(Jo){fa(Jo,Nr)},!1),x("rotate-right","Rotate clockwise",function(Jo){fa(Jo,bo)},!1),Ui(),ri()],sa=Yg.sketch({dom:se,components:Vr.map(function(Jo){return Jo.asSpec()}),containerBehaviours:ao([bs("image-tools-fliprotate-buttons-events",[yr(G_.disable(),function(Jo,il){F(Vr,Jo)}),yr(G_.enable(),function(Jo,il){$(Vr,Jo)})])])}),Pa=function(Jo,il,jc,ap,K_){var v_=mC.parts.label({dom:{tag:"label",classes:["tox-label"],innerHtml:c.translate(Jo)}}),My=mC.parts.spectrum({dom:{tag:"div",classes:["tox-slider__rail"],attributes:{role:"presentation"}}}),p0=mC.parts.thumb({dom:{tag:"div",classes:["tox-slider__handle"],attributes:{role:"presentation"}}});return wl(mC.sketch({dom:{tag:"div",classes:["tox-slider"],attributes:{role:"presentation"}},model:{mode:"x",minX:jc,maxX:K_,getInitialValue:X({x:ap})},components:[v_,My,p0],sliderBehaviours:ao([ka.config({})]),onChoose:il}))},Zl=function(Jo,il,jc,ap,K_){return Pa(Jo,function(My,p0,xS){var $A=Zr(il,xS.x/100);kt(My,$A)},jc,ap,K_)},yd=function(Jo,il,jc,ap,K_){var v_=function(Jo,il,jc,ap,K_){return[di(),Zl(Jo,il,jc,ap,K_),ri()]}(Jo,il,jc,ap,K_);return Yg.sketch({dom:se,components:v_.map(function(My){return My.asSpec()}),containerBehaviours:ao([bs("image-tools-filter-panel-buttons-events",[yr(G_.disable(),function(My,p0){F(v_,My)}),yr(G_.enable(),function(My,p0){$(v_,My)})])])})},Lp=[di(),Ui(),ri()],Ey=Yg.sketch({dom:se,components:Lp.map(function(Jo){return Jo.asSpec()})}),Zg=yd("Brightness",$6,-100,0,100),II=yd("Contrast",j6,-100,0,100),Zf=yd("Gamma",G6,-100,0,100),MD=function(Jo,il,jc){return function(ap){return function(i,c,f,x){return F6(i,c,f,x)}(ap,Jo,il,jc)}},TD=function(Jo){return Pa(Jo,function(jc,ap,K_){var v_=ZA.getOpt(jc),My=GA.getOpt(jc),p0=xD.getOpt(jc);v_.each(function(xS){My.each(function($A){p0.each(function(DS){var u5=Io.getValue(xS).x/100,d5=Io.getValue(DS).x/100,SD=Io.getValue($A).x/100,SS=MD(u5,d5,SD);kt(jc,SS)})})})},0,100,200)},ZA=TD("R"),xD=TD("G"),GA=TD("B"),j_=[di(),ZA,xD,GA,ri()],l1=Yg.sketch({dom:se,components:j_.map(function(Jo){return Jo.asSpec()})}),__=function(Jo,il,jc){return function(ap){ze(ap,Hg.swap(),{transform:il,swap:function(){c1.getOpt(ap).each(function(v_){ys.set(v_,[Jo]),jc(v_)})}})}},TS=j.some(Z6),Gf=j.some(V6),LM=[x("crop","Crop",__(Pr,j.none(),function(Jo){i.showCrop()}),!1),x("resize","Resize",__(ko,j.none(),function(Jo){zi.getOpt(Jo).each(function(il){var jc=i.getMeasurements(),ap=jc.width,K_=jc.height;Io.setValue(il,{width:ap,height:K_})})}),!1),x("orientation","Orientation",__(sa,j.none(),Ie),!1),x("brightness","Brightness",__(Zg,j.none(),Ie),!1),x("sharpen","Sharpen",__(Ey,TS,Ie),!1),x("contrast","Contrast",__(II,j.none(),Ie),!1),x("color-levels","Color levels",__(l1,j.none(),Ie),!1),x("gamma","Gamma",__(Zf,j.none(),Ie),!1),x("invert","Invert",__(Ey,Gf,Ie),!1)],ex=Yg.sketch({dom:se,components:LM.map(function(Jo){return Jo.asSpec()})}),DD=Yg.sketch({dom:{tag:"div"},components:[ex],containerBehaviours:ao([ys.config({})])}),c1=wl(DD);return{memContainer:c1,getApplyButton:function(Jo){return c1.getOpt(Jo).map(function(il){var jc=il.components()[0];return jc.components()[jc.components().length-1]})}}},zk=tinymce.util.Tools.resolve("tinymce.geom.Rect"),yb=tinymce.util.Tools.resolve("tinymce.util.Observable"),_S=tinymce.util.Tools.resolve("tinymce.util.VK"),rO=function(i){var c=Math.max,f=i.documentElement,x=i.body,F=c(f.scrollWidth,x.scrollWidth),$=c(f.clientWidth,x.clientWidth),se=c(f.offsetWidth,x.offsetWidth),Ie=c(f.scrollHeight,x.scrollHeight),ze=c(f.clientHeight,x.clientHeight);return{width:F<se?$:F,height:Ie<c(f.offsetHeight,x.offsetHeight)?ze:Ie}},eI=function(i){if(function(i){return P(i.changedTouches)}(i))for(var c="screenX screenY pageX pageY clientX clientY".split(" "),f=0;f<c.length;f++)i[c[f]]=i.changedTouches[0][c[f]]};var bB=0,CB_create=function(i,c,f,x,F){var $,se=[],Ie="tox-",ze=Ie+"crid-"+bB++,it=Xn.fromDom(x),Mt=[{name:"move",xMul:0,yMul:0,deltaX:1,deltaY:1,deltaW:0,deltaH:0,label:"Crop Mask"},{name:"nw",xMul:0,yMul:0,deltaX:1,deltaY:1,deltaW:-1,deltaH:-1,label:"Top Left Crop Handle"},{name:"ne",xMul:1,yMul:0,deltaX:0,deltaY:1,deltaW:1,deltaH:-1,label:"Top Right Crop Handle"},{name:"sw",xMul:0,yMul:1,deltaX:1,deltaY:0,deltaW:-1,deltaH:1,label:"Bottom Left Crop Handle"},{name:"se",xMul:1,yMul:1,deltaX:0,deltaY:0,deltaW:1,deltaH:1,label:"Bottom Right Crop Handle"}],kt=["top","right","bottom","left"],bn=function(Zr,No){return{x:No.x-Zr.x,y:No.y-Zr.y,w:No.w,h:No.h}},di=function(Zr,No,jr,Nr){var bo=No.x+jr*Zr.deltaX,fa=No.y+Nr*Zr.deltaY,Vr=Math.max(20,No.w+jr*Zr.deltaW),sa=Math.max(20,No.h+Nr*Zr.deltaH),Pa=i=zk.clamp({x:bo,y:fa,w:Vr,h:sa},f,"move"===Zr.name);Pa=bn(f,Pa),ko.fire("updateRect",{rect:Pa}),zi(Pa)},Yi=function(Zr){var No=function(jr,Nr){Fc(it,"#"+ze+"-"+jr).each(function(bo){ya(bo,{left:Nr.x+"px",top:Nr.y+"px",width:Math.max(0,Nr.w)+"px",height:Math.max(0,Nr.h)+"px"})})};Ct(Mt,function(jr){Fc(it,"#"+ze+"-"+jr.name).each(function(Nr){ya(Nr,{left:Zr.w*jr.xMul+Zr.x+"px",top:Zr.h*jr.yMul+Zr.y+"px"})})}),No("top",{x:c.x,y:c.y,w:c.w,h:Zr.y-c.y}),No("right",{x:Zr.x+Zr.w,y:Zr.y,w:c.w-Zr.x-Zr.w+c.x,h:Zr.h}),No("bottom",{x:c.x,y:Zr.y+Zr.h,w:c.w,h:c.h-Zr.y-Zr.h+c.y}),No("left",{x:c.x,y:Zr.y,w:Zr.x-c.x,h:Zr.h}),No("move",Zr)},Or=function(Zr){Yi(i=Zr)},zi=function(Zr){Or(function(Zr,No){return{x:No.x+Zr.x,y:No.y+Zr.y,w:No.w,h:No.h}}(f,Zr))};!function(){var No=Xn.fromTag("div");bt(No,{id:ze,class:Ie+"croprect-container",role:"grid","aria-dropeffect":"execute"}),oo(it,No),Ct(kt,function(bo){Fc(it,"#"+ze).each(function(fa){var Vr=Xn.fromTag("div");bt(Vr,{id:ze+"-"+bo,class:Ie+"croprect-block","data-mce-bogus":"all"}),Ki(Vr,"display","none"),oo(fa,Vr)})}),Ct(Mt,function(bo){Fc(it,"#"+ze).each(function(fa){var Vr=Xn.fromTag("div");bt(Vr,{id:ze+"-"+bo.name,"aria-label":bo.label,"aria-grabbed":"false","data-mce-bogus":"all",role:"gridcell",tabindex:"-1",title:bo.label}),Gh(Vr,[Ie+"croprect-handle",Ie+"croprect-handle-"+bo.name]),Ki(Vr,"display","none"),oo(fa,Vr)})}),$=ft(Mt,function(bo){var fa;return function tI(i,c){var f,x,F,$,kt,pn,bn,se=[],Ie=[],ze=null!==(f=c.document)&&void 0!==f?f:document,it=null!==(x=c.root)&&void 0!==x?x:ze,Mt=Xn.fromDom(ze),Un=Xn.fromDom(it.getElementById(null!==(F=c.handle)&&void 0!==F?F:i)),di=function(Or){var Pr=Or.raw,zi=rO(ze);eI(Pr),Or.prevent(),kt=Pr.button,pn=Pr.screenX,bn=Pr.screenY;var hr=qi(Un,"cursor");$=Xn.fromTag("div",ze),ya($,{position:"absolute",top:"0",left:"0",width:zi.width+"px",height:zi.height+"px","z-index":"2147483647",opacity:"0.0001",cursor:hr}),oo(ba(Mt),$),Ie.push(Nc(Mt,"mousemove",Ui),Nc(Mt,"touchmove",Ui),Nc(Mt,"mouseup",ri),Nc(Mt,"touchend",ri)),c.start(Pr)},Ui=function(Or){var Pr=Or.raw;if(eI(Pr),Pr.button!==kt)return ri(Or);Pr.deltaX=Pr.screenX-pn,Pr.deltaY=Pr.screenY-bn,Or.prevent(),c.drag(Pr)},ri=function(Or){eI(Or.raw),Ct(Ie,function(Pr){return Pr.unbind()}),Ie=[],Rs($),c.stop&&c.stop(Or.raw)};return se.push(Nc(Un,"mousedown",di),Nc(Un,"touchstart",di)),{destroy:function(){Ct(Ie.concat(se),function(Or){return Or.unbind()}),Ie=[],se=[],P($)&&Rs($)}}}(ze,{document:x.ownerDocument,root:ro(it).dom,handle:ze+"-"+bo.name,start:function(){fa=i},drag:function(Vr){di(bo,fa,Vr.deltaX,Vr.deltaY)}})}),Yi(i);var jr=function(bo){De(bo.target,"aria-grabbed","focus"===bo.raw.type?"true":"false")};se.push(Nc(it,"focusin",jr),Nc(it,"focusout",jr),Nc(it,"keydown",function(bo){var fa;Ct(Mt,function(sa){if(Xt(bo.target,"id")===ze+"-"+sa.name)return fa=sa,!1});var Vr=function(sa,Pa,Zl,Uc,yd){sa.stopPropagation(),sa.preventDefault(),di(fa,Zl,Uc,yd)};switch(bo.raw.keyCode){case _S.LEFT:Vr(bo,0,i,-10,0);break;case _S.RIGHT:Vr(bo,0,i,10,0);break;case _S.UP:Vr(bo,0,i,0,-10);break;case _S.DOWN:Vr(bo,0,i,0,10);break;case _S.ENTER:case _S.SPACEBAR:bo.prevent(),F()}}))}();var ko=re(re({},yb),{toggleVisibility:function(Zr){var No=me(me([],ft(Mt,function(Nr){return"#"+ze+"-"+Nr.name}),!0),ft(kt,function(Nr){return"#"+ze+"-"+Nr}),!0).join(","),jr=Ap(it,No);Ct(jr,Zr?function(Nr){return Ka(Nr,"display")}:function(Nr){return Ki(Nr,"display","none")})},setClampRect:function(Zr){f=Zr,Yi(i)},setRect:Or,getInnerRect:function(){return bn(f,i)},setInnerRect:zi,setViewPortRect:function(Zr){c=Zr,Yi(i)},destroy:function(){Ct($,function(Zr){return Zr.destroy()}),$=[],Ct(se,function(Zr){return Zr.unbind()}),se=[]}});return ko},Hk=function(i){var c=wl({dom:{tag:"div",classes:["tox-image-tools__image-bg"],attributes:{role:"presentation"}}}),f=ta(1),x=function(){var i=Uv();return re(re({},i),{run:function(f){return i.get().each(f)}})}(),F=ta({x:0,y:0,w:1,h:1}),$=ta({x:0,y:0,w:1,h:1}),se=function(Ui,ri){Un.getOpt(Ui).each(function(Yi){var Or=f.get(),Pr=ks(Yi.element),zi=hl(Yi.element),hr=ri.dom.naturalWidth*Or,Br=ri.dom.naturalHeight*Or,ko=Math.max(0,Pr/2-hr/2),Zr=Math.max(0,zi/2-Br/2),No={left:ko.toString()+"px",top:Zr.toString()+"px",width:hr.toString()+"px",height:Br.toString()+"px",position:"absolute"};ya(ri,No),c.getOpt(Yi).each(function(jr){ya(jr.element,No)}),x.run(function(jr){var Nr=F.get();jr.setRect({x:Nr.x*Or+ko,y:Nr.y*Or+Zr,w:Nr.w*Or,h:Nr.h*Or}),jr.setClampRect({x:ko,y:Zr,w:hr,h:Br}),jr.setViewPortRect({x:0,y:0,w:Pr,h:zi})})})},ze=function(Ui,ri){var Yi=Xn.fromTag("img");return De(Yi,"src",ri),function(i){return new Yx(function(c){var f=function(){i.removeEventListener("load",f),c(i)};i.complete?c(i):i.addEventListener("load",f)})}(Yi.dom).then(function(){Ui.getSystem().isConnected()&&Un.getOpt(Ui).map(function(Or){var Pr=Wh({element:Yi});ys.replaceAt(Or,1,j.some(Pr));var zi=$.get(),hr={x:0,y:0,w:Yi.dom.naturalWidth,h:Yi.dom.naturalHeight};$.set(hr);var Br=zk.inflate(hr,-20,-20);F.set(Br),(zi.w!==hr.w||zi.h!==hr.h)&&function(Ui,ri){Un.getOpt(Ui).each(function(Yi){var Or=ks(Yi.element),Pr=hl(Yi.element),zi=ri.dom.naturalWidth,hr=ri.dom.naturalHeight,Br=Math.min(Or/zi,Pr/hr);Br>=1?f.set(1):f.set(Br)})}(Or,Yi),se(Or,Yi)})})},bn=Yg.sketch({dom:{tag:"div",classes:["tox-image-tools__image"]},components:[c.asSpec(),{dom:{tag:"img",attributes:{src:i}}},{dom:{tag:"div"},behaviours:ao([bs("image-panel-crop-events",[Va(function(Ui){Un.getOpt(Ui).each(function(ri){var Yi=ri.element.dom,Or=CB_create({x:10,y:10,w:100,h:100},{x:0,y:0,w:200,h:200},{x:0,y:0,w:200,h:200},Yi,V);Or.toggleVisibility(!1),Or.on("updateRect",function(Pr){var zi=Pr.rect,hr=f.get(),Br={x:Math.round(zi.x/hr),y:Math.round(zi.y/hr),w:Math.round(zi.w/hr),h:Math.round(zi.h/hr)};F.set(Br)}),x.set(Or)})}),mp(function(){x.clear()})])])}],containerBehaviours:ao([ys.config({}),bs("image-panel-events",[Va(function(Ui){ze(Ui,i)})])])}),Un=wl(bn);return{memContainer:Un,updateSrc:ze,zoom:function(Ui,ri){var Yi=f.get(),Or=ri>0?Math.min(2,Yi+.1):Math.max(.1,Yi-.1);f.set(Or),Un.getOpt(Ui).each(function(Pr){var zi=Pr.components()[1].element;se(Pr,zi)})},showCrop:function(){x.run(function(Ui){Ui.toggleVisibility(!0)})},hideCrop:function(){x.run(function(Ui){Ui.toggleVisibility(!1)})},getRect:function(){return F.get()},getMeasurements:function(){var Ui=$.get();return{width:Ui.w,height:Ui.h}}}},Iv=function(i,c,f,x,F){return QP({name:i,icon:j.some(c),disabled:f,tooltip:j.some(i),primary:!1,borderless:!1},x,F)},Vk=function(i,c){c?Aa.enable(i):Aa.disable(i)};var DI,MB=function(i){var c=ta(i),f=ku(),x=function EB(){var i=[],c=-1,$=function(){return c>0},se=function(){return-1!==c&&c<i.length-1};return{data:i,add:function(Ie){var ze=i.splice(++c);return i.push(Ie),{state:Ie,removed:ze}},undo:function(){if($())return i[--c]},redo:function(){if(se())return i[++c]},canUndo:$,canRedo:se}}();x.add(i);var $=function(Yi){c.set(Yi)},ze=function(Yi){return{blob:Yi,url:URL.createObjectURL(Yi)}},it=function(Yi){URL.revokeObjectURL(Yi.url)},kt=function(){f.on(it),f.clear()},pn=function(Yi){var Or=ze(Yi);return $(Or),function(Yi){GT.each(Yi,it)}(x.add(Or).removed),Or.url};return{getBlobState:function(){return c.get()},setBlobState:$,addBlobState:pn,getTempState:function(){return f.get().getOrThunk(c.get)},updateTempState:function(Yi){var Or=ze(Yi);return kt(),f.set(Or),Or.url},addTempState:function(Yi){var Or=ze(Yi);return f.set(Or),Or.url},applyTempState:function(Yi){return f.get().fold(V,function(Or){pn(Or.blob),Yi()})},destroyTempState:kt,undo:function(){var Yi=x.undo();return $(Yi),Yi.url},redo:function(){var Yi=x.redo();return $(Yi),Yi.url},getHistoryStates:function(){return{undoEnabled:x.canUndo(),redoEnabled:x.canRedo()}}}},TB=function(i,c){var f=MB(i.currentState),F=function(jr){var Nr=f.getHistoryStates();ko.updateButtonUndoStates(jr,Nr.undoEnabled,Nr.redoEnabled),Sa(jr,G_.formActionEvent,{name:G_.saveState(),value:Nr.undoEnabled})},ze=function(jr){return jr.toBlob()},it=function(jr){Sa(jr,G_.formActionEvent,{name:G_.disable(),value:{}})},Mt=function(jr){Zr.getApplyButton(jr).each(function(Nr){Aa.enable(Nr)}),Sa(jr,G_.formActionEvent,{name:G_.enable(),value:{}})},kt=function(jr,Nr){return it(jr),Br.updateSrc(jr,Nr)},pn=function(jr,Nr,bo,fa,Vr){it(jr),function(i){return fk(i)}(Nr).then(bo).then(ze).then(fa).then(function(sa){return kt(jr,sa)}).then(function(){F(jr),Vr(),Mt(jr)}).catch(function(sa){console.log(sa),jr.getSystem().isConnected()&&Mt(jr)})},bn=function(jr,Nr,bo){var fa=f.getBlobState().blob;pn(jr,fa,Nr,function(sa){return f.updateTempState(sa)},bo)},ri=function(jr){var Nr=f.getBlobState().url;return f.destroyTempState(),F(jr),Nr},Br=Hk(i.currentState.url),ko=function(i){var f=wl(Iv("Undo","undo",!0,function($){Sa($,Hg.undo(),{direction:1})},i)),x=wl(Iv("Redo","redo",!0,function($){Sa($,Hg.redo(),{direction:1})},i));return{container:Yg.sketch({dom:{tag:"div",classes:["tox-image-tools__toolbar","tox-image-tools__sidebar"]},components:[f.asSpec(),x.asSpec(),Iv("Zoom in","zoom-in",!1,function($){Sa($,Hg.zoom(),{direction:1})},i),Iv("Zoom out","zoom-out",!1,function($){Sa($,Hg.zoom(),{direction:-1})},i)]}),updateButtonUndoStates:function($,se,Ie){f.getOpt($).each(function(ze){Vk(ze,se)}),x.getOpt($).each(function(ze){Vk(ze,Ie)})}}}(c),Zr=yB(Br,c);return{dom:{tag:"div",attributes:{role:"presentation"}},components:[Zr.memContainer.asSpec(),Br.memContainer.asSpec(),ko.container],behaviours:ao([Io.config({store:{mode:"manual",getValue:function(){return f.getBlobState()}}}),bs("image-tools-events",[yr(Hg.undo(),function(jr,Nr){var bo=f.undo();kt(jr,bo).then(function(fa){Mt(jr),F(jr)})}),yr(Hg.redo(),function(jr,Nr){var bo=f.redo();kt(jr,bo).then(function(fa){Mt(jr),F(jr)})}),yr(Hg.zoom(),function(jr,Nr){var bo=Nr.event.direction;Br.zoom(jr,bo)}),yr(Hg.back(),function(jr,Nr){!function(jr){var Nr=ri(jr);kt(jr,Nr).then(function(bo){Mt(jr)})}(jr),(0,Nr.event.swap)(),Br.hideCrop()}),yr(Hg.apply(),function(jr,Nr){f.applyTempState(function(){ri(jr),(0,Nr.event.swap)()})}),yr(Hg.transform(),function(jr,Nr){return bn(jr,Nr.event.transform,V)}),yr(Hg.tempTransform(),function(jr,Nr){return function(jr,Nr){var bo=f.getTempState().blob;pn(jr,bo,Nr,function(Vr){return f.addTempState(Vr)},V)}(jr,Nr.event.transform)}),yr(Hg.transformApply(),function(jr,Nr){return function(jr,Nr,bo){var fa=f.getBlobState().blob;pn(jr,fa,Nr,function(sa){var Pa=f.addBlobState(sa);return ri(jr),Pa},bo)}(jr,Nr.event.transform,Nr.event.swap)}),yr(Hg.swap(),function(jr,Nr){!function(jr){ko.updateButtonUndoStates(jr,!1,!1)}(jr);var bo=Nr.event.transform,fa=Nr.event.swap;bo.fold(function(){fa()},function(Vr){bn(jr,Vr,fa)})})]),n1_self()])}},oO=function(i){return!jn(i,"items")},Gk="data-value",Wk=function(i,c,f,x){return ft(f,function(F){return oO(F)?{type:"togglemenuitem",text:F.text,value:F.value,active:F.value===x,onAction:function(){Io.setValue(i,F.value),Sa(i,vb,{name:c}),ka.focus(i)}}:{type:"nestedmenuitem",text:F.text,getSubmenuItems:function(){return Wk(i,c,F.items,x)}}})},$k=function(i,c){return Vi(i,function(f){return oO(f)?Nt(f.value===c,f):$k(f.items,c)})},Jk=ch({name:"HtmlSelect",configFields:[Mr("options"),Zu("selectBehaviours",[ka,Io]),Ti("selectClasses",[]),Ti("selectAttributes",{}),Es("data")],factory:function(i,c){var f=ft(i.options,function(F){return{dom:{tag:"option",value:F.value,innerHtml:F.text}}}),x=i.data.map(function(F){return Fo("initialValue",F)}).getOr({});return{uid:i.uid,dom:{tag:"select",classes:i.selectClasses,attributes:i.selectAttributes},components:f,behaviours:Od(i.selectBehaviours,[ka.config({}),Io.config({store:re({mode:"manual",getValue:function(F){return dm(F.element)},setValue:function(F,$){vi(i.options,function(Ie){return Ie.value===$}).isSome()&&Ch(F.element,$)}},x)})])}}}),qk=function(i,c){var f=i.label.map(function(pn){return MM(pn,c)}),x=[Aa.config({disabled:function(){return i.disabled||c.isDisabled()}}),bf(),Za.config({mode:"execution",useEnter:!0!==i.multiline,useControlEnter:!0===i.multiline,execute:function(pn){return Cl(pn,by),j.some(!0)}}),bs("textfield-change",[yr(sm(),function(pn,bn){Sa(pn,vb,{name:i.name})}),yr(Zp(),function(pn,bn){Sa(pn,vb,{name:i.name})})]),bm.config({})],F=i.validation.map(function(pn){return e1.config({getRoot:function(bn){return La(bn.element)},invalidClass:"tox-invalid",validator:{validate:function(bn){var Un=Io.getValue(bn),di=pn.validator(Un);return Fh_pure(!0===di?ra.value(Un):ra.error(di))},validateOnLoad:pn.validateOnLoad}})}).toArray(),$=i.placeholder.fold(X({}),function(pn){return{placeholder:c.translate(pn)}}),se=i.inputMode.fold(X({}),function(pn){return{inputmode:pn}}),Ie=re(re({},$),se),ze=Ec.parts.field({tag:!0===i.multiline?"textarea":"input",inputAttributes:Ie,inputClasses:[i.classname],inputBehaviours:ao(mi([x,F])),selectOnFocus:!1,factory:pA}),Mt=(i.flex?["tox-form__group--stretched"]:[]).concat(i.maximized?["tox-form-group--maximize"]:[]),kt=[Aa.config({disabled:function(){return i.disabled||c.isDisabled()},onDisabled:function(pn){Ec.getField(pn).each(Aa.disable)},onEnabled:function(pn){Ec.getField(pn).each(Aa.enable)}}),bf()];return uA(f,ze,Mt,kt)},PB=Object.freeze({__proto__:null,events:function(i,c){var x=i.stream.streams.setup(i,c);return uc([yr(i.event,x),mp(function(){return c.cancel()})].concat(i.cancelEvent.map(function(F){return[yr(F,function(){return c.cancel()})]}).getOr([])))}}),Xk=function(i){var c=ta(null);return zu({readState:function(){return{timer:null!==c.get()?"set":"unset"}},setTimer:function($){c.set($)},cancel:function(){var $=c.get();null!==$&&$.cancel()}})},LB=Object.freeze({__proto__:null,throttle:Xk,init:function(i){return i.stream.streams.state(i)}}),RB=[sl("stream",ms("mode",{throttle:[Mr("delay"),Ti("stopEvent",!0),$s("streams",{setup:function(i,c){var f=i.stream,x=Fx(i.onStream,f.delay);return c.setTimer(x),function(F,$){x.throttle(F,$),f.stopEvent&&$.stop()}},state:Xk})]})),Ti("event","input"),Es("cancelEvent"),gu("onStream")],eR=Wc({fields:RB,name:"streaming",active:PB,state:LB}),iI=function(i,c,f){var x=Io.getValue(f);Io.setValue(c,x),nR(c)},tR=function(i,c){var f=i.element,x=dm(f),F=f.dom;"number"!==Xt(f,"type")&&c(F,x)},nR=function(i){tR(i,function(c,f){return c.setSelectionRange(f.length,f.length)})},FB=function(i,c,f){if(i.selectsOver){var x=Io.getValue(c),F=i.getDisplayText(x),$=Io.getValue(f);return 0===i.getDisplayText($).indexOf(F)?j.some(function(){iI(0,c,f),function(i,c){tR(i,function(f,x){return f.setSelectionRange(c,x.length)})}(c,F.length)}):j.none()}return j.none()},aO=X("alloy.typeahead.itemexecute"),NB=X([Es("lazySink"),Mr("fetch"),Ti("minChars",5),Ti("responseTime",1e3),kl("onOpen"),Ti("getHotspot",j.some),Ti("getAnchorOverrides",X({})),Ti("layouts",j.none()),Ti("eventOrder",{}),eu("model",{},[Ti("getDisplayText",function(i){return void 0!==i.meta&&void 0!==i.meta.text?i.meta.text:i.value}),Ti("selectsOver",!0),Ti("populateFromBrowse",!0)]),kl("onSetValue"),Gc("onExecute"),kl("onItemExecute"),Ti("inputClasses",[]),Ti("inputAttributes",{}),Ti("inputStyles",{}),Ti("matchWidth",!0),Ti("useMinWidth",!1),Ti("dismissOnBlur",!0),Pm(["openClass"]),Es("initialData"),Zu("typeaheadBehaviours",[ka,Io,eR,Za,fl,Cm]),Yl("previewing",function(){return ta(!0)})].concat(iL()).concat(dP())),BB=X([kg({schema:[Wm()],name:"menu",overrides:function(i){return{fakeFocus:!0,onHighlight:function(c,f){i.previewing.get()?c.getSystem().getByUid(i.uid).each(function(x){FB(i.model,x,f).fold(function(){return Jl.dehighlight(c,f)},function(F){return F()})}):c.getSystem().getByUid(i.uid).each(function(x){i.model.populateFromBrowse&&iI(i.model,x,f)}),i.previewing.set(!1)},onExecute:function(c,f){return c.getSystem().getByUid(i.uid).toOptional().map(function(x){return Sa(x,aO(),{item:f}),!0})},onHover:function(c,f){i.previewing.set(!1),c.getSystem().getByUid(i.uid).each(function(x){i.model.populateFromBrowse&&iI(i.model,x,f)})}}}})]),UB=qm({name:"Typeahead",configFields:NB(),partFields:BB(),factory:function(i,c,f,x){var F=function(ze,it,Mt){i.previewing.set(!1);var kt=Cm.getCoupled(ze,"sandbox");if(el.isOpen(kt))Ml.getCurrent(kt).each(function(bn){Jl.getHighlighted(bn).fold(function(){Mt(bn)},function(){J_(kt,bn.element,"keydown",it)})});else{Dw(i,se(ze),ze,kt,x,function(bn){Ml.getCurrent(bn).each(Mt)},cC.HighlightFirst).get(V)}},$=Mw(i),se=function(ze){return function(it){return it.map(function(Mt){var kt=Eo(Mt.menus),pn=wi(kt,function(Un){return st(Un.items,function(di){return"item"===di.type})});return Io.getState(ze).update(ft(pn,function(Un){return Un.data})),Mt})}},Ie=[ka.config({}),Io.config({onSetValue:i.onSetValue,store:re({mode:"dataset",getDataKey:function(ze){return dm(ze.element)},getFallbackEntry:function(ze){return{value:ze,meta:{}}},setValue:function(ze,it){Ch(ze.element,i.model.getDisplayText(it))}},i.initialData.map(function(ze){return Fo("initialValue",ze)}).getOr({}))}),eR.config({stream:{mode:"throttle",delay:i.responseTime,stopEvent:!1},onStream:function(ze,it){var Mt=Cm.getCoupled(ze,"sandbox");if(ka.isFocused(ze)&&dm(ze.element).length>=i.minChars){var pn=Ml.getCurrent(Mt).bind(function(Un){return Jl.getHighlighted(Un).map(Io.getValue)});i.previewing.set(!0);Dw(i,se(ze),ze,Mt,x,function(Un){Ml.getCurrent(Mt).each(function(di){pn.fold(function(){i.model.selectsOver&&Jl.highlightFirst(di)},function(Ui){Jl.highlightBy(di,function(ri){return Io.getValue(ri).value===Ui.value}),Jl.getHighlighted(di).orThunk(function(){return Jl.highlightFirst(di),j.none()})})})},cC.HighlightFirst).get(V)}},cancelEvent:Kd()}),Za.config({mode:"special",onDown:function(ze,it){return F(ze,it,Jl.highlightFirst),j.some(!0)},onEscape:function(ze){var it=Cm.getCoupled(ze,"sandbox");return el.isOpen(it)?(el.close(it),j.some(!0)):j.none()},onUp:function(ze,it){return F(ze,it,Jl.highlightLast),j.some(!0)},onEnter:function(ze){var it=Cm.getCoupled(ze,"sandbox"),Mt=el.isOpen(it);if(Mt&&!i.previewing.get())return Ml.getCurrent(it).bind(function(pn){return Jl.getHighlighted(pn)}).map(function(pn){return Sa(ze,aO(),{item:pn}),!0});var kt=Io.getValue(ze);return Cl(ze,Kd()),i.onExecute(it,ze,kt),Mt&&el.close(it),j.some(!0)}}),fl.config({toggleClass:i.markers.openClass,aria:{mode:"expanded"}}),Cm.config({others:{sandbox:function(ze){return uP(i,ze,{onOpen:function(){return fl.on(ze)},onClose:function(){return fl.off(ze)}})}}}),bs("typeaheadevents",[Wp(function(ze){var it=V;uS(i,se(ze),ze,x,it,cC.HighlightFirst).get(V)}),yr(aO(),function(ze,it){var Mt=Cm.getCoupled(ze,"sandbox");iI(i.model,ze,it.event.item),Cl(ze,Kd()),i.onItemExecute(ze,Mt,it.event.item,Io.getValue(ze)),el.close(Mt),nR(ze)})].concat(i.dismissOnBlur?[yr(gh(),function(ze){var it=Cm.getCoupled(ze,"sandbox");dc(it.element).isNone()&&el.close(it)})]:[]))];return{uid:i.uid,dom:Tw(nr(i,{inputAttributes:{role:"combobox","aria-autocomplete":"list","aria-haspopup":"true"}})),behaviours:re(re({},$),Od(i.typeaheadBehaviours,Ie)),eventOrder:i.eventOrder}}}),fC=function(i){return re(re({},i),{toCached:function(){return fC(i.toCached())},bindFuture:function(ze){return fC(i.bind(function(it){return it.fold(function(Mt){return Fh_pure(ra.error(Mt))},function(Mt){return ze(Mt)})}))},bindResult:function(ze){return fC(i.map(function(it){return it.bind(ze)}))},mapResult:function(ze){return fC(i.map(function(it){return it.map(ze)}))},mapError:function(ze){return fC(i.map(function(it){return it.mapError(ze)}))},foldResult:function(ze,it){return i.map(function(Mt){return Mt.fold(ze,it)})},withTimeout:function(ze,it){return fC(Fh_nu(function(Mt){var kt=!1,pn=setTimeout(function(){kt=!0,Mt(ra.error(it()))},ze);i.get(function(bn){kt||(clearTimeout(pn),Mt(bn))})}))}})},oR=function(i){return fC(Fh_nu(i))},VB_nu=oR,ZB={type:"separator"},GB=function(i){return{type:"menuitem",value:i.url,text:i.title,meta:{attach:i.attach},onAction:V}},sO=function(i,c){return{type:"menuitem",value:c,text:i,meta:{attach:void 0},onAction:V}},lR=function(i,c){return function(i){return ft(i,GB)}(function(i,c){return st(c,function(f){return f.type===i})}(i,c))},$B=function(i){return lR("header",i.targets)},jB=function(i){return lR("anchor",i.targets)},KB=function(i){return j.from(i.anchorTop).map(function(c){return sO("<top>",c)}).toArray()},JB=function(i){return j.from(i.anchorBottom).map(function(c){return sO("<bottom>",c)}).toArray()},lO=function(i,c){var f=i.toLowerCase();return st(c,function(x){var F=void 0!==x.meta&&void 0!==x.meta.text?x.meta.text:x.text;return Qe(F.toLowerCase(),f)||Qe(x.value.toLowerCase(),f)})},qB=function(i,c,f){var x=Io.getValue(c),F=void 0!==x.meta.text?x.meta.text:x.value;return f.getLinkInformation().fold(function(){return[]},function(se){var Ie=lO(F,function(i){return ft(i,function(c){return sO(c,c)})}(f.getHistory(i)));return"file"===i?function(i){return Dn(i,function(c,f){return 0===c.length||0===f.length?c.concat(f):c.concat(ZB,f)},[])}([Ie,lO(F,$B(se)),lO(F,mi([KB(se),jB(se),JB(se)]))]):Ie})},uR=jo("aria-invalid"),om=function(i){return function(c,f,x){return mr(f,"name").fold(function(){return i(f,x)},function(F){return c.field(F,i(f,x))})}},n4={bar:om(function(i,c){return function(i,c){return{dom:{tag:"div",classes:["tox-bar","tox-form__controls-h-stack"]},components:ft(i.items,c.interpreter)}}(i,c.shared)}),collection:om(function(i,c){return Ew(i,c.shared.providers)}),alertbanner:om(function(i,c){return function(i,c){return Yg.sketch({dom:{tag:"div",attributes:{role:"alert"},classes:["tox-notification","tox-notification--in","tox-notification--"+i.level]},components:[{dom:{tag:"div",classes:["tox-notification__icon"]},components:[Nf.sketch({dom:{tag:"button",classes:["tox-button","tox-button--naked","tox-button--icon"],innerHtml:jD(i.icon,c.icons),attributes:{title:c.translate(i.iconTooltip)}},action:function(f){Sa(f,XC,{name:"alert-banner",value:i.url})},buttonBehaviours:ao([Rx()])})]},{dom:{tag:"div",classes:["tox-notification__body"],innerHtml:c.translate(i.text)}}]})}(i,c.shared.providers)}),input:om(function(i,c){return function(i,c){return qk({name:i.name,multiline:!1,label:i.label,inputMode:i.inputMode,placeholder:i.placeholder,flex:!1,disabled:i.disabled,classname:"tox-textfield",validation:j.none(),maximized:i.maximized},c)}(i,c.shared.providers)}),textarea:om(function(i,c){return function(i,c){return qk({name:i.name,multiline:!0,label:i.label,inputMode:j.none(),placeholder:i.placeholder,flex:!0,disabled:i.disabled,classname:"tox-textarea",validation:j.none(),maximized:i.maximized},c)}(i,c.shared.providers)}),label:om(function(i,c){return function(i,c){var f={dom:{tag:"label",innerHtml:c.providers.translate(i.label),classes:["tox-label"]}},x=ft(i.items,c.interpreter);return{dom:{tag:"div",classes:["tox-form__group"]},components:[f].concat(x),behaviours:ao([n1_self(),ys.config({}),SM_domHtml(j.none()),Za.config({mode:"acyclic"})])}}(i,c.shared)}),iframe:function(i){return function(c,f,x){var F=nr(f,{source:"dynamic"});return om(i)(c,F,x)}}(function(i,c){return ck(i,c.shared.providers)}),button:om(function(i,c){return oB(i,c.shared.providers)}),checkbox:om(function(i,c){return function(i,c){var f=Io.config({store:{mode:"manual",getValue:function(ze){return ze.element.dom.checked},setValue:function(ze,it){ze.element.dom.checked=it}}}),x=function(ze){return ze.element.dom.click(),j.some(!0)},F=Ec.parts.field({factory:{sketch:ve},dom:{tag:"input",classes:["tox-checkbox__input"],attributes:{type:"checkbox"}},behaviours:ao([n1_self(),Aa.config({disabled:function(){return i.disabled||c.isDisabled()}}),bm.config({}),ka.config({}),f,Za.config({mode:"special",onEnter:x,onSpace:x,stopSpaceKeyup:!0}),bs("checkbox-events",[yr(Xu(),function(ze,it){Sa(ze,vb,{name:i.name})})])])}),$=Ec.parts.label({dom:{tag:"span",classes:["tox-checkbox__label"],innerHtml:c.translate(i.label)},behaviours:ao([fA.config({})])}),se=function(ze){return fb("checked"===ze?"selected":"unselected",{tag:"span",classes:["tox-icon","tox-checkbox-icon__"+ze]},c.icons)},Ie=wl({dom:{tag:"div",classes:["tox-checkbox__icons"]},components:[se("checked"),se("unchecked")]});return Ec.sketch({dom:{tag:"label",classes:["tox-checkbox"]},components:[F,Ie.asSpec(),$],fieldBehaviours:ao([Aa.config({disabled:function(){return i.disabled||c.isDisabled()},disableClass:"tox-checkbox--disabled",onDisabled:function(ze){Ec.getField(ze).each(Aa.disable)},onEnabled:function(ze){Ec.getField(ze).each(Aa.enable)}}),bf()])})}(i,c.shared.providers)}),colorinput:om(function(i,c){return vN(i,c.shared,c.colorinput)}),colorpicker:om(function(i){var c=function(se){return"tox-"+se},f=l6(d6,c),$=wl(f.sketch({dom:{tag:"div",classes:[c("color-picker-container")],attributes:{role:"presentation"}},onValidHex:function(se){Sa(se,XC,{name:"hex-valid",value:!0})},onInvalidHex:function(se){Sa(se,XC,{name:"hex-valid",value:!1})}}));return{dom:{tag:"div"},components:[$.asSpec()],behaviours:ao([Io.config({store:{mode:"manual",getValue:function(se){var Ie=$.get(se);return Ml.getCurrent(Ie).bind(function(Mt){return Io.getValue(Mt).hex}).map(function(Mt){return"#"+Mt}).getOr("")},setValue:function(se,Ie){var it=/^#([a-fA-F0-9]{3}(?:[a-fA-F0-9]{3})?)/.exec(Ie),Mt=$.get(se);Ml.getCurrent(Mt).fold(function(){console.log("Can not find form")},function(pn){Io.setValue(pn,{hex:j.from(it[1]).getOr("")}),mS.getField(pn,"hex").each(function(bn){Cl(bn,sm())})})}}}),n1_self()])}}),dropzone:om(function(i,c){return y6(i,c.shared.providers)}),grid:om(function(i,c){return function(i,c){return{dom:{tag:"div",classes:["tox-form__grid","tox-form__grid--"+i.columns+"col"]},components:ft(i.items,c.interpreter)}}(i,c.shared)}),listbox:om(function(i,c){return function(i,c){var f=c.shared.providers,x=ui(i.items).filter(oO),F=i.label.map(function(Ie){return MM(Ie,f)}),se={dom:{tag:"div",classes:["tox-listboxfield"]},components:[Ec.parts.field({dom:{},factory:{sketch:function(Ie){return Kw({uid:Ie.uid,text:x.map(function(ze){return ze.text}),icon:j.none(),tooltip:i.label,role:j.none(),fetch:function(ze,it){var Mt=Wk(ze,i.name,i.items,Io.getValue(ze));it(gS(Mt,Lm.CLOSE_ON_EXECUTE,c,!1))},onSetup:X(V),getApi:X({}),columns:1,presets:"normal",classes:[],dropdownBehaviours:[bm.config({}),Io.config({store:{mode:"manual",initialValue:x.map(function(ze){return ze.value}).getOr(""),getValue:function(ze){return Xt(ze.element,Gk)},setValue:function(ze,it){$k(i.items,it).each(function(Mt){De(ze.element,Gk,Mt.value),Sa(ze,mD,{text:Mt.text})})}}})]},"tox-listbox",c.shared)}}})]};return Ec.sketch({dom:{tag:"div",classes:["tox-form__group"]},components:mi([F.toArray(),[se]]),fieldBehaviours:ao([Aa.config({disabled:X(i.disabled),onDisabled:function(Ie){Ec.getField(Ie).each(Aa.disable)},onEnabled:function(Ie){Ec.getField(Ie).each(Aa.enable)}})])})}(i,c)}),selectbox:om(function(i,c){return function(i,c){var f=ft(i.items,function(Ie){return{text:c.translate(Ie.text),value:Ie.value}}),x=i.label.map(function(Ie){return MM(Ie,c)}),F=Ec.parts.field({dom:{},selectAttributes:{size:i.size},options:f,factory:Jk,selectBehaviours:ao([Aa.config({disabled:function(){return i.disabled||c.isDisabled()}}),bm.config({}),bs("selectbox-change",[yr(Xu(),function(Ie,ze){Sa(Ie,vb,{name:i.name})})])])}),$=i.size>1?j.none():j.some(fb("chevron-down",{tag:"div",classes:["tox-selectfield__icon-js"]},c.icons)),se={dom:{tag:"div",classes:["tox-selectfield"]},components:mi([[F],$.toArray()])};return Ec.sketch({dom:{tag:"div",classes:["tox-form__group"]},components:mi([x.toArray(),[se]]),fieldBehaviours:ao([Aa.config({disabled:function(){return i.disabled||c.isDisabled()},onDisabled:function(Ie){Ec.getField(Ie).each(Aa.disable)},onEnabled:function(Ie){Ec.getField(Ie).each(Aa.enable)}}),bf()])})}(i,c.shared.providers)}),sizeinput:om(function(i,c){return Fk(i,c.shared.providers)}),urlinput:om(function(i,c){return function(i,c,f){var x,ri,Yi,Or,Pr,F=c.shared.providers,$=function(ri){var Yi=Io.getValue(ri);f.addToHistory(Yi.value,i.filetype)},se=Ec.parts.field({factory:UB,dismissOnBlur:!0,inputClasses:["tox-textfield"],sandboxClasses:["tox-dialog__popups"],inputAttributes:{"aria-errormessage":uR,type:"url"},minChars:0,responseTime:0,fetch:function(ri){var Yi=qB(i.filetype,ri,f),Or=gS(Yi,Lm.BUBBLE_TO_SANDBOX,c,!1);return Fh_pure(Or)},getHotspot:function(ri){return bn.getOpt(ri)},onSetValue:function(ri,Yi){ri.hasConfigured(e1)&&e1.run(ri).get(V)},typeaheadBehaviours:ao(mi([f.getValidationHandler().map(function(ri){return e1.config({getRoot:function(Yi){return La(Yi.element)},invalidClass:"tox-control-wrap--status-invalid",notify:{onInvalid:function(Yi,Or){it.getOpt(Yi).each(function(Pr){De(Pr.element,"title",F.translate(Or))})}},validator:{validate:function(Yi){var Or=Io.getValue(Yi);return VB_nu(function(Pr){ri({type:i.filetype,url:Or.value},function(zi){if("invalid"===zi.status){var hr=ra.error(zi.message);Pr(hr)}else{var Br=ra.value(zi.message);Pr(Br)}})})},validateOnLoad:!1}})}).toArray(),[Aa.config({disabled:function(){return i.disabled||F.isDisabled()}}),bm.config({}),bs("urlinput-events",mi(["file"===i.filetype?[yr(sm(),function(ri){Sa(ri,vb,{name:i.name})})]:[],[yr(Xu(),function(ri){Sa(ri,vb,{name:i.name}),$(ri)}),yr(Zp(),function(ri){Sa(ri,vb,{name:i.name}),$(ri)})]]))]])),eventOrder:(x={},x[sm()]=["streaming","urlinput-events","invalidating"],x),model:{getDisplayText:function(ri){return ri.value},selectsOver:!1,populateFromBrowse:!1},markers:{openClass:"tox-textfield--popup-open"},lazySink:c.shared.getSink,parts:{menu:b(0,0,"normal")},onExecute:function(ri,Yi,Or){Sa(Yi,by,{})},onItemExecute:function(ri,Yi,Or,Pr){$(ri),Sa(ri,vb,{name:i.name})}}),Ie=i.label.map(function(ri){return MM(ri,F)}),it=wl((ri="invalid",Yi=j.some(uR),void 0===(Or="warning")&&(Or=ri),void 0===Pr&&(Pr=ri),fb(Or,{tag:"div",classes:["tox-icon","tox-control-wrap__status-icon-"+ri],attributes:re({title:F.translate(Pr),"aria-live":"polite"},Yi.fold(function(){return{}},function(zi){return{id:zi}}))},F.icons))),Mt=wl({dom:{tag:"div",classes:["tox-control-wrap__status-icon-wrap"]},components:[it.asSpec()]}),kt=f.getUrlPicker(i.filetype),pn=jo("browser.url.event"),bn=wl({dom:{tag:"div",classes:["tox-control-wrap"]},components:[se,Mt.asSpec()],behaviours:ao([Aa.config({disabled:function(){return i.disabled||F.isDisabled()}})])}),Un=wl(XP({name:i.name,icon:j.some("browse"),text:i.label.getOr(""),disabled:i.disabled,primary:!1,borderless:!0},function(ri){return Cl(ri,pn)},F,[],["tox-browse-url"]));return Ec.sketch({dom:nL([]),components:Ie.toArray().concat([{dom:{tag:"div",classes:["tox-form__controls-h-stack"]},components:mi([[bn.asSpec()],kt.map(function(){return Un.asSpec()}).toArray()])}]),fieldBehaviours:ao([Aa.config({disabled:function(){return i.disabled||F.isDisabled()},onDisabled:function(ri){Ec.getField(ri).each(Aa.disable),Un.getOpt(ri).each(Aa.disable)},onEnabled:function(ri){Ec.getField(ri).each(Aa.enable),Un.getOpt(ri).each(Aa.enable)}}),bf(),bs("url-input-events",[yr(pn,function(ri){Ml.getCurrent(ri).each(function(Yi){var Or=Io.getValue(Yi),Pr=re({fieldname:i.name},Or);kt.each(function(zi){zi(Pr).get(function(hr){Io.setValue(Yi,hr),Sa(ri,vb,{name:i.name})})})})})])])})}(i,c,c.urlinput)}),customeditor:om(function(i){var c=ku(),f=wl({dom:{tag:i.tag}}),x=ku();return{dom:{tag:"div",classes:["tox-custom-editor"]},behaviours:ao([bs("custom-editor-events",[Va(function(F){f.getOpt(F).each(function($){(!function(i){return jn(i,"init")}(i)?Vw.load(i.scriptId,i.scriptUrl).then(function(se){return se($.element.dom,i.settings)}):i.init($.element.dom)).then(function(se){x.on(function(Ie){se.setValue(Ie)}),x.clear(),c.set(se)})})})]),Io.config({store:{mode:"manual",getValue:function(){return c.get().fold(function(){return x.get().getOr("")},function(F){return F.getValue()})},setValue:function(F,$){c.get().fold(function(){x.set($)},function(se){return se.setValue($)})}}}),n1_self()]),components:[f.asSpec()]}}),htmlpanel:om(function(i){return"presentation"===i.presets?Yg.sketch({dom:{tag:"div",classes:["tox-form__group"],innerHtml:i.html}}):Yg.sketch({dom:{tag:"div",classes:["tox-form__group"],innerHtml:i.html,attributes:{role:"document"}},containerBehaviours:ao([bm.config({}),ka.config({})])})}),imagetools:om(function(i,c){return TB(i,c.shared.providers)}),table:om(function(i,c){return function(i,c){var Ie,f=function(Ie){return{dom:{tag:"th",innerHtml:c.translate(Ie)}}},F=function(Ie){return{dom:{tag:"td",innerHtml:c.translate(Ie)}}},$=function(Ie){return{dom:{tag:"tr"},components:ft(Ie,F)}};return{dom:{tag:"table",classes:["tox-dialog__table"]},components:[(Ie=i.header,{dom:{tag:"thead"},components:[{dom:{tag:"tr"},components:ft(Ie,f)}]}),function(Ie){return{dom:{tag:"tbody"},components:ft(Ie,$)}}(i.cells)],behaviours:ao([bm.config({}),ka.config({})])}}(i,c.shared.providers)}),panel:om(function(i,c){return function(i,c){return{dom:{tag:"div",classes:i.classes},components:ft(i.items,c.shared.interpreter)}}(i,c)})},i4={field:function(i,c){return c}},aI=function(i,c,f){var x=nr(f,{shared:{interpreter:function(F){return cO(i,F,x)}}});return cO(i,c,x)},cO=function(i,c,f){return mr(n4,c.type).fold(function(){return console.error('Unknown factory type "'+c.type+'", defaulting to container: ',c),c},function(x){return x(i,c,f)})},sI={valignCentre:[],alignCentre:[],alignLeft:[],alignRight:[],right:[],left:[],bottom:[],top:[]},pR=function(i,c,f){var F={maxHeightFunction:eh()};return function(){return f()?{type:"node",root:qr(i()),node:j.from(i()),bubble:uv(12,12,sI),layouts:{onRtl:function(){return[nE]},onLtr:function(){return[J0]}},overrides:F}:{type:"hotspot",hotspot:c(),bubble:uv(-12,12,sI),layouts:{onRtl:function(){return[Bp]},onLtr:function(){return[tm]}},overrides:F}}},mR=function(i,c,f){return function(){return f()?{type:"node",root:qr(i()),node:j.from(i()),layouts:{onRtl:function(){return[gy]},onLtr:function(){return[gy]}}}:{type:"hotspot",hotspot:c(),layouts:{onRtl:function(){return[Hu]},onLtr:function(){return[Hu]}}}}},o4=function(i,c){return function(){return{type:"selection",root:c(),getSelection:function(){var f=i.selection.getRng();return j.some(Sg.range(Xn.fromDom(f.startContainer),f.startOffset,Xn.fromDom(f.endContainer),f.endOffset))}}}},a4=function(i){return function(c){return{type:"node",root:i(),node:c}}},s4=function(i,c,f){var x=cw(i),F=function(){return Xn.fromDom(i.getBody())},$=function(){return Xn.fromDom(i.getContentAreaContainer())},se=function(){return x||!f()};return{inlineDialog:pR($,c,se),banner:mR($,c,se),cursor:o4(i,F),node:a4(F)}},l4=function(i){return function(c,f){R2(i)(c,f)}},c4=function(i){return function(){return A2(i)}},fR=function(i){return function(){return WI(i)}},u4=function(i){return function(){return I2(i)}},hR=function(i){return{colorPicker:l4(i),hasCustomColors:c4(i),getColors:fR(i),getColorCols:u4(i)}},d4=function(i){return function(){return function(i){return i.getParam("draggable_modal",!1,"boolean")}(i)}},p4=function(i){return{isDraggableModal:d4(i)}},lI=[{title:"Headings",items:[{title:"Heading 1",format:"h1"},{title:"Heading 2",format:"h2"},{title:"Heading 3",format:"h3"},{title:"Heading 4",format:"h4"},{title:"Heading 5",format:"h5"},{title:"Heading 6",format:"h6"}]},{title:"Inline",items:[{title:"Bold",format:"bold"},{title:"Italic",format:"italic"},{title:"Underline",format:"underline"},{title:"Strikethrough",format:"strikethrough"},{title:"Superscript",format:"superscript"},{title:"Subscript",format:"subscript"},{title:"Code",format:"code"}]},{title:"Blocks",items:[{title:"Paragraph",format:"p"},{title:"Blockquote",format:"blockquote"},{title:"Div",format:"div"},{title:"Pre",format:"pre"}]},{title:"Align",items:[{title:"Left",format:"alignleft"},{title:"Center",format:"aligncenter"},{title:"Right",format:"alignright"},{title:"Justify",format:"alignjustify"}]}],gR=function(i){return Dn(i,function(c,f){if(function(i){return jn(i,"items")}(f)){var x=gR(f.items);return{customFormats:c.customFormats.concat(x.customFormats),formats:c.formats.concat([{title:f.title,items:x.formats}])}}if(function(i){return jn(i,"inline")}(f)||function(i){return jn(i,"block")}(f)||function(i){return jn(i,"selector")}(f)){var $="custom-"+(e(f.name)?f.name:f.title.toLowerCase());return{customFormats:c.customFormats.concat([{name:$,format:f}]),formats:c.formats.concat([{title:f.title,format:$,icon:f.icon}])}}return re(re({},c),{formats:c.formats.concat(f)})},{customFormats:[],formats:[]})},dO=function(i){return function(i){return j.from(i.getParam("style_formats")).filter(D)}(i).map(function(c){var f=function(i,c){var f=gR(c),x=function(F){Ct(F,function($){i.formatter.has($.name)||i.formatter.register($.name,$.format)})};return i.formatter?x(f.customFormats):i.on("init",function(){x(f.customFormats)}),f.formats}(i,c);return function(i){return i.getParam("style_formats_merge",!1,"boolean")}(i)?lI.concat(f):f}).getOr(lI)},pO=function(i,c,f){var x={type:"formatter",isSelected:c(i.format),getStylePreview:f(i.format)};return nr(i,x)},mO=function(i,c,f,x){var Ie=function(ze){return ft(ze,function(it){var Mt=Vn(it);if(ct(it,"items")){var kt=Ie(it.items);return nr(function(ze){return nr(ze,{type:"submenu"})}(it),{getStyleItems:X(kt)})}return ct(it,"format")?function(ze){return pO(ze,f,x)}(it):1===Mt.length&&Ve(Mt,"title")?nr(it,{type:"separator"}):function(ze){var it=e(ze.name)?ze.name:jo(ze.title),Mt="custom-"+it,kt={type:"formatter",format:Mt,isSelected:f(Mt),getStylePreview:x(Mt)},pn=nr(ze,kt);return i.formatter.register(it,pn),pn}(it)})};return Ie(c)},_4=function(i){var c=function(kt){return function(){return i.formatter.match(kt)}},f=function(kt){return function(){var pn=i.formatter.get(kt);return void 0!==pn?j.some({tag:pn.length>0&&(pn[0].inline||pn[0].block)||"div",styles:i.dom.parseStyle(i.formatter.getCssText(kt))}):j.none()}},x=function(kt){var pn=kt.items;return void 0!==pn&&pn.length>0?wi(pn,x):[kt.format]},F=ta([]),$=ta([]),se=ta([]),Ie=ta([]),ze=ta(!1);i.on("PreInit",function(kt){var pn=dO(i),bn=mO(i,pn,c,f);F.set(bn),$.set(wi(bn,x))}),i.on("addStyleModifications",function(kt){var pn=mO(i,kt.items,c,f);se.set(pn),ze.set(kt.replace),Ie.set(wi(pn,x))});return{getData:function(){var kt=ze.get()?[]:F.get(),pn=se.get();return kt.concat(pn)},getFlattenedKeys:function(){var kt=ze.get()?[]:$.get(),pn=Ie.get();return kt.concat(pn)}}},y4=GT.trim,_R=function(i){return function(c){return!(!function(i){return P(i)&&1===i.nodeType}(c)||c.contentEditable!==i&&c.getAttribute("data-mce-contenteditable")!==i)}},b4=_R("true"),vR=_R("false"),yR=function(i,c,f,x,F){return{type:i,title:c,url:f,level:x,attach:F}},bR=function(i){return i.innerText||i.textContent},ER=function(i){return function(i){return i&&"A"===i.nodeName&&void 0!==(i.id||i.name)}(i)&&TR(i)},MR=function(i){return i&&/^(H[1-6])$/.test(i.nodeName)},TR=function(i){return function(i){for(;i=i.parentNode;){var c=i.contentEditable;if(c&&"inherit"!==c)return b4(i)}return!1}(i)&&!vR(i)},M4=function(i){return MR(i)&&TR(i)},T4=function(i){var c=function(i){return i.id?i.id:jo("h")}(i);return yR("header",bR(i),"#"+c,function(i){return MR(i)?parseInt(i.nodeName.substr(1),10):0}(i),function(){i.id=c})},x4=function(i){var c=i.id||i.name,f=bR(i);return yR("anchor",f||"#"+c,"#"+c,0,V)},A4=function(i){var c=function(i,c){return ft(Ap(Xn.fromDom(c),i),function(f){return f.dom})}("h1,h2,h3,h4,h5,h6,a:not([href])",i);return c},w4=function(i){return y4(i.title).length>0},P4_find=function(i){var c=A4(i);return st(function(i){return ft(st(i,M4),T4)}(c).concat(function(i){return ft(st(i,ER),x4)}(c)),w4)},cI="tinymce-url-history",fO=function(i){return e(i)&&/^https?/.test(i)},SR=function(i){return l(i)&&zr(i,function(c){return!function(i){return D(i)&&i.length<=5&&Bn(i,fO)}(c)}).isNone()},AR=function(){var c,i=gw.getItem(cI);if(null===i)return{};try{c=JSON.parse(i)}catch(f){if(f instanceof SyntaxError)return console.log("Local storage "+cI+" was not valid JSON",f),{};throw f}return SR(c)?c:(console.log("Local storage "+cI+" was not valid format",c),{})},k4=function(i){var c=AR();return mr(c,i).getOr([])},hO=function(i,c){if(fO(i)){var f=AR(),x=mr(f,c).getOr([]),F=st(x,function($){return $!==i});f[c]=[i].concat(F).slice(0,5),function(i){if(!SR(i))throw new Error("Bad format for history:\n"+JSON.stringify(i));gw.setItem(cI,JSON.stringify(i))}(f)}},uI=function(i){return!!i},R4=function(i){return vn(GT.makeMap(i,/[, ]/),uI)},gO=function(i){return j.from(function(i){return i.getParam("file_picker_callback")}(i)).filter(w)},N4=function(i,c){var f=function(i){var c=j.some(function(i){return i.getParam("file_picker_types")}(i)).filter(uI),f=j.some(function(i){return i.getParam("file_browser_callback_types")}(i)).filter(uI),x=c.or(f).map(R4);return gO(i).fold(Pe,function(F){return x.fold(xe,function($){return Vn($).length>0&&$})})}(i);return E(f)?f?gO(i):j.none():f[c]?gO(i):j.none()},wR=function(i){return j.from(i).filter(e).getOrUndefined()},Y4=function(i){return{getHistory:k4,addToHistory:hO,getLinkInformation:function(){return function(i){return function(i){return!1===i.getParam("typeahead_urls")}(i)?j.none():j.some({targets:P4_find(i.getBody()),anchorTop:wR(XO(i)),anchorBottom:wR(k3(i))})}(i)},getValidationHandler:function(){return function(i){return j.from(function(i){var c=i.getParam("file_picker_validator_handler",void 0,"function");return void 0===c?i.getParam("filepicker_validator_handler",void 0,"function"):c}(i))}(i)},getUrlPicker:function(c){return function(i,c){return N4(i,c).map(function(f){return function(x){return Fh_nu(function(F){var se=re({filetype:c,fieldname:x.fieldname},j.from(x.meta).getOr({}));f.call(i,function(Ie,ze){if(!e(Ie))throw new Error("Expected value to be string");if(void 0!==ze&&!l(ze))throw new Error("Expected meta to be a object");F({value:Ie,meta:ze})},x.value,se)})}})}(i,c)}}},dI=function(i,c,f){var x=ta(!1),F=function(i){var c=ta(WO(i)?"bottom":"top");return{isPositionedAtTop:function(){return"top"===c.get()},getDockingMode:c.get,setDockingMode:c.set}}(c),$={shared:{providers:{icons:function(){return c.ui.registry.getAll().icons},menuItems:function(){return c.ui.registry.getAll().menuItems},translate:Bf.translate,isDisabled:function(){return c.mode.isReadOnly()||c.ui.isDisabled()},getSetting:c.getParam.bind(c)},interpreter:function(se){return function(i,c){return cO(i4,i,c)}(se,$)},anchors:s4(c,f,F.isPositionedAtTop),header:F,getSink:function(){return ra.value(i)}},urlinput:Y4(c),styleselect:_4(c),colorinput:hR(c),dialog:p4(c),isContextMenuOpen:function(){return x.get()},setContextMenuState:function(se){return x.set(se)}};return $},Pv=Ua,WT=I1,hD=X([Ti("shell",!1),Mr("makeItem"),Ti("setupItem",V),Lh_field("listBehaviours",[ys])]),_O=Rg({name:"items",overrides:function(){return{behaviours:ao([ys.config({})])}}}),pI=X([_O]),Z4=X("CustomList"),IR=qm({name:Z4(),configFields:hD(),partFields:pI(),factory:function(i,c,f,x){var $=i.shell?{behaviours:[ys.config({})],components:[]}:{behaviours:[],components:c},se=function(Ie){return i.shell?j.some(Ie):qc(Ie,i,"items")};return{uid:i.uid,dom:i.dom,components:$.components,behaviours:Od(i.listBehaviours,$.behaviours),apis:{setItems:function(Ie,ze){se(Ie).fold(function(){throw console.error("Custom List was defined to not be a shell, but no item container was specified in components"),new Error("Custom List was defined to not be a shell, but no item container was specified in components")},function(it){var Mt=ys.contents(it),kt=ze.length,pn=kt-Mt.length,bn=pn>0?Ne(pn,function(){return i.makeItem()}):[],Un=Mt.slice(kt);Ct(Un,function(Ui){return ys.remove(it,Ui)}),Ct(bn,function(Ui){return ys.append(it,Ui)});var di=ys.contents(it);Ct(di,function(Ui,ri){i.setupItem(Ie,Ui,ze[ri],ri)})})}}}},apis:{setItems:function(i,c,f){i.setItems(c,f)}}}),vS=X([Mr("dom"),Ti("shell",!0),Zu("toolbarBehaviours",[ys])]),gD=X([Rg({name:"groups",overrides:function(){return{behaviours:ao([ys.config({})])}}})]),i1=qm({name:"Toolbar",configFields:vS(),partFields:gD(),factory:function(i,c,f,x){var $=function(Ie){return i.shell?j.some(Ie):qc(Ie,i,"groups")},se=i.shell?{behaviours:[ys.config({})],components:[]}:{behaviours:[],components:c};return{uid:i.uid,dom:i.dom,components:se.components,behaviours:Od(i.toolbarBehaviours,se.behaviours),apis:{setGroups:function(Ie,ze){$(Ie).fold(function(){throw console.error("Toolbar was defined to not be a shell, but no groups container was specified in components"),new Error("Toolbar was defined to not be a shell, but no groups container was specified in components")},function(it){ys.set(it,ze)})}},domModification:{attributes:{role:"group"}}}},apis:{setGroups:function(i,c,f){i.setGroups(c,f)}}}),$4=V,j4=Pe,OR=X([]),K4=Object.freeze({__proto__:null,setup:$4,isDocked:j4,getBehaviours:OR}),LR=function(i){return(Yt($o(i,"position"),"fixed")?j.none():is(i)).orThunk(function(){var x=Xn.fromTag("span");return La(i).bind(function(F){oo(F,x);var $=is(x);return Rs(x),$})})},mI=function(i){return LR(i).map(ss).getOrThunk(function(){return Da(0,0)})},_D=fc_generate([{static:[]},{absolute:["positionCss"]},{fixed:["positionCss"]}]),fI=function(i,c){var f=i.element;Qc(f,c.transitionClass),wc(f,c.fadeOutClass),Qc(f,c.fadeInClass),c.onShow(i)},hI=function(i,c){var f=i.element;Qc(f,c.transitionClass),wc(f,c.fadeInClass),Qc(f,c.fadeOutClass),c.onHide(i)},vO=function(i,c,f){return Bn(i,function(x){switch(x){case"bottom":return function(i,c){return i.bottom<=c.bottom}(c,f);case"top":return function(i,c){return i.y>=c.y}(c,f)}})},yO=function(i,c){return c.getInitialPos().map(function(f){return sr(f.bounds.x,f.bounds.y,ks(i),hl(i))})},RR=function(i,c,f){return f.getInitialPos().bind(function(x){switch(f.clearInitialPos(),x.position){case"static":return j.some(_D.static());case"absolute":var F=LR(i).map(lo).getOrThunk(function(){return lo(Ra())});return j.some(_D.absolute(fm("absolute",mr(x.style,"left").map(function($){return c.x-F.x}),mr(x.style,"top").map(function($){return c.y-F.y}),mr(x.style,"right").map(function($){return F.right-c.right}),mr(x.style,"bottom").map(function($){return F.bottom-c.bottom}))));default:return j.none()}})},Q4=function(i,c,f){var x=lo(i);if(vO(f.getModes(),x,c))return j.none();!function(i,c,f){f.setInitialPos({style:su(i),position:qi(i,"position")||"static",bounds:c})}(i,x,f);var F=Zs(),$=x.x-F.x,se=c.y-F.y,Ie=F.bottom-c.bottom,ze=x.y<=c.y;return j.some(_D.fixed(fm("fixed",j.some($),ze?j.some(se):j.none(),j.none(),ze?j.none():j.some(Ie))))},q4=function(i,c,f){var x=i.element;return Yt($o(x,"position"),"fixed")?function(i,c,f){return yO(i,f).filter(function(x){return vO(f.getModes(),x,c)}).bind(function(x){return RR(i,x,f)})}(x,c,f):Q4(x,c,f)},_I=function(i,c,f){f.setDocked(!1),Ct(["left","right","top","bottom","position"],function(x){return Ka(i.element,x)}),c.onUndocked(i)},kA=function(i,c,f,x){var F="fixed"===x.position;f.setDocked(F),cv(i.element,x),(F?c.onDocked:c.onUndocked)(i)},NR=function(i,c,f,x,F){void 0===F&&(F=!1),c.contextual.each(function($){$.lazyContext(i).each(function(se){var Ie=function(i,c){return i.y<c.bottom&&i.bottom>c.y}(se,x);if(Ie!==f.isVisible())if(f.setVisible(Ie),F&&!Ie)Gh(i.element,[$.fadeOutClass]),$.onHide(i);else{(Ie?fI:hI)(i,$)}})})},eU=function(i,c,f){var x=i.element;f.setDocked(!1),function(i,c){var f=i.element;return yO(f,c).bind(function(x){return RR(f,x,c)})}(i,f).each(function(F){F.fold(function(){return _I(i,c,f)},function($){return kA(i,c,f,$)},V)}),f.setVisible(!0),c.contextual.each(function(F){qp(x,[F.fadeInClass,F.fadeOutClass,F.transitionClass]),F.onShow(i)}),vI(i,c,f)},vI=function(i,c,f){i.getSystem().isConnected()&&function(i,c,f){var x=c.lazyViewport(i);f.isDocked()&&NR(i,c,f,x),q4(i,x,f).each(function($){$.fold(function(){return _I(i,c,f)},function(se){return kA(i,c,f,se)},function(se){NR(i,c,f,x,!0),kA(i,c,f,se)})})}(i,c,f)},UR=function(i,c,f){f.isDocked()&&eU(i,c,f)},nU=Object.freeze({__proto__:null,refresh:vI,reset:UR,isDocked:function(i,c,f){return f.isDocked()},getModes:function(i,c,f){return f.getModes()},setModes:function(i,c,f,x){return f.setModes(x)}}),iU=Object.freeze({__proto__:null,events:function(i,c){return uc([nu(ud(),function(f,x){i.contextual.each(function(F){Ep(f.element,F.transitionClass)&&(qp(f.element,[F.transitionClass,F.fadeInClass]),(c.isVisible()?F.onShown:F.onHidden)(f));x.stop()})}),yr(Gp(),function(f,x){vI(f,i,c)}),yr(td(),function(f,x){UR(f,i,c)})])}}),yI=[yl("contextual",[qo("fadeInClass"),qo("fadeOutClass"),qo("transitionClass"),Hl("lazyContext"),kl("onShow"),kl("onShown"),kl("onHide"),kl("onHidden")]),Sl("lazyViewport",Zs),Hp("modes",["top","bottom"],ws),kl("onDocked"),kl("onUndocked")],rU=Object.freeze({__proto__:null,init:function(i){var c=ta(!1),f=ta(!0),x=ku(),F=ta(i.modes);return zu({isDocked:c.get,setDocked:c.set,getInitialPos:x.get,setInitialPos:x.set,clearInitialPos:x.clear,isVisible:f.get,setVisible:f.set,getModes:F.get,setModes:F.set,readState:function(){return"docked:  "+c.get()+", visible: "+f.get()+", modes: "+F.get().join(",")}})}}),Em=Wc({fields:yI,name:"docking",active:iU,apis:nU,state:rU}),bO=X(jo("toolbar-height-change")),fE={fadeInClass:"tox-editor-dock-fadein",fadeOutClass:"tox-editor-dock-fadeout",transitionClass:"tox-editor-dock-transition"},CO="tox-tinymce--toolbar-sticky-on",RA="tox-tinymce--toolbar-sticky-off",m_=function(i,c){return Ve(Em.getModes(i),c)},EO=function(i){var f=i.element;La(f).each(function(x){var F="padding-"+Em.getModes(i)[0];if(Em.isDocked(i)){var $=ks(x);Ki(f,"width",$+"px"),Ki(x,F,function(x){return Wl(x)+(parseInt(qi(x,"margin-top"),10)||0)+(parseInt(qi(x,"margin-bottom"),10)||0)}(f)+"px")}else Ka(f,"width"),Ka(x,F)})},MO=function(i,c){c?(wc(i,fE.fadeOutClass),Gh(i,[fE.transitionClass,fE.fadeInClass])):(wc(i,fE.fadeInClass),Gh(i,[fE.fadeOutClass,fE.transitionClass]))},TO=function(i,c){var f=Xn.fromDom(i.getContainer());c?(Qc(f,CO),wc(f,RA)):(Qc(f,RA),wc(f,CO))},bD=function(i,c){var f=ku(),x=c.getSink,F=function(Ie){x().each(function(ze){return Ie(ze.element)})},$=function(Ie){i.inline||EO(Ie),TO(i,Em.isDocked(Ie)),Ie.getSystem().broadcastOn([Og()],{}),x().each(function(ze){return ze.getSystem().broadcastOn([Og()],{})})},se=i.inline?[]:function(){var i;return[Id.config({channels:(i={},i[bO()]={onReceive:EO},i)})]}();return me([ka.config({}),Em.config({contextual:re({lazyContext:function(Ie){var ze=Wl(Ie.element),it=i.inline?i.getContentAreaContainer():i.getContainer(),Mt=lo(Xn.fromDom(it)),kt=Mt.height-ze,pn=Mt.y+(m_(Ie,"top")?0:ze);return j.some(sr(Mt.x,pn,Mt.width,kt))},onShow:function(){F(function(Ie){return MO(Ie,!0)})},onShown:function(Ie){F(function(ze){return qp(ze,[fE.transitionClass,fE.fadeInClass])}),f.get().each(function(ze){(function(i,c){var f=vr(c);Vu(f).filter(function(x){return!tn(c,x)}).filter(function(x){return tn(x,Xn.fromDom(f.dom.body))||ar(i,x)}).each(function(){return Xd(c)})})(Ie.element,ze),f.clear()})},onHide:function(Ie){(function(i,c){return dc(i).orThunk(function(){return c().toOptional().bind(function(f){return dc(f.element)})})})(Ie.element,x).fold(f.clear,f.set),F(function(ze){return MO(ze,!1)})},onHidden:function(){F(function(Ie){return qp(Ie,[fE.transitionClass])})}},fE),lazyViewport:function(Ie){var ze=Zs(),it=function(i){return i.getParam("toolbar_sticky_offset",0,"number")}(i),Mt=ze.y+(m_(Ie,"top")?it:0),kt=ze.height-(m_(Ie,"bottom")?it:0);return sr(ze.x,Mt,ze.width,kt)},modes:[c.header.getDockingMode()],onDocked:$,onUndocked:$})],se,!0)},bI=Object.freeze({__proto__:null,setup:function(i,c,f){i.inline||(c.header.isPositionedAtTop()||i.on("ResizeEditor",function(){f().each(Em.reset)}),i.on("ResizeWindow ResizeEditor",function(){f().each(EO)}),i.on("SkinLoaded",function(){f().each(function(x){Em.isDocked(x)?Em.reset(x):Em.refresh(x)})}),i.on("FullscreenStateChanged",function(){f().each(Em.reset)})),i.on("AfterScrollIntoView",function(x){f().each(function(F){Em.refresh(F);var $=F.element;WE($)&&function(i,c){var f=vr(c),x=f.dom.defaultView.innerHeight,F=Hc(f),$=Xn.fromDom(i.elm),se=ga($),Ie=hl($),ze=se.y,it=ze+Ie,Mt=ss(c),kt=hl(c),pn=Mt.top,bn=pn+kt,Un=Math.abs(pn-F.top)<2,di=Math.abs(bn-(F.top+x))<2;if(Un&&ze<bn)lp(F.left,ze-kt,f);else if(di&&it>pn){var Ui=ze-x+Ie+kt;lp(F.left,Ui,f)}}(x,$)})}),i.on("PostRender",function(){TO(i,!1)})},isDocked:function(i){return i().map(Em.isDocked).getOr(!1)},getBehaviours:bD}),sU=Go([qo("type"),sl("items",Mm([Xc([qo("name"),uu("items",ws)]),ws]))].concat(yM)),cU=[Fs("text"),Fs("tooltip"),Fs("icon"),Hl("fetch"),Sl("onSetup",function(){return V})],uU=Go(me([qo("type")],cU,!0)),CD=function(i){return li("menubutton",uU,i)},dU=Go([qo("type"),Fs("tooltip"),Fs("icon"),Fs("text"),nc("select"),Hl("fetch"),Sl("onSetup",function(){return V}),Vl("presets","normal",["normal","color","listpreview"]),Ti("columns",1),Hl("onAction"),Hl("onItemAction")]),xO=ch({factory:function(i,c){var x={focus:Za.focusIn,setMenus:function(F,$){var se=ft($,function(Ie){var ze={type:"menubutton",text:Ie.text,fetch:function(Mt){Mt(Ie.getItems())}},it=CD(ze).mapError(function(Mt){return fo(Mt)}).getOrDie();return JP(it,"tox-mbtn",c.backstage,j.some("menuitem"))});ys.set(F,se)}};return{uid:i.uid,dom:i.dom,components:[],behaviours:ao([ys.config({}),bs("menubar-events",[Va(function(F){i.onSetup(F)}),yr(ds(),function(F,$){Fc(F.element,".tox-mbtn--active").each(function(se){gd($.event.target,".tox-mbtn").each(function(Ie){tn(se,Ie)||F.getSystem().getByDom(se).each(function(ze){F.getSystem().getByDom(Ie).each(function(it){uC.expand(it),uC.close(ze),ka.focus(it)})})})})}),yr(b_(),function(F,$){$.event.prevFocus.bind(function(se){return F.getSystem().getByDom(se).toOptional()}).each(function(se){$.event.newFocus.bind(function(Ie){return F.getSystem().getByDom(Ie).toOptional()}).each(function(Ie){uC.isOpen(se)&&(uC.expand(Ie),uC.close(se))})})})]),Za.config({mode:"flow",selector:".tox-mbtn",onEscape:function(F){return i.onEscape(F),j.some(!0)}}),bm.config({})]),apis:x,domModification:{attributes:{role:"menubar"}}}},name:"silver.Menubar",configFields:[Mr("dom"),Mr("uid"),Mr("onEscape"),Mr("backstage"),Ti("onSetup",V)],apis:{focus:function(i,c){i.focus(c)},setMenus:function(i,c,f){i.setMenus(c,f)}}}),FA=function(i,c){return c.getAnimationRoot.fold(function(){return i.element},function(f){return f(i)})},r1=function(i){return i.dimension.property},yS=function(i,c){return i.dimension.getDimension(c)},CI=function(i,c){var f=FA(i,c);qp(f,[c.shrinkingClass,c.growingClass])},NA=function(i,c){wc(i.element,c.openClass),Qc(i.element,c.closedClass),Ki(i.element,r1(c),"0px"),Tc(i.element)},DO=function(i,c){wc(i.element,c.closedClass),Qc(i.element,c.openClass),Ka(i.element,r1(c))},BA=function(i,c,f,x){f.setCollapsed(),Ki(i.element,r1(c),yS(c,i.element)),Tc(i.element),CI(i,c),NA(i,c),c.onStartShrink(i),c.onShrunk(i)},EI=function(i,c,f,x){var F=x.getOrThunk(function(){return yS(c,i.element)});f.setCollapsed(),Ki(i.element,r1(c),F),Tc(i.element);var $=FA(i,c);wc($,c.growingClass),Qc($,c.shrinkingClass),NA(i,c),c.onStartShrink(i)},KT=function(i,c,f){var x=yS(c,i.element);("0px"===x?BA:EI)(i,c,f,j.some(x))},GR=function(i,c,f){var x=FA(i,c),F=Ep(x,c.shrinkingClass),$=yS(c,i.element);DO(i,c);var se=yS(c,i.element);(F?function(){Ki(i.element,r1(c),$),Tc(i.element)}:function(){NA(i,c)})(),wc(x,c.shrinkingClass),Qc(x,c.growingClass),DO(i,c),Ki(i.element,r1(c),se),f.setExpanded(),c.onStartGrow(i)},$R=function(i,c,f){var x=FA(i,c);return!0===Ep(x,c.growingClass)},bS=function(i,c,f){var x=FA(i,c);return!0===Ep(x,c.shrinkingClass)},vU=Object.freeze({__proto__:null,refresh:function(i,c,f){if(f.isExpanded()){Ka(i.element,r1(c));var x=yS(c,i.element);Ki(i.element,r1(c),x)}},grow:function(i,c,f){f.isExpanded()||GR(i,c,f)},shrink:function(i,c,f){f.isExpanded()&&KT(i,c,f)},immediateShrink:function(i,c,f){f.isExpanded()&&BA(i,c,f)},hasGrown:function(i,c,f){return f.isExpanded()},hasShrunk:function(i,c,f){return f.isCollapsed()},isGrowing:$R,isShrinking:bS,isTransitioning:function(i,c,f){return $R(i,c)||bS(i,c)},toggleGrow:function(i,c,f){(f.isExpanded()?KT:GR)(i,c,f)},disableTransitions:CI}),bU=Object.freeze({__proto__:null,exhibit:function(i,c,f){var x=c.expanded;return Dd(x?{classes:[c.openClass],styles:{}}:{classes:[c.closedClass],styles:Fo(c.dimension.property,"0px")})},events:function(i,c){return uc([nu(ud(),function(f,x){x.event.raw.propertyName===i.dimension.property&&(CI(f,i),c.isExpanded()&&Ka(f.element,i.dimension.property),(c.isExpanded()?i.onGrown:i.onShrunk)(f))})])}}),t=[Mr("closedClass"),Mr("openClass"),Mr("shrinkingClass"),Mr("growingClass"),Es("getAnimationRoot"),kl("onShrunk"),kl("onStartShrink"),kl("onGrown"),kl("onStartGrow"),Ti("expanded",!1),sl("dimension",ms("property",{width:[$s("property","width"),$s("getDimension",function(i){return ks(i)+"px"})],height:[$s("property","height"),$s("getDimension",function(i){return hl(i)+"px"})]}))],m=Object.freeze({__proto__:null,init:function(i){var c=ta(i.expanded);return zu({isExpanded:function(){return!0===c.get()},isCollapsed:function(){return!1===c.get()},setCollapsed:ge(c.set,!1),setExpanded:ge(c.set,!0),readState:function(){return"expanded: "+c.get()}})}}),v=Wc({fields:t,name:"sliding",active:bU,apis:vU,state:m}),S="container",R=[Zu("slotBehaviours",[])],ee=function(i){return"<alloy.field."+i+">"},Se=function(i,c){var di,f=function(di){return YM(i)},F=function(di,Ui){return function(ri,Yi){return qc(ri,i,Yi).map(function(Or){return di(Or,Yi)}).getOr(Ui)}},se=function(di,Ui){return"true"!==Xt(di.element,"aria-hidden")},it=F(se,!1),Mt=F(function(di,Ui){if(se(di)){var ri=di.element;Ki(ri,"display","none"),De(ri,"aria-hidden","true"),Sa(di,Nh(),{name:Ui,visible:!1})}}),kt=(di=Mt,function(Ui,ri){Ct(ri,function(Yi){return di(Ui,Yi)})}),bn=F(function(di,Ui){if(!se(di)){var ri=di.element;Ka(ri,"display"),Fe(ri,"aria-hidden"),Sa(di,Nh(),{name:Ui,visible:!0})}}),Un={getSlotNames:f,getSlot:function(di,Ui){return qc(di,i,Ui)},isShowing:it,hideSlot:Mt,hideAllSlots:function(di){return kt(di,f())},showSlot:bn};return{uid:i.uid,dom:i.dom,components:c,behaviours:lg(i.slotBehaviours),apis:Un}},pt=vn({getSlotNames:function(i,c){return i.getSlotNames(c)},getSlot:function(i,c,f){return i.getSlot(c,f)},isShowing:function(i,c,f){return i.isShowing(c,f)},hideSlot:function(i,c,f){return i.hideSlot(c,f)},hideAllSlots:function(i,c){return i.hideAllSlots(c)},showSlot:function(i,c,f){return i.showSlot(c,f)}},function(i){return zs(i)}),Gt=re(re({},pt),{sketch:function(i){var $,c={slot:function(Ie,ze){return $.push(Ie),FE(S,ee(Ie),ze)},record:X($=[])},f=i(c),x=c.record(),F=ft(x,function($){return tp({name:$,pname:ee($)})});return R1(S,R,F,Se,f)}}),jt=Go([Fs("icon"),Fs("tooltip"),Sl("onShow",V),Sl("onHide",V),Sl("onSetup",function(){return V})]),Yn=function(i){return{element:function(){return i.element.dom}}},$n=function(i,c){var f=ft(Vn(c),function(x){var F=c[x],$=dr(function(i){return li("sidebar",jt,i)}(F));return{name:x,getApi:Yn,onSetup:$.onSetup,onShow:$.onShow,onHide:$.onHide}});return ft(f,function(x){var F=ta(V);return i.slot(x.name,{dom:{tag:"div",classes:["tox-sidebar__pane"]},behaviours:zf_unnamedEvents([Xx(x,F),eD(x,F),yr(Nh(),function($,se){var Ie=se.event;vi(f,function(it){return it.name===Ie.name}).each(function(it){(Ie.visible?it.onShow:it.onHide)(it.getApi($))})})])})})},qn=function(i){return Gt.sketch(function(c){return{dom:{tag:"div",classes:["tox-sidebar__pane-container"]},components:$n(c,i),slotBehaviours:zf_unnamedEvents([Va(function(f){return Gt.hideAllSlots(f)})])}})},tr=function(i){return Ml.getCurrent(i).bind(function(f){return v.isGrowing(f)||v.hasGrown(f)?Ml.getCurrent(f).bind(function($){return vi(Gt.getSlotNames($),function(se){return Gt.isShowing($,se)})}):j.none()})},Wi=jo("FixSizeEvent"),Oi=jo("AutoSizeEvent"),es=Object.freeze({__proto__:null,block:function(i,c,f,x){De(i.element,"aria-busy",!0);var F=c.getRoot(i).getOr(i),$=ao([Za.config({mode:"special",onTab:function(){return j.some(!0)},onShiftTab:function(){return j.some(!0)}}),ka.config({})]),se=x(F,$),Ie=F.getSystem().build(se);ys.append(F,hd(Ie)),Ie.hasConfigured(Za)&&c.focus&&Za.focusIn(Ie),f.isBlocked()||c.onBlock(i),f.blockWith(function(){return ys.remove(F,Ie)})},unblock:function(i,c,f){Fe(i.element,"aria-busy"),f.isBlocked()&&c.onUnblock(i),f.clear()}}),Xo=[Sl("getRoot",j.none),bl("focus",!0),kl("onBlock"),kl("onUnblock")],qa=Object.freeze({__proto__:null,init:function(){var i=Uv();return zu({readState:i.isSet,blockWith:function(f){i.set({destroy:f})},clear:i.clear,isBlocked:i.isSet})}}),po=Wc({fields:Xo,name:"blocking",apis:es,state:qa}),So=function(i){var c=Xn.fromHtml(i),f=Dt(c),x=function(i){var c=void 0!==i.dom.attributes?i.dom.attributes:[];return Dn(c,function(f,x){var F;return"class"===x.name?f:re(re({},f),((F={})[x.name]=x.value,F))},{})}(c),F=function(i){return Array.prototype.slice.call(i.dom.classList,0)}(c),$=0===f.length?{}:{innerHtml:fp(c)};return re({tag:Ft(c),classes:F,attributes:x},$)},Jr=function(i){return Ml.getCurrent(i).each(function(c){return Xd(c.element)})},Ul=function(i,c,f,x){var F=c.element;if(function(i,c){var f="tabindex",x="data-mce-"+f;j.from(i.iframeElement).map(Xn.fromDom).each(function(F){c?(Qi(F,f).each(function($){return De(F,x,$)}),De(F,f,-1)):(Fe(F,f),Qi(F,x).each(function($){De(F,f,$),Fe(F,x)}))})}(i,f),f)po.block(c,function(i){return function(c,f){return{dom:{tag:"div",attributes:{"aria-label":i.translate("Loading..."),tabindex:"0"},classes:["tox-throbber__busy-spinner"]},components:[{dom:So('<div class="tox-spinner"><div></div><div></div><div></div></div>')}]}}}(x)),Ka(F,"display"),Fe(F,"aria-hidden"),i.hasFocus()&&Jr(c);else{var $=Ml.getCurrent(c).exists(function(se){return wy(se.element)});po.unblock(c),Ki(F,"display","none"),De(F,"aria-hidden","true"),$&&i.focus()}},Op=function(i,c,f){var x=ta(!1),F=ku(),$=function(Ie){x.get()&&!function(i){return!!function(i){return"focusin"===i.type}(i)&&(i.composed?ui(i.composedPath()):j.from(i.target)).map(Xn.fromDom).filter(Gn).exists(function(f){return Ep(f,"mce-pastebin")})}(Ie)&&(Ie.preventDefault(),Jr(c()),i.editorManager.setActive(i))};i.inline||i.on("PreInit",function(){i.dom.bind(i.getWin(),"focusin",$),i.on("BeforeExecCommand",function(Ie){"mcefocus"===Ie.command.toLowerCase()&&!0!==Ie.value&&$(Ie)})});var se=function(Ie){Ie!==x.get()&&(x.set(Ie),Ul(i,c(),Ie,f.providers),i.fire("AfterProgressState",{state:Ie}))};i.on("ProgressState",function(Ie){if(F.on(c_.clearTimeout),B(Ie.time)){var ze=c_.setEditorTimeout(i,function(){return se(Ie.state)},Ie.time);F.set(ze)}else se(Ie.state),F.clear()})},W_=function(i,c,f){return{within:i,extra:c,withinWidth:f}},Xr=function(i,c,f){var x=function(i,c){return Dn(i,function(F,$){return c($,F.len).fold(X(F),function(Ie){return{len:Ie.finish,list:F.list.concat([Ie])}})},{len:0,list:[]}).list}(i,function(Ie,ze){var it=f(Ie);return j.some({element:Ie,start:ze,finish:ze+it,width:it})}),F=st(x,function(Ie){return Ie.finish<=c}),$=nn(F,function(Ie,ze){return Ie+ze.width},0);return{within:F,extra:x.slice(F.length),withinWidth:$}},yo=function(i){return ft(i,function(c){return c.element})},za=function(i,c,f,x){var F=function(i,c,f){var x=Xr(c,i,f);return 0===x.extra.length?j.some(x):j.none()}(i,c,f).getOrThunk(function(){return Xr(c,i-f(x),f)}),$=F.within,se=F.extra,Ie=F.withinWidth;return 1===se.length&&se[0].width<=f(x)?function(i,c,f){var x=yo(i.concat(c));return W_(x,[],f)}($,se,Ie):se.length>=1?function(i,c,f,x){var F=yo(i).concat([f]);return W_(F,yo(c),x)}($,se,x,Ie):function(i,c,f){return W_(yo(i),[],f)}($,0,Ie)},Wa=function(i,c){var f=ft(c,function(x){return hd(x)});i1.setGroups(i,f)},Cf=function(i,c,f){var x=c.builtGroups.get();if(0!==x.length){var F=sh(i,c,"primary"),$=Cm.getCoupled(i,"overflowGroup");Ki(F.element,"visibility","hidden");var se=x.concat([$]),Ie=function(i){return Vi(i,function(c){return dc(c.element).bind(function(f){return c.getSystem().getByDom(f).toOptional()})})}(se);f([]),Wa(F,se);var ze=ks(F.element),it=za(ze,c.builtGroups.get(),function(Mt){return ks(Mt.element)},$);0===it.extra.length?(ys.remove(F,$),f([])):(Wa(F,it.within),f(it.extra)),Ka(F.element,"visibility"),Tc(F.element),Ie.each(ka.focus)}},nf=X([Zu("splitToolbarBehaviours",[Cm]),Yl("builtGroups",function(){return ta([])})]),wM=X([Pm(["overflowToggledClass"]),nc("getOverflowBounds"),Mr("lazySink"),Yl("overflowGroups",function(){return ta([])})].concat(nf())),h_=X([tp({factory:i1,schema:vS(),name:"primary"}),kg({schema:vS(),name:"overflow"}),kg({name:"overflow-button"}),kg({name:"overflow-group"})]),Vg=X(function(i,c){!function(i,c){var x=rs.max(i,c,["margin-left","border-left-width","padding-left","padding-right","border-right-width","margin-right"]);Ki(i,"max-width",x+"px")}(i,Math.floor(c))}),Hf=X([Pm(["toggledClass"]),Mr("lazySink"),Hl("fetch"),nc("getBounds"),yl("fireDismissalEventInstead",[Ti("event",Mf())]),rd()]),bb=X([kg({name:"button",overrides:function(i){return{dom:{attributes:{"aria-haspopup":"true"}},buttonBehaviours:ao([fl.config({toggleClass:i.markers.toggledClass,aria:{mode:"expanded"},toggleOnExecute:!1})])}}}),kg({factory:i1,schema:vS(),name:"toolbar",overrides:function(i){return{toolbarBehaviours:ao([Za.config({mode:"cyclic",onEscape:function(c){return qc(c,i,"button").each(ka.focus),j.none()}})])}}})]),g_=function(i,c){var f=Cm.getCoupled(i,"toolbarSandbox");el.isOpen(f)?el.close(f):el.open(f,c.toolbar())},gC=function(i,c,f,x){var F=f.getBounds.map(function(se){return se()}),$=f.lazySink(i).getOrDie();zn.positionWithinBounds($,c,{anchor:{type:"hotspot",hotspot:i,layouts:x,overrides:{maxWidthFunction:Vg()}}},F)},$u=function(i,c,f,x,F){i1.setGroups(c,F),gC(i,c,f,x),fl.on(i)},$_=qm({name:"FloatingToolbarButton",factory:function(i,c,f,x){return re(re({},Nf.sketch(re(re({},x.button()),{action:function(F){g_(F,x)},buttonBehaviours:Lh_augment({dump:x.button().buttonBehaviours},[Cm.config({others:{toolbarSandbox:function(F){return function(i,c,f){var x=uf();return{dom:{tag:"div",attributes:{id:x.id}},behaviours:ao([Za.config({mode:"special",onEscape:function(se){return el.close(se),j.some(!0)}}),el.config({onOpen:function(se,Ie){f.fetch().get(function(ze){$u(i,Ie,f,c.layouts,ze),x.link(i.element),Za.focusIn(Ie)})},onClose:function(){fl.off(i),ka.focus(i),x.unlink(i.element)},isPartOf:function(se,Ie,ze){return Eg(Ie,ze)||Eg(i,ze)},getAttachPoint:function(){return f.lazySink(i).getOrDie()}}),Id.config({channels:re(re({},Km(re({isExtraPart:Pe},f.fireDismissalEventInstead.map(function(se){return{fireEventInstead:{event:se.event}}}).getOr({})))),sg({doReposition:function(){el.getState(Cm.getCoupled(i,"toolbarSandbox")).each(function(se){gC(i,se,f,c.layouts)})}}))})])}}(F,f,i)}}})])}))),{apis:{setGroups:function(F,$){el.getState(Cm.getCoupled(F,"toolbarSandbox")).each(function(se){$u(F,se,i,f.layouts,$)})},reposition:function(F){el.getState(Cm.getCoupled(F,"toolbarSandbox")).each(function($){gC(F,$,i,f.layouts)})},toggle:function(F){g_(F,x)},getToolbar:function(F){return el.getState(Cm.getCoupled(F,"toolbarSandbox"))},isOpen:function(F){return el.isOpen(Cm.getCoupled(F,"toolbarSandbox"))}}})},configFields:Hf(),partFields:bb(),apis:{setGroups:function(i,c,f){i.setGroups(c,f)},reposition:function(i,c){i.reposition(c)},toggle:function(i,c){i.toggle(c)},getToolbar:function(i,c){return i.getToolbar(c)},isOpen:function(i,c){return i.isOpen(c)}}}),o1=X([Mr("items"),Pm(["itemSelector"]),Zu("tgroupBehaviours",[Za])]),a1=X([w1({name:"items",unit:"item"})]),CS=qm({name:"ToolbarGroup",configFields:o1(),partFields:a1(),factory:function(i,c,f,x){return{uid:i.uid,dom:i.dom,components:c,behaviours:Od(i.tgroupBehaviours,[Za.config({mode:"flow",selector:i.markers.itemSelector})]),domModification:{attributes:{role:"toolbar"}}}}}),TI=function(i){return ft(i,function(c){return hd(c)})},KR=function(i,c,f){Cf(i,f,function(x){f.overflowGroups.set(x),c.getOpt(i).each(function(F){$_.setGroups(F,TI(x))})})},wO=qm({name:"SplitFloatingToolbar",configFields:wM(),partFields:h_(),factory:function(i,c,f,x){var F=wl($_.sketch({fetch:function(){return Fh_nu(function($){$(TI(i.overflowGroups.get()))})},layouts:{onLtr:function(){return[tm,Bp]},onRtl:function(){return[Bp,tm]},onBottomLtr:function(){return[nm,Hd]},onBottomRtl:function(){return[Hd,nm]}},getBounds:f.getOverflowBounds,lazySink:i.lazySink,fireDismissalEventInstead:{},markers:{toggledClass:i.markers.overflowToggledClass},parts:{button:x["overflow-button"](),toolbar:x.overflow()}}));return{uid:i.uid,dom:i.dom,components:c,behaviours:Od(i.splitToolbarBehaviours,[Cm.config({others:{overflowGroup:function(){return CS.sketch(re(re({},x["overflow-group"]()),{items:[F.asSpec()]}))}}})]),apis:{setGroups:function($,se){i.builtGroups.set(ft(se,$.getSystem().build)),KR($,F,i)},refresh:function($){return KR($,F,i)},toggle:function($){F.getOpt($).each(function(se){$_.toggle(se)})},isOpen:function($){return F.getOpt($).map($_.isOpen).getOr(!1)},reposition:function($){F.getOpt($).each(function(se){$_.reposition(se)})},getOverflow:function($){return F.getOpt($).bind($_.getToolbar)}},domModification:{attributes:{role:"group"}}}},apis:{setGroups:function(i,c,f){i.setGroups(c,f)},refresh:function(i,c){i.refresh(c)},reposition:function(i,c){i.reposition(c)},toggle:function(i,c){i.toggle(c)},isOpen:function(i,c){return i.isOpen(c)},getOverflow:function(i,c){return i.getOverflow(c)}}}),CU=X([Pm(["closedClass","openClass","shrinkingClass","growingClass","overflowToggledClass"]),kl("onOpened"),kl("onClosed")].concat(nf())),QR=X([tp({factory:i1,schema:vS(),name:"primary"}),tp({factory:i1,schema:vS(),name:"overflow",overrides:function(i){return{toolbarBehaviours:ao([v.config({dimension:{property:"height"},closedClass:i.markers.closedClass,openClass:i.markers.openClass,shrinkingClass:i.markers.shrinkingClass,growingClass:i.markers.growingClass,onShrunk:function(c){qc(c,i,"overflow-button").each(function(f){fl.off(f),ka.focus(f)}),i.onClosed(c)},onGrown:function(c){Za.focusIn(c),i.onOpened(c)},onStartGrow:function(c){qc(c,i,"overflow-button").each(fl.on)}}),Za.config({mode:"acyclic",onEscape:function(c){return qc(c,i,"overflow-button").each(ka.focus),j.some(!0)}})])}}}),kg({name:"overflow-button",overrides:function(i){return{buttonBehaviours:ao([fl.config({toggleClass:i.markers.overflowToggledClass,aria:{mode:"pressed"},toggleOnExecute:!1})])}}}),kg({name:"overflow-group"})]),qR=function(i,c){qc(i,c,"overflow-button").bind(function(){return qc(i,c,"overflow")}).each(function(f){IO(i,c),v.toggleGrow(f)})},IO=function(i,c){qc(i,c,"overflow").each(function(f){Cf(i,c,function(x){var F=ft(x,function($){return hd($)});i1.setGroups(f,F)}),qc(i,c,"overflow-button").each(function(x){v.hasGrown(f)&&fl.on(x)}),v.refresh(f)})},IM=qm({name:"SplitSlidingToolbar",configFields:CU(),partFields:QR(),factory:function(i,c,f,x){var F="alloy.toolbar.toggle";return{uid:i.uid,dom:i.dom,components:c,behaviours:Od(i.splitToolbarBehaviours,[Cm.config({others:{overflowGroup:function(se){return CS.sketch(re(re({},x["overflow-group"]()),{items:[Nf.sketch(re(re({},x["overflow-button"]()),{action:function(Ie){Cl(se,F)}}))]}))}}}),bs("toolbar-toggle-events",[yr(F,function(se){qR(se,i)})])]),apis:{setGroups:function(se,Ie){(function(se,Ie){var ze=ft(Ie,se.getSystem().build);i.builtGroups.set(ze)})(se,Ie),IO(se,i)},refresh:function(se){return IO(se,i)},toggle:function(se){return qR(se,i)},isOpen:function(se){return function(i,c){return qc(i,c,"overflow").map(v.hasGrown).getOr(!1)}(se,i)}},domModification:{attributes:{role:"group"}}}},apis:{setGroups:function(i,c,f){i.setGroups(c,f)},refresh:function(i,c){i.refresh(c)},toggle:function(i,c){i.toggle(c)},isOpen:function(i,c){return i.isOpen(c)}}}),PO=function(i){var c=i.title.fold(function(){return{}},function(f){return{attributes:{title:f}}});return{dom:re({tag:"div",classes:["tox-toolbar__group"]},c),components:[CS.parts.items({})],items:i.items,markers:{itemSelector:"*:not(.tox-split-button) > .tox-tbtn:not([disabled]), .tox-split-button:not([disabled]), .tox-toolbar-nav-js:not([disabled])"},tgroupBehaviours:ao([bm.config({}),ka.config({})])}},Bi=function(i){return CS.sketch(PO(i))},Ar=function(i,c){var f=Va(function(x){var F=ft(i.initGroups,Bi);i1.setGroups(x,F)});return ao([lC_toolbarButton(i.providers.isDisabled),bf(),Za.config({mode:c,onEscape:i.onEscape,selector:".tox-toolbar__group"}),bs("toolbar-events",[f])])},go=function(i){var c=i.cyclicKeying?"cyclic":"acyclic";return{uid:i.uid,dom:{tag:"div",classes:["tox-toolbar-overlord"]},parts:{"overflow-group":PO({title:j.none(),items:[]}),"overflow-button":kk({name:"more",icon:j.some("more-drawer"),disabled:!1,tooltip:j.some("More..."),primary:!1,borderless:!1},j.none(),i.providers)},splitToolbarBehaviours:Ar(i,c)}},Oo=function(i){var c=go(i),x=wO.parts.primary({dom:{tag:"div",classes:["tox-toolbar__primary"]}});return wO.sketch(re(re({},c),{lazySink:i.getSink,getOverflowBounds:function(){var F=i.moreDrawerData.lazyHeader().element,$=ga(F),se=Li(F),Ie=ga(se),ze=Math.max(se.dom.scrollHeight,Ie.height);return sr($.x+4,Ie.y,$.width-8,ze)},parts:re(re({},c.parts),{overflow:{dom:{tag:"div",classes:["tox-toolbar__overflow"],attributes:i.attributes}}}),components:[x],markers:{overflowToggledClass:"tox-tbtn--enabled"}}))},cl=function(i){var c=IM.parts.primary({dom:{tag:"div",classes:["tox-toolbar__primary"]}}),f=IM.parts.overflow({dom:{tag:"div",classes:["tox-toolbar__overflow"]}}),x=go(i);return IM.sketch(re(re({},x),{components:[c,f],markers:{openClass:"tox-toolbar__overflow--open",closedClass:"tox-toolbar__overflow--closed",growingClass:"tox-toolbar__overflow--growing",shrinkingClass:"tox-toolbar__overflow--shrinking",overflowToggledClass:"tox-tbtn--enabled"},onOpened:function(F){F.getSystem().broadcastOn([bO()],{type:"opened"})},onClosed:function(F){F.getSystem().broadcastOn([bO()],{type:"closed"})}}))},hc=function(i){var c=i.cyclicKeying?"cyclic":"acyclic";return i1.sketch({uid:i.uid,dom:{tag:"div",classes:["tox-toolbar"].concat(i.type===_b.scrolling?["tox-toolbar--scrolling"]:[])},components:[i1.parts.groups({})],toolbarBehaviours:Ar(i,c)})},QT=WT.optional({factory:xO,name:"menubar",schema:[Mr("backstage")]}),C8=WT.optional({factory:{sketch:function(i){return IR.sketch({uid:i.uid,dom:i.dom,listBehaviours:ao([Za.config({mode:"acyclic",selector:".tox-toolbar"})]),makeItem:function(){return hc({type:i.type,uid:jo("multiple-toolbar-item"),cyclicKeying:!1,initGroups:[],providers:i.providers,onEscape:function(){return i.onEscape(),j.some(!0)}})},setupItem:function(c,f,x,F){i1.setGroups(f,x)},shell:!0})}},name:"multiple-toolbar",schema:[Mr("dom"),Mr("onEscape")]}),E8=WT.optional({factory:{sketch:function(i){var c=function(i){return i.type===_b.sliding?cl:i.type===_b.floating?Oo:hc}(i);return c({type:i.type,uid:i.uid,onEscape:function(){return i.onEscape(),j.some(!0)},cyclicKeying:!1,initGroups:[],getSink:i.getSink,providers:i.providers,moreDrawerData:{lazyToolbar:i.lazyToolbar,lazyMoreButton:i.lazyMoreButton,lazyHeader:i.lazyHeader},attributes:i.attributes})}},name:"toolbar",schema:[Mr("dom"),Mr("onEscape"),Mr("getSink")]}),M8=WT.optional({factory:{sketch:function(i){var c=i.editor,f=i.sticky?bD:OR;return{uid:i.uid,dom:i.dom,components:i.components,behaviours:ao(f(c,i.sharedBackstage))}}},name:"header",schema:[Mr("dom")]}),T8=WT.optional({name:"socket",schema:[Mr("dom")]}),x8=WT.optional({factory:{sketch:function(i){return{uid:i.uid,dom:{tag:"div",classes:["tox-sidebar"],attributes:{role:"complementary"}},components:[{dom:{tag:"div",classes:["tox-sidebar__slider"]},components:[],behaviours:ao([bm.config({}),ka.config({}),v.config({dimension:{property:"width"},closedClass:"tox-sidebar--sliding-closed",openClass:"tox-sidebar--sliding-open",shrinkingClass:"tox-sidebar--sliding-shrinking",growingClass:"tox-sidebar--sliding-growing",onShrunk:function(c){Ml.getCurrent(c).each(Gt.hideAllSlots),Cl(c,Oi)},onGrown:function(c){Cl(c,Oi)},onStartGrow:function(c){Sa(c,Wi,{width:$o(c.element,"width").getOr("")})},onStartShrink:function(c){Sa(c,Wi,{width:ks(c.element)+"px"})}}),ys.config({}),Ml.config({find:function(c){var f=ys.contents(c);return ui(f)}})])}],behaviours:ao([n1_childAt(0),bs("sidebar-sliding-events",[yr(Wi,function(c,f){Ki(c.element,"width",f.event.width)}),yr(Oi,function(c,f){Ka(c.element,"width")})])])}}},name:"sidebar",schema:[Mr("dom")]}),D8=WT.optional({factory:{sketch:function(i){return{uid:i.uid,dom:{tag:"div",attributes:{"aria-hidden":"true"},classes:["tox-throbber"],styles:{display:"none"}},behaviours:ao([ys.config({}),po.config({focus:!1}),Ml.config({find:function(c){return ui(c.components())}})]),components:[]}}},name:"throbber",schema:[Mr("dom")]}),Nm=qm({name:"OuterContainer",factory:function(i,c,f){var x={getSocket:function(F){return Pv.getPart(F,i,"socket")},setSidebar:function(F,$){Pv.getPart(F,i,"sidebar").each(function(se){return function(i,c){Ml.getCurrent(i).each(function(x){return ys.set(x,[qn(c)])})}(se,$)})},toggleSidebar:function(F,$){Pv.getPart(F,i,"sidebar").each(function(se){return function(i,c){Ml.getCurrent(i).each(function(x){Ml.getCurrent(x).each(function($){v.hasGrown(x)?Gt.isShowing($,c)?v.shrink(x):(Gt.hideAllSlots($),Gt.showSlot($,c)):(Gt.hideAllSlots($),Gt.showSlot($,c),v.grow(x))})})}(se,$)})},whichSidebar:function(F){return Pv.getPart(F,i,"sidebar").bind(tr).getOrNull()},getHeader:function(F){return Pv.getPart(F,i,"header")},getToolbar:function(F){return Pv.getPart(F,i,"toolbar")},setToolbar:function(F,$){Pv.getPart(F,i,"toolbar").each(function(se){se.getApis().setGroups(se,$)})},setToolbars:function(F,$){Pv.getPart(F,i,"multiple-toolbar").each(function(se){IR.setItems(se,$)})},refreshToolbar:function(F){Pv.getPart(F,i,"toolbar").each(function(se){return se.getApis().refresh(se)})},toggleToolbarDrawer:function(F){Pv.getPart(F,i,"toolbar").each(function($){!function(i,c){null!=i?j.some(c(i)):j.none()}($.getApis().toggle,function(se){return se($)})})},isToolbarDrawerToggled:function(F){return Pv.getPart(F,i,"toolbar").bind(function($){return j.from($.getApis().isOpen).map(function(se){return se($)})}).getOr(!1)},getThrobber:function(F){return Pv.getPart(F,i,"throbber")},focusToolbar:function(F){Pv.getPart(F,i,"toolbar").orThunk(function(){return Pv.getPart(F,i,"multiple-toolbar")}).each(function(se){Za.focusIn(se)})},setMenubar:function(F,$){Pv.getPart(F,i,"menubar").each(function(se){xO.setMenus(se,$)})},focusMenubar:function(F){Pv.getPart(F,i,"menubar").each(function($){xO.focus($)})}};return{uid:i.uid,dom:i.dom,components:c,apis:x,behaviours:i.behaviours}},configFields:[Mr("dom"),Mr("behaviours")],partFields:[M8,QT,E8,C8,T8,x8,D8],apis:{getSocket:function(i,c){return i.getSocket(c)},setSidebar:function(i,c,f){i.setSidebar(c,f)},toggleSidebar:function(i,c,f){i.toggleSidebar(c,f)},whichSidebar:function(i,c){return i.whichSidebar(c)},getHeader:function(i,c){return i.getHeader(c)},getToolbar:function(i,c){return i.getToolbar(c)},setToolbar:function(i,c,f){var x=ft(f,function(F){return Bi(F)});i.setToolbar(c,x)},setToolbars:function(i,c,f){var x=ft(f,function(F){return ft(F,Bi)});i.setToolbars(c,x)},refreshToolbar:function(i,c){return i.refreshToolbar(c)},toggleToolbarDrawer:function(i,c){i.toggleToolbarDrawer(c)},isToolbarDrawerToggled:function(i,c){return i.isToolbarDrawerToggled(c)},getThrobber:function(i,c){return i.getThrobber(c)},setMenubar:function(i,c,f){i.setMenubar(c,f)},focusMenubar:function(i,c){i.focusMenubar(c)},focusToolbar:function(i,c){i.focusToolbar(c)}}}),f5={file:{title:"File",items:"newdocument restoredraft | preview | export print | deleteallconversations"},edit:{title:"Edit",items:"undo redo | cut copy paste pastetext | selectall | searchreplace"},view:{title:"View",items:"code | visualaid visualchars visualblocks | spellchecker | preview fullscreen | showcomments"},insert:{title:"Insert",items:"image link media addcomment pageembed template codesample inserttable | charmap emoticons hr | pagebreak nonbreaking anchor toc | insertdatetime"},format:{title:"Format",items:"bold italic underline strikethrough superscript subscript codeformat | formats blockformats fontformats fontsizes align lineheight | forecolor backcolor | language | removeformat"},tools:{title:"Tools",items:"spellchecker spellcheckerlanguage | a11ycheck code wordcount"},table:{title:"Table",items:"inserttable | cell row column | advtablesort | tableprops deletetable"},help:{title:"Help",items:"help"}},TU=function(i){return"string"==typeof i?i.split(" "):i},h5=function(i,c){var f=re(re({},f5),c.menus),x=Vn(c.menus).length>0,F=void 0===c.menubar||!0===c.menubar?TU("file edit view insert format tools table help"):TU(!1===c.menubar?"":c.menubar),$=st(F,function(Ie){var ze=jn(f5,Ie);return x?ze||mr(c.menus,Ie).exists(function(it){return jn(it,"items")}):ze}),se=ft($,function(Ie){var ze=f[Ie];return function(i,c,f){var x=function(i){return i.getParam("removed_menuitems","")}(f).split(/[ ,]/);return{text:i.title,getItems:function(){return wi(i.items,function(F){var $=F.toLowerCase();return 0===$.trim().length||tt(x,function(se){return se===$})?[]:"separator"===$||"|"===$?[{type:"separator"}]:c.menuItems[$]?[c.menuItems[$]]:[]})}}}({title:ze.title,items:TU(ze.items)},c,i)});return st(se,function(Ie){return Ie.getItems().length>0&&tt(Ie.getItems(),function(it){return"separator"!==it.type})})},g5=function(i){var c=function(){i._skinLoaded=!0,function(i){i.fire("SkinLoaded")}(i)};return function(){i.initialized?c():i.on("init",c)}},_5=function(i,c,f){return new Yx(function(x,F){f.load(c,x,F),i.on("remove",function(){return f.unload(c)})})},I8=function(i,c){return _5(i,c+"/skin.min.css",i.ui.styleSheetLoader)},P8=function(i,c){return function(i){return xa(i).isSome()}(Xn.fromDom(i.getElement()))?_5(i,c+"/skin.shadowdom.min.css",oS.DOM.styleSheetLoader):Yx.resolve()},v5=function(i,c){var f=function(i){var c=i.getParam("skin"),f=i.getParam("skin_url");if(!1!==c){var x=c||"oxide";f=f?i.documentBaseURI.toAbsolute(f):b3.baseURL+"/skins/ui/"+x}return f}(c);f&&c.contentCSS.push(f+(i?"/content.inline":"/content")+".min.css"),!1===function(i){return!1===i.getParam("skin")}(c)&&e(f)?Yx.all([I8(c,f),P8(c,f)]).then(g5(c),function(i,c){return function(){return function(i,c){return i.fire("SkinLoadError",c)}(i,{message:c})}}(c,"Skin could not be loaded")):g5(c)()},O8=ge(v5,!1),L8=ge(v5,!0),XR=function(i,c){return function(f){var x=rm(),F=function(){f.setActive(i.formatter.match(c));var $=i.formatter.formatChanged(c,f.setActive);x.set($)};return i.initialized?F():i.once("init",F),function(){i.off("init",F),x.clear()}}},e3=function(i,c,f){return function(x){var F=function(){return f(x)},$=function(){f(x),i.on(c,F)};return i.initialized?$():i.once("init",$),function(){i.off("init",$),i.off(c,F)}}},y5=function(i){return function(c){return function(){i.undoManager.transact(function(){i.focus(),i.execCommand("mceToggleFormat",!1,c.format)})}}},s1=function(i,c){return function(){return i.execCommand(c)}},k8=function(i,c,f){var x=function(Ie,ze,it,Mt){var kt=c.shared.providers.translate(Ie.title);if("separator"===Ie.type)return j.some({type:"separator",text:kt});if("submenu"===Ie.type){var pn=wi(Ie.getStyleItems(),function(bn){return F(bn,ze,Mt)});return 0===ze&&pn.length<=0?j.none():j.some({type:"nestedmenuitem",text:kt,disabled:pn.length<=0,getSubmenuItems:function(){return wi(Ie.getStyleItems(),function(bn){return F(bn,ze,Mt)})}})}return j.some(re({type:"togglemenuitem",text:kt,icon:Ie.icon,active:Ie.isSelected(Mt),disabled:it,onAction:f.onAction(Ie)},Ie.getStylePreview().fold(function(){return{}},function(bn){return{meta:{style:bn}}})))},F=function(Ie,ze,it){var Mt="formatter"===Ie.type&&f.isInvalid(Ie);return 0===ze?Mt?[]:x(Ie,ze,!1,it).toArray():x(Ie,ze,Mt,it).toArray()},$=function(Ie){var ze=f.getCurrentValue(),it=f.shouldHide?0:1;return wi(Ie,function(Mt){return F(Mt,it,ze)})};return{validateItems:$,getFetch:function(Ie,ze){return function(it,Mt){var kt=ze(),pn=$(kt);Mt(gS(pn,Lm.CLOSE_ON_EXECUTE,Ie,!1))}}}},xI=function(i,c,f){var x=f.dataset,F="basic"===x.type?function(){return ft(x.data,function($){return pO($,f.isSelectedFor,f.getPreviewFor)})}:x.getData;return{items:k8(0,c,f),getStyleItems:F}},OO=function(i,c,f){var x=xI(0,c,f),F=x.items,$=x.getStyleItems,Ie=e3(i,"NodeChange",function(ze){var it=ze.getComponent();f.updateText(it)});return Kw({text:f.icon.isSome()?j.none():f.text,icon:f.icon,tooltip:j.from(f.tooltip),role:j.none(),fetch:F.getFetch(c,$),onSetup:Ie,getApi:function(ze){return{getComponent:X(ze)}},columns:1,presets:"normal",classes:f.icon.isSome()?[]:["bespoke"],dropdownBehaviours:[]},"tox-tbtn",c.shared)};!function(i){i[i.SemiColon=0]="SemiColon",i[i.Space=1]="Space"}(DI||(DI={}));var YA,xU=function(i,c,f,x){var $=function(i){return ft(i,function(c){var f=c,x=c,F=c.split("=");return F.length>1&&(f=F[0],x=F[1]),{title:f,format:x}})}(function(i,c){return c===DI.SemiColon?i.replace(/;$/,"").split(";"):i.split(" ")}(i.getParam(c,f,"string"),x));return{type:"basic",data:$}},DU=[{title:"Left",icon:"align-left",format:"alignleft",command:"JustifyLeft"},{title:"Center",icon:"align-center",format:"aligncenter",command:"JustifyCenter"},{title:"Right",icon:"align-right",format:"alignright",command:"JustifyRight"},{title:"Justify",icon:"align-justify",format:"alignjustify",command:"JustifyFull"}],b5=function(i){var $=function(i){return{type:"basic",data:i}}(DU);return{tooltip:"Align",text:j.none(),icon:j.some("align-left"),isSelectedFor:function(Ie){return function(){return i.formatter.match(Ie)}},getCurrentValue:j.none,getPreviewFor:function(Ie){return j.none},onAction:function(Ie){return function(){return vi(DU,function(ze){return ze.format===Ie.format}).each(function(ze){return i.execCommand(ze.command)})}},updateText:function(Ie){var ze=vi(DU,function(Ie){return i.formatter.match(Ie.format)}),it=ze.fold(X("left"),function(Mt){return Mt.title.toLowerCase()});Sa(Ie,Pk,{icon:"align-"+it})},dataset:$,shouldHide:!1,isInvalid:function(Ie){return!i.formatter.canApply(Ie.format)}}},Y8=["-apple-system","Segoe UI","Roboto","Helvetica Neue","sans-serif"],C5=function(i){var c=i.split(/\s*,\s*/);return ft(c,function(f){return f.replace(/^['"]+|['"]+$/g,"")})},E5=function(i){var c="System Font",f=function(){var it=function(Un){return Un?C5(Un)[0]:""},Mt=i.queryCommandValue("FontName"),kt=ze.data,pn=Mt?Mt.toLowerCase():"",bn=vi(kt,function(Un){var di=Un.format;return di.toLowerCase()===pn||it(di).toLowerCase()===it(pn).toLowerCase()}).orThunk(function(){return Nt(function(i){var f;return 0===i.indexOf("-apple-system")&&(f=C5(i.toLowerCase()),Bn(Y8,function(x){return f.indexOf(x.toLowerCase())>-1}))}(pn),{title:c,format:pn})});return{matchOpt:bn,font:Mt}},ze=xU(i,"font_formats","Andale Mono=andale mono,monospace;Arial=arial,helvetica,sans-serif;Arial Black=arial black,sans-serif;Book Antiqua=book antiqua,palatino,serif;Comic Sans MS=comic sans ms,sans-serif;Courier New=courier new,courier,monospace;Georgia=georgia,palatino,serif;Helvetica=helvetica,arial,sans-serif;Impact=impact,sans-serif;Symbol=symbol;Tahoma=tahoma,arial,helvetica,sans-serif;Terminal=terminal,monaco,monospace;Times New Roman=times new roman,times,serif;Trebuchet MS=trebuchet ms,geneva,sans-serif;Verdana=verdana,geneva,sans-serif;Webdings=webdings;Wingdings=wingdings,zapf dingbats",DI.SemiColon);return{tooltip:"Fonts",text:j.some(c),icon:j.none(),isSelectedFor:function(it){return function(Mt){return Mt.exists(function(kt){return kt.format===it})}},getCurrentValue:function(){return f().matchOpt},getPreviewFor:function(it){return function(){return j.some({tag:"div",styles:-1===it.indexOf("dings")?{"font-family":it}:{}})}},onAction:function(it){return function(){i.undoManager.transact(function(){i.focus(),i.execCommand("FontName",!1,it.format)})}},updateText:function(it){var Mt=f(),kt=Mt.matchOpt,pn=Mt.font,bn=kt.fold(X(pn),function(Un){return Un.title});Sa(it,mD,{text:bn})},dataset:ze,shouldHide:!1,isInvalid:Pe}},W8={"8pt":"1","10pt":"2","12pt":"3","14pt":"4","18pt":"5","24pt":"6","36pt":"7"},$8={"xx-small":"7pt","x-small":"8pt",small:"10pt",medium:"12pt",large:"14pt","x-large":"18pt","xx-large":"24pt"},K8=function(i,c){return/[0-9.]+px$/.test(i)?function(i,c){var f=Math.pow(10,c);return Math.round(i*f)/f}(72*parseInt(i,10)/96,c||0)+"pt":mr($8,i).getOr(i)},M5=function(i){var c=function(){var ze=j.none(),it=Ie.data,Mt=i.queryCommandValue("FontSize");if(Mt)for(var kt=function(bn){var Un=K8(Mt,bn),di=function(i){return mr(W8,i).getOr("")}(Un);ze=vi(it,function(Ui){return Ui.format===Mt||Ui.format===Un||Ui.format===di})},pn=3;ze.isNone()&&pn>=0;pn--)kt(pn);return{matchOpt:ze,size:Mt}},F=X(j.none),Ie=xU(i,"fontsize_formats","8pt 10pt 12pt 14pt 18pt 24pt 36pt",DI.Space);return{tooltip:"Font sizes",text:j.some("12pt"),icon:j.none(),isSelectedFor:function(ze){return function(it){return it.exists(function(Mt){return Mt.format===ze})}},getPreviewFor:F,getCurrentValue:function(){return c().matchOpt},onAction:function(ze){return function(){i.undoManager.transact(function(){i.focus(),i.execCommand("FontSize",!1,ze.format)})}},updateText:function(ze){var it=c(),Mt=it.matchOpt,kt=it.size,pn=Mt.fold(X(kt),function(bn){return bn.title});Sa(ze,mD,{text:pn})},dataset:Ie,shouldHide:!1,isInvalid:Pe}},T5=function(i,c){var f=c(),x=ft(f,function(F){return F.format});return j.from(i.formatter.closest(x)).bind(function(F){return vi(f,function($){return $.format===F})}).orThunk(function(){return Nt(i.formatter.match("p"),{title:"Paragraph",format:"p"})})},x5=function(i){var c="Paragraph",$=xU(i,"block_formats","Paragraph=p;Heading 1=h1;Heading 2=h2;Heading 3=h3;Heading 4=h4;Heading 5=h5;Heading 6=h6;Preformatted=pre",DI.SemiColon);return{tooltip:"Blocks",text:j.some(c),icon:j.none(),isSelectedFor:function(se){return function(){return i.formatter.match(se)}},getCurrentValue:j.none,getPreviewFor:function(se){return function(){var Ie=i.formatter.get(se);return j.some({tag:Ie.length>0&&(Ie[0].inline||Ie[0].block)||"div",styles:i.dom.parseStyle(i.formatter.getCssText(se))})}},onAction:y5(i),updateText:function(se){var ze=T5(i,function(){return $.data}).fold(X(c),function(it){return it.title});Sa(se,mD,{text:ze})},dataset:$,shouldHide:!1,isInvalid:function(se){return!i.formatter.canApply(se.format)}}},D5=function(i,c){var f="Paragraph";return{tooltip:"Formats",text:j.some(f),icon:j.none(),isSelectedFor:function(se){return function(){return i.formatter.match(se)}},getCurrentValue:j.none,getPreviewFor:function(se){return function(){var Ie=i.formatter.get(se);return void 0!==Ie?j.some({tag:Ie.length>0&&(Ie[0].inline||Ie[0].block)||"div",styles:i.dom.parseStyle(i.formatter.getCssText(se))}):j.none()}},onAction:y5(i),updateText:function(se){var Ie=function(kt){var pn=kt.items;return void 0!==pn&&pn.length>0?wi(pn,Ie):[{title:kt.title,format:kt.format}]},ze=wi(dO(i),Ie),Mt=T5(i,X(ze)).fold(X(f),function(kt){return kt.title});Sa(se,mD,{text:Mt})},shouldHide:i.getParam("style_formats_autohide",!1,"boolean"),isInvalid:function(se){return!i.formatter.canApply(se.format)},dataset:c}},oY=Object.freeze({__proto__:null,events:function(i,c){var f=function(x,F){i.updateState.each(function($){var se=$(x,F);c.set(se)}),i.renderComponents.each(function($){var se=$(F,c.get()),Ie=ft(se,x.getSystem().build);uo(x,Ie)})};return uc([yr($d(),function(x,F){var $=F;if(!$.universal){var se=i.channel;Ve($.channels,se)&&f(x,$.data)}}),Va(function(x,F){i.initialData.each(function($){f(x,$)})})])}}),sY=Object.freeze({__proto__:null,getState:function(i,c,f){return f}}),lY=[Mr("channel"),Es("renderComponents"),Es("updateState"),Es("initialData")],uY=Object.freeze({__proto__:null,init:function(){var i=ta(j.none());return{readState:function(){return i.get().getOr("none")},get:i.get,set:i.set,clear:function(){return i.set(j.none())}}}}),c0=Wc({fields:lY,name:"reflecting",active:oY,apis:sY,state:uY}),dY=X([Mr("toggleClass"),Mr("fetch"),gu("onExecute"),Ti("getHotspot",j.some),Ti("getAnchorOverrides",X({})),rd(),gu("onItemExecute"),Es("lazySink"),Mr("dom"),kl("onOpen"),Zu("splitDropdownBehaviours",[Cm,Za,ka]),Ti("matchWidth",!1),Ti("useMinWidth",!1),Ti("eventOrder",{}),Es("role")].concat(dP())),pY=tp({factory:Nf,schema:[Mr("dom")],name:"arrow",defaults:function(){return{buttonBehaviours:ao([ka.revoke()])}},overrides:function(i){return{dom:{tag:"span",attributes:{role:"presentation"}},action:function(c){c.getSystem().getByUid(i.uid).each(pd)},buttonBehaviours:ao([fl.config({toggleOnExecute:!1,toggleClass:i.toggleClass})])}}}),mY=tp({factory:Nf,schema:[Mr("dom")],name:"button",defaults:function(){return{buttonBehaviours:ao([ka.revoke()])}},overrides:function(i){return{dom:{tag:"span",attributes:{role:"presentation"}},action:function(c){c.getSystem().getByUid(i.uid).each(function(f){i.onExecute(f,c)})}}}}),fY=X([pY,mY,Rg({factory:{sketch:function(i){return{uid:i.uid,dom:{tag:"span",styles:{display:"none"},attributes:{"aria-hidden":"true"},innerHtml:i.text}}}},schema:[Mr("text")],name:"aria-descriptor"}),kg({schema:[Wm()],name:"menu",defaults:function(i){return{onExecute:function(c,f){c.getSystem().getByUid(i.uid).each(function(x){i.onItemExecute(x,c,f)})}}}}),uL()]),t3=qm({name:"SplitDropdown",configFields:dY(),partFields:fY(),factory:function(i,c,f,x){var F,$=function(kt){Ml.getCurrent(kt).each(function(pn){Jl.highlightFirst(pn),Za.focusIn(pn)})},se=function(kt){uS(i,ve,kt,x,$,cC.HighlightFirst).get(V)},ze=function(kt){var pn=sh(kt,i,"button");return pd(pn),j.some(!0)},it=re(re({},uc([Va(function(kt,pn){qc(kt,i,"aria-descriptor").each(function(Un){var di=jo("aria");De(Un.element,"id",di),De(kt.element,"aria-describedby",di)})})])),oM(j.some(se))),Mt={repositionMenus:function(kt){fl.isOn(kt)&&zT(kt)}};return{uid:i.uid,dom:i.dom,components:c,apis:Mt,eventOrder:re(re({},i.eventOrder),(F={},F[dd()]=["disabling","toggling","alloy.base.behaviour"],F)),events:it,behaviours:Od(i.splitDropdownBehaviours,[Cm.config({others:{sandbox:function(kt){var pn=sh(kt,i,"arrow");return uP(i,kt,{onOpen:function(){fl.on(pn),fl.on(kt)},onClose:function(){fl.off(pn),fl.off(kt)}})}}}),Za.config({mode:"special",onSpace:ze,onEnter:ze,onDown:function(kt){return se(kt),j.some(!0)}}),ka.config({}),fl.config({toggleOnExecute:!1,aria:{mode:"expanded"}})]),domModification:{attributes:{role:i.role.getOr("button"),"aria-haspopup":!0}}}},apis:{repositionMenus:function(i,c){return i.repositionMenus(c)}}}),gY=function(i){return{isDisabled:function(){return Aa.isDisabled(i)},setDisabled:function(c){return Aa.set(i,c)}}},_Y=function(i){return{setActive:function(c){fl.set(i,c)},isActive:function(){return fl.isOn(i)},isDisabled:function(){return Aa.isDisabled(i)},setDisabled:function(c){return Aa.set(i,c)}}},S5=function(i,c){return i.map(function(f){return{"aria-label":c.translate(f),title:c.translate(f)}}).getOr({})},A5=jo("focus-button"),SU=function(i,c,f,x,F,$){var se;return{dom:{tag:"button",classes:["tox-tbtn"].concat(c.isSome()?["tox-tbtn--select"]:[]),attributes:S5(f,$)},components:bM([i.map(function(Ie){return jw(Ie,$.icons)}),c.map(function(Ie){return $P(Ie,"tox-tbtn",$)})]),eventOrder:(se={},se[mu()]=["focusing","alloy.base.behaviour","common-button-display-events"],se),buttonBehaviours:ao([lC_toolbarButton($.isDisabled),bf(),bs("common-button-display-events",[yr(mu(),function(Ie,ze){ze.event.prevent(),Cl(Ie,A5)})])].concat(x.map(function(Ie){return c0.config({channel:Ie,initialData:{icon:i,text:c},renderComponents:function(ze,it){return bM([ze.icon.map(function(Mt){return jw(Mt,$.icons)}),ze.text.map(function(Mt){return $P(Mt,"tox-tbtn",$)})])}})}).toArray()).concat(F.getOr([])))}},w5=function(i,c,f){var x=ta(V),F=SU(i.icon,i.text,i.tooltip,j.none(),j.none(),f);return Nf.sketch({dom:F.dom,components:F.components,eventOrder:Ik,buttonBehaviours:ao([bs("toolbar-button-events",[wk({onAction:i.onAction,getApi:c.getApi}),Xx(c,x),eD(c,x)]),lC_toolbarButton(function(){return i.disabled||f.isDisabled()}),bf()].concat(c.toolbarButtonBehaviours))})},I5=function(i,c,f){return w5(i,{toolbarButtonBehaviours:[].concat(f.length>0?[bs("toolbarButtonWith",f)]:[]),getApi:gY,onSetup:i.onSetup},c)},P5=function(i,c,f){return nr(w5(i,{toolbarButtonBehaviours:[ys.config({}),fl.config({toggleClass:"tox-tbtn--enabled",aria:{mode:"pressed"},toggleOnExecute:!1})].concat(f.length>0?[bs("toolbarToggleButtonWith",f)]:[]),getApi:_Y,onSetup:i.onSetup},c))},CY=function(i,c,f){return function(x){return Fh_nu(function(F){return c.fetch(F)}).map(function(F){return j.from(Z2(nr(qI(jo("menu-value"),F,function($){c.onItemAction(i(x),$)},c.columns,c.presets,Lm.CLOSE_ON_EXECUTE,c.select.getOr(Pe),f),{movement:_w(c.columns,c.presets),menuBehaviours:zf_unnamedEvents("auto"!==c.columns?[]:[Va(function($,se){Ms($,4,z(c.presets)).each(function(Ie){var ze=Ie.numRows,it=Ie.numColumns;Za.setGridSize($,ze,it)})})])})))})}},MY=[{name:"history",items:["undo","redo"]},{name:"styles",items:["styleselect"]},{name:"formatting",items:["bold","italic"]},{name:"alignment",items:["alignleft","aligncenter","alignright","alignjustify"]},{name:"indentation",items:["outdent","indent"]},{name:"permanent pen",items:["permanentpen"]},{name:"comments",items:["addcomment"]}],LO=function(i,c){return function(f,x,F){var $=i(f).mapError(function(se){return fo(se)}).getOrDie();return c($,x,F)}},SI={button:LO(rw,function(i,c){return function(i,c){return I5(i,c,[])}(i,c.backstage.shared.providers)}),togglebutton:LO(hb,function(i,c){return function(i,c){return P5(i,c,[])}(i,c.backstage.shared.providers)}),menubutton:LO(CD,function(i,c){return JP(i,"tox-tbtn",c.backstage,j.none())}),splitbutton:LO(function(i){return li("SplitButton",dU,i)},function(i,c){return function(i,c){var f,x=jo("channel-update-split-dropdown-display"),F=function(Ie){return{isDisabled:function(){return Aa.isDisabled(Ie)},setDisabled:function(ze){return Aa.set(Ie,ze)},setIconFill:function(ze,it){Fc(Ie.element,'svg path[id="'+ze+'"], rect[id="'+ze+'"]').each(function(Mt){De(Mt,"fill",it)})},setIconStroke:function(ze,it){Fc(Ie.element,'svg path[id="'+ze+'"], rect[id="'+ze+'"]').each(function(Mt){De(Mt,"stroke",it)})},setActive:function(ze){De(Ie.element,"aria-pressed",ze),Fc(Ie.element,"span").each(function(it){Ie.getSystem().getByDom(it).each(function(Mt){return fl.set(Mt,ze)})})},isActive:function(){return Fc(Ie.element,"span").exists(function(ze){return Ie.getSystem().getByDom(ze).exists(fl.isOn)})}}},$=ta(V),se={getApi:F,onSetup:i.onSetup};return t3.sketch({dom:{tag:"div",classes:["tox-split-button"],attributes:re({"aria-pressed":!1},S5(i.tooltip,c.providers))},onExecute:function(Ie){i.onAction(F(Ie))},onItemExecute:function(Ie,ze,it){},splitDropdownBehaviours:ao([lC_splitButton(c.providers.isDisabled),bf(),bs("split-dropdown-events",[yr(A5,ka.focus),Xx(se,$),eD(se,$)]),fA.config({})]),eventOrder:(f={},f[lm()]=["alloy.base.behaviour","split-dropdown-events"],f),toggleClass:"tox-tbtn--enabled",lazySink:c.getSink,fetch:CY(F,i,c.providers),parts:{menu:b(0,i.columns,i.presets)},components:[t3.parts.button(SU(i.icon,i.text,j.none(),j.some(x),j.some([fl.config({toggleClass:"tox-tbtn--enabled",toggleOnExecute:!1})]),c.providers)),t3.parts.arrow({dom:{tag:"button",classes:["tox-tbtn","tox-split-button__chevron"],innerHtml:jD("chevron-down",c.providers.icons)},buttonBehaviours:ao([lC_splitButton(c.providers.isDisabled),bf(),Rx()])}),t3.parts["aria-descriptor"]({text:c.providers.translate("To open the popup, press Shift+Enter")})]})}(i,c.backstage.shared)}),grouptoolbarbutton:LO(function(i){return li("GroupToolbarButton",sU,i)},function(i,c,f){var x,F=f.ui.registry.getAll().buttons,se=((x={})[Ob]=c.backstage.shared.header.isPositionedAtTop()?mf.TopToBottom:mf.BottomToTop,x);if(eA(f)===_b.floating)return function(i,c,f,x){var F=c.shared;return $_.sketch({lazySink:F.getSink,fetch:function(){return Fh_nu(function($){$(ft(f(i.items),Bi))})},markers:{toggledClass:"tox-tbtn--enabled"},parts:{button:SU(i.icon,i.text,i.tooltip,j.none(),j.none(),F.providers),toolbar:{dom:{tag:"div",classes:["tox-toolbar__overflow"],attributes:x}}}})}(i,c.backstage,function(Ie){return n3(f,{buttons:F,toolbar:Ie,allowToolbarGroups:!1},c,j.none())},se);throw new Error("Toolbar groups are only supported when using floating toolbar mode")}),styleSelectButton:function(i,c){return function(i,c){var f=re({type:"advanced"},c.styleselect);return OO(i,c,D5(i,f))}(i,c.backstage)},fontsizeSelectButton:function(i,c){return function(i,c){return OO(i,c,M5(i))}(i,c.backstage)},fontSelectButton:function(i,c){return function(i,c){return OO(i,c,E5(i))}(i,c.backstage)},formatButton:function(i,c){return function(i,c){return OO(i,c,x5(i))}(i,c.backstage)},alignMenuButton:function(i,c){return function(i,c){return OO(i,c,b5(i))}(i,c.backstage)}},O5={styleselect:SI.styleSelectButton,fontsizeselect:SI.fontsizeSelectButton,fontselect:SI.fontSelectButton,formatselect:SI.formatButton,align:SI.alignMenuButton},AY=function(i){var c=i.toolbar,f=i.buttons;return!1===c?[]:void 0===c||!0===c?function(i){var c=ft(MY,function(f){var x=st(f.items,function(F){return jn(i,F)||jn(O5,F)});return{name:f.name,items:x}});return st(c,function(f){return f.items.length>0})}(f):e(c)?function(i){var c=i.split("|");return ft(c,function(f){return{items:f.trim().split(" ")}})}(c):function(i){return Y(i,function(c){return jn(c,"name")&&jn(c,"items")})}(c)?c:(console.error("Toolbar type should be string, string[], boolean or ToolbarGroup[]"),[])},wY=function(i,c,f,x,F,$){return mr(c,f.toLowerCase()).orThunk(function(){return $.bind(function(se){return Vi(se,function(Ie){return mr(c,Ie+f.toLowerCase())})})}).fold(function(){return mr(O5,f.toLowerCase()).map(function(se){return se(i,F)}).orThunk(function(){return j.none()})},function(se){return"grouptoolbarbutton"!==se.type||x?function(i,c,f){return mr(SI,i.type).fold(function(){return console.error("skipping button defined by",i),j.none()},function(x){return j.some(x(i,c,f))})}(se,F,i):(console.warn("Ignoring the '"+f+"' toolbar button. Group toolbar buttons are only supported when using floating toolbar mode and cannot be nested."),j.none())})},n3=function(i,c,f,x){var F=AY(c),$=ft(F,function(se){var Ie=wi(se.items,function(ze){return 0===ze.trim().length?[]:wY(i,c.buttons,ze,c.allowToolbarGroups,f,x).toArray()});return{title:j.from(i.translate(se.name)),items:Ie}});return st($,function(se){return se.items.length>0})},L5=function(i,c,f,x){var F=c.outerContainer,$=f.toolbar,se=f.buttons;if(Y($,e)){var Ie=$.map(function(ze){var it={toolbar:ze,buttons:se,allowToolbarGroups:f.allowToolbarGroups};return n3(i,it,{backstage:x},j.none())});Nm.setToolbars(F,Ie)}else Nm.setToolbar(F,n3(i,f,{backstage:x},j.none()))},k5=$r(),IY=k5.os.isiOS()&&k5.os.version.major<=12,LY=Object.freeze({__proto__:null,render:function(i,c,f,x,F){var $=ta(0),se=c.outerContainer;O8(i);var Ie=Xn.fromDom(F.targetNode),ze=qr(ro(Ie));(function(i,c){Ys(i,c,kr)})(Ie,c.mothership),fs(ze,c.uiMothership),i.on("PostRender",function(){L5(i,c,f,x),$.set(i.getWin().innerWidth),Nm.setMenubar(se,h5(i,f)),Nm.setSidebar(se,f.sidebar),function(i,c){var f=i.dom,x=i.getWin(),F=i.getDoc().documentElement,$=ta(Da(x.innerWidth,x.innerHeight)),se=ta(Da(F.offsetWidth,F.offsetHeight)),Ie=function(){var pn=$.get();(pn.left!==x.innerWidth||pn.top!==x.innerHeight)&&($.set(Da(x.innerWidth,x.innerHeight)),VI(i))},ze=function(){var pn=i.getDoc().documentElement,bn=se.get();(bn.left!==pn.offsetWidth||bn.top!==pn.offsetHeight)&&(se.set(Da(pn.offsetWidth,pn.offsetHeight)),VI(i))},it=function(pn){return function(i,c){return i.fire("ScrollContent",c)}(i,pn)};f.bind(x,"resize",Ie),f.bind(x,"scroll",it);var Mt=g0(Xn.fromDom(i.getBody()),"load",ze),kt=c.uiMothership.element;i.on("hide",function(){Ki(kt,"display","none")}),i.on("show",function(){Ka(kt,"display")}),i.on("NodeChange",ze),i.on("remove",function(){Mt.unbind(),f.unbind(x,"resize",Ie),f.unbind(x,"scroll",it),x=null})}(i,c)});var it=Nm.getSocket(se).getOrDie("Could not find expected socket element");if(IY){ya(it.element,{overflow:"scroll","-webkit-overflow-scrolling":"touch"});var Mt=function(i,c){var f=null;return{cancel:function(){g(f)||(clearTimeout(f),f=null)},throttle:function(){for(var $=[],se=0;se<arguments.length;se++)$[se]=arguments[se];g(f)&&(f=setTimeout(function(){f=null,i.apply(null,$)},c))}}}(function(){i.fire("ScrollContent")},20),kt=Nc(it.element,"scroll",Mt.throttle);i.on("remove",kt.unbind)}t2(i,c),i.addCommand("ToggleSidebar",function(di,Ui){Nm.toggleSidebar(se,Ui),i.fire("ToggleSidebar")}),i.addQueryValueHandler("ToggleSidebar",function(){return Nm.whichSidebar(se)});var pn=eA(i);(pn===_b.sliding||pn===_b.floating)&&i.on("ResizeWindow ResizeEditor ResizeContent",function(){var di=i.getWin().innerWidth;di!==$.get()&&(Nm.refreshToolbar(c.outerContainer),$.set(di))});var Un={enable:function(){aS(c,!1)},disable:function(){aS(c,!0)},isDisabled:function(){return Aa.isDisabled(se)}};return{iframeContainer:it.element.dom,editorContainer:se.element.dom,api:Un}}}),AU=function(i){return/^[0-9\.]+(|px)$/i.test(""+i)?j.some(parseInt(""+i,10)):j.none()},wU=function(i){return B(i)?i+"px":i},i3=function(i,c,f){var x=c.filter(function($){return i<$}),F=f.filter(function($){return i>$});return x.or(F).getOr(i)},RY=function(i){var c=function(i){var c=ow(i),f=UO(i),x=zO(i);return AU(c).map(function(F){return i3(F,f,x)})}(i);return c.getOr(ow(i))},R5=function(i){var c=aw(i),f=RI(i),x=sw(i);return AU(c).map(function(F){return i3(F,f,x)})},NY=function(i,c,f,x,F){var $=f.uiMothership,se=f.outerContainer,Ie=oS.DOM,ze=cw(i),it=uw(i),Mt=sw(i).or(R5(i)),kt=x.shared.header,pn=kt.isPositionedAtTop,bn=eA(i),Un=bn===_b.sliding||bn===_b.floating,di=ta(!1),Ui=function(){return di.get()&&!i.removed},ri=function(jr){return Un?jr.fold(X(0),function(Nr){return Nr.components().length>1?hl(Nr.components()[1].element):0}):0},hr=function(){$.broadcastOn([Og()],{})},Br=function(jr){if(void 0===jr&&(jr=!1),Ui()){if(ze||function(){var jr=Mt.getOrThunk(function(){var Nr=AU(qi(Ra(),"margin-left")).getOr(0);return ks(Ra())-ss(c).left+Nr});Ki(F.get().element,"max-width",jr+"px")}(),Un&&Nm.refreshToolbar(se),ze||function(){var jr=Nm.getToolbar(se),Nr=ri(jr),bo=lo(c),fa=pn()?Math.max(bo.y-hl(F.get().element)+Nr,0):bo.bottom;ya(se.element,{position:"absolute",top:Math.round(fa)+"px",left:Math.round(bo.x)+"px"})}(),it){var Nr=F.get();jr?Em.reset(Nr):Em.refresh(Nr)}hr()}},ko=function(jr){if(void 0===jr&&(jr=!0),!ze&&it&&Ui()){var Nr=kt.getDockingMode(),bo=function(jr){switch(GO(i)){case qx.auto:var Nr=Nm.getToolbar(se),bo=ri(Nr),fa=hl(jr.element)-bo,Vr=lo(c);if(Vr.y>fa)return"top";var Pa=Li(c),Zl=Math.max(Pa.dom.scrollHeight,hl(Pa));return Vr.bottom<Zl-fa||Zs().bottom<Vr.bottom-fa?"bottom":"top";case qx.bottom:return"bottom";case qx.top:default:return"top"}}(F.get());bo!==Nr&&(function(jr){var Nr=F.get();Em.setModes(Nr,[jr]),kt.setDockingMode(jr);var bo=pn()?mf.TopToBottom:mf.BottomToTop;De(Nr.element,Ob,bo)}(bo),jr&&Br(!0))}};return{isVisible:Ui,isPositionedAtTop:pn,show:function(){di.set(!0),Ki(se.element,"display","flex"),Ie.addClass(i.getBody(),"mce-edit-focus"),Ka($.element,"display"),ko(!1),Br()},hide:function(){di.set(!1),f.outerContainer&&(Ki(se.element,"display","none"),Ie.removeClass(i.getBody(),"mce-edit-focus")),Ki($.element,"display","none")},update:Br,updateMode:ko,repositionPopups:hr}},F5=function(i,c){var f=lo(i);return{pos:c?f.y:f.bottom,bounds:f}},zY=Object.freeze({__proto__:null,render:function(i,c,f,x,F){var $=c.mothership,se=c.uiMothership,Ie=c.outerContainer,ze=ta(null),it=Xn.fromDom(F.targetNode),Mt=NY(i,it,c,x,ze),kt=function(i){return i.getParam("toolbar_persist",!1,"boolean")}(i);L8(i);var pn=function(){if(ze.get())Mt.show();else{ze.set(Nm.getHeader(Ie).getOrDie());var Un=KO(i);fs(Un,$),fs(Un,se),L5(i,c,f,x),Nm.setMenubar(Ie,h5(i,f)),Mt.show(),function(i,c,f,x){var F=ta(F5(c,f.isPositionedAtTop())),$=function(Ie){var ze=F5(c,f.isPositionedAtTop()),it=ze.pos,Mt=ze.bounds,kt=F.get(),pn=kt.pos,bn=kt.bounds,Un=Mt.height!==bn.height||Mt.width!==bn.width;F.set({pos:it,bounds:Mt}),Un&&VI(i,Ie),f.isVisible()&&(pn!==it?f.update(!0):Un&&(f.updateMode(),f.repositionPopups()))};x||(i.on("activate",f.show),i.on("deactivate",f.hide)),i.on("SkinLoaded ResizeWindow",function(){return f.update(!0)}),i.on("NodeChange keydown",function(Ie){c_.requestAnimationFrame(function(){return $(Ie)})}),i.on("ScrollWindow",function(){return f.updateMode()});var se=rm();se.set(g0(Xn.fromDom(i.getBody()),"load",$)),i.on("remove",function(){se.clear()})}(i,it,Mt,kt),i.nodeChanged()}};i.on("show",pn),i.on("hide",Mt.hide),kt||(i.on("focus",pn),i.on("blur",Mt.hide)),i.on("init",function(){(i.hasFocus()||kt)&&pn()}),t2(i,c);var bn={show:function(){Mt.show()},hide:function(){Mt.hide()},enable:function(){aS(c,!1)},disable:function(){aS(c,!0)},isDisabled:function(){return Aa.isDisabled(Ie)}};return{editorContainer:Ie.element.dom,api:bn}}}),N5="contexttoolbar-hide",B5=function(i,c){return yr(Ak,function(f,x){var $=function(i){return{hide:function(){return Cl(i,hu())},getValue:function(){return Io.getValue(i)}}}(i.get(f));c.onAction($,x.event.buttonApi)})},GY=function(i,c,f){var x={backstage:{shared:{providers:f}}};return"contextformtogglebutton"===c.type?function(i,c,f){var x=c.original;x.primary;var F=oe(x,["primary"]),$=dr(hb(re(re({},F),{type:"togglebutton",onAction:V})));return P5($,f.backstage.shared.providers,[B5(i,c)])}(i,c,x):function(i,c,f){var x=c.original;x.primary;var F=oe(x,["primary"]),$=dr(rw(re(re({},F),{type:"button",onAction:V})));return I5($,f.backstage.shared.providers,[B5(i,c)])}(i,c,x)},U5=function(i,c){var f=i.label.fold(function(){return{}},function($){return{"aria-label":$}}),x=wl(pA.sketch({inputClasses:["tox-toolbar-textfield","tox-toolbar-nav-js"],data:i.initValue(),inputAttributes:f,selectOnFocus:!0,inputBehaviours:ao([Za.config({mode:"special",onEnter:function($){return F.findPrimary($).map(function(se){return pd(se),!0})},onLeft:function($,se){return se.cut(),j.none()},onRight:function($,se){return se.cut(),j.none()}})])})),F=function(i,c,f){var x=ft(c,function(se){return wl(GY(i,se,f))});return{asSpecs:function(){return ft(x,function(se){return se.asSpec()})},findPrimary:function(se){return Vi(c,function(Ie,ze){return Ie.primary?j.from(x[ze]).bind(function(it){return it.getOpt(se)}).filter(ne(Aa.isDisabled)):j.none()})}}}(x,i.commands,c);return[{title:j.none(),items:[x.asSpec()]},{title:j.none(),items:F.asSpecs()}]},jY_buildInitGroups=U5,z5=function(i,c,f){return void 0===f&&(f=.01),c.bottom-i.y>=f&&i.bottom-c.y>=f},IU=function(i){var f=function(i){var c=i.getBoundingClientRect();if(c.height<=0&&c.width<=0){var f=fi(Xn.fromDom(i.startContainer),i.startOffset).element;return(xi(f)?La(f):j.some(f)).filter(Gn).map(function(F){return F.dom.getBoundingClientRect()}).getOr(c)}return c}(i.selection.getRng());if(i.inline){var x=Hc();return sr(x.left+f.left,x.top+f.top,f.width,f.height)}var F=ga(Xn.fromDom(i.getBody()));return sr(F.x+f.left,F.y+f.top,f.width,f.height)},Y5=function(i,c,f,x){void 0===x&&(x=0);var F=Su(window),$=lo(Xn.fromDom(i.getContentAreaContainer())),se=FI(i)||NI(i)||lw(i),Ie=function(i,c,f){var x=Math.max(i.x+f,c.x);return{x,width:Math.min(i.right-f,c.right)-x}}($,F,x),ze=Ie.x,it=Ie.width;if(i.inline&&!se)return sr(ze,F.y,it,F.height);var kt=function(i,c,f,x,F,$){var se=Xn.fromDom(i.getContainer()),Ie=Fc(se,".tox-editor-header").getOr(se),ze=lo(Ie),it=ze.y>=c.bottom,Mt=x&&!it;if(i.inline&&Mt)return{y:Math.max(ze.bottom+$,f.y),bottom:f.bottom};if(i.inline&&!Mt)return{y:f.y,bottom:Math.min(ze.y-$,f.bottom)};var kt="line"===F?lo(se):c;return Mt?{y:Math.max(ze.bottom+$,f.y),bottom:Math.min(kt.bottom-$,f.bottom)}:{y:Math.max(kt.y+$,f.y),bottom:Math.min(ze.y-$,f.bottom)}}(i,$,F,c.header.isPositionedAtTop(),f,x),pn=kt.y,bn=kt.bottom;return sr(ze,pn,it,bn-pn)},H5={valignCentre:[],alignCentre:[],alignLeft:["tox-pop--align-left"],alignRight:["tox-pop--align-right"],right:["tox-pop--right"],left:["tox-pop--left"],bottom:["tox-pop--bottom"],top:["tox-pop--top"],inset:["tox-pop--inset"]},V5={maxHeightFunction:eh(),maxWidthFunction:Vg()},Z5=function(i){return"node"===i},tH=function(i,c,f,x,F){var $=IU(i),se=x.lastElement().exists(function(it){return tn(f,it)});return function(i,c){var f=i.selection.getRng(),x=fi(Xn.fromDom(f.startContainer),f.startOffset);return f.startContainer===f.endContainer&&f.startOffset===f.endOffset-1&&tn(x.element,c)}(i,f)?se?AT:gy:se?function(i,c,f){var x=$o(i,"position");Ki(i,"position",c);var F=f(i);return x.each(function($){return Ki(i,"position",$)}),F}(c,x.getMode(),function(){return z5($,lo(c))&&!x.isReposition()?rE:AT}):("fixed"===x.getMode()?F.y+Hc().top:F.y)+(hl(c)+12)<=$.y?gy:mb},nH=function(i,c,f,x){var F=function(ze){return function(it,Mt,kt,pn,bn){var Un=tH(i,pn,ze,f,bn),di=re(re({},it),{y:bn.y,height:bn.height});return re(re({},Un(di,Mt,kt,pn,bn)),{alwaysFit:!0})}},$=function(ze){return Z5(x)?[F(ze)]:[]};return c?{onLtr:function(ze){return[Hu,Bp,tm,Hd,nm,Up].concat($(ze))},onRtl:function(ze){return[Hu,tm,Bp,nm,Hd,Up].concat($(ze))}}:{onLtr:function(ze){return[Up,Hu,Hd,Bp,nm,tm].concat($(ze))},onRtl:function(ze){return[Up,Hu,nm,tm,Hd,Bp].concat($(ze))}}},PU=function(i,c){var f=st(c,function(se){return se.predicate(i.dom)}),x=He(f,function(se){return"contexttoolbar"===se.type});return{contextToolbars:x.pass,contextForms:x.fail}},aH=function(i,c,f){var x=PU(i,c);if(x.contextForms.length>0)return j.some({elem:i,toolbars:[x.contextForms[0]]});var F=PU(i,f);if(F.contextForms.length>0)return j.some({elem:i,toolbars:[F.contextForms[0]]});if(x.contextToolbars.length>0||F.contextToolbars.length>0){var $=function(i){if(i.length<=1)return i;var c=function(Ie){return tt(i,function(ze){return ze.position===Ie})},f=function(Ie){return st(i,function(ze){return ze.position===Ie})},x=c("selection"),F=c("node");if(x||F){if(F&&x){var $=f("node"),se=ft(f("selection"),function(Ie){return re(re({},Ie),{position:"node"})});return $.concat(se)}return f(x?"selection":"node")}return f("line")}(x.contextToolbars.concat(F.contextToolbars));return j.some({elem:i,toolbars:$})}return j.none()},sH=function(i,c,f){return i(c)?j.none():N(c,function(x){if(Gn(x)){var F=PU(x,f.inNodeScope),$=F.contextToolbars,se=F.contextForms,Ie=se.length>0?se:function(i){if(i.length<=1)return i;var c=function(x){return vi(i,function(F){return F.position===x})};return c("selection").orThunk(function(){return c("node")}).orThunk(function(){return c("line")}).map(function(x){return x.position}).fold(function(){return[]},function(x){return st(i,function(F){return F.position===x})})}($);return Ie.length>0?j.some({elem:x,toolbars:Ie}):j.none()}return j.none()},i)},cH=function(i,c){var f={},x=[],F=[],$={},se={},Ie=function(Mt,kt){var pn=dr(function(i){return li("ContextForm",XS,i)}(kt));f[Mt]=pn,pn.launch.map(function(bn){$["form:"+Mt]=re(re({},kt.launch),{type:"contextformtogglebutton"===bn.type?"togglebutton":"button",onAction:function(){c(pn)}})}),"editor"===pn.scope?F.push(pn):x.push(pn),se[Mt]=pn},ze=function(Mt,kt){(function(i){return li("ContextToolbar",RT,i)})(kt).each(function(pn){"editor"===kt.scope?F.push(pn):x.push(pn),se[Mt]=pn})},it=Vn(i);return Ct(it,function(Mt){var kt=i[Mt];"contextform"===kt.type?Ie(Mt,kt):"contexttoolbar"===kt.type&&ze(Mt,kt)}),{forms:f,inNodeScope:x,inEditorScope:F,lookupTable:se,formNavigators:$}},G5=jo("forward-slide"),W5=jo("backward-slide"),OU=jo("change-slide-event"),LU="tox-pop--resizing",kU="tox-pop--transition",dH=function(i,c,f,x){var F=x.backstage,$=F.shared,se=$r().deviceType.isTouch,Ie=ku(),ze=ku(),it=ku(),Mt=Ga(function(i){var c=ta([]);return Fu.sketch({dom:{tag:"div",classes:["tox-pop"]},fireDismissalEventInstead:{event:"doNotDismissYet"},onShow:function(f){c.set([]),Fu.getContent(f).each(function(x){Ka(x.element,"visibility")}),wc(f.element,LU),Ka(f.element,"width")},inlineBehaviours:ao([bs("context-toolbar-events",[nu(ud(),function(f,x){"width"===x.event.raw.propertyName&&(wc(f.element,LU),Ka(f.element,"width"))}),yr(OU,function(f,x){var F=f.element;Ka(F,"width");var $=ks(F);Fu.setContent(f,x.event.contents),Qc(F,LU);var se=ks(F);Ki(F,"width",$+"px"),Fu.getContent(f).each(function(Ie){x.event.focus.bind(function(ze){return Xd(ze),dc(F)}).orThunk(function(){return Za.focusIn(Ie),Vu(ro(F))})}),c_.setTimeout(function(){Ki(f.element,"width",se+"px")},0)}),yr(G5,function(f,x){Fu.getContent(f).each(function(F){c.set(c.get().concat([{bar:F,focus:Vu(ro(f.element))}]))}),Sa(f,OU,{contents:x.event.forwardContents,focus:j.none()})}),yr(W5,function(f,x){Ai(c.get()).each(function(F){c.set(c.get().slice(0,c.get().length-1)),Sa(f,OU,{contents:hd(F.bar),focus:F.focus})})})]),Za.config({mode:"special",onEscape:function(f){return Ai(c.get()).fold(function(){return i.onEscape()},function(x){return Cl(f,W5),j.some(!0)})}})]),lazySink:function(){return ra.value(i.sink)}})}({sink:f,onEscape:function(){return i.focus(),j.some(!0)}})),kt=function(){var Zr=it.get().getOr("node"),No=Z5(Zr)?1:0;return Y5(i,$,Zr,No)},pn=function(){return!(i.removed||se()&&F.isContextMenuOpen())},Un=function(){if(pn()){var Zr=kt(),No=Yt(it.get(),"node")?function(i,c){return c.filter(Ho).map(ga).getOrThunk(function(){return IU(i)})}(i,Ie.get()):IU(i);return Zr.height<=0||!z5(No,Zr)}return!0},di=function(){Ie.clear(),ze.clear(),it.clear(),Fu.hide(Mt)},Ui=function(){if(Fu.isOpen(Mt)){var Zr=Mt.element;Ka(Zr,"display"),Un()?Ki(Zr,"display","none"):(ze.set(0),Fu.reposition(Mt))}},ri=function(Zr){return{dom:{tag:"div",classes:["tox-pop__dialog"]},components:[Zr],behaviours:ao([Za.config({mode:"acyclic"}),bs("pop-dialog-wrap-events",[Va(function(No){i.shortcuts.add("ctrl+F9","focus statusbar",function(){return Za.focusIn(No)})}),mp(function(No){i.shortcuts.remove("ctrl+F9")})])])}},Yi=en(function(){return cH(c,function(Zr){var No=zi([Zr]);Sa(Mt,G5,{forwardContents:ri(No)})})}),zi=function(Zr){var No=i.ui.registry.getAll().buttons,jr=Yi(),Nr=re(re({},No),jr.formNavigators),bo=eA(i)===_b.scrolling?_b.scrolling:_b.default,fa=mi(ft(Zr,function(Vr){return"contexttoolbar"===Vr.type?function(Zr,No){return n3(i,{buttons:Zr,toolbar:No.items,allowToolbarGroups:!1},x,j.some(["form:"]))}(Nr,Vr):function(Zr,No){return jY_buildInitGroups(Zr,No)}(Vr,$.providers)}));return hc({type:bo,uid:jo("context-toolbar"),initGroups:fa,onEscape:j.none,cyclicKeying:!0,providers:$.providers})},hr=function(Zr,No){var jr="node"===Zr?$.anchors.node(No):$.anchors.cursor(),Nr=function(i,c,f,x){return"line"===c?{bubble:uv(12,0,H5),layouts:{onLtr:function(){return[sv]},onRtl:function(){return[Rv]}},overrides:V5}:{bubble:uv(0,12,H5,1/12),layouts:nH(i,f,x,c),overrides:V5}}(i,Zr,se(),{lastElement:Ie.get,isReposition:function(){return Yt(ze.get(),0)},getMode:function(){return zn.getMode(f)}});return nr(jr,Nr)},Br=function(Zr,No){if(ko.cancel(),pn()){var jr=zi(Zr),Nr=Zr[0].position,bo=hr(Nr,No);it.set(Nr),ze.set(1);var fa=Mt.element;Ka(fa,"display"),function(Zr){return Yt(pr(Zr,Ie.get(),tn),!0)}(No)||(wc(fa,kU),zn.reset(f,Mt)),Fu.showWithinBounds(Mt,ri(jr),{anchor:bo,transition:{classes:[kU],mode:"placement"}},function(){return j.some(kt())}),No.fold(Ie.clear,Ie.set),Un()&&Ki(fa,"display","none")}},ko=Fx(function(){if(i.hasFocus()&&!i.removed)if(Ep(Mt.element,kU))ko.throttle();else{(function(i,c){var se,f=Xn.fromDom(c.getBody()),x=function(se){return tn(se,f)},$=Xn.fromDom(c.selection.getNode());return x(se=$)||ar(f,se)?aH($,i.inNodeScope,i.inEditorScope).orThunk(function(){return sH(x,$,i)}):j.none()})(Yi(),i).fold(di,function(No){Br(No.toolbars,j.some(No.elem))})}},17);i.on("init",function(){i.on("remove",di),i.on("ScrollContent ScrollWindow ObjectResized ResizeEditor longpress",Ui),i.on("click keyup focus SetContent",ko.throttle),i.on(N5,di),i.on("contexttoolbar-show",function(Zr){var No=Yi();mr(No.lookupTable,Zr.toolbarKey).each(function(jr){Br([jr],Nt(Zr.target!==i,Zr.target)),Fu.getContent(Mt).each(Za.focusIn)})}),i.on("focusout",function(Zr){c_.setEditorTimeout(i,function(){dc(f.element).isNone()&&dc(Mt.element).isNone()&&di()},0)}),i.on("SwitchMode",function(){i.mode.isReadOnly()&&di()}),i.on("AfterProgressState",function(Zr){Zr.state?di():i.hasFocus()&&ko.throttle()}),i.on("NodeChange",function(Zr){dc(Mt.element).fold(ko.throttle,V)})})},mH={unsupportedLength:["em","ex","cap","ch","ic","rem","lh","rlh","vw","vh","vi","vb","vmin","vmax","cm","mm","Q","in","pc","pt","px"],fixed:["px","pt"],relative:["%"],empty:[""]},fH=function(){var i="[0-9]+",f="[eE]"+("[+-]?"+i),F=function(Ie){return"(?:"+Ie+")?"},$=["Infinity",i+"\\."+F(i)+F(f),"\\."+i+F(f),i+F(f)].join("|");return new RegExp("^("+("[+-]?(?:"+$+")")+")(.*)$")}(),gH=function(i,c){return j.from(fH.exec(i)).bind(function(x){var F=Number(x[1]),$=x[2];return function(i,c){return tt(c,function(f){return tt(mH[f],function(x){return i===x})})}($,c)?j.some({value:F,unit:$}):j.none()})},$5=function(i,c){var f=function(){var x=c.getOptions(i),F=c.getCurrent(i).map(c.hash),$=ku();return ft(x,function(se){return{type:"togglemenuitem",text:c.display(se),onSetup:function(Ie){var ze=function(Mt){Mt&&($.on(function(kt){return kt.setActive(!1)}),$.set(Ie)),Ie.setActive(Mt)};ze(Yt(F,c.hash(se)));var it=c.watcher(i,se,ze);return function(){$.clear(),it()}},onAction:function(){return c.setCurrent(i,se)}}})};i.ui.registry.addMenuButton(c.name,{tooltip:c.text,icon:c.icon,fetch:function(x){return x(f())},onSetup:c.onToolbarSetup}),i.ui.registry.addNestedMenuItem(c.name,{type:"nestedmenuitem",text:c.text,getSubmenuItems:f,onSetup:c.onMenuSetup})},vH={name:"lineheight",text:"Line height",icon:"line-height",getOptions:function(i){return i.getParam("lineheight_formats","1 1.1 1.2 1.3 1.4 1.5 2","string").split(" ")},hash:function(i){return function(i,c){return gH(i,c).map(function(f){return f.value+f.unit})}(i,["fixed","relative","empty"]).getOr(i)},display:ve,watcher:function(i,c,f){return i.formatter.formatChanged("lineheight",f,!1,{value:c}).unbind},getCurrent:function(i){return j.from(i.queryCommandValue("LineHeight"))},setCurrent:function(i,c){return i.execCommand("LineHeight",!1,c)}},bH=function(i){$5(i,vH),function(i){var c=j.from(function(i){return i.getParam("content_langs",void 0,"array")}(i));return c.map(function(f){return{name:"language",text:"Language",icon:"language",getOptions:X(f),hash:function(x){return T(x.customCode)?x.code:x.code+"/"+x.customCode},display:function(x){return x.title},watcher:function(x,F,$){return x.formatter.formatChanged("lang",$,!1,{value:F.code,customValue:F.customCode}).unbind},getCurrent:function(x){var F=Xn.fromDom(x.selection.getNode());return O(F,function($){return j.some($).filter(Gn).bind(function(se){return Qi(se,"lang").map(function(ze){return{code:ze,customCode:Qi(se,"data-mce-lang").getOrUndefined(),title:""}})})})},setCurrent:function(x,F){return x.execCommand("Lang",!1,F)},onToolbarSetup:function(x){var F=rm();return x.setActive(i.formatter.match("lang",{},void 0,!0)),F.set(i.formatter.formatChanged("lang",x.setActive,!0)),F.clear}}})}(i).each(function(c){return $5(i,c)})},CH=function(i,c){(function(i,c){var f=xI(0,c,b5(i));i.ui.registry.addNestedMenuItem("align",{text:c.shared.providers.translate("Align"),getSubmenuItems:function(){return f.items.validateItems(f.getStyleItems())}})})(i,c),function(i,c){var f=xI(0,c,E5(i));i.ui.registry.addNestedMenuItem("fontformats",{text:c.shared.providers.translate("Fonts"),getSubmenuItems:function(){return f.items.validateItems(f.getStyleItems())}})}(i,c),function(i,c){var f=re({type:"advanced"},c.styleselect),x=xI(0,c,D5(i,f));i.ui.registry.addNestedMenuItem("formats",{text:"Formats",getSubmenuItems:function(){return x.items.validateItems(x.getStyleItems())}})}(i,c),function(i,c){var f=xI(0,c,x5(i));i.ui.registry.addNestedMenuItem("blockformats",{text:"Blocks",getSubmenuItems:function(){return f.items.validateItems(f.getStyleItems())}})}(i,c),function(i,c){var f=xI(0,c,M5(i));i.ui.registry.addNestedMenuItem("fontsizes",{text:"Font sizes",getSubmenuItems:function(){return f.items.validateItems(f.getStyleItems())}})}(i,c)},EH=function(i){return e3(i,"NodeChange",function(c){c.setDisabled(!i.queryCommandState("outdent"))})},TH=function(i){!function(i){i.ui.registry.addButton("outdent",{tooltip:"Decrease indent",icon:"outdent",onSetup:EH(i),onAction:s1(i,"outdent")}),i.ui.registry.addButton("indent",{tooltip:"Increase indent",icon:"indent",onAction:s1(i,"indent")})}(i)},RU=function(i,c){return function(){i.execCommand("mceToggleFormat",!1,c)}},AH=function(i){(function(i){GT.each([{name:"bold",text:"Bold",icon:"bold"},{name:"italic",text:"Italic",icon:"italic"},{name:"underline",text:"Underline",icon:"underline"},{name:"strikethrough",text:"Strikethrough",icon:"strike-through"},{name:"subscript",text:"Subscript",icon:"subscript"},{name:"superscript",text:"Superscript",icon:"superscript"}],function(x,F){i.ui.registry.addToggleButton(x.name,{tooltip:x.text,icon:x.icon,onSetup:XR(i,x.name),onAction:RU(i,x.name)})});for(var c=1;c<=6;c++){var f="h"+c;i.ui.registry.addToggleButton(f,{text:f.toUpperCase(),tooltip:"Heading "+c,onSetup:XR(i,f),onAction:RU(i,f)})}})(i),function(i){GT.each([{name:"cut",text:"Cut",action:"Cut",icon:"cut"},{name:"copy",text:"Copy",action:"Copy",icon:"copy"},{name:"paste",text:"Paste",action:"Paste",icon:"paste"},{name:"help",text:"Help",action:"mceHelp",icon:"help"},{name:"selectall",text:"Select all",action:"SelectAll",icon:"select-all"},{name:"newdocument",text:"New document",action:"mceNewDocument",icon:"new-document"},{name:"removeformat",text:"Clear formatting",action:"RemoveFormat",icon:"remove-formatting"},{name:"remove",text:"Remove",action:"Delete",icon:"remove"}],function(c){i.ui.registry.addButton(c.name,{tooltip:c.text,icon:c.icon,onAction:s1(i,c.action)})})}(i),function(i){GT.each([{name:"blockquote",text:"Blockquote",action:"mceBlockQuote",icon:"quote"}],function(c){i.ui.registry.addToggleButton(c.name,{tooltip:c.text,icon:c.icon,onAction:s1(i,c.action),onSetup:XR(i,c.name)})})}(i)},IH=function(i){AH(i),function(i){GT.each([{name:"bold",text:"Bold",action:"Bold",icon:"bold",shortcut:"Meta+B"},{name:"italic",text:"Italic",action:"Italic",icon:"italic",shortcut:"Meta+I"},{name:"underline",text:"Underline",action:"Underline",icon:"underline",shortcut:"Meta+U"},{name:"strikethrough",text:"Strikethrough",action:"Strikethrough",icon:"strike-through",shortcut:""},{name:"subscript",text:"Subscript",action:"Subscript",icon:"subscript",shortcut:""},{name:"superscript",text:"Superscript",action:"Superscript",icon:"superscript",shortcut:""},{name:"removeformat",text:"Clear formatting",action:"RemoveFormat",icon:"remove-formatting",shortcut:""},{name:"newdocument",text:"New document",action:"mceNewDocument",icon:"new-document",shortcut:""},{name:"cut",text:"Cut",action:"Cut",icon:"cut",shortcut:"Meta+X"},{name:"copy",text:"Copy",action:"Copy",icon:"copy",shortcut:"Meta+C"},{name:"paste",text:"Paste",action:"Paste",icon:"paste",shortcut:"Meta+V"},{name:"selectall",text:"Select all",action:"SelectAll",icon:"select-all",shortcut:"Meta+A"}],function(c){i.ui.registry.addMenuItem(c.name,{text:c.text,icon:c.icon,shortcut:c.shortcut,onAction:s1(i,c.action)})}),i.ui.registry.addMenuItem("codeformat",{text:"Code",icon:"sourcecode",onAction:RU(i,"code")})}(i)},o3=function(i,c){return e3(i,"Undo Redo AddUndo TypingUndo ClearUndos SwitchMode",function(f){f.setDisabled(i.mode.isReadOnly()||!i.undoManager[c]())})},LH=function(i){(function(i){i.ui.registry.addMenuItem("undo",{text:"Undo",icon:"undo",shortcut:"Meta+Z",onSetup:o3(i,"hasUndo"),onAction:s1(i,"undo")}),i.ui.registry.addMenuItem("redo",{text:"Redo",icon:"redo",shortcut:"Meta+Y",onSetup:o3(i,"hasRedo"),onAction:s1(i,"redo")})})(i),function(i){i.ui.registry.addButton("undo",{tooltip:"Undo",icon:"undo",disabled:!0,onSetup:o3(i,"hasUndo"),onAction:s1(i,"undo")}),i.ui.registry.addButton("redo",{tooltip:"Redo",icon:"redo",disabled:!0,onSetup:o3(i,"hasRedo"),onAction:s1(i,"redo")})}(i)},kH=function(i){return e3(i,"VisualAid",function(c){c.setActive(i.hasVisual)})},NH=function(i){(function(i){i.ui.registry.addButton("visualaid",{tooltip:"Visual aids",text:"Visual aids",onAction:s1(i,"mceToggleVisualAid")})})(i),function(i){i.ui.registry.addToggleMenuItem("visualaid",{text:"Visual aids",onSetup:kH(i),onAction:s1(i,"mceToggleVisualAid")})}(i)},BH=function(i,c){(function(i){Ct([{name:"alignleft",text:"Align left",cmd:"JustifyLeft",icon:"align-left"},{name:"aligncenter",text:"Align center",cmd:"JustifyCenter",icon:"align-center"},{name:"alignright",text:"Align right",cmd:"JustifyRight",icon:"align-right"},{name:"alignjustify",text:"Justify",cmd:"JustifyFull",icon:"align-justify"}],function(f){i.ui.registry.addToggleButton(f.name,{tooltip:f.text,icon:f.icon,onAction:s1(i,f.cmd),onSetup:XR(i,f.name)})}),i.ui.registry.addButton("alignnone",{tooltip:"No alignment",icon:"align-none",onAction:s1(i,"JustifyNone")})})(i),IH(i),CH(i,c),LH(i),function(i){!function(i){i.addCommand("mceApplyTextcolor",function(c,f){!function(i,c,f){i.undoManager.transact(function(){i.focus(),i.formatter.apply(c,{value:f}),i.nodeChanged()})}(i,c,f)}),i.addCommand("mceRemoveTextcolor",function(c){!function(i,c){i.undoManager.transact(function(){i.focus(),i.formatter.remove(c,{value:null},null,!0),i.nodeChanged()})}(i,c)})}(i);var c=ta(KI),f=ta(KI);lS(i,"forecolor","forecolor","Text color",c),lS(i,"backcolor","hilitecolor","Background color",f),k2(i,"forecolor","forecolor","Text color"),k2(i,"backcolor","hilitecolor","Background color")}(i),NH(i),TH(i),bH(i)},kO=function(i,c){return{type:"makeshift",x:i,y:c}},j5=function(i){return"longpress"===i.type||0===i.type.indexOf("touch")},HH=function(i,c){var f=oS.DOM.getPos(i);return function(i,c,f){return kO(i.x+c,i.y+f)}(c,f.x,f.y)},VH=function(i,c){return"contextmenu"===c.type||"longpress"===c.type?i.inline?function(i){if(j5(i)){var c=i.touches[0];return kO(c.pageX,c.pageY)}return kO(i.pageX,i.pageY)}(c):HH(i.getContentAreaContainer(),function(i){if(j5(i)){var c=i.touches[0];return kO(c.clientX,c.clientY)}return kO(i.clientX,i.clientY)}(c)):K5(i)},K5=function(i){return{type:"selection",root:Xn.fromDom(i.selection.getNode())}},J5=function(i,c,f){switch(f){case"node":return function(i){return{type:"node",node:j.some(Xn.fromDom(i.selection.getNode())),root:Xn.fromDom(i.getBody())}}(i);case"point":return VH(i,c);case"selection":return K5(i)}},GH=function(i,c,f,x,F,$){var se=f(),Ie=J5(i,c,$);gS(se,Lm.CLOSE_ON_EXECUTE,x,!1).map(function(ze){c.preventDefault(),Fu.showMenuAt(F,{anchor:Ie},{menu:{markers:Re("normal")},data:ze})})},WH={onLtr:function(){return[Hu,Bp,tm,Hd,nm,Up,gy,mb,nE,DT,J0,Ug]},onRtl:function(){return[Hu,tm,Bp,nm,Hd,Up,gy,mb,J0,Ug,nE,DT]}},jH={valignCentre:[],alignCentre:[],alignLeft:["tox-pop--align-left"],alignRight:["tox-pop--align-right"],right:["tox-pop--right"],left:["tox-pop--left"],bottom:["tox-pop--bottom"],top:["tox-pop--top"]},qH=function(i,c,f,x,F,$,se){var Ie=function(i,c,f){var x=J5(i,c,f);return re({bubble:uv(0,"point"===f?12:0,jH),layouts:WH,overrides:{maxWidthFunction:Vg(),maxHeightFunction:eh()}},x)}(i,c,$);gS(f,Lm.CLOSE_ON_EXECUTE,x,!0).map(function(ze){c.preventDefault(),Fu.showMenuWithinBounds(F,{anchor:Ie},{menu:{markers:Re("normal"),highlightImmediately:se},data:ze,type:"horizontal"},function(){return j.some(Y5(i,x.shared,"node"===$?"node":"selection"))}),i.fire(N5)})},XH=function(i,c,f,x,F,$){var se=$r(),Ie=se.os.isiOS(),ze=se.os.isOSX(),it=se.os.isAndroid(),Mt=se.deviceType.isTouch(),pn=function(){var Un=f();qH(i,c,Un,x,F,$,!(it||Ie||ze&&Mt))};if((ze||Ie)&&"node"!==$){var bn=function(){(function(i){var c=i.selection.getRng(),f=function(){c_.setEditorTimeout(i,function(){i.selection.setRng(c)},10),$()};i.once("touchend",f);var x=function(se){se.preventDefault(),se.stopImmediatePropagation()};i.on("mousedown",x,!0);var F=function(){return $()};i.once("longpresscancel",F);var $=function(){i.off("touchend",f),i.off("longpresscancel",F),i.off("mousedown",x)}})(i),pn()};!function(i,c){var f=i.selection;if(f.isCollapsed()||c.touches.length<1)return!1;var x=c.touches[0],F=f.getRng();return P_(i.getWin(),Sg.domRange(F)).exists(function(se){return se.left<=x.clientX&&se.right>=x.clientX&&se.top<=x.clientY&&se.bottom>=x.clientY})}(i,c)?(i.once("selectionchange",bn),i.once("touchend",function(){return i.off("selectionchange",bn)})):bn()}else pn()},Q5=function(i){return"string"==typeof i?i.split(/[ ,]/):i},q5=function(i){return i.getParam("contextmenu_never_use_native",!1,"boolean")},nV=function(i){return function(i,c,f){var x=i.ui.registry.getAll().contextMenus;return j.from(i.getParam(c)).map(Q5).getOrThunk(function(){return st(Q5(f),function(F){return jn(x,F)})})}(i,"contextmenu","link linkchecker image imagetools table spellchecker configurepermanentpen")},X5=function(i){return e(i)?"|"===i:"separator"===i.type},FU={type:"separator"},ez=function(i){var c=function(f){return{text:f.text,icon:f.icon,disabled:f.disabled,shortcut:f.shortcut}};if(e(i))return i;switch(i.type){case"separator":return FU;case"submenu":return re(re({type:"nestedmenuitem"},c(i)),{getSubmenuItems:function(){var f=i.getSubmenuItems();return e(f)?f:ft(f,ez)}});default:return re(re({type:"menuitem"},c(i)),{onAction:ue(i.onAction)})}},tz=function(i,c){if(0===c.length)return i;var x=Ai(i).filter(function(F){return!X5(F)}).fold(function(){return[]},function(F){return[FU]});return i.concat(x).concat(c).concat([FU])},nz=function(i,c){return"longpress"!==c.type&&(2!==c.button||c.target===i.getBody()&&""===c.pointerType)},iz=function(i,c){return nz(i,c)?i.selection.getStart(!0):c.target},sV=function(i,c,f){var F=$r().deviceType.isTouch,$=Ga(Fu.sketch({dom:{tag:"div"},lazySink:c,onEscape:function(){return i.focus()},onShow:function(){return f.setContextMenuState(!0)},onHide:function(){return f.setContextMenuState(!1)},fireDismissalEventInstead:{},inlineBehaviours:ao([bs("dismissContextMenu",[yr(Mf(),function(ze,it){el.close(ze),i.focus()})])])})),se=function(ze){return Fu.hide($)},Ie=function(ze){if(q5(i)&&ze.preventDefault(),!function(i,c){return c.ctrlKey&&!q5(i)}(i,ze)&&!function(i){return!1===i.getParam("contextmenu")}(i)){var it=function(i,c){var f=function(i){return i.getParam("contextmenu_avoid_overlap","","string")}(i),x=nz(i,c)?"selection":"point";if(rr(f)){var F=iz(i,c);return sA(Xn.fromDom(F),f)?"node":x}return x}(i,ze);(F()?XH:GH)(i,ze,function(){var pn=iz(i,ze),bn=i.ui.registry.getAll(),Un=nV(i);return function(i,c,f){var x=Dn(c,function(F,$){return mr(i,$.toLowerCase()).map(function(se){var Ie=se.update(f);if(e(Ie))return tz(F,Ie.split(" "));if(Ie.length>0){var ze=ft(Ie,ez);return tz(F,ze)}return F}).getOrThunk(function(){return F.concat([$])})},[]);return x.length>0&&X5(x[x.length-1])&&x.pop(),x}(bn.contextMenus,Un,pn)},f,$,it)}};i.on("init",function(){var ze="ResizeEditor ScrollContent ScrollWindow longpresscancel"+(F()?"":" ResizeWindow");i.on(ze,se),i.on("longpress contextmenu",Ie)})},NU=fc_generate([{offset:["x","y"]},{absolute:["x","y"]},{fixed:["x","y"]}]),a3=function(i){return function(c){return c.translate(-i.left,-i.top)}},s3=function(i){return function(c){return c.translate(i.left,i.top)}},ED=function(i){return function(c,f){return Dn(i,function(x,F){return F(x)},Da(c,f))}},l3=function(i,c,f){return i.fold(ED([s3(f),a3(c)]),ED([a3(c)]),ED([]))},AI=function(i,c,f){return i.fold(ED([s3(f)]),ED([]),ED([s3(c)]))},rz=function(i,c,f){return i.fold(ED([]),ED([a3(f)]),ED([s3(c),a3(f)]))},oz=function(i,c,f){var x=i.fold(function(F,$){return{position:j.some("absolute"),left:j.some(F+"px"),top:j.some($+"px")}},function(F,$){return{position:j.some("absolute"),left:j.some(F-f.left+"px"),top:j.some($-f.top+"px")}},function(F,$){return{position:j.some("fixed"),left:j.some(F+"px"),top:j.some($+"px")}});return re({right:j.none(),bottom:j.none()},x)},BU=function(i,c,f,x){var F=function($,se){return function(Ie,ze){var it=$(c,f,x);return se(Ie.getOr(it.left),ze.getOr(it.top))}};return i.fold(F(rz,c3),F(AI,ES),F(l3,UA))},c3=NU.offset,ES=NU.absolute,UA=NU.fixed,az=function(i,c){var f=Xt(i,c);return T(f)?NaN:parseInt(f,10)},fV=function(i,c,f,x){return function(i,c){var f=i.element,x=az(f,c.leftAttr),F=az(f,c.topAttr);return isNaN(x)||isNaN(F)?j.none():j.some(Da(x,F))}(i,c).fold(function(){return f},function(F){return UA(F.left+x.left,F.top+x.top)})},hV=function(i,c,f,x,F,$){var se=fV(i,c,f,x),Ie=c.mustSnap?_V(i,c,se,F,$):vV(i,c,se,F,$),ze=l3(se,F,$);return function(i,c,f){var x=i.element;De(x,c.leftAttr,f.left+"px"),De(x,c.topAttr,f.top+"px")}(i,c,ze),Ie.fold(function(){return{coord:UA(ze.left,ze.top),extra:j.none()}},function(it){return{coord:it.output,extra:it.extra}})},gV=function(i,c){!function(i,c){var f=i.element;Fe(f,c.leftAttr),Fe(f,c.topAttr)}(i,c)},sz=function(i,c,f,x){return Vi(i,function(F){var $=F.sensor,se=function(i,c,f,x,F,$){var se=AI(i,F,$),Ie=AI(c,F,$);return Math.abs(se.left-Ie.left)<=f&&Math.abs(se.top-Ie.top)<=x}(c,$,F.range.left,F.range.top,f,x);return se?j.some({output:BU(F.output,c,f,x),extra:F.extra}):j.none()})},_V=function(i,c,f,x,F){var $=c.getSnapPoints(i);return sz($,f,x,F).orThunk(function(){var Ie=Dn($,function(ze,it){var Mt=it.sensor,kt=function(i,c,f,x,F,$){var se=AI(i,F,$),Ie=AI(c,F,$),ze=Math.abs(se.left-Ie.left),it=Math.abs(se.top-Ie.top);return Da(ze,it)}(f,Mt,it.range.left,it.range.top,x,F);return ze.deltas.fold(function(){return{deltas:j.some(kt),snap:j.some(it)}},function(pn){return(kt.left+kt.top)/2<=(pn.left+pn.top)/2?{deltas:j.some(kt),snap:j.some(it)}:ze})},{deltas:j.none(),snap:j.none()});return Ie.snap.map(function(ze){return{output:BU(ze.output,f,x,F),extra:ze.extra}})})},vV=function(i,c,f,x,F){var $=c.getSnapPoints(i);return sz($,f,x,F)},CV=Object.freeze({__proto__:null,snapTo:function(i,c,f,x){var F=c.getTarget(i.element);if(c.repositionTarget){var $=vr(i.element),se=Hc($),Ie=mI(F),ze=function(i,c,f){return{coord:BU(i.output,i.output,c,f),extra:i.extra}}(x,se,Ie),it=oz(ze.coord,0,Ie);Na(F,it)}}}),UU="data-initial-z-index",lz=function(i,c){i.getSystem().addToGui(c),function(i){La(i.element).filter(Gn).each(function(c){$o(c,"z-index").each(function(f){De(c,UU,f)}),Ki(c,"z-index",qi(i.element,"z-index"))})}(c)},TV=function(i){(function(i){La(i.element).filter(Gn).each(function(c){Qi(c,UU).fold(function(){return Ka(c,"z-index")},function(f){return Ki(c,"z-index",f)}),Fe(c,UU)})})(i),i.getSystem().removeFromGui(i)},cz=function(i,c,f){return i.getSystem().build(Yg.sketch({dom:{styles:{left:"0px",top:"0px",width:"100%",height:"100%",position:"fixed","z-index":"1000000000000000"},classes:[c]},events:f}))},xV=yl("snaps",[Mr("getSnapPoints"),kl("onSensor"),Mr("leftAttr"),Mr("topAttr"),Ti("lazyViewport",Zs),Ti("mustSnap",!1)]),zU=[Ti("useFixed",Pe),Mr("blockerClass"),Ti("getTarget",ve),Ti("onDrag",V),Ti("repositionTarget",!0),Ti("onDrop",V),Sl("getBounds",Zs),xV],DV=function(i){return function(i,c,f,x){return i.isSome()&&c.isSome()&&f.isSome()?j.some(x(i.getOrDie(),c.getOrDie(),f.getOrDie())):j.none()}($o(i,"left"),$o(i,"top"),$o(i,"position"),function(c,f,x){return("fixed"===x?UA:c3)(parseInt(c,10),parseInt(f,10))}).getOrThunk(function(){var c=ss(i);return ES(c.left,c.top)})},AV=function(i,c,f,x,F,$,se){var Ie=c.fold(function(){var ze=function(i,c,f){return i.fold(function(x,F){return c3(x+c,F+f)},function(x,F){return ES(x+c,F+f)},function(x,F){return UA(x+c,F+f)})}(f,$.left,$.top),it=l3(ze,x,F);return UA(it.left,it.top)},function(ze){var it=hV(i,ze,f,$,x,F);return it.extra.each(function(Mt){ze.onSensor(i,Mt)}),it.coord});return function(i,c,f,x,F){var $=F.bounds,se=AI(c,f,x),Ie=xp(se.left,$.x,$.x+$.width-F.width),ze=xp(se.top,$.y,$.y+$.height-F.height),it=ES(Ie,ze);return c.fold(function(){var Mt=rz(it,f,x);return c3(Mt.left,Mt.top)},X(it),function(){var Mt=l3(it,f,x);return UA(Mt.left,Mt.top)})}(0,Ie,x,F,se)},uz=function(i,c){return{bounds:i.getBounds(),height:Wl(c.element),width:Ol(c.element)}},YU=function(i,c,f,x,F){var $=f.update(x,F),se=f.getStartData().getOrThunk(function(){return uz(c,i)});$.each(function(Ie){!function(i,c,f,x){var F=c.getTarget(i.element);if(c.repositionTarget){var $=vr(i.element),se=Hc($),Ie=mI(F),ze=DV(F),it=AV(i,c.snaps,ze,se,Ie,x,f),Mt=oz(it,0,Ie);Na(F,Mt)}c.onDrag(i,F,x)}(i,c,se,Ie)})},dz=function(i,c,f,x){c.each(TV),f.snaps.each(function($){gV(i,$)});var F=f.getTarget(i.element);x.reset(),f.onDrop(i,F)},HU=function(i){return function(c,f){var x=function(F){f.setStartData(uz(c,F))};return uc(me([yr(Gp(),function(F){f.getStartData().each(function(){return x(F)})})],i(c,f,x),!0))}},LV=Object.freeze({__proto__:null,getData:function(i){return j.from(Da(i.x,i.y))},getDelta:function(i,c){return Da(c.left-i.left,c.top-i.top)}}),pz=function(i,c,f){return[yr(mu(),function(x,F){if(0===F.event.raw.button){F.stop();var se=function(){return dz(x,j.some(it),i,c)},Ie=W2(se,200),ze={drop:se,delayDrop:Ie.schedule,forceDrop:se,move:function(kt){Ie.cancel(),YU(x,i,c,LV,kt)}},it=cz(x,i.blockerClass,function(i){return uc([yr(mu(),i.forceDrop),yr(cd(),i.drop),yr(us(),function(c,f){i.move(f.event)}),yr(Gg(),i.delayDrop)])}(ze));f(x),lz(x,it)}})]},kV=me(me([],zU,!0),[$s("dragger",{handlers:HU(pz)})],!1),mz=Object.freeze({__proto__:null,getData:function(i){var f=i.raw.touches;return 1===f.length?function(i){var c=i[0];return j.some(Da(c.clientX,c.clientY))}(f):j.none()},getDelta:function(i,c){return Da(c.left-i.left,c.top-i.top)}}),fz=function(i,c,f){var x=ku(),F=function($){dz($,x.get(),i,c),x.clear()};return[yr(tu(),function($,se){se.stop();var Ie=function(){return F($)},ze={drop:Ie,delayDrop:V,forceDrop:Ie,move:function(kt){YU($,i,c,mz,kt)}},it=cz($,i.blockerClass,function(i){return uc([yr(tu(),i.forceDrop),yr(Um(),i.drop),yr(ic(),i.drop),yr(Sc(),function(c,f){i.move(f.event)})])}(ze));x.set(it);f($),lz($,it)}),yr(Sc(),function($,se){se.stop(),YU($,i,c,mz,se.event)}),yr(Um(),function($,se){se.stop(),F($)}),yr(ic(),F)]},UV=me(me([],zU,!0),[$s("dragger",{handlers:HU(fz)})],!1),YV=me(me([],zU,!0),[$s("dragger",{handlers:HU(function(i,c,f){return me(me([],pz(i,c,f),!0),fz(i,c,f),!0)})})],!1),HV=kV,VV=UV,ZV=YV,GV=Object.freeze({__proto__:null,mouse:HV,touch:VV,mouseOrTouch:ZV}),$V=Object.freeze({__proto__:null,init:function(){var i=j.none(),c=j.none(),Ie=X({});return zu({readState:Ie,reset:function(){i=j.none(),c=j.none()},update:function(ze,it){return ze.getData(it).bind(function(Mt){return function(ze,it){var Mt=i.map(function(kt){return ze.getDelta(kt,it)});return i=j.some(it),Mt}(ze,Mt)})},getStartData:function(){return c},setStartData:function(ze){c=j.some(ze)}})}}),zA=Ah({branchKey:"mode",branches:GV,name:"dragging",active:{events:function(i,c){return i.dragger.handlers(i,c)}},extra:{snap:function(i){return{sensor:i.sensor,range:i.range,output:i.output,extra:j.from(i.extra)}}},state:$V,apis:CV}),hz=function(i,c,f,x,F,$){return i.fold(function(){return zA.snap({sensor:ES(f-20,x-20),range:Da(F,$),output:ES(j.some(f),j.some(x)),extra:{td:c}})},function(se){var Ie=f-20,ze=x-20,kt=se.element.dom.getBoundingClientRect();return zA.snap({sensor:ES(Ie,ze),range:Da(40,40),output:ES(j.some(f-kt.width/2),j.some(x-kt.height/2)),extra:{td:c}})})},gz=function(i,c,f){return{getSnapPoints:i,leftAttr:"data-drag-left",topAttr:"data-drag-top",onSensor:function(F,$){var se=$.td;(function(F,$){return F.exists(function(se){return tn(se,$)})})(c.get(),se)||(c.set(se),f(se))},mustSnap:!0}},_z=function(i){return wl(Nf.sketch({dom:{tag:"div",classes:["tox-selector"]},buttonBehaviours:ao([zA.config({mode:"mouseOrTouch",blockerClass:"blocker",snaps:i}),fA.config({})]),eventOrder:{mousedown:["dragging","alloy.base.behaviour"],touchstart:["dragging","alloy.base.behaviour"]}}))},jV=function(i,c){var f=ta([]),x=ta([]),F=ta(!1),$=ku(),se=ku(),Ie=function(Br){var ko=ga(Br);return hz(bn.getOpt(c),Br,ko.x,ko.y,ko.width,ko.height)},it=function(Br){var ko=ga(Br);return hz(Un.getOpt(c),Br,ko.right,ko.bottom,ko.width,ko.height)},kt=gz(function(){return ft(f.get(),function(Br){return Ie(Br)})},$,function(Br){se.get().each(function(ko){i.fire("TableSelectorChange",{start:Br,finish:ko})})}),pn=gz(function(){return ft(x.get(),function(Br){return it(Br)})},se,function(Br){$.get().each(function(ko){i.fire("TableSelectorChange",{start:ko,finish:Br})})}),bn=_z(kt),Un=_z(pn),di=Ga(bn.asSpec()),Ui=Ga(Un.asSpec()),Yi=function(Br,ko,Zr,No){var jr=Zr(ko);zA.snapTo(Br,jr);!function(Br,ko,Zr,No){var jr=ko.dom.getBoundingClientRect();Ka(Br.element,"display");var Nr=Ta(Xn.fromDom(i.getBody())).dom.innerHeight,bo=Zr(jr),fa=No(jr,Nr);(bo||fa)&&Ki(Br.element,"display","none")}(Br,ko,function(fa){return fa[No]<0},function(fa,Vr){return fa[No]>Vr})},Or=function(Br){return Yi(di,Br,Ie,"top")},zi=function(Br){return Yi(Ui,Br,it,"bottom")};$r().deviceType.isTouch()&&(i.on("TableSelectionChange",function(Br){F.get()||(Co(c,di),Co(c,Ui),F.set(!0)),$.set(Br.start),se.set(Br.finish),Br.otherCells.each(function(ko){f.set(ko.upOrLeftCells),x.set(ko.downOrRightCells),Or(Br.start),zi(Br.finish)})}),i.on("ResizeEditor ResizeWindow ScrollContent",function(){$.get().each(Or),se.get().each(zi)}),i.on("TableSelectionClear",function(){F.get()&&(xs(di),xs(Ui),F.set(!1)),$.clear(),se.clear()}))},KV=function(i){return!(1!==i.nodeType||"BR"!==i.nodeName&&!i.getAttribute("data-mce-bogus")&&"bookmark"!==i.getAttribute("data-mce-type"))},JV=function(i,c,f){c.delimiter||(c.delimiter="\xbb");return{dom:{tag:"div",classes:["tox-statusbar__path"],attributes:{role:"navigation"}},behaviours:ao([Za.config({mode:"flow",selector:"div[role=button]"}),Aa.config({disabled:f.isDisabled}),bf(),bm.config({}),ys.config({}),bs("elementPathEvents",[Va(function($,se){i.shortcuts.add("alt+F11","focus statusbar elementpath",function(){return Za.focusIn($)}),i.on("NodeChange",function(Ie){var ze=function($){for(var se=[],Ie=$.length;Ie-- >0;){var ze=$[Ie];if(1===ze.nodeType&&!KV(ze)){var it=i.fire("ResolveName",{name:ze.nodeName.toLowerCase(),target:ze});if(it.isDefaultPrevented()||se.push({name:it.name,element:ze}),it.isPropagationStopped())break}}return se}(Ie.parents);ze.length>0?ys.set($,function($){var Ie=ft($||[],function(it,Mt){return Nf.sketch({dom:{tag:"div",classes:["tox-statusbar__path-item"],attributes:{role:"button","data-index":Mt,"tab-index":-1,"aria-level":Mt+1},innerHtml:it.name},action:function(kt){i.focus(),i.selection.select(it.element),i.nodeChanged()},buttonBehaviours:ao([lC_button(f.isDisabled),bf()])})}),ze={dom:{tag:"div",classes:["tox-statusbar__path-divider"],attributes:{"aria-hidden":!0},innerHtml:" "+c.delimiter+" "}};return Dn(Ie.slice(1),function(it,Mt){var kt=it;return kt.push(ze),kt.push(Mt),kt},[Ie[0]])}(ze)):ys.set($,[])})})])]),components:[]}};!function(i){i[i.None=0]="None",i[i.Both=1]="Both",i[i.Vertical=2]="Vertical"}(YA||(YA={}));var vz=function(i,c,f){var x=Xn.fromDom(i.getContainer()),F=function(i,c,f,x,F){var $={};return $.height=i3(x+c.top,UO(i),zO(i)),f===YA.Both&&($.width=i3(F+c.left,RI(i),sw(i))),$}(i,c,f,hl(x),ks(x));An(F,function($,se){return Ki(x,se,wU($))}),function(i){i.fire("ResizeEditor")}(i)},d3=function(i,c,f,x){var $=Da(20*f,20*x);return vz(i,$,c),j.some(!0)},XV=function(i,c){var f=function(i){var c=!i.hasPlugin("autoresize"),f=i.getParam("resize",c);return!1===f?YA.None:"both"===f?YA.Both:YA.Vertical}(i);return f===YA.None?j.none():j.some(fb("resize-handle",{tag:"div",classes:["tox-statusbar__resize-handle"],attributes:{title:c.translate("Resize")},behaviours:[zA.config({mode:"mouse",repositionTarget:!1,onDrag:function(x,F,$){return vz(i,$,f)},blockerClass:"tox-blocker"}),Za.config({mode:"special",onLeft:function(){return d3(i,f,-1,0)},onRight:function(){return d3(i,f,1,0)},onUp:function(){return d3(i,f,0,-1)},onDown:function(){return d3(i,f,0,1)}}),bm.config({}),ka.config({})]},c.icons))},tZ=function(i,c){var $,se,x=function(){var $=[];return i.getParam("elementpath",!0,"boolean")&&$.push(JV(i,{},c)),i.hasPlugin("wordcount")&&$.push(function(i,c){var f,x=function(F,$,se){return ys.set(F,[fd(c.translate(["{0} "+se,$[se]]))])};return Nf.sketch({dom:{tag:"button",classes:["tox-statusbar__wordcount"]},components:[],buttonBehaviours:ao([lC_button(c.isDisabled),bf(),bm.config({}),ys.config({}),Io.config({store:{mode:"memory",initialValue:{mode:"words",count:{words:0,characters:0}}}}),bs("wordcount-events",[Wp(function(F){var $=Io.getValue(F),se="words"===$.mode?"characters":"words";Io.setValue(F,{mode:se,count:$.count}),x(F,$.count,se)}),Va(function(F){i.on("wordCountUpdate",function($){var se=Io.getValue(F).mode;Io.setValue(F,{mode:se,count:$.wordCount}),x(F,$.wordCount,se)})})])]),eventOrder:(f={},f[dd()]=["disabling","alloy.base.behaviour","wordcount-events"],f)})}(i,c)),i.getParam("branding",!0,"boolean")&&$.push(function(){var $=Bf.translate(["Powered by {0}","Tiny"]);return{dom:{tag:"span",classes:["tox-statusbar__branding"],innerHtml:'<a href="https://www.tiny.cloud/?utm_campaign=editor_referral&amp;utm_medium=poweredby&amp;utm_source=tinymce&amp;utm_content=v5" rel="noopener" target="_blank" tabindex="-1" aria-label="'+$+'">'+$+"</a>"}}}()),$.length>0?[{dom:{tag:"div",classes:["tox-statusbar__text-container"]},components:$}]:[]};return{dom:{tag:"div",classes:["tox-statusbar"]},components:($=x(),se=XV(i,c),$.concat(se.toArray()))}},nZ=function(i){var c,Gf,LM,ex,f=i.inline,x=f?zY:LY,F=uw(i)?bI:K4,$=j.none(),se=$r(),ze=se.browser.isIE()?["tox-platform-ie"]:[],kt=se.deviceType.isTouch()?["tox-platform-touch"]:[],pn=WO(i),bn=KO(i),Un=Bf.isRtl()?{attributes:{dir:"rtl"}}:{},di={attributes:(c={},c[Ob]=pn?mf.BottomToTop:mf.TopToBottom,c)},Ui=function(){return $.bind(Nm.getHeader)},Yi=function(){Ki(__.element,"width",document.body.clientWidth+"px")},Pr=Ga((Gf=tn(Ra(),bn)&&"grid"===qi(bn,"display"),LM={dom:re({tag:"div",classes:["tox","tox-silver-sink","tox-tinymce-aux"].concat(ze).concat(kt)},Un),behaviours:ao([zn.config({useFixed:function(){return F.isDocked(Ui)}})])},ex={dom:{styles:{width:document.body.clientWidth+"px"}},events:uc([yr(td(),Yi)])},nr(LM,Gf?ex:{}))),zi=function(){return ra.value(Pr)},hr=wl({dom:{tag:"div",classes:["tox-anchorbar"]}}),Zr=function(){return $.bind(function(Gf){return Nm.getThrobber(Gf)}).getOrDie("Could not find throbber element")},No=dI(Pr,i,function(){return $.bind(function(Gf){return hr.getOpt(Gf)}).getOrDie("Could not find a anchor bar element")}),jr=Nm.parts.menubar({dom:{tag:"div",classes:["tox-menubar"]},backstage:No,onEscape:function(){i.focus()}}),Nr=eA(i),bo=Nm.parts.toolbar(re({dom:{tag:"div",classes:["tox-toolbar"]},getSink:zi,providers:No.shared.providers,onEscape:function(){i.focus()},type:Nr,lazyToolbar:function(){return $.bind(function(Gf){return Nm.getToolbar(Gf)}).getOrDie("Could not find more toolbar element")},lazyHeader:function(){return Ui().getOrDie("Could not find header element")}},di)),fa=Nm.parts["multiple-toolbar"]({dom:{tag:"div",classes:["tox-toolbar-overlord"]},providers:No.shared.providers,onEscape:function(){i.focus()},type:Nr}),Vr=Nm.parts.socket({dom:{tag:"div",classes:["tox-edit-area"]}}),sa=Nm.parts.sidebar({dom:{tag:"div",classes:["tox-sidebar"]}}),Pa=Nm.parts.throbber({dom:{tag:"div",classes:["tox-throbber"]},backstage:No}),Uc=i.getParam("statusbar",!0,"boolean")&&!f?j.some(tZ(i,No.shared.providers)):j.none(),yd={dom:{tag:"div",classes:["tox-sidebar-wrap"]},components:[Vr,sa]},Lp=lw(i),Ey=NI(i),Zg=FI(i),Zf=Nm.parts.header({dom:re({tag:"div",classes:["tox-editor-header"]},di),components:mi([Zg?[jr]:[],Lp?[fa]:Ey?[bo]:[],cw(i)?[]:[hr.asSpec()]]),sticky:uw(i),editor:i,sharedBackstage:No.shared}),MD=mi([pn?[]:[Zf],f?[]:[yd],pn?[Zf]:[]]),ZA=mi([[{dom:{tag:"div",classes:["tox-editor-container"]},components:MD}],f?[]:Uc.toArray(),[Pa]]),xD=JO(i),GA=re(re({role:"application"},Bf.isRtl()?{dir:"rtl"}:{}),xD?{"aria-hidden":"true"}:{}),j_=Ga(Nm.sketch({dom:{tag:"div",classes:["tox","tox-tinymce"].concat(f?["tox-tinymce-inline"]:[]).concat(pn?["tox-tinymce--toolbar-bottom"]:[]).concat(kt).concat(ze),styles:re({visibility:"hidden"},xD?{opacity:"0",border:"0"}:{}),attributes:GA},components:ZA,behaviours:ao([bf(),Aa.config({disableClass:"tox-tinymce--disabled"}),Za.config({mode:"cyclic",selector:".tox-menubar, .tox-toolbar, .tox-toolbar__primary, .tox-toolbar__overflow--open, .tox-sidebar__overflow--open, .tox-statusbar__path, .tox-statusbar__wordcount, .tox-statusbar__branding a, .tox-statusbar__resize-handle"})])}));$=j.some(j_),i.shortcuts.add("alt+F9","focus menubar",function(){Nm.focusMenubar(j_)}),i.shortcuts.add("alt+F10","focus toolbar",function(){Nm.focusToolbar(j_)}),i.addCommand("ToggleToolbarDrawer",function(){Nm.toggleToolbarDrawer(j_)}),i.addQueryStateHandler("ToggleToolbarDrawer",function(){return Nm.isToolbarDrawerToggled(j_)});var l1=X2(j_),__=X2(Pr);!function(i,c,f){var x=function(Pr,zi){Ct([c,f],function(hr){hr.broadcastEvent(Pr,zi)})},F=function(Pr,zi){Ct([c,f],function(hr){hr.broadcastOn([Pr],zi)})},$=function(Pr){return F(ag(),{target:Pr.target})},se=$m(),Ie=Nc(se,"touchstart",$),ze=Nc(se,"touchmove",function(Pr){return x(ed(),Pr)}),it=Nc(se,"touchend",function(Pr){return x(dp(),Pr)}),Mt=Nc(se,"mousedown",$),kt=Nc(se,"mouseup",function(Pr){0===Pr.raw.button&&F(Wy(),{target:Pr.target})}),pn=function(Pr){return F(ag(),{target:Xn.fromDom(Pr.target)})},bn=function(Pr){0===Pr.button&&F(Wy(),{target:Xn.fromDom(Pr.target)})},Un=function(){Ct(i.editorManager.get(),function(Pr){i!==Pr&&Pr.fire("DismissPopups",{relatedTarget:i})})},di=function(Pr){return x(Gp(),_0(Pr))},Ui=function(Pr){F(Og(),{}),x(td(),_0(Pr))},ri=function(){return F(Og(),{})},Yi=function(Pr){Pr.state&&F(ag(),{target:Xn.fromDom(i.getContainer())})},Or=function(Pr){F(ag(),{target:Xn.fromDom(Pr.relatedTarget.getContainer())})};i.on("PostRender",function(){i.on("click",pn),i.on("tap",pn),i.on("mouseup",bn),i.on("mousedown",Un),i.on("ScrollWindow",di),i.on("ResizeWindow",Ui),i.on("ResizeEditor",ri),i.on("AfterProgressState",Yi),i.on("DismissPopups",Or)}),i.on("remove",function(){i.off("click",pn),i.off("tap",pn),i.off("mouseup",bn),i.off("mousedown",Un),i.off("ScrollWindow",di),i.off("ResizeWindow",Ui),i.off("ResizeEditor",ri),i.off("AfterProgressState",Yi),i.off("DismissPopups",Or),Mt.unbind(),Ie.unbind(),ze.unbind(),it.unbind(),kt.unbind()}),i.on("detach",function(){ou(c),ou(f),c.destroy(),f.destroy()})}(i,l1,__);var XT=function(){var Gf=wU(RY(i)),LM=wU(function(i){return R5(i).getOr(aw(i))}(i));return i.inline||(Us("div","width",LM)&&Ki(j_.element,"width",LM),Us("div","height",Gf)?Ki(j_.element,"height",Gf):Ki(j_.element,"height","200px")),Gf};return{mothership:l1,uiMothership:__,backstage:No,renderUI:function(){F.setup(i,No.shared,Ui),BH(i,No),sV(i,zi,No),function(i){var c=i.ui.registry.getAll().sidebars;Ct(Vn(c),function(f){var x=c[f],F=function(){return Yt(j.from(i.queryCommandValue("ToggleSidebar")),f)};i.ui.registry.addToggleButton(f,{icon:x.icon,tooltip:x.tooltip,onAction:function($){i.execCommand("ToggleSidebar",!1,f),$.setActive(F())},onSetup:function($){var se=function(){return $.setActive(F())};return i.on("ToggleSidebar",se),function(){i.off("ToggleSidebar",se)}}})})}(i),Op(i,Zr,No.shared),vn(function(i){return i.getParam("toolbar_groups",{},"object")}(i),function(v_,My){i.ui.registry.addGroupToolbarButton(My,v_)});var Gf=i.ui.registry.getAll(),LM=Gf.buttons,ex=Gf.menuItems,DD=Gf.contextToolbars,c1=Gf.sidebars,tx=ZO(i),Jo={menuItems:ex,menus:w3(i),menubar:I3(i),toolbar:tx.getOrThunk(function(){return function(i){return i.getParam("toolbar",!0)}(i)}),allowToolbarGroups:Nr===_b.floating,buttons:LM,sidebar:c1};dH(i,DD,Pr,{backstage:No}),jV(i,Pr);var il=i.getElement(),jc=XT(),ap={mothership:l1,uiMothership:__,outerContainer:j_},K_={targetNode:il,height:jc};return x.render(i,ap,Jo,No,K_)},getUi:function(){return{channels:{broadcastAll:__.broadcast,broadcastOn:__.broadcastOn,register:V}}}}},oZ=X([Mr("lazySink"),Es("dragBlockClass"),Sl("getBounds",Zs),Ti("useTabstopAt",xe),Ti("eventOrder",{}),Zu("modalBehaviours",[Za]),Gc("onExecute"),Ad("onEscape")]),ZU={sketch:ve},aZ=X([Rg({name:"draghandle",overrides:function(i,c){return{behaviours:ao([zA.config({mode:"mouse",getTarget:function(f){return cf(f,'[role="dialog"]').getOr(f)},blockerClass:i.dragBlockClass.getOrDie(new Error("The drag blocker class was not specified for a dialog with a drag handle: \n"+JSON.stringify(c,null,2)).message),getBounds:i.getDragBounds})])}}}),tp({schema:[Mr("dom")],name:"title"}),tp({factory:ZU,schema:[Mr("dom")],name:"close"}),tp({factory:ZU,schema:[Mr("dom")],name:"body"}),Rg({factory:ZU,schema:[Mr("dom")],name:"footer"}),kg({factory:{sketch:function(i,c){return re(re({},i),{dom:c.dom,components:c.components})}},schema:[Ti("dom",{tag:"div",styles:{position:"fixed",left:"0px",top:"0px",right:"0px",bottom:"0px"}}),Ti("components",[])],name:"blocker"})]),hh=qm({name:"ModalDialog",configFields:oZ(),partFields:aZ(),factory:function(i,c,f,x){var F,$=ku(),pn=jo("modal-events"),bn=re(re({},i.eventOrder),((F={})[lm()]=[pn].concat(i.eventOrder["alloy.system.attached"]||[]),F));return{uid:i.uid,dom:i.dom,components:c,apis:{show:function(Un){$.set(Un);var di=i.lazySink(Un).getOrDie(),Ui=x.blocker(),ri=di.getSystem().build(re(re({},Ui),{components:Ui.components.concat([hd(Un)]),behaviours:ao([ka.config({}),bs("dialog-blocker-events",[nu(xm(),function(){Za.focusIn(Un)})])])}));Co(di,ri),Za.focusIn(Un)},hide:function(Un){$.clear(),La(Un.element).each(function(di){Un.getSystem().getByDom(di).each(function(Ui){xs(Ui)})})},getBody:function(Un){return sh(Un,i,"body")},getFooter:function(Un){return sh(Un,i,"footer")},setIdle:function(Un){po.unblock(Un)},setBusy:function(Un,di){po.block(Un,di)}},eventOrder:bn,domModification:{attributes:{role:"dialog","aria-modal":"true"}},behaviours:Od(i.modalBehaviours,[ys.config({}),Za.config({mode:"cyclic",onEnter:i.onExecute,onEscape:i.onEscape,useTabstopAt:i.useTabstopAt}),po.config({getRoot:$.get}),bs(pn,[Va(function(Un){(function(i,c){var f=Qi(i,"id").fold(function(){var x=jo("dialog-label");return De(c,"id",x),x},ve);De(i,"aria-labelledby",f)})(Un.element,sh(Un,i,"title").element),function(i,c){var f=j.from(Xt(i,"id")).fold(function(){var x=jo("dialog-describe");return De(c,"id",x),x},ve);De(i,"aria-describedby",f)}(Un.element,sh(Un,i,"body").element)})])])}},apis:{show:function(i,c){i.show(c)},hide:function(i,c){i.hide(c)},getBody:function(i,c){return i.getBody(c)},getFooter:function(i,c){return i.getFooter(c)},setBusy:function(i,c,f){i.setBusy(c,f)},setIdle:function(i,c){i.setIdle(c)}}}),lZ=Go([qo("type"),qo("name")].concat(Ko)),cZ=Ll,yz=[Dl("name","name",Ca(function(){return jo("button-name")}),ws),Fs("icon"),Vl("align","end",["start","end"]),bl("primary",!1),bl("disabled",!1)],bz=me(me([],yz,!0),[qo("text")],!1),GU=me([ll("type",["submit","cancel","custom"])],bz,!0),uZ=me([ll("type",["menu"]),Fs("text"),Fs("tooltip"),Fs("icon"),uu("items",lZ)],yz,!0),dZ=ms("type",{submit:GU,cancel:GU,custom:GU,menu:uZ}),pZ=[qo("type"),qo("text"),ll("level",["info","warn","error","success"]),qo("icon"),Ti("url","")],mZ=Go(pZ),fZ=function(i){return[qo("type"),i]},hZ=[qo("type"),qo("text"),bl("disabled",!1),bl("primary",!1),Dl("name","name",Ca(function(){return jo("button-name")}),ws),Fs("icon"),bl("borderless",!1)],gZ=Go(hZ),_Z=[qo("type"),qo("name"),qo("label"),bl("disabled",!1)],vZ=Go(_Z),yZ=Ll,WU=[qo("type"),qo("name")],hE=WU.concat([Fs("label")]),bZ=hE.concat([Ti("columns","auto")]),CZ=Go(bZ),EZ=Xc([qo("value"),qo("text"),qo("icon")]),TZ=Go(hE),xZ=ws,SZ=Go(hE),AZ=ws,wZ=WU.concat([Wd("tag","textarea"),qo("scriptId"),qo("scriptUrl"),function(i,c){return du(i,c,Uu)}("settings",void 0)]),IZ=WU.concat([Wd("tag","textarea"),Hl("init")]),PZ=xt(function(i){return li("customeditor.old",Rc(IZ),i).orThunk(function(){return li("customeditor.new",Rc(wZ),i)})}),OZ=ws,kZ=Go(hE),RZ=Md(wu),FZ=function(i){return[qo("type"),ld("columns"),i]},NZ=[qo("type"),qo("html"),Vl("presets","presentation",["presentation","document"])],BZ=Go(NZ),UZ=hE.concat([bl("sandboxed",!0)]),zZ=Go(UZ),YZ=ws,HZ=hE.concat([sl("currentState",Go([Mr("blob"),qo("url")]))]),VZ=Go(HZ),ZZ=hE.concat([Fs("inputMode"),Fs("placeholder"),bl("maximized",!1),bl("disabled",!1)]),GZ=Go(ZZ),WZ=ws,$Z=function(i){return[qo("type"),qo("label"),i]},jZ=[qo("text"),qo("value")],KZ=[qo("text"),uu("items",function(i,c){return function(i,c){var f=en(c);return{extract:function($,se){return f().extract($,se)},toString:function(){return f().toString()}}}(0,c)}(0,function(){return Cz}))],Cz=Mm([Go(jZ),Go(KZ)]),JZ=hE.concat([uu("items",Cz),bl("disabled",!1)]),QZ=Go(JZ),qZ=ws,XZ=hE.concat([Zc("items",[qo("text"),qo("value")]),Kc("size",1),bl("disabled",!1)]),e7=Go(XZ),t7=ws,n7=hE.concat([bl("constrain",!0),bl("disabled",!1)]),i7=Go(n7),Ez=Go([qo("width"),qo("height")]),r7=[qo("type"),uu("header",ws),uu("cells",Md(ws))],o7=Go(r7),a7=hE.concat([Fs("placeholder"),bl("maximized",!1),bl("disabled",!1)]),s7=Go(a7),l7=ws,c7=hE.concat([Vl("filetype","file",["image","media","file"]),Ti("disabled",!1)]),u7=Go(c7),d7=Go([qo("value"),Ti("meta",{})]),$U=function(i){return Dl("items","items",{tag:"required",process:{}},Md(xt(function(c){return li("Checking item of "+i,jU,c).fold(function(f){return ra.error(fo(f))},function(f){return ra.value(f)})})))},jU=Wf(function(){return Ae("type",{alertbanner:mZ,bar:Go(fZ($U("bar"))),button:gZ,checkbox:vZ,colorinput:TZ,colorpicker:SZ,dropzone:kZ,grid:Go(FZ($U("grid"))),iframe:zZ,input:GZ,listbox:QZ,selectbox:e7,sizeinput:i7,textarea:s7,urlinput:u7,customeditor:PZ,htmlpanel:BZ,imagetools:VZ,collection:CZ,label:Go($Z($U("label"))),table:o7,panel:Mz})}),p7=[qo("type"),Ti("classes",[]),uu("items",jU)],Mz=Go(p7),m7=[Dl("name","name",Ca(function(){return jo("tab-name")}),ws),qo("title"),uu("items",jU)],f7=[qo("type"),Zc("tabs",m7)],h7=Go(f7),g7=bz,_7=dZ,v7=Go([qo("title"),sl("body",Ae("type",{panel:Mz,tabpanel:h7})),Wd("size","normal"),uu("buttons",_7),Ti("initialData",{}),Sl("onAction",V),Sl("onChange",V),Sl("onSubmit",V),Sl("onClose",V),Sl("onCancel",V),Ti("onTabChange",V)]),b7=Go(me([ll("type",["cancel","custom"])],g7,!0)),C7=Go([qo("title"),qo("url"),Yp("height"),Yp("width"),Pu("buttons",b7),Sl("onAction",V),Sl("onCancel",V),Sl("onClose",V),Sl("onMessage",V)]),KU=function(i){return l(i)?[i].concat(wi(Eo(i),KU)):D(i)?wi(i,KU):[]},M7=function(i){return e(i.type)&&e(i.name)},T7={checkbox:yZ,colorinput:xZ,colorpicker:AZ,dropzone:RZ,input:WZ,iframe:YZ,sizeinput:Ez,selectbox:t7,listbox:qZ,size:Ez,textarea:l7,urlinput:d7,customeditor:OZ,collection:EZ,togglemenuitem:cZ},S7=function(i){var c=function(i){return st(KU(i),M7)}(i),f=wi(c,function(x){return function(i){return j.from(T7[i.type])}(x).fold(function(){return[]},function(F){return[sl(x.name,F)]})});return Go(f)},Tz=function(i){var c=dr(function(i){return li("dialog",v7,i)}(i));return{internalDialog:c,dataValidator:S7(i),initialData:i.initialData}},RO={open:function(i,c){var f=Tz(c);return i(f.internalDialog,f.initialData,f.dataValidator)},openUrl:function(i,c){var f=dr(function(i){return li("dialog",C7,i)}(c));return i(f)},redial:function(i){return Tz(i)}},xz=function(i){var c=[],f={};return An(i,function(x,F){x.fold(function(){c.push(F)},function($){f[F]=$})}),c.length>0?ra.error(c):ra.value(f)},A7=function(i,c){var f=wl(mS.sketch(function(x){return{dom:{tag:"div",classes:["tox-form"].concat(i.classes)},components:ft(i.items,function(F){return aI(x,F,c)})}}));return{dom:{tag:"div",classes:["tox-dialog__body"]},components:[{dom:{tag:"div",classes:["tox-dialog__body-content"]},components:[f.asSpec()]}],behaviours:ao([Za.config({mode:"acyclic",useTabstopAt:ne(SA)}),n1_memento(f),SM_memento(f,{postprocess:function(x){return xz(x).fold(function(F){return console.error(F),{}},ve)}})])}},I7=ch({name:"TabButton",configFields:[Ti("uid",void 0),Mr("value"),Dl("dom","dom",ul(function(){return{attributes:{role:"tab",id:jo("aria"),"aria-selected":"false"}}}),yc()),Es("action"),Ti("domModification",{}),Zu("tabButtonBehaviours",[ka,Za,Io]),Mr("view")],factory:function(i,c){return{uid:i.uid,dom:i.dom,components:i.components,events:oM(i.action),behaviours:Od(i.tabButtonBehaviours,[ka.config({}),Za.config({mode:"execution",useSpace:!0,useEnter:!0}),Io.config({store:{mode:"memory",initialValue:i.value}})]),domModification:i.domModification}}}),P7=X([Mr("tabs"),Mr("dom"),Ti("clickToDismiss",!1),Zu("tabbarBehaviours",[Jl,Za]),Pm(["tabClass","selectedClass"])]),O7=w1({factory:I7,name:"tabs",unit:"tab",overrides:function(i){var c=function(x,F){Jl.dehighlight(x,F),Sa(x,Jd(),{tabbar:x,button:F})},f=function(x,F){Jl.highlight(x,F),Sa(x,_h(),{tabbar:x,button:F})};return{action:function(x){var F=x.getSystem().getByUid(i.uid).getOrDie(),$=Jl.isHighlighted(F,x);($&&i.clickToDismiss?c:$?V:f)(F,x)},domModification:{classes:[i.markers.tabClass]}}}}),L7=X([O7]),Dz=qm({name:"Tabbar",configFields:P7(),partFields:L7(),factory:function(i,c,f,x){return{uid:i.uid,dom:i.dom,components:c,"debug.sketcher":"Tabbar",domModification:{attributes:{role:"tablist"}},behaviours:Od(i.tabbarBehaviours,[Jl.config({highlightClass:i.markers.selectedClass,itemClass:i.markers.tabClass,onHighlight:function(F,$){De($.element,"aria-selected","true")},onDehighlight:function(F,$){De($.element,"aria-selected","false")}}),Za.config({mode:"flow",getInitial:function(F){return Jl.getHighlighted(F).map(function($){return $.element})},selector:"."+i.markers.tabClass,executeOnMove:!0})])}}}),F7=ch({name:"Tabview",configFields:[Zu("tabviewBehaviours",[ys])],factory:function(i,c){return{uid:i.uid,dom:i.dom,behaviours:Od(i.tabviewBehaviours,[ys.config({})]),domModification:{attributes:{role:"tabpanel"}}}}}),N7=X([Ti("selectFirst",!0),kl("onChangeTab"),kl("onDismissTab"),Ti("tabs",[]),Zu("tabSectionBehaviours",[])]),B7=tp({factory:Dz,schema:[Mr("dom"),qu("markers",[Mr("tabClass"),Mr("selectedClass")])],name:"tabbar",defaults:function(i){return{tabs:i.tabs}}}),U7=tp({factory:F7,name:"tabview"}),z7=X([B7,U7]),wI=qm({name:"TabSection",configFields:N7(),partFields:z7(),factory:function(i,c,f,x){var $=function(se,Ie){qc(se,i,"tabbar").each(function(ze){Ie(ze).each(pd)})};return{uid:i.uid,dom:i.dom,components:c,behaviours:lg(i.tabSectionBehaviours),events:uc(mi([i.selectFirst?[Va(function(se,Ie){$(se,Jl.getFirst)})]:[],[yr(_h(),function(se,Ie){!function(se){var Ie=Io.getValue(se);qc(se,i,"tabview").each(function(ze){vi(i.tabs,function(Mt){return Mt.value===Ie}).each(function(Mt){var kt=Mt.view();Qi(se.element,"id").each(function(pn){De(ze.element,"aria-labelledby",pn)}),ys.set(ze,kt),i.onChangeTab(ze,se,kt)})})}(Ie.event.button)}),yr(Jd(),function(se,Ie){var ze=Ie.event.button;i.onDismissTab(se,ze)})]])),apis:{getViewItems:function(se){return qc(se,i,"tabview").map(function(Ie){return ys.contents(Ie)}).getOr([])},showTab:function(se,Ie){$(se,function(it){var Mt=Jl.getCandidates(it);return vi(Mt,function(pn){return Io.getValue(pn)===Ie}).filter(function(pn){return!Jl.isHighlighted(it,pn)})})}}}},apis:{getViewItems:function(i,c){return i.getViewItems(c)},showTab:function(i,c,f){i.showTab(c,f)}}}),Sz=function(i,c){Ki(i,"height",c+"px"),$r().browser.isIE()?Ka(i,"flex-basis"):Ki(i,"flex-basis",c+"px")},p3=function(i,c,f){cf(i,'[role="dialog"]').each(function(x){Fc(x,'[role="tablist"]').each(function(F){f.get().map(function($){return Ki(c,"height","0"),Ki(c,"flex-basis","0"),Math.min($,function(i,c,f){var se,x=Li(i).dom,F=cf(i,".tox-dialog-wrap").getOr(i);se="fixed"===qi(F,"position")?Math.max(x.clientHeight,window.innerHeight):Math.max(x.offsetHeight,x.scrollHeight);var Ie=hl(c),it=c.dom.offsetLeft>=f.dom.offsetLeft+ks(f)?Math.max(hl(f),Ie):Ie,Mt=parseInt(qi(i,"margin-top"),10)||0,kt=parseInt(qi(i,"margin-bottom"),10)||0;return se-(hl(i)+Mt+kt-it)}(x,c,F))}).each(function($){Sz(c,$)})})})},JU=function(i){return Fc(i,'[role="tabpanel"]')},W7=function(i){var x,F,c=(x=ku(),F=[Va(function(se){var Ie=se.element;JU(Ie).each(function(ze){Ki(ze,"visibility","hidden"),se.getSystem().getByDom(ze).toOptional().each(function(it){var Mt=function(i,c,f){return ft(i,function(x,F){ys.set(f,i[F].view());var $=c.dom.getBoundingClientRect();return ys.set(f,[]),$.height})}(i,ze,it),kt=function(i){return ui(xn(i,function(c,f){return c>f?-1:c<f?1:0}))}(Mt);kt.fold(x.clear,x.set)}),p3(Ie,ze,x),Ka(ze,"visibility"),function(i,c){ui(i).each(function(f){return wI.showTab(c,f.value)})}(i,se),c_.requestAnimationFrame(function(){p3(Ie,ze,x)})})}),yr(td(),function(se){var Ie=se.element;JU(Ie).each(function(ze){p3(Ie,ze,x)})}),yr(rP,function(se,Ie){var ze=se.element;JU(ze).each(function(it){var Mt=Vu(ro(it));Ki(it,"visibility","hidden");var kt=$o(it,"height").map(function(Un){return parseInt(Un,10)});Ka(it,"height"),Ka(it,"flex-basis");var pn=it.dom.getBoundingClientRect().height;kt.forall(function(Un){return pn>Un})?(x.set(pn),p3(ze,it,x)):kt.each(function(Un){Sz(it,Un)}),Ka(it,"visibility"),Mt.each(Xd)})})],{extraEvents:F,selectFirst:!1});return{smartTabHeight:c,naiveTabHeight:{extraEvents:[],selectFirst:!0}}},Az="send-data-to-section",wz="send-data-to-view",$7=function(i,c){var f=ta({}),x=function(ze){var it=Io.getValue(ze),Mt=xz(it).getOr({}),kt=f.get(),pn=nr(kt,Mt);f.set(pn)},F=function(ze){var it=f.get();Io.setValue(ze,it)},$=ta(null),se=ft(i.tabs,function(ze){return{value:ze.name,dom:{tag:"div",classes:["tox-dialog__body-nav-item"],innerHtml:c.shared.providers.translate(ze.title)},view:function(){return[mS.sketch(function(it){return{dom:{tag:"div",classes:["tox-form"]},components:ft(ze.items,function(Mt){return aI(it,Mt,c)}),formBehaviours:ao([Za.config({mode:"acyclic",useTabstopAt:ne(SA)}),bs("TabView.form.events",[Va(F),mp(x)]),Id.config({channels:vs([{key:Az,value:{onReceive:x}},{key:wz,value:{onReceive:F}}])})])}})]}}}),Ie=W7(se).smartTabHeight;return wI.sketch({dom:{tag:"div",classes:["tox-dialog__body"]},onChangeTab:function(ze,it,Mt){var kt=Io.getValue(it);Sa(ze,iP,{name:kt,oldName:$.get()}),$.set(kt)},tabs:se,components:[wI.parts.tabbar({dom:{tag:"div",classes:["tox-dialog__body-nav"]},components:[Dz.parts.tabs({})],markers:{tabClass:"tox-tab",selectedClass:"tox-dialog__body-nav-item--active"},tabbarBehaviours:ao([bm.config({})])}),wI.parts.tabview({dom:{tag:"div",classes:["tox-dialog__body-content"]}})],selectFirst:Ie.selectFirst,tabSectionBehaviours:ao([bs("tabpanel",Ie.extraEvents),Za.config({mode:"acyclic"}),Ml.config({find:function(ze){return ui(wI.getViewItems(ze))}}),Io.config({store:{mode:"manual",getValue:function(ze){return ze.getSystem().broadcastOn([Az],{}),f.get()},setValue:function(ze,it){f.set(it),ze.getSystem().broadcastOn([wz],{})}}})])})},QU=jo("update-dialog"),Iz=jo("update-title"),Pz=jo("update-body"),Oz=jo("update-footer"),Lz=jo("body-send-message"),kz=function(i,c,f,x){return{dom:{tag:"div",classes:["tox-dialog__content-js"],attributes:re(re({},c.map(function(Ie){return{id:Ie}}).getOr({})),x?{"aria-live":"polite"}:{})},components:[],behaviours:ao([n1_childAt(0),c0.config({channel:Pz,updateState:function(Ie,ze){return j.some({isTabPanel:function(){return"tabpanel"===ze.body.type}})},renderComponents:function(Ie){return"tabpanel"===Ie.body.type?[$7(Ie.body,f)]:[A7(Ie.body,f)]},initialData:i})])}};function HA(i){return HA="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(c){return typeof c}:function(c){return c&&"function"==typeof Symbol&&c.constructor===Symbol&&c!==Symbol.prototype?"symbol":typeof c},HA(i)}function qU(i,c){return(qU=Object.setPrototypeOf||function(x,F){return x.__proto__=F,x})(i,c)}function m3(i,c,f){return(m3=function Q7(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}()?Reflect.construct:function(F,$,se){var Ie=[null];Ie.push.apply(Ie,$);var it=new(Function.bind.apply(F,Ie));return se&&qU(it,se.prototype),it}).apply(null,arguments)}function PM(i){return function q7(i){if(Array.isArray(i))return XU(i)}(i)||function X7(i){if(typeof Symbol<"u"&&null!=i[Symbol.iterator]||null!=i["@@iterator"])return Array.from(i)}(i)||function eG(i,c){if(i){if("string"==typeof i)return XU(i,c);var f=Object.prototype.toString.call(i).slice(8,-1);if("Object"===f&&i.constructor&&(f=i.constructor.name),"Map"===f||"Set"===f)return Array.from(i);if("Arguments"===f||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(f))return XU(i,c)}}(i)||function tG(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function XU(i,c){(null==c||c>i.length)&&(c=i.length);for(var f=0,x=new Array(c);f<c;f++)x[f]=i[f];return x}var nG=Object.hasOwnProperty,Rz=Object.setPrototypeOf,iG=Object.isFrozen,rG=Object.getPrototypeOf,oG=Object.getOwnPropertyDescriptor,u0=Object.freeze,qT=Object.seal,aG=Object.create,Fz=typeof Reflect<"u"&&Reflect,f3=Fz.apply,e5=Fz.construct;f3||(f3=function(c,f,x){return c.apply(f,x)}),u0||(u0=function(c){return c}),qT||(qT=function(c){return c}),e5||(e5=function(c,f){return m3(c,PM(f))});var sG=OM(Array.prototype.forEach),Nz=OM(Array.prototype.pop),FO=OM(Array.prototype.push),h3=OM(String.prototype.toLowerCase),lG=OM(String.prototype.match),MS=OM(String.prototype.replace),cG=OM(String.prototype.indexOf),uG=OM(String.prototype.trim),d0=OM(RegExp.prototype.test),t5=function dG(i){return function(){for(var c=arguments.length,f=new Array(c),x=0;x<c;x++)f[x]=arguments[x];return e5(i,f)}}(TypeError);function OM(i){return function(c){for(var f=arguments.length,x=new Array(f>1?f-1:0),F=1;F<f;F++)x[F-1]=arguments[F];return f3(i,c,x)}}function ju(i,c){Rz&&Rz(i,null);for(var f=c.length;f--;){var x=c[f];if("string"==typeof x){var F=h3(x);F!==x&&(iG(c)||(c[f]=F),x=F)}i[x]=!0}return i}function VA(i){var f,c=aG(null);for(f in i)f3(nG,i,[f])&&(c[f]=i[f]);return c}function g3(i,c){for(;null!==i;){var f=oG(i,c);if(f){if(f.get)return OM(f.get);if("function"==typeof f.value)return OM(f.value)}i=rG(i)}return function x(F){return console.warn("fallback value for",F),null}}var Bz=u0(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),n5=u0(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),i5=u0(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),pG=u0(["animate","color-profile","cursor","discard","fedropshadow","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),r5=u0(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover"]),mG=u0(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Uz=u0(["#text"]),zz=u0(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns","slot"]),o5=u0(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),Yz=u0(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),_3=u0(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),fG=qT(/\{\{[\w\W]*|[\w\W]*\}\}/gm),hG=qT(/<%[\w\W]*|[\w\W]*%>/gm),gG=qT(/^data-[\-\w.\u00B7-\uFFFF]/),_G=qT(/^aria-[\-\w]+$/),vG=qT(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),yG=qT(/^(?:\w+script|data):/i),bG=qT(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),CG=qT(/^html$/i),EG=function(){return typeof window>"u"?null:window},MG=function(c,f){if("object"!==HA(c)||"function"!=typeof c.createPolicy)return null;var x=null,F="data-tt-policy-suffix";f.currentScript&&f.currentScript.hasAttribute(F)&&(x=f.currentScript.getAttribute(F));var $="dompurify"+(x?"#"+x:"");try{return c.createPolicy($,{createHTML:function(Ie){return Ie}})}catch{return console.warn("TrustedTypes policy "+$+" could not be created."),null}};var TG=function Hz(){var i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:EG(),c=function(Lr){return Hz(Lr)};if(c.version="2.3.8",c.removed=[],!i||!i.document||9!==i.document.nodeType)return c.isSupported=!1,c;var f=i.document,x=i.document,F=i.DocumentFragment,$=i.HTMLTemplateElement,se=i.Node,Ie=i.Element,ze=i.NodeFilter,it=i.NamedNodeMap,Mt=void 0===it?i.NamedNodeMap||i.MozNamedAttrMap:it,kt=i.HTMLFormElement,pn=i.DOMParser,bn=i.trustedTypes,Un=Ie.prototype,di=g3(Un,"cloneNode"),Ui=g3(Un,"nextSibling"),ri=g3(Un,"childNodes"),Yi=g3(Un,"parentNode");if("function"==typeof $){var Or=x.createElement("template");Or.content&&Or.content.ownerDocument&&(x=Or.content.ownerDocument)}var Pr=MG(bn,f),zi=Pr?Pr.createHTML(""):"",hr=x,Br=hr.implementation,ko=hr.createNodeIterator,Zr=hr.createDocumentFragment,No=hr.getElementsByTagName,jr=f.importNode,Nr={};try{Nr=VA(x).documentMode?x.documentMode:{}}catch{}var bo={};c.isSupported="function"==typeof Yi&&Br&&typeof Br.createHTMLDocument<"u"&&9!==Nr;var DS,SD,fa=fG,Vr=hG,sa=gG,Pa=_G,Zl=yG,Uc=bG,yd=vG,Lp=null,Ey=ju({},[].concat(PM(Bz),PM(n5),PM(i5),PM(r5),PM(Uz))),Zg=null,II=ju({},[].concat(PM(zz),PM(o5),PM(Yz),PM(_3))),Zf=Object.seal(Object.create(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),MD=null,TD=null,ZA=!0,xD=!0,GA=!1,j_=!1,l1=!1,__=!1,WA=!1,XT=!1,TS=!1,Gf=!1,LM=!0,ex=!0,DD=!1,c1={},tx=null,Jo=ju({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),il=null,jc=ju({},["audio","video","img","source","image","track"]),ap=null,K_=ju({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),v_="http://www.w3.org/1998/Math/MathML",My="http://www.w3.org/2000/svg",p0="http://www.w3.org/1999/xhtml",xS=p0,$A=!1,u5=["application/xhtml+xml","text/html"],SS=null,QG=x.createElement("form"),c8=function(Lr){return Lr instanceof RegExp||Lr instanceof Function},p5=function(Lr){SS&&SS===Lr||((!Lr||"object"!==HA(Lr))&&(Lr={}),Lr=VA(Lr),Lp="ALLOWED_TAGS"in Lr?ju({},Lr.ALLOWED_TAGS):Ey,Zg="ALLOWED_ATTR"in Lr?ju({},Lr.ALLOWED_ATTR):II,ap="ADD_URI_SAFE_ATTR"in Lr?ju(VA(K_),Lr.ADD_URI_SAFE_ATTR):K_,il="ADD_DATA_URI_TAGS"in Lr?ju(VA(jc),Lr.ADD_DATA_URI_TAGS):jc,tx="FORBID_CONTENTS"in Lr?ju({},Lr.FORBID_CONTENTS):Jo,MD="FORBID_TAGS"in Lr?ju({},Lr.FORBID_TAGS):{},TD="FORBID_ATTR"in Lr?ju({},Lr.FORBID_ATTR):{},c1="USE_PROFILES"in Lr&&Lr.USE_PROFILES,ZA=!1!==Lr.ALLOW_ARIA_ATTR,xD=!1!==Lr.ALLOW_DATA_ATTR,GA=Lr.ALLOW_UNKNOWN_PROTOCOLS||!1,j_=Lr.SAFE_FOR_TEMPLATES||!1,l1=Lr.WHOLE_DOCUMENT||!1,XT=Lr.RETURN_DOM||!1,TS=Lr.RETURN_DOM_FRAGMENT||!1,Gf=Lr.RETURN_TRUSTED_TYPE||!1,WA=Lr.FORCE_BODY||!1,LM=!1!==Lr.SANITIZE_DOM,ex=!1!==Lr.KEEP_CONTENT,DD=Lr.IN_PLACE||!1,yd=Lr.ALLOWED_URI_REGEXP||yd,xS=Lr.NAMESPACE||p0,Lr.CUSTOM_ELEMENT_HANDLING&&c8(Lr.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(Zf.tagNameCheck=Lr.CUSTOM_ELEMENT_HANDLING.tagNameCheck),Lr.CUSTOM_ELEMENT_HANDLING&&c8(Lr.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(Zf.attributeNameCheck=Lr.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),Lr.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof Lr.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(Zf.allowCustomizedBuiltInElements=Lr.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),DS=DS=-1===u5.indexOf(Lr.PARSER_MEDIA_TYPE)?"text/html":Lr.PARSER_MEDIA_TYPE,SD="application/xhtml+xml"===DS?function(va){return va}:h3,j_&&(xD=!1),TS&&(XT=!0),c1&&(Lp=ju({},PM(Uz)),Zg=[],!0===c1.html&&(ju(Lp,Bz),ju(Zg,zz)),!0===c1.svg&&(ju(Lp,n5),ju(Zg,o5),ju(Zg,_3)),!0===c1.svgFilters&&(ju(Lp,i5),ju(Zg,o5),ju(Zg,_3)),!0===c1.mathMl&&(ju(Lp,r5),ju(Zg,Yz),ju(Zg,_3))),Lr.ADD_TAGS&&(Lp===Ey&&(Lp=VA(Lp)),ju(Lp,Lr.ADD_TAGS)),Lr.ADD_ATTR&&(Zg===II&&(Zg=VA(Zg)),ju(Zg,Lr.ADD_ATTR)),Lr.ADD_URI_SAFE_ATTR&&ju(ap,Lr.ADD_URI_SAFE_ATTR),Lr.FORBID_CONTENTS&&(tx===Jo&&(tx=VA(tx)),ju(tx,Lr.FORBID_CONTENTS)),ex&&(Lp["#text"]=!0),l1&&ju(Lp,["html","head","body"]),Lp.table&&(ju(Lp,["tbody"]),delete MD.tbody),u0&&u0(Lr),SS=Lr)},u8=ju({},["mi","mo","mn","ms","mtext"]),d8=ju({},["foreignobject","desc","title","annotation-xml"]),qG=ju({},["title","style","font","a","script"]),v3=ju({},n5);ju(v3,i5),ju(v3,pG);var m5=ju({},r5);ju(m5,mG);var AD=function(Lr){FO(c.removed,{element:Lr});try{Lr.parentNode.removeChild(Lr)}catch{try{Lr.outerHTML=zi}catch{Lr.remove()}}},p8=function(Lr,va){try{FO(c.removed,{attribute:va.getAttributeNode(Lr),from:va})}catch{FO(c.removed,{attribute:null,from:va})}if(va.removeAttribute(Lr),"is"===Lr&&!Zg[Lr])if(XT||TS)try{AD(va)}catch{}else try{va.setAttribute(Lr,"")}catch{}},m8=function(Lr){var va,Hs;if(WA)Lr="<remove></remove>"+Lr;else{var Bm=lG(Lr,/^[\r\n\t ]+/);Hs=Bm&&Bm[0]}"application/xhtml+xml"===DS&&(Lr='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+Lr+"</body></html>");var _C=Pr?Pr.createHTML(Lr):Lr;if(xS===p0)try{va=(new pn).parseFromString(_C,DS)}catch{}if(!va||!va.documentElement){va=Br.createDocument(xS,"template",null);try{va.documentElement.innerHTML=$A?"":_C}catch{}}var Cb=va.body||va.documentElement;return Lr&&Hs&&Cb.insertBefore(x.createTextNode(Hs),Cb.childNodes[0]||null),xS===p0?No.call(va,l1?"html":"body")[0]:l1?va.documentElement:Cb},f8=function(Lr){return ko.call(Lr.ownerDocument||Lr,Lr,ze.SHOW_ELEMENT|ze.SHOW_COMMENT|ze.SHOW_TEXT,null,!1)},NO=function(Lr){return"object"===HA(se)?Lr instanceof se:Lr&&"object"===HA(Lr)&&"number"==typeof Lr.nodeType&&"string"==typeof Lr.nodeName},wD=function(Lr,va,Hs){bo[Lr]&&sG(bo[Lr],function(Bm){Bm.call(c,va,Hs,SS)})},h8=function(Lr){var va;if(wD("beforeSanitizeElements",Lr,null),function(Lr){return Lr instanceof kt&&("string"!=typeof Lr.nodeName||"string"!=typeof Lr.textContent||"function"!=typeof Lr.removeChild||!(Lr.attributes instanceof Mt)||"function"!=typeof Lr.removeAttribute||"function"!=typeof Lr.setAttribute||"string"!=typeof Lr.namespaceURI||"function"!=typeof Lr.insertBefore)}(Lr)||d0(/[\u0080-\uFFFF]/,Lr.nodeName))return AD(Lr),!0;var Hs=SD(Lr.nodeName);if(wD("uponSanitizeElement",Lr,{tagName:Hs,allowedTags:Lp}),Lr.hasChildNodes()&&!NO(Lr.firstElementChild)&&(!NO(Lr.content)||!NO(Lr.content.firstElementChild))&&d0(/<[/\w]/g,Lr.innerHTML)&&d0(/<[/\w]/g,Lr.textContent)||"select"===Hs&&d0(/<template/i,Lr.innerHTML))return AD(Lr),!0;if(!Lp[Hs]||MD[Hs]){if(!MD[Hs]&&_8(Hs)&&(Zf.tagNameCheck instanceof RegExp&&d0(Zf.tagNameCheck,Hs)||Zf.tagNameCheck instanceof Function&&Zf.tagNameCheck(Hs)))return!1;if(ex&&!tx[Hs]){var Bm=Yi(Lr)||Lr.parentNode,_C=ri(Lr)||Lr.childNodes;if(_C&&Bm)for(var Ty=_C.length-1;Ty>=0;--Ty)Bm.insertBefore(di(_C[Ty],!0),Ui(Lr))}return AD(Lr),!0}return Lr instanceof Ie&&!function(Lr){var va=Yi(Lr);(!va||!va.tagName)&&(va={namespaceURI:p0,tagName:"template"});var Hs=h3(Lr.tagName),Bm=h3(va.tagName);return Lr.namespaceURI===My?va.namespaceURI===p0?"svg"===Hs:va.namespaceURI===v_?"svg"===Hs&&("annotation-xml"===Bm||u8[Bm]):Boolean(v3[Hs]):Lr.namespaceURI===v_?va.namespaceURI===p0?"math"===Hs:va.namespaceURI===My?"math"===Hs&&d8[Bm]:Boolean(m5[Hs]):Lr.namespaceURI===p0&&!(va.namespaceURI===My&&!d8[Bm]||va.namespaceURI===v_&&!u8[Bm])&&!m5[Hs]&&(qG[Hs]||!v3[Hs])}(Lr)||("noscript"===Hs||"noembed"===Hs)&&d0(/<\/no(script|embed)/i,Lr.innerHTML)?(AD(Lr),!0):(j_&&3===Lr.nodeType&&(va=Lr.textContent,va=MS(va,fa," "),va=MS(va,Vr," "),Lr.textContent!==va&&(FO(c.removed,{element:Lr.cloneNode()}),Lr.textContent=va)),wD("afterSanitizeElements",Lr,null),!1)},g8=function(Lr,va,Hs){if(LM&&("id"===va||"name"===va)&&(Hs in x||Hs in QG))return!1;if((!xD||TD[va]||!d0(sa,va))&&(!ZA||!d0(Pa,va)))if(!Zg[va]||TD[va]){if(!(_8(Lr)&&(Zf.tagNameCheck instanceof RegExp&&d0(Zf.tagNameCheck,Lr)||Zf.tagNameCheck instanceof Function&&Zf.tagNameCheck(Lr))&&(Zf.attributeNameCheck instanceof RegExp&&d0(Zf.attributeNameCheck,va)||Zf.attributeNameCheck instanceof Function&&Zf.attributeNameCheck(va))||"is"===va&&Zf.allowCustomizedBuiltInElements&&(Zf.tagNameCheck instanceof RegExp&&d0(Zf.tagNameCheck,Hs)||Zf.tagNameCheck instanceof Function&&Zf.tagNameCheck(Hs))))return!1}else if(!ap[va]&&!d0(yd,MS(Hs,Uc,""))&&("src"!==va&&"xlink:href"!==va&&"href"!==va||"script"===Lr||0!==cG(Hs,"data:")||!il[Lr])&&(!GA||d0(Zl,MS(Hs,Uc,"")))&&Hs)return!1;return!0},_8=function(Lr){return Lr.indexOf("-")>0},v8=function(Lr){var va,Hs,Bm,_C;wD("beforeSanitizeAttributes",Lr,null);var Cb=Lr.attributes;if(Cb){var Ty={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Zg};for(_C=Cb.length;_C--;){var y3=va=Cb[_C],m0=y3.name,y8=y3.namespaceURI;if(Hs="value"===m0?va.value:uG(va.value),Bm=SD(m0),Ty.attrName=Bm,Ty.attrValue=Hs,Ty.keepAttr=!0,Ty.forceKeepAttr=void 0,wD("uponSanitizeAttribute",Lr,Ty),Hs=Ty.attrValue,!Ty.forceKeepAttr&&(p8(m0,Lr),Ty.keepAttr)){if(d0(/\/>/i,Hs)){p8(m0,Lr);continue}j_&&(Hs=MS(Hs,fa," "),Hs=MS(Hs,Vr," "));var n9=SD(Lr.nodeName);if(g8(n9,Bm,Hs))try{y8?Lr.setAttributeNS(y8,m0,Hs):Lr.setAttribute(m0,Hs),Nz(c.removed)}catch{}}}wD("afterSanitizeAttributes",Lr,null)}},t9=function Fl(Lr){var va,Hs=f8(Lr);for(wD("beforeSanitizeShadowDOM",Lr,null);va=Hs.nextNode();)wD("uponSanitizeShadowNode",va,null),!h8(va)&&(va.content instanceof F&&Fl(va.content),v8(va));wD("afterSanitizeShadowDOM",Lr,null)};return c.sanitize=function(Fl,Lr){var va,Hs,Bm,_C,Cb;if(($A=!Fl)&&(Fl="\x3c!--\x3e"),"string"!=typeof Fl&&!NO(Fl)){if("function"!=typeof Fl.toString)throw t5("toString is not a function");if("string"!=typeof(Fl=Fl.toString()))throw t5("dirty is not a string, aborting")}if(!c.isSupported){if("object"===HA(i.toStaticHTML)||"function"==typeof i.toStaticHTML){if("string"==typeof Fl)return i.toStaticHTML(Fl);if(NO(Fl))return i.toStaticHTML(Fl.outerHTML)}return Fl}if(__||p5(Lr),c.removed=[],"string"==typeof Fl&&(DD=!1),DD){if(Fl.nodeName){var Ty=SD(Fl.nodeName);if(!Lp[Ty]||MD[Ty])throw t5("root node is forbidden and cannot be sanitized in-place")}}else if(Fl instanceof se)1===(Hs=(va=m8("\x3c!----\x3e")).ownerDocument.importNode(Fl,!0)).nodeType&&"BODY"===Hs.nodeName||"HTML"===Hs.nodeName?va=Hs:va.appendChild(Hs);else{if(!XT&&!j_&&!l1&&-1===Fl.indexOf("<"))return Pr&&Gf?Pr.createHTML(Fl):Fl;if(!(va=m8(Fl)))return XT?null:Gf?zi:""}va&&WA&&AD(va.firstChild);for(var y3=f8(DD?Fl:va);Bm=y3.nextNode();)3===Bm.nodeType&&Bm===_C||h8(Bm)||(Bm.content instanceof F&&t9(Bm.content),v8(Bm),_C=Bm);if(_C=null,DD)return Fl;if(XT){if(TS)for(Cb=Zr.call(va.ownerDocument);va.firstChild;)Cb.appendChild(va.firstChild);else Cb=va;return Zg.shadowroot&&(Cb=jr.call(f,Cb,!0)),Cb}var m0=l1?va.outerHTML:va.innerHTML;return l1&&Lp["!doctype"]&&va.ownerDocument&&va.ownerDocument.doctype&&va.ownerDocument.doctype.name&&d0(CG,va.ownerDocument.doctype.name)&&(m0="<!DOCTYPE "+va.ownerDocument.doctype.name+">\n"+m0),j_&&(m0=MS(m0,fa," "),m0=MS(m0,Vr," ")),Pr&&Gf?Pr.createHTML(m0):m0},c.setConfig=function(Fl){p5(Fl),__=!0},c.clearConfig=function(){SS=null,__=!1},c.isValidAttribute=function(Fl,Lr,va){SS||p5({});var Hs=SD(Fl),Bm=SD(Lr);return g8(Hs,Bm,va)},c.addHook=function(Fl,Lr){"function"==typeof Lr&&(bo[Fl]=bo[Fl]||[],FO(bo[Fl],Lr))},c.removeHook=function(Fl){if(bo[Fl])return Nz(bo[Fl])},c.removeHooks=function(Fl){bo[Fl]&&(bo[Fl]=[])},c.removeAllHooks=function(){bo={}},c}(),xG=function(i){return TG().sanitize(i)},DG=mw.deviceType.isTouch(),Vz=function(i,c){return{dom:{tag:"div",styles:{display:"none"},classes:["tox-dialog__header"]},components:[i,c]}},Zz=function(i,c){return hh.parts.close(Nf.sketch({dom:{tag:"button",classes:["tox-button","tox-button--icon","tox-button--naked"],attributes:{type:"button","aria-label":c.translate("Close")}},action:i,buttonBehaviours:ao([bm.config({})])}))},Gz=function(){return hh.parts.title({dom:{tag:"div",classes:["tox-dialog__title"],innerHtml:"",styles:{display:"none"}}})},Wz=function(i,c){return hh.parts.body({dom:{tag:"div",classes:["tox-dialog__body"]},components:[{dom:{tag:"div",classes:["tox-dialog__body-content"]},components:[{dom:So("<p>"+xG(c.translate(i))+"</p>")}]}]})},$z=function(i){return hh.parts.footer({dom:{tag:"div",classes:["tox-dialog__footer"]},components:i})},jz=function(i,c){return[Yg.sketch({dom:{tag:"div",classes:["tox-dialog__footer-start"]},components:i}),Yg.sketch({dom:{tag:"div",classes:["tox-dialog__footer-end"]},components:c})]},a5=function(i){var c,f="tox-dialog",x=f+"-wrap",F=x+"__backdrop",$=f+"__disable-scroll";return hh.sketch({lazySink:i.lazySink,onEscape:function(se){return i.onEscape(se),j.some(!0)},useTabstopAt:function(se){return!SA(se)},dom:{tag:"div",classes:[f].concat(i.extraClasses),styles:re({position:"relative"},i.extraStyles)},components:me([i.header,i.body],i.footer.toArray(),!0),parts:{blocker:{dom:So('<div class="'+x+'"></div>'),components:[{dom:{tag:"div",classes:DG?[F,F+"--opaque"]:[F]}}]}},dragBlockClass:x,modalBehaviours:ao(me([ka.config({}),bs("dialog-events",i.dialogEvents.concat([nu(xm(),function(se,Ie){Za.focusIn(se)})])),bs("scroll-lock",[Va(function(){Qc(Ra(),$)}),mp(function(){wc(Ra(),$)})])],i.extraBehaviours,!0)),eventOrder:re((c={},c[dd()]=["dialog-events"],c[lm()]=["scroll-lock","dialog-events","alloy.base.behaviour"],c[mg()]=["alloy.base.behaviour","dialog-events","scroll-lock"],c),i.eventOrder)})},Kz=function(i){return Nf.sketch({dom:{tag:"button",classes:["tox-button","tox-button--icon","tox-button--naked"],attributes:{type:"button","aria-label":i.translate("Close"),title:i.translate("Close")}},components:[fb("close",{tag:"div",classes:["tox-icon"]},i.icons)],action:function(c){Cl(c,nD)}})},Jz=function(i,c,f){var x=function(F){return[fd(f.translate(F.title))]};return{dom:{tag:"div",classes:["tox-dialog__title"],attributes:re({},c.map(function(F){return{id:F}}).getOr({}))},components:x(i),behaviours:ao([c0.config({channel:Iz,renderComponents:x})])}},Qz=function(){return{dom:So('<div class="tox-dialog__draghandle"></div>')}},qz=function(i,c){return function(i,c){var f=hh.parts.title(Jz(i,j.none(),c)),x=hh.parts.draghandle(Qz()),F=hh.parts.close(Kz(c)),$=[f].concat(i.draggable?[x]:[]).concat([F]);return Yg.sketch({dom:So('<div class="tox-dialog__header"></div>'),components:$})}({title:c.shared.providers.translate(i),draggable:c.dialog.isDraggableModal()},c.shared.providers)},Xz=function(i,c,f){return{dom:{tag:"div",classes:["tox-dialog__busy-spinner"],attributes:{"aria-label":f.translate(i)},styles:{left:"0px",right:"0px",bottom:"0px",top:"0px",position:"absolute"}},behaviours:c,components:[{dom:So('<div class="tox-spinner"><div></div><div></div><div></div></div>')}]}},e8=function(i,c,f){return{onClose:function(){return f.closeWindow()},onBlock:function(x){hh.setBusy(i(),function(F,$){return Xz(x.message,$,c)})},onUnblock:function(){hh.setIdle(i())}}},t8=function(i,c,f,x){var F;return Ga(a5(re(re({},i),{lazySink:x.shared.getSink,extraBehaviours:me([c0.config({channel:QU,updateState:function(se,Ie){return j.some(Ie)},initialData:c}),SM_memory({})],i.extraBehaviours,!0),onEscape:function(se){Cl(se,nD)},dialogEvents:f,eventOrder:(F={},F[$d()]=[c0.name(),Id.name()],F[lm()]=["scroll-lock",c0.name(),"messages","dialog-events","alloy.base.behaviour"],F[mg()]=["alloy.base.behaviour","dialog-events","messages",c0.name(),"scroll-lock"],F)})))},n8=function(i){return ft(i,function(f){return"menu"===f.type?function(f){var x=ft(f.items,function(F){var $=ta(!1);return re(re({},F),{storage:$})});return re(re({},f),{items:x})}(f):f})},i8=function(i){return Dn(i,function(c,f){return"menu"===f.type?Dn(f.items,function(F,$){return F[$.name]=$.storage,F},c):c},{})},r8=function(i,c){return[jf(xm(),lk),i(dA,function(f,x){c.onClose(),x.onClose()}),i(nD,function(f,x,F,$){x.onCancel(f),Cl($,dA)}),yr(nP,function(f,x){return c.onUnblock()}),yr(dE,function(f,x){return c.onBlock(x.event)})]},s5_initUrlDialog=function(i,c){var f=function(F,$){return yr(F,function(se,Ie){x(se,function(ze,it){$(i(),ze,Ie.event,se)})})},x=function(F,$){c0.getState(F).get().each(function(se){$(se,F)})};return me(me([],r8(f,c),!0),[f(XC,function(F,$,se){$.onAction(F,{name:se.name})})],!1)},s5_initDialog=function(i,c,f){var x=function($,se){return yr($,function(Ie,ze){F(Ie,function(it,Mt){se(i(),it,ze.event,Ie)})})},F=function($,se){c0.getState($).get().each(function(Ie){se(Ie.internalDialog,$)})};return me(me([],r8(x,c),!0),[x(by,function($,se){return se.onSubmit($)}),x(vb,function($,se,Ie){se.onChange($,{name:Ie.name})}),x(XC,function($,se,Ie,ze){var it=function(){return Za.focusIn(ze)},Mt=function(bn){return Kt(bn,"disabled")||Qi(bn,"aria-disabled").exists(function(Un){return"true"===Un})},kt=ro(ze.element),pn=Vu(kt);se.onAction($,{name:Ie.name,value:Ie.value}),Vu(kt).fold(it,function(bn){Mt(bn)||pn.exists(function(Un){return ar(bn,Un)&&Mt(Un)})?it():f().toOptional().filter(function(Un){return!ar(Un.element,bn)}).each(it)})}),x(iP,function($,se,Ie){se.onTabChange($,{newTabName:Ie.name,oldTabName:Ie.oldName})}),mp(function($){var se=i();Io.setValue($,se.getData())})],!1)},LG=function(i,c){var f=c.map(function(Ie){return Ie.footerButtons}).getOr([]),x=He(f,function(Ie){return"start"===Ie.align}),F=function(Ie,ze){return Yg.sketch({dom:{tag:"div",classes:["tox-dialog__footer-"+Ie]},components:ft(ze,function(it){return it.memento.asSpec()})})};return[F("start",x.pass),F("end",x.fail)]},o8=function(i,c){return{dom:So('<div class="tox-dialog__footer"></div>'),components:[],behaviours:ao([c0.config({channel:Oz,initialData:i,updateState:function(x,F){var $=ft(F.buttons,function(Ie){var ze=wl(function(i,c){return qw(i,i.type,c)}(Ie,c));return{name:Ie.name,align:Ie.align,memento:ze}});return j.some({lookupByName:function(Ie,ze){return function(i,c,f){return vi(c,function(x){return x.name===f}).bind(function(x){return x.memento.getOpt(i)})}(Ie,$,ze)},footerButtons:$})},renderComponents:LG})])}},a8=function(i,c){return hh.parts.footer(o8(i,c))},l5=function(i,c){if(i.getRoot().getSystem().isConnected()){var x=Ml.getCurrent(i.getFormWrapper()).getOr(i.getFormWrapper());return mS.getField(x,c).fold(function(){var F=i.getFooter();return c0.getState(F).get().bind(function(se){return se.lookupByName(x,c)})},function(F){return j.some(F)})}return j.none()},s8=function(i,c,f){var x=function(di){var Ui=i.getRoot();Ui.getSystem().isConnected()&&di(Ui)},Un={getData:function(){var di=i.getRoot(),Ui=di.getSystem().isConnected()?i.getFormWrapper():di,ri=Io.getValue(Ui),Yi=vn(f,function(Or){return Or.get()});return re(re({},ri),Yi)},setData:function(di){x(function(Ui){var ri=Un.getData(),Yi=re(re({},ri),di),Or=function(i,c){var f=i.getRoot();return c0.getState(f).get().map(function(x){return dr(li("data",x.dataValidator,c))}).getOr(c)}(i,Yi),Pr=i.getFormWrapper();Io.setValue(Pr,Or),An(f,function(zi,hr){jn(Yi,hr)&&zi.set(Yi[hr])})})},disable:function(di){l5(i,di).each(Aa.disable)},enable:function(di){l5(i,di).each(Aa.enable)},focus:function(di){l5(i,di).each(ka.focus)},block:function(di){if(!e(di))throw new Error("The dialogInstanceAPI.block function should be passed a blocking message of type string as an argument");x(function(Ui){Sa(Ui,dE,{message:di})})},unblock:function(){x(function(di){Cl(di,nP)})},showTab:function(di){x(function(Ui){var ri=i.getBody();c0.getState(ri).get().exists(function(Or){return Or.isTabPanel()})&&Ml.getCurrent(ri).each(function(Or){wI.showTab(Or,di)})})},redial:function(di){x(function(Ui){var ri=c(di);Ui.getSystem().broadcastOn([QU],ri),Ui.getSystem().broadcastOn([Iz],ri.internalDialog),Ui.getSystem().broadcastOn([Pz],ri.internalDialog),Ui.getSystem().broadcastOn([Oz],ri.internalDialog),Un.setData(ri.initialData)})},close:function(){x(function(di){Cl(di,dA)})}};return Un},NG=function(i,c,f){var x=qz(i.internalDialog.title,f),F=function(i,c){var f=kz(i,j.none(),c,!1);return hh.parts.body(f)}({body:i.internalDialog.body},f),$=n8(i.internalDialog.buttons),se=i8($),Ie=a8({buttons:$},f),ze=s5_initDialog(function(){return bn},e8(function(){return kt},f.shared.providers,c),f.shared.getSink),it=function(i){switch(i){case"large":return["tox-dialog--width-lg"];case"medium":return["tox-dialog--width-md"];default:return[]}}(i.internalDialog.size),Mt={header:x,body:F,footer:j.some(Ie),extraClasses:it,extraBehaviours:[],extraStyles:{}},kt=t8(Mt,i,ze,f),pn={getRoot:X(kt),getBody:function(){return hh.getBody(kt)},getFooter:function(){return hh.getFooter(kt)},getFormWrapper:function(){var di=hh.getBody(kt);return Ml.getCurrent(di).getOr(di)}},bn=s8(pn,c.redial,se);return{dialog:kt,instanceApi:bn}},BG=function(i,c,f,x){var F,$,se=jo("dialog-label"),Ie=jo("dialog-content"),it=wl(function(i,c,f){return Yg.sketch({dom:So('<div class="tox-dialog__header"></div>'),components:[Jz(i,j.some(c),f),Qz(),Kz(f)],containerBehaviours:ao([zA.config({mode:"mouse",blockerClass:"blocker",getTarget:function(x){return gd(x,'[role="dialog"]').getOrDie()},snaps:{getSnapPoints:function(){return[]},leftAttr:"data-drag-left",topAttr:"data-drag-top"}})])})}({title:i.internalDialog.title,draggable:!0},se,f.shared.providers)),Mt=wl(function(i,c,f,x){return kz(i,j.some(c),f,x)}({body:i.internalDialog.body},Ie,f,x)),kt=n8(i.internalDialog.buttons),pn=i8(kt),bn=wl(function(i,c){return o8(i,c)}({buttons:kt},f)),Un=s5_initDialog(function(){return Ui},{onBlock:function(ri){po.block(di,function(Yi,Or){return Xz(ri.message,Or,f.shared.providers)})},onUnblock:function(){po.unblock(di)},onClose:function(){return c.closeWindow()}},f.shared.getSink),di=Ga({dom:{tag:"div",classes:["tox-dialog","tox-dialog-inline"],attributes:(F={role:"dialog"},F["aria-labelledby"]=se,F["aria-describedby"]=Ie,F)},eventOrder:($={},$[$d()]=[c0.name(),Id.name()],$[dd()]=["execute-on-form"],$[lm()]=["reflecting","execute-on-form"],$),behaviours:ao([Za.config({mode:"cyclic",onEscape:function(ri){return Cl(ri,dA),j.some(!0)},useTabstopAt:function(ri){return!SA(ri)&&("button"!==Ft(ri)||"disabled"!==Xt(ri,"disabled"))}}),c0.config({channel:QU,updateState:function(ri,Yi){return j.some(Yi)},initialData:i}),ka.config({}),bs("execute-on-form",Un.concat([nu(xm(),function(ri,Yi){Za.focusIn(ri)})])),po.config({getRoot:function(){return j.some(di)}}),ys.config({}),SM_memory({})]),components:[it.asSpec(),Mt.asSpec(),bn.asSpec()]}),Ui=s8({getRoot:X(di),getFooter:function(){return bn.get(di)},getBody:function(){return Mt.get(di)},getFormWrapper:function(){var ri=Mt.get(di);return Ml.getCurrent(ri).getOr(ri)}},c.redial,pn);return{dialog:di,instanceApi:Ui}},c5=tinymce.util.Tools.resolve("tinymce.util.URI"),zG=["insertContent","setContent","execCommand","close","block","unblock"],l8=function(i){return l(i)&&-1!==zG.indexOf(i.mceAction)},VG=function(i,c,f,x){var F,$=qz(i.title,x),se=function(i){var c={dom:{tag:"div",classes:["tox-dialog__content-js"]},components:[{dom:{tag:"div",classes:["tox-dialog__body-iframe"]},components:[BP({dom:{tag:"iframe",attributes:{src:i.url}},behaviours:ao([bm.config({}),ka.config({})])})]}],behaviours:ao([Za.config({mode:"acyclic",useTabstopAt:ne(SA)})])};return hh.parts.body(c)}(i),Ie=i.buttons.bind(function(Yi){return 0===Yi.length?j.none():j.some(a8({buttons:Yi},x))}),ze=s5_initUrlDialog(function(){return ri},e8(function(){return Ui},x.shared.providers,c)),it=re(re({},i.height.fold(function(){return{}},function(Yi){return{height:Yi+"px","max-height":Yi+"px"}})),i.width.fold(function(){return{}},function(Yi){return{width:Yi+"px","max-width":Yi+"px"}})),Mt=i.width.isNone()&&i.height.isNone()?["tox-dialog--width-lg"]:[],kt=new c5(i.url,{base_uri:new c5(window.location.href)}),pn=kt.protocol+"://"+kt.host+(kt.port?":"+kt.port:""),bn=rm(),Un=[bs("messages",[Va(function(){var Yi=Nc(Xn.fromDom(window),"message",function(Or){if(kt.isSameOrigin(new c5(Or.raw.origin))){var Pr=Or.raw.data;l8(Pr)?function(i,c,f){switch(f.mceAction){case"insertContent":i.insertContent(f.content);break;case"setContent":i.setContent(f.content);break;case"execCommand":var x=!!E(f.ui)&&f.ui;i.execCommand(f.cmd,x,f.value);break;case"close":c.close();break;case"block":c.block(f.message);break;case"unblock":c.unblock()}}(f,ri,Pr):function(i){return!l8(i)&&l(i)&&jn(i,"mceAction")}(Pr)&&i.onMessage(ri,Pr)}});bn.set(Yi)}),mp(bn.clear)]),Id.config({channels:(F={},F[Lz]={onReceive:function(Yi,Or){Fc(Yi.element,"iframe").each(function(Pr){Pr.dom.contentWindow.postMessage(Or,pn)})}},F)})],Ui=t8({header:$,body:se,footer:Ie,extraClasses:Mt,extraBehaviours:Un,extraStyles:it},i,ze,x),ri=function(i){var c=function(se){i.getSystem().isConnected()&&se(i)};return{block:function(se){if(!e(se))throw new Error("The urlDialogInstanceAPI.block function should be passed a blocking message of type string as an argument");c(function(Ie){Sa(Ie,dE,{message:se})})},unblock:function(){c(function(se){Cl(se,nP)})},close:function(){c(function(se){Cl(se,dA)})},sendMessage:function(se){c(function(Ie){Ie.getSystem().broadcastOn([Lz],se)})}}}(Ui);return{dialog:Ui,instanceApi:ri}},jG=function(i,c,f){return c&&f?[]:[Em.config({contextual:{lazyContext:function(){return j.some(lo(Xn.fromDom(i.getContentAreaContainer())))},fadeInClass:"tox-dialog-dock-fadein",fadeOutClass:"tox-dialog-dock-fadeout",transitionClass:"tox-dialog-dock-transition"},modes:["top"]})]},KG=function(i){var c=i.backstage,f=i.editor,x=uw(f),F=function(i){var c=i.backstage.shared;return{open:function(x,F){var $=function(){hh.hide(it),F()},se=wl(qw({name:"close-alert",text:"OK",primary:!0,align:"end",disabled:!1,icon:j.none()},"cancel",i.backstage)),Ie=Gz(),ze=Zz($,c.providers),it=Ga(a5({lazySink:function(){return c.getSink()},header:Vz(Ie,ze),body:Wz(x,c.providers),footer:j.some($z(jz([],[se.asSpec()]))),onEscape:$,extraClasses:["tox-alert-dialog"],extraBehaviours:[],extraStyles:{},dialogEvents:[yr(nD,$)],eventOrder:{}}));hh.show(it);var Mt=se.get(it);ka.focus(Mt)}}}(i),$=function(i){var c=i.backstage.shared;return{open:function(x,F){var $=function(pn){hh.hide(Mt),F(pn)},se=wl(qw({name:"yes",text:"Yes",primary:!0,align:"end",disabled:!1,icon:j.none()},"submit",i.backstage)),Ie=qw({name:"no",text:"No",primary:!1,align:"end",disabled:!1,icon:j.none()},"cancel",i.backstage),ze=Gz(),it=Zz(function(){return $(!1)},c.providers),Mt=Ga(a5({lazySink:function(){return c.getSink()},header:Vz(ze,it),body:Wz(x,c.providers),footer:j.some($z(jz([],[Ie,se.asSpec()]))),onEscape:function(){return $(!1)},extraClasses:["tox-confirm-dialog"],extraBehaviours:[],extraStyles:{},dialogEvents:[yr(nD,function(){return $(!1)}),yr(by,function(){return $(!0)})],eventOrder:{}}));hh.show(Mt);var kt=se.get(Mt);ka.focus(kt)}}}(i),ze=function(Un,di){return RO.openUrl(function(ri){var Yi=VG(ri,{closeWindow:function(){hh.hide(Yi.dialog),di(Yi.instanceApi)}},f,c);return hh.show(Yi.dialog),Yi.instanceApi},Un)},it=function(Un,di){return RO.open(function(ri,Yi,Or){var Pr=Yi,hr=NG({dataValidator:Or,initialData:Pr,internalDialog:ri},{redial:RO.redial,closeWindow:function(){hh.hide(hr.dialog),di(hr.instanceApi)}},c);return hh.show(hr.dialog),hr.instanceApi.setData(Pr),hr.instanceApi},Un)},Mt=function(Un,di,Ui,ri){return RO.open(function(Or,Pr,zi){var hr=function(i,c){return dr(li("data",c,i))}(Pr,zi),Br=ku(),ko=c.shared.header.isPositionedAtTop(),No=function(){return Br.on(function(bo){Fu.reposition(bo),Em.refresh(bo)})},jr=BG({dataValidator:zi,initialData:hr,internalDialog:Or},{redial:RO.redial,closeWindow:function(){Br.on(Fu.hide),f.off("ResizeEditor",No),Br.clear(),Ui(jr.instanceApi)}},c,ri),Nr=Ga(Fu.sketch(re(re({lazySink:c.shared.getSink,dom:{tag:"div",classes:[]},fireDismissalEventInstead:{}},ko?{}:{fireRepositionEventInstead:{}}),{inlineBehaviours:ao(me([bs("window-manager-inline-events",[yr(Mf(),function(bo,fa){Cl(jr.dialog,nD)})])],jG(f,x,ko),!0)),isExtraPart:function(bo,fa){return function(i){return sA(i,".tox-alert-dialog")||sA(i,".tox-confirm-dialog")}(fa)}})));return Br.set(Nr),Fu.showWithin(Nr,hd(jr.dialog),{anchor:di},j.some(Ra())),(!x||!ko)&&(Em.refresh(Nr),f.on("ResizeEditor",No)),jr.instanceApi.setData(hr),Za.focusIn(jr.dialog),jr.instanceApi},Un)};return{open:function(Un,di,Ui){return void 0!==di&&"toolbar"===di.inline?Mt(Un,c.shared.anchors.inlineDialog(),Ui,di.ariaAttrs):void 0!==di&&"cursor"===di.inline?Mt(Un,c.shared.anchors.cursor(),Ui,di.ariaAttrs):it(Un,Ui)},openUrl:function(Un,di){return ze(Un,di)},alert:function(Un,di){F.open(Un,function(){di()})},close:function(Un){Un.close()},confirm:function(Un,di){$.open(Un,function(Ui){di(Ui)})}}};!function JG(){de.add("silver",function(i){var c=nZ(i),f=c.uiMothership,x=c.backstage,F=c.renderUI,$=c.getUi;OF.register(i,x.shared);var se=KG({editor:i,backstage:x});return{renderUI:F,getWindowManagerImpl:X(se),getNotificationManagerImpl:function(){return _M(i,{backstage:x},f)},ui:$()}})}()}()},90093:qe=>{!function(){"use strict";var I=function(t){if(null===t)return"null";if(void 0===t)return"undefined";var a=typeof t;return"object"===a&&(Array.prototype.isPrototypeOf(t)||t.constructor&&"Array"===t.constructor.name)?"array":"object"===a&&(String.prototype.isPrototypeOf(t)||t.constructor&&"String"===t.constructor.name)?"string":a},l=function(t){return{eq:t}},D=l(function(t,a){return t===a}),g=D,E=function(t){return l(function(a,m){if(a.length!==m.length)return!1;for(var v=a.length,S=0;S<v;S++)if(!t.eq(a[S],m[S]))return!1;return!0})},T=function(t,a){return function(t,a){return l(function(m,v){return t.eq(a(m),a(v))})}(E(t),function(m){return function(t,a){return Array.prototype.slice.call(t).sort(a)}(m,a)})},n=function(t){return l(function(a,m){var v=Object.keys(a),S=Object.keys(m);if(!T(g).eq(v,S))return!1;for(var R=v.length,ee=0;ee<R;ee++){var Ee=v[ee];if(!t.eq(a[Ee],m[Ee]))return!1}return!0})},P=l(function(t,a){if(t===a)return!0;var m=I(t);return m===I(a)&&(function(t){return-1!==["undefined","boolean","number","string","function","xml","null"].indexOf(t)}(m)?t===a:"array"===m?E(P).eq(t,a):"object"===m&&n(P).eq(t,a))}),B=function(t){return function(a){return function(t){var a=typeof t;return null===t?"null":"object"===a&&(Array.prototype.isPrototypeOf(t)||t.constructor&&"Array"===t.constructor.name)?"array":"object"===a&&(String.prototype.isPrototypeOf(t)||t.constructor&&"String"===t.constructor.name)?"string":a}(a)===t}},Y=function(t){return function(a){return typeof a===t}},V=function(t){return function(a){return t===a}},ue=B("string"),he=B("object"),ae=B("array"),X=V(null),ve=Y("boolean"),ye=V(void 0),ge=function(t){return null==t},ne=function(t){return!ge(t)},pe=Y("function"),Pe=Y("number"),xe=function(){},de=function(t,a){return function(){for(var m=[],v=0;v<arguments.length;v++)m[v]=arguments[v];return t(a.apply(null,m))}},re=function(t,a){return function(m){return t(a(m))}},oe=function(t){return function(){return t}},me=function(t){return t},be=function(t,a){return t===a};function le(t){for(var a=[],m=1;m<arguments.length;m++)a[m-1]=arguments[m];return function(){for(var v=[],S=0;S<arguments.length;S++)v[S]=arguments[S];var R=a.concat(v);return t.apply(null,R)}}var t,a,Z=function(t){return function(a){return!t(a)}},j=function(t){return t()},ke=function(t){t()},Be=oe(!1),nt=oe(!0),mt=function(){return ut},ut={fold:function(v,S){return v()},isSome:Be,isNone:nt,getOr:a=me,getOrThunk:t=function(v){return v()},getOrDie:function(v){throw new Error(v||"error: getOrDie called on none.")},getOrNull:oe(null),getOrUndefined:oe(void 0),or:a,orThunk:t,map:mt,each:xe,bind:mt,exists:Be,forall:nt,filter:function(){return mt()},toArray:function(){return[]},toString:oe("none()")},Ve=function(t){var a=oe(t),m=function(){return S},v=function(R){return R(t)},S={fold:function(R,ee){return ee(t)},isSome:nt,isNone:Be,getOr:a,getOrThunk:a,getOrDie:a,getOrNull:a,getOrUndefined:a,or:m,orThunk:m,map:function(R){return Ve(R(t))},each:function(R){R(t)},bind:v,exists:v,forall:v,filter:function(R){return R(t)?S:ut},toArray:function(){return[t]},toString:function(){return"some("+t+")"}};return S},Ne={some:Ve,none:mt,from:function(t){return null==t?ut:Ve(t)}},wt=Array.prototype.slice,ft=Array.prototype.indexOf,Ct=Array.prototype.push,rn=function(t,a){return ft.call(t,a)},st=function(t,a){return rn(t,a)>-1},nn=function(t,a){for(var m=0,v=t.length;m<v;m++){if(a(t[m],m))return!0}return!1},Dn=function(t,a){for(var m=t.length,v=new Array(m),S=0;S<m;S++){var R=t[S];v[S]=a(R,S)}return v},Mn=function(t,a){for(var m=0,v=t.length;m<v;m++){a(t[m],m)}},vi=function(t,a){for(var m=t.length-1;m>=0;m--){a(t[m],m)}},Gi=function(t,a){for(var m=[],v=[],S=0,R=t.length;S<R;S++){var ee=t[S];(a(ee,S)?m:v).push(ee)}return{pass:m,fail:v}},mi=function(t,a){for(var m=[],v=0,S=t.length;v<S;v++){var R=t[v];a(R,v)&&m.push(R)}return m},wi=function(t,a,m){return vi(t,function(v,S){m=a(m,v,S)}),m},Bn=function(t,a,m){return Mn(t,function(v,S){m=a(m,v,S)}),m},kn=function(t,a,m){for(var v=0,S=t.length;v<S;v++){var R=t[v];if(a(R,v))return Ne.some(R);if(m(R,v))break}return Ne.none()},On=function(t,a){return kn(t,a,Be)},je=function(t,a){for(var m=0,v=t.length;m<v;m++){if(a(t[m],m))return Ne.some(m)}return Ne.none()},xn=function(t,a){return function(t){for(var a=[],m=0,v=t.length;m<v;++m){if(!ae(t[m]))throw new Error("Arr.flatten item "+m+" was not an array, input: "+t);Ct.apply(a,t[m])}return a}(Dn(t,a))},Fn=function(t,a){for(var m=0,v=t.length;m<v;++m){if(!0!==a(t[m],m))return!1}return!0},ui=function(t){var a=wt.call(t,0);return a.reverse(),a},Ai=function(t,a){return mi(t,function(m){return!st(a,m)})},Vi=function(t,a){var m=wt.call(t,0);return m.sort(a),m},Vn=function(t,a){return a>=0&&a<t.length?Ne.some(t[a]):Ne.none()},Hn=function(t){return Vn(t,0)},An=function(t){return Vn(t,t.length-1)},vn=pe(Array.from)?Array.from:function(t){return wt.call(t)},In=function(t,a){for(var m=0;m<t.length;m++){var v=a(t[m],m);if(v.isSome())return v}return Ne.none()},Zi=Object.keys,gr=Object.hasOwnProperty,Hi=function(t,a){for(var m=Zi(t),v=0,S=m.length;v<S;v++){var R=m[v];a(t[R],R)}},Gr=function(t,a){return zr(t,function(m,v){return{k:v,v:a(m,v)}})},zr=function(t,a){var m={};return Hi(t,function(v,S){var R=a(v,S);m[R.k]=R.v}),m},Eo=function(t){return function(a,m){t[m]=a}},mr=function(t,a,m,v){return Hi(t,function(R,ee){(a(R,ee)?m:v)(R,ee)}),{}},ct=function(t,a){var m={};return mr(t,a,Eo(m),xe),m},oi=function(t){return function(t,a){var m=[];return Hi(t,function(v,S){m.push(a(v,S))}),m}(t,me)},Ni=function(t,a){return Nn(t,a)?Ne.from(t[a]):Ne.none()},Nn=function(t,a){return gr.call(t,a)},pr=function(t,a){return Nn(t,a)&&void 0!==t[a]&&null!==t[a]},Pn=Array.isArray,ai=function(t,a,m){var v,S;if(!t)return!1;if(m=m||t,void 0!==t.length){for(v=0,S=t.length;v<S;v++)if(!1===a.call(m,t[v],v,t))return!1}else for(v in t)if(Nn(t,v)&&!1===a.call(m,t[v],v,t))return!1;return!0},hn=function(t,a){var m=[];return ai(t,function(v,S){m.push(a(v,S,t))}),m},Le=function(t,a){var m=[];return ai(t,function(v,S){(!a||a(v,S,t))&&m.push(v)}),m},ce=function(t,a){if(t)for(var m=0,v=t.length;m<v;m++)if(t[m]===a)return m;return-1},we=function(t,a,m,v){for(var S=ye(m)?t[0]:m,R=0;R<t.length;R++)S=a.call(v,S,t[R],R);return S},Qe=function(t,a,m){var v,S;for(v=0,S=t.length;v<S;v++)if(a.call(m,t[v],v,t))return v;return-1},qt=function(t){return t[t.length-1]},Tn=function(){return Tn=Object.assign||function(a){for(var m,v=1,S=arguments.length;v<S;v++)for(var R in m=arguments[v])Object.prototype.hasOwnProperty.call(m,R)&&(a[R]=m[R]);return a},Tn.apply(this,arguments)};function mo(t,a,m){if(m||2===arguments.length)for(var R,v=0,S=a.length;v<S;v++)(R||!(v in a))&&(R||(R=Array.prototype.slice.call(a,0,v)),R[v]=a[v]);return t.concat(R||Array.prototype.slice.call(a))}var rr=function(t){var m,a=!1;return function(){for(var v=[],S=0;S<arguments.length;S++)v[S]=arguments[S];return a||(a=!0,m=t.apply(null,v)),m}},an=function(){return Zn(0,0)},Zn=function(t,a){return{major:t,minor:a}},Ci={nu:Zn,detect:function(t,a){var m=String(a).toLowerCase();return 0===t.length?an():function(t,a){var m=function(t,a){for(var m=0;m<t.length;m++){var v=t[m];if(v.test(a))return v}}(t,a);if(!m)return{major:0,minor:0};var v=function(S){return Number(a.replace(m,"$"+S))};return Zn(v(1),v(2))}(t,m)},unknown:an},Et=function(t,a){var m=String(a).toLowerCase();return On(t,function(v){return v.search(m)})},wn=function(t,a){return-1!==t.indexOf(a)},Gn=function(t,a){return function(t,a,m){return""===a||t.length>=a.length&&t.substr(m,m+a.length)===a}(t,a,0)},xi=function(t){return function(a){return a.replace(t,"")}},Cr=xi(/^\s+|\s+$/g),Fr=xi(/^\s+/g),en=xi(/\s+$/g),Wn=function(t){return t.length>0},at=function(t){return!Wn(t)},It=/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,Qt=function(t){return function(a){return wn(a,t)}},St=[{name:"Edge",versionRegexes:[/.*?edge\/ ?([0-9]+)\.([0-9]+)$/],search:function(t){return wn(t,"edge/")&&wn(t,"chrome")&&wn(t,"safari")&&wn(t,"applewebkit")}},{name:"Chrome",brand:"Chromium",versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/,It],search:function(t){return wn(t,"chrome")&&!wn(t,"chromeframe")}},{name:"IE",versionRegexes:[/.*?msie\ ?([0-9]+)\.([0-9]+).*/,/.*?rv:([0-9]+)\.([0-9]+).*/],search:function(t){return wn(t,"msie")||wn(t,"trident")}},{name:"Opera",versionRegexes:[It,/.*?opera\/([0-9]+)\.([0-9]+).*/],search:Qt("opera")},{name:"Firefox",versionRegexes:[/.*?firefox\/\ ?([0-9]+)\.([0-9]+).*/],search:Qt("firefox")},{name:"Safari",versionRegexes:[It,/.*?cpu os ([0-9]+)_([0-9]+).*/],search:function(t){return(wn(t,"safari")||wn(t,"mobile/"))&&wn(t,"applewebkit")}}],Pt=[{name:"Windows",search:Qt("win"),versionRegexes:[/.*?windows\ nt\ ?([0-9]+)\.([0-9]+).*/]},{name:"iOS",search:function(t){return wn(t,"iphone")||wn(t,"ipad")},versionRegexes:[/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,/.*cpu os ([0-9]+)_([0-9]+).*/,/.*cpu iphone os ([0-9]+)_([0-9]+).*/]},{name:"Android",search:Qt("android"),versionRegexes:[/.*?android\ ?([0-9]+)\.([0-9]+).*/]},{name:"OSX",search:Qt("mac os x"),versionRegexes:[/.*?mac\ os\ x\ ?([0-9]+)_([0-9]+).*/]},{name:"Linux",search:Qt("linux"),versionRegexes:[]},{name:"Solaris",search:Qt("sunos"),versionRegexes:[]},{name:"FreeBSD",search:Qt("freebsd"),versionRegexes:[]},{name:"ChromeOS",search:Qt("cros"),versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/]}],cn={browsers:oe(St),oses:oe(Pt)},_r="Firefox",_o=function(t){var a=t.current,m=t.version,v=function(S){return function(){return a===S}};return{current:a,version:m,isEdge:v("Edge"),isChrome:v("Chrome"),isIE:v("IE"),isOpera:v("Opera"),isFirefox:v(_r),isSafari:v("Safari")}},Si={unknown:function(){return _o({current:void 0,version:Ci.unknown()})},nu:_o,edge:oe("Edge"),chrome:oe("Chrome"),ie:oe("IE"),opera:oe("Opera"),firefox:oe(_r),safari:oe("Safari")},to="Windows",Uo="Android",ps="Solaris",ts="FreeBSD",gs="ChromeOS",$a=function(t){var a=t.current,m=t.version,v=function(S){return function(){return a===S}};return{current:a,version:m,isWindows:v(to),isiOS:v("iOS"),isAndroid:v(Uo),isOSX:v("OSX"),isLinux:v("Linux"),isSolaris:v(ps),isFreeBSD:v(ts),isChromeOS:v(gs)}},ln={unknown:function(){return $a({current:void 0,version:Ci.unknown()})},nu:$a,windows:oe(to),ios:oe("iOS"),android:oe(Uo),linux:oe("Linux"),osx:oe("OSX"),solaris:oe(ps),freebsd:oe(ts),chromeos:oe(gs)},Di_detect=function(t,a,m){var v=cn.browsers(),S=cn.oses(),R=a.bind(function(Se){return function(t,a){return In(a.brands,function(m){var v=m.brand.toLowerCase();return On(t,function(S){var R;return v===(null===(R=S.brand)||void 0===R?void 0:R.toLowerCase())}).map(function(S){return{current:S.name,version:Ci.nu(parseInt(m.version,10),0)}})})}(v,Se)}).orThunk(function(){return function(t,a){return Et(t,a).map(function(m){var v=Ci.detect(m.versionRegexes,a);return{current:m.name,version:v}})}(v,t)}).fold(Si.unknown,Si.nu),ee=function(t,a){return Et(t,a).map(function(m){var v=Ci.detect(m.versionRegexes,a);return{current:m.name,version:v}})}(S,t).fold(ln.unknown,ln.nu),Ee=function(t,a,m,v){var S=t.isiOS()&&!0===/ipad/i.test(m),R=t.isiOS()&&!S,ee=t.isiOS()||t.isAndroid(),Ee=ee||v("(pointer:coarse)"),Se=S||!R&&ee&&v("(min-device-width:768px)"),pt=R||ee&&!Se,Gt=a.isSafari()&&t.isiOS()&&!1===/safari/i.test(m),jt=!pt&&!Se&&!Gt;return{isiPad:oe(S),isiPhone:oe(R),isTablet:oe(Se),isPhone:oe(pt),isTouch:oe(Ee),isAndroid:t.isAndroid,isiOS:t.isiOS,isWebView:oe(Gt),isDesktop:oe(jt)}}(ee,R,t,m);return{browser:R,os:ee,deviceType:Ee}},Er=function(t){return window.matchMedia(t).matches},ur=rr(function(){return Di_detect(navigator.userAgent,Ne.from(navigator.userAgentData),Er)}),gi=function(){return ur()},$t=navigator.userAgent,Ma=gi(),Vo=Ma.browser,Ds=Ma.os,ja=Ma.deviceType,wa=/WebKit/.test($t)&&!Vo.isEdge(),ns="FormData"in window&&"FileReader"in window&&"URL"in window&&!!URL.createObjectURL,Cs=-1!==$t.indexOf("Windows Phone"),$r={opera:Vo.isOpera(),webkit:wa,ie:!(!Vo.isIE()&&!Vo.isEdge())&&Vo.version.major,gecko:Vo.isFirefox(),mac:Ds.isOSX()||Ds.isiOS(),iOS:ja.isiPad()||ja.isiPhone(),android:Ds.isAndroid(),contentEditable:!0,transparentSrc:"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",caretAfter:!0,range:window.getSelection&&"Range"in window,documentMode:Vo.isIE()?document.documentMode||7:10,fileApi:ns,ceFalse:!0,cacheSuffix:null,container:null,experimentalShadowDom:!1,canHaveCSP:!Vo.isIE(),desktop:ja.isDesktop(),windowsPhone:Cs,browser:{current:Vo.current,version:Vo.version,isChrome:Vo.isChrome,isEdge:Vo.isEdge,isFirefox:Vo.isFirefox,isIE:Vo.isIE,isOpera:Vo.isOpera,isSafari:Vo.isSafari},os:{current:Ds.current,version:Ds.version,isAndroid:Ds.isAndroid,isChromeOS:Ds.isChromeOS,isFreeBSD:Ds.isFreeBSD,isiOS:Ds.isiOS,isLinux:Ds.isLinux,isOSX:Ds.isOSX,isSolaris:Ds.isSolaris,isWindows:Ds.isWindows},deviceType:{isDesktop:ja.isDesktop,isiPad:ja.isiPad,isiPhone:ja.isiPhone,isPhone:ja.isPhone,isTablet:ja.isTablet,isTouch:ja.isTouch,isWebView:ja.isWebView}},Ts=/^\s*|\s*$/g,Gl=function(t){return null==t?"":(""+t).replace(Ts,"")},ol=function(t,a){return a?!("array"!==a||!Pn(t))||typeof t===a:void 0!==t},ti=function(t,a,m,v){v=v||this,t&&(m&&(t=t[m]),ai(t,function(S,R){if(!1===a.call(v,S,R,m))return!1;ti(S,a,m,v)}))},Li={trim:Gl,isArray:Pn,is:ol,toArray:function(t){if(Pn(t))return t;for(var a=[],m=0,v=t.length;m<v;m++)a[m]=t[m];return a},makeMap:function(t,a,m){var v;for(a=a||",","string"==typeof(t=t||[])&&(t=t.split(a)),m=m||{},v=t.length;v--;)m[t[v]]={};return m},each:ai,map:hn,grep:Le,inArray:ce,hasOwn:Nn,extend:function(t){for(var a=[],m=1;m<arguments.length;m++)a[m-1]=arguments[m];for(var v=0;v<a.length;v++){var S=a[v];for(var R in S)if(Nn(S,R)){var ee=S[R];void 0!==ee&&(t[R]=ee)}}return t},create:function(t,a,m){var S,R,ee,v=this,Ee=0,Se=(t=/^((static) )?([\w.]+)(:([\w.]+))?/.exec(t))[3].match(/(^|\.)(\w+)$/i)[2],pt=v.createNS(t[3].replace(/\.\w+$/,""),m);if(!pt[Se]){if("static"===t[2])return pt[Se]=a,void(this.onCreate&&this.onCreate(t[2],t[3],pt[Se]));a[Se]||(a[Se]=function(){},Ee=1),pt[Se]=a[Se],v.extend(pt[Se].prototype,a),t[5]&&(S=v.resolve(t[5]).prototype,R=t[5].match(/\.(\w+)$/i)[1],ee=pt[Se],pt[Se]=Ee?function(){return S[R].apply(this,arguments)}:function(){return this.parent=S[R],ee.apply(this,arguments)},pt[Se].prototype[Se]=pt[Se],v.each(S,function(Gt,jt){pt[Se].prototype[jt]=S[jt]}),v.each(a,function(Gt,jt){S[jt]?pt[Se].prototype[jt]=function(){return this.parent=S[jt],Gt.apply(this,arguments)}:jt!==Se&&(pt[Se].prototype[jt]=Gt)})),v.each(a.static,function(Gt,jt){pt[Se][jt]=Gt})}},walk:ti,createNS:function(t,a){var m,v;for(a=a||window,t=t.split("."),m=0;m<t.length;m++)a[v=t[m]]||(a[v]={}),a=a[v];return a},resolve:function(t,a){var m,v;for(a=a||window,m=0,v=(t=t.split(".")).length;m<v&&(a=a[t[m]]);m++);return a},explode:function(t,a){return!t||ol(t,"array")?t:hn(t.split(a||","),Gl)},_addCacheSuffix:function(t){var a=$r.cacheSuffix;return a&&(t+=(-1===t.indexOf("?")?"?":"&")+a),t}},is=function(t){if(null==t)throw new Error("Node cannot be null or undefined");return{dom:t}},Dt={fromHtml:function(t,a){var v=(a||document).createElement("div");if(v.innerHTML=t,!v.hasChildNodes()||v.childNodes.length>1)throw console.error("HTML does not have a single root node",t),new Error("HTML must have a single root node");return is(v.childNodes[0])},fromTag:function(t,a){var v=(a||document).createElement(t);return is(v)},fromText:function(t,a){var v=(a||document).createTextNode(t);return is(v)},fromDom:is,fromPoint:function(t,a,m){return Ne.from(t.dom.elementFromPoint(a,m)).map(is)}},We=function(t,a){var m=[],v=function(R){return m.push(R),a(R)},S=a(t);do{S=S.bind(v)}while(S.isSome());return m},qr=function(t,a){var m=t.dom;if(1!==m.nodeType)return!1;var v=m;if(void 0!==v.matches)return v.matches(a);if(void 0!==v.msMatchesSelector)return v.msMatchesSelector(a);if(void 0!==v.webkitMatchesSelector)return v.webkitMatchesSelector(a);if(void 0!==v.mozMatchesSelector)return v.mozMatchesSelector(a);throw new Error("Browser lacks native selectors")},ho=function(t){return 1!==t.nodeType&&9!==t.nodeType&&11!==t.nodeType||0===t.childElementCount},Ao=function(t,a){return t.dom===a.dom},Ho=function(t,a){return function(t,a){return function(t,a,m){return 0!=(t.compareDocumentPosition(a)&m)}(t,a,Node.DOCUMENT_POSITION_CONTAINED_BY)}(t.dom,a.dom)},Ra=function(t,a){return gi().browser.isIE()?Ho(t,a):function(t,a){var m=t.dom,v=a.dom;return m!==v&&m.contains(v)}(t,a)};typeof window<"u"||Function("return this;")();var ba=function(t){return t.dom.nodeName.toLowerCase()},Jt=function(t){return t.dom.nodeType},De=function(t){return function(a){return Jt(a)===t}},Xt=De(1),Qi=De(3),Kt=De(9),Fe=De(11),yi=function(t){return Dt.fromDom(t.dom.ownerDocument)},Ki=function(t){return Kt(t)?t:yi(t)},Na=function(t){return Dt.fromDom(Ki(t).dom.defaultView)},qi=function(t){return Ne.from(t.dom.parentNode).map(Dt.fromDom)},su=function(t){return Ne.from(t.dom.previousSibling).map(Dt.fromDom)},Us=function(t){return Ne.from(t.dom.nextSibling).map(Dt.fromDom)},Ka=function(t){return ui(We(t,su))},Tc=function(t){return We(t,Us)},Qs=function(t){return Dn(t.dom.childNodes,Dt.fromDom)},vu=function(t,a){var m=t.dom.childNodes;return Ne.from(m[a]).map(Dt.fromDom)},hl=function(t){return vu(t,0)},Wl=function(t){return vu(t,t.dom.childNodes.length-1)},sp=function(t){return t.dom.childNodes.length},Da=function(t){return Fe(t)&&ne(t.dom.host)},Pl=pe(Element.prototype.attachShadow)&&pe(Node.prototype.getRootNode),gl=oe(Pl),ss=Pl?function(t){return Dt.fromDom(t.dom.getRootNode())}:Ki,gc=function(t){return Da(t)?t:function(t){var a=t.dom.head;if(null==a)throw new Error("Head is not available yet");return Dt.fromDom(a)}(Ki(t))},Pc=function(t){return Dt.fromDom(t.dom.host)},Ol=function(t){return ne(t.dom.shadowRoot)},_c=function(t,a){qi(t).each(function(v){v.dom.insertBefore(a.dom,t.dom)})},Yc=function(t,a){Us(t).fold(function(){qi(t).each(function(S){ac(S,a)})},function(v){_c(v,a)})},lu=function(t,a){hl(t).fold(function(){ac(t,a)},function(v){t.dom.insertBefore(a.dom,v.dom)})},ac=function(t,a){t.dom.appendChild(a.dom)},Oc=function(t,a){Mn(a,function(m){ac(t,m)})},or=function(t){t.dom.textContent="",Mn(Qs(t),function(a){Dr(a)})},Dr=function(t){var a=t.dom;null!==a.parentNode&&a.parentNode.removeChild(a)},kr=function(t){var a=Qs(t);a.length>0&&function(t,a){Mn(a,function(m){_c(t,m)})}(t,a),Dr(t)},Qo=function(t){var a=Qi(t)?t.dom.parentNode:t.dom;if(null==a||null===a.ownerDocument)return!1;var m=a.ownerDocument;return function(t){var a=ss(t);return Da(a)?Ne.some(a):Ne.none()}(Dt.fromDom(a)).fold(function(){return m.body.contains(a)},re(Qo,Pc))},oo=function(t,a){return{left:t,top:a,translate:function(v,S){return oo(t+v,a+S)}}},da=oo,Ia=function(t,a){return void 0!==t?t:void 0!==a?a:0},Rs=function(t){var a=t.dom,v=a.ownerDocument.body;return v===a?da(v.offsetLeft,v.offsetTop):Qo(t)?function(t){var a=t.getBoundingClientRect();return da(a.left,a.top)}(a):da(0,0)},xc=function(t){var a=void 0!==t?t.dom:document,m=a.body.scrollLeft||a.documentElement.scrollLeft,v=a.body.scrollTop||a.documentElement.scrollTop;return da(m,v)},Hc=function(t,a,m){var S=(void 0!==m?m.dom:document).defaultView;S&&S.scrollTo(t,a)},lp=function(t,a){gi().browser.isSafari()&&pe(t.dom.scrollIntoViewIfNeeded)?t.dom.scrollIntoViewIfNeeded(!1):t.dom.scrollIntoView(a)},Ju=function(t,a,m,v){return{x:t,y:a,width:m,height:v,right:t+m,bottom:a+v}},Su=function(t){var a=void 0===t?window:t,m=a.document,v=xc(Dt.fromDom(m));return function(t){var a=void 0===t?window:t;return gi().browser.isFirefox()?Ne.none():Ne.from(a.visualViewport)}(a).fold(function(){var S=a.document.documentElement,R=S.clientWidth,ee=S.clientHeight;return Ju(v.left,v.top,R,ee)},function(S){return Ju(Math.max(S.pageLeft,v.left),Math.max(S.pageTop,v.top),S.width,S.height)})},qs=function(t){return function(a){return!!a&&a.nodeType===t}},Cd=function(t){return!!t&&!Object.getPrototypeOf(t)},la=qs(1),ht=function(t){var a=t.map(function(m){return m.toLowerCase()});return function(m){if(m&&m.nodeName){var v=m.nodeName.toLowerCase();return st(a,v)}return!1}},Ke=function(t,a){var m=a.toLowerCase().split(" ");return function(v){if(la(v))for(var S=0;S<m.length;S++){var R=v.ownerDocument.defaultView.getComputedStyle(v,null);if((R?R.getPropertyValue(t):null)===m[S])return!0}return!1}},dn=function(t){return function(a){return la(a)&&a.hasAttribute(t)}},$i=function(t){return la(t)&&t.hasAttribute("data-mce-bogus")},lo=function(t){return la(t)&&"TABLE"===t.tagName},ga=function(t){return function(a){return!(!la(a)||a.contentEditable!==t&&a.getAttribute("data-mce-contenteditable")!==t)}},Zs=ht(["textarea","input"]),Kr=qs(3),os=qs(8),_s=qs(9),ra=qs(11),_a=ht(["br"]),xl=ht(["img"]),$l=ga("true"),Os=ga("false"),yu=ht(["td","th"]),Ks=ht(["video","audio","object","embed"]),_l=function(t,a,m){return void 0===m&&(m=be),t.exists(function(v){return m(v,a)})},Gs=function(t,a,m){return t.isSome()&&a.isSome()?Ne.some(m(t.getOrDie(),a.getOrDie())):Ne.none()},vl=function(t){return void 0!==t.style&&pe(t.style.getPropertyValue)},Lc=function(t,a,m){if(!(ue(m)||ve(m)||Pe(m)))throw console.error("Invalid call to Attribute.set. Key ",a,":: Value ",m,":: Element ",t),new Error("Attribute value was not simple");t.setAttribute(a,m+"")},Xe=function(t,a,m){Lc(t.dom,a,m)},zt=function(t,a){var m=t.dom;Hi(a,function(v,S){Lc(m,S,v)})},mn=function(t,a){var m=t.dom.getAttribute(a);return null===m?void 0:m},ni=function(t,a){return Ne.from(mn(t,a))},nr=function(t,a){t.dom.removeAttribute(a)},Ca=function(t,a){var m=t.dom;Hi(a,function(v,S){!function(t,a,m){if(!ue(m))throw console.error("Invalid call to CSS.set. Property ",a,":: Value ",m,":: Element ",t),new Error("CSS value must be a string: "+m);vl(t)&&t.style.setProperty(a,m)}(m,S,v)})},Ba=function(t,a){var m=t.dom,S=window.getComputedStyle(m).getPropertyValue(a);return""!==S||Qo(t)?S:Is(m,a)},Is=function(t,a){return vl(t)?t.style.getPropertyValue(a):""},ul=function(t,a){var m=t.dom,v=Is(m,a);return Ne.from(v).filter(function(S){return S.length>0})},bu=function(t){var a={},m=t.dom;if(vl(m))for(var v=0;v<m.style.length;v++){var S=m.style.item(v);a[S]=m.style[S]}return a},Qu=gi().browser,_t=function(t){return On(t,Xt)},W=function(t,a){return t.children&&st(t.children,a)},dt=function(t,a,m){var v=0,S=0,R=t.ownerDocument;if(m=m||t,a){if(m===t&&a.getBoundingClientRect&&"static"===Ba(Dt.fromDom(t),"position")){var ee=a.getBoundingClientRect();return{x:v=ee.left+(R.documentElement.scrollLeft||t.scrollLeft)-R.documentElement.clientLeft,y:S=ee.top+(R.documentElement.scrollTop||t.scrollTop)-R.documentElement.clientTop}}for(var Ee=a;Ee&&Ee!==m&&Ee.nodeType&&!W(Ee,m);){var Se=Ee;v+=Se.offsetLeft||0,S+=Se.offsetTop||0,Ee=Se.offsetParent}for(Ee=a.parentNode;Ee&&Ee!==m&&Ee.nodeType&&!W(Ee,m);)v-=Ee.scrollLeft||0,S-=Ee.scrollTop||0,Ee=Ee.parentNode;S+=function(t){return Qu.isFirefox()&&"table"===ba(t)?_t(Qs(t)).filter(function(a){return"caption"===ba(a)}).bind(function(a){return _t(Tc(a)).map(function(m){var v=m.dom.offsetTop,S=a.dom.offsetTop,R=a.dom.offsetHeight;return v<=S?-R:0})}).getOr(0):0}(Dt.fromDom(a))}return{x:v,y:S}},fn={},Ei={exports:fn};!function(t,a,m,v){var S,R;S=this,R=function(){var pt,S=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},R={exports:{}};pt=R,function(Gt){var jt=setTimeout;function on(){}function Yn(Oi){if("object"!=typeof this)throw new TypeError("Promises must be constructed via new");if("function"!=typeof Oi)throw new TypeError("not a function");this._state=0,this._handled=!1,this._value=void 0,this._deferreds=[],Wi(Oi,this)}function $n(Oi,cr){for(;3===Oi._state;)Oi=Oi._value;0!==Oi._state?(Oi._handled=!0,Yn._immediateFn(function(){var Ur=1===Oi._state?cr.onFulfilled:cr.onRejected;if(null!==Ur){var no;try{no=Ur(Oi._value)}catch(es){return void bi(cr.promise,es)}qn(cr.promise,no)}else(1===Oi._state?qn:bi)(cr.promise,Oi._value)})):Oi._deferreds.push(cr)}function qn(Oi,cr){try{if(cr===Oi)throw new TypeError("A promise cannot be resolved with itself.");if(cr&&("object"==typeof cr||"function"==typeof cr)){var Ur=cr.then;if(cr instanceof Yn)return Oi._state=3,Oi._value=cr,void pi(Oi);if("function"==typeof Ur)return void Wi(function Rn(Oi,cr){return function(){Oi.apply(cr,arguments)}}(Ur,cr),Oi)}Oi._state=1,Oi._value=cr,pi(Oi)}catch(no){bi(Oi,no)}}function bi(Oi,cr){Oi._state=2,Oi._value=cr,pi(Oi)}function pi(Oi){2===Oi._state&&0===Oi._deferreds.length&&Yn._immediateFn(function(){Oi._handled||Yn._unhandledRejectionFn(Oi._value)});for(var cr=0,Ur=Oi._deferreds.length;cr<Ur;cr++)$n(Oi,Oi._deferreds[cr]);Oi._deferreds=null}function tr(Oi,cr,Ur){this.onFulfilled="function"==typeof Oi?Oi:null,this.onRejected="function"==typeof cr?cr:null,this.promise=Ur}function Wi(Oi,cr){var Ur=!1;try{Oi(function(no){Ur||(Ur=!0,qn(cr,no))},function(no){Ur||(Ur=!0,bi(cr,no))})}catch(no){if(Ur)return;Ur=!0,bi(cr,no)}}Yn.prototype.catch=function(Oi){return this.then(null,Oi)},Yn.prototype.then=function(Oi,cr){var Ur=new this.constructor(on);return $n(this,new tr(Oi,cr,Ur)),Ur},Yn.all=function(Oi){var cr=Array.prototype.slice.call(Oi);return new Yn(function(Ur,no){if(0===cr.length)return Ur([]);var es=cr.length;function Xo(qa,po){try{if(po&&("object"==typeof po||"function"==typeof po)){var Wo=po.then;if("function"==typeof Wo)return void Wo.call(po,function(vo){Xo(qa,vo)},no)}cr[qa]=po,0==--es&&Ur(cr)}catch(vo){no(vo)}}for(var Wr=0;Wr<cr.length;Wr++)Xo(Wr,cr[Wr])})},Yn.resolve=function(Oi){return Oi&&"object"==typeof Oi&&Oi.constructor===Yn?Oi:new Yn(function(cr){cr(Oi)})},Yn.reject=function(Oi){return new Yn(function(cr,Ur){Ur(Oi)})},Yn.race=function(Oi){return new Yn(function(cr,Ur){for(var no=0,es=Oi.length;no<es;no++)Oi[no].then(cr,Ur)})},Yn._immediateFn="function"==typeof setImmediate?function(Oi){setImmediate(Oi)}:function(Oi){jt(Oi,0)},Yn._unhandledRejectionFn=function(cr){typeof console<"u"&&console&&console.warn("Possible Unhandled Promise Rejection:",cr)},Yn._setImmediateFn=function(cr){Yn._immediateFn=cr},Yn._setUnhandledRejectionFn=function(cr){Yn._unhandledRejectionFn=cr},pt.exports?pt.exports=Yn:Gt.Promise||(Gt.Promise=Yn)}(S);var ee=R.exports;return{boltExport:(typeof window<"u"?window:Function("return this;")()).Promise||ee}},"object"==typeof a&&typeof m<"u"?m.exports=R():(S=typeof globalThis<"u"?globalThis:S||self).EphoxContactWrapper=R()}(0,fn,Ei);var Po=Ei.exports.boltExport,En=function(t){var a=Ne.none(),m=[],S=function(pt){ee()?Se(pt):m.push(pt)},ee=function(){return a.isSome()},Ee=function(pt){Mn(pt,Se)},Se=function(pt){a.each(function(Gt){setTimeout(function(){pt(Gt)},0)})};return t(function(pt){ee()||(a=Ne.some(pt),Ee(m),m=[])}),{get:S,map:function(pt){return En(function(Gt){S(function(jt){Gt(pt(jt))})})},isReady:ee}},Au={nu:En,pure:function(t){return En(function(a){a(t)})}},kc=function(t){setTimeout(function(){throw t},0)},cs=function(t){var a=function(Se){t().then(Se,kc)};return{map:function(Se){return cs(function(){return t().then(Se)})},bind:function(Se){return cs(function(){return t().then(function(pt){return Se(pt).toPromise()})})},anonBind:function(Se){return cs(function(){return t().then(function(){return Se.toPromise()})})},toLazy:function(){return Au.nu(a)},toCached:function(){var Se=null;return cs(function(){return null===Se&&(Se=t()),Se})},toPromise:t,get:a}},sd_nu=function(t){return cs(function(){return new Po(t)})},Cu=function(t,a){return a(function(m){var v=[],S=0;0===t.length?m([]):Mn(t,function(ee,Ee){ee.get(function(ee){return function(Ee){v[ee]=Ee,++S>=t.length&&m(v)}}(Ee))})})},Rd=function(t){return{isValue:nt,isError:Be,getOr:oe(t),getOrThunk:oe(t),getOrDie:oe(t),or:function(jt){return Rd(t)},orThunk:function(jt){return Rd(t)},fold:function(jt,on){return on(t)},map:function(jt){return Rd(jt(t))},mapError:function(jt){return Rd(t)},each:function(jt){jt(t)},bind:function(jt){return jt(t)},exists:function(jt){return jt(t)},forall:function(jt){return jt(t)},toOptional:function(){return Ne.some(t)}}},Bu=function(t){return{isValue:Be,isError:nt,getOr:me,getOrThunk:function(pt){return pt()},getOrDie:function(){return function(t){return function(){throw new Error(t)}}(String(t))()},or:me,orThunk:function(pt){return pt()},fold:function(pt,Gt){return pt(t)},map:function(pt){return Bu(t)},mapError:function(pt){return Bu(pt(t))},each:xe,bind:function(pt){return Bu(t)},exists:Be,forall:nt,toOptional:Ne.none}},vc={value:Rd,error:Bu,fromOption:function(t,a){return t.fold(function(){return Bu(a)},Rd)}},Go_generate=function(t){if(!ae(t))throw new Error("cases must be an array");if(0===t.length)throw new Error("there must be at least one case");var a=[],m={};return Mn(t,function(v,S){var R=Zi(v);if(1!==R.length)throw new Error("one and only one name per case");var ee=R[0],Ee=v[ee];if(void 0!==m[ee])throw new Error("duplicate key detected:"+ee);if("cata"===ee)throw new Error("cannot have a case named cata (sorry)");if(!ae(Ee))throw new Error("case arguments must be an array");a.push(ee),m[ee]=function(){for(var Se=[],pt=0;pt<arguments.length;pt++)Se[pt]=arguments[pt];var Gt=Se.length;if(Gt!==Ee.length)throw new Error("Wrong number of arguments to case "+ee+". Expected "+Ee.length+" ("+Ee+"), got "+Gt);return{fold:function(){for(var on=[],Rn=0;Rn<arguments.length;Rn++)on[Rn]=arguments[Rn];if(on.length!==t.length)throw new Error("Wrong number of arguments to fold. Expected "+t.length+", got "+on.length);return on[S].apply(null,Se)},match:function(on){var Rn=Zi(on);if(a.length!==Rn.length)throw new Error("Wrong number of arguments to match. Expected: "+a.join(",")+"\nActual: "+Rn.join(","));if(!Fn(a,function($n){return st(Rn,$n)}))throw new Error("Not all branches were specified when using match. Specified: "+Rn.join(", ")+"\nRequired: "+a.join(", "));return on[ee].apply(null,Se)},log:function(on){console.log(on,{constructors:a,constructor:ee,params:Se})}}}}),m};Go_generate([{bothErrors:["error1","error2"]},{firstError:["error1","value2"]},{secondError:["value1","error2"]},{bothValues:["value1","value2"]}]);var Md=function(t){return t.fold(me,me)};function Mm(t,a,m,v,S){return t(m,v)?Ne.some(m):pe(S)&&S(m)?Ne.none():a(m,v,S)}var Vc,nu,Va,mp,M_,Wp,X_,fp,Bh,Uh,ev,zh,Tf,xf,Ud,Rp,Kf,jo,am=function(t,a,m){for(var v=t.dom,S=pe(m)?m:Be;v.parentNode;){v=v.parentNode;var R=Dt.fromDom(v);if(a(R))return Ne.some(R);if(S(R))break}return Ne.none()},Ef=function(t,a,m){return Mm(function(S,R){return R(S)},am,t,a,m)},yc=function(t,a){return On(t.dom.childNodes,function(S){return a(Dt.fromDom(S))}).map(Dt.fromDom)},Eu=function(t,a,m){return am(t,function(v){return qr(v,a)},m)},Mu=function(t,a){return function(t,a){var m=void 0===a?document:a.dom;return ho(m)?Ne.none():Ne.from(m.querySelector(t)).map(Dt.fromDom)}(a,t)},ws=function(t,a,m){return Mm(function(S,R){return qr(S,R)},Eu,t,a,m)},Ll=window.Promise?window.Promise:Po,Uu=function(t,a){return"number"!=typeof a&&(a=0),setTimeout(t,a)},et=function(t,a){return"number"!=typeof a&&(a=1),setInterval(t,a)},xt=function(t,a){var m,v=function(){for(var S=[],R=0;R<arguments.length;R++)S[R]=arguments[R];clearTimeout(m),m=Uu(function(){t.apply(this,S)},a)};return v.stop=function(){clearTimeout(m)},v},Ht={requestAnimationFrame:function(t,a){Vc?Vc.then(t):Vc=new Ll(function(m){a||(a=document.body),function(t,a){for(var m=window.requestAnimationFrame,v=["ms","moz","webkit"],R=0;R<v.length&&!m;R++)m=window[v[R]+"RequestAnimationFrame"];m||(m=function(ee){window.setTimeout(ee,0)}),m(t,a)}(m,a)}).then(t)},setTimeout:Uu,setInterval:et,setEditorTimeout:function(t,a,m){return Uu(function(){t.removed||a()},m)},setEditorInterval:function(t,a,m){var v=et(function(){t.removed?clearInterval(v):a()},m);return v},debounce:xt,throttle:xt,clearInterval:function(t){return clearInterval(t)},clearTimeout:function(t){return clearTimeout(t)}},_n=function(t,a){void 0===a&&(a={});var m=0,v={},S=Dt.fromDom(t),R=Ki(S),ee=a.maxLoadTime||5e3,jt=function(qn,bi,pi){var tr,Wi=Li._addCacheSuffix(qn),Oi=function(qn){return Ni(v,qn).getOrThunk(function(){return{id:"mce-u"+m++,passed:[],failed:[],count:0}})}(Wi);v[Wi]=Oi,Oi.count++;var cr=function(po,Wo){for(var vo=po.length;vo--;)po[vo]();Oi.status=Wo,Oi.passed=[],Oi.failed=[],tr&&(tr.onload=null,tr.onerror=null,tr=null)},Ur=function(){return cr(Oi.passed,2)},no=function(){return cr(Oi.failed,3)},Xo=function(){var po,Wo;po=function(){for(var po=t.styleSheets,Wo=po.length;Wo--;){var So=po[Wo].ownerNode;if(So&&So.id===tr.id)return Ur(),!0}return!1},Wo=Xo,po()||(Date.now()-qa<ee?Ht.setTimeout(Wo):no())};if(bi&&Oi.passed.push(bi),pi&&Oi.failed.push(pi),1!==Oi.status){if(2===Oi.status)return void Ur();if(3===Oi.status)return void no();Oi.status=1;var Wr=Dt.fromTag("link",R.dom);zt(Wr,{rel:"stylesheet",type:"text/css",id:Oi.id});var qa=Date.now();a.contentCssCors&&Xe(Wr,"crossOrigin","anonymous"),a.referrerPolicy&&Xe(Wr,"referrerpolicy",a.referrerPolicy),(tr=Wr.dom).onload=Xo,tr.onerror=no,function(qn){ac(gc(S),qn)}(Wr),Xe(Wr,"href",Wi)}},on=function(qn){return sd_nu(function(bi){jt(qn,de(bi,oe(vc.value(qn))),de(bi,oe(vc.error(qn))))})},Yn=function(qn){var bi=Li._addCacheSuffix(qn);Ni(v,bi).each(function(pi){0===--pi.count&&(delete v[bi],function(qn){var bi=gc(S);Mu(bi,"#"+qn).each(Dr)}(pi.id))})};return{load:jt,loadAll:function(qn,bi,pi){(function(t){return Cu(t,sd_nu)})(Dn(qn,on)).get(function(tr){var Wi=Gi(tr,function(Oi){return Oi.isValue()});Wi.fail.length>0?pi(Wi.fail.map(Md)):bi(Wi.pass.map(Md))})},unload:Yn,unloadAll:function(qn){Mn(qn,function(bi){Yn(bi)})},_setReferrerPolicy:function(qn){a.referrerPolicy=qn}}},dr=function(){var t=new WeakMap;return{forElement:function(m,v){var R=ss(m).dom;return Ne.from(t.get(R)).getOrThunk(function(){var ee=_n(R,v);return t.set(R,ee),ee})}}}(),Sr=function(){function t(a,m){this.node=a,this.rootNode=m,this.current=this.current.bind(this),this.next=this.next.bind(this),this.prev=this.prev.bind(this),this.prev2=this.prev2.bind(this)}return t.prototype.current=function(){return this.node},t.prototype.next=function(a){return this.node=this.findSibling(this.node,"firstChild","nextSibling",a),this.node},t.prototype.prev=function(a){return this.node=this.findSibling(this.node,"lastChild","previousSibling",a),this.node},t.prototype.prev2=function(a){return this.node=this.findPreviousNode(this.node,"lastChild","previousSibling",a),this.node},t.prototype.findSibling=function(a,m,v,S){var R,ee;if(a){if(!S&&a[m])return a[m];if(a!==this.rootNode){if(R=a[v])return R;for(ee=a.parentNode;ee&&ee!==this.rootNode;ee=ee.parentNode)if(R=ee[v])return R}}},t.prototype.findPreviousNode=function(a,m,v,S){var R,ee,Ee;if(a){if(R=a[v],this.rootNode&&R===this.rootNode)return;if(R){if(!S)for(Ee=R[m];Ee;Ee=Ee[m])if(!Ee[m])return Ee;return R}if((ee=a.parentNode)&&ee!==this.rootNode)return ee}},t}(),ld=function(t){var a;return function(m){return a=a||function(t,a){for(var m={},v=0,S=t.length;v<S;v++){var R=t[v];m[String(R)]=a(R,v)}return m}(t,nt),Nn(a,ba(m))}},qo=ld(["h1","h2","h3","h4","h5","h6"]),ll=ld(["article","aside","details","div","dt","figcaption","footer","form","fieldset","header","hgroup","html","main","nav","section","summary","body","p","dl","multicol","dd","figure","address","center","blockquote","h1","h2","h3","h4","h5","h6","listing","xmp","pre","plaintext","menu","dir","ul","ol","li","hr","table","tbody","thead","tfoot","th","tr","td","caption"]),Hl=function(t){return Xt(t)&&!ll(t)},Fd=function(t){return Xt(t)&&"br"===ba(t)},qu=ld(["h1","h2","h3","h4","h5","h6","p","div","address","pre","form","blockquote","center","dir","fieldset","header","footer","article","section","hgroup","aside","nav","figure"]),Zc=ld(["ul","ol","dl"]),uu=ld(["li","dd","dt"]),Es=ld(["thead","tbody","tfoot"]),mc=ld(["td","th"]),Yp=ld(["pre","script","textarea","style"]),Pu="\xa0",Ti="\ufeff",du=function(t){return"\ufeff"===t},Kc=function(t){return t.replace(/\uFEFF/g,"")},Wd=la,Vl=Kr,bl=function(t){return Vl(t)&&(t=t.parentNode),Wd(t)&&t.hasAttribute("data-mce-caret")},Sl=function(t){return Vl(t)&&du(t.data)},Nd=function(t){return bl(t)||Sl(t)},Hp=function(t){return t.firstChild!==t.lastChild||!_a(t.firstChild)},ta=function(t){var a=t.container();return!!Kr(a)&&(a.data.charAt(t.offset())===Ti||t.isAtStart()&&Sl(a.previousSibling))},pu=function(t){var a=t.container();return!!Kr(a)&&(a.data.charAt(t.offset()-1)===Ti||t.isAtEnd()&&Sl(a.nextSibling))},Tu=function(t,a,m){var S=a.ownerDocument.createElement(t);S.setAttribute("data-mce-caret",m?"before":"after"),S.setAttribute("data-mce-bogus","all"),S.appendChild(function(){var t=document.createElement("br");return t.setAttribute("data-mce-bogus","1"),t}());var R=a.parentNode;return m?R.insertBefore(S,a):a.nextSibling?R.insertBefore(S,a.nextSibling):R.appendChild(S),S},cp=function(t){return Vl(t)&&t.data[0]===Ti},Ql=function(t){return Vl(t)&&t.data[t.data.length-1]===Ti},Ro=function(t){return t&&t.hasAttribute("data-mce-caret")?(function(t){var a=t.getElementsByTagName("br"),m=a[a.length-1];$i(m)&&m.parentNode.removeChild(m)}(t),t.removeAttribute("data-mce-caret"),t.removeAttribute("data-mce-bogus"),t.removeAttribute("style"),t.removeAttribute("_moz_abspos"),t):null},Fo=function(t){return bl(t.startContainer)},vs=$l,_e=Os,$e=_a,Tt=Kr,Me=ht(["script","style","textarea"]),N=ht(["img","input","textarea","hr","iframe","video","audio","object","embed"]),O=ht(["table"]),Ce=Nd,Je=function(t){return!Ce(t)&&(Tt(t)?!Me(t.parentNode):N(t)||$e(t)||O(t)||Rr(t))},Rr=function(t){return!1===function(t){return la(t)&&"true"===t.getAttribute("unselectable")}(t)&&_e(t)},Ws=function(t,a){return Je(t)&&function(t,a){for(t=t.parentNode;t&&t!==a;t=t.parentNode){if(Rr(t))return!1;if(vs(t))return!0}return!0}(t,a)},tu=/^[ \t\r\n]*$/,Sc=function(t){return tu.test(t)},Um=function(t,a){var m=Dt.fromDom(a);return function(t,a,m){return Eu(t,a,m).isSome()}(Dt.fromDom(t),"pre,code",le(Ao,m))},us=function(t,a){return Je(t)&&!1===function(t,a){return Kr(t)&&Sc(t.data)&&!1===Um(t,a)}(t,a)||function(t){return la(t)&&"A"===t.nodeName&&!t.hasAttribute("href")&&(t.hasAttribute("name")||t.hasAttribute("id"))}(t)||Gg(t)},Gg=dn("data-mce-bookmark"),cd=dn("data-mce-bogus"),ds=function(t,a){return function(m){return la(m)&&m.getAttribute(t)===a}}("data-mce-bogus","all"),Ns=function(t,a){return void 0===a&&(a=!0),function(t,a){var m=0;if(us(t,t))return!1;var v=t.firstChild;if(!v)return!0;var S=new Sr(v,t);do{if(a){if(ds(v)){v=S.next(!0);continue}if(cd(v)){v=S.next();continue}}if(_a(v))m++,v=S.next();else{if(us(v,t))return!1;v=S.next()}}while(v);return m<=1}(t.dom,a)},rc=function(t,a){return ne(t)&&(us(t,a)||Hl(Dt.fromDom(t)))},Xu=function(t){return function(t){return"span"===t.nodeName.toLowerCase()}(t)&&"bookmark"===t.getAttribute("data-mce-type")},Td=function(t,a){return Kr(t)&&t.data.length>0&&function(t,a){var m=new Sr(t,a).prev(!1),v=new Sr(t,a).next(!1),S=ye(m)||rc(m,a),R=ye(v)||rc(v,a);return S&&R}(t,a)},Vp=function(t,a,m){var v=m||a;if(la(a)&&Xu(a))return a;for(var S=a.childNodes,R=S.length-1;R>=0;R--)Vp(t,S[R],v);if(la(a)){var ee=a.childNodes;1===ee.length&&Xu(ee[0])&&a.parentNode.insertBefore(ee[0],a)}return!function(t){return ra(t)||_s(t)}(a)&&!us(a,v)&&!function(t){return!!la(t)&&t.childNodes.length>0}(a)&&!Td(a,v)&&t.remove(a),a},Wg=Li.makeMap,ql=/[&<>\"\u0060\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,Bd=/[<>&\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,Xl=/[<>&\"\']/g,gh=/&#([a-z0-9]+);?|&([a-z0-9]+);/gi,Zp={128:"\u20ac",130:"\u201a",131:"\u0192",132:"\u201e",133:"\u2026",134:"\u2020",135:"\u2021",136:"\u02c6",137:"\u2030",138:"\u0160",139:"\u2039",140:"\u0152",142:"\u017d",145:"\u2018",146:"\u2019",147:"\u201c",148:"\u201d",149:"\u2022",150:"\u2013",151:"\u2014",152:"\u02dc",153:"\u2122",154:"\u0161",155:"\u203a",156:"\u0153",158:"\u017e",159:"\u0178"},$d={'"':"&quot;","'":"&#39;","<":"&lt;",">":"&gt;","&":"&amp;","`":"&#96;"},dd={"&lt;":"<","&gt;":">","&amp;":"&","&quot;":'"',"&apos;":"'"},up=function(t,a){var m,v,S,R={};if(t){for(t=t.split(","),a=a||10,m=0;m<t.length;m+=2)v=String.fromCharCode(parseInt(t[m],a)),$d[v]||(S="&"+t[m+1]+";",R[v]=S,R[S]=v);return R}},jd=up("50,nbsp,51,iexcl,52,cent,53,pound,54,curren,55,yen,56,brvbar,57,sect,58,uml,59,copy,5a,ordf,5b,laquo,5c,not,5d,shy,5e,reg,5f,macr,5g,deg,5h,plusmn,5i,sup2,5j,sup3,5k,acute,5l,micro,5m,para,5n,middot,5o,cedil,5p,sup1,5q,ordm,5r,raquo,5s,frac14,5t,frac12,5u,frac34,5v,iquest,60,Agrave,61,Aacute,62,Acirc,63,Atilde,64,Auml,65,Aring,66,AElig,67,Ccedil,68,Egrave,69,Eacute,6a,Ecirc,6b,Euml,6c,Igrave,6d,Iacute,6e,Icirc,6f,Iuml,6g,ETH,6h,Ntilde,6i,Ograve,6j,Oacute,6k,Ocirc,6l,Otilde,6m,Ouml,6n,times,6o,Oslash,6p,Ugrave,6q,Uacute,6r,Ucirc,6s,Uuml,6t,Yacute,6u,THORN,6v,szlig,70,agrave,71,aacute,72,acirc,73,atilde,74,auml,75,aring,76,aelig,77,ccedil,78,egrave,79,eacute,7a,ecirc,7b,euml,7c,igrave,7d,iacute,7e,icirc,7f,iuml,7g,eth,7h,ntilde,7i,ograve,7j,oacute,7k,ocirc,7l,otilde,7m,ouml,7n,divide,7o,oslash,7p,ugrave,7q,uacute,7r,ucirc,7s,uuml,7t,yacute,7u,thorn,7v,yuml,ci,fnof,sh,Alpha,si,Beta,sj,Gamma,sk,Delta,sl,Epsilon,sm,Zeta,sn,Eta,so,Theta,sp,Iota,sq,Kappa,sr,Lambda,ss,Mu,st,Nu,su,Xi,sv,Omicron,t0,Pi,t1,Rho,t3,Sigma,t4,Tau,t5,Upsilon,t6,Phi,t7,Chi,t8,Psi,t9,Omega,th,alpha,ti,beta,tj,gamma,tk,delta,tl,epsilon,tm,zeta,tn,eta,to,theta,tp,iota,tq,kappa,tr,lambda,ts,mu,tt,nu,tu,xi,tv,omicron,u0,pi,u1,rho,u2,sigmaf,u3,sigma,u4,tau,u5,upsilon,u6,phi,u7,chi,u8,psi,u9,omega,uh,thetasym,ui,upsih,um,piv,812,bull,816,hellip,81i,prime,81j,Prime,81u,oline,824,frasl,88o,weierp,88h,image,88s,real,892,trade,89l,alefsym,8cg,larr,8ch,uarr,8ci,rarr,8cj,darr,8ck,harr,8dl,crarr,8eg,lArr,8eh,uArr,8ei,rArr,8ej,dArr,8ek,hArr,8g0,forall,8g2,part,8g3,exist,8g5,empty,8g7,nabla,8g8,isin,8g9,notin,8gb,ni,8gf,prod,8gh,sum,8gi,minus,8gn,lowast,8gq,radic,8gt,prop,8gu,infin,8h0,ang,8h7,and,8h8,or,8h9,cap,8ha,cup,8hb,int,8hk,there4,8hs,sim,8i5,cong,8i8,asymp,8j0,ne,8j1,equiv,8j4,le,8j5,ge,8k2,sub,8k3,sup,8k4,nsub,8k6,sube,8k7,supe,8kl,oplus,8kn,otimes,8l5,perp,8m5,sdot,8o8,lceil,8o9,rceil,8oa,lfloor,8ob,rfloor,8p9,lang,8pa,rang,9ea,loz,9j0,spades,9j3,clubs,9j5,hearts,9j6,diams,ai,OElig,aj,oelig,b0,Scaron,b1,scaron,bo,Yuml,m6,circ,ms,tilde,802,ensp,803,emsp,809,thinsp,80c,zwnj,80d,zwj,80e,lrm,80f,rlm,80j,ndash,80k,mdash,80o,lsquo,80p,rsquo,80q,sbquo,80s,ldquo,80t,rdquo,80u,bdquo,810,dagger,811,Dagger,81g,permil,81p,lsaquo,81q,rsaquo,85c,euro",32),hu=function(t,a){return t.replace(a?ql:Bd,function(m){return $d[m]||m})},as=function(t,a){return t.replace(a?ql:Bd,function(m){return m.length>1?"&#"+(1024*(m.charCodeAt(0)-55296)+(m.charCodeAt(1)-56320)+65536)+";":$d[m]||"&#"+m.charCodeAt(0)+";"})},ed=function(t,a,m){return m=m||jd,t.replace(a?ql:Bd,function(v){return $d[v]||m[v]||v})},td={encodeRaw:hu,encodeAllRaw:function(t){return(""+t).replace(Xl,function(a){return $d[a]||a})},encodeNumeric:as,encodeNamed:ed,getEncodeFunc:function(t,a){var m=up(a)||jd,R=Wg(t.replace(/\+/g,","));return R.named&&R.numeric?function(ee,Ee){return ee.replace(Ee?ql:Bd,function(Se){return void 0!==$d[Se]?$d[Se]:void 0!==m[Se]?m[Se]:Se.length>1?"&#"+(1024*(Se.charCodeAt(0)-55296)+(Se.charCodeAt(1)-56320)+65536)+";":"&#"+Se.charCodeAt(0)+";"})}:R.named?a?function(ee,Ee){return ed(ee,Ee,m)}:ed:R.numeric?as:hu},decode:function(t){return t.replace(gh,function(a,m){return m?(m="x"===m.charAt(0).toLowerCase()?parseInt(m.substr(1),16):parseInt(m,10))>65535?(m-=65536,String.fromCharCode(55296+(m>>10),56320+(1023&m))):Zp[m]||String.fromCharCode(m):dd[a]||jd[a]||function(t){var a=Dt.fromTag("div").dom;return a.innerHTML=t,a.textContent||a.innerText||t}(a)})}},lm={},mg={},Mf=Li.makeMap,pp=Li.each,b_=Li.extend,Nh=Li.explode,_h=Li.inArray,Jd=function(t,a){return(t=Li.trim(t))?t.split(a||" "):[]},cm=function(t,a){var m=Mf(t," ",Mf(t.toUpperCase()," "));return b_(m,a)},um=function(t){return cm("td th li dt dd figcaption caption details summary",t.getTextBlockElements())},Sa=function(t,a){var m;return t&&(m={},"string"==typeof t&&(t={"*":t}),pp(t,function(v,S){m[S]=m[S.toUpperCase()]="map"===a?Mf(v,/[, ]/):Nh(v,/[, ]/)})),m},pd=function(t){var a={},m={},v=[],S={},R={},ee=function(Xr,yo,Fa){var fr=t[Xr];return fr?fr=Mf(fr,/[, ]/,Mf(fr.toUpperCase(),/[, ]/)):(fr=lm[Xr])||(fr=cm(yo,Fa),lm[Xr]=fr),fr},Ee=function(t){var m,v,S,R,ee,Ee,a={},Se=function(Gt,jt,on){var Rn,Yn,$n,qn=function(pi,tr){var Oi,cr,Wi={};for(Oi=0,cr=pi.length;Oi<cr;Oi++)Wi[pi[Oi]]=tr||{};return Wi};jt=jt||"","string"==typeof(on=on||[])&&(on=Jd(on));var bi=Jd(Gt);for(Rn=bi.length;Rn--;)$n={attributes:qn(Yn=Jd([m,jt].join(" "))),attributesOrder:Yn,children:qn(on,mg)},a[bi[Rn]]=$n},pt=function(Gt,jt){var on,Rn,Yn,$n,qn=Jd(Gt);on=qn.length;for(var bi=Jd(jt);on--;)for(Rn=a[qn[on]],Yn=0,$n=bi.length;Yn<$n;Yn++)Rn.attributes[bi[Yn]]={},Rn.attributesOrder.push(bi[Yn])};return lm[t]?lm[t]:(m="id accesskey class dir lang style tabindex title role",v="address blockquote div dl fieldset form h1 h2 h3 h4 h5 h6 hr menu ol p pre table ul",S="a abbr b bdo br button cite code del dfn em embed i iframe img input ins kbd label map noscript object q s samp script select small span strong sub sup textarea u var #text #comment","html4"!==t&&(m+=" contenteditable contextmenu draggable dropzone hidden spellcheck translate",v+=" article aside details dialog figure main header footer hgroup section nav",S+=" audio canvas command datalist mark meter output picture progress time wbr video ruby bdi keygen"),"html5-strict"!==t&&(m+=" xml:lang",S=[S,Ee="acronym applet basefont big font strike tt"].join(" "),pp(Jd(Ee),function(Gt){Se(Gt,"",S)}),v=[v,ee="center dir isindex noframes"].join(" "),R=[v,S].join(" "),pp(Jd(ee),function(Gt){Se(Gt,"",R)})),R=R||[v,S].join(" "),Se("html","manifest","head body"),Se("head","","base command link meta noscript script style title"),Se("title hr noscript br"),Se("base","href target"),Se("link","href rel media hreflang type sizes hreflang"),Se("meta","name http-equiv content charset"),Se("style","media type scoped"),Se("script","src async defer type charset"),Se("body","onafterprint onbeforeprint onbeforeunload onblur onerror onfocus onhashchange onload onmessage onoffline ononline onpagehide onpageshow onpopstate onresize onscroll onstorage onunload",R),Se("address dt dd div caption","",R),Se("h1 h2 h3 h4 h5 h6 pre p abbr code var samp kbd sub sup i b u bdo span legend em strong small s cite dfn","",S),Se("blockquote","cite",R),Se("ol","reversed start type","li"),Se("ul","","li"),Se("li","value",R),Se("dl","","dt dd"),Se("a","href target rel media hreflang type",S),Se("q","cite",S),Se("ins del","cite datetime",R),Se("img","src sizes srcset alt usemap ismap width height"),Se("iframe","src name width height",R),Se("embed","src type width height"),Se("object","data type typemustmatch name usemap form width height",[R,"param"].join(" ")),Se("param","name value"),Se("map","name",[R,"area"].join(" ")),Se("area","alt coords shape href target rel media hreflang type"),Se("table","border","caption colgroup thead tfoot tbody tr"+("html4"===t?" col":"")),Se("colgroup","span","col"),Se("col","span"),Se("tbody thead tfoot","","tr"),Se("tr","","td th"),Se("td","colspan rowspan headers",R),Se("th","colspan rowspan headers scope abbr",R),Se("form","accept-charset action autocomplete enctype method name novalidate target",R),Se("fieldset","disabled form name",[R,"legend"].join(" ")),Se("label","form for",S),Se("input","accept alt autocomplete checked dirname disabled form formaction formenctype formmethod formnovalidate formtarget height list max maxlength min multiple name pattern readonly required size src step type value width"),Se("button","disabled form formaction formenctype formmethod formnovalidate formtarget name type value","html4"===t?R:S),Se("select","disabled form multiple name required size","option optgroup"),Se("optgroup","disabled label","option"),Se("option","disabled label selected value"),Se("textarea","cols dirname disabled form maxlength name readonly required rows wrap"),Se("menu","type label",[R,"li"].join(" ")),Se("noscript","",R),"html4"!==t&&(Se("wbr"),Se("ruby","",[S,"rt rp"].join(" ")),Se("figcaption","",R),Se("mark rt rp summary bdi","",S),Se("canvas","width height",R),Se("video","src crossorigin poster preload autoplay mediagroup loop muted controls width height buffered",[R,"track source"].join(" ")),Se("audio","src crossorigin preload autoplay mediagroup loop muted controls buffered volume",[R,"track source"].join(" ")),Se("picture","","img source"),Se("source","src srcset type media sizes"),Se("track","kind src srclang label default"),Se("datalist","",[S,"option"].join(" ")),Se("article section nav aside main header footer","",R),Se("hgroup","","h1 h2 h3 h4 h5 h6"),Se("figure","",[R,"figcaption"].join(" ")),Se("time","datetime",S),Se("dialog","open",R),Se("command","type label icon disabled checked radiogroup command"),Se("output","for form name",S),Se("progress","value max",S),Se("meter","value min max low high optimum",S),Se("details","open",[R,"summary"].join(" ")),Se("keygen","autofocus challenge disabled form keytype name")),"html5-strict"!==t&&(pt("script","language xml:space"),pt("style","xml:space"),pt("object","declare classid code codebase codetype archive standby align border hspace vspace"),pt("embed","align name hspace vspace"),pt("param","valuetype type"),pt("a","charset name rev shape coords"),pt("br","clear"),pt("applet","codebase archive code object alt name width height align hspace vspace"),pt("img","name longdesc align border hspace vspace"),pt("iframe","longdesc frameborder marginwidth marginheight scrolling align"),pt("font basefont","size color face"),pt("input","usemap align"),pt("select"),pt("textarea"),pt("h1 h2 h3 h4 h5 h6 div p legend caption","align"),pt("ul","type compact"),pt("li","type"),pt("ol dl menu dir","compact"),pt("pre","width xml:space"),pt("hr","align noshade size width"),pt("isindex","prompt"),pt("table","summary width frame rules cellspacing cellpadding align bgcolor"),pt("col","width align char charoff valign"),pt("colgroup","width align char charoff valign"),pt("thead","align char charoff valign"),pt("tr","align char charoff valign bgcolor"),pt("th","axis align char charoff valign nowrap bgcolor width height"),pt("form","accept"),pt("td","abbr axis scope align char charoff valign nowrap bgcolor width height"),pt("tfoot","align char charoff valign"),pt("tbody","align char charoff valign"),pt("area","nohref"),pt("body","background bgcolor text link vlink alink")),"html4"!==t&&(pt("input button select textarea","autofocus"),pt("input textarea","placeholder"),pt("a","download"),pt("link script img","crossorigin"),pt("img","loading"),pt("iframe","sandbox seamless allowfullscreen loading")),pp(Jd("a form meter progress dfn"),function(Gt){a[Gt]&&delete a[Gt].children[Gt]}),delete a.caption.children.table,delete a.script,lm[t]=a,a)}((t=t||{}).schema);!1===t.verify_html&&(t.valid_elements="*[*]");var Se=Sa(t.valid_styles),pt=Sa(t.invalid_styles,"map"),Gt=Sa(t.valid_classes,"map"),jt=ee("whitespace_elements","pre script noscript style textarea video audio iframe object code"),on=ee("self_closing_elements","colgroup dd dt li option p td tfoot th thead tr"),Rn=ee("short_ended_elements","area base basefont br col frame hr img input isindex link meta param embed source wbr track"),Yn=ee("boolean_attributes","checked compact declare defer disabled ismap multiple nohref noresize noshade nowrap readonly selected autoplay loop controls"),$n="td th iframe video audio object script code",qn=ee("non_empty_elements",$n+" pre",Rn),bi=ee("move_caret_before_on_enter_elements",$n+" table",Rn),pi=ee("text_block_elements","h1 h2 h3 h4 h5 h6 p div address pre form blockquote center dir fieldset header footer article section hgroup aside main nav figure"),tr=ee("block_elements","hr table tbody thead tfoot th tr td li ol ul caption dl dt dd noscript menu isindex option datalist select optgroup figcaption details summary",pi),Wi=ee("text_inline_elements","span strong b em i font s strike u var cite dfn code mark q sup sub samp");pp((t.special||"script noscript iframe noframes noembed title style textarea xmp").split(" "),function(Xr){R[Xr]=new RegExp("</"+Xr+"[^>]*>","gi")});var Oi=function(Xr){return new RegExp("^"+Xr.replace(/([?+*])/g,".$1")+"$")},cr=function(Xr){var yo,Fa,fr,so,eo,za,Wa,Nu,Cf,nf,wM,h_,Vg,Hf,bb,g_,gC,$u,Ld=/^([#+\-])?([^\[!\/]+)(?:\/([^\[!]+))?(?:(!?)\[([^\]]+)])?$/,Vf=/^([!\-])?(\w+[\\:]:\w+|[^=:<]+)?(?:([=:<])(.*))?$/,$_=/[*?+]/;if(Xr){var o1=Jd(Xr,",");for(a["@"]&&(g_=a["@"].attributes,gC=a["@"].attributesOrder),yo=0,Fa=o1.length;yo<Fa;yo++)if(eo=Ld.exec(o1[yo])){if(Hf=eo[1],Cf=eo[2],bb=eo[3],Nu=eo[5],za={attributes:h_={},attributesOrder:Vg=[]},"#"===Hf&&(za.paddEmpty=!0),"-"===Hf&&(za.removeEmpty=!0),"!"===eo[4]&&(za.removeEmptyAttrs=!0),g_&&(Hi(g_,function(a1,JT){h_[JT]=a1}),Vg.push.apply(Vg,gC)),Nu)for(fr=0,so=(Nu=Jd(Nu,"|")).length;fr<so;fr++)if(eo=Vf.exec(Nu[fr])){if(Wa={},wM=eo[1],nf=eo[2].replace(/[\\:]:/g,":"),Hf=eo[3],$u=eo[4],"!"===wM&&(za.attributesRequired=za.attributesRequired||[],za.attributesRequired.push(nf),Wa.required=!0),"-"===wM){delete h_[nf],Vg.splice(_h(Vg,nf),1);continue}Hf&&("="===Hf&&(za.attributesDefault=za.attributesDefault||[],za.attributesDefault.push({name:nf,value:$u}),Wa.defaultValue=$u),":"===Hf&&(za.attributesForced=za.attributesForced||[],za.attributesForced.push({name:nf,value:$u}),Wa.forcedValue=$u),"<"===Hf&&(Wa.validValues=Mf($u,"?"))),$_.test(nf)?(za.attributePatterns=za.attributePatterns||[],Wa.pattern=Oi(nf),za.attributePatterns.push(Wa)):(h_[nf]||Vg.push(nf),h_[nf]=Wa)}!g_&&"@"===Cf&&(g_=h_,gC=Vg),bb&&(za.outputName=Cf,a[bb]=za),$_.test(Cf)?(za.pattern=Oi(Cf),v.push(za)):a[Cf]=za}}},Ur=function(Xr){a={},v=[],cr(Xr),pp(Ee,function(yo,Fa){m[Fa]=yo.children})},no=function(Xr){var yo=/^(~)?(.+)$/;Xr&&(lm.text_block_elements=lm.block_elements=null,pp(Jd(Xr,","),function(Fa){var fr=yo.exec(Fa),so="~"===fr[1],eo=so?"span":"div",za=fr[2];if(m[za]=m[eo],S[za]=eo,so||(tr[za.toUpperCase()]={},tr[za]={}),!a[za]){var Wa=a[eo];delete(Wa=b_({},Wa)).removeEmptyAttrs,delete Wa.removeEmpty,a[za]=Wa}pp(m,function(Nu,Cf){Nu[eo]&&(m[Cf]=Nu=b_({},m[Cf]),Nu[za]=Nu[eo])})}))},es=function(Xr){var yo=/^([+\-]?)([A-Za-z0-9_\-.\u00b7\u00c0-\u00d6\u00d8-\u00f6\u00f8-\u037d\u037f-\u1fff\u200c-\u200d\u203f-\u2040\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]+)\[([^\]]+)]$/;lm[t.schema]=null,Xr&&pp(Jd(Xr,","),function(Fa){var so,eo,fr=yo.exec(Fa);fr&&(eo=fr[1],so=eo?m[fr[2]]:m[fr[2]]={"#comment":{}},so=m[fr[2]],pp(Jd(fr[3],"|"),function(za){"-"===eo?delete so[za]:so[za]={}}))})},Xo=function(Xr){var Fa,yo=a[Xr];if(yo)return yo;for(Fa=v.length;Fa--;)if((yo=v[Fa]).pattern.test(Xr))return yo};t.valid_elements?Ur(t.valid_elements):(pp(Ee,function(Xr,yo){a[yo]={attributes:Xr.attributes,attributesOrder:Xr.attributesOrder},m[yo]=Xr.children}),"html5"!==t.schema&&pp(Jd("strong/b em/i"),function(Xr){var yo=Jd(Xr,"/");a[yo[1]].outputName=yo[0]}),pp(Wi,function(Xr,yo){a[yo]&&(t.padd_empty_block_inline_children&&(a[yo].paddInEmptyBlock=!0),a[yo].removeEmpty=!0)}),pp(Jd("ol ul blockquote a table tbody"),function(Xr){a[Xr]&&(a[Xr].removeEmpty=!0)}),pp(Jd("p h1 h2 h3 h4 h5 h6 th td pre div address caption li"),function(Xr){a[Xr].paddEmpty=!0}),pp(Jd("span"),function(Xr){a[Xr].removeEmptyAttrs=!0})),no(t.custom_elements),es(t.valid_children),cr(t.extended_valid_elements),es("+ol[ul|ol],+ul[ul|ol]"),pp({dd:"dl",dt:"dl",li:"ul ol",td:"tr",th:"tr",tr:"tbody thead tfoot",tbody:"table",thead:"table",tfoot:"table",legend:"fieldset",area:"map",param:"video audio object"},function(Xr,yo){a[yo]&&(a[yo].parentsRequired=Jd(Xr))}),t.invalid_elements&&pp(Nh(t.invalid_elements),function(Xr){a[Xr]&&delete a[Xr]}),Xo("span")||cr("span[!data-mce-type|*]");var Wr=oe(Se),qa=oe(pt),po=oe(Gt),Wo=oe(Yn),vo=oe(tr),So=oe(pi),ca=oe(Wi),Jr=oe(Rn),na=oe(on),Ul=oe(qn),Ic=oe(bi),Mc=oe(jt),fh=oe(R),W_=oe(S);return{children:m,elements:a,getValidStyles:Wr,getValidClasses:po,getBlockElements:vo,getInvalidStyles:qa,getShortEndedElements:Jr,getTextBlockElements:So,getTextInlineElements:ca,getBoolAttrs:Wo,getElementRule:Xo,getSelfClosingElements:na,getNonEmptyElements:Ul,getMoveCaretBeforeOnEnterElements:Ic,getWhiteSpaceElements:Mc,getSpecialElements:fh,isValidChild:function(Xr,yo){var Fa=m[Xr.toLowerCase()];return!(!Fa||!Fa[yo.toLowerCase()])},isValid:function(Xr,yo){var Fa,fr,so=Xo(Xr);if(so){if(!yo)return!0;if(so.attributes[yo])return!0;if(Fa=so.attributePatterns)for(fr=Fa.length;fr--;)if(Fa[fr].pattern.test(Xr))return!0}return!1},getCustomElements:W_,addValidElements:cr,setValidElements:Ur,addCustomElements:no,addValidChildren:es}},Sm=function(t,a,m,v){var S=function(R){return(R=parseInt(R,10).toString(16)).length>1?R:"0"+R};return"#"+S(a)+S(m)+S(v)},zm=function(t,a){var Ee,pt,Gt,m=this,v=/rgb\s*\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\s*\)/gi,S=/(?:url(?:(?:\(\s*\"([^\"]+)\"\s*\))|(?:\(\s*\'([^\']+)\'\s*\))|(?:\(\s*([^)\s]+)\s*\))))|(?:\'([^\']+)\')|(?:\"([^\"]+)\")/gi,R=/\s*([^:]+):\s*([^;]+);?/g,ee=/\s+$/,Se={};t=t||{},a&&(pt=a.getValidStyles(),Gt=a.getInvalidStyles());var on="\\\" \\' \\; \\: ; : \ufeff".split(" ");for(Ee=0;Ee<on.length;Ee++)Se[on[Ee]]="\ufeff"+Ee,Se["\ufeff"+Ee]=on[Ee];return{toHex:function(Rn){return Rn.replace(v,Sm)},parse:function(Rn){var $n,qn,bi,pi,po,Wo,vo,So,Yn={},tr=t.url_converter,Wi=t.url_converter_scope||m,Oi=function(po,Wo,vo){var So=Yn[po+"-top"+Wo];if(So){var ca=Yn[po+"-right"+Wo];if(ca){var Jr=Yn[po+"-bottom"+Wo];if(Jr){var na=Yn[po+"-left"+Wo];if(na){var Ul=[So,ca,Jr,na];for(Ee=Ul.length-1;Ee--&&Ul[Ee]===Ul[Ee+1];);Ee>-1&&vo||(Yn[po+Wo]=-1===Ee?Ul[0]:Ul.join(" "),delete Yn[po+"-top"+Wo],delete Yn[po+"-right"+Wo],delete Yn[po+"-bottom"+Wo],delete Yn[po+"-left"+Wo])}}}}},cr=function(po){var vo,Wo=Yn[po];if(Wo){for(vo=(Wo=Wo.split(" ")).length;vo--;)if(Wo[vo]!==Wo[0])return!1;return Yn[po]=Wo[0],!0}},no=function(po){return pi=!0,Se[po]},es=function(po,Wo){return pi&&(po=po.replace(/\uFEFF[0-9]/g,function(vo){return Se[vo]})),Wo||(po=po.replace(/\\([\'\";:])/g,"$1")),po},Xo=function(po){return String.fromCharCode(parseInt(po.slice(1),16))},Wr=function(po){return po.replace(/\\[0-9a-f]+/gi,Xo)},qa=function(po,Wo,vo,So,ca,Jr){if(ca=ca||Jr)return"'"+(ca=es(ca)).replace(/\'/g,"\\'")+"'";if(Wo=es(Wo||vo||So),!t.allow_script_urls){var na=Wo.replace(/[\s\r\n]+/g,"");if(/(java|vb)script:/i.test(na)||!t.allow_svg_data_urls&&/^data:image\/svg/i.test(na))return""}return tr&&(Wo=tr.call(Wi,Wo,"style")),"url('"+Wo.replace(/\'/g,"\\'")+"')"};if(Rn){for(Rn=(Rn=Rn.replace(/[\u0000-\u001F]/g,"")).replace(/\\[\"\';:\uFEFF]/g,no).replace(/\"[^\"]+\"|\'[^\']+\'/g,function(po){return po.replace(/[;:]/g,no)});$n=R.exec(Rn);)if(R.lastIndex=$n.index+$n[0].length,qn=$n[1].replace(ee,"").toLowerCase(),bi=$n[2].replace(ee,""),qn&&bi){if(qn=Wr(qn),bi=Wr(bi),-1!==qn.indexOf("\ufeff")||-1!==qn.indexOf('"')||!t.allow_script_urls&&("behavior"===qn||/expression\s*\(|\/\*|\*\//.test(bi)))continue;"font-weight"===qn&&"700"===bi?bi="bold":("color"===qn||"background-color"===qn)&&(bi=bi.toLowerCase()),bi=(bi=bi.replace(v,Sm)).replace(S,qa),Yn[qn]=pi?es(bi,!0):bi}Oi("border","",!0),Oi("border","-width"),Oi("border","-color"),Oi("border","-style"),Oi("padding",""),Oi("margin",""),po="border",vo="border-style",So="border-color",cr(Wo="border-width")&&cr(vo)&&cr(So)&&(Yn[po]=Yn[Wo]+" "+Yn[vo]+" "+Yn[So],delete Yn[Wo],delete Yn[vo],delete Yn[So]),"medium none"===Yn.border&&delete Yn.border,"none"===Yn["border-image"]&&delete Yn["border-image"]}return Yn},serialize:function(Rn,Yn){var $n="",qn=function(pi){var tr,Wi=pt[pi];if(Wi)for(var Oi=0,cr=Wi.length;Oi<cr;Oi++)pi=Wi[Oi],(tr=Rn[pi])&&($n+=($n.length>0?" ":"")+pi+": "+tr+";")};return Yn&&pt?(qn("*"),qn(Yn)):Hi(Rn,function(pi,tr){pi&&(!Gt||function(pi,tr){var Wi=Gt["*"];return!(Wi&&Wi[pi]||(Wi=Gt[tr])&&Wi[pi])}(tr,Yn))&&($n+=($n.length>0?" ":"")+tr+": "+pi+";")}),$n}}},J_={keyLocation:!0,layerX:!0,layerY:!0,returnValue:!0,webkitMovementX:!0,webkitMovementY:!0,keyIdentifier:!0,mozPressure:!0},uc=function(t){return t instanceof Event||pe(t.initEvent)},yr=function(t,a,m,v){var S,R=function(t,a){var m=a??{};for(var v in t)Nn(J_,v)||(m[v]=t[v]);return ne(m.composedPath)&&(m.composedPath=function(){return t.composedPath()}),m}(a,v);return R.type=t,ge(R.target)&&(R.target=null!==(S=R.srcElement)&&void 0!==S?S:m),function(t){return ge(t.preventDefault)||uc(t)}(a)&&(R.preventDefault=function(){R.defaultPrevented=!0,R.isDefaultPrevented=nt,pe(a.preventDefault)?a.preventDefault():uc(a)&&(a.returnValue=!1)},R.stopPropagation=function(){R.cancelBubble=!0,R.isPropagationStopped=nt,pe(a.stopPropagation)?a.stopPropagation():uc(a)&&(a.cancelBubble=!0)},R.stopImmediatePropagation=function(){R.isImmediatePropagationStopped=nt,R.stopPropagation()},function(t){return t.isDefaultPrevented===nt||t.isDefaultPrevented===Be}(R)||(R.isDefaultPrevented=!0===R.defaultPrevented?nt:Be,R.isPropagationStopped=!0===R.cancelBubble?nt:Be,R.isImmediatePropagationStopped=Be)),R},Eb="mce-data-",Q_=/^(?:mouse|contextmenu)|click/,xd=function(t,a,m,v){t.addEventListener?t.addEventListener(a,m,v||!1):t.attachEvent&&t.attachEvent("on"+a,m)},q_=function(t,a,m,v){t.removeEventListener?t.removeEventListener(a,m,v||!1):t.detachEvent&&t.detachEvent("on"+a,m)},jf=function(t,a){var m=yr(t.type,t,document,a);if(function(t){return ne(t)&&Q_.test(t.type)}(t)&&ye(t.pageX)&&!ye(t.clientX)){var v=m.target.ownerDocument||document,S=v.documentElement,R=v.body,ee=m;ee.pageX=t.clientX+(S&&S.scrollLeft||R&&R.scrollLeft||0)-(S&&S.clientLeft||R&&R.clientLeft||0),ee.pageY=t.clientY+(S&&S.scrollTop||R&&R.scrollTop||0)-(S&&S.clientTop||R&&R.clientTop||0)}return ye(m.metaKey)&&(m.metaKey=!1),m},rf=function(t,a,m){var v=t.document,S={type:"ready"};if(m.domLoaded)a(S);else{var ee=function(){q_(t,"DOMContentLoaded",ee),q_(t,"load",ee),m.domLoaded||(m.domLoaded=!0,a(S)),t=null};"complete"===v.readyState||"interactive"===v.readyState&&v.body?ee():xd(t,"DOMContentLoaded",ee),m.domLoaded||xd(t,"load",ee)}},E_=function(){function t(){this.domLoaded=!1,this.events={},this.count=1,this.expando=Eb+(+new Date).toString(32),this.hasMouseEnterLeave="onmouseenter"in document.documentElement,this.hasFocusIn="onfocusin"in document.documentElement,this.count=1}return t.prototype.bind=function(a,m,v,S){var ee,Ee,Se,pt,Gt,jt,on,R=this,Rn=window,Yn=function(qn){R.executeHandlers(jf(qn||Rn.event),ee)};if(a&&3!==a.nodeType&&8!==a.nodeType){a[R.expando]?ee=a[R.expando]:(ee=R.count++,a[R.expando]=ee,R.events[ee]={}),S=S||a;var $n=m.split(" ");for(Se=$n.length;Se--;)jt=Yn,Gt=on=!1,"DOMContentLoaded"===(pt=$n[Se])&&(pt="ready"),R.domLoaded&&"ready"===pt&&"complete"===a.readyState?v.call(S,jf({type:pt})):(R.hasMouseEnterLeave||(Gt=R.mouseEnterLeave[pt])&&(jt=function(qn){var bi=qn.currentTarget,pi=qn.relatedTarget;if(pi&&bi.contains)pi=bi.contains(pi);else for(;pi&&pi!==bi;)pi=pi.parentNode;pi||((qn=jf(qn||Rn.event)).type="mouseout"===qn.type?"mouseleave":"mouseenter",qn.target=bi,R.executeHandlers(qn,ee))}),!R.hasFocusIn&&("focusin"===pt||"focusout"===pt)&&(on=!0,Gt="focusin"===pt?"focus":"blur",jt=function(qn){(qn=jf(qn||Rn.event)).type="focus"===qn.type?"focusin":"focusout",R.executeHandlers(qn,ee)}),(Ee=R.events[ee][pt])?"ready"===pt&&R.domLoaded?v(jf({type:pt})):Ee.push({func:v,scope:S}):(R.events[ee][pt]=Ee=[{func:v,scope:S}],Ee.fakeName=Gt,Ee.capture=on,Ee.nativeHandler=jt,"ready"===pt?rf(a,jt,R):xd(a,Gt||pt,jt,on)));return a=Ee=null,v}},t.prototype.unbind=function(a,m,v){var S,R,ee,Ee,Se;if(!a||3===a.nodeType||8===a.nodeType)return this;var pt=a[this.expando];if(pt){if(Se=this.events[pt],m){var Gt=m.split(" ");for(R=Gt.length;R--;)if(S=Se[Ee=Gt[R]]){if(v)for(ee=S.length;ee--;)if(S[ee].func===v){var jt=S.nativeHandler,on=S.fakeName,Rn=S.capture;(S=S.slice(0,ee).concat(S.slice(ee+1))).nativeHandler=jt,S.fakeName=on,S.capture=Rn,Se[Ee]=S}(!v||0===S.length)&&(delete Se[Ee],q_(a,S.fakeName||Ee,S.nativeHandler,S.capture))}}else Hi(Se,function(Yn,$n){q_(a,Yn.fakeName||$n,Yn.nativeHandler,Yn.capture)}),Se={};for(Ee in Se)if(Nn(Se,Ee))return this;delete this.events[pt];try{delete a[this.expando]}catch{a[this.expando]=null}}return this},t.prototype.fire=function(a,m,v){var S;if(!a||3===a.nodeType||8===a.nodeType)return this;var R=jf({type:m,target:a},v);do{(S=a[this.expando])&&this.executeHandlers(R,S),a=a.parentNode||a.ownerDocument||a.defaultView||a.parentWindow}while(a&&!R.isPropagationStopped());return this},t.prototype.clean=function(a){var m,v;if(!a||3===a.nodeType||8===a.nodeType)return this;if(a[this.expando]&&this.unbind(a),a.getElementsByTagName||(a=a.document),a&&a.getElementsByTagName)for(this.unbind(a),m=(v=a.getElementsByTagName("*")).length;m--;)(a=v[m])[this.expando]&&this.unbind(a);return this},t.prototype.destroy=function(){this.events={}},t.prototype.cancel=function(a){return a&&(a.preventDefault(),a.stopImmediatePropagation()),!1},t.prototype.executeHandlers=function(a,m){var v=this.events[m],S=v&&v[a.type];if(S)for(var R=0,ee=S.length;R<ee;R++){var Ee=S[R];if(Ee&&!1===Ee.func.call(Ee.scope,a)&&a.preventDefault(),a.isImmediatePropagationStopped())return}},t.Event=new t,t}(),Ou="sizzle"+-new Date,Ja=window.document,$p=0,tv=0,hg=Kp(),Lt=Kp(),Am=Kp(),yh=function(t,a){return t===a&&(ev=!0),0},Lu="undefined",T_=1<<31,bh={}.hasOwnProperty,hp=[],Yh=hp.pop,gg=hp.push,Ym=hp.push,co=hp.slice,sc=hp.indexOf||function(t){for(var a=0,m=this.length;a<m;a++)if(this[a]===t)return a;return-1},zs="[\\x20\\t\\r\\n\\f]",gp="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",zu="\\["+zs+"*("+gp+")(?:"+zs+"*([*^$|!~]?=)"+zs+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+gp+"))|)"+zs+"*\\]",_p=":("+gp+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+zu+")*)|.*)\\)|)",nv=new RegExp("^"+zs+"+|((?:^|[^\\\\])(?:\\\\.)*)"+zs+"+$","g"),Hm=new RegExp("^"+zs+"*,"+zs+"*"),Vm=new RegExp("^"+zs+"*([>+~]|"+zs+")"+zs+"*"),Dd=new RegExp("="+zs+"*([^\\]'\"]*?)"+zs+"*\\]","g"),Jf=new RegExp(_p),iv=new RegExp("^"+gp+"$"),Sd={ID:new RegExp("^#("+gp+")"),CLASS:new RegExp("^\\.("+gp+")"),TAG:new RegExp("^("+gp+"|[*])"),ATTR:new RegExp("^"+zu),PSEUDO:new RegExp("^"+_p),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+zs+"*(even|odd|(([+-]|)(\\d*)n|)"+zs+"*(?:([+-]|)"+zs+"*(\\d+)|))"+zs+"*\\)|)","i"),bool:new RegExp("^(?:checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped)$","i"),needsContext:new RegExp("^"+zs+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+zs+"*((?:-\\d)?\\d*)"+zs+"*\\)|)(?=[^-]|$)","i")},jg=/^(?:input|select|textarea|button)$/i,rv=/^h\d$/i,vp=/^[^{]+\{\s*\[native \w/,_g=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,of=/[+~]/,Qd=/'|\\/g,jp=new RegExp("\\\\([\\da-f]{1,6}"+zs+"?|("+zs+")|.)","ig"),yp=function(t,a,m){var v="0x"+a-65536;return v!=v||m?a:v<0?String.fromCharCode(v+65536):String.fromCharCode(v>>10|55296,1023&v|56320)};try{Ym.apply(hp=co.call(Ja.childNodes),Ja.childNodes),hp[Ja.childNodes.length].nodeType}catch{Ym={apply:hp.length?function(a,m){gg.apply(a,co.call(m))}:function(a,m){for(var v=a.length,S=0;a[v++]=m[S++];);a.length=v-1}}}var Bl=function(t,a,m,v){var S,R,ee,Ee,Se,pt,Gt,jt,on,Rn;if((a?a.ownerDocument||a:Ja)!==Tf&&zh(a),m=m||[],!t||"string"!=typeof t)return m;if(1!==(Ee=(a=a||Tf).nodeType)&&9!==Ee)return[];if(Ud&&!v){if(S=_g.exec(t))if(ee=S[1]){if(9===Ee){if(!(R=a.getElementById(ee))||!R.parentNode)return m;if(R.id===ee)return m.push(R),m}else if(a.ownerDocument&&(R=a.ownerDocument.getElementById(ee))&&jo(a,R)&&R.id===ee)return m.push(R),m}else{if(S[2])return Ym.apply(m,a.getElementsByTagName(t)),m;if((ee=S[3])&&nu.getElementsByClassName)return Ym.apply(m,a.getElementsByClassName(ee)),m}if(nu.qsa&&(!Rp||!Rp.test(t))){if(jt=Gt=Ou,on=a,Rn=9===Ee&&t,1===Ee&&"object"!==a.nodeName.toLowerCase()){for(pt=Wp(t),(Gt=a.getAttribute("id"))?jt=Gt.replace(Qd,"\\$&"):a.setAttribute("id",jt),jt="[id='"+jt+"'] ",Se=pt.length;Se--;)pt[Se]=jt+Zm(pt[Se]);on=of.test(t)&&sf(a.parentNode)||a,Rn=pt.join(",")}if(Rn)try{return Ym.apply(m,on.querySelectorAll(Rn)),m}catch{}finally{Gt||a.removeAttribute("id")}}}return fp(t.replace(nv,"$1"),a,m,v)};function Kp(){var t=[];return function a(m,v){return t.push(m+" ")>Va.cacheLength&&delete a[t.shift()],a[m+" "]=v}}function bp(t){return t[Ou]=!0,t}function af(t,a){var m=a&&t,v=m&&1===t.nodeType&&1===a.nodeType&&(~a.sourceIndex||T_)-(~t.sourceIndex||T_);if(v)return v;if(m)for(;m=m.nextSibling;)if(m===a)return-1;return t?1:-1}function Ac(t){return bp(function(a){return a=+a,bp(function(m,v){for(var S,R=t([],m.length,a),ee=R.length;ee--;)m[S=R[ee]]&&(m[S]=!(v[S]=m[S]))})})}function sf(t){return t&&typeof t.getElementsByTagName!==Lu&&t}function pl(){}function Zm(t){for(var a=0,m=t.length,v="";a<m;a++)v+=t[a].value;return v}function Jp(t,a,m){var v=a.dir,S=m&&"parentNode"===v,R=tv++;return a.first?function(ee,Ee,Se){for(;ee=ee[v];)if(1===ee.nodeType||S)return t(ee,Ee,Se)}:function(ee,Ee,Se){var pt,Gt,jt=[$p,R];if(Se){for(;ee=ee[v];)if((1===ee.nodeType||S)&&t(ee,Ee,Se))return!0}else for(;ee=ee[v];)if(1===ee.nodeType||S){if((pt=(Gt=ee[Ou]||(ee[Ou]={}))[v])&&pt[0]===$p&&pt[1]===R)return jt[2]=pt[2];if(Gt[v]=jt,jt[2]=t(ee,Ee,Se))return!0}}}function Cp(t){return t.length>1?function(a,m,v){for(var S=t.length;S--;)if(!t[S](a,m,v))return!1;return!0}:t[0]}function md(t,a,m,v,S){for(var R,ee=[],Ee=0,Se=t.length,pt=null!=a;Ee<Se;Ee++)(R=t[Ee])&&(!m||m(R,v,S))&&(ee.push(R),pt&&a.push(Ee));return ee}function vg(t,a,m,v,S,R){return v&&!v[Ou]&&(v=vg(v)),S&&!S[Ou]&&(S=vg(S,R)),bp(function(ee,Ee,Se,pt){var Gt,jt,on,Rn=[],Yn=[],$n=Ee.length,qn=ee||function Hh(t,a,m){for(var v=0,S=a.length;v<S;v++)Bl(t,a[v],m);return m}(a||"*",Se.nodeType?[Se]:Se,[]),bi=!t||!ee&&a?qn:md(qn,Rn,t,Se,pt),pi=m?S||(ee?t:$n||v)?[]:Ee:bi;if(m&&m(bi,pi,Se,pt),v)for(Gt=md(pi,Yn),v(Gt,[],Se,pt),jt=Gt.length;jt--;)(on=Gt[jt])&&(pi[Yn[jt]]=!(bi[Yn[jt]]=on));if(ee){if(S||t){if(S){for(Gt=[],jt=pi.length;jt--;)(on=pi[jt])&&Gt.push(bi[jt]=on);S(null,pi=[],Gt,pt)}for(jt=pi.length;jt--;)(on=pi[jt])&&(Gt=S?sc.call(ee,on):Rn[jt])>-1&&(ee[Gt]=!(Ee[Gt]=on))}}else pi=md(pi===Ee?pi.splice($n,pi.length):pi),S?S(null,Ee,pi,pt):Ym.apply(Ee,pi)})}function Vh(t){for(var a,m,v,S=t.length,R=Va.relative[t[0].type],ee=R||Va.relative[" "],Ee=R?1:0,Se=Jp(function(jt){return jt===a},ee,!0),pt=Jp(function(jt){return sc.call(a,jt)>-1},ee,!0),Gt=[function(jt,on,Rn){var Yn=!R&&(Rn||on!==Bh)||((a=on).nodeType?Se(jt,on,Rn):pt(jt,on,Rn));return a=null,Yn}];Ee<S;Ee++)if(m=Va.relative[t[Ee].type])Gt=[Jp(Cp(Gt),m)];else{if((m=Va.filter[t[Ee].type].apply(null,t[Ee].matches))[Ou]){for(v=++Ee;v<S&&!Va.relative[t[v].type];v++);return vg(Ee>1&&Cp(Gt),Ee>1&&Zm(t.slice(0,Ee-1).concat({value:" "===t[Ee-2].type?"*":""})).replace(nv,"$1"),m,Ee<v&&Vh(t.slice(Ee,v)),v<S&&Vh(t=t.slice(v)),v<S&&Zm(t))}Gt.push(m)}return Cp(Gt)}nu=Bl.support={},M_=Bl.isXML=function(t){var a=t&&(t.ownerDocument||t).documentElement;return!!a&&"HTML"!==a.nodeName},zh=Bl.setDocument=function(t){var a,m=t?t.ownerDocument||t:Ja,v=m.defaultView;return m!==Tf&&9===m.nodeType&&m.documentElement?(Tf=m,xf=m.documentElement,Ud=!M_(m),v&&v!==function S(R){try{return R.top}catch{}return null}(v)&&(v.addEventListener?v.addEventListener("unload",function(){zh()},!1):v.attachEvent&&v.attachEvent("onunload",function(){zh()})),nu.attributes=!0,nu.getElementsByTagName=!0,nu.getElementsByClassName=vp.test(m.getElementsByClassName),nu.getById=!0,Va.find.ID=function(R,ee){if(typeof ee.getElementById!==Lu&&Ud){var Ee=ee.getElementById(R);return Ee&&Ee.parentNode?[Ee]:[]}},Va.filter.ID=function(R){var ee=R.replace(jp,yp);return function(Ee){return Ee.getAttribute("id")===ee}},Va.find.TAG=nu.getElementsByTagName?function(R,ee){if(typeof ee.getElementsByTagName!==Lu)return ee.getElementsByTagName(R)}:function(R,ee){var Ee,Se=[],pt=0,Gt=ee.getElementsByTagName(R);if("*"===R){for(;Ee=Gt[pt++];)1===Ee.nodeType&&Se.push(Ee);return Se}return Gt},Va.find.CLASS=nu.getElementsByClassName&&function(R,ee){if(Ud)return ee.getElementsByClassName(R)},Kf=[],Rp=[],nu.disconnectedMatch=!0,Rp=Rp.length&&new RegExp(Rp.join("|")),Kf=Kf.length&&new RegExp(Kf.join("|")),a=vp.test(xf.compareDocumentPosition),jo=a||vp.test(xf.contains)?function(R,ee){var Ee=9===R.nodeType?R.documentElement:R,Se=ee&&ee.parentNode;return R===Se||!(!Se||1!==Se.nodeType||!(Ee.contains?Ee.contains(Se):R.compareDocumentPosition&&16&R.compareDocumentPosition(Se)))}:function(R,ee){if(ee)for(;ee=ee.parentNode;)if(ee===R)return!0;return!1},yh=a?function(R,ee){if(R===ee)return ev=!0,0;var Ee=!R.compareDocumentPosition-!ee.compareDocumentPosition;return Ee||(1&(Ee=(R.ownerDocument||R)===(ee.ownerDocument||ee)?R.compareDocumentPosition(ee):1)||!nu.sortDetached&&ee.compareDocumentPosition(R)===Ee?R===m||R.ownerDocument===Ja&&jo(Ja,R)?-1:ee===m||ee.ownerDocument===Ja&&jo(Ja,ee)?1:Uh?sc.call(Uh,R)-sc.call(Uh,ee):0:4&Ee?-1:1)}:function(R,ee){if(R===ee)return ev=!0,0;var Ee,Se=0,pt=R.parentNode,Gt=ee.parentNode,jt=[R],on=[ee];if(!pt||!Gt)return R===m?-1:ee===m?1:pt?-1:Gt?1:Uh?sc.call(Uh,R)-sc.call(Uh,ee):0;if(pt===Gt)return af(R,ee);for(Ee=R;Ee=Ee.parentNode;)jt.unshift(Ee);for(Ee=ee;Ee=Ee.parentNode;)on.unshift(Ee);for(;jt[Se]===on[Se];)Se++;return Se?af(jt[Se],on[Se]):jt[Se]===Ja?-1:on[Se]===Ja?1:0},m):Tf},Bl.matches=function(t,a){return Bl(t,null,null,a)},Bl.matchesSelector=function(t,a){if((t.ownerDocument||t)!==Tf&&zh(t),a=a.replace(Dd,"='$1']"),nu.matchesSelector&&Ud&&(!Kf||!Kf.test(a))&&(!Rp||!Rp.test(a)))try{var m=undefined.call(t,a);if(m||nu.disconnectedMatch||t.document&&11!==t.document.nodeType)return m}catch{}return Bl(a,Tf,null,[t]).length>0},Bl.contains=function(t,a){return(t.ownerDocument||t)!==Tf&&zh(t),jo(t,a)},Bl.attr=function(t,a){(t.ownerDocument||t)!==Tf&&zh(t);var m=Va.attrHandle[a.toLowerCase()],v=m&&bh.call(Va.attrHandle,a.toLowerCase())?m(t,a,!Ud):void 0;return void 0!==v?v:nu.attributes||!Ud?t.getAttribute(a):(v=t.getAttributeNode(a))&&v.specified?v.value:null},Bl.error=function(t){throw new Error("Syntax error, unrecognized expression: "+t)},Bl.uniqueSort=function(t){var a,m=[],v=0,S=0;if(ev=!nu.detectDuplicates,Uh=!nu.sortStable&&t.slice(0),t.sort(yh),ev){for(;a=t[S++];)a===t[S]&&(v=m.push(S));for(;v--;)t.splice(m[v],1)}return Uh=null,t},mp=Bl.getText=function(t){var a,m="",v=0,S=t.nodeType;if(S){if(1===S||9===S||11===S){if("string"==typeof t.textContent)return t.textContent;for(t=t.firstChild;t;t=t.nextSibling)m+=mp(t)}else if(3===S||4===S)return t.nodeValue}else for(;a=t[v++];)m+=mp(a);return m},Va=Bl.selectors={cacheLength:50,createPseudo:bp,match:Sd,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(t){return t[1]=t[1].replace(jp,yp),t[3]=(t[3]||t[4]||t[5]||"").replace(jp,yp),"~="===t[2]&&(t[3]=" "+t[3]+" "),t.slice(0,4)},CHILD:function(t){return t[1]=t[1].toLowerCase(),"nth"===t[1].slice(0,3)?(t[3]||Bl.error(t[0]),t[4]=+(t[4]?t[5]+(t[6]||1):2*("even"===t[3]||"odd"===t[3])),t[5]=+(t[7]+t[8]||"odd"===t[3])):t[3]&&Bl.error(t[0]),t},PSEUDO:function(t){var a,m=!t[6]&&t[2];return Sd.CHILD.test(t[0])?null:(t[3]?t[2]=t[4]||t[5]||"":m&&Jf.test(m)&&(a=Wp(m,!0))&&(a=m.indexOf(")",m.length-a)-m.length)&&(t[0]=t[0].slice(0,a),t[2]=m.slice(0,a)),t.slice(0,3))}},filter:{TAG:function(t){var a=t.replace(jp,yp).toLowerCase();return"*"===t?function(){return!0}:function(m){return m.nodeName&&m.nodeName.toLowerCase()===a}},CLASS:function(t){var a=hg[t+" "];return a||(a=new RegExp("(^|"+zs+")"+t+"("+zs+"|$)"))&&hg(t,function(m){return a.test("string"==typeof m.className&&m.className||typeof m.getAttribute!==Lu&&m.getAttribute("class")||"")})},ATTR:function(t,a,m){return function(v){var S=Bl.attr(v,t);return null==S?"!="===a:!a||(S+="","="===a?S===m:"!="===a?S!==m:"^="===a?m&&0===S.indexOf(m):"*="===a?m&&S.indexOf(m)>-1:"$="===a?m&&S.slice(-m.length)===m:"~="===a?(" "+S+" ").indexOf(m)>-1:"|="===a&&(S===m||S.slice(0,m.length+1)===m+"-"))}},CHILD:function(t,a,m,v,S){var R="nth"!==t.slice(0,3),ee="last"!==t.slice(-4),Ee="of-type"===a;return 1===v&&0===S?function(Se){return!!Se.parentNode}:function(Se,pt,Gt){var jt,on,Rn,Yn,$n,qn,bi=R!==ee?"nextSibling":"previousSibling",pi=Se.parentNode,tr=Ee&&Se.nodeName.toLowerCase(),Wi=!Gt&&!Ee;if(pi){if(R){for(;bi;){for(Rn=Se;Rn=Rn[bi];)if(Ee?Rn.nodeName.toLowerCase()===tr:1===Rn.nodeType)return!1;qn=bi="only"===t&&!qn&&"nextSibling"}return!0}if(qn=[ee?pi.firstChild:pi.lastChild],ee&&Wi){for($n=(jt=(on=pi[Ou]||(pi[Ou]={}))[t]||[])[0]===$p&&jt[1],Yn=jt[0]===$p&&jt[2],Rn=$n&&pi.childNodes[$n];Rn=++$n&&Rn&&Rn[bi]||(Yn=$n=0)||qn.pop();)if(1===Rn.nodeType&&++Yn&&Rn===Se){on[t]=[$p,$n,Yn];break}}else if(Wi&&(jt=(Se[Ou]||(Se[Ou]={}))[t])&&jt[0]===$p)Yn=jt[1];else for(;(Rn=++$n&&Rn&&Rn[bi]||(Yn=$n=0)||qn.pop())&&((Ee?Rn.nodeName.toLowerCase()!==tr:1!==Rn.nodeType)||!++Yn||(Wi&&((Rn[Ou]||(Rn[Ou]={}))[t]=[$p,Yn]),Rn!==Se)););return(Yn-=S)===v||Yn%v==0&&Yn/v>=0}}},PSEUDO:function(t,a){var m,v=Va.pseudos[t]||Va.setFilters[t.toLowerCase()]||Bl.error("unsupported pseudo: "+t);return v[Ou]?v(a):v.length>1?(m=[t,t,"",a],Va.setFilters.hasOwnProperty(t.toLowerCase())?bp(function(S,R){for(var ee,Ee=v(S,a),Se=Ee.length;Se--;)S[ee=sc.call(S,Ee[Se])]=!(R[ee]=Ee[Se])}):function(S){return v(S,0,m)}):v}},pseudos:{not:bp(function(t){var a=[],m=[],v=X_(t.replace(nv,"$1"));return v[Ou]?bp(function(S,R,ee,Ee){for(var Se,pt=v(S,null,Ee,[]),Gt=S.length;Gt--;)(Se=pt[Gt])&&(S[Gt]=!(R[Gt]=Se))}):function(S,R,ee){return a[0]=S,v(a,null,ee,m),a[0]=null,!m.pop()}}),has:bp(function(t){return function(a){return Bl(t,a).length>0}}),contains:bp(function(t){return t=t.replace(jp,yp),function(a){return(a.textContent||a.innerText||mp(a)).indexOf(t)>-1}}),lang:bp(function(t){return iv.test(t||"")||Bl.error("unsupported lang: "+t),t=t.replace(jp,yp).toLowerCase(),function(a){var m;do{if(m=Ud?a.lang:a.getAttribute("xml:lang")||a.getAttribute("lang"))return(m=m.toLowerCase())===t||0===m.indexOf(t+"-")}while((a=a.parentNode)&&1===a.nodeType);return!1}}),target:function(t){var a=window.location&&window.location.hash;return a&&a.slice(1)===t.id},root:function(t){return t===xf},focus:function(t){return t===Tf.activeElement&&(!Tf.hasFocus||Tf.hasFocus())&&!!(t.type||t.href||~t.tabIndex)},enabled:function(t){return!1===t.disabled},disabled:function(t){return!0===t.disabled},checked:function(t){var a=t.nodeName.toLowerCase();return"input"===a&&!!t.checked||"option"===a&&!!t.selected},selected:function(t){return t.parentNode&&t.parentNode.selectedIndex,!0===t.selected},empty:function(t){for(t=t.firstChild;t;t=t.nextSibling)if(t.nodeType<6)return!1;return!0},parent:function(t){return!Va.pseudos.empty(t)},header:function(t){return rv.test(t.nodeName)},input:function(t){return jg.test(t.nodeName)},button:function(t){var a=t.nodeName.toLowerCase();return"input"===a&&"button"===t.type||"button"===a},text:function(t){var a;return"input"===t.nodeName.toLowerCase()&&"text"===t.type&&(null==(a=t.getAttribute("type"))||"text"===a.toLowerCase())},first:Ac(function(){return[0]}),last:Ac(function(t,a){return[a-1]}),eq:Ac(function(t,a,m){return[m<0?m+a:m]}),even:Ac(function(t,a){for(var m=0;m<a;m+=2)t.push(m);return t}),odd:Ac(function(t,a){for(var m=1;m<a;m+=2)t.push(m);return t}),lt:Ac(function(t,a,m){for(var v=m<0?m+a:m;--v>=0;)t.push(v);return t}),gt:Ac(function(t,a,m){for(var v=m<0?m+a:m;++v<a;)t.push(v);return t})}},Va.pseudos.nth=Va.pseudos.eq,Mn(["radio","checkbox","file","password","image"],function(t){Va.pseudos[t]=function wm(t){return function(a){return"input"===a.nodeName.toLowerCase()&&a.type===t}}(t)}),Mn(["submit","reset"],function(t){Va.pseudos[t]=function Jc(t){return function(a){var m=a.nodeName.toLowerCase();return("input"===m||"button"===m)&&a.type===t}}(t)}),pl.prototype=Va.filters=Va.pseudos,Va.setFilters=new pl,Wp=Bl.tokenize=function(t,a){var m,v,S,R,ee,Ee,Se,pt=Lt[t+" "];if(pt)return a?0:pt.slice(0);for(ee=t,Ee=[],Se=Va.preFilter;ee;){for(R in(!m||(v=Hm.exec(ee)))&&(v&&(ee=ee.slice(v[0].length)||ee),Ee.push(S=[])),m=!1,(v=Vm.exec(ee))&&(m=v.shift(),S.push({value:m,type:v[0].replace(nv," ")}),ee=ee.slice(m.length)),Va.filter)Va.filter.hasOwnProperty(R)&&(v=Sd[R].exec(ee))&&(!Se[R]||(v=Se[R](v)))&&(m=v.shift(),S.push({value:m,type:R,matches:v}),ee=ee.slice(m.length));if(!m)break}return a?ee.length:ee?Bl.error(t):Lt(t,Ee).slice(0)},X_=Bl.compile=function(t,a){var m,v=[],S=[],R=Am[t+" "];if(!R){for(a||(a=Wp(t)),m=a.length;m--;)(R=Vh(a[m]))[Ou]?v.push(R):S.push(R);R=Am(t,function Qp(t,a){var m=a.length>0,v=t.length>0,S=function(R,ee,Ee,Se,pt){var Gt,jt,on,Rn=0,Yn="0",$n=R&&[],qn=[],bi=Bh,pi=R||v&&Va.find.TAG("*",pt),tr=$p+=null==bi?1:Math.random()||.1,Wi=pi.length;for(pt&&(Bh=ee!==Tf&&ee);Yn!==Wi&&null!=(Gt=pi[Yn]);Yn++){if(v&&Gt){for(jt=0;on=t[jt++];)if(on(Gt,ee,Ee)){Se.push(Gt);break}pt&&($p=tr)}m&&((Gt=!on&&Gt)&&Rn--,R&&$n.push(Gt))}if(Rn+=Yn,m&&Yn!==Rn){for(jt=0;on=a[jt++];)on($n,qn,ee,Ee);if(R){if(Rn>0)for(;Yn--;)$n[Yn]||qn[Yn]||(qn[Yn]=Yh.call(Se));qn=md(qn)}Ym.apply(Se,qn),pt&&!R&&qn.length>0&&Rn+a.length>1&&Bl.uniqueSort(Se)}return pt&&($p=tr,Bh=bi),$n};return m?bp(S):S}(S,v)),R.selector=t}return R},fp=Bl.select=function(t,a,m,v){var S,R,ee,Ee,Se,pt="function"==typeof t&&t,Gt=!v&&Wp(t=pt.selector||t);if(m=m||[],1===Gt.length){if((R=Gt[0]=Gt[0].slice(0)).length>2&&"ID"===(ee=R[0]).type&&nu.getById&&9===a.nodeType&&Ud&&Va.relative[R[1].type]){if(!(a=(Va.find.ID(ee.matches[0].replace(jp,yp),a)||[])[0]))return m;pt&&(a=a.parentNode),t=t.slice(R.shift().value.length)}for(S=Sd.needsContext.test(t)?0:R.length;S--&&(ee=R[S],!Va.relative[Ee=ee.type]);)if((Se=Va.find[Ee])&&(v=Se(ee.matches[0].replace(jp,yp),of.test(R[0].type)&&sf(a.parentNode)||a))){if(R.splice(S,1),!(t=v.length&&Zm(R)))return Ym.apply(m,v),m;break}}return(pt||X_(t,Gt))(v,a,!Ud,m,of.test(t)&&sf(a.parentNode)||a),m},nu.sortStable=Ou.split("").sort(yh).join("")===Ou,nu.detectDuplicates=!!ev,zh(),nu.sortDetached=!0;var Kg=document,Qc=Array.prototype.push,Zh=Array.prototype.slice,wc=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,Ep=E_.Event,Gh=Li.makeMap("children,contents,next,prev"),qp=function(t){return typeof t<"u"},lf=function(t){return"string"==typeof t},Ch=function(t,a){var S,m=(a=a||Kg).createElement("div"),v=a.createDocumentFragment();for(m.innerHTML=t;S=m.firstChild;)v.appendChild(S);return v},Ov=function(t,a,m,v){var S;if(lf(a))a=Ch(a,Eh(t[0]));else if(a.length&&!a.nodeType){if(a=Ya.makeArray(a),v)for(S=a.length-1;S>=0;S--)Ov(t,a[S],m,v);else for(S=0;S<a.length;S++)Ov(t,a[S],m,v);return t}if(a.nodeType)for(S=t.length;S--;)m.call(t[S],a);return t},Qf=function(t,a){return t&&a&&-1!==(" "+t.className+" ").indexOf(" "+a+" ")},yg=function(t,a,m){var v,S;return a=Ya(a)[0],t.each(function(){var R=this;(!m||v!==R.parentNode)&&(v=R.parentNode,S=a.cloneNode(!1),R.parentNode.insertBefore(S,R)),S.appendChild(R)}),t},Mb=Li.makeMap("fillOpacity fontWeight lineHeight opacity orphans widows zIndex zoom"," "),Tb=Li.makeMap("checked compact declare defer disabled ismap multiple nohref noshade nowrap readonly selected"," "),x_={for:"htmlFor",class:"className",readonly:"readOnly"},Mp={float:"cssFloat"},Jg={},bg={},fd=function(t,a){return new Ya.fn.init(t,a)},Cg=/^\s*|\s*$/g,zd=function(t){return null==t?"":(""+t).replace(Cg,"")},Ga=function(t,a){var m,v,S,R;if(t)if(void 0===(m=t.length)){for(v in t)if(t.hasOwnProperty(v)&&(R=t[v],!1===a.call(R,v,R)))break}else for(S=0;S<m&&(R=t[S],!1!==a.call(R,S,R));S++);return t},hd=function(t,a){var m=[];return Ga(t,function(v,S){a(S,v)&&m.push(S)}),m},Eh=function(t){return t?9===t.nodeType?t:t.ownerDocument:Kg};fd.fn=fd.prototype={constructor:fd,selector:"",context:null,length:0,init:function(t,a){var v,S,m=this;if(!t)return m;if(t.nodeType)return m.context=m[0]=t,m.length=1,m;if(a&&a.nodeType)m.context=a;else{if(a)return Ya(t).attr(a);m.context=a=document}if(lf(t)){if(m.selector=t,!(v="<"===t.charAt(0)&&">"===t.charAt(t.length-1)&&t.length>=3?[null,t,null]:wc.exec(t)))return Ya(a).find(t);if(v[1])for(S=Ch(t,Eh(a)).firstChild;S;)Qc.call(m,S),S=S.nextSibling;else{if(!(S=Eh(a).getElementById(v[2])))return m;if(S.id!==v[2])return m.find(t);m.length=1,m[0]=S}}else this.add(t,!1);return m},toArray:function(){return Li.toArray(this)},add:function(t,a){var v,S,m=this;if(lf(t))return m.add(Ya(t));if(!1!==a)for(v=Ya.unique(m.toArray().concat(Ya.makeArray(t))),m.length=v.length,S=0;S<v.length;S++)m[S]=v[S];else Qc.apply(m,Ya.makeArray(t));return m},attr:function(t,a){var v,m=this;if("object"==typeof t)Ga(t,function(S,R){m.attr(S,R)});else{if(!qp(a)){if(m[0]&&1===m[0].nodeType){if((v=Jg[t])&&v.get)return v.get(m[0],t);if(Tb[t])return m.prop(t)?t:void 0;null===(a=m[0].getAttribute(t,2))&&(a=void 0)}return a}this.each(function(){var S;if(1===this.nodeType){if((S=Jg[t])&&S.set)return void S.set(this,a);null===a?this.removeAttribute(t,2):this.setAttribute(t,a,2)}})}return m},removeAttr:function(t){return this.attr(t,null)},prop:function(t,a){var m=this;if("object"==typeof(t=x_[t]||t))Ga(t,function(v,S){m.prop(v,S)});else{if(!qp(a))return m[0]&&m[0].nodeType&&t in m[0]?m[0][t]:a;this.each(function(){1===this.nodeType&&(this[t]=a)})}return m},css:function(t,a){var v,S,m=this,R=function(Ee){return Ee.replace(/-(\D)/g,function(Se,pt){return pt.toUpperCase()})},ee=function(Ee){return Ee.replace(/[A-Z]/g,function(Se){return"-"+Se})};if("object"==typeof t)Ga(t,function(Ee,Se){m.css(Ee,Se)});else if(qp(a))t=R(t),"number"==typeof a&&!Mb[t]&&(a=a.toString()+"px"),m.each(function(){var Ee=this.style;if((S=bg[t])&&S.set)S.set(this,a);else{try{this.style[Mp[t]||t]=a}catch{}(null===a||""===a)&&(Ee.removeProperty?Ee.removeProperty(ee(t)):Ee.removeAttribute(t))}});else{if(v=m[0],(S=bg[t])&&S.get)return S.get(v);if(!v.ownerDocument.defaultView)return v.currentStyle?v.currentStyle[R(t)]:"";try{return v.ownerDocument.defaultView.getComputedStyle(v,null).getPropertyValue(ee(t))}catch{return}}return m},remove:function(){for(var a,m=this.length;m--;)a=this[m],Ep.clean(a),a.parentNode&&a.parentNode.removeChild(a);return this},empty:function(){for(var a,m=this.length;m--;)for(a=this[m];a.firstChild;)a.removeChild(a.firstChild);return this},html:function(t){var m,a=this;if(qp(t)){m=a.length;try{for(;m--;)a[m].innerHTML=t}catch{Ya(a[m]).empty().append(t)}return a}return a[0]?a[0].innerHTML:""},text:function(t){var m,a=this;if(qp(t)){for(m=a.length;m--;)"innerText"in a[m]?a[m].innerText=t:a[0].textContent=t;return a}return a[0]?a[0].innerText||a[0].textContent:""},append:function(){return Ov(this,arguments,function(t){(1===this.nodeType||this.host&&1===this.host.nodeType)&&this.appendChild(t)})},prepend:function(){return Ov(this,arguments,function(t){(1===this.nodeType||this.host&&1===this.host.nodeType)&&this.insertBefore(t,this.firstChild)},!0)},before:function(){var t=this;return t[0]&&t[0].parentNode?Ov(t,arguments,function(a){this.parentNode.insertBefore(a,this)}):t},after:function(){var t=this;return t[0]&&t[0].parentNode?Ov(t,arguments,function(a){this.parentNode.insertBefore(a,this.nextSibling)},!0):t},appendTo:function(t){return Ya(t).append(this),this},prependTo:function(t){return Ya(t).prepend(this),this},replaceWith:function(t){return this.before(t).remove()},wrap:function(t){return yg(this,t)},wrapAll:function(t){return yg(this,t,!0)},wrapInner:function(t){return this.each(function(){Ya(this).contents().wrapAll(t)}),this},unwrap:function(){return this.parent().each(function(){Ya(this).replaceWith(this.childNodes)})},clone:function(){var t=[];return this.each(function(){t.push(this.cloneNode(!0))}),Ya(t)},addClass:function(t){return this.toggleClass(t,!0)},removeClass:function(t){return this.toggleClass(t,!1)},toggleClass:function(t,a){var m=this;return"string"!=typeof t||(-1!==t.indexOf(" ")?Ga(t.split(" "),function(){m.toggleClass(this,a)}):m.each(function(v,S){var R=Qf(S,t);if(R!==a){var ee=S.className;R?S.className=zd((" "+ee+" ").replace(" "+t+" "," ")):S.className+=ee?" "+t:t}})),m},hasClass:function(t){return Qf(this[0],t)},each:function(t){return Ga(this,t)},on:function(t,a){return this.each(function(){Ep.bind(this,t,a)})},off:function(t,a){return this.each(function(){Ep.unbind(this,t,a)})},trigger:function(t){return this.each(function(){"object"==typeof t?Ep.fire(this,t.type,t):Ep.fire(this,t)})},show:function(){return this.css("display","")},hide:function(){return this.css("display","none")},slice:function(){return Ya(Zh.apply(this,arguments))},eq:function(t){return-1===t?this.slice(t):this.slice(t,+t+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},find:function(t){var a,m,v=[];for(a=0,m=this.length;a<m;a++)Ya.find(t,this[a],v);return Ya(v)},filter:function(t){return Ya("function"==typeof t?hd(this.toArray(),function(a,m){return t(m,a)}):Ya.filter(t,this.toArray()))},closest:function(t){var a=[];return t instanceof Ya&&(t=t[0]),this.each(function(m,v){for(;v;){if("string"==typeof t&&Ya(v).is(t)){a.push(v);break}if(v===t){a.push(v);break}v=v.parentNode}}),Ya(a)},offset:function(t){var a,m,v,ee,S=0,R=0;return t?this.css(t):((a=this[0])&&(v=(m=a.ownerDocument).documentElement,a.getBoundingClientRect&&(S=(ee=a.getBoundingClientRect()).left+(v.scrollLeft||m.body.scrollLeft)-v.clientLeft,R=ee.top+(v.scrollTop||m.body.scrollTop)-v.clientTop)),{left:S,top:R})},push:Qc,sort:Array.prototype.sort,splice:Array.prototype.splice},Li.extend(fd,{extend:Li.extend,makeArray:function(t){return function(t){return t&&t===t.window}(t)||t.nodeType?[t]:Li.toArray(t)},inArray:function(t,a){var m;if(a.indexOf)return a.indexOf(t);for(m=a.length;m--;)if(a[m]===t)return m;return-1},isArray:Li.isArray,each:Ga,trim:zd,grep:hd,find:Bl,expr:Bl.selectors,unique:Bl.uniqueSort,text:Bl.getText,contains:Bl.contains,filter:function(t,a,m){var v=a.length;for(m&&(t=":not("+t+")");v--;)1!==a[v].nodeType&&a.splice(v,1);return a=1===a.length?Ya.find.matchesSelector(a[0],t)?[a[0]]:[]:Ya.find.matches(t,a)}});var Al=function(t,a,m){var v=[],S=t[a];for("string"!=typeof m&&m instanceof Ya&&(m=m[0]);S&&9!==S.nodeType&&(void 0===m||!(S===m||"string"==typeof m&&Ya(S).is(m)));)1===S.nodeType&&v.push(S),S=S[a];return v},pm=function(t,a,m,v){var S=[];for(v instanceof Ya&&(v=v[0]);t;t=t[a])if(!m||t.nodeType===m){if(void 0!==v&&(t===v||"string"==typeof v&&Ya(t).is(v)))break;S.push(t)}return S},Yd=function(t,a,m){for(t=t[a];t;t=t[a])if(t.nodeType===m)return t;return null};Ga({parent:function(t){var a=t.parentNode;return a&&11!==a.nodeType?a:null},parents:function(t){return Al(t,"parentNode")},next:function(t){return Yd(t,"nextSibling",1)},prev:function(t){return Yd(t,"previousSibling",1)},children:function(t){return pm(t.firstChild,"nextSibling",1)},contents:function(t){return Li.toArray(("iframe"===t.nodeName?t.contentDocument||t.contentWindow.document:t).childNodes)}},function(t,a){fd.fn[t]=function(m){var S=[];this.each(function(){var ee=a.call(S,this,m,S);ee&&(Ya.isArray(ee)?S.push.apply(S,ee):S.push(ee))}),this.length>1&&(Gh[t]||(S=Ya.unique(S)),0===t.indexOf("parents")&&(S=S.reverse()));var R=Ya(S);return m?R.filter(m):R}}),Ga({parentsUntil:function(t,a){return Al(t,"parentNode",a)},nextUntil:function(t,a){return pm(t,"nextSibling",1,a).slice(1)},prevUntil:function(t,a){return pm(t,"previousSibling",1,a).slice(1)}},function(t,a){fd.fn[t]=function(m,v){var R=[];this.each(function(){var Ee=a.call(R,this,m,R);Ee&&(Ya.isArray(Ee)?R.push.apply(R,Ee):R.push(Ee))}),this.length>1&&(R=Ya.unique(R),(0===t.indexOf("parents")||"prevUntil"===t)&&(R=R.reverse()));var ee=Ya(R);return v?ee.filter(v):ee}}),fd.fn.is=function(t){return!!t&&this.filter(t).length>0},fd.fn.init.prototype=fd.fn,fd.overrideDefaults=function(t){var a,m=function(v,S){return a=a||t(),0===arguments.length&&(v=a.element),S||(S=a.context),new m.fn.init(v,S)};return Ya.extend(m,this),m},fd.attrHooks=Jg,fd.cssHooks=bg;var Ya=fd,Im=Li.each,cf=Li.grep,Lv=$r.ie,Fc=/^([a-z0-9],?)+$/i,xb=function(t,a){var m=a.attr("style"),v=t.serialize(t.parse(m),a[0].nodeName);v||(v=null),a.attr("data-mce-style",v)},uf=function(t,a){var v,S,m=0;if(t)for(v=t.nodeType,t=t.previousSibling;t;t=t.previousSibling)S=t.nodeType,(!a||3!==S||S!==v&&t.nodeValue.length)&&(m++,v=S);return m},jl=function(t,a){void 0===a&&(a={});var m={},v=window,S={},R=0,Se=dr.forElement(Dt.fromDom(t),{contentCssCors:a.contentCssCors,referrerPolicy:a.referrerPolicy}),pt=[],Gt=a.schema?a.schema:pd({}),jt=zm({url_converter:a.url_converter,url_converter_scope:a.url_converter_scope},a.schema),on=a.ownEvents?new E_:E_.Event,Rn=Gt.getBlockElements(),Yn=Ya.overrideDefaults(function(){return{context:t,element:IM.getRoot()}}),qn=function(Bi){return Bi&&t&&ue(Bi)?t.getElementById(Bi):Bi},bi=function(Bi){return Yn("string"==typeof Bi?qn(Bi):Bi)},pi=function(Bi,Ar,go){var Oo,cl,hc=bi(Bi);return hc.length&&(cl=(Oo=PO[Ar])&&Oo.get?Oo.get(hc,Ar):hc.attr(Ar)),typeof cl>"u"&&(cl=go||""),cl},tr=function(Bi){var Ar=qn(Bi);return Ar?Ar.attributes:[]},Wi=function(Bi,Ar,go){""===go&&(go=null);var Oo=bi(Bi),cl=Oo.attr(Ar);if(Oo.length){var hc=PO[Ar];hc&&hc.set?hc.set(Oo,go,Ar):Oo.attr(Ar,go),cl!==go&&a.onSetAttrib&&a.onSetAttrib({attrElm:Oo,attrName:Ar,attrValue:go})}},cr=function(){return a.root_element||t.body},no=function(Bi,Ar){return dt(t.body,qn(Bi),Ar)},Wr=function(Bi,Ar,go){var Oo=bi(Bi);return go?Oo.css(Ar):("float"===(Ar=Ar.replace(/-(\D)/g,function(cl,hc){return hc.toUpperCase()}))&&(Ar=$r.browser.isIE()?"styleFloat":"cssFloat"),Oo[0]&&Oo[0].style?Oo[0].style[Ar]:void 0)},qa=function(Bi){var Ar,go;return Bi=qn(Bi),Ar=Wr(Bi,"width"),go=Wr(Bi,"height"),-1===Ar.indexOf("px")&&(Ar=0),-1===go.indexOf("px")&&(go=0),{w:parseInt(Ar,10)||Bi.offsetWidth||Bi.clientWidth,h:parseInt(go,10)||Bi.offsetHeight||Bi.clientHeight}},Wo=function(Bi,Ar){var go;if(!Bi)return!1;if(!Array.isArray(Bi)){if("*"===Ar)return 1===Bi.nodeType;if(Fc.test(Ar)){var Oo=Ar.toLowerCase().split(/,/),cl=Bi.nodeName.toLowerCase();for(go=Oo.length-1;go>=0;go--)if(Oo[go]===cl)return!0;return!1}if(Bi.nodeType&&1!==Bi.nodeType)return!1}var hc=Array.isArray(Bi)?Bi:[Bi];return Bl(Ar,hc[0].ownerDocument||hc[0],null,hc).length>0},vo=function(Bi,Ar,go,Oo){var hc,cl=[],op=qn(Bi);for(Oo=void 0===Oo,go=go||("BODY"!==cr().nodeName?cr().parentNode:null),Li.is(Ar,"string")&&(hc=Ar,Ar="*"===Ar?function(QT){return 1===QT.nodeType}:function(QT){return Wo(QT,hc)});op&&!(op===go||ge(op.nodeType)||_s(op)||ra(op));){if(!Ar||"function"==typeof Ar&&Ar(op)){if(!Oo)return[op];cl.push(op)}op=op.parentNode}return Oo?cl:null},ca=function(Bi,Ar,go){var Oo=Ar;if(Bi)for("string"==typeof Ar&&(Oo=function(cl){return Wo(cl,Ar)}),Bi=Bi[go];Bi;Bi=Bi[go])if("function"==typeof Oo&&Oo(Bi))return Bi;return null},Ic=function(Bi,Ar,go){var Oo,cl="string"==typeof Bi?qn(Bi):Bi;if(!cl)return!1;if(Li.isArray(cl)&&(cl.length||0===cl.length))return Oo=[],Im(cl,function(op,QT){op&&Oo.push(Ar.call(go,"string"==typeof op?qn(op):op,QT))}),Oo;var hc=go||this;return Ar.call(hc,cl)},Mc=function(Bi,Ar){bi(Bi).each(function(go,Oo){Im(Ar,function(cl,hc){Wi(Oo,hc,cl)})})},fh=function(Bi,Ar){var go=bi(Bi);Lv?go.each(function(Oo,cl){if(!1!==cl.canHaveHTML){for(;cl.firstChild;)cl.removeChild(cl.firstChild);try{cl.innerHTML="<br>"+Ar,cl.removeChild(cl.firstChild)}catch{Ya("<div></div>").html("<br>"+Ar).contents().slice(1).appendTo(cl)}return Ar}}):go.html(Ar)},Op=function(Bi,Ar,go,Oo,cl){return Ic(Bi,function(hc){var op="string"==typeof Ar?t.createElement(Ar):Ar;return Mc(op,go),Oo&&("string"!=typeof Oo&&Oo.nodeType?op.appendChild(Oo):"string"==typeof Oo&&fh(op,Oo)),cl?op:hc.appendChild(op)})},f_=function(Bi,Ar,go){return Op(t.createElement(Bi),Bi,Ar,go,!0)},W_=td.decode,Xr=td.encodeAllRaw,fr=function(Bi,Ar){var go=bi(Bi);return Ar?go.each(function(){for(var Oo;Oo=this.firstChild;)3===Oo.nodeType&&0===Oo.data.length?this.removeChild(Oo):this.parentNode.insertBefore(Oo,this)}).remove():go.remove(),go.length>1?go.toArray():go[0]},Cf=function(Bi,Ar,go){bi(Bi).toggleClass(Ar,go).each(function(){""===this.className&&Ya(this).attr("class",null)})},Vf=function(Bi,Ar,go){return Ic(Ar,function(Oo){return Li.is(Oo,"array")&&(Bi=Bi.cloneNode(!0)),go&&Im(cf(Oo.childNodes),function(cl){Bi.appendChild(cl)}),Oo.parentNode.replaceChild(Bi,Oo)})},JT=function(Bi){if(la(Bi)){var Ar="a"===Bi.nodeName.toLowerCase()&&!pi(Bi,"href")&&pi(Bi,"id");if(pi(Bi,"name")||pi(Bi,"data-mce-bookmark")||Ar)return!0}return!1},TI=function(){return t.createRange()},JR=function(Bi,Ar,go,Oo){if(Li.isArray(Bi)){for(var cl=Bi.length,hc=[];cl--;)hc[cl]=JR(Bi[cl],Ar,go,Oo);return hc}return a.collect&&(Bi===t||Bi===v)&&pt.push([Bi,Ar,go,Oo]),on.bind(Bi,Ar,go,Oo||IM)},wO=function(Bi,Ar,go){if(Li.isArray(Bi)){for(var Oo=Bi.length,cl=[];Oo--;)cl[Oo]=wO(Bi[Oo],Ar,go);return cl}if(pt.length>0&&(Bi===t||Bi===v))for(Oo=pt.length;Oo--;){var hc=pt[Oo];Bi===hc[0]&&(!Ar||Ar===hc[1])&&(!go||go===hc[2])&&on.unbind(hc[0],hc[1],hc[2])}return on.unbind(Bi,Ar,go)},QR=function(Bi){if(Bi&&la(Bi)){var Ar=Bi.getAttribute("data-mce-contenteditable");return Ar&&"inherit"!==Ar?Ar:"inherit"!==Bi.contentEditable?Bi.contentEditable:null}return null},IM={doc:t,settings:a,win:v,files:S,stdMode:!0,boxModel:!0,styleSheetLoader:Se,boundEvents:pt,styles:jt,schema:Gt,events:on,isBlock:function(Bi){if("string"==typeof Bi)return!!Rn[Bi];if(Bi){var Ar=Bi.nodeType;if(Ar)return!(1!==Ar||!Rn[Bi.nodeName])}return!1},$:Yn,$$:bi,root:null,clone:function(Bi,Ar){if(!Lv||1!==Bi.nodeType||Ar)return Bi.cloneNode(Ar);var go=t.createElement(Bi.nodeName);return Im(tr(Bi),function(Oo){Wi(go,Oo.nodeName,pi(Bi,Oo.nodeName))}),go},getRoot:cr,getViewPort:function(Bi){var Ar=Su(Bi);return{x:Ar.x,y:Ar.y,w:Ar.width,h:Ar.height}},getRect:function(Bi){Bi=qn(Bi);var Ar=no(Bi),go=qa(Bi);return{x:Ar.x,y:Ar.y,w:go.w,h:go.h}},getSize:qa,getParent:function(Bi,Ar,go){var Oo=vo(Bi,Ar,go,!1);return Oo&&Oo.length>0?Oo[0]:null},getParents:vo,get:qn,getNext:function(Bi,Ar){return ca(Bi,Ar,"nextSibling")},getPrev:function(Bi,Ar){return ca(Bi,Ar,"previousSibling")},select:function(Bi,Ar){return Bl(Bi,qn(Ar)||a.root_element||t,[])},is:Wo,add:Op,create:f_,createHTML:function(Bi,Ar,go){var cl,Oo="";for(cl in Oo+="<"+Bi,Ar)pr(Ar,cl)&&(Oo+=" "+cl+'="'+Xr(Ar[cl])+'"');return typeof go<"u"?Oo+">"+go+"</"+Bi+">":Oo+" />"},createFragment:function(Bi){var Ar,go=t.createElement("div"),Oo=t.createDocumentFragment();for(Oo.appendChild(go),Bi&&(go.innerHTML=Bi);Ar=go.firstChild;)Oo.appendChild(Ar);return Oo.removeChild(go),Oo},remove:fr,setStyle:function(Bi,Ar,go){var Oo=ue(Ar)?bi(Bi).css(Ar,go):bi(Bi).css(Ar);a.update_styles&&xb(jt,Oo)},getStyle:Wr,setStyles:function(Bi,Ar){var go=bi(Bi).css(Ar);a.update_styles&&xb(jt,go)},removeAllAttribs:function(Bi){return Ic(Bi,function(Ar){var go,Oo=Ar.attributes;for(go=Oo.length-1;go>=0;go--)Ar.removeAttributeNode(Oo.item(go))})},setAttrib:Wi,setAttribs:Mc,getAttrib:pi,getPos:no,parseStyle:function(Bi){return jt.parse(Bi)},serializeStyle:function(Bi,Ar){return jt.serialize(Bi,Ar)},addStyle:function(Bi){var Ar,go;if(IM!==jl.DOM&&t===document){if(m[Bi])return;m[Bi]=!0}(go=t.getElementById("mceDefaultStyles"))||((go=t.createElement("style")).id="mceDefaultStyles",go.type="text/css",(Ar=t.getElementsByTagName("head")[0]).firstChild?Ar.insertBefore(go,Ar.firstChild):Ar.appendChild(go)),go.styleSheet?go.styleSheet.cssText+=Bi:go.appendChild(t.createTextNode(Bi))},loadCSS:function(Bi){Bi||(Bi=""),Mn(Bi.split(","),function(Ar){S[Ar]=!0,Se.load(Ar,xe)})},addClass:function(Bi,Ar){bi(Bi).addClass(Ar)},removeClass:function(Bi,Ar){Cf(Bi,Ar,!1)},hasClass:function(Bi,Ar){return bi(Bi).hasClass(Ar)},toggleClass:Cf,show:function(Bi){bi(Bi).show()},hide:function(Bi){bi(Bi).hide()},isHidden:function(Bi){return"none"===bi(Bi).css("display")},uniqueId:function(Bi){return(Bi||"mce_")+R++},setHTML:fh,getOuterHTML:function(Bi){var Ar="string"==typeof Bi?qn(Bi):Bi;return la(Ar)?Ar.outerHTML:Ya("<div></div>").append(Ya(Ar).clone()).html()},setOuterHTML:function(Bi,Ar){bi(Bi).each(function(){try{if("outerHTML"in this)return void(this.outerHTML=Ar)}catch{}fr(Ya(this).html(Ar),!0)})},decode:W_,encode:Xr,insertAfter:function(Bi,Ar){var go=qn(Ar);return Ic(Bi,function(Oo){var cl=go.parentNode,hc=go.nextSibling;return hc?cl.insertBefore(Oo,hc):cl.appendChild(Oo),Oo})},replace:Vf,rename:function(Bi,Ar){var go;return Bi.nodeName!==Ar.toUpperCase()&&(go=f_(Ar),Im(tr(Bi),function(Oo){Wi(go,Oo.nodeName,pi(Bi,Oo.nodeName))}),Vf(go,Bi,!0)),go||Bi},findCommonAncestor:function(Bi,Ar){for(var Oo,go=Bi;go;){for(Oo=Ar;Oo&&go!==Oo;)Oo=Oo.parentNode;if(go===Oo)break;go=go.parentNode}return!go&&Bi.ownerDocument?Bi.ownerDocument.documentElement:go},toHex:function(Bi){return jt.toHex(Li.trim(Bi))},run:Ic,getAttribs:tr,isEmpty:function(Bi,Ar){var go,Oo,cl=0;if(JT(Bi))return!1;if(Bi=Bi.firstChild){var hc=new Sr(Bi,Bi.parentNode),op=Gt?Gt.getWhiteSpaceElements():{};Ar=Ar||(Gt?Gt.getNonEmptyElements():null);do{if(go=Bi.nodeType,la(Bi)){var QT=Bi.getAttribute("data-mce-bogus");if(QT){Bi=hc.next("all"===QT);continue}if(Oo=Bi.nodeName.toLowerCase(),Ar&&Ar[Oo]){if("br"===Oo){cl++,Bi=hc.next();continue}return!1}if(JT(Bi))return!1}if(8===go||3===go&&!Sc(Bi.nodeValue)||3===go&&Bi.parentNode&&op[Bi.parentNode.nodeName]&&Sc(Bi.nodeValue))return!1;Bi=hc.next()}while(Bi)}return cl<=1},createRng:TI,nodeIndex:uf,split:function(Bi,Ar,go){var cl,hc,op,Oo=TI();if(Bi&&Ar)return Oo.setStart(Bi.parentNode,uf(Bi)),Oo.setEnd(Ar.parentNode,uf(Ar)),cl=Oo.extractContents(),(Oo=TI()).setStart(Ar.parentNode,uf(Ar)+1),Oo.setEnd(Bi.parentNode,uf(Bi)+1),hc=Oo.extractContents(),(op=Bi.parentNode).insertBefore(Vp(IM,cl),Bi),go?op.insertBefore(go,Bi):op.insertBefore(Ar,Bi),op.insertBefore(Vp(IM,hc),Bi),fr(Bi),go||Ar},bind:JR,unbind:wO,fire:function(Bi,Ar,go){return on.fire(Bi,Ar,go)},getContentEditable:QR,getContentEditableParent:function(Bi){for(var Ar=cr(),go=null;Bi&&Bi!==Ar&&null===(go=QR(Bi));Bi=Bi.parentNode);return go},destroy:function(){if(pt.length>0)for(var Bi=pt.length;Bi--;){var Ar=pt[Bi];on.unbind(Ar[0],Ar[1],Ar[2])}Hi(S,function(go,Oo){Se.unload(Oo),delete S[Oo]}),Bl.setDocument&&Bl.setDocument()},isChildOf:function(Bi,Ar){if(Lv){for(;Bi;){if(Ar===Bi)return!0;Bi=Bi.parentNode}return!1}return Bi===Ar||Ar.contains(Bi)},dumpRng:function(Bi){return"startContainer: "+Bi.startContainer.nodeName+", startOffset: "+Bi.startOffset+", endContainer: "+Bi.endContainer.nodeName+", endOffset: "+Bi.endOffset}},PO=function(t,a,m){var v=a.keep_values,S={set:function(ee,Ee,Se){a.url_converter&&null!==Ee&&(Ee=a.url_converter.call(a.url_converter_scope||m(),Ee,Se,ee[0])),ee.attr("data-mce-"+Se,Ee).attr(Se,Ee)},get:function(ee,Ee){return ee.attr("data-mce-"+Ee)||ee.attr(Ee)}},R={style:{set:function(ee,Ee){null===Ee||"object"!=typeof Ee?(v&&ee.attr("data-mce-style",Ee),null!==Ee&&"string"==typeof Ee?(ee.removeAttr("style"),ee.css(t.parse(Ee))):ee.attr("style",Ee)):ee.css(Ee)},get:function(ee){var Ee=ee.attr("data-mce-style")||ee.attr("style");return t.serialize(t.parse(Ee),ee[0].nodeName)}}};return v&&(R.href=R.src=S),R}(jt,a,oe(IM));return IM};jl.DOM=jl(document),jl.nodeIndex=uf;var Eg=jl.DOM,Gm=Li.each,qd=Li.grep,Xs=function(){function t(a){void 0===a&&(a={}),this.states={},this.queue=[],this.scriptLoadedCallbacks={},this.queueLoadedCallbacks=[],this.loading=0,this.settings=a}return t.prototype._setReferrerPolicy=function(a){this.settings.referrerPolicy=a},t.prototype.loadScript=function(a,m,v){var R,S=Eg,ee=function(){S.remove(pt),R&&(R.onerror=R.onload=R=null)},pt=S.uniqueId();(R=document.createElement("script")).id=pt,R.type="text/javascript",R.src=Li._addCacheSuffix(a),this.settings.referrerPolicy&&S.setAttrib(R,"referrerpolicy",this.settings.referrerPolicy),R.onload=function(){ee(),m()},R.onerror=function(){ee(),pe(v)?v():typeof console<"u"&&console.log&&console.log("Failed to load script: "+a)},(document.getElementsByTagName("head")[0]||document.body).appendChild(R)},t.prototype.isDone=function(a){return 2===this.states[a]},t.prototype.markDone=function(a){this.states[a]=2},t.prototype.add=function(a,m,v,S){var R=this.states[a];this.queue.push(a),void 0===R&&(this.states[a]=0),m&&(this.scriptLoadedCallbacks[a]||(this.scriptLoadedCallbacks[a]=[]),this.scriptLoadedCallbacks[a].push({success:m,failure:S,scope:v||this}))},t.prototype.load=function(a,m,v,S){return this.add(a,m,v,S)},t.prototype.remove=function(a){delete this.states[a],delete this.scriptLoadedCallbacks[a]},t.prototype.loadQueue=function(a,m,v){this.loadScripts(this.queue,a,m,v)},t.prototype.loadScripts=function(a,m,v,S){var R=this,ee=[],Ee=function(pt,Gt){Gm(R.scriptLoadedCallbacks[Gt],function(jt){pe(jt[pt])&&jt[pt].call(jt.scope)}),R.scriptLoadedCallbacks[Gt]=void 0};R.queueLoadedCallbacks.push({success:m,failure:S,scope:v||this});var Se=function(){var pt=qd(a);if(a.length=0,Gm(pt,function(jt){2!==R.states[jt]?3!==R.states[jt]?1!==R.states[jt]&&(R.states[jt]=1,R.loading++,R.loadScript(jt,function(){R.states[jt]=2,R.loading--,Ee("success",jt),Se()},function(){R.states[jt]=3,R.loading--,ee.push(jt),Ee("failure",jt),Se()})):Ee("failure",jt):Ee("success",jt)}),!R.loading){var Gt=R.queueLoadedCallbacks.slice(0);R.queueLoadedCallbacks.length=0,Gm(Gt,function(jt){0===ee.length?pe(jt.success)&&jt.success.call(jt.scope):pe(jt.failure)&&jt.failure.call(jt.scope,ee)})}};Se()},t.ScriptLoader=new t,t}(),nd=function(t){var a=t;return{get:function(){return a},set:function(S){a=S}}},Sf={},Mh=nd("en"),Mg=function(){return Ni(Sf,Mh.get())},gu={getData:function(){return Gr(Sf,function(t){return Tn({},t)})},setCode:function(t){t&&Mh.set(t)},getCode:function(){return Mh.get()},add:function(t,a){var m=Sf[t];m||(Sf[t]=m={}),Hi(a,function(v,S){m[S.toLowerCase()]=v})},translate:function(t){var a=Mg().getOr({}),m=function(Se){return pe(Se)?Object.prototype.toString.call(Se):v(Se)?"":""+Se},v=function(Se){return""===Se||null==Se},S=function(Se){var pt=m(Se);return Ni(a,pt.toLowerCase()).map(m).getOr(pt)},R=function(Se){return Se.replace(/{context:\w+}$/,"")};if(v(t))return"";if(function(t){return he(t)&&Nn(t,"raw")}(t))return m(t.raw);if(function(t){return ae(t)&&t.length>1}(t)){var ee=t.slice(1);return R(S(t[0]).replace(/\{([0-9]+)\}/g,function(Se,pt){return Nn(ee,pt)?m(ee[pt]):Se}))}return R(S(t))},isRtl:function(){return Mg().bind(function(t){return Ni(t,"_dir")}).exists(function(t){return"rtl"===t})},hasCode:function(t){return Nn(Sf,t)}},Ad=function(){var t=[],a={},m={},v=[],S=function($n,qn){var bi=mi(v,function(pi){return pi.name===$n&&pi.state===qn});Mn(bi,function(pi){return pi.callback()})},ee=function($n){var qn;return m[$n]&&(qn=m[$n].dependencies),qn||[]},Gt=function($n,qn){return"object"==typeof qn?qn:"string"==typeof $n?{prefix:"",resource:qn,suffix:""}:{prefix:$n.prefix,resource:qn,suffix:$n.suffix}},Rn=function($n,qn,bi,pi,tr){if(!a[$n]){var Wi="string"==typeof qn?qn:qn.prefix+qn.resource+qn.suffix;0!==Wi.indexOf("/")&&-1===Wi.indexOf("://")&&(Wi=Ad.baseURL+"/"+Wi),a[$n]=Wi.substring(0,Wi.lastIndexOf("/"));var Oi=function(){S($n,"loaded"),function($n,qn,bi,pi){var tr=ee($n);Mn(tr,function(Wi){var Oi=Gt(qn,Wi);Rn(Oi.resource,Oi,void 0,void 0)}),bi&&(pi?bi.call(pi):bi.call(Xs))}($n,qn,bi,pi)};m[$n]?Oi():Xs.ScriptLoader.add(Wi,Oi,pi,tr)}},Yn=function($n,qn,bi){void 0===bi&&(bi="added"),Nn(m,$n)&&"added"===bi||Nn(a,$n)&&"loaded"===bi?qn():v.push({name:$n,state:bi,callback:qn})};return{items:t,urls:a,lookup:m,_listeners:v,get:function($n){if(m[$n])return m[$n].instance},dependencies:ee,requireLangPack:function($n,qn){!1!==Ad.languageLoad&&Yn($n,function(){var bi=gu.getCode();!bi||qn&&-1===(","+(qn||"")+",").indexOf(","+bi+",")||Xs.ScriptLoader.add(a[$n]+"/langs/"+bi+".js")},"loaded")},add:function($n,qn,bi){var pi=qn;return t.push(pi),m[$n]={instance:pi,dependencies:bi},S($n,"added"),pi},remove:function($n){delete a[$n],delete m[$n]},createUrl:Gt,addComponents:function($n,qn){var bi=a[$n];Mn(qn,function(pi){Xs.ScriptLoader.add(bi+"/"+pi)})},load:Rn,waitFor:Yn}};Ad.languageLoad=!0,Ad.baseURL="",Ad.PluginManager=Ad(),Ad.ThemeManager=Ad();var $h=function(){var t=function(t){var a=nd(Ne.none()),m=function(){return a.get().each(t)};return{clear:function(){m(),a.set(Ne.none())},isSet:function(){return a.get().isSome()},get:function(){return a.get()},set:function(Ee){m(),a.set(Ne.some(Ee))}}}(xe);return Tn(Tn({},t),{on:function(m){return t.get().each(m)}})},av=function(t,a){var m=null;return{cancel:function(){X(m)||(clearTimeout(m),m=null)},throttle:function(){for(var R=[],ee=0;ee<arguments.length;ee++)R[ee]=arguments[ee];X(m)&&(m=setTimeout(function(){m=null,t.apply(null,R)},a))}}},Yu=function(t,a){var m=null,v=function(){X(m)||(clearTimeout(m),m=null)};return{cancel:v,throttle:function(){for(var R=[],ee=0;ee<arguments.length;ee++)R[ee]=arguments[ee];v(),m=setTimeout(function(){m=null,t.apply(null,R)},a)}}},Xp=function(t,a){var m=mn(t,a);return void 0===m||""===m?[]:m.split(" ")},jh=function(t){return void 0!==t.dom.classList},D_=function(t,a){return function(t,a,m){var S=Xp(t,a).concat([m]);return Xe(t,a,S.join(" ")),!0}(t,"class",a)},wf=function(t,a){return function(t,a,m){var v=mi(Xp(t,a),function(S){return S!==m});return v.length>0?Xe(t,a,v.join(" ")):nr(t,a),!1}(t,"class",a)},Qg=function(t,a){jh(t)?t.dom.classList.add(a):D_(t,a)},Np=function(t){var a=jh(t)?t.dom.classList:function(t){return Xp(t,"class")}(t);0===a.length&&nr(t,"class")},_d=function(t,a){return jh(t)&&t.dom.classList.contains(a)},xh=function(t,a){var m=[];return Mn(Qs(t),function(v){a(v)&&(m=m.concat([v])),m=m.concat(xh(v,a))}),m},iu=function(t,a){return function(t,a){var m=void 0===a?document:a.dom;return ho(m)?[]:Dn(m.querySelectorAll(t),Dt.fromDom)}(a,t)},xp=oe("mce-annotation"),kv=oe("data-mce-annotation"),id=oe("data-mce-annotation-uid"),Dy=function(t,a){var m=t.selection.getRng(),v=Dt.fromDom(m.startContainer),S=Dt.fromDom(t.getBody()),R=a.fold(function(){return"."+xp()},function(pt){return"["+kv()+'="'+pt+'"]'}),ee=vu(v,m.startOffset).getOr(v),Ee=ws(ee,R,function(pt){return Ao(pt,S)}),Se=function(pt,Gt){return function(t,a){var m=t.dom;return!(!m||!m.hasAttribute)&&m.hasAttribute(a)}(pt,Gt)?Ne.some(mn(pt,Gt)):Ne.none()};return Ee.bind(function(pt){return Se(pt,""+id()).bind(function(Gt){return Se(pt,""+kv()).map(function(jt){var on=Sb(t,Gt);return{uid:Gt,name:jt,elements:on}})})})},Sb=function(t,a){var m=Dt.fromDom(t.getBody());return iu(m,"["+id()+'="'+a+'"]')},Ab=function(t,a){var m=nd({}),v=function(){return{listeners:[],previous:$h()}},S=function(Gt,jt){R(Gt,function(on){return jt(on),on})},R=function(Gt,jt){var on=m.get(),Yn=jt(Ni(on,Gt).getOrThunk(v));on[Gt]=Yn,m.set(on)},Se=Yu(function(){var Gt=m.get(),jt=Vi(Zi(Gt));Mn(jt,function(on){R(on,function(Rn){var Yn=Rn.previous.get();return Dy(t,Ne.some(on)).fold(function(){Yn.isSome()&&(function(Gt){S(Gt,function(jt){Mn(jt.listeners,function(on){return on(!1,Gt)})})}(on),Rn.previous.clear())},function($n){var qn=$n.uid,bi=$n.name,pi=$n.elements;_l(Yn,qn)||(function(Gt,jt,on){S(Gt,function(Rn){Mn(Rn.listeners,function(Yn){return Yn(!0,Gt,{uid:jt,nodes:Dn(on,function($n){return $n.dom})})})})}(bi,qn,pi),Rn.previous.set(qn))}),{previous:Rn.previous,listeners:Rn.listeners}})})},30);t.on("remove",function(){Se.cancel()}),t.on("NodeChange",function(){Se.throttle()});return{addListener:function(Gt,jt){R(Gt,function(on){return{previous:on.previous,listeners:on.listeners.concat([jt])}})}}},Dh=function(t,a){t.on("init",function(){t.serializer.addNodeFilter("span",function(v){Mn(v,function(S){(function(v){return Ne.from(v.attr(kv())).bind(a.lookup)})(S).each(function(R){!1===R.persistent&&S.unwrap()})})})})},wd=0,Qh=function(t){var m=(new Date).getTime();return t+"_"+Math.floor(1e9*Math.random())+ ++wd+String(m)},nm=function(t,a){var v=yi(t).dom,S=Dt.fromDom(v.createDocumentFragment()),R=function(t,a){var v=(a||document).createElement("div");return v.innerHTML=t,Qs(Dt.fromDom(v))}(a,v);Oc(S,R),or(t),ac(t,S)},Up=function(t,a){return Dt.fromDom(t.dom.cloneNode(a))},Hu=function(t){return Up(t,!1)},sv=function(t){return Up(t,!0)},Rv=function(t,a,m){void 0===m&&(m=Be);var v=new Sr(t,a),S=function(R){var ee;do{ee=v[R]()}while(ee&&!Kr(ee)&&!m(ee));return Ne.from(ee).filter(Kr)};return{current:function(){return Ne.from(v.current()).filter(Kr)},next:function(){return S("next")},prev:function(){return S("prev")},prev2:function(){return S("prev2")}}},ml=function(t,a){var m=a||function(ee){return t.isBlock(ee)||_a(ee)||Os(ee)},v=function(ee,Ee,Se,pt){if(Kr(ee)){var Gt=pt(ee,Ee,ee.data);if(-1!==Gt)return Ne.some({container:ee,offset:Gt})}return Se().bind(function(jt){return v(jt.container,jt.offset,Se,pt)})};return{backwards:function(ee,Ee,Se,pt){var Gt=Rv(ee,pt,m);return v(ee,Ee,function(){return Gt.prev().map(function(jt){return{container:jt,offset:jt.length}})},Se).getOrNull()},forwards:function(ee,Ee,Se,pt){var Gt=Rv(ee,pt,m);return v(ee,Ee,function(){return Gt.next().map(function(jt){return{container:jt,offset:0}})},Se).getOrNull()}}},pf=Math.round,mm=function(t){return t?{left:pf(t.left),top:pf(t.top),bottom:pf(t.bottom),right:pf(t.right),width:pf(t.width),height:pf(t.height)}:{left:0,top:0,bottom:0,right:0,width:0,height:0}},Sy=function(t,a){return t=mm(t),a||(t.left=t.left+t.width),t.right=t.left,t.width=0,t},M=function(t,a,m){return t>=0&&t<=Math.min(a.height,m.height)/2},C=function(t,a){var m=Math.min(a.height/2,t.height/2);return t.bottom-m<a.top||!(t.top>a.bottom)&&M(a.top-t.bottom,t,a)},Q=function(t,a){return t.top>a.bottom||!(t.bottom<a.top)&&M(a.bottom-t.top,t,a)},Ye=function(t,a,m){return a>=t.left&&a<=t.right&&m>=t.top&&m<=t.bottom},Pi=function(t){var a=t.startContainer,m=t.startOffset;return a.hasChildNodes()&&t.endOffset===m+1?a.childNodes[m]:null},Ir=function(t,a){if(la(t)&&t.hasChildNodes()){var m=t.childNodes,v=function(t,a,m){return Math.min(Math.max(t,a),m)}(a,0,m.length-1);return m[v]}return t},Qa=new RegExp("[\u0300-\u036f\u0483-\u0487\u0488-\u0489\u0591-\u05bd\u05bf\u05c1-\u05c2\u05c4-\u05c5\u05c7\u0610-\u061a\u064b-\u065f\u0670\u06d6-\u06dc\u06df-\u06e4\u06e7-\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0859-\u085b\u08e3-\u0902\u093a\u093c\u0941-\u0948\u094d\u0951-\u0957\u0962-\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2-\u09e3\u0a01-\u0a02\u0a3c\u0a41-\u0a42\u0a47-\u0a48\u0a4b-\u0a4d\u0a51\u0a70-\u0a71\u0a75\u0a81-\u0a82\u0abc\u0ac1-\u0ac5\u0ac7-\u0ac8\u0acd\u0ae2-\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62-\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c00\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55-\u0c56\u0c62-\u0c63\u0c81\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc-\u0ccd\u0cd5-\u0cd6\u0ce2-\u0ce3\u0d01\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62-\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb-\u0ebc\u0ec8-\u0ecd\u0f18-\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86-\u0f87\u0f8d-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039-\u103a\u103d-\u103e\u1058-\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085-\u1086\u108d\u109d\u135d-\u135f\u1712-\u1714\u1732-\u1734\u1752-\u1753\u1772-\u1773\u17b4-\u17b5\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927-\u1928\u1932\u1939-\u193b\u1a17-\u1a18\u1a1b\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1ab0-\u1abd\u1abe\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80-\u1b81\u1ba2-\u1ba5\u1ba8-\u1ba9\u1bab-\u1bad\u1be6\u1be8-\u1be9\u1bed\u1bef-\u1bf1\u1c2c-\u1c33\u1c36-\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1cf4\u1cf8-\u1cf9\u1dc0-\u1df5\u1dfc-\u1dff\u200c-\u200d\u20d0-\u20dc\u20dd-\u20e0\u20e1\u20e2-\u20e4\u20e5-\u20f0\u2cef-\u2cf1\u2d7f\u2de0-\u2dff\u302a-\u302d\u302e-\u302f\u3099-\u309a\ua66f\ua670-\ua672\ua674-\ua67d\ua69e-\ua69f\ua6f0-\ua6f1\ua802\ua806\ua80b\ua825-\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\ua9e5\uaa29-\uaa2e\uaa31-\uaa32\uaa35-\uaa36\uaa43\uaa4c\uaa7c\uaab0\uaab2-\uaab4\uaab7-\uaab8\uaabe-\uaabf\uaac1\uaaec-\uaaed\uaaf6\uabe5\uabe8\uabed\ufb1e\ufe00-\ufe0f\ufe20-\ufe2f\uff9e-\uff9f]"),ec=function(t){return"string"==typeof t&&t.charCodeAt(0)>=768&&Qa.test(t)},ao=la,Ay=Je,Wc=Ke("display","block table"),Dp=Ke("float","left right"),Ah=function(){for(var t=[],a=0;a<arguments.length;a++)t[a]=arguments[a];return function(m){for(var v=0;v<t.length;v++)if(!t[v](m))return!1;return!0}}(ao,Ay,Z(Dp)),CC=Z(Ke("white-space","pre pre-line pre-wrap")),Id=Kr,Xf=_a,EC=jl.nodeIndex,$m=function(t,a){if(!(a<0&&la(t)&&t.hasChildNodes()))return Ir(t,a)},Xd=function(t){return"createRange"in t?t.createRange():jl.DOM.createRng()},js=function(t){return t&&/[\r\n\t ]/.test(t)},wy=function(t){return!!t.setStart&&!!t.setEnd},Vu=function(t){var a=t.startContainer,m=t.startOffset;if(js(t.toString())&&CC(a.parentNode)&&Kr(a)){var v=a.data;if(js(v[m-1])||js(v[m+1]))return!0}return!1},fm=function(t){return 0===t.left&&0===t.right&&0===t.top&&0===t.bottom},lv=function(t){var a,m=t.getClientRects();return a=m.length>0?mm(m[0]):mm(t.getBoundingClientRect()),!wy(t)&&Xf(t)&&fm(a)?function(t){var a=t.ownerDocument,m=Xd(a),v=a.createTextNode(Pu),S=t.parentNode;S.insertBefore(v,t),m.setStart(v,0),m.setEnd(v,1);var R=mm(m.getBoundingClientRect());return S.removeChild(v),R}(t):fm(a)&&wy(t)?function(t){var a=t.startContainer,m=t.endContainer,v=t.startOffset,S=t.endOffset;if(a===m&&Kr(m)&&0===v&&1===S){var R=t.cloneRange();return R.setEndAfter(m),lv(R)}return null}(t):a},cv=function(t,a){var m=Sy(t,a);return m.width=1,m.right=m.left+1,m},Tr=function(t,a,m){var ee=function(){return m||(m=function(t){var a=[],m=function(Se){0!==Se.height&&(a.length>0&&function(t,a){return t.left===a.left&&t.top===a.top&&t.bottom===a.bottom&&t.right===a.right}(Se,a[a.length-1])||a.push(Se))},v=function(Se,pt){var Gt=Xd(Se.ownerDocument);if(pt<Se.data.length){if(ec(Se.data[pt]))return a;if(ec(Se.data[pt-1])&&(Gt.setStart(Se,pt),Gt.setEnd(Se,pt+1),!Vu(Gt)))return m(cv(lv(Gt),!1)),a}pt>0&&(Gt.setStart(Se,pt-1),Gt.setEnd(Se,pt),Vu(Gt)||m(cv(lv(Gt),!1))),pt<Se.data.length&&(Gt.setStart(Se,pt),Gt.setEnd(Se,pt+1),Vu(Gt)||m(cv(lv(Gt),!0)))},S=t.container(),R=t.offset();if(Id(S))return v(S,R),a;if(ao(S))if(t.isAtEnd()){var ee=$m(S,R);Id(ee)&&v(ee,ee.data.length),Ah(ee)&&!Xf(ee)&&m(cv(lv(ee),!1))}else{if(ee=$m(S,R),Id(ee)&&v(ee,0),Ah(ee)&&t.isAtEnd())return m(cv(lv(ee),!1)),a;var Ee=$m(t.container(),t.offset()-1);Ah(Ee)&&!Xf(Ee)&&(Wc(Ee)||Wc(ee)||!Ah(ee))&&m(cv(lv(Ee),!1)),Ah(ee)&&m(cv(lv(ee),!0))}return a}(Tr(t,a))),m};return{container:oe(t),offset:oe(a),toRange:function(){var Gt=Xd(t.ownerDocument);return Gt.setStart(t,a),Gt.setEnd(t,a),Gt},getClientRects:ee,isVisible:function(){return ee().length>0},isAtStart:function(){return Id(t),0===a},isAtEnd:function(){return Id(t)?a>=t.data.length:a>=t.childNodes.length},isEqual:function(Gt){return Gt&&t===Gt.container()&&a===Gt.offset()},getNode:function(Gt){return $m(t,Gt?a-1:a)}}};Tr.fromRangeStart=function(t){return Tr(t.startContainer,t.startOffset)},Tr.fromRangeEnd=function(t){return Tr(t.endContainer,t.endOffset)},Tr.after=function(t){return Tr(t.parentNode,EC(t)+1)},Tr.before=function(t){return Tr(t.parentNode,EC(t))},Tr.isAbove=function(t,a){return Gs(Hn(a.getClientRects()),An(t.getClientRects()),C).getOr(!1)},Tr.isBelow=function(t,a){return Gs(An(a.getClientRects()),Hn(t.getClientRects()),Q).getOr(!1)},Tr.isAtStart=function(t){return!!t&&t.isAtStart()},Tr.isAtEnd=function(t){return!!t&&t.isAtEnd()},Tr.isTextPosition=function(t){return!!t&&Kr(t.container())},Tr.isElementPosition=function(t){return!1===Tr.isTextPosition(t)};var Vd,qh=function(t,a){Kr(a)&&0===a.data.length&&t.remove(a)},im=function(t,a,m){ra(m)?function(t,a,m){var v=Ne.from(m.firstChild),S=Ne.from(m.lastChild);a.insertNode(m),v.each(function(R){return qh(t,R.previousSibling)}),S.each(function(R){return qh(t,R.nextSibling)})}(t,a,m):function(t,a,m){a.insertNode(m),qh(t,m.previousSibling),qh(t,m.nextSibling)}(t,a,m)},_u=Kr,Tg=$i,$c=jl.nodeIndex,Pd=function(t){var a=t.parentNode;return Tg(a)?Pd(a):a},Xg=function(t){return t?we(t.childNodes,function(a,m){return Tg(m)&&"BR"!==m.nodeName?a=a.concat(Xg(m)):a.push(m),a},[]):[]},d1=function(t){return function(a){return t===a}},p1=function(t){return(_u(t)?"text()":t.nodeName.toLowerCase())+"["+function(t){var a,m;a=Xg(Pd(t)),m=Qe(a,d1(t),t),a=a.slice(0,m+1);var v=we(a,function(S,R,ee){return _u(R)&&_u(a[ee-1])&&S++,S},0);return a=Le(a,ht([t.nodeName])),(m=Qe(a,d1(t),t))-v}(t)+"]"},Py=function(t,a){var m,v,R,ee,Ee,S=[];return m=a.container(),v=a.offset(),_u(m)?R=function(t,a){for(;(t=t.previousSibling)&&_u(t);)a+=t.data.length;return a}(m,v):(v>=(ee=m.childNodes).length?(R="after",v=ee.length-1):R="before",m=ee[v]),S.push(p1(m)),Ee=function(t,a,m){var v=[];for(a=a.parentNode;!(a===t||m&&m(a));a=a.parentNode)v.push(a);return v}(t,m),Ee=Le(Ee,Z($i)),(S=S.concat(hn(Ee,function(Se){return p1(Se)}))).reverse().join("/")+","+R},S_=function(t,a){var m;if(!a)return null;var v=a.split(","),S=v[0].split("/");m=v.length>1?v[1]:"before";var R=we(S,function(ee,Ee){var Se=/([\w\-\(\)]+)\[([0-9]+)\]/.exec(Ee);return Se?("text()"===Se[1]&&(Se[1]="#text"),function(t,a,m){var v=Xg(t);return v=Le(v,function(S,R){return!_u(S)||!_u(v[R-1])}),(v=Le(v,ht([a])))[m]}(ee,Se[1],parseInt(Se[2],10))):null},t);return R?_u(R)?function(t,a){for(var S,m=t,v=0;_u(m);){if(S=m.data.length,a>=v&&a<=v+S){t=m,a-=v;break}if(!_u(m.nextSibling)){t=m,a=S;break}v+=S,m=m.nextSibling}return _u(t)&&a>t.data.length&&(a=t.data.length),Tr(t,a)}(R,parseInt(m,10)):(m="after"===m?$c(R)+1:$c(R),Tr(R.parentNode,m)):null},Oy=Os,Uv=function(t,a,m,v,S){var Se,R=v[S?"startContainer":"endContainer"],ee=v[S?"startOffset":"endOffset"],Ee=[],pt=0,Gt=t.getRoot();for(Kr(R)?Ee.push(m?function(t,a,m){var v,S;for(S=t(a.data.slice(0,m)).length,v=a.previousSibling;v&&Kr(v);v=v.previousSibling)S+=t(v.data).length;return S}(a,R,ee):ee):(ee>=(Se=R.childNodes).length&&Se.length&&(pt=1,ee=Math.max(0,Se.length-1)),Ee.push(t.nodeIndex(Se[ee],m)+pt));R&&R!==Gt;R=R.parentNode)Ee.push(t.nodeIndex(R,m));return Ee},If=function(t,a,m){var v=0;return Li.each(t.select(a),function(S){if("all"!==S.getAttribute("data-mce-bogus")){if(S===m)return!1;v++}}),v},ku=function(t,a){var m,v,S,R=a?"start":"end";m=t[R+"Container"],v=t[R+"Offset"],la(m)&&"TR"===m.nodeName&&((m=(S=m.childNodes)[Math.min(a?v:v-1,S.length-1)])&&(v=a?0:m.childNodes.length,t["set"+(a?"Start":"End")](m,v)))},h0=function(t){return ku(t,!0),ku(t,!1),t},Nc=function(t,a){var m;return la(t)&&(t=Ir(t,a),Oy(t))?t:Nd(t)&&(Kr(t)&&bl(t)&&(t=t.parentNode),m=t.previousSibling,Oy(m)||(m=t.nextSibling,Oy(m)))?m:void 0},_0=function(t,a,m){var v=m.getNode(),S=v?v.nodeName:null,R=m.getRng();if(Oy(v)||"IMG"===S)return{name:S,index:If(m.dom,S,v)};var ee=function(t){return Nc(t.startContainer,t.startOffset)||Nc(t.endContainer,t.endOffset)}(R);return ee?{name:S=ee.tagName,index:If(m.dom,S,ee)}:function(t,a,m,v){var S=a.dom,R={};return R.start=Uv(S,t,m,v,!0),a.isCollapsed()||(R.end=Uv(S,t,m,v,!1)),Fo(v)&&(R.isFakeCaret=!0),R}(t,m,a,R)},Kl=function(t,a,m){var v={"data-mce-type":"bookmark",id:a,style:"overflow:hidden;line-height:0px"};return m?t.create("span",v,"&#xFEFF;"):t.create("span",v)},y0=function(t,a){var m=t.dom,v=t.getRng(),S=m.uniqueId(),R=t.isCollapsed(),ee=t.getNode(),Ee=ee.nodeName;if("IMG"===Ee)return{name:Ee,index:If(m,Ee,ee)};var Se=h0(v.cloneRange());if(!R){Se.collapse(!1);var pt=Kl(m,S+"_end",a);im(m,Se,pt)}(v=h0(v)).collapse(!0);var Gt=Kl(m,S+"_start",a);return im(m,v,Gt),t.moveToBookmark({id:S,keep:!0}),{id:S}},eg=function(t,a,m){return 2===a?_0(Kc,m,t):3===a?function(t){var a=t.getRng();return{start:Py(t.dom.getRoot(),Tr.fromRangeStart(a)),end:Py(t.dom.getRoot(),Tr.fromRangeEnd(a))}}(t):a?function(t){return{rng:t.getRng()}}(t):y0(t,!1)},DC=le(_0,me,!0),wh=jl.DOM,m1=function(t,a,m){var v=t.getParam(a,m);if(-1!==v.indexOf("=")){var S=t.getParam(a,"","hash");return Ni(S,t.id).getOr(m)}return v},A_=function(t){return t.getParam("content_security_policy","")},hm=function(t){if(t.getParam("force_p_newlines",!1))return"p";var a=t.getParam("forced_root_block","p");return!1===a?"":!0===a?"p":a},e_=function(t){return t.getParam("forced_root_block_attrs",{})},Yv=function(t){return t.getParam("automatic_uploads",!0,"boolean")},Pb=function(t){return t.getParam("images_reuse_filename",!1,"boolean")},mf=function(t){return t.getParam("icons","","string")},ep=function(t){return t.getParam("images_upload_url","","string")},rd=function(t){return t.getParam("images_upload_base_path","","string")},Pf=function(t){return t.getParam("images_upload_credentials",!1,"boolean")},I_=function(t){return t.getParam("images_upload_handler",null,"function")},yE=function(t){return t.getParam("content_css_cors",!1,"boolean")},Ry=function(t){return t.getParam("referrer_policy","","string")},t_=function(t){return t.getParam("language","en","string")},bE=function(t){return t.getParam("indent_use_margin",!1)},xg=function(t){var a=t.getParam("font_css",[]);return ae(a)?a:Dn(a.split(","),Cr)},b0=function(t){var a=t.getParam("object_resizing");return!1!==a&&!$r.iOS&&(ue(a)?a:"table,img,figure.image,div,video,iframe")},tg=function(t){return t.getParam("event_root")},Lf=function(t){return t.getParam("theme")},CE=function(t){return t.getParam("validate")},Fy=function(t){return!1!==t.getParam("inline_boundaries")},pv=function(t){return t.getParam("content_css_cors")},ng=function(t){return t.getParam("plugins","","string")},C1=la,IC=Kr,PC=function(t){var a=t.parentNode;a&&a.removeChild(t)},n_=function(t){var a=Kc(t);return{count:t.length-a.length,text:a}},$v=function(t){for(var a;-1!==(a=t.data.lastIndexOf(Ti));)t.deleteData(a,1)},OC=function(t,a){return ig(t),a},Ag=function(t,a){var m=a.container(),v=function(t,a){var m=rn(t,a);return-1===m?Ne.none():Ne.some(m)}(vn(m.childNodes),t).map(function(S){return S<a.offset()?Tr(m,a.offset()-1):a}).getOr(a);return ig(t),v},Yy=function(t,a){return IC(t)&&a.container()===t?function(t,a){var m=n_(t.data.substr(0,a.offset())),v=n_(t.data.substr(a.offset()));return(m.text+v.text).length>0?($v(t),Tr(t,a.offset()-m.count)):a}(t,a):OC(t,a)},C0=function(t,a){return Tr.isTextPosition(a)?Yy(t,a):function(t,a){return a.container()===t.parentNode?Ag(t,a):OC(t,a)}(t,a)},ig=function(t){C1(t)&&Nd(t)&&(Hp(t)?t.removeAttribute("data-mce-caret"):PC(t)),IC(t)&&($v(t),0===t.data.length&&PC(t))},gm=gi().browser,th=Os,jm=Ks,fv=yu,ru=function(t,a,m){var S,R,v=Sy(a.getBoundingClientRect(),m);if("BODY"===t.tagName){var ee=t.ownerDocument.documentElement;S=t.scrollLeft||ee.scrollLeft,R=t.scrollTop||ee.scrollTop}else{var Ee=t.getBoundingClientRect();S=t.scrollLeft-Ee.left,R=t.scrollTop-Ee.top}v.left+=S,v.right+=S,v.top+=R,v.bottom+=R,v.width=1;var Se=a.offsetWidth-a.clientWidth;return Se>0&&(m&&(Se*=-1),v.left+=Se,v.right+=Se),v},Ap=function(t,a,m,v){var R,ee,S=$h(),Ee=hm(t),Se=Ee.length>0?Ee:"p",Gt=function(){(function(t){for(var a=iu(Dt.fromDom(t),"*[contentEditable=false],video,audio,embed,object"),m=0;m<a.length;m++){var R,v=a[m].dom,S=v.previousSibling;Ql(S)&&(1===(R=S.data).length?S.parentNode.removeChild(S):S.deleteData(R.length-1,1)),S=v.nextSibling,cp(S)&&(1===(R=S.data).length?S.parentNode.removeChild(S):S.deleteData(0,1))}})(a),ee&&(ig(ee),ee=null),S.on(function($n){Ya($n.caret).remove(),S.clear()}),R&&(Ht.clearInterval(R),R=void 0)},jt=function(){R=Ht.setInterval(function(){v()?Ya("div.mce-visual-caret",a).toggleClass("mce-visual-caret-hidden"):Ya("div.mce-visual-caret",a).addClass("mce-visual-caret-hidden")},500)};return{show:function($n,qn){var bi;if(Gt(),fv(qn))return null;if(!m(qn))return ee=function(t,a){var v=t.ownerDocument.createTextNode(Ti),S=t.parentNode;if(a){var R=t.previousSibling;if(Vl(R)){if(Nd(R))return R;if(Ql(R))return R.splitText(R.data.length-1)}S.insertBefore(v,t)}else{if(R=t.nextSibling,Vl(R)){if(Nd(R))return R;if(cp(R))return R.splitText(1),R}t.nextSibling?S.insertBefore(v,t.nextSibling):S.appendChild(v)}return v}(qn,$n),bi=qn.ownerDocument.createRange(),rg(ee.nextSibling)?(bi.setStart(ee,0),bi.setEnd(ee,0)):(bi.setStart(ee,1),bi.setEnd(ee,1)),bi;ee=Tu(Se,qn,$n);var pi=ru(a,qn,$n);Ya(ee).css("top",pi.top);var tr=Ya('<div class="mce-visual-caret" data-mce-bogus="all"></div>').css(Tn({},pi)).appendTo(a)[0];return S.set({caret:tr,element:qn,before:$n}),$n&&Ya(tr).addClass("mce-visual-caret-before"),jt(),(bi=qn.ownerDocument.createRange()).setStart(ee,0),bi.setEnd(ee,0),bi},hide:Gt,getCss:function(){return".mce-visual-caret {position: absolute;background-color: black;background-color: currentcolor;}.mce-visual-caret-hidden {display: none;}*[data-mce-caret] {position: absolute;left: -1000px;right: auto;top: 0;margin: 0;padding: 0;}"},reposition:function(){S.on(function($n){var qn=ru(a,$n.element,$n.before);Ya($n.caret).css(Tn({},qn))})},destroy:function(){return Ht.clearInterval(R)}}},jv=function(){return gm.isIE()||gm.isEdge()||gm.isFirefox()},rg=function(t){return th(t)||jm(t)},ff=function(t){return rg(t)||lo(t)&&jv()},hf=Os,Kv=Ks,Ph=Ke("display","block table table-cell table-caption list-item"),P_=Nd,hv=bl,Hy=la,M0=Je,i_=function(t){return t>0},r_=function(t){return t<0},Bb=function(t,a){for(var m;m=t(a);)if(!hv(m))return m;return null},wg=function(t,a,m,v,S){var R=new Sr(t,v),ee=hf(t)||hv(t);if(r_(a)){if(ee&&m(t=Bb(R.prev.bind(R),!0)))return t;for(;t=Bb(R.prev.bind(R),S);)if(m(t))return t}if(i_(a)){if(ee&&m(t=Bb(R.next.bind(R),!0)))return t;for(;t=Bb(R.next.bind(R),S);)if(m(t))return t}return null},_m=function(t,a){for(;t&&t!==a;){if(Ph(t))return t;t=t.parentNode}return null},nh=function(t,a,m){return _m(t.container(),m)===_m(a.container(),m)},O_=function(t,a){if(!a)return null;var m=a.container(),v=a.offset();return Hy(m)?m.childNodes[v+t]:null},Ig=function(t,a){var m=a.ownerDocument.createRange();return t?(m.setStartBefore(a),m.setEndBefore(a)):(m.setStartAfter(a),m.setEndAfter(a)),m},M1=function(t,a,m){return _m(a,t)===_m(m,t)},T0=function(t,a,m){for(var v=t?"previousSibling":"nextSibling";m&&m!==a;){var S=m[v];if(P_(S)&&(S=S[v]),hf(S)||Kv(S)){if(M1(a,S,m))return S;break}if(M0(S))break;m=m.parentNode}return null},Vy=le(Ig,!0),Zy=le(Ig,!1),Ub=function(t,a,m){var v,S=le(T0,!0,a),R=le(T0,!1,a),ee=m.startContainer,Ee=m.startOffset;if(bl(ee)){Hy(ee)||(ee=ee.parentNode);var Se=ee.getAttribute("data-mce-caret");if("before"===Se&&(v=ee.nextSibling,ff(v)))return Vy(v);if("after"===Se&&(v=ee.previousSibling,ff(v)))return Zy(v)}if(!m.collapsed)return m;if(Kr(ee)){if(P_(ee)){if(1===t){if(v=R(ee))return Vy(v);if(v=S(ee))return Zy(v)}if(-1===t){if(v=S(ee))return Zy(v);if(v=R(ee))return Vy(v)}return m}if(Ql(ee)&&Ee>=ee.data.length-1)return 1===t&&(v=R(ee))?Vy(v):m;if(cp(ee)&&Ee<=1)return-1===t&&(v=S(ee))?Zy(v):m;if(Ee===ee.data.length)return(v=R(ee))?Vy(v):m;if(0===Ee)return(v=S(ee))?Zy(v):m}return m},zb=function(t,a){return Ne.from(O_(t?0:-1,a)).filter(hf)},Jv=function(t,a,m){var v=Ub(t,a,m);return-1===t?Tr.fromRangeStart(v):Tr.fromRangeEnd(v)},Pg=function(t){return Ne.from(t.getNode()).map(Dt.fromDom)},o_=function(t,a){for(;a=t(a);)if(a.isVisible())return a;return a},x0=function(t,a){var m=nh(t,a);return!(m||!_a(t.getNode()))||m};!function(t){t[t.Backwards=-1]="Backwards",t[t.Forwards=1]="Forwards"}(Vd||(Vd={}));var D0=Os,gf=Kr,gv=la,kf=_a,ih=Je,_v=function(t){return N(t)||function(t){return!!Rr(t)&&!0!==Bn(vn(t.getElementsByTagName("*")),function(a,m){return a||vs(m)},!1)}(t)},Qv=Ws,J=function(t,a){return t.hasChildNodes()&&a<t.childNodes.length?t.childNodes[a]:null},Ue=function(t,a){if(i_(t)){if(ih(a.previousSibling)&&!gf(a.previousSibling))return Tr.before(a);if(gf(a))return Tr(a,0)}if(r_(t)){if(ih(a.nextSibling)&&!gf(a.nextSibling))return Tr.after(a);if(gf(a))return Tr(a,a.data.length)}return r_(t)?kf(a)?Tr.before(a):Tr.after(a):Tr.before(a)},yn=function(t,a,m){var v,S,R,ee;if(!gv(m)||!a)return null;if(a.isEqual(Tr.after(m))&&m.lastChild){if(ee=Tr.after(m.lastChild),r_(t)&&ih(m.lastChild)&&gv(m.lastChild))return kf(m.lastChild)?Tr.before(m.lastChild):ee}else ee=a;var Ee=ee.container(),Se=ee.offset();if(gf(Ee)){if(r_(t)&&Se>0)return Tr(Ee,--Se);if(i_(t)&&Se<Ee.length)return Tr(Ee,++Se);v=Ee}else{if(r_(t)&&Se>0&&(S=J(Ee,Se-1),ih(S)))return!_v(S)&&(R=wg(S,t,Qv,S))?gf(R)?Tr(R,R.data.length):Tr.after(R):gf(S)?Tr(S,S.data.length):Tr.before(S);if(i_(t)&&Se<Ee.childNodes.length&&(S=J(Ee,Se),ih(S)))return kf(S)?function(t,a){var m=a.nextSibling;return m&&ih(m)?gf(m)?Tr(m,0):Tr.before(m):yn(Vd.Forwards,Tr.after(a),t)}(m,S):!_v(S)&&(R=wg(S,t,Qv,S))?gf(R)?Tr(R,0):Tr.before(R):gf(S)?Tr(S,0):Tr.after(S);v=S||ee.getNode()}if((i_(t)&&ee.isAtEnd()||r_(t)&&ee.isAtStart())&&(v=wg(v,t,nt,m,!0),Qv(v,m)))return Ue(t,v);S=wg(v,t,Qv,m);var pt=qt(mi(function(t,a){for(var m=[];t&&t!==a;)m.push(t),t=t.parentNode;return m}(Ee,m),D0));return!pt||S&&pt.contains(S)?S?Ue(t,S):null:ee=i_(t)?Tr.after(pt):Tr.before(pt)},zn=function(t){return{next:function(a){return yn(Vd.Forwards,a,t)},prev:function(a){return yn(Vd.Backwards,a,t)}}},br=function(t){return Tr.isTextPosition(t)?0===t.offset():Je(t.getNode())},io=function(t){if(Tr.isTextPosition(t)){var a=t.container();return t.offset()===a.data.length}return Je(t.getNode(!0))},uo=function(t,a){return!Tr.isTextPosition(t)&&!Tr.isTextPosition(a)&&t.getNode()===a.getNode(!0)},pa=function(t,a,m){return t?!uo(a,m)&&!function(t){return!Tr.isTextPosition(t)&&_a(t.getNode())}(a)&&io(a)&&br(m):!uo(m,a)&&br(a)&&io(m)},Ea=function(t,a,m){var v=zn(a);return Ne.from(t?v.next(m):v.prev(m))},xs=function(t,a,m){return Ea(t,a,m).bind(function(v){return nh(m,v,a)&&pa(t,m,v)?Ea(t,a,v):Ne.some(v)})},El=function(t,a,m,v){return xs(t,a,m).bind(function(S){return v(S)?El(t,a,S,v):Ne.some(S)})},fs=function(t,a){var m=t?a.firstChild:a.lastChild;return Kr(m)?Ne.some(Tr(m,t?0:m.data.length)):m?Je(m)?Ne.some(t?Tr.before(m):function(t){return _a(t)?Tr.before(t):Tr.after(t)}(m)):function(t,a,m){var v=t?Tr.before(m):Tr.after(m);return Ea(t,a,v)}(t,a,m):Ne.none()},Bs=le(Ea,!0),Ys=le(Ea,!1),ou=le(fs,!0),au=le(fs,!1),Rf="_mce_caret",xu=function(t){return la(t)&&t.id===Rf},vm=function(t,a){for(;a&&a!==t;){if(a.id===Rf)return a;a=a.parentNode}return null},DE=function(t){return Li.isArray(t.start)},kM=function(t,a){return la(a)&&t.isBlock(a)&&!a.innerHTML&&!$r.ie&&(a.innerHTML='<br data-mce-bogus="1" />'),a},wE=function(t,a){return au(t).fold(Be,function(m){return a.setStart(m.container(),m.offset()),a.setEnd(m.container(),m.offset()),!0})},Om=function(t,a,m){return!(!function(t){return!1===t.hasChildNodes()}(a)||!vm(t,a))&&(function(t,a){var m=t.ownerDocument.createTextNode(Ti);t.appendChild(m),a.setStart(m,0),a.setEnd(m,0)}(a,m),!0)},IE=function(t,a,m,v){var R,ee,Ee,Se,S=m[a?"start":"end"],pt=t.getRoot();if(S){for(Ee=S[0],ee=pt,R=S.length-1;R>=1;R--){if(Se=ee.childNodes,Om(pt,ee,v))return!0;if(S[R]>Se.length-1)return!!Om(pt,ee,v)||wE(ee,v);ee=Se[S[R]]}3===ee.nodeType&&(Ee=Math.min(S[0],ee.nodeValue.length)),1===ee.nodeType&&(Ee=Math.min(S[0],ee.childNodes.length)),a?v.setStart(ee,Ee):v.setEnd(ee,Ee)}return!0},PE=function(t){return Kr(t)&&t.data.length>0},FM=function(t,a,m){var S,R,ee,Ee,pt,Gt,v=t.get(m.id+"_"+a),Se=m.keep;if(v){if(S=v.parentNode,"start"===a?(Se?v.hasChildNodes()?(S=v.firstChild,R=1):PE(v.nextSibling)?(S=v.nextSibling,R=0):PE(v.previousSibling)?(S=v.previousSibling,R=v.previousSibling.data.length):(S=v.parentNode,R=t.nodeIndex(v)+1):R=t.nodeIndex(v),pt=S,Gt=R):(Se?v.hasChildNodes()?(S=v.firstChild,R=1):PE(v.previousSibling)?(S=v.previousSibling,R=v.previousSibling.data.length):(S=v.parentNode,R=t.nodeIndex(v)):R=t.nodeIndex(v),pt=S,Gt=R),!Se){for(Ee=v.previousSibling,ee=v.nextSibling,Li.each(Li.grep(v.childNodes),function(jt){Kr(jt)&&(jt.nodeValue=jt.nodeValue.replace(/\uFEFF/g,""))});v=t.get(m.id+"_"+a);)t.remove(v,!0);Ee&&ee&&Ee.nodeType===ee.nodeType&&Kr(Ee)&&!$r.opera&&(R=Ee.nodeValue.length,Ee.appendData(ee.nodeValue),t.remove(ee),pt=Ee,Gt=R)}return Ne.some(Tr(pt,Gt))}return Ne.none()},Og=function(t,a){var m=t.dom;if(a){if(DE(a))return function(t,a){var m=t.createRng();return IE(t,!0,a,m)&&IE(t,!1,a,m)?Ne.some(m):Ne.none()}(m,a);if(function(t){return ue(t.start)}(a))return Ne.some(function(t,a){var m,v=t.createRng();return m=S_(t.getRoot(),a.start),v.setStart(m.container(),m.offset()),m=S_(t.getRoot(),a.end),v.setEnd(m.container(),m.offset()),v}(m,a));if(function(t){return Nn(t,"id")}(a))return function(t,a){var m=FM(t,"start",a),v=FM(t,"end",a);return Gs(m,v.or(m),function(S,R){var ee=t.createRng();return ee.setStart(kM(t,S.container()),S.offset()),ee.setEnd(kM(t,R.container()),R.offset()),ee})}(m,a);if(function(t){return Nn(t,"name")}(a))return function(t,a){return Ne.from(t.select(a.name)[a.index]).map(function(m){var v=t.createRng();return v.selectNode(m),v})}(m,a);if(function(t){return Nn(t,"rng")}(a))return Ne.some(a.rng)}return Ne.none()},Wy=function(t,a,m){return eg(t,a,m)},$y=function(t,a){Og(t,a).each(function(m){t.setRng(m)})},Km=function(t){return la(t)&&"SPAN"===t.tagName&&"bookmark"===t.getAttribute("data-mce-type")},sg=function(t){return function(a){return t===a}}(Pu),Lg=function(t){return""!==t&&-1!==" \f\n\r\t\v".indexOf(t)},S0=function(t){return!Lg(t)&&!sg(t)},R_=function(t){return!!t.nodeType},rh=function(t,a,m){var v=m.startOffset,S=m.startContainer;if((S!==m.endContainer||!function(t){return t&&/^(IMG)$/.test(t.nodeName)}(S.childNodes[v]))&&la(S)){var R=S.childNodes,ee=void 0;v<R.length?(S=R[v],ee=new Sr(S,t.getParent(S,t.isBlock))):(S=R[R.length-1],(ee=new Sr(S,t.getParent(S,t.isBlock))).next(!0));for(var Ee=ee.current();Ee;Ee=ee.next())if(Kr(Ee)&&!oh(Ee))return m.setStart(Ee,0),void a.setRng(m)}},_f=function(t,a,m){if(t){var v=a?"nextSibling":"previousSibling";for(t=m?t:t[v];t;t=t[v])if(la(t)||!oh(t))return t}},pc=function(t,a){return R_(a)&&(a=a.nodeName),!!t.schema.getTextBlockElements()[a.toLowerCase()]},ym=function(t,a,m){return t.schema.isValidChild(a,m)},oh=function(t,a){if(void 0===a&&(a=!1),ne(t)&&Kr(t)){var m=a?t.data.replace(/ /g,"\xa0"):t.data;return Sc(m)}return!1},ah=function(t,a){return pe(t)?t=t(a):ne(a)&&(t=t.replace(/%(\w+)/g,function(m,v){return a[v]||m})),t},qv=function(t,a){return a=a||"",t=""+((t=t||"").nodeName||t),a=""+(a.nodeName||a),t.toLowerCase()===a.toLowerCase()},Yb=function(t,a,m){return("color"===m||"backgroundColor"===m)&&(a=t.toHex(a)),"fontWeight"===m&&700===a&&(a="bold"),"fontFamily"===m&&(a=a.replace(/[\'\"]/g,"").replace(/,\s+/g,",")),""+a},vv=function(t,a,m){return Yb(t,t.getStyle(a,m),m)},nx=function(t,a){var m;return t.getParent(a,function(v){return(m=t.getStyle(v,"text-decoration"))&&"none"!==m}),m},jy=function(t,a,m){return t.getParents(a,m,t.getRoot())},RC=function(t,a,m){var v=["inline","block","selector","attributes","styles","classes"],S=function(R){return ct(R,function(ee,Ee){return nn(v,function(Se){return Se===Ee})})};return nn(t.formatter.get(a),function(R){var ee=S(R);return nn(t.formatter.get(m),function(Ee){var Se=S(Ee);return function(t,a,m){return void 0===m&&(m=P),n(m).eq(t,a)}(ee,Se)})})},F_=function(t){return pr(t,"block")},Oh=function(t){return pr(t,"selector")},Qm=function(t){return pr(t,"inline")},yv=function(t){return Oh(t)&&!1!==t.expand&&!Qm(t)},Hb=Km,FC=jy,ix=oh,BM=pc,UM=function(t){return _a(t)&&t.getAttribute("data-mce-bogus")&&!t.nextSibling},Io=function(t,a){for(var m=a;m;){if(la(m)&&t.getContentEditable(m))return"false"===t.getContentEditable(m)?m:a;m=m.parentNode}return a},Zu=function(t,a,m,v){for(var S=a.data,R=m;t?R>=0:R<S.length;t?R--:R++)if(v(S.charAt(R)))return t?R+1:R;return-1},lg=function(t,a,m){return Zu(t,a,m,function(v){return sg(v)||Lg(v)})},Od=function(t,a,m){return Zu(t,a,m,S0)},Lh=function(t,a,m,v,S,R){var ee,Ee=t.getParent(m,t.isBlock)||a,Se=function(Gt,jt,on){var Rn=ml(t),Yn=S?Rn.backwards:Rn.forwards;return Ne.from(Yn(Gt,jt,function($n,qn){return Hb($n.parentNode)?-1:(ee=$n,on(S,$n,qn))},Ee))};return Se(m,v,lg).bind(function(Gt){return R?Se(Gt.container,Gt.offset+(S?-1:0),Od):Ne.some(Gt)}).orThunk(function(){return ee?Ne.some({container:ee,offset:S?0:ee.length}):Ne.none()})},OE=function(t,a,m,v,S){Kr(v)&&at(v.data)&&v[S]&&(v=v[S]);for(var R=FC(t,v),ee=0;ee<R.length;ee++)for(var Ee=0;Ee<a.length;Ee++){var Se=a[Ee];if((!ne(Se.collapsed)||Se.collapsed===m.collapsed)&&Oh(Se)&&t.is(R[ee],Se.selector))return R[ee]}return v},I0=function(t,a,m,v){var S=m,R=t.dom,ee=R.getRoot(),Ee=a[0];if(F_(Ee)&&(S=Ee.wrapper?null:R.getParent(m,Ee.block,ee)),!S){var Se=R.getParent(m,"LI,TD,TH");S=R.getParent(Kr(m)?m.parentNode:m,function(pt){return pt!==ee&&BM(t,pt)},Se)}if(S&&F_(Ee)&&Ee.wrapper&&(S=FC(R,S,"ul,ol").reverse()[0]||S),!S)for(S=m;S[v]&&!R.isBlock(S[v])&&(S=S[v],!qv(S,"br")););return S||m},Xv=function(t,a,m,v){var S=m.parentNode;return!ne(m[v])&&(!(S!==a&&!ge(S)&&!t.isBlock(S))||Xv(t,a,S,v))},T1=function(t,a,m,v,S){var R=m,ee=S?"previousSibling":"nextSibling",Ee=t.getRoot();if(Kr(m)&&!ix(m)&&(S?v>0:v<m.data.length))return m;for(;;){if(!a[0].block_expand&&t.isBlock(R))return R;for(var Se=R[ee];Se;Se=Se[ee]){var pt=Kr(Se)&&!Xv(t,Ee,Se,ee);if(!Hb(Se)&&!UM(Se)&&!ix(Se,pt))return R}if(R===Ee||R.parentNode===Ee){m=R;break}R=R.parentNode}return m},LE=function(t){return Hb(t.parentNode)||Hb(t)},Ky=function(t,a,m,v){void 0===v&&(v=!1);var S=a.startContainer,R=a.startOffset,ee=a.endContainer,Ee=a.endOffset,Se=t.dom,pt=m[0];(la(S)&&S.hasChildNodes()&&(S=Ir(S,R),Kr(S)&&(R=0)),la(ee)&&ee.hasChildNodes()&&(ee=Ir(ee,a.collapsed?Ee:Ee-1),Kr(ee)&&(Ee=ee.nodeValue.length)),S=Io(Se,S),ee=Io(Se,ee),LE(S)&&(S=Hb(S)?S:S.parentNode,S=a.collapsed?S.previousSibling||S:S.nextSibling||S,Kr(S)&&(R=a.collapsed?S.length:0)),LE(ee)&&(ee=Hb(ee)?ee:ee.parentNode,ee=a.collapsed?ee.nextSibling||ee:ee.previousSibling||ee,Kr(ee)&&(Ee=a.collapsed?0:ee.length)),a.collapsed)&&(Lh(Se,t.getBody(),S,R,!0,v).each(function(on){var Rn=on.container,Yn=on.offset;S=Rn,R=Yn}),Lh(Se,t.getBody(),ee,Ee,!1,v).each(function(on){var Rn=on.container,Yn=on.offset;ee=Rn,Ee=Yn}));return(Qm(pt)||pt.block_expand)&&((!Qm(pt)||!Kr(S)||0===R)&&(S=T1(Se,m,S,R,!0)),(!Qm(pt)||!Kr(ee)||Ee===ee.nodeValue.length)&&(ee=T1(Se,m,ee,Ee,!1))),yv(pt)&&(S=OE(Se,m,a,S,"previousSibling"),ee=OE(Se,m,a,ee,"nextSibling")),(F_(pt)||Oh(pt))&&(S=I0(t,m,S,"previousSibling"),ee=I0(t,m,ee,"nextSibling"),F_(pt)&&(Se.isBlock(S)||(S=T1(Se,m,S,R,!0)),Se.isBlock(ee)||(ee=T1(Se,m,ee,Ee,!1)))),la(S)&&(R=Se.nodeIndex(S),S=S.parentNode),la(ee)&&(Ee=Se.nodeIndex(ee)+1,ee=ee.parentNode),{startContainer:S,startOffset:R,endContainer:ee,endOffset:Ee}},x1=function(t,a,m){var v=a.startOffset,S=Ir(a.startContainer,v),R=a.endOffset,ee=Ir(a.endContainer,R-1),Ee=function($n){var qn=$n[0];Kr(qn)&&qn===S&&v>=qn.data.length&&$n.splice(0,1);var bi=$n[$n.length-1];return 0===R&&$n.length>0&&bi===ee&&Kr(bi)&&$n.splice($n.length-1,1),$n},Se=function($n,qn,bi){for(var pi=[];$n&&$n!==bi;$n=$n[qn])pi.push($n);return pi},pt=function($n,qn){return t.getParent($n,function(bi){return bi.parentNode===qn},qn)},Gt=function($n,qn,bi){for(var pi=bi?"nextSibling":"previousSibling",tr=$n,Wi=tr.parentNode;tr&&tr!==qn;tr=Wi){Wi=tr.parentNode;var Oi=Se(tr===$n?tr:tr[pi],pi);Oi.length&&(bi||Oi.reverse(),m(Ee(Oi)))}};if(S===ee)return m(Ee([S]));var jt=t.findCommonAncestor(S,ee);if(t.isChildOf(S,ee))return Gt(S,jt,!0);if(t.isChildOf(ee,S))return Gt(ee,jt);var on=pt(S,jt)||S,Rn=pt(ee,jt)||ee;Gt(S,on,!0);var Yn=Se(on===S?on:on.nextSibling,"nextSibling",Rn===ee?Rn.nextSibling:Rn);Yn.length&&m(Ee(Yn)),Gt(ee,Rn)},kE=function(t){var a=[];if(t)for(var m=0;m<t.rangeCount;m++)a.push(t.getRangeAt(m));return a},ox=function(t){return mi(function(t){return xn(t,function(a){var m=Pi(a);return m?[Dt.fromDom(m)]:[]})}(t),mc)},ey=function(t,a){var m=function(t){return iu(t,"td[data-mce-selected],th[data-mce-selected]")}(a);return m.length>0?m:ox(t)},bv=function(t){return ey(kE(t.selection.getSel()),Dt.fromDom(t.getBody()))},Vb=function(t,a){return Eu(t,"table",a)},zM=function(t){return hl(t).fold(oe([t]),function(a){return[t].concat(zM(a))})},Ru=function(t){return Wl(t).fold(oe([t]),function(a){return"br"===ba(a)?su(a).map(function(m){return[t].concat(Ru(m))}).getOr([]):[t].concat(Ru(a))})},NC=function(t,a){return Gs(function(t){var a=t.startContainer,m=t.startOffset;return Kr(a)?0===m?Ne.some(Dt.fromDom(a)):Ne.none():Ne.from(a.childNodes[m]).map(Dt.fromDom)}(a),function(t){var a=t.endContainer,m=t.endOffset;return Kr(a)?m===a.data.length?Ne.some(Dt.fromDom(a)):Ne.none():Ne.from(a.childNodes[m-1]).map(Dt.fromDom)}(a),function(m,v){var S=On(zM(t),le(Ao,m)),R=On(Ru(t),le(Ao,v));return S.isSome()&&R.isSome()}).getOr(!1)},S1=function(t,a,m,v){var S=m,R=new Sr(m,S),ee=ct(t.schema.getMoveCaretBeforeOnEnterElements(),function(Ee,Se){return!st(["td","th","table"],Se.toLowerCase())});do{if(Kr(m)&&0!==Li.trim(m.nodeValue).length)return void(v?a.setStart(m,0):a.setEnd(m,m.nodeValue.length));if(ee[m.nodeName])return void(v?a.setStartBefore(m):"BR"===m.nodeName?a.setEndBefore(m):a.setEndAfter(m))}while(m=v?R.next():R.prev());"BODY"===S.nodeName&&(v?a.setStart(S,0):a.setEnd(S,S.childNodes.length))},Jy=function(t){var a=t.selection.getSel();return a&&a.rangeCount>0},Qy=function(t,a){var m=bv(t);m.length>0?Mn(m,function(v){var S=v.dom,R=t.dom.createRng();R.setStartBefore(S),R.setEndAfter(S),a(R,!0)}):a(t.selection.getRng(),!1)},A1=function(t,a,m){var v=y0(t,a);m(v),t.moveToBookmark(v)},Zb=function(t,a){var v=function(R){return t(R)?Ne.from(R.dom.nodeValue):Ne.none()};return{get:function(R){if(!t(R))throw new Error("Can only get "+a+" value of a "+a+" node");return v(R).getOr("")},getOption:v,set:function(R,ee){if(!t(R))throw new Error("Can only set raw "+a+" value of a "+a+" node");R.dom.nodeValue=ee}}}(Qi,"text"),Xy=function(t){return Zb.get(t)},tp=function(t,a,m,v){return qi(a).fold(function(){return"skipping"},function(S){return"br"===v||function(t){return Qi(t)&&Xy(t)===Ti}(a)?"valid":function(t){return Xt(t)&&_d(t,xp())}(a)?"existing":xu(a.dom)?"caret":ym(t,m,v)&&ym(t,ba(S),m)?"valid":"invalid-child"})},Rg=function(t,a,m,v){var S=a.uid,R=void 0===S?Qh("mce-annotation"):S,ee=function lr(t,a){var m={};for(var v in t)Object.prototype.hasOwnProperty.call(t,v)&&a.indexOf(v)<0&&(m[v]=t[v]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var S=0;for(v=Object.getOwnPropertySymbols(t);S<v.length;S++)a.indexOf(v[S])<0&&Object.prototype.propertyIsEnumerable.call(t,v[S])&&(m[v[S]]=t[v[S]])}return m}(a,["uid"]),Ee=Dt.fromTag("span",t);Qg(Ee,xp()),Xe(Ee,""+id(),R),Xe(Ee,""+kv(),m);var Se=v(R,ee),pt=Se.attributes,Gt=void 0===pt?{}:pt,jt=Se.classes,on=void 0===jt?[]:jt;return zt(Ee,Gt),function(t,a){Mn(a,function(m){Qg(t,m)})}(Ee,on),Ee},w1=function(t,a,m,v,S){var R=[],ee=Rg(t.getDoc(),S,m,v),Ee=$h(),Se=function(){Ee.clear()},Gt=function(Rn){Mn(Rn,jt)},jt=function(Rn){switch(tp(t,Rn,"span",ba(Rn))){case"invalid-child":Se();var $n=Qs(Rn);Gt($n),Se();break;case"valid":var qn=Ee.get().getOrThunk(function(){var Rn=Hu(ee);return R.push(Rn),Ee.set(Rn),Rn});!function(t,a){_c(t,a),ac(a,t)}(Rn,qn)}};return x1(t.dom,a,function(Rn){Se(),function(Rn){var Yn=Dn(Rn,Dt.fromDom);Gt(Yn)}(Rn)}),R},Cv=function(t,a,m,v){t.undoManager.transact(function(){var S=t.selection,R=S.getRng(),ee=bv(t).length>0;if(R.collapsed&&!ee&&function(t,a){var m=Ky(t,a,[{inline:"span"}]);a.setStart(m.startContainer,m.startOffset),a.setEnd(m.endContainer,m.endOffset),t.selection.setRng(a)}(t,R),S.getRng().collapsed&&!ee){var Ee=Rg(t.getDoc(),v,a,m.decorate);nm(Ee,Pu),S.getRng().insertNode(Ee.dom),S.select(Ee.dom)}else A1(S,!1,function(){Qy(t,function(Se){w1(t,Se,a,m.decorate,v)})})})},I1=function(t){var a=function(){var t={};return{register:function(v,S){t[v]={name:v,settings:S}},lookup:function(v){return Ni(t,v).map(function(S){return S.settings})}}}();Dh(t,a);var m=Ab(t);return{register:function(v,S){a.register(v,S)},annotate:function(v,S){a.lookup(v).each(function(R){Cv(t,v,R,S)})},annotationChanged:function(v,S){m.addListener(v,S)},remove:function(v){Dy(t,Ne.some(v)).each(function(S){var R=S.elements;Mn(R,kr)})},getAll:function(v){var S=function(t,a){var m=Dt.fromDom(t.getBody()),v=iu(m,"["+kv()+'="'+a+'"]'),S={};return Mn(v,function(R){var ee=mn(R,id()),Ee=Ni(S,ee).getOr([]);S[ee]=Ee.concat([R])}),S}(t,v);return Gr(S,function(R){return Dn(R,function(ee){return ee.dom})})}}},Fg=function(t){return{getBookmark:le(Wy,t),moveToBookmark:le($y,t)}};Fg.isBookmarkNode=Km;var O0=function(t,a){for(;a&&a!==t;){if($l(a)||Os(a))return a;a=a.parentNode}return null},BC=function(t,a,m){if(m.collapsed)return!1;if($r.browser.isIE()&&m.startOffset===m.endOffset-1&&m.startContainer===m.endContainer){var v=m.startContainer.childNodes[m.startOffset];if(la(v))return nn(v.getClientRects(),function(S){return Ye(S,t,a)})}return nn(m.getClientRects(),function(S){return Ye(S,t,a)})},ny=function(t,a,m){return t.fire(a,m)},NE=function(t,a,m,v){return t.fire("FormatApply",{format:a,node:m,vars:v})},tb=function(t,a,m,v){return t.fire("FormatRemove",{format:a,node:m,vars:v})},Ua={BACKSPACE:8,DELETE:46,DOWN:40,ENTER:13,ESC:27,LEFT:37,RIGHT:39,SPACEBAR:32,TAB:9,UP:38,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,modifierPressed:function(t){return t.shiftKey||t.ctrlKey||t.altKey||Ua.metaKeyPressed(t)},metaKeyPressed:function(t){return $r.mac?t.metaKey:t.ctrlKey&&!t.altKey}},kh=Os,lh=function(t,a){var R,ee,Ee,Se,pt,Gt,jt,Yn,$n,qn,bi,pi,tr,es,Xo,m="data-mce-selected",v=a.dom,S=Li.each,Wi=a.getDoc(),Oi=document,cr=Math.abs,Ur=Math.round,no=a.getBody(),Wr={nw:[0,0,-1,-1],ne:[1,0,1,-1],se:[1,1,1,1],sw:[0,1,-1,1]},qa=function(fr){return fr&&("IMG"===fr.nodeName||a.dom.is(fr,"figure.image"))},po=function(fr){return Ks(fr)||v.hasClass(fr,"mce-preview-object")},vo=function(fr){var so=fr.target;(function(fr,so){if("longpress"===fr.type||0===fr.type.indexOf("touch")){var eo=fr.touches[0];return qa(fr.target)&&!BC(eo.clientX,eo.clientY,so)}return qa(fr.target)&&!BC(fr.clientX,fr.clientY,so)})(fr,a.selection.getRng())&&!fr.isDefaultPrevented()&&a.selection.select(so)},So=function(fr){return v.is(fr,"figure.image")?[fr.querySelector("img")]:v.hasClass(fr,"mce-preview-object")&&ne(fr.firstElementChild)?[fr,fr.firstElementChild]:[fr]},ca=function(fr){var so=b0(a);return!(!so||"false"===fr.getAttribute("data-mce-resize")||fr===a.getBody())&&(v.hasClass(fr,"mce-preview-object")?qr(Dt.fromDom(fr.firstElementChild),so):qr(Dt.fromDom(fr),so))},na=function(fr,so,eo){if(ne(eo)){var za=So(fr);Mn(za,function(Wa){Wa.style[so]||!a.schema.isValid(Wa.nodeName.toLowerCase(),so)?v.setStyle(Wa,so,eo):v.setAttrib(Wa,so,""+eo)})}},Ul=function(fr,so,eo){na(fr,"width",so),na(fr,"height",eo)},Ic=function(fr){var so,eo,za,Wa,Nu;so=fr.screenX-Gt,eo=fr.screenY-jt,pi=so*Se[2]+Yn,tr=eo*Se[3]+$n,pi=pi<5?5:pi,tr=tr<5?5:tr,za=(qa(R)||po(R))&&!1!==function(t){return t.getParam("resize_img_proportional",!0,"boolean")}(a)?!Ua.modifierPressed(fr):Ua.modifierPressed(fr),za&&(cr(so)>cr(eo)?(tr=Ur(pi*qn),pi=Ur(tr/qn)):(pi=Ur(tr/qn),tr=Ur(pi*qn))),Ul(ee,pi,tr),Wa=(Wa=Se.startPos.x+so)>0?Wa:0,Nu=(Nu=Se.startPos.y+eo)>0?Nu:0,v.setStyles(Ee,{left:Wa,top:Nu,display:"block"}),Ee.innerHTML=pi+" &times; "+tr,Se[2]<0&&ee.clientWidth<=pi&&v.setStyle(ee,"left",undefined+(Yn-pi)),Se[3]<0&&ee.clientHeight<=tr&&v.setStyle(ee,"top",undefined+($n-tr)),(so=no.scrollWidth-es)+(eo=no.scrollHeight-Xo)!==0&&v.setStyles(Ee,{left:Wa-so,top:Nu-eo}),bi||(function(t,a,m,v,S){t.fire("ObjectResizeStart",{target:a,width:m,height:v,origin:S})}(a,R,Yn,$n,"corner-"+Se.name),bi=!0)},Mc=function(){var fr=bi;bi=!1,fr&&(na(R,"width",pi),na(R,"height",tr)),v.unbind(Wi,"mousemove",Ic),v.unbind(Wi,"mouseup",Mc),Oi!==Wi&&(v.unbind(Oi,"mousemove",Ic),v.unbind(Oi,"mouseup",Mc)),v.remove(ee),v.remove(Ee),v.remove(pt),fh(R),fr&&(function(t,a,m,v,S){t.fire("ObjectResized",{target:a,width:m,height:v,origin:S})}(a,R,pi,tr,"corner-"+Se.name),v.setAttrib(R,"style",v.getAttrib(R,"style"))),a.nodeChanged()},fh=function(fr){Xr();var so=v.getPos(fr,no),eo=so.x,za=so.y,Wa=fr.getBoundingClientRect(),Nu=Wa.width||Wa.right-Wa.left,Cf=Wa.height||Wa.bottom-Wa.top;R!==fr&&(Op(),R=fr,pi=tr=0);var nf=a.fire("ObjectSelected",{target:fr}),wM=v.getAttrib(R,m,"1");ca(fr)&&!nf.isDefaultPrevented()?S(Wr,function(h_,Vg){var Hf,bb=function(g_){var gC=So(R)[0];Gt=g_.screenX,jt=g_.screenY,Yn=gC.clientWidth,$n=gC.clientHeight,qn=$n/Yn,(Se=h_).name=Vg,Se.startPos={x:Nu*h_[0]+eo,y:Cf*h_[1]+za},es=no.scrollWidth,Xo=no.scrollHeight,pt=v.add(no,"div",{class:"mce-resize-backdrop","data-mce-bogus":"all"}),v.setStyles(pt,{position:"fixed",left:"0",top:"0",width:"100%",height:"100%"}),ee=function(fr){return po(fr)?v.create("img",{src:$r.transparentSrc}):fr.cloneNode(!0)}(R),v.addClass(ee,"mce-clonedresizable"),v.setAttrib(ee,"data-mce-bogus","all"),ee.contentEditable="false",v.setStyles(ee,{left:eo,top:za,margin:0}),Ul(ee,Nu,Cf),ee.removeAttribute(m),no.appendChild(ee),v.bind(Wi,"mousemove",Ic),v.bind(Wi,"mouseup",Mc),Oi!==Wi&&(v.bind(Oi,"mousemove",Ic),v.bind(Oi,"mouseup",Mc)),Ee=v.add(no,"div",{class:"mce-resize-helper","data-mce-bogus":"all"},Yn+" &times; "+$n)};(Hf=v.get("mceResizeHandle"+Vg))&&v.remove(Hf),Hf=v.add(no,"div",{id:"mceResizeHandle"+Vg,"data-mce-bogus":"all",class:"mce-resizehandle",unselectable:!0,style:"cursor:"+Vg+"-resize; margin:0; padding:0"}),11===$r.ie&&(Hf.contentEditable=!1),v.bind(Hf,"mousedown",function(g_){g_.stopImmediatePropagation(),g_.preventDefault(),bb(g_)}),h_.elm=Hf,v.setStyles(Hf,{left:Nu*h_[0]+eo-Hf.offsetWidth/2,top:Cf*h_[1]+za-Hf.offsetHeight/2})}):Op(),v.getAttrib(R,m)||R.setAttribute(m,wM)},Op=function(){Xr(),R&&R.removeAttribute(m),Hi(Wr,function(fr,so){var eo=v.get("mceResizeHandle"+so);eo&&(v.unbind(eo),v.remove(eo))})},f_=function(fr){var eo,za=function(Wa,Nu){if(Wa)do{if(Wa===Nu)return!0}while(Wa=Wa.parentNode)};if(!bi&&!a.removed){if(S(v.select("img[data-mce-selected],hr[data-mce-selected]"),function(Wa){Wa.removeAttribute(m)}),eo="mousedown"===fr.type?fr.target:t.getNode(),za(eo=v.$(eo).closest("table,img,figure.image,hr,video,span.mce-preview-object")[0],no)&&(yo(),za(t.getStart(!0),eo)&&za(t.getEnd(!0),eo)))return void fh(eo);Op()}},W_=function(fr){return kh(O0(a.getBody(),fr))},Xr=function(){Hi(Wr,function(fr){fr.elm&&(v.unbind(fr.elm),delete fr.elm)})},yo=function(){try{a.getDoc().execCommand("enableObjectResizing",!1,"false")}catch{}};a.on("init",function(){if(yo(),$r.browser.isIE()||$r.browser.isEdge()){a.on("mousedown click",function(eo){var za=eo.target,Wa=za.nodeName;!bi&&/^(TABLE|IMG|HR)$/.test(Wa)&&!W_(za)&&(2!==eo.button&&a.selection.select(za,"TABLE"===Wa),"mousedown"===eo.type&&a.nodeChanged())});var fr=function(eo){var za=function(Wa){Ht.setEditorTimeout(a,function(){return a.selection.select(Wa)})};if(W_(eo.target)||Ks(eo.target))return eo.preventDefault(),void za(eo.target);/^(TABLE|IMG|HR)$/.test(eo.target.nodeName)&&(eo.preventDefault(),"IMG"===eo.target.tagName&&za(eo.target))};v.bind(no,"mscontrolselect",fr),a.on("remove",function(){return v.unbind(no,"mscontrolselect",fr)})}var so=Ht.throttle(function(eo){a.composing||f_(eo)});a.on("NodeChange ResizeEditor ResizeWindow ResizeContent drop",so),a.on("keyup compositionend",function(eo){R&&"TABLE"===R.nodeName&&so(eo)}),a.on("hide blur",Op),a.on("contextmenu longpress",vo,!0)}),a.on("remove",Xr);return{isResizable:ca,showResizeRect:fh,hideResizeRect:Op,updateResizeRect:f_,destroy:function(){R=ee=pt=null}}},nb=function(t){return $l(t)||Os(t)},k0=function(t,a,m){var v,S,R=m;if(R.caretPositionFromPoint)(S=R.caretPositionFromPoint(t,a))&&((v=m.createRange()).setStart(S.offsetNode,S.offset),v.collapse(!0));else if(R.caretRangeFromPoint)v=R.caretRangeFromPoint(t,a);else if(R.body.createTextRange){v=R.body.createTextRange();try{v.moveToPoint(t,a),v.collapse(!0)}catch{v=function(t,a,m){var v,S=m.elementFromPoint(t,a),R=m.body.createTextRange();if((!S||"HTML"===S.tagName)&&(S=m.body),R.moveToElementText(S),(v=(v=Li.toArray(R.getClientRects())).sort(function(ee,Ee){return(ee=Math.abs(Math.max(ee.top-a,ee.bottom-a)))-Math.abs(Math.max(Ee.top-a,Ee.bottom-a))})).length>0){a=(v[0].bottom+v[0].top)/2;try{return R.moveToPoint(t,a),R.collapse(!0),R}catch{}}return null}(t,a,m)}return function(t,a){var m=t&&t.parentElement?t.parentElement():null;return Os(function(t,a,m){for(;t&&t!==a;){if(m(t))return t;t=t.parentNode}return null}(m,a,nb))?null:t}(v,m.body)}return v},N_=function(t,a){return t&&a&&t.startContainer===a.startContainer&&t.startOffset===a.startOffset&&t.endContainer===a.endContainer&&t.endOffset===a.endOffset},ch=function(t,a,m){return null!==function(t,a,m){for(;t&&t!==a;){if(m(t))return t;t=t.parentNode}return null}(t,a,m)},qm=function(t,a,m){return ch(t,a,function(v){return v.nodeName===m})},B_=function(t){return t&&"TABLE"===t.nodeName},Ff=function(t){return t&&/^(TD|TH|CAPTION)$/.test(t.nodeName)},HM=function(t,a){return Nd(t)&&!1===ch(t,a,xu)},F1=function(t,a,m){for(var v=new Sr(a,t.getParent(a.parentNode,t.isBlock)||t.getRoot());a=v[m?"prev":"next"]();)if(_a(a))return!0},Gb=function(t,a,m,v,S){var R,Ee,ee=t.getRoot(),Se=t.schema.getNonEmptyElements(),pt=t.getParent(S.parentNode,t.isBlock)||ee;if(v&&_a(S)&&a&&t.isEmpty(pt))return Ne.some(Tr(S.parentNode,t.nodeIndex(S)));for(var Gt=new Sr(S,pt);Ee=Gt[v?"prev":"next"]();){if("false"===t.getContentEditableParent(Ee)||HM(Ee,ee))return Ne.none();if(Kr(Ee)&&Ee.nodeValue.length>0)return!1===qm(Ee,ee,"A")?Ne.some(Tr(Ee,v?Ee.nodeValue.length:0)):Ne.none();if(t.isBlock(Ee)||Se[Ee.nodeName.toLowerCase()])return Ne.none();R=Ee}return m&&R?Ne.some(Tr(R,0)):Ne.none()},N1=function(t,a,m,v){var S,R,Ee,Se,ee=t.getRoot(),pt=!1;S=v[(m?"start":"end")+"Container"],R=v[(m?"start":"end")+"Offset"];var Gt=la(S)&&R===S.childNodes.length,jt=t.schema.getNonEmptyElements();if(Se=m,Nd(S))return Ne.none();if(la(S)&&R>S.childNodes.length-1&&(Se=!1),_s(S)&&(S=ee,R=0),S===ee){if(Se&&((Ee=S.childNodes[R>0?R-1:0])&&(Nd(Ee)||jt[Ee.nodeName]||B_(Ee))))return Ne.none();if(S.hasChildNodes()){if(R=Math.min(!Se&&R>0?R-1:R,S.childNodes.length-1),S=S.childNodes[R],R=Kr(S)&&Gt?S.data.length:0,!a&&S===ee.lastChild&&B_(S)||function(t,a){for(;a&&a!==t;){if(Os(a))return!0;a=a.parentNode}return!1}(ee,S)||Nd(S))return Ne.none();if(S.hasChildNodes()&&!1===B_(S)){Ee=S;var on=new Sr(S,ee);do{if(Os(Ee)||Nd(Ee)){pt=!1;break}if(Kr(Ee)&&Ee.nodeValue.length>0){R=Se?0:Ee.nodeValue.length,S=Ee,pt=!0;break}if(jt[Ee.nodeName.toLowerCase()]&&!Ff(Ee)){R=t.nodeIndex(Ee),S=Ee.parentNode,Se||R++,pt=!0;break}}while(Ee=Se?on.next():on.prev())}}}return a&&(Kr(S)&&0===R&&Gb(t,Gt,a,!0,S).each(function(Rn){S=Rn.container(),R=Rn.offset(),pt=!0}),la(S)&&((Ee=S.childNodes[R])||(Ee=S.childNodes[R-1]),Ee&&_a(Ee)&&!function(t,a){return t.previousSibling&&t.previousSibling.nodeName===a}(Ee,"A")&&!F1(t,Ee,!1)&&!F1(t,Ee,!0)&&Gb(t,Gt,a,!0,Ee).each(function(Rn){S=Rn.container(),R=Rn.offset(),pt=!0}))),Se&&!a&&Kr(S)&&R===S.nodeValue.length&&Gb(t,Gt,a,!1,S).each(function(Rn){S=Rn.container(),R=Rn.offset(),pt=!0}),pt?Ne.some(Tr(S,R)):Ne.none()},zC=function(t,a){var m=a.collapsed,v=a.cloneRange(),S=Tr.fromRangeStart(a);return N1(t,m,!0,v).each(function(R){(!m||!Tr.isAbove(S,R))&&v.setStart(R.container(),R.offset())}),m||N1(t,m,!1,v).each(function(R){v.setEnd(R.container(),R.offset())}),m&&v.collapse(!0),N_(a,v)?Ne.none():Ne.some(v)},Ev=function(t,a){return t.splitText(a)},iy=function(t){var a=t.startContainer,m=t.startOffset,v=t.endContainer,S=t.endOffset;return a===v&&Kr(a)?m>0&&m<a.nodeValue.length&&(a=(v=Ev(a,m)).previousSibling,S>m?(a=v=Ev(v,S-=m).previousSibling,S=v.nodeValue.length,m=0):S=0):(Kr(a)&&m>0&&m<a.nodeValue.length&&(a=Ev(a,m),m=0),Kr(v)&&S>0&&S<v.nodeValue.length&&(S=(v=Ev(v,S).previousSibling).nodeValue.length)),{startContainer:a,startOffset:m,endContainer:v,endOffset:S}},ry=function(t){return{walk:function(S,R){return x1(t,S,R)},split:iy,normalize:function(S){return zC(t,S).fold(Be,function(R){return S.setStart(R.startContainer,R.startOffset),S.setEnd(R.endContainer,R.endOffset),!0})}}};ry.compareRanges=N_,ry.getCaretRangeFromPoint=k0,ry.getSelectedNode=Pi,ry.getNode=Ir;var ly,lx=function(t,a){var v=function(Ee){var Se=a(Ee);if(Se<=0||null===Se){var pt=Ba(Ee,t);return parseFloat(pt)||0}return Se},R=function(Ee,Se){return Bn(Se,function(pt,Gt){var jt=Ba(Ee,Gt),on=void 0===jt?0:parseInt(jt,10);return isNaN(on)?pt:pt+on},0)};return{set:function(Ee,Se){if(!Pe(Se)&&!Se.match(/^[0-9]+$/))throw new Error(t+".set accepts only positive integer values. Value was "+Se);var pt=Ee.dom;vl(pt)&&(pt.style[t]=Se+"px")},get:v,getOuter:v,aggregate:R,max:function(Ee,Se,pt){var Gt=R(Ee,pt);return Se>Gt?Se-Gt:0}}}("height",function(t){var a=t.dom;return Qo(t)?a.getBoundingClientRect().height:a.offsetHeight}),Wb=function(t,a){return t.view(a).fold(oe([]),function(v){var S=t.owner(v),R=Wb(t,S);return[v].concat(R)})},VM=Object.freeze({__proto__:null,view:function(t){var a;return(t.dom===document?Ne.none():Ne.from(null===(a=t.dom.defaultView)||void 0===a?void 0:a.frameElement)).map(Dt.fromDom)},owner:function(t){return Ki(t)}}),ZM=function(t){var a=Dt.fromDom(document),m=xc(a),v=function(t,a){var m=a.owner(t);return Wb(a,m)}(t,VM),S=Rs(t),R=wi(v,function(ee,Ee){var Se=Rs(Ee);return{left:ee.left+Se.left,top:ee.top+Se.top}},{left:0,top:0});return da(R.left+S.left+m.left,R.top+S.top+m.top)},ib=function(t){return"textarea"===ba(t)},Y1=function(t,a){var m=function(t){var a=t.dom.ownerDocument,m=a.body,v=a.defaultView,S=a.documentElement;if(m===t.dom)return da(m.offsetLeft,m.offsetTop);var R=Ia(v?.pageYOffset,S.scrollTop),ee=Ia(v?.pageXOffset,S.scrollLeft),Ee=Ia(S.clientTop,m.clientTop),Se=Ia(S.clientLeft,m.clientLeft);return Rs(t).translate(ee-Se,R-Ee)}(t),v=function(t){return lx.get(t)}(t);return{element:t,bottom:m.top+v,height:v,pos:m,cleanup:a}},YE=function(t,a){var m=function(t,a){var m=Qs(t);if(0===m.length||ib(t))return{element:t,offset:a};if(a<m.length&&!ib(m[a]))return{element:m[a],offset:0};var v=m[m.length-1];return ib(v)?{element:t,offset:a}:"img"===ba(v)?{element:v,offset:1}:Qi(v)?{element:v,offset:Xy(v).length}:{element:v,offset:Qs(v).length}}(t,a),v=Dt.fromHtml('<span data-mce-bogus="all" style="display: inline-block;">\ufeff</span>');return _c(m.element,v),Y1(v,function(){return Dr(v)})},Tv=function(t,a,m,v){jb(t,function(S,R){return YC(t,a,m,v)},m)},H1=function(t,a,m,v,S){var R={elm:v.element.dom,alignToTop:S};(function(t,a){return t.fire("ScrollIntoView",a).isDefaultPrevented()})(t,R)||(m(a,xc(a).top,v,S),function(t,a){t.fire("AfterScrollIntoView",a)}(t,R))},YC=function(t,a,m,v){var S=Dt.fromDom(t.getBody()),R=Dt.fromDom(t.getDoc());!function(t){t.dom.offsetWidth}(S);var ee=YE(Dt.fromDom(m.startContainer),m.startOffset);H1(t,R,a,ee,v),ee.cleanup()},R0=function(t,a,m,v){var S=Dt.fromDom(t.getDoc());H1(t,S,m,function(t){return Y1(Dt.fromDom(t),xe)}(a),v)},jb=function(t,a,m){var v=m.startContainer,S=m.startOffset,R=m.endContainer,ee=m.endOffset;a(Dt.fromDom(v),Dt.fromDom(R));var Ee=t.dom.createRng();Ee.setStart(v,S),Ee.setEnd(R,ee),t.selection.setRng(m)},V1=function(t,a,m,v){var S=t.pos;if(m)Hc(S.left,S.top,v);else{var R=S.top-a+t.height;Hc(S.left,R,v)}},GM=function(t,a,m,v,S){var R=m+a,ee=v.pos.top,Ee=v.bottom,Se=Ee-ee>=m;if(ee<a)V1(v,m,!1!==S,t);else if(ee>R){V1(v,m,Se?!1!==S:!0===S,t)}else Ee>R&&!Se&&V1(v,m,!0===S,t)},Z1=function(t,a,m,v){var S=t.dom.defaultView.innerHeight;GM(t,a,S,m,v)},ay=function(t,a,m,v){var S=t.dom.defaultView.innerHeight;GM(t,a,S,m,v);var R=ZM(m.element),ee=Su(window);R.top<ee.y?lp(m.element,!1!==v):R.top>ee.bottom&&lp(m.element,!0===v)},HE=function(t,a,m){return Tv(t,Z1,a,m)},rb=function(t,a,m){return R0(t,a,Z1,m)},Rh=function(t,a,m){return Tv(t,ay,a,m)},Ng=function(t,a,m){return R0(t,a,ay,m)},xv=function(t,a,m){(t.inline?HE:Rh)(t,a,m)},H=function(t){var a=ss(t).dom;return t.dom===a.activeElement},s=function(t){return void 0===t&&(t=Dt.fromDom(document)),Ne.from(t.dom.activeElement).map(Dt.fromDom)},ie_create=function(t,a,m,v){return{start:t,soffset:a,finish:m,foffset:v}},ot=Go_generate([{before:["element"]},{on:["element","offset"]},{after:["element"]}]),np_getStart=(ot.before,ot.on,ot.after,function(t){return t.fold(me,me,me)}),Ss=Go_generate([{domRange:["rng"]},{relative:["startSitu","finishSitu"]},{exact:["start","soffset","finish","foffset"]}]),ob={domRange:Ss.domRange,relative:Ss.relative,exact:Ss.exact,exactFromRange:function(t){return Ss.exact(t.start,t.soffset,t.finish,t.foffset)},getWin:function(t){var a=function(t){return t.match({domRange:function(a){return Dt.fromDom(a.startContainer)},relative:function(a,m){return np_getStart(a)},exact:function(a,m,v,S){return a}})}(t);return Na(a)},range:ie_create},Jb=gi().browser,ip=function(t,a){var m=Qi(a)?Xy(a).length:Qs(a).length+1;return t>m?m:t<0?0:t},uh=function(t){return ob.range(t.start,ip(t.soffset,t.start),t.finish,ip(t.foffset,t.finish))},Qb=function(t,a){return!Cd(a.dom)&&(Ra(t,a)||Ao(t,a))},F0=function(t){return function(a){return Qb(t,a.start)&&Qb(t,a.finish)}},jM=function(t){return!0===t.inline||Jb.isIE()},PD=function(t){return ob.range(Dt.fromDom(t.startContainer),t.startOffset,Dt.fromDom(t.endContainer),t.endOffset)},G1=function(t){return function(t){var a=t.getSelection();return(a&&0!==a.rangeCount?Ne.from(a.getRangeAt(0)):Ne.none()).map(PD)}(Na(t).dom).filter(F0(t))},KM=function(t){var a=document.createRange();try{return a.setStart(t.start.dom,t.soffset),a.setEnd(t.finish.dom,t.foffset),Ne.some(a)}catch{return Ne.none()}},ZE=function(t){var a=jM(t)?G1(Dt.fromDom(t.getBody())):Ne.none();t.bookmark=a.isSome()?a:t.bookmark},GE=function(t){return(t.bookmark?t.bookmark:Ne.none()).bind(function(m){return function(t,a){return Ne.from(a).filter(F0(t)).map(uh)}(Dt.fromDom(t.getBody()),m)}).bind(KM)},OD={isEditorUIElement:function(t){var a=t.className.toString();return-1!==a.indexOf("tox-")||-1!==a.indexOf("mce-")}},px=function(t,a){gi().browser.isIE()?function(t){t.on("focusout",function(){ZE(t)})}(t):function(t,a){t.on("mouseup touchend",function(m){a.throttle()})}(t,a),t.on("keyup NodeChange",function(v){(function(t){return"nodechange"===t.type&&t.selectionChange})(v)||ZE(t)})},mx=function(t){var a=av(function(){ZE(t)},0);t.on("init",function(){t.inline&&function(t,a){var m=function(){a.throttle()};jl.DOM.bind(document,"mouseup",m),t.on("remove",function(){jl.DOM.unbind(document,"mouseup",m)})}(t,a),px(t,a)}),t.on("remove",function(){a.cancel()})},B0=jl.DOM,j1=function(t,a){var m=function(t){return t.getParam("custom_ui_selector","","string")}(t);return null!==B0.getParent(a,function(S){return function(t){return OD.isEditorUIElement(t)}(S)||!!m&&t.dom.is(S,m)})},LD=function(t,a){var m=a.editor;mx(m),m.on("focusin",function(){var v=t.focusedEditor;v!==m&&(v&&v.fire("blur",{focusedEditor:m}),t.setActive(m),t.focusedEditor=m,m.fire("focus",{blurredEditor:v}),m.focus(!0))}),m.on("focusout",function(){Ht.setEditorTimeout(m,function(){var v=t.focusedEditor;!j1(m,function(t){try{var a=ss(Dt.fromDom(t.getElement()));return s(a).fold(function(){return document.body},function(m){return m.dom})}catch{return document.body}}(m))&&v===m&&(m.fire("blur",{focusedEditor:null}),t.focusedEditor=null)})}),ly||(ly=function(v){var S=t.activeEditor;S&&function(t){if(gl()&&ne(t.target)){var a=Dt.fromDom(t.target);if(Xt(a)&&Ol(a)&&t.composed&&t.composedPath){var m=t.composedPath();if(m)return Hn(m)}}return Ne.from(t.target)}(v).each(function(R){R.ownerDocument===document&&R!==document.body&&!j1(S,R)&&t.focusedEditor===S&&(S.fire("blur",{focusedEditor:null}),t.focusedEditor=null)})},B0.bind(document,"focusin",ly))},$E=function(t,a){t.focusedEditor===a.editor&&(t.focusedEditor=null),t.activeEditor||(B0.unbind(document,"focusin",ly),ly=null)},RD=function(t,a){return function(t){return t.collapsed?Ne.from(Ir(t.startContainer,t.startOffset)).map(Dt.fromDom):Ne.none()}(a).bind(function(m){return Es(m)?Ne.some(m):!1===Ra(t,m)?Ne.some(t):Ne.none()})},XM=function(t,a){RD(Dt.fromDom(t.getBody()),a).bind(function(m){return ou(m.dom)}).fold(function(){t.selection.normalize()},function(m){return t.selection.setRng(m.toRange())})},eT=function(t){if(t.setActive)try{t.setActive()}catch{t.focus()}else t.focus()},wS=function(t){return H(t)||function(t){return s(ss(t)).filter(function(a){return t.dom.contains(a.dom)})}(t).isSome()},ab=function(t){return t.inline?function(t){var a=t.getBody();return a&&wS(Dt.fromDom(a))}(t):function(t){return t.iframeElement&&H(Dt.fromDom(t.iframeElement))}(t)},PS=function(t){return ab(t)||function(t){var a=ss(Dt.fromDom(t.getElement()));return s(a).filter(function(m){return!function(t){var a=t.classList;return void 0!==a&&(a.contains("tox-edit-area")||a.contains("tox-edit-area__iframe")||a.contains("mce-content-body"))}(m.dom)&&j1(t,m.dom)}).isSome()}(t)},K1=function(t){return t.editorManager.setActive(t)},hx=function(t,a){t.removed||(a?K1(t):function(t){var a=t.selection,m=t.getBody(),v=a.getRng();t.quirks.refreshContentEditable(),void 0!==t.bookmark&&!1===ab(t)&&GE(t).each(function(R){t.selection.setRng(R),v=R});var S=function(t,a){return t.dom.getParent(a,function(m){return"true"===t.dom.getContentEditable(m)})}(t,a.getNode());if(t.$.contains(m,S))return eT(S),XM(t,v),void K1(t);t.inline||($r.opera||eT(m),t.getWin().focus()),($r.gecko||t.inline)&&(eT(m),XM(t,v)),K1(t)}(t))},gx=function(t,a,m,v,S){var R=m?a.startContainer:a.endContainer,ee=m?a.startOffset:a.endOffset;return Ne.from(R).map(Dt.fromDom).map(function(Ee){return v&&a.collapsed?Ee:vu(Ee,S(Ee,ee)).getOr(Ee)}).bind(function(Ee){return Xt(Ee)?Ne.some(Ee):qi(Ee).filter(Xt)}).map(function(Ee){return Ee.dom}).getOr(t)},tT=function(t,a,m){return gx(t,a,!0,m,function(v,S){return Math.min(sp(v),S)})},_x=function(t,a,m){return gx(t,a,!1,m,function(v,S){return S>0?S-1:S})},jE=function(t,a){for(var m=t;t&&Kr(t)&&0===t.length;)t=a?t.nextSibling:t.previousSibling;return t||m},vx=function(t,a){return Dn(a,function(m){var v=t.fire("GetSelectionRange",{range:m});return v.range!==m?v.range:m})},iT={"#text":3,"#comment":8,"#cdata":4,"#pi":7,"#doctype":10,"#document-fragment":11},U0=function(t,a,m){var v=m?"lastChild":"firstChild",S=m?"prev":"next";if(t[v])return t[v];if(t!==a){var R=t[S];if(R)return R;for(var ee=t.parent;ee&&ee!==a;ee=ee.parent)if(R=ee[S])return R}},a_=function(t){if(!Sc(t.value))return!1;var a=t.parent;return!(a&&("span"!==a.name||a.attr("style"))&&/^[ ]+$/.test(t.value))},J1=function(t){var a="a"===t.name&&!t.attr("href")&&t.attr("id");return t.attr("name")||t.attr("id")&&!t.firstChild||t.attr("data-mce-bookmark")||a},dh=function(){function t(a,m){this.name=a,this.type=m,1===m&&(this.attributes=[],this.attributes.map={})}return t.create=function(a,m){var v=new t(a,iT[a]||1);return m&&Hi(m,function(S,R){v.attr(R,S)}),v},t.prototype.replace=function(a){var m=this;return a.parent&&a.remove(),m.insert(a,m),m.remove(),m},t.prototype.attr=function(a,m){var S,v=this;if("string"!=typeof a)return null!=a&&Hi(a,function(ee,Ee){v.attr(Ee,ee)}),v;if(S=v.attributes){if(void 0!==m){if(null===m){if(a in S.map){delete S.map[a];for(var R=S.length;R--;)if(S[R].name===a)return S.splice(R,1),v}return v}if(a in S.map){for(R=S.length;R--;)if(S[R].name===a){S[R].value=m;break}}else S.push({name:a,value:m});return S.map[a]=m,v}return S.map[a]}},t.prototype.clone=function(){var v,a=this,m=new t(a.name,a.type);if(v=a.attributes){var S=[];S.map={};for(var R=0,ee=v.length;R<ee;R++){var Ee=v[R];"id"!==Ee.name&&(S[S.length]={name:Ee.name,value:Ee.value},S.map[Ee.name]=Ee.value)}m.attributes=S}return m.value=a.value,m.shortEnded=a.shortEnded,m},t.prototype.wrap=function(a){var m=this;return m.parent.insert(a,m),a.append(m),m},t.prototype.unwrap=function(){for(var a=this,m=a.firstChild;m;){var v=m.next;a.insert(m,a,!0),m=v}a.remove()},t.prototype.remove=function(){var a=this,m=a.parent,v=a.next,S=a.prev;return m&&(m.firstChild===a?(m.firstChild=v,v&&(v.prev=null)):S.next=v,m.lastChild===a?(m.lastChild=S,S&&(S.next=null)):v.prev=S,a.parent=a.next=a.prev=null),a},t.prototype.append=function(a){var m=this;a.parent&&a.remove();var v=m.lastChild;return v?(v.next=a,a.prev=v,m.lastChild=a):m.lastChild=m.firstChild=a,a.parent=m,a},t.prototype.insert=function(a,m,v){a.parent&&a.remove();var S=m.parent||this;return v?(m===S.firstChild?S.firstChild=a:m.prev.next=a,a.prev=m.prev,a.next=m,m.prev=a):(m===S.lastChild?S.lastChild=a:m.next.prev=a,a.next=m.next,a.prev=m,m.next=a),a.parent=S,a},t.prototype.getAll=function(a){for(var v=[],S=this.firstChild;S;S=U0(S,this))S.name===a&&v.push(S);return v},t.prototype.children=function(){for(var m=[],v=this.firstChild;v;v=v.next)m.push(v);return m},t.prototype.empty=function(){var a=this;if(a.firstChild){for(var m=[],v=a.firstChild;v;v=U0(v,a))m.push(v);for(var S=m.length;S--;){(v=m[S]).parent=v.firstChild=v.lastChild=v.next=v.prev=null}}return a.firstChild=a.lastChild=null,a},t.prototype.isEmpty=function(a,m,v){void 0===m&&(m={});var S=this,R=S.firstChild;if(J1(S))return!1;if(R)do{if(1===R.type){if(R.attr("data-mce-bogus"))continue;if(a[R.name]||J1(R))return!1}if(8===R.type||3===R.type&&!a_(R)||3===R.type&&R.parent&&m[R.parent.name]&&Sc(R.value)||v&&v(R))return!1}while(R=U0(R,S));return!0},t.prototype.walk=function(a){return U0(this,null,a)},t}(),oT=function(t,a){return t.replace(a.re,function(m){return Ni(a.uris,m).getOr(m)})},aT=Li.each,yx=Li.trim,bx="source protocol authority userInfo user password host port relative path directory file query anchor".split(" "),Q1={ftp:21,http:80,https:443,mailto:25},Cx=["img","video"],Ex=function(t,a,m){return!t.allow_html_data_urls&&(/^data:image\//i.test(a)?function(t,a){return ne(t)?!t:!ne(a)||!st(Cx,a)}(t.allow_svg_data_urls,m)&&/^data:image\/svg\+xml/i.test(a):/^data:/i.test(a))},U_=function(){function t(a,m){a=yx(a),this.settings=m||{};var v=this.settings.base_uri,S=this;if(/^([\w\-]+):([^\/]{2})/i.test(a)||/^\s*#/.test(a))S.source=a;else{var R=0===a.indexOf("//");if(0===a.indexOf("/")&&!R&&(a=(v&&v.protocol||"http")+"://mce_host"+a),!/^[\w\-]*:?\/\//.test(a)){var ee=this.settings.base_uri?this.settings.base_uri.path:new t(document.location.href).directory;if(this.settings.base_uri&&""==this.settings.base_uri.protocol)a="//mce_host"+S.toAbsPath(ee,a);else{var Ee=/([^#?]*)([#?]?.*)/.exec(a);a=(v&&v.protocol||"http")+"://mce_host"+S.toAbsPath(ee,Ee[1])+Ee[2]}}a=a.replace(/@@/g,"(mce_at)");var Se=/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@\/]*):?([^:@\/]*))?@)?(\[[a-zA-Z0-9:.%]+\]|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/.exec(a);aT(bx,function(pt,Gt){var jt=Se[Gt];jt&&(jt=jt.replace(/\(mce_at\)/g,"@@")),S[pt]=jt}),v&&(S.protocol||(S.protocol=v.protocol),S.userInfo||(S.userInfo=v.userInfo),!S.port&&"mce_host"===S.host&&(S.port=v.port),(!S.host||"mce_host"===S.host)&&(S.host=v.host),S.source=""),R&&(S.protocol="")}}return t.parseDataUri=function(a){var m,v=decodeURIComponent(a).split(","),S=/data:([^;]+)/.exec(v[0]);return S&&(m=S[1]),{type:m,data:v[1]}},t.isDomSafe=function(a,m,v){if(void 0===v&&(v={}),v.allow_script_urls)return!0;var S=td.decode(a).replace(/[\s\u0000-\u001F]+/g,"");try{S=decodeURIComponent(S)}catch{S=unescape(S)}return!/((java|vb)script|mhtml):/i.test(S)&&!Ex(v,S,m)},t.getDocumentBaseUrl=function(a){var m;return m=0!==a.protocol.indexOf("http")&&"file:"!==a.protocol?a.href:a.protocol+"//"+a.host+a.pathname,/^[^:]+:\/\/\/?[^\/]+\//.test(m)&&(m=m.replace(/[\?#].*$/,"").replace(/[\/\\][^\/]+$/,""),/[\/\\]$/.test(m)||(m+="/")),m},t.prototype.setPath=function(a){var m=/^(.*?)\/?(\w+)?$/.exec(a);this.path=m[0],this.directory=m[1],this.file=m[2],this.source="",this.getURI()},t.prototype.toRelative=function(a){var m;if("./"===a)return a;var v=new t(a,{base_uri:this});if("mce_host"!==v.host&&this.host!==v.host&&v.host||this.port!==v.port||this.protocol!==v.protocol&&""!==v.protocol)return v.getURI();var S=this.getURI(),R=v.getURI();return S===R||"/"===S.charAt(S.length-1)&&S.substr(0,S.length-1)===R?S:(m=this.toRelPath(this.path,v.path),v.query&&(m+="?"+v.query),v.anchor&&(m+="#"+v.anchor),m)},t.prototype.toAbsolute=function(a,m){var v=new t(a,{base_uri:this});return v.getURI(m&&this.isSameOrigin(v))},t.prototype.isSameOrigin=function(a){if(this.host==a.host&&this.protocol==a.protocol){if(this.port==a.port)return!0;var m=Q1[this.protocol];if(m&&(this.port||m)==(a.port||m))return!0}return!1},t.prototype.toRelPath=function(a,m){var R,ee,v=0,S="",Ee=a.substring(0,a.lastIndexOf("/")).split("/"),Se=m.split("/");if(Ee.length>=Se.length)for(R=0,ee=Ee.length;R<ee;R++)if(R>=Se.length||Ee[R]!==Se[R]){v=R+1;break}if(Ee.length<Se.length)for(R=0,ee=Se.length;R<ee;R++)if(R>=Ee.length||Ee[R]!==Se[R]){v=R+1;break}if(1===v)return m;for(R=0,ee=Ee.length-(v-1);R<ee;R++)S+="../";for(R=v-1,ee=Se.length;R<ee;R++)S+=R!==v-1?"/"+Se[R]:Se[R];return S},t.prototype.toAbsPath=function(a,m){var v,ee,S=0,R=[],Ee=/\/$/.test(m)?"/":"",Se=a.split("/"),pt=m.split("/");for(aT(Se,function(Gt){Gt&&R.push(Gt)}),Se=R,v=pt.length-1,R=[];v>=0;v--)if(0!==pt[v].length&&"."!==pt[v]){if(".."===pt[v]){S++;continue}if(S>0){S--;continue}R.push(pt[v])}return 0!==(ee=(v=Se.length-S)<=0?ui(R).join("/"):Se.slice(0,v).join("/")+"/"+ui(R).join("/")).indexOf("/")&&(ee="/"+ee),Ee&&ee.lastIndexOf("/")!==ee.length-1&&(ee+=Ee),ee},t.prototype.getURI=function(a){var m;return void 0===a&&(a=!1),(!this.source||a)&&(m="",a||(this.protocol?m+=this.protocol+"://":m+="//",this.userInfo&&(m+=this.userInfo+"@"),this.host&&(m+=this.host),this.port&&(m+=":"+this.port)),this.path&&(m+=this.path),this.query&&(m+="?"+this.query),this.anchor&&(m+="#"+this.anchor),this.source=m),this.source},t}(),Dv=Li.makeMap("button,fieldset,form,iframe,img,image,input,object,output,select,textarea"),sb=rr(function(){return document.implementation.createHTMLDocument("parser")}),Mx=function(t,a,m){for(var v=/<([!?\/])?([A-Za-z0-9\-_:.]+)/g,S=/(?:\s(?:[^'">]+(?:"[^"]*"|'[^']*'))*[^"'>]*(?:"[^">]*|'[^'>]*)?|\s*|\/)>/g,R=t.getShortEndedElements(),ee=1,Ee=m;0!==ee;)for(v.lastIndex=Ee;;){var Se=v.exec(a);if(null===Se)return Ee;if("!"===Se[1]){Ee=Gn(Se[2],"--")?Y0(a,!1,Se.index+3):Y0(a,!0,Se.index+1);break}S.lastIndex=v.lastIndex;var pt=S.exec(a);if(!X(pt)&&pt.index===v.lastIndex){"/"===Se[1]?ee-=1:Nn(R,Se[2])||(ee+=1),Ee=v.lastIndex+pt[0].length;break}}return Ee},Y0=function(t,a,m){void 0===m&&(m=0);var v=t.toLowerCase();if(-1!==v.indexOf("[if ",m)&&function(t,a){return/^\s*\[if [\w\W]+\]>.*<!\[endif\](--!?)?>/.test(t.substr(a))}(v,m)){var S=v.indexOf("[endif]",m);return v.indexOf(">",S)}if(a){var R=v.indexOf(">",m);return-1!==R?R:v.length}var ee=/--!?>/g;ee.lastIndex=m;var Ee=ee.exec(t);return Ee?Ee.index+Ee[0].length:v.length},BD=function(t,a){var m=t.exec(a);if(m){var v=m[1],S=m[2];return"string"==typeof v&&"data-mce-bogus"===v.toLowerCase()?S:null}return null},VC=function(t,a){void 0===a&&(a=pd()),t=t||{};var m=sb(),v=m.createElement("form");!1!==t.fix_self_closing&&(t.fix_self_closing=!0);var S=t.comment?t.comment:xe,R=t.cdata?t.cdata:xe,ee=t.text?t.text:xe,Ee=t.start?t.start:xe,Se=t.end?t.end:xe,pt=t.pi?t.pi:xe,Gt=t.doctype?t.doctype:xe,jt=function(Rn,Yn){void 0===Yn&&(Yn="html");for(var qn,pi,tr,Oi,cr,Ur,no,es,Xo,Wr,qa,po,Wo,vo,So,ca,Jr,na,Ic,$n=Rn.html,bi=0,Wi=[],Mc=0,fh=td.decode,Op=Li.makeMap("src,href,data,background,action,formaction,poster,xlink:href"),f_="html"===Yn?0:1,W_=function($u){var Ld,Vf;for(Ld=Wi.length;Ld--&&Wi[Ld].name!==$u;);if(Ld>=0){for(Vf=Wi.length-1;Vf>=Ld;Vf--)($u=Wi[Vf]).valid&&Se($u.name);Wi.length=Ld}},Xr=function($u,Ld){return ee(oT($u,Rn),Ld)},yo=function($u){""!==$u&&(">"===$u.charAt(0)&&($u=" "+$u),!t.allow_conditional_comments&&"[if"===$u.substr(0,3).toLowerCase()&&($u=" "+$u),S(oT($u,Rn)))},fr=function($u,Ld){var Vf=$u||"",$_=!Gn(Vf,"--"),o1=Y0($n,$_,Ld);return $u=$n.substr(Ld,o1-Ld),yo($_?Vf+$u:$u),o1+1},so=function($u,Ld,Vf,$_,o1){if(Vf=function($u){return oT($u,Rn)}((Ld=Ld.toLowerCase())in Cf?Ld:fh(Vf||$_||o1||"")),nf&&!es&&!1===function(t){return 0===t.indexOf("data-")||0===t.indexOf("aria-")}(Ld)){var a1=vo[Ld];if(!a1&&So){for(var JT=So.length;JT--&&!(a1=So[JT]).pattern.test(Ld););-1===JT&&(a1=null)}if(!a1||a1.validValues&&!(Vf in a1.validValues))return}("name"===Ld||"id"===Ld)&&$u in Dv&&(Vf in m||Vf in v)||Op[Ld]&&!U_.isDomSafe(Vf,$u,t)||es&&(Ld in Op||0===Ld.indexOf("on"))||(Oi.map[Ld]=Vf,Oi.push({name:Ld,value:Vf}))},eo=new RegExp("<(?:(?:!--([\\w\\W]*?)--!?>)|(?:!\\[CDATA\\[([\\w\\W]*?)\\]\\]>)|(?:![Dd][Oo][Cc][Tt][Yy][Pp][Ee]([\\w\\W]*?)>)|(?:!(--)?)|(?:\\?([^\\s\\/<>]+) ?([\\w\\W]*?)[?/]>)|(?:\\/([A-Za-z][A-Za-z0-9\\-_\\:\\.]*)>)|(?:([A-Za-z][A-Za-z0-9\\-_:.]*)(\\s(?:[^'\">]+(?:\"[^\"]*\"|'[^']*'))*[^\"'>]*(?:\"[^\">]*|'[^'>]*)?|\\s*|\\/)>))","g"),za=/([\w:\-]+)(?:\s*=\s*(?:(?:\"((?:[^\"])*)\")|(?:\'((?:[^\'])*)\')|([^>\s]+)))?/g,Wa=a.getShortEndedElements(),Nu=t.self_closing_elements||a.getSelfClosingElements(),Cf=a.getBoolAttrs(),nf=t.validate,wM=t.remove_internals,h_=t.fix_self_closing,Vg=a.getSpecialElements(),Hf=$n+">";qn=eo.exec(Hf);){var bb=qn[0];if(bi<qn.index&&Xr(fh($n.substr(bi,qn.index-bi))),pi=qn[7])":"===(pi=pi.toLowerCase()).charAt(0)&&(pi=pi.substr(1)),W_(pi);else if(pi=qn[8]){if(qn.index+bb.length>$n.length){Xr(fh($n.substr(qn.index))),bi=qn.index+bb.length;continue}":"===(pi=pi.toLowerCase()).charAt(0)&&(pi=pi.substr(1)),Xo=pi in Wa,h_&&Nu[pi]&&Wi.length>0&&Wi[Wi.length-1].name===pi&&W_(pi);var g_=BD(za,qn[9]);if(null!==g_){if("all"===g_){bi=Mx(a,$n,eo.lastIndex),eo.lastIndex=bi;continue}qa=!1}if(!nf||(Wr=a.getElementRule(pi))){if(qa=!0,nf&&(vo=Wr.attributes,So=Wr.attributePatterns),(Wo=qn[9])?((es=-1!==Wo.indexOf("data-mce-type"))&&wM&&(qa=!1),(Oi=[]).map={},Wo.replace(za,function($u,Ld,Vf,$_,o1){return so(pi,Ld,Vf,$_,o1),""})):(Oi=[]).map={},nf&&!es){if(ca=Wr.attributesRequired,Jr=Wr.attributesDefault,na=Wr.attributesForced,Wr.removeEmptyAttrs&&!Oi.length&&(qa=!1),na)for(cr=na.length;cr--;)no=(po=na[cr]).name,"{$uid}"===(Ic=po.value)&&(Ic="mce_"+Mc++),Oi.map[no]=Ic,Oi.push({name:no,value:Ic});if(Jr)for(cr=Jr.length;cr--;)(no=(po=Jr[cr]).name)in Oi.map||("{$uid}"===(Ic=po.value)&&(Ic="mce_"+Mc++),Oi.map[no]=Ic,Oi.push({name:no,value:Ic}));if(ca){for(cr=ca.length;cr--&&!(ca[cr]in Oi.map););-1===cr&&(qa=!1)}if(po=Oi.map["data-mce-bogus"]){if("all"===po){bi=Mx(a,$n,eo.lastIndex),eo.lastIndex=bi;continue}qa=!1}}qa&&Ee(pi,Oi,Xo)}else qa=!1;if(tr=Vg[pi]){tr.lastIndex=bi=qn.index+bb.length,(qn=tr.exec($n))?(qa&&(Ur=$n.substr(bi,qn.index-bi)),bi=qn.index+qn[0].length):(Ur=$n.substr(bi),bi=$n.length),qa&&(Ur.length>0&&Xr(Ur,!0),Se(pi)),eo.lastIndex=bi;continue}Xo||(Wo&&Wo.indexOf("/")===Wo.length-1?qa&&Se(pi):Wi.push({name:pi,valid:qa}))}else if(pi=qn[1])yo(pi);else if(pi=qn[2]){if(!(1===f_||t.preserve_cdata||Wi.length>0&&a.isValidChild(Wi[Wi.length-1].name,"#cdata"))){bi=fr("",qn.index+2),eo.lastIndex=bi;continue}R(pi)}else if(pi=qn[3])Gt(pi);else{if((pi=qn[4])||"<!"===bb){bi=fr(pi,qn.index+bb.length),eo.lastIndex=bi;continue}if(pi=qn[5]){if(1!==f_){bi=fr("?",qn.index+2),eo.lastIndex=bi;continue}pt(pi,qn[6])}}bi=qn.index+bb.length}for(bi<$n.length&&Xr(fh($n.substr(bi))),cr=Wi.length-1;cr>=0;cr--)(pi=Wi[cr]).valid&&Se(pi.name)};return{parse:function(Rn,Yn){void 0===Yn&&(Yn="html"),jt(function(t){for(var R,a=/data:[^;<"'\s]+;base64,([a-z0-9\+\/=\s]+)/gi,m=[],v={},S=Qh("img"),ee=0,Ee=0;R=a.exec(t);){var Se=R[0],pt=S+"_"+Ee++;v[pt]=Se,ee<R.index&&m.push(t.substr(ee,R.index-ee)),m.push(pt),ee=R.index+Se.length}var Gt=new RegExp(S+"_[0-9]+","g");return 0===ee?{prefix:S,uris:v,html:t,re:Gt}:(ee<t.length&&m.push(t.substr(ee)),{prefix:S,uris:v,html:m.join(""),re:Gt})}(Rn),Yn)}}};VC.findEndTag=Mx;var lb=function(t,a){for(var ee,m=/<(\w+) [^>]*data-mce-bogus="all"[^>]*>/g,v=t.schema,S=function(t,a){var m=new RegExp(["\\s?("+t.join("|")+')="[^"]+"'].join("|"),"gi");return a.replace(m,"")}(t.getTempAttrs(),a),R=v.getShortEndedElements();ee=m.exec(S);){var Ee=m.lastIndex,Se=ee[0].length,pt=void 0;pt=R[ee[1]]?Ee:VC.findEndTag(v,S,Ee),S=S.substring(0,Ee-Se)+S.substring(pt),m.lastIndex=Ee-Se}return Kc(S)},cb=lb,zD=function(t,a,m,v){var ee,S=function(t,a){return Tn(Tn({},t),{format:a,get:!0,getInner:!0})}(a,m),R=a.no_events?S:t.fire("BeforeGetContent",S);return ee="raw"===R.format?Li.trim(cb(t.serializer,v.innerHTML)):"text"===R.format?t.dom.isEmpty(v)?"":Kc(v.innerText||v.textContent):"tree"===R.format?t.serializer.serialize(v,R):function(t,a){var m=hm(t),v=new RegExp("^(<"+m+"[^>]*>(&nbsp;|&#160;|\\s|\xa0|<br \\/>|)<\\/"+m+">[\r\n]*|<br \\/>[\r\n]*)$");return a.replace(v,"")}(t,t.serializer.serialize(v,R)),st(["text","tree"],R.format)||Yp(Dt.fromDom(v))?R.content=ee:R.content=Li.trim(ee),R.no_events?R.content:t.fire("GetContent",R).content},H0=Li.each,xx=function(t){return{compare:function(m,v){if(m.nodeName!==v.nodeName)return!1;var S=function(ee){var Ee={};return H0(t.getAttribs(ee),function(Se){var pt=Se.nodeName.toLowerCase();0!==pt.indexOf("_")&&"style"!==pt&&0!==pt.indexOf("data-")&&(Ee[pt]=t.getAttrib(ee,pt))}),Ee},R=function(ee,Ee){var Se,pt;for(pt in ee)if(Nn(ee,pt)){if(typeof(Se=Ee[pt])>"u"||ee[pt]!==Se)return!1;delete Ee[pt]}for(pt in Ee)if(Nn(Ee,pt))return!1;return!0};return!(!R(S(m),S(v))||!R(t.parseStyle(t.getAttrib(m,"style")),t.parseStyle(t.getAttrib(v,"style"))))&&(!Km(m)&&!Km(v))}}},lT=Li.makeMap,JE=function(t){var a=[],m=(t=t||{}).indent,v=lT(t.indent_before||""),S=lT(t.indent_after||""),R=td.getEncodeFunc(t.entity_encoding||"raw",t.entities),ee="html"===t.element_format;return{start:function(Ee,Se,pt){var Gt,jt,on,Rn;if(m&&v[Ee]&&a.length>0&&((Rn=a[a.length-1]).length>0&&"\n"!==Rn&&a.push("\n")),a.push("<",Ee),Se)for(Gt=0,jt=Se.length;Gt<jt;Gt++)on=Se[Gt],a.push(" ",on.name,'="',R(on.value,!0),'"');a[a.length]=!pt||ee?">":" />",pt&&m&&S[Ee]&&a.length>0&&((Rn=a[a.length-1]).length>0&&"\n"!==Rn&&a.push("\n"))},end:function(Ee){var Se;a.push("</",Ee,">"),m&&S[Ee]&&a.length>0&&((Se=a[a.length-1]).length>0&&"\n"!==Se&&a.push("\n"))},text:function(Ee,Se){Ee.length>0&&(a[a.length]=Se?Ee:R(Ee))},cdata:function(Ee){a.push("<![CDATA[",Ee,"]]>")},comment:function(Ee){a.push("\x3c!--",Ee,"--\x3e")},pi:function(Ee,Se){Se?a.push("<?",Ee," ",R(Se),"?>"):a.push("<?",Ee,"?>"),m&&a.push("\n")},doctype:function(Ee){a.push("<!DOCTYPE",Ee,">",m?"\n":"")},reset:function(){a.length=0},getContent:function(){return a.join("").replace(/\n$/,"")}}},cy=function(t,a){void 0===a&&(a=pd());var m=JE(t);(t=t||{}).validate=!("validate"in t)||t.validate;return{serialize:function(S){var R=t.validate,ee={3:function(Se){m.text(Se.value,Se.raw)},8:function(Se){m.comment(Se.value)},7:function(Se){m.pi(Se.name,Se.value)},10:function(Se){m.doctype(Se.value)},4:function(Se){m.cdata(Se.value)},11:function(Se){if(Se=Se.firstChild)do{Ee(Se)}while(Se=Se.next)}};m.reset();var Ee=function(Se){var pt=ee[Se.type];if(pt)pt(Se);else{var Gt=Se.name,jt=Se.shortEnded,on=Se.attributes;if(R&&on&&on.length>1){var Rn=[];Rn.map={};var Yn=a.getElementRule(Se.name);if(Yn){for(var $n=0,qn=Yn.attributesOrder.length;$n<qn;$n++){if((bi=Yn.attributesOrder[$n])in on.map){var pi=on.map[bi];Rn.map[bi]=pi,Rn.push({name:bi,value:pi})}}for($n=0,qn=on.length;$n<qn;$n++){var bi;if(!((bi=on[$n].name)in Rn.map)){pi=on.map[bi];Rn.map[bi]=pi,Rn.push({name:bi,value:pi})}}on=Rn}}if(m.start(Se.name,on,jt),!jt){if(Se=Se.firstChild)do{Ee(Se)}while(Se=Se.next);m.end(Gt)}}};return 1!==S.type||t.inner?ee[11](S):Ee(S),m.getContent()}}},QE=new Set;Mn(["margin","margin-left","margin-right","margin-top","margin-bottom","padding","padding-left","padding-right","padding-top","padding-bottom","border","border-width","border-style","border-color","background","background-attachment","background-clip","background-color","background-image","background-origin","background-position","background-repeat","background-size","float","position","left","right","top","bottom","z-index","display","transform","width","max-width","min-width","height","max-height","min-height","overflow","overflow-x","overflow-y","text-overflow","vertical-align","transition","transition-delay","transition-duration","transition-property","transition-timing-function"],function(a){QE.add(a)});var ub=["font","text-decoration","text-emphasis"],qE=function(t,a){return Zi(t.parseStyle(t.getAttrib(a,"style")))},NS=function(t,a){return Fn(qE(t,a),function(m){return!function(t){return QE.has(t)}(m)})},ZC=function(t,a,m){var v=qE(t,a),S=qE(t,m),R=function(ee){var Ee=t.getStyle(a,ee),Se=t.getStyle(m,ee);return Wn(Ee)&&Wn(Se)&&Ee!==Se};return nn(v,function(ee){var Ee=function(pt){return nn(pt,function(Gt){return Gt===ee})};if(!Ee(S)&&Ee(ub)){var Se=function(t){return mi(t,function(a){return nn(ub,function(m){return Gn(a,m)})})}(S);return nn(Se,R)}return R(ee)})},cT=function(t,a,m){return Ne.from(m.container()).filter(Kr).exists(function(v){var S=t?0:-1;return a(v.data.charAt(m.offset()+S))})},uT=le(cT,!0,Lg),XE=le(cT,!1,Lg),dT=function(t){var a=t.container();return Kr(a)&&(0===a.data.length||du(a.data)&&Fg.isBookmarkNode(a.parentNode))},uy=function(t,a){return function(m){return Ne.from(O_(t?0:-1,m)).filter(a).isSome()}},Xb=function(t){return xl(t)&&"block"===Ba(Dt.fromDom(t),"display")},YD=function(t){return Os(t)&&!function(t){return la(t)&&"all"===t.getAttribute("data-mce-bogus")}(t)},q1=uy(!0,Xb),KA=uy(!1,Xb),vf=uy(!0,Ks),dy=uy(!1,Ks),Ip=uy(!0,lo),GC=uy(!1,lo),V0=uy(!0,YD),nl=uy(!1,YD),yf=function(t){var a=iu(t,"br"),m=mi(function(t){for(var a=[],m=t.dom;m;)a.push(Dt.fromDom(m)),m=m.lastChild;return a}(t).slice(-1),Fd);a.length===m.length&&Mn(m,Dr)},py=function(t){or(t),ac(t,Dt.fromHtml('<br data-mce-bogus="1">'))},pT=function(t){Wl(t).each(function(a){su(a).each(function(m){ll(t)&&Fd(a)&&ll(m)&&Dr(a)})})},ef=function(t,a,m){return Ra(a,t)?function(t){return t.slice(0,-1)}(function(t,a){for(var m=pe(a)?a:Be,v=t.dom,S=[];null!==v.parentNode&&void 0!==v.parentNode;){var R=v.parentNode,ee=Dt.fromDom(R);if(S.push(ee),!0===m(ee))break;v=R}return S}(t,function(v){return m(v)||Ao(v,a)})):[]},my=function(t,a){return ef(t,a,Be)},db=function(t,a){return[t].concat(my(t,a))},X1=function(t,a,m){return El(t,a,m,dT)},HD=function(t,a){return On(db(Dt.fromDom(a.container()),t),ll)},ys=function(t,a,m){return X1(t,a.dom,m).forall(function(v){return HD(a,m).fold(function(){return!1===nh(v,m,a.dom)},function(S){return!1===nh(v,m,a.dom)&&Ra(S,Dt.fromDom(v.container()))})})},Sv=function(t,a,m){return HD(a,m).fold(function(){return X1(t,a.dom,m).forall(function(v){return!1===nh(v,m,a.dom)})},function(v){return X1(t,v.dom,m).isNone()})},bs=le(Sv,!1),tM=le(Sv,!0),WC=le(ys,!1),Z0=le(ys,!0),Dx=function(t){return Pg(t).exists(Fd)},As=function(t,a,m){var v=mi(db(Dt.fromDom(m.container()),a),ll),S=Hn(v).getOr(a);return Ea(t,S.dom,m).filter(Dx)},nM=function(t,a){return Pg(a).exists(Fd)||As(!0,t,a).isSome()},mT=function(t,a){return function(t){return Ne.from(t.getNode(!0)).map(Dt.fromDom)}(a).exists(Fd)||As(!1,t,a).isSome()},Gu=le(As,!1),ka=le(As,!0),iM=function(t){return Tr.isTextPosition(t)&&!t.isAtStart()&&!t.isAtEnd()},fy=function(t,a){var m=mi(db(Dt.fromDom(a.container()),t),ll);return Hn(m).getOr(t)},G0=function(t,a){return iM(a)?XE(a):XE(a)||Ys(fy(t,a).dom,a).exists(XE)},ug=function(t,a){return iM(a)?uT(a):uT(a)||Bs(fy(t,a).dom,a).exists(uT)},Sx=function(t){return Pg(t).bind(function(a){return Ef(a,Xt)}).exists(function(a){return function(t){return st(["pre","pre-wrap"],t)}(Ba(a,"white-space"))})},pb=function(t,a){return function(t,a){return Ys(t.dom,a).isNone()}(t,a)||function(t,a){return Bs(t.dom,a).isNone()}(t,a)||bs(t,a)||tM(t,a)||mT(t,a)||nM(t,a)},rM=function(t,a){return!Sx(a)&&(bs(t,a)||WC(t,a)||mT(t,a)||G0(t,a))},s_=function(t,a){return!Sx(a)&&(tM(t,a)||Z0(t,a)||nM(t,a)||ug(t,a))},Ax=function(t,a){return rM(t,a)||s_(t,function(t){var a=t.container(),m=t.offset();return Kr(a)&&m<a.data.length?Tr(a,m+1):t}(a))},wx=function(t,a){return sg(t.charAt(a))},GD=function(t){var a=t.container();return Kr(a)&&wn(a.data,Pu)},fl=function(t){var a=t.data,m=function(t){var a=t.split("");return Dn(a,function(m,v){return sg(m)&&v>0&&v<a.length-1&&S0(a[v-1])&&S0(a[v+1])?" ":m}).join("")}(a);return m!==a&&(t.data=m,!0)},oM=function(t,a){return Ne.some(a).filter(GD).bind(function(m){var v=m.container(),S=function(t,a){var m=a.data,v=Tr(a,0);return!(!wx(m,0)||Ax(t,v)||(a.data=" "+m.slice(1),0))}(t,v)||fl(v)||function(t,a){var m=a.data,v=Tr(a,m.length-1);return!(!wx(m,m.length-1)||Ax(t,v)||(a.data=m.slice(0,-1)+" ",0))}(t,v);return S?Ne.some(m):Ne.none()})},$C=function(t){var a=Dt.fromDom(t.getBody());t.selection.isCollapsed()&&oM(a,Tr.fromRangeStart(t.selection.getRng())).each(function(m){t.selection.setRng(m.toRange())})},Ix=function(t,a,m){if(0!==m){var v=Dt.fromDom(t),S=am(v,ll).getOr(v),R=t.data.slice(a,a+m),ee=a+m>=t.data.length&&s_(S,Tr(t,t.data.length)),Ee=0===a&&rM(S,Tr(t,0));t.replaceData(a,m,function(t,a,m){return Bn(t,function(S,R){return Lg(R)||sg(R)?S.previousCharIsSpace||""===S.str&&a||S.str.length===t.length-1&&m?{previousCharIsSpace:!1,str:S.str+Pu}:{previousCharIsSpace:!0,str:S.str+" "}:{previousCharIsSpace:!1,str:S.str+R}},{previousCharIsSpace:!1,str:""}).str}(R,Ee,ee))}},W0=function(t,a){var m=t.data.slice(a),v=m.length-Fr(m).length;Ix(t,a,v)},aM=function(t,a){var m=t.data.slice(0,a),v=m.length-en(m).length;Ix(t,a-v,v)},yT=function(t,a,m,v){void 0===v&&(v=!0);var S=en(t.data).length,R=v?t:a,ee=v?a:t;return v?R.appendData(ee.data):R.insertData(0,ee.data),Dr(Dt.fromDom(ee)),m&&W0(R,S),R},US=function(t,a){return function(t,a){var m=t.container(),v=t.offset();return!1===Tr.isTextPosition(t)&&m===a.parentNode&&v>Tr.before(a).offset()}(a,t)?Tr(a.container(),a.offset()-1):a},$0=function(t){return Je(t.previousSibling)?Ne.some(function(t){return Kr(t)?Tr(t,t.data.length):Tr.after(t)}(t.previousSibling)):t.previousSibling?au(t.previousSibling):Ne.none()},ET=function(t){return Je(t.nextSibling)?Ne.some(function(t){return Kr(t)?Tr(t,0):Tr.before(t)}(t.nextSibling)):t.nextSibling?ou(t.nextSibling):Ne.none()},JA=function(t,a){return $0(a).orThunk(function(){return ET(a)}).orThunk(function(){return function(t,a){var m=Tr.before(a.previousSibling?a.previousSibling:a.parentNode);return Ys(t,m).fold(function(){return Bs(t,Tr.after(a))},Ne.some)}(t,a)})},cM=function(t,a){return ET(a).orThunk(function(){return $0(a)}).orThunk(function(){return function(t,a){return Bs(t,Tr.after(a)).fold(function(){return Ys(t,Tr.before(a))},Ne.some)}(t,a)})},WD=function(t,a,m){return function(t,a,m){return t?cM(a,m):JA(a,m)}(t,a,m).map(le(US,m))},eE=function(t,a,m){m.fold(function(){t.focus()},function(v){t.selection.setRng(v.toRange(),a)})},MT=function(t,a){return a&&Nn(t.schema.getBlockElements(),ba(a))},Px=function(t){if(Ns(t)){var a=Dt.fromHtml('<br data-mce-bogus="1">');return or(t),ac(t,a),Ne.some(Tr.before(a.dom))}return Ne.none()},j0=function(t,a,m){var v=su(t).filter(Qi),S=Us(t).filter(Qi);return Dr(t),function(t,a,m,v){return t.isSome()&&a.isSome()&&m.isSome()?Ne.some(v(t.getOrDie(),a.getOrDie(),m.getOrDie())):Ne.none()}(v,S,a,function(R,ee,Ee){var Se=R.dom,pt=ee.dom,Gt=Se.data.length;return yT(Se,pt,m),Ee.container()===pt?Tr(Se,Gt):Ee}).orThunk(function(){return m&&(v.each(function(R){return aM(R.dom,R.dom.length)}),S.each(function(R){return W0(R.dom,0)})),a})},K0=function(t,a,m,v){void 0===v&&(v=!0);var S=WD(a,t.getBody(),m.dom),R=am(m,le(MT,t),function(t){return function(a){return a.dom===t}}(t.getBody())),ee=j0(m,S,function(t,a){return Nn(t.schema.getTextInlineElements(),ba(a))}(t,m));t.dom.isEmpty(t.getBody())?(t.setContent(""),t.selection.setCursorLocation()):R.bind(Px).fold(function(){v&&eE(t,a,ee)},function(Ee){v&&eE(t,a,Ne.some(Ee))})},Lx=function(t){return iu(t,"td,th")},jC=function(t,a){return{start:t,end:a}},TT=Go_generate([{singleCellTable:["rng","cell"]},{fullTable:["table"]},{partialTable:["cells","outsideDetails"]},{multiTable:["startTableCells","endTableCells","betweenRng"]}]),dM=function(t,a){return ws(Dt.fromDom(t),"td,th",a)},$D=function(t){return!Ao(t.start,t.end)},hy=function(t,a){return Vb(t.start,a).bind(function(m){return Vb(t.end,a).bind(function(v){return function(t,a){return t?Ne.some(a):Ne.none()}(Ao(m,v),m)})})},l_=function(t){return function(a){return hy(a,t).map(function(m){return function(t,a,m){return{rng:t,table:a,cells:m}}(a,m,Lx(m))})}},pM=function(t,a,m,v){if(m.collapsed||!t.forall($D))return Ne.none();if(a.isSameTable){var S=t.bind(l_(v));return Ne.some({start:S,end:S})}var R=dM(m.startContainer,v),ee=dM(m.endContainer,v),Ee=R.bind(function(t){return function(a){return Vb(a,t).bind(function(m){return An(Lx(m)).map(function(v){return jC(a,v)})})}}(v)).bind(l_(v)),Se=ee.bind(function(t){return function(a){return Vb(a,t).bind(function(m){return Hn(Lx(m)).map(function(v){return jC(v,a)})})}}(v)).bind(l_(v));return Ne.some({start:Ee,end:Se})},z_=function(t,a){return je(t,function(m){return Ao(m,a)})},mM=function(t){return Gs(z_(t.cells,t.rng.start),z_(t.cells,t.rng.end),function(a,m){return t.cells.slice(a,m+1)})},fM=function(t,a,m){return t.exists(function(v){return function(t,a){return!$D(t)&&hy(t,a).exists(function(m){var v=m.dom.rows;return 1===v.length&&1===v[0].cells.length})}(v,m)&&NC(v.start,a)})},xT=function(t,a){var m=a.startTable,v=a.endTable,S=t.cloneRange();return m.each(function(R){return S.setStartAfter(R.dom)}),v.each(function(R){return S.setEndBefore(R.dom)}),S},DT=function(t,a){var m=function(t){return function(a){return Ao(t,a)}}(t),v=function(t,a){var m=dM(t.startContainer,a),v=dM(t.endContainer,a);return Gs(m,v,jC)}(a,m),S=function(t,a){var m=function(pt){return Vb(Dt.fromDom(pt),a)},v=m(t.startContainer),S=m(t.endContainer),R=v.isSome(),ee=S.isSome(),Ee=Gs(v,S,Ao).getOr(!1);return{startTable:v,endTable:S,isStartInTable:R,isEndInTable:ee,isSameTable:Ee,isMultiTable:!Ee&&R&&ee}}(a,m);return fM(v,a,m)?v.map(function(R){return TT.singleCellTable(a,R.start)}):S.isMultiTable?function(t,a,m,v){return pM(t,a,m,v).bind(function(S){var R=S.start,ee=S.end,Ee=R.bind(mM).getOr([]),Se=ee.bind(mM).getOr([]);if(Ee.length>0&&Se.length>0){var pt=xT(m,a);return Ne.some(TT.multiTable(Ee,Se,pt))}return Ne.none()})}(v,S,a,m):function(t,a,m,v){return pM(t,a,m,v).bind(function(S){var R=S.start,ee=S.end;return R.or(ee)}).bind(function(S){var R=a.isSameTable,ee=mM(S).getOr([]);if(R&&S.cells.length===ee.length)return Ne.some(TT.fullTable(S.table));if(ee.length>0){if(R)return Ne.some(TT.partialTable(ee,Ne.none()));var Ee=xT(m,a);return Ne.some(TT.partialTable(ee,Ne.some(Tn(Tn({},a),{rng:Ee}))))}return Ne.none()})}(v,S,a,m)},J0=function(t){return(function(t){return 8===Jt(t)||"#comment"===ba(t)}(t)?su(t):Wl(t)).bind(J0).orThunk(function(){return Ne.some(t)})},nE=function(t){return Mn(t,function(a){nr(a,"contenteditable"),py(a)})},hM=function(t,a,m,v){var S=m.cloneRange();v?(S.setStart(m.startContainer,m.startOffset),S.setEndAfter(a.dom.lastChild)):(S.setStartBefore(a.dom.firstChild),S.setEnd(m.endContainer,m.endOffset)),iE(t,S,a,!1)},ST=function(t){var a=bv(t),m=Dt.fromDom(t.selection.getNode());yu(m.dom)&&Ns(m)?t.selection.setCursorLocation(m.dom,0):t.selection.collapse(!0),a.length>1&&nn(a,function(v){return Ao(v,m)})&&Xe(m,"data-mce-selected","1")},kx=function(t,a,m){var v=t.selection.getRng(),S=m.bind(function(R){var ee=R.rng,Ee=R.isStartInTable,Se=function(t,a){return Ne.from(t.dom.getParent(a,t.dom.isBlock)).map(Dt.fromDom)}(t,Ee?ee.endContainer:ee.startContainer);ee.deleteContents(),function(t,a,m){m.each(function(v){a?Dr(v):(py(v),t.selection.setCursorLocation(v.dom,0))})}(t,Ee,Se.filter(Ns));var pt=Ee?a[0]:a[a.length-1];return hM(t,pt,v,Ee),Ns(pt)?Ne.none():Ne.some(Ee?a.slice(1):a.slice(0,-1))}).getOr(a);return nE(S),ST(t),!0},AT=function(t,a,m,v){var S=t.selection.getRng(),R=a[0],ee=m[m.length-1];hM(t,R,S,!0),hM(t,ee,S,!1);var Ee=Ns(R)?a:a.slice(1),Se=Ns(ee)?m:m.slice(0,-1);return nE(Ee.concat(Se)),v.deleteContents(),ST(t),!0},iE=function(t,a,m,v){void 0===v&&(v=!0),a.deleteContents();var S=J0(m).getOr(m),R=Dt.fromDom(t.dom.getParent(S.dom,t.dom.isBlock));if(Ns(R)&&(py(R),v&&t.selection.setCursorLocation(R.dom,0)),!Ao(m,R)){var ee=_l(qi(R),m)?[]:function(t){return qi(t).map(Qs).map(function(m){return mi(m,function(v){return!Ao(t,v)})}).getOr([])}(R);Mn(ee.concat(Qs(m)),function(Ee){!Ao(Ee,R)&&!Ra(Ee,R)&&Ns(Ee)&&Dr(Ee)})}return!0},rE=function(t,a){return K0(t,!1,a),!0},Nf=function(t,a,m,v){return wT(a,v).fold(function(){return function(t,a,m){return DT(a,m).map(function(v){return v.fold(le(iE,t),le(rE,t),le(kx,t),le(AT,t))})}(t,a,m)},function(S){return function(t,a){return n0(t,a)}(t,S)}).getOr(!1)},Bf=function(t,a){return On(db(a,t),mc)},wT=function(t,a){return On(db(a,t),function(t){return function(a){return Xt(a)&&ba(a)===t}}("caption"))},n0=function(t,a){return py(a),t.selection.setCursorLocation(a.dom,0),Ne.some(!0)},ZS=function(t,a,m,v,S){return xs(m,t.getBody(),S).bind(function(R){return function(t,a,m,v){return ou(t.dom).bind(function(S){return au(t.dom).map(function(R){return a?m.isEqual(S)&&v.isEqual(R):m.isEqual(R)&&v.isEqual(S)})}).getOr(!0)}(v,m,S,R)?function(t,a){return n0(t,a)}(t,v):function(t,a,m){return wT(t,Dt.fromDom(m.getNode())).map(function(v){return!1===Ao(v,a)})}(a,v,R)}).or(Ne.some(!0))},GS=function(t,a,m,v){var S=Tr.fromRangeStart(t.selection.getRng());return Bf(m,v).bind(function(R){return Ns(R)?n0(t,R):function(t,a,m,v,S){return xs(m,t.getBody(),S).bind(function(R){return Bf(a,Dt.fromDom(R.getNode())).map(function(ee){return!1===Ao(ee,v)})})}(t,m,a,R,S)}).getOr(!1)},oE=function(t,a){return t?Ip(a):GC(a)},KD=function(t,a,m){var v=Dt.fromDom(t.getBody());return wT(v,m).fold(function(){return GS(t,a,v,m)||function(t,a){var m=Tr.fromRangeStart(t.selection.getRng());return oE(a,m)||Ea(a,t.getBody(),m).exists(function(v){return oE(a,v)})}(t,a)},function(S){return function(t,a,m,v){var S=Tr.fromRangeStart(t.selection.getRng());return Ns(v)?n0(t,v):ZS(t,m,a,v,S)}(t,a,v,S).getOr(!1)})},gM=function(t,a){var m=Dt.fromDom(t.selection.getStart(!0)),v=bv(t);return t.selection.isCollapsed()&&0===v.length?KD(t,a,m):function(t,a,m){var v=Dt.fromDom(t.getBody()),S=t.selection.getRng();return 0!==m.length?kx(t,m,Ne.none()):Nf(t,v,S,a)}(t,m,v)},LT=function(t){var a=Tr.fromRangeStart(t),m=Tr.fromRangeEnd(t),v=t.commonAncestorContainer;return Ea(!1,v,m).map(function(S){return!nh(a,m,v)&&nh(a,S,v)?function(t,a,m,v){var S=document.createRange();return S.setStart(t,a),S.setEnd(m,v),S}(a.container(),a.offset(),S.container(),S.offset()):t}).getOr(t)},_M=function(t){return t.collapsed?t:LT(t)},Nx=function(t,a){return t.getBlockElements()[a.name]&&function(t){return t.firstChild&&t.firstChild===t.lastChild}(a)&&function(t){return"br"===t.name||t.value===Pu}(a.firstChild)},JD=function(t,a){var m=a.firstChild,v=a.lastChild;return m&&"meta"===m.name&&(m=m.next),v&&"mce_marker"===v.attr("id")&&(v=v.prev),function(t,a){var m=t.getNonEmptyElements();return a&&(a.isEmpty(m)||Nx(t,a))}(t,v)&&(v=v.prev),!(!m||m!==v)&&("ul"===m.name||"ol"===m.name)},tw=function(t){return t&&t.firstChild&&t.firstChild===t.lastChild&&function(t){return t.data===Pu||_a(t)}(t.firstChild)},Ux=function(t){return t.length>0&&function(t){return!t.firstChild||tw(t)}(t[t.length-1])?t.slice(0,-1):t},QD=function(t,a){var m=t.getParent(a,t.isBlock);return m&&"LI"===m.nodeName?m:null},KS=function(t,a){var m=Tr.after(t),S=zn(a).prev(m);return S?S.toRange():null},JS=function(t,a,m){var v=t.parentNode;return Li.each(a,function(S){v.insertBefore(S,t)}),function(t,a){var m=Tr.before(t),S=zn(a).next(m);return S?S.toRange():null}(t,m)},OI=function(t,a,m,v){var S=function(t,a,m){var v=a.serialize(m);return function(t){var a=t.firstChild,m=t.lastChild;return a&&"META"===a.nodeName&&a.parentNode.removeChild(a),m&&"mce_marker"===m.id&&m.parentNode.removeChild(m),t}(t.createFragment(v))}(a,t,v),R=QD(a,m.startContainer),ee=Ux(function(t){return mi(t.childNodes,function(a){return"LI"===a.nodeName})}(S.firstChild)),pt=a.getRoot(),Gt=function(jt){var on=Tr.fromRangeStart(m),Rn=zn(a.getRoot()),Yn=1===jt?Rn.prev(on):Rn.next(on);return!Yn||QD(a,Yn.getNode())!==R};return Gt(1)?JS(R,ee,pt):Gt(2)?function(t,a,m,v){return v.insertAfter(a.reverse(),t),KS(a[0],m)}(R,ee,pt,a):function(t,a,m,v){var S=function(t,a){var m=a.cloneRange(),v=a.cloneRange();return m.setStartBefore(t),v.setEndAfter(t),[m.cloneContents(),v.cloneContents()]}(t,v),R=t.parentNode;return R.insertBefore(S[0],t),Li.each(a,function(ee){R.insertBefore(ee,t)}),R.insertBefore(S[1],t),R.removeChild(t),KS(a[a.length-1],m)}(R,ee,pt,m)},Hx=yu,vM=function(t){var a=t.dom,m=_M(t.selection.getRng());t.selection.setRng(m);var v=a.getParent(m.startContainer,Hx);!function(t,a,m){return null!==m&&m===t.getParent(a.endContainer,Hx)&&NC(Dt.fromDom(m),a)}(a,m,v)?t.getDoc().execCommand("Delete",!1,null):iE(t,m,Dt.fromDom(v))},jx=function(t,a,m){var v,S,R,ee=t.selection,Ee=t.dom;/^ | $/.test(a)&&(a=function(t,a,m){var v=Dt.fromDom(t.getRoot());return m=rM(v,Tr.fromRangeStart(a))?m.replace(/^ /,"&nbsp;"):m.replace(/^&nbsp;/," "),s_(v,Tr.fromRangeEnd(a))?m.replace(/(&nbsp;| )(<br( \/)>)?$/,"&nbsp;"):m.replace(/&nbsp;(<br( \/)?>)?$/," ")}(Ee,ee.getRng(),a));var Se=t.parser,pt=m.merge,Gt=cy({validate:CE(t)},t.schema),jt='<span id="mce_marker" data-mce-type="bookmark">&#xFEFF;</span>',on=t.fire("BeforeSetContent",{content:a,format:"html",selection:!0,paste:m.paste});if(on.isDefaultPrevented())t.fire("SetContent",{content:on.content,format:"html",selection:!0,paste:m.paste});else{-1===(a=on.content).indexOf("{$caret}")&&(a+="{$caret}"),a=a.replace(/\{\$caret\}/,jt);var Rn=(S=ee.getRng()).startContainer||(S.parentElement?S.parentElement():null),Yn=t.getBody();Rn===Yn&&ee.isCollapsed()&&Ee.isBlock(Yn.firstChild)&&function(t,a){return a&&!t.schema.getShortEndedElements()[a.nodeName]}(t,Yn.firstChild)&&Ee.isEmpty(Yn.firstChild)&&((S=Ee.createRng()).setStart(Yn.firstChild,0),S.setEnd(Yn.firstChild,0),ee.setRng(S)),ee.isCollapsed()||vM(t);var $n={context:(v=ee.getNode()).nodeName.toLowerCase(),data:m.data,insert:!0},qn=Se.parse(a,$n);if(!0===m.paste&&JD(t.schema,qn)&&function(t,a){return!!QD(t,a)}(Ee,v))return S=OI(Gt,Ee,ee.getRng(),qn),ee.setRng(S),void t.fire("SetContent",on);if(function(t){for(var a=t;a=a.walk();)1===a.type&&a.attr("data-mce-fragment","1")}(qn),"mce_marker"===(R=qn.lastChild).attr("id")){var bi=R;for(R=R.prev;R;R=R.walk(!0))if(3===R.type||!Ee.isBlock(R.name)){t.schema.isValidChild(R.parent.name,"span")&&R.parent.insert(bi,R,"br"===R.name);break}}if(t._selectionOverrides.showBlockCaretContainer(v),$n.invalid){t.selection.setContent(jt),v=ee.getNode();var pi=t.getBody();for(9===v.nodeType?v=R=pi:R=v;R!==pi;)v=R,R=R.parentNode;a=v===pi?pi.innerHTML:Ee.getOuterHTML(v),a=Gt.serialize(Se.parse(a.replace(/<span (id="mce_marker"|id=mce_marker).+?<\/span>/i,function(){return Gt.serialize(qn)}))),v===pi?Ee.setHTML(pi,a):Ee.setOuterHTML(v,a)}else(function(t,a,m){if("all"===m.getAttribute("data-mce-bogus"))m.parentNode.insertBefore(t.dom.createFragment(a),m);else{var v=m.firstChild,S=m.lastChild;!v||v===S&&"BR"===v.nodeName?t.dom.setHTML(m,a):t.selection.setContent(a)}})(t,a=Gt.serialize(qn),v);(function(t,a){var m=t.schema.getTextInlineElements(),v=t.dom;if(a){var S=t.getBody(),R=xx(v);Li.each(v.select("*[data-mce-fragment]"),function(ee){if(ne(m[ee.nodeName.toLowerCase()])&&NS(v,ee))for(var Se=ee.parentNode;ne(Se)&&Se!==S&&!ZC(v,ee,Se);Se=Se.parentNode)if(R.compare(Se,ee)){v.remove(ee,!0);break}})}})(t,pt),function(t,a){var m,v=t.dom,S=t.selection;if(a){S.scrollIntoView(a);var R=O0(t.getBody(),a);if("false"===v.getContentEditable(R))return v.remove(a),void S.select(R);var ee=v.createRng(),Ee=a.previousSibling;if(Kr(Ee)){if(ee.setStart(Ee,Ee.nodeValue.length),!$r.ie){var Se=a.nextSibling;Kr(Se)&&(Ee.appendData(Se.data),Se.parentNode.removeChild(Se))}}else ee.setStartBefore(a),ee.setEndBefore(a);var Gt=v.getParent(a,v.isBlock);v.remove(a),Gt&&v.isEmpty(Gt)&&(t.$(Gt).empty(),ee.setStart(Gt,0),ee.setEnd(Gt,0),Hx(Gt)||function(t){return!!t.getAttribute("data-mce-fragment")}(Gt)||!(m=function(jt){var on=Tr.fromRangeStart(jt);if(on=zn(t.getBody()).next(on))return on.toRange()}(ee))?v.add(Gt,v.create("br",{"data-mce-bogus":"1"})):(ee=m,v.remove(Gt))),S.setRng(ee)}}(t,Ee.get("mce_marker")),function(t){Li.each(t.getElementsByTagName("*"),function(a){a.removeAttribute("data-mce-fragment")})}(t.getBody()),function(t,a){Ne.from(t.getParent(a,"td,th")).map(Dt.fromDom).each(pT)}(Ee,ee.getStart()),t.fire("SetContent",on),t.addVisual()}},eC=function(t,a){a(t),t.firstChild&&eC(t.firstChild,a),t.next&&eC(t.next,a)},iw=function(t,a,m){var v=function(t,a,m){var v={},S={},R=[];for(var ee in m.firstChild&&eC(m.firstChild,function(Se){Mn(t,function(pt){pt.name===Se.name&&(v[pt.name]?v[pt.name].nodes.push(Se):v[pt.name]={filter:pt,nodes:[Se]})}),Mn(a,function(pt){"string"==typeof Se.attr(pt.name)&&(S[pt.name]?S[pt.name].nodes.push(Se):S[pt.name]={filter:pt,nodes:[Se]})})}),v)Nn(v,ee)&&R.push(v[ee]);for(var Ee in S)Nn(S,Ee)&&R.push(S[Ee]);return R}(t,a,m);Mn(v,function(S){Mn(S.filter.callbacks,function(R){R(S.nodes,S.filter.name,{})})})},aE=function(t){return t instanceof dh},hb=function(t,a,m){t.dom.setHTML(t.getBody(),a),!0!==m&&function(t){ab(t)&&ou(t.getBody()).each(function(a){var m=a.getNode(),v=lo(m)?ou(m).getOr(a):a;t.selection.setRng(v.toRange())})}(t)},tS=function(t,a,m){var v=function(t,a){return Tn(Tn({format:"html"},t),{set:!0,content:aE(a)?"":a})}(m,a),S=m.no_events?v:t.fire("BeforeSetContent",v);return aE(a)||(a=S.content),Ne.from(t.getBody()).fold(oe(a),function(R){return aE(a)?function(t,a,m,v){iw(t.parser.getNodeFilters(),t.parser.getAttributeFilters(),m);var S=cy({validate:t.validate},t.schema).serialize(m);return v.content=Yp(Dt.fromDom(a))?S:Li.trim(S),hb(t,v.content,v.no_selection),v.no_events||t.fire("SetContent",v),m}(t,R,a,S):function(t,a,m,v){if(0===m.length||/^\s+$/.test(m)){var S='<br data-mce-bogus="1">';"TABLE"===a.nodeName?m="<tr><td>"+S+"</td></tr>":/^(UL|OL)$/.test(a.nodeName)&&(m="<li>"+S+"</li>");var R=hm(t);R&&t.schema.isValidChild(a.nodeName.toLowerCase(),R.toLowerCase())?(m=S,m=t.dom.createHTML(R,e_(t),m)):m||(m='<br data-mce-bogus="1">'),hb(t,m,v.no_selection),t.fire("SetContent",v)}else"raw"!==v.format&&(m=cy({validate:t.validate},t.schema).serialize(t.parser.parse(m,{isRootContent:!0,insert:!0}))),v.content=Yp(Dt.fromDom(a))?m:Li.trim(m),hb(t,v.content,v.no_selection),v.no_events||t.fire("SetContent",v);return v.content}(t,R,a,S)})},nS=function(t,a){return function(t,a){var m=t.dom;return m.parentNode?yc(Dt.fromDom(m.parentNode),function(v){return!Ao(t,v)&&a(v)}):Ne.none()}(t,a).isSome()},Kx=function(t){return pe(t)?t:Be},Jx=function(t,a,m){var v=a(t),S=Kx(m);return v.orThunk(function(){return S(t)?Ne.none():function(t,a,m){for(var v=t.dom,S=Kx(m);v.parentNode;){v=v.parentNode;var R=Dt.fromDom(v),ee=a(R);if(ee.isSome())return ee;if(S(R))break}return Ne.none()}(t,a,S)})},RT=qv,_y=function(t,a,m){var v=t.formatter.get(m);if(v)for(var S=0;S<v.length;S++){var R=v[S];if(Oh(R)&&!1===R.inherit&&t.dom.is(a,R.selector))return!0}return!1},FT=function(t,a,m,v,S){var R=t.dom.getRoot();return a!==R&&(a=t.dom.getParent(a,function(ee){return!!_y(t,ee,m)||(ee.parentNode===R||!!Lm(t,ee,m,v,!0))}),!!Lm(t,a,m,v,S))},NT=function(t,a,m){return!(!RT(a,m.inline)&&!RT(a,m.block))||(m.selector?1===a.nodeType&&t.is(a,m.selector):void 0)},H_=function(t,a,m,v,S,R){var ee=m[v];if(pe(m.onmatch))return m.onmatch(a,m,v);if(ee)if(ye(ee.length)){for(var Ee in ee)if(Nn(ee,Ee)){var Se="attributes"===v?t.getAttrib(a,Ee):vv(t,a,Ee),pt=ah(ee[Ee],R),Gt=ge(Se)||at(Se);if(Gt&&ge(pt))continue;if(S&&Gt&&!m.exact||(!S||m.exact)&&!RT(Se,Yb(t,pt,Ee)))return!1}}else for(var jt=0;jt<ee.length;jt++)if("attributes"===v?t.getAttrib(a,ee[jt]):vv(t,a,ee[jt]))return!0;return!0},Lm=function(t,a,m,v,S){var R=t.formatter.get(m),ee=t.dom;if(R&&a)for(var Ee=0;Ee<R.length;Ee++){var Se=R[Ee];if(NT(t.dom,a,Se)&&H_(ee,a,Se,"attributes",S,v)&&H_(ee,a,Se,"styles",S,v)){var pt=Se.classes;if(pt)for(var Gt=0;Gt<pt.length;Gt++)if(!t.dom.hasClass(a,ah(pt[Gt],v)))return;return Se}}},tC=function(t,a,m,v,S){if(v)return FT(t,v,a,m,S);if(v=t.selection.getNode(),FT(t,v,a,m,S))return!0;var R=t.selection.getStart();return!(R===v||!FT(t,R,a,m,S))},iC=function(t,a){var m=function(S){return Ao(S,Dt.fromDom(t.getBody()))};return Ne.from(t.selection.getStart(!0)).bind(function(S){return Jx(Dt.fromDom(S),function(R){return In(a,function(ee){return function(S,R){return Lm(t,S.dom,R)?Ne.some(R):Ne.none()}(R,ee)})},m)}).getOrNull()},V_=function(t,a,m){return Bn(m,function(v,S){var R=function(t,a){return nn(t.formatter.get(a),function(v){var S=function(R){return R.length>1&&"%"===R.charAt(0)};return nn(["styles","attributes"],function(R){return Ni(v,R).exists(function(ee){var Ee=ae(ee)?ee:oi(ee);return nn(Ee,S)})})})}(t,S);return t.formatter.matchNode(a,S,{},R)?v.concat([S]):v},[])},Av=Ti,rC="_mce_caret",oC=function(t){return function(t){for(var a=[];t;){if(3===t.nodeType&&t.nodeValue!==Av||t.childNodes.length>1)return[];1===t.nodeType&&a.push(t),t=t.firstChild}return a}(t).length>0},QC=function(t){if(t){var a=new Sr(t,t);for(t=a.current();t;t=a.next())if(Kr(t))return t}return null},vy=function(t){var a=Dt.fromTag("span");return zt(a,{id:rC,"data-mce-bogus":"1","data-mce-type":"format-caret"}),t&&ac(a,Dt.fromText(Av)),a},aC=function(t,a,m){void 0===m&&(m=!0);var v=t.dom,S=t.selection;if(oC(a))K0(t,!1,Dt.fromDom(a),m);else{var R=S.getRng(),ee=v.getParent(a,v.isBlock),Ee=R.startContainer,Se=R.startOffset,pt=R.endContainer,Gt=R.endOffset,jt=function(t){var a=QC(t);return a&&a.nodeValue.charAt(0)===Av&&a.deleteData(0,1),a}(a);v.remove(a,!0),Ee===jt&&Se>0&&R.setStart(jt,Se-1),pt===jt&&Gt>0&&R.setEnd(jt,Gt-1),ee&&v.isEmpty(ee)&&py(Dt.fromDom(ee)),S.setRng(R)}},r0=function(t,a,m){void 0===m&&(m=!0);var v=t.dom,S=t.selection;if(a)aC(t,a,m);else if(!(a=vm(t.getBody(),S.getStart())))for(;a=v.get(rC);)aC(t,a,!1)},uE=function(t,a){return t.appendChild(a),a},h=function(t,a){var m=wi(t,function(v,S){return uE(v,S.cloneNode(!1))},a);return uE(m,m.ownerDocument.createTextNode(Av))},z=function(t,a,m,v){var ee,Ee,Se,S=t.dom,R=t.selection,pt=[],Gt=R.getRng(),jt=Gt.startContainer,on=Gt.startOffset;for(Ee=jt,3===jt.nodeType&&(on!==jt.nodeValue.length&&(ee=!0),Ee=Ee.parentNode);Ee;){if(Lm(t,Ee,a,m,v)){Se=Ee;break}Ee.nextSibling&&(ee=!0),pt.push(Ee),Ee=Ee.parentNode}if(Se)if(ee){var Rn=R.getBookmark();Gt.collapse(!0);var Yn=Ky(t,Gt,t.formatter.get(a),!0);Yn=iy(Yn),t.formatter.remove(a,m,Yn,v),R.moveToBookmark(Rn)}else{var $n=vm(t.getBody(),Se),qn=vy(!1).dom;!function(t,a,m){var v=t.dom,S=v.getParent(m,le(pc,t));S&&v.isEmpty(S)?m.parentNode.replaceChild(a,m):(yf(Dt.fromDom(m)),v.isEmpty(m)?m.parentNode.replaceChild(a,m):v.insertAfter(a,m))}(t,qn,null!==$n?$n:Se);var bi=function(t,a,m,v,S,R){var ee=t.formatter,Ee=t.dom,Se=mi(Zi(ee.get()),function(on){return on!==v&&!wn(on,"removeformat")}),pt=V_(t,m,Se);if(mi(pt,function(on){return!RC(t,on,v)}).length>0){var jt=m.cloneNode(!1);return Ee.add(a,jt),ee.remove(v,S,jt,R),Ee.remove(jt),Ne.some(jt)}return Ne.none()}(t,qn,Se,a,m,v),pi=h(pt.concat(bi.toArray()),qn);aC(t,$n,!1),R.setCursorLocation(pi,1),S.isEmpty(Se)&&S.remove(Se)}},fe=function(t){t.on("mouseup keydown",function(a){!function(t,a){var m=t.selection,v=t.getBody();r0(t,null,!1),(8===a||46===a)&&m.isCollapsed()&&m.getStart().innerHTML===Av&&r0(t,vm(v,m.getStart())),(37===a||39===a)&&r0(t,vm(v,m.getStart()))}(t,a.keyCode)})},lt=function(t,a){var m=t.schema.getTextInlineElements();return Nn(m,ba(a))&&!xu(a.dom)&&!$i(a.dom)},b={},r=Le,u=ai;!function(t,a){b[t]||(b[t]=[]),b[t].push(a)}("pre",function(t){var m,a=t.selection.getRng(),R=ht(["pre"]);a.collapsed||(m=t.selection.getSelectedBlocks(),u(r(r(m,R),function(ee){return R(ee.previousSibling)&&-1!==ce(m,ee.previousSibling)}),function(ee){!function(ee,Ee){Ya(Ee).remove(),Ya(ee).append("<br><br>").append(Ee.childNodes)}(ee.previousSibling,ee)}))});var G=Li.each,Te=function(t){return la(t)&&!Km(t)&&!xu(t)&&!$i(t)},Ze=function(t,a){for(var m=t;m;m=m[a]){if(Kr(m)&&Wn(m.data))return t;if(la(m)&&!Km(m))return m}return t},gt=function(t,a,m){var v=xx(t);if(a&&m&&(a=Ze(a,"previousSibling"),m=Ze(m,"nextSibling"),v.compare(a,m))){for(var S=a.nextSibling;S&&S!==m;){var R=S;S=S.nextSibling,a.appendChild(R)}return t.remove(m),Li.each(Li.grep(m.childNodes),function(ee){a.appendChild(ee)}),a}return m},Ot=function(t,a,m,v){if(v&&!1!==a.merge_siblings){var S=gt(t,_f(v),v);gt(t,S,_f(S,!0))}},ci=function(t,a,m){G(t.childNodes,function(v){Te(v)&&(a(v)&&m(v),v.hasChildNodes()&&ci(v,a,m))})},xr=function(t,a){return function(m){return!(!m||!vv(t,m,a))}},Hr=function(t,a,m){return function(v){t.setStyle(v,a,m),""===v.getAttribute("style")&&v.removeAttribute("style"),function(t,a){"SPAN"===a.nodeName&&0===t.getAttribs(a).length&&t.remove(a,!0)}(t,v)}},Do=Go_generate([{keep:[]},{rename:["name"]},{removed:[]}]),Zo=/^(src|href|style)$/,Ko=Li.each,ma=qv,Cc=function(t,a,m){return t.isChildOf(a,m)&&a!==m&&!t.isBlock(m)},km=function(t,a,m){var v=a[m?"startContainer":"endContainer"],S=a[m?"startOffset":"endOffset"];if(la(v)){var R=v.childNodes.length-1;!m&&S&&S--,v=v.childNodes[S>R?R:S]}return Kr(v)&&m&&S>=v.nodeValue.length&&(v=new Sr(v,t.getBody()).next()||v),Kr(v)&&!m&&0===S&&(v=new Sr(v,t.getBody()).prev()||v),v},Rm=function(t,a){var m=a?"firstChild":"lastChild";if(function(t){return/^(TR|TH|TD)$/.test(t.nodeName)}(t)&&t[m]){var v=t[m];return"TR"===t.nodeName&&v[m]||v}return t},Pp=function(t,a,m,v){var S=t.create(m,v);return a.parentNode.insertBefore(S,a),S.appendChild(a),S},Uf=function(t,a,m,v,S){var R=Dt.fromDom(a),ee=Dt.fromDom(t.create(v,S)),Ee=m?Tc(R):Ka(R);return Oc(ee,Ee),m?(_c(R,ee),lu(ee,R)):(Yc(R,ee),ac(ee,R)),ee.dom},ad=function(t,a,m,v){var S=_f(a,m,v);return ge(S)||"BR"===S.nodeName||t.isBlock(S)},ph=function(t,a,m){var S,v=a.parentNode,R=t.dom,ee=hm(t);F_(m)&&(ee?v===R.getRoot()&&(!m.list_block||!ma(a,m.list_block))&&Mn(vn(a.childNodes),function(Ee){ym(t,ee,Ee.nodeName.toLowerCase())?S?S.appendChild(Ee):(S=Pp(R,Ee,ee),R.setAttribs(S,t.settings.forced_root_block_attrs)):S=null}):R.isBlock(a)&&!R.isBlock(v)&&(!ad(R,a,!1)&&!ad(R,a.firstChild,!0,!0)&&a.insertBefore(R.create("br"),a.firstChild),!ad(R,a,!0)&&!ad(R,a.lastChild,!1,!0)&&a.appendChild(R.create("br")))),(!function(t){return Oh(t)&&Qm(t)&&_l(Ni(t,"mixed"),!0)}(m)||ma(m.inline,a))&&R.remove(a,!0)},u_=function(t,a,m,v,S){var R,ee=t.dom;if(!function(t,a,m){return!!(Qm(m)&&ma(a,m.inline)||F_(m)&&ma(a,m.block))||(Oh(m)?la(a)&&t.is(a,m.selector):void 0)}(ee,v,a)&&!function(t,a){return a.links&&"A"===t.nodeName}(v,a))return Do.keep();var Ee=v;if(Qm(a)&&"all"===a.remove&&ae(a.preserve_attributes)){var Se=mi(ee.getAttribs(Ee),function(on){return st(a.preserve_attributes,on.name.toLowerCase())});if(ee.removeAllAttribs(Ee),Mn(Se,function(on){return ee.setAttrib(Ee,on.name,on.value)}),Se.length>0)return Do.rename("span")}if("all"!==a.remove){Ko(a.styles,function(on,Rn){on=Yb(ee,ah(on,m),Rn+""),Pe(Rn)&&(Rn=on,S=null),(a.remove_similar||!S||ma(vv(ee,S,Rn),on))&&ee.setStyle(Ee,Rn,""),R=!0}),R&&""===ee.getAttrib(Ee,"style")&&(Ee.removeAttribute("style"),Ee.removeAttribute("data-mce-style")),Ko(a.attributes,function(on,Rn){var Yn;if(on=ah(on,m),Pe(Rn)&&(Rn=on,S=null),a.remove_similar||!S||ma(ee.getAttrib(S,Rn),on)){if("class"===Rn&&((on=ee.getAttrib(Ee,Rn))&&(Yn="",Mn(on.split(/\s+/),function($n){/mce\-\w+/.test($n)&&(Yn+=(Yn?" ":"")+$n)}),Yn)))return void ee.setAttrib(Ee,Rn,Yn);if(Zo.test(Rn)&&Ee.removeAttribute("data-mce-"+Rn),"style"===Rn&&ht(["li"])(Ee)&&"none"===ee.getStyle(Ee,"list-style-type"))return Ee.removeAttribute(Rn),void ee.setStyle(Ee,"list-style-type","none");"class"===Rn&&Ee.removeAttribute("className"),Ee.removeAttribute(Rn)}}),Ko(a.classes,function(on){on=ah(on,m),(!S||ee.hasClass(S,on))&&ee.removeClass(Ee,on)});for(var pt=ee.getAttribs(Ee),Gt=0;Gt<pt.length;Gt++){var jt=pt[Gt].nodeName;if(0!==jt.indexOf("_")&&0!==jt.indexOf("data-"))return Do.keep()}}return"none"!==a.remove?(ph(t,Ee,a),Do.removed()):Do.keep()},d_=function(t,a,m,v,S){return u_(t,a,m,v,S).fold(Be,function(R){return t.dom.rename(v,R),!0},nt)},Xa=function(t,a,m,v){return u_(t,a,m,v,v).fold(oe(v),function(S){return t.dom.createFragment().appendChild(v),t.dom.rename(v,S)},oe(null))},Il=function(t,a,m,v,S){var R=t.formatter.get(a),ee=R[0],Ee=!0,Se=t.dom,pt=t.selection,Gt=function(pi){var tr=function(t,a,m,v,S){var R;return Mn(jy(t.dom,a.parentNode).reverse(),function(ee){if(!R&&"_start"!==ee.id&&"_end"!==ee.id){var Ee=Lm(t,ee,m,v,S);Ee&&!1!==Ee.split&&(R=ee)}}),R}(t,pi,a,m,S);return function(t,a,m,v,S,R,ee,Ee){var Se,pt,Gt,jt=t.dom;if(m){for(var on=m.parentNode,Rn=v.parentNode;Rn&&Rn!==on;Rn=Rn.parentNode){Se=jt.clone(Rn,!1);for(var Yn=0;Yn<a.length&&null!==(Se=Xa(t,a[Yn],Ee,Se));Yn++);Se&&(pt&&Se.appendChild(pt),Gt||(Gt=Se),pt=Se)}R&&(!ee.mixed||!jt.isBlock(m))&&(v=jt.split(m,v)),pt&&(S.parentNode.insertBefore(pt,S),Gt.appendChild(S),Qm(ee)&&Ot(jt,ee,0,pt))}return v}(t,R,tr,pi,pi,!0,ee,m)},on=function(pi){return nn(R,function(tr){return d_(t,tr,m,pi,pi)})},Rn=function(pi){var tr=!0,Wi=!1;la(pi)&&Se.getContentEditable(pi)&&(tr=Ee,Ee="true"===Se.getContentEditable(pi),Wi=!0);var Oi=vn(pi.childNodes);if(Ee&&!Wi){var Ur=on(pi)||nn(R,function(Wr){return NT(Se,pi,Wr)}),no=pi.parentNode;!Ur&&ne(no)&&yv(ee)&&on(no)}if(ee.deep&&Oi.length){for(var es=0;es<Oi.length;es++)Rn(Oi[es]);Wi&&(Ee=tr)}Mn(["underline","line-through","overline"],function(Wr){la(pi)&&t.dom.getStyle(pi,"text-decoration")===Wr&&pi.parentNode&&nx(Se,pi.parentNode)===Wr&&d_(t,{deep:!1,exact:!0,inline:"span",styles:{textDecoration:Wr}},null,pi)})},Yn=function(pi){var tr=Se.get(pi?"_start":"_end"),Wi=tr[pi?"firstChild":"lastChild"];return function(pi){return Km(pi)&&la(pi)&&("_start"===pi.id||"_end"===pi.id)}(Wi)&&(Wi=Wi[pi?"firstChild":"lastChild"]),Kr(Wi)&&0===Wi.data.length&&(Wi=pi?tr.previousSibling||tr.nextSibling:tr.nextSibling||tr.previousSibling),Se.remove(tr,!0),Wi},$n=function(pi){var tr,Wi,Oi=Ky(t,pi,R,pi.collapsed);if(ee.split){if(Oi=iy(Oi),(tr=km(t,Oi,!0))!==(Wi=km(t,Oi))){if(tr=Rm(tr,!0),Wi=Rm(Wi,!1),Cc(Se,tr,Wi)){var cr=Ne.from(tr.firstChild).getOr(tr);return Gt(Uf(Se,cr,!0,"span",{id:"_start","data-mce-type":"bookmark"})),void Yn(!0)}if(Cc(Se,Wi,tr)){cr=Ne.from(Wi.lastChild).getOr(Wi);return Gt(Uf(Se,cr,!1,"span",{id:"_end","data-mce-type":"bookmark"})),void Yn(!1)}tr=Pp(Se,tr,"span",{id:"_start","data-mce-type":"bookmark"}),Wi=Pp(Se,Wi,"span",{id:"_end","data-mce-type":"bookmark"});var Ur=Se.createRng();Ur.setStartAfter(tr),Ur.setEndBefore(Wi),x1(Se,Ur,function(no){Mn(no,function(es){!Km(es)&&!Km(es.parentNode)&&Gt(es)})}),Gt(tr),Gt(Wi),tr=Yn(!0),Wi=Yn()}else tr=Wi=Gt(tr);Oi.startContainer=tr.parentNode?tr.parentNode:tr,Oi.startOffset=Se.nodeIndex(tr),Oi.endContainer=Wi.parentNode?Wi.parentNode:Wi,Oi.endOffset=Se.nodeIndex(Wi)+1}x1(Se,Oi,function(no){Mn(no,Rn)})};if(v){if(R_(v)){var qn=Se.createRng();qn.setStartBefore(v),qn.setEndAfter(v),$n(qn)}else $n(v);tb(t,a,v,m)}else if("false"!==Se.getContentEditable(pt.getNode()))pt.isCollapsed()&&Qm(ee)&&!bv(t).length?z(t,a,m,S):(A1(pt,!0,function(){Qy(t,$n)}),Qm(ee)&&tC(t,a,m,pt.getStart())&&rh(Se,pt,pt.getRng()),t.nodeChanged()),tb(t,a,v,m);else{v=pt.getNode();for(var bi=0;bi<R.length&&(!R[bi].ceFalseOverride||!d_(t,R[bi],m,v,v));bi++);tb(t,a,v,m)}},Wu=Li.each,gb=function(t,a,m,v){Wu(a,function(S){Qm(S)&&Wu(t.dom.select(S.inline,v),function(R){Te(R)&&d_(t,S,m,R,S.exact?R:null)}),function(t,a,m){if(a.clear_child_styles){var v=a.links?"*:not(a)":"*";G(t.select(v,m),function(S){Te(S)&&G(a.styles,function(R,ee){t.setStyle(S,ee,"")})})}}(t.dom,S,v)})},Qx=Li.each,LI=function(t){return la(t)&&!Km(t)&&!xu(t)&&!$i(t)},qC=function(t,a,m,v){var S=t.formatter.get(a),R=S[0],ee=!v&&t.selection.isCollapsed(),Ee=t.dom,Se=t.selection,pt=function(tr,Wi){if(void 0===Wi&&(Wi=R),pe(Wi.onformat)&&Wi.onformat(tr,Wi,m,v),Qx(Wi.styles,function(cr,Ur){Ee.setStyle(tr,Ur,ah(cr,m))}),Wi.styles){var Oi=Ee.getAttrib(tr,"style");Oi&&Ee.setAttrib(tr,"data-mce-style",Oi)}Qx(Wi.attributes,function(cr,Ur){Ee.setAttrib(tr,Ur,ah(cr,m))}),Qx(Wi.classes,function(cr){cr=ah(cr,m),Ee.hasClass(tr,cr)||Ee.addClass(tr,cr)})},Gt=function(tr,Wi){var Oi=!1;return Qx(tr,function(cr){return!!Oh(cr)&&(ne(cr.collapsed)&&cr.collapsed!==ee||!Ee.is(Wi,cr.selector)||xu(Wi)?void 0:(pt(Wi,cr),Oi=!0,!1))}),Oi},on=function(tr,Wi,Oi){var cr=[],Ur=!0,no=R.inline||R.block,es=function(tr){if(ue(tr)){var Wi=Ee.create(tr);return pt(Wi),Wi}return null}(no);x1(tr,Wi,function(Xo){var Wr,qa=function(po){var Wo=!1,vo=Ur,So=po.nodeName.toLowerCase(),ca=po.parentNode,Jr=ca.nodeName.toLowerCase();if(la(po)&&tr.getContentEditable(po)&&(vo=Ur,Ur="true"===tr.getContentEditable(po),Wo=!0),_a(po)&&!function(t,a,m,v){if(function(t){return t.getParam("format_empty_lines",!1,"boolean")}(t)&&Qm(a)){var S=um(t.schema),R=nS(Dt.fromDom(m),function(ee){return xu(ee.dom)});return pr(S,v)&&Ns(Dt.fromDom(m.parentNode),!1)&&!R}return!1}(t,R,po,Jr))return Wr=null,void(F_(R)&&tr.remove(po));if(F_(R)&&R.wrapper&&Lm(t,po,a,m))Wr=null;else{if(Ur&&!Wo&&F_(R)&&!R.wrapper&&pc(t,So)&&ym(t,Jr,no)){var na=tr.rename(po,no);return pt(na),cr.push(na),void(Wr=null)}if(Oh(R)){var Ul=Gt(S,po);if(!Ul&&ne(ca)&&yv(R)&&(Ul=Gt(S,ca)),!Qm(R)||Ul)return void(Wr=null)}!Ur||Wo||!ym(t,no,So)||!ym(t,Jr,no)||!Oi&&Kr(po)&&du(po.data)||xu(po)||Qm(R)&&tr.isBlock(po)?(Wr=null,Mn(vn(po.childNodes),qa),Wo&&(Ur=vo),Wr=null):(Wr||(Wr=tr.clone(es,!1),po.parentNode.insertBefore(Wr,po),cr.push(Wr)),Wr.appendChild(po))}};Mn(Xo,qa)}),!0===R.links&&Mn(cr,function(Xo){var Wr=function(qa){"A"===qa.nodeName&&pt(qa,R),Mn(vn(qa.childNodes),Wr)};Wr(Xo)}),Mn(cr,function(Xo){var vo,po=(vo=0,Mn(Xo.childNodes,function(So){!function(t){return ne(t)&&Kr(t)&&0===t.length}(So)&&!Km(So)&&vo++}),vo);!(cr.length>1)&&tr.isBlock(Xo)||0!==po?(Qm(R)||F_(R)&&R.wrapper)&&(!R.exact&&1===po&&(Xo=function(Wo){return On(Wo.childNodes,LI).filter(function(So){return NT(tr,So,R)}).map(function(So){var ca=tr.clone(So,!1);return pt(ca),tr.replace(ca,Wo,!0),tr.remove(So,!0),ca}).getOr(Wo)}(Xo)),gb(t,S,m,Xo),function(t,a,m,v,S){Lm(t,S.parentNode,m,v)&&d_(t,a,v,S)||a.merge_with_parents&&t.dom.getParent(S.parentNode,function(R){if(Lm(t,R,m,v))return d_(t,a,v,S),!0})}(t,R,a,m,Xo),function(t,a,m,v){a.styles&&a.styles.backgroundColor&&ci(v,xr(t,"fontSize"),Hr(t,"backgroundColor",ah(a.styles.backgroundColor,m)))}(tr,R,m,Xo),function(t,a,m,v){var S=function(R){if(1===R.nodeType&&R.parentNode&&1===R.parentNode.nodeType){var ee=nx(t,R.parentNode);t.getStyle(R,"color")&&ee?t.setStyle(R,"text-decoration",ee):t.getStyle(R,"text-decoration")===ee&&t.setStyle(R,"text-decoration",null)}};a.styles&&(a.styles.color||a.styles.textDecoration)&&(Li.walk(v,S,"childNodes"),S(v))}(tr,R,0,Xo),function(t,a,m,v){Qm(a)&&("sub"===a.inline||"sup"===a.inline)&&(ci(v,xr(t,"fontSize"),Hr(t,"fontSize","")),t.remove(t.select("sup"===a.inline?"sub":"sup",v),!0))}(tr,R,0,Xo),Ot(tr,R,0,Xo)):tr.remove(Xo,!0)})};if("false"!==Ee.getContentEditable(Se.getNode())){if(R){if(v)if(R_(v)){if(!Gt(S,v)){var qn=Ee.createRng();qn.setStartBefore(v),qn.setEndAfter(v),on(Ee,Ky(t,qn,S),!0)}}else on(Ee,v,!0);else if(ee&&Qm(R)&&!bv(t).length)!function(t,a,m){var v,S,R=t.selection,ee=R.getRng(),Ee=ee.startOffset,pt=ee.startContainer.nodeValue;(v=vm(t.getBody(),R.getStart()))&&(S=QC(v));var Gt=/[^\s\u00a0\u00ad\u200b\ufeff]/;if(pt&&Ee>0&&Ee<pt.length&&Gt.test(pt.charAt(Ee))&&Gt.test(pt.charAt(Ee-1))){var jt=R.getBookmark();ee.collapse(!0);var on=Ky(t,ee,t.formatter.get(a));on=iy(on),t.formatter.apply(a,m,on),R.moveToBookmark(jt)}else(!v||S.nodeValue!==Av)&&(v=function(t,a){return t.importNode(a,!0)}(t.getDoc(),vy(!0).dom),S=v.firstChild,ee.insertNode(v),Ee=1),t.formatter.apply(a,m,v),R.setCursorLocation(S,Ee)}(t,a,m);else{var bi=Se.getNode(),pi=S[0];!t.settings.forced_root_block&&pi.defaultBlock&&!Ee.getParent(bi,Ee.isBlock)&&qC(t,pi.defaultBlock),Se.setRng(_M(Se.getRng())),A1(Se,!0,function(){Qy(t,function(tr,Wi){var Oi=Wi?tr:Ky(t,tr,S);on(Ee,Oi,!1)})}),rh(Ee,Se,Se.getRng()),t.nodeChanged()}!function(t,a){u(b[t],function(m){m(a)})}(a,t)}NE(t,a,v,m)}else{v=Se.getNode();for(var Rn=0,Yn=S.length;Rn<Yn;Rn++){var $n=S[Rn];if($n.ceFalseOverride&&Oh($n)&&Ee.is(v,$n.selector)){pt(v,$n);break}}NE(t,a,v,m)}},yy=function(t){return Nn(t,"vars")},rS=function(t){return t.selection.getStart()},kI=function(t,a,m,v,S){return kn(a,function(Ee){var Se=t.formatter.matchNode(Ee,m,S??{},v);return!ye(Se)},function(Ee){return!!_y(t,Ee,m)||!v&&ne(t.formatter.matchNode(Ee,m,S,!0))})},BO=function(t,a){var m=a??rS(t);return mi(jy(t.dom,m),function(v){return la(v)&&!$i(v)})},oS=function(t,a,m){var v=BO(t,a);Hi(m,function(S,R){var ee=function(Ee){var Se=kI(t,v,R,Ee.similar,yy(Ee)?Ee.vars:void 0),pt=Se.isSome();if(Ee.state.get()!==pt){Ee.state.set(pt);var Gt=Se.getOr(a);yy(Ee)?Ee.callback(pt,{node:Gt,format:R,parents:v}):Mn(Ee.callbacks,function(jt){return jt(pt,{node:Gt,format:R,parents:v})})}};Mn([S.withSimilar,S.withoutSimilar],ee),Mn(S.withVars,ee)})},E3=function(t,a,m,v,S,R){return null===a.get()&&function(t,a){t.set({}),a.on("NodeChange",function(m){oS(a,m.element,t.get())}),a.on("FormatApply FormatRemove",function(m){var v=Ne.from(m.node).map(function(S){return R_(S)?S:S.startContainer}).bind(function(S){return la(S)?Ne.some(S):Ne.from(S.parentElement)}).getOrThunk(function(){return rS(a)});oS(a,v,t.get())})}(a,t),function(t,a,m,v,S,R){var ee=a.get();Mn(m.split(","),function(Ee){var Se=Ni(ee,Ee).getOrThunk(function(){var jt={withSimilar:{state:nd(!1),similar:!0,callbacks:[]},withoutSimilar:{state:nd(!1),similar:!1,callbacks:[]},withVars:[]};return ee[Ee]=jt,jt}),pt=function(){var jt=BO(t);return kI(t,jt,Ee,S,R).isSome()};if(ye(R)){var Gt=S?Se.withSimilar:Se.withoutSimilar;Gt.callbacks.push(v),1===Gt.callbacks.length&&Gt.state.set(pt())}else Se.withVars.push({state:nd(pt()),similar:S,vars:R,callback:v})}),a.set(ee)}(t,a,m,v,S,R),{unbind:function(){return function(t,a,m){var v=t.get();Mn(a.split(","),function(S){return Ni(v,S).each(function(R){v[S]={withSimilar:Tn(Tn({},R.withSimilar),{callbacks:mi(R.withSimilar.callbacks,function(ee){return ee!==m})}),withoutSimilar:Tn(Tn({},R.withoutSimilar),{callbacks:mi(R.withoutSimilar.callbacks,function(ee){return ee!==m})}),withVars:mi(R.withVars,function(ee){return ee.callback!==m})}})}),t.set(v)}(a,m,v)}}},ow=function(t,a){var v=(a||document).createDocumentFragment();return Mn(t,function(S){v.appendChild(S.dom)}),Dt.fromDom(v)},aw=function(t,a,m){return{element:t,width:a,rows:m}},RI=function(t,a){return{element:t,cells:a}},UO=function(t,a){return{x:t,y:a}},sw=function(t,a){var m=parseInt(mn(t,a),10);return isNaN(m)?1:m},T3=function(t,a,m){var v=t.rows;return!!(v[m]?v[m].cells:[])[a]},YO=function(t){return Bn(t,function(a,m){return m.cells.length>a?m.cells.length:a},0)},HO=function(t,a){for(var m=t.rows,v=0;v<m.length;v++)for(var S=m[v].cells,R=0;R<S.length;R++)if(Ao(S[R],a))return Ne.some(UO(R,v));return Ne.none()},VO=function(t,a,m,v,S){for(var R=[],ee=t.rows,Ee=m;Ee<=S;Ee++){var Se=ee[Ee].cells,pt=a<v?Se.slice(a,v+1):Se.slice(v,a+1);R.push(RI(ee[Ee].element,pt))}return R},lw=function(t){var a=aw(Hu(t),0,[]);return Mn(iu(t,"tr"),function(m,v){Mn(iu(m,"td,th"),function(S,R){!function(t,a,m,v,S){for(var R=sw(S,"rowspan"),ee=sw(S,"colspan"),Ee=t.rows,Se=m;Se<m+R;Se++){Ee[Se]||(Ee[Se]=RI(sv(v),[]));for(var pt=a;pt<a+ee;pt++)Ee[Se].cells[pt]=Se===m&&pt===a?S:Hu(S)}}(a,function(t,a,m){for(;T3(t,a,m);)a++;return a}(a,R,v),v,m,S)})}),aw(a.element,YO(a.rows),a.rows)},_b=function(t){return function(t,a){var m=Hu(t.element),v=Dt.fromTag("tbody");return Oc(v,a),ac(m,v),m}(t,function(t){return Dn(t.rows,function(a){var m=Dn(a.cells,function(S){var R=sv(S);return nr(R,"colspan"),nr(R,"rowspan"),R}),v=Hu(a.element);return Oc(v,m),v})}(t))},eA=function(t,a,m){return HO(t,a).bind(function(v){return HO(t,m).map(function(S){return function(t,a,m){var v=a.x,S=a.y,R=m.x,ee=m.y,Ee=S<ee?VO(t,v,S,R,ee):VO(t,v,ee,R,S);return aw(t.element,YO(Ee),Ee)}(t,v,S)})})},D3=function(t,a){return On(t,function(m){return"li"===ba(m)&&NC(m,a)}).fold(oe([]),function(m){return function(t){return On(t,function(a){return"ul"===ba(a)||"ol"===ba(a)})}(t).map(function(v){var S=Dt.fromTag(ba(v)),R=ct(bu(v),function(ee,Ee){return Gn(Ee,"list-style")});return Ca(S,R),[Dt.fromTag("li"),S]}).getOr([])})},S3=function(t,a){var m=Dt.fromDom(a.commonAncestorContainer),v=db(m,t),S=mi(v,function(Ee){return Hl(Ee)||qo(Ee)}),R=D3(v,a),ee=S.concat(R.length?R:function(t){return uu(t)?qi(t).filter(Zc).fold(oe([]),function(a){return[t,a]}):Zc(t)?[t]:[]}(m));return Dn(ee,Hu)},$O=function(){return ow([])},A3=function(t,a){return function(t,a){var m=Bn(a,function(v,S){return ac(S,v),S},t);return a.length>0?ow([m]):m}(Dt.fromDom(a.cloneContents()),S3(t,a))},cw=function(t,a){return function(t,a){return Eu(a,"table",le(Ao,t))}(t,a[0]).bind(function(m){var v=a[0],S=a[a.length-1],R=lw(m);return eA(R,v,S).map(function(ee){return ow([_b(ee)])})}).getOrThunk($O)},JO=function(t,a){var m=ey(a,t);return m.length>0?cw(t,m):function(t,a){return a.length>0&&a[0].collapsed?$O():A3(t,a[0])}(t,a)},dw=function(t,a){return a>=0&&a<t.length&&Lg(t.charAt(a))},QO=function(t,a){var m=Kc(t.innerText);return a?function(t){return t.replace(/^[ \f\n\r\t\v]+/,"")}(m):m},L3=function(t,a,m){void 0===m&&(m={});var v=function(t,a){return Tn(Tn({},t),{format:a,get:!0,selection:!0})}(m,a),S=t.fire("BeforeGetContent",v);if(S.isDefaultPrevented())return t.fire("GetContent",S),S.content;if("text"===S.format)return function(t){return Ne.from(t.selection.getRng()).map(function(a){var m=Ne.from(t.dom.getParent(a.commonAncestorContainer,t.dom.isBlock)),v=t.getBody(),S=function(t){return t.map(function(a){return a.nodeName}).getOr("div").toLowerCase()}(m),R=$r.browser.isIE()&&"pre"!==S,ee=t.dom.add(v,S,{"data-mce-bogus":"all",style:"overflow: hidden; opacity: 0;"},a.cloneContents()),Ee=QO(ee,R),Se=Kc(ee.textContent);if(t.dom.remove(ee),dw(Se,0)||dw(Se,Se.length-1)){var pt=m.getOr(v),Gt=QO(pt,R),jt=Gt.indexOf(Ee);return-1===jt?Ee:(dw(Gt,jt-1)?" ":"")+Ee+(dw(Gt,jt+Ee.length)?" ":"")}return Ee}).getOr("")}(t);S.getInner=!0;var R=function(t,a){var m=t.selection.getRng(),v=t.dom.create("body"),S=t.selection.getSel(),R=vx(t,kE(S)),ee=a.contextual?JO(Dt.fromDom(t.getBody()),R).dom:m.cloneContents();return ee&&v.appendChild(ee),t.selection.serializer.serialize(v,a)}(t,S);return"tree"===S.format?R:(S.content=t.selection.isCollapsed()?"":R,t.fire("GetContent",S),S.content)},e2=function(t){return la(t)?t.outerHTML:Kr(t)?td.encodeRaw(t.data,!1):os(t)?"\x3c!--"+t.data+"--\x3e":""},R3=function(t,a,m){var v=function(t){var a,m=document.createElement("div"),v=document.createDocumentFragment();for(t&&(m.innerHTML=t);a=m.firstChild;)v.appendChild(a);return v}(a);if(t.hasChildNodes()&&m<t.childNodes.length){var S=t.childNodes[m];S.parentNode.insertBefore(v,S)}else t.appendChild(v)},F3=function(t,a){return function(t,a){var m=0;Mn(t,function(v){0===v[0]?m++:1===v[0]?(R3(a,v[1],m),m++):2===v[0]&&function(t,a){if(t.hasChildNodes()&&a<t.childNodes.length){var m=t.childNodes[a];m.parentNode.removeChild(m)}}(a,m)})}(function(t,a){var m=t.length+a.length+2,v=new Array(m),S=new Array(m),ee=function(Gt,jt,on,Rn,Yn){var $n=Se(Gt,jt,on,Rn);if(null===$n||$n.start===jt&&$n.diag===jt-Rn||$n.end===Gt&&$n.diag===Gt-on)for(var qn=Gt,bi=on;qn<jt||bi<Rn;)qn<jt&&bi<Rn&&t[qn]===a[bi]?(Yn.push([0,t[qn]]),++qn,++bi):jt-Gt>Rn-on?(Yn.push([2,t[qn]]),++qn):(Yn.push([1,a[bi]]),++bi);else{ee(Gt,$n.start,on,$n.start-$n.diag,Yn);for(var pi=$n.start;pi<$n.end;++pi)Yn.push([0,t[pi]]);ee($n.end,jt,$n.end-$n.diag,Rn,Yn)}},Ee=function(Gt,jt,on,Rn){for(var Yn=Gt;Yn-jt<Rn&&Yn<on&&t[Yn]===a[Yn-jt];)++Yn;return function(Gt,jt,on){return{start:Gt,end:jt,diag:on}}(Gt,Yn,jt)},Se=function(Gt,jt,on,Rn){var Yn=jt-Gt,$n=Rn-on;if(0===Yn||0===$n)return null;var tr,Wi,Oi,cr,Ur,qn=Yn-$n,bi=$n+Yn,pi=(bi%2==0?bi:bi+1)/2;for(v[1+pi]=Gt,S[1+pi]=jt+1,tr=0;tr<=pi;++tr){for(Wi=-tr;Wi<=tr;Wi+=2){for(Oi=Wi+pi,Wi===-tr||Wi!==tr&&v[Oi-1]<v[Oi+1]?v[Oi]=v[Oi+1]:v[Oi]=v[Oi-1]+1,Ur=(cr=v[Oi])-Gt+on-Wi;cr<jt&&Ur<Rn&&t[cr]===a[Ur];)v[Oi]=++cr,++Ur;if(qn%2!=0&&qn-tr<=Wi&&Wi<=qn+tr&&S[Oi-qn]<=v[Oi])return Ee(S[Oi-qn],Wi+Gt-on,jt,Rn)}for(Wi=qn-tr;Wi<=qn+tr;Wi+=2){for(Oi=Wi+pi-qn,Wi===qn-tr||Wi!==qn+tr&&S[Oi+1]<=S[Oi-1]?S[Oi]=S[Oi+1]-1:S[Oi]=S[Oi-1],Ur=(cr=S[Oi]-1)-Gt+on-Wi;cr>=Gt&&Ur>=on&&t[cr]===a[Ur];)S[Oi]=cr--,Ur--;if(qn%2==0&&-tr<=Wi&&Wi<=tr&&S[Oi]<=v[Oi+qn])return Ee(S[Oi],Wi+Gt-on,jt,Rn)}}},pt=[];return ee(0,t.length,0,a.length,pt),pt}(Dn(vn(a.childNodes),e2),t),a),a},N3=rr(function(){return document.implementation.createHTMLDocument("undo")}),sS=function(t){var a=function(t){return mi(Dn(vn(t.childNodes),e2),function(a){return a.length>0})}(t.getBody()),m=xn(a,function(S){var R=lb(t.serializer,S);return R.length>0?[R]:[]}),v=m.join("");return function(t){return-1!==t.indexOf("</iframe>")}(v)?function(t){return{type:"fragmented",fragments:t,content:"",bookmark:null,beforeBookmark:null}}(m):function(t){return{type:"complete",fragments:null,content:t,bookmark:null,beforeBookmark:null}}(v)},Xx=function(t,a,m){var v=m?a.beforeBookmark:a.bookmark;"fragmented"===a.type?F3(a.fragments,t.getBody()):t.setContent(a.content,{format:"raw",no_selection:!ne(v)||!DE(v)||!v.isFakeCaret}),t.selection.moveToBookmark(v)},eD=function(t){return"fragmented"===t.type?t.fragments.join(""):t.content},pw=function(t){var a=Dt.fromTag("body",N3());return nm(a,eD(t)),Mn(iu(a,"*[data-mce-bogus]"),kr),function(t){return t.dom.innerHTML}(a)},bM=function(t,a){return!(!t||!a)&&(!!function(t,a){return eD(t)===eD(a)}(t,a)||function(t,a){return pw(t)===pw(a)}(t,a))},BT=function(t){return 0===t.get()},CM=function(t,a,m){BT(m)&&(t.typing=a)},mw=function(t,a){t.typing&&(CM(t,!1,a),t.add())},a2=function(t){return{undoManager:{beforeChange:function(a,m){return function(t,a,m){BT(a)&&m.set(DC(t.selection))}(t,a,m)},add:function(a,m,v,S,R,ee){return function(t,a,m,v,S,R,ee){var Ee=sS(t);if(R=R||{},R=Li.extend(R,Ee),!1===BT(v)||t.removed)return null;var Se=a.data[m.get()];if(t.fire("BeforeAddUndo",{level:R,lastLevel:Se,originalEvent:ee}).isDefaultPrevented()||Se&&bM(Se,R))return null;a.data[m.get()]&&S.get().each(function(on){a.data[m.get()].beforeBookmark=on});var pt=function(t){return t.getParam("custom_undo_redo_levels",0,"number")}(t);if(pt&&a.data.length>pt){for(var Gt=0;Gt<a.data.length-1;Gt++)a.data[Gt]=a.data[Gt+1];a.data.length--,m.set(a.data.length)}R.bookmark=DC(t.selection),m.get()<a.data.length-1&&(a.data.length=m.get()+1),a.data.push(R),m.set(a.data.length-1);var jt={level:R,lastLevel:Se,originalEvent:ee};return m.get()>0?(t.setDirty(!0),t.fire("AddUndo",jt),t.fire("change",jt)):t.fire("AddUndo",jt),R}(t,a,m,v,S,R,ee)},undo:function(a,m,v){return function(t,a,m,v){var S;return a.typing&&(a.add(),a.typing=!1,CM(a,!1,m)),v.get()>0&&(v.set(v.get()-1),S=a.data[v.get()],Xx(t,S,!0),t.setDirty(!0),t.fire("Undo",{level:S})),S}(t,a,m,v)},redo:function(a,m){return function(t,a,m){var v;return a.get()<m.length-1&&(a.set(a.get()+1),v=m[a.get()],Xx(t,v,!1),t.setDirty(!0),t.fire("Redo",{level:v})),v}(t,a,m)},clear:function(a,m){return function(t,a,m){a.data=[],m.set(0),a.typing=!1,t.fire("ClearUndos")}(t,a,m)},reset:function(a){return function(t){t.clear(),t.add()}(a)},hasUndo:function(a,m){return function(t,a,m){return m.get()>0||a.typing&&a.data[0]&&!bM(sS(t),a.data[0])}(t,a,m)},hasRedo:function(a,m){return function(t,a){return a.get()<t.data.length-1&&!t.typing}(a,m)},transact:function(a,m,v){return function(t,a,m){return mw(t,a),t.beforeChange(),t.ignore(m),t.add()}(a,m,v)},ignore:function(a,m){return function(t,a){try{t.set(t.get()+1),a()}finally{t.set(t.get()-1)}}(a,m)},extra:function(a,m,v,S){return function(t,a,m,v,S){if(a.transact(v)){var R=a.data[m.get()].bookmark,ee=a.data[m.get()-1];Xx(t,ee,!0),a.transact(S)&&(a.data[m.get()-1].beforeBookmark=R)}}(t,a,m,v,S)}},formatter:{match:function(a,m,v,S){return tC(t,a,m,v,S)},matchAll:function(a,m){return function(t,a,m){var v=[],S={},R=t.selection.getStart();return t.dom.getParent(R,function(ee){for(var Ee=0;Ee<a.length;Ee++){var Se=a[Ee];!S[Se]&&Lm(t,ee,Se,m)&&(S[Se]=!0,v.push(Se))}},t.dom.getRoot()),v}(t,a,m)},matchNode:function(a,m,v,S){return Lm(t,a,m,v,S)},canApply:function(a){return function(t,a){var m=t.formatter.get(a),v=t.dom;if(m)for(var S=t.selection.getStart(),R=jy(v,S),ee=m.length-1;ee>=0;ee--){var Ee=m[ee];if(!Oh(Ee)||ne(Ee.defaultBlock))return!0;for(var Se=R.length-1;Se>=0;Se--)if(v.is(R[Se],Ee.selector))return!0}return!1}(t,a)},closest:function(a){return iC(t,a)},apply:function(a,m,v){return qC(t,a,m,v)},remove:function(a,m,v,S){return Il(t,a,m,v,S)},toggle:function(a,m,v){return function(t,a,m,v){var S=t.formatter.get(a);!tC(t,a,m,v)||"toggle"in S[0]&&!S[0].toggle?qC(t,a,m,v):Il(t,a,m,v)}(t,a,m,v)},formatChanged:function(a,m,v,S,R){return E3(t,a,m,v,S,R)}},editor:{getContent:function(a,m){return function(t,a,m){return Ne.from(t.getBody()).fold(oe("tree"===a.format?new dh("body",11):""),function(v){return zD(t,a,m,v)})}(t,a,m)},setContent:function(a,m){return tS(t,a,m)},insertContent:function(a,m){return jx(t,a,m)},addVisual:function(a){return function(t,a){var m=t.dom,v=ne(a)?a:t.getBody();ye(t.hasVisual)&&(t.hasVisual=function(t){return t.getParam("visual",!0,"boolean")}(t)),Mn(m.select("table,a",v),function(S){switch(S.nodeName){case"TABLE":var R=function(t){return t.getParam("visual_table_class","mce-item-table","string")}(t),ee=m.getAttrib(S,"border");ee&&"0"!==ee||!t.hasVisual?m.removeClass(S,R):m.addClass(S,R);break;case"A":if(!m.getAttrib(S,"href")){var Ee=m.getAttrib(S,"name")||S.id,Se=function(t){return t.getParam("visual_anchor_class","mce-item-anchor","string")}(t);Ee&&t.hasVisual?m.addClass(S,Se):m.removeClass(S,Se)}}}),t.fire("VisualAid",{element:a,hasVisual:t.hasVisual})}(t,a)}},selection:{getContent:function(a,m){return L3(t,a,m)}},raw:{getModel:function(){return Ne.none()}}}},EM=function(t){return Nn(t.plugins,"rtc")},J3=function(t){var a=t;return function(t){return Ni(t.plugins,"rtc").bind(function(a){return Ne.from(a.setup)})}(t).fold(function(){return a.rtcInstance=a2(t),Ne.none()},function(m){return a.rtcInstance=function(){var t=oe(null),a=oe("");return{undoManager:{beforeChange:xe,add:t,undo:t,redo:t,clear:xe,reset:xe,hasUndo:Be,hasRedo:Be,transact:t,ignore:xe,extra:xe},formatter:{match:Be,matchAll:oe([]),matchNode:oe(void 0),canApply:Be,closest:a,apply:xe,remove:xe,toggle:xe,formatChanged:oe({unbind:xe})},editor:{getContent:a,setContent:a,insertContent:xe,addVisual:xe},selection:{getContent:a},raw:{getModel:oe(Ne.none())}}}(),Ne.some(function(){return m().then(function(v){return a.rtcInstance=function(t){var a=function(Ee){return he(Ee)?Ee:{}},m=t.undoManager,v=t.formatter,S=t.editor,R=t.selection,ee=t.raw;return{undoManager:{beforeChange:m.beforeChange,add:m.add,undo:m.undo,redo:m.redo,clear:m.clear,reset:m.reset,hasUndo:m.hasUndo,hasRedo:m.hasRedo,transact:function(Ee,Se,pt){return m.transact(pt)},ignore:function(Ee,Se){return m.ignore(Se)},extra:function(Ee,Se,pt,Gt){return m.extra(pt,Gt)}},formatter:{match:function(Ee,Se,pt,Gt){return v.match(Ee,a(Se),Gt)},matchAll:v.matchAll,matchNode:v.matchNode,canApply:function(Ee){return v.canApply(Ee)},closest:function(Ee){return v.closest(Ee)},apply:function(Ee,Se,pt){return v.apply(Ee,a(Se))},remove:function(Ee,Se,pt,Gt){return v.remove(Ee,a(Se))},toggle:function(Ee,Se,pt){return v.toggle(Ee,a(Se))},formatChanged:function(Ee,Se,pt,Gt,jt){return v.formatChanged(Se,pt,Gt,jt)}},editor:{getContent:function(Ee,Se){return S.getContent(Ee)},setContent:function(Ee,Se){return S.setContent(Ee,Se)},insertContent:function(Ee,Se){return S.insertContent(Ee)},addVisual:S.addVisual},selection:{getContent:function(Ee,Se){return R.getContent(Se)}},raw:{getModel:function(){return Ne.some(ee.getRawModel())}}}}(v),v.rtc.isRemote})})})},fw=function(t){return t.rtcInstance?t.rtcInstance:a2(t)},mh=function(t){var a=t.rtcInstance;if(a)return a;throw new Error("Failed to get RTC instance not yet initialized.")},rF=function(t,a){return void 0===a&&(a={}),function(t,a,m){return mh(t).selection.getContent(a,m)}(t,a.format?a.format:"html",a)},C2=function(t){return 0===t.dom.length?(Dr(t),Ne.none()):Ne.some(t)},E2=function(t,a,m,v){t.bind(function(S){return(v?aM:W0)(S.dom,v?S.dom.length:0),a.filter(Qi).map(function(ee){return function(t,a,m,v){var S=t.dom,R=a.dom,ee=v?S.length:R.length;v?(yT(S,R,!1,!v),m.setStart(R,ee)):(yT(R,S,!1,!v),m.setEnd(R,ee))}(S,ee,m,v)})}).orThunk(function(){var S=function(t,a){return t.filter(function(m){return Fg.isBookmarkNode(m.dom)}).bind(a?Us:su)}(a,v).or(a).filter(Qi);return S.map(function(R){return function(t,a){qi(t).each(function(m){var v=t.dom;a&&rM(m,Tr(v,0))?W0(v,0):!a&&s_(m,Tr(v,v.length))&&aM(v,v.length)})}(R,v)})})},M2=function(t,a,m){void 0===m&&(m={});var v=function(t,a){return Tn(Tn({format:"html"},t),{set:!0,selection:!0,content:a})}(m,a),S=v;if(!v.no_events){var R=t.fire("BeforeSetContent",v);if(R.isDefaultPrevented())return void t.fire("SetContent",R);S=R}S.content=function(t,a){if("raw"!==a.format){var m=t.selection.getRng(),v=t.dom.getParent(m.commonAncestorContainer,t.dom.isBlock),S=v?{context:v.nodeName.toLowerCase()}:{},R=t.parser.parse(a.content,Tn(Tn({isRootContent:!0,forced_root_block:!1},S),a));return cy({validate:t.validate},t.schema).serialize(R)}return a.content}(t,S);var ee=t.selection.getRng();(function(t,a){var m=Ne.from(a.firstChild).map(Dt.fromDom),v=Ne.from(a.lastChild).map(Dt.fromDom);t.deleteContents(),t.insertNode(a);var S=m.bind(su).filter(Qi).bind(C2),R=v.bind(Us).filter(Qi).bind(C2);E2(S,m,t,!0),E2(R,v,t,!1),t.collapse(!1)})(ee,ee.createContextualFragment(S.content)),t.selection.setRng(ee),xv(t,ee),S.no_events||t.fire("SetContent",S)},T2=function(t,a,m){if(t&&Nn(t,a)){var v=mi(t[a],function(S){return S!==m});0===v.length?delete t[a]:t[a]=v}};var GI=function(t){return!!t.select},x2=function(t){return!(!t||!t.ownerDocument)&&Ra(Dt.fromDom(t.ownerDocument),Dt.fromDom(t))},D2=function(t,a,m,v){var S,R,ee=function gw(t,a){var m,v,S=function(ee,Ee){return On(Ee,function(Se){return t.is(Se,ee)})},R=function(ee){return t.getParents(ee,null,t.getRoot())};return{selectorChangedWithUnbind:function(ee,Ee){return m||(m={},v={},a.on("NodeChange",function(Se){var pt=Se.element,Gt=R(pt),jt={};Li.each(m,function(on,Rn){S(Rn,Gt).each(function(Yn){v[Rn]||(Mn(on,function($n){$n(!0,{node:Yn,selector:Rn,parents:Gt})}),v[Rn]=on),jt[Rn]=on})}),Li.each(v,function(on,Rn){jt[Rn]||(delete v[Rn],Li.each(on,function(Yn){Yn(!1,{node:pt,selector:Rn,parents:Gt})}))})})),m[ee]||(m[ee]=[]),m[ee].push(Ee),S(ee,R(a.selection.getStart())).each(function(){v[ee]=m[ee]}),{unbind:function(){T2(m,ee,Ee),T2(v,ee,Ee)}}}}}(t,v).selectorChangedWithUnbind,pt=function(Jr,na){return M2(v,Jr,na)},qn=function(Jr){var na=pi();na.collapse(!!Jr),tr(na)},bi=function(){return a.getSelection?a.getSelection():a.document.selection},pi=function(){var Jr,na,Ul,Ic=function(Op,f_,W_){try{return f_.compareBoundaryPoints(Op,W_)}catch{return-1}},Mc=a.document;if(void 0!==v.bookmark&&!1===ab(v)){var fh=GE(v);if(fh.isSome())return fh.map(function(Op){return vx(v,[Op])[0]}).getOr(Mc.createRange())}try{(Jr=bi())&&!Cd(Jr.anchorNode)&&(na=Jr.rangeCount>0?Jr.getRangeAt(0):Jr.createRange?Jr.createRange():Mc.createRange(),na=vx(v,[na])[0])}catch{}return na||(na=Mc.createRange?Mc.createRange():Mc.body.createTextRange()),na.setStart&&9===na.startContainer.nodeType&&na.collapsed&&(Ul=t.getRoot(),na.setStart(Ul,0),na.setEnd(Ul,0)),S&&R&&(0===Ic(na.START_TO_START,na,S)&&0===Ic(na.END_TO_END,na,S)?na=R:(S=null,R=null)),na},tr=function(Jr,na){var Ul;if(function(t){return!!t&&(!!GI(t)||x2(t.startContainer)&&x2(t.endContainer))}(Jr)){var Ic=GI(Jr)?Jr:null;if(Ic){R=null;try{Ic.select()}catch{}return}var Mc=bi();if(Jr=v.fire("SetSelectionRange",{range:Jr,forward:na}).range,Mc){R=Jr;try{Mc.removeAllRanges(),Mc.addRange(Jr)}catch{}!1===na&&Mc.extend&&(Mc.collapse(Jr.endContainer,Jr.endOffset),Mc.extend(Jr.startContainer,Jr.startOffset)),S=Mc.rangeCount>0?Mc.getRangeAt(0):null}!Jr.collapsed&&Jr.startContainer===Jr.endContainer&&Mc.setBaseAndExtent&&!$r.ie&&Jr.endOffset-Jr.startOffset<2&&Jr.startContainer.hasChildNodes()&&((Ul=Jr.startContainer.childNodes[Jr.startOffset])&&"IMG"===Ul.tagName&&(Mc.setBaseAndExtent(Jr.startContainer,Jr.startOffset,Jr.endContainer,Jr.endOffset),(Mc.anchorNode!==Jr.startContainer||Mc.focusNode!==Jr.endContainer)&&Mc.setBaseAndExtent(Ul,0,Ul,1))),v.fire("AfterSetSelectionRange",{range:Jr,forward:na})}},Ur=function(){var Jr=bi(),na=Jr?.anchorNode,Ul=Jr?.focusNode;if(!Jr||!na||!Ul||Cd(na)||Cd(Ul))return!0;var Ic=t.createRng();Ic.setStart(na,Jr.anchorOffset),Ic.collapse(!0);var Mc=t.createRng();return Mc.setStart(Ul,Jr.focusOffset),Mc.collapse(!0),Ic.compareBoundaryPoints(Ic.START_TO_START,Mc)<=0},vo={bookmarkManager:null,controlSelection:null,dom:t,win:a,serializer:m,editor:v,collapse:qn,setCursorLocation:function(Jr,na){var Ul=t.createRng();ne(Jr)&&ne(na)?(Ul.setStart(Jr,na),Ul.setEnd(Jr,na),tr(Ul),qn(!1)):(S1(t,Ul,v.getBody(),!0),tr(Ul))},getContent:function(Jr){return rF(v,Jr)},setContent:pt,getBookmark:function(Jr,na){return So.getBookmark(Jr,na)},moveToBookmark:function(Jr){return So.moveToBookmark(Jr)},select:function(Jr,na){return function(t,a,m){return Ne.from(a).map(function(v){var S=t.nodeIndex(v),R=t.createRng();return R.setStart(v.parentNode,S),R.setEnd(v.parentNode,S+1),m&&(S1(t,R,v,!0),S1(t,R,v,!1)),R})}(t,Jr,na).each(tr),Jr},isCollapsed:function(){var Jr=pi(),na=bi();return!(!Jr||Jr.item)&&(Jr.compareEndPoints?0===Jr.compareEndPoints("StartToEnd",Jr):!na||Jr.collapsed)},isForward:Ur,setNode:function(Jr){return pt(t.getOuterHTML(Jr)),Jr},getNode:function(){return function(t,a){var m,v,S;if(!a)return t;v=a.startContainer,S=a.endContainer;var R=a.startOffset,ee=a.endOffset;return m=a.commonAncestorContainer,!a.collapsed&&(v===S&&ee-R<2&&v.hasChildNodes()&&(m=v.childNodes[R]),3===v.nodeType&&3===S.nodeType&&(v=v.length===R?jE(v.nextSibling,!0):v.parentNode,S=0===ee?jE(S.previousSibling,!1):S.parentNode,v&&v===S))?v:m&&3===m.nodeType?m.parentNode:m}(v.getBody(),pi())},getSel:bi,setRng:tr,getRng:pi,getStart:function(Jr){return tT(v.getBody(),pi(),Jr)},getEnd:function(Jr){return _x(v.getBody(),pi(),Jr)},getSelectedBlocks:function(Jr,na){return function(t,a,m,v){var S,R=[],ee=t.getRoot();if(m=t.getParent(m||tT(ee,a,a.collapsed),t.isBlock),v=t.getParent(v||_x(ee,a,a.collapsed),t.isBlock),m&&m!==ee&&R.push(m),m&&v&&m!==v){S=m;for(var Ee=new Sr(m,ee);(S=Ee.next())&&S!==v;)t.isBlock(S)&&R.push(S)}return v&&m!==v&&v!==ee&&R.push(v),R}(t,pi(),Jr,na)},normalize:function(){var Jr=pi();if(!function(t){return kE(t).length>1}(bi())&&Jy(v)){var Ul=zC(t,Jr);return Ul.each(function(Ic){tr(Ic,Ur())}),Ul.getOr(Jr)}return Jr},selectorChanged:function(Jr,na){return ee(Jr,na),vo},selectorChangedWithUnbind:ee,getScrollContainer:function(){for(var Jr,na=t.getRoot();na&&"BODY"!==na.nodeName;){if(na.scrollHeight>na.clientHeight){Jr=na;break}na=na.parentNode}return Jr},scrollIntoView:function(Jr,na){ne(Jr)?function(t,a,m){(t.inline?rb:Ng)(t,a,m)}(v,Jr,na):xv(v,pi(),na)},placeCaretAt:function(Jr,na){return tr(k0(Jr,na,v.getDoc()))},getBoundingClientRect:function(){var Jr=pi();return Jr.collapsed?Tr.fromRangeStart(Jr).getClientRects()[0]:Jr.getBoundingClientRect()},destroy:function(){a=S=R=null,ca.destroy()}},So=Fg(vo),ca=lh(vo,v);return vo.bookmarkManager=So,vo.controlSelection=ca,vo},lF=function(t,a,m){t.addNodeFilter("font",function(v){Mn(v,function(S){var R=a.parse(S.attr("style")),ee=S.attr("color"),Ee=S.attr("face"),Se=S.attr("size");ee&&(R.color=ee),Ee&&(R["font-family"]=Ee),Se&&(R["font-size"]=m[parseInt(S.attr("size"),10)-1]),S.name="span",S.attr("style",a.serialize(R)),function(t,a){Mn(a,function(m){t.attr(m,null)})}(S,["color","face","size"])})})},A2=function(t,a){var m=zm();a.convert_fonts_to_spans&&lF(t,m,Li.explode(a.font_size_legacy_values)),function(t,a){t.addNodeFilter("strike",function(m){Mn(m,function(v){var S=a.parse(v.attr("style"));S["text-decoration"]="line-through",v.name="span",v.attr("style",a.serialize(S))})})}(t,m)},$I=function(t){var a,m=decodeURIComponent(t).split(","),v=/data:([^;]+)/.exec(m[0]);return v&&(a=v[1]),{type:a,data:m[1]}},jI=function(t,a){var m;try{m=atob(a)}catch{return Ne.none()}for(var v=new Uint8Array(m.length),S=0;S<v.length;S++)v[S]=m.charCodeAt(S);return Ne.some(new Blob([v],{type:t}))},w2=function(t){return 0===t.indexOf("blob:")?function(t){return new Ll(function(a,m){var v=function(){m("Cannot convert "+t+" to Blob. Resource might not exist or is inaccessible.")};try{var S=new XMLHttpRequest;S.open("GET",t,!0),S.responseType="blob",S.onload=function(){200===S.status?a(S.response):v()},S.onerror=v,S.send()}catch{v()}})}(t):0===t.indexOf("data:")?function(t){return new Ll(function(a){var m=$I(t),v=m.type,S=m.data;jI(v,S).fold(function(){return a(new Blob([]))},a)})}(t):null},pF=0,JI=function(t){return(t||"blobid")+pF++},mF=function(t,a,m,v){var S,R;if(0!==a.src.indexOf("blob:")){var ee=$I(a.src),Ee=ee.data,Se=ee.type;S=Ee,(R=t.getByData(S,Se))?m({image:a,blobInfo:R}):w2(a.src).then(function(pt){R=t.create(JI(),pt,S),t.add(R),m({image:a,blobInfo:R})},function(pt){v(pt)})}else(R=t.getByUri(a.src))?m({image:a,blobInfo:R}):w2(a.src).then(function(pt){(function(t){return new Ll(function(a){var m=new FileReader;m.onloadend=function(){a(m.result)},m.readAsDataURL(t)})})(pt).then(function(Gt){S=$I(Gt).data,R=t.create(JI(),pt,S),t.add(R),m({image:a,blobInfo:R})})},function(pt){v(pt)})},P2=function(t,a){var m={};return{findAll:function(S,R){R||(R=nt);var ee=mi(function(t){return t?vn(t.getElementsByTagName("img")):[]}(S),function(Se){var pt=Se.src;return!(!$r.fileApi||Se.hasAttribute("data-mce-bogus")||Se.hasAttribute("data-mce-placeholder")||!pt||pt===$r.transparentSrc)&&(0===pt.indexOf("blob:")?!t.isUploaded(pt)&&R(Se):0===pt.indexOf("data:")&&R(Se))}),Ee=Dn(ee,function(Se){if(void 0!==m[Se.src])return new Ll(function(Gt){m[Se.src].then(function(jt){if("string"==typeof jt)return jt;Gt({image:Se,blobInfo:jt.blobInfo})})});var pt=new Ll(function(Gt,jt){mF(a,Se,Gt,jt)}).then(function(Gt){return delete m[Gt.image.src],Gt}).catch(function(Gt){return delete m[Se.src],Gt});return m[Se.src]=pt,pt});return Ll.all(Ee)}}},oA=function(t,a,m,v){(t.padd_empty_with_br||a.insert)&&m[v.name]?v.empty().append(new dh("br",1)).shortEnded=!0:v.empty().append(new dh("#text",3)).value=Pu},QI=function(t,a){return t&&t.firstChild&&t.firstChild===t.lastChild&&t.firstChild.name===a},lS=function(t,a,m,v){return v.isEmpty(a,m,function(S){return function(t,a){var m=t.getElementRule(a.name);return m&&m.paddEmpty}(t,S)})},hF=function(t,a){var m=a.blob_cache,v=function(S){var R=S.attr("src");(function(t){return t.attr("src")===$r.transparentSrc||ne(t.attr("data-mce-placeholder"))})(S)||function(t){return ne(t.attr("data-mce-bogus"))}(S)||function(t){var a=/data:([^;]+);base64,([a-z0-9\+\/=\s]+)/i.exec(t);return a?Ne.some({type:a[1],data:decodeURIComponent(a[2])}):Ne.none()}(R).filter(function(){return function(t,a){if(a.images_dataimg_filter){var m=new Image;return m.src=t.attr("src"),Hi(t.attributes.map,function(v,S){m.setAttribute(S,v)}),a.images_dataimg_filter(m)}return!0}(S,a)}).bind(function(ee){var Ee=ee.type,Se=ee.data;return Ne.from(m.getByData(Se,Ee)).orThunk(function(){return jI(Ee,Se).map(function(pt){var Gt=m.create(JI(),pt,Se);return m.add(Gt),Gt})})}).each(function(ee){S.attr("src",ee.blobUri())})};m&&t.addAttributeFilter("src",function(S){return Mn(S,v)})},F2=Li.makeMap,N2=Li.each,B2=Li.explode,U2=Li.extend,vw=function(t,a){void 0===a&&(a=pd());var m={},v=[],S={},R={};(t=t||{}).validate=!("validate"in t)||t.validate,t.root_name=t.root_name||"body";var Ee=function(Yn){var $n=Yn.name;$n in m&&((qn=S[$n])?qn.push(Yn):S[$n]=[Yn]);for(var bi=v.length;bi--;){var qn,pi=v[bi].name;if(pi in Yn.attributes.map)(qn=R[pi])?qn.push(Yn):R[pi]=[Yn]}return Yn},Rn={schema:a,addAttributeFilter:function(Yn,$n){N2(B2(Yn),function(qn){var bi;for(bi=0;bi<v.length;bi++)if(v[bi].name===qn)return void v[bi].callbacks.push($n);v.push({name:qn,callbacks:[$n]})})},getAttributeFilters:function(){return[].concat(v)},addNodeFilter:function(Yn,$n){N2(B2(Yn),function(qn){var bi=m[qn];bi||(m[qn]=bi=[]),bi.push($n)})},getNodeFilters:function(){var Yn=[];for(var $n in m)Nn(m,$n)&&Yn.push({name:$n,callbacks:m[$n]});return Yn},filterNode:Ee,parse:function(Yn,$n){var qn,bi,pi,tr,Wi,Oi,cr,no,Ur=[];$n=$n||{},S={},R={};var fr,Xo=U2(F2("script,style,head,html,body,title,meta,param"),a.getBlockElements()),Wr=um(a),qa=a.getNonEmptyElements(),po=a.children,Wo=t.validate,vo="forced_root_block"in $n?$n.forced_root_block:t.forced_root_block,So=!1===(fr=vo)?"":!0===fr?"p":fr,ca=a.getWhiteSpaceElements(),Jr=/^[ \t\r\n]+/,na=/[ \t\r\n]+$/,Ul=/[ \t\r\n]+/g,Ic=/^[ \t\r\n]+$/,Mc=Nn(ca,$n.context)||Nn(ca,t.root_name),Op=function(fr,so){var za,eo=new dh(fr,so);return fr in m&&((za=S[fr])?za.push(eo):S[fr]=[eo]),eo},f_=function(fr){for(var so=a.getBlockElements(),eo=fr.prev;eo&&3===eo.type;){var za=eo.value.replace(na,"");if(za.length>0)return void(eo.value=za);var Wa=eo.next;if(Wa){if(3===Wa.type&&Wa.value.length){eo=eo.prev;continue}if(!so[Wa.name]&&"script"!==Wa.name&&"style"!==Wa.name){eo=eo.prev;continue}}var Nu=eo.prev;eo.remove(),eo=Nu}},yo=VC({validate:Wo,document:t.document,allow_html_data_urls:t.allow_html_data_urls,allow_svg_data_urls:t.allow_svg_data_urls,allow_script_urls:t.allow_script_urls,allow_conditional_comments:t.allow_conditional_comments,preserve_cdata:t.preserve_cdata,self_closing_elements:function(fr){var so={};for(var eo in fr)"li"!==eo&&"p"!==eo&&(so[eo]=fr[eo]);return so}(a.getSelfClosingElements()),cdata:function(fr){no.append(Op("#cdata",4)).value=fr},text:function(fr,so){var eo;Mc||(fr=fr.replace(Ul," "),function(t,a){return t&&(Nn(a,t.name)||"br"===t.name)}(no.lastChild,Xo)&&(fr=fr.replace(Jr,""))),0!==fr.length&&((eo=Op("#text",3)).raw=!!so,no.append(eo).value=fr)},comment:function(fr){no.append(Op("#comment",8)).value=fr},pi:function(fr,so){no.append(Op(fr,7)).value=so,f_(no)},doctype:function(fr){no.append(Op("#doctype",10)).value=fr,f_(no)},start:function(fr,so,eo){var za=Wo?a.getElementRule(fr):{};if(za){var Wa=Op(za.outputName||fr,1);Wa.attributes=so,Wa.shortEnded=eo,no.append(Wa);var Nu=po[no.name];Nu&&po[Wa.name]&&!Nu[Wa.name]&&Ur.push(Wa);for(var Cf=v.length;Cf--;){var nf=v[Cf].name;nf in so.map&&((Oi=R[nf])?Oi.push(Wa):R[nf]=[Wa])}Xo[fr]&&f_(Wa),eo||(no=Wa),!Mc&&ca[fr]&&(Mc=!0)}},end:function(fr){var so,eo,za,Wa=Wo?a.getElementRule(fr):{};if(Wa){if(Xo[fr]&&!Mc){if((so=no.firstChild)&&3===so.type)if((eo=so.value.replace(Jr,"")).length>0)so.value=eo,so=so.next;else for(za=so.next,so.remove(),so=za;so&&3===so.type;)eo=so.value,za=so.next,(0===eo.length||Ic.test(eo))&&(so.remove(),so=za),so=za;if((so=no.lastChild)&&3===so.type)if((eo=so.value.replace(na,"")).length>0)so.value=eo,so=so.prev;else for(za=so.prev,so.remove(),so=za;so&&3===so.type;)eo=so.value,za=so.prev,(0===eo.length||Ic.test(eo))&&(so.remove(),so=za),so=za}Mc&&ca[fr]&&(Mc=!1);var Nu=lS(a,qa,ca,no),Cf=no.parent;Wa.paddInEmptyBlock&&Nu&&function(fr){for(var so=fr;ne(so);){if(so.name in Wr)return lS(a,qa,ca,so);so=so.parent}return!1}(no)?oA(t,$n,Xo,no):Wa.removeEmpty&&Nu?Xo[no.name]?no.empty().remove():no.unwrap():Wa.paddEmpty&&(function(t){return QI(t,"#text")&&t.firstChild.value===Pu}(no)||Nu)&&oA(t,$n,Xo,no),no=Cf}}},a),Fa=no=new dh($n.context||t.root_name,11);if(yo.parse(Yn,$n.format),Wo&&Ur.length&&($n.context?$n.invalid=!0:function(Yn){for(var $n=F2("tr,td,th,tbody,thead,tfoot,table"),qn=a.getNonEmptyElements(),bi=a.getWhiteSpaceElements(),pi=a.getTextBlockElements(),tr=a.getSpecialElements(),Wi=function(So,ca){if(void 0===ca&&(ca=So.parent),tr[So.name])So.empty().remove();else{for(var na=0,Ul=So.children();na<Ul.length;na++){var Ic=Ul[na];a.isValidChild(ca.name,Ic.name)||Wi(Ic,ca)}So.unwrap()}},Oi=0;Oi<Yn.length;Oi++){var cr=Yn[Oi],Ur=void 0,no=void 0,es=void 0;if(cr.parent&&!cr.fixed){if(pi[cr.name]&&"li"===cr.parent.name){for(var Xo=cr.next;Xo&&pi[Xo.name];)Xo.name="li",Xo.fixed=!0,cr.parent.insert(Xo,cr.parent),Xo=Xo.next;cr.unwrap();continue}var Wr=[cr];for(Ur=cr.parent;Ur&&!a.isValidChild(Ur.name,cr.name)&&!$n[Ur.name];Ur=Ur.parent)Wr.push(Ur);if(Ur&&Wr.length>1)if(a.isValidChild(Ur.name,cr.name)){Wr.reverse();for(var qa=no=Ee(Wr[0].clone()),po=0;po<Wr.length-1;po++){a.isValidChild(qa.name,Wr[po].name)?(es=Ee(Wr[po].clone()),qa.append(es)):es=qa;for(var Wo=Wr[po].firstChild;Wo&&Wo!==Wr[po+1];){var vo=Wo.next;es.append(Wo),Wo=vo}qa=es}lS(a,qn,bi,no)?Ur.insert(cr,Wr[0],!0):(Ur.insert(no,Wr[0],!0),Ur.insert(cr,no)),Ur=Wr[0],(lS(a,qn,bi,Ur)||QI(Ur,"br"))&&Ur.empty().remove()}else Wi(cr);else if(cr.parent){if("li"===cr.name){if((Xo=cr.prev)&&("ul"===Xo.name||"ol"===Xo.name)){Xo.append(cr);continue}if((Xo=cr.next)&&("ul"===Xo.name||"ol"===Xo.name)){Xo.insert(cr,Xo.firstChild,!0);continue}cr.wrap(Ee(new dh("ul",1)));continue}a.isValidChild(cr.parent.name,"div")&&a.isValidChild("div",cr.name)?cr.wrap(Ee(new dh("div",1))):Wi(cr)}}}}(Ur)),So&&("body"===Fa.name||$n.isRootContent)&&function(){var fr=Fa.firstChild,so=null,eo=function(Wa){Wa&&((fr=Wa.firstChild)&&3===fr.type&&(fr.value=fr.value.replace(Jr,"")),(fr=Wa.lastChild)&&3===fr.type&&(fr.value=fr.value.replace(na,"")))};if(a.isValidChild(Fa.name,So.toLowerCase())){for(;fr;){var za=fr.next;3===fr.type||1===fr.type&&"p"!==fr.name&&!Xo[fr.name]&&!fr.attr("data-mce-type")?(so||((so=Op(So,1)).attr(t.forced_root_block_attrs),Fa.insert(so,fr)),so.append(fr)):(eo(so),so=null),fr=za}eo(so)}}(),!$n.invalid){for(cr in S)if(Nn(S,cr)){for(Oi=m[cr],tr=(qn=S[cr]).length;tr--;)qn[tr].parent||qn.splice(tr,1);for(bi=0,pi=Oi.length;bi<pi;bi++)Oi[bi](qn,cr,$n)}for(bi=0,pi=v.length;bi<pi;bi++)if((Oi=v[bi]).name in R){for(tr=(qn=R[Oi.name]).length;tr--;)qn[tr].parent||qn.splice(tr,1);for(tr=0,Wi=Oi.callbacks.length;tr<Wi;tr++)Oi.callbacks[tr](qn,Oi.name,$n)}}return Fa}};return function(t,a){var m=t.schema;a.remove_trailing_brs&&t.addNodeFilter("br",function(v,S,R){var ee,Se,jt,on,Rn,Yn,qn,bi,Ee=v.length,pt=Li.extend({},m.getBlockElements()),Gt=m.getNonEmptyElements(),$n=m.getWhiteSpaceElements();for(pt.body=1,ee=0;ee<Ee;ee++)if(jt=(Se=v[ee]).parent,pt[Se.parent.name]&&Se===jt.lastChild){for(Rn=Se.prev;Rn;){if("span"!==(Yn=Rn.name)||"bookmark"!==Rn.attr("data-mce-type")){"br"===Yn&&(Se=null);break}Rn=Rn.prev}Se&&(Se.remove(),lS(m,Gt,$n,jt)&&(qn=m.getElementRule(jt.name))&&(qn.removeEmpty?jt.remove():qn.paddEmpty&&oA(a,R,pt,jt)))}else{for(on=Se;jt&&jt.firstChild===on&&jt.lastChild===on&&(on=jt,!pt[jt.name]);)jt=jt.parent;on===jt&&!0!==a.padd_empty_with_br&&((bi=new dh("#text",3)).value=Pu,Se.replace(bi))}}),t.addAttributeFilter("href",function(v){var Se,pt,S=v.length;if(!a.allow_unsafe_link_target)for(;S--;){var Ee=v[S];"a"===Ee.name&&"_blank"===Ee.attr("target")&&Ee.attr("rel",(pt=void 0,pt=(Se=Ee.attr("rel"))?Li.trim(Se):"",/\b(noopener)\b/g.test(pt)?pt:function(Se){return Se.split(" ").filter(function(Gt){return Gt.length>0}).concat(["noopener"]).sort().join(" ")}(pt)))}}),a.allow_html_in_named_anchor||t.addAttributeFilter("id,name",function(v){for(var R,ee,Ee,Se,S=v.length;S--;)if("a"===(Se=v[S]).name&&Se.firstChild&&!Se.attr("href")){Ee=Se.parent,R=Se.lastChild;do{ee=R.prev,Ee.insert(R,Se),R=ee}while(R)}}),a.fix_list_elements&&t.addNodeFilter("ul,ol",function(v){for(var R,ee,S=v.length;S--;)if("ul"===(ee=(R=v[S]).parent).name||"ol"===ee.name)if(R.prev&&"li"===R.prev.name)R.prev.append(R);else{var Ee=new dh("li",1);Ee.attr("style","list-style-type: none"),R.wrap(Ee)}}),a.validate&&m.getValidClasses()&&t.addAttributeFilter("class",function(v){for(var S=m.getValidClasses(),R=v.length;R--;){for(var ee=v[R],Ee=ee.attr("class").split(" "),Se="",pt=0;pt<Ee.length;pt++){var Gt=Ee[pt],jt=!1,on=S["*"];on&&on[Gt]&&(jt=!0),on=S[ee.name],!jt&&on&&on[Gt]&&(jt=!0),jt&&(Se&&(Se+=" "),Se+=Gt)}Se.length||(Se=null),ee.attr("class",Se)}}),hF(t,a)}(Rn,t),function(t,a){a.inline_styles&&A2(t,a)}(Rn,t),Rn},z2=function(t,a,m){return function(t,a){return t&&t.hasEventListeners("PreProcess")&&!a.no_events}(t,m)?function(t,a,m){var v,S=t.dom,R=a.cloneNode(!0),ee=document.implementation;if(ee.createHTMLDocument){var Ee=ee.createHTMLDocument("");Li.each("BODY"===R.nodeName?R.childNodes:[R],function(Se){Ee.body.appendChild(Ee.importNode(Se,!0))}),R="BODY"!==R.nodeName?Ee.body.firstChild:Ee.body,v=S.doc,S.doc=Ee}return function(t,a){t.fire("PreProcess",a)}(t,Tn(Tn({},m),{node:R})),v&&(S.doc=v),R}(t,a,m):a},bF=function(t,a,m){-1===Li.inArray(a,m)&&(t.addAttributeFilter(m,function(v,S){for(var R=v.length;R--;)v[R].attr(S,null)}),a.push(m))},xF=function(t,a,m,v,S){var R=function(t,a,m){return cy(t,a).serialize(m)}(a,m,v);return function(t,a,m){if(!a.no_events&&t){var v=function(t,a){return t.fire("PostProcess",a)}(t,Tn(Tn({},a),{content:m}));return v.content}return m}(t,S,R)},DF=function(t,a){var m=["data-mce-selected"],v=a&&a.dom?a.dom:jl.DOM,S=a&&a.schema?a.schema:pd(t);t.entity_encoding=t.entity_encoding||"named",t.remove_trailing_brs=!("remove_trailing_brs"in t)||t.remove_trailing_brs;var R=vw(t,S);!function(t,a,m){t.addAttributeFilter("data-mce-tabindex",function(v,S){for(var R=v.length;R--;){var ee=v[R];ee.attr("tabindex",ee.attr("data-mce-tabindex")),ee.attr(S,null)}}),t.addAttributeFilter("src,href,style",function(v,S){for(var R="data-mce-"+S,ee=a.url_converter,Ee=a.url_converter_scope,Se=v.length;Se--;){var pt=v[Se],Gt=pt.attr(R);void 0!==Gt?(pt.attr(S,Gt.length>0?Gt:null),pt.attr(R,null)):(Gt=pt.attr(S),"style"===S?Gt=m.serializeStyle(m.parseStyle(Gt),pt.name):ee&&(Gt=ee.call(Ee,Gt,S,pt.name)),pt.attr(S,Gt.length>0?Gt:null))}}),t.addAttributeFilter("class",function(v){for(var S=v.length;S--;){var R=v[S],ee=R.attr("class");ee&&(ee=R.attr("class").replace(/(?:^|\s)mce-item-\w+(?!\S)/g,""),R.attr("class",ee.length>0?ee:null))}}),t.addAttributeFilter("data-mce-type",function(v,S,R){for(var ee=v.length;ee--;){var Ee=v[ee];"bookmark"!==Ee.attr("data-mce-type")||R.cleanup||(Ne.from(Ee.firstChild).exists(function(pt){return!du(pt.value)})?Ee.unwrap():Ee.remove())}}),t.addNodeFilter("noscript",function(v){for(var S=v.length;S--;){var R=v[S].firstChild;R&&(R.value=td.decode(R.value))}}),t.addNodeFilter("script,style",function(v,S){for(var R=function(Gt){return Gt.replace(/(<!--\[CDATA\[|\]\]-->)/g,"\n").replace(/^[\r\n]*|[\r\n]*$/g,"").replace(/^\s*((<!--)?(\s*\/\/)?\s*<!\[CDATA\[|(<!--\s*)?\/\*\s*<!\[CDATA\[\s*\*\/|(\/\/)?\s*<!--|\/\*\s*<!--\s*\*\/)\s*[\r\n]*/gi,"").replace(/\s*(\/\*\s*\]\]>\s*\*\/(-->)?|\s*\/\/\s*\]\]>(-->)?|\/\/\s*(-->)?|\]\]>|\/\*\s*-->\s*\*\/|\s*-->\s*)\s*$/g,"")},ee=v.length;ee--;){var Ee=v[ee],Se=Ee.firstChild?Ee.firstChild.value:"";if("script"===S){var pt=Ee.attr("type");pt&&Ee.attr("type","mce-no/type"===pt?null:pt.replace(/^mce\-/,"")),"xhtml"===a.element_format&&Se.length>0&&(Ee.firstChild.value="// <![CDATA[\n"+R(Se)+"\n// ]]>")}else"xhtml"===a.element_format&&Se.length>0&&(Ee.firstChild.value="\x3c!--\n"+R(Se)+"\n--\x3e")}}),t.addNodeFilter("#comment",function(v){for(var S=v.length;S--;){var R=v[S];a.preserve_cdata&&0===R.value.indexOf("[CDATA[")?(R.name="#cdata",R.type=4,R.value=m.decode(R.value.replace(/^\[CDATA\[|\]\]$/g,""))):0===R.value.indexOf("mce:protected ")&&(R.name="#text",R.type=3,R.raw=!0,R.value=unescape(R.value).substr(14))}}),t.addNodeFilter("xml:namespace,input",function(v,S){for(var R=v.length;R--;){var ee=v[R];7===ee.type?ee.remove():1===ee.type&&"input"===S&&!ee.attr("type")&&ee.attr("type","text")}}),t.addAttributeFilter("data-mce-type",function(v){Mn(v,function(S){"format-caret"===S.attr("data-mce-type")&&(S.isEmpty(t.schema.getNonEmptyElements())?S.remove():S.unwrap())})}),t.addAttributeFilter("data-mce-src,data-mce-href,data-mce-style,data-mce-selected,data-mce-expando,data-mce-type,data-mce-resize,data-mce-placeholder",function(v,S){for(var R=v.length;R--;)v[R].attr(S,null)})}(R,t,v);return{schema:S,addNodeFilter:R.addNodeFilter,addAttributeFilter:R.addAttributeFilter,serialize:function(Ee,Se){void 0===Se&&(Se={});var pt=Tn({format:"html"},Se),Gt=z2(a,Ee,pt),jt=function(t,a,m){var v=Kc(m.getInner?a.innerHTML:t.getOuterHTML(a));return m.selection||Yp(Dt.fromDom(a))?v:Li.trim(v)}(v,Gt,pt),on=function(t,a,m){var v=m.selection?Tn({forced_root_block:!1},m):m,S=t.parse(a,v);return function(t){var a=function(S){return S&&"br"===S.name},m=t.lastChild;if(a(m)){var v=m.prev;a(v)&&(m.remove(),v.remove())}}(S),S}(R,jt,pt);return"tree"===pt.format?on:xF(a,t,S,on,pt)},addRules:S.addValidElements,setRules:S.setValidElements,addTempAttr:le(bF,R,m),getTempAttrs:oe(m),getNodeFilters:R.getNodeFilters,getAttributeFilters:R.getAttributeFilters}},Y2=function(t,a){var m=DF(t,a);return{schema:m.schema,addNodeFilter:m.addNodeFilter,addAttributeFilter:m.addAttributeFilter,serialize:m.serialize,addRules:m.addRules,setRules:m.setRules,addTempAttr:m.addTempAttr,getTempAttrs:m.getTempAttrs,getNodeFilters:m.getNodeFilters,getAttributeFilters:m.getAttributeFilters}},SF=function(t,a){return void 0===a&&(a={}),function(t,a,m){return fw(t).editor.getContent(a,m)}(t,a,a.format?a.format:"html")},XI=function(t,a,m){return void 0===m&&(m={}),function(t,a,m){return fw(t).editor.setContent(a,m)}(t,a,m)},yw=jl.DOM,bw=function(t){return Ne.from(t).each(function(a){return a.destroy()})},IF=function(t){if(!t.removed){var a=t._selectionOverrides,m=t.editorUpload,v=t.getBody(),S=t.getElement();v&&t.save({is_removing:!0}),t.removed=!0,t.unbindAllNativeEvents(),t.hasHiddenInput&&S&&yw.remove(S.nextSibling),function(t){t.fire("remove")}(t),t.editorManager.remove(t),!t.inline&&v&&function(t){yw.setStyle(t.id,"display",t.orgDisplay)}(t),function(t){t.fire("detach")}(t),yw.remove(t.getContainer()),bw(a),bw(m),t.destroy()}},V2=function(t,a){var m=t.selection,v=t.dom;if(!t.destroyed){if(!a&&!t.removed)return void t.remove();a||(t.editorManager.off("beforeunload",t._beforeUnload),t.theme&&t.theme.destroy&&t.theme.destroy(),bw(m),bw(v)),function(t){var a=t.formElement;a&&(a._mceOldSubmit&&(a.submit=a._mceOldSubmit,a._mceOldSubmit=null),yw.unbind(a,"submit reset",t.formEventDelegate))}(t),function(t){t.contentAreaContainer=t.formElement=t.container=t.editorContainer=null,t.bodyElement=t.contentDocument=t.contentWindow=null,t.iframeElement=t.targetElm=null,t.selection&&(t.selection=t.selection.win=t.selection.dom=t.selection.dom.doc=null)}(t),t.destroyed=!0}},G2=function(t){return function(){for(var a=[],m=0;m<arguments.length;m++)a[m]=arguments[m];if(0===a.length)throw new Error("Can't merge zero objects");for(var v={},S=0;S<a.length;S++){var R=a[S];for(var ee in R)Nn(R,ee)&&(v[ee]=t(v[ee],R[ee]))}return v}}(function(t,a){return he(t)&&he(a)?G2(t,a):a}),OF="autoresize_on_init,content_editable_state,convert_fonts_to_spans,inline_styles,padd_empty_with_br,block_elements,boolean_attributes,editor_deselector,editor_selector,elements,file_browser_callback_types,filepicker_validator_handler,force_hex_style_colors,force_p_newlines,gecko_spellcheck,images_dataimg_filter,media_scripts,mode,move_caret_before_on_enter_elements,non_empty_elements,self_closing_elements,short_ended_elements,special,spellchecker_select_languages,spellchecker_whitelist,tab_focus,table_responsive_width,text_block_elements,text_inline_elements,toolbar_drawer,types,validate,whitespace_elements,paste_word_valid_elements,paste_retain_style_properties,paste_convert_word_fake_lists".split(","),sA="bbcode,colorpicker,contextmenu,fullpage,legacyoutput,spellchecker,textcolor".split(","),W2="imagetools,toc".split(","),j2=function(t,a){var m=function(t){var a=mi(OF,function(v){return Nn(t,v)}),m=t.forced_root_block;return(!1===m||""===m)&&a.push("forced_root_block (false only)"),Vi(a)}(t),v=function(t){var a=Li.makeMap(t.plugins," "),m=function(S){return Nn(a,S)},v=mo(mo([],mi(sA,m),!0),xn(W2,function(S){return m(S)?[S+" (moving to premium)"]:[]}),!0);return Vi(v)}(a),S=v.length>0,R=m.length>0,ee="mobile"===a.theme;if(S||R||ee){var Ee="\n- ",Se=ee?"\n\nThemes:\n- mobile":"",pt=S?"\n\nPlugins:\n- "+v.join(Ee):"",Gt=R?"\n\nSettings:\n- "+m.join(Ee):"";console.warn("The following deprecated features are currently enabled, these will be removed in TinyMCE 6.0. See https://www.tiny.cloud/docs/release-notes/6.0-upcoming-changes/ for more information."+Se+pt+Gt)}},eP=gi().deviceType,RF=eP.isTouch(),tP=eP.isPhone(),FF=eP.isTablet(),NF=["lists","autolink","autosave"],K2={table_grid:!1,object_resizing:!1,resize:!1},cS=function(t){var a=ae(t)?t.join(" "):t,m=Dn(ue(a)?a.split(" "):[],Cr);return mi(m,function(v){return v.length>0})},UF=function(t,a){var m=function(t,a){var m={},v={};return mr(t,a,Eo(m),Eo(v)),{t:m,f:v}}(a,function(v,S){return st(t,S)});return function(t,a){return{sections:oe(t),settings:oe(a)}}(m.t,m.f)},cA=function(t,a){return Nn(t.sections(),a)},Q2=function(t,a){return Ni(t,"toolbar_mode").orThunk(function(){return Ni(t,"toolbar_drawer").map(function(m){return!1===m?"wrap":m})}).getOr(a)},q2=function(t,a){var m={resize:!1,toolbar_mode:Q2(t,"scrolling"),toolbar_sticky:!1};return Tn(Tn(Tn({},K2),m),a?{menubar:!1}:{})},HF=function(t,a){var m=a.external_plugins?a.external_plugins:{};return t&&t.external_plugins?Li.extend({},t.external_plugins,m):m},ZF=function(t,a,m,v){return t&&function(t,a,m){var v=t.sections();return cA(t,a)&&v[a].theme===m}(a,"mobile","mobile")?function(t){return mi(t,le(st,NF))}(v):t&&cA(a,"mobile")?v:m},GF=function(t,a,m,v){var S=cS(m.forced_plugins),R=cS(v.plugins),ee=function(t,a){return cA(t,a)?t.sections()[a]:{}}(a,"mobile"),Ee=ee.plugins?cS(ee.plugins):R,pt=function(t,a){return[].concat(cS(t)).concat(cS(a))}(S,ZF(t,a,R,Ee));if($r.browser.isIE()&&st(pt,"rtc"))throw new Error("RTC plugin is not supported on IE 11.");return Li.extend(v,{plugins:pt.join(" ")})},Yg=function(t,a,m,v,S){var R=t?{mobile:q2(S.mobile||{},a)}:{},ee=UF(["mobile"],G2(R,S)),Ee=Li.extend(m,v,ee.settings(),function(t,a){return t&&cA(a,"mobile")}(t,ee)?function(t,a,m){void 0===m&&(m={});var v=t.sections(),S=Ni(v,a).getOr({});return Li.extend({},m,S)}(ee,"mobile"):{},{validate:!0,external_plugins:HF(v,ee.settings())});return GF(t,ee,v,Ee)},X2=function(t,a,m,v,S){var R=function(t,a,m,v,S){var R={id:a,theme:"silver",toolbar_mode:Q2(t,"floating"),plugins:"",document_base_url:m,add_form_submit_trigger:!0,submit_patch:!0,add_unload_trigger:!0,convert_urls:!0,relative_urls:!0,remove_script_host:!0,object_resizing:!0,doctype:"<!DOCTYPE html>",visual:!0,font_size_legacy_values:"xx-small,small,medium,large,x-large,xx-large,300%",forced_root_block:"p",hidden_input:!0,inline_styles:!0,convert_fonts_to_spans:!0,indent:!0,indent_before:"p,h1,h2,h3,h4,h5,h6,blockquote,div,title,style,pre,script,td,th,ul,ol,li,dl,dt,dd,area,table,thead,tfoot,tbody,tr,section,summary,article,hgroup,aside,figure,figcaption,option,optgroup,datalist",indent_after:"p,h1,h2,h3,h4,h5,h6,blockquote,div,title,style,pre,script,td,th,ul,ol,li,dl,dt,dd,area,table,thead,tfoot,tbody,tr,section,summary,article,hgroup,aside,figure,figcaption,option,optgroup,datalist",entity_encoding:"named",url_converter:S.convertURL,url_converter_scope:S};return Tn(Tn({},R),v?K2:{})}(S,a,m,RF,t),ee=Yg(tP||FF,tP,R,v,S);return!1!==ee.deprecation_warnings&&j2(S,ee),ee},tD=function(t,a,m){return Ne.from(a.settings[m]).filter(t)},KF=function(t,a,m,v){var S=a in t.settings?t.settings[a]:m;return"hash"===v?function(t){var a={};return"string"==typeof t?Mn(t.indexOf("=")>0?t.split(/[;,](?![^=;,]*(?:[;,]|$))/):t.split(","),function(m){var v=m.split("=");v.length>1?a[Li.trim(v[0])]=Li.trim(v[1]):a[Li.trim(v[0])]=Li.trim(v[0])}):a=t,a}(S):"string"===v?tD(ue,t,a).getOr(m):"number"===v?tD(Pe,t,a).getOr(m):"boolean"===v?tD(ve,t,a).getOr(m):"object"===v?tD(he,t,a).getOr(m):"array"===v?tD(ae,t,a).getOr(m):"string[]"===v?tD(function(t){return function(a){return ae(a)&&Fn(a,t)}}(ue),t,a).getOr(m):"function"===v?tD(pe,t,a).getOr(m):S},Cw=function(){var t={};return{add:function(S,R){t[S]=R},get:function(S){return t[S]?t[S]:{icons:{}}},has:function(S){return Nn(t,S)}}}(),eL=function(t,a){return a.dom[t]},tL=function(t,a){return parseInt(Ba(a,t),10)},bm=le(eL,"clientWidth"),JF=le(eL,"clientHeight"),uA=le(tL,"margin-top"),QF=le(tL,"margin-left"),MM=function(t,a,m){var v=Dt.fromDom(t.getBody()),S=t.inline?v:function(t){return Dt.fromDom(Ki(t).dom.documentElement)}(v),R=function(t,a,m,v){var S=function(t){return t.dom.getBoundingClientRect()}(a);return{x:m-(t?S.left+a.dom.clientLeft+QF(a):0),y:v-(t?S.top+a.dom.clientTop+uA(a):0)}}(t.inline,S,a,m);return function(t,a,m){var v=bm(t),S=JF(t);return a>=0&&m>=0&&a<=v&&m<=S}(S,R.x,R.y)},dA=function(t){return function(t){return Ne.from(t).map(Dt.fromDom)}(t.inline?t.getBody():t.getContentAreaContainer()).map(Qo).getOr(!1)},XC=function(t){var on,a=[],m=function(){var on=t.theme;return on&&on.getNotificationManagerImpl?on.getNotificationManagerImpl():function(){var t=function(){throw new Error("Theme did not provide a NotificationManager implementation.")};return{open:t,close:t,reposition:t,getArgs:t}}()},v=function(){return Ne.from(a[0])},R=function(){a.length>0&&m().reposition(a)},Ee=function(on){je(a,function(Rn){return Rn===on}).each(function(Rn){a.splice(Rn,1)})},Se=function(on,Rn){if(void 0===Rn&&(Rn=!0),!t.removed&&dA(t))return Rn&&t.fire("BeforeOpenNotification",{notification:on}),On(a,function(Yn){return function(on,Rn){return!(on.type!==Rn.type||on.text!==Rn.text||on.progressBar||on.timeout||Rn.progressBar||Rn.timeout)}(m().getArgs(Yn),on)}).getOrThunk(function(){t.editorManager.setActive(t);var Yn=m().open(on,function(){Ee(Yn),R(),v().fold(function(){return t.focus()},function($n){return function(t){return t.dom.focus()}(Dt.fromDom($n.getEl()))})});return function(on){a.push(on)}(Yn),R(),t.fire("OpenNotification",{notification:Tn({},Yn)}),Yn})},Gt=oe(a);return(on=t).on("SkinLoaded",function(){var Rn=function(t){return t.getParam("service_message")}(on);Rn&&Se({text:Rn,type:"warning",timeout:0},!1),R()}),on.on("show ResizeEditor ResizeWindow NodeChange",function(){Ht.requestAnimationFrame(R)}),on.on("remove",function(){Mn(a.slice(),function(Rn){m().close(Rn)})}),{open:Se,close:function(){v().each(function(on){m().close(on),Ee(on),R()})},getNotifications:Gt}},by=Ad.PluginManager,dE=Ad.ThemeManager;var iP=function(t){var a=[],m=function(){var $n=t.theme;return $n&&$n.getWindowManagerImpl?$n.getWindowManagerImpl():function nP(){var t=function(){throw new Error("Theme did not provide a WindowManager implementation.")};return{open:t,openUrl:t,alert:t,confirm:t,close:t,getParams:t,setParams:t}}()},v=function($n,qn){return function(){for(var bi=[],pi=0;pi<arguments.length;pi++)bi[pi]=arguments[pi];return qn?qn.apply($n,bi):void 0}},ee=function($n){a.push($n),function($n){t.fire("OpenWindow",{dialog:$n})}($n)},Ee=function($n){(function($n){t.fire("CloseWindow",{dialog:$n})})($n),0===(a=mi(a,function(qn){return qn!==$n})).length&&t.focus()},pt=function($n){t.editorManager.setActive(t),ZE(t);var qn=$n();return ee(qn),qn};return t.on("remove",function(){Mn(a,function($n){m().close($n)})}),{open:function($n,qn){return pt(function(){return m().open($n,qn,Ee)})},openUrl:function($n){return pt(function(){return m().openUrl($n,Ee)})},alert:function($n,qn,bi){var pi=m();pi.alert($n,v(bi||pi,qn))},confirm:function($n,qn,bi){var pi=m();pi.confirm($n,v(bi||pi,qn))},close:function(){Ne.from(a[a.length-1]).each(function($n){m().close($n),Ee($n)})}}},rP=function(t,a){t.notificationManager.open({type:"error",text:a})},Ew=function(t,a){t._skinLoaded?rP(t,a):t.on("SkinLoaded",function(){rP(t,a)})},Mw=function(t,a,m){ny(t,a,{message:m}),console.error(m)},oP=function(t,a,m){return m?"Failed to load "+t+": "+m+" from url "+a:"Failed to load "+t+" url: "+a},Tw=function(t,a,m){Mw(t,"PluginLoadError",oP("plugin",a,m))},mA=function(t){for(var a=[],m=1;m<arguments.length;m++)a[m-1]=arguments[m];var v=window.console;v&&(v.error?v.error.apply(v,mo([t],a,!1)):v.log.apply(v,mo([t],a,!1)))},aP=function(t){return oL(t,function(t){var a=t.getParam("content_css");return ue(a)?Dn(a.split(","),Cr):ae(a)?a:!1===a||t.inline?[]:["default"]}(t))},oL=function(t,a){var m=t.editorManager.baseURL+"/skins/content",S="content"+t.editorManager.suffix+".css",R=!0===t.inline;return Dn(a,function(ee){return function(t){return/^[a-z0-9\-]+$/i.test(t)}(ee)&&!R?m+"/"+ee+"/"+S:t.documentBaseURI.toAbsolute(ee)})},nN=function(t){t.contentCSS=t.contentCSS.concat(aP(t),function(t){return oL(t,xg(t))}(t))},iD=function(){var m={},v=function(on,Rn){return{status:on,resultUri:Rn}},S=function(on){return on in m};return{hasBlobUri:S,getResultUri:function(on){var Rn=m[on];return Rn?Rn.resultUri:null},isPending:function(on){return!!S(on)&&1===m[on].status},isUploaded:function(on){return!!S(on)&&2===m[on].status},markPending:function(on){m[on]=v(1,null)},markUploaded:function(on,Rn){m[on]=v(2,Rn)},removeFailed:function(on){delete m[on]},destroy:function(){m={}}}},iN=0,Fh=function(t){return t+iN+++function(){var t=function(){return Math.round(4294967295*Math.random()).toString(36)};return"s"+(new Date).getTime().toString(36)+t()+t()+t()}()},aL=function(t,a){var m={},S=function(Yn,$n,qn,bi){var pi=new XMLHttpRequest;pi.open("POST",a.url),pi.withCredentials=a.credentials,pi.upload.onprogress=function(Wi){bi(Wi.loaded/Wi.total*100)},pi.onerror=function(){qn("Image upload failed due to a XHR Transport error. Code: "+pi.status)},pi.onload=function(){if(pi.status<200||pi.status>=300)qn("HTTP Error: "+pi.status);else{var Wi=JSON.parse(pi.responseText);Wi&&"string"==typeof Wi.location?$n(function(Yn,$n){return Yn?Yn.replace(/\/$/,"")+"/"+$n.replace(/^\//,""):$n}(a.basePath,Wi.location)):qn("Invalid JSON: "+pi.responseText)}};var tr=new FormData;tr.append("file",Yn.blob(),Yn.filename()),pi.send(tr)},ee=function(Yn,$n){return{url:$n,blobInfo:Yn,status:!0}},Ee=function(Yn,$n,qn){return{url:"",blobInfo:Yn,status:!1,error:{message:$n,options:qn}}},Se=function(Yn,$n){Li.each(m[Yn],function(qn){qn($n)}),delete m[Yn]},on=function(Yn,$n){return Yn=Li.grep(Yn,function(qn){return!t.isUploaded(qn.blobUri())}),Ll.all(Li.map(Yn,function(qn){return t.isPending(qn.blobUri())?function(Yn){var $n=Yn.blobUri();return new Ll(function(qn){m[$n]=m[$n]||[],m[$n].push(qn)})}(qn):function(Yn,$n,qn){return t.markPending(Yn.blobUri()),new Ll(function(bi){var pi;try{var Wi=function(){pi&&pi.close()};$n(Yn,function(Ur){Wi(),t.markUploaded(Yn.blobUri(),Ur),Se(Yn.blobUri(),ee(Yn,Ur)),bi(ee(Yn,Ur))},function(Ur,no){var es=no||{};Wi(),t.removeFailed(Yn.blobUri()),Se(Yn.blobUri(),Ee(Yn,Ur,es)),bi(Ee(Yn,Ur,es))},function(Ur){Ur<0||Ur>100||Ne.from(pi).orThunk(function(){return Ne.from(qn).map(j)}).each(function(no){pi=no,no.progressBar.value(Ur)})})}catch(Ur){bi(Ee(Yn,Ur.message,{}))}})}(qn,a.handler,$n)}))};return!1===pe(a.handler)&&(a.handler=S),{upload:function(Yn,$n){return!a.url&&function(Yn){return Yn===S}(a.handler)?new Ll(function(Yn){Yn([])}):on(Yn,$n)}}},sP=function(t){return function(){return t.notificationManager.open({text:t.translate("Image uploading..."),type:"info",timeout:-1,progressBar:!0})}},lP=function(t,a){return aL(a,{url:ep(t),basePath:rd(t),credentials:Pf(t),handler:I_(t)})},aN=function(t){var m,v,a=function(){var t=[],a=function(jt){return{"image/jpeg":"jpg","image/jpg":"jpg","image/gif":"gif","image/png":"png","image/apng":"apng","image/avif":"avif","image/svg+xml":"svg","image/webp":"webp","image/bmp":"bmp","image/tiff":"tiff"}[jt.toLowerCase()]||"dat"},v=function(jt){if(!jt.blob||!jt.base64)throw new Error("blob and base64 representations of the image are required for BlobInfo to be created");var on=jt.id||Fh("blobid"),Rn=jt.name||on,Yn=jt.blob;return{id:oe(on),name:oe(Rn),filename:oe(jt.filename||Rn+"."+a(Yn.type)),blob:oe(Yn),base64:oe(jt.base64),blobUri:oe(jt.blobUri||URL.createObjectURL(Yn)),uri:oe(jt.uri)}},R=function(jt){return On(t,jt).getOrUndefined()},ee=function(jt){return R(function(on){return on.id()===jt})};return{create:function(jt,on,Rn,Yn,$n){if(ue(jt))return v({id:jt,name:Yn,filename:$n,blob:on,base64:Rn});if(he(jt))return v(jt);throw new Error("Unknown input type")},add:function(jt){ee(jt.id())||t.push(jt)},get:ee,getByUri:function(jt){return R(function(on){return on.blobUri()===jt})},getByData:function(jt,on){return R(function(Rn){return Rn.base64()===jt&&Rn.blob().type===on})},findFirst:R,removeByUri:function(jt){t=mi(t,function(on){return on.blobUri()!==jt||(URL.revokeObjectURL(on.blobUri()),!1)})},destroy:function(){Mn(t,function(jt){URL.revokeObjectURL(jt.blobUri())}),t=[]}}}(),S=iD(),R=[],ee=function(t){var a=nd(null);return t.on("change AddUndo",function(v){a.set(Tn({},v.level))}),{fireIfChanged:function(){var v=t.undoManager.data;An(v).filter(function(S){return!bM(a.get(),S)}).each(function(S){t.setDirty(!0),t.fire("change",{level:S,lastLevel:Vn(v,v.length-2).getOrNull()})})}}}(t),Ee=function(Wi){return function(Oi){return t.selection?Wi(Oi):[]}},Se=function(Wi){return Wi+(-1===Wi.indexOf("?")?"?":"&")+(new Date).getTime()},pt=function(Wi,Oi,cr){var Ur=0;do{-1!==(Ur=Wi.indexOf(Oi,Ur))&&(Wi=Wi.substring(0,Ur)+cr+Wi.substr(Ur+Oi.length),Ur+=cr.length-Oi.length+1)}while(-1!==Ur);return Wi},Gt=function(Wi,Oi,cr){var Ur='src="'+cr+'"'+(cr===$r.transparentSrc?' data-mce-placeholder="1"':"");return Wi=pt(Wi,'src="'+Oi+'"',Ur),Wi=pt(Wi,'data-mce-src="'+Oi+'"','data-mce-src="'+cr+'"')},jt=function(Wi,Oi){Mn(t.undoManager.data,function(cr){"fragmented"===cr.type?cr.fragments=Dn(cr.fragments,function(Ur){return Gt(Ur,Wi,Oi)}):cr.content=Gt(cr.content,Wi,Oi)})},Rn=function(Wi){return m||(m=lP(t,S)),bi().then(Ee(function(Oi){var cr=Dn(Oi,function(Ur){return Ur.blobInfo});return m.upload(cr,sP(t)).then(Ee(function(Ur){var no=[],es=Dn(Ur,function(Xo,Wr){var qa=Oi[Wr].blobInfo,po=Oi[Wr].image;return Xo.status&&function(t){return t.getParam("images_replace_blob_uris",!0,"boolean")}(t)?(a.removeByUri(po.src),EM(t)||function(Wi,Oi){var cr=t.convertURL(Oi,"src");jt(Wi.src,Oi),t.$(Wi).attr({src:Pb(t)?Se(Oi):Oi,"data-mce-src":cr})}(po,Xo.url)):Xo.error&&(Xo.error.options.remove&&(jt(po.getAttribute("src"),$r.transparentSrc),no.push(po)),function(t,a){Ew(t,gu.translate(["Failed to upload image: {0}",a]))}(t,Xo.error.message)),{element:po,status:Xo.status,uploadUri:Xo.url,blobInfo:qa}});return es.length>0&&ee.fireIfChanged(),no.length>0&&(EM(t)?console.error("Removing images on failed uploads is currently unsupported for RTC"):t.undoManager.transact(function(){Mn(no,function(Xo){t.dom.remove(Xo),a.removeByUri(Xo.src)})})),Wi&&Wi(es),es}))}))},Yn=function(Wi){if(Yv(t))return Rn(Wi)},$n=function(Wi){if(!1===Fn(R,function(cr){return cr(Wi)}))return!1;if(0===Wi.getAttribute("src").indexOf("data:")){var Oi=function(t){return t.getParam("images_dataimg_filter",nt,"function")}(t);return Oi(Wi)}return!0},bi=function(){return v||(v=P2(S,a)),v.findAll(t.getBody(),$n).then(Ee(function(Wi){return Wi=mi(Wi,function(Oi){return"string"!=typeof Oi||(Ew(t,Oi),!1)}),EM(t)||Mn(Wi,function(Oi){jt(Oi.image.src,Oi.blobInfo.blobUri()),Oi.image.src=Oi.blobInfo.blobUri(),Oi.image.removeAttribute("data-mce-src")}),Wi}))},tr=function(Wi){return Wi.replace(/src="(blob:[^"]+)"/g,function(Oi,cr){var Ur=S.getResultUri(cr);if(Ur)return'src="'+Ur+'"';var no=a.getByUri(cr);return no||(no=Bn(t.editorManager.get(),function(Xo,Wr){return Xo||Wr.editorUpload&&Wr.editorUpload.blobCache.getByUri(cr)},null)),no?'src="data:'+no.blob().type+";base64,"+no.base64()+'"':Oi})};return t.on("SetContent",function(){Yv(t)?Yn():bi()}),t.on("RawSaveContent",function(Wi){Wi.content=tr(Wi.content)}),t.on("GetContent",function(Wi){Wi.source_view||"raw"===Wi.format||"tree"===Wi.format||(Wi.content=tr(Wi.content))}),t.on("PostRender",function(){t.parser.addNodeFilter("img",function(Wi){Mn(Wi,function(Oi){var cr=Oi.attr("src");if(!a.getByUri(cr)){var Ur=S.getResultUri(cr);Ur&&Oi.attr("src",Ur)}})})}),{blobCache:a,addFilter:function(Wi){R.push(Wi)},uploadImages:Rn,uploadImagesAuto:Yn,scanForImages:bi,destroy:function(){a.destroy(),S.destroy(),v=m=null}}},lN=function(t){var a={},S=function(ee,Ee){ee&&(ue(ee)?(ae(Ee)||(Ee=[Ee]),Mn(Ee,function(Se){ye(Se.deep)&&(Se.deep=!Oh(Se)),ye(Se.split)&&(Se.split=!Oh(Se)||Qm(Se)),ye(Se.remove)&&Oh(Se)&&!Qm(Se)&&(Se.remove="none"),Oh(Se)&&Qm(Se)&&(Se.mixed=!0,Se.block_expand=!0),ue(Se.classes)&&(Se.classes=Se.classes.split(/\s+/))}),a[ee]=Ee):Hi(ee,function(Se,pt){S(pt,Se)}))};return S(function(t){var a={valigntop:[{selector:"td,th",styles:{verticalAlign:"top"}}],valignmiddle:[{selector:"td,th",styles:{verticalAlign:"middle"}}],valignbottom:[{selector:"td,th",styles:{verticalAlign:"bottom"}}],alignleft:[{selector:"figure.image",collapsed:!1,classes:"align-left",ceFalseOverride:!0,preview:"font-family font-size"},{selector:"figure,p,h1,h2,h3,h4,h5,h6,td,th,tr,div,ul,ol,li",styles:{textAlign:"left"},inherit:!1,preview:!1,defaultBlock:"div"},{selector:"img,table,audio,video",collapsed:!1,styles:{float:"left"},preview:"font-family font-size"}],aligncenter:[{selector:"figure,p,h1,h2,h3,h4,h5,h6,td,th,tr,div,ul,ol,li",styles:{textAlign:"center"},inherit:!1,preview:"font-family font-size",defaultBlock:"div"},{selector:"figure.image",collapsed:!1,classes:"align-center",ceFalseOverride:!0,preview:"font-family font-size"},{selector:"img,audio,video",collapsed:!1,styles:{display:"block",marginLeft:"auto",marginRight:"auto"},preview:!1},{selector:"table",collapsed:!1,styles:{marginLeft:"auto",marginRight:"auto"},preview:"font-family font-size"}],alignright:[{selector:"figure.image",collapsed:!1,classes:"align-right",ceFalseOverride:!0,preview:"font-family font-size"},{selector:"figure,p,h1,h2,h3,h4,h5,h6,td,th,tr,div,ul,ol,li",styles:{textAlign:"right"},inherit:!1,preview:"font-family font-size",defaultBlock:"div"},{selector:"img,table,audio,video",collapsed:!1,styles:{float:"right"},preview:"font-family font-size"}],alignjustify:[{selector:"figure,p,h1,h2,h3,h4,h5,h6,td,th,tr,div,ul,ol,li",styles:{textAlign:"justify"},inherit:!1,defaultBlock:"div",preview:"font-family font-size"}],bold:[{inline:"strong",remove:"all",preserve_attributes:["class","style"]},{inline:"span",styles:{fontWeight:"bold"}},{inline:"b",remove:"all",preserve_attributes:["class","style"]}],italic:[{inline:"em",remove:"all",preserve_attributes:["class","style"]},{inline:"span",styles:{fontStyle:"italic"}},{inline:"i",remove:"all",preserve_attributes:["class","style"]}],underline:[{inline:"span",styles:{textDecoration:"underline"},exact:!0},{inline:"u",remove:"all",preserve_attributes:["class","style"]}],strikethrough:[{inline:"span",styles:{textDecoration:"line-through"},exact:!0},{inline:"strike",remove:"all",preserve_attributes:["class","style"]},{inline:"s",remove:"all",preserve_attributes:["class","style"]}],forecolor:{inline:"span",styles:{color:"%value"},links:!0,remove_similar:!0,clear_child_styles:!0},hilitecolor:{inline:"span",styles:{backgroundColor:"%value"},links:!0,remove_similar:!0,clear_child_styles:!0},fontname:{inline:"span",toggle:!1,styles:{fontFamily:"%value"},clear_child_styles:!0},fontsize:{inline:"span",toggle:!1,styles:{fontSize:"%value"},clear_child_styles:!0},lineheight:{selector:"h1,h2,h3,h4,h5,h6,p,li,td,th,div",defaultBlock:"p",styles:{lineHeight:"%value"}},fontsize_class:{inline:"span",attributes:{class:"%value"}},blockquote:{block:"blockquote",wrapper:!0,remove:"all"},subscript:{inline:"sub"},superscript:{inline:"sup"},code:{inline:"code"},link:{inline:"a",selector:"a",remove:"all",split:!0,deep:!0,onmatch:function(m,v,S){return la(m)&&m.hasAttribute("href")},onformat:function(m,v,S){Li.each(S,function(R,ee){t.setAttrib(m,ee,R)})}},lang:{inline:"span",clear_child_styles:!0,remove_similar:!0,attributes:{lang:"%value","data-mce-lang":function(m){var v;return null!==(v=m?.customValue)&&void 0!==v?v:null}}},removeformat:[{selector:"b,strong,em,i,font,u,strike,s,sub,sup,dfn,code,samp,kbd,var,cite,mark,q,del,ins,small",remove:"all",split:!0,expand:!1,block_expand:!0,deep:!0},{selector:"span",attributes:["style","class"],remove:"empty",split:!0,expand:!1,deep:!0},{selector:"*",attributes:["style","class"],split:!1,expand:!1,deep:!0}]};return Li.each("p h1 h2 h3 h4 h5 h6 div address pre dt dd samp".split(/\s/),function(m){a[m]={block:m,remove:"all"}}),a}(t.dom)),S(function(t){return t.getParam("formats")}(t)),{get:function(ee){return ne(ee)?a[ee]:a},has:function(ee){return Nn(a,ee)},register:S,unregister:function(ee){return ee&&a[ee]&&delete a[ee],a}}},xw=Li.each,Z_=jl.DOM,e1=function(t,a){var m,v,S,R=a&&a.schema||pd({}),Ee=function(Gt){v="string"==typeof Gt?{name:Gt,classes:[],attrs:{}}:Gt;var jt=Z_.create(v.name);return function(Gt,jt){jt.classes.length&&Z_.addClass(Gt,jt.classes.join(" ")),Z_.setAttribs(Gt,jt.attrs)}(jt,v),jt},pt=function(Gt,jt,on){var Rn,Yn,$n=jt.length>0&&jt[0],qn=$n&&$n.name,bi=function(Gt,jt){var on="string"!=typeof Gt?Gt.nodeName.toLowerCase():Gt,Rn=R.getElementRule(on),Yn=Rn&&Rn.parentsRequired;return!(!Yn||!Yn.length)&&(jt&&-1!==Li.inArray(Yn,jt)?jt:Yn[0])}(Gt,qn);if(bi)qn===bi?(Yn=jt[0],jt=jt.slice(1)):Yn=bi;else if($n)Yn=jt[0],jt=jt.slice(1);else if(!on)return Gt;return Yn&&(Rn=Ee(Yn)).appendChild(Gt),on&&(Rn||(Rn=Z_.create("div")).appendChild(Gt),Li.each(on,function(pi){var tr=Ee(pi);Rn.insertBefore(tr,Gt)})),pt(Rn,jt,Yn&&Yn.siblings)};return t&&t.length?(v=t[0],m=Ee(v),(S=Z_.create("div")).appendChild(pt(m,t.slice(1),v.siblings)),S):""},cN=function(t){var a,m={classes:[],attrs:{}};return"*"!==(t=m.selector=Li.trim(t))&&(a=t.replace(/(?:([#\.]|::?)([\w\-]+)|(\[)([^\]]+)\]?)/g,function(v,S,R,ee,Ee){switch(S){case"#":m.attrs.id=R;break;case".":m.classes.push(R);break;case":":-1!==Li.inArray("checked disabled enabled read-only required".split(" "),R)&&(m.attrs[R]=R)}if("["===ee){var Se=Ee.match(/([\w\-]+)(?:\=\"([^\"]+))?/);Se&&(m.attrs[Se[1]]=Se[2])}return""})),m.name=a||"div",m},dN=function(t,a){var m,v,R,S="",ee=function(t){var a=t.getParam("preview_styles","font-family font-size font-weight font-style text-decoration text-transform color background-color border border-radius outline text-shadow");return ue(a)?a:""}(t);if(""===ee)return"";var Ee=function(jt){return jt.replace(/%(\w+)/g,"")};if("string"==typeof a){if(!(a=t.formatter.get(a)))return;a=a[0]}if("preview"in a){var Se=Ni(a,"preview");if(_l(Se,!1))return"";ee=Se.getOr(ee)}m=a.block||a.inline||"span";var pt=function(t){return t&&"string"==typeof t?(t=(t=t.split(/\s*,\s*/)[0]).replace(/\s*(~\+|~|\+|>)\s*/g,"$1"),Li.map(t.split(/(?:>|\s+(?![^\[\]]+\]))/),function(a){var m=Li.map(a.split(/(?:~\+|~|\+)/),cN),v=m.pop();return m.length&&(v.siblings=m),v}).reverse()):[]}(a.selector);pt.length?(pt[0].name||(pt[0].name=m),m=a.selector,v=e1(pt,t)):v=e1([m],t);var Gt=Z_.select(m,v)[0]||v.firstChild;return xw(a.styles,function(jt,on){var Rn=Ee(jt);Rn&&Z_.setStyle(Gt,on,Rn)}),xw(a.attributes,function(jt,on){var Rn=Ee(jt);Rn&&Z_.setAttrib(Gt,on,Rn)}),xw(a.classes,function(jt){var on=Ee(jt);Z_.hasClass(Gt,on)||Z_.addClass(Gt,on)}),t.fire("PreviewFormats"),Z_.setStyles(v,{position:"absolute",left:-65535}),t.getBody().appendChild(v),R=Z_.getStyle(t.getBody(),"fontSize",!0),R=/px$/.test(R)?parseInt(R,10):0,xw(ee.split(" "),function(jt){var on=Z_.getStyle(Gt,jt,!0);if(!("background-color"===jt&&/transparent|rgba\s*\([^)]+,\s*0\)/.test(on)&&(on=Z_.getStyle(t.getBody(),jt,!0),"#ffffff"===Z_.toHex(on).toLowerCase())||"color"===jt&&"#000000"===Z_.toHex(on).toLowerCase())){if("font-size"===jt&&/em|%$/.test(on)){if(0===R)return;on=parseFloat(on)/(/%$/.test(on)?100:1)*R+"px"}"border"===jt&&on&&(S+="padding:0 2px;"),S+=jt+":"+on+";"}}),t.fire("AfterPreviewFormats"),Z_.remove(v),S},lL=function(t){var a=lN(t),m=nd(null);return function(t){t.addShortcut("meta+b","","Bold"),t.addShortcut("meta+i","","Italic"),t.addShortcut("meta+u","","Underline");for(var a=1;a<=6;a++)t.addShortcut("access+"+a,"",["FormatBlock",!1,"h"+a]);t.addShortcut("access+7","",["FormatBlock",!1,"p"]),t.addShortcut("access+8","",["FormatBlock",!1,"div"]),t.addShortcut("access+9","",["FormatBlock",!1,"address"])}(t),fe(t),{get:a.get,has:a.has,register:a.register,unregister:a.unregister,apply:function(v,S,R){!function(t,a,m,v){mh(t).formatter.apply(a,m,v)}(t,v,S,R)},remove:function(v,S,R,ee){!function(t,a,m,v,S){mh(t).formatter.remove(a,m,v,S)}(t,v,S,R,ee)},toggle:function(v,S,R){!function(t,a,m,v){mh(t).formatter.toggle(a,m,v)}(t,v,S,R)},match:function(v,S,R,ee){return function(t,a,m,v,S){return mh(t).formatter.match(a,m,v,S)}(t,v,S,R,ee)},closest:function(v){return function(t,a){return mh(t).formatter.closest(a)}(t,v)},matchAll:function(v,S){return function(t,a,m){return mh(t).formatter.matchAll(a,m)}(t,v,S)},matchNode:function(v,S,R,ee){return function(t,a,m,v,S){return mh(t).formatter.matchNode(a,m,v,S)}(t,v,S,R,ee)},canApply:function(v){return function(t,a){return mh(t).formatter.canApply(a)}(t,v)},formatChanged:function(v,S,R,ee){return function(t,a,m,v,S,R){return mh(t).formatter.formatChanged(a,m,v,S,R)}(t,m,v,S,R,ee)},getCssText:le(dN,t)}},Cm=function(t){switch(t.toLowerCase()){case"undo":case"redo":case"mcerepaint":case"mcefocus":return!0;default:return!1}},cC=function(t){var a=$h(),m=nd(0),v=nd(0),S={data:[],typing:!1,beforeChange:function(){!function(t,a,m){mh(t).undoManager.beforeChange(a,m)}(t,m,a)},add:function(R,ee){return function(t,a,m,v,S,R,ee){return mh(t).undoManager.add(a,m,v,S,R,ee)}(t,S,v,m,a,R,ee)},undo:function(){return function(t,a,m,v){return mh(t).undoManager.undo(a,m,v)}(t,S,m,v)},redo:function(){return function(t,a,m){return mh(t).undoManager.redo(a,m)}(t,v,S.data)},clear:function(){!function(t,a,m){mh(t).undoManager.clear(a,m)}(t,S,v)},reset:function(){!function(t,a){mh(t).undoManager.reset(a)}(t,S)},hasUndo:function(){return function(t,a,m){return mh(t).undoManager.hasUndo(a,m)}(t,S,v)},hasRedo:function(){return function(t,a,m){return mh(t).undoManager.hasRedo(a,m)}(t,S,v)},transact:function(R){return function(t,a,m,v){return mh(t).undoManager.transact(a,m,v)}(t,S,m,R)},ignore:function(R){!function(t,a,m){mh(t).undoManager.ignore(a,m)}(t,m,R)},extra:function(R,ee){!function(t,a,m,v,S){mh(t).undoManager.extra(a,m,v,S)}(t,S,v,R,ee)}};return EM(t)||function(t,a,m){var v=nd(!1),S=function(Se){CM(a,!1,m),a.add({},Se)};t.on("init",function(){a.add()}),t.on("BeforeExecCommand",function(Se){var pt=Se.command;Cm(pt)||(mw(a,m),a.beforeChange())}),t.on("ExecCommand",function(Se){var pt=Se.command;Cm(pt)||S(Se)}),t.on("ObjectResizeStart cut",function(){a.beforeChange()}),t.on("SaveContent ObjectResized blur",S),t.on("dragend",S),t.on("keyup",function(Se){var pt=Se.keyCode;Se.isDefaultPrevented()||((pt>=33&&pt<=36||pt>=37&&pt<=40||45===pt||Se.ctrlKey)&&(S(),t.nodeChanged()),(46===pt||8===pt)&&t.nodeChanged(),v.get()&&a.typing&&!1===bM(sS(t),a.data[0])&&(!1===t.isDirty()&&(t.setDirty(!0),t.fire("change",{level:a.data[0],lastLevel:null})),t.fire("TypingUndo"),v.set(!1),t.nodeChanged()))}),t.on("keydown",function(Se){var pt=Se.keyCode;if(!Se.isDefaultPrevented()){if(pt>=33&&pt<=36||pt>=37&&pt<=40||45===pt)return void(a.typing&&S(Se));var Gt=Se.ctrlKey&&!Se.altKey||Se.metaKey;(pt<16||pt>20)&&224!==pt&&91!==pt&&!a.typing&&!Gt&&(a.beforeChange(),CM(a,!0,m),a.add({},Se),v.set(!0))}}),t.on("mousedown",function(Se){a.typing&&S(Se)}),t.on("input",function(Se){Se.inputType&&(function(Se){return"insertReplacementText"===Se.inputType}(Se)||function(Se){return"insertText"===Se.inputType&&null===Se.data}(Se)||function(Se){return"insertFromPaste"===Se.inputType||"insertFromDrop"===Se.inputType}(Se))&&S(Se)}),t.on("AddUndo Undo Redo ClearUndos",function(Se){Se.isDefaultPrevented()||t.nodeChanged()})}(t,S,m),function(t){t.addShortcut("meta+z","","Undo"),t.addShortcut("meta+y,meta+shift+z","","Redo")}(t),S},dL=[9,27,Ua.HOME,Ua.END,19,20,44,144,145,33,34,45,16,17,18,91,92,93,Ua.DOWN,Ua.UP,Ua.LEFT,Ua.RIGHT].concat($r.browser.isFirefox()?[224]:[]),pL="data-mce-placeholder",mL=function(t){return"keydown"===t.type||"keyup"===t.type},Dw=function(t){var a=t.keyCode;return a===Ua.BACKSPACE||a===Ua.DELETE},fL=function(t){var a=t.dom,m=hm(t),v=function(t){return t.getParam("placeholder",wh.getAttrib(t.getElement(),"placeholder"),"string")}(t),S=function(R,ee){if(!function(t){if(mL(t)){var a=t.keyCode;return!Dw(t)&&(Ua.metaKeyPressed(t)||t.altKey||a>=112&&a<=123||st(dL,a))}return!1}(R)){var Ee=t.getBody(),Se=!function(t){return mL(t)&&!(Dw(t)||"keyup"===t.type&&229===t.keyCode)}(R)&&function(t,a,m){if(Ns(Dt.fromDom(a),!1)){var v=""===m,S=a.firstElementChild;return!S||!t.getStyle(a.firstElementChild,"padding-left")&&!t.getStyle(a.firstElementChild,"padding-right")&&(v?!t.isBlock(S):m===S.nodeName.toLowerCase())}return!1}(a,Ee,m);(""!==a.getAttrib(Ee,pL)!==Se||ee)&&(a.setAttrib(Ee,pL,Se?v:null),a.setAttrib(Ee,"aria-placeholder",Se?v:null),function(t,a){t.fire("PlaceholderToggle",{state:a})}(t,Se),t.on(Se?"keydown":"keyup",S),t.off(Se?"keyup":"keydown",S))}};v&&t.on("init",function(R){S(R,!0),t.on("change SetContent ExecCommand",S),t.on("paste",function(ee){return Ht.setEditorTimeout(t,function(){return S(ee)})})})},hL=/[\u0591-\u07FF\uFB1D-\uFDFF\uFE70-\uFEFC]/,zT=function(t,a){return qr(Dt.fromDom(a),function(t){return t.getParam("inline_boundaries_selector","a[href],code,.mce-annotation","string")}(t))},dP=function(t){return"rtl"===jl.DOM.getStyle(t,"direction",!0)||function(t){return hL.test(t)}(t.textContent)},YT=function(t,a,m){var v=function(t,a,m){return mi(jl.DOM.getParents(m.container(),"*",a),t)}(t,a,m);return Ne.from(v[v.length-1])},a0=function(t,a){if(!a)return a;var m=a.container(),v=a.offset();return t?Sl(m)?Kr(m.nextSibling)?Tr(m.nextSibling,0):Tr.after(m):ta(a)?Tr(m,v+1):a:Sl(m)?Kr(m.previousSibling)?Tr(m.previousSibling,m.previousSibling.data.length):Tr.before(m):pu(a)?Tr(m,v-1):a},gL=le(a0,!0),_L=le(a0,!1),_N=function(t){return qu(t)||uu(t)},hA=function(t,a){return Ra(t,a)?Ef(a,_N,function(t){return function(a){return Ao(t,Dt.fromDom(a.dom.parentNode))}}(t)):Ne.none()},pP=function(t){t.dom.isEmpty(t.getBody())&&(t.setContent(""),function(t){var a=t.getBody(),m=a.firstChild&&t.dom.isBlock(a.firstChild)?a.firstChild:a;t.selection.setCursorLocation(m,0)}(t))},HT=function(t,a){return{from:t,to:a}},mP=function(t,a){var m=Dt.fromDom(t),v=Dt.fromDom(a.container());return hA(m,v).map(function(S){return function(t,a){return{block:t,position:a}}(S,a)})},TN=function(t,a,m){var v=mP(t,Tr.fromRangeStart(m)),S=v.bind(function(R){return Ea(a,t,R.position).bind(function(ee){return mP(t,ee).map(function(Ee){return function(t,a,m){return _a(m.position.getNode())&&!1===Ns(m.block)?fs(!1,m.block.dom).bind(function(v){return v.isEqual(m.position)?Ea(a,t,v).bind(function(S){return mP(t,S)}):Ne.some(m)}).getOr(m):m}(t,a,Ee)})})});return Gs(v,S,HT).filter(function(R){return function(t){return!1===Ao(t.from.block,t.to.block)}(R)&&function(t){return qi(t.from.block).bind(function(a){return qi(t.to.block).filter(function(m){return Ao(a,m)})}).isSome()}(R)&&function(t){return!1===Os(t.from.block.dom)&&!1===Os(t.to.block.dom)}(R)})},yL=function(t){var a=function(t){var a=Qs(t);return je(a,ll).fold(oe(a),function(m){return a.slice(0,m)})}(t);return Mn(a,Dr),a},bL=function(t,a){var m=db(a,t);return On(m.reverse(),function(v){return Ns(v)}).each(Dr)},AN=function(t,a,m,v){if(Ns(m))return py(m),ou(m.dom);(function(t){return 0===mi(Ka(t),function(a){return!Ns(a)}).length})(v)&&Ns(a)&&_c(v,Dt.fromTag("br"));var S=Ys(m.dom,Tr.before(v.dom));return Mn(yL(a),function(R){_c(v,R)}),bL(t,a),S},gA=function(t,a,m){if(Ns(m))return Dr(m),Ns(a)&&py(a),ou(a.dom);var v=au(m.dom);return Mn(yL(a),function(S){ac(m,S)}),bL(t,a),v},fP=function(t,a){return Ra(a,t)?function(t,a){var m=db(a,t);return Ne.from(m[m.length-1])}(a,t):Ne.none()},CL=function(t,a){fs(t,a.dom).map(function(m){return m.getNode()}).map(Dt.fromDom).filter(Fd).each(Dr)},EL=function(t,a,m){return CL(!0,a),CL(!1,m),fP(a,m).fold(le(gA,t,a,m),le(AN,t,a,m))},ML=function(t,a,m,v){return a?EL(t,v,m):EL(t,m,v)},Sw=function(t,a){var m=Dt.fromDom(t.getBody()),v=function(t,a,m){return m.collapsed?TN(t,a,m):Ne.none()}(m.dom,a,t.selection.getRng()).bind(function(S){return ML(m,a,S.from.block,S.to.block)});return v.each(function(S){t.selection.setRng(S.toRange())}),v.isSome()},VT=function(t,a){var m=Dt.fromDom(a),v=le(Ao,t);return am(m,mc,v).isSome()},ww=function(t,a){var m=Ys(t.dom,Tr.fromRangeStart(a)).isNone(),v=Bs(t.dom,Tr.fromRangeEnd(a)).isNone();return!function(t,a){return VT(t,a.startContainer)||VT(t,a.endContainer)}(t,a)&&m&&v},aD=function(t){var a=Dt.fromDom(t.getBody()),m=t.selection.getRng();return ww(a,m)?function(t){return t.setContent(""),t.selection.setCursorLocation(),!0}(t):function(t,a){var m=a.getRng();return Gs(hA(t,Dt.fromDom(m.startContainer)),hA(t,Dt.fromDom(m.endContainer)),function(v,S){return!1===Ao(v,S)&&(m.deleteContents(),ML(t,!0,v,S).each(function(R){a.setRng(R.toRange())}),!0)}).getOr(!1)}(a,t.selection)},sD=function(t,a){return!t.selection.isCollapsed()&&aD(t)},Iw=$l,TL=Os,t1=function(t,a,m,v,S){return Ne.from(a._selectionOverrides.showCaret(t,m,v,S))},lD=function(t,a){return t.fire("BeforeObjectSelected",{target:a}).isDefaultPrevented()?Ne.none():Ne.some(function(t){var a=t.ownerDocument.createRange();return a.selectNode(t),a}(a))},gP=function(t,a,m){var v=Ub(1,t.getBody(),a),S=Tr.fromRangeStart(v),R=S.getNode();if(rg(R))return t1(1,t,R,!S.isAtEnd(),!1);var ee=S.getNode(!0);if(rg(ee))return t1(1,t,ee,!1,!1);var Ee=t.dom.getParent(S.getNode(),function(Se){return TL(Se)||Iw(Se)});return rg(Ee)?t1(1,t,Ee,!1,m):Ne.none()},ZT=function(t,a,m){return a.collapsed?gP(t,a,m).getOr(a):a},xL=function(t){return V0(t)||vf(t)},DL=function(t){return nl(t)||dy(t)},_A=function(t,a,m,v,S,R){return t1(v,t,R.getNode(!S),S,!0).each(function(ee){if(a.collapsed){var Ee=a.cloneRange();S?Ee.setEnd(ee.startContainer,ee.startOffset):Ee.setStart(ee.endContainer,ee.endOffset),Ee.deleteContents()}else a.deleteContents();t.selection.setRng(ee)}),function(t,a){Kr(a)&&0===a.data.length&&t.remove(a)}(t.dom,m),!0},vA=function(t,a){return function(t,a){var m=t.selection.getRng();if(!Kr(m.commonAncestorContainer))return!1;var v=a?Vd.Forwards:Vd.Backwards,S=zn(t.getBody()),R=le(o_,a?S.next:S.prev),ee=a?xL:DL,Ee=Jv(v,t.getBody(),m),Se=a0(a,R(Ee));if(!Se||!x0(Ee,Se))return!1;if(ee(Se))return _A(t,m,Ee.getNode(),v,a,Se);var pt=R(Se);return!!(pt&&ee(pt)&&x0(Se,pt))&&_A(t,m,Ee.getNode(),v,a,pt)}(t,a)},Cy=Go_generate([{remove:["element"]},{moveToElement:["element"]},{moveToPosition:["position"]}]),DM=function(t,a,m){return Ea(a,t,m).bind(function(v){return function(t){return mc(Dt.fromDom(t))||uu(Dt.fromDom(t))}(v.getNode())||function(t,a,m,v){var S=function(R){return Hl(Dt.fromDom(R))&&!nh(m,v,t)};return zb(!a,m).fold(function(){return zb(a,v).fold(Be,S)},S)}(t,a,m,v)?Ne.none():a&&Os(v.getNode())||!1===a&&Os(v.getNode(!0))?function(t,a,m,v){var S=v.getNode(!1===a);return hA(Dt.fromDom(t),Dt.fromDom(m.getNode())).map(function(R){return Ns(R)?Cy.remove(R.dom):Cy.moveToElement(S)}).orThunk(function(){return Ne.some(Cy.moveToElement(S))})}(t,a,m,v):a&&nl(m)||!1===a&&V0(m)?Ne.some(Cy.moveToPosition(v)):Ne.none()})},PN=function(t,a,m){return function(t,a){var m=a.getNode(!1===t),v=t?"after":"before";return la(m)&&m.getAttribute("data-mce-caret")===v}(a,m)?function(t,a){return t&&Os(a.nextSibling)?Ne.some(Cy.moveToElement(a.nextSibling)):!1===t&&Os(a.previousSibling)?Ne.some(Cy.moveToElement(a.previousSibling)):Ne.none()}(a,m.getNode(!1===a)).fold(function(){return DM(t,a,m)},Ne.some):DM(t,a,m).bind(function(v){return function(t,a,m){return m.fold(function(v){return Ne.some(Cy.remove(v))},function(v){return Ne.some(Cy.moveToElement(v))},function(v){return nh(a,v,t)?Ne.none():Ne.some(Cy.moveToPosition(v))})}(t,m,v)})},PL=function(t,a){return Ne.from(O0(t.getBody(),a))},FN=function(t,a){var m=t.selection.getNode();return PL(t,m).filter(Os).fold(function(){return function(t,a,m){var v=Ub(a?1:-1,t,m),S=Tr.fromRangeStart(v),R=Dt.fromDom(t);return!1===a&&nl(S)?Ne.some(Cy.remove(S.getNode(!0))):a&&V0(S)?Ne.some(Cy.remove(S.getNode())):!1===a&&V0(S)&&mT(R,S)?Gu(R,S).map(function(ee){return Cy.remove(ee.getNode())}):a&&nl(S)&&nM(R,S)?ka(R,S).map(function(ee){return Cy.remove(ee.getNode())}):PN(t,a,S)}(t.getBody(),a,t.selection.getRng()).exists(function(v){return v.fold(function(t,a){return function(m){return t._selectionOverrides.hideFakeCaret(),K0(t,a,Dt.fromDom(m)),!0}}(t,a),function(t,a){return function(m){var v=a?Tr.before(m):Tr.after(m);return t.selection.setRng(v.toRange()),!0}}(t,a),function(t){return function(a){return t.selection.setRng(a.toRange()),!0}}(t))})},nt)},BN=function(t,a){var m=t.selection.getNode();return!(!Os(m)||yu(m))&&PL(t,m.parentNode).filter(Os).fold(function(){return function(t){Mn(iu(t,".mce-offscreen-selection"),Dr)}(Dt.fromDom(t.getBody())),K0(t,a,Dt.fromDom(t.selection.getNode())),pP(t),!0},nt)},OL=function(t){var a=t.dom,m=t.selection,v=O0(t.getBody(),m.getNode());if($l(v)&&a.isBlock(v)&&a.isEmpty(v)){var S=a.create("br",{"data-mce-bogus":"1"});a.setHTML(v,""),v.appendChild(S),m.setRng(Tr.before(S).toRange())}return!0},Pw=function(t,a){return t.selection.isCollapsed()?FN(t,a):BN(t,a)},dS=function(t,a){return!!t.selection.isCollapsed()&&function(t,a){var m=Tr.fromRangeStart(t.selection.getRng());return Ea(a,t.getBody(),m).filter(function(v){return a?q1(v):KA(v)}).bind(function(v){return Ne.from(O_(a?0:-1,v))}).exists(function(v){return t.selection.select(v),!0})}(t,a)},cD=Kr,LL=function(t){return cD(t)&&t.data[0]===Ti},kL=function(t){return cD(t)&&t.data[t.data.length-1]===Ti},yP=function(t){return t.ownerDocument.createTextNode(Ti)},yA=function(t,a){return t?function(t){if(cD(t.previousSibling))return kL(t.previousSibling)||t.previousSibling.appendData(Ti),t.previousSibling;if(cD(t))return LL(t)||t.insertData(0,Ti),t;var a=yP(t);return t.parentNode.insertBefore(a,t),a}(a):function(t){if(cD(t.nextSibling))return LL(t.nextSibling)||t.nextSibling.insertData(0,Ti),t.nextSibling;if(cD(t))return kL(t)||t.appendData(Ti),t;var a=yP(t);return t.nextSibling?t.parentNode.insertBefore(a,t.nextSibling):t.parentNode.appendChild(a),a}(a)},FL=le(yA,!0),CP=le(yA,!1),NL=function(t,a){return Kr(t.container())?yA(a,t.container()):yA(a,t.getNode())},BL=function(t,a){var m=a.get();return m&&t.container()===m&&Sl(m)},pC=function(t,a){return a.fold(function(m){ig(t.get());var v=FL(m);return t.set(v),Ne.some(Tr(v,v.length-1))},function(m){return ou(m).map(function(v){if(BL(v,t))return Tr(t.get(),1);ig(t.get());var S=NL(v,!0);return t.set(S),Tr(S,1)})},function(m){return au(m).map(function(v){if(BL(v,t))return Tr(t.get(),t.get().length-1);ig(t.get());var S=NL(v,!1);return t.set(S),Tr(S,S.length-1)})},function(m){ig(t.get());var v=CP(m);return t.set(v),Ne.some(Tr(v,1))})},s0=function(t,a){for(var m=0;m<t.length;m++){var v=t[m].apply(null,a);if(v.isSome())return v}return Ne.none()},dg=Go_generate([{before:["element"]},{start:["element"]},{end:["element"]},{after:["element"]}]),EP=function(t,a){return _m(a,t)||t},Ow=function(t,a,m){var v=gL(m),S=EP(a,v.container());return YT(t,S,v).fold(function(){return Bs(S,v).bind(le(YT,t,S)).map(function(R){return dg.before(R)})},Ne.none)},UL=function(t,a){return null===vm(t,a)},MP=function(t,a,m){return YT(t,a,m).filter(le(UL,a))},zL=function(t,a,m){var v=_L(m);return MP(t,a,v).bind(function(S){return Ys(S,v).isNone()?Ne.some(dg.start(S)):Ne.none()})},YL=function(t,a,m){var v=gL(m);return MP(t,a,v).bind(function(S){return Bs(S,v).isNone()?Ne.some(dg.end(S)):Ne.none()})},HL=function(t,a,m){var v=_L(m),S=EP(a,v.container());return YT(t,S,v).fold(function(){return Ys(S,v).bind(le(YT,t,S)).map(function(R){return dg.after(R)})},Ne.none)},TP=function(t){return!1===dP(pS(t))},l0=function(t,a,m){return s0([Ow,zL,YL,HL],[t,a,m]).filter(TP)},pS=function(t){return t.fold(me,me,me,me)},Lw=function(t){return t.fold(oe("before"),oe("start"),oe("end"),oe("after"))},kw=function(t){return t.fold(dg.before,dg.before,dg.after,dg.after)},xP=function(t){return t.fold(dg.start,dg.start,dg.end,dg.end)},zN=function(t,a,m,v,S,R){return Gs(YT(a,m,v),YT(a,m,S),function(ee,Ee){return ee!==Ee&&function(t,a,m){var v=_m(a,t),S=_m(m,t);return v&&v===S}(m,ee,Ee)?dg.after(t?ee:Ee):R}).getOr(R)},VL=function(t,a){return t.fold(nt,function(m){return!function(t,a){return Lw(t)===Lw(a)&&pS(t)===pS(a)}(m,a)})},HN=function(t,a){return t?a.fold(de(Ne.some,dg.start),Ne.none,de(Ne.some,dg.after),Ne.none):a.fold(Ne.none,de(Ne.some,dg.before),Ne.none,de(Ne.some,dg.end))},bA=function(t,a,m,v){var S=a0(t,v),R=l0(a,m,S);return l0(a,m,S).bind(le(HN,t)).orThunk(function(){return function(t,a,m,v,S){var R=a0(t,S);return Ea(t,m,R).map(le(a0,t)).fold(function(){return v.map(kw)},function(Se){return l0(a,m,Se).map(le(zN,t,a,m,R,Se)).filter(le(VL,v))}).filter(TP)}(t,a,m,R,v)})};le(bA,!1),le(bA,!0);var pE,ZL=function(t,a,m){var v=t?1:-1;return a.setRng(Tr(m.container(),m.offset()+v).toRange()),a.getSel().modify("move",t?"forward":"backward","word"),!0},ZN=function(t,a){var m=a.selection.getRng(),v=t?Tr.fromRangeEnd(m):Tr.fromRangeStart(m);return!!function(t){return pe(t.selection.getSel().modify)}(a)&&(t&&ta(v)?ZL(!0,a.selection,v):!(t||!pu(v))&&ZL(!1,a.selection,v))};!function(t){t[t.Br=0]="Br",t[t.Block=1]="Block",t[t.Wrap=2]="Wrap",t[t.Eol=3]="Eol"}(pE||(pE={}));var uD,Rw=function(t,a){return t===Vd.Backwards?ui(a):a},GN=function(t,a,m){return t===Vd.Forwards?a.next(m):a.prev(m)},WN=function(t,a,m,v){return _a(v.getNode(a===Vd.Forwards))?pE.Br:!1===nh(m,v)?pE.Block:pE.Wrap},CA=function(t,a,m,v){for(var S=zn(m),R=v,ee=[];R;){var Ee=GN(a,S,R);if(!Ee)break;if(_a(Ee.getNode(!1)))return a===Vd.Forwards?{positions:Rw(a,ee).concat([Ee]),breakType:pE.Br,breakAt:Ne.some(Ee)}:{positions:Rw(a,ee),breakType:pE.Br,breakAt:Ne.some(Ee)};if(Ee.isVisible()){if(t(R,Ee)){var Se=WN(0,a,R,Ee);return{positions:Rw(a,ee),breakType:Se,breakAt:Ne.some(Ee)}}ee.push(Ee),R=Ee}else R=Ee}return{positions:Rw(a,ee),breakType:pE.Eol,breakAt:Ne.none()}},EA=function(t,a,m,v){return a(m,v).breakAt.map(function(S){var R=a(m,S).positions;return t===Vd.Backwards?R.concat(S):[S].concat(R)}).getOr([])},MA=function(t,a){return Bn(t,function(m,v){return m.fold(function(){return Ne.some(v)},function(S){return Gs(Hn(S.getClientRects()),Hn(v.getClientRects()),function(R,ee){var Ee=Math.abs(a-R.left);return Math.abs(a-ee.left)<=Ee?v:S}).or(m)})},Ne.none())},GL=function(t,a){return Hn(a.getClientRects()).bind(function(m){return MA(t,m.left)})},TA=le(CA,Tr.isAbove,-1),xA=le(CA,Tr.isBelow,1),$N=le(EA,-1,TA),WL=le(EA,1,xA),QN=function(t){var a=function(v){return Dn(v,function(S){var R=mm(S);return R.node=t,R})};if(la(t))return a(t.getClientRects());if(Kr(t)){var m=t.ownerDocument.createRange();return m.setStart(t,0),m.setEnd(t,t.data.length),a(m.getClientRects())}},SP=function(t){return xn(t,QN)};!function(t){t[t.Up=-1]="Up",t[t.Down=1]="Down"}(uD||(uD={}));var vD,RA,$L=function(t,a,m,v,S,R){var ee=0,Ee=[],Se=function(jt){var on=SP([jt]);-1===t&&(on=on.reverse());for(var Rn=0;Rn<on.length;Rn++){var Yn=on[Rn];if(!m(Yn,pt)){if(Ee.length>0&&a(Yn,qt(Ee))&&ee++,Yn.line=ee,S(Yn))return!0;Ee.push(Yn)}}},pt=qt(R.getClientRects());if(!pt)return Ee;var Gt=R.getNode();return Se(Gt),function(t,a,m,v){for(;v=wg(v,t,Ws,a);)if(m(v))return}(t,v,Se,Gt),Ee},Nw=le($L,uD.Up,C,Q),e6=le($L,uD.Down,Q,C),DA=function(t){return function(a){return function(t,a){return a.line>t}(t,a)}},AP=function(t){return function(a){return function(t,a){return a.line===t}(t,a)}},n6=Os,jL=wg,wP=function(t,a){return Math.abs(t.left-a)},IP=function(t,a){return Math.abs(t.right-a)},KL=function(t,a){return t>=a.left&&t<=a.right},i6=function(t,a){return t>=a.top&&t<=a.bottom},Bw=function(t,a,m){return void 0===m&&(m=nt),we(t,function(v,S){if(KL(a,S))return m(S)?S:v;if(KL(a,v))return m(v)?v:S;var R=Math.min(wP(v,a),IP(v,a)),ee=Math.min(wP(S,a),IP(S,a));return ee===R&&function(t){return pr(t,"node")}(S)&&n6(S.node)||ee<R?S:v})},JL=function(t,a,m,v,S){var R=jL(v,t,Ws,a,!S);do{if(!R||m(R))return}while(R=jL(R,t,Ws,a))},PP=function(t,a,m){var v=SP(function(t){return mi(vn(t.getElementsByTagName("*")),ff)}(t)),S=mi(v,le(i6,m)),R=function(Se){return!lo(Se.node)&&!Ks(Se.node)},ee=Bw(S,a,R);if(ee){var Ee=R(ee);if(ee=Bw(function(t,a,m){void 0===m&&(m=!0);var v=[],S=function(R,ee){var Ee=mi(SP([ee]),function(Se){return!R(Se,a)});return v=v.concat(Ee),0===Ee.length};return v.push(a),JL(uD.Up,t,le(S,C),a.node,m),JL(uD.Down,t,le(S,Q),a.node,m),v}(t,ee,Ee),a,R),ee&&ff(ee.node))return function(t,a){return{node:t.node,before:wP(t,a)<IP(t,a)}}(ee,a)}return null},mE=function(t,a){t.selection.setRng(a),xv(t,t.selection.getRng())},Uw=function(t,a,m){return Ne.some(ZT(t,a,m))},QL=function(t,a,m,v,S,R){var ee=a===Vd.Forwards,Ee=zn(t.getBody()),Se=le(o_,ee?Ee.next:Ee.prev),pt=ee?v:S;if(!m.collapsed){var Gt=Pi(m);if(R(Gt))return t1(a,t,Gt,a===Vd.Backwards,!1)}var jt=Jv(a,t.getBody(),m);if(pt(jt))return lD(t,jt.getNode(!ee));var on=a0(ee,Se(jt)),Rn=Fo(m);if(!on)return Rn?Ne.some(m):Ne.none();if(pt(on))return t1(a,t,on.getNode(!ee),ee,!1);var Yn=Se(on);return Yn&&pt(Yn)&&x0(on,Yn)?t1(a,t,Yn.getNode(!ee),ee,!1):Rn?Uw(t,on.toRange(),!1):Ne.none()},OP=function(t,a,m,v,S,R){var ee=Jv(a,t.getBody(),m),Ee=qt(ee.getClientRects()),Se=a===uD.Down;if(!Ee)return Ne.none();var qn,Gt=(Se?e6:Nw)(t.getBody(),DA(1),ee),jt=mi(Gt,AP(1)),on=Ee.left,Rn=Bw(jt,on);if(Rn&&R(Rn.node)){var Yn=Math.abs(on-Rn.left),$n=Math.abs(on-Rn.right);return t1(a,t,Rn.node,Yn<$n,!1)}if(qn=v(ee)?ee.getNode():S(ee)?ee.getNode(!0):Pi(m)){var bi=function(t,a,m,v){var R,ee,Ee,Se,S=zn(a),pt=[],Gt=0,jt=function($n){return qt($n.getClientRects())};1===t?(R=S.next,ee=Q,Ee=C,Se=Tr.after(v)):(R=S.prev,ee=C,Ee=Q,Se=Tr.before(v));var on=jt(Se);do{if(Se.isVisible()){var Rn=jt(Se);if(!Ee(Rn,on)){pt.length>0&&ee(Rn,qt(pt))&&Gt++;var Yn=mm(Rn);if(Yn.position=Se,Yn.line=Gt,m(Yn))return pt;pt.push(Yn)}}}while(Se=R(Se));return pt}(a,t.getBody(),DA(1),qn),pi=Bw(mi(bi,AP(1)),on);if(pi||(pi=qt(mi(bi,AP(0)))))return Uw(t,pi.position.toRange(),!1)}return 0===jt.length?LP(t,Se).filter(Se?S:v).map(function(tr){return ZT(t,tr.toRange(),!1)}):Ne.none()},LP=function(t,a){var m=t.selection.getRng(),v=t.getBody();if(a){var S=Tr.fromRangeEnd(m),R=xA(v,S);return An(R.positions)}S=Tr.fromRangeStart(m),R=TA(v,S);return Hn(R.positions)},kP=function(t,a,m){return LP(t,a).filter(m).exists(function(v){return t.selection.setRng(v.toRange()),!0})},zw=function(t,a){var m=t.dom.createRng();m.setStart(a.container(),a.offset()),m.setEnd(a.container(),a.offset()),t.selection.setRng(m)},qL=function(t,a){t?a.setAttribute("data-mce-selected","inline-boundary"):a.removeAttribute("data-mce-selected")},XL=function(t,a,m){return pC(a,m).map(function(v){return zw(t,v),m})},tk=function(t,a){if(t.selection.isCollapsed()&&!0!==t.composing&&a.get()){var m=Tr.fromRangeStart(t.selection.getRng());Tr.isTextPosition(m)&&!1===function(t){return ta(t)||pu(t)}(m)&&(zw(t,C0(a.get(),m)),a.set(null))}},Yw=function(t,a,m){return!!Fy(t)&&function(t,a,m){var v=t.getBody(),S=Tr.fromRangeStart(t.selection.getRng()),R=le(zT,t);return bA(m,R,v,S).bind(function(Ee){return XL(t,a,Ee)})}(t,a,m).isSome()},ik=function(t,a,m){return!!Fy(a)&&ZN(t,a)},s6=function(t){var a=nd(null),m=le(zT,t);return t.on("NodeChange",function(v){Fy(t)&&(!$r.browser.isIE()||!v.initial)&&(function(t,a,m){var v=Dn(iu(Dt.fromDom(a.getRoot()),'*[data-mce-selected="inline-boundary"]'),function(ee){return ee.dom}),S=mi(v,t),R=mi(m,t);Mn(Ai(S,R),le(qL,!1)),Mn(Ai(R,S),le(qL,!0))}(m,t.dom,v.parents),tk(t,a),function(t,a,m,v){if(a.selection.isCollapsed()){var S=mi(v,t);Mn(S,function(R){var ee=Tr.fromRangeStart(a.selection.getRng());l0(t,a.getBody(),ee).bind(function(Ee){return XL(a,m,Ee)})})}}(m,t,a,v.parents))}),a},l6=le(ik,!0),c6=le(ik,!1),Hw=function(t,a,m){if(Fy(t)){var v=LP(t,a).getOrThunk(function(){var S=t.selection.getRng();return a?Tr.fromRangeEnd(S):Tr.fromRangeStart(S)});return l0(le(zT,t),t.getBody(),v).exists(function(S){var R=kw(S);return pC(m,R).exists(function(ee){return zw(t,ee),!0})})}return!1},rk=function(t,a){return function(m){return pC(a,m).exists(function(v){return zw(t,v),!0})}},ok=function(t,a,m,v){var S=t.getBody(),R=le(zT,t);t.undoManager.ignore(function(){t.selection.setRng(function(t,a){var m=document.createRange();return m.setStart(t.container(),t.offset()),m.setEnd(a.container(),a.offset()),m}(m,v)),t.execCommand("Delete"),l0(R,S,Tr.fromRangeStart(t.selection.getRng())).map(xP).map(rk(t,a))}),t.nodeChanged()},p6=function(t,a,m,v){var S=function(t,a){return _m(a,t)||t}(t.getBody(),v.container()),R=le(zT,t),ee=l0(R,S,v);return ee.bind(function(Ee){return m?Ee.fold(oe(Ne.some(xP(Ee))),Ne.none,oe(Ne.some(kw(Ee))),Ne.none):Ee.fold(Ne.none,oe(Ne.some(kw(Ee))),Ne.none,oe(Ne.some(xP(Ee))))}).map(rk(t,a)).getOrThunk(function(){var Ee=xs(m,S,v),Se=Ee.bind(function(pt){return l0(R,S,pt)});return Gs(ee,Se,function(){return YT(R,S,v).exists(function(pt){return!!function(t){return Gs(ou(t),au(t),function(a,m){var v=a0(!0,a),S=a0(!1,m);return Bs(t,v).forall(function(R){return R.isEqual(S)})}).getOr(!0)}(pt)&&(K0(t,m,Dt.fromDom(pt)),!0)})}).orThunk(function(){return Se.bind(function(pt){return Ee.map(function(Gt){return m?ok(t,a,v,Gt):ok(t,a,Gt,v),!0})})}).getOr(!1)})},Vw=function(t,a,m){if(t.selection.isCollapsed()&&Fy(t)){var v=Tr.fromRangeStart(t.selection.getRng());return p6(t,a,m,v)}return!1},f6=function(t){return 1===sp(t)},GT=function(t,a,m,v){var S=le(lt,a),R=Dn(mi(v,S),function(Ee){return Ee.dom});if(0===R.length)K0(a,t,m);else{var ee=function(t,a){var m=vy(!1),v=h(a,m.dom);return _c(Dt.fromDom(t),m),Dr(Dt.fromDom(t)),Tr(v,0)}(m.dom,R);a.selection.setRng(ee.toRange())}},h6=function(t,a){var m=Dt.fromDom(t.getBody()),v=Dt.fromDom(t.selection.getStart()),S=mi(function(t,a){var m=db(a,t);return je(m,ll).fold(oe(m),function(v){return m.slice(0,v)})}(m,v),f6);return An(S).exists(function(R){var ee=Tr.fromRangeStart(t.selection.getRng());return!(!function(t,a,m){return Gs(ou(m),au(m),function(v,S){var R=a0(!0,v),ee=a0(!1,S),Ee=a0(!1,a);return t?Bs(m,Ee).exists(function(Se){return Se.isEqual(ee)&&a.isEqual(R)}):Ys(m,Ee).exists(function(Se){return Se.isEqual(R)&&a.isEqual(ee)})}).getOr(!0)}(a,ee,R.dom)||function(t){return xu(t.dom)&&oC(t.dom)}(R))&&(GT(a,t,R,S),!0)})},Zw=function(t,a){return!!t.selection.isCollapsed()&&h6(t,a)},Gw=function(t,a,m){return t._selectionOverrides.hideFakeCaret(),K0(t,a,Dt.fromDom(m)),!0},Ww=function(t,a){return t.selection.isCollapsed()?function(t,a){var m=a?vf:dy,v=a?Vd.Forwards:Vd.Backwards,S=Jv(v,t.getBody(),t.selection.getRng());return m(S)?Gw(t,a,S.getNode(!a)):Ne.from(a0(a,S)).filter(function(R){return m(R)&&x0(S,R)}).exists(function(R){return Gw(t,a,R.getNode(!a))})}(t,a):function(t,a){var m=t.selection.getNode();return!!Ks(m)&&Gw(t,a,m)}(t,a)},SM=function(t){var a=parseInt(t,10);return isNaN(a)?0:a},ak=function(t,a){var m=t||function(t){return"table"===ba(t)}(a)?"margin":"padding";return m+("rtl"===Ba(a,"direction")?"-right":"-left")},sk=function(t){var a=NP(t);return!t.mode.isReadOnly()&&(a.length>1||function(t,a){return Fn(a,function(m){var v=ak(bE(t),m),S=ul(m,v).map(SM).getOr(0);return"false"!==t.dom.getContentEditable(m.dom)&&S>0})}(t,a))},$w=function(t){return Zc(t)||uu(t)},NP=function(t){return mi(function(t){return Dn(t,Dt.fromDom)}(t.selection.getSelectedBlocks()),function(a){return!$w(a)&&!function(t){return qi(t).exists($w)}(a)&&function(t){return Ef(t,function(a){return $l(a.dom)||Os(a.dom)}).exists(function(a){return $l(a.dom)})}(a)})},BP=function(t,a){var m=t.dom,v=t.selection,S=t.formatter,R=function(t){return t.getParam("indentation","40px","string")}(t),ee=/[a-z%]+$/i.exec(R)[0],Ee=parseInt(R,10),Se=bE(t),pt=hm(t);!t.queryCommandState("InsertUnorderedList")&&!t.queryCommandState("InsertOrderedList")&&""===pt&&!m.getParent(v.getNode(),m.isBlock)&&S.apply("div"),Mn(NP(t),function(Gt){!function(t,a,m,v,S,R){var ee=ak(m,Dt.fromDom(R));if("outdent"===a){var Ee=Math.max(0,SM(R.style[ee])-v);t.setStyle(R,ee,Ee?Ee+S:"")}else Ee=SM(R.style[ee])+v+S,t.setStyle(R,ee,Ee)}(m,a,Se,Ee,ee,Gt.dom)})},UP=function(t,a){if(t.selection.isCollapsed()&&sk(t)){var m=t.dom,v=t.selection.getRng(),S=Tr.fromRangeStart(v),R=m.getParent(v.startContainer,m.isBlock);if(null!==R&&bs(Dt.fromDom(R),S))return BP(t,"outdent"),!0}return!1},lk=function(t,a){t.getDoc().execCommand(a,!1,null)},C6=function(t,a){t.addCommand("delete",function(){!function(t,a){if(!UP(t)){if(Pw(t,!1))return;if(vA(t,!1))return;if(Vw(t,a,!1))return;if(Sw(t,!1))return;if(gM(t))return;if(dS(t,!1))return;if(Ww(t,!1))return;if(sD(t))return;if(Zw(t,!1))return;lk(t,"Delete"),pP(t)}}(t,a)}),t.addCommand("forwardDelete",function(){!function(t,a){if(!Pw(t,!0)){if(vA(t,!0))return;if(Vw(t,a,!0))return;if(Sw(t,!0))return;if(gM(t))return;if(dS(t,!0))return;if(Ww(t,!0))return;if(sD(t))return;if(Zw(t,!0))return;lk(t,"ForwardDelete")}}(t,a)})},uk=function(t){return void 0===t.touches||1!==t.touches.length?Ne.none():Ne.some(t.touches[0])},E6=function(t){var a=$h(),m=nd(!1),v=Yu(function(S){t.fire("longpress",Tn(Tn({},S),{type:"longpress"})),m.set(!0)},400);t.on("touchstart",function(S){uk(S).each(function(R){v.cancel();var ee={x:R.clientX,y:R.clientY,target:S.target};v.throttle(S),m.set(!1),a.set(ee)})},!0),t.on("touchmove",function(S){v.cancel(),uk(S).each(function(R){a.on(function(ee){(function(t,a){var m=Math.abs(t.clientX-a.x),v=Math.abs(t.clientY-a.y);return m>5||v>5})(R,ee)&&(a.clear(),m.set(!1),t.fire("longpresscancel"))})})},!0),t.on("touchend touchcancel",function(S){v.cancel(),"touchcancel"!==S.type&&a.get().filter(function(R){return R.target.isEqualNode(S.target)}).each(function(){m.get()?S.preventDefault():t.fire("tap",Tn(Tn({},S),{type:"tap"}))})},!0)},AA=function(t,a){return Nn(t,a.nodeName)},zP=function(t,a){return!!Kr(a)||!!la(a)&&(!AA(t,a)&&!Km(a))},T6=function(t,a){if(Kr(a)){if(0===a.nodeValue.length)return!0;if(/^\s+$/.test(a.nodeValue)&&(!a.nextSibling||AA(t,a.nextSibling)))return!0}return!1},x6=function(t){var Ee,Se,pt,a=t.dom,m=t.selection,v=t.schema,S=v.getBlockElements(),R=m.getStart(),ee=t.getBody(),Gt=hm(t);if(R&&la(R)&&Gt){var jt=ee.nodeName.toLowerCase();if(v.isValidChild(jt,Gt.toLowerCase())&&!function(t,a,m){return nn(my(Dt.fromDom(m),Dt.fromDom(a)),function(v){return AA(t,v.dom)})}(S,ee,R)){var on=m.getRng(),Rn=on.startContainer,Yn=on.startOffset,$n=on.endContainer,qn=on.endOffset,bi=ab(t);for(R=ee.firstChild;R;)if(zP(S,R)){if(T6(S,R)){Se=R,R=R.nextSibling,a.remove(Se);continue}Ee||(Ee=a.create(Gt,e_(t)),R.parentNode.insertBefore(Ee,R),pt=!0),Se=R,R=R.nextSibling,Ee.appendChild(Se)}else Ee=null,R=R.nextSibling;pt&&bi&&(on.setStart(Rn,Yn),on.setEnd($n,qn),m.setRng(on),t.nodeChanged())}}},pk=function(t,a){a.hasAttribute("data-mce-caret")&&(Ro(a),function(t){t.selection.setRng(t.selection.getRng())}(t),t.selection.scrollIntoView(a))},A6=function(t,a){var m=function(t){return Mu(Dt.fromDom(t.getBody()),"*[data-mce-caret]").map(function(a){return a.dom}).getOrNull()}(t);if(m){if("compositionstart"===a.type)return a.preventDefault(),a.stopPropagation(),void pk(t,m);Hp(m)&&(pk(t,m),t.undoManager.add())}},fk=Os,YP=function(t,a,m){var v=zn(t.getBody()),S=le(o_,1===a?v.next:v.prev);if(m.collapsed&&function(t){return""!==hm(t)}(t)){var R=t.dom.getParent(m.startContainer,"PRE");if(!R)return;if(!S(Tr.fromRangeStart(m))){var Ee=function(t){var a=t.dom.create(hm(t));return(!$r.ie||$r.ie>=11)&&(a.innerHTML='<br data-mce-bogus="1">'),a}(t);1===a?t.$(R).after(Ee):t.$(R).before(Ee),t.selection.select(Ee,!0),t.selection.collapse()}}},HP=function(t,a){var m=a?Vd.Forwards:Vd.Backwards,v=t.selection.getRng();return function(t,a,m){return QL(a,t,m,V0,nl,fk)}(m,t,v).orThunk(function(){return YP(t,m,v),Ne.none()})},VP=function(t,a){var m=a?1:-1,v=t.selection.getRng();return function(t,a,m){return OP(a,t,m,function(R){return V0(R)||Ip(R)},function(R){return nl(R)||GC(R)},fk)}(m,t,v).orThunk(function(){return YP(t,m,v),Ne.none()})},hk=function(t,a){return HP(t,a).exists(function(m){return mE(t,m),!0})},gk=function(t,a){return VP(t,a).exists(function(m){return mE(t,m),!0})},_k=function(t,a){return kP(t,a,a?nl:V0)},ZP=function(t){return st(["figcaption"],ba(t))},vk=function(t){var a=document.createRange();return a.setStartBefore(t.dom),a.setEndBefore(t.dom),a},yk=function(t,a,m){m?ac(t,a):lu(t,a)},bk=function(t,a,m,v){return""===a?function(t,a){var m=Dt.fromTag("br");return yk(t,m,a),vk(m)}(t,v):function(t,a,m,v){var S=Dt.fromTag(m),R=Dt.fromTag("br");return zt(S,v),ac(S,R),yk(t,S,a),vk(R)}(t,v,a,m)},L6=function(t,a,m){return a?function(t,a){return xA(t,a).breakAt.isNone()}(t.dom,m):function(t,a){return TA(t,a).breakAt.isNone()}(t.dom,m)},k6=function(t,a){var m=Dt.fromDom(t.getBody()),v=Tr.fromRangeStart(t.selection.getRng()),S=hm(t),R=e_(t);return function(t,a){var m=le(Ao,a);return Ef(Dt.fromDom(t.container()),ll,m).filter(ZP)}(v,m).exists(function(){if(L6(m,a,v)){var ee=bk(m,S,R,a);return t.selection.setRng(ee),!0}return!1})},Ck=function(t,a){return!!t.selection.isCollapsed()&&k6(t,a)},N6=function(t,a){return xn(function(t){return Dn(t,function(a){return Tn({shiftKey:!1,altKey:!1,ctrlKey:!1,metaKey:!1,keyCode:0,action:xe},a)})}(t),function(m){return function(t,a){return a.keyCode===t.keyCode&&a.shiftKey===t.shiftKey&&a.altKey===t.altKey&&a.ctrlKey===t.ctrlKey&&a.metaKey===t.metaKey}(m,a)?[m]:[]})},lc=function(t){for(var a=[],m=1;m<arguments.length;m++)a[m-1]=arguments[m];return function(){return t.apply(null,a)}},pD=function(t,a){return On(N6(t,a),function(m){return m.action()})},Ek=function(t,a){var m=a?Vd.Forwards:Vd.Backwards,v=t.selection.getRng();return QL(t,m,v,vf,dy,Ks).exists(function(S){return mE(t,S),!0})},GP=function(t,a){var m=a?1:-1,v=t.selection.getRng();return OP(t,m,v,vf,dy,Ks).exists(function(S){return mE(t,S),!0})},Mk=function(t,a){return kP(t,a,a?dy:vf)},Tk=function(t,a,m,v,S){var R=iu(Dt.fromDom(m),"td,th,caption").map(function(Ee){return Ee.dom}),ee=mi(function(t,a){return xn(a,function(m){var v=function(t,a){return{left:t.left-a,top:t.top-a,right:t.right+2*a,bottom:t.bottom+2*a,width:t.width+a,height:t.height+a}}(mm(m.getBoundingClientRect()),-1);return[{x:v.left,y:t(v),cell:m},{x:v.right,y:t(v),cell:m}]})}(t,R),function(Ee){return a(Ee,S)});return function(t,a,m){return Bn(t,function(v,S){return v.fold(function(){return Ne.some(S)},function(R){var ee=Math.sqrt(Math.abs(R.x-a)+Math.abs(R.y-m)),Ee=Math.sqrt(Math.abs(S.x-a)+Math.abs(S.y-m));return Ne.some(Ee<ee?S:R)})},Ne.none())}(ee,v,S).map(function(Ee){return Ee.cell})},G6=le(Tk,function(t){return t.bottom},function(t,a){return t.y<a}),W6=le(Tk,function(t){return t.top},function(t,a){return t.y>a}),$6=function(t,a){return Hn(a.getClientRects()).bind(function(m){return G6(t,m.left,m.top)}).bind(function(m){return GL(function(t){return au(t).map(function(a){return TA(t,a).positions.concat(a)}).getOr([])}(m),a)})},j6=function(t,a){return An(a.getClientRects()).bind(function(m){return W6(t,m.left,m.top)}).bind(function(m){return GL(function(t){return ou(t).map(function(a){return[a].concat(xA(t,a).positions)}).getOr([])}(m),a)})},WP=function(t,a,m){var v=t(a,m);return function(t){return t.breakType===pE.Wrap&&0===t.positions.length}(v)||!_a(m.getNode())&&function(t){return t.breakType===pE.Br&&1===t.positions.length}(v)?!function(t,a,m){return m.breakAt.exists(function(v){return t(a,v).breakAt.isSome()})}(t,a,v):v.breakAt.isNone()},Dk=le(WP,TA),jw=le(WP,xA),$P=function(t,a,m,v){var S=t.selection.getRng(),R=a?1:-1;return!(!jv()||!function(t,a,m){var v=Tr.fromRangeStart(a);return fs(!t,m).exists(function(S){return S.isEqual(v)})}(a,S,m))&&(t1(R,t,m,!a,!1).each(function(ee){mE(t,ee)}),!0)},mD=function(t,a,m){var v=function(t,a){var m=a.getNode(t);return la(m)&&"TABLE"===m.nodeName?Ne.some(m):Ne.none()}(!!a,m),S=!1===a;v.fold(function(){return mE(t,m.toRange())},function(R){return fs(S,t.getBody()).filter(function(ee){return ee.isEqual(m)}).fold(function(){return mE(t,m.toRange())},function(ee){return function(t,a,m,v){var S=hm(a);S?a.undoManager.transact(function(){var R=Dt.fromTag(S);zt(R,e_(a)),ac(R,Dt.fromTag("br")),t?Yc(Dt.fromDom(m),R):_c(Dt.fromDom(m),R);var ee=a.dom.createRng();ee.setStart(R.dom,0),ee.setEnd(R.dom,0),mE(a,ee)}):mE(a,v.toRange())}(a,t,R,m)})})},Pk=function(t,a,m,v){var S=t.selection.getRng(),R=Tr.fromRangeStart(S),ee=t.getBody();if(!a&&Dk(v,R)){var Ee=function(t,a,m){return $6(a,m).orThunk(function(){return Hn(m.getClientRects()).bind(function(v){return MA($N(t,Tr.before(a)),v.left)})}).getOr(Tr.before(a))}(ee,m,R);return mD(t,a,Ee),!0}if(a&&jw(v,R)){Ee=function(t,a,m){return j6(a,m).orThunk(function(){return Hn(m.getClientRects()).bind(function(v){return MA(WL(t,Tr.after(a)),v.left)})}).getOr(Tr.after(a))}(ee,m,R);return mD(t,a,Ee),!0}return!1},Kw=function(t,a,m){return Ne.from(t.dom.getParent(t.selection.getNode(),"td,th")).bind(function(v){return Ne.from(t.dom.getParent(v,"table")).map(function(S){return m(t,a,S,v)})}).getOr(!1)},Ok=function(t,a){return Kw(t,a,$P)},Jw=function(t,a){return Kw(t,a,Pk)},q6=function(t,a){t.on("keydown",function(m){!1===m.isDefaultPrevented()&&function(t,a,m){var v=gi().os;pD([{keyCode:Ua.RIGHT,action:lc(hk,t,!0)},{keyCode:Ua.LEFT,action:lc(hk,t,!1)},{keyCode:Ua.UP,action:lc(gk,t,!1)},{keyCode:Ua.DOWN,action:lc(gk,t,!0)},{keyCode:Ua.RIGHT,action:lc(Ok,t,!0)},{keyCode:Ua.LEFT,action:lc(Ok,t,!1)},{keyCode:Ua.UP,action:lc(Jw,t,!1)},{keyCode:Ua.DOWN,action:lc(Jw,t,!0)},{keyCode:Ua.RIGHT,action:lc(Ek,t,!0)},{keyCode:Ua.LEFT,action:lc(Ek,t,!1)},{keyCode:Ua.UP,action:lc(GP,t,!1)},{keyCode:Ua.DOWN,action:lc(GP,t,!0)},{keyCode:Ua.RIGHT,action:lc(Yw,t,a,!0)},{keyCode:Ua.LEFT,action:lc(Yw,t,a,!1)},{keyCode:Ua.RIGHT,ctrlKey:!v.isOSX(),altKey:v.isOSX(),action:lc(l6,t,a)},{keyCode:Ua.LEFT,ctrlKey:!v.isOSX(),altKey:v.isOSX(),action:lc(c6,t,a)},{keyCode:Ua.UP,action:lc(Ck,t,!1)},{keyCode:Ua.DOWN,action:lc(Ck,t,!0)}],m).each(function(S){m.preventDefault()})}(t,a,m)})},tB=function(t,a){t.on("keydown",function(m){!1===m.isDefaultPrevented()&&function(t,a,m){pD([{keyCode:Ua.BACKSPACE,action:lc(UP,t,!1)},{keyCode:Ua.BACKSPACE,action:lc(Pw,t,!1)},{keyCode:Ua.DELETE,action:lc(Pw,t,!0)},{keyCode:Ua.BACKSPACE,action:lc(vA,t,!1)},{keyCode:Ua.DELETE,action:lc(vA,t,!0)},{keyCode:Ua.BACKSPACE,action:lc(Vw,t,a,!1)},{keyCode:Ua.DELETE,action:lc(Vw,t,a,!0)},{keyCode:Ua.BACKSPACE,action:lc(gM,t,!1)},{keyCode:Ua.DELETE,action:lc(gM,t,!0)},{keyCode:Ua.BACKSPACE,action:lc(dS,t,!1)},{keyCode:Ua.DELETE,action:lc(dS,t,!0)},{keyCode:Ua.BACKSPACE,action:lc(Ww,t,!1)},{keyCode:Ua.DELETE,action:lc(Ww,t,!0)},{keyCode:Ua.BACKSPACE,action:lc(sD,t,!1)},{keyCode:Ua.DELETE,action:lc(sD,t,!0)},{keyCode:Ua.BACKSPACE,action:lc(Sw,t,!1)},{keyCode:Ua.DELETE,action:lc(Sw,t,!0)},{keyCode:Ua.BACKSPACE,action:lc(Zw,t,!1)},{keyCode:Ua.DELETE,action:lc(Zw,t,!0)}],m).each(function(v){m.preventDefault()})}(t,a,m)}),t.on("keyup",function(m){!1===m.isDefaultPrevented()&&function(t,a){pD([{keyCode:Ua.BACKSPACE,action:lc(OL,t)},{keyCode:Ua.DELETE,action:lc(OL,t)}],a)}(t,m)})},hS=function(t,a){var m,v=a,S=t.dom,R=t.schema.getMoveCaretBeforeOnEnterElements();if(a){if(/^(LI|DT|DD)$/.test(a.nodeName)){var ee=function(t){for(;t;){if(1===t.nodeType||3===t.nodeType&&t.data&&/[\r\n\s]/.test(t.data))return t;t=t.nextSibling}}(a.firstChild);ee&&/^(UL|OL|DL)$/.test(ee.nodeName)&&a.insertBefore(S.doc.createTextNode(Pu),a.firstChild)}var Ee=S.createRng();if(a.normalize(),a.hasChildNodes()){for(var Se=new Sr(a,a);m=Se.current();){if(Kr(m)){Ee.setStart(m,0),Ee.setEnd(m,0);break}if(R[m.nodeName.toLowerCase()]){Ee.setStartBefore(m),Ee.setEndBefore(m);break}v=m,m=Se.next()}m||(Ee.setStart(v,0),Ee.setEnd(v,0))}else _a(a)?a.nextSibling&&S.isBlock(a.nextSibling)?(Ee.setStartBefore(a),Ee.setEndBefore(a)):(Ee.setStartAfter(a),Ee.setEndAfter(a)):(Ee.setStart(a,0),Ee.setEnd(a,0));t.selection.setRng(Ee),xv(t,Ee)}},KP=function(t){return Ne.from(t.dom.getParent(t.selection.getStart(!0),t.dom.isBlock))},QP=function(t,a){return t&&t.parentNode&&t.parentNode.nodeName===a},qP=function(t){return t&&/^(OL|UL|LI)$/.test(t.nodeName)},IA=function(t){var a=t.parentNode;return/^(LI|DT|DD)$/.test(a.nodeName)?a:t},Qw=function(t,a,m){for(var v=t[m?"firstChild":"lastChild"];v&&!la(v);)v=v[m?"nextSibling":"previousSibling"];return v===a},rB=function(t,a,m,v,S){var R=t.dom,ee=t.selection.getRng();if(m!==t.getBody()){(function(t){return qP(t)&&qP(t.parentNode)})(m)&&(S="LI");var Ee=S?a(S):R.create("BR");if(Qw(m,v,!0)&&Qw(m,v,!1))if(QP(m,"LI")){var Se=IA(m);R.insertAfter(Ee,Se),function(t){var a;return(null===(a=t.parentNode)||void 0===a?void 0:a.firstChild)===t}(m)?R.remove(Se):R.remove(m)}else R.replace(Ee,m);else if(Qw(m,v,!0))QP(m,"LI")?(R.insertAfter(Ee,IA(m)),Ee.appendChild(R.doc.createTextNode(" ")),Ee.appendChild(m)):m.parentNode.insertBefore(Ee,m),R.remove(v);else if(Qw(m,v,!1))R.insertAfter(Ee,IA(m)),R.remove(v);else{m=IA(m);var pt=ee.cloneRange();pt.setStartAfter(v),pt.setEndAfter(m);var Gt=pt.extractContents();"LI"===S&&function(t,a){return t.firstChild&&t.firstChild.nodeName===a}(Gt,"LI")?(Ee=Gt.firstChild,R.insertAfter(Gt,m)):(R.insertAfter(Gt,m),R.insertAfter(Ee,m)),R.remove(v)}hS(t,Ee)}},oB=function(t,a){return a&&"A"===a.nodeName&&t.isEmpty(a)},eO=function(t){t.innerHTML='<br data-mce-bogus="1">'},Xw=function(t,a){return t.nodeName===a||t.previousSibling&&t.previousSibling.nodeName===a},Rk=function(t,a){return a&&t.isBlock(a)&&!/^(TD|TH|CAPTION|FORM)$/.test(a.nodeName)&&!/^(fixed|absolute)/i.test(a.style.position)&&"true"!==t.getContentEditable(a)},wv=function(t,a,m){return!1===Kr(a)?m:t?1===m&&a.data.charAt(m-1)===Ti?0:m:m===a.data.length-1&&a.data.charAt(m)===Ti?a.data.length:m},nO=function(t,a){var v,S,m=t.getRoot();for(v=a;v!==m&&"false"!==t.getContentEditable(v);)"true"===t.getContentEditable(v)&&(S=v),v=v.parentNode;return v!==m?S:m},PA=function(t,a){var m=hm(t);m&&m.toLowerCase()===a.tagName.toLowerCase()&&function(t,a,m){var v=t.dom;Ne.from(m.style).map(v.parseStyle).each(function(Se){var pt=bu(Dt.fromDom(a)),Gt=Tn(Tn({},pt),Se);v.setStyles(a,Gt)});var S=Ne.from(m.class).map(function(Se){return Se.split(/\s+/)}),R=Ne.from(a.className).map(function(Se){return mi(Se.split(/\s+/),function(pt){return""!==pt})});Gs(S,R,function(Se,pt){var Gt=mi(pt,function(on){return!st(Se,on)}),jt=mo(mo([],Se,!0),Gt,!0);v.setAttrib(a,"class",jt.join(" "))});var ee=["style","class"],Ee=ct(m,function(Se,pt){return!st(ee,pt)});v.setAttribs(a,Ee)}(t,a,e_(t))},uB=function(t,a){var m,v,S,R,ee,Ee,Se,pt,Gt,jt,on=t.dom,Rn=t.schema,Yn=Rn.getNonEmptyElements(),$n=t.selection.getRng(),qn=function(Ur){var es,Xo,Wr,no=v,qa=Rn.getTextInlineElements();if(Wr=es=Ur||"TABLE"===pt||"HR"===pt?on.create(Ur||Gt):R.cloneNode(!1),!1===function(t){return t.getParam("keep_styles",!0)}(t))on.setAttrib(es,"style",null),on.setAttrib(es,"class",null);else do{if(qa[no.nodeName]){if(xu(no)||Km(no))continue;Xo=no.cloneNode(!1),on.setAttrib(Xo,"id",""),es.hasChildNodes()?(Xo.appendChild(es.firstChild),es.appendChild(Xo)):(Wr=Xo,es.appendChild(Xo))}}while((no=no.parentNode)&&no!==Oi);return PA(t,es),eO(Wr),es},bi=function(Ur){var no,es,Xo=wv(Ur,v,S);if(Kr(v)&&(Ur?Xo>0:Xo<v.nodeValue.length))return!1;if(v.parentNode===R&&jt&&!Ur||Ur&&la(v)&&v===R.firstChild)return!0;if(Xw(v,"TABLE")||Xw(v,"HR"))return jt&&!Ur||!jt&&Ur;var Wr=new Sr(v,R);for(Kr(v)&&(Ur&&0===Xo?Wr.prev():!Ur&&Xo===v.nodeValue.length&&Wr.next());no=Wr.current();){if(la(no)){if(!no.getAttribute("data-mce-bogus")&&(es=no.nodeName.toLowerCase(),Yn[es]&&"br"!==es))return!1}else if(Kr(no)&&!Sc(no.nodeValue))return!1;Ur?Wr.prev():Wr.next()}return!0},pi=function(){ee=/^(H[1-6]|PRE|FIGURE)$/.test(pt)&&"HGROUP"!==cr?qn(Gt):qn(),function(t){return t.getParam("end_container_on_empty_block",!1)}(t)&&Rk(on,Se)&&on.isEmpty(R)?ee=on.split(Se,R):on.insertAfter(ee,R),hS(t,ee)};zC(on,$n).each(function(Ur){$n.setStart(Ur.startContainer,Ur.startOffset),$n.setEnd(Ur.endContainer,Ur.endOffset)}),v=$n.startContainer,S=$n.startOffset,Gt=hm(t);var tr=!(!a||!a.shiftKey),Wi=!(!a||!a.ctrlKey);la(v)&&v.hasChildNodes()&&(jt=S>v.childNodes.length-1,v=v.childNodes[Math.min(S,v.childNodes.length-1)]||v,S=jt&&Kr(v)?v.nodeValue.length:0);var Oi=nO(on,v);if(Oi){(Gt&&!tr||!Gt&&tr)&&(v=function(t,a,m,v,S){var R,ee,Ee,Se,pt,Gt,jt=a||"P",on=t.dom,Rn=nO(on,v);if(!(ee=on.getParent(v,on.isBlock))||!Rk(on,ee)){if(Gt=(ee=ee||Rn)===t.getBody()||function(t){return t&&/^(TD|TH|CAPTION)$/.test(t.nodeName)}(ee)?ee.nodeName.toLowerCase():ee.parentNode.nodeName.toLowerCase(),!ee.hasChildNodes())return R=on.create(jt),PA(t,R),ee.appendChild(R),m.setStart(R,0),m.setEnd(R,0),R;for(Se=v;Se.parentNode!==ee;)Se=Se.parentNode;for(;Se&&!on.isBlock(Se);)Ee=Se,Se=Se.previousSibling;if(Ee&&t.schema.isValidChild(Gt,jt.toLowerCase())){for(R=on.create(jt),PA(t,R),Ee.parentNode.insertBefore(R,Ee),Se=Ee;Se&&!on.isBlock(Se);)pt=Se.nextSibling,R.appendChild(Se),Se=pt;m.setStart(v,S),m.setEnd(v,S)}}return v}(t,Gt,$n,v,S)),R=on.getParent(v,on.isBlock),Se=R?on.getParent(R.parentNode,on.isBlock):null,pt=R?R.nodeName.toUpperCase():"";var cr=Se?Se.nodeName.toUpperCase():"";if("LI"===cr&&!Wi&&(R=Se,Se=Se.parentNode,pt=cr),/^(LI|DT|DD)$/.test(pt)&&on.isEmpty(R))return void rB(t,qn,Se,R,Gt);Gt&&R===t.getBody()||(Gt=Gt||"P",bl(R)?(ee=Ro(R),on.isEmpty(R)&&eO(R),PA(t,ee),hS(t,ee)):bi()?pi():bi(!0)?(ee=R.parentNode.insertBefore(qn(),R),hS(t,Xw(R,"HR")?ee:R)):(m=function(t){var a=t.cloneRange();return a.setStart(t.startContainer,wv(!0,t.startContainer,t.startOffset)),a.setEnd(t.endContainer,wv(!1,t.endContainer,t.endOffset)),a}($n).cloneRange(),m.setEndAfter(R),function(t){Mn(xh(Dt.fromDom(t),Qi),function(a){var m=a.dom;m.nodeValue=Kc(m.nodeValue)})}(Ee=m.extractContents()),function(t){do{Kr(t)&&(t.nodeValue=t.nodeValue.replace(/^[\r\n]+/,"")),t=t.firstChild}while(t)}(Ee),ee=Ee.firstChild,on.insertAfter(Ee,R),function(t,a,m){var R,v=m,S=[];if(v){for(;v=v.firstChild;){if(t.isBlock(v))return;la(v)&&!a[v.nodeName.toLowerCase()]&&S.push(v)}for(R=S.length;R--;)(!(v=S[R]).hasChildNodes()||v.firstChild===v.lastChild&&""===v.firstChild.nodeValue||oB(t,v))&&t.remove(v)}}(on,Yn,ee),function(t,a){a.normalize();var m=a.lastChild;(!m||/^(left|right)$/gi.test(t.getStyle(m,"float",!0)))&&t.add(a,"br")}(on,R),on.isEmpty(R)&&eO(R),ee.normalize(),on.isEmpty(ee)?(on.remove(ee),pi()):(PA(t,ee),hS(t,ee))),on.setAttrib(ee,"id",""),t.fire("NewBlock",{newBlock:ee}))}},Nk=function(t,a,m){var v=t.dom.createRng();m?(v.setStartBefore(a),v.setEndBefore(a)):(v.setStartAfter(a),v.setEndAfter(a)),t.selection.setRng(v),xv(t,v)},pB=function(t,a){var R,ee,m=t.selection,v=t.dom,S=m.getRng();zC(v,S).each(function(Yn){S.setStart(Yn.startContainer,Yn.startOffset),S.setEnd(Yn.endContainer,Yn.endOffset)});var Ee=S.startOffset,Se=S.startContainer;if(1===Se.nodeType&&Se.hasChildNodes()){var pt=Ee>Se.childNodes.length-1;Se=Se.childNodes[Math.min(Ee,Se.childNodes.length-1)]||Se,Ee=pt&&3===Se.nodeType?Se.nodeValue.length:0}var Gt=v.getParent(Se,v.isBlock),jt=Gt?v.getParent(Gt.parentNode,v.isBlock):null,on=jt?jt.nodeName.toUpperCase():"",Rn=!(!a||!a.ctrlKey);"LI"===on&&!Rn&&(Gt=jt),Se&&3===Se.nodeType&&Ee>=Se.nodeValue.length&&(function(t,a,m){for(var S,v=new Sr(a,m),R=t.getNonEmptyElements();S=v.next();)if(R[S.nodeName.toLowerCase()]||S.length>0)return!0}(t.schema,Se,Gt)||(R=v.create("br"),S.insertNode(R),S.setStartAfter(R),S.setEndAfter(R),ee=!0)),R=v.create("br"),im(v,S,R),Nk(t,R,ee),t.undoManager.add()},mB=function(t,a){var m=Dt.fromTag("br");_c(Dt.fromDom(a),m),t.undoManager.add()},fB=function(t,a){gB(t.getBody(),a)||Yc(Dt.fromDom(a),Dt.fromTag("br"));var m=Dt.fromTag("br");Yc(Dt.fromDom(a),m),Nk(t,m.dom,!1),t.undoManager.add()},gB=function(t,a){return!!function(t){return _a(t.getNode())}(Tr.after(a))||Bs(t,Tr.after(a)).map(function(m){return _a(m.getNode())}).getOr(!1)},Bk=function(t){return t&&"A"===t.nodeName&&"href"in t},Hg=function(t){return t.fold(Be,Bk,Bk,Be)},vB=function(t,a){a.fold(xe,le(mB,t),le(fB,t),xe)},Uk=function(t,a){var m=function(t){var a=le(zT,t),m=Tr.fromRangeStart(t.selection.getRng());return l0(a,t.getBody(),m).filter(Hg)}(t);m.isSome()?m.each(le(vB,t)):pB(t,a)},G_=function(t,a){return KP(t).filter(function(m){return a.length>0&&qr(Dt.fromDom(m),a)}).isSome()},yb=Go_generate([{br:[]},{block:[]},{none:[]}]),_S=function(t,a){return function(t){return G_(t,function(t){return t.getParam("no_newline_selector","")}(t))}(t)},rO=function(t){return function(a,m){return""===hm(a)===t}},Yk=function(t){return function(a,m){return function(t){return KP(t).filter(function(a){return uu(Dt.fromDom(a))}).isSome()}(a)===t}},eI=function(t,a){return function(m,v){var S=function(t){return KP(t).fold(oe(""),function(a){return a.nodeName.toUpperCase()})}(m)===t.toUpperCase();return S===a}},tI=function(t){return eI("pre",t)},nI=function(t){return function(a,m){return function(t){return t.getParam("br_in_pre",!0)}(a)===t}},CB=function(t,a){return function(t){return G_(t,function(t){return t.getParam("br_newline_selector",".mce-toc h2,figcaption,caption")}(t))}(t)},OA=function(t,a){return a},Hk=function(t){var a=hm(t),m=function(t,a){var v,S,m=t.getRoot();for(v=a;v!==m&&"false"!==t.getContentEditable(v);)"true"===t.getContentEditable(v)&&(S=v),v=v.parentNode;return v!==m?S:m}(t.dom,t.selection.getStart());return m&&t.schema.isValidChild(m.nodeName,a||"P")},Iv=function(t,a){return function(m,v){return Bn(t,function(R,ee){return R&&ee(m,v)},!0)?Ne.some(a):Ne.none()}},Zk=function(t,a){(function(t,a){return s0([Iv([_S],yb.none()),Iv([eI("summary",!0)],yb.br()),Iv([tI(!0),nI(!1),OA],yb.br()),Iv([tI(!0),nI(!1)],yb.block()),Iv([tI(!0),nI(!0),OA],yb.block()),Iv([tI(!0),nI(!0)],yb.br()),Iv([Yk(!0),OA],yb.br()),Iv([Yk(!0)],yb.block()),Iv([rO(!0),OA,Hk],yb.block()),Iv([rO(!0)],yb.br()),Iv([CB],yb.br()),Iv([rO(!1),OA],yb.br()),Iv([Hk],yb.block())],[t,!(!a||!a.shiftKey)]).getOr(yb.none())})(t,a).fold(function(){Uk(t,a)},function(){uB(t,a)},xe)},MB=function(t){t.on("keydown",function(a){a.keyCode===Ua.ENTER&&function(t,a){a.isDefaultPrevented()||(a.preventDefault(),function(t){t.typing&&(t.typing=!1,t.add())}(t.undoManager),t.undoManager.transact(function(){!1===t.selection.isCollapsed()&&t.execCommand("Delete"),Zk(t,a)}))}(t,a)})},xB=function(t,a){t.on("keydown",function(m){!1===m.isDefaultPrevented()&&function(t,a,m){pD([{keyCode:Ua.END,action:lc(_k,t,!0)},{keyCode:Ua.HOME,action:lc(_k,t,!1)},{keyCode:Ua.END,action:lc(Mk,t,!0)},{keyCode:Ua.HOME,action:lc(Mk,t,!1)},{keyCode:Ua.END,action:lc(Hw,t,!0,a)},{keyCode:Ua.HOME,action:lc(Hw,t,!1,a)}],m).each(function(v){m.preventDefault()})}(t,a,m)})},oO=gi().browser,Wk=function(t){(function(t){var a=av(function(){t.composing||$C(t)},0);oO.isIE()&&(t.on("keypress",function(m){a.throttle()}),t.on("remove",function(m){a.cancel()}))})(t),t.on("input",function(a){!1===a.isComposing&&$C(t)})},$k=gi(),jk=function(t){return t.stopImmediatePropagation()},Kk=function(t){return t.keyCode===Ua.PAGE_UP||t.keyCode===Ua.PAGE_DOWN},Jk=function(t,a,m){m&&!t.get()?a.on("NodeChange",jk,!0):!m&&t.get()&&a.off("NodeChange",jk),t.set(m)},SB=function(t,a){if(!$k.os.isOSX()){var m=nd(!1);t.on("keydown",function(v){Kk(v)&&Jk(m,t,!0)}),t.on("keyup",function(v){!1===v.isDefaultPrevented()&&function(t,a,m){pD([{keyCode:Ua.PAGE_UP,action:lc(Hw,t,!1,a)},{keyCode:Ua.PAGE_DOWN,action:lc(Hw,t,!0,a)}],m)}(t,a,v),Kk(v)&&m.get()&&(Jk(m,t,!1),t.nodeChanged())})}},Qk=function(t,a){var m=a.container(),v=a.offset();return Kr(m)?(m.insertData(v,t),Ne.some(Tr(m,v+t.length))):Pg(a).map(function(S){var R=Dt.fromText(t);return a.isAtEnd()?Yc(S,R):_c(S,R),Tr(R.dom,t.length)})},qk=le(Qk,Pu),AB=le(Qk," "),IB=function(t,a){return function(m){return function(t,a){return!Sx(a)&&(pb(t,a)||G0(t,a)||ug(t,a))}(t,m)?qk(a):AB(a)}},Xk=function(t){var a=Tr.fromRangeStart(t.selection.getRng()),m=Dt.fromDom(t.getBody());if(t.selection.isCollapsed()){var v=le(zT,t),S=Tr.fromRangeStart(t.selection.getRng());return l0(v,t.getBody(),S).bind(function(t){return function(a){return a.fold(function(m){return Ys(t.dom,Tr.before(m))},function(m){return ou(m)},function(m){return au(m)},function(m){return Bs(t.dom,Tr.after(m))})}}(m)).bind(IB(m,a)).exists(function(t){return function(a){return t.selection.setRng(a.toRange()),t.nodeChanged(),!0}}(t))}return!1},LB=function(t){t.on("keydown",function(a){!1===a.isDefaultPrevented()&&function(t,a){pD([{keyCode:Ua.SPACEBAR,action:lc(Xk,t)}],a).each(function(m){a.preventDefault()})}(t,a)})},kB=function(t){var a=s6(t);return function(t){t.on("keyup compositionstart",le(A6,t))}(t),q6(t,a),tB(t,a),MB(t),LB(t),Wk(t),xB(t,a),SB(t,a),a},eR=function(){function t(a){this.lastPath=[],this.editor=a;var m,v=this;"onselectionchange"in a.getDoc()||a.on("NodeChange click mouseup keyup focus",function(S){var R=a.selection.getRng(),ee={startContainer:R.startContainer,startOffset:R.startOffset,endContainer:R.endContainer,endOffset:R.endOffset};("nodechange"===S.type||!N_(ee,m))&&a.fire("SelectionChange"),m=ee}),a.on("contextmenu",function(){a.fire("SelectionChange")}),a.on("SelectionChange",function(){var S=a.selection.getStart(!0);!S||!$r.range&&a.selection.isCollapsed()||Jy(a)&&!v.isSameElementPath(S)&&a.dom.isChildOf(S,a.getBody())&&a.nodeChanged({selectionChange:!0})}),a.on("mouseup",function(S){!S.isDefaultPrevented()&&Jy(a)&&("IMG"===a.selection.getNode().nodeName?Ht.setEditorTimeout(a,function(){a.nodeChanged()}):a.nodeChanged())})}return t.prototype.nodeChanged=function(a){var v,S,R,m=this.editor.selection;this.editor.initialized&&m&&!function(t){return t.getParam("disable_nodechange")}(this.editor)&&!this.editor.mode.isReadOnly()&&(R=this.editor.getBody(),((v=m.getStart(!0)||R).ownerDocument!==this.editor.getDoc()||!this.editor.dom.isChildOf(v,R))&&(v=R),S=[],this.editor.dom.getParent(v,function(ee){if(ee===R)return!0;S.push(ee)}),(a=a||{}).element=v,a.parents=S,this.editor.fire("NodeChange",a))},t.prototype.isSameElementPath=function(a){var m,v=this.editor.$(a).parentsUntil(this.editor.getBody()).add(a);if(v.length===this.lastPath.length){for(m=v.length;m>=0&&v[m]===this.lastPath[m];m--);if(-1===m)return this.lastPath=v,!0}return this.lastPath=v,!1},t}(),nR=function(t){(function(t){t.on("click",function(a){t.dom.getParent(a.target,"details")&&a.preventDefault()})})(t),function(t){t.parser.addNodeFilter("details",function(a){Mn(a,function(m){m.attr("data-mce-open",m.attr("open")),m.attr("open","open")})}),t.serializer.addNodeFilter("details",function(a){Mn(a,function(m){var v=m.attr("data-mce-open");m.attr("open",ue(v)?v:null),m.attr("data-mce-open",null)})})}(t)},iR=function(t){return la(t)&&qu(Dt.fromDom(t))},aO=function(t){t.on("click",function(a){a.detail>=3&&function(t){var a=t.selection.getRng(),m=Tr.fromRangeStart(a),v=Tr.fromRangeEnd(a);if(Tr.isElementPosition(m)){var S=m.container();iR(S)&&ou(S).each(function(R){return a.setStart(R.container(),R.offset())})}Tr.isElementPosition(v)&&(S=m.container(),iR(S)&&au(S).each(function(ee){return a.setEnd(ee.container(),ee.offset())}));t.selection.setRng(_M(a))}(t)})},rR=function(t){var a=t.getBoundingClientRect(),m=t.ownerDocument,v=m.documentElement,S=m.defaultView;return{top:a.top+S.pageYOffset-v.clientTop,left:a.left+S.pageXOffset-v.clientLeft}},aR=function(t,a){return function(t,a,m){return{pageX:m.left-t.left+a.left,pageY:m.top-t.top+a.top}}(function(t){return t.inline?rR(t.getBody()):{left:0,top:0}}(t),function(t){var a=t.getBody();return t.inline?{left:a.scrollLeft,top:a.scrollTop}:{left:0,top:0}}(t),function(t,a){if(a.target.ownerDocument!==t.getDoc()){var m=rR(t.getContentAreaContainer()),v=function(t){var a=t.getBody(),m=t.getDoc().documentElement,v={left:a.scrollLeft,top:a.scrollTop},S={left:a.scrollLeft||m.scrollLeft,top:a.scrollTop||m.scrollTop};return t.inline?v:S}(t);return{left:a.pageX-m.left+v.left,top:a.pageY-m.top+v.top}}return{left:a.pageX,top:a.pageY}}(t,a))},rI=Os,zB=$l,ZB=function(t,a,m,v){var S=t.dom,R=a.cloneNode(!0);S.setStyles(R,{width:m,height:v}),S.setAttrib(R,"data-mce-selected",null);var ee=S.create("div",{class:"mce-drag-container","data-mce-bogus":"all",unselectable:"on",contenteditable:"false"});return S.setStyles(ee,{position:"absolute",opacity:.5,overflow:"hidden",border:0,padding:0,margin:0,width:m,height:v}),S.setStyles(R,{margin:0,boxSizing:"border-box"}),ee.appendChild(R),ee},sR=function(t){t&&t.parentNode&&t.parentNode.removeChild(t)},$B=function(t,a){return function(m){if(function(t){return 0===t.button}(m)){var v=On(a.dom.getParents(m.target),function(){for(var t=[],a=0;a<arguments.length;a++)t[a]=arguments[a];return function(m){for(var v=0;v<t.length;v++)if(t[v](m))return!0;return!1}}(rI,zB)).getOr(null);if(function(t,a){return rI(a)&&a!==t}(a.getBody(),v)){var S=a.dom.getPos(v),R=a.getBody(),ee=a.getDoc().documentElement;t.set({element:v,dragging:!1,screenX:m.screenX,screenY:m.screenY,maxX:(a.inline?R.scrollWidth:ee.offsetWidth)-2,maxY:(a.inline?R.scrollHeight:ee.offsetHeight)-2,relX:m.pageX-S.x,relY:m.pageY-S.y,width:v.offsetWidth,height:v.offsetHeight,ghost:ZB(a,v,v.offsetWidth,v.offsetHeight)})}}}},JB=function(t,a){return function(m){t.on(function(v){if(v.dragging){if(function(t,a,m){return a!==m&&!t.dom.isChildOf(a,m)&&!rI(a)}(a,function(t){var m=t.getSel().getRangeAt(0).startContainer;return 3===m.nodeType?m.parentNode:m}(a.selection),v.element)){var S=function(t){var a=t.cloneNode(!0);return a.removeAttribute("data-mce-selected"),a}(v.element);a.fire("drop",{clientX:m.clientX,clientY:m.clientY}).isDefaultPrevented()||a.undoManager.transact(function(){sR(v.element),a.insertContent(a.dom.getOuterHTML(S)),a._selectionOverrides.hideFakeCaret()})}a.fire("dragend")}}),cR(t)}},cR=function(t){t.on(function(a){sR(a.ghost)}),t.clear()},lO=function(t){var a=$h(),m=jl.DOM,v=document,S=$B(a,t),R=function(t,a){var m=Ht.throttle(function(v,S){a._selectionOverrides.hideFakeCaret(),a.selection.placeCaretAt(v,S)},0);return a.on("remove",m.stop),function(v){return t.on(function(S){var R=Math.max(Math.abs(v.screenX-S.screenX),Math.abs(v.screenY-S.screenY));if(!S.dragging&&R>10){if(a.fire("dragstart",{target:S.element}).isDefaultPrevented())return;S.dragging=!0,a.focus()}if(S.dragging){var Ee=function(t,a){return{pageX:a.pageX-t.relX,pageY:a.pageY+5}}(S,aR(a,v));(function(t,a){t.parentNode!==a&&a.appendChild(t)})(S.ghost,a.getBody()),function(t,a,m,v,S,R){var ee=0,Ee=0;t.style.left=a.pageX+"px",t.style.top=a.pageY+"px",a.pageX+m>S&&(ee=a.pageX+m-S),a.pageY+v>R&&(Ee=a.pageY+v-R),t.style.width=m-ee+"px",t.style.height=v-Ee+"px"}(S.ghost,Ee,S.width,S.height,S.maxX,S.maxY),m(v.clientX,v.clientY)}})}}(a,t),ee=JB(a,t),Ee=function(t,a){return function(){t.on(function(m){m.dragging&&a.fire("dragend")}),cR(t)}}(a,t);t.on("mousedown",S),t.on("mousemove",R),t.on("mouseup",ee),m.bind(v,"mousemove",R),m.bind(v,"mouseup",Ee),t.on("remove",function(){m.unbind(v,"mousemove",R),m.unbind(v,"mouseup",Ee)}),t.on("keydown",function(Se){Se.keyCode===Ua.ESC&&Ee()})},XB=function(t){lO(t),function(t){t.on("drop",function(a){var m=typeof a.clientX<"u"?t.getDoc().elementFromPoint(a.clientX,a.clientY):null;(rI(m)||"false"===t.dom.getContentEditableParent(m))&&a.preventDefault()})}(t),function(t){return t.getParam("block_unsupported_drop",!0,"boolean")}(t)&&function(t){var a=function(S){if(!S.isDefaultPrevented()){var R=S.dataTransfer;R&&(st(R.types,"Files")||R.files.length>0)&&(S.preventDefault(),"drop"===S.type&&Ew(t,"Dropped file type is not supported"))}},m=function(S){j1(t,S.target)&&a(S)},v=function(){var S=jl.DOM,R=t.dom,ee=document,Ee=t.inline?t.getBody():t.getDoc(),Se=["drop","dragover"];Mn(Se,function(pt){S.bind(ee,pt,m),R.bind(Ee,pt,a)}),t.on("remove",function(){Mn(Se,function(pt){S.unbind(ee,pt,m),R.unbind(Ee,pt,a)})})};t.on("init",function(){Ht.setEditorTimeout(t,v,0)})}(t)},dR=$l,om=Os,oI=function(t,a){return O0(t.getBody(),a)},n4=function(t){var Se,a=t.selection,m=t.dom,v=m.isBlock,S=t.getBody(),R=Ap(t,S,v,function(){return ab(t)}),ee="sel-"+m.uniqueId(),Ee="data-mce-selected",Gt=function(Wr){return Wr!==S&&(om(Wr)||Ks(Wr))&&m.isChildOf(Wr,S)},jt=function(Wr){return V0(Wr)||nl(Wr)||vf(Wr)||dy(Wr)},Rn=function(Wr){Wr&&a.setRng(Wr)},Yn=a.getRng,$n=function(Wr,qa,po,Wo){return void 0===Wo&&(Wo=!0),t.fire("ShowCaret",{target:qa,direction:Wr,before:po}).isDefaultPrevented()?null:(Wo&&a.scrollIntoView(qa,-1===Wr),R.show(po,qa))},pi=function(Wr){return Nd(Wr)||cp(Wr)||Ql(Wr)},tr=function(Wr){return pi(Wr.startContainer)||pi(Wr.endContainer)},Wi=function(Wr){var qa=t.schema.getShortEndedElements(),po=m.createRng(),Wo=Wr.startContainer,vo=Wr.startOffset,So=Wr.endContainer,ca=Wr.endOffset;return Nn(qa,Wo.nodeName.toLowerCase())?0===vo?po.setStartBefore(Wo):po.setStartAfter(Wo):po.setStart(Wo,vo),Nn(qa,So.nodeName.toLowerCase())?0===ca?po.setEndBefore(So):po.setEndAfter(So):po.setEnd(So,ca),po},cr=function(Wr){var qa=Wr.cloneNode(!0),po=t.fire("ObjectSelected",{target:Wr,targetClone:qa});if(po.isDefaultPrevented())return null;var Wo=function(Wr,qa,po){var Wo=t.$,vo=Mu(Dt.fromDom(t.getBody()),"#"+ee).fold(function(){return Wo([])},function(Jr){return Wo([Jr.dom])});0===vo.length&&(vo=Wo('<div data-mce-bogus="all" class="mce-offscreen-selection"></div>').attr("id",ee)).appendTo(t.getBody());var So=m.createRng();qa===po&&$r.ie?(vo.empty().append('<p style="font-size: 0" data-mce-bogus="all">\xa0</p>').append(qa),So.setStartAfter(vo[0].firstChild.firstChild),So.setEndAfter(qa)):(vo.empty().append(Pu).append(qa).append(Pu),So.setStart(vo[0].firstChild,1),So.setEnd(vo[0].lastChild,0)),vo.css({top:m.getPos(Wr,t.getBody()).y}),vo[0].focus();var ca=a.getSel();return ca.removeAllRanges(),ca.addRange(So),So}(Wr,po.targetClone,qa),vo=Dt.fromDom(Wr);return Mn(iu(Dt.fromDom(t.getBody()),"*[data-mce-selected]"),function(So){Ao(vo,So)||nr(So,Ee)}),m.getAttrib(Wr,Ee)||Wr.setAttribute(Ee,"1"),Se=Wr,Xo(),Wo},Ur=function(Wr,qa){if(!Wr)return null;if(Wr.collapsed){if(!tr(Wr)){var po=qa?1:-1,Wo=Jv(po,S,Wr),vo=Wo.getNode(!qa);if(ff(vo))return $n(po,vo,!!qa&&!Wo.isAtEnd(),!1);var So=Wo.getNode(qa);if(ff(So))return $n(po,So,!qa&&!Wo.isAtEnd(),!1)}return null}var ca=Wr.startContainer,Jr=Wr.startOffset,na=Wr.endOffset;if(3===ca.nodeType&&0===Jr&&om(ca.parentNode)&&(ca=ca.parentNode,Jr=m.nodeIndex(ca),ca=ca.parentNode),1!==ca.nodeType)return null;if(na===Jr+1&&ca===Wr.endContainer){var Ul=ca.childNodes[Jr];if(Gt(Ul))return cr(Ul)}return null},no=function(){Se&&Se.removeAttribute(Ee),Mu(Dt.fromDom(t.getBody()),"#"+ee).each(Dr),Se=null},Xo=function(){R.hide()};return $r.ceFalse&&!EM(t)&&function(){t.on("mouseup",function(vo){var So=Yn();So.collapsed&&MM(t,vo.clientX,vo.clientY)&&gP(t,So,!1).each(Rn)}),t.on("click",function(vo){var So=oI(t,vo.target);So&&(om(So)&&(vo.preventDefault(),t.focus()),dR(So)&&m.isChildOf(So,a.getNode())&&no())}),t.on("blur NewBlock",no),t.on("ResizeWindow FullscreenStateChanged",R.reposition);var po=function(vo,So){var ca=m.getParent(vo,v),Jr=m.getParent(So,v);return!ge(ca)&&(!(vo===Jr||!m.isChildOf(ca,Jr)||!1!==om(oI(t,ca)))||!m.isChildOf(Jr,ca)&&!function(vo,So){return m.getParent(vo,v)===m.getParent(So,v)}(ca,Jr)&&function(vo){var So=vo.firstChild;if(ge(So))return!1;var ca=Tr.before(So);if(_a(ca.getNode())&&1===vo.childNodes.length)return!jt(ca);var na=zn(vo).next(ca);return na&&!jt(na)}(ca))};t.on("tap",function(vo){var So=vo.target,ca=oI(t,So);om(ca)?(vo.preventDefault(),lD(t,ca).each(Ur)):Gt(So)&&lD(t,So).each(Ur)},!0),t.on("mousedown",function(vo){var So=vo.target;if((So===S||"HTML"===So.nodeName||m.isChildOf(So,S))&&!1!==MM(t,vo.clientX,vo.clientY)){var ca=oI(t,So);if(ca)om(ca)?(vo.preventDefault(),lD(t,ca).each(Ur)):(no(),(!dR(ca)||!vo.shiftKey)&&!BC(vo.clientX,vo.clientY,a.getRng())&&(Xo(),a.placeCaretAt(vo.clientX,vo.clientY)));else if(Gt(So))lD(t,So).each(Ur);else if(!1===ff(So)){no(),Xo();var Jr=PP(S,vo.clientX,vo.clientY);if(Jr&&!po(So,Jr.node)){vo.preventDefault();var na=$n(1,Jr.node,Jr.before,!1);Rn(na),t.getBody().focus()}}}}),t.on("keypress",function(vo){Ua.modifierPressed(vo)||om(a.getNode())&&vo.preventDefault()}),t.on("GetSelectionRange",function(vo){var So=vo.range;if(Se){if(!Se.parentNode)return void(Se=null);(So=So.cloneRange()).selectNode(Se),vo.range=So}}),t.on("SetSelectionRange",function(vo){vo.range=Wi(vo.range);var So=Ur(vo.range,vo.forward);So&&(vo.range=So)});t.on("AfterSetSelectionRange",function(vo){var So=vo.range,ca=So.startContainer.parentNode;!tr(So)&&!function(vo){return"mcepastebin"===vo.id}(ca)&&Xo(),function(Wr){return m.hasClass(Wr,"mce-offscreen-selection")}(ca)||no()}),t.on("copy",function(vo){var So=vo.clipboardData;if(!vo.isDefaultPrevented()&&vo.clipboardData&&!$r.ie){var ca=function(){var Wr=m.get(ee);return Wr&&Wr.getElementsByTagName("*")[0]}();ca&&(vo.preventDefault(),So.clearData(),So.setData("text/html",ca.outerHTML),So.setData("text/plain",ca.outerText||ca.innerText))}}),XB(t),function(t){var a=av(function(){if(!t.removed&&t.getBody().contains(document.activeElement)){var m=t.selection.getRng();if(m.collapsed){var v=ZT(t,m,!1);t.selection.setRng(v)}}},0);t.on("focus",function(){a.throttle()}),t.on("blur",function(){a.cancel()})}(t),function(t){t.on("init",function(){t.on("focusin",function(a){var m=a.target;if(Ks(m)){var v=O0(t.getBody(),m),S=Os(v)?v:m;t.selection.getNode()!==S&&lD(t,S).each(function(R){return t.selection.setRng(R)})}})})}(t)}(),{showCaret:$n,showBlockCaretContainer:function(Wr){Wr.hasAttribute("data-mce-caret")&&(Ro(Wr),Rn(Yn()),a.scrollIntoView(Wr))},hideFakeCaret:Xo,destroy:function(){R.destroy(),Se=null}}},i4=function(t){var Xr,yo,a=Li.each,m=Ua.BACKSPACE,v=Ua.DELETE,S=t.dom,R=t.selection,ee=t.parser,Ee=$r.gecko,Se=$r.ie,pt=$r.webkit,Gt="data:text/mce-internal,",jt=Se?"Text":"URL",on=function(Xr,yo){try{t.getDoc().execCommand(Xr,!1,yo)}catch{}},Rn=function(Xr){return Xr.isDefaultPrevented()},bi=function(){var Xr=function(Fa){var fr=S.create("body"),so=Fa.cloneContents();return fr.appendChild(so),R.serializer.serialize(fr,{format:"html"})};t.on("keydown",function(Fa){var so,eo,fr=Fa.keyCode;if(!Rn(Fa)&&(fr===v||fr===m)){if(so=t.selection.isCollapsed(),eo=t.getBody(),so&&!S.isEmpty(eo)||!so&&!function(Fa){var fr=Xr(Fa),so=S.createRng();return so.selectNode(t.getBody()),fr===Xr(so)}(t.selection.getRng()))return;Fa.preventDefault(),t.setContent(""),eo.firstChild&&S.isBlock(eo.firstChild)?t.selection.setCursorLocation(eo.firstChild,0):t.selection.setCursorLocation(eo,0),t.nodeChanged()}})},pi=function(){t.shortcuts.add("meta+a",null,"SelectAll")},tr=function(){t.inline||S.bind(t.getDoc(),"mousedown mouseup",function(Xr){var yo;if(Xr.target===t.getDoc().documentElement)if(yo=R.getRng(),t.getBody().focus(),"mousedown"===Xr.type){if(Nd(yo.startContainer))return;R.placeCaretAt(Xr.clientX,Xr.clientY)}else R.setRng(yo)})},Oi=function(){Range.prototype.getClientRects||t.on("mousedown",function(Xr){if(!Rn(Xr)&&"HTML"===Xr.target.nodeName){var yo=t.getBody();yo.blur(),Ht.setEditorTimeout(t,function(){yo.focus()})}})},cr=function(){t.on("click",function(Xr){var yo=Xr.target;/^(IMG|HR)$/.test(yo.nodeName)&&"false"!==S.getContentEditableParent(yo)&&(Xr.preventDefault(),t.selection.select(yo),t.nodeChanged()),"A"===yo.nodeName&&S.hasClass(yo,"mce-item-anchor")&&(Xr.preventDefault(),R.select(yo))})},no=function(){t.on("keydown",function(Xr){if(!Rn(Xr)&&Xr.keyCode===m&&R.isCollapsed()&&0===R.getRng().startOffset){var yo=R.getNode().previousSibling;if(yo&&yo.nodeName&&"table"===yo.nodeName.toLowerCase())return Xr.preventDefault(),!1}})},Xo=function(){(function(t){return t.getParam("readonly")})(t)||t.on("BeforeExecCommand mousedown",function(){on("StyleWithCSS",!1),on("enableInlineTableEditing",!1),b0(t)||on("enableObjectResizing",!1)})},Wr=function(){t.on("SetContent ExecCommand",function(yo){("setcontent"===yo.type||"mceInsertLink"===yo.command)&&a(S.select("a"),function(yo){var Fa=yo.parentNode,fr=S.getRoot();if(Fa.lastChild===yo){for(;Fa&&!S.isBlock(Fa);){if(Fa.parentNode.lastChild!==Fa||Fa===fr)return;Fa=Fa.parentNode}S.add(Fa,"br",{"data-mce-bogus":1})}})})},Wo=function(){t.contentStyles.push("img:-moz-broken {-moz-force-broken-image-icon:1;min-width:24px;min-height:24px}")},vo=function(){t.inline||t.on("keydown",function(){document.activeElement===document.body&&t.getWin().focus()})},So=function(){t.inline||(t.contentStyles.push("body {min-height: 150px}"),t.on("click",function(Xr){var yo;if("HTML"===Xr.target.nodeName){if($r.ie>11)return void t.getBody().focus();yo=t.selection.getRng(),t.getBody().focus(),t.selection.setRng(yo),t.selection.normalize(),t.nodeChanged()}}))},ca=function(){$r.mac&&t.on("keydown",function(Xr){!Ua.metaKeyPressed(Xr)||Xr.shiftKey||37!==Xr.keyCode&&39!==Xr.keyCode||(Xr.preventDefault(),t.selection.getSel().modify("move",37===Xr.keyCode?"backward":"forward","lineboundary"))})},na=function(){t.on("click",function(Xr){var yo=Xr.target;do{if("A"===yo.tagName)return void Xr.preventDefault()}while(yo=yo.parentNode)}),t.contentStyles.push(".mce-content-body {-webkit-touch-callout: none}")},Ul=function(){t.on("init",function(){t.dom.bind(t.getBody(),"submit",function(Xr){Xr.preventDefault()})})},Mc=function(){t.on("dragstart",function(Xr){!function(Xr){var yo,Fa;Xr.dataTransfer&&(t.selection.isCollapsed()&&"IMG"===Xr.target.tagName&&R.select(Xr.target),(yo=t.selection.getContent()).length>0&&(Fa=Gt+escape(t.id)+","+escape(yo),Xr.dataTransfer.setData(jt,Fa)))}(Xr)}),t.on("drop",function(Xr){if(!Rn(Xr)){var yo=function(Xr){var yo;return Xr.dataTransfer&&(yo=Xr.dataTransfer.getData(jt))&&yo.indexOf(Gt)>=0?(yo=yo.substr(Gt.length).split(","),{id:unescape(yo[0]),html:unescape(yo[1])}):null}(Xr);if(yo&&yo.id!==t.id){Xr.preventDefault();var Fa=k0(Xr.x,Xr.y,t.getDoc());R.setRng(Fa),function(Xr,yo){t.queryCommandSupported("mceInsertClipboardContent")?t.execCommand("mceInsertClipboardContent",!1,{content:Xr,internal:yo}):t.execCommand("mceInsertContent",!1,Xr)}(yo.html,!0)}}})},fh=xe;return EM(t)?(pt&&(tr(),cr(),Ul(),pi(),$r.iOS&&(vo(),So(),na())),Ee&&(Oi(),Xo(),Wo(),ca())):(t.on("keydown",function(Xr){var yo,Fa;if(!Rn(Xr)&&Xr.keyCode===Ua.BACKSPACE){var fr=(yo=R.getRng()).startContainer,so=yo.startOffset,eo=S.getRoot();if(Fa=fr,yo.collapsed&&0===so){for(;Fa&&Fa.parentNode&&Fa.parentNode.firstChild===Fa&&Fa.parentNode!==eo;)Fa=Fa.parentNode;"BLOCKQUOTE"===Fa.tagName&&(t.formatter.toggle("blockquote",null,Fa),(yo=S.createRng()).setStart(fr,0),yo.setEnd(fr,0),R.setRng(yo))}}}),bi(),$r.windowsPhone||t.on("keyup focusin mouseup",function(Xr){Ua.modifierPressed(Xr)||R.normalize()},!0),pt&&(tr(),cr(),hm(t)&&t.on("init",function(){on("DefaultParagraphSeparator",hm(t))}),Ul(),no(),ee.addNodeFilter("br",function(Xr){for(var yo=Xr.length;yo--;)"Apple-interchange-newline"===Xr[yo].attr("class")&&Xr[yo].remove()}),$r.iOS?(vo(),So(),na()):pi()),$r.ie>=11&&(So(),no()),$r.ie&&(pi(),on("AutoUrlDetect",!1),Mc()),Ee&&(t.on("keydown",function(Xr){if(!Rn(Xr)&&Xr.keyCode===m){if(!t.getBody().getElementsByTagName("hr").length)return;if(R.isCollapsed()&&0===R.getRng().startOffset){var yo=R.getNode(),Fa=yo.previousSibling;if("HR"===yo.nodeName)return S.remove(yo),void Xr.preventDefault();Fa&&Fa.nodeName&&"hr"===Fa.nodeName.toLowerCase()&&(S.remove(Fa),Xr.preventDefault())}}}),Oi(),Xr=function(){var Fa=S.getAttribs(R.getStart().cloneNode(!1));return function(){var fr=R.getStart();fr!==t.getBody()&&(S.setAttrib(fr,"style",null),a(Fa,function(so){fr.setAttributeNode(so.cloneNode(!0))}))}},yo=function(){return!R.isCollapsed()&&S.getParent(R.getStart(),S.isBlock)!==S.getParent(R.getEnd(),S.isBlock)},t.on("keypress",function(Fa){var fr;if(!Rn(Fa)&&(8===Fa.keyCode||46===Fa.keyCode)&&yo())return fr=Xr(),t.getDoc().execCommand("delete",!1,null),fr(),Fa.preventDefault(),!1}),S.bind(t.getDoc(),"cut",function(Fa){var fr;!Rn(Fa)&&yo()&&(fr=Xr(),Ht.setEditorTimeout(t,function(){fr()}))}),Xo(),Wr(),Wo(),ca(),no())),{refreshContentEditable:fh,isHidden:function(){if(!Ee||t.removed)return!1;var Xr=t.selection.getSel();return!Xr||!Xr.rangeCount||0===Xr.rangeCount}}},aI=jl.DOM,r4=function(t){return t.inline?t.getElement().nodeName.toLowerCase():void 0},sI=function(t){return ct(t,function(a){return!1===ye(a)})},pR=function(t){var a=t.settings;return sI({block_elements:a.block_elements,boolean_attributes:a.boolean_attributes,custom_elements:a.custom_elements,extended_valid_elements:a.extended_valid_elements,invalid_elements:a.invalid_elements,invalid_styles:a.invalid_styles,move_caret_before_on_enter_elements:a.move_caret_before_on_enter_elements,non_empty_elements:a.non_empty_elements,schema:a.schema,self_closing_elements:a.self_closing_elements,short_ended_elements:a.short_ended_elements,special:a.special,text_block_elements:a.text_block_elements,text_inline_elements:a.text_inline_elements,valid_children:a.valid_children,valid_classes:a.valid_classes,valid_elements:a.valid_elements,valid_styles:a.valid_styles,verify_html:a.verify_html,whitespace_elements:a.whitespace_elements,padd_empty_block_inline_children:a.format_empty_lines})},mR=function(t){var a=t.settings,m=t.editorUpload.blobCache;return sI({allow_conditional_comments:a.allow_conditional_comments,allow_html_data_urls:a.allow_html_data_urls,allow_svg_data_urls:a.allow_svg_data_urls,allow_html_in_named_anchor:a.allow_html_in_named_anchor,allow_script_urls:a.allow_script_urls,allow_unsafe_link_target:a.allow_unsafe_link_target,convert_fonts_to_spans:a.convert_fonts_to_spans,fix_list_elements:a.fix_list_elements,font_size_legacy_values:a.font_size_legacy_values,forced_root_block:a.forced_root_block,forced_root_block_attrs:a.forced_root_block_attrs,padd_empty_with_br:a.padd_empty_with_br,preserve_cdata:a.preserve_cdata,remove_trailing_brs:a.remove_trailing_brs,inline_styles:a.inline_styles,root_name:r4(t),validate:!0,blob_cache:m,document:t.getDoc(),images_dataimg_filter:a.images_dataimg_filter})},l4=function(t){var a=t.dom.getRoot();!t.inline&&(!Jy(t)||t.selection.getStart(!0)===a)&&ou(a).each(function(m){var v=m.getNode(),S=lo(v)?ou(v).getOr(m):m;$r.browser.isIE()?function(t,a){var m=Dt.fromDom(t.getBody()),S=(jM(t)?Ne.from(a):Ne.none()).map(PD).filter(F0(m));t.bookmark=S.isSome()?S:t.bookmark}(t,S.toRange()):t.selection.setRng(S.toRange())})},c4=function(t){t.bindPendingEventDelegates(),t.initialized=!0,function(t){t.fire("Init")}(t),t.focus(!0),l4(t),t.nodeChanged({initial:!0}),t.execCallback("init_instance_callback",t),function(t){t.settings.auto_focus&&Ht.setEditorTimeout(t,function(){var a;(a=!0===t.settings.auto_focus?t:t.editorManager.get(t.settings.auto_focus)).destroyed||a.focus()},100)}(t)},fR=function(t){return t.inline?t.ui.styleSheetLoader:t.dom.styleSheetLoader},hR=function(t){var a=fR(t),m=xg(t),v=t.contentCSS,S=function(){a.unloadAll(v),t.inline||t.ui.styleSheetLoader.unloadAll(m)},R=function(){t.removed?S():t.on("remove",S)};if(t.contentStyles.length>0){var ee="";Li.each(t.contentStyles,function(Se){ee+=Se+"\r\n"}),t.dom.addStyle(ee)}var Ee=Ll.all(function(t,a,m){var v=[new Ll(function(S,R){return fR(t).loadAll(a,S,R)})];return t.inline?v:v.concat([new Ll(function(S,R){return t.ui.styleSheetLoader.loadAll(m,S,R)})])}(t,v,m)).then(R).catch(R);return t.settings.content_style&&function(t,a){var m=Dt.fromDom(t.getBody()),v=gc(ss(m)),S=Dt.fromTag("style");Xe(S,"type","text/css"),ac(S,Dt.fromText(a)),ac(v,S),t.on("remove",function(){Dr(S)})}(t,t.settings.content_style),Ee},d4=function(t){var a=t.settings,m=t.getDoc(),v=t.getBody();(function(t){t.fire("PreInit")})(t),!a.browser_spellcheck&&!a.gecko_spellcheck&&(m.body.spellcheck=!1,aI.setAttrib(v,"spellcheck","false")),t.quirks=i4(t),function(t){t.fire("PostRender")}(t);var S=function(t){return t.getParam("directionality",gu.isRtl()?"rtl":void 0)}(t);void 0!==S&&(v.dir=S),a.protect&&t.on("BeforeSetContent",function(R){Li.each(a.protect,function(ee){R.content=R.content.replace(ee,function(Ee){return"\x3c!--mce:protected "+escape(Ee)+"--\x3e"})})}),t.on("SetContent",function(){t.addVisual(t.getBody())}),t.on("compositionstart compositionend",function(R){t.composing="compositionstart"===R.type})},uO=function(t){!0!==t.removed&&(function(t){EM(t)||t.load({initial:!0,format:"html"}),t.startContent=t.getContent({format:"raw"})}(t),c4(t))},lI=function(t,a){var m=t.settings,v=t.getElement(),S=t.getDoc();m.inline||(t.getElement().style.visibility=t.orgVisibility),!a&&!t.inline&&(S.open(),S.write(t.iframeHTML),S.close()),t.inline&&(aI.addClass(v,"mce-content-body"),t.contentDocument=S=document,t.contentWindow=window,t.bodyElement=v,t.contentAreaContainer=v);var R=t.getBody();R.disabled=!0,t.readonly=!!m.readonly,t.readonly||(t.inline&&"static"===aI.getStyle(R,"position",!0)&&(R.style.position="relative"),R.contentEditable=t.getParam("content_editable_state",!0)),R.disabled=!1,t.editorUpload=aN(t),t.schema=pd(pR(t)),t.dom=jl(S,{keep_values:!0,url_converter:t.convertURL,url_converter_scope:t,hex_colors:m.force_hex_style_colors,update_styles:!0,root_element:t.inline?t.getBody():null,collect:function(){return t.inline},schema:t.schema,contentCssCors:yE(t),referrerPolicy:Ry(t),onSetAttrib:function(Se){t.fire("SetAttrib",Se)}}),t.parser=function(t){var a=vw(mR(t),t.schema);return a.addAttributeFilter("src,href,style,tabindex",function(m,v){for(var R,ee,S=m.length,Ee=t.dom,Se="data-mce-"+v;S--;)if((ee=(R=m[S]).attr(v))&&!R.attr(Se)){if(0===ee.indexOf("data:")||0===ee.indexOf("blob:"))continue;"style"===v?((ee=Ee.serializeStyle(Ee.parseStyle(ee),R.name)).length||(ee=null),R.attr(Se,ee),R.attr(v,ee)):"tabindex"===v?(R.attr(Se,ee),R.attr(v,null)):R.attr(Se,t.convertURL(ee,v,R.name))}}),a.addNodeFilter("script",function(m){for(var v=m.length;v--;){var S=m[v],R=S.attr("type")||"no/type";0!==R.indexOf("mce-")&&S.attr("type","mce-"+R)}}),t.settings.preserve_cdata&&a.addNodeFilter("#cdata",function(m){for(var v=m.length;v--;){var S=m[v];S.type=8,S.name="#comment",S.value="[CDATA["+t.dom.encode(S.value)+"]]"}}),a.addNodeFilter("p,h1,h2,h3,h4,h5,h6,div",function(m){for(var v=m.length,S=t.schema.getNonEmptyElements();v--;){var R=m[v];R.isEmpty(S)&&0===R.getAll("br").length&&(R.append(new dh("br",1)).shortEnded=!0)}}),a}(t),t.serializer=Y2(function(t){var a=t.settings;return Tn(Tn(Tn({},mR(t)),pR(t)),sI({url_converter:a.url_converter,url_converter_scope:a.url_converter_scope,element_format:a.element_format,entities:a.entities,entity_encoding:a.entity_encoding,indent:a.indent,indent_after:a.indent_after,indent_before:a.indent_before}))}(t),t),t.selection=D2(t.dom,t.getWin(),t.serializer,t),t.annotator=I1(t),t.formatter=lL(t),t.undoManager=cC(t),t._nodeChangeDispatcher=new eR(t),t._selectionOverrides=n4(t),E6(t),nR(t),EM(t)||aO(t);var ee=function(t){return EM(t)?nd(null):kB(t)}(t);C6(t,ee),function(t){hm(t)&&t.on("NodeChange",le(x6,t))}(t),fL(t);var Ee=J3(t);d4(t),Ee.fold(function(){hR(t).then(function(){return uO(t)})},function(Se){t.setProgressState(!0),hR(t).then(function(){Se().then(function(pt){t.setProgressState(!1),uO(t)},function(pt){t.notificationManager.open({type:"error",text:String(pt)}),uO(t)})})})},LA=jl.DOM,h4=function(t){var a=function(t){return t.getParam("doctype","<!DOCTYPE html>")}(t)+"<html><head>";(function(t){return t.getParam("document_base_url","")})(t)!==t.documentBaseUrl&&(a+='<base href="'+t.documentBaseURI.getURI()+'" />'),a+='<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />';var m=function(t){return m1(t,"body_id","tinymce")}(t),v=function(t){return m1(t,"body_class","")}(t),S=t.translate(function(t){return t.getParam("iframe_aria_text","Rich Text Area. Press ALT-0 for help.","string")}(t));return A_(t)&&(a+='<meta http-equiv="Content-Security-Policy" content="'+A_(t)+'" />'),a+='</head><body id="'+m+'" class="mce-content-body '+v+'" data-id="'+t.id+'" aria-label="'+S+'"><br></body></html>'},gR=function(t,a){var m=t.translate("Rich Text Area"),v=function(t,a,m,v){var S=Dt.fromTag("iframe");return zt(S,v),zt(S,{id:t+"_ifr",frameBorder:"0",allowTransparency:"true",title:a}),Qg(S,"tox-edit-area__iframe"),S}(t.id,m,a.height,function(t){return t.getParam("iframe_attrs",{})}(t)).dom;v.onload=function(){v.onload=null,t.fire("load")};var S=function(t,a){if(document.domain!==window.location.hostname&&$r.browser.isIE()){var m=Fh("mce");t[m]=function(){lI(t)};var v='javascript:(function(){document.open();document.domain="'+document.domain+'";var ed = window.parent.tinymce.get("'+t.id+'");document.write(ed.iframeHTML);document.close();ed.'+m+"(true);})()";return LA.setAttrib(a,"src",v),!0}return!1}(t,v);return t.contentAreaContainer=a.iframeContainer,t.iframeElement=v,t.iframeHTML=h4(t),LA.add(a.iframeContainer,v),S},dO=jl.DOM,pO=function(t,a,m){var v=by.get(m),S=by.urls[m]||t.documentBaseUrl.replace(/\/$/,"");if(m=Li.trim(m),v&&-1===Li.inArray(a,m)){if(Li.each(by.dependencies(m),function(ee){pO(t,a,ee)}),t.plugins[m])return;try{var R=new v(t,S,t.$);t.plugins[m]=R,R.init&&(R.init(t,S),a.push(m))}catch(ee){!function(t,a,m){var v=gu.translate(["Failed to initialize plugin: {0}",a]);ny(t,"PluginLoadError",{message:v}),mA(v,m),Ew(t,v)}(t,m,ee)}}},mO=function(t){return t.replace(/^\-/,"")},vR=function(t){return{editorContainer:t,iframeContainer:t,api:{}}},C4=function(t){var a=t.getElement();return t.inline?vR(null):function(t){var a=dO.create("div");return dO.insertAfter(a,t),vR(a)}(a)},E4=function(t){var a=t.getElement();return t.orgDisplay=a.style.display,ue(Lf(t))?function(t){return t.theme.renderUI()}(t):pe(Lf(t))?function(t){var a=t.getElement(),v=Lf(t)(t,a);return v.editorContainer.nodeType&&(v.editorContainer.id=v.editorContainer.id||t.id+"_parent"),v.iframeContainer&&v.iframeContainer.nodeType&&(v.iframeContainer.id=v.iframeContainer.id||t.id+"_iframecontainer"),v.height=v.iframeHeight?v.iframeHeight:a.offsetHeight,v}(t):C4(t)},CR=function(t){t.fire("ScriptsLoaded"),function(t){var a=Li.trim(mf(t)),m=t.ui.registry.getAll().icons,v=Tn(Tn({},Cw.get("default").icons),Cw.get(a).icons);Hi(v,function(S,R){Nn(m,R)||t.ui.registry.addIcon(R,S)})}(t),function(t){var a=Lf(t);if(ue(a)){t.settings.theme=mO(a);var m=dE.get(a);t.theme=new m(t,dE.urls[a]),t.theme.init&&t.theme.init(t,dE.urls[a]||t.documentBaseUrl.replace(/\/$/,""),t.$)}else t.theme={}}(t),function(t){var a=[];Li.each(ng(t).split(/[ ,]/),function(m){pO(t,a,mO(m))})}(t);var a=E4(t);!function(t,a){var m={show:Ne.from(a.show).getOr(xe),hide:Ne.from(a.hide).getOr(xe),disable:Ne.from(a.disable).getOr(xe),isDisabled:Ne.from(a.isDisabled).getOr(Be),enable:function(){t.mode.isReadOnly()||Ne.from(a.enable).map(ke)}};t.ui=Tn(Tn({},t.ui),m)}(t,Ne.from(a.api).getOr({}));var m={editorContainer:a.editorContainer,iframeContainer:a.iframeContainer};return t.editorContainer=m.editorContainer?m.editorContainer:null,nN(t),t.inline?lI(t):function(t,a){var m=gR(t,a);a.editorContainer&&(LA.get(a.editorContainer).style.display=t.orgDisplay,t.hidden=LA.isHidden(a.editorContainer)),t.getElement().style.display="none",LA.setAttrib(t.id,"aria-hidden","true"),m||lI(t)}(t,m)},fD=jl.DOM,ER=function(t){return"-"===t.charAt(0)},MR=function(t,a){var m=t_(a),v=function(t){return t.getParam("language_url","","string")}(a);if(!1===gu.hasCode(m)&&"en"!==m){var S=""!==v?v:a.editorManager.baseURL+"/langs/"+m+".js";t.add(S,xe,void 0,function(){!function(t,a,m){Mw(t,"LanguageLoadError",oP("language",a,m))}(a,S,m)})}},xR=function(t,a,m){return Ne.from(a).filter(function(v){return v.length>0&&!Cw.has(v)}).map(function(v){return{url:t.editorManager.baseURL+"/icons/"+v+"/icons"+m+".js",name:Ne.some(v)}})},T4=function(t,a,m){var v=xR(a,"default",m),S=function(t){return Ne.from(function(t){return t.getParam("icons_url","","string")}(t)).filter(function(a){return a.length>0}).map(function(a){return{url:a,name:Ne.none()}})}(a).orThunk(function(){return xR(a,mf(a),"")});Mn(function(t){for(var a=[],m=function(S){a.push(S)},v=0;v<t.length;v++)t[v].each(m);return a}([v,S]),function(R){t.add(R.url,xe,void 0,function(){!function(t,a,m){Mw(t,"IconsLoadError",oP("icons",a,m))}(a,R.url,R.name.getOrUndefined())})})},D4=function(t,a){var m=Xs.ScriptLoader;!function(t,a,m,v){var S=Lf(a);if(ue(S)){if(!ER(S)&&!Nn(dE.urls,S)){var R=function(t){return t.getParam("theme_url")}(a);R?dE.load(S,a.documentBaseURI.toAbsolute(R)):dE.load(S,"themes/"+S+"/theme"+m+".js")}t.loadQueue(function(){dE.waitFor(S,v)})}else v()}(m,t,a,function(){MR(m,t),T4(m,t,a),function(t,a){Li.each(function(t){return t.getParam("external_plugins")}(t),function(m,v){by.load(v,m,xe,void 0,function(){Tw(t,m,v)}),t.settings.plugins+=" "+v}),Li.each(ng(t).split(/[ ,]/),function(m){if((m=Li.trim(m))&&!by.urls[m])if(ER(m)){m=m.substr(1,m.length);var v=by.dependencies(m);Li.each(v,function(R){var ee={prefix:"plugins/",resource:R,suffix:"/plugin"+a+".js"},Ee=by.createUrl(ee,R);by.load(Ee.resource,Ee,xe,void 0,function(){Tw(t,Ee.prefix+Ee.resource+Ee.suffix,Ee.resource)})})}else{var S={prefix:"plugins/",resource:m,suffix:"/plugin"+a+".js"};by.load(m,S,xe,void 0,function(){Tw(t,S.prefix+S.resource+S.suffix,m)})}})}(t,a),m.loadQueue(function(){t.removed||CR(t)},t,function(){t.removed||CR(t)})})},A4=function(t){var a=t.id;gu.setCode(t_(t));var m=function(){fD.unbind(window,"ready",m),t.render()};if(E_.Event.domLoaded){if(t.getElement()&&$r.contentEditable){var v=Dt.fromDom(t.getElement()),S=function(t){return Bn(t.dom.attributes,function(a,m){return a[m.name]=m.value,a},{})}(v);t.on("remove",function(){vi(v.dom.attributes,function(ee){return nr(v,ee.name)}),zt(v,S)}),t.ui.styleSheetLoader=function(t,a){return dr.forElement(t,{contentCssCors:pv(a),referrerPolicy:Ry(a)})}(v,t),function(t){return t.getParam("inline")}(t)?t.inline=!0:(t.orgVisibility=t.getElement().style.visibility,t.getElement().style.visibility="hidden");var R=t.getElement().form||fD.getParent(a,"form");R&&(t.formElement=R,function(t){return t.getParam("hidden_input")}(t)&&!Zs(t.getElement())&&(fD.insertAfter(fD.create("input",{type:"hidden",name:a}),a),t.hasHiddenInput=!0),t.formEventDelegate=function(ee){t.fire(ee.type,ee)},fD.bind(R,"submit reset",t.formEventDelegate),t.on("reset",function(){t.resetContent()}),function(t){return t.getParam("submit_patch")}(t)&&!R.submit.nodeType&&!R.submit.length&&!R._mceOldSubmit&&(R._mceOldSubmit=R.submit,R.submit=function(){return t.editorManager.triggerSave(),t.setDirty(!1),R._mceOldSubmit(R)})),t.windowManager=iP(t),t.notificationManager=XC(t),function(t){return"xml"===t.getParam("encoding")}(t)&&t.on("GetContent",function(ee){ee.save&&(ee.content=fD.encode(ee.content))}),function(t){return t.getParam("add_form_submit_trigger")}(t)&&t.on("submit",function(){t.initialized&&t.save()}),function(t){return t.getParam("add_unload_trigger")}(t)&&(t._beforeUnload=function(){t.initialized&&!t.destroyed&&!t.isHidden()&&t.save({format:"raw",no_events:!0,set_dirty:!1})},t.editorManager.on("BeforeUnload",t._beforeUnload)),t.editorManager.add(t),D4(t,t.suffix)}}else fD.bind(window,"ready",m)},w4=function(t,a){return function(t,a){return mh(t).editor.addVisual(a)}(t,a)},I4={"font-size":"size","font-family":"face"},P4=function(t,a,m){return Jx(Dt.fromDom(m),function(R){return function(R){return ul(R,t).orThunk(function(){return"font"===ba(R)?Ni(I4,t).bind(function(ee){return ni(R,ee)}):Ne.none()})}(R)},function(R){return Ao(Dt.fromDom(a),R)})},fO=function(t){return function(a,m){return Ne.from(m).map(Dt.fromDom).filter(Xt).bind(function(v){return P4(t,a,v.dom).or(function(t,a){return Ne.from(jl.DOM.getStyle(a,t,!0))}(t,v.dom))}).getOr("")}},O4=fO("font-size"),SR=de(function(t){return t.replace(/[\'\"\\]/g,"").replace(/,\s+/g,",")},fO("font-family")),AR=function(t){return ou(t.getBody()).map(function(a){var m=a.container();return Kr(m)?m.parentNode:m})},k4=function(t,a){return function(t){return Ne.from(t.selection.getRng()).bind(function(a){var m=t.getBody();return a.startContainer===m&&0===a.startOffset?Ne.none():Ne.from(t.selection.getStart(!0))})}(t).orThunk(le(AR,t)).map(Dt.fromDom).filter(Xt).bind(a)},hO=function(t,a){return k4(t,re(Ne.some,a))},uI=function(t,a){if(/^[0-9.]+$/.test(a)){var m=parseInt(a,10);if(m>=1&&m<=7){var v=function(t){return Li.explode(t.getParam("font_size_style_values","xx-small,x-small,small,medium,large,x-large,xx-large"))}(t),S=function(t){return Li.explode(t.getParam("font_size_classes",""))}(t);return S?S[m-1]||a:v[m-1]||a}return a}return a},R4=function(t){var a=t.split(/\s*,\s*/);return Dn(a,function(m){return-1===m.indexOf(" ")||Gn(m,'"')||Gn(m,"'")?m:"'"+m+"'"}).join(",")},Y4=function(t,a){var m=function(t){if("string"!=typeof t){var a=Li.extend({paste:t.paste,data:{paste:t.paste}},t);return{content:t.content,details:a}}return{content:t,details:{}}}(a);!function(t,a,m){fw(t).editor.insertContent(a,m)}(t,m.content,m.details)},dI=Li.each,H4=Li.map,Pv=Li.inArray,WT=function(){function t(a){this.commands={state:{},exec:{},value:{}},this.editor=a,this.setupCommands(a)}return t.prototype.execCommand=function(a,m,v,S){var R,ee=!1,Ee=this;if(!Ee.editor.removed){if("mcefocus"!==a.toLowerCase()&&(/^(mceAddUndoLevel|mceEndUndoLevel|mceBeginUndoLevel|mceRepaint)$/.test(a)||S&&S.skip_focus?function(t){GE(t).each(function(a){return t.selection.setRng(a)})}(Ee.editor):Ee.editor.focus()),(S=Ee.editor.fire("BeforeExecCommand",{command:a,ui:m,value:v})).isDefaultPrevented())return!1;var Se=a.toLowerCase();if(R=Ee.commands.exec[Se])return R(Se,m,v),Ee.editor.fire("ExecCommand",{command:a,ui:m,value:v}),!0;if(dI(this.editor.plugins,function(pt){if(pt.execCommand&&pt.execCommand(a,m,v))return Ee.editor.fire("ExecCommand",{command:a,ui:m,value:v}),ee=!0,!1}),ee)return ee;if(Ee.editor.theme&&Ee.editor.theme.execCommand&&Ee.editor.theme.execCommand(a,m,v))return Ee.editor.fire("ExecCommand",{command:a,ui:m,value:v}),!0;try{ee=Ee.editor.getDoc().execCommand(a,m,v)}catch{}return!!ee&&(Ee.editor.fire("ExecCommand",{command:a,ui:m,value:v}),!0)}},t.prototype.queryCommandState=function(a){var m;if(!this.editor.quirks.isHidden()&&!this.editor.removed){if(a=a.toLowerCase(),m=this.commands.state[a])return m(a);try{return this.editor.getDoc().queryCommandState(a)}catch{}return!1}},t.prototype.queryCommandValue=function(a){var m;if(!this.editor.quirks.isHidden()&&!this.editor.removed){if(a=a.toLowerCase(),m=this.commands.value[a])return m(a);try{return this.editor.getDoc().queryCommandValue(a)}catch{}}},t.prototype.addCommands=function(a,m){void 0===m&&(m="exec");var v=this;dI(a,function(S,R){dI(R.toLowerCase().split(","),function(ee){v.commands[m][ee]=S})})},t.prototype.addCommand=function(a,m,v){var S=this;a=a.toLowerCase(),this.commands.exec[a]=function(R,ee,Ee,Se){return m.call(v||S.editor,ee,Ee,Se)}},t.prototype.queryCommandSupported=function(a){if(a=a.toLowerCase(),this.commands.exec[a])return!0;try{return this.editor.getDoc().queryCommandSupported(a)}catch{}return!1},t.prototype.addQueryStateHandler=function(a,m,v){var S=this;a=a.toLowerCase(),this.commands.state[a]=function(){return m.call(v||S.editor)}},t.prototype.addQueryValueHandler=function(a,m,v){var S=this;a=a.toLowerCase(),this.commands.value[a]=function(){return m.call(v||S.editor)}},t.prototype.hasCustomCommand=function(a){return a=a.toLowerCase(),!!this.commands.exec[a]},t.prototype.execNativeCommand=function(a,m,v){return void 0===m&&(m=!1),void 0===v&&(v=null),this.editor.getDoc().execCommand(a,m,v)},t.prototype.isFormatMatch=function(a){return this.editor.formatter.match(a)},t.prototype.toggleFormat=function(a,m){this.editor.formatter.toggle(a,m),this.editor.nodeChanged()},t.prototype.storeSelection=function(a){this.selectionBookmark=this.editor.selection.getBookmark(a)},t.prototype.restoreSelection=function(){this.editor.selection.moveToBookmark(this.selectionBookmark)},t.prototype.setupCommands=function(a){var m=this;this.addCommands({"mceResetDesignMode,mceBeginUndoLevel":xe,"mceEndUndoLevel,mceAddUndoLevel":function(){a.undoManager.add()},mceFocus:function(S,R,ee){hx(a,ee)},"Cut,Copy,Paste":function(S){var ee,R=a.getDoc();try{m.execNativeCommand(S)}catch{ee=!0}if("paste"===S&&!R.queryCommandEnabled(S)&&(ee=!0),ee||!R.queryCommandSupported(S)){var Ee=a.translate("Your browser doesn't support direct access to the clipboard. Please use the Ctrl+X/C/V keyboard shortcuts instead.");$r.mac&&(Ee=Ee.replace(/Ctrl\+/g,"\u2318+")),a.notificationManager.open({text:Ee,type:"error"})}},unlink:function(){if(a.selection.isCollapsed()){var S=a.dom.getParent(a.selection.getStart(),"a");S&&a.dom.remove(S,!0)}else a.formatter.remove("link")},"JustifyLeft,JustifyCenter,JustifyRight,JustifyFull,JustifyNone":function(S){var R=S.substring(7);"full"===R&&(R="justify"),dI("left,center,right,justify".split(","),function(ee){R!==ee&&a.formatter.remove("align"+ee)}),"none"!==R&&m.toggleFormat("align"+R)},"InsertUnorderedList,InsertOrderedList":function(S){var R;m.execNativeCommand(S);var ee=a.dom.getParent(a.selection.getNode(),"ol,ul");ee&&(R=ee.parentNode,/^(H[1-6]|P|ADDRESS|PRE)$/.test(R.nodeName)&&(m.storeSelection(),a.dom.split(R,ee),m.restoreSelection()))},"Bold,Italic,Underline,Strikethrough,Superscript,Subscript":function(S){m.toggleFormat(S)},"ForeColor,HiliteColor":function(S,R,ee){m.toggleFormat(S,{value:ee})},FontName:function(S,R,ee){!function(t,a){var m=uI(t,a);t.formatter.toggle("fontname",{value:R4(m)}),t.nodeChanged()}(a,ee)},FontSize:function(S,R,ee){!function(t,a){t.formatter.toggle("fontsize",{value:uI(t,a)}),t.nodeChanged()}(a,ee)},LineHeight:function(S,R,ee){!function(t,a){t.formatter.toggle("lineheight",{value:String(a)}),t.nodeChanged()}(a,ee)},Lang:function(S,R,ee){m.toggleFormat(S,{value:ee.code,customValue:ee.customCode})},RemoveFormat:function(S){a.formatter.remove(S)},mceBlockQuote:function(){m.toggleFormat("blockquote")},FormatBlock:function(S,R,ee){return m.toggleFormat(ee||"p")},mceCleanup:function(){var S=a.selection.getBookmark();a.setContent(a.getContent()),a.selection.moveToBookmark(S)},mceRemoveNode:function(S,R,ee){var Ee=ee||a.selection.getNode();Ee!==a.getBody()&&(m.storeSelection(),a.dom.remove(Ee,!0),m.restoreSelection())},mceSelectNodeDepth:function(S,R,ee){var Ee=0;a.dom.getParent(a.selection.getNode(),function(Se){if(1===Se.nodeType&&Ee++===ee)return a.selection.select(Se),!1},a.getBody())},mceSelectNode:function(S,R,ee){a.selection.select(ee)},mceInsertContent:function(S,R,ee){Y4(a,ee)},mceInsertRawHTML:function(S,R,ee){a.selection.setContent("tiny_mce_marker");var Ee=a.getContent();a.setContent(Ee.replace(/tiny_mce_marker/g,function(){return ee}))},mceInsertNewLine:function(S,R,ee){Zk(a,ee)},mceToggleFormat:function(S,R,ee){m.toggleFormat(ee)},mceSetContent:function(S,R,ee){a.setContent(ee)},"Indent,Outdent":function(S){BP(a,S)},mceRepaint:xe,InsertHorizontalRule:function(){a.execCommand("mceInsertContent",!1,"<hr />")},mceToggleVisualAid:function(){a.hasVisual=!a.hasVisual,a.addVisual()},mceReplaceContent:function(S,R,ee){a.execCommand("mceInsertContent",!1,ee.replace(/\{\$selection\}/g,a.selection.getContent({format:"text"})))},mceInsertLink:function(S,R,ee){"string"==typeof ee&&(ee={href:ee});var Ee=a.dom.getParent(a.selection.getNode(),"a");ee.href=ee.href.replace(/ /g,"%20"),(!Ee||!ee.href)&&a.formatter.remove("link"),ee.href&&a.formatter.apply("link",ee,Ee)},selectAll:function(){var S=a.dom.getParent(a.selection.getStart(),$l);if(S){var R=a.dom.createRng();R.selectNodeContents(S),a.selection.setRng(R)}},mceNewDocument:function(){a.setContent("")},InsertLineBreak:function(S,R,ee){return Uk(a,ee),!0}});var v=function(S){return function(){var R=a.selection,ee=R.isCollapsed()?[a.dom.getParent(R.getNode(),a.dom.isBlock)]:R.getSelectedBlocks(),Ee=H4(ee,function(Se){return!!a.formatter.matchNode(Se,S)});return-1!==Pv(Ee,!0)}};m.addCommands({JustifyLeft:v("alignleft"),JustifyCenter:v("aligncenter"),JustifyRight:v("alignright"),JustifyFull:v("alignjustify"),"Bold,Italic,Underline,Strikethrough,Superscript,Subscript":function(S){return m.isFormatMatch(S)},mceBlockQuote:function(){return m.isFormatMatch("blockquote")},Outdent:function(){return sk(a)},"InsertUnorderedList,InsertOrderedList":function(S){var R=a.dom.getParent(a.selection.getNode(),"ul,ol");return R&&("insertunorderedlist"===S&&"UL"===R.tagName||"insertorderedlist"===S&&"OL"===R.tagName)}},"state"),m.addCommands({Undo:function(){a.undoManager.undo()},Redo:function(){a.undoManager.redo()}}),m.addQueryValueHandler("FontName",function(){return function(t){return hO(t,function(a){return SR(t.getBody(),a.dom)}).getOr("")}(a)},this),m.addQueryValueHandler("FontSize",function(){return function(t){return hO(t,function(a){return O4(t.getBody(),a.dom)}).getOr("")}(a)},this),m.addQueryValueHandler("LineHeight",function(){return function(t){return hO(t,function(a){var m=Dt.fromDom(t.getBody());return Jx(a,function(R){return ul(R,"line-height")},le(Ao,m)).getOrThunk(function(){var R=parseFloat(Ba(a,"line-height")),ee=parseFloat(Ba(a,"font-size"));return String(R/ee)})}).getOr("")}(a)},this)},t}(),hD="data-mce-contenteditable",V4=function(t,a,m){_d(t,a)&&!1===m?function(t,a){jh(t)?t.dom.classList.remove(a):wf(t,a),Np(t)}(t,a):m&&Qg(t,a)},_O=function(t,a,m){try{t.getDoc().execCommand(a,!1,String(m))}catch{}},pI=function(t,a){t.dom.contentEditable=a?"true":"false"},W4=function(t,a){var m=Dt.fromDom(t.getBody());V4(m,"mce-content-readonly",a),a?(t.selection.controlSelection.hideResizeRect(),t._selectionOverrides.hideFakeCaret(),function(t){Ne.from(t.selection.getNode()).each(function(a){a.removeAttribute("data-mce-selected")})}(t),t.readonly=!0,pI(m,!1),function(t){Mn(iu(t,'*[contenteditable="true"]'),function(a){Xe(a,hD,"true"),pI(a,!1)})}(m)):(t.readonly=!1,pI(m,!0),function(t){Mn(iu(t,"*["+hD+'="true"]'),function(a){nr(a,hD),pI(a,!0)})}(m),_O(t,"StyleWithCSS",!1),_O(t,"enableInlineTableEditing",!1),_O(t,"enableObjectResizing",!1),PS(t)&&t.focus(),function(t){t.selection.setRng(t.selection.getRng())}(t),t.nodeChanged())},gD=function(t){return t.readonly},PR=function(t){t.parser.addAttributeFilter("contenteditable",function(a){gD(t)&&Mn(a,function(m){m.attr(hD,m.attr("contenteditable")),m.attr("contenteditable","false")})}),t.serializer.addAttributeFilter(hD,function(a){gD(t)&&Mn(a,function(m){m.attr("contenteditable",m.attr(hD))})}),t.serializer.addTempAttr(hD)},OR=function(t,a){if(function(t){return"click"===t.type}(a)&&!Ua.metaKeyPressed(a)){var m=Dt.fromDom(a.target);(function(t,a){return ws(a,"a",function(v){return Ao(v,Dt.fromDom(t.getBody()))}).bind(function(v){return ni(v,"href")})})(t,m).each(function(v){if(a.preventDefault(),/^#/.test(v)){var S=t.dom.select(v+',[name="'+function(t,a){return Gn(t,a)?function(t,a){return t.substring(a)}(t,a.length):t}(v,"#")+'"]');S.length&&t.selection.scrollIntoView(S[0],!0)}else window.open(v,"_blank","rel=noopener noreferrer,menubar=yes,toolbar=yes,location=yes,status=yes,resizable=yes,scrollbars=yes")})}},LR=Li.makeMap("focus blur focusin focusout click dblclick mousedown mouseup mousemove mouseover beforepaste paste cut copy selectionchange mouseout mouseenter mouseleave wheel keydown keypress keyup input beforeinput contextmenu dragstart dragend dragover draggesture dragdrop drop drag submit compositionstart compositionend compositionupdate touchstart touchmove touchend touchcancel"," "),mI=function(){function t(a){this.bindings={},this.settings=a||{},this.scope=this.settings.scope||this,this.toggleEvent=this.settings.toggleEvent||Be}return t.isNative=function(a){return!!LR[a.toLowerCase()]},t.prototype.fire=function(a,m){var v=a.toLowerCase(),S=yr(v,m||{},this.scope);this.settings.beforeFire&&this.settings.beforeFire(S);var R=this.bindings[v];if(R)for(var ee=0,Ee=R.length;ee<Ee;ee++){var Se=R[ee];if(!Se.removed){if(Se.once&&this.off(v,Se.func),S.isImmediatePropagationStopped())return S;if(!1===Se.func.call(this.scope,S))return S.preventDefault(),S}}return S},t.prototype.on=function(a,m,v,S){if(!1===m&&(m=Be),m){var R={func:m,removed:!1};S&&Li.extend(R,S);for(var ee=a.toLowerCase().split(" "),Ee=ee.length;Ee--;){var Se=ee[Ee],pt=this.bindings[Se];pt||(pt=[],this.toggleEvent(Se,!0)),pt=v?mo([R],pt,!0):mo(mo([],pt,!0),[R],!1),this.bindings[Se]=pt}}return this},t.prototype.off=function(a,m){var v=this;if(a)for(var S=a.toLowerCase().split(" "),R=S.length;R--;){var ee=S[R],Ee=this.bindings[ee];if(!ee)return Hi(this.bindings,function(pt,Gt){v.toggleEvent(Gt,!1),delete v.bindings[Gt]}),this;if(Ee){if(m){var Se=Gi(Ee,function(pt){return pt.func===m});Ee=Se.fail,this.bindings[ee]=Ee,Mn(Se.pass,function(pt){pt.removed=!0})}else Ee.length=0;Ee.length||(this.toggleEvent(a,!1),delete this.bindings[ee])}}else Hi(this.bindings,function(pt,Gt){v.toggleEvent(Gt,!1)}),this.bindings={};return this},t.prototype.once=function(a,m,v){return this.on(a,m,v,{once:!0})},t.prototype.has=function(a){return a=a.toLowerCase(),!(!this.bindings[a]||0===this.bindings[a].length)},t}(),_D=function(t){return t._eventDispatcher||(t._eventDispatcher=new mI({scope:t,toggleEvent:function(a,m){mI.isNative(a)&&t.toggleNativeEvent&&t.toggleNativeEvent(a,m)}})),t._eventDispatcher},fI={fire:function(t,a,m){var v=this;if(v.removed&&"remove"!==t&&"detach"!==t)return a;var S=_D(v).fire(t,a);if(!1!==m&&v.parent)for(var R=v.parent();R&&!S.isPropagationStopped();)R.fire(t,S,!1),R=R.parent();return S},on:function(t,a,m){return _D(this).on(t,a,m)},off:function(t,a){return _D(this).off(t,a)},once:function(t,a){return _D(this).once(t,a)},hasEventListeners:function(t){return _D(this).has(t)}},hI=jl.DOM,gI=function(t,a){if("selectionchange"===a)return t.getDoc();if(!t.inline&&/^mouse|touch|click|contextmenu|drop|dragover|dragend/.test(a))return t.getDoc().documentElement;var m=tg(t);return m?(t.eventRoot||(t.eventRoot=hI.select(m)[0]),t.eventRoot):t.getBody()},vO=function(t,a,m){!function(t){return!t.hidden&&!gD(t)}(t)?gD(t)&&OR(t,m):t.fire(a,m)},yO=function(t,a){var m;if(t.delegates||(t.delegates={}),!t.delegates[a]&&!t.removed){var v=gI(t,a);if(tg(t)){if(vD||(vD={},t.editorManager.on("removeEditor",function(){t.editorManager.activeEditor||vD&&(Hi(vD,function(S,R){t.dom.unbind(gI(t,R))}),vD=null)})),vD[a])return;m=function(S){for(var R=S.target,ee=t.editorManager.get(),Ee=ee.length;Ee--;){var Se=ee[Ee].getBody();(Se===R||hI.isChildOf(R,Se))&&vO(ee[Ee],a,S)}},vD[a]=m,hI.bind(v,a,m)}else m=function(S){vO(t,a,S)},hI.bind(v,a,m),t.delegates[a]=m}},kR=Tn(Tn({},fI),{bindPendingEventDelegates:function(){var t=this;Li.each(t._pendingNativeEvents,function(a){yO(t,a)})},toggleNativeEvent:function(t,a){var m=this;"focus"===t||"blur"===t||m.removed||(a?m.initialized?yO(m,t):m._pendingNativeEvents?m._pendingNativeEvents.push(t):m._pendingNativeEvents=[t]:m.initialized&&(m.dom.unbind(gI(m,t),t,m.delegates[t]),delete m.delegates[t]))},unbindAllNativeEvents:function(){var t=this,a=t.getBody(),m=t.dom;t.delegates&&(Hi(t.delegates,function(v,S){t.dom.unbind(gI(t,S),S,v)}),delete t.delegates),!t.inline&&a&&m&&(a.onload=null,m.unbind(t.getWin()),m.unbind(t.getDoc())),m&&(m.unbind(a),m.unbind(t.getContainer()))}}),RR=["design","readonly"],FR=function(t,a,m,v){var S=m[a.get()],R=m[v];try{R.activate()}catch(ee){return void console.error("problem while activating editor mode "+v+":",ee)}S.deactivate(),S.editorReadOnly!==R.editorReadOnly&&W4(t,R.editorReadOnly),a.set(v),function(t,a){t.fire("SwitchMode",{mode:a})}(t,v)},X4=function(t){var a=nd("design"),m=nd({design:{activate:xe,deactivate:xe,editorReadOnly:!1},readonly:{activate:xe,deactivate:xe,editorReadOnly:!0}});return function(t){t.serializer?PR(t):t.on("PreInit",function(){PR(t)})}(t),function(t){t.on("ShowCaret",function(a){gD(t)&&a.preventDefault()}),t.on("ObjectSelected",function(a){gD(t)&&a.preventDefault()})}(t),{isReadOnly:function(){return gD(t)},set:function(v){return function(t,a,m,v){if(v!==m.get()){if(!Nn(a,v))throw new Error("Editor mode '"+v+"' is invalid");t.initialized?FR(t,m,a,v):t.on("init",function(){return FR(t,m,a,v)})}}(t,m.get(),a,v)},get:function(){return a.get()},register:function(v,S){m.set(function(t,a,m){var v;if(st(RR,a))throw new Error("Cannot override default mode "+a);return Tn(Tn({},t),((v={})[a]=Tn(Tn({},m),{deactivate:function(){try{m.deactivate()}catch(S){console.error("problem while deactivating editor mode "+a+":",S)}}}),v))}(m.get(),v,S))}}},_I=Li.each,kA=Li.explode,NR={f1:112,f2:113,f3:114,f4:115,f5:116,f6:117,f7:118,f8:119,f9:120,f10:121,f11:122,f12:123},BR=Li.makeMap("alt,ctrl,shift,meta,access"),eU=function(t){var a,m={};_I(kA(t.toLowerCase(),"+"),function(S){S in BR?m[S]=!0:/^[0-9]{2,}$/.test(S)?m.keyCode=parseInt(S,10):(m.charCode=S.charCodeAt(0),m.keyCode=NR[S]||S.toUpperCase().charCodeAt(0))});var v=[m.keyCode];for(a in BR)m[a]?v.push(a):m[a]=!1;return m.id=v.join(","),m.access&&(m.alt=!0,$r.mac?m.ctrl=!0:m.shift=!0),m.meta&&($r.mac?m.meta=!0:(m.ctrl=!0,m.meta=!1)),m},vI=function(){function t(a){this.shortcuts={},this.pendingPatterns=[],this.editor=a;var m=this;a.on("keyup keypress keydown",function(v){(m.hasModifier(v)||m.isFunctionKey(v))&&!v.isDefaultPrevented()&&(_I(m.shortcuts,function(S){if(m.matchShortcut(v,S))return m.pendingPatterns=S.subpatterns.slice(0),"keydown"===v.type&&m.executeShortcutAction(S),!0}),m.matchShortcut(v,m.pendingPatterns[0])&&(1===m.pendingPatterns.length&&"keydown"===v.type&&m.executeShortcutAction(m.pendingPatterns[0]),m.pendingPatterns.shift()))})}return t.prototype.add=function(a,m,v,S){var R=this,ee=R.normalizeCommandFunc(v);return _I(kA(Li.trim(a)),function(Ee){var Se=R.createShortcut(Ee,m,ee,S);R.shortcuts[Se.id]=Se}),!0},t.prototype.remove=function(a){var m=this.createShortcut(a);return!!this.shortcuts[m.id]&&(delete this.shortcuts[m.id],!0)},t.prototype.normalizeCommandFunc=function(a){var m=this,v=a;return"string"==typeof v?function(){m.editor.execCommand(v,!1,null)}:Li.isArray(v)?function(){m.editor.execCommand(v[0],v[1],v[2])}:v},t.prototype.createShortcut=function(a,m,v,S){var R=Li.map(kA(a,">"),eU);return R[R.length-1]=Li.extend(R[R.length-1],{func:v,scope:S||this.editor}),Li.extend(R[0],{desc:this.editor.translate(m),subpatterns:R.slice(1)})},t.prototype.hasModifier=function(a){return a.altKey||a.ctrlKey||a.metaKey},t.prototype.isFunctionKey=function(a){return"keydown"===a.type&&a.keyCode>=112&&a.keyCode<=123},t.prototype.matchShortcut=function(a,m){return!(!m||m.ctrl!==a.ctrlKey||m.meta!==a.metaKey||m.alt!==a.altKey||m.shift!==a.shiftKey)&&(!!(a.keyCode===m.keyCode||a.charCode&&a.charCode===m.charCode)&&(a.preventDefault(),!0))},t.prototype.executeShortcutAction=function(a){return a.func?a.func.call(a.scope):null},t}(),tU=function(){var t=function(){var t={},a={},m={},v={},S={},R={},ee={},Ee=function(pt,Gt){return function(jt,on){return pt[jt.toLowerCase()]=Tn(Tn({},on),{type:Gt})}};return{addButton:Ee(t,"button"),addGroupToolbarButton:Ee(t,"grouptoolbarbutton"),addToggleButton:Ee(t,"togglebutton"),addMenuButton:Ee(t,"menubutton"),addSplitButton:Ee(t,"splitbutton"),addMenuItem:Ee(a,"menuitem"),addNestedMenuItem:Ee(a,"nestedmenuitem"),addToggleMenuItem:Ee(a,"togglemenuitem"),addAutocompleter:Ee(m,"autocompleter"),addContextMenu:Ee(S,"contextmenu"),addContextToolbar:Ee(R,"contexttoolbar"),addContextForm:Ee(R,"contextform"),addSidebar:Ee(ee,"sidebar"),addIcon:function(pt,Gt){return v[pt.toLowerCase()]=Gt},getAll:function(){return{buttons:t,menuItems:a,icons:v,popups:m,contextMenus:S,contextToolbars:R,sidebars:ee}}}}();return{addAutocompleter:t.addAutocompleter,addButton:t.addButton,addContextForm:t.addContextForm,addContextMenu:t.addContextMenu,addContextToolbar:t.addContextToolbar,addIcon:t.addIcon,addMenuButton:t.addMenuButton,addMenuItem:t.addMenuItem,addNestedMenuItem:t.addNestedMenuItem,addSidebar:t.addSidebar,addSplitButton:t.addSplitButton,addToggleButton:t.addToggleButton,addGroupToolbarButton:t.addGroupToolbarButton,addToggleMenuItem:t.addToggleMenuItem,getAll:t.getAll}},yD=jl.DOM,zR=Li.extend,nU=Li.each,YR=Li.resolve,iU=$r.ie,yI=function(){function t(a,m,v){var S=this;this.plugins={},this.contentCSS=[],this.contentStyles=[],this.loadedCSS={},this.isNotDirty=!1,this.editorManager=v,this.documentBaseUrl=v.documentBaseURL,zR(this,kR),this.settings=X2(this,a,this.documentBaseUrl,v.defaultSettings,m),this.settings.suffix&&(v.suffix=this.settings.suffix),this.suffix=v.suffix,this.settings.base_url&&v._setBaseUrl(this.settings.base_url),this.baseUri=v.baseURI,this.settings.referrer_policy&&(Xs.ScriptLoader._setReferrerPolicy(this.settings.referrer_policy),jl.DOM.styleSheetLoader._setReferrerPolicy(this.settings.referrer_policy)),Ad.languageLoad=this.settings.language_load,Ad.baseURL=v.baseURL,this.id=a,this.setDirty(!1),this.documentBaseURI=new U_(this.settings.document_base_url,{base_uri:this.baseUri}),this.baseURI=this.baseUri,this.inline=!!this.settings.inline,this.shortcuts=new vI(this),this.editorCommands=new WT(this),this.settings.cache_suffix&&($r.cacheSuffix=this.settings.cache_suffix.replace(/^[\?\&]+/,"")),this.ui={registry:tU(),styleSheetLoader:void 0,show:xe,hide:xe,enable:xe,disable:xe,isDisabled:Be};var ee=X4(this);this.mode=ee,this.setMode=ee.set,v.fire("SetupEditor",{editor:this}),this.execCallback("setup",this),this.$=Ya.overrideDefaults(function(){return{context:S.inline?S.getBody():S.getDoc(),element:S.getBody()}})}return t.prototype.render=function(){A4(this)},t.prototype.focus=function(a){this.execCommand("mceFocus",!1,a)},t.prototype.hasFocus=function(){return ab(this)},t.prototype.execCallback=function(a){for(var m=[],v=1;v<arguments.length;v++)m[v-1]=arguments[v];var ee,S=this,R=S.settings[a];if(R)return S.callbackLookup&&(ee=S.callbackLookup[a])&&(R=ee.func,ee=ee.scope),"string"==typeof R&&(ee=(ee=R.replace(/\.\w+$/,""))?YR(ee):0,R=YR(R),S.callbackLookup=S.callbackLookup||{},S.callbackLookup[a]={func:R,scope:ee}),R.apply(ee||S,m)},t.prototype.translate=function(a){return gu.translate(a)},t.prototype.getParam=function(a,m,v){return KF(this,a,m,v)},t.prototype.hasPlugin=function(a,m){return!!st(ng(this).split(/[ ,]/),a)&&(!m||void 0!==by.get(a))},t.prototype.nodeChanged=function(a){this._nodeChangeDispatcher.nodeChanged(a)},t.prototype.addCommand=function(a,m,v){this.editorCommands.addCommand(a,m,v)},t.prototype.addQueryStateHandler=function(a,m,v){this.editorCommands.addQueryStateHandler(a,m,v)},t.prototype.addQueryValueHandler=function(a,m,v){this.editorCommands.addQueryValueHandler(a,m,v)},t.prototype.addShortcut=function(a,m,v,S){this.shortcuts.add(a,m,v,S)},t.prototype.execCommand=function(a,m,v,S){return this.editorCommands.execCommand(a,m,v,S)},t.prototype.queryCommandState=function(a){return this.editorCommands.queryCommandState(a)},t.prototype.queryCommandValue=function(a){return this.editorCommands.queryCommandValue(a)},t.prototype.queryCommandSupported=function(a){return this.editorCommands.queryCommandSupported(a)},t.prototype.show=function(){var a=this;a.hidden&&(a.hidden=!1,a.inline?a.getBody().contentEditable="true":(yD.show(a.getContainer()),yD.hide(a.id)),a.load(),a.fire("show"))},t.prototype.hide=function(){var a=this,m=a.getDoc();a.hidden||(iU&&m&&!a.inline&&m.execCommand("SelectAll"),a.save(),a.inline?(a.getBody().contentEditable="false",a===a.editorManager.focusedEditor&&(a.editorManager.focusedEditor=null)):(yD.hide(a.getContainer()),yD.setStyle(a.id,"display",a.orgDisplay)),a.hidden=!0,a.fire("hide"))},t.prototype.isHidden=function(){return!!this.hidden},t.prototype.setProgressState=function(a,m){this.fire("ProgressState",{state:a,time:m})},t.prototype.load=function(a){var S,m=this,v=m.getElement();if(m.removed)return"";if(v){(a=a||{}).load=!0;var R=Zs(v)?v.value:v.innerHTML;return S=m.setContent(R,a),a.element=v,a.no_events||m.fire("LoadContent",a),a.element=v=null,S}},t.prototype.save=function(a){var S,R,m=this,v=m.getElement();if(v&&m.initialized&&!m.removed)return(a=a||{}).save=!0,a.element=v,a.content=m.getContent(a),a.no_events||m.fire("SaveContent",a),"raw"===a.format&&m.fire("RawSaveContent",a),S=a.content,Zs(v)?v.value=S:((a.is_removing||!m.inline)&&(v.innerHTML=S),(R=yD.getParent(m.id,"form"))&&nU(R.elements,function(ee){if(ee.name===m.id)return ee.value=S,!1})),a.element=v=null,!1!==a.set_dirty&&m.setDirty(!1),S},t.prototype.setContent=function(a,m){return XI(this,a,m)},t.prototype.getContent=function(a){return SF(this,a)},t.prototype.insertContent=function(a,m){m&&(a=zR({content:a},m)),this.execCommand("mceInsertContent",!1,a)},t.prototype.resetContent=function(a){void 0===a?XI(this,this.startContent,{format:"raw"}):XI(this,a),this.undoManager.reset(),this.setDirty(!1),this.nodeChanged()},t.prototype.isDirty=function(){return!this.isNotDirty},t.prototype.setDirty=function(a){var m=!this.isNotDirty;this.isNotDirty=!a,a&&a!==m&&this.fire("dirty")},t.prototype.getContainer=function(){var a=this;return a.container||(a.container=yD.get(a.editorContainer||a.id+"_parent")),a.container},t.prototype.getContentAreaContainer=function(){return this.contentAreaContainer},t.prototype.getElement=function(){return this.targetElm||(this.targetElm=yD.get(this.id)),this.targetElm},t.prototype.getWin=function(){var m,a=this;return a.contentWindow||(m=a.iframeElement)&&(a.contentWindow=m.contentWindow),a.contentWindow},t.prototype.getDoc=function(){var m,a=this;return a.contentDocument||(m=a.getWin())&&(a.contentDocument=m.document),a.contentDocument},t.prototype.getBody=function(){var a=this.getDoc();return this.bodyElement||(a?a.body:null)},t.prototype.convertURL=function(a,m,v){var S=this,R=S.settings;return R.urlconverter_callback?S.execCallback("urlconverter_callback",a,v,!0,m):!R.convert_urls||v&&"LINK"===v.nodeName||0===a.indexOf("file:")||0===a.length?a:R.relative_urls?S.documentBaseURI.toRelative(a):a=S.documentBaseURI.toAbsolute(a,R.remove_script_host)},t.prototype.addVisual=function(a){w4(this,a)},t.prototype.remove=function(){IF(this)},t.prototype.destroy=function(a){V2(this,a)},t.prototype.uploadImages=function(a){return this.editorUpload.uploadImages(a)},t.prototype._scanForImages=function(){return this.editorUpload.scanForImages()},t.prototype.addButton=function(){throw new Error("editor.addButton has been removed in tinymce 5x, use editor.ui.registry.addButton or editor.ui.registry.addToggleButton or editor.ui.registry.addSplitButton instead")},t.prototype.addSidebar=function(){throw new Error("editor.addSidebar has been removed in tinymce 5x, use editor.ui.registry.addSidebar instead")},t.prototype.addMenuItem=function(){throw new Error("editor.addMenuItem has been removed in tinymce 5x, use editor.ui.registry.addMenuItem instead")},t.prototype.addContextToolbar=function(){throw new Error("editor.addContextToolbar has been removed in tinymce 5x, use editor.ui.registry.addContextToolbar instead")},t}(),hC=jl.DOM,rU=Li.explode,Em=Li.each,bO=Li.extend,fE=0,CO=!1,$T=[],m_=[],MO=function(t){var a=t.type;Em(jT.get(),function(m){switch(a){case"scroll":m.fire("ScrollWindow",t);break;case"resize":m.fire("ResizeWindow",t)}})},TO=function(t){t!==CO&&(t?Ya(window).on("resize scroll",MO):Ya(window).off("resize scroll",MO),CO=t)},HR=function(t){var a=m_;delete $T[t.id];for(var m=0;m<$T.length;m++)if($T[m]===t){$T.splice(m,1);break}return m_=mi(m_,function(v){return t!==v}),jT.activeEditor===t&&(jT.activeEditor=m_.length>0?m_[0]:null),jT.focusedEditor===t&&(jT.focusedEditor=null),a.length!==m_.length},aU="CSS1Compat"!==document.compatMode,jT=Tn(Tn({},fI),{baseURI:null,baseURL:null,defaultSettings:{},documentBaseURL:null,suffix:null,$:Ya,majorVersion:"5",minorVersion:"10.7",releaseDate:"2022-12-06",editors:$T,i18n:gu,activeEditor:null,focusedEditor:null,settings:{},setup:function(){var a,m,t=this,v="";m=U_.getDocumentBaseUrl(document.location),/^[^:]+:\/\/\/?[^\/]+\//.test(m)&&(m=m.replace(/[\?#].*$/,"").replace(/[\/\\][^\/]+$/,""),/[\/\\]$/.test(m)||(m+="/"));var S=window.tinymce||window.tinyMCEPreInit;if(S)a=S.base||S.baseURL,v=S.suffix;else{for(var R=document.getElementsByTagName("script"),ee=0;ee<R.length;ee++){if(""!==(Ee=R[ee].src||"")){var Se=Ee.substring(Ee.lastIndexOf("/"));if(/tinymce(\.full|\.jquery|)(\.min|\.dev|)\.js/.test(Ee)){-1!==Se.indexOf(".min")&&(v=".min"),a=Ee.substring(0,Ee.lastIndexOf("/"));break}}}var Ee;if(!a&&document.currentScript)-1!==(Ee=document.currentScript.src).indexOf(".min")&&(v=".min"),a=Ee.substring(0,Ee.lastIndexOf("/"))}t.baseURL=new U_(m).toAbsolute(a),t.documentBaseURL=m,t.baseURI=new U_(t.baseURL),t.suffix=v,function(t){t.on("AddEditor",le(LD,t)),t.on("RemoveEditor",le($E,t))}(t)},overrideDefaults:function(t){var a=t.base_url;a&&this._setBaseUrl(a);var m=t.suffix;t.suffix&&(this.suffix=m),this.defaultSettings=t;var v=t.plugin_base_urls;void 0!==v&&Hi(v,function(S,R){Ad.PluginManager.urls[R]=S})},init:function(t){var m,a=this,v=Li.makeMap("area base basefont br col frame hr img input isindex link meta param embed source wbr track colgroup option table tbody tfoot thead tr th td script noscript style textarea video audio iframe object menu"," "),R=function(jt){var on=jt.id;return on||(on=Ni(jt,"name").filter(function(Rn){return!hC.get(Rn)}).getOrThunk(hC.uniqueId),jt.setAttribute("id",on)),on},Ee=function(jt,on){return on.constructor===RegExp?on.test(jt.className):hC.hasClass(jt,on)},pt=function(jt){m=jt},Gt=function(){var Rn,jt=0,on=[],Yn=function($n,qn,bi){var pi=new yI($n,qn,a);on.push(pi),pi.on("init",function(){++jt===Rn.length&&pt(on)}),pi.targetElm=pi.targetElm||bi,pi.render()};hC.unbind(window,"ready",Gt),function(jt){var on=t[jt];if(on)on.apply(a,[])}("onpageload"),Rn=Ya.unique(function(jt){var on=[];if($r.browser.isIE()&&$r.browser.version.major<11)return mA("TinyMCE does not support the browser you are using. For a list of supported browsers please see: https://www.tinymce.com/docs/get-started/system-requirements/"),[];if(aU)return mA("Failed to initialize the editor as the document is not in standards mode. TinyMCE requires standards mode."),[];if(jt.types)return Em(jt.types,function(Yn){on=on.concat(hC.select(Yn.selector))}),on;if(jt.selector)return hC.select(jt.selector);if(jt.target)return[jt.target];switch(jt.mode){case"exact":var Rn=jt.elements||"";Rn.length>0&&Em(rU(Rn),function(Yn){var $n=hC.get(Yn);$n?on.push($n):Em(document.forms,function(qn){Em(qn.elements,function(bi){bi.name===Yn&&(Yn="mce_editor_"+fE++,hC.setAttrib(bi,"id",Yn),on.push(bi))})})});break;case"textareas":case"specific_textareas":Em(hC.select("textarea"),function(Yn){jt.editor_deselector&&Ee(Yn,jt.editor_deselector)||(!jt.editor_selector||Ee(Yn,jt.editor_selector))&&on.push(Yn)})}return on}(t)),t.types?Em(t.types,function($n){Li.each(Rn,function(qn){return!hC.is(qn,$n.selector)||(Yn(R(qn),bO({},t,$n),qn),!1)})}):(Li.each(Rn,function($n){!function(t){t&&t.initialized&&!(t.getContainer()||t.getBody()).parentNode&&(HR(t),t.unbindAllNativeEvents(),t.destroy(!0),t.removed=!0,t=null)}(a.get($n.id))}),0===(Rn=Li.grep(Rn,function($n){return!a.get($n.id)})).length?pt([]):Em(Rn,function($n){!function(jt,on){return jt.inline&&on.tagName.toLowerCase()in v}(t,$n)?Yn(R($n),t,$n):mA("Could not initialize inline editor on invalid inline target element",$n)}))};return a.settings=t,hC.bind(window,"ready",Gt),new Ll(function(jt){m?jt(m):pt=function(on){jt(on)}})},get:function(t){return 0===arguments.length?m_.slice(0):ue(t)?On(m_,function(a){return a.id===t}).getOr(null):Pe(t)&&m_[t]?m_[t]:null},add:function(t){var a=this;return $T[t.id]===t||(null===a.get(t.id)&&(function(t){return"length"!==t}(t.id)&&($T[t.id]=t),$T.push(t),m_.push(t)),TO(!0),a.activeEditor=t,a.fire("AddEditor",{editor:t}),RA||(RA=function(v){var S=a.fire("BeforeUnload");if(S.returnValue)return v.preventDefault(),v.returnValue=S.returnValue,S.returnValue},window.addEventListener("beforeunload",RA))),t},createEditor:function(t,a){return this.add(new yI(t,a,this))},remove:function(t){var m,v,a=this;if(t){if(!ue(t))return v=t,X(a.get(v.id))?null:(HR(v)&&a.fire("RemoveEditor",{editor:v}),0===m_.length&&window.removeEventListener("beforeunload",RA),v.remove(),TO(m_.length>0),v);Em(hC.select(t),function(S){(v=a.get(S.id))&&a.remove(v)})}else for(m=m_.length-1;m>=0;m--)a.remove(m_[m])},execCommand:function(t,a,m){var v=this,S=v.get(m);switch(t){case"mceAddEditor":return v.get(m)||new yI(m,v.settings,v).render(),!0;case"mceRemoveEditor":return S&&S.remove(),!0;case"mceToggleEditor":return S?(S.isHidden()?S.show():S.hide(),!0):(v.execCommand("mceAddEditor",!1,m),!0)}return!!v.activeEditor&&v.activeEditor.execCommand(t,a,m)},triggerSave:function(){Em(m_,function(t){t.save()})},addI18n:function(t,a){gu.add(t,a)},translate:function(t){return gu.translate(t)},setActive:function(t){var a=this.activeEditor;this.activeEditor!==t&&(a&&a.fire("deactivate",{relatedTarget:t}),t.fire("activate",{relatedTarget:a})),this.activeEditor=t},_setBaseUrl:function(t){this.baseURL=new U_(this.documentBaseURL).toAbsolute(t.replace(/\/+$/,"")),this.baseURI=new U_(this.baseURL)}});jT.setup();var CI,NA,VR=Math.min,bD=Math.max,bI=Math.round,ZR=function(t,a,m){var v=a.x,S=a.y,R=t.w,ee=t.h,Ee=a.w,Se=a.h,pt=(m||"").split("");return"b"===pt[0]&&(S+=Se),"r"===pt[1]&&(v+=Ee),"c"===pt[0]&&(S+=bI(Se/2)),"c"===pt[1]&&(v+=bI(Ee/2)),"b"===pt[3]&&(S-=ee),"r"===pt[4]&&(v-=R),"c"===pt[3]&&(S-=bI(ee/2)),"c"===pt[4]&&(v-=bI(R/2)),CD(v,S,R,ee)},CD=function(t,a,m,v){return{x:t,y:a,w:m,h:v}},pU={inflate:function(t,a,m){return CD(t.x-a,t.y-m,t.w+2*a,t.h+2*m)},relativePosition:ZR,findBestRelativePosition:function(t,a,m,v){var S,R;for(R=0;R<v.length;R++)if((S=ZR(t,a,v[R])).x>=m.x&&S.x+S.w<=m.w+m.x&&S.y>=m.y&&S.y+S.h<=m.h+m.y)return v[R];return null},intersect:function(t,a){var m=bD(t.x,a.x),v=bD(t.y,a.y),S=VR(t.x+t.w,a.x+a.w),R=VR(t.y+t.h,a.y+a.h);return S-m<0||R-v<0?null:CD(m,v,S-m,R-v)},clamp:function(t,a,m){var v=t.x,S=t.y,R=t.x+t.w,ee=t.y+t.h,Ee=a.x+a.w,Se=a.y+a.h,pt=bD(0,a.x-v),Gt=bD(0,a.y-S),jt=bD(0,R-Ee),on=bD(0,ee-Se);return v+=pt,S+=Gt,m&&(R+=pt,ee+=Gt,v-=jt,S-=on),CD(v,S,(R-=jt)-v,(ee-=on)-S)},create:CD,fromClientRect:function(t){return CD(t.left,t.top,t.width,t.height)}},FA=function(){var t={},a={};return{load:function(S,R){var ee='Script at URL "'+R+'" failed to load',Ee='Script at URL "'+R+"\" did not call `tinymce.Resource.add('"+S+"', data)` within 1 second";if(void 0!==t[S])return t[S];var Se=new Ll(function(pt,Gt){var jt=function(t,a,m){void 0===m&&(m=1e3);var v=!1,S=null,R=function(pt){return function(){for(var Gt=[],jt=0;jt<arguments.length;jt++)Gt[jt]=arguments[jt];v||(v=!0,null!==S&&(clearTimeout(S),S=null),pt.apply(null,Gt))}},ee=R(t),Ee=R(a);return{start:function(){for(var pt=[],Gt=0;Gt<arguments.length;Gt++)pt[Gt]=arguments[Gt];!v&&null===S&&(S=setTimeout(function(){return Ee.apply(null,pt)},m))},resolve:ee,reject:Ee}}(pt,Gt);a[S]=jt.resolve,Xs.ScriptLoader.loadScript(R,function(){return jt.start(Ee)},function(){return jt.reject(ee)})});return t[S]=Se,Se},add:function(S,R){void 0!==a[S]&&(a[S](R),delete a[S]),t[S]=Ll.resolve(R)}}}(),r1=Li.each,yS=Li.extend,DO=function(){};DO.extend=CI=function(t){var m=this.prototype,v=function(){var Ee,Se,pt,Gt=this;if(!NA&&(Gt.init&&Gt.init.apply(Gt,arguments),Se=Gt.Mixins))for(Ee=Se.length;Ee--;)(pt=Se[Ee]).init&&pt.init.apply(Gt,arguments)},S=function(){return this};NA=!0;var ee=new this;return NA=!1,t.Mixins&&(r1(t.Mixins,function(Ee){for(var Se in Ee)"init"!==Se&&(t[Se]=Ee[Se])}),m.Mixins&&(t.Mixins=m.Mixins.concat(t.Mixins))),t.Methods&&r1(t.Methods.split(","),function(Ee){t[Ee]=S}),t.Properties&&r1(t.Properties.split(","),function(Ee){var Se="_"+Ee;t[Ee]=function(pt){return void 0!==pt?(this[Se]=pt,this):this[Se]}}),t.Statics&&r1(t.Statics,function(Ee,Se){v[Se]=Ee}),t.Defaults&&m.Defaults&&(t.Defaults=yS({},m.Defaults,t.Defaults)),Hi(t,function(Ee,Se){"function"==typeof Ee&&m[Se]?ee[Se]=function(Ee,Se){return function(){var Gt=this._super;this._super=m[Ee];var jt=Se.apply(this,arguments);return this._super=Gt,jt}}(Se,Ee):ee[Se]=Ee}),v.prototype=ee,v.constructor=v,v.extend=CI,v};var bS,BA=Math.min,EI=Math.max,KT=Math.round,SO={serialize:function(t){var a=JSON.stringify(t);return ue(a)?a.replace(/[\u0080-\uFFFF]/g,function(m){var v=m.charCodeAt(0).toString(16);return"\\u"+"0000".substring(v.length)+v}):a},parse:function(t){try{return JSON.parse(t)}catch{}}},hU={callbacks:{},count:0,send:function(t){var a=this,m=jl.DOM,v=void 0!==t.count?t.count:a.count,S="tinymce_jsonp_"+v;a.callbacks[v]=function(R){m.remove(S),delete a.callbacks[v],t.callback(R)},m.add(m.doc.body,"script",{id:S,src:t.url,type:"text/javascript"}),a.count++}},MI=Tn(Tn({},fI),{send:function(t){var a,m=0,v=function(){!t.async||4===a.readyState||m++>1e4?(t.success&&m<1e4&&200===a.status?t.success.call(t.success_scope,""+a.responseText,a,t):t.error&&t.error.call(t.error_scope,m>1e4?"TIMED_OUT":"GENERAL",a,t),a=null):Ht.setTimeout(v,10)};if(t.scope=t.scope||this,t.success_scope=t.success_scope||t.scope,t.error_scope=t.error_scope||t.scope,t.async=!1!==t.async,t.data=t.data||"",MI.fire("beforeInitialize",{settings:t}),(a=new XMLHttpRequest).overrideMimeType&&a.overrideMimeType(t.content_type),a.open(t.type||(t.data?"POST":"GET"),t.url,t.async),t.crossDomain&&(a.withCredentials=!0),t.content_type&&a.setRequestHeader("Content-Type",t.content_type),t.requestheaders&&Li.each(t.requestheaders,function(S){a.setRequestHeader(S.key,S.value)}),a.setRequestHeader("X-Requested-With","XMLHttpRequest"),(a=MI.fire("beforeSend",{xhr:a,settings:t}).xhr).send(t.data),!t.async)return v();Ht.setTimeout(v,10)}}),WR=Li.extend,gU=function(){function t(a){this.settings=WR({},a),this.count=0}return t.sendRPC=function(a){return(new t).send(a)},t.prototype.send=function(a){var m=a.error,v=a.success,S=WR(this.settings,a);S.success=function(R,ee){typeof(R=SO.parse(R))>"u"&&(R={error:"JSON Parse error."}),R.error?m.call(S.error_scope||S.scope,R.error,ee):v.call(S.success_scope||S.scope,R.result)},S.error=function(R,ee){m&&m.call(S.error_scope||S.scope,R,ee)},S.data=SO.serialize({id:a.id||"c"+this.count++,method:a.method,params:a.params}),S.content_type="application/json",MI.send(S)},t}();try{var AO="__storage_test__";(bS=window.localStorage).setItem(AO,AO),bS.removeItem(AO)}catch{bS=function(){var t={},a=[],m={getItem:function(v){return t[v]||null},setItem:function(v,S){a.push(v),t[v]=String(S)},key:function(v){return a[v]},removeItem:function(v){a=a.filter(function(S){return S===v}),delete t[v]},clear:function(){a=[],t={}},length:0};return Object.defineProperty(m,"length",{get:function(){return a.length},configurable:!1,enumerable:!1}),m}()}var vU={geom:{Rect:pU},util:{Promise:Ll,Delay:Ht,Tools:Li,VK:Ua,URI:U_,Class:DO,EventDispatcher:mI,Observable:fI,I18n:gu,XHR:MI,JSON:SO,JSONRequest:gU,JSONP:hU,LocalStorage:bS,Color:function(t){var a={},m=0,v=0,S=0,Gt=function(jt){var on;return"object"==typeof jt?"r"in jt?(m=jt.r,v=jt.g,S=jt.b):"v"in jt&&function(jt,on,Rn){if(jt=(parseInt(jt,10)||0)%360,on=parseInt(on,10)/100,Rn=parseInt(Rn,10)/100,on=EI(0,BA(on,1)),Rn=EI(0,BA(Rn,1)),0!==on){var Yn=jt/60,$n=Rn*on,qn=$n*(1-Math.abs(Yn%2-1)),bi=Rn-$n;switch(Math.floor(Yn)){case 0:m=$n,v=qn,S=0;break;case 1:m=qn,v=$n,S=0;break;case 2:m=0,v=$n,S=qn;break;case 3:m=0,v=qn,S=$n;break;case 4:m=qn,v=0,S=$n;break;case 5:m=$n,v=0,S=qn;break;default:m=v=S=0}m=KT(255*(m+bi)),v=KT(255*(v+bi)),S=KT(255*(S+bi))}else m=v=S=KT(255*Rn)}(jt.h,jt.s,jt.v):(on=/rgb\s*\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)[^\)]*\)/gi.exec(jt))?(m=parseInt(on[1],10),v=parseInt(on[2],10),S=parseInt(on[3],10)):(on=/#([0-F]{2})([0-F]{2})([0-F]{2})/gi.exec(jt))?(m=parseInt(on[1],16),v=parseInt(on[2],16),S=parseInt(on[3],16)):(on=/#([0-F])([0-F])([0-F])/gi.exec(jt))&&(m=parseInt(on[1]+on[1],16),v=parseInt(on[2]+on[2],16),S=parseInt(on[3]+on[3],16)),m=m<0?0:m>255?255:m,v=v<0?0:v>255?255:v,S=S<0?0:S>255?255:S,a};return t&&Gt(t),a.toRgb=function(){return{r:m,g:v,b:S}},a.toHsv=function(){return function(jt,on,Rn){var $n,qn;qn=0;var bi=BA(jt/=255,BA(on/=255,Rn/=255)),pi=EI(jt,EI(on,Rn));return bi===pi?{h:0,s:0,v:100*(qn=bi)}:($n=(pi-bi)/pi,qn=pi,{h:KT(60*((jt===bi?3:Rn===bi?1:5)-(jt===bi?on-Rn:Rn===bi?jt-on:Rn-jt)/(pi-bi))),s:KT(100*$n),v:KT(100*qn)})}(m,v,S)},a.toHex=function(){var jt=function(on){return(on=parseInt(on,10).toString(16)).length>1?on:"0"+on};return"#"+jt(m)+jt(v)+jt(S)},a.parse=Gt,a},ImageUploader:function(t){var a=iD(),m=lP(t,a);return{upload:function(v,S){return void 0===S&&(S=!0),m.upload(v,S?sP(t):void 0)}}}},dom:{EventUtils:E_,Sizzle:Bl,DomQuery:Ya,TreeWalker:Sr,TextSeeker:ml,DOMUtils:jl,ScriptLoader:Xs,RangeUtils:ry,Serializer:Y2,StyleSheetLoader:_n,ControlSelection:lh,BookmarkManager:Fg,Selection:D2,Event:E_.Event},html:{Styles:zm,Entities:td,Node:dh,Schema:pd,SaxParser:VC,DomParser:vw,Writer:JE,Serializer:cy},Env:$r,AddOnManager:Ad,Annotator:I1,Formatter:lL,UndoManager:cC,EditorCommands:WT,WindowManager:iP,NotificationManager:XC,EditorObservable:kR,Shortcuts:vI,Editor:yI,FocusManager:OD,EditorManager:jT,DOM:jl.DOM,ScriptLoader:Xs.ScriptLoader,PluginManager:by,ThemeManager:dE,IconManager:Cw,Resource:FA,trim:Li.trim,isArray:Li.isArray,is:Li.is,toArray:Li.toArray,makeMap:Li.makeMap,each:Li.each,map:Li.map,grep:Li.grep,inArray:Li.inArray,extend:Li.extend,create:Li.create,walk:Li.walk,createNS:Li.createNS,resolve:Li.resolve,explode:Li.explode,_addCacheSuffix:Li._addCacheSuffix,isOpera:$r.opera,isWebKit:$r.webkit,isIE:$r.ie,isGecko:$r.gecko,isMac:$r.mac},jR=Li.extend(jT,vU);(function(t){window.tinymce=t,window.tinyMCE=t})(jR),function(t){try{qe.exports=t}catch{}}(jR)}()},34114:(qe,I,p)=>{var e,P,o=p(55943),l=(P=[],{activateTrap:function(w){if(P.length>0){var B=P[P.length-1];B!==w&&B.pause()}var Y=P.indexOf(w);-1===Y||P.splice(Y,1),P.push(w)},deactivateTrap:function(w){var B=P.indexOf(w);-1!==B&&P.splice(B,1),P.length>0&&P[P.length-1].unpause()}});function n(P){return setTimeout(P,0)}qe.exports=function D(P,w){var B=document,Y="string"==typeof P?B.querySelector(P):P,V={returnFocusOnDeactivate:!0,escapeDeactivates:!0,...w},ue={firstTabbableNode:null,lastTabbableNode:null,nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1},he={activate:function ae(Oe){if(!ue.active){le(),ue.active=!0,ue.paused=!1,ue.nodeFocusedBeforeActivation=B.activeElement;var j=Oe&&Oe.onActivate?Oe.onActivate:V.onActivate;return j&&j(),ge(),he}},deactivate:X,pause:function ve(){ue.paused||!ue.active||(ue.paused=!0,ne())},unpause:function ye(){!ue.paused||!ue.active||(ue.paused=!1,le(),ge())}};return he;function X(Oe){if(ue.active){clearTimeout(e),ne(),ue.active=!1,ue.paused=!1,l.deactivateTrap(he);var j=Oe&&void 0!==Oe.onDeactivate?Oe.onDeactivate:V.onDeactivate;return j&&j(),(Oe&&void 0!==Oe.returnFocus?Oe.returnFocus:V.returnFocusOnDeactivate)&&n(function(){Z(function xe(Oe){var j=pe("setReturnFocus");return j||Oe}(ue.nodeFocusedBeforeActivation))}),he}}function ge(){if(ue.active)return l.activateTrap(he),e=n(function(){Z(Pe())}),B.addEventListener("focusin",re,!0),B.addEventListener("mousedown",de,{capture:!0,passive:!1}),B.addEventListener("touchstart",de,{capture:!0,passive:!1}),B.addEventListener("click",be,{capture:!0,passive:!1}),B.addEventListener("keydown",oe,{capture:!0,passive:!1}),he}function ne(){if(ue.active)return B.removeEventListener("focusin",re,!0),B.removeEventListener("mousedown",de,!0),B.removeEventListener("touchstart",de,!0),B.removeEventListener("click",be,!0),B.removeEventListener("keydown",oe,!0),he}function pe(Oe){var j=V[Oe],ke=j;if(!j)return null;if("string"==typeof j&&!(ke=B.querySelector(j)))throw new Error("`"+Oe+"` refers to no known node");if("function"==typeof j&&!(ke=j()))throw new Error("`"+Oe+"` did not return a node");return ke}function Pe(){return null!==pe("initialFocus")?pe("initialFocus"):Y.contains(B.activeElement)?B.activeElement:ue.firstTabbableNode||pe("fallbackFocus")}function de(Oe){if(!Y.contains(Oe.target)){if(V.clickOutsideDeactivates)return void X({returnFocus:!o.isFocusable(Oe.target)});V.allowOutsideClick&&V.allowOutsideClick(Oe)||Oe.preventDefault()}}function re(Oe){Y.contains(Oe.target)||Oe.target instanceof Document||(Oe.stopImmediatePropagation(),Z(ue.mostRecentlyFocusedNode||Pe()))}function oe(Oe){if(!1!==V.escapeDeactivates&&function E(P){return"Escape"===P.key||"Esc"===P.key||27===P.keyCode}(Oe))return Oe.preventDefault(),void X();(function T(P){return"Tab"===P.key||9===P.keyCode})(Oe)&&function me(Oe){if(le(),Oe.shiftKey&&Oe.target===ue.firstTabbableNode)return Oe.preventDefault(),void Z(ue.lastTabbableNode);if(!Oe.shiftKey&&Oe.target===ue.lastTabbableNode)return Oe.preventDefault(),void Z(ue.firstTabbableNode)}(Oe)}function be(Oe){V.clickOutsideDeactivates||Y.contains(Oe.target)||V.allowOutsideClick&&V.allowOutsideClick(Oe)||(Oe.preventDefault(),Oe.stopImmediatePropagation())}function le(){var Oe=o(Y);ue.firstTabbableNode=Oe[0]||Pe(),ue.lastTabbableNode=Oe[Oe.length-1]||Pe()}function Z(Oe,j){if(Oe!==B.activeElement){if(!Oe||!Oe.focus&&!Oe.setFocus&&!Oe.hasClass("ion-focusable"))return void(void 0===j&&Z(Pe(),!0));Oe.setFocus&&Oe.setFocus(),Oe.focus&&Oe.focus(),"ION-BUTTON"===Oe.tagName&&Oe.shadowRoot.querySelector(".button-native").focus(),ue.mostRecentlyFocusedNode=Oe,function g(P){return P.tagName&&"input"===P.tagName.toLowerCase()&&"function"==typeof P.select}(Oe)&&Oe.select()}}}},55943:qe=>{var I=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'],o=["ion-button","ion-radio","ion-input","ion-textarea","cgi-info-popup","cgi-autocomplete","sivi-lib-select","cgi-input"].join(","),e=I.join(",").concat(",",o),l=typeof Element>"u"?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector;function D(ne,pe){pe=pe||{};var re,oe,me,Pe=[],xe=[],de=ne.querySelectorAll(e);for(pe.includeContainer&&l.call(ne,e)&&(de=Array.prototype.slice.apply(de)).unshift(ne),re=0;re<de.length;re++)g(oe=de[re])&&(0===(me=w(oe))?Pe.push(oe):xe.push({documentOrder:re,tabIndex:me,node:oe}));return xe.sort(B).map(function(le){return le.node}).concat(Pe)}function g(ne){return!(!T(ne)||function ae(ne){return function he(ne){return V(ne)&&"radio"===ne.type}(ne)&&!function ye(ne){if(!ne.name)return!0;var pe=ne.ownerDocument.querySelectorAll('input[type="radio"][name="'+ne.name+'"]'),Pe=function ve(ne){for(var pe=0;pe<ne.length;pe++)if(ne[pe].checked)return ne[pe]}(pe);return!Pe||Pe===ne}(ne)}(ne)||w(ne)<0)}function T(ne){return!(ne.disabled||function ue(ne){return V(ne)&&"hidden"===ne.type}(ne)||function ge(ne){return null===ne.offsetParent||"hidden"===getComputedStyle(ne).visibility}(ne))}D.isTabbable=function E(ne){if(!ne)throw new Error("No node provided");return!1!==l.call(ne,e)&&g(ne)},D.isFocusable=function P(ne){if(!ne)throw new Error("No node provided");return!1!==l.call(ne,n)&&T(ne)};var n=I.concat("iframe").join(",");function w(ne){var pe=parseInt(ne.getAttribute("tabindex"),10);return isNaN(pe)?function Y(ne){return"true"===ne.contentEditable}(ne)||function X(ne){return l.call(ne,o)}(ne)?0:ne.tabIndex:pe}function B(ne,pe){return ne.tabIndex===pe.tabIndex?ne.documentOrder-pe.documentOrder:ne.tabIndex-pe.tabIndex}function V(ne){return"INPUT"===ne.tagName}qe.exports=D},49426:qe=>{qe.exports={CONNECT:"CONNECT",CONNECT_SUCCESS:"CONNECT_SUCCESS",CONNECT_ERROR:"CONNECT_ERROR",DISCONNECT:"DISCONNECT",SUBSCRIBE_CHANNEL:"SUBSCRIBE_CHANNEL",UNSUBSCRIBE_CHANNEL:"UNSUBSCRIBE_CHANNEL",UNSUBSCRIBE_CHANNEL_SUCCESS:"UNSUBSCRIBE_CHANNEL_SUCCESS",WORKER_MESSAGE:"WORKER_MESSAGE"}},6123:(qe,I,p)=>{var o={"./card-footer.entry.js":[81966,1966],"./cgi-accordion-item.entry.js":[13465,3465],"./cgi-autocomplete-item.entry.js":[72034,2034],"./cgi-autocomplete-list-item_2.entry.js":[21106,1106],"./cgi-autocomplete-popover-content.entry.js":[94512,5427,8592,19],"./cgi-autocomplete-popover_2.entry.js":[93269,8726,5427,8592,3269],"./cgi-autocomplete.entry.js":[57699,5427,8592,7699],"./cgi-badge_3.entry.js":[16599,6599],"./cgi-card.entry.js":[36549,6549],"./cgi-count-bar.entry.js":[46047,6047],"./cgi-fab.entry.js":[14786,4786],"./cgi-icon.entry.js":[43261,3261],"./cgi-info-popup-content.entry.js":[11182,1182],"./cgi-info-popup.entry.js":[84453,4453],"./cgi-input_2.entry.js":[21769,8592,1769],"./cgi-library-version.entry.js":[40882,882],"./cgi-list-options-accordion.entry.js":[62854,8592,2854],"./cgi-navigation-tabs.entry.js":[62357,8592,2357],"./cgi-oval-item.entry.js":[81101,1101],"./cgi-page-stepper.entry.js":[96160,6160],"./cgi-profile-image.entry.js":[78196,8196],"./cgi-shaped-image.entry.js":[82751,2751],"./cgi-status-view.entry.js":[34371,4371],"./cgi-status.entry.js":[70247,247],"./cgi-tag.entry.js":[49334,9334],"./cgi-text-area.entry.js":[19617,8592,9617],"./cgi-textarea.entry.js":[75066,8592,5066],"./cgi-toggle-accordion.entry.js":[75486,5486],"./cgi-validator.entry.js":[82027,5427,8592,2027],"./ion-action-sheet.entry.js":[33596,4385,8726,7945,3596],"./ion-alert.entry.js":[16583,4385,8726,7945,8592,6583],"./ion-app.entry.js":[80340,340],"./ion-avatar_2.entry.js":[58875,8875],"./ion-back-button.entry.js":[31253,1253],"./ion-backdrop.entry.js":[50994,994],"./ion-badge.entry.js":[2078,2078],"./ion-buttons.entry.js":[44853,4853],"./ion-card-content.entry.js":[40740,740],"./ion-card-header.entry.js":[28676,7745],"./ion-card-subtitle.entry.js":[18655,8655],"./ion-card-title.entry.js":[46191,6191],"./ion-card.entry.js":[4038,4038],"./ion-checkbox_2.entry.js":[39947,9947],"./ion-content.entry.js":[91978,1978],"./ion-datetime.entry.js":[22171,8726,2171],"./ion-fab-button.entry.js":[75163,5163],"./ion-fab-list.entry.js":[40823,823],"./ion-fab.entry.js":[58106,8106],"./ion-footer.entry.js":[10027,27],"./ion-header.entry.js":[8293,8293],"./ion-icon.entry.js":[3892,3892],"./ion-img.entry.js":[29480,9480],"./ion-infinite-scroll-content.entry.js":[79731,8592,9731],"./ion-infinite-scroll.entry.js":[85068,5068],"./ion-item-divider.entry.js":[22455,2455],"./ion-item-group.entry.js":[74992,4992],"./ion-item-option.entry.js":[95792,5792],"./ion-item-options.entry.js":[40017,17],"./ion-item-sliding.entry.js":[84195,4195],"./ion-item_2.entry.js":[21214,1214],"./ion-list-header_3.entry.js":[98834,8834],"./ion-list.entry.js":[31082,1082],"./ion-loading.entry.js":[98903,4385,8726,8592,8903],"./ion-menu-button.entry.js":[65073,4385,3937,8592,5073],"./ion-menu-toggle.entry.js":[67229,4385,3937,8592,7229],"./ion-menu.entry.js":[48908,4385,3937,8592,8908],"./ion-modal.entry.js":[17933,4385,8726,8592,7933],"./ion-nav-link.entry.js":[6488,6488],"./ion-nav.entry.js":[17722,8592,7722],"./ion-note.entry.js":[41016,1016],"./ion-picker-column.entry.js":[11718,1718],"./ion-picker.entry.js":[70068,4385,8726,68],"./ion-popover.entry.js":[39131,4385,8726,8592,9131],"./ion-progress-bar.entry.js":[29096,9096],"./ion-range.entry.js":[39409,9409],"./ion-refresher-content.entry.js":[2626,8592,2626],"./ion-refresher.entry.js":[91324,4385,8592,1324],"./ion-reorder-group.entry.js":[15882,5882],"./ion-reorder.entry.js":[24512,4512],"./ion-ripple-effect.entry.js":[33094,3094],"./ion-route-redirect.entry.js":[24146,4146],"./ion-route.entry.js":[84324,4324],"./ion-router-link.entry.js":[92661,4954],"./ion-router-outlet.entry.js":[67583,8592,324],"./ion-router.entry.js":[50578,578],"./ion-searchbar.entry.js":[91492,1492],"./ion-segment-button.entry.js":[58676,8676],"./ion-segment.entry.js":[60342,342],"./ion-select-option.entry.js":[64559,4559],"./ion-select-popover.entry.js":[24673,8726,4673],"./ion-select.entry.js":[75465,8726,5465],"./ion-skeleton-text.entry.js":[57597,7597],"./ion-slide.entry.js":[12661,2661],"./ion-slides.entry.js":[73599,3599],"./ion-spinner.entry.js":[2008,8592,2008],"./ion-split-pane.entry.js":[92111,2111],"./ion-tab-bar.entry.js":[87978,7978],"./ion-tab-button.entry.js":[13402,3402],"./ion-tab.entry.js":[41275,8592,3903],"./ion-tabs.entry.js":[28175,8175],"./ion-text.entry.js":[78034,8034],"./ion-textarea.entry.js":[44014,4014],"./ion-thumbnail.entry.js":[37902,7902],"./ion-title.entry.js":[57704,7704],"./ion-toast.entry.js":[20265,4385,8726,8592,265],"./ion-toggle.entry.js":[16926,6926],"./ion-toolbar.entry.js":[55669,5669],"./ion-virtual-scroll.entry.js":[54868,4868]};function e(l){if(!p.o(o,l))return Promise.resolve().then(()=>{var E=new Error("Cannot find module '"+l+"'");throw E.code="MODULE_NOT_FOUND",E});var D=o[l],g=D[0];return Promise.all(D.slice(1).map(p.e)).then(()=>p(g))}e.keys=()=>Object.keys(o),e.id=6123,qe.exports=e},50863:(qe,I,p)=>{var o={"./ion-accordion_2.entry.js":[89654,8592,9654],"./ion-action-sheet.entry.js":[3648,8592,3648],"./ion-alert.entry.js":[11118,8592,1118],"./ion-app_8.entry.js":[80053,8592,3236],"./ion-avatar_3.entry.js":[54753,4753],"./ion-back-button.entry.js":[92073,8592,2073],"./ion-backdrop.entry.js":[98939,8939],"./ion-breadcrumb_2.entry.js":[47544,8592,7544],"./ion-button_2.entry.js":[15652,5652],"./ion-card_5.entry.js":[50388,388],"./ion-checkbox.entry.js":[9922,9922],"./ion-chip.entry.js":[10657,657],"./ion-col_3.entry.js":[19824,9824],"./ion-datetime-button.entry.js":[49230,3646,9230],"./ion-datetime_3.entry.js":[54959,3646,8592,4959],"./ion-fab_3.entry.js":[65836,8592,5836],"./ion-img.entry.js":[71033,1033],"./ion-infinite-scroll_2.entry.js":[8034,8592,5817],"./ion-input.entry.js":[51217,1217],"./ion-item-option_3.entry.js":[52933,8592,4651],"./ion-item_8.entry.js":[94711,8592,4711],"./ion-loading.entry.js":[79434,8592,9434],"./ion-menu_3.entry.js":[38136,8592,8136],"./ion-modal.entry.js":[42349,8592,2349],"./ion-nav_2.entry.js":[45349,8592,5349],"./ion-picker-column-internal.entry.js":[7602,8592,7602],"./ion-picker-internal.entry.js":[9016,9016],"./ion-popover.entry.js":[83804,8592,3804],"./ion-progress-bar.entry.js":[54174,4174],"./ion-radio_2.entry.js":[24432,4432],"./ion-range.entry.js":[31709,8592,1709],"./ion-refresher_2.entry.js":[93326,8592,2175],"./ion-reorder_2.entry.js":[93583,8592,1186],"./ion-ripple-effect.entry.js":[99958,9958],"./ion-route_4.entry.js":[4330,4330],"./ion-searchbar.entry.js":[98628,8592,8628],"./ion-segment_2.entry.js":[59325,8592,9325],"./ion-select_3.entry.js":[12773,2773],"./ion-slide_2.entry.js":[1650,1650],"./ion-spinner.entry.js":[44908,8592,4908],"./ion-split-pane.entry.js":[39536,9536],"./ion-tab-bar_2.entry.js":[438,8592,438],"./ion-tab_2.entry.js":[91536,8592,1536],"./ion-text.entry.js":[74376,4376],"./ion-textarea.entry.js":[56560,6560],"./ion-toast.entry.js":[76120,8592,6120],"./ion-toggle.entry.js":[85168,8592,5168],"./ion-virtual-scroll.entry.js":[32289,2289]};function e(l){if(!p.o(o,l))return Promise.resolve().then(()=>{var E=new Error("Cannot find module '"+l+"'");throw E.code="MODULE_NOT_FOUND",E});var D=o[l],g=D[0];return Promise.all(D.slice(1).map(p.e)).then(()=>p(g))}e.keys=()=>Object.keys(o),e.id=50863,qe.exports=e},66856:(qe,I,p)=>{"use strict";p.r(I),p.d(I,{__assign:()=>l,__asyncDelegator:()=>ve,__asyncGenerator:()=>X,__asyncValues:()=>ye,__await:()=>ae,__awaiter:()=>n,__classPrivateFieldGet:()=>Pe,__classPrivateFieldSet:()=>xe,__createBinding:()=>w,__decorate:()=>g,__exportStar:()=>B,__extends:()=>e,__generator:()=>P,__importDefault:()=>pe,__importStar:()=>ne,__makeTemplateObject:()=>ge,__metadata:()=>T,__param:()=>E,__read:()=>V,__rest:()=>D,__spread:()=>ue,__spreadArrays:()=>he,__values:()=>Y});var o=function(de,re){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(oe,me){oe.__proto__=me}||function(oe,me){for(var be in me)me.hasOwnProperty(be)&&(oe[be]=me[be])})(de,re)};function e(de,re){function oe(){this.constructor=de}o(de,re),de.prototype=null===re?Object.create(re):(oe.prototype=re.prototype,new oe)}var l=function(){return l=Object.assign||function(re){for(var oe,me=1,be=arguments.length;me<be;me++)for(var le in oe=arguments[me])Object.prototype.hasOwnProperty.call(oe,le)&&(re[le]=oe[le]);return re},l.apply(this,arguments)};function D(de,re){var oe={};for(var me in de)Object.prototype.hasOwnProperty.call(de,me)&&re.indexOf(me)<0&&(oe[me]=de[me]);if(null!=de&&"function"==typeof Object.getOwnPropertySymbols){var be=0;for(me=Object.getOwnPropertySymbols(de);be<me.length;be++)re.indexOf(me[be])<0&&Object.prototype.propertyIsEnumerable.call(de,me[be])&&(oe[me[be]]=de[me[be]])}return oe}function g(de,re,oe,me){var Z,be=arguments.length,le=be<3?re:null===me?me=Object.getOwnPropertyDescriptor(re,oe):me;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)le=Reflect.decorate(de,re,oe,me);else for(var Oe=de.length-1;Oe>=0;Oe--)(Z=de[Oe])&&(le=(be<3?Z(le):be>3?Z(re,oe,le):Z(re,oe))||le);return be>3&&le&&Object.defineProperty(re,oe,le),le}function E(de,re){return function(oe,me){re(oe,me,de)}}function T(de,re){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(de,re)}function n(de,re,oe,me){return new(oe||(oe=Promise))(function(le,Z){function Oe(Be){try{ke(me.next(Be))}catch(nt){Z(nt)}}function j(Be){try{ke(me.throw(Be))}catch(nt){Z(nt)}}function ke(Be){Be.done?le(Be.value):function be(le){return le instanceof oe?le:new oe(function(Z){Z(le)})}(Be.value).then(Oe,j)}ke((me=me.apply(de,re||[])).next())})}function P(de,re){var me,be,le,Z,oe={label:0,sent:function(){if(1&le[0])throw le[1];return le[1]},trys:[],ops:[]};return Z={next:Oe(0),throw:Oe(1),return:Oe(2)},"function"==typeof Symbol&&(Z[Symbol.iterator]=function(){return this}),Z;function Oe(ke){return function(Be){return function j(ke){if(me)throw new TypeError("Generator is already executing.");for(;oe;)try{if(me=1,be&&(le=2&ke[0]?be.return:ke[0]?be.throw||((le=be.return)&&le.call(be),0):be.next)&&!(le=le.call(be,ke[1])).done)return le;switch(be=0,le&&(ke=[2&ke[0],le.value]),ke[0]){case 0:case 1:le=ke;break;case 4:return oe.label++,{value:ke[1],done:!1};case 5:oe.label++,be=ke[1],ke=[0];continue;case 7:ke=oe.ops.pop(),oe.trys.pop();continue;default:if(!(le=(le=oe.trys).length>0&&le[le.length-1])&&(6===ke[0]||2===ke[0])){oe=0;continue}if(3===ke[0]&&(!le||ke[1]>le[0]&&ke[1]<le[3])){oe.label=ke[1];break}if(6===ke[0]&&oe.label<le[1]){oe.label=le[1],le=ke;break}if(le&&oe.label<le[2]){oe.label=le[2],oe.ops.push(ke);break}le[2]&&oe.ops.pop(),oe.trys.pop();continue}ke=re.call(de,oe)}catch(Be){ke=[6,Be],be=0}finally{me=le=0}if(5&ke[0])throw ke[1];return{value:ke[0]?ke[1]:void 0,done:!0}}([ke,Be])}}}function w(de,re,oe,me){void 0===me&&(me=oe),de[me]=re[oe]}function B(de,re){for(var oe in de)"default"!==oe&&!re.hasOwnProperty(oe)&&(re[oe]=de[oe])}function Y(de){var re="function"==typeof Symbol&&Symbol.iterator,oe=re&&de[re],me=0;if(oe)return oe.call(de);if(de&&"number"==typeof de.length)return{next:function(){return de&&me>=de.length&&(de=void 0),{value:de&&de[me++],done:!de}}};throw new TypeError(re?"Object is not iterable.":"Symbol.iterator is not defined.")}function V(de,re){var oe="function"==typeof Symbol&&de[Symbol.iterator];if(!oe)return de;var be,Z,me=oe.call(de),le=[];try{for(;(void 0===re||re-- >0)&&!(be=me.next()).done;)le.push(be.value)}catch(Oe){Z={error:Oe}}finally{try{be&&!be.done&&(oe=me.return)&&oe.call(me)}finally{if(Z)throw Z.error}}return le}function ue(){for(var de=[],re=0;re<arguments.length;re++)de=de.concat(V(arguments[re]));return de}function he(){for(var de=0,re=0,oe=arguments.length;re<oe;re++)de+=arguments[re].length;var me=Array(de),be=0;for(re=0;re<oe;re++)for(var le=arguments[re],Z=0,Oe=le.length;Z<Oe;Z++,be++)me[be]=le[Z];return me}function ae(de){return this instanceof ae?(this.v=de,this):new ae(de)}function X(de,re,oe){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var be,me=oe.apply(de,re||[]),le=[];return be={},Z("next"),Z("throw"),Z("return"),be[Symbol.asyncIterator]=function(){return this},be;function Z(mt){me[mt]&&(be[mt]=function(ut){return new Promise(function(Ve,tt){le.push([mt,ut,Ve,tt])>1||Oe(mt,ut)})})}function Oe(mt,ut){try{!function j(mt){mt.value instanceof ae?Promise.resolve(mt.value.v).then(ke,Be):nt(le[0][2],mt)}(me[mt](ut))}catch(Ve){nt(le[0][3],Ve)}}function ke(mt){Oe("next",mt)}function Be(mt){Oe("throw",mt)}function nt(mt,ut){mt(ut),le.shift(),le.length&&Oe(le[0][0],le[0][1])}}function ve(de){var re,oe;return re={},me("next"),me("throw",function(be){throw be}),me("return"),re[Symbol.iterator]=function(){return this},re;function me(be,le){re[be]=de[be]?function(Z){return(oe=!oe)?{value:ae(de[be](Z)),done:"return"===be}:le?le(Z):Z}:le}}function ye(de){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var oe,re=de[Symbol.asyncIterator];return re?re.call(de):(de=Y(de),oe={},me("next"),me("throw"),me("return"),oe[Symbol.asyncIterator]=function(){return this},oe);function me(le){oe[le]=de[le]&&function(Z){return new Promise(function(Oe,j){(function be(le,Z,Oe,j){Promise.resolve(j).then(function(ke){le({value:ke,done:Oe})},Z)})(Oe,j,(Z=de[le](Z)).done,Z.value)})}}}function ge(de,re){return Object.defineProperty?Object.defineProperty(de,"raw",{value:re}):de.raw=re,de}function ne(de){if(de&&de.__esModule)return de;var re={};if(null!=de)for(var oe in de)Object.hasOwnProperty.call(de,oe)&&(re[oe]=de[oe]);return re.default=de,re}function pe(de){return de&&de.__esModule?de:{default:de}}function Pe(de,re){if(!re.has(de))throw new TypeError("attempted to get private field on non-instance");return re.get(de)}function xe(de,re,oe){if(!re.has(de))throw new TypeError("attempted to set private field on non-instance");return re.set(de,oe),oe}},51421:(qe,I,p)=>{"use strict";p.d(I,{XA:()=>Y,_T:()=>D,fl:()=>ue,pi:()=>l});var l=function(){return l=Object.assign||function(re){for(var oe,me=1,be=arguments.length;me<be;me++)for(var le in oe=arguments[me])Object.prototype.hasOwnProperty.call(oe,le)&&(re[le]=oe[le]);return re},l.apply(this,arguments)};function D(de,re){var oe={};for(var me in de)Object.prototype.hasOwnProperty.call(de,me)&&re.indexOf(me)<0&&(oe[me]=de[me]);if(null!=de&&"function"==typeof Object.getOwnPropertySymbols){var be=0;for(me=Object.getOwnPropertySymbols(de);be<me.length;be++)re.indexOf(me[be])<0&&Object.prototype.propertyIsEnumerable.call(de,me[be])&&(oe[me[be]]=de[me[be]])}return oe}function Y(de){var re="function"==typeof Symbol&&Symbol.iterator,oe=re&&de[re],me=0;if(oe)return oe.call(de);if(de&&"number"==typeof de.length)return{next:function(){return de&&me>=de.length&&(de=void 0),{value:de&&de[me++],done:!de}}};throw new TypeError(re?"Object is not iterable.":"Symbol.iterator is not defined.")}function V(de,re){var oe="function"==typeof Symbol&&de[Symbol.iterator];if(!oe)return de;var be,Z,me=oe.call(de),le=[];try{for(;(void 0===re||re-- >0)&&!(be=me.next()).done;)le.push(be.value)}catch(Oe){Z={error:Oe}}finally{try{be&&!be.done&&(oe=me.return)&&oe.call(me)}finally{if(Z)throw Z.error}}return le}function ue(){for(var de=[],re=0;re<arguments.length;re++)de=de.concat(V(arguments[re]));return de}},68907:(qe,I,p)=>{"use strict";p.d(I,{fl:()=>ue,pi:()=>l});var l=function(){return l=Object.assign||function(re){for(var oe,me=1,be=arguments.length;me<be;me++)for(var le in oe=arguments[me])Object.prototype.hasOwnProperty.call(oe,le)&&(re[le]=oe[le]);return re},l.apply(this,arguments)};function V(de,re){var oe="function"==typeof Symbol&&de[Symbol.iterator];if(!oe)return de;var be,Z,me=oe.call(de),le=[];try{for(;(void 0===re||re-- >0)&&!(be=me.next()).done;)le.push(be.value)}catch(Oe){Z={error:Oe}}finally{try{be&&!be.done&&(oe=me.return)&&oe.call(me)}finally{if(Z)throw Z.error}}return le}function ue(){for(var de=[],re=0;re<arguments.length;re++)de=de.concat(V(arguments[re]));return de}},50832:(qe,I,p)=>{"use strict";p.d(I,{CR:()=>V,XA:()=>Y,ZT:()=>e,pi:()=>l});var o=function(de,re){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(oe,me){oe.__proto__=me}||function(oe,me){for(var be in me)me.hasOwnProperty(be)&&(oe[be]=me[be])})(de,re)};function e(de,re){function oe(){this.constructor=de}o(de,re),de.prototype=null===re?Object.create(re):(oe.prototype=re.prototype,new oe)}var l=function(){return l=Object.assign||function(re){for(var oe,me=1,be=arguments.length;me<be;me++)for(var le in oe=arguments[me])Object.prototype.hasOwnProperty.call(oe,le)&&(re[le]=oe[le]);return re},l.apply(this,arguments)};function Y(de){var re="function"==typeof Symbol&&Symbol.iterator,oe=re&&de[re],me=0;if(oe)return oe.call(de);if(de&&"number"==typeof de.length)return{next:function(){return de&&me>=de.length&&(de=void 0),{value:de&&de[me++],done:!de}}};throw new TypeError(re?"Object is not iterable.":"Symbol.iterator is not defined.")}function V(de,re){var oe="function"==typeof Symbol&&de[Symbol.iterator];if(!oe)return de;var be,Z,me=oe.call(de),le=[];try{for(;(void 0===re||re-- >0)&&!(be=me.next()).done;)le.push(be.value)}catch(Oe){Z={error:Oe}}finally{try{be&&!be.done&&(oe=me.return)&&oe.call(me)}finally{if(Z)throw Z.error}}return le}},46700:(qe,I,p)=>{var o={"./af":27088,"./af.js":27088,"./ar":17038,"./ar-dz":52502,"./ar-dz.js":52502,"./ar-kw":30128,"./ar-kw.js":30128,"./ar-ly":84519,"./ar-ly.js":84519,"./ar-ma":65443,"./ar-ma.js":65443,"./ar-ps":14523,"./ar-ps.js":14523,"./ar-sa":17642,"./ar-sa.js":17642,"./ar-tn":68592,"./ar-tn.js":68592,"./ar.js":17038,"./az":51213,"./az.js":51213,"./be":69191,"./be.js":69191,"./bg":90322,"./bg.js":90322,"./bm":28042,"./bm.js":28042,"./bn":59620,"./bn-bd":65903,"./bn-bd.js":65903,"./bn.js":59620,"./bo":69645,"./bo.js":69645,"./br":45020,"./br.js":45020,"./bs":64792,"./bs.js":64792,"./ca":47980,"./ca.js":47980,"./cs":47322,"./cs.js":47322,"./cv":90365,"./cv.js":90365,"./cy":32092,"./cy.js":32092,"./da":77387,"./da.js":77387,"./de":54307,"./de-at":29459,"./de-at.js":29459,"./de-ch":73694,"./de-ch.js":73694,"./de.js":54307,"./dv":39659,"./dv.js":39659,"./el":3460,"./el.js":3460,"./en-au":94369,"./en-au.js":94369,"./en-ca":60530,"./en-ca.js":60530,"./en-gb":9998,"./en-gb.js":9998,"./en-ie":13391,"./en-ie.js":13391,"./en-il":75414,"./en-il.js":75414,"./en-in":19615,"./en-in.js":19615,"./en-nz":21248,"./en-nz.js":21248,"./en-sg":13767,"./en-sg.js":13767,"./eo":84530,"./eo.js":84530,"./es":86866,"./es-do":18944,"./es-do.js":18944,"./es-mx":29116,"./es-mx.js":29116,"./es-us":83609,"./es-us.js":83609,"./es.js":86866,"./et":96725,"./et.js":96725,"./eu":67931,"./eu.js":67931,"./fa":56417,"./fa.js":56417,"./fi":20944,"./fi.js":20944,"./fil":61766,"./fil.js":61766,"./fo":95867,"./fo.js":95867,"./fr":1636,"./fr-ca":16848,"./fr-ca.js":16848,"./fr-ch":77773,"./fr-ch.js":77773,"./fr.js":1636,"./fy":14940,"./fy.js":14940,"./ga":91402,"./ga.js":91402,"./gd":46924,"./gd.js":46924,"./gl":16398,"./gl.js":16398,"./gom-deva":72457,"./gom-deva.js":72457,"./gom-latn":52545,"./gom-latn.js":52545,"./gu":42641,"./gu.js":42641,"./he":7536,"./he.js":7536,"./hi":96335,"./hi.js":96335,"./hr":7458,"./hr.js":7458,"./hu":56540,"./hu.js":56540,"./hy-am":65283,"./hy-am.js":65283,"./id":98780,"./id.js":98780,"./is":14205,"./is.js":14205,"./it":34211,"./it-ch":29985,"./it-ch.js":29985,"./it.js":34211,"./ja":31003,"./ja.js":31003,"./jv":60420,"./jv.js":60420,"./ka":40851,"./ka.js":40851,"./kk":16074,"./kk.js":16074,"./km":53343,"./km.js":53343,"./kn":44799,"./kn.js":44799,"./ko":13549,"./ko.js":13549,"./ku":91037,"./ku-kmr":63775,"./ku-kmr.js":63775,"./ku.js":91037,"./ky":93125,"./ky.js":93125,"./lb":69586,"./lb.js":69586,"./lo":32349,"./lo.js":32349,"./lt":92400,"./lt.js":92400,"./lv":39991,"./lv.js":39991,"./me":28477,"./me.js":28477,"./mi":55118,"./mi.js":55118,"./mk":15943,"./mk.js":15943,"./ml":13849,"./ml.js":13849,"./mn":31977,"./mn.js":31977,"./mr":66184,"./mr.js":66184,"./ms":70485,"./ms-my":64524,"./ms-my.js":64524,"./ms.js":70485,"./mt":36681,"./mt.js":36681,"./my":52024,"./my.js":52024,"./nb":42688,"./nb.js":42688,"./ne":68914,"./ne.js":68914,"./nl":11758,"./nl-be":52272,"./nl-be.js":52272,"./nl.js":11758,"./nn":41510,"./nn.js":41510,"./oc-lnc":52797,"./oc-lnc.js":52797,"./pa-in":37944,"./pa-in.js":37944,"./pl":1605,"./pl.js":1605,"./pt":54225,"./pt-br":73840,"./pt-br.js":73840,"./pt.js":54225,"./ro":45128,"./ro.js":45128,"./ru":35127,"./ru.js":35127,"./sd":32525,"./sd.js":32525,"./se":59893,"./se.js":59893,"./si":33123,"./si.js":33123,"./sk":59635,"./sk.js":59635,"./sl":78106,"./sl.js":78106,"./sq":88799,"./sq.js":88799,"./sr":97949,"./sr-cyrl":52872,"./sr-cyrl.js":52872,"./sr.js":97949,"./ss":86167,"./ss.js":86167,"./sv":39713,"./sv.js":39713,"./sw":41982,"./sw.js":41982,"./ta":22732,"./ta.js":22732,"./te":43636,"./te.js":43636,"./tet":2115,"./tet.js":2115,"./tg":69801,"./tg.js":69801,"./th":2868,"./th.js":2868,"./tk":31310,"./tk.js":31310,"./tl-ph":22360,"./tl-ph.js":22360,"./tlh":66645,"./tlh.js":66645,"./tr":98374,"./tr.js":98374,"./tzl":256,"./tzl.js":256,"./tzm":61595,"./tzm-latn":61631,"./tzm-latn.js":61631,"./tzm.js":61595,"./ug-cn":6050,"./ug-cn.js":6050,"./uk":65610,"./uk.js":65610,"./ur":86077,"./ur.js":86077,"./uz":22862,"./uz-latn":12207,"./uz-latn.js":12207,"./uz.js":22862,"./vi":48093,"./vi.js":48093,"./x-pseudo":25590,"./x-pseudo.js":25590,"./yo":9058,"./yo.js":9058,"./zh-cn":77908,"./zh-cn.js":77908,"./zh-hk":8867,"./zh-hk.js":8867,"./zh-mo":31133,"./zh-mo.js":31133,"./zh-tw":83291,"./zh-tw.js":83291};function e(D){var g=l(D);return p(g)}function l(D){if(!p.o(o,D)){var g=new Error("Cannot find module '"+D+"'");throw g.code="MODULE_NOT_FOUND",g}return o[D]}e.keys=function(){return Object.keys(o)},e.resolve=l,qe.exports=e,e.id=46700},70655:(qe,I,p)=>{"use strict";p.r(I),p.d(I,{__assign:()=>l,__asyncDelegator:()=>ye,__asyncGenerator:()=>ve,__asyncValues:()=>ge,__await:()=>X,__awaiter:()=>n,__classPrivateFieldGet:()=>de,__classPrivateFieldIn:()=>oe,__classPrivateFieldSet:()=>re,__createBinding:()=>w,__decorate:()=>g,__exportStar:()=>B,__extends:()=>e,__generator:()=>P,__importDefault:()=>xe,__importStar:()=>Pe,__makeTemplateObject:()=>ne,__metadata:()=>T,__param:()=>E,__read:()=>V,__rest:()=>D,__spread:()=>ue,__spreadArray:()=>ae,__spreadArrays:()=>he,__values:()=>Y});var o=function(me,be){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(le,Z){le.__proto__=Z}||function(le,Z){for(var Oe in Z)Object.prototype.hasOwnProperty.call(Z,Oe)&&(le[Oe]=Z[Oe])})(me,be)};function e(me,be){if("function"!=typeof be&&null!==be)throw new TypeError("Class extends value "+String(be)+" is not a constructor or null");function le(){this.constructor=me}o(me,be),me.prototype=null===be?Object.create(be):(le.prototype=be.prototype,new le)}var l=function(){return l=Object.assign||function(be){for(var le,Z=1,Oe=arguments.length;Z<Oe;Z++)for(var j in le=arguments[Z])Object.prototype.hasOwnProperty.call(le,j)&&(be[j]=le[j]);return be},l.apply(this,arguments)};function D(me,be){var le={};for(var Z in me)Object.prototype.hasOwnProperty.call(me,Z)&&be.indexOf(Z)<0&&(le[Z]=me[Z]);if(null!=me&&"function"==typeof Object.getOwnPropertySymbols){var Oe=0;for(Z=Object.getOwnPropertySymbols(me);Oe<Z.length;Oe++)be.indexOf(Z[Oe])<0&&Object.prototype.propertyIsEnumerable.call(me,Z[Oe])&&(le[Z[Oe]]=me[Z[Oe]])}return le}function g(me,be,le,Z){var ke,Oe=arguments.length,j=Oe<3?be:null===Z?Z=Object.getOwnPropertyDescriptor(be,le):Z;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)j=Reflect.decorate(me,be,le,Z);else for(var Be=me.length-1;Be>=0;Be--)(ke=me[Be])&&(j=(Oe<3?ke(j):Oe>3?ke(be,le,j):ke(be,le))||j);return Oe>3&&j&&Object.defineProperty(be,le,j),j}function E(me,be){return function(le,Z){be(le,Z,me)}}function T(me,be){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(me,be)}function n(me,be,le,Z){return new(le||(le=Promise))(function(j,ke){function Be(ut){try{mt(Z.next(ut))}catch(Ve){ke(Ve)}}function nt(ut){try{mt(Z.throw(ut))}catch(Ve){ke(Ve)}}function mt(ut){ut.done?j(ut.value):function Oe(j){return j instanceof le?j:new le(function(ke){ke(j)})}(ut.value).then(Be,nt)}mt((Z=Z.apply(me,be||[])).next())})}function P(me,be){var Z,Oe,j,ke,le={label:0,sent:function(){if(1&j[0])throw j[1];return j[1]},trys:[],ops:[]};return ke={next:Be(0),throw:Be(1),return:Be(2)},"function"==typeof Symbol&&(ke[Symbol.iterator]=function(){return this}),ke;function Be(mt){return function(ut){return function nt(mt){if(Z)throw new TypeError("Generator is already executing.");for(;ke&&(ke=0,mt[0]&&(le=0)),le;)try{if(Z=1,Oe&&(j=2&mt[0]?Oe.return:mt[0]?Oe.throw||((j=Oe.return)&&j.call(Oe),0):Oe.next)&&!(j=j.call(Oe,mt[1])).done)return j;switch(Oe=0,j&&(mt=[2&mt[0],j.value]),mt[0]){case 0:case 1:j=mt;break;case 4:return le.label++,{value:mt[1],done:!1};case 5:le.label++,Oe=mt[1],mt=[0];continue;case 7:mt=le.ops.pop(),le.trys.pop();continue;default:if(!(j=(j=le.trys).length>0&&j[j.length-1])&&(6===mt[0]||2===mt[0])){le=0;continue}if(3===mt[0]&&(!j||mt[1]>j[0]&&mt[1]<j[3])){le.label=mt[1];break}if(6===mt[0]&&le.label<j[1]){le.label=j[1],j=mt;break}if(j&&le.label<j[2]){le.label=j[2],le.ops.push(mt);break}j[2]&&le.ops.pop(),le.trys.pop();continue}mt=be.call(me,le)}catch(ut){mt=[6,ut],Oe=0}finally{Z=j=0}if(5&mt[0])throw mt[1];return{value:mt[0]?mt[1]:void 0,done:!0}}([mt,ut])}}}var w=Object.create?function(me,be,le,Z){void 0===Z&&(Z=le);var Oe=Object.getOwnPropertyDescriptor(be,le);(!Oe||("get"in Oe?!be.__esModule:Oe.writable||Oe.configurable))&&(Oe={enumerable:!0,get:function(){return be[le]}}),Object.defineProperty(me,Z,Oe)}:function(me,be,le,Z){void 0===Z&&(Z=le),me[Z]=be[le]};function B(me,be){for(var le in me)"default"!==le&&!Object.prototype.hasOwnProperty.call(be,le)&&w(be,me,le)}function Y(me){var be="function"==typeof Symbol&&Symbol.iterator,le=be&&me[be],Z=0;if(le)return le.call(me);if(me&&"number"==typeof me.length)return{next:function(){return me&&Z>=me.length&&(me=void 0),{value:me&&me[Z++],done:!me}}};throw new TypeError(be?"Object is not iterable.":"Symbol.iterator is not defined.")}function V(me,be){var le="function"==typeof Symbol&&me[Symbol.iterator];if(!le)return me;var Oe,ke,Z=le.call(me),j=[];try{for(;(void 0===be||be-- >0)&&!(Oe=Z.next()).done;)j.push(Oe.value)}catch(Be){ke={error:Be}}finally{try{Oe&&!Oe.done&&(le=Z.return)&&le.call(Z)}finally{if(ke)throw ke.error}}return j}function ue(){for(var me=[],be=0;be<arguments.length;be++)me=me.concat(V(arguments[be]));return me}function he(){for(var me=0,be=0,le=arguments.length;be<le;be++)me+=arguments[be].length;var Z=Array(me),Oe=0;for(be=0;be<le;be++)for(var j=arguments[be],ke=0,Be=j.length;ke<Be;ke++,Oe++)Z[Oe]=j[ke];return Z}function ae(me,be,le){if(le||2===arguments.length)for(var j,Z=0,Oe=be.length;Z<Oe;Z++)(j||!(Z in be))&&(j||(j=Array.prototype.slice.call(be,0,Z)),j[Z]=be[Z]);return me.concat(j||Array.prototype.slice.call(be))}function X(me){return this instanceof X?(this.v=me,this):new X(me)}function ve(me,be,le){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var Oe,Z=le.apply(me,be||[]),j=[];return Oe={},ke("next"),ke("throw"),ke("return"),Oe[Symbol.asyncIterator]=function(){return this},Oe;function ke(tt){Z[tt]&&(Oe[tt]=function(Ne){return new Promise(function(wt,ft){j.push([tt,Ne,wt,ft])>1||Be(tt,Ne)})})}function Be(tt,Ne){try{!function nt(tt){tt.value instanceof X?Promise.resolve(tt.value.v).then(mt,ut):Ve(j[0][2],tt)}(Z[tt](Ne))}catch(wt){Ve(j[0][3],wt)}}function mt(tt){Be("next",tt)}function ut(tt){Be("throw",tt)}function Ve(tt,Ne){tt(Ne),j.shift(),j.length&&Be(j[0][0],j[0][1])}}function ye(me){var be,le;return be={},Z("next"),Z("throw",function(Oe){throw Oe}),Z("return"),be[Symbol.iterator]=function(){return this},be;function Z(Oe,j){be[Oe]=me[Oe]?function(ke){return(le=!le)?{value:X(me[Oe](ke)),done:"return"===Oe}:j?j(ke):ke}:j}}function ge(me){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var le,be=me[Symbol.asyncIterator];return be?be.call(me):(me=Y(me),le={},Z("next"),Z("throw"),Z("return"),le[Symbol.asyncIterator]=function(){return this},le);function Z(j){le[j]=me[j]&&function(ke){return new Promise(function(Be,nt){(function Oe(j,ke,Be,nt){Promise.resolve(nt).then(function(mt){j({value:mt,done:Be})},ke)})(Be,nt,(ke=me[j](ke)).done,ke.value)})}}}function ne(me,be){return Object.defineProperty?Object.defineProperty(me,"raw",{value:be}):me.raw=be,me}var pe=Object.create?function(me,be){Object.defineProperty(me,"default",{enumerable:!0,value:be})}:function(me,be){me.default=be};function Pe(me){if(me&&me.__esModule)return me;var be={};if(null!=me)for(var le in me)"default"!==le&&Object.prototype.hasOwnProperty.call(me,le)&&w(be,me,le);return pe(be,me),be}function xe(me){return me&&me.__esModule?me:{default:me}}function de(me,be,le,Z){if("a"===le&&!Z)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof be?me!==be||!Z:!be.has(me))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===le?Z:"a"===le?Z.call(me):Z?Z.value:be.get(me)}function re(me,be,le,Z,Oe){if("m"===Z)throw new TypeError("Private method is not writable");if("a"===Z&&!Oe)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof be?me!==be||!Oe:!be.has(me))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===Z?Oe.call(me,le):Oe?Oe.value=le:be.set(me,le),le}function oe(me,be){if(null===be||"object"!=typeof be&&"function"!=typeof be)throw new TypeError("Cannot use 'in' operator on non-object");return"function"==typeof me?be===me:me.has(be)}},37340:(qe,I,p)=>{"use strict";p.d(I,{EY:()=>ae,F4:()=>w,IO:()=>he,LC:()=>e,SB:()=>P,X$:()=>D,ZE:()=>ye,ZN:()=>ve,_j:()=>o,eR:()=>B,jt:()=>g,k1:()=>ge,l3:()=>l,oB:()=>n,pV:()=>V,vP:()=>T});class o{}class e{}const l="*";function D(ne,pe){return{type:7,name:ne,definitions:pe,options:{}}}function g(ne,pe=null){return{type:4,styles:pe,timings:ne}}function T(ne,pe=null){return{type:2,steps:ne,options:pe}}function n(ne){return{type:6,styles:ne,offset:null}}function P(ne,pe,Pe){return{type:0,name:ne,styles:pe,options:Pe}}function w(ne){return{type:5,steps:ne}}function B(ne,pe,Pe=null){return{type:1,expr:ne,animation:pe,options:Pe}}function V(ne=null){return{type:9,options:ne}}function he(ne,pe,Pe=null){return{type:11,selector:ne,animation:pe,options:Pe}}function ae(ne,pe){return{type:12,timings:ne,animation:pe}}function X(ne){Promise.resolve().then(ne)}class ve{constructor(pe=0,Pe=0){this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._originalOnDoneFns=[],this._originalOnStartFns=[],this._started=!1,this._destroyed=!1,this._finished=!1,this._position=0,this.parentPlayer=null,this.totalTime=pe+Pe}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(pe=>pe()),this._onDoneFns=[])}onStart(pe){this._originalOnStartFns.push(pe),this._onStartFns.push(pe)}onDone(pe){this._originalOnDoneFns.push(pe),this._onDoneFns.push(pe)}onDestroy(pe){this._onDestroyFns.push(pe)}hasStarted(){return this._started}init(){}play(){this.hasStarted()||(this._onStart(),this.triggerMicrotask()),this._started=!0}triggerMicrotask(){X(()=>this._onFinish())}_onStart(){this._onStartFns.forEach(pe=>pe()),this._onStartFns=[]}pause(){}restart(){}finish(){this._onFinish()}destroy(){this._destroyed||(this._destroyed=!0,this.hasStarted()||this._onStart(),this.finish(),this._onDestroyFns.forEach(pe=>pe()),this._onDestroyFns=[])}reset(){this._started=!1,this._finished=!1,this._onStartFns=this._originalOnStartFns,this._onDoneFns=this._originalOnDoneFns}setPosition(pe){this._position=this.totalTime?pe*this.totalTime:1}getPosition(){return this.totalTime?this._position/this.totalTime:1}triggerCallback(pe){const Pe="start"==pe?this._onStartFns:this._onDoneFns;Pe.forEach(xe=>xe()),Pe.length=0}}class ye{constructor(pe){this._onDoneFns=[],this._onStartFns=[],this._finished=!1,this._started=!1,this._destroyed=!1,this._onDestroyFns=[],this.parentPlayer=null,this.totalTime=0,this.players=pe;let Pe=0,xe=0,de=0;const re=this.players.length;0==re?X(()=>this._onFinish()):this.players.forEach(oe=>{oe.onDone(()=>{++Pe==re&&this._onFinish()}),oe.onDestroy(()=>{++xe==re&&this._onDestroy()}),oe.onStart(()=>{++de==re&&this._onStart()})}),this.totalTime=this.players.reduce((oe,me)=>Math.max(oe,me.totalTime),0)}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(pe=>pe()),this._onDoneFns=[])}init(){this.players.forEach(pe=>pe.init())}onStart(pe){this._onStartFns.push(pe)}_onStart(){this.hasStarted()||(this._started=!0,this._onStartFns.forEach(pe=>pe()),this._onStartFns=[])}onDone(pe){this._onDoneFns.push(pe)}onDestroy(pe){this._onDestroyFns.push(pe)}hasStarted(){return this._started}play(){this.parentPlayer||this.init(),this._onStart(),this.players.forEach(pe=>pe.play())}pause(){this.players.forEach(pe=>pe.pause())}restart(){this.players.forEach(pe=>pe.restart())}finish(){this._onFinish(),this.players.forEach(pe=>pe.finish())}destroy(){this._onDestroy()}_onDestroy(){this._destroyed||(this._destroyed=!0,this._onFinish(),this.players.forEach(pe=>pe.destroy()),this._onDestroyFns.forEach(pe=>pe()),this._onDestroyFns=[])}reset(){this.players.forEach(pe=>pe.reset()),this._destroyed=!1,this._finished=!1,this._started=!1}setPosition(pe){const Pe=pe*this.totalTime;this.players.forEach(xe=>{const de=xe.totalTime?Math.min(1,Pe/xe.totalTime):1;xe.setPosition(de)})}getPosition(){const pe=this.players.reduce((Pe,xe)=>null===Pe||xe.totalTime>Pe.totalTime?xe:Pe,null);return null!=pe?pe.getPosition():0}beforeDestroy(){this.players.forEach(pe=>{pe.beforeDestroy&&pe.beforeDestroy()})}triggerCallback(pe){const Pe="start"==pe?this._onStartFns:this._onDoneFns;Pe.forEach(xe=>xe()),Pe.length=0}}const ge="!"},12693:(qe,I,p)=>{"use strict";p.d(I,{rt:()=>hn,s1:()=>Ct,$s:()=>tt,kH:()=>pr,mK:()=>ui,Em:()=>rn,tE:()=>Nn,qm:()=>ai,Kd:()=>ct,X6:()=>An,yG:()=>vn});var o=p(36895),e=p(94650),l=p(83353),D=p(77579),g=p(50727),E=p(61135),T=p(39646),n=p(29521),P=p(18505),w=p(78372),B=p(39300),Y=p(54004),V=p(95698),ue=p(35684),he=p(71884),ae=p(82722),X=p(21281),ve=p(49643),ye=p(39841),ge=p(97272),ne=p(69751),pe=p(68675);class Pe{}Pe.\u0275fac=function(ce){return new(ce||Pe)},Pe.\u0275mod=e.oAB({type:Pe}),Pe.\u0275inj=e.cJS({});const xe=new Set;let de;class re{constructor(ce){this._platform=ce,this._matchMedia=this._platform.isBrowser&&window.matchMedia?window.matchMedia.bind(window):me}matchMedia(ce){return(this._platform.WEBKIT||this._platform.BLINK)&&function oe(Le){if(!xe.has(Le))try{de||(de=document.createElement("style"),de.setAttribute("type","text/css"),document.head.appendChild(de)),de.sheet&&(de.sheet.insertRule(`@media ${Le} {body{ }}`,0),xe.add(Le))}catch(ce){console.error(ce)}}(ce),this._matchMedia(ce)}}function me(Le){return{matches:"all"===Le||""===Le,media:Le,addListener:()=>{},removeListener:()=>{}}}re.\u0275fac=function(ce){return new(ce||re)(e.LFG(l.t4))},re.\u0275prov=e.Yz7({token:re,factory:re.\u0275fac,providedIn:"root"});class be{constructor(ce,we){this._mediaMatcher=ce,this._zone=we,this._queries=new Map,this._destroySubject=new D.x}ngOnDestroy(){this._destroySubject.next(),this._destroySubject.complete()}isMatched(ce){return le((0,X.Eq)(ce)).some(Qe=>this._registerQuery(Qe).mql.matches)}observe(ce){const Qe=le((0,X.Eq)(ce)).map(Tn=>this._registerQuery(Tn).observable);let qt=(0,ye.a)(Qe);return qt=(0,ge.z)(qt.pipe((0,V.q)(1)),qt.pipe((0,ue.T)(1),(0,w.b)(0))),qt.pipe((0,Y.U)(Tn=>{const lr={matches:!1,breakpoints:{}};return Tn.forEach(({matches:mo,query:rr})=>{lr.matches=lr.matches||mo,lr.breakpoints[rr]=mo}),lr}))}_registerQuery(ce){if(this._queries.has(ce))return this._queries.get(ce);const we=this._mediaMatcher.matchMedia(ce),qt={observable:new ne.y(Tn=>{const lr=mo=>this._zone.run(()=>Tn.next(mo));return we.addListener(lr),()=>{we.removeListener(lr)}}).pipe((0,pe.O)(we),(0,Y.U)(({matches:Tn})=>({query:ce,matches:Tn})),(0,ae.R)(this._destroySubject)),mql:we};return this._queries.set(ce,qt),qt}}function le(Le){return Le.map(ce=>ce.split(",")).reduce((ce,we)=>ce.concat(we)).map(ce=>ce.trim())}be.\u0275fac=function(ce){return new(ce||be)(e.LFG(re),e.LFG(e.R0b))},be.\u0275prov=e.Yz7({token:be,factory:be.\u0275fac,providedIn:"root"});const Oe=" ";function Be(Le,ce){return(Le.getAttribute(ce)||"").match(/\S+/g)||[]}const mt="cdk-describedby-message",ut="cdk-describedby-host";let Ve=0;class tt{constructor(ce,we){this._platform=we,this._messageRegistry=new Map,this._messagesContainer=null,this._id=""+Ve++,this._document=ce,this._id=(0,e.f3M)(e.AFp)+"-"+Ve++}describe(ce,we,Qe){if(!this._canBeDescribed(ce,we))return;const qt=Ne(we,Qe);"string"!=typeof we?(wt(we,this._id),this._messageRegistry.set(qt,{messageElement:we,referenceCount:0})):this._messageRegistry.has(qt)||this._createMessageElement(we,Qe),this._isElementDescribedByMessage(ce,qt)||this._addMessageReference(ce,qt)}removeDescription(ce,we,Qe){if(!we||!this._isElementNode(ce))return;const qt=Ne(we,Qe);if(this._isElementDescribedByMessage(ce,qt)&&this._removeMessageReference(ce,qt),"string"==typeof we){const Tn=this._messageRegistry.get(qt);Tn&&0===Tn.referenceCount&&this._deleteMessageElement(qt)}0===this._messagesContainer?.childNodes.length&&(this._messagesContainer.remove(),this._messagesContainer=null)}ngOnDestroy(){const ce=this._document.querySelectorAll(`[${ut}="${this._id}"]`);for(let we=0;we<ce.length;we++)this._removeCdkDescribedByReferenceIds(ce[we]),ce[we].removeAttribute(ut);this._messagesContainer?.remove(),this._messagesContainer=null,this._messageRegistry.clear()}_createMessageElement(ce,we){const Qe=this._document.createElement("div");wt(Qe,this._id),Qe.textContent=ce,we&&Qe.setAttribute("role",we),this._createMessagesContainer(),this._messagesContainer.appendChild(Qe),this._messageRegistry.set(Ne(ce,we),{messageElement:Qe,referenceCount:0})}_deleteMessageElement(ce){this._messageRegistry.get(ce)?.messageElement?.remove(),this._messageRegistry.delete(ce)}_createMessagesContainer(){if(this._messagesContainer)return;const ce="cdk-describedby-message-container",we=this._document.querySelectorAll(`.${ce}[platform="server"]`);for(let qt=0;qt<we.length;qt++)we[qt].remove();const Qe=this._document.createElement("div");Qe.style.visibility="hidden",Qe.classList.add(ce),Qe.classList.add("cdk-visually-hidden"),this._platform&&!this._platform.isBrowser&&Qe.setAttribute("platform","server"),this._document.body.appendChild(Qe),this._messagesContainer=Qe}_removeCdkDescribedByReferenceIds(ce){const we=Be(ce,"aria-describedby").filter(Qe=>0!=Qe.indexOf(mt));ce.setAttribute("aria-describedby",we.join(" "))}_addMessageReference(ce,we){const Qe=this._messageRegistry.get(we);(function j(Le,ce,we){const Qe=Be(Le,ce);Qe.some(qt=>qt.trim()==we.trim())||(Qe.push(we.trim()),Le.setAttribute(ce,Qe.join(Oe)))})(ce,"aria-describedby",Qe.messageElement.id),ce.setAttribute(ut,this._id),Qe.referenceCount++}_removeMessageReference(ce,we){const Qe=this._messageRegistry.get(we);Qe.referenceCount--,function ke(Le,ce,we){const qt=Be(Le,ce).filter(Tn=>Tn!=we.trim());qt.length?Le.setAttribute(ce,qt.join(Oe)):Le.removeAttribute(ce)}(ce,"aria-describedby",Qe.messageElement.id),ce.removeAttribute(ut)}_isElementDescribedByMessage(ce,we){const Qe=Be(ce,"aria-describedby"),qt=this._messageRegistry.get(we),Tn=qt&&qt.messageElement.id;return!!Tn&&-1!=Qe.indexOf(Tn)}_canBeDescribed(ce,we){if(!this._isElementNode(ce))return!1;if(we&&"object"==typeof we)return!0;const Qe=null==we?"":`${we}`.trim(),qt=ce.getAttribute("aria-label");return!!Qe&&(!qt||qt.trim()!==Qe)}_isElementNode(ce){return ce.nodeType===this._document.ELEMENT_NODE}}function Ne(Le,ce){return"string"==typeof Le?`${ce||""}/${Le}`:Le}function wt(Le,ce){Le.id||(Le.id=`${mt}-${ce}-${Ve++}`)}tt.\u0275fac=function(ce){return new(ce||tt)(e.LFG(o.K0),e.LFG(l.t4))},tt.\u0275prov=e.Yz7({token:tt,factory:tt.\u0275fac,providedIn:"root"});class ft{constructor(ce){this._items=ce,this._activeItemIndex=-1,this._activeItem=null,this._wrap=!1,this._letterKeyStream=new D.x,this._typeaheadSubscription=g.w0.EMPTY,this._vertical=!0,this._allowedModifierKeys=[],this._homeAndEnd=!1,this._pageUpAndDown={enabled:!1,delta:10},this._skipPredicateFn=we=>we.disabled,this._pressedLetters=[],this.tabOut=new D.x,this.change=new D.x,ce instanceof e.n_E&&(this._itemChangesSubscription=ce.changes.subscribe(we=>{if(this._activeItem){const qt=we.toArray().indexOf(this._activeItem);qt>-1&&qt!==this._activeItemIndex&&(this._activeItemIndex=qt)}}))}skipPredicate(ce){return this._skipPredicateFn=ce,this}withWrap(ce=!0){return this._wrap=ce,this}withVerticalOrientation(ce=!0){return this._vertical=ce,this}withHorizontalOrientation(ce){return this._horizontal=ce,this}withAllowedModifierKeys(ce){return this._allowedModifierKeys=ce,this}withTypeAhead(ce=200){return this._typeaheadSubscription.unsubscribe(),this._typeaheadSubscription=this._letterKeyStream.pipe((0,P.b)(we=>this._pressedLetters.push(we)),(0,w.b)(ce),(0,B.h)(()=>this._pressedLetters.length>0),(0,Y.U)(()=>this._pressedLetters.join(""))).subscribe(we=>{const Qe=this._getItemsArray();for(let qt=1;qt<Qe.length+1;qt++){const Tn=(this._activeItemIndex+qt)%Qe.length,lr=Qe[Tn];if(!this._skipPredicateFn(lr)&&0===lr.getLabel().toUpperCase().trim().indexOf(we)){this.setActiveItem(Tn);break}}this._pressedLetters=[]}),this}cancelTypeahead(){return this._pressedLetters=[],this}withHomeAndEnd(ce=!0){return this._homeAndEnd=ce,this}withPageUpDown(ce=!0,we=10){return this._pageUpAndDown={enabled:ce,delta:we},this}setActiveItem(ce){const we=this._activeItem;this.updateActiveItem(ce),this._activeItem!==we&&this.change.next(this._activeItemIndex)}onKeydown(ce){const we=ce.keyCode,qt=["altKey","ctrlKey","metaKey","shiftKey"].every(Tn=>!ce[Tn]||this._allowedModifierKeys.indexOf(Tn)>-1);switch(we){case n.Mf:return void this.tabOut.next();case n.JH:if(this._vertical&&qt){this.setNextItemActive();break}return;case n.LH:if(this._vertical&&qt){this.setPreviousItemActive();break}return;case n.SV:if(this._horizontal&&qt){"rtl"===this._horizontal?this.setPreviousItemActive():this.setNextItemActive();break}return;case n.oh:if(this._horizontal&&qt){"rtl"===this._horizontal?this.setNextItemActive():this.setPreviousItemActive();break}return;case n.Sd:if(this._homeAndEnd&&qt){this.setFirstItemActive();break}return;case n.uR:if(this._homeAndEnd&&qt){this.setLastItemActive();break}return;case n.Ku:if(this._pageUpAndDown.enabled&&qt){const Tn=this._activeItemIndex-this._pageUpAndDown.delta;this._setActiveItemByIndex(Tn>0?Tn:0,1);break}return;case n.VM:if(this._pageUpAndDown.enabled&&qt){const Tn=this._activeItemIndex+this._pageUpAndDown.delta,lr=this._getItemsArray().length;this._setActiveItemByIndex(Tn<lr?Tn:lr-1,-1);break}return;default:return void((qt||(0,n.Vb)(ce,"shiftKey"))&&(ce.key&&1===ce.key.length?this._letterKeyStream.next(ce.key.toLocaleUpperCase()):(we>=n.A&&we<=n.Z||we>=n.xE&&we<=n.aO)&&this._letterKeyStream.next(String.fromCharCode(we))))}this._pressedLetters=[],ce.preventDefault()}get activeItemIndex(){return this._activeItemIndex}get activeItem(){return this._activeItem}isTyping(){return this._pressedLetters.length>0}setFirstItemActive(){this._setActiveItemByIndex(0,1)}setLastItemActive(){this._setActiveItemByIndex(this._items.length-1,-1)}setNextItemActive(){this._activeItemIndex<0?this.setFirstItemActive():this._setActiveItemByDelta(1)}setPreviousItemActive(){this._activeItemIndex<0&&this._wrap?this.setLastItemActive():this._setActiveItemByDelta(-1)}updateActiveItem(ce){const we=this._getItemsArray(),Qe="number"==typeof ce?ce:we.indexOf(ce),qt=we[Qe];this._activeItem=qt??null,this._activeItemIndex=Qe}destroy(){this._typeaheadSubscription.unsubscribe(),this._itemChangesSubscription?.unsubscribe(),this._letterKeyStream.complete(),this.tabOut.complete(),this.change.complete(),this._pressedLetters=[]}_setActiveItemByDelta(ce){this._wrap?this._setActiveInWrapMode(ce):this._setActiveInDefaultMode(ce)}_setActiveInWrapMode(ce){const we=this._getItemsArray();for(let Qe=1;Qe<=we.length;Qe++){const qt=(this._activeItemIndex+ce*Qe+we.length)%we.length,Tn=we[qt];if(!this._skipPredicateFn(Tn))return void this.setActiveItem(qt)}}_setActiveInDefaultMode(ce){this._setActiveItemByIndex(this._activeItemIndex+ce,ce)}_setActiveItemByIndex(ce,we){const Qe=this._getItemsArray();if(Qe[ce]){for(;this._skipPredicateFn(Qe[ce]);)if(!Qe[ce+=we])return;this.setActiveItem(ce)}}_getItemsArray(){return this._items instanceof e.n_E?this._items.toArray():this._items}}class Ct extends ft{setActiveItem(ce){this.activeItem&&this.activeItem.setInactiveStyles(),super.setActiveItem(ce),this.activeItem&&this.activeItem.setActiveStyles()}}class rn extends ft{constructor(){super(...arguments),this._origin="program"}setFocusOrigin(ce){return this._origin=ce,this}setActiveItem(ce){super.setActiveItem(ce),this.activeItem&&this.activeItem.focus(this._origin)}}class st{constructor(ce){this._platform=ce}isDisabled(ce){return ce.hasAttribute("disabled")}isVisible(ce){return function Dn(Le){return!!(Le.offsetWidth||Le.offsetHeight||"function"==typeof Le.getClientRects&&Le.getClientRects().length)}(ce)&&"visible"===getComputedStyle(ce).visibility}isTabbable(ce){if(!this._platform.isBrowser)return!1;const we=function nn(Le){try{return Le.frameElement}catch{return null}}(function Bt(Le){return Le.ownerDocument&&Le.ownerDocument.defaultView||window}(ce));if(we&&(-1===kn(we)||!this.isVisible(we)))return!1;let Qe=ce.nodeName.toLowerCase(),qt=kn(ce);return ce.hasAttribute("contenteditable")?-1!==qt:!("iframe"===Qe||"object"===Qe||this._platform.WEBKIT&&this._platform.IOS&&!function On(Le){let ce=Le.nodeName.toLowerCase(),we="input"===ce&&Le.type;return"text"===we||"password"===we||"select"===ce||"textarea"===ce}(ce))&&("audio"===Qe?!!ce.hasAttribute("controls")&&-1!==qt:"video"===Qe?-1!==qt&&(null!==qt||(this._platform.FIREFOX||ce.hasAttribute("controls"))):ce.tabIndex>=0)}isFocusable(ce,we){return function je(Le){return!function vi(Le){return function mi(Le){return"input"==Le.nodeName.toLowerCase()}(Le)&&"hidden"==Le.type}(Le)&&(function Mn(Le){let ce=Le.nodeName.toLowerCase();return"input"===ce||"select"===ce||"button"===ce||"textarea"===ce}(Le)||function Gi(Le){return function wi(Le){return"a"==Le.nodeName.toLowerCase()}(Le)&&Le.hasAttribute("href")}(Le)||Le.hasAttribute("contenteditable")||Bn(Le))}(ce)&&!this.isDisabled(ce)&&(we?.ignoreVisibility||this.isVisible(ce))}}function Bn(Le){if(!Le.hasAttribute("tabindex")||void 0===Le.tabIndex)return!1;let ce=Le.getAttribute("tabindex");return!(!ce||isNaN(parseInt(ce,10)))}function kn(Le){if(!Bn(Le))return null;const ce=parseInt(Le.getAttribute("tabindex")||"",10);return isNaN(ce)?-1:ce}st.\u0275fac=function(ce){return new(ce||st)(e.LFG(l.t4))},st.\u0275prov=e.Yz7({token:st,factory:st.\u0275fac,providedIn:"root"});class xn{get enabled(){return this._enabled}set enabled(ce){this._enabled=ce,this._startAnchor&&this._endAnchor&&(this._toggleAnchorTabIndex(ce,this._startAnchor),this._toggleAnchorTabIndex(ce,this._endAnchor))}constructor(ce,we,Qe,qt,Tn=!1){this._element=ce,this._checker=we,this._ngZone=Qe,this._document=qt,this._hasAttached=!1,this.startAnchorListener=()=>this.focusLastTabbableElement(),this.endAnchorListener=()=>this.focusFirstTabbableElement(),this._enabled=!0,Tn||this.attachAnchors()}destroy(){const ce=this._startAnchor,we=this._endAnchor;ce&&(ce.removeEventListener("focus",this.startAnchorListener),ce.remove()),we&&(we.removeEventListener("focus",this.endAnchorListener),we.remove()),this._startAnchor=this._endAnchor=null,this._hasAttached=!1}attachAnchors(){return!!this._hasAttached||(this._ngZone.runOutsideAngular(()=>{this._startAnchor||(this._startAnchor=this._createAnchor(),this._startAnchor.addEventListener("focus",this.startAnchorListener)),this._endAnchor||(this._endAnchor=this._createAnchor(),this._endAnchor.addEventListener("focus",this.endAnchorListener))}),this._element.parentNode&&(this._element.parentNode.insertBefore(this._startAnchor,this._element),this._element.parentNode.insertBefore(this._endAnchor,this._element.nextSibling),this._hasAttached=!0),this._hasAttached)}focusInitialElementWhenReady(ce){return new Promise(we=>{this._executeOnStable(()=>we(this.focusInitialElement(ce)))})}focusFirstTabbableElementWhenReady(ce){return new Promise(we=>{this._executeOnStable(()=>we(this.focusFirstTabbableElement(ce)))})}focusLastTabbableElementWhenReady(ce){return new Promise(we=>{this._executeOnStable(()=>we(this.focusLastTabbableElement(ce)))})}_getRegionBoundary(ce){const we=this._element.querySelectorAll(`[cdk-focus-region-${ce}], [cdkFocusRegion${ce}], [cdk-focus-${ce}]`);return"start"==ce?we.length?we[0]:this._getFirstTabbableElement(this._element):we.length?we[we.length-1]:this._getLastTabbableElement(this._element)}focusInitialElement(ce){const we=this._element.querySelector("[cdk-focus-initial], [cdkFocusInitial]");if(we){if(!this._checker.isFocusable(we)){const Qe=this._getFirstTabbableElement(we);return Qe?.focus(ce),!!Qe}return we.focus(ce),!0}return this.focusFirstTabbableElement(ce)}focusFirstTabbableElement(ce){const we=this._getRegionBoundary("start");return we&&we.focus(ce),!!we}focusLastTabbableElement(ce){const we=this._getRegionBoundary("end");return we&&we.focus(ce),!!we}hasAttached(){return this._hasAttached}_getFirstTabbableElement(ce){if(this._checker.isFocusable(ce)&&this._checker.isTabbable(ce))return ce;const we=ce.children;for(let Qe=0;Qe<we.length;Qe++){const qt=we[Qe].nodeType===this._document.ELEMENT_NODE?this._getFirstTabbableElement(we[Qe]):null;if(qt)return qt}return null}_getLastTabbableElement(ce){if(this._checker.isFocusable(ce)&&this._checker.isTabbable(ce))return ce;const we=ce.children;for(let Qe=we.length-1;Qe>=0;Qe--){const qt=we[Qe].nodeType===this._document.ELEMENT_NODE?this._getLastTabbableElement(we[Qe]):null;if(qt)return qt}return null}_createAnchor(){const ce=this._document.createElement("div");return this._toggleAnchorTabIndex(this._enabled,ce),ce.classList.add("cdk-visually-hidden"),ce.classList.add("cdk-focus-trap-anchor"),ce.setAttribute("aria-hidden","true"),ce}_toggleAnchorTabIndex(ce,we){ce?we.setAttribute("tabindex","0"):we.removeAttribute("tabindex")}toggleAnchors(ce){this._startAnchor&&this._endAnchor&&(this._toggleAnchorTabIndex(ce,this._startAnchor),this._toggleAnchorTabIndex(ce,this._endAnchor))}_executeOnStable(ce){this._ngZone.isStable?ce():this._ngZone.onStable.pipe((0,V.q)(1)).subscribe(ce)}}class Fn{constructor(ce,we,Qe){this._checker=ce,this._ngZone=we,this._document=Qe}create(ce,we=!1){return new xn(ce,this._checker,this._ngZone,this._document,we)}}Fn.\u0275fac=function(ce){return new(ce||Fn)(e.LFG(st),e.LFG(e.R0b),e.LFG(o.K0))},Fn.\u0275prov=e.Yz7({token:Fn,factory:Fn.\u0275fac,providedIn:"root"});class ui{get enabled(){return this.focusTrap.enabled}set enabled(ce){this.focusTrap.enabled=(0,X.Ig)(ce)}get autoCapture(){return this._autoCapture}set autoCapture(ce){this._autoCapture=(0,X.Ig)(ce)}constructor(ce,we,Qe){this._elementRef=ce,this._focusTrapFactory=we,this._previouslyFocusedElement=null,this.focusTrap=this._focusTrapFactory.create(this._elementRef.nativeElement,!0)}ngOnDestroy(){this.focusTrap.destroy(),this._previouslyFocusedElement&&(this._previouslyFocusedElement.focus(),this._previouslyFocusedElement=null)}ngAfterContentInit(){this.focusTrap.attachAnchors(),this.autoCapture&&this._captureFocus()}ngDoCheck(){this.focusTrap.hasAttached()||this.focusTrap.attachAnchors()}ngOnChanges(ce){const we=ce.autoCapture;we&&!we.firstChange&&this.autoCapture&&this.focusTrap.hasAttached()&&this._captureFocus()}_captureFocus(){this._previouslyFocusedElement=(0,l.ht)(),this.focusTrap.focusInitialElementWhenReady()}}ui.\u0275fac=function(ce){return new(ce||ui)(e.Y36(e.SBq),e.Y36(Fn),e.Y36(o.K0))},ui.\u0275dir=e.lG2({type:ui,selectors:[["","cdkTrapFocus",""]],inputs:{enabled:["cdkTrapFocus","enabled"],autoCapture:["cdkTrapFocusAutoCapture","autoCapture"]},exportAs:["cdkTrapFocus"],features:[e.TTD]});class Ai extends xn{get enabled(){return this._enabled}set enabled(ce){this._enabled=ce,this._enabled?this._focusTrapManager.register(this):this._focusTrapManager.deregister(this)}constructor(ce,we,Qe,qt,Tn,lr,mo){super(ce,we,Qe,qt,mo.defer),this._focusTrapManager=Tn,this._inertStrategy=lr,this._focusTrapManager.register(this)}destroy(){this._focusTrapManager.deregister(this),super.destroy()}_enable(){this._inertStrategy.preventFocus(this),this.toggleAnchors(!0)}_disable(){this._inertStrategy.allowFocus(this),this.toggleAnchors(!1)}}const si=new e.OlP("FOCUS_TRAP_INERT_STRATEGY");class Vi{constructor(){this._listener=null}preventFocus(ce){this._listener&&ce._document.removeEventListener("focus",this._listener,!0),this._listener=we=>this._trapFocus(ce,we),ce._ngZone.runOutsideAngular(()=>{ce._document.addEventListener("focus",this._listener,!0)})}allowFocus(ce){this._listener&&(ce._document.removeEventListener("focus",this._listener,!0),this._listener=null)}_trapFocus(ce,we){const Qe=we.target,qt=ce._element;Qe&&!qt.contains(Qe)&&!Qe.closest?.("div.cdk-overlay-pane")&&setTimeout(()=>{ce.enabled&&!qt.contains(ce._document.activeElement)&&ce.focusFirstTabbableElement()})}}class Vn{constructor(){this._focusTrapStack=[]}register(ce){this._focusTrapStack=this._focusTrapStack.filter(Qe=>Qe!==ce);let we=this._focusTrapStack;we.length&&we[we.length-1]._disable(),we.push(ce),ce._enable()}deregister(ce){ce._disable();const we=this._focusTrapStack,Qe=we.indexOf(ce);-1!==Qe&&(we.splice(Qe,1),we.length&&we[we.length-1]._enable())}}Vn.\u0275fac=function(ce){return new(ce||Vn)},Vn.\u0275prov=e.Yz7({token:Vn,factory:Vn.\u0275fac,providedIn:"root"});class Hn{constructor(ce,we,Qe,qt,Tn){this._checker=ce,this._ngZone=we,this._focusTrapManager=Qe,this._document=qt,this._inertStrategy=Tn||new Vi}create(ce,we={defer:!1}){let Qe;return Qe="boolean"==typeof we?{defer:we}:we,new Ai(ce,this._checker,this._ngZone,this._document,this._focusTrapManager,this._inertStrategy,Qe)}}function An(Le){return 0===Le.buttons||0===Le.offsetX&&0===Le.offsetY}function vn(Le){const ce=Le.touches&&Le.touches[0]||Le.changedTouches&&Le.changedTouches[0];return!(!ce||-1!==ce.identifier||null!=ce.radiusX&&1!==ce.radiusX||null!=ce.radiusY&&1!==ce.radiusY)}Hn.\u0275fac=function(ce){return new(ce||Hn)(e.LFG(st),e.LFG(e.R0b),e.LFG(Vn),e.LFG(o.K0),e.LFG(si,8))},Hn.\u0275prov=e.Yz7({token:Hn,factory:Hn.\u0275fac,providedIn:"root"});const In=new e.OlP("cdk-input-modality-detector-options"),Zi={ignoreKeys:[n.zL,n.jx,n.b2,n.MW,n.JU]},Hi=(0,l.i$)({passive:!0,capture:!0});class Gr{get mostRecentModality(){return this._modality.value}constructor(ce,we,Qe,qt){this._platform=ce,this._mostRecentTarget=null,this._modality=new E.X(null),this._lastTouchMs=0,this._onKeydown=Tn=>{this._options?.ignoreKeys?.some(lr=>lr===Tn.keyCode)||(this._modality.next("keyboard"),this._mostRecentTarget=(0,l.sA)(Tn))},this._onMousedown=Tn=>{Date.now()-this._lastTouchMs<650||(this._modality.next(An(Tn)?"keyboard":"mouse"),this._mostRecentTarget=(0,l.sA)(Tn))},this._onTouchstart=Tn=>{vn(Tn)?this._modality.next("keyboard"):(this._lastTouchMs=Date.now(),this._modality.next("touch"),this._mostRecentTarget=(0,l.sA)(Tn))},this._options={...Zi,...qt},this.modalityDetected=this._modality.pipe((0,ue.T)(1)),this.modalityChanged=this.modalityDetected.pipe((0,he.x)()),ce.isBrowser&&we.runOutsideAngular(()=>{Qe.addEventListener("keydown",this._onKeydown,Hi),Qe.addEventListener("mousedown",this._onMousedown,Hi),Qe.addEventListener("touchstart",this._onTouchstart,Hi)})}ngOnDestroy(){this._modality.complete(),this._platform.isBrowser&&(document.removeEventListener("keydown",this._onKeydown,Hi),document.removeEventListener("mousedown",this._onMousedown,Hi),document.removeEventListener("touchstart",this._onTouchstart,Hi))}}Gr.\u0275fac=function(ce){return new(ce||Gr)(e.LFG(l.t4),e.LFG(e.R0b),e.LFG(o.K0),e.LFG(In,8))},Gr.\u0275prov=e.Yz7({token:Gr,factory:Gr.\u0275fac,providedIn:"root"});const zr=new e.OlP("liveAnnouncerElement",{providedIn:"root",factory:function Eo(){return null}});const mr=new e.OlP("LIVE_ANNOUNCER_DEFAULT_OPTIONS");let jn=0;class ct{constructor(ce,we,Qe,qt){this._ngZone=we,this._defaultOptions=qt,this._document=Qe,this._liveElement=ce||this._createLiveElement()}announce(ce,...we){const Qe=this._defaultOptions;let qt,Tn;return 1===we.length&&"number"==typeof we[0]?Tn=we[0]:[qt,Tn]=we,this.clear(),clearTimeout(this._previousTimeout),qt||(qt=Qe&&Qe.politeness?Qe.politeness:"polite"),null==Tn&&Qe&&(Tn=Qe.duration),this._liveElement.setAttribute("aria-live",qt),this._liveElement.id&&this._exposeAnnouncerToModals(this._liveElement.id),this._ngZone.runOutsideAngular(()=>(this._currentPromise||(this._currentPromise=new Promise(lr=>this._currentResolve=lr)),clearTimeout(this._previousTimeout),this._previousTimeout=setTimeout(()=>{this._liveElement.textContent=ce,"number"==typeof Tn&&(this._previousTimeout=setTimeout(()=>this.clear(),Tn)),this._currentResolve(),this._currentPromise=this._currentResolve=void 0},100),this._currentPromise))}clear(){this._liveElement&&(this._liveElement.textContent="")}ngOnDestroy(){clearTimeout(this._previousTimeout),this._liveElement?.remove(),this._liveElement=null,this._currentResolve?.(),this._currentPromise=this._currentResolve=void 0}_createLiveElement(){const ce="cdk-live-announcer-element",we=this._document.getElementsByClassName(ce),Qe=this._document.createElement("div");for(let qt=0;qt<we.length;qt++)we[qt].remove();return Qe.classList.add(ce),Qe.classList.add("cdk-visually-hidden"),Qe.setAttribute("aria-atomic","true"),Qe.setAttribute("aria-live","polite"),Qe.id="cdk-live-announcer-"+jn++,this._document.body.appendChild(Qe),Qe}_exposeAnnouncerToModals(ce){const we=this._document.querySelectorAll('body > .cdk-overlay-container [aria-modal="true"]');for(let Qe=0;Qe<we.length;Qe++){const qt=we[Qe],Tn=qt.getAttribute("aria-owns");Tn?-1===Tn.indexOf(ce)&&qt.setAttribute("aria-owns",Tn+" "+ce):qt.setAttribute("aria-owns",ce)}}}ct.\u0275fac=function(ce){return new(ce||ct)(e.LFG(zr,8),e.LFG(e.R0b),e.LFG(o.K0),e.LFG(mr,8))},ct.\u0275prov=e.Yz7({token:ct,factory:ct.\u0275fac,providedIn:"root"});class Yt{get politeness(){return this._politeness}set politeness(ce){this._politeness="off"===ce||"assertive"===ce?ce:"polite","off"===this._politeness?this._subscription&&(this._subscription.unsubscribe(),this._subscription=null):this._subscription||(this._subscription=this._ngZone.runOutsideAngular(()=>this._contentObserver.observe(this._elementRef).subscribe(()=>{const we=this._elementRef.nativeElement.textContent;we!==this._previousAnnouncedText&&(this._liveAnnouncer.announce(we,this._politeness,this.duration),this._previousAnnouncedText=we)})))}constructor(ce,we,Qe,qt){this._elementRef=ce,this._liveAnnouncer=we,this._contentObserver=Qe,this._ngZone=qt,this._politeness="polite"}ngOnDestroy(){this._subscription&&this._subscription.unsubscribe()}}Yt.\u0275fac=function(ce){return new(ce||Yt)(e.Y36(e.SBq),e.Y36(ct),e.Y36(ve.yq),e.Y36(e.R0b))},Yt.\u0275dir=e.lG2({type:Yt,selectors:[["","cdkAriaLive",""]],inputs:{politeness:["cdkAriaLive","politeness"],duration:["cdkAriaLiveDuration","duration"]},exportAs:["cdkAriaLive"]});const oi=new e.OlP("cdk-focus-monitor-default-options"),Ni=(0,l.i$)({passive:!0,capture:!0});class Nn{constructor(ce,we,Qe,qt,Tn){this._ngZone=ce,this._platform=we,this._inputModalityDetector=Qe,this._origin=null,this._windowFocused=!1,this._originFromTouchInteraction=!1,this._elementInfo=new Map,this._monitoredElementCount=0,this._rootNodeFocusListenerCount=new Map,this._windowFocusListener=()=>{this._windowFocused=!0,this._windowFocusTimeoutId=window.setTimeout(()=>this._windowFocused=!1)},this._stopInputModalityDetector=new D.x,this._rootNodeFocusAndBlurListener=lr=>{for(let rr=(0,l.sA)(lr);rr;rr=rr.parentElement)"focus"===lr.type?this._onFocus(lr,rr):this._onBlur(lr,rr)},this._document=qt,this._detectionMode=Tn?.detectionMode||0}monitor(ce,we=!1){const Qe=(0,X.fI)(ce);if(!this._platform.isBrowser||1!==Qe.nodeType)return(0,T.of)(null);const qt=(0,l.kV)(Qe)||this._getDocument(),Tn=this._elementInfo.get(Qe);if(Tn)return we&&(Tn.checkChildren=!0),Tn.subject;const lr={checkChildren:we,subject:new D.x,rootNode:qt};return this._elementInfo.set(Qe,lr),this._registerGlobalListeners(lr),lr.subject}stopMonitoring(ce){const we=(0,X.fI)(ce),Qe=this._elementInfo.get(we);Qe&&(Qe.subject.complete(),this._setClasses(we),this._elementInfo.delete(we),this._removeGlobalListeners(Qe))}focusVia(ce,we,Qe){const qt=(0,X.fI)(ce);qt===this._getDocument().activeElement?this._getClosestElementsInfo(qt).forEach(([lr,mo])=>this._originChanged(lr,we,mo)):(this._setOrigin(we),"function"==typeof qt.focus&&qt.focus(Qe))}ngOnDestroy(){this._elementInfo.forEach((ce,we)=>this.stopMonitoring(we))}_getDocument(){return this._document||document}_getWindow(){return this._getDocument().defaultView||window}_getFocusOrigin(ce){return this._origin?this._originFromTouchInteraction?this._shouldBeAttributedToTouch(ce)?"touch":"program":this._origin:this._windowFocused&&this._lastFocusOrigin?this._lastFocusOrigin:ce&&this._isLastInteractionFromInputLabel(ce)?"mouse":"program"}_shouldBeAttributedToTouch(ce){return 1===this._detectionMode||!!ce?.contains(this._inputModalityDetector._mostRecentTarget)}_setClasses(ce,we){ce.classList.toggle("cdk-focused",!!we),ce.classList.toggle("cdk-touch-focused","touch"===we),ce.classList.toggle("cdk-keyboard-focused","keyboard"===we),ce.classList.toggle("cdk-mouse-focused","mouse"===we),ce.classList.toggle("cdk-program-focused","program"===we)}_setOrigin(ce,we=!1){this._ngZone.runOutsideAngular(()=>{if(this._origin=ce,this._originFromTouchInteraction="touch"===ce&&we,0===this._detectionMode){clearTimeout(this._originTimeoutId);const Qe=this._originFromTouchInteraction?650:1;this._originTimeoutId=setTimeout(()=>this._origin=null,Qe)}})}_onFocus(ce,we){const Qe=this._elementInfo.get(we),qt=(0,l.sA)(ce);!Qe||!Qe.checkChildren&&we!==qt||this._originChanged(we,this._getFocusOrigin(qt),Qe)}_onBlur(ce,we){const Qe=this._elementInfo.get(we);!Qe||Qe.checkChildren&&ce.relatedTarget instanceof Node&&we.contains(ce.relatedTarget)||(this._setClasses(we),this._emitOrigin(Qe,null))}_emitOrigin(ce,we){ce.subject.observers.length&&this._ngZone.run(()=>ce.subject.next(we))}_registerGlobalListeners(ce){if(!this._platform.isBrowser)return;const we=ce.rootNode,Qe=this._rootNodeFocusListenerCount.get(we)||0;Qe||this._ngZone.runOutsideAngular(()=>{we.addEventListener("focus",this._rootNodeFocusAndBlurListener,Ni),we.addEventListener("blur",this._rootNodeFocusAndBlurListener,Ni)}),this._rootNodeFocusListenerCount.set(we,Qe+1),1==++this._monitoredElementCount&&(this._ngZone.runOutsideAngular(()=>{this._getWindow().addEventListener("focus",this._windowFocusListener)}),this._inputModalityDetector.modalityDetected.pipe((0,ae.R)(this._stopInputModalityDetector)).subscribe(qt=>{this._setOrigin(qt,!0)}))}_removeGlobalListeners(ce){const we=ce.rootNode;if(this._rootNodeFocusListenerCount.has(we)){const Qe=this._rootNodeFocusListenerCount.get(we);Qe>1?this._rootNodeFocusListenerCount.set(we,Qe-1):(we.removeEventListener("focus",this._rootNodeFocusAndBlurListener,Ni),we.removeEventListener("blur",this._rootNodeFocusAndBlurListener,Ni),this._rootNodeFocusListenerCount.delete(we))}--this._monitoredElementCount||(this._getWindow().removeEventListener("focus",this._windowFocusListener),this._stopInputModalityDetector.next(),clearTimeout(this._windowFocusTimeoutId),clearTimeout(this._originTimeoutId))}_originChanged(ce,we,Qe){this._setClasses(ce,we),this._emitOrigin(Qe,we),this._lastFocusOrigin=we}_getClosestElementsInfo(ce){const we=[];return this._elementInfo.forEach((Qe,qt)=>{(qt===ce||Qe.checkChildren&&qt.contains(ce))&&we.push([qt,Qe])}),we}_isLastInteractionFromInputLabel(ce){const{_mostRecentTarget:we,mostRecentModality:Qe}=this._inputModalityDetector;if("mouse"!==Qe||!we||we===ce||"INPUT"!==ce.nodeName&&"TEXTAREA"!==ce.nodeName||ce.disabled)return!1;const qt=ce.labels;if(qt)for(let Tn=0;Tn<qt.length;Tn++)if(qt[Tn].contains(we))return!0;return!1}}Nn.\u0275fac=function(ce){return new(ce||Nn)(e.LFG(e.R0b),e.LFG(l.t4),e.LFG(Gr),e.LFG(o.K0,8),e.LFG(oi,8))},Nn.\u0275prov=e.Yz7({token:Nn,factory:Nn.\u0275fac,providedIn:"root"});class pr{constructor(ce,we){this._elementRef=ce,this._focusMonitor=we,this._focusOrigin=null,this.cdkFocusChange=new e.vpe}get focusOrigin(){return this._focusOrigin}ngAfterViewInit(){const ce=this._elementRef.nativeElement;this._monitorSubscription=this._focusMonitor.monitor(ce,1===ce.nodeType&&ce.hasAttribute("cdkMonitorSubtreeFocus")).subscribe(we=>{this._focusOrigin=we,this.cdkFocusChange.emit(we)})}ngOnDestroy(){this._focusMonitor.stopMonitoring(this._elementRef),this._monitorSubscription&&this._monitorSubscription.unsubscribe()}}pr.\u0275fac=function(ce){return new(ce||pr)(e.Y36(e.SBq),e.Y36(Nn))},pr.\u0275dir=e.lG2({type:pr,selectors:[["","cdkMonitorElementFocus",""],["","cdkMonitorSubtreeFocus",""]],outputs:{cdkFocusChange:"cdkFocusChange"},exportAs:["cdkMonitorFocus"]});const Sn="cdk-high-contrast-black-on-white",Pn="cdk-high-contrast-white-on-black",Nt="cdk-high-contrast-active";class ai{constructor(ce,we){this._platform=ce,this._document=we,this._breakpointSubscription=(0,e.f3M)(be).observe("(forced-colors: active)").subscribe(()=>{this._hasCheckedHighContrastMode&&(this._hasCheckedHighContrastMode=!1,this._applyBodyHighContrastModeCssClasses())})}getHighContrastMode(){if(!this._platform.isBrowser)return 0;const ce=this._document.createElement("div");ce.style.backgroundColor="rgb(1,2,3)",ce.style.position="absolute",this._document.body.appendChild(ce);const we=this._document.defaultView||window,Qe=we&&we.getComputedStyle?we.getComputedStyle(ce):null,qt=(Qe&&Qe.backgroundColor||"").replace(/ /g,"");switch(ce.remove(),qt){case"rgb(0,0,0)":case"rgb(45,50,54)":case"rgb(32,32,32)":return 2;case"rgb(255,255,255)":case"rgb(255,250,239)":return 1}return 0}ngOnDestroy(){this._breakpointSubscription.unsubscribe()}_applyBodyHighContrastModeCssClasses(){if(!this._hasCheckedHighContrastMode&&this._platform.isBrowser&&this._document.body){const ce=this._document.body.classList;ce.remove(Nt,Sn,Pn),this._hasCheckedHighContrastMode=!0;const we=this.getHighContrastMode();1===we?ce.add(Nt,Sn):2===we&&ce.add(Nt,Pn)}}}ai.\u0275fac=function(ce){return new(ce||ai)(e.LFG(l.t4),e.LFG(o.K0))},ai.\u0275prov=e.Yz7({token:ai,factory:ai.\u0275fac,providedIn:"root"});class hn{constructor(ce){ce._applyBodyHighContrastModeCssClasses()}}hn.\u0275fac=function(ce){return new(ce||hn)(e.LFG(ai))},hn.\u0275mod=e.oAB({type:hn}),hn.\u0275inj=e.cJS({imports:[ve.Q8]})},40445:(qe,I,p)=>{"use strict";p.d(I,{Is:()=>T,vT:()=>P});var o=p(94650),e=p(36895);const l=new o.OlP("cdk-dir-doc",{providedIn:"root",factory:function D(){return(0,o.f3M)(e.K0)}});const g=/^(ar|ckb|dv|he|iw|fa|nqo|ps|sd|ug|ur|yi|.*[-_](Adlm|Arab|Hebr|Nkoo|Rohg|Thaa))(?!.*[-_](Latn|Cyrl)($|-|_))($|-|_)/i;function E(w){const B=w?.toLowerCase()||"";return"auto"===B&&typeof navigator<"u"&&navigator?.language?g.test(navigator.language)?"rtl":"ltr":"rtl"===B?"rtl":"ltr"}class T{constructor(B){if(this.value="ltr",this.change=new o.vpe,B){const Y=B.body?B.body.dir:null,V=B.documentElement?B.documentElement.dir:null;this.value=E(Y||V||"ltr")}}ngOnDestroy(){this.change.complete()}}T.\u0275fac=function(B){return new(B||T)(o.LFG(l,8))},T.\u0275prov=o.Yz7({token:T,factory:T.\u0275fac,providedIn:"root"});class n{constructor(){this._dir="ltr",this._isInitialized=!1,this.change=new o.vpe}get dir(){return this._dir}set dir(B){const Y=this._dir;this._dir=E(B),this._rawDir=B,Y!==this._dir&&this._isInitialized&&this.change.emit(this._dir)}get value(){return this.dir}ngAfterContentInit(){this._isInitialized=!0}ngOnDestroy(){this.change.complete()}}n.\u0275fac=function(B){return new(B||n)},n.\u0275dir=o.lG2({type:n,selectors:[["","dir",""]],hostVars:1,hostBindings:function(B,Y){2&B&&o.uIk("dir",Y._rawDir)},inputs:{dir:"dir"},outputs:{change:"dirChange"},exportAs:["dir"],features:[o._Bn([{provide:T,useExisting:n}])]});class P{}P.\u0275fac=function(B){return new(B||P)},P.\u0275mod=o.oAB({type:P}),P.\u0275inj=o.cJS({})},21281:(qe,I,p)=>{"use strict";p.d(I,{Eq:()=>g,HM:()=>E,Ig:()=>e,du:()=>n,fI:()=>T,su:()=>l,t6:()=>D});var o=p(94650);function e(P){return null!=P&&"false"!=`${P}`}function l(P,w=0){return D(P)?Number(P):w}function D(P){return!isNaN(parseFloat(P))&&!isNaN(Number(P))}function g(P){return Array.isArray(P)?P:[P]}function E(P){return null==P?"":"string"==typeof P?P:`${P}px`}function T(P){return P instanceof o.SBq?P.nativeElement:P}function n(P,w=/\s+/){const B=[];if(null!=P){const Y=Array.isArray(P)?P:`${P}`.split(w);for(const V of Y){const ue=`${V}`.trim();ue&&B.push(ue)}}return B}},95017:(qe,I,p)=>{"use strict";p.d(I,{A8:()=>V,Ov:()=>B,P3:()=>n,Z9:()=>T,eX:()=>w,k:()=>ue,o2:()=>E,yy:()=>P});var o=p(94033),e=p(45191),l=p(39646),D=p(77579),g=p(94650);class E{}function T(he){return he&&"function"==typeof he.connect&&!(he instanceof o.c)}class n extends E{constructor(ae){super(),this._data=ae}connect(){return(0,e.b)(this._data)?this._data:(0,l.of)(this._data)}disconnect(){}}class P{applyChanges(ae,X,ve,ye,ge){ae.forEachOperation((ne,pe,Pe)=>{let xe,de;if(null==ne.previousIndex){const re=ve(ne,pe,Pe);xe=X.createEmbeddedView(re.templateRef,re.context,re.index),de=1}else null==Pe?(X.remove(pe),de=3):(xe=X.get(pe),X.move(xe,Pe),de=2);ge&&ge({context:xe?.context,operation:de,record:ne})})}detach(){}}class w{constructor(){this.viewCacheSize=20,this._viewCache=[]}applyChanges(ae,X,ve,ye,ge){ae.forEachOperation((ne,pe,Pe)=>{let xe,de;if(null==ne.previousIndex){const re=()=>ve(ne,pe,Pe);xe=this._insertView(re,Pe,X,ye(ne)),de=xe?1:0}else null==Pe?(this._detachAndCacheView(pe,X),de=3):(xe=this._moveView(pe,Pe,X,ye(ne)),de=2);ge&&ge({context:xe?.context,operation:de,record:ne})})}detach(){for(const ae of this._viewCache)ae.destroy();this._viewCache=[]}_insertView(ae,X,ve,ye){const ge=this._insertViewFromCache(X,ve);if(ge)return void(ge.context.$implicit=ye);const ne=ae();return ve.createEmbeddedView(ne.templateRef,ne.context,ne.index)}_detachAndCacheView(ae,X){const ve=X.detach(ae);this._maybeCacheView(ve,X)}_moveView(ae,X,ve,ye){const ge=ve.get(ae);return ve.move(ge,X),ge.context.$implicit=ye,ge}_maybeCacheView(ae,X){if(this._viewCache.length<this.viewCacheSize)this._viewCache.push(ae);else{const ve=X.indexOf(ae);-1===ve?ae.destroy():X.remove(ve)}}_insertViewFromCache(ae,X){const ve=this._viewCache.pop();return ve&&X.insert(ve,ae),ve||null}}class B{get selected(){return this._selected||(this._selected=Array.from(this._selection.values())),this._selected}constructor(ae=!1,X,ve=!0,ye){this._multiple=ae,this._emitChanges=ve,this.compareWith=ye,this._selection=new Set,this._deselectedToEmit=[],this._selectedToEmit=[],this.changed=new D.x,X&&X.length&&(ae?X.forEach(ge=>this._markSelected(ge)):this._markSelected(X[0]),this._selectedToEmit.length=0)}select(...ae){this._verifyValueAssignment(ae),ae.forEach(ve=>this._markSelected(ve));const X=this._hasQueuedChanges();return this._emitChangeEvent(),X}deselect(...ae){this._verifyValueAssignment(ae),ae.forEach(ve=>this._unmarkSelected(ve));const X=this._hasQueuedChanges();return this._emitChangeEvent(),X}setSelection(...ae){this._verifyValueAssignment(ae);const X=this.selected,ve=new Set(ae);ae.forEach(ge=>this._markSelected(ge)),X.filter(ge=>!ve.has(ge)).forEach(ge=>this._unmarkSelected(ge));const ye=this._hasQueuedChanges();return this._emitChangeEvent(),ye}toggle(ae){return this.isSelected(ae)?this.deselect(ae):this.select(ae)}clear(ae=!0){this._unmarkAll();const X=this._hasQueuedChanges();return ae&&this._emitChangeEvent(),X}isSelected(ae){return this._selection.has(this._getConcreteValue(ae))}isEmpty(){return 0===this._selection.size}hasValue(){return!this.isEmpty()}sort(ae){this._multiple&&this.selected&&this._selected.sort(ae)}isMultipleSelection(){return this._multiple}_emitChangeEvent(){this._selected=null,(this._selectedToEmit.length||this._deselectedToEmit.length)&&(this.changed.next({source:this,added:this._selectedToEmit,removed:this._deselectedToEmit}),this._deselectedToEmit=[],this._selectedToEmit=[])}_markSelected(ae){ae=this._getConcreteValue(ae),this.isSelected(ae)||(this._multiple||this._unmarkAll(),this.isSelected(ae)||this._selection.add(ae),this._emitChanges&&this._selectedToEmit.push(ae))}_unmarkSelected(ae){ae=this._getConcreteValue(ae),this.isSelected(ae)&&(this._selection.delete(ae),this._emitChanges&&this._deselectedToEmit.push(ae))}_unmarkAll(){this.isEmpty()||this._selection.forEach(ae=>this._unmarkSelected(ae))}_verifyValueAssignment(ae){ae.length>1&&this._multiple}_hasQueuedChanges(){return!(!this._deselectedToEmit.length&&!this._selectedToEmit.length)}_getConcreteValue(ae){if(this.compareWith){for(let X of this._selection)if(this.compareWith(ae,X))return X;return ae}return ae}}class V{constructor(){this._listeners=[]}notify(ae,X){for(let ve of this._listeners)ve(ae,X)}listen(ae){return this._listeners.push(ae),()=>{this._listeners=this._listeners.filter(X=>ae!==X)}}ngOnDestroy(){this._listeners=[]}}V.\u0275fac=function(ae){return new(ae||V)},V.\u0275prov=g.Yz7({token:V,factory:V.\u0275fac,providedIn:"root"});const ue=new g.OlP("_ViewRepeater")},29521:(qe,I,p)=>{"use strict";p.d(I,{A:()=>Ve,JH:()=>ge,JU:()=>E,K5:()=>g,Ku:()=>V,LH:()=>ve,L_:()=>Y,MW:()=>Vi,Mf:()=>l,SV:()=>ye,Sd:()=>ae,VM:()=>ue,Vb:()=>at,Z:()=>si,ZH:()=>e,aO:()=>ke,b2:()=>Wn,hY:()=>B,jx:()=>T,oh:()=>X,uR:()=>he,xE:()=>de,zL:()=>n});const e=8,l=9,g=13,E=16,T=17,n=18,B=27,Y=32,V=33,ue=34,he=35,ae=36,X=37,ve=38,ye=39,ge=40,de=48,ke=57,Ve=65,si=90,Vi=91,Wn=224;function at(It,...Qt){return Qt.length?Qt.some(St=>It[St]):It.altKey||It.shiftKey||It.ctrlKey||It.metaKey}},49643:(qe,I,p)=>{"use strict";p.d(I,{Q8:()=>P,wD:()=>n,yq:()=>T});var o=p(21281),e=p(94650),l=p(69751),D=p(77579),g=p(78372);class E{create(B){return typeof MutationObserver>"u"?null:new MutationObserver(B)}}E.\u0275fac=function(B){return new(B||E)},E.\u0275prov=e.Yz7({token:E,factory:E.\u0275fac,providedIn:"root"});class T{constructor(B){this._mutationObserverFactory=B,this._observedElements=new Map}ngOnDestroy(){this._observedElements.forEach((B,Y)=>this._cleanupObserver(Y))}observe(B){const Y=(0,o.fI)(B);return new l.y(V=>{const he=this._observeElement(Y).subscribe(V);return()=>{he.unsubscribe(),this._unobserveElement(Y)}})}_observeElement(B){if(this._observedElements.has(B))this._observedElements.get(B).count++;else{const Y=new D.x,V=this._mutationObserverFactory.create(ue=>Y.next(ue));V&&V.observe(B,{characterData:!0,childList:!0,subtree:!0}),this._observedElements.set(B,{observer:V,stream:Y,count:1})}return this._observedElements.get(B).stream}_unobserveElement(B){this._observedElements.has(B)&&(this._observedElements.get(B).count--,this._observedElements.get(B).count||this._cleanupObserver(B))}_cleanupObserver(B){if(this._observedElements.has(B)){const{observer:Y,stream:V}=this._observedElements.get(B);Y&&Y.disconnect(),V.complete(),this._observedElements.delete(B)}}}T.\u0275fac=function(B){return new(B||T)(e.LFG(E))},T.\u0275prov=e.Yz7({token:T,factory:T.\u0275fac,providedIn:"root"});class n{get disabled(){return this._disabled}set disabled(B){this._disabled=(0,o.Ig)(B),this._disabled?this._unsubscribe():this._subscribe()}get debounce(){return this._debounce}set debounce(B){this._debounce=(0,o.su)(B),this._subscribe()}constructor(B,Y,V){this._contentObserver=B,this._elementRef=Y,this._ngZone=V,this.event=new e.vpe,this._disabled=!1,this._currentSubscription=null}ngAfterContentInit(){!this._currentSubscription&&!this.disabled&&this._subscribe()}ngOnDestroy(){this._unsubscribe()}_subscribe(){this._unsubscribe();const B=this._contentObserver.observe(this._elementRef);this._ngZone.runOutsideAngular(()=>{this._currentSubscription=(this.debounce?B.pipe((0,g.b)(this.debounce)):B).subscribe(this.event)})}_unsubscribe(){this._currentSubscription?.unsubscribe()}}n.\u0275fac=function(B){return new(B||n)(e.Y36(T),e.Y36(e.SBq),e.Y36(e.R0b))},n.\u0275dir=e.lG2({type:n,selectors:[["","cdkObserveContent",""]],inputs:{disabled:["cdkObserveContentDisabled","disabled"],debounce:"debounce"},outputs:{event:"cdkObserveContent"},exportAs:["cdkObserveContent"]});class P{}P.\u0275fac=function(B){return new(B||P)},P.\u0275mod=e.oAB({type:P}),P.\u0275inj=e.cJS({providers:[E]})},98184:(qe,I,p)=>{"use strict";p.d(I,{U8:()=>Bn,X_:()=>de,_G:()=>ut,aV:()=>nn,pI:()=>Gi,xu:()=>vi});var o=p(67376),e=p(36895),l=p(94650),D=p(21281),g=p(83353),E=p(39300),T=p(95698),n=p(82722),P=p(22529),w=p(40445),B=p(84080),Y=p(77579),V=p(50727),ue=p(56451),he=p(29521);const ae=(0,g.Mq)();class X{constructor(je,Bt){this._viewportRuler=je,this._previousHTMLStyles={top:"",left:""},this._isEnabled=!1,this._document=Bt}attach(){}enable(){if(this._canBeEnabled()){const je=this._document.documentElement;this._previousScrollPosition=this._viewportRuler.getViewportScrollPosition(),this._previousHTMLStyles.left=je.style.left||"",this._previousHTMLStyles.top=je.style.top||"",je.style.left=(0,D.HM)(-this._previousScrollPosition.left),je.style.top=(0,D.HM)(-this._previousScrollPosition.top),je.classList.add("cdk-global-scrollblock"),this._isEnabled=!0}}disable(){if(this._isEnabled){const je=this._document.documentElement,Bt=this._document.body,xn=je.style,Fn=Bt.style,ui=xn.scrollBehavior||"",Ai=Fn.scrollBehavior||"";this._isEnabled=!1,xn.left=this._previousHTMLStyles.left,xn.top=this._previousHTMLStyles.top,je.classList.remove("cdk-global-scrollblock"),ae&&(xn.scrollBehavior=Fn.scrollBehavior="auto"),window.scroll(this._previousScrollPosition.left,this._previousScrollPosition.top),ae&&(xn.scrollBehavior=ui,Fn.scrollBehavior=Ai)}}_canBeEnabled(){if(this._document.documentElement.classList.contains("cdk-global-scrollblock")||this._isEnabled)return!1;const Bt=this._document.body,xn=this._viewportRuler.getViewportSize();return Bt.scrollHeight>xn.height||Bt.scrollWidth>xn.width}}class ye{constructor(je,Bt,xn,Fn){this._scrollDispatcher=je,this._ngZone=Bt,this._viewportRuler=xn,this._config=Fn,this._scrollSubscription=null,this._detach=()=>{this.disable(),this._overlayRef.hasAttached()&&this._ngZone.run(()=>this._overlayRef.detach())}}attach(je){this._overlayRef,this._overlayRef=je}enable(){if(this._scrollSubscription)return;const je=this._scrollDispatcher.scrolled(0).pipe((0,E.h)(Bt=>!Bt||!this._overlayRef.overlayElement.contains(Bt.getElementRef().nativeElement)));this._config&&this._config.threshold&&this._config.threshold>1?(this._initialScrollPosition=this._viewportRuler.getViewportScrollPosition().top,this._scrollSubscription=je.subscribe(()=>{const Bt=this._viewportRuler.getViewportScrollPosition().top;Math.abs(Bt-this._initialScrollPosition)>this._config.threshold?this._detach():this._overlayRef.updatePosition()})):this._scrollSubscription=je.subscribe(this._detach)}disable(){this._scrollSubscription&&(this._scrollSubscription.unsubscribe(),this._scrollSubscription=null)}detach(){this.disable(),this._overlayRef=null}}class ge{enable(){}disable(){}attach(){}}function ne(On,je){return je.some(Bt=>{const xn=On.bottom<Bt.top,Fn=On.top>Bt.bottom,ui=On.right<Bt.left,Ai=On.left>Bt.right;return xn||Fn||ui||Ai})}function pe(On,je){return je.some(Bt=>{const xn=On.top<Bt.top,Fn=On.bottom>Bt.bottom,ui=On.left<Bt.left,Ai=On.right>Bt.right;return xn||Fn||ui||Ai})}class Pe{constructor(je,Bt,xn,Fn){this._scrollDispatcher=je,this._viewportRuler=Bt,this._ngZone=xn,this._config=Fn,this._scrollSubscription=null}attach(je){this._overlayRef,this._overlayRef=je}enable(){if(!this._scrollSubscription){const je=this._config?this._config.scrollThrottle:0;this._scrollSubscription=this._scrollDispatcher.scrolled(je).subscribe(()=>{if(this._overlayRef.updatePosition(),this._config&&this._config.autoClose){const Bt=this._overlayRef.overlayElement.getBoundingClientRect(),{width:xn,height:Fn}=this._viewportRuler.getViewportSize();ne(Bt,[{width:xn,height:Fn,bottom:Fn,right:xn,top:0,left:0}])&&(this.disable(),this._ngZone.run(()=>this._overlayRef.detach()))}})}}disable(){this._scrollSubscription&&(this._scrollSubscription.unsubscribe(),this._scrollSubscription=null)}detach(){this.disable(),this._overlayRef=null}}class xe{constructor(je,Bt,xn,Fn){this._scrollDispatcher=je,this._viewportRuler=Bt,this._ngZone=xn,this.noop=()=>new ge,this.close=ui=>new ye(this._scrollDispatcher,this._ngZone,this._viewportRuler,ui),this.block=()=>new X(this._viewportRuler,this._document),this.reposition=ui=>new Pe(this._scrollDispatcher,this._viewportRuler,this._ngZone,ui),this._document=Fn}}xe.\u0275fac=function(je){return new(je||xe)(l.LFG(o.mF),l.LFG(o.rL),l.LFG(l.R0b),l.LFG(e.K0))},xe.\u0275prov=l.Yz7({token:xe,factory:xe.\u0275fac,providedIn:"root"});class de{constructor(je){if(this.scrollStrategy=new ge,this.panelClass="",this.hasBackdrop=!1,this.backdropClass="cdk-overlay-dark-backdrop",this.disposeOnNavigation=!1,je){const Bt=Object.keys(je);for(const xn of Bt)void 0!==je[xn]&&(this[xn]=je[xn])}}}class me{constructor(je,Bt){this.connectionPair=je,this.scrollableViewProperties=Bt}}class Z{constructor(je){this._attachedOverlays=[],this._document=je}ngOnDestroy(){this.detach()}add(je){this.remove(je),this._attachedOverlays.push(je)}remove(je){const Bt=this._attachedOverlays.indexOf(je);Bt>-1&&this._attachedOverlays.splice(Bt,1),0===this._attachedOverlays.length&&this.detach()}}Z.\u0275fac=function(je){return new(je||Z)(l.LFG(e.K0))},Z.\u0275prov=l.Yz7({token:Z,factory:Z.\u0275fac,providedIn:"root"});class Oe extends Z{constructor(je,Bt){super(je),this._ngZone=Bt,this._keydownListener=xn=>{const Fn=this._attachedOverlays;for(let ui=Fn.length-1;ui>-1;ui--)if(Fn[ui]._keydownEvents.observers.length>0){const Ai=Fn[ui]._keydownEvents;this._ngZone?this._ngZone.run(()=>Ai.next(xn)):Ai.next(xn);break}}}add(je){super.add(je),this._isAttached||(this._ngZone?this._ngZone.runOutsideAngular(()=>this._document.body.addEventListener("keydown",this._keydownListener)):this._document.body.addEventListener("keydown",this._keydownListener),this._isAttached=!0)}detach(){this._isAttached&&(this._document.body.removeEventListener("keydown",this._keydownListener),this._isAttached=!1)}}Oe.\u0275fac=function(je){return new(je||Oe)(l.LFG(e.K0),l.LFG(l.R0b,8))},Oe.\u0275prov=l.Yz7({token:Oe,factory:Oe.\u0275fac,providedIn:"root"});class j extends Z{constructor(je,Bt,xn){super(je),this._platform=Bt,this._ngZone=xn,this._cursorStyleIsSet=!1,this._pointerDownListener=Fn=>{this._pointerDownEventTarget=(0,g.sA)(Fn)},this._clickListener=Fn=>{const ui=(0,g.sA)(Fn),Ai="click"===Fn.type&&this._pointerDownEventTarget?this._pointerDownEventTarget:ui;this._pointerDownEventTarget=null;const si=this._attachedOverlays.slice();for(let Vi=si.length-1;Vi>-1;Vi--){const Vn=si[Vi];if(Vn._outsidePointerEvents.observers.length<1||!Vn.hasAttached())continue;if(Vn.overlayElement.contains(ui)||Vn.overlayElement.contains(Ai))break;const Hn=Vn._outsidePointerEvents;this._ngZone?this._ngZone.run(()=>Hn.next(Fn)):Hn.next(Fn)}}}add(je){if(super.add(je),!this._isAttached){const Bt=this._document.body;this._ngZone?this._ngZone.runOutsideAngular(()=>this._addEventListeners(Bt)):this._addEventListeners(Bt),this._platform.IOS&&!this._cursorStyleIsSet&&(this._cursorOriginalValue=Bt.style.cursor,Bt.style.cursor="pointer",this._cursorStyleIsSet=!0),this._isAttached=!0}}detach(){if(this._isAttached){const je=this._document.body;je.removeEventListener("pointerdown",this._pointerDownListener,!0),je.removeEventListener("click",this._clickListener,!0),je.removeEventListener("auxclick",this._clickListener,!0),je.removeEventListener("contextmenu",this._clickListener,!0),this._platform.IOS&&this._cursorStyleIsSet&&(je.style.cursor=this._cursorOriginalValue,this._cursorStyleIsSet=!1),this._isAttached=!1}}_addEventListeners(je){je.addEventListener("pointerdown",this._pointerDownListener,!0),je.addEventListener("click",this._clickListener,!0),je.addEventListener("auxclick",this._clickListener,!0),je.addEventListener("contextmenu",this._clickListener,!0)}}j.\u0275fac=function(je){return new(je||j)(l.LFG(e.K0),l.LFG(g.t4),l.LFG(l.R0b,8))},j.\u0275prov=l.Yz7({token:j,factory:j.\u0275fac,providedIn:"root"});class ke{constructor(je,Bt){this._platform=Bt,this._document=je}ngOnDestroy(){this._containerElement?.remove()}getContainerElement(){return this._containerElement||this._createContainer(),this._containerElement}_createContainer(){const je="cdk-overlay-container";if(this._platform.isBrowser||(0,g.Oy)()){const xn=this._document.querySelectorAll(`.${je}[platform="server"], .${je}[platform="test"]`);for(let Fn=0;Fn<xn.length;Fn++)xn[Fn].remove()}const Bt=this._document.createElement("div");Bt.classList.add(je),(0,g.Oy)()?Bt.setAttribute("platform","test"):this._platform.isBrowser||Bt.setAttribute("platform","server"),this._document.body.appendChild(Bt),this._containerElement=Bt}}ke.\u0275fac=function(je){return new(je||ke)(l.LFG(e.K0),l.LFG(g.t4))},ke.\u0275prov=l.Yz7({token:ke,factory:ke.\u0275fac,providedIn:"root"});class Be{constructor(je,Bt,xn,Fn,ui,Ai,si,Vi,Vn,Hn=!1){this._portalOutlet=je,this._host=Bt,this._pane=xn,this._config=Fn,this._ngZone=ui,this._keyboardDispatcher=Ai,this._document=si,this._location=Vi,this._outsideClickDispatcher=Vn,this._animationsDisabled=Hn,this._backdropElement=null,this._backdropClick=new Y.x,this._attachments=new Y.x,this._detachments=new Y.x,this._locationChanges=V.w0.EMPTY,this._backdropClickHandler=An=>this._backdropClick.next(An),this._backdropTransitionendHandler=An=>{this._disposeBackdrop(An.target)},this._keydownEvents=new Y.x,this._outsidePointerEvents=new Y.x,Fn.scrollStrategy&&(this._scrollStrategy=Fn.scrollStrategy,this._scrollStrategy.attach(this)),this._positionStrategy=Fn.positionStrategy}get overlayElement(){return this._pane}get backdropElement(){return this._backdropElement}get hostElement(){return this._host}attach(je){!this._host.parentElement&&this._previousHostParent&&this._previousHostParent.appendChild(this._host);const Bt=this._portalOutlet.attach(je);return this._positionStrategy&&this._positionStrategy.attach(this),this._updateStackingOrder(),this._updateElementSize(),this._updateElementDirection(),this._scrollStrategy&&this._scrollStrategy.enable(),this._ngZone.onStable.pipe((0,T.q)(1)).subscribe(()=>{this.hasAttached()&&this.updatePosition()}),this._togglePointerEvents(!0),this._config.hasBackdrop&&this._attachBackdrop(),this._config.panelClass&&this._toggleClasses(this._pane,this._config.panelClass,!0),this._attachments.next(),this._keyboardDispatcher.add(this),this._config.disposeOnNavigation&&(this._locationChanges=this._location.subscribe(()=>this.dispose())),this._outsideClickDispatcher.add(this),"function"==typeof Bt?.onDestroy&&Bt.onDestroy(()=>{this.hasAttached()&&this._ngZone.runOutsideAngular(()=>Promise.resolve().then(()=>this.detach()))}),Bt}detach(){if(!this.hasAttached())return;this.detachBackdrop(),this._togglePointerEvents(!1),this._positionStrategy&&this._positionStrategy.detach&&this._positionStrategy.detach(),this._scrollStrategy&&this._scrollStrategy.disable();const je=this._portalOutlet.detach();return this._detachments.next(),this._keyboardDispatcher.remove(this),this._detachContentWhenStable(),this._locationChanges.unsubscribe(),this._outsideClickDispatcher.remove(this),je}dispose(){const je=this.hasAttached();this._positionStrategy&&this._positionStrategy.dispose(),this._disposeScrollStrategy(),this._disposeBackdrop(this._backdropElement),this._locationChanges.unsubscribe(),this._keyboardDispatcher.remove(this),this._portalOutlet.dispose(),this._attachments.complete(),this._backdropClick.complete(),this._keydownEvents.complete(),this._outsidePointerEvents.complete(),this._outsideClickDispatcher.remove(this),this._host?.remove(),this._previousHostParent=this._pane=this._host=null,je&&this._detachments.next(),this._detachments.complete()}hasAttached(){return this._portalOutlet.hasAttached()}backdropClick(){return this._backdropClick}attachments(){return this._attachments}detachments(){return this._detachments}keydownEvents(){return this._keydownEvents}outsidePointerEvents(){return this._outsidePointerEvents}getConfig(){return this._config}updatePosition(){this._positionStrategy&&this._positionStrategy.apply()}updatePositionStrategy(je){je!==this._positionStrategy&&(this._positionStrategy&&this._positionStrategy.dispose(),this._positionStrategy=je,this.hasAttached()&&(je.attach(this),this.updatePosition()))}updateSize(je){this._config={...this._config,...je},this._updateElementSize()}setDirection(je){this._config={...this._config,direction:je},this._updateElementDirection()}addPanelClass(je){this._pane&&this._toggleClasses(this._pane,je,!0)}removePanelClass(je){this._pane&&this._toggleClasses(this._pane,je,!1)}getDirection(){const je=this._config.direction;return je?"string"==typeof je?je:je.value:"ltr"}updateScrollStrategy(je){je!==this._scrollStrategy&&(this._disposeScrollStrategy(),this._scrollStrategy=je,this.hasAttached()&&(je.attach(this),je.enable()))}_updateElementDirection(){this._host.setAttribute("dir",this.getDirection())}_updateElementSize(){if(!this._pane)return;const je=this._pane.style;je.width=(0,D.HM)(this._config.width),je.height=(0,D.HM)(this._config.height),je.minWidth=(0,D.HM)(this._config.minWidth),je.minHeight=(0,D.HM)(this._config.minHeight),je.maxWidth=(0,D.HM)(this._config.maxWidth),je.maxHeight=(0,D.HM)(this._config.maxHeight)}_togglePointerEvents(je){this._pane.style.pointerEvents=je?"":"none"}_attachBackdrop(){const je="cdk-overlay-backdrop-showing";this._backdropElement=this._document.createElement("div"),this._backdropElement.classList.add("cdk-overlay-backdrop"),this._animationsDisabled&&this._backdropElement.classList.add("cdk-overlay-backdrop-noop-animation"),this._config.backdropClass&&this._toggleClasses(this._backdropElement,this._config.backdropClass,!0),this._host.parentElement.insertBefore(this._backdropElement,this._host),this._backdropElement.addEventListener("click",this._backdropClickHandler),!this._animationsDisabled&&typeof requestAnimationFrame<"u"?this._ngZone.runOutsideAngular(()=>{requestAnimationFrame(()=>{this._backdropElement&&this._backdropElement.classList.add(je)})}):this._backdropElement.classList.add(je)}_updateStackingOrder(){this._host.nextSibling&&this._host.parentNode.appendChild(this._host)}detachBackdrop(){const je=this._backdropElement;if(je){if(this._animationsDisabled)return void this._disposeBackdrop(je);je.classList.remove("cdk-overlay-backdrop-showing"),this._ngZone.runOutsideAngular(()=>{je.addEventListener("transitionend",this._backdropTransitionendHandler)}),je.style.pointerEvents="none",this._backdropTimeout=this._ngZone.runOutsideAngular(()=>setTimeout(()=>{this._disposeBackdrop(je)},500))}}_toggleClasses(je,Bt,xn){const Fn=(0,D.Eq)(Bt||[]).filter(ui=>!!ui);Fn.length&&(xn?je.classList.add(...Fn):je.classList.remove(...Fn))}_detachContentWhenStable(){this._ngZone.runOutsideAngular(()=>{const je=this._ngZone.onStable.pipe((0,n.R)((0,ue.T)(this._attachments,this._detachments))).subscribe(()=>{(!this._pane||!this._host||0===this._pane.children.length)&&(this._pane&&this._config.panelClass&&this._toggleClasses(this._pane,this._config.panelClass,!1),this._host&&this._host.parentElement&&(this._previousHostParent=this._host.parentElement,this._host.remove()),je.unsubscribe())})})}_disposeScrollStrategy(){const je=this._scrollStrategy;je&&(je.disable(),je.detach&&je.detach())}_disposeBackdrop(je){je&&(je.removeEventListener("click",this._backdropClickHandler),je.removeEventListener("transitionend",this._backdropTransitionendHandler),je.remove(),this._backdropElement===je&&(this._backdropElement=null)),this._backdropTimeout&&(clearTimeout(this._backdropTimeout),this._backdropTimeout=void 0)}}const nt="cdk-overlay-connected-position-bounding-box",mt=/([A-Za-z%]+)$/;class ut{get positions(){return this._preferredPositions}constructor(je,Bt,xn,Fn,ui){this._viewportRuler=Bt,this._document=xn,this._platform=Fn,this._overlayContainer=ui,this._lastBoundingBoxSize={width:0,height:0},this._isPushed=!1,this._canPush=!0,this._growAfterOpen=!1,this._hasFlexibleDimensions=!0,this._positionLocked=!1,this._viewportMargin=0,this._scrollables=[],this._preferredPositions=[],this._positionChanges=new Y.x,this._resizeSubscription=V.w0.EMPTY,this._offsetX=0,this._offsetY=0,this._appliedPanelClasses=[],this.positionChanges=this._positionChanges,this.setOrigin(je)}attach(je){this._overlayRef&&this._overlayRef,this._validatePositions(),je.hostElement.classList.add(nt),this._overlayRef=je,this._boundingBox=je.hostElement,this._pane=je.overlayElement,this._isDisposed=!1,this._isInitialRender=!0,this._lastPosition=null,this._resizeSubscription.unsubscribe(),this._resizeSubscription=this._viewportRuler.change().subscribe(()=>{this._isInitialRender=!0,this.apply()})}apply(){if(this._isDisposed||!this._platform.isBrowser)return;if(!this._isInitialRender&&this._positionLocked&&this._lastPosition)return void this.reapplyLastPosition();this._clearPanelClasses(),this._resetOverlayElementStyles(),this._resetBoundingBoxStyles(),this._viewportRect=this._getNarrowedViewportRect(),this._originRect=this._getOriginRect(),this._overlayRect=this._pane.getBoundingClientRect(),this._containerRect=this._overlayContainer.getContainerElement().getBoundingClientRect();const je=this._originRect,Bt=this._overlayRect,xn=this._viewportRect,Fn=this._containerRect,ui=[];let Ai;for(let si of this._preferredPositions){let Vi=this._getOriginPoint(je,Fn,si),Vn=this._getOverlayPoint(Vi,Bt,si),Hn=this._getOverlayFit(Vn,Bt,xn,si);if(Hn.isCompletelyWithinViewport)return this._isPushed=!1,void this._applyPosition(si,Vi);this._canFitWithFlexibleDimensions(Hn,Vn,xn)?ui.push({position:si,origin:Vi,overlayRect:Bt,boundingBoxRect:this._calculateBoundingBoxRect(Vi,si)}):(!Ai||Ai.overlayFit.visibleArea<Hn.visibleArea)&&(Ai={overlayFit:Hn,overlayPoint:Vn,originPoint:Vi,position:si,overlayRect:Bt})}if(ui.length){let si=null,Vi=-1;for(const Vn of ui){const Hn=Vn.boundingBoxRect.width*Vn.boundingBoxRect.height*(Vn.position.weight||1);Hn>Vi&&(Vi=Hn,si=Vn)}return this._isPushed=!1,void this._applyPosition(si.position,si.origin)}if(this._canPush)return this._isPushed=!0,void this._applyPosition(Ai.position,Ai.originPoint);this._applyPosition(Ai.position,Ai.originPoint)}detach(){this._clearPanelClasses(),this._lastPosition=null,this._previousPushAmount=null,this._resizeSubscription.unsubscribe()}dispose(){this._isDisposed||(this._boundingBox&&Ve(this._boundingBox.style,{top:"",left:"",right:"",bottom:"",height:"",width:"",alignItems:"",justifyContent:""}),this._pane&&this._resetOverlayElementStyles(),this._overlayRef&&this._overlayRef.hostElement.classList.remove(nt),this.detach(),this._positionChanges.complete(),this._overlayRef=this._boundingBox=null,this._isDisposed=!0)}reapplyLastPosition(){if(this._isDisposed||!this._platform.isBrowser)return;const je=this._lastPosition;if(je){this._originRect=this._getOriginRect(),this._overlayRect=this._pane.getBoundingClientRect(),this._viewportRect=this._getNarrowedViewportRect(),this._containerRect=this._overlayContainer.getContainerElement().getBoundingClientRect();const Bt=this._getOriginPoint(this._originRect,this._containerRect,je);this._applyPosition(je,Bt)}else this.apply()}withScrollableContainers(je){return this._scrollables=je,this}withPositions(je){return this._preferredPositions=je,-1===je.indexOf(this._lastPosition)&&(this._lastPosition=null),this._validatePositions(),this}withViewportMargin(je){return this._viewportMargin=je,this}withFlexibleDimensions(je=!0){return this._hasFlexibleDimensions=je,this}withGrowAfterOpen(je=!0){return this._growAfterOpen=je,this}withPush(je=!0){return this._canPush=je,this}withLockedPosition(je=!0){return this._positionLocked=je,this}setOrigin(je){return this._origin=je,this}withDefaultOffsetX(je){return this._offsetX=je,this}withDefaultOffsetY(je){return this._offsetY=je,this}withTransformOriginOn(je){return this._transformOriginSelector=je,this}_getOriginPoint(je,Bt,xn){let Fn,ui;if("center"==xn.originX)Fn=je.left+je.width/2;else{const Ai=this._isRtl()?je.right:je.left,si=this._isRtl()?je.left:je.right;Fn="start"==xn.originX?Ai:si}return Bt.left<0&&(Fn-=Bt.left),ui="center"==xn.originY?je.top+je.height/2:"top"==xn.originY?je.top:je.bottom,Bt.top<0&&(ui-=Bt.top),{x:Fn,y:ui}}_getOverlayPoint(je,Bt,xn){let Fn,ui;return Fn="center"==xn.overlayX?-Bt.width/2:"start"===xn.overlayX?this._isRtl()?-Bt.width:0:this._isRtl()?0:-Bt.width,ui="center"==xn.overlayY?-Bt.height/2:"top"==xn.overlayY?0:-Bt.height,{x:je.x+Fn,y:je.y+ui}}_getOverlayFit(je,Bt,xn,Fn){const ui=Ne(Bt);let{x:Ai,y:si}=je,Vi=this._getOffset(Fn,"x"),Vn=this._getOffset(Fn,"y");Vi&&(Ai+=Vi),Vn&&(si+=Vn);let Hn=0-Ai,An=Ai+ui.width-xn.width,vn=0-si,In=si+ui.height-xn.height,Zi=this._subtractOverflows(ui.width,Hn,An),gr=this._subtractOverflows(ui.height,vn,In),Hi=Zi*gr;return{visibleArea:Hi,isCompletelyWithinViewport:ui.width*ui.height===Hi,fitsInViewportVertically:gr===ui.height,fitsInViewportHorizontally:Zi==ui.width}}_canFitWithFlexibleDimensions(je,Bt,xn){if(this._hasFlexibleDimensions){const Fn=xn.bottom-Bt.y,ui=xn.right-Bt.x,Ai=tt(this._overlayRef.getConfig().minHeight),si=tt(this._overlayRef.getConfig().minWidth),Vi=je.fitsInViewportVertically||null!=Ai&&Ai<=Fn,Vn=je.fitsInViewportHorizontally||null!=si&&si<=ui;return Vi&&Vn}return!1}_pushOverlayOnScreen(je,Bt,xn){if(this._previousPushAmount&&this._positionLocked)return{x:je.x+this._previousPushAmount.x,y:je.y+this._previousPushAmount.y};const Fn=Ne(Bt),ui=this._viewportRect,Ai=Math.max(je.x+Fn.width-ui.width,0),si=Math.max(je.y+Fn.height-ui.height,0),Vi=Math.max(ui.top-xn.top-je.y,0),Vn=Math.max(ui.left-xn.left-je.x,0);let Hn=0,An=0;return Hn=Fn.width<=ui.width?Vn||-Ai:je.x<this._viewportMargin?ui.left-xn.left-je.x:0,An=Fn.height<=ui.height?Vi||-si:je.y<this._viewportMargin?ui.top-xn.top-je.y:0,this._previousPushAmount={x:Hn,y:An},{x:je.x+Hn,y:je.y+An}}_applyPosition(je,Bt){if(this._setTransformOrigin(je),this._setOverlayElementStyles(Bt,je),this._setBoundingBoxStyles(Bt,je),je.panelClass&&this._addPanelClasses(je.panelClass),this._lastPosition=je,this._positionChanges.observers.length){const xn=this._getScrollVisibility(),Fn=new me(je,xn);this._positionChanges.next(Fn)}this._isInitialRender=!1}_setTransformOrigin(je){if(!this._transformOriginSelector)return;const Bt=this._boundingBox.querySelectorAll(this._transformOriginSelector);let xn,Fn=je.overlayY;xn="center"===je.overlayX?"center":this._isRtl()?"start"===je.overlayX?"right":"left":"start"===je.overlayX?"left":"right";for(let ui=0;ui<Bt.length;ui++)Bt[ui].style.transformOrigin=`${xn} ${Fn}`}_calculateBoundingBoxRect(je,Bt){const xn=this._viewportRect,Fn=this._isRtl();let ui,Ai,si;if("top"===Bt.overlayY)Ai=je.y,ui=xn.height-Ai+this._viewportMargin;else if("bottom"===Bt.overlayY)si=xn.height-je.y+2*this._viewportMargin,ui=xn.height-si+this._viewportMargin;else{const In=Math.min(xn.bottom-je.y+xn.top,je.y),Zi=this._lastBoundingBoxSize.height;ui=2*In,Ai=je.y-In,ui>Zi&&!this._isInitialRender&&!this._growAfterOpen&&(Ai=je.y-Zi/2)}const Vi="start"===Bt.overlayX&&!Fn||"end"===Bt.overlayX&&Fn;let Hn,An,vn;if("end"===Bt.overlayX&&!Fn||"start"===Bt.overlayX&&Fn)vn=xn.width-je.x+this._viewportMargin,Hn=je.x-this._viewportMargin;else if(Vi)An=je.x,Hn=xn.right-je.x;else{const In=Math.min(xn.right-je.x+xn.left,je.x),Zi=this._lastBoundingBoxSize.width;Hn=2*In,An=je.x-In,Hn>Zi&&!this._isInitialRender&&!this._growAfterOpen&&(An=je.x-Zi/2)}return{top:Ai,left:An,bottom:si,right:vn,width:Hn,height:ui}}_setBoundingBoxStyles(je,Bt){const xn=this._calculateBoundingBoxRect(je,Bt);!this._isInitialRender&&!this._growAfterOpen&&(xn.height=Math.min(xn.height,this._lastBoundingBoxSize.height),xn.width=Math.min(xn.width,this._lastBoundingBoxSize.width));const Fn={};if(this._hasExactPosition())Fn.top=Fn.left="0",Fn.bottom=Fn.right=Fn.maxHeight=Fn.maxWidth="",Fn.width=Fn.height="100%";else{const ui=this._overlayRef.getConfig().maxHeight,Ai=this._overlayRef.getConfig().maxWidth;Fn.height=(0,D.HM)(xn.height),Fn.top=(0,D.HM)(xn.top),Fn.bottom=(0,D.HM)(xn.bottom),Fn.width=(0,D.HM)(xn.width),Fn.left=(0,D.HM)(xn.left),Fn.right=(0,D.HM)(xn.right),"center"===Bt.overlayX?Fn.alignItems="center":Fn.alignItems="end"===Bt.overlayX?"flex-end":"flex-start","center"===Bt.overlayY?Fn.justifyContent="center":Fn.justifyContent="bottom"===Bt.overlayY?"flex-end":"flex-start",ui&&(Fn.maxHeight=(0,D.HM)(ui)),Ai&&(Fn.maxWidth=(0,D.HM)(Ai))}this._lastBoundingBoxSize=xn,Ve(this._boundingBox.style,Fn)}_resetBoundingBoxStyles(){Ve(this._boundingBox.style,{top:"0",left:"0",right:"0",bottom:"0",height:"",width:"",alignItems:"",justifyContent:""})}_resetOverlayElementStyles(){Ve(this._pane.style,{top:"",left:"",bottom:"",right:"",position:"",transform:""})}_setOverlayElementStyles(je,Bt){const xn={},Fn=this._hasExactPosition(),ui=this._hasFlexibleDimensions,Ai=this._overlayRef.getConfig();if(Fn){const Hn=this._viewportRuler.getViewportScrollPosition();Ve(xn,this._getExactOverlayY(Bt,je,Hn)),Ve(xn,this._getExactOverlayX(Bt,je,Hn))}else xn.position="static";let si="",Vi=this._getOffset(Bt,"x"),Vn=this._getOffset(Bt,"y");Vi&&(si+=`translateX(${Vi}px) `),Vn&&(si+=`translateY(${Vn}px)`),xn.transform=si.trim(),Ai.maxHeight&&(Fn?xn.maxHeight=(0,D.HM)(Ai.maxHeight):ui&&(xn.maxHeight="")),Ai.maxWidth&&(Fn?xn.maxWidth=(0,D.HM)(Ai.maxWidth):ui&&(xn.maxWidth="")),Ve(this._pane.style,xn)}_getExactOverlayY(je,Bt,xn){let Fn={top:"",bottom:""},ui=this._getOverlayPoint(Bt,this._overlayRect,je);if(this._isPushed&&(ui=this._pushOverlayOnScreen(ui,this._overlayRect,xn)),"bottom"===je.overlayY){const Ai=this._document.documentElement.clientHeight;Fn.bottom=Ai-(ui.y+this._overlayRect.height)+"px"}else Fn.top=(0,D.HM)(ui.y);return Fn}_getExactOverlayX(je,Bt,xn){let Ai,Fn={left:"",right:""},ui=this._getOverlayPoint(Bt,this._overlayRect,je);if(this._isPushed&&(ui=this._pushOverlayOnScreen(ui,this._overlayRect,xn)),Ai=this._isRtl()?"end"===je.overlayX?"left":"right":"end"===je.overlayX?"right":"left","right"===Ai){const si=this._document.documentElement.clientWidth;Fn.right=si-(ui.x+this._overlayRect.width)+"px"}else Fn.left=(0,D.HM)(ui.x);return Fn}_getScrollVisibility(){const je=this._getOriginRect(),Bt=this._pane.getBoundingClientRect(),xn=this._scrollables.map(Fn=>Fn.getElementRef().nativeElement.getBoundingClientRect());return{isOriginClipped:pe(je,xn),isOriginOutsideView:ne(je,xn),isOverlayClipped:pe(Bt,xn),isOverlayOutsideView:ne(Bt,xn)}}_subtractOverflows(je,...Bt){return Bt.reduce((xn,Fn)=>xn-Math.max(Fn,0),je)}_getNarrowedViewportRect(){const je=this._document.documentElement.clientWidth,Bt=this._document.documentElement.clientHeight,xn=this._viewportRuler.getViewportScrollPosition();return{top:xn.top+this._viewportMargin,left:xn.left+this._viewportMargin,right:xn.left+je-this._viewportMargin,bottom:xn.top+Bt-this._viewportMargin,width:je-2*this._viewportMargin,height:Bt-2*this._viewportMargin}}_isRtl(){return"rtl"===this._overlayRef.getDirection()}_hasExactPosition(){return!this._hasFlexibleDimensions||this._isPushed}_getOffset(je,Bt){return"x"===Bt?null==je.offsetX?this._offsetX:je.offsetX:null==je.offsetY?this._offsetY:je.offsetY}_validatePositions(){}_addPanelClasses(je){this._pane&&(0,D.Eq)(je).forEach(Bt=>{""!==Bt&&-1===this._appliedPanelClasses.indexOf(Bt)&&(this._appliedPanelClasses.push(Bt),this._pane.classList.add(Bt))})}_clearPanelClasses(){this._pane&&(this._appliedPanelClasses.forEach(je=>{this._pane.classList.remove(je)}),this._appliedPanelClasses=[])}_getOriginRect(){const je=this._origin;if(je instanceof l.SBq)return je.nativeElement.getBoundingClientRect();if(je instanceof Element)return je.getBoundingClientRect();const Bt=je.width||0,xn=je.height||0;return{top:je.y,bottom:je.y+xn,left:je.x,right:je.x+Bt,height:xn,width:Bt}}}function Ve(On,je){for(let Bt in je)je.hasOwnProperty(Bt)&&(On[Bt]=je[Bt]);return On}function tt(On){if("number"!=typeof On&&null!=On){const[je,Bt]=On.split(mt);return Bt&&"px"!==Bt?null:parseFloat(je)}return On||null}function Ne(On){return{top:Math.floor(On.top),right:Math.floor(On.right),bottom:Math.floor(On.bottom),left:Math.floor(On.left),width:Math.floor(On.width),height:Math.floor(On.height)}}const Ct="cdk-global-overlay-wrapper";class rn{constructor(){this._cssPosition="static",this._topOffset="",this._bottomOffset="",this._alignItems="",this._xPosition="",this._xOffset="",this._width="",this._height="",this._isDisposed=!1}attach(je){const Bt=je.getConfig();this._overlayRef=je,this._width&&!Bt.width&&je.updateSize({width:this._width}),this._height&&!Bt.height&&je.updateSize({height:this._height}),je.hostElement.classList.add(Ct),this._isDisposed=!1}top(je=""){return this._bottomOffset="",this._topOffset=je,this._alignItems="flex-start",this}left(je=""){return this._xOffset=je,this._xPosition="left",this}bottom(je=""){return this._topOffset="",this._bottomOffset=je,this._alignItems="flex-end",this}right(je=""){return this._xOffset=je,this._xPosition="right",this}start(je=""){return this._xOffset=je,this._xPosition="start",this}end(je=""){return this._xOffset=je,this._xPosition="end",this}width(je=""){return this._overlayRef?this._overlayRef.updateSize({width:je}):this._width=je,this}height(je=""){return this._overlayRef?this._overlayRef.updateSize({height:je}):this._height=je,this}centerHorizontally(je=""){return this.left(je),this._xPosition="center",this}centerVertically(je=""){return this.top(je),this._alignItems="center",this}apply(){if(!this._overlayRef||!this._overlayRef.hasAttached())return;const je=this._overlayRef.overlayElement.style,Bt=this._overlayRef.hostElement.style,xn=this._overlayRef.getConfig(),{width:Fn,height:ui,maxWidth:Ai,maxHeight:si}=xn,Vi=!("100%"!==Fn&&"100vw"!==Fn||Ai&&"100%"!==Ai&&"100vw"!==Ai),Vn=!("100%"!==ui&&"100vh"!==ui||si&&"100%"!==si&&"100vh"!==si),Hn=this._xPosition,An=this._xOffset,vn="rtl"===this._overlayRef.getConfig().direction;let In="",Zi="",gr="";Vi?gr="flex-start":"center"===Hn?(gr="center",vn?Zi=An:In=An):vn?"left"===Hn||"end"===Hn?(gr="flex-end",In=An):("right"===Hn||"start"===Hn)&&(gr="flex-start",Zi=An):"left"===Hn||"start"===Hn?(gr="flex-start",In=An):("right"===Hn||"end"===Hn)&&(gr="flex-end",Zi=An),je.position=this._cssPosition,je.marginLeft=Vi?"0":In,je.marginTop=Vn?"0":this._topOffset,je.marginBottom=this._bottomOffset,je.marginRight=Vi?"0":Zi,Bt.justifyContent=gr,Bt.alignItems=Vn?"flex-start":this._alignItems}dispose(){if(this._isDisposed||!this._overlayRef)return;const je=this._overlayRef.overlayElement.style,Bt=this._overlayRef.hostElement,xn=Bt.style;Bt.classList.remove(Ct),xn.justifyContent=xn.alignItems=je.marginTop=je.marginBottom=je.marginLeft=je.marginRight=je.position="",this._overlayRef=null,this._isDisposed=!0}}class He{constructor(je,Bt,xn,Fn){this._viewportRuler=je,this._document=Bt,this._platform=xn,this._overlayContainer=Fn}global(){return new rn}flexibleConnectedTo(je){return new ut(je,this._viewportRuler,this._document,this._platform,this._overlayContainer)}}He.\u0275fac=function(je){return new(je||He)(l.LFG(o.rL),l.LFG(e.K0),l.LFG(g.t4),l.LFG(ke))},He.\u0275prov=l.Yz7({token:He,factory:He.\u0275fac,providedIn:"root"});let st=0;class nn{constructor(je,Bt,xn,Fn,ui,Ai,si,Vi,Vn,Hn,An,vn){this.scrollStrategies=je,this._overlayContainer=Bt,this._componentFactoryResolver=xn,this._positionBuilder=Fn,this._keyboardDispatcher=ui,this._injector=Ai,this._ngZone=si,this._document=Vi,this._directionality=Vn,this._location=Hn,this._outsideClickDispatcher=An,this._animationsModuleType=vn}create(je){const Bt=this._createHostElement(),xn=this._createPaneElement(Bt),Fn=this._createPortalOutlet(xn),ui=new de(je);return ui.direction=ui.direction||this._directionality.value,new Be(Fn,Bt,xn,ui,this._ngZone,this._keyboardDispatcher,this._document,this._location,this._outsideClickDispatcher,"NoopAnimations"===this._animationsModuleType)}position(){return this._positionBuilder}_createPaneElement(je){const Bt=this._document.createElement("div");return Bt.id="cdk-overlay-"+st++,Bt.classList.add("cdk-overlay-pane"),je.appendChild(Bt),Bt}_createHostElement(){const je=this._document.createElement("div");return this._overlayContainer.getContainerElement().appendChild(je),je}_createPortalOutlet(je){return this._appRef||(this._appRef=this._injector.get(l.z2F)),new B.u0(je,this._componentFactoryResolver,this._appRef,this._injector,this._document)}}nn.\u0275fac=function(je){return new(je||nn)(l.LFG(xe),l.LFG(ke),l.LFG(l._Vd),l.LFG(He),l.LFG(Oe),l.LFG(l.zs3),l.LFG(l.R0b),l.LFG(e.K0),l.LFG(w.Is),l.LFG(e.Ye),l.LFG(j),l.LFG(l.QbO,8))},nn.\u0275prov=l.Yz7({token:nn,factory:nn.\u0275fac,providedIn:"root"});const Dn=[{originX:"start",originY:"bottom",overlayX:"start",overlayY:"top"},{originX:"start",originY:"top",overlayX:"start",overlayY:"bottom"},{originX:"end",originY:"top",overlayX:"end",overlayY:"bottom"},{originX:"end",originY:"bottom",overlayX:"end",overlayY:"top"}],Mn=new l.OlP("cdk-connected-overlay-scroll-strategy");class vi{constructor(je){this.elementRef=je}}vi.\u0275fac=function(je){return new(je||vi)(l.Y36(l.SBq))},vi.\u0275dir=l.lG2({type:vi,selectors:[["","cdk-overlay-origin",""],["","overlay-origin",""],["","cdkOverlayOrigin",""]],exportAs:["cdkOverlayOrigin"],standalone:!0});class Gi{get offsetX(){return this._offsetX}set offsetX(je){this._offsetX=je,this._position&&this._updatePositionStrategy(this._position)}get offsetY(){return this._offsetY}set offsetY(je){this._offsetY=je,this._position&&this._updatePositionStrategy(this._position)}get hasBackdrop(){return this._hasBackdrop}set hasBackdrop(je){this._hasBackdrop=(0,D.Ig)(je)}get lockPosition(){return this._lockPosition}set lockPosition(je){this._lockPosition=(0,D.Ig)(je)}get flexibleDimensions(){return this._flexibleDimensions}set flexibleDimensions(je){this._flexibleDimensions=(0,D.Ig)(je)}get growAfterOpen(){return this._growAfterOpen}set growAfterOpen(je){this._growAfterOpen=(0,D.Ig)(je)}get push(){return this._push}set push(je){this._push=(0,D.Ig)(je)}constructor(je,Bt,xn,Fn,ui){this._overlay=je,this._dir=ui,this._hasBackdrop=!1,this._lockPosition=!1,this._growAfterOpen=!1,this._flexibleDimensions=!1,this._push=!1,this._backdropSubscription=V.w0.EMPTY,this._attachSubscription=V.w0.EMPTY,this._detachSubscription=V.w0.EMPTY,this._positionSubscription=V.w0.EMPTY,this.viewportMargin=0,this.open=!1,this.disableClose=!1,this.backdropClick=new l.vpe,this.positionChange=new l.vpe,this.attach=new l.vpe,this.detach=new l.vpe,this.overlayKeydown=new l.vpe,this.overlayOutsideClick=new l.vpe,this._templatePortal=new B.UE(Bt,xn),this._scrollStrategyFactory=Fn,this.scrollStrategy=this._scrollStrategyFactory()}get overlayRef(){return this._overlayRef}get dir(){return this._dir?this._dir.value:"ltr"}ngOnDestroy(){this._attachSubscription.unsubscribe(),this._detachSubscription.unsubscribe(),this._backdropSubscription.unsubscribe(),this._positionSubscription.unsubscribe(),this._overlayRef&&this._overlayRef.dispose()}ngOnChanges(je){this._position&&(this._updatePositionStrategy(this._position),this._overlayRef.updateSize({width:this.width,minWidth:this.minWidth,height:this.height,minHeight:this.minHeight}),je.origin&&this.open&&this._position.apply()),je.open&&(this.open?this._attachOverlay():this._detachOverlay())}_createOverlay(){(!this.positions||!this.positions.length)&&(this.positions=Dn);const je=this._overlayRef=this._overlay.create(this._buildConfig());this._attachSubscription=je.attachments().subscribe(()=>this.attach.emit()),this._detachSubscription=je.detachments().subscribe(()=>this.detach.emit()),je.keydownEvents().subscribe(Bt=>{this.overlayKeydown.next(Bt),Bt.keyCode===he.hY&&!this.disableClose&&!(0,he.Vb)(Bt)&&(Bt.preventDefault(),this._detachOverlay())}),this._overlayRef.outsidePointerEvents().subscribe(Bt=>{this.overlayOutsideClick.next(Bt)})}_buildConfig(){const je=this._position=this.positionStrategy||this._createPositionStrategy(),Bt=new de({direction:this._dir,positionStrategy:je,scrollStrategy:this.scrollStrategy,hasBackdrop:this.hasBackdrop});return(this.width||0===this.width)&&(Bt.width=this.width),(this.height||0===this.height)&&(Bt.height=this.height),(this.minWidth||0===this.minWidth)&&(Bt.minWidth=this.minWidth),(this.minHeight||0===this.minHeight)&&(Bt.minHeight=this.minHeight),this.backdropClass&&(Bt.backdropClass=this.backdropClass),this.panelClass&&(Bt.panelClass=this.panelClass),Bt}_updatePositionStrategy(je){const Bt=this.positions.map(xn=>({originX:xn.originX,originY:xn.originY,overlayX:xn.overlayX,overlayY:xn.overlayY,offsetX:xn.offsetX||this.offsetX,offsetY:xn.offsetY||this.offsetY,panelClass:xn.panelClass||void 0}));return je.setOrigin(this._getFlexibleConnectedPositionStrategyOrigin()).withPositions(Bt).withFlexibleDimensions(this.flexibleDimensions).withPush(this.push).withGrowAfterOpen(this.growAfterOpen).withViewportMargin(this.viewportMargin).withLockedPosition(this.lockPosition).withTransformOriginOn(this.transformOriginSelector)}_createPositionStrategy(){const je=this._overlay.position().flexibleConnectedTo(this._getFlexibleConnectedPositionStrategyOrigin());return this._updatePositionStrategy(je),je}_getFlexibleConnectedPositionStrategyOrigin(){return this.origin instanceof vi?this.origin.elementRef:this.origin}_attachOverlay(){this._overlayRef?this._overlayRef.getConfig().hasBackdrop=this.hasBackdrop:this._createOverlay(),this._overlayRef.hasAttached()||this._overlayRef.attach(this._templatePortal),this.hasBackdrop?this._backdropSubscription=this._overlayRef.backdropClick().subscribe(je=>{this.backdropClick.emit(je)}):this._backdropSubscription.unsubscribe(),this._positionSubscription.unsubscribe(),this.positionChange.observers.length>0&&(this._positionSubscription=this._position.positionChanges.pipe((0,P.o)(()=>this.positionChange.observers.length>0)).subscribe(je=>{this.positionChange.emit(je),0===this.positionChange.observers.length&&this._positionSubscription.unsubscribe()}))}_detachOverlay(){this._overlayRef&&this._overlayRef.detach(),this._backdropSubscription.unsubscribe(),this._positionSubscription.unsubscribe()}}Gi.\u0275fac=function(je){return new(je||Gi)(l.Y36(nn),l.Y36(l.Rgc),l.Y36(l.s_b),l.Y36(Mn),l.Y36(w.Is,8))},Gi.\u0275dir=l.lG2({type:Gi,selectors:[["","cdk-connected-overlay",""],["","connected-overlay",""],["","cdkConnectedOverlay",""]],inputs:{origin:["cdkConnectedOverlayOrigin","origin"],positions:["cdkConnectedOverlayPositions","positions"],positionStrategy:["cdkConnectedOverlayPositionStrategy","positionStrategy"],offsetX:["cdkConnectedOverlayOffsetX","offsetX"],offsetY:["cdkConnectedOverlayOffsetY","offsetY"],width:["cdkConnectedOverlayWidth","width"],height:["cdkConnectedOverlayHeight","height"],minWidth:["cdkConnectedOverlayMinWidth","minWidth"],minHeight:["cdkConnectedOverlayMinHeight","minHeight"],backdropClass:["cdkConnectedOverlayBackdropClass","backdropClass"],panelClass:["cdkConnectedOverlayPanelClass","panelClass"],viewportMargin:["cdkConnectedOverlayViewportMargin","viewportMargin"],scrollStrategy:["cdkConnectedOverlayScrollStrategy","scrollStrategy"],open:["cdkConnectedOverlayOpen","open"],disableClose:["cdkConnectedOverlayDisableClose","disableClose"],transformOriginSelector:["cdkConnectedOverlayTransformOriginOn","transformOriginSelector"],hasBackdrop:["cdkConnectedOverlayHasBackdrop","hasBackdrop"],lockPosition:["cdkConnectedOverlayLockPosition","lockPosition"],flexibleDimensions:["cdkConnectedOverlayFlexibleDimensions","flexibleDimensions"],growAfterOpen:["cdkConnectedOverlayGrowAfterOpen","growAfterOpen"],push:["cdkConnectedOverlayPush","push"]},outputs:{backdropClick:"backdropClick",positionChange:"positionChange",attach:"attach",detach:"detach",overlayKeydown:"overlayKeydown",overlayOutsideClick:"overlayOutsideClick"},exportAs:["cdkConnectedOverlay"],standalone:!0,features:[l.TTD]});const wi={provide:Mn,deps:[nn],useFactory:function mi(On){return()=>On.scrollStrategies.reposition()}};class Bn{}Bn.\u0275fac=function(je){return new(je||Bn)},Bn.\u0275mod=l.oAB({type:Bn}),Bn.\u0275inj=l.cJS({providers:[nn,wi],imports:[w.vT,B.eL,o.Cl,o.Cl]});class kn extends ke{constructor(je,Bt){super(je,Bt)}ngOnDestroy(){super.ngOnDestroy(),this._fullScreenEventName&&this._fullScreenListener&&this._document.removeEventListener(this._fullScreenEventName,this._fullScreenListener)}_createContainer(){super._createContainer(),this._adjustParentForFullscreenChange(),this._addFullscreenChangeListener(()=>this._adjustParentForFullscreenChange())}_adjustParentForFullscreenChange(){this._containerElement&&(this.getFullscreenElement()||this._document.body).appendChild(this._containerElement)}_addFullscreenChangeListener(je){const Bt=this._getEventName();Bt&&(this._fullScreenListener&&this._document.removeEventListener(Bt,this._fullScreenListener),this._document.addEventListener(Bt,je),this._fullScreenListener=je)}_getEventName(){if(!this._fullScreenEventName){const je=this._document;je.fullscreenEnabled?this._fullScreenEventName="fullscreenchange":je.webkitFullscreenEnabled?this._fullScreenEventName="webkitfullscreenchange":je.mozFullScreenEnabled?this._fullScreenEventName="mozfullscreenchange":je.msFullscreenEnabled&&(this._fullScreenEventName="MSFullscreenChange")}return this._fullScreenEventName}getFullscreenElement(){const je=this._document;return je.fullscreenElement||je.webkitFullscreenElement||je.mozFullScreenElement||je.msFullscreenElement||null}}kn.\u0275fac=function(je){return new(je||kn)(l.LFG(e.K0),l.LFG(g.t4))},kn.\u0275prov=l.Yz7({token:kn,factory:kn.\u0275fac,providedIn:"root"})},83353:(qe,I,p)=>{"use strict";p.d(I,{Mq:()=>ue,Oy:()=>ne,_i:()=>he,ht:()=>ye,i$:()=>B,kV:()=>ve,qK:()=>n,sA:()=>ge,t4:()=>D});var o=p(94650),e=p(36895);let l,E;try{l=typeof Intl<"u"&&Intl.v8BreakIterator}catch{l=!1}class D{constructor(Pe){this._platformId=Pe,this.isBrowser=this._platformId?(0,e.NF)(this._platformId):"object"==typeof document&&!!document,this.EDGE=this.isBrowser&&/(edge)/i.test(navigator.userAgent),this.TRIDENT=this.isBrowser&&/(msie|trident)/i.test(navigator.userAgent),this.BLINK=this.isBrowser&&!(!window.chrome&&!l)&&typeof CSS<"u"&&!this.EDGE&&!this.TRIDENT,this.WEBKIT=this.isBrowser&&/AppleWebKit/i.test(navigator.userAgent)&&!this.BLINK&&!this.EDGE&&!this.TRIDENT,this.IOS=this.isBrowser&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!("MSStream"in window),this.FIREFOX=this.isBrowser&&/(firefox|minefield)/i.test(navigator.userAgent),this.ANDROID=this.isBrowser&&/android/i.test(navigator.userAgent)&&!this.TRIDENT,this.SAFARI=this.isBrowser&&/safari/i.test(navigator.userAgent)&&this.WEBKIT}}D.\u0275fac=function(Pe){return new(Pe||D)(o.LFG(o.Lbi))},D.\u0275prov=o.Yz7({token:D,factory:D.\u0275fac,providedIn:"root"});class g{}g.\u0275fac=function(Pe){return new(Pe||g)},g.\u0275mod=o.oAB({type:g}),g.\u0275inj=o.cJS({});const T=["color","button","checkbox","date","datetime-local","email","file","hidden","image","month","number","password","radio","range","reset","search","submit","tel","text","time","url","week"];function n(){if(E)return E;if("object"!=typeof document||!document)return E=new Set(T),E;let pe=document.createElement("input");return E=new Set(T.filter(Pe=>(pe.setAttribute("type",Pe),pe.type===Pe))),E}let P,Y,V,ae;function B(pe){return function w(){if(null==P&&typeof window<"u")try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:()=>P=!0}))}finally{P=P||!1}return P}()?pe:!!pe.capture}function ue(){if(null==V){if("object"!=typeof document||!document||"function"!=typeof Element||!Element)return V=!1,V;if("scrollBehavior"in document.documentElement.style)V=!0;else{const pe=Element.prototype.scrollTo;V=!!pe&&!/\{\s*\[native code\]\s*\}/.test(pe.toString())}}return V}function he(){if("object"!=typeof document||!document)return 0;if(null==Y){const pe=document.createElement("div"),Pe=pe.style;pe.dir="rtl",Pe.width="1px",Pe.overflow="auto",Pe.visibility="hidden",Pe.pointerEvents="none",Pe.position="absolute";const xe=document.createElement("div"),de=xe.style;de.width="2px",de.height="1px",pe.appendChild(xe),document.body.appendChild(pe),Y=0,0===pe.scrollLeft&&(pe.scrollLeft=1,Y=0===pe.scrollLeft?1:2),pe.remove()}return Y}function ve(pe){if(function X(){if(null==ae){const pe=typeof document<"u"?document.head:null;ae=!(!pe||!pe.createShadowRoot&&!pe.attachShadow)}return ae}()){const Pe=pe.getRootNode?pe.getRootNode():null;if(typeof ShadowRoot<"u"&&ShadowRoot&&Pe instanceof ShadowRoot)return Pe}return null}function ye(){let pe=typeof document<"u"&&document?document.activeElement:null;for(;pe&&pe.shadowRoot;){const Pe=pe.shadowRoot.activeElement;if(Pe===pe)break;pe=Pe}return pe}function ge(pe){return pe.composedPath?pe.composedPath()[0]:pe.target}function ne(){return typeof __karma__<"u"&&!!__karma__||typeof jasmine<"u"&&!!jasmine||typeof jest<"u"&&!!jest||typeof Mocha<"u"&&!!Mocha}},84080:(qe,I,p)=>{"use strict";p.d(I,{C5:()=>w,Pl:()=>ye,UE:()=>B,eL:()=>ne,u0:()=>he});var o=p(94650),e=p(36895);class P{attach(xe){return this._attachedHost=xe,xe.attach(this)}detach(){let xe=this._attachedHost;null!=xe&&(this._attachedHost=null,xe.detach())}get isAttached(){return null!=this._attachedHost}setAttachedHost(xe){this._attachedHost=xe}}class w extends P{constructor(xe,de,re,oe,me){super(),this.component=xe,this.viewContainerRef=de,this.injector=re,this.componentFactoryResolver=oe,this.projectableNodes=me}}class B extends P{constructor(xe,de,re,oe){super(),this.templateRef=xe,this.viewContainerRef=de,this.context=re,this.injector=oe}get origin(){return this.templateRef.elementRef}attach(xe,de=this.context){return this.context=de,super.attach(xe)}detach(){return this.context=void 0,super.detach()}}class Y extends P{constructor(xe){super(),this.element=xe instanceof o.SBq?xe.nativeElement:xe}}class V{constructor(){this._isDisposed=!1,this.attachDomPortal=null}hasAttached(){return!!this._attachedPortal}attach(xe){return xe instanceof w?(this._attachedPortal=xe,this.attachComponentPortal(xe)):xe instanceof B?(this._attachedPortal=xe,this.attachTemplatePortal(xe)):this.attachDomPortal&&xe instanceof Y?(this._attachedPortal=xe,this.attachDomPortal(xe)):void 0}detach(){this._attachedPortal&&(this._attachedPortal.setAttachedHost(null),this._attachedPortal=null),this._invokeDisposeFn()}dispose(){this.hasAttached()&&this.detach(),this._invokeDisposeFn(),this._isDisposed=!0}setDisposeFn(xe){this._disposeFn=xe}_invokeDisposeFn(){this._disposeFn&&(this._disposeFn(),this._disposeFn=null)}}class he extends V{constructor(xe,de,re,oe,me){super(),this.outletElement=xe,this._componentFactoryResolver=de,this._appRef=re,this._defaultInjector=oe,this.attachDomPortal=be=>{this._document;const le=be.element;le.parentNode;const Z=this._document.createComment("dom-portal");le.parentNode.insertBefore(Z,le),this.outletElement.appendChild(le),this._attachedPortal=be,super.setDisposeFn(()=>{Z.parentNode&&Z.parentNode.replaceChild(le,Z)})},this._document=me}attachComponentPortal(xe){const re=(xe.componentFactoryResolver||this._componentFactoryResolver).resolveComponentFactory(xe.component);let oe;return xe.viewContainerRef?(oe=xe.viewContainerRef.createComponent(re,xe.viewContainerRef.length,xe.injector||xe.viewContainerRef.injector,xe.projectableNodes||void 0),this.setDisposeFn(()=>oe.destroy())):(oe=re.create(xe.injector||this._defaultInjector||o.zs3.NULL),this._appRef.attachView(oe.hostView),this.setDisposeFn(()=>{this._appRef.viewCount>0&&this._appRef.detachView(oe.hostView),oe.destroy()})),this.outletElement.appendChild(this._getComponentRootNode(oe)),this._attachedPortal=xe,oe}attachTemplatePortal(xe){let de=xe.viewContainerRef,re=de.createEmbeddedView(xe.templateRef,xe.context,{injector:xe.injector});return re.rootNodes.forEach(oe=>this.outletElement.appendChild(oe)),re.detectChanges(),this.setDisposeFn(()=>{let oe=de.indexOf(re);-1!==oe&&de.remove(oe)}),this._attachedPortal=xe,re}dispose(){super.dispose(),this.outletElement.remove()}_getComponentRootNode(xe){return xe.hostView.rootNodes[0]}}class X extends B{constructor(xe,de){super(xe,de)}}X.\u0275fac=function(xe){return new(xe||X)(o.Y36(o.Rgc),o.Y36(o.s_b))},X.\u0275dir=o.lG2({type:X,selectors:[["","cdkPortal",""]],exportAs:["cdkPortal"],features:[o.qOj]});class ve extends X{}ve.\u0275fac=function(){let Pe;return function(de){return(Pe||(Pe=o.n5z(ve)))(de||ve)}}(),ve.\u0275dir=o.lG2({type:ve,selectors:[["","cdk-portal",""],["","portal",""]],exportAs:["cdkPortal"],features:[o._Bn([{provide:X,useExisting:ve}]),o.qOj]});class ye extends V{constructor(xe,de,re){super(),this._componentFactoryResolver=xe,this._viewContainerRef=de,this._isInitialized=!1,this.attached=new o.vpe,this.attachDomPortal=oe=>{this._document;const me=oe.element;me.parentNode;const be=this._document.createComment("dom-portal");oe.setAttachedHost(this),me.parentNode.insertBefore(be,me),this._getRootNode().appendChild(me),this._attachedPortal=oe,super.setDisposeFn(()=>{be.parentNode&&be.parentNode.replaceChild(me,be)})},this._document=re}get portal(){return this._attachedPortal}set portal(xe){this.hasAttached()&&!xe&&!this._isInitialized||(this.hasAttached()&&super.detach(),xe&&super.attach(xe),this._attachedPortal=xe||null)}get attachedRef(){return this._attachedRef}ngOnInit(){this._isInitialized=!0}ngOnDestroy(){super.dispose(),this._attachedRef=this._attachedPortal=null}attachComponentPortal(xe){xe.setAttachedHost(this);const de=null!=xe.viewContainerRef?xe.viewContainerRef:this._viewContainerRef,oe=(xe.componentFactoryResolver||this._componentFactoryResolver).resolveComponentFactory(xe.component),me=de.createComponent(oe,de.length,xe.injector||de.injector,xe.projectableNodes||void 0);return de!==this._viewContainerRef&&this._getRootNode().appendChild(me.hostView.rootNodes[0]),super.setDisposeFn(()=>me.destroy()),this._attachedPortal=xe,this._attachedRef=me,this.attached.emit(me),me}attachTemplatePortal(xe){xe.setAttachedHost(this);const de=this._viewContainerRef.createEmbeddedView(xe.templateRef,xe.context,{injector:xe.injector});return super.setDisposeFn(()=>this._viewContainerRef.clear()),this._attachedPortal=xe,this._attachedRef=de,this.attached.emit(de),de}_getRootNode(){const xe=this._viewContainerRef.element.nativeElement;return xe.nodeType===xe.ELEMENT_NODE?xe:xe.parentNode}}ye.\u0275fac=function(xe){return new(xe||ye)(o.Y36(o._Vd),o.Y36(o.s_b),o.Y36(e.K0))},ye.\u0275dir=o.lG2({type:ye,selectors:[["","cdkPortalOutlet",""]],inputs:{portal:["cdkPortalOutlet","portal"]},outputs:{attached:"attached"},exportAs:["cdkPortalOutlet"],features:[o.qOj]});class ge extends ye{}ge.\u0275fac=function(){let Pe;return function(de){return(Pe||(Pe=o.n5z(ge)))(de||ge)}}(),ge.\u0275dir=o.lG2({type:ge,selectors:[["","cdkPortalHost",""],["","portalHost",""]],inputs:{portal:["cdkPortalHost","portal"]},exportAs:["cdkPortalHost"],features:[o._Bn([{provide:ye,useExisting:ge}]),o.qOj]});class ne{}ne.\u0275fac=function(xe){return new(xe||ne)},ne.\u0275mod=o.oAB({type:ne}),ne.\u0275inj=o.cJS({})},67376:(qe,I,p)=>{"use strict";p.d(I,{Cl:()=>Ct,ZD:()=>ft,mF:()=>le,rL:()=>j});var o=p(21281),e=p(94650),l=p(77579),D=p(39646),g=p(69751),E=p(54968),T=p(66406),n=p(53101),P=p(50727),w=p(45191),B=p(71884),Y=p(23601),V=p(39300),ue=p(82722),he=p(68675),ae=p(11520),X=p(63900),ve=p(34782),ye=p(83353),ge=p(36895),ne=p(40445),pe=p(95017);const Pe=["contentWrapper"],de=new e.OlP("VIRTUAL_SCROLL_STRATEGY");class re{constructor(He,st,nn){this._scrolledIndexChange=new l.x,this.scrolledIndexChange=this._scrolledIndexChange.pipe((0,B.x)()),this._viewport=null,this._itemSize=He,this._minBufferPx=st,this._maxBufferPx=nn}attach(He){this._viewport=He,this._updateTotalContentSize(),this._updateRenderedRange()}detach(){this._scrolledIndexChange.complete(),this._viewport=null}updateItemAndBufferSize(He,st,nn){this._itemSize=He,this._minBufferPx=st,this._maxBufferPx=nn,this._updateTotalContentSize(),this._updateRenderedRange()}onContentScrolled(){this._updateRenderedRange()}onDataLengthChanged(){this._updateTotalContentSize(),this._updateRenderedRange()}onContentRendered(){}onRenderedOffsetChanged(){}scrollToIndex(He,st){this._viewport&&this._viewport.scrollToOffset(He*this._itemSize,st)}_updateTotalContentSize(){this._viewport&&this._viewport.setTotalContentSize(this._viewport.getDataLength()*this._itemSize)}_updateRenderedRange(){if(!this._viewport)return;const He=this._viewport.getRenderedRange(),st={start:He.start,end:He.end},nn=this._viewport.getViewportSize(),Dn=this._viewport.getDataLength();let Mn=this._viewport.measureScrollOffset(),vi=this._itemSize>0?Mn/this._itemSize:0;if(st.end>Dn){const mi=Math.ceil(nn/this._itemSize),wi=Math.max(0,Math.min(vi,Dn-mi));vi!=wi&&(vi=wi,Mn=wi*this._itemSize,st.start=Math.floor(vi)),st.end=Math.max(0,Math.min(Dn,st.start+mi))}const Gi=Mn-st.start*this._itemSize;if(Gi<this._minBufferPx&&0!=st.start){const mi=Math.ceil((this._maxBufferPx-Gi)/this._itemSize);st.start=Math.max(0,st.start-mi),st.end=Math.min(Dn,Math.ceil(vi+(nn+this._minBufferPx)/this._itemSize))}else{const mi=st.end*this._itemSize-(Mn+nn);if(mi<this._minBufferPx&&st.end!=Dn){const wi=Math.ceil((this._maxBufferPx-mi)/this._itemSize);wi>0&&(st.end=Math.min(Dn,st.end+wi),st.start=Math.max(0,Math.floor(vi-this._minBufferPx/this._itemSize)))}}this._viewport.setRenderedRange(st),this._viewport.setRenderedContentOffset(this._itemSize*st.start),this._scrolledIndexChange.next(Math.floor(vi))}}class me{constructor(){this._itemSize=20,this._minBufferPx=100,this._maxBufferPx=200,this._scrollStrategy=new re(this.itemSize,this.minBufferPx,this.maxBufferPx)}get itemSize(){return this._itemSize}set itemSize(He){this._itemSize=(0,o.su)(He)}get minBufferPx(){return this._minBufferPx}set minBufferPx(He){this._minBufferPx=(0,o.su)(He)}get maxBufferPx(){return this._maxBufferPx}set maxBufferPx(He){this._maxBufferPx=(0,o.su)(He)}ngOnChanges(){this._scrollStrategy.updateItemAndBufferSize(this.itemSize,this.minBufferPx,this.maxBufferPx)}}me.\u0275fac=function(He){return new(He||me)},me.\u0275dir=e.lG2({type:me,selectors:[["cdk-virtual-scroll-viewport","itemSize",""]],inputs:{itemSize:"itemSize",minBufferPx:"minBufferPx",maxBufferPx:"maxBufferPx"},standalone:!0,features:[e._Bn([{provide:de,useFactory:function oe(rn){return rn._scrollStrategy},deps:[(0,e.Gpc)(()=>me)]}]),e.TTD]});class le{constructor(He,st,nn){this._ngZone=He,this._platform=st,this._scrolled=new l.x,this._globalSubscription=null,this._scrolledCount=0,this.scrollContainers=new Map,this._document=nn}register(He){this.scrollContainers.has(He)||this.scrollContainers.set(He,He.elementScrolled().subscribe(()=>this._scrolled.next(He)))}deregister(He){const st=this.scrollContainers.get(He);st&&(st.unsubscribe(),this.scrollContainers.delete(He))}scrolled(He=20){return this._platform.isBrowser?new g.y(st=>{this._globalSubscription||this._addGlobalListener();const nn=He>0?this._scrolled.pipe((0,Y.e)(He)).subscribe(st):this._scrolled.subscribe(st);return this._scrolledCount++,()=>{nn.unsubscribe(),this._scrolledCount--,this._scrolledCount||this._removeGlobalListener()}}):(0,D.of)()}ngOnDestroy(){this._removeGlobalListener(),this.scrollContainers.forEach((He,st)=>this.deregister(st)),this._scrolled.complete()}ancestorScrolled(He,st){const nn=this.getAncestorScrollContainers(He);return this.scrolled(st).pipe((0,V.h)(Dn=>!Dn||nn.indexOf(Dn)>-1))}getAncestorScrollContainers(He){const st=[];return this.scrollContainers.forEach((nn,Dn)=>{this._scrollableContainsElement(Dn,He)&&st.push(Dn)}),st}_getWindow(){return this._document.defaultView||window}_scrollableContainsElement(He,st){let nn=(0,o.fI)(st),Dn=He.getElementRef().nativeElement;do{if(nn==Dn)return!0}while(nn=nn.parentElement);return!1}_addGlobalListener(){this._globalSubscription=this._ngZone.runOutsideAngular(()=>{const He=this._getWindow();return(0,E.R)(He.document,"scroll").subscribe(()=>this._scrolled.next())})}_removeGlobalListener(){this._globalSubscription&&(this._globalSubscription.unsubscribe(),this._globalSubscription=null)}}le.\u0275fac=function(He){return new(He||le)(e.LFG(e.R0b),e.LFG(ye.t4),e.LFG(ge.K0,8))},le.\u0275prov=e.Yz7({token:le,factory:le.\u0275fac,providedIn:"root"});class Z{constructor(He,st,nn,Dn){this.elementRef=He,this.scrollDispatcher=st,this.ngZone=nn,this.dir=Dn,this._destroyed=new l.x,this._elementScrolled=new g.y(Mn=>this.ngZone.runOutsideAngular(()=>(0,E.R)(this.elementRef.nativeElement,"scroll").pipe((0,ue.R)(this._destroyed)).subscribe(Mn)))}ngOnInit(){this.scrollDispatcher.register(this)}ngOnDestroy(){this.scrollDispatcher.deregister(this),this._destroyed.next(),this._destroyed.complete()}elementScrolled(){return this._elementScrolled}getElementRef(){return this.elementRef}scrollTo(He){const st=this.elementRef.nativeElement,nn=this.dir&&"rtl"==this.dir.value;null==He.left&&(He.left=nn?He.end:He.start),null==He.right&&(He.right=nn?He.start:He.end),null!=He.bottom&&(He.top=st.scrollHeight-st.clientHeight-He.bottom),nn&&0!=(0,ye._i)()?(null!=He.left&&(He.right=st.scrollWidth-st.clientWidth-He.left),2==(0,ye._i)()?He.left=He.right:1==(0,ye._i)()&&(He.left=He.right?-He.right:He.right)):null!=He.right&&(He.left=st.scrollWidth-st.clientWidth-He.right),this._applyScrollToOptions(He)}_applyScrollToOptions(He){const st=this.elementRef.nativeElement;(0,ye.Mq)()?st.scrollTo(He):(null!=He.top&&(st.scrollTop=He.top),null!=He.left&&(st.scrollLeft=He.left))}measureScrollOffset(He){const st="left",Dn=this.elementRef.nativeElement;if("top"==He)return Dn.scrollTop;if("bottom"==He)return Dn.scrollHeight-Dn.clientHeight-Dn.scrollTop;const Mn=this.dir&&"rtl"==this.dir.value;return"start"==He?He=Mn?"right":st:"end"==He&&(He=Mn?st:"right"),Mn&&2==(0,ye._i)()?He==st?Dn.scrollWidth-Dn.clientWidth-Dn.scrollLeft:Dn.scrollLeft:Mn&&1==(0,ye._i)()?He==st?Dn.scrollLeft+Dn.scrollWidth-Dn.clientWidth:-Dn.scrollLeft:He==st?Dn.scrollLeft:Dn.scrollWidth-Dn.clientWidth-Dn.scrollLeft}}Z.\u0275fac=function(He){return new(He||Z)(e.Y36(e.SBq),e.Y36(le),e.Y36(e.R0b),e.Y36(ne.Is,8))},Z.\u0275dir=e.lG2({type:Z,selectors:[["","cdk-scrollable",""],["","cdkScrollable",""]],standalone:!0});class j{constructor(He,st,nn){this._platform=He,this._change=new l.x,this._changeListener=Dn=>{this._change.next(Dn)},this._document=nn,st.runOutsideAngular(()=>{if(He.isBrowser){const Dn=this._getWindow();Dn.addEventListener("resize",this._changeListener),Dn.addEventListener("orientationchange",this._changeListener)}this.change().subscribe(()=>this._viewportSize=null)})}ngOnDestroy(){if(this._platform.isBrowser){const He=this._getWindow();He.removeEventListener("resize",this._changeListener),He.removeEventListener("orientationchange",this._changeListener)}this._change.complete()}getViewportSize(){this._viewportSize||this._updateViewportSize();const He={width:this._viewportSize.width,height:this._viewportSize.height};return this._platform.isBrowser||(this._viewportSize=null),He}getViewportRect(){const He=this.getViewportScrollPosition(),{width:st,height:nn}=this.getViewportSize();return{top:He.top,left:He.left,bottom:He.top+nn,right:He.left+st,height:nn,width:st}}getViewportScrollPosition(){if(!this._platform.isBrowser)return{top:0,left:0};const He=this._document,st=this._getWindow(),nn=He.documentElement,Dn=nn.getBoundingClientRect();return{top:-Dn.top||He.body.scrollTop||st.scrollY||nn.scrollTop||0,left:-Dn.left||He.body.scrollLeft||st.scrollX||nn.scrollLeft||0}}change(He=20){return He>0?this._change.pipe((0,Y.e)(He)):this._change}_getWindow(){return this._document.defaultView||window}_updateViewportSize(){const He=this._getWindow();this._viewportSize=this._platform.isBrowser?{width:He.innerWidth,height:He.innerHeight}:{width:0,height:0}}}j.\u0275fac=function(He){return new(He||j)(e.LFG(ye.t4),e.LFG(e.R0b),e.LFG(ge.K0,8))},j.\u0275prov=e.Yz7({token:j,factory:j.\u0275fac,providedIn:"root"});const ke=new e.OlP("VIRTUAL_SCROLLABLE");class Be extends Z{constructor(He,st,nn,Dn){super(He,st,nn,Dn)}measureViewportSize(He){const st=this.elementRef.nativeElement;return"horizontal"===He?st.clientWidth:st.clientHeight}}Be.\u0275fac=function(He){return new(He||Be)(e.Y36(e.SBq),e.Y36(le),e.Y36(e.R0b),e.Y36(ne.Is,8))},Be.\u0275dir=e.lG2({type:Be,features:[e.qOj]});const mt=typeof requestAnimationFrame<"u"?T.Z:n.E;class ut extends Be{get orientation(){return this._orientation}set orientation(He){this._orientation!==He&&(this._orientation=He,this._calculateSpacerSize())}get appendOnly(){return this._appendOnly}set appendOnly(He){this._appendOnly=(0,o.Ig)(He)}constructor(He,st,nn,Dn,Mn,vi,Gi,mi){super(He,vi,nn,Mn),this.elementRef=He,this._changeDetectorRef=st,this._scrollStrategy=Dn,this.scrollable=mi,this._platform=(0,e.f3M)(ye.t4),this._detachedSubject=new l.x,this._renderedRangeSubject=new l.x,this._orientation="vertical",this._appendOnly=!1,this.scrolledIndexChange=new g.y(wi=>this._scrollStrategy.scrolledIndexChange.subscribe(Bn=>Promise.resolve().then(()=>this.ngZone.run(()=>wi.next(Bn))))),this.renderedRangeStream=this._renderedRangeSubject,this._totalContentSize=0,this._totalContentWidth="",this._totalContentHeight="",this._renderedRange={start:0,end:0},this._dataLength=0,this._viewportSize=0,this._renderedContentOffset=0,this._renderedContentOffsetNeedsRewrite=!1,this._isChangeDetectionPending=!1,this._runAfterChangeDetection=[],this._viewportChanges=P.w0.EMPTY,this._viewportChanges=Gi.change().subscribe(()=>{this.checkViewportSize()}),this.scrollable||(this.elementRef.nativeElement.classList.add("cdk-virtual-scrollable"),this.scrollable=this)}ngOnInit(){this._platform.isBrowser&&(this.scrollable===this&&super.ngOnInit(),this.ngZone.runOutsideAngular(()=>Promise.resolve().then(()=>{this._measureViewportSize(),this._scrollStrategy.attach(this),this.scrollable.elementScrolled().pipe((0,he.O)(null),(0,Y.e)(0,mt)).subscribe(()=>this._scrollStrategy.onContentScrolled()),this._markChangeDetectionNeeded()})))}ngOnDestroy(){this.detach(),this._scrollStrategy.detach(),this._renderedRangeSubject.complete(),this._detachedSubject.complete(),this._viewportChanges.unsubscribe(),super.ngOnDestroy()}attach(He){this._forOf,this.ngZone.runOutsideAngular(()=>{this._forOf=He,this._forOf.dataStream.pipe((0,ue.R)(this._detachedSubject)).subscribe(st=>{const nn=st.length;nn!==this._dataLength&&(this._dataLength=nn,this._scrollStrategy.onDataLengthChanged()),this._doChangeDetection()})})}detach(){this._forOf=null,this._detachedSubject.next()}getDataLength(){return this._dataLength}getViewportSize(){return this._viewportSize}getRenderedRange(){return this._renderedRange}measureBoundingClientRectWithScrollOffset(He){return this.getElementRef().nativeElement.getBoundingClientRect()[He]}setTotalContentSize(He){this._totalContentSize!==He&&(this._totalContentSize=He,this._calculateSpacerSize(),this._markChangeDetectionNeeded())}setRenderedRange(He){(function nt(rn,He){return rn.start==He.start&&rn.end==He.end})(this._renderedRange,He)||(this.appendOnly&&(He={start:0,end:Math.max(this._renderedRange.end,He.end)}),this._renderedRangeSubject.next(this._renderedRange=He),this._markChangeDetectionNeeded(()=>this._scrollStrategy.onContentRendered()))}getOffsetToRenderedContentStart(){return this._renderedContentOffsetNeedsRewrite?null:this._renderedContentOffset}setRenderedContentOffset(He,st="to-start"){He=this.appendOnly&&"to-start"===st?0:He;const nn=this.dir&&"rtl"==this.dir.value,Dn="horizontal"==this.orientation,Mn=Dn?"X":"Y";let Gi=`translate${Mn}(${Number((Dn&&nn?-1:1)*He)}px)`;this._renderedContentOffset=He,"to-end"===st&&(Gi+=` translate${Mn}(-100%)`,this._renderedContentOffsetNeedsRewrite=!0),this._renderedContentTransform!=Gi&&(this._renderedContentTransform=Gi,this._markChangeDetectionNeeded(()=>{this._renderedContentOffsetNeedsRewrite?(this._renderedContentOffset-=this.measureRenderedContentSize(),this._renderedContentOffsetNeedsRewrite=!1,this.setRenderedContentOffset(this._renderedContentOffset)):this._scrollStrategy.onRenderedOffsetChanged()}))}scrollToOffset(He,st="auto"){const nn={behavior:st};"horizontal"===this.orientation?nn.start=He:nn.top=He,this.scrollable.scrollTo(nn)}scrollToIndex(He,st="auto"){this._scrollStrategy.scrollToIndex(He,st)}measureScrollOffset(He){let st;return st=this.scrollable==this?nn=>super.measureScrollOffset(nn):nn=>this.scrollable.measureScrollOffset(nn),Math.max(0,st(He??("horizontal"===this.orientation?"start":"top"))-this.measureViewportOffset())}measureViewportOffset(He){let st;const Mn="rtl"==this.dir?.value;st="start"==He?Mn?"right":"left":"end"==He?Mn?"left":"right":He||("horizontal"===this.orientation?"left":"top");const vi=this.scrollable.measureBoundingClientRectWithScrollOffset(st);return this.elementRef.nativeElement.getBoundingClientRect()[st]-vi}measureRenderedContentSize(){const He=this._contentWrapper.nativeElement;return"horizontal"===this.orientation?He.offsetWidth:He.offsetHeight}measureRangeSize(He){return this._forOf?this._forOf.measureRangeSize(He,this.orientation):0}checkViewportSize(){this._measureViewportSize(),this._scrollStrategy.onDataLengthChanged()}_measureViewportSize(){this._viewportSize=this.scrollable.measureViewportSize(this.orientation)}_markChangeDetectionNeeded(He){He&&this._runAfterChangeDetection.push(He),this._isChangeDetectionPending||(this._isChangeDetectionPending=!0,this.ngZone.runOutsideAngular(()=>Promise.resolve().then(()=>{this._doChangeDetection()})))}_doChangeDetection(){this._isChangeDetectionPending=!1,this._contentWrapper.nativeElement.style.transform=this._renderedContentTransform,this.ngZone.run(()=>this._changeDetectorRef.markForCheck());const He=this._runAfterChangeDetection;this._runAfterChangeDetection=[];for(const st of He)st()}_calculateSpacerSize(){this._totalContentHeight="horizontal"===this.orientation?"":`${this._totalContentSize}px`,this._totalContentWidth="horizontal"===this.orientation?`${this._totalContentSize}px`:""}}function Ve(rn,He,st){const nn=st;if(!nn.getBoundingClientRect)return 0;const Dn=nn.getBoundingClientRect();return"horizontal"===rn?"start"===He?Dn.left:Dn.right:"start"===He?Dn.top:Dn.bottom}ut.\u0275fac=function(He){return new(He||ut)(e.Y36(e.SBq),e.Y36(e.sBO),e.Y36(e.R0b),e.Y36(de,8),e.Y36(ne.Is,8),e.Y36(le),e.Y36(j),e.Y36(ke,8))},ut.\u0275cmp=e.Xpm({type:ut,selectors:[["cdk-virtual-scroll-viewport"]],viewQuery:function(He,st){if(1&He&&e.Gf(Pe,7),2&He){let nn;e.iGM(nn=e.CRH())&&(st._contentWrapper=nn.first)}},hostAttrs:[1,"cdk-virtual-scroll-viewport"],hostVars:4,hostBindings:function(He,st){2&He&&e.ekj("cdk-virtual-scroll-orientation-horizontal","horizontal"===st.orientation)("cdk-virtual-scroll-orientation-vertical","horizontal"!==st.orientation)},inputs:{orientation:"orientation",appendOnly:"appendOnly"},outputs:{scrolledIndexChange:"scrolledIndexChange"},standalone:!0,features:[e._Bn([{provide:Z,useFactory:(rn,He)=>rn||He,deps:[[new e.FiY,new e.tBr(ke)],ut]}]),e.qOj,e.jDz],ngContentSelectors:["*"],decls:4,vars:4,consts:[[1,"cdk-virtual-scroll-content-wrapper"],["contentWrapper",""],[1,"cdk-virtual-scroll-spacer"]],template:function(He,st){1&He&&(e.F$t(),e.TgZ(0,"div",0,1),e.Hsn(2),e.qZA(),e._UZ(3,"div",2)),2&He&&(e.xp6(3),e.Udp("width",st._totalContentWidth)("height",st._totalContentHeight))},styles:["cdk-virtual-scroll-viewport{display:block;position:relative;transform:translateZ(0)}.cdk-virtual-scrollable{overflow:auto;will-change:scroll-position;contain:strict;-webkit-overflow-scrolling:touch}.cdk-virtual-scroll-content-wrapper{position:absolute;top:0;left:0;contain:content}[dir=rtl] .cdk-virtual-scroll-content-wrapper{right:0;left:auto}.cdk-virtual-scroll-orientation-horizontal .cdk-virtual-scroll-content-wrapper{min-height:100%}.cdk-virtual-scroll-orientation-horizontal .cdk-virtual-scroll-content-wrapper>dl:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-horizontal .cdk-virtual-scroll-content-wrapper>ol:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-horizontal .cdk-virtual-scroll-content-wrapper>table:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-horizontal .cdk-virtual-scroll-content-wrapper>ul:not([cdkVirtualFor]){padding-left:0;padding-right:0;margin-left:0;margin-right:0;border-left-width:0;border-right-width:0;outline:none}.cdk-virtual-scroll-orientation-vertical .cdk-virtual-scroll-content-wrapper{min-width:100%}.cdk-virtual-scroll-orientation-vertical .cdk-virtual-scroll-content-wrapper>dl:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-vertical .cdk-virtual-scroll-content-wrapper>ol:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-vertical .cdk-virtual-scroll-content-wrapper>table:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-vertical .cdk-virtual-scroll-content-wrapper>ul:not([cdkVirtualFor]){padding-top:0;padding-bottom:0;margin-top:0;margin-bottom:0;border-top-width:0;border-bottom-width:0;outline:none}.cdk-virtual-scroll-spacer{height:1px;transform-origin:0 0;flex:0 0 auto}[dir=rtl] .cdk-virtual-scroll-spacer{transform-origin:100% 0}"],encapsulation:2,changeDetection:0});class tt{get cdkVirtualForOf(){return this._cdkVirtualForOf}set cdkVirtualForOf(He){this._cdkVirtualForOf=He,(0,pe.Z9)(He)?this._dataSourceChanges.next(He):this._dataSourceChanges.next(new pe.P3((0,w.b)(He)?He:Array.from(He||[])))}get cdkVirtualForTrackBy(){return this._cdkVirtualForTrackBy}set cdkVirtualForTrackBy(He){this._needsUpdate=!0,this._cdkVirtualForTrackBy=He?(st,nn)=>He(st+(this._renderedRange?this._renderedRange.start:0),nn):void 0}set cdkVirtualForTemplate(He){He&&(this._needsUpdate=!0,this._template=He)}get cdkVirtualForTemplateCacheSize(){return this._viewRepeater.viewCacheSize}set cdkVirtualForTemplateCacheSize(He){this._viewRepeater.viewCacheSize=(0,o.su)(He)}constructor(He,st,nn,Dn,Mn,vi){this._viewContainerRef=He,this._template=st,this._differs=nn,this._viewRepeater=Dn,this._viewport=Mn,this.viewChange=new l.x,this._dataSourceChanges=new l.x,this.dataStream=this._dataSourceChanges.pipe((0,he.O)(null),(0,ae.G)(),(0,X.w)(([Gi,mi])=>this._changeDataSource(Gi,mi)),(0,ve.d)(1)),this._differ=null,this._needsUpdate=!1,this._destroyed=new l.x,this.dataStream.subscribe(Gi=>{this._data=Gi,this._onRenderedDataChange()}),this._viewport.renderedRangeStream.pipe((0,ue.R)(this._destroyed)).subscribe(Gi=>{this._renderedRange=Gi,this.viewChange.observers.length&&vi.run(()=>this.viewChange.next(this._renderedRange)),this._onRenderedDataChange()}),this._viewport.attach(this)}measureRangeSize(He,st){if(He.start>=He.end)return 0;He.start<this._renderedRange.start||(He.end,this._renderedRange.end);const nn=He.start-this._renderedRange.start,Dn=He.end-He.start;let Mn,vi;for(let Gi=0;Gi<Dn;Gi++){const mi=this._viewContainerRef.get(Gi+nn);if(mi&&mi.rootNodes.length){Mn=vi=mi.rootNodes[0];break}}for(let Gi=Dn-1;Gi>-1;Gi--){const mi=this._viewContainerRef.get(Gi+nn);if(mi&&mi.rootNodes.length){vi=mi.rootNodes[mi.rootNodes.length-1];break}}return Mn&&vi?Ve(st,"end",vi)-Ve(st,"start",Mn):0}ngDoCheck(){if(this._differ&&this._needsUpdate){const He=this._differ.diff(this._renderedItems);He?this._applyChanges(He):this._updateContext(),this._needsUpdate=!1}}ngOnDestroy(){this._viewport.detach(),this._dataSourceChanges.next(void 0),this._dataSourceChanges.complete(),this.viewChange.complete(),this._destroyed.next(),this._destroyed.complete(),this._viewRepeater.detach()}_onRenderedDataChange(){this._renderedRange&&(this._renderedItems=this._data.slice(this._renderedRange.start,this._renderedRange.end),this._differ||(this._differ=this._differs.find(this._renderedItems).create((He,st)=>this.cdkVirtualForTrackBy?this.cdkVirtualForTrackBy(He,st):st)),this._needsUpdate=!0)}_changeDataSource(He,st){return He&&He.disconnect(this),this._needsUpdate=!0,st?st.connect(this):(0,D.of)()}_updateContext(){const He=this._data.length;let st=this._viewContainerRef.length;for(;st--;){const nn=this._viewContainerRef.get(st);nn.context.index=this._renderedRange.start+st,nn.context.count=He,this._updateComputedContextProperties(nn.context),nn.detectChanges()}}_applyChanges(He){this._viewRepeater.applyChanges(He,this._viewContainerRef,(Dn,Mn,vi)=>this._getEmbeddedViewArgs(Dn,vi),Dn=>Dn.item),He.forEachIdentityChange(Dn=>{this._viewContainerRef.get(Dn.currentIndex).context.$implicit=Dn.item});const st=this._data.length;let nn=this._viewContainerRef.length;for(;nn--;){const Dn=this._viewContainerRef.get(nn);Dn.context.index=this._renderedRange.start+nn,Dn.context.count=st,this._updateComputedContextProperties(Dn.context)}}_updateComputedContextProperties(He){He.first=0===He.index,He.last=He.index===He.count-1,He.even=He.index%2==0,He.odd=!He.even}_getEmbeddedViewArgs(He,st){return{templateRef:this._template,context:{$implicit:He.item,cdkVirtualForOf:this._cdkVirtualForOf,index:-1,count:-1,first:!1,last:!1,odd:!1,even:!1},index:st}}}tt.\u0275fac=function(He){return new(He||tt)(e.Y36(e.s_b),e.Y36(e.Rgc),e.Y36(e.ZZ4),e.Y36(pe.k),e.Y36(ut,4),e.Y36(e.R0b))},tt.\u0275dir=e.lG2({type:tt,selectors:[["","cdkVirtualFor","","cdkVirtualForOf",""]],inputs:{cdkVirtualForOf:"cdkVirtualForOf",cdkVirtualForTrackBy:"cdkVirtualForTrackBy",cdkVirtualForTemplate:"cdkVirtualForTemplate",cdkVirtualForTemplateCacheSize:"cdkVirtualForTemplateCacheSize"},standalone:!0,features:[e._Bn([{provide:pe.k,useClass:pe.eX}])]});class Ne extends Be{constructor(He,st,nn,Dn){super(He,st,nn,Dn)}measureBoundingClientRectWithScrollOffset(He){return this.getElementRef().nativeElement.getBoundingClientRect()[He]-this.measureScrollOffset(He)}}Ne.\u0275fac=function(He){return new(He||Ne)(e.Y36(e.SBq),e.Y36(le),e.Y36(e.R0b),e.Y36(ne.Is,8))},Ne.\u0275dir=e.lG2({type:Ne,selectors:[["","cdkVirtualScrollingElement",""]],hostAttrs:[1,"cdk-virtual-scrollable"],standalone:!0,features:[e._Bn([{provide:ke,useExisting:Ne}]),e.qOj]});class wt extends Be{constructor(He,st,nn){super(new e.SBq(document.documentElement),He,st,nn),this._elementScrolled=new g.y(Dn=>this.ngZone.runOutsideAngular(()=>(0,E.R)(document,"scroll").pipe((0,ue.R)(this._destroyed)).subscribe(Dn)))}measureBoundingClientRectWithScrollOffset(He){return this.getElementRef().nativeElement.getBoundingClientRect()[He]}}wt.\u0275fac=function(He){return new(He||wt)(e.Y36(le),e.Y36(e.R0b),e.Y36(ne.Is,8))},wt.\u0275dir=e.lG2({type:wt,selectors:[["cdk-virtual-scroll-viewport","scrollWindow",""]],standalone:!0,features:[e._Bn([{provide:ke,useExisting:wt}]),e.qOj]});class ft{}ft.\u0275fac=function(He){return new(He||ft)},ft.\u0275mod=e.oAB({type:ft}),ft.\u0275inj=e.cJS({});class Ct{}Ct.\u0275fac=function(He){return new(He||Ct)},Ct.\u0275mod=e.oAB({type:Ct}),Ct.\u0275inj=e.cJS({imports:[ne.vT,ft,ut,ne.vT,ft]})},36895:(qe,I,p)=>{"use strict";p.d(I,{Do:()=>ye,ED:()=>Ri,EM:()=>La,H9:()=>$r,HT:()=>D,JF:()=>We,JJ:()=>ns,K0:()=>E,Mx:()=>Ut,NF:()=>ar,Nd:()=>ja,O5:()=>St,Ov:()=>ts,PC:()=>_o,PM:()=>vr,RF:()=>ii,S$:()=>ae,Ts:()=>Vo,V_:()=>P,Ye:()=>ge,b0:()=>ve,bD:()=>Jn,ez:()=>al,gd:()=>ln,mk:()=>xi,n9:()=>hi,p6:()=>Vi,q:()=>l,qS:()=>Ft,rS:()=>$a,sg:()=>at,tP:()=>Si,uU:()=>ur,uf:()=>Ii,w_:()=>g});var o=p(94650);let e=null;function l(){return e}function D(ht){e||(e=ht)}class g{}const E=new o.OlP("DocumentToken");class T{historyGo(Ke){throw new Error("Not implemented")}}T.\u0275fac=function(Ke){return new(Ke||T)},T.\u0275prov=o.Yz7({token:T,factory:function(){return function n(){return(0,o.LFG)(w)}()},providedIn:"platform"});const P=new o.OlP("Location Initialized");class w extends T{constructor(Ke){super(),this._doc=Ke,this._location=window.location,this._history=window.history}getBaseHrefFromDOM(){return l().getBaseHref(this._doc)}onPopState(Ke){const dn=l().getGlobalEventTarget(this._doc,"window");return dn.addEventListener("popstate",Ke,!1),()=>dn.removeEventListener("popstate",Ke)}onHashChange(Ke){const dn=l().getGlobalEventTarget(this._doc,"window");return dn.addEventListener("hashchange",Ke,!1),()=>dn.removeEventListener("hashchange",Ke)}get href(){return this._location.href}get protocol(){return this._location.protocol}get hostname(){return this._location.hostname}get port(){return this._location.port}get pathname(){return this._location.pathname}get search(){return this._location.search}get hash(){return this._location.hash}set pathname(Ke){this._location.pathname=Ke}pushState(Ke,dn,Kn){B()?this._history.pushState(Ke,dn,Kn):this._location.hash=Kn}replaceState(Ke,dn,Kn){B()?this._history.replaceState(Ke,dn,Kn):this._location.hash=Kn}forward(){this._history.forward()}back(){this._history.back()}historyGo(Ke=0){this._history.go(Ke)}getState(){return this._history.state}}function B(){return!!window.history.pushState}function V(ht,Ke){if(0==ht.length)return Ke;if(0==Ke.length)return ht;let dn=0;return ht.endsWith("/")&&dn++,Ke.startsWith("/")&&dn++,2==dn?ht+Ke.substring(1):1==dn?ht+Ke:ht+"/"+Ke}function ue(ht){const Ke=ht.match(/#|\?|$/),dn=Ke&&Ke.index||ht.length,Kn=dn-("/"===ht[dn-1]?1:0);return ht.slice(0,Kn)+ht.slice(dn)}function he(ht){return ht&&"?"!==ht[0]?"?"+ht:ht}w.\u0275fac=function(Ke){return new(Ke||w)(o.LFG(E))},w.\u0275prov=o.Yz7({token:w,factory:function(){return function Y(){return new w((0,o.LFG)(E))}()},providedIn:"platform"});class ae{historyGo(Ke){throw new Error("Not implemented")}}ae.\u0275fac=function(Ke){return new(Ke||ae)},ae.\u0275prov=o.Yz7({token:ae,factory:function(){return(0,o.f3M)(ve)},providedIn:"root"});const X=new o.OlP("appBaseHref");class ve extends ae{constructor(Ke,dn){super(),this._platformLocation=Ke,this._removeListenerFns=[],this._baseHref=dn??this._platformLocation.getBaseHrefFromDOM()??(0,o.f3M)(E).location?.origin??""}ngOnDestroy(){for(;this._removeListenerFns.length;)this._removeListenerFns.pop()()}onPopState(Ke){this._removeListenerFns.push(this._platformLocation.onPopState(Ke),this._platformLocation.onHashChange(Ke))}getBaseHref(){return this._baseHref}prepareExternalUrl(Ke){return V(this._baseHref,Ke)}path(Ke=!1){const dn=this._platformLocation.pathname+he(this._platformLocation.search),Kn=this._platformLocation.hash;return Kn&&Ke?`${dn}${Kn}`:dn}pushState(Ke,dn,Kn,$i){const sr=this.prepareExternalUrl(Kn+he($i));this._platformLocation.pushState(Ke,dn,sr)}replaceState(Ke,dn,Kn,$i){const sr=this.prepareExternalUrl(Kn+he($i));this._platformLocation.replaceState(Ke,dn,sr)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}getState(){return this._platformLocation.getState()}historyGo(Ke=0){this._platformLocation.historyGo?.(Ke)}}ve.\u0275fac=function(Ke){return new(Ke||ve)(o.LFG(T),o.LFG(X,8))},ve.\u0275prov=o.Yz7({token:ve,factory:ve.\u0275fac,providedIn:"root"});class ye extends ae{constructor(Ke,dn){super(),this._platformLocation=Ke,this._baseHref="",this._removeListenerFns=[],null!=dn&&(this._baseHref=dn)}ngOnDestroy(){for(;this._removeListenerFns.length;)this._removeListenerFns.pop()()}onPopState(Ke){this._removeListenerFns.push(this._platformLocation.onPopState(Ke),this._platformLocation.onHashChange(Ke))}getBaseHref(){return this._baseHref}path(Ke=!1){let dn=this._platformLocation.hash;return null==dn&&(dn="#"),dn.length>0?dn.substring(1):dn}prepareExternalUrl(Ke){const dn=V(this._baseHref,Ke);return dn.length>0?"#"+dn:dn}pushState(Ke,dn,Kn,$i){let sr=this.prepareExternalUrl(Kn+he($i));0==sr.length&&(sr=this._platformLocation.pathname),this._platformLocation.pushState(Ke,dn,sr)}replaceState(Ke,dn,Kn,$i){let sr=this.prepareExternalUrl(Kn+he($i));0==sr.length&&(sr=this._platformLocation.pathname),this._platformLocation.replaceState(Ke,dn,sr)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}getState(){return this._platformLocation.getState()}historyGo(Ke=0){this._platformLocation.historyGo?.(Ke)}}ye.\u0275fac=function(Ke){return new(Ke||ye)(o.LFG(T),o.LFG(X,8))},ye.\u0275prov=o.Yz7({token:ye,factory:ye.\u0275fac});class ge{constructor(Ke){this._subject=new o.vpe,this._urlChangeListeners=[],this._urlChangeSubscription=null,this._locationStrategy=Ke;const dn=this._locationStrategy.getBaseHref();this._basePath=function xe(ht){if(new RegExp("^(https?:)?//").test(ht)){const[,dn]=ht.split(/\/\/[^\/]+/);return dn}return ht}(ue(Pe(dn))),this._locationStrategy.onPopState(Kn=>{this._subject.emit({url:this.path(!0),pop:!0,state:Kn.state,type:Kn.type})})}ngOnDestroy(){this._urlChangeSubscription?.unsubscribe(),this._urlChangeListeners=[]}path(Ke=!1){return this.normalize(this._locationStrategy.path(Ke))}getState(){return this._locationStrategy.getState()}isCurrentPathEqualTo(Ke,dn=""){return this.path()==this.normalize(Ke+he(dn))}normalize(Ke){return ge.stripTrailingSlash(function pe(ht,Ke){if(!ht||!Ke.startsWith(ht))return Ke;const dn=Ke.substring(ht.length);return""===dn||["/",";","?","#"].includes(dn[0])?dn:Ke}(this._basePath,Pe(Ke)))}prepareExternalUrl(Ke){return Ke&&"/"!==Ke[0]&&(Ke="/"+Ke),this._locationStrategy.prepareExternalUrl(Ke)}go(Ke,dn="",Kn=null){this._locationStrategy.pushState(Kn,"",Ke,dn),this._notifyUrlChangeListeners(this.prepareExternalUrl(Ke+he(dn)),Kn)}replaceState(Ke,dn="",Kn=null){this._locationStrategy.replaceState(Kn,"",Ke,dn),this._notifyUrlChangeListeners(this.prepareExternalUrl(Ke+he(dn)),Kn)}forward(){this._locationStrategy.forward()}back(){this._locationStrategy.back()}historyGo(Ke=0){this._locationStrategy.historyGo?.(Ke)}onUrlChange(Ke){return this._urlChangeListeners.push(Ke),this._urlChangeSubscription||(this._urlChangeSubscription=this.subscribe(dn=>{this._notifyUrlChangeListeners(dn.url,dn.state)})),()=>{const dn=this._urlChangeListeners.indexOf(Ke);this._urlChangeListeners.splice(dn,1),0===this._urlChangeListeners.length&&(this._urlChangeSubscription?.unsubscribe(),this._urlChangeSubscription=null)}}_notifyUrlChangeListeners(Ke="",dn){this._urlChangeListeners.forEach(Kn=>Kn(Ke,dn))}subscribe(Ke,dn,Kn){return this._subject.subscribe({next:Ke,error:dn,complete:Kn})}}function Pe(ht){return ht.replace(/\/index.html$/,"")}ge.normalizeQueryParams=he,ge.joinWithSlash=V,ge.stripTrailingSlash=ue,ge.\u0275fac=function(Ke){return new(Ke||ge)(o.LFG(ae))},ge.\u0275prov=o.Yz7({token:ge,factory:function(){return function ne(){return new ge((0,o.LFG)(ae))}()},providedIn:"root"});const de={ADP:[void 0,void 0,0],AFN:[void 0,"\u060b",0],ALL:[void 0,void 0,0],AMD:[void 0,"\u058f",2],AOA:[void 0,"Kz"],ARS:[void 0,"$"],AUD:["A$","$"],AZN:[void 0,"\u20bc"],BAM:[void 0,"KM"],BBD:[void 0,"$"],BDT:[void 0,"\u09f3"],BHD:[void 0,void 0,3],BIF:[void 0,void 0,0],BMD:[void 0,"$"],BND:[void 0,"$"],BOB:[void 0,"Bs"],BRL:["R$"],BSD:[void 0,"$"],BWP:[void 0,"P"],BYN:[void 0,void 0,2],BYR:[void 0,void 0,0],BZD:[void 0,"$"],CAD:["CA$","$",2],CHF:[void 0,void 0,2],CLF:[void 0,void 0,4],CLP:[void 0,"$",0],CNY:["CN\xa5","\xa5"],COP:[void 0,"$",2],CRC:[void 0,"\u20a1",2],CUC:[void 0,"$"],CUP:[void 0,"$"],CZK:[void 0,"K\u010d",2],DJF:[void 0,void 0,0],DKK:[void 0,"kr",2],DOP:[void 0,"$"],EGP:[void 0,"E\xa3"],ESP:[void 0,"\u20a7",0],EUR:["\u20ac"],FJD:[void 0,"$"],FKP:[void 0,"\xa3"],GBP:["\xa3"],GEL:[void 0,"\u20be"],GHS:[void 0,"GH\u20b5"],GIP:[void 0,"\xa3"],GNF:[void 0,"FG",0],GTQ:[void 0,"Q"],GYD:[void 0,"$",2],HKD:["HK$","$"],HNL:[void 0,"L"],HRK:[void 0,"kn"],HUF:[void 0,"Ft",2],IDR:[void 0,"Rp",2],ILS:["\u20aa"],INR:["\u20b9"],IQD:[void 0,void 0,0],IRR:[void 0,void 0,0],ISK:[void 0,"kr",0],ITL:[void 0,void 0,0],JMD:[void 0,"$"],JOD:[void 0,void 0,3],JPY:["\xa5",void 0,0],KHR:[void 0,"\u17db"],KMF:[void 0,"CF",0],KPW:[void 0,"\u20a9",0],KRW:["\u20a9",void 0,0],KWD:[void 0,void 0,3],KYD:[void 0,"$"],KZT:[void 0,"\u20b8"],LAK:[void 0,"\u20ad",0],LBP:[void 0,"L\xa3",0],LKR:[void 0,"Rs"],LRD:[void 0,"$"],LTL:[void 0,"Lt"],LUF:[void 0,void 0,0],LVL:[void 0,"Ls"],LYD:[void 0,void 0,3],MGA:[void 0,"Ar",0],MGF:[void 0,void 0,0],MMK:[void 0,"K",0],MNT:[void 0,"\u20ae",2],MRO:[void 0,void 0,0],MUR:[void 0,"Rs",2],MXN:["MX$","$"],MYR:[void 0,"RM"],NAD:[void 0,"$"],NGN:[void 0,"\u20a6"],NIO:[void 0,"C$"],NOK:[void 0,"kr",2],NPR:[void 0,"Rs"],NZD:["NZ$","$"],OMR:[void 0,void 0,3],PHP:["\u20b1"],PKR:[void 0,"Rs",2],PLN:[void 0,"z\u0142"],PYG:[void 0,"\u20b2",0],RON:[void 0,"lei"],RSD:[void 0,void 0,0],RUB:[void 0,"\u20bd"],RWF:[void 0,"RF",0],SBD:[void 0,"$"],SEK:[void 0,"kr",2],SGD:[void 0,"$"],SHP:[void 0,"\xa3"],SLE:[void 0,void 0,2],SLL:[void 0,void 0,0],SOS:[void 0,void 0,0],SRD:[void 0,"$"],SSP:[void 0,"\xa3"],STD:[void 0,void 0,0],STN:[void 0,"Db"],SYP:[void 0,"\xa3",0],THB:[void 0,"\u0e3f"],TMM:[void 0,void 0,0],TND:[void 0,void 0,3],TOP:[void 0,"T$"],TRL:[void 0,void 0,0],TRY:[void 0,"\u20ba"],TTD:[void 0,"$"],TWD:["NT$","$",2],TZS:[void 0,void 0,2],UAH:[void 0,"\u20b4"],UGX:[void 0,void 0,0],USD:["$"],UYI:[void 0,void 0,0],UYU:[void 0,"$"],UYW:[void 0,void 0,4],UZS:[void 0,void 0,2],VEF:[void 0,"Bs",2],VND:["\u20ab",void 0,0],VUV:[void 0,void 0,0],XAF:["FCFA",void 0,0],XCD:["EC$","$"],XOF:["F\u202fCFA",void 0,0],XPF:["CFPF",void 0,0],XXX:["\xa4"],YER:[void 0,void 0,0],ZAR:[void 0,"R"],ZMK:[void 0,void 0,0],ZMW:[void 0,"ZK"],ZWD:[void 0,void 0,0]};var re,ht,oe,me,be,le,Z,Oe;function tt(ht,Ke){return wi((0,o.cg1)(ht)[o.wAp.DateFormat],Ke)}function Ne(ht,Ke){return wi((0,o.cg1)(ht)[o.wAp.TimeFormat],Ke)}function wt(ht,Ke){return wi((0,o.cg1)(ht)[o.wAp.DateTimeFormat],Ke)}function ft(ht,Ke){const dn=(0,o.cg1)(ht),Kn=dn[o.wAp.NumberSymbols][Ke];if(typeof Kn>"u"){if(Ke===Z.CurrencyDecimal)return dn[o.wAp.NumberSymbols][Z.Decimal];if(Ke===Z.CurrencyGroup)return dn[o.wAp.NumberSymbols][Z.Group]}return Kn}function Ct(ht,Ke){return(0,o.cg1)(ht)[o.wAp.NumberFormats][Ke]}(ht=re||(re={}))[ht.Decimal=0]="Decimal",ht[ht.Percent=1]="Percent",ht[ht.Currency=2]="Currency",ht[ht.Scientific=3]="Scientific",function(ht){ht[ht.Zero=0]="Zero",ht[ht.One=1]="One",ht[ht.Two=2]="Two",ht[ht.Few=3]="Few",ht[ht.Many=4]="Many",ht[ht.Other=5]="Other"}(oe||(oe={})),function(ht){ht[ht.Format=0]="Format",ht[ht.Standalone=1]="Standalone"}(me||(me={})),function(ht){ht[ht.Narrow=0]="Narrow",ht[ht.Abbreviated=1]="Abbreviated",ht[ht.Wide=2]="Wide",ht[ht.Short=3]="Short"}(be||(be={})),function(ht){ht[ht.Short=0]="Short",ht[ht.Medium=1]="Medium",ht[ht.Long=2]="Long",ht[ht.Full=3]="Full"}(le||(le={})),function(ht){ht[ht.Decimal=0]="Decimal",ht[ht.Group=1]="Group",ht[ht.List=2]="List",ht[ht.PercentSign=3]="PercentSign",ht[ht.PlusSign=4]="PlusSign",ht[ht.MinusSign=5]="MinusSign",ht[ht.Exponential=6]="Exponential",ht[ht.SuperscriptingExponent=7]="SuperscriptingExponent",ht[ht.PerMille=8]="PerMille",ht[ht.Infinity=9]="Infinity",ht[ht.NaN=10]="NaN",ht[ht.TimeSeparator=11]="TimeSeparator",ht[ht.CurrencyDecimal=12]="CurrencyDecimal",ht[ht.CurrencyGroup=13]="CurrencyGroup"}(Z||(Z={})),function(ht){ht[ht.Sunday=0]="Sunday",ht[ht.Monday=1]="Monday",ht[ht.Tuesday=2]="Tuesday",ht[ht.Wednesday=3]="Wednesday",ht[ht.Thursday=4]="Thursday",ht[ht.Friday=5]="Friday",ht[ht.Saturday=6]="Saturday"}(Oe||(Oe={}));const Dn=o.kL8;function Mn(ht){if(!ht[o.wAp.ExtraData])throw new Error(`Missing extra locale data for the locale "${ht[o.wAp.LocaleId]}". Use "registerLocaleData" to load new data. See the "I18n guide" on angular.io to know more.`)}function wi(ht,Ke){for(let dn=Ke;dn>-1;dn--)if(typeof ht[dn]<"u")return ht[dn];throw new Error("Locale data API: locale data undefined")}function Bn(ht){const[Ke,dn]=ht.split(":");return{hours:+Ke,minutes:+dn}}function kn(ht,Ke,dn="en"){const Kn=function nn(ht){return(0,o.cg1)(ht)[o.wAp.Currencies]}(dn)[ht]||de[ht]||[],$i=Kn[1];return"narrow"===Ke&&"string"==typeof $i?$i:Kn[0]||ht}const On=2;const Bt=/^(\d{4,})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/,xn={},Fn=/((?:[^BEGHLMOSWYZabcdhmswyz']+)|(?:'(?:[^']|'')*')|(?:G{1,5}|y{1,4}|Y{1,4}|M{1,5}|L{1,5}|w{1,2}|W{1}|d{1,2}|E{1,6}|c{1,6}|a{1,5}|b{1,5}|B{1,5}|h{1,2}|H{1,2}|m{1,2}|s{1,2}|S{1,3}|z{1,4}|Z{1,5}|O{1,4}))([\s\S]*)/;var ui,Ai,si;function Vi(ht,Ke,dn,Kn){let $i=function Nt(ht){if(hn(ht))return ht;if("number"==typeof ht&&!isNaN(ht))return new Date(ht);if("string"==typeof ht){if(ht=ht.trim(),/^(\d{4}(-\d{1,2}(-\d{1,2})?)?)$/.test(ht)){const[$i,sr=1,lo=1]=ht.split("-").map(ga=>+ga);return Vn($i,sr-1,lo)}const dn=parseFloat(ht);if(!isNaN(ht-dn))return new Date(dn);let Kn;if(Kn=ht.match(Bt))return function ai(ht){const Ke=new Date(0);let dn=0,Kn=0;const $i=ht[8]?Ke.setUTCFullYear:Ke.setFullYear,sr=ht[8]?Ke.setUTCHours:Ke.setHours;ht[9]&&(dn=Number(ht[9]+ht[10]),Kn=Number(ht[9]+ht[11])),$i.call(Ke,Number(ht[1]),Number(ht[2])-1,Number(ht[3]));const lo=Number(ht[4]||0)-dn,ga=Number(ht[5]||0)-Kn,Zs=Number(ht[6]||0),Kr=Math.floor(1e3*parseFloat("0."+(ht[7]||0)));return sr.call(Ke,lo,ga,Zs,Kr),Ke}(Kn)}const Ke=new Date(ht);if(!hn(Ke))throw new Error(`Unable to convert "${ht}" into a date`);return Ke}(ht);Ke=Hn(dn,Ke)||Ke;let ga,lo=[];for(;Ke;){if(ga=Fn.exec(Ke),!ga){lo.push(Ke);break}{lo=lo.concat(ga.slice(1));const os=lo.pop();if(!os)break;Ke=os}}let Zs=$i.getTimezoneOffset();Kn&&(Zs=pr(Kn,Zs),$i=function Pn(ht,Ke,dn){const Kn=dn?-1:1,$i=ht.getTimezoneOffset(),sr=pr(Ke,$i);return function Sn(ht,Ke){return ht=new Date(ht.getTime()),ht.setMinutes(ht.getMinutes()+Ke),ht}(ht,Kn*(sr-$i))}($i,Kn,!0));let Kr="";return lo.forEach(os=>{const _s=function Nn(ht){if(Ni[ht])return Ni[ht];let Ke;switch(ht){case"G":case"GG":case"GGG":Ke=Hi(si.Eras,be.Abbreviated);break;case"GGGG":Ke=Hi(si.Eras,be.Wide);break;case"GGGGG":Ke=Hi(si.Eras,be.Narrow);break;case"y":Ke=Zi(Ai.FullYear,1,0,!1,!0);break;case"yy":Ke=Zi(Ai.FullYear,2,0,!0,!0);break;case"yyy":Ke=Zi(Ai.FullYear,3,0,!1,!0);break;case"yyyy":Ke=Zi(Ai.FullYear,4,0,!1,!0);break;case"Y":Ke=oi(1);break;case"YY":Ke=oi(2,!0);break;case"YYY":Ke=oi(3);break;case"YYYY":Ke=oi(4);break;case"M":case"L":Ke=Zi(Ai.Month,1,1);break;case"MM":case"LL":Ke=Zi(Ai.Month,2,1);break;case"MMM":Ke=Hi(si.Months,be.Abbreviated);break;case"MMMM":Ke=Hi(si.Months,be.Wide);break;case"MMMMM":Ke=Hi(si.Months,be.Narrow);break;case"LLL":Ke=Hi(si.Months,be.Abbreviated,me.Standalone);break;case"LLLL":Ke=Hi(si.Months,be.Wide,me.Standalone);break;case"LLLLL":Ke=Hi(si.Months,be.Narrow,me.Standalone);break;case"w":Ke=Yt(1);break;case"ww":Ke=Yt(2);break;case"W":Ke=Yt(1,!0);break;case"d":Ke=Zi(Ai.Date,1);break;case"dd":Ke=Zi(Ai.Date,2);break;case"c":case"cc":Ke=Zi(Ai.Day,1);break;case"ccc":Ke=Hi(si.Days,be.Abbreviated,me.Standalone);break;case"cccc":Ke=Hi(si.Days,be.Wide,me.Standalone);break;case"ccccc":Ke=Hi(si.Days,be.Narrow,me.Standalone);break;case"cccccc":Ke=Hi(si.Days,be.Short,me.Standalone);break;case"E":case"EE":case"EEE":Ke=Hi(si.Days,be.Abbreviated);break;case"EEEE":Ke=Hi(si.Days,be.Wide);break;case"EEEEE":Ke=Hi(si.Days,be.Narrow);break;case"EEEEEE":Ke=Hi(si.Days,be.Short);break;case"a":case"aa":case"aaa":Ke=Hi(si.DayPeriods,be.Abbreviated);break;case"aaaa":Ke=Hi(si.DayPeriods,be.Wide);break;case"aaaaa":Ke=Hi(si.DayPeriods,be.Narrow);break;case"b":case"bb":case"bbb":Ke=Hi(si.DayPeriods,be.Abbreviated,me.Standalone,!0);break;case"bbbb":Ke=Hi(si.DayPeriods,be.Wide,me.Standalone,!0);break;case"bbbbb":Ke=Hi(si.DayPeriods,be.Narrow,me.Standalone,!0);break;case"B":case"BB":case"BBB":Ke=Hi(si.DayPeriods,be.Abbreviated,me.Format,!0);break;case"BBBB":Ke=Hi(si.DayPeriods,be.Wide,me.Format,!0);break;case"BBBBB":Ke=Hi(si.DayPeriods,be.Narrow,me.Format,!0);break;case"h":Ke=Zi(Ai.Hours,1,-12);break;case"hh":Ke=Zi(Ai.Hours,2,-12);break;case"H":Ke=Zi(Ai.Hours,1);break;case"HH":Ke=Zi(Ai.Hours,2);break;case"m":Ke=Zi(Ai.Minutes,1);break;case"mm":Ke=Zi(Ai.Minutes,2);break;case"s":Ke=Zi(Ai.Seconds,1);break;case"ss":Ke=Zi(Ai.Seconds,2);break;case"S":Ke=Zi(Ai.FractionalSeconds,1);break;case"SS":Ke=Zi(Ai.FractionalSeconds,2);break;case"SSS":Ke=Zi(Ai.FractionalSeconds,3);break;case"Z":case"ZZ":case"ZZZ":Ke=zr(ui.Short);break;case"ZZZZZ":Ke=zr(ui.Extended);break;case"O":case"OO":case"OOO":case"z":case"zz":case"zzz":Ke=zr(ui.ShortGMT);break;case"OOOO":case"ZZZZ":case"zzzz":Ke=zr(ui.Long);break;default:return null}return Ni[ht]=Ke,Ke}(os);Kr+=_s?_s($i,dn,Zs):"''"===os?"'":os.replace(/(^'|'$)/g,"").replace(/''/g,"'")}),Kr}function Vn(ht,Ke,dn){const Kn=new Date(0);return Kn.setFullYear(ht,Ke,dn),Kn.setHours(0,0,0),Kn}function Hn(ht,Ke){const dn=function j(ht){return(0,o.cg1)(ht)[o.wAp.LocaleId]}(ht);if(xn[dn]=xn[dn]||{},xn[dn][Ke])return xn[dn][Ke];let Kn="";switch(Ke){case"shortDate":Kn=tt(ht,le.Short);break;case"mediumDate":Kn=tt(ht,le.Medium);break;case"longDate":Kn=tt(ht,le.Long);break;case"fullDate":Kn=tt(ht,le.Full);break;case"shortTime":Kn=Ne(ht,le.Short);break;case"mediumTime":Kn=Ne(ht,le.Medium);break;case"longTime":Kn=Ne(ht,le.Long);break;case"fullTime":Kn=Ne(ht,le.Full);break;case"short":const $i=Hn(ht,"shortTime"),sr=Hn(ht,"shortDate");Kn=An(wt(ht,le.Short),[$i,sr]);break;case"medium":const lo=Hn(ht,"mediumTime"),ga=Hn(ht,"mediumDate");Kn=An(wt(ht,le.Medium),[lo,ga]);break;case"long":const Zs=Hn(ht,"longTime"),Kr=Hn(ht,"longDate");Kn=An(wt(ht,le.Long),[Zs,Kr]);break;case"full":const os=Hn(ht,"fullTime"),_s=Hn(ht,"fullDate");Kn=An(wt(ht,le.Full),[os,_s])}return Kn&&(xn[dn][Ke]=Kn),Kn}function An(ht,Ke){return Ke&&(ht=ht.replace(/\{([^}]+)}/g,function(dn,Kn){return null!=Ke&&Kn in Ke?Ke[Kn]:dn})),ht}function vn(ht,Ke,dn="-",Kn,$i){let sr="";(ht<0||$i&&ht<=0)&&($i?ht=1-ht:(ht=-ht,sr=dn));let lo=String(ht);for(;lo.length<Ke;)lo="0"+lo;return Kn&&(lo=lo.slice(lo.length-Ke)),sr+lo}function Zi(ht,Ke,dn=0,Kn=!1,$i=!1){return function(sr,lo){let ga=function gr(ht,Ke){switch(ht){case Ai.FullYear:return Ke.getFullYear();case Ai.Month:return Ke.getMonth();case Ai.Date:return Ke.getDate();case Ai.Hours:return Ke.getHours();case Ai.Minutes:return Ke.getMinutes();case Ai.Seconds:return Ke.getSeconds();case Ai.FractionalSeconds:return Ke.getMilliseconds();case Ai.Day:return Ke.getDay();default:throw new Error(`Unknown DateType value "${ht}".`)}}(ht,sr);if((dn>0||ga>-dn)&&(ga+=dn),ht===Ai.Hours)0===ga&&-12===dn&&(ga=12);else if(ht===Ai.FractionalSeconds)return function In(ht,Ke){return vn(ht,3).substring(0,Ke)}(ga,Ke);const Zs=ft(lo,Z.MinusSign);return vn(ga,Ke,Zs,Kn,$i)}}function Hi(ht,Ke,dn=me.Format,Kn=!1){return function($i,sr){return function Gr(ht,Ke,dn,Kn,$i,sr){switch(dn){case si.Months:return function nt(ht,Ke,dn){const Kn=(0,o.cg1)(ht),sr=wi([Kn[o.wAp.MonthsFormat],Kn[o.wAp.MonthsStandalone]],Ke);return wi(sr,dn)}(Ke,$i,Kn)[ht.getMonth()];case si.Days:return function Be(ht,Ke,dn){const Kn=(0,o.cg1)(ht),sr=wi([Kn[o.wAp.DaysFormat],Kn[o.wAp.DaysStandalone]],Ke);return wi(sr,dn)}(Ke,$i,Kn)[ht.getDay()];case si.DayPeriods:const lo=ht.getHours(),ga=ht.getMinutes();if(sr){const Kr=function vi(ht){const Ke=(0,o.cg1)(ht);return Mn(Ke),(Ke[o.wAp.ExtraData][2]||[]).map(Kn=>"string"==typeof Kn?Bn(Kn):[Bn(Kn[0]),Bn(Kn[1])])}(Ke),os=function Gi(ht,Ke,dn){const Kn=(0,o.cg1)(ht);Mn(Kn);const sr=wi([Kn[o.wAp.ExtraData][0],Kn[o.wAp.ExtraData][1]],Ke)||[];return wi(sr,dn)||[]}(Ke,$i,Kn),_s=Kr.findIndex(ra=>{if(Array.isArray(ra)){const[_a,xl]=ra,$l=lo>=_a.hours&&ga>=_a.minutes,Os=lo<xl.hours||lo===xl.hours&&ga<xl.minutes;if(_a.hours<xl.hours){if($l&&Os)return!0}else if($l||Os)return!0}else if(ra.hours===lo&&ra.minutes===ga)return!0;return!1});if(-1!==_s)return os[_s]}return function ke(ht,Ke,dn){const Kn=(0,o.cg1)(ht),sr=wi([Kn[o.wAp.DayPeriodsFormat],Kn[o.wAp.DayPeriodsStandalone]],Ke);return wi(sr,dn)}(Ke,$i,Kn)[lo<12?0:1];case si.Eras:return function mt(ht,Ke){return wi((0,o.cg1)(ht)[o.wAp.Eras],Ke)}(Ke,Kn)[ht.getFullYear()<=0?0:1];default:throw new Error(`unexpected translation type ${dn}`)}}($i,sr,ht,Ke,dn,Kn)}}function zr(ht){return function(Ke,dn,Kn){const $i=-1*Kn,sr=ft(dn,Z.MinusSign),lo=$i>0?Math.floor($i/60):Math.ceil($i/60);switch(ht){case ui.Short:return($i>=0?"+":"")+vn(lo,2,sr)+vn(Math.abs($i%60),2,sr);case ui.ShortGMT:return"GMT"+($i>=0?"+":"")+vn(lo,1,sr);case ui.Long:return"GMT"+($i>=0?"+":"")+vn(lo,2,sr)+":"+vn(Math.abs($i%60),2,sr);case ui.Extended:return 0===Kn?"Z":($i>=0?"+":"")+vn(lo,2,sr)+":"+vn(Math.abs($i%60),2,sr);default:throw new Error(`Unknown zone width "${ht}"`)}}}!function(ht){ht[ht.Short=0]="Short",ht[ht.ShortGMT=1]="ShortGMT",ht[ht.Long=2]="Long",ht[ht.Extended=3]="Extended"}(ui||(ui={})),function(ht){ht[ht.FullYear=0]="FullYear",ht[ht.Month=1]="Month",ht[ht.Date=2]="Date",ht[ht.Hours=3]="Hours",ht[ht.Minutes=4]="Minutes",ht[ht.Seconds=5]="Seconds",ht[ht.FractionalSeconds=6]="FractionalSeconds",ht[ht.Day=7]="Day"}(Ai||(Ai={})),function(ht){ht[ht.DayPeriods=0]="DayPeriods",ht[ht.Days=1]="Days",ht[ht.Months=2]="Months",ht[ht.Eras=3]="Eras"}(si||(si={}));const Eo=0,mr=4;function ct(ht){return Vn(ht.getFullYear(),ht.getMonth(),ht.getDate()+(mr-ht.getDay()))}function Yt(ht,Ke=!1){return function(dn,Kn){let $i;if(Ke){const sr=new Date(dn.getFullYear(),dn.getMonth(),1).getDay()-1,lo=dn.getDate();$i=1+Math.floor((lo+sr)/7)}else{const sr=ct(dn),lo=function jn(ht){const Ke=Vn(ht,Eo,1).getDay();return Vn(ht,0,1+(Ke<=mr?mr:mr+7)-Ke)}(sr.getFullYear()),ga=sr.getTime()-lo.getTime();$i=1+Math.round(ga/6048e5)}return vn($i,ht,ft(Kn,Z.MinusSign))}}function oi(ht,Ke=!1){return function(dn,Kn){return vn(ct(dn).getFullYear(),ht,ft(Kn,Z.MinusSign),Ke)}}const Ni={};function pr(ht,Ke){ht=ht.replace(/:/g,"");const dn=Date.parse("Jan 01, 1970 00:00:00 "+ht)/6e4;return isNaN(dn)?Ke:dn}function hn(ht){return ht instanceof Date&&!isNaN(ht.valueOf())}const Le=/^(\d+)?\.((\d+)(-(\d+))?)?$/,ce=22,we=".",Qe="0",qt=";",Tn=",",lr="#",mo="\xa4",rr="%";function aa(ht,Ke,dn,Kn,$i,sr,lo=!1){let ga="",Zs=!1;if(isFinite(ht)){let Kr=function Ci(ht){let Kn,$i,sr,lo,ga,Ke=Math.abs(ht)+"",dn=0;for(($i=Ke.indexOf(we))>-1&&(Ke=Ke.replace(we,"")),(sr=Ke.search(/e/i))>0?($i<0&&($i=sr),$i+=+Ke.slice(sr+1),Ke=Ke.substring(0,sr)):$i<0&&($i=Ke.length),sr=0;Ke.charAt(sr)===Qe;sr++);if(sr===(ga=Ke.length))Kn=[0],$i=1;else{for(ga--;Ke.charAt(ga)===Qe;)ga--;for($i-=sr,Kn=[],lo=0;sr<=ga;sr++,lo++)Kn[lo]=Number(Ke.charAt(sr))}return $i>ce&&(Kn=Kn.splice(0,ce-1),dn=$i-1,$i=1),{digits:Kn,exponent:dn,integerLen:$i}}(ht);lo&&(Kr=function Zn(ht){if(0===ht.digits[0])return ht;const Ke=ht.digits.length-ht.integerLen;return ht.exponent?ht.exponent+=2:(0===Ke?ht.digits.push(0,0):1===Ke&&ht.digits.push(0),ht.integerLen+=2),ht}(Kr));let os=Ke.minInt,_s=Ke.minFrac,ra=Ke.maxFrac;if(sr){const Ks=sr.match(Le);if(null===Ks)throw new Error(`${sr} is not a valid digit info`);const _l=Ks[1],Dc=Ks[3],Gs=Ks[5];null!=_l&&(os=Et(_l)),null!=Dc&&(_s=Et(Dc)),null!=Gs?ra=Et(Gs):null!=Dc&&_s>ra&&(ra=_s)}!function Xn(ht,Ke,dn){if(Ke>dn)throw new Error(`The minimum number of digits after fraction (${Ke}) is higher than the maximum (${dn}).`);let Kn=ht.digits,$i=Kn.length-ht.integerLen;const sr=Math.min(Math.max(Ke,$i),dn);let lo=sr+ht.integerLen,ga=Kn[lo];if(lo>0){Kn.splice(Math.max(ht.integerLen,lo));for(let _s=lo;_s<Kn.length;_s++)Kn[_s]=0}else{$i=Math.max(0,$i),ht.integerLen=1,Kn.length=Math.max(1,lo=sr+1),Kn[0]=0;for(let _s=1;_s<lo;_s++)Kn[_s]=0}if(ga>=5)if(lo-1<0){for(let _s=0;_s>lo;_s--)Kn.unshift(0),ht.integerLen++;Kn.unshift(1),ht.integerLen++}else Kn[lo-1]++;for(;$i<Math.max(0,sr);$i++)Kn.push(0);let Zs=0!==sr;const Kr=Ke+ht.integerLen,os=Kn.reduceRight(function(_s,ra,_a,xl){return ra+=_s,xl[_a]=ra<10?ra:ra-10,Zs&&(0===xl[_a]&&_a>=Kr?xl.pop():Zs=!1),ra>=10?1:0},0);os&&(Kn.unshift(os),ht.integerLen++)}(Kr,_s,ra);let _a=Kr.digits,xl=Kr.integerLen;const $l=Kr.exponent;let Os=[];for(Zs=_a.every(Ks=>!Ks);xl<os;xl++)_a.unshift(0);for(;xl<0;xl++)_a.unshift(0);xl>0?Os=_a.splice(xl,_a.length):(Os=_a,_a=[0]);const yu=[];for(_a.length>=Ke.lgSize&&yu.unshift(_a.splice(-Ke.lgSize,_a.length).join(""));_a.length>Ke.gSize;)yu.unshift(_a.splice(-Ke.gSize,_a.length).join(""));_a.length&&yu.unshift(_a.join("")),ga=yu.join(ft(dn,Kn)),Os.length&&(ga+=ft(dn,$i)+Os.join("")),$l&&(ga+=ft(dn,Z.Exponential)+"+"+$l)}else ga=ft(dn,Z.Infinity);return ga=ht<0&&!Zs?Ke.negPre+ga+Ke.negSuf:Ke.posPre+ga+Ke.posSuf,ga}function ea(ht,Ke,dn,Kn,$i){const lo=an(Ct(Ke,re.Currency),ft(Ke,Z.MinusSign));return lo.minFrac=function je(ht){let Ke;const dn=de[ht];return dn&&(Ke=dn[2]),"number"==typeof Ke?Ke:On}(Kn),lo.maxFrac=lo.minFrac,aa(ht,lo,Ke,Z.CurrencyGroup,Z.CurrencyDecimal,$i).replace(mo,dn).replace(mo,"").trim()}function Ii(ht,Ke,dn){return aa(ht,an(Ct(Ke,re.Decimal),ft(Ke,Z.MinusSign)),Ke,Z.Group,Z.Decimal,dn)}function an(ht,Ke="-"){const dn={minInt:1,minFrac:0,maxFrac:0,posPre:"",posSuf:"",negPre:"",negSuf:"",gSize:0,lgSize:0},Kn=ht.split(qt),$i=Kn[0],sr=Kn[1],lo=-1!==$i.indexOf(we)?$i.split(we):[$i.substring(0,$i.lastIndexOf(Qe)+1),$i.substring($i.lastIndexOf(Qe)+1)],ga=lo[0],Zs=lo[1]||"";dn.posPre=ga.substring(0,ga.indexOf(lr));for(let os=0;os<Zs.length;os++){const _s=Zs.charAt(os);_s===Qe?dn.minFrac=dn.maxFrac=os+1:_s===lr?dn.maxFrac=os+1:dn.posSuf+=_s}const Kr=ga.split(Tn);if(dn.gSize=Kr[1]?Kr[1].length:0,dn.lgSize=Kr[2]||Kr[1]?(Kr[2]||Kr[1]).length:0,sr){const os=$i.length-dn.posPre.length-dn.posSuf.length,_s=sr.indexOf(lr);dn.negPre=sr.substring(0,_s).replace(/'/g,""),dn.negSuf=sr.slice(_s+os).replace(/'/g,"")}else dn.negPre=Ke+dn.posPre,dn.negSuf=dn.posSuf;return dn}function Et(ht){const Ke=parseInt(ht);if(isNaN(Ke))throw new Error("Invalid integer literal when parsing "+ht);return Ke}class gn{}function ei(ht,Ke,dn,Kn){let $i=`=${ht}`;if(Ke.indexOf($i)>-1||($i=dn.getPluralCategory(ht,Kn),Ke.indexOf($i)>-1))return $i;if(Ke.indexOf("other")>-1)return"other";throw new Error(`No plural message found for value "${ht}"`)}gn.\u0275fac=function(Ke){return new(Ke||gn)},gn.\u0275prov=o.Yz7({token:gn,factory:function(Ke){let dn=null;return Ke?dn=new Ke:(Kn=o.LFG(o.soG),dn=new un(Kn)),dn;var Kn},providedIn:"root"});class un extends gn{constructor(Ke){super(),this.locale=Ke}getPluralCategory(Ke,dn){switch(Dn(dn||this.locale)(Ke)){case oe.Zero:return"zero";case oe.One:return"one";case oe.Two:return"two";case oe.Few:return"few";case oe.Many:return"many";default:return"other"}}}function Ft(ht,Ke,dn){return(0,o.dwT)(ht,Ke,dn)}function Ut(ht,Ke){Ke=encodeURIComponent(Ke);for(const dn of ht.split(";")){const Kn=dn.indexOf("="),[$i,sr]=-1==Kn?[dn,""]:[dn.slice(0,Kn),dn.slice(Kn+1)];if($i.trim()===Ke)return decodeURIComponent(sr)}return null}un.\u0275fac=function(Ke){return new(Ke||un)(o.LFG(o.soG))},un.\u0275prov=o.Yz7({token:un,factory:un.\u0275fac});const wn=/\s+/,Gn=[];class xi{constructor(Ke,dn,Kn,$i){this._iterableDiffers=Ke,this._keyValueDiffers=dn,this._ngEl=Kn,this._renderer=$i,this.initialClasses=Gn,this.stateMap=new Map}set klass(Ke){this.initialClasses=null!=Ke?Ke.trim().split(wn):Gn}set ngClass(Ke){this.rawClass="string"==typeof Ke?Ke.trim().split(wn):Ke}ngDoCheck(){for(const dn of this.initialClasses)this._updateState(dn,!0);const Ke=this.rawClass;if(Array.isArray(Ke)||Ke instanceof Set)for(const dn of Ke)this._updateState(dn,!0);else if(null!=Ke)for(const dn of Object.keys(Ke))this._updateState(dn,Boolean(Ke[dn]));this._applyStateDiff()}_updateState(Ke,dn){const Kn=this.stateMap.get(Ke);void 0!==Kn?(Kn.enabled!==dn&&(Kn.changed=!0,Kn.enabled=dn),Kn.touched=!0):this.stateMap.set(Ke,{enabled:dn,changed:!0,touched:!0})}_applyStateDiff(){for(const Ke of this.stateMap){const dn=Ke[0],Kn=Ke[1];Kn.changed?(this._toggleClass(dn,Kn.enabled),Kn.changed=!1):Kn.touched||(Kn.enabled&&this._toggleClass(dn,!1),this.stateMap.delete(dn)),Kn.touched=!1}}_toggleClass(Ke,dn){(Ke=Ke.trim()).length>0&&Ke.split(wn).forEach(Kn=>{dn?this._renderer.addClass(this._ngEl.nativeElement,Kn):this._renderer.removeClass(this._ngEl.nativeElement,Kn)})}}xi.\u0275fac=function(Ke){return new(Ke||xi)(o.Y36(o.ZZ4),o.Y36(o.aQg),o.Y36(o.SBq),o.Y36(o.Qsj))},xi.\u0275dir=o.lG2({type:xi,selectors:[["","ngClass",""]],inputs:{klass:["class","klass"],ngClass:"ngClass"},standalone:!0});class Cr{constructor(Ke){this._viewContainerRef=Ke,this.ngComponentOutlet=null}ngOnChanges(Ke){const{_viewContainerRef:dn,ngComponentOutletNgModule:Kn,ngComponentOutletNgModuleFactory:$i}=this;if(dn.clear(),this._componentRef=void 0,this.ngComponentOutlet){const sr=this.ngComponentOutletInjector||dn.parentInjector;(Ke.ngComponentOutletNgModule||Ke.ngComponentOutletNgModuleFactory)&&(this._moduleRef&&this._moduleRef.destroy(),this._moduleRef=Kn?(0,o.Lck)(Kn,Fr(sr)):$i?$i.create(Fr(sr)):void 0),this._componentRef=dn.createComponent(this.ngComponentOutlet,{index:dn.length,injector:sr,ngModuleRef:this._moduleRef,projectableNodes:this.ngComponentOutletContent})}}ngOnDestroy(){this._moduleRef&&this._moduleRef.destroy()}}function Fr(ht){return ht.get(o.h0i).injector}Cr.\u0275fac=function(Ke){return new(Ke||Cr)(o.Y36(o.s_b))},Cr.\u0275dir=o.lG2({type:Cr,selectors:[["","ngComponentOutlet",""]],inputs:{ngComponentOutlet:"ngComponentOutlet",ngComponentOutletInjector:"ngComponentOutletInjector",ngComponentOutletContent:"ngComponentOutletContent",ngComponentOutletNgModule:"ngComponentOutletNgModule",ngComponentOutletNgModuleFactory:"ngComponentOutletNgModuleFactory"},standalone:!0,features:[o.TTD]});class Wn{constructor(Ke,dn,Kn,$i){this.$implicit=Ke,this.ngForOf=dn,this.index=Kn,this.count=$i}get first(){return 0===this.index}get last(){return this.index===this.count-1}get even(){return this.index%2==0}get odd(){return!this.even}}class at{set ngForOf(Ke){this._ngForOf=Ke,this._ngForOfDirty=!0}set ngForTrackBy(Ke){this._trackByFn=Ke}get ngForTrackBy(){return this._trackByFn}constructor(Ke,dn,Kn){this._viewContainer=Ke,this._template=dn,this._differs=Kn,this._ngForOf=null,this._ngForOfDirty=!0,this._differ=null}set ngForTemplate(Ke){Ke&&(this._template=Ke)}ngDoCheck(){if(this._ngForOfDirty){this._ngForOfDirty=!1;const Ke=this._ngForOf;!this._differ&&Ke&&(this._differ=this._differs.find(Ke).create(this.ngForTrackBy))}if(this._differ){const Ke=this._differ.diff(this._ngForOf);Ke&&this._applyChanges(Ke)}}_applyChanges(Ke){const dn=this._viewContainer;Ke.forEachOperation((Kn,$i,sr)=>{if(null==Kn.previousIndex)dn.createEmbeddedView(this._template,new Wn(Kn.item,this._ngForOf,-1,-1),null===sr?void 0:sr);else if(null==sr)dn.remove(null===$i?void 0:$i);else if(null!==$i){const lo=dn.get($i);dn.move(lo,sr),It(lo,Kn)}});for(let Kn=0,$i=dn.length;Kn<$i;Kn++){const lo=dn.get(Kn).context;lo.index=Kn,lo.count=$i,lo.ngForOf=this._ngForOf}Ke.forEachIdentityChange(Kn=>{It(dn.get(Kn.currentIndex),Kn)})}static ngTemplateContextGuard(Ke,dn){return!0}}function It(ht,Ke){ht.context.$implicit=Ke.item}at.\u0275fac=function(Ke){return new(Ke||at)(o.Y36(o.s_b),o.Y36(o.Rgc),o.Y36(o.ZZ4))},at.\u0275dir=o.lG2({type:at,selectors:[["","ngFor","","ngForOf",""]],inputs:{ngForOf:"ngForOf",ngForTrackBy:"ngForTrackBy",ngForTemplate:"ngForTemplate"},standalone:!0});class St{constructor(Ke,dn){this._viewContainer=Ke,this._context=new Pt,this._thenTemplateRef=null,this._elseTemplateRef=null,this._thenViewRef=null,this._elseViewRef=null,this._thenTemplateRef=dn}set ngIf(Ke){this._context.$implicit=this._context.ngIf=Ke,this._updateView()}set ngIfThen(Ke){cn("ngIfThen",Ke),this._thenTemplateRef=Ke,this._thenViewRef=null,this._updateView()}set ngIfElse(Ke){cn("ngIfElse",Ke),this._elseTemplateRef=Ke,this._elseViewRef=null,this._updateView()}_updateView(){this._context.$implicit?this._thenViewRef||(this._viewContainer.clear(),this._elseViewRef=null,this._thenTemplateRef&&(this._thenViewRef=this._viewContainer.createEmbeddedView(this._thenTemplateRef,this._context))):this._elseViewRef||(this._viewContainer.clear(),this._thenViewRef=null,this._elseTemplateRef&&(this._elseViewRef=this._viewContainer.createEmbeddedView(this._elseTemplateRef,this._context)))}static ngTemplateContextGuard(Ke,dn){return!0}}St.\u0275fac=function(Ke){return new(Ke||St)(o.Y36(o.s_b),o.Y36(o.Rgc))},St.\u0275dir=o.lG2({type:St,selectors:[["","ngIf",""]],inputs:{ngIf:"ngIf",ngIfThen:"ngIfThen",ngIfElse:"ngIfElse"},standalone:!0});class Pt{constructor(){this.$implicit=null,this.ngIf=null}}function cn(ht,Ke){if(Ke&&!Ke.createEmbeddedView)throw new Error(`${ht} must be a TemplateRef, but received '${(0,o.AaK)(Ke)}'.`)}class Ln{constructor(Ke,dn){this._viewContainerRef=Ke,this._templateRef=dn,this._created=!1}create(){this._created=!0,this._viewContainerRef.createEmbeddedView(this._templateRef)}destroy(){this._created=!1,this._viewContainerRef.clear()}enforceState(Ke){Ke&&!this._created?this.create():!Ke&&this._created&&this.destroy()}}class ii{constructor(){this._defaultViews=[],this._defaultUsed=!1,this._caseCount=0,this._lastCaseCheckIndex=0,this._lastCasesMatched=!1}set ngSwitch(Ke){this._ngSwitch=Ke,0===this._caseCount&&this._updateDefaultCases(!0)}_addCase(){return this._caseCount++}_addDefault(Ke){this._defaultViews.push(Ke)}_matchCase(Ke){const dn=Ke==this._ngSwitch;return this._lastCasesMatched=this._lastCasesMatched||dn,this._lastCaseCheckIndex++,this._lastCaseCheckIndex===this._caseCount&&(this._updateDefaultCases(!this._lastCasesMatched),this._lastCaseCheckIndex=0,this._lastCasesMatched=!1),dn}_updateDefaultCases(Ke){if(this._defaultViews.length>0&&Ke!==this._defaultUsed){this._defaultUsed=Ke;for(const dn of this._defaultViews)dn.enforceState(Ke)}}}ii.\u0275fac=function(Ke){return new(Ke||ii)},ii.\u0275dir=o.lG2({type:ii,selectors:[["","ngSwitch",""]],inputs:{ngSwitch:"ngSwitch"},standalone:!0});class hi{constructor(Ke,dn,Kn){this.ngSwitch=Kn,Kn._addCase(),this._view=new Ln(Ke,dn)}ngDoCheck(){this._view.enforceState(this.ngSwitch._matchCase(this.ngSwitchCase))}}hi.\u0275fac=function(Ke){return new(Ke||hi)(o.Y36(o.s_b),o.Y36(o.Rgc),o.Y36(ii,9))},hi.\u0275dir=o.lG2({type:hi,selectors:[["","ngSwitchCase",""]],inputs:{ngSwitchCase:"ngSwitchCase"},standalone:!0});class Ri{constructor(Ke,dn,Kn){Kn._addDefault(new Ln(Ke,dn))}}Ri.\u0275fac=function(Ke){return new(Ke||Ri)(o.Y36(o.s_b),o.Y36(o.Rgc),o.Y36(ii,9))},Ri.\u0275dir=o.lG2({type:Ri,selectors:[["","ngSwitchDefault",""]],standalone:!0});class er{constructor(Ke){this._localization=Ke,this._caseViews={}}set ngPlural(Ke){this._updateView(Ke)}addCase(Ke,dn){this._caseViews[Ke]=dn}_updateView(Ke){this._clearViews();const Kn=ei(Ke,Object.keys(this._caseViews),this._localization);this._activateView(this._caseViews[Kn])}_clearViews(){this._activeView&&this._activeView.destroy()}_activateView(Ke){Ke&&(this._activeView=Ke,this._activeView.create())}}er.\u0275fac=function(Ke){return new(Ke||er)(o.Y36(gn))},er.\u0275dir=o.lG2({type:er,selectors:[["","ngPlural",""]],inputs:{ngPlural:"ngPlural"},standalone:!0});class Yr{constructor(Ke,dn,Kn,$i){this.value=Ke;const sr=!isNaN(Number(Ke));$i.addCase(sr?`=${Ke}`:Ke,new Ln(Kn,dn))}}Yr.\u0275fac=function(Ke){return new(Ke||Yr)(o.$8M("ngPluralCase"),o.Y36(o.Rgc),o.Y36(o.s_b),o.Y36(er,1))},Yr.\u0275dir=o.lG2({type:Yr,selectors:[["","ngPluralCase",""]],standalone:!0});class _o{constructor(Ke,dn,Kn){this._ngEl=Ke,this._differs=dn,this._renderer=Kn,this._ngStyle=null,this._differ=null}set ngStyle(Ke){this._ngStyle=Ke,!this._differ&&Ke&&(this._differ=this._differs.find(Ke).create())}ngDoCheck(){if(this._differ){const Ke=this._differ.diff(this._ngStyle);Ke&&this._applyChanges(Ke)}}_setStyle(Ke,dn){const[Kn,$i]=Ke.split("."),sr=-1===Kn.indexOf("-")?void 0:o.JOm.DashCase;null!=dn?this._renderer.setStyle(this._ngEl.nativeElement,Kn,$i?`${dn}${$i}`:dn,sr):this._renderer.removeStyle(this._ngEl.nativeElement,Kn,sr)}_applyChanges(Ke){Ke.forEachRemovedItem(dn=>this._setStyle(dn.key,null)),Ke.forEachAddedItem(dn=>this._setStyle(dn.key,dn.currentValue)),Ke.forEachChangedItem(dn=>this._setStyle(dn.key,dn.currentValue))}}_o.\u0275fac=function(Ke){return new(Ke||_o)(o.Y36(o.SBq),o.Y36(o.aQg),o.Y36(o.Qsj))},_o.\u0275dir=o.lG2({type:_o,selectors:[["","ngStyle",""]],inputs:{ngStyle:"ngStyle"},standalone:!0});class Si{constructor(Ke){this._viewContainerRef=Ke,this._viewRef=null,this.ngTemplateOutletContext=null,this.ngTemplateOutlet=null,this.ngTemplateOutletInjector=null}ngOnChanges(Ke){if(Ke.ngTemplateOutlet||Ke.ngTemplateOutletInjector){const dn=this._viewContainerRef;if(this._viewRef&&dn.remove(dn.indexOf(this._viewRef)),this.ngTemplateOutlet){const{ngTemplateOutlet:Kn,ngTemplateOutletContext:$i,ngTemplateOutletInjector:sr}=this;this._viewRef=dn.createEmbeddedView(Kn,$i,sr?{injector:sr}:void 0)}else this._viewRef=null}else this._viewRef&&Ke.ngTemplateOutletContext&&this.ngTemplateOutletContext&&(this._viewRef.context=this.ngTemplateOutletContext)}}Si.\u0275fac=function(Ke){return new(Ke||Si)(o.Y36(o.s_b))},Si.\u0275dir=o.lG2({type:Si,selectors:[["","ngTemplateOutlet",""]],inputs:{ngTemplateOutletContext:"ngTemplateOutletContext",ngTemplateOutlet:"ngTemplateOutlet",ngTemplateOutletInjector:"ngTemplateOutletInjector"},standalone:!0,features:[o.TTD]});function Oa(ht,Ke){return new o.vHH(2100,!1)}const Vs=new class rl{createSubscription(Ke,dn){return Ke.then(dn,Kn=>{throw Kn})}dispose(Ke){}},ps=new class Uo{createSubscription(Ke,dn){return Ke.subscribe({next:dn,error:Kn=>{throw Kn}})}dispose(Ke){Ke.unsubscribe()}};class ts{constructor(Ke){this._latestValue=null,this._subscription=null,this._obj=null,this._strategy=null,this._ref=Ke}ngOnDestroy(){this._subscription&&this._dispose(),this._ref=null}transform(Ke){return this._obj?Ke!==this._obj?(this._dispose(),this.transform(Ke)):this._latestValue:(Ke&&this._subscribe(Ke),this._latestValue)}_subscribe(Ke){this._obj=Ke,this._strategy=this._selectStrategy(Ke),this._subscription=this._strategy.createSubscription(Ke,dn=>this._updateLatestValue(Ke,dn))}_selectStrategy(Ke){if((0,o.QGY)(Ke))return Vs;if((0,o.F4k)(Ke))return ps;throw Oa()}_dispose(){this._strategy.dispose(this._subscription),this._latestValue=null,this._subscription=null,this._obj=null}_updateLatestValue(Ke,dn){Ke===this._obj&&(this._latestValue=dn,this._ref.markForCheck())}}ts.\u0275fac=function(Ke){return new(Ke||ts)(o.Y36(o.sBO,16))},ts.\u0275pipe=o.Yjl({name:"async",type:ts,pure:!1,standalone:!0});class gs{transform(Ke){if(null==Ke)return null;if("string"!=typeof Ke)throw Oa();return Ke.toLowerCase()}}gs.\u0275fac=function(Ke){return new(Ke||gs)},gs.\u0275pipe=o.Yjl({name:"lowercase",type:gs,pure:!0,standalone:!0});const tc=/(?:[0-9A-Za-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16F1-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF40\uDF42-\uDF49\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDD70-\uDD7A\uDD7C-\uDD8A\uDD8C-\uDD92\uDD94\uDD95\uDD97-\uDDA1\uDDA3-\uDDB1\uDDB3-\uDDB9\uDDBB\uDDBC\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67\uDF80-\uDF85\uDF87-\uDFB0\uDFB2-\uDFBA]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDD00-\uDD23\uDE80-\uDEA9\uDEB0\uDEB1\uDF00-\uDF1C\uDF27\uDF30-\uDF45\uDF70-\uDF81\uDFB0-\uDFC4\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC71\uDC72\uDC75\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD44\uDD47\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC5F-\uDC61\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDEB8\uDF00-\uDF1A\uDF40-\uDF46]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCDF\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD2F\uDD3F\uDD41\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEB0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDEE0-\uDEF2\uDFB0]|\uD808[\uDC00-\uDF99]|\uD809[\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE70-\uDEBE\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE7F\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDD00-\uDD08]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00-\uDD22\uDD50-\uDD52\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD837[\uDF00-\uDF1E]|\uD838[\uDD00-\uDD2C\uDD37-\uDD3D\uDD4E\uDE90-\uDEAD\uDEC0-\uDEEB]|\uD839[\uDFE0-\uDFE6\uDFE8-\uDFEB\uDFED\uDFEE\uDFF0-\uDFFE]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43\uDD4B]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF38\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A])\S*/g;class $a{transform(Ke){if(null==Ke)return null;if("string"!=typeof Ke)throw Oa();return Ke.replace(tc,dn=>dn[0].toUpperCase()+dn.slice(1).toLowerCase())}}$a.\u0275fac=function(Ke){return new(Ke||$a)},$a.\u0275pipe=o.Yjl({name:"titlecase",type:$a,pure:!0,standalone:!0});class ln{transform(Ke){if(null==Ke)return null;if("string"!=typeof Ke)throw Oa();return Ke.toUpperCase()}}ln.\u0275fac=function(Ke){return new(Ke||ln)},ln.\u0275pipe=o.Yjl({name:"uppercase",type:ln,pure:!0,standalone:!0});const Di=new o.OlP("DATE_PIPE_DEFAULT_TIMEZONE"),Er=new o.OlP("DATE_PIPE_DEFAULT_OPTIONS");class ur{constructor(Ke,dn,Kn){this.locale=Ke,this.defaultTimezone=dn,this.defaultOptions=Kn}transform(Ke,dn,Kn,$i){if(null==Ke||""===Ke||Ke!=Ke)return null;try{const sr=dn??this.defaultOptions?.dateFormat??"mediumDate",lo=Kn??this.defaultOptions?.timezone??this.defaultTimezone??void 0;return Vi(Ke,sr,$i||this.locale,lo)}catch(sr){throw Oa(0,sr.message)}}}ur.\u0275fac=function(Ke){return new(Ke||ur)(o.Y36(o.soG,16),o.Y36(Di,24),o.Y36(Er,24))},ur.\u0275pipe=o.Yjl({name:"date",type:ur,pure:!0,standalone:!0});const gi=/#/g;class $t{constructor(Ke){this._localization=Ke}transform(Ke,dn,Kn){if(null==Ke)return"";if("object"!=typeof dn||null===dn)throw Oa();return dn[ei(Ke,Object.keys(dn),this._localization,Kn)].replace(gi,Ke.toString())}}$t.\u0275fac=function(Ke){return new(Ke||$t)(o.Y36(gn,16))},$t.\u0275pipe=o.Yjl({name:"i18nPlural",type:$t,pure:!0,standalone:!0});class Ma{transform(Ke,dn){if(null==Ke)return"";if("object"!=typeof dn||"string"!=typeof Ke)throw Oa();return dn.hasOwnProperty(Ke)?dn[Ke]:dn.hasOwnProperty("other")?dn.other:""}}Ma.\u0275fac=function(Ke){return new(Ke||Ma)},Ma.\u0275pipe=o.Yjl({name:"i18nSelect",type:Ma,pure:!0,standalone:!0});class Vo{transform(Ke){return JSON.stringify(Ke,null,2)}}Vo.\u0275fac=function(Ke){return new(Ke||Vo)},Vo.\u0275pipe=o.Yjl({name:"json",type:Vo,pure:!1,standalone:!0});class ja{constructor(Ke){this.differs=Ke,this.keyValues=[],this.compareFn=wa}transform(Ke,dn=wa){if(!Ke||!(Ke instanceof Map)&&"object"!=typeof Ke)return null;this.differ||(this.differ=this.differs.find(Ke).create());const Kn=this.differ.diff(Ke),$i=dn!==this.compareFn;return Kn&&(this.keyValues=[],Kn.forEachItem(sr=>{this.keyValues.push(function Ds(ht,Ke){return{key:ht,value:Ke}}(sr.key,sr.currentValue))})),(Kn||$i)&&(this.keyValues.sort(dn),this.compareFn=dn),this.keyValues}}function wa(ht,Ke){const dn=ht.key,Kn=Ke.key;if(dn===Kn)return 0;if(void 0===dn)return 1;if(void 0===Kn)return-1;if(null===dn)return 1;if(null===Kn)return-1;if("string"==typeof dn&&"string"==typeof Kn)return dn<Kn?-1:1;if("number"==typeof dn&&"number"==typeof Kn)return dn-Kn;if("boolean"==typeof dn&&"boolean"==typeof Kn)return dn<Kn?-1:1;const $i=String(dn),sr=String(Kn);return $i==sr?0:$i<sr?-1:1}ja.\u0275fac=function(Ke){return new(Ke||ja)(o.Y36(o.aQg,16))},ja.\u0275pipe=o.Yjl({name:"keyvalue",type:ja,pure:!1,standalone:!0});class ns{constructor(Ke){this._locale=Ke}transform(Ke,dn,Kn){if(!Ts(Ke))return null;Kn=Kn||this._locale;try{return Ii(Gl(Ke),Kn,dn)}catch($i){throw Oa(0,$i.message)}}}ns.\u0275fac=function(Ke){return new(Ke||ns)(o.Y36(o.soG,16))},ns.\u0275pipe=o.Yjl({name:"number",type:ns,pure:!0,standalone:!0});class Cs{constructor(Ke){this._locale=Ke}transform(Ke,dn,Kn){if(!Ts(Ke))return null;Kn=Kn||this._locale;try{return function Bo(ht,Ke,dn){return aa(ht,an(Ct(Ke,re.Percent),ft(Ke,Z.MinusSign)),Ke,Z.Group,Z.Decimal,dn,!0).replace(new RegExp(rr,"g"),ft(Ke,Z.PercentSign))}(Gl(Ke),Kn,dn)}catch($i){throw Oa(0,$i.message)}}}Cs.\u0275fac=function(Ke){return new(Ke||Cs)(o.Y36(o.soG,16))},Cs.\u0275pipe=o.Yjl({name:"percent",type:Cs,pure:!0,standalone:!0});class $r{constructor(Ke,dn="USD"){this._locale=Ke,this._defaultCurrencyCode=dn}transform(Ke,dn=this._defaultCurrencyCode,Kn="symbol",$i,sr){if(!Ts(Ke))return null;sr=sr||this._locale,"boolean"==typeof Kn&&(Kn=Kn?"symbol":"code");let lo=dn||this._defaultCurrencyCode;"code"!==Kn&&(lo="symbol"===Kn||"symbol-narrow"===Kn?kn(lo,"symbol"===Kn?"wide":"narrow",sr):Kn);try{return ea(Gl(Ke),sr,lo,dn,$i)}catch(ga){throw Oa(0,ga.message)}}}function Ts(ht){return!(null==ht||""===ht||ht!=ht)}function Gl(ht){if("string"==typeof ht&&!isNaN(Number(ht)-parseFloat(ht)))return Number(ht);if("number"!=typeof ht)throw new Error(`${ht} is not a number`);return ht}$r.\u0275fac=function(Ke){return new(Ke||$r)(o.Y36(o.soG,16),o.Y36(o.EJc,16))},$r.\u0275pipe=o.Yjl({name:"currency",type:$r,pure:!0,standalone:!0});class ol{transform(Ke,dn,Kn){if(null==Ke)return null;if(!this.supports(Ke))throw Oa();return Ke.slice(dn,Kn)}supports(Ke){return"string"==typeof Ke||Array.isArray(Ke)}}ol.\u0275fac=function(Ke){return new(Ke||ol)},ol.\u0275pipe=o.Yjl({name:"slice",type:ol,pure:!1,standalone:!0});class al{}al.\u0275fac=function(Ke){return new(Ke||al)},al.\u0275mod=o.oAB({type:al}),al.\u0275inj=o.cJS({});const Jn="browser",tn="server";function ar(ht){return ht===Jn}function vr(ht){return ht===tn}new o.GfV("15.2.9");class La{}La.\u0275prov=(0,o.Yz7)({token:La,providedIn:"root",factory:()=>new Ps((0,o.LFG)(E),window)});class Ps{constructor(Ke,dn){this.document=Ke,this.window=dn,this.offset=()=>[0,0]}setOffset(Ke){Array.isArray(Ke)?this.offset=()=>Ke:this.offset=Ke}getScrollPosition(){return this.supportsScrolling()?[this.window.pageXOffset,this.window.pageYOffset]:[0,0]}scrollToPosition(Ke){this.supportsScrolling()&&this.window.scrollTo(Ke[0],Ke[1])}scrollToAnchor(Ke){if(!this.supportsScrolling())return;const dn=function yt(ht,Ke){const dn=ht.getElementById(Ke)||ht.getElementsByName(Ke)[0];if(dn)return dn;if("function"==typeof ht.createTreeWalker&&ht.body&&(ht.body.createShadowRoot||ht.body.attachShadow)){const Kn=ht.createTreeWalker(ht.body,NodeFilter.SHOW_ELEMENT);let $i=Kn.currentNode;for(;$i;){const sr=$i.shadowRoot;if(sr){const lo=sr.getElementById(Ke)||sr.querySelector(`[name="${Ke}"]`);if(lo)return lo}$i=Kn.nextNode()}}return null}(this.document,Ke);dn&&(this.scrollToElement(dn),dn.focus())}setHistoryScrollRestoration(Ke){if(this.supportScrollRestoration()){const dn=this.window.history;dn&&dn.scrollRestoration&&(dn.scrollRestoration=Ke)}}scrollToElement(Ke){const dn=Ke.getBoundingClientRect(),Kn=dn.left+this.window.pageXOffset,$i=dn.top+this.window.pageYOffset,sr=this.offset();this.window.scrollTo(Kn-sr[0],$i-sr[1])}supportScrollRestoration(){try{if(!this.supportsScrolling())return!1;const Ke=is(this.window.history)||is(Object.getPrototypeOf(this.window.history));return!(!Ke||!Ke.writable&&!Ke.set)}catch{return!1}}supportsScrolling(){try{return!!this.window&&!!this.window.scrollTo&&"pageXOffset"in this.window}catch{return!1}}}function is(ht){return Object.getOwnPropertyDescriptor(ht,"scrollRestoration")}class We{}function Rt(ht,Ke){return Qn(ht)?new URL(ht):new URL(ht,Ke.location.href)}function Qn(ht){return/^https?:\/\//.test(ht)}function fi(ht){return Qn(ht)?new URL(ht).hostname:ht}function Mo(ht){return ht.startsWith("/")?ht.slice(1):ht}const ro=ht=>ht.src,qr=new o.OlP("ImageLoader",{providedIn:"root",factory:()=>ro});function ho(ht,Ke){return function(Kn){return function Xi(ht){if("string"!=typeof ht||""===ht.trim())return!1;try{return new URL(ht),!0}catch{return!1}}(Kn)||function xa(ht,Ke){throw new o.vHH(2959,!1)}(),Kn=function wr(ht){return ht.endsWith("/")?ht.slice(0,-1):ht}(Kn),[{provide:qr,useValue:lo=>(Qn(lo.src)&&function To(ht,Ke){throw new o.vHH(2959,!1)}(0,lo.src),ht(Kn,{...lo,src:Mo(lo.src)}))}]}}ho(function Ha(ht,Ke){let dn="format=auto";return Ke.width&&(dn+=`,width=${Ke.width}`),`${ht}/cdn-cgi/image/${dn}/${Ke.src}`});ho(function De(ht,Ke){let dn="f_auto,q_auto";return Ke.width&&(dn+=`,w_${Ke.width}`),`${ht}/image/upload/${dn}/${Ke.src}`});ho(function Fe(ht,Ke){const{src:dn,width:Kn}=Ke;let $i;if(Kn){$i=[ht,`tr:w-${Kn}`,dn]}else $i=[ht,dn];return $i.join("/")});ho(function Na(ht,Ke){const dn=new URL(`${ht}/${Ke.src}`);return dn.searchParams.set("auto","format"),Ke.width&&dn.searchParams.set("w",Ke.width.toString()),dn.href});function qi(ht,Ke=!0){return`The NgOptimizedImage directive ${Ke?`(activated on an <img> element with the \`ngSrc="${ht}"\`) `:""}has detected that`}function ia(ht){throw new o.vHH(2958,`Unexpected invocation of the ${ht} in the prod mode. Please make sure that the prod mode is enabled for production builds.`)}class $o{constructor(){this.images=new Map,this.alreadyWarned=new Set,this.window=null,this.observer=null,ia("LCP checker");const Ke=(0,o.f3M)(E).defaultView;typeof Ke<"u"&&typeof PerformanceObserver<"u"&&(this.window=Ke,this.observer=this.initPerformanceObserver())}initPerformanceObserver(){const Ke=new PerformanceObserver(dn=>{const Kn=dn.getEntries();if(0===Kn.length)return;const sr=Kn[Kn.length-1].element?.src??"";sr.startsWith("data:")||sr.startsWith("blob:")||this.images.get(sr)&&!this.alreadyWarned.has(sr)&&(this.alreadyWarned.add(sr),function su(ht){const Ke=qi(ht);console.warn((0,o.kuF)(2955,`${Ke} this image is the Largest Contentful Paint (LCP) element but was not marked "priority". This image should be marked "priority" in order to prioritize its loading. To fix this, add the "priority" attribute.`))}(sr))});return Ke.observe({type:"largest-contentful-paint",buffered:!0}),Ke}registerImage(Ke,dn){this.observer&&this.images.set(Rt(Ke,this.window).href,dn)}unregisterImage(Ke){this.observer&&this.images.delete(Rt(Ke,this.window).href)}ngOnDestroy(){this.observer&&(this.observer.disconnect(),this.images.clear(),this.alreadyWarned.clear())}}$o.\u0275fac=function(Ke){return new(Ke||$o)},$o.\u0275prov=o.Yz7({token:$o,factory:$o.\u0275fac,providedIn:"root"});const Us=new Set(["localhost","127.0.0.1","0.0.0.0"]),Ka=new o.OlP("PRECONNECT_CHECK_BLOCKLIST");class Tc{constructor(){this.document=(0,o.f3M)(E),this.preconnectLinks=null,this.alreadySeen=new Set,this.window=null,this.blocklist=new Set(Us),ia("preconnect link checker");const Ke=this.document.defaultView;typeof Ke<"u"&&(this.window=Ke);const dn=(0,o.f3M)(Ka,{optional:!0});dn&&this.populateBlocklist(dn)}populateBlocklist(Ke){Array.isArray(Ke)?Qs(Ke,dn=>{this.blocklist.add(fi(dn))}):this.blocklist.add(fi(Ke))}assertPreconnect(Ke,dn){if(!this.window)return;const Kn=Rt(Ke,this.window);this.blocklist.has(Kn.hostname)||this.alreadySeen.has(Kn.origin)||(this.alreadySeen.add(Kn.origin),this.preconnectLinks||(this.preconnectLinks=this.queryPreconnectLinks()),this.preconnectLinks.has(Kn.origin)||console.warn((0,o.kuF)(2956,`${qi(dn)} there is no preconnect tag present for this image. Preconnecting to the origin(s) that serve priority images ensures that these images are delivered as soon as possible. To fix this, please add the following element into the <head> of the document:\n  <link rel="preconnect" href="${Kn.origin}">`)))}queryPreconnectLinks(){const Ke=new Set,Kn=Array.from(this.document.querySelectorAll("link[rel=preconnect]"));for(let $i of Kn){const sr=Rt($i.href,this.window);Ke.add(sr.origin)}return Ke}ngOnDestroy(){this.preconnectLinks?.clear(),this.alreadySeen.clear()}}function Qs(ht,Ke){for(let dn of ht)Array.isArray(dn)?Qs(dn,Ke):Ke(dn)}Tc.\u0275fac=function(Ke){return new(Ke||Tc)},Tc.\u0275prov=o.Yz7({token:Tc,factory:Tc.\u0275fac,providedIn:"root"});const hl=new o.OlP("NG_OPTIMIZED_PRELOADED_IMAGES",{providedIn:"root",factory:()=>new Set});class Wl{constructor(){this.preloadedImages=(0,o.f3M)(hl),this.document=(0,o.f3M)(E)}createPreloadLinkTag(Ke,dn,Kn,$i){if(this.preloadedImages.has(dn))return;this.preloadedImages.add(dn);const sr=Ke.createElement("link");Ke.setAttribute(sr,"as","image"),Ke.setAttribute(sr,"href",dn),Ke.setAttribute(sr,"rel","preload"),Ke.setAttribute(sr,"fetchpriority","high"),$i&&Ke.setAttribute(sr,"imageSizes",$i),Kn&&Ke.setAttribute(sr,"imageSrcset",Kn),Ke.appendChild(this.document.head,sr)}}Wl.\u0275fac=function(Ke){return new(Ke||Wl)},Wl.\u0275prov=o.Yz7({token:Wl,factory:Wl.\u0275fac,providedIn:"root"});const Ku=/^((\s*\d+w\s*(,|$)){1,})$/,ss=[1,2],Yc={breakpoints:[16,32,48,64,96,128,256,384,640,750,828,1080,1200,1920,2048,3840]},lu=new o.OlP("ImageConfig",{providedIn:"root",factory:()=>Yc});class ac{constructor(){this.imageLoader=(0,o.f3M)(qr),this.config=function Oc(ht){let Ke={};return ht.breakpoints&&(Ke.breakpoints=ht.breakpoints.sort((dn,Kn)=>dn-Kn)),Object.assign({},Yc,ht,Ke)}((0,o.f3M)(lu)),this.renderer=(0,o.f3M)(o.Qsj),this.imgElement=(0,o.f3M)(o.SBq).nativeElement,this.injector=(0,o.f3M)(o.zs3),this.isServer=vr((0,o.f3M)(o.Lbi)),this.preloadLinkChecker=(0,o.f3M)(Wl),this.lcpObserver=null,this._renderedSrc=null,this._priority=!1,this._disableOptimizedSrcset=!1,this._fill=!1}set width(Ke){this._width=bd(Ke)}get width(){return this._width}set height(Ke){this._height=bd(Ke)}get height(){return this._height}set priority(Ke){this._priority=kd(Ke)}get priority(){return this._priority}set disableOptimizedSrcset(Ke){this._disableOptimizedSrcset=kd(Ke)}get disableOptimizedSrcset(){return this._disableOptimizedSrcset}set fill(Ke){this._fill=kd(Ke)}get fill(){return this._fill}ngOnInit(){this.setHostAttributes()}setHostAttributes(){this.fill?this.sizes||(this.sizes="100vw"):(this.setHostAttribute("width",this.width.toString()),this.setHostAttribute("height",this.height.toString())),this.setHostAttribute("loading",this.getLoadingBehavior()),this.setHostAttribute("fetchpriority",this.getFetchPriority()),this.setHostAttribute("ng-img","true");const Ke=this.getRewrittenSrc();let dn;this.setHostAttribute("src",Ke),this.sizes&&this.setHostAttribute("sizes",this.sizes),this.ngSrcset?dn=this.getRewrittenSrcset():this.shouldGenerateAutomaticSrcset()&&(dn=this.getAutomaticSrcset()),dn&&this.setHostAttribute("srcset",dn),this.isServer&&this.priority&&this.preloadLinkChecker.createPreloadLinkTag(this.renderer,Ke,dn,this.sizes)}ngOnChanges(Ke){}callImageLoader(Ke){let dn=Ke;return this.loaderParams&&(dn.loaderParams=this.loaderParams),this.imageLoader(dn)}getLoadingBehavior(){return this.priority||void 0===this.loading?this.priority?"eager":"lazy":this.loading}getFetchPriority(){return this.priority?"high":"auto"}getRewrittenSrc(){if(!this._renderedSrc){const Ke={src:this.ngSrc};this._renderedSrc=this.callImageLoader(Ke)}return this._renderedSrc}getRewrittenSrcset(){const Ke=Ku.test(this.ngSrcset);return this.ngSrcset.split(",").filter(Kn=>""!==Kn).map(Kn=>{Kn=Kn.trim();const $i=Ke?parseFloat(Kn):parseFloat(Kn)*this.width;return`${this.callImageLoader({src:this.ngSrc,width:$i})} ${Kn}`}).join(", ")}getAutomaticSrcset(){return this.sizes?this.getResponsiveSrcset():this.getFixedSrcset()}getResponsiveSrcset(){const{breakpoints:Ke}=this.config;let dn=Ke;return"100vw"===this.sizes?.trim()&&(dn=Ke.filter($i=>$i>=640)),dn.map($i=>`${this.callImageLoader({src:this.ngSrc,width:$i})} ${$i}w`).join(", ")}getFixedSrcset(){return ss.map(dn=>`${this.callImageLoader({src:this.ngSrc,width:this.width*dn})} ${dn}x`).join(", ")}shouldGenerateAutomaticSrcset(){return!this._disableOptimizedSrcset&&!this.srcset&&this.imageLoader!==ro&&!(this.width>1920||this.height>1080)}ngOnDestroy(){}setHostAttribute(Ke,dn){this.renderer.setAttribute(this.imgElement,Ke,dn)}}function bd(ht){return"string"==typeof ht?parseInt(ht,10):ht}function kd(ht){return null!=ht&&"false"!=`${ht}`}ac.\u0275fac=function(Ke){return new(Ke||ac)},ac.\u0275dir=o.lG2({type:ac,selectors:[["img","ngSrc",""]],hostVars:8,hostBindings:function(Ke,dn){2&Ke&&o.Udp("position",dn.fill?"absolute":null)("width",dn.fill?"100%":null)("height",dn.fill?"100%":null)("inset",dn.fill?"0px":null)},inputs:{ngSrc:"ngSrc",ngSrcset:"ngSrcset",sizes:"sizes",width:"width",height:"height",loading:"loading",priority:"priority",loaderParams:"loaderParams",disableOptimizedSrcset:"disableOptimizedSrcset",fill:"fill",src:"src",srcset:"srcset"},standalone:!0,features:[o.TTD]})},80529:(qe,I,p)=>{"use strict";p.d(I,{JF:()=>zr,LE:()=>ve,TP:()=>mt,UA:()=>Z,WM:()=>w,Zn:()=>le,aW:()=>re,dt:()=>oe,eN:()=>j,jN:()=>P});var o=p(36895),e=p(94650),l=p(39646),D=p(69751),g=p(24351),E=p(39300),T=p(54004);class n{}class P{}class w{constructor(ct){this.normalizedNames=new Map,this.lazyUpdate=null,ct?this.lazyInit="string"==typeof ct?()=>{this.headers=new Map,ct.split("\n").forEach(Yt=>{const oi=Yt.indexOf(":");if(oi>0){const Ni=Yt.slice(0,oi),Nn=Ni.toLowerCase(),pr=Yt.slice(oi+1).trim();this.maybeSetNormalizedName(Ni,Nn),this.headers.has(Nn)?this.headers.get(Nn).push(pr):this.headers.set(Nn,[pr])}})}:()=>{this.headers=new Map,Object.entries(ct).forEach(([Yt,oi])=>{let Ni;if(Ni="string"==typeof oi?[oi]:"number"==typeof oi?[oi.toString()]:oi.map(Nn=>Nn.toString()),Ni.length>0){const Nn=Yt.toLowerCase();this.headers.set(Nn,Ni),this.maybeSetNormalizedName(Yt,Nn)}})}:this.headers=new Map}has(ct){return this.init(),this.headers.has(ct.toLowerCase())}get(ct){this.init();const Yt=this.headers.get(ct.toLowerCase());return Yt&&Yt.length>0?Yt[0]:null}keys(){return this.init(),Array.from(this.normalizedNames.values())}getAll(ct){return this.init(),this.headers.get(ct.toLowerCase())||null}append(ct,Yt){return this.clone({name:ct,value:Yt,op:"a"})}set(ct,Yt){return this.clone({name:ct,value:Yt,op:"s"})}delete(ct,Yt){return this.clone({name:ct,value:Yt,op:"d"})}maybeSetNormalizedName(ct,Yt){this.normalizedNames.has(Yt)||this.normalizedNames.set(Yt,ct)}init(){this.lazyInit&&(this.lazyInit instanceof w?this.copyFrom(this.lazyInit):this.lazyInit(),this.lazyInit=null,this.lazyUpdate&&(this.lazyUpdate.forEach(ct=>this.applyUpdate(ct)),this.lazyUpdate=null))}copyFrom(ct){ct.init(),Array.from(ct.headers.keys()).forEach(Yt=>{this.headers.set(Yt,ct.headers.get(Yt)),this.normalizedNames.set(Yt,ct.normalizedNames.get(Yt))})}clone(ct){const Yt=new w;return Yt.lazyInit=this.lazyInit&&this.lazyInit instanceof w?this.lazyInit:this,Yt.lazyUpdate=(this.lazyUpdate||[]).concat([ct]),Yt}applyUpdate(ct){const Yt=ct.name.toLowerCase();switch(ct.op){case"a":case"s":let oi=ct.value;if("string"==typeof oi&&(oi=[oi]),0===oi.length)return;this.maybeSetNormalizedName(ct.name,Yt);const Ni=("a"===ct.op?this.headers.get(Yt):void 0)||[];Ni.push(...oi),this.headers.set(Yt,Ni);break;case"d":const Nn=ct.value;if(Nn){let pr=this.headers.get(Yt);if(!pr)return;pr=pr.filter(Sn=>-1===Nn.indexOf(Sn)),0===pr.length?(this.headers.delete(Yt),this.normalizedNames.delete(Yt)):this.headers.set(Yt,pr)}else this.headers.delete(Yt),this.normalizedNames.delete(Yt)}}forEach(ct){this.init(),Array.from(this.normalizedNames.keys()).forEach(Yt=>ct(this.normalizedNames.get(Yt),this.headers.get(Yt)))}}class Y{encodeKey(ct){return ae(ct)}encodeValue(ct){return ae(ct)}decodeKey(ct){return decodeURIComponent(ct)}decodeValue(ct){return decodeURIComponent(ct)}}const ue=/%(\d[a-f0-9])/gi,he={40:"@","3A":":",24:"$","2C":",","3B":";","3D":"=","3F":"?","2F":"/"};function ae(jn){return encodeURIComponent(jn).replace(ue,(ct,Yt)=>he[Yt]??ct)}function X(jn){return`${jn}`}class ve{constructor(ct={}){if(this.updates=null,this.cloneFrom=null,this.encoder=ct.encoder||new Y,ct.fromString){if(ct.fromObject)throw new Error("Cannot specify both fromString and fromObject.");this.map=function V(jn,ct){const Yt=new Map;return jn.length>0&&jn.replace(/^\?/,"").split("&").forEach(Ni=>{const Nn=Ni.indexOf("="),[pr,Sn]=-1==Nn?[ct.decodeKey(Ni),""]:[ct.decodeKey(Ni.slice(0,Nn)),ct.decodeValue(Ni.slice(Nn+1))],Pn=Yt.get(pr)||[];Pn.push(Sn),Yt.set(pr,Pn)}),Yt}(ct.fromString,this.encoder)}else ct.fromObject?(this.map=new Map,Object.keys(ct.fromObject).forEach(Yt=>{const oi=ct.fromObject[Yt],Ni=Array.isArray(oi)?oi.map(X):[X(oi)];this.map.set(Yt,Ni)})):this.map=null}has(ct){return this.init(),this.map.has(ct)}get(ct){this.init();const Yt=this.map.get(ct);return Yt?Yt[0]:null}getAll(ct){return this.init(),this.map.get(ct)||null}keys(){return this.init(),Array.from(this.map.keys())}append(ct,Yt){return this.clone({param:ct,value:Yt,op:"a"})}appendAll(ct){const Yt=[];return Object.keys(ct).forEach(oi=>{const Ni=ct[oi];Array.isArray(Ni)?Ni.forEach(Nn=>{Yt.push({param:oi,value:Nn,op:"a"})}):Yt.push({param:oi,value:Ni,op:"a"})}),this.clone(Yt)}set(ct,Yt){return this.clone({param:ct,value:Yt,op:"s"})}delete(ct,Yt){return this.clone({param:ct,value:Yt,op:"d"})}toString(){return this.init(),this.keys().map(ct=>{const Yt=this.encoder.encodeKey(ct);return this.map.get(ct).map(oi=>Yt+"="+this.encoder.encodeValue(oi)).join("&")}).filter(ct=>""!==ct).join("&")}clone(ct){const Yt=new ve({encoder:this.encoder});return Yt.cloneFrom=this.cloneFrom||this,Yt.updates=(this.updates||[]).concat(ct),Yt}init(){null===this.map&&(this.map=new Map),null!==this.cloneFrom&&(this.cloneFrom.init(),this.cloneFrom.keys().forEach(ct=>this.map.set(ct,this.cloneFrom.map.get(ct))),this.updates.forEach(ct=>{switch(ct.op){case"a":case"s":const Yt=("a"===ct.op?this.map.get(ct.param):void 0)||[];Yt.push(X(ct.value)),this.map.set(ct.param,Yt);break;case"d":if(void 0===ct.value){this.map.delete(ct.param);break}{let oi=this.map.get(ct.param)||[];const Ni=oi.indexOf(X(ct.value));-1!==Ni&&oi.splice(Ni,1),oi.length>0?this.map.set(ct.param,oi):this.map.delete(ct.param)}}}),this.cloneFrom=this.updates=null)}}class ge{constructor(){this.map=new Map}set(ct,Yt){return this.map.set(ct,Yt),this}get(ct){return this.map.has(ct)||this.map.set(ct,ct.defaultValue()),this.map.get(ct)}delete(ct){return this.map.delete(ct),this}has(ct){return this.map.has(ct)}keys(){return this.map.keys()}}function pe(jn){return typeof ArrayBuffer<"u"&&jn instanceof ArrayBuffer}function Pe(jn){return typeof Blob<"u"&&jn instanceof Blob}function xe(jn){return typeof FormData<"u"&&jn instanceof FormData}class re{constructor(ct,Yt,oi,Ni){let Nn;if(this.url=Yt,this.body=null,this.reportProgress=!1,this.withCredentials=!1,this.responseType="json",this.method=ct.toUpperCase(),function ne(jn){switch(jn){case"DELETE":case"GET":case"HEAD":case"OPTIONS":case"JSONP":return!1;default:return!0}}(this.method)||Ni?(this.body=void 0!==oi?oi:null,Nn=Ni):Nn=oi,Nn&&(this.reportProgress=!!Nn.reportProgress,this.withCredentials=!!Nn.withCredentials,Nn.responseType&&(this.responseType=Nn.responseType),Nn.headers&&(this.headers=Nn.headers),Nn.context&&(this.context=Nn.context),Nn.params&&(this.params=Nn.params)),this.headers||(this.headers=new w),this.context||(this.context=new ge),this.params){const pr=this.params.toString();if(0===pr.length)this.urlWithParams=Yt;else{const Sn=Yt.indexOf("?"),Pn=-1===Sn?"?":Sn<Yt.length-1?"&":"";this.urlWithParams=Yt+Pn+pr}}else this.params=new ve,this.urlWithParams=Yt}serializeBody(){return null===this.body?null:pe(this.body)||Pe(this.body)||xe(this.body)||function de(jn){return typeof URLSearchParams<"u"&&jn instanceof URLSearchParams}(this.body)||"string"==typeof this.body?this.body:this.body instanceof ve?this.body.toString():"object"==typeof this.body||"boolean"==typeof this.body||Array.isArray(this.body)?JSON.stringify(this.body):this.body.toString()}detectContentTypeHeader(){return null===this.body||xe(this.body)?null:Pe(this.body)?this.body.type||null:pe(this.body)?null:"string"==typeof this.body?"text/plain":this.body instanceof ve?"application/x-www-form-urlencoded;charset=UTF-8":"object"==typeof this.body||"number"==typeof this.body||"boolean"==typeof this.body?"application/json":null}clone(ct={}){const Yt=ct.method||this.method,oi=ct.url||this.url,Ni=ct.responseType||this.responseType,Nn=void 0!==ct.body?ct.body:this.body,pr=void 0!==ct.withCredentials?ct.withCredentials:this.withCredentials,Sn=void 0!==ct.reportProgress?ct.reportProgress:this.reportProgress;let Pn=ct.headers||this.headers,Nt=ct.params||this.params;const ai=ct.context??this.context;return void 0!==ct.setHeaders&&(Pn=Object.keys(ct.setHeaders).reduce((hn,Le)=>hn.set(Le,ct.setHeaders[Le]),Pn)),ct.setParams&&(Nt=Object.keys(ct.setParams).reduce((hn,Le)=>hn.set(Le,ct.setParams[Le]),Nt)),new re(Yt,oi,Nn,{params:Nt,headers:Pn,context:ai,reportProgress:Sn,responseType:Ni,withCredentials:pr})}}var oe,jn;(jn=oe||(oe={}))[jn.Sent=0]="Sent",jn[jn.UploadProgress=1]="UploadProgress",jn[jn.ResponseHeader=2]="ResponseHeader",jn[jn.DownloadProgress=3]="DownloadProgress",jn[jn.Response=4]="Response",jn[jn.User=5]="User";class me{constructor(ct,Yt=200,oi="OK"){this.headers=ct.headers||new w,this.status=void 0!==ct.status?ct.status:Yt,this.statusText=ct.statusText||oi,this.url=ct.url||null,this.ok=this.status>=200&&this.status<300}}class be extends me{constructor(ct={}){super(ct),this.type=oe.ResponseHeader}clone(ct={}){return new be({headers:ct.headers||this.headers,status:void 0!==ct.status?ct.status:this.status,statusText:ct.statusText||this.statusText,url:ct.url||this.url||void 0})}}class le extends me{constructor(ct={}){super(ct),this.type=oe.Response,this.body=void 0!==ct.body?ct.body:null}clone(ct={}){return new le({body:void 0!==ct.body?ct.body:this.body,headers:ct.headers||this.headers,status:void 0!==ct.status?ct.status:this.status,statusText:ct.statusText||this.statusText,url:ct.url||this.url||void 0})}}class Z extends me{constructor(ct){super(ct,0,"Unknown Error"),this.name="HttpErrorResponse",this.ok=!1,this.status>=200&&this.status<300?this.message=`Http failure during parsing for ${ct.url||"(unknown url)"}`:this.message=`Http failure response for ${ct.url||"(unknown url)"}: ${ct.status} ${ct.statusText}`,this.error=ct.error||null}}function Oe(jn,ct){return{body:ct,headers:jn.headers,context:jn.context,observe:jn.observe,params:jn.params,reportProgress:jn.reportProgress,responseType:jn.responseType,withCredentials:jn.withCredentials}}class j{constructor(ct){this.handler=ct}request(ct,Yt,oi={}){let Ni;if(ct instanceof re)Ni=ct;else{let Sn,Pn;Sn=oi.headers instanceof w?oi.headers:new w(oi.headers),oi.params&&(Pn=oi.params instanceof ve?oi.params:new ve({fromObject:oi.params})),Ni=new re(ct,Yt,void 0!==oi.body?oi.body:null,{headers:Sn,context:oi.context,params:Pn,reportProgress:oi.reportProgress,responseType:oi.responseType||"json",withCredentials:oi.withCredentials})}const Nn=(0,l.of)(Ni).pipe((0,g.b)(Sn=>this.handler.handle(Sn)));if(ct instanceof re||"events"===oi.observe)return Nn;const pr=Nn.pipe((0,E.h)(Sn=>Sn instanceof le));switch(oi.observe||"body"){case"body":switch(Ni.responseType){case"arraybuffer":return pr.pipe((0,T.U)(Sn=>{if(null!==Sn.body&&!(Sn.body instanceof ArrayBuffer))throw new Error("Response is not an ArrayBuffer.");return Sn.body}));case"blob":return pr.pipe((0,T.U)(Sn=>{if(null!==Sn.body&&!(Sn.body instanceof Blob))throw new Error("Response is not a Blob.");return Sn.body}));case"text":return pr.pipe((0,T.U)(Sn=>{if(null!==Sn.body&&"string"!=typeof Sn.body)throw new Error("Response is not a string.");return Sn.body}));default:return pr.pipe((0,T.U)(Sn=>Sn.body))}case"response":return pr;default:throw new Error(`Unreachable: unhandled observe type ${oi.observe}}`)}}delete(ct,Yt={}){return this.request("DELETE",ct,Yt)}get(ct,Yt={}){return this.request("GET",ct,Yt)}head(ct,Yt={}){return this.request("HEAD",ct,Yt)}jsonp(ct,Yt){return this.request("JSONP",ct,{params:(new ve).append(Yt,"JSONP_CALLBACK"),observe:"body",responseType:"json"})}options(ct,Yt={}){return this.request("OPTIONS",ct,Yt)}patch(ct,Yt,oi={}){return this.request("PATCH",ct,Oe(oi,Yt))}post(ct,Yt,oi={}){return this.request("POST",ct,Oe(oi,Yt))}put(ct,Yt,oi={}){return this.request("PUT",ct,Oe(oi,Yt))}}function ke(jn,ct){return ct(jn)}function Be(jn,ct){return(Yt,oi)=>ct.intercept(Yt,{handle:Ni=>jn(Ni,oi)})}j.\u0275fac=function(ct){return new(ct||j)(e.LFG(n))},j.\u0275prov=e.Yz7({token:j,factory:j.\u0275fac});const mt=new e.OlP("HTTP_INTERCEPTORS"),ut=new e.OlP("HTTP_INTERCEPTOR_FNS");function Ve(){let jn=null;return(ct,Yt)=>(null===jn&&(jn=((0,e.f3M)(mt,{optional:!0})??[]).reduceRight(Be,ke)),jn(ct,Yt))}class tt extends n{constructor(ct,Yt){super(),this.backend=ct,this.injector=Yt,this.chain=null}handle(ct){if(null===this.chain){const Yt=Array.from(new Set(this.injector.get(ut)));this.chain=Yt.reduceRight((oi,Ni)=>function nt(jn,ct,Yt){return(oi,Ni)=>Yt.runInContext(()=>ct(oi,Nn=>jn(Nn,Ni)))}(oi,Ni,this.injector),ke)}return this.chain(ct,Yt=>this.backend.handle(Yt))}}tt.\u0275fac=function(ct){return new(ct||tt)(e.LFG(P),e.LFG(e.lqb))},tt.\u0275prov=e.Yz7({token:tt,factory:tt.\u0275fac});let wt,Ne=0;class st{}function nn(){return"object"==typeof window?window:{}}class Dn{constructor(ct,Yt){this.callbackMap=ct,this.document=Yt,this.resolvedPromise=Promise.resolve()}nextCallback(){return"ng_jsonp_callback_"+Ne++}handle(ct){if("JSONP"!==ct.method)throw new Error("JSONP requests must use JSONP request method.");if("json"!==ct.responseType)throw new Error("JSONP requests must use Json response type.");if(ct.headers.keys().length>0)throw new Error("JSONP requests do not support headers.");return new D.y(Yt=>{const oi=this.nextCallback(),Ni=ct.urlWithParams.replace(/=JSONP_CALLBACK(&|$)/,`=${oi}$1`),Nn=this.document.createElement("script");Nn.src=Ni;let pr=null,Sn=!1;this.callbackMap[oi]=hn=>{delete this.callbackMap[oi],pr=hn,Sn=!0};const Pn=()=>{Nn.parentNode&&Nn.parentNode.removeChild(Nn),delete this.callbackMap[oi]};return Nn.addEventListener("load",hn=>{this.resolvedPromise.then(()=>{Pn(),Sn?(Yt.next(new le({body:pr,status:200,statusText:"OK",url:Ni})),Yt.complete()):Yt.error(new Z({url:Ni,status:0,statusText:"JSONP Error",error:new Error("JSONP injected script did not invoke callback.")}))})}),Nn.addEventListener("error",hn=>{Pn(),Yt.error(new Z({error:hn,status:0,statusText:"JSONP Error",url:Ni}))}),this.document.body.appendChild(Nn),Yt.next({type:oe.Sent}),()=>{Sn||this.removeListeners(Nn),Pn()}})}removeListeners(ct){wt||(wt=this.document.implementation.createHTMLDocument()),wt.adoptNode(ct)}}function Mn(jn,ct){return"JSONP"===jn.method?(0,e.f3M)(Dn).handle(jn):ct(jn)}Dn.\u0275fac=function(ct){return new(ct||Dn)(e.LFG(st),e.LFG(o.K0))},Dn.\u0275prov=e.Yz7({token:Dn,factory:Dn.\u0275fac});class vi{constructor(ct){this.injector=ct}intercept(ct,Yt){return this.injector.runInContext(()=>Mn(ct,oi=>Yt.handle(oi)))}}vi.\u0275fac=function(ct){return new(ct||vi)(e.LFG(e.lqb))},vi.\u0275prov=e.Yz7({token:vi,factory:vi.\u0275fac});const Gi=/^\)\]\}',?\n/;class wi{constructor(ct){this.xhrFactory=ct}handle(ct){if("JSONP"===ct.method)throw new Error("Attempted to construct Jsonp request without HttpClientJsonpModule installed.");return new D.y(Yt=>{const oi=this.xhrFactory.build();if(oi.open(ct.method,ct.urlWithParams),ct.withCredentials&&(oi.withCredentials=!0),ct.headers.forEach((Le,ce)=>oi.setRequestHeader(Le,ce.join(","))),ct.headers.has("Accept")||oi.setRequestHeader("Accept","application/json, text/plain, */*"),!ct.headers.has("Content-Type")){const Le=ct.detectContentTypeHeader();null!==Le&&oi.setRequestHeader("Content-Type",Le)}if(ct.responseType){const Le=ct.responseType.toLowerCase();oi.responseType="json"!==Le?Le:"text"}const Ni=ct.serializeBody();let Nn=null;const pr=()=>{if(null!==Nn)return Nn;const Le=oi.statusText||"OK",ce=new w(oi.getAllResponseHeaders()),we=function mi(jn){return"responseURL"in jn&&jn.responseURL?jn.responseURL:/^X-Request-URL:/m.test(jn.getAllResponseHeaders())?jn.getResponseHeader("X-Request-URL"):null}(oi)||ct.url;return Nn=new be({headers:ce,status:oi.status,statusText:Le,url:we}),Nn},Sn=()=>{let{headers:Le,status:ce,statusText:we,url:Qe}=pr(),qt=null;204!==ce&&(qt=typeof oi.response>"u"?oi.responseText:oi.response),0===ce&&(ce=qt?200:0);let Tn=ce>=200&&ce<300;if("json"===ct.responseType&&"string"==typeof qt){const lr=qt;qt=qt.replace(Gi,"");try{qt=""!==qt?JSON.parse(qt):null}catch(mo){qt=lr,Tn&&(Tn=!1,qt={error:mo,text:qt})}}Tn?(Yt.next(new le({body:qt,headers:Le,status:ce,statusText:we,url:Qe||void 0})),Yt.complete()):Yt.error(new Z({error:qt,headers:Le,status:ce,statusText:we,url:Qe||void 0}))},Pn=Le=>{const{url:ce}=pr(),we=new Z({error:Le,status:oi.status||0,statusText:oi.statusText||"Unknown Error",url:ce||void 0});Yt.error(we)};let Nt=!1;const ai=Le=>{Nt||(Yt.next(pr()),Nt=!0);let ce={type:oe.DownloadProgress,loaded:Le.loaded};Le.lengthComputable&&(ce.total=Le.total),"text"===ct.responseType&&oi.responseText&&(ce.partialText=oi.responseText),Yt.next(ce)},hn=Le=>{let ce={type:oe.UploadProgress,loaded:Le.loaded};Le.lengthComputable&&(ce.total=Le.total),Yt.next(ce)};return oi.addEventListener("load",Sn),oi.addEventListener("error",Pn),oi.addEventListener("timeout",Pn),oi.addEventListener("abort",Pn),ct.reportProgress&&(oi.addEventListener("progress",ai),null!==Ni&&oi.upload&&oi.upload.addEventListener("progress",hn)),oi.send(Ni),Yt.next({type:oe.Sent}),()=>{oi.removeEventListener("error",Pn),oi.removeEventListener("abort",Pn),oi.removeEventListener("load",Sn),oi.removeEventListener("timeout",Pn),ct.reportProgress&&(oi.removeEventListener("progress",ai),null!==Ni&&oi.upload&&oi.upload.removeEventListener("progress",hn)),oi.readyState!==oi.DONE&&oi.abort()}})}}wi.\u0275fac=function(ct){return new(ct||wi)(e.LFG(o.JF))},wi.\u0275prov=e.Yz7({token:wi,factory:wi.\u0275fac});const Bn=new e.OlP("XSRF_ENABLED"),kn="XSRF-TOKEN",On=new e.OlP("XSRF_COOKIE_NAME",{providedIn:"root",factory:()=>kn}),je="X-XSRF-TOKEN",Bt=new e.OlP("XSRF_HEADER_NAME",{providedIn:"root",factory:()=>je});class xn{}class Fn{constructor(ct,Yt,oi){this.doc=ct,this.platform=Yt,this.cookieName=oi,this.lastCookieString="",this.lastToken=null,this.parseCount=0}getToken(){if("server"===this.platform)return null;const ct=this.doc.cookie||"";return ct!==this.lastCookieString&&(this.parseCount++,this.lastToken=(0,o.Mx)(ct,this.cookieName),this.lastCookieString=ct),this.lastToken}}function ui(jn,ct){const Yt=jn.url.toLowerCase();if(!(0,e.f3M)(Bn)||"GET"===jn.method||"HEAD"===jn.method||Yt.startsWith("http://")||Yt.startsWith("https://"))return ct(jn);const oi=(0,e.f3M)(xn).getToken(),Ni=(0,e.f3M)(Bt);return null!=oi&&!jn.headers.has(Ni)&&(jn=jn.clone({headers:jn.headers.set(Ni,oi)})),ct(jn)}Fn.\u0275fac=function(ct){return new(ct||Fn)(e.LFG(o.K0),e.LFG(e.Lbi),e.LFG(On))},Fn.\u0275prov=e.Yz7({token:Fn,factory:Fn.\u0275fac});class Ai{constructor(ct){this.injector=ct}intercept(ct,Yt){return this.injector.runInContext(()=>ui(ct,oi=>Yt.handle(oi)))}}var si;function Vi(jn,ct){return{\u0275kind:jn,\u0275providers:ct}}Ai.\u0275fac=function(ct){return new(ct||Ai)(e.LFG(e.lqb))},Ai.\u0275prov=e.Yz7({token:Ai,factory:Ai.\u0275fac}),function(jn){jn[jn.Interceptors=0]="Interceptors",jn[jn.LegacyInterceptors=1]="LegacyInterceptors",jn[jn.CustomXsrfConfiguration=2]="CustomXsrfConfiguration",jn[jn.NoXsrfProtection=3]="NoXsrfProtection",jn[jn.JsonpSupport=4]="JsonpSupport",jn[jn.RequestsMadeViaParent=5]="RequestsMadeViaParent"}(si||(si={}));const An=new e.OlP("LEGACY_INTERCEPTOR_FN");function In({cookieName:jn,headerName:ct}){const Yt=[];return void 0!==jn&&Yt.push({provide:On,useValue:jn}),void 0!==ct&&Yt.push({provide:Bt,useValue:ct}),Vi(si.CustomXsrfConfiguration,Yt)}class Gr{static disable(){return{ngModule:Gr,providers:[Vi(si.NoXsrfProtection,[{provide:Bn,useValue:!1}]).\u0275providers]}}static withOptions(ct={}){return{ngModule:Gr,providers:In(ct).\u0275providers}}}Gr.\u0275fac=function(ct){return new(ct||Gr)},Gr.\u0275mod=e.oAB({type:Gr}),Gr.\u0275inj=e.cJS({providers:[Ai,{provide:mt,useExisting:Ai,multi:!0},{provide:xn,useClass:Fn},In({cookieName:kn,headerName:je}).\u0275providers,{provide:Bn,useValue:!0}]});class zr{}zr.\u0275fac=function(ct){return new(ct||zr)},zr.\u0275mod=e.oAB({type:zr}),zr.\u0275inj=e.cJS({providers:[function Vn(...jn){const ct=[j,wi,tt,{provide:n,useExisting:tt},{provide:P,useExisting:wi},{provide:ut,useValue:ui,multi:!0},{provide:Bn,useValue:!0},{provide:xn,useClass:Fn}];for(const Yt of jn)ct.push(...Yt.\u0275providers);return(0,e.MR2)(ct)}(function vn(){return Vi(si.LegacyInterceptors,[{provide:An,useFactory:Ve},{provide:ut,useExisting:An,multi:!0}])}())]});class Eo{}Eo.\u0275fac=function(ct){return new(ct||Eo)},Eo.\u0275mod=e.oAB({type:Eo}),Eo.\u0275inj=e.cJS({providers:[function gr(){return Vi(si.JsonpSupport,[Dn,{provide:st,useFactory:nn},{provide:ut,useValue:Mn,multi:!0}])}().\u0275providers]})},80645:(qe,I,p)=>{"use strict";p.d(I,{Pl:()=>ue});var o=p(80529),e=p(94650),l=p(69751);class D{}class g{get cancelled(){return this._cancelled}constructor(ae,X){this.request=ae,this.observer=X,this._cancelled=!1}flush(ae,X={}){if(this.cancelled)throw new Error("Cannot flush a cancelled request.");const ve=this.request.urlWithParams,ye=X.headers instanceof o.WM?X.headers:new o.WM(X.headers);ae=function w(he,ae){if(null===ae)return null;switch(he){case"arraybuffer":return function E(he){if(typeof ArrayBuffer>"u")throw new Error("ArrayBuffer responses are not supported on this platform.");if(he instanceof ArrayBuffer)return he;throw new Error("Automatic conversion to ArrayBuffer is not supported for response type.")}(ae);case"blob":return function T(he){if(typeof Blob>"u")throw new Error("Blob responses are not supported on this platform.");if(he instanceof Blob)return he;if(ArrayBuffer&&he instanceof ArrayBuffer)return new Blob([he]);throw new Error("Automatic conversion to Blob is not supported for response type.")}(ae);case"json":return n(ae);case"text":return function P(he){if("string"==typeof he)return he;if(typeof ArrayBuffer<"u"&&he instanceof ArrayBuffer)throw new Error("Automatic conversion to text is not supported for ArrayBuffers.");if(typeof Blob<"u"&&he instanceof Blob)throw new Error("Automatic conversion to text is not supported for Blobs.");return JSON.stringify(n(he,"text"))}(ae);default:throw new Error(`Unsupported responseType: ${he}`)}}(this.request.responseType,ae);let ge=X.statusText,ne=void 0!==X.status?X.status:200;if(void 0===X.status&&(null===ae?(ne=204,ge=ge||"No Content"):ge=ge||"OK"),void 0===ge)throw new Error("statusText is required when setting a custom status.");ne>=200&&ne<300?(this.observer.next(new o.Zn({body:ae,headers:ye,status:ne,statusText:ge,url:ve})),this.observer.complete()):this.observer.error(new o.UA({error:ae,headers:ye,status:ne,statusText:ge,url:ve}))}error(ae,X={}){if(this.cancelled)throw new Error("Cannot return an error for a cancelled request.");if(X.status&&X.status>=200&&X.status<300)throw new Error("error() called with a successful status.");const ve=X.headers instanceof o.WM?X.headers:new o.WM(X.headers);this.observer.error(new o.UA({error:ae,headers:ve,status:X.status||0,statusText:X.statusText||"",url:this.request.urlWithParams}))}event(ae){if(this.cancelled)throw new Error("Cannot send events to a cancelled request.");this.observer.next(ae)}}function n(he,ae="JSON"){if(typeof ArrayBuffer<"u"&&he instanceof ArrayBuffer)throw new Error(`Automatic conversion to ${ae} is not supported for ArrayBuffers.`);if(typeof Blob<"u"&&he instanceof Blob)throw new Error(`Automatic conversion to ${ae} is not supported for Blobs.`);if("string"==typeof he||"number"==typeof he||"object"==typeof he||"boolean"==typeof he||Array.isArray(he))return he;throw new Error(`Automatic conversion to ${ae} is not supported for response type.`)}class B{constructor(){this.open=[]}handle(ae){return new l.y(X=>{const ve=new g(ae,X);return this.open.push(ve),X.next({type:o.dt.Sent}),()=>{ve._cancelled=!0}})}_match(ae){return"string"==typeof ae?this.open.filter(X=>X.request.urlWithParams===ae):"function"==typeof ae?this.open.filter(X=>ae(X.request)):this.open.filter(X=>!(ae.method&&X.request.method!==ae.method.toUpperCase()||ae.url&&X.request.urlWithParams!==ae.url))}match(ae){const X=this._match(ae);return X.forEach(ve=>{const ye=this.open.indexOf(ve);-1!==ye&&this.open.splice(ye,1)}),X}expectOne(ae,X){X=X||this.descriptionFromMatcher(ae);const ve=this.match(ae);if(ve.length>1)throw new Error(`Expected one matching request for criteria "${X}", found ${ve.length} requests.`);if(0===ve.length){let ye=`Expected one matching request for criteria "${X}", found none.`;if(this.open.length>0){ye+=` Requests received are: ${this.open.map(Y).join(", ")}.`}throw new Error(ye)}return ve[0]}expectNone(ae,X){X=X||this.descriptionFromMatcher(ae);const ve=this.match(ae);if(ve.length>0)throw new Error(`Expected zero matching requests for criteria "${X}", found ${ve.length}.`)}verify(ae={}){let X=this.open;if(ae.ignoreCancelled&&(X=X.filter(ve=>!ve.cancelled)),X.length>0){const ve=X.map(Y).join(", ");throw new Error(`Expected no open requests, found ${X.length}: ${ve}`)}}descriptionFromMatcher(ae){if("string"==typeof ae)return`Match URL: ${ae}`;if("object"==typeof ae){return`Match method: ${ae.method||"(any)"}, URL: ${ae.url||"(any)"}`}return`Match by function: ${ae.name}`}}function Y(he){const ae=he.request.urlWithParams;return`${he.request.method} ${ae}`}B.\u0275fac=function(ae){return new(ae||B)},B.\u0275prov=e.Yz7({token:B,factory:B.\u0275fac});class ue{}ue.\u0275fac=function(ae){return new(ae||ue)},ue.\u0275mod=e.oAB({type:ue}),ue.\u0275inj=e.cJS({providers:[function V(){return[B,{provide:o.jN,useExisting:B},{provide:D,useExisting:B}]}()],imports:[o.JF]})},94650:(qe,I,p)=>{"use strict";p.d(I,{$8M:()=>cs,$WT:()=>gn,$Z:()=>wb,AA_:()=>uu,AFp:()=>WD,ALo:()=>ND,AaK:()=>n,AcB:()=>Mm,Akn:()=>rh,AsE:()=>lg,B6R:()=>mo,BQk:()=>D0,CHM:()=>$o,CRH:()=>uy,CZH:()=>e0,CqO:()=>_v,D6c:()=>Av,DdM:()=>hx,Dn7:()=>Cx,E6H:()=>US,EJc:()=>jC,EiD:()=>md,EpF:()=>gv,F$t:()=>ji,F4k:()=>ih,FYo:()=>Af,FiY:()=>Fd,G48:()=>$S,G7q:()=>Ex,GSi:()=>Ir,Gf:()=>XE,GfV:()=>Ad,GkF:()=>gf,Gpc:()=>B,Gre:()=>Ky,HOy:()=>Lh,Hsn:()=>br,IIB:()=>sM,Ikx:()=>Cv,JOm:()=>Ls,JVY:()=>zu,JZr:()=>ae,Jf7:()=>wf,KtG:()=>su,L6J:()=>ET,L6k:()=>_p,LAX:()=>Hm,LFG:()=>zr,LSH:()=>Zh,LVF:()=>zS,Lbi:()=>j0,Lck:()=>dx,MAs:()=>Zy,MGl:()=>uo,MMx:()=>$1,MR2:()=>Mp,MUr:()=>Ql,NdJ:()=>Qv,O4$:()=>xc,OlP:()=>vc,Oqu:()=>Io,P3R:()=>dm,PXZ:()=>ZS,PiD:()=>qu,Q6J:()=>Ub,QGY:()=>kf,QbO:()=>K0,Qsj:()=>kl,R0b:()=>Ug,RDi:()=>hg,Rgc:()=>Y0,SBq:()=>Wm,Sil:()=>hy,Suo:()=>dT,TTD:()=>Ta,TgZ:()=>Pg,Tol:()=>pc,Udp:()=>R_,VKq:()=>gx,W1O:()=>dy,WFA:()=>U,WLB:()=>tT,XFs:()=>Bn,Xek:()=>yT,Xpm:()=>lr,Xts:()=>yg,Y36:()=>Xg,YKP:()=>QM,YNc:()=>T0,Yjl:()=>Zn,Yz7:()=>ft,Z0I:()=>st,ZZ4:()=>_y,_Bn:()=>ux,_UZ:()=>o_,_Vd:()=>Mg,_c5:()=>KC,_uU:()=>UM,aQ5:()=>am,aQg:()=>H_,ahi:()=>Wf,c2e:()=>tE,cJS:()=>rn,cg1:()=>P1,d8E:()=>I1,dDg:()=>rE,dqk:()=>Fn,dwT:()=>FE,eBb:()=>nv,eFA:()=>KD,eJc:()=>pT,ekj:()=>A0,eoX:()=>c_,f3M:()=>mr,g9A:()=>Px,gM2:()=>sT,gxx:()=>Mb,h0i:()=>N0,hGG:()=>V_,hij:()=>Zu,i9L:()=>Xc,iGM:()=>uT,ifc:()=>Pn,ip1:()=>cM,jDz:()=>j1,kEZ:()=>_x,kL8:()=>O1,kYT:()=>Bo,kcU:()=>lp,kuF:()=>ve,l5B:()=>jE,lG2:()=>an,lcZ:()=>bx,lnq:()=>Od,lqb:()=>gd,lri:()=>AT,mCW:()=>rv,n4l:()=>Sn,n5z:()=>En,n_E:()=>KE,oAB:()=>ea,oJD:()=>Kg,oxw:()=>zn,pB0:()=>Vm,pYS:()=>Np,pfw:()=>$0,q3G:()=>Qp,qLn:()=>Th,qOj:()=>wC,qZA:()=>L_,qzn:()=>zs,rWj:()=>iE,r_U:()=>CT,s9C:()=>io,sBO:()=>zx,s_b:()=>cb,soG:()=>uM,tBr:()=>Hl,tb:()=>n0,tp0:()=>Zc,uIk:()=>Nb,vHH:()=>X,vR:()=>Ef,vpe:()=>sb,wA2:()=>bT,wAp:()=>sh,xi3:()=>Q1,xp6:()=>pf,ynx:()=>Vd,z2F:()=>Q0,z3N:()=>Js,zSh:()=>Ya,zWS:()=>M0,zlt:()=>K1,zs3:()=>ec});var o=p(77579),e=p(50727),l=p(69751),D=p(56451),g=p(13099);function E(h){for(let _ in h)if(h[_]===E)return _;throw Error("Could not find renamed property on target object.")}function T(h,_){for(const A in _)_.hasOwnProperty(A)&&!h.hasOwnProperty(A)&&(h[A]=_[A])}function n(h){if("string"==typeof h)return h;if(Array.isArray(h))return"["+h.map(n).join(", ")+"]";if(null==h)return""+h;if(h.overriddenName)return`${h.overriddenName}`;if(h.name)return`${h.name}`;const _=h.toString();if(null==_)return""+_;const A=_.indexOf("\n");return-1===A?_:_.substring(0,A)}function P(h,_){return null==h||""===h?null===_?"":_:null==_||""===_?h:h+" "+_}const w=E({__forward_ref__:E});function B(h){return h.__forward_ref__=B,h.toString=function(){return n(this())},h}function Y(h){return V(h)?h():h}function V(h){return"function"==typeof h&&h.hasOwnProperty(w)&&h.__forward_ref__===B}function ue(h){return h&&!!h.\u0275providers}const ae="https://g.co/ng/security#xss";class X extends Error{constructor(_,A){super(ve(_,A)),this.code=_}}function ve(h,_){return`NG0${Math.abs(h)}${_?": "+_.trim():""}`}function ye(h){return"string"==typeof h?h:null==h?"":String(h)}function ge(h){return"function"==typeof h?h.name||h.toString():"object"==typeof h&&null!=h&&"function"==typeof h.type?h.type.name||h.type.toString():ye(h)}function xe(h,_){throw new X(-201,!1)}function be(h,_,A){h!=_&&Ve(A,h,_,"==")}function ut(h,_){null==h&&Ve(_,h,null,"!=")}function Ve(h,_,A,z){throw new Error(`ASSERTION ERROR: ${h}`+(null==z?"":` [Expected=> ${A} ${z} ${_} <=Actual]`))}function ft(h){return{token:h.token,providedIn:h.providedIn||null,factory:h.factory,value:void 0}}function rn(h){return{providers:h.providers||[],imports:h.imports||[]}}function He(h){return nn(h,vi)||nn(h,mi)}function st(h){return null!==He(h)}function nn(h,_){return h.hasOwnProperty(_)?h[_]:null}function Mn(h){return h&&(h.hasOwnProperty(Gi)||h.hasOwnProperty(wi))?h[Gi]:null}const vi=E({\u0275prov:E}),Gi=E({\u0275inj:E}),mi=E({ngInjectableDef:E}),wi=E({ngInjectorDef:E});var Bn,h;let kn;function je(h){const _=kn;return kn=h,_}function Bt(h,_,A){const z=He(h);return z&&"root"==z.providedIn?void 0===z.value?z.value=z.factory():z.value:A&Bn.Optional?null:void 0!==_?_:void xe(n(h))}(h=Bn||(Bn={}))[h.Default=0]="Default",h[h.Host=1]="Host",h[h.Self=2]="Self",h[h.SkipSelf=4]="SkipSelf",h[h.Optional=8]="Optional";const Fn=(()=>typeof globalThis<"u"&&globalThis||typeof global<"u"&&global||typeof window<"u"&&window||typeof self<"u"&&typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&self)();const Vi={},Vn="__NG_DI_FLAG__",Hn="ngTempTokenPath",An="ngTokenPath",vn=/\n/gm,In="\u0275",Zi="__source";let gr;function Hi(h){const _=gr;return gr=h,_}function Gr(h,_=Bn.Default){if(void 0===gr)throw new X(-203,!1);return null===gr?Bt(h,void 0,_):gr.get(h,_&Bn.Optional?null:void 0,_)}function zr(h,_=Bn.Default){return(function On(){return kn}()||Gr)(Y(h),_)}function Eo(h){throw new X(202,!1)}function mr(h,_=Bn.Default){return zr(h,jn(_))}function jn(h){return typeof h>"u"||"number"==typeof h?h:0|(h.optional&&8)|(h.host&&1)|(h.self&&2)|(h.skipSelf&&4)}function ct(h){const _=[];for(let A=0;A<h.length;A++){const z=Y(h[A]);if(Array.isArray(z)){if(0===z.length)throw new X(900,!1);let K,fe=Bn.Default;for(let Re=0;Re<z.length;Re++){const lt=z[Re],vt=oi(lt);"number"==typeof vt?-1===vt?K=lt.token:fe|=vt:K=lt}_.push(zr(K,fe))}else _.push(zr(z))}return _}function Yt(h,_){return h[Vn]=_,h.prototype[Vn]=_,h}function oi(h){return h[Vn]}function Ni(h,_,A,z){const K=h[Hn];throw _[Zi]&&K.unshift(_[Zi]),h.message=function Nn(h,_,A,z=null){h=h&&"\n"===h.charAt(0)&&h.charAt(1)==In?h.slice(2):h;let K=n(_);if(Array.isArray(_))K=_.map(n).join(" -> ");else if("object"==typeof _){let fe=[];for(let Re in _)if(_.hasOwnProperty(Re)){let lt=_[Re];fe.push(Re+":"+("string"==typeof lt?JSON.stringify(lt):n(lt)))}K=`{${fe.join(", ")}}`}return`${A}${z?"("+z+")":""}[${K}]: ${h.replace(vn,"\n  ")}`}("\n"+h.message,K,A,z),h[An]=K,h[Hn]=null,h}function pr(h){return{toString:h}.toString()}var Sn,Pn;!function(h){h[h.OnPush=0]="OnPush",h[h.Default=1]="Default"}(Sn||(Sn={})),function(h){h[h.Emulated=0]="Emulated",h[h.None=2]="None",h[h.ShadowDom=3]="ShadowDom"}(Pn||(Pn={}));const Nt={},ai=[],hn=E({\u0275cmp:E}),Le=E({\u0275dir:E}),ce=E({\u0275pipe:E}),we=E({\u0275mod:E}),Qe=E({\u0275fac:E}),qt=E({__NG_ELEMENT_ID__:E});let Tn=0;function lr(h){return pr(()=>{const _=un(h),A={..._,decls:h.decls,vars:h.vars,template:h.template,consts:h.consts||null,ngContentSelectors:h.ngContentSelectors,onPush:h.changeDetection===Sn.OnPush,directiveDefs:null,pipeDefs:null,dependencies:_.standalone&&h.dependencies||null,getStandaloneInjector:null,data:h.data||{},encapsulation:h.encapsulation||Pn.Emulated,id:"c"+Tn++,styles:h.styles||ai,_:null,schemas:h.schemas||null,tView:null};Ft(A);const z=h.dependencies;return A.directiveDefs=Ut(z,!1),A.pipeDefs=Ut(z,!0),A})}function mo(h,_,A){const z=h.\u0275cmp;z.directiveDefs=Ut(_,!1),z.pipeDefs=Ut(A,!0)}function rr(h){return Ci(h)||Xn(h)}function aa(h){return null!==h}function ea(h){return pr(()=>({type:h.type,bootstrap:h.bootstrap||ai,declarations:h.declarations||ai,imports:h.imports||ai,exports:h.exports||ai,transitiveCompileScopes:null,schemas:h.schemas||null,id:h.id||null}))}function Bo(h,_){return pr(()=>{const A=ei(h,!0);A.declarations=_.declarations||ai,A.imports=_.imports||ai,A.exports=_.exports||ai})}function Ii(h,_){if(null==h)return Nt;const A={};for(const z in h)if(h.hasOwnProperty(z)){let K=h[z],fe=K;Array.isArray(K)&&(fe=K[1],K=K[0]),A[K]=z,_&&(_[K]=fe)}return A}function an(h){return pr(()=>{const _=un(h);return Ft(_),_})}function Zn(h){return{type:h.type,name:h.name,factory:null,pure:!1!==h.pure,standalone:!0===h.standalone,onDestroy:h.type.prototype.ngOnDestroy||null}}function Ci(h){return h[hn]||null}function Xn(h){return h[Le]||null}function Et(h){return h[ce]||null}function gn(h){const _=Ci(h)||Xn(h)||Et(h);return null!==_&&_.standalone}function ei(h,_){const A=h[we]||null;if(!A&&!0===_)throw new Error(`Type ${n(h)} does not have '\u0275mod' property.`);return A}function un(h){const _={};return{type:h.type,providersResolver:null,factory:null,hostBindings:h.hostBindings||null,hostVars:h.hostVars||0,hostAttrs:h.hostAttrs||null,contentQueries:h.contentQueries||null,declaredInputs:_,exportAs:h.exportAs||null,standalone:!0===h.standalone,selectors:h.selectors||ai,viewQuery:h.viewQuery||null,features:h.features||null,setInput:null,findHostDirectiveDefs:null,hostDirectives:null,inputs:Ii(h.inputs,_),outputs:Ii(h.outputs)}}function Ft(h){h.features?.forEach(_=>_(h))}function Ut(h,_){if(!h)return null;const A=_?Et:rr;return()=>("function"==typeof h?h():h).map(z=>A(z)).filter(aa)}const wn=0,Gn=1,xi=2,Cr=3,Fr=4,en=5,Wn=6,at=7,It=8,Qt=9,St=10,Pt=11,cn=12,Ln=13,ii=14,hi=15,Ri=16,_r=17,er=18,Yr=19,_o=20,Si=21,to=22,Uo=1,rl=2,Vs=7,ps=8,ts=9,gs=10;function $a(h){return Array.isArray(h)&&"object"==typeof h[Uo]}function ln(h){return Array.isArray(h)&&!0===h[Uo]}function Mi(h){return 0!=(4&h.flags)}function Di(h){return h.componentOffset>-1}function Er(h){return 1==(1&h.flags)}function ur(h){return!!h.template}function gi(h){return 0!=(256&h[xi])}function Qr(h,_){return h.hasOwnProperty(Qe)?h[Qe]:null}class Li{constructor(_,A,z){this.previousValue=_,this.currentValue=A,this.firstChange=z}isFirstChange(){return this.firstChange}}function Ta(){return La}function La(h){return h.type.prototype.ngOnChanges&&(h.setInput=is),Ps}function Ps(){const h=Dt(this),_=h?.current;if(_){const A=h.previous;if(A===Nt)h.previous=_;else for(let z in _)A[z]=_[z];h.current=null,this.ngOnChanges(_)}}function is(h,_,A,z){const K=this.declaredInputs[A],fe=Dt(h)||function We(h,_){return h[yt]=_}(h,{previous:Nt,current:null}),Re=fe.current||(fe.current={}),lt=fe.previous,vt=lt[K];Re[K]=new Li(vt&&vt.currentValue,_,lt===Nt),h[z]=_}Ta.ngInherit=!0;const yt="__ngSimpleChanges__";function Dt(h){return h[yt]||null}let Rt=null;const fi=function(h,_,A){Rt?.(h,_,A)},Xi="svg",wr="math";function Mo(h){for(;Array.isArray(h);)h=h[wn];return h}function qr(h,_){return Mo(_[h])}function ho(h,_){return Mo(_[h.index])}function To(h,_){return h.data[_]}function Ao(h,_){return h[_]}function Ha(h,_){const A=_[h];return $a(A)?A:A[wn]}function Ra(h){return 64==(64&h[xi])}function Jt(h,_){return null==_?null:h[_]}function De(h){h[er]=0}function bt(h,_){h[en]+=_;let A=h,z=h[Cr];for(;null!==z&&(1===_&&1===A[en]||-1===_&&0===A[en]);)z[en]+=_,A=z,z=z[Cr]}const Xt={lFrame:Dr(null),bindingsEnabled:!0};function Ki(){return Xt.bindingsEnabled}function ya(){Xt.bindingsEnabled=!0}function Na(){Xt.bindingsEnabled=!1}function qi(){return Xt.lFrame.lView}function ia(){return Xt.lFrame.tView}function $o(h){return Xt.lFrame.contextLView=h,h[It]}function su(h){return Xt.lFrame.contextLView=null,h}function Us(){let h=Ka();for(;null!==h&&64===h.type;)h=h.parent;return h}function Ka(){return Xt.lFrame.currentTNode}function Tc(){const h=Xt.lFrame,_=h.currentTNode;return h.isParent?_:_.parent}function Qs(h,_){const A=Xt.lFrame;A.currentTNode=h,A.isParent=_}function vu(){return Xt.lFrame.isParent}function hl(){Xt.lFrame.isParent=!1}function Da(){const h=Xt.lFrame;let _=h.bindingRootIndex;return-1===_&&(_=h.bindingRootIndex=h.tView.bindingStartIndex),_}function Pl(){return Xt.lFrame.bindingIndex}function gl(h){return Xt.lFrame.bindingIndex=h}function ss(){return Xt.lFrame.bindingIndex++}function gc(h){const _=Xt.lFrame,A=_.bindingIndex;return _.bindingIndex=_.bindingIndex+h,A}function Pc(h){Xt.lFrame.inI18n=h}function ks(h,_){const A=Xt.lFrame;A.bindingIndex=A.bindingRootIndex=h,_c(_)}function _c(h){Xt.lFrame.currentDirectiveIndex=h}function Yc(h){const _=Xt.lFrame.currentDirectiveIndex;return-1===_?null:h[_]}function lu(){return Xt.lFrame.currentQueryIndex}function ac(h){Xt.lFrame.currentQueryIndex=h}function bd(h){const _=h[Gn];return 2===_.type?_.declTNode:1===_.type?h[Wn]:null}function kd(h,_,A){if(A&Bn.SkipSelf){let K=_,fe=h;for(;(K=K.parent,null===K&&!(A&Bn.Host))&&(K=bd(fe),!(null===K||(fe=fe[hi],10&K.type))););if(null===K)return!1;_=K,h=fe}const z=Xt.lFrame=or();return z.currentTNode=_,z.lView=h,!0}function Oc(h){const _=or(),A=h[Gn];Xt.lFrame=_,_.currentTNode=A.firstChild,_.lView=h,_.tView=A,_.contextLView=h,_.bindingIndex=A.bindingStartIndex,_.inI18n=!1}function or(){const h=Xt.lFrame,_=null===h?null:h.child;return null===_?Dr(h):_}function Dr(h){const _={currentTNode:null,isParent:!0,lView:null,tView:null,selectedIndex:-1,contextLView:null,elementDepthCount:0,currentNamespace:null,currentDirectiveIndex:-1,bindingRootIndex:-1,bindingIndex:-1,currentQueryIndex:0,parent:h,child:null,inI18n:!1};return null!==h&&(h.child=_),_}function kr(){const h=Xt.lFrame;return Xt.lFrame=h.parent,h.currentTNode=null,h.lView=null,h}const Qo=kr;function oo(){const h=kr();h.isParent=!0,h.tView=null,h.selectedIndex=-1,h.contextLView=null,h.elementDepthCount=0,h.currentDirectiveIndex=-1,h.currentNamespace=null,h.bindingRootIndex=-1,h.bindingIndex=-1,h.currentQueryIndex=0}function da(h){return(Xt.lFrame.contextLView=function ha(h,_){for(;h>0;)_=_[hi],h--;return _}(h,Xt.lFrame.contextLView))[It]}function Ia(){return Xt.lFrame.selectedIndex}function cc(h){Xt.lFrame.selectedIndex=h}function Rs(){const h=Xt.lFrame;return To(h.tView,h.selectedIndex)}function xc(){Xt.lFrame.currentNamespace=Xi}function Hc(){Xt.lFrame.currentNamespace=wr}function lp(){!function kp(){Xt.lFrame.currentNamespace=null}()}function qs(h,_){for(let A=_.directiveStart,z=_.directiveEnd;A<z;A++){const fe=h.data[A].type.prototype,{ngAfterContentInit:Re,ngAfterContentChecked:lt,ngAfterViewInit:vt,ngAfterViewChecked:b,ngOnDestroy:r}=fe;Re&&(h.contentHooks??(h.contentHooks=[])).push(-A,Re),lt&&((h.contentHooks??(h.contentHooks=[])).push(A,lt),(h.contentCheckHooks??(h.contentCheckHooks=[])).push(A,lt)),vt&&(h.viewHooks??(h.viewHooks=[])).push(-A,vt),b&&((h.viewHooks??(h.viewHooks=[])).push(A,b),(h.viewCheckHooks??(h.viewCheckHooks=[])).push(A,b)),null!=r&&(h.destroyHooks??(h.destroyHooks=[])).push(A,r)}}function Cd(h,_,A){Ke(h,_,3,A)}function la(h,_,A,z){(3&h[xi])===A&&Ke(h,_,A,z)}function ht(h,_){let A=h[xi];(3&A)===_&&(A&=2047,A+=1,h[xi]=A)}function Ke(h,_,A,z){const K=void 0!==z?65535&h[er]:0,fe=z??-1,Re=_.length-1;let lt=0;for(let vt=K;vt<Re;vt++)if("number"==typeof _[vt+1]){if(lt=_[vt],null!=z&&lt>=z)break}else _[vt]<0&&(h[er]+=65536),(lt<fe||-1==fe)&&(dn(h,A,_,vt),h[er]=(4294901760&h[er])+vt+2),vt++}function dn(h,_,A,z){const K=A[z]<0,fe=A[z+1],lt=h[K?-A[z]:A[z]];if(K){if(h[xi]>>11<h[er]>>16&&(3&h[xi])===_){h[xi]+=2048,fi(4,lt,fe);try{fe.call(lt)}finally{fi(5,lt,fe)}}}else{fi(4,lt,fe);try{fe.call(lt)}finally{fi(5,lt,fe)}}}const Kn=-1;class $i{constructor(_,A,z){this.factory=_,this.resolving=!1,this.canSeeViewProviders=A,this.injectImpl=z}}function _a(h,_,A){let z=0;for(;z<A.length;){const K=A[z];if("number"==typeof K){if(0!==K)break;z++;const fe=A[z++],Re=A[z++],lt=A[z++];h.setAttribute(_,Re,lt,fe)}else{const fe=K,Re=A[++z];$l(fe)?h.setProperty(_,fe,Re):h.setAttribute(_,fe,Re),z++}}return z}function xl(h){return 3===h||4===h||6===h}function $l(h){return 64===h.charCodeAt(0)}function Os(h,_){if(null!==_&&0!==_.length)if(null===h||0===h.length)h=_.slice();else{let A=-1;for(let z=0;z<_.length;z++){const K=_[z];"number"==typeof K?A=K:0===A||yu(h,A,K,null,-1===A||2===A?_[++z]:null)}}return h}function yu(h,_,A,z,K){let fe=0,Re=h.length;if(-1===_)Re=-1;else for(;fe<h.length;){const lt=h[fe++];if("number"==typeof lt){if(lt===_){Re=-1;break}if(lt>_){Re=fe-1;break}}}for(;fe<h.length;){const lt=h[fe];if("number"==typeof lt)break;if(lt===A){if(null===z)return void(null!==K&&(h[fe+1]=K));if(z===h[fe+1])return void(h[fe+2]=K)}fe++,null!==z&&fe++,null!==K&&fe++}-1!==Re&&(h.splice(Re,0,_),fe=Re+1),h.splice(fe++,0,A),null!==z&&h.splice(fe++,0,z),null!==K&&h.splice(fe++,0,K)}function Ks(h){return h!==Kn}function _l(h){return 32767&h}function Gs(h,_){let A=function Dc(h){return h>>16}(h),z=_;for(;A>0;)z=z[hi],A--;return z}let Ed=!0;function zl(h){const _=Ed;return Ed=h,_}const Lc=255,Xe=5;let zt=0;const mn={};function Fi(h,_){const A=zo(h,_);if(-1!==A)return A;const z=_[Gn];z.firstCreatePass&&(h.injectorIndex=_.length,nr(z.data,h),nr(_,null),nr(z.blueprint,null));const K=oa(h,_),fe=h.injectorIndex;if(Ks(K)){const Re=_l(K),lt=Gs(K,_),vt=lt[Gn].data;for(let b=0;b<8;b++)_[fe+b]=lt[Re+b]|vt[Re+b]}return _[fe+8]=K,fe}function nr(h,_){h.push(0,0,0,0,0,0,0,0,_)}function zo(h,_){return-1===h.injectorIndex||h.parent&&h.parent.injectorIndex===h.injectorIndex||null===_[h.injectorIndex+8]?-1:h.injectorIndex}function oa(h,_){if(h.parent&&-1!==h.parent.injectorIndex)return h.parent.injectorIndex;let A=0,z=null,K=_;for(;null!==K;){if(z=kc(K),null===z)return Kn;if(A++,K=K[hi],-1!==z.injectorIndex)return z.injectorIndex|A<<16}return Kn}function Ca(h,_,A){!function ni(h,_,A){let z;"string"==typeof A?z=A.charCodeAt(0)||0:A.hasOwnProperty(qt)&&(z=A[qt]),null==z&&(z=A[qt]=zt++);const K=z&Lc,fe=1<<K;_.data[h+(K>>Xe)]|=fe}(h,_,A)}function Is(h,_,A){if(A&Bn.Optional||void 0!==h)return h;xe()}function ul(h,_,A,z){if(A&Bn.Optional&&void 0===z&&(z=null),!(A&(Bn.Self|Bn.Host))){const K=h[Qt],fe=je(void 0);try{return K?K.get(_,z,A&Bn.Optional):Bt(_,z,A&Bn.Optional)}finally{je(fe)}}return Is(z,0,A)}function bu(h,_,A,z=Bn.Default,K){if(null!==h){if(1024&_[xi]){const Re=function Au(h,_,A,z,K){let fe=h,Re=_;for(;null!==fe&&null!==Re&&1024&Re[xi]&&!(256&Re[xi]);){const lt=Zd(fe,Re,A,z|Bn.Self,mn);if(lt!==mn)return lt;let vt=fe.parent;if(!vt){const b=Re[Si];if(b){const r=b.get(A,mn,z);if(r!==mn)return r}vt=kc(Re),Re=Re[hi]}fe=vt}return K}(h,_,A,z,mn);if(Re!==mn)return Re}const fe=Zd(h,_,A,z,mn);if(fe!==mn)return fe}return ul(_,A,z,K)}function Zd(h,_,A,z,K){const fe=function W(h){if("string"==typeof h)return h.charCodeAt(0)||0;const _=h.hasOwnProperty(qt)?h[qt]:void 0;return"number"==typeof _?_>=0?_&Lc:Po:_}(A);if("function"==typeof fe){if(!kd(_,h,z))return z&Bn.Host?Is(K,0,z):ul(_,A,z,K);try{const Re=fe(z);if(null!=Re||z&Bn.Optional)return Re;xe()}finally{Qo()}}else if("number"==typeof fe){let Re=null,lt=zo(h,_),vt=Kn,b=z&Bn.Host?_[Ri][Wn]:null;for((-1===lt||z&Bn.SkipSelf)&&(vt=-1===lt?oa(h,_):_[lt+8],vt!==Kn&&fn(z,!1)?(Re=_[Gn],lt=_l(vt),_=Gs(vt,_)):lt=-1);-1!==lt;){const r=_[Gn];if(dt(fe,lt,r.data)){const u=Qu(lt,_,A,Re,z,b);if(u!==mn)return u}vt=_[lt+8],vt!==Kn&&fn(z,_[Gn].data[lt+8]===b)&&dt(fe,lt,_)?(Re=r,lt=_l(vt),_=Gs(vt,_)):lt=-1}}return K}function Qu(h,_,A,z,K,fe){const Re=_[Gn],lt=Re.data[h+8],r=_t(lt,Re,A,null==z?Di(lt)&&Ed:z!=Re&&0!=(3&lt.type),K&Bn.Host&&fe===lt);return null!==r?q(_,Re,r,lt):mn}function _t(h,_,A,z,K){const fe=h.providerIndexes,Re=_.data,lt=1048575&fe,vt=h.directiveStart,b=h.directiveEnd,r=fe>>20,y=K?lt+r:b;for(let L=z?lt:lt+r;L<y;L++){const G=Re[L];if(L<vt&&A===G||L>=vt&&G.type===A)return L}if(K){const L=Re[vt];if(L&&ur(L)&&L.type===A)return vt}return null}function q(h,_,A,z){let K=h[A];const fe=_.data;if(function sr(h){return h instanceof $i}(K)){const Re=K;Re.resolving&&function ne(h,_){const A=_?`. Dependency path: ${_.join(" > ")} > ${h}`:"";throw new X(-200,`Circular dependency in DI detected for ${h}${A}`)}(ge(fe[A]));const lt=zl(Re.canSeeViewProviders);Re.resolving=!0;const vt=Re.injectImpl?je(Re.injectImpl):null;kd(h,z,Bn.Default);try{K=h[A]=Re.factory(void 0,fe,h,z),_.firstCreatePass&&A>=z.directiveStart&&function Su(h,_,A){const{ngOnChanges:z,ngOnInit:K,ngDoCheck:fe}=_.type.prototype;if(z){const Re=La(_);(A.preOrderHooks??(A.preOrderHooks=[])).push(h,Re),(A.preOrderCheckHooks??(A.preOrderCheckHooks=[])).push(h,Re)}K&&(A.preOrderHooks??(A.preOrderHooks=[])).push(0-h,K),fe&&((A.preOrderHooks??(A.preOrderHooks=[])).push(h,fe),(A.preOrderCheckHooks??(A.preOrderCheckHooks=[])).push(h,fe))}(A,fe[A],_)}finally{null!==vt&&je(vt),zl(lt),Re.resolving=!1,Qo()}}return K}function dt(h,_,A){const z=1<<h;return!!(A[_+(h>>Xe)]&z)}function fn(h,_){return!(h&Bn.Self||h&Bn.Host&&_)}class Ei{constructor(_,A){this._tNode=_,this._lView=A}get(_,A,z){return bu(this._tNode,this._lView,_,jn(z),A)}}function Po(){return new Ei(Us(),qi())}function En(h){return pr(()=>{const _=h.prototype.constructor,A=_[Qe]||ls(_),z=Object.prototype;let K=Object.getPrototypeOf(h.prototype).constructor;for(;K&&K!==z;){const fe=K[Qe]||ls(K);if(fe&&fe!==A)return fe;K=Object.getPrototypeOf(K)}return fe=>new fe})}function ls(h){return V(h)?()=>{const _=ls(Y(h));return _&&_()}:Qr(h)}function kc(h){const _=h[Gn],A=_.type;return 2===A?_.declTNode:1===A?h[Wn]:null}function cs(h){return function Ba(h,_){if("class"===_)return h.classes;if("style"===_)return h.styles;const A=h.attrs;if(A){const z=A.length;let K=0;for(;K<z;){const fe=A[K];if(xl(fe))break;if(0===fe)K+=2;else if("number"==typeof fe)for(K++;K<z&&"string"==typeof A[K];)K++;else{if(fe===_)return A[K+1];K+=2}}}return null}(Us(),h)}const wu="__annotations__",Iu="__parameters__",sd="__prop__metadata__";function Cu(h,_,A,z,K){return pr(()=>{const fe=Gd(_);function Re(...lt){if(this instanceof Re)return fe.call(this,...lt),this;const vt=new Re(...lt);return function(r){return K&&K(r,...lt),(r.hasOwnProperty(wu)?r[wu]:Object.defineProperty(r,wu,{value:[]})[wu]).push(vt),z&&z(r),r}}return A&&(Re.prototype=Object.create(A.prototype)),Re.prototype.ngMetadataName=h,Re.annotationCls=Re,Re})}function Gd(h){return function(...A){if(h){const z=h(...A);for(const K in z)this[K]=z[K]}}}function Rd(h,_,A){return pr(()=>{const z=Gd(_);function K(...fe){if(this instanceof K)return z.apply(this,fe),this;const Re=new K(...fe);return lt.annotation=Re,lt;function lt(vt,b,r){const u=vt.hasOwnProperty(Iu)?vt[Iu]:Object.defineProperty(vt,Iu,{value:[]})[Iu];for(;u.length<=r;)u.push(null);return(u[r]=u[r]||[]).push(Re),vt}}return A&&(K.prototype=Object.create(A.prototype)),K.prototype.ngMetadataName=h,K.annotationCls=K,K})}function Bu(h,_,A,z){return pr(()=>{const K=Gd(_);function fe(...Re){if(this instanceof fe)return K.apply(this,Re),this;const lt=new fe(...Re);return function vt(b,r){const u=b.constructor,y=u.hasOwnProperty(sd)?u[sd]:Object.defineProperty(u,sd,{value:{}})[sd];y[r]=y.hasOwnProperty(r)&&y[r]||[],y[r].unshift(lt),z&&z(b,r,...Re)}}return A&&(fe.prototype=Object.create(A.prototype)),fe.prototype.ngMetadataName=h,fe.annotationCls=fe,fe})}const Wf=Rd("Attribute",h=>({attributeName:h,__NG_ELEMENT_ID__:()=>cs(h)}));class vc{constructor(_,A){this._desc=_,this.ngMetadataName="InjectionToken",this.\u0275prov=void 0,"number"==typeof A?this.__NG_ELEMENT_ID__=A:void 0!==A&&(this.\u0275prov=ft({token:this,providedIn:A.providedIn||"root",factory:A.factory}))}get multi(){return this}toString(){return`InjectionToken ${this._desc}`}}new vc("AnalyzeForEntryComponents");class Md{}const Mm=Bu("ContentChildren",(h,_={})=>({selector:h,first:!1,isViewQuery:!1,descendants:!1,emitDistinctChangesOnly:true,..._}),Md),am=Bu("ContentChild",(h,_={})=>({selector:h,first:!0,isViewQuery:!1,descendants:!0,..._}),Md),Ef=Bu("ViewChildren",(h,_={})=>({selector:h,first:!1,isViewQuery:!0,descendants:!0,emitDistinctChangesOnly:true,..._}),Md),Xc=Bu("ViewChild",(h,_)=>({selector:h,first:!0,isViewQuery:!0,descendants:!0,..._}),Md);var yc,Eu,Mu;function ws(h){const _=Fn.ng;if(_&&_.\u0275compilerFacade)return _.\u0275compilerFacade;throw new Error("JIT compiler unavailable")}!function(h){h[h.Directive=0]="Directive",h[h.Component=1]="Component",h[h.Injectable=2]="Injectable",h[h.Pipe=3]="Pipe",h[h.NgModule=4]="NgModule"}(yc||(yc={})),function(h){h[h.Directive=0]="Directive",h[h.Pipe=1]="Pipe",h[h.NgModule=2]="NgModule"}(Eu||(Eu={})),function(h){h[h.Emulated=0]="Emulated",h[h.None=2]="None",h[h.ShadowDom=3]="ShadowDom"}(Mu||(Mu={}));const Ll=Function;function Vc(h){return"function"==typeof h}function Uu(h){return h.flat(Number.POSITIVE_INFINITY)}function et(h,_){h.forEach(A=>Array.isArray(A)?et(A,_):_(A))}function Ae(h,_,A){_>=h.length?h.push(A):h.splice(_,0,A)}function Ge(h,_){return _>=h.length-1?h.pop():h.splice(_,1)[0]}function xt(h,_){const A=[];for(let z=0;z<h;z++)A.push(_);return A}function Sr(h,_,A){let z=ms(h,_);return z>=0?h[1|z]=A:(z=~z,function li(h,_,A,z){let K=h.length;if(K==_)h.push(A,z);else if(1===K)h.push(z,h[0]),h[0]=A;else{for(K--,h.push(h[K-1],h[K]);K>_;){const fe=K-2;h[K]=h[fe],K--}h[_]=A,h[_+1]=z}}(h,z,_,A)),z}function fo(h,_){const A=ms(h,_);if(A>=0)return h[1|A]}function ms(h,_){return Dl(h,_,1)}function Dl(h,_,A){let z=0,K=h.length>>A;for(;K!==z;){const fe=z+(K-z>>1),Re=h[fe<<A];if(_===Re)return fe<<A;Re>_?K=fe:z=fe+1}return~(K<<A)}const Yl=/^function\s+\S+\(\)\s*{[\s\S]+\.apply\(this,\s*(arguments|(?:[^()]+\(\[\],)?[^()]+\(arguments\).*)\)/,cu=/^class\s+[A-Za-z\d$_]*\s*extends\s+[^{]+{/,Mr=/^class\s+[A-Za-z\d$_]*\s*extends\s+[^{]+{[\s\S]*constructor\s*\(/,sl=/^class\s+[A-Za-z\d$_]*\s*extends\s+[^{]+{[\s\S]*constructor\s*\(\)\s*{[^}]*super\(\.\.\.arguments\)/;class qo{constructor(_){this._reflect=_||Fn.Reflect}factory(_){return(...A)=>new _(...A)}_zipTypesAndAnnotations(_,A){let z;z=xt(typeof _>"u"?A.length:_.length);for(let K=0;K<z.length;K++)typeof _>"u"?z[K]=[]:_[K]&&_[K]!=Object?z[K]=[_[K]]:z[K]=[],A&&null!=A[K]&&(z[K]=z[K].concat(A[K]));return z}_ownParameters(_,A){if(function ld(h){return Yl.test(h)||sl.test(h)||cu.test(h)&&!Mr.test(h)}(_.toString()))return null;if(_.parameters&&_.parameters!==A.parameters)return _.parameters;const K=_.ctorParameters;if(K&&K!==A.ctorParameters){const lt="function"==typeof K?K():K,vt=lt.map(r=>r&&r.type),b=lt.map(r=>r&&ll(r.decorators));return this._zipTypesAndAnnotations(vt,b)}const fe=_.hasOwnProperty(Iu)&&_[Iu],Re=this._reflect&&this._reflect.getOwnMetadata&&this._reflect.getOwnMetadata("design:paramtypes",_);return Re||fe?this._zipTypesAndAnnotations(Re,fe):xt(_.length)}parameters(_){if(!Vc(_))return[];const A=y_(_);let z=this._ownParameters(_,A);return!z&&A!==Object&&(z=this.parameters(A)),z||[]}_ownAnnotations(_,A){if(_.annotations&&_.annotations!==A.annotations){let z=_.annotations;return"function"==typeof z&&z.annotations&&(z=z.annotations),z}return _.decorators&&_.decorators!==A.decorators?ll(_.decorators):_.hasOwnProperty(wu)?_[wu]:null}annotations(_){if(!Vc(_))return[];const A=y_(_),z=this._ownAnnotations(_,A)||[];return(A!==Object?this.annotations(A):[]).concat(z)}_ownPropMetadata(_,A){if(_.propMetadata&&_.propMetadata!==A.propMetadata){let z=_.propMetadata;return"function"==typeof z&&z.propMetadata&&(z=z.propMetadata),z}if(_.propDecorators&&_.propDecorators!==A.propDecorators){const z=_.propDecorators,K={};return Object.keys(z).forEach(fe=>{K[fe]=ll(z[fe])}),K}return _.hasOwnProperty(sd)?_[sd]:null}propMetadata(_){if(!Vc(_))return{};const A=y_(_),z={};if(A!==Object){const fe=this.propMetadata(A);Object.keys(fe).forEach(Re=>{z[Re]=fe[Re]})}const K=this._ownPropMetadata(_,A);return K&&Object.keys(K).forEach(fe=>{const Re=[];z.hasOwnProperty(fe)&&Re.push(...z[fe]),Re.push(...K[fe]),z[fe]=Re}),z}ownPropMetadata(_){return Vc(_)&&this._ownPropMetadata(_,y_(_))||{}}hasLifecycleHook(_,A){return _ instanceof Ll&&A in _.prototype}}function ll(h){return h?h.map(_=>new(0,_.type.annotationCls)(..._.args?_.args:[])):[]}function y_(h){const _=h.prototype?Object.getPrototypeOf(h.prototype):null;return(_?_.constructor:null)||Object}const Hl=Yt(Rd("Inject",h=>({token:h})),-1),Fd=Yt(Rd("Optional"),8),qu=Yt(Rd("Self"),2),Zc=Yt(Rd("SkipSelf"),4),uu=Yt(Rd("Host"),1);let Es=null;function mc(){return Es=Es||new qo}function Yp(h){return Fs(mc().parameters(h))}function Fs(h){return h.map(_=>function nc(h){const _={token:null,attribute:null,host:!1,optional:!1,self:!1,skipSelf:!1};if(Array.isArray(h)&&h.length>0)for(let A=0;A<h.length;A++){const z=h[A];if(void 0===z)continue;const K=Object.getPrototypeOf(z);if(z instanceof Fd||"Optional"===K.ngMetadataName)_.optional=!0;else if(z instanceof Zc||"SkipSelf"===K.ngMetadataName)_.skipSelf=!0;else if(z instanceof qu||"Self"===K.ngMetadataName)_.self=!0;else if(z instanceof uu||"Host"===K.ngMetadataName)_.host=!0;else if(z instanceof Hl)_.token=z.token;else if(z instanceof Wf){if(void 0===z.attributeName)throw new X(204,!1);_.attribute=z.attributeName}else _.token=z}else void 0===h||Array.isArray(h)&&0===h.length?_.token=null:_.token=h;return _}(_))}let yl=new Map;const dl=new Set;function Kc(h){return!!(h.templateUrl&&!h.hasOwnProperty("template")||h.styleUrls&&h.styleUrls.length)}const Hp=new Map;let eu=!0;function pu(h,_){(function ta(h,_,A){if(_&&_!==A&&eu)throw new Error(`Duplicate module registered for ${h} - ${n(_)} vs ${n(_.name)}`)})(_,Hp.get(_)||null,h),Hp.set(_,h)}const Ql={name:"custom-elements"};var Ls;!function(h){h[h.Important=1]="Important",h[h.DashCase=2]="DashCase"}(Ls||(Ls={}));const Ws=/^>|^->|<!--|-->|--!>|<!-$/g,tu=/(<|>)/,Sc="\u200b$1\u200b";function Um(h){return h.replace(Ws,_=>_.replace(tu,Sc))}const ic=new Map;let mu=0;const sm="__ngContext__";function Xu(h,_){$a(_)?(h[sm]=_[_o],function Gg(h){ic.set(h[_o],h)}(_)):h[sm]=_}let dd;function fu(h,_){return dd(h,_)}function jd(h){const _=h[Cr];return ln(_)?_[Cr]:_}function as(h){return dp(h[Ln])}function ed(h){return dp(h[Fr])}function dp(h){for(;null!==h&&!ln(h);)h=h[Fr];return h}function Gp(h,_,A,z,K){if(null!=z){let fe,Re=!1;ln(z)?fe=z:$a(z)&&(Re=!0,z=z[wn]);const lt=Mo(z);0===h&&null!==A?null==K?$g(_,A,lt):vh(_,A,lt,K||null,!0):1===h&&null!==A?vh(_,A,lt,K||null,!0):2===h?Wp(_,lt,Re):3===h&&_.destroyNode(lt),null!=fe&&function ev(h,_,A,z,K){const fe=A[Vs],Re=Mo(A);fe!==Re&&Gp(_,h,z,fe,K);for(let lt=gs;lt<A.length;lt++){const vt=A[lt];fp(vt[Gn],vt,h,_,z,fe)}}(_,h,fe,A,K)}}function td(h,_){return h.createText(_)}function lm(h,_,A){h.setValue(_,A)}function mg(h,_){return h.createComment(Um(_))}function Mf(h,_,A){return h.createElement(_,A)}function Jd(h,_,A,z){const K=gs+z,fe=A.length;z>0&&(A[K-1][Fr]=_),z<fe-gs?(_[Fr]=A[K],Ae(A,gs+z,_)):(A.push(_),_[Fr]=null),_[Cr]=A;const Re=_[_r];null!==Re&&A!==Re&&function cm(h,_){const A=h[ts],K=_[Cr][Cr][Ri];_[Ri]!==K&&(h[rl]=!0),null===A?h[ts]=[_]:A.push(_)}(Re,_);const lt=_[Yr];null!==lt&&lt.insertView(h),_[xi]|=64}function um(h,_){const A=h[ts],z=A.indexOf(_),K=_[Cr];512&_[xi]&&(_[xi]&=-513,bt(K,-1)),A.splice(z,1)}function Cl(h,_){if(h.length<=gs)return;const A=gs+_,z=h[A];if(z){const K=z[_r];null!==K&&K!==h&&um(K,z),_>0&&(h[A-1][Fr]=z[Fr]);const fe=Ge(h,gs+_);!function pp(h,_){fp(h,_,_[Pt],2,null,null),_[wn]=null,_[Wn]=null}(z[Gn],z);const Re=fe[Yr];null!==Re&&Re.detachView(fe[Gn]),z[Cr]=null,z[Fr]=null,z[xi]&=-65}return z}function Sa(h,_){if(!(128&_[xi])){const A=_[Pt];A.destroyNode&&fp(h,_,A,3,null,null),function _h(h){let _=h[Ln];if(!_)return pd(h[Gn],h);for(;_;){let A=null;if($a(_))A=_[Ln];else{const z=_[gs];z&&(A=z)}if(!A){for(;_&&!_[Fr]&&_!==h;)$a(_)&&pd(_[Gn],_),_=_[Cr];null===_&&(_=h),$a(_)&&pd(_[Gn],_),A=_&&_[Fr]}_=A}}(_)}}function pd(h,_){if(!(128&_[xi])){_[xi]&=-65,_[xi]|=128,function zm(h,_){let A;if(null!=h&&null!=(A=h.destroyHooks))for(let z=0;z<A.length;z+=2){const K=_[A[z]];if(!(K instanceof $i)){const fe=A[z+1];if(Array.isArray(fe))for(let Re=0;Re<fe.length;Re+=2){const lt=K[fe[Re]],vt=fe[Re+1];fi(4,lt,vt);try{vt.call(lt)}finally{fi(5,lt,vt)}}else{fi(4,K,fe);try{fe.call(K)}finally{fi(5,K,fe)}}}}}(h,_),function Sm(h,_){const A=h.cleanup,z=_[at];let K=-1;if(null!==A)for(let fe=0;fe<A.length-1;fe+=2)if("string"==typeof A[fe]){const Re=A[fe+3];Re>=0?z[K=Re]():z[K=-Re].unsubscribe(),fe+=2}else{const Re=z[K=A[fe+1]];A[fe].call(Re)}if(null!==z){for(let fe=K+1;fe<z.length;fe++){(0,z[fe])()}_[at]=null}}(h,_),1===_[Gn].type&&_[Pt].destroy();const A=_[_r];if(null!==A&&ln(_[Cr])){A!==_[Cr]&&um(A,_);const z=_[Yr];null!==z&&z.detachView(h)}!function ds(h){ic.delete(h[_o])}(_)}}function J_(h,_,A){return uc(h,_.parent,A)}function uc(h,_,A){let z=_;for(;null!==z&&40&z.type;)z=(_=z).parent;if(null===z)return A[wn];{const{componentOffset:K}=z;if(K>-1){const{encapsulation:fe}=h.data[z.directiveStart+K];if(fe===Pn.None||fe===Pn.Emulated)return null}return ho(z,A)}}function vh(h,_,A,z,K){h.insertBefore(_,A,z,K)}function $g(h,_,A){h.appendChild(_,A)}function C_(h,_,A,z,K){null!==z?vh(h,_,A,z,K):$g(h,_,A)}function Q_(h,_){return h.parentNode(_)}function q_(h,_,A){return jf(h,_,A)}function $f(h,_,A){return 40&h.type?ho(h,A):null}let rf,Rp,tv,Am,jf=$f;function E_(h,_){jf=h,rf=_}function nu(h,_,A,z){const K=J_(h,z,_),fe=_[Pt],lt=q_(z.parent||_[Wn],z,_);if(null!=K)if(Array.isArray(A))for(let vt=0;vt<A.length;vt++)C_(fe,K,A[vt],lt,!1);else C_(fe,K,A,lt,!1);void 0!==rf&&rf(fe,z,_,A,K)}function Va(h,_){if(null!==_){const A=_.type;if(3&A)return ho(_,h);if(4&A)return M_(-1,h[_.index]);if(8&A){const z=_.child;if(null!==z)return Va(h,z);{const K=h[_.index];return ln(K)?M_(-1,K):Mo(K)}}if(32&A)return fu(_,h)()||Mo(h[_.index]);{const z=mp(h,_);if(null!==z){if(Array.isArray(z))return z[0];return Va(jd(h[Ri]),z)}return Va(h,_.next)}}return null}function mp(h,_){if(null!==_){const z=h[Ri][Wn],K=_.projection;return z.projection[K]}return null}function M_(h,_){const A=gs+h+1;if(A<_.length){const z=_[A],K=z[Gn].firstChild;if(null!==K)return Va(z,K)}return _[Vs]}function Wp(h,_,A){const z=Q_(h,_);z&&function yr(h,_,A,z){h.removeChild(_,A,z)}(h,z,_,A)}function X_(h,_,A,z,K,fe,Re){for(;null!=A;){const lt=z[A.index],vt=A.type;if(Re&&0===_&&(lt&&Xu(Mo(lt),z),A.flags|=2),32!=(32&A.flags))if(8&vt)X_(h,_,A.child,z,K,fe,!1),Gp(_,h,K,lt,fe);else if(32&vt){const b=fu(A,z);let r;for(;r=b();)Gp(_,h,K,r,fe);Gp(_,h,K,lt,fe)}else 16&vt?Uh(h,_,z,A,K,fe):Gp(_,h,K,lt,fe);A=Re?A.projectionNext:A.next}}function fp(h,_,A,z,K,fe){X_(A,z,h.firstChild,_,K,fe,!1)}function Uh(h,_,A,z,K,fe){const Re=A[Ri],vt=Re[Wn].projection[z.projection];if(Array.isArray(vt))for(let b=0;b<vt.length;b++){Gp(_,h,K,vt[b],fe)}else{X_(h,_,vt,Re[Cr],K,fe,!0)}}function xf(h,_,A){""===A?h.removeAttribute(_,"class"):h.setAttribute(_,"class",A)}function Ud(h,_,A){const{mergedAttrs:z,classes:K,styles:fe}=A;null!==z&&_a(h,_,z),null!==K&&xf(h,_,K),null!==fe&&function Tf(h,_,A){h.setAttribute(_,"style",A)}(h,_,fe)}function Kf(){if(void 0===Rp&&(Rp=null,Fn.trustedTypes))try{Rp=Fn.trustedTypes.createPolicy("angular",{createHTML:h=>h,createScript:h=>h,createScriptURL:h=>h})}catch{}return Rp}function fg(h){return Kf()?.createHTML(h)||h}function $p(h,_,A){const z=qi(),K=Rs(),fe=ho(K,z);if(2===K.type&&"iframe"===_.toLowerCase()){const Re=fe;Re.src="",Re.srcdoc=fg(""),Wp(z[Pt],Re);throw new X(-910,!1)}return h}function hg(h){tv=h}function Lt(){return void 0!==tv?tv:typeof document<"u"?document:void 0}function yh(){if(void 0===Am&&(Am=null,Fn.trustedTypes))try{Am=Fn.trustedTypes.createPolicy("angular#unsafe-bypass",{createHTML:h=>h,createScript:h=>h,createScriptURL:h=>h})}catch{}return Am}function Lu(h){return yh()?.createHTML(h)||h}function T_(h){return yh()?.createScript(h)||h}function bh(h){return yh()?.createScriptURL(h)||h}class hp{constructor(_){this.changingThisBreaksApplicationSecurity=_}toString(){return`SafeValue must use [property]=binding: ${this.changingThisBreaksApplicationSecurity} (see ${ae})`}}class Yh extends hp{getTypeName(){return"HTML"}}class gg extends hp{getTypeName(){return"Style"}}class Ym extends hp{getTypeName(){return"Script"}}class co extends hp{getTypeName(){return"URL"}}class sc extends hp{getTypeName(){return"ResourceURL"}}function Js(h){return h instanceof hp?h.changingThisBreaksApplicationSecurity:h}function zs(h,_){const A=function gp(h){return h instanceof hp&&h.getTypeName()||null}(h);if(null!=A&&A!==_){if("ResourceURL"===A&&"URL"===_)return!0;throw new Error(`Required a safe ${_}, got a ${A} (see ${ae})`)}return A===_}function zu(h){return new Yh(h)}function _p(h){return new gg(h)}function nv(h){return new Ym(h)}function Hm(h){return new co(h)}function Vm(h){return new sc(h)}function Dd(h){const _=new iv(h);return function Sd(){try{return!!(new window.DOMParser).parseFromString(fg(""),"text/html")}catch{return!1}}()?new Jf(_):_}class Jf{constructor(_){this.inertDocumentHelper=_}getInertBodyElement(_){_="<body><remove></remove>"+_;try{const A=(new window.DOMParser).parseFromString(fg(_),"text/html").body;return null===A?this.inertDocumentHelper.getInertBodyElement(_):(A.removeChild(A.firstChild),A)}catch{return null}}}class iv{constructor(_){this.defaultDoc=_,this.inertDocument=this.defaultDoc.implementation.createHTMLDocument("sanitization-inert")}getInertBodyElement(_){const A=this.inertDocument.createElement("template");return A.innerHTML=fg(_),A}}const jg=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:\/?#]*(?:[\/?#]|$))/i;function rv(h){return(h=String(h)).match(jg)?h:"unsafe:"+h}function vp(h){const _={};for(const A of h.split(","))_[A]=!0;return _}function _g(...h){const _={};for(const A of h)for(const z in A)A.hasOwnProperty(z)&&(_[z]=!0);return _}const of=vp("area,br,col,hr,img,wbr"),Qd=vp("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),jp=vp("rp,rt"),yp=_g(jp,Qd),Bl=_g(Qd,vp("address,article,aside,blockquote,caption,center,del,details,dialog,dir,div,dl,figure,figcaption,footer,h1,h2,h3,h4,h5,h6,header,hgroup,hr,ins,main,map,menu,nav,ol,pre,section,summary,table,ul")),Kp=_g(jp,vp("a,abbr,acronym,audio,b,bdi,bdo,big,br,cite,code,del,dfn,em,font,i,img,ins,kbd,label,map,mark,picture,q,ruby,rp,rt,s,samp,small,source,span,strike,strong,sub,sup,time,track,tt,u,var,video")),bp=_g(of,Bl,Kp,yp),af=vp("background,cite,href,itemtype,longdesc,poster,src,xlink:href"),wm=vp("abbr,accesskey,align,alt,autoplay,axis,bgcolor,border,cellpadding,cellspacing,class,clear,color,cols,colspan,compact,controls,coords,datetime,default,dir,download,face,headers,height,hidden,hreflang,hspace,ismap,itemscope,itemprop,kind,label,lang,language,loop,media,muted,nohref,nowrap,open,preload,rel,rev,role,rows,rowspan,rules,scope,scrolling,shape,size,sizes,span,srclang,srcset,start,summary,tabindex,target,title,translate,type,usemap,valign,value,vspace,width"),Jc=vp("aria-activedescendant,aria-atomic,aria-autocomplete,aria-busy,aria-checked,aria-colcount,aria-colindex,aria-colspan,aria-controls,aria-current,aria-describedby,aria-details,aria-disabled,aria-dropeffect,aria-errormessage,aria-expanded,aria-flowto,aria-grabbed,aria-haspopup,aria-hidden,aria-invalid,aria-keyshortcuts,aria-label,aria-labelledby,aria-level,aria-live,aria-modal,aria-multiline,aria-multiselectable,aria-orientation,aria-owns,aria-placeholder,aria-posinset,aria-pressed,aria-readonly,aria-relevant,aria-required,aria-roledescription,aria-rowcount,aria-rowindex,aria-rowspan,aria-selected,aria-setsize,aria-sort,aria-valuemax,aria-valuemin,aria-valuenow,aria-valuetext"),Ac=_g(af,wm,Jc),sf=vp("script,style,template");class pl{constructor(){this.sanitizedSomething=!1,this.buf=[]}sanitizeChildren(_){let A=_.firstChild,z=!0;for(;A;)if(A.nodeType===Node.ELEMENT_NODE?z=this.startElement(A):A.nodeType===Node.TEXT_NODE?this.chars(A.nodeValue):this.sanitizedSomething=!0,z&&A.firstChild)A=A.firstChild;else for(;A;){A.nodeType===Node.ELEMENT_NODE&&this.endElement(A);let K=this.checkClobberedElement(A,A.nextSibling);if(K){A=K;break}A=this.checkClobberedElement(A,A.parentNode)}return this.buf.join("")}startElement(_){const A=_.nodeName.toLowerCase();if(!bp.hasOwnProperty(A))return this.sanitizedSomething=!0,!sf.hasOwnProperty(A);this.buf.push("<"),this.buf.push(A);const z=_.attributes;for(let K=0;K<z.length;K++){const fe=z.item(K),Re=fe.name,lt=Re.toLowerCase();if(!Ac.hasOwnProperty(lt)){this.sanitizedSomething=!0;continue}let vt=fe.value;af[lt]&&(vt=rv(vt)),this.buf.push(" ",Re,'="',Cp(vt),'"')}return this.buf.push(">"),!0}endElement(_){const A=_.nodeName.toLowerCase();bp.hasOwnProperty(A)&&!of.hasOwnProperty(A)&&(this.buf.push("</"),this.buf.push(A),this.buf.push(">"))}chars(_){this.buf.push(Cp(_))}checkClobberedElement(_,A){if(A&&(_.compareDocumentPosition(A)&Node.DOCUMENT_POSITION_CONTAINED_BY)===Node.DOCUMENT_POSITION_CONTAINED_BY)throw new Error(`Failed to sanitize html because the element is clobbered: ${_.outerHTML}`);return A}}const Zm=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,Jp=/([^\#-~ |!])/g;function Cp(h){return h.replace(/&/g,"&amp;").replace(Zm,function(_){return"&#"+(1024*(_.charCodeAt(0)-55296)+(_.charCodeAt(1)-56320)+65536)+";"}).replace(Jp,function(_){return"&#"+_.charCodeAt(0)+";"}).replace(/</g,"&lt;").replace(/>/g,"&gt;")}let Hh;function md(h,_){let A=null;try{Hh=Hh||Dd(h);let z=_?String(_):"";A=Hh.getInertBodyElement(z);let K=5,fe=z;do{if(0===K)throw new Error("Failed to sanitize html because the input is unstable");K--,z=fe,fe=A.innerHTML,A=Hh.getInertBodyElement(z)}while(z!==fe);return fg((new pl).sanitizeChildren(vg(A)||A))}finally{if(A){const z=vg(A)||A;for(;z.firstChild;)z.removeChild(z.firstChild)}}}function vg(h){return"content"in h&&function Vh(h){return h.nodeType===Node.ELEMENT_NODE&&"TEMPLATE"===h.nodeName}(h)?h.content:null}var Qp;function Kg(h){const _=Qf();return _?Lu(_.sanitize(Qp.HTML,h)||""):zs(h,"HTML")?Lu(Js(h)):md(Lt(),ye(h))}function Qc(h){const _=Qf();return _?_.sanitize(Qp.STYLE,h)||"":zs(h,"Style")?Js(h):ye(h)}function Zh(h){const _=Qf();return _?_.sanitize(Qp.URL,h)||"":zs(h,"URL")?Js(h):rv(ye(h))}function wc(h){const _=Qf();if(_)return bh(_.sanitize(Qp.RESOURCE_URL,h)||"");if(zs(h,"ResourceURL"))return bh(Js(h));throw new X(904,!1)}function Ep(h){const _=Qf();if(_)return T_(_.sanitize(Qp.SCRIPT,h)||"");if(zs(h,"Script"))return T_(Js(h));throw new X(905,!1)}function Gh(h){return fg(h[0])}function qp(h){return function Ou(h){return Kf()?.createScriptURL(h)||h}(h[0])}function dm(h,_,A){return function lf(h,_){return"src"===_&&("embed"===h||"frame"===h||"iframe"===h||"media"===h||"script"===h)||"href"===_&&("base"===h||"link"===h)?wc:Zh}(_,A)(h)}function Qf(){const h=qi();return h&&h[cn]}!function(h){h[h.NONE=0]="NONE",h[h.HTML=1]="HTML",h[h.STYLE=2]="STYLE",h[h.SCRIPT=3]="SCRIPT",h[h.URL=4]="URL",h[h.RESOURCE_URL=5]="RESOURCE_URL"}(Qp||(Qp={}));const yg=new vc("ENVIRONMENT_INITIALIZER"),Mb=new vc("INJECTOR",-1),Tb=new vc("INJECTOR_DEF_TYPES");class x_{get(_,A=Vi){if(A===Vi){const z=new Error(`NullInjectorError: No provider for ${n(_)}!`);throw z.name="NullInjectorError",z}return A}}function Mp(h){return{\u0275providers:h}}function Jg(...h){return{\u0275providers:bg(!0,h),\u0275fromNgModule:!0}}function bg(h,..._){const A=[],z=new Set;let K;return et(_,fe=>{const Re=fe;Wh(Re,A,[],z)&&(K||(K=[]),K.push(Re))}),void 0!==K&&fd(K,A),A}function fd(h,_){for(let A=0;A<h.length;A++){const{ngModule:z,providers:K}=h[A];zd(K,fe=>{_.push(fe)})}}function Wh(h,_,A,z){if(!(h=Y(h)))return!1;let K=null,fe=Mn(h);const Re=!fe&&Ci(h);if(fe||Re){if(Re&&!Re.standalone)return!1;K=h}else{const vt=h.ngModule;if(fe=Mn(vt),!fe)return!1;K=vt}const lt=z.has(K);if(Re){if(lt)return!1;if(z.add(K),Re.dependencies){const vt="function"==typeof Re.dependencies?Re.dependencies():Re.dependencies;for(const b of vt)Wh(b,_,A,z)}}else{if(!fe)return!1;{if(null!=fe.imports&&!lt){let b;z.add(K);try{et(fe.imports,r=>{Wh(r,_,A,z)&&(b||(b=[]),b.push(r))})}finally{}void 0!==b&&fd(b,_)}if(!lt){const b=Qr(K)||(()=>new K);_.push({provide:K,useFactory:b,deps:ai},{provide:Tb,useValue:K,multi:!0},{provide:yg,useValue:()=>zr(K),multi:!0})}const vt=fe.providers;if(null!=vt&&!lt){zd(vt,r=>{_.push(r)})}}}return K!==h&&void 0!==h.providers}function zd(h,_){for(let A of h)ue(A)&&(A=A.\u0275providers),Array.isArray(A)?zd(A,_):_(A)}const Ga=E({provide:String,useValue:E});function hd(h){return null!==h&&"object"==typeof h&&Ga in h}function Eh(h){return!(!h||!h.useExisting)}function Al(h){return!(!h||!h.useFactory)}function pm(h){return"function"==typeof h}const Ya=new vc("Set Injector scope."),Im={},cf={};let Lv;function Fc(){return void 0===Lv&&(Lv=new x_),Lv}class gd{}class xb extends gd{get destroyed(){return this._destroyed}constructor(_,A,z,K){super(),this.parent=A,this.source=z,this.scopes=K,this.records=new Map,this._ngOnDestroyHooks=new Set,this._onDestroyHooks=[],this._destroyed=!1,xy(_,Re=>this.processProvider(Re)),this.records.set(Mb,qd(void 0,this)),K.has("environment")&&this.records.set(gd,qd(void 0,this));const fe=this.records.get(Ya);null!=fe&&"string"==typeof fe.value&&this.scopes.add(fe.value),this.injectorDefTypes=new Set(this.get(Tb.multi,ai,Bn.Self))}destroy(){this.assertNotDestroyed(),this._destroyed=!0;try{for(const _ of this._ngOnDestroyHooks)_.ngOnDestroy();for(const _ of this._onDestroyHooks)_()}finally{this.records.clear(),this._ngOnDestroyHooks.clear(),this.injectorDefTypes.clear(),this._onDestroyHooks.length=0}}onDestroy(_){this._onDestroyHooks.push(_)}runInContext(_){this.assertNotDestroyed();const A=Hi(this),z=je(void 0);try{return _()}finally{Hi(A),je(z)}}get(_,A=Vi,z=Bn.Default){this.assertNotDestroyed(),z=jn(z);const K=Hi(this),fe=je(void 0);try{if(!(z&Bn.SkipSelf)){let lt=this.records.get(_);if(void 0===lt){const vt=function Fp(h){return"function"==typeof h||"object"==typeof h&&h instanceof vc}(_)&&He(_);lt=vt&&this.injectableDefInScope(vt)?qd(uf(_),Im):null,this.records.set(_,lt)}if(null!=lt)return this.hydrate(_,lt)}const Re=z&Bn.Self?Fc():this.parent;return A=z&Bn.Optional&&A===Vi?null:A,Re.get(_,A)}catch(Re){if("NullInjectorError"===Re.name){if((Re[Hn]=Re[Hn]||[]).unshift(n(_)),K)throw Re;return Ni(Re,_,"R3InjectorError",this.source)}throw Re}finally{je(fe),Hi(K)}}resolveInjectorInitializers(){const _=Hi(this),A=je(void 0);try{const z=this.get(yg.multi,ai,Bn.Self);for(const K of z)K()}finally{Hi(_),je(A)}}toString(){const _=[],A=this.records;for(const z of A.keys())_.push(n(z));return`R3Injector[${_.join(", ")}]`}assertNotDestroyed(){if(this._destroyed)throw new X(205,!1)}processProvider(_){let A=pm(_=Y(_))?_:Y(_&&_.provide);const z=function Eg(h){if(hd(h))return qd(void 0,h.useValue);return qd(Gm(h),Im)}(_);if(pm(_)||!0!==_.multi){this.records.get(A)}else{let K=this.records.get(A);K||(K=qd(void 0,Im,!0),K.factory=()=>ct(K.multi),this.records.set(A,K)),A=_,K.multi.push(_)}this.records.set(A,z)}hydrate(_,A){return A.value===Im&&(A.value=cf,A.value=A.factory()),"object"==typeof A.value&&A.value&&function df(h){return null!==h&&"object"==typeof h&&"function"==typeof h.ngOnDestroy}(A.value)&&this._ngOnDestroyHooks.add(A.value),A.value}injectableDefInScope(_){if(!_.providedIn)return!1;const A=Y(_.providedIn);return"string"==typeof A?"any"===A||this.scopes.has(A):this.injectorDefTypes.has(A)}}function uf(h){const _=He(h),A=null!==_?_.factory:Qr(h);if(null!==A)return A;if(h instanceof vc)throw new X(204,!1);if(h instanceof Function)return function jl(h){const _=h.length;if(_>0){xt(_,"?");throw new X(204,!1)}const A=function Dn(h){return h&&(h[vi]||h[mi])||null}(h);return null!==A?()=>A.factory(h):()=>new h}(h);throw new X(204,!1)}function Gm(h,_,A){let z;if(pm(h)){const K=Y(h);return Qr(K)||uf(K)}if(hd(h))z=()=>Y(h.useValue);else if(Al(h))z=()=>h.useFactory(...ct(h.deps||[]));else if(Eh(h))z=()=>zr(Y(h.useExisting));else{const K=Y(h&&(h.useClass||h.provide));if(!function Tp(h){return!!h.deps}(h))return Qr(K)||uf(K);z=()=>new K(...ct(h.deps))}return z}function qd(h,_,A=!1){return{factory:h,value:_,multi:A?[]:void 0}}function xy(h,_){for(const A of h)Array.isArray(A)?xy(A,_):A&&ue(A)?xy(A.\u0275providers,_):_(A)}class Xs{}class nd{}const Db="ngComponent";class Mh{resolveComponentFactory(_){throw function Df(h){const _=Error(`No component factory found for ${n(h)}. Did you add it to @NgModule.entryComponents?`);return _[Db]=h,_}(_)}}class Mg{}function ov(h,_){return new Wm(ho(h,_))}Mg.NULL=new Mh;class Wm{constructor(_){this.nativeElement=_}}function Pm(h){return h instanceof Wm?h.nativeElement:h}Wm.__NG_ELEMENT_ID__=function vC(){return ov(Us(),qi())};class Af{}class kl{}kl.__NG_ELEMENT_ID__=()=>function Gc(){const h=qi(),A=Ha(Us().index,h);return($a(A)?A:h)[Pt]}();class gu{}gu.\u0275prov=ft({token:gu,providedIn:"root",factory:()=>null});class Ad{constructor(_){this.full=_,this.major=_.split(".")[0],this.minor=_.split(".")[1],this.patch=_.split(".").slice(2).join(".")}}const $s=new Ad("15.2.9"),$h={},av="ngOriginalError";function Xp(h){return h[av]}class Th{constructor(){this._console=console}handleError(_){const A=this._findOriginalError(_);this._console.error("ERROR",_),A&&this._console.error("ORIGINAL ERROR",A)}_findOriginalError(_){let A=_&&Xp(_);for(;A&&Xp(A);)A=Xp(A);return A||null}}function wf(h){return h.ownerDocument.defaultView}function Qg(h){return h.ownerDocument}function Np(h){return h.ownerDocument.body}function _d(h){return h instanceof Function?h():h}function Jh(h,_,A){let z=h.length;for(;;){const K=h.indexOf(_,A);if(-1===K)return K;if(0===K||h.charCodeAt(K-1)<=32){const fe=_.length;if(K+fe===z||h.charCodeAt(K+fe)<=32)return K}A=K+1}}const Sb="ng-template";function f0(h,_,A){let z=0,K=!0;for(;z<h.length;){let fe=h[z++];if("string"==typeof fe&&K){const Re=h[z++];if(A&&"class"===fe&&-1!==Jh(Re.toLowerCase(),_,0))return!0}else{if(1===fe){for(;z<h.length&&"string"==typeof(fe=h[z++]);)if(fe.toLowerCase()===_)return!0;return!1}"number"==typeof fe&&(K=!1)}}return!1}function Ab(h){return 4===h.type&&h.value!==Sb}function Dh(h,_,A){return _===(4!==h.type||A?h.value:Sb)}function qf(h,_,A){let z=4;const K=h.attrs||[],fe=function tm(h){for(let _=0;_<h.length;_++){if(xl(h[_]))return _}return h.length}(K);let Re=!1;for(let lt=0;lt<_.length;lt++){const vt=_[lt];if("number"!=typeof vt){if(!Re)if(4&z){if(z=2|1&z,""!==vt&&!Dh(h,vt,A)||""===vt&&1===_.length){if(wd(z))return!1;Re=!0}}else{const b=8&z?vt:_[++lt];if(8&z&&null!==h.attrs){if(!f0(h.attrs,b,A)){if(wd(z))return!1;Re=!0}continue}const u=Qh(8&z?"class":vt,K,Ab(h),A);if(-1===u){if(wd(z))return!1;Re=!0;continue}if(""!==b){let y;y=u>fe?"":K[u+1].toLowerCase();const L=8&z?y:null;if(L&&-1!==Jh(L,b,0)||2&z&&b!==y){if(wd(z))return!1;Re=!0}}}}else{if(!Re&&!wd(z)&&!wd(vt))return!1;if(Re&&wd(vt))continue;Re=!1,z=vt|1&z}}return wd(z)||Re}function wd(h){return 0==(1&h)}function Qh(h,_,A,z){if(null===_)return-1;let K=0;if(z||!A){let fe=!1;for(;K<_.length;){const Re=_[K];if(Re===h)return K;if(3===Re||6===Re)fe=!0;else{if(1===Re||2===Re){let lt=_[++K];for(;"string"==typeof lt;)lt=_[++K];continue}if(4===Re)break;if(0===Re){K+=4;continue}}K+=fe?1:2}return-1}return function Hd(h,_){let A=h.indexOf(4);if(A>-1)for(A++;A<h.length;){const z=h[A];if("number"==typeof z)return-1;if(z===_)return A;A++}return-1}(_,h)}function bC(h,_,A=!1){for(let z=0;z<_.length;z++)if(qf(h,_[z],A))return!0;return!1}function nm(h,_){e:for(let A=0;A<_.length;A++){const z=_[A];if(h.length===z.length){for(let K=0;K<h.length;K++)if(h[K]!==z[K])continue e;return!0}}return!1}function Up(h,_){return h?":not("+_.trim()+")":_}function Hu(h){let _=h[0],A=1,z=2,K="",fe=!1;for(;A<h.length;){let Re=h[A];if("string"==typeof Re)if(2&z){const lt=h[++A];K+="["+Re+(lt.length>0?'="'+lt+'"':"")+"]"}else 8&z?K+="."+Re:4&z&&(K+=" "+Re);else""!==K&&!wd(Re)&&(_+=Up(fe,K),K=""),z=Re,fe=fe||!wd(z);A++}return""!==K&&(_+=Up(fe,K)),_}const ml={};function pf(h){mm(ia(),qi(),Ia()+h,!1)}function mm(h,_,A,z){if(!z)if(3==(3&_[xi])){const fe=h.preOrderCheckHooks;null!==fe&&Cd(_,fe,A)}else{const fe=h.preOrderHooks;null!==fe&&la(_,fe,0,A)}cc(A)}const Sy={\u0275\u0275defineInjectable:ft,\u0275\u0275defineInjector:rn,\u0275\u0275inject:zr,\u0275\u0275invalidFactoryDep:Eo,resolveForwardRef:Y};function te(h,_){let A=null,z=null;h.hasOwnProperty(vi)||Object.defineProperty(h,vi,{get:()=>(null===A&&(A=ws().compileInjectable(Sy,`ng:///${h.name}/\u0275prov.js`,function Pi(h,_){const A=_||{providedIn:null},z={name:h.name,type:h,typeArgumentCount:0,providedIn:A.providedIn};return(C(A)||Ye(A))&&void 0!==A.deps&&(z.deps=Fs(A.deps)),C(A)?z.useClass=A.useClass:function Q(h){return M in h}(A)?z.useValue=A.useValue:Ye(A)?z.useFactory=A.useFactory:function Zt(h){return void 0!==h.useExisting}(A)&&(z.useExisting=A.useExisting),z}(h,_))),A)}),h.hasOwnProperty(Qe)||Object.defineProperty(h,Qe,{get:()=>{if(null===z){const K=ws();z=K.compileFactory(Sy,`ng:///${h.name}/\u0275fac.js`,{name:h.name,type:h,typeArgumentCount:0,deps:Yp(h),target:K.FactoryTarget.Injectable})}return z},configurable:!0})}const M=E({provide:String,useValue:E});function C(h){return void 0!==h.useClass}function Ye(h){return void 0!==h.useFactory}const Ir=Cu("Injectable",void 0,void 0,void 0,(h,_)=>te(h,_));function xo(h,_=null,A=null,z){const K=Qa(h,_,A,z);return K.resolveInjectorInitializers(),K}function Qa(h,_=null,A=null,z,K=new Set){const fe=[A||ai,Jg(h)];return z=z||("object"==typeof h?void 0:n(h)),new xb(fe,_||Fc(),z||null,K)}class ec{static create(_,A){if(Array.isArray(_))return xo({name:""},A,_,"");{const z=_.name??"";return xo({name:z},_.parent,_.providers,z)}}}function qg(h){return h.length>1?" ("+function Sh(h){const _=[];for(let A=0;A<h.length;++A){if(_.indexOf(h[A])>-1)return _.push(h[A]),_;_.push(h[A])}return _}(h.slice().reverse()).map(z=>n(z.token)).join(" -> ")+")":""}function ao(h,_,A,z){const K=[_],fe=A(K),Re=z?function Yu(h,_){const A=`${h} caused by: ${_ instanceof Error?_.message:_}`,z=Error(A);return z[av]=_,z}(fe,z):Error(fe);return Re.addKey=Ay,Re.keys=K,Re.injectors=[h],Re.constructResolvingMessage=A,Re[av]=z,Re}function Ay(h,_){this.injectors.push(h),this.keys.push(_),this.message=this.constructResolvingMessage(this.keys)}function Id(h,_){const A=[];for(let z=0,K=_.length;z<K;z++){const fe=_[z];fe&&0!=fe.length?A.push(fe.map(n).join(" ")):A.push("?")}return Error("Cannot resolve all parameters for '"+n(h)+"'("+A.join(", ")+"). Make sure that all the parameters are decorated with Inject or have valid type annotations and that '"+n(h)+"' is decorated with Injectable.")}function EC(h,_){return Error(`Cannot mix multi providers and regular providers, got: ${h} ${_}`)}ec.THROW_IF_NOT_FOUND=Vi,ec.NULL=new x_,ec.\u0275prov=ft({token:ec,providedIn:"any",factory:()=>zr(Mb)}),ec.__NG_ELEMENT_ID__=-1;class $m{constructor(_,A){if(this.token=_,this.id=A,!_)throw new X(208,!1);this.displayName=n(this.token)}static get(_){return js.get(Y(_))}static get numberOfKeys(){return js.numberOfKeys}}const js=new class Xd{constructor(){this._allKeys=new Map}get(_){if(_ instanceof $m)return _;if(this._allKeys.has(_))return this._allKeys.get(_);const A=new $m(_,$m.numberOfKeys);return this._allKeys.set(_,A),A}get numberOfKeys(){return this._allKeys.size}};class wy{constructor(_,A,z){this.key=_,this.optional=A,this.visibility=z}static fromKey(_){return new wy(_,!1,null)}}const Vu=[];class dc{constructor(_,A,z){this.key=_,this.resolvedFactories=A,this.multiProvider=z,this.resolvedFactory=this.resolvedFactories[0]}}class MC{constructor(_,A){this.factory=_,this.dependencies=A}}function fm(h){let _,A;if(h.useClass){const z=Y(h.useClass);_=mc().factory(z),A=Iy(z)}else h.useExisting?(_=z=>z,A=[wy.fromKey($m.get(h.useExisting))]):h.useFactory?(_=h.useFactory,A=function qh(h,_){if(_){const A=_.map(z=>[z]);return _.map(z=>u1(h,z,A))}return Iy(h)}(h.useFactory,h.deps)):(_=()=>h.useValue,A=Vu);return new MC(_,A)}function lv(h){return new dc($m.get(h.provide),[fm(h)],h.multi||!1)}function cv(h){const z=function TC(h,_){for(let A=0;A<h.length;A++){const z=h[A],K=_.get(z.key.id);if(K){if(z.multiProvider!==K.multiProvider)throw EC(K,z);if(z.multiProvider)for(let fe=0;fe<z.resolvedFactories.length;fe++)K.resolvedFactories.push(z.resolvedFactories[fe]);else _.set(z.key.id,z)}else{let fe;fe=z.multiProvider?new dc(z.key,z.resolvedFactories.slice(),z.multiProvider):z,_.set(z.key.id,fe)}}return _}(Tr(h,[]).map(lv),new Map);return Array.from(z.values())}function Tr(h,_){return h.forEach(A=>{if(A instanceof Ll)_.push({provide:A,useClass:A});else if(A&&"object"==typeof A&&void 0!==A.provide)_.push(A);else{if(!Array.isArray(A))throw function CC(h){return Error(`Invalid provider - only instances of Provider and Type are allowed, got: ${h}`)}(A);Tr(A,_)}}),_}function Iy(h){const _=mc().parameters(h);if(!_)return[];if(_.some(A=>null==A))throw Id(h,_);return _.map(A=>u1(h,A,_))}function u1(h,_,A){let z=null,K=!1;if(!Array.isArray(_))return im(_ instanceof Hl?_.token:_,K,null);let fe=null;for(let Re=0;Re<_.length;++Re){const lt=_[Re];lt instanceof Ll?z=lt:lt instanceof Hl?z=lt.token:lt instanceof Fd?K=!0:lt instanceof qu||lt instanceof Zc?fe=lt:lt instanceof vc&&(z=lt)}if(z=Y(z),null!=z)return im(z,K,fe);throw Id(h,A)}function im(h,_,A){return new wy($m.get(h),_,A)}const _u={};class Tg{static resolve(_){return cv(_)}static resolveAndCreate(_,A){const z=Tg.resolve(_);return Tg.fromResolvedProviders(z,A)}static fromResolvedProviders(_,A){return new $c(_,A)}}class $c{constructor(_,A){this._constructionCounter=0,this._providers=_,this.parent=A||null;const z=_.length;this.keyIds=[],this.objs=[];for(let K=0;K<z;K++)this.keyIds[K]=_[K].key.id,this.objs[K]=_u}get(_,A=Vi){return this._getByKey($m.get(_),null,A)}resolveAndCreateChild(_){const A=Tg.resolve(_);return this.createChildFromResolved(A)}createChildFromResolved(_){const A=new $c(_);return A.parent=this,A}resolveAndInstantiate(_){return this.instantiateResolved(Tg.resolve([_])[0])}instantiateResolved(_){return this._instantiateProvider(_)}getProviderAtIndex(_){if(_<0||_>=this._providers.length)throw function Xf(h){return Error(`Index ${h} is out-of-bounds.`)}(_);return this._providers[_]}_new(_){if(this._constructionCounter++>this._getMaxNumberOfObjects())throw function Dp(h,_){return ao(h,_,function(A){return`Cannot instantiate cyclic dependency!${qg(A)}`})}(this,_.key);return this._instantiateProvider(_)}_getMaxNumberOfObjects(){return this.objs.length}_instantiateProvider(_){if(_.multiProvider){const A=[];for(let z=0;z<_.resolvedFactories.length;++z)A[z]=this._instantiate(_,_.resolvedFactories[z]);return A}return this._instantiate(_,_.resolvedFactories[0])}_instantiate(_,A){const z=A.factory;let K,fe;try{K=A.dependencies.map(Re=>this._getByReflectiveDependency(Re))}catch(Re){throw Re.addKey&&Re.addKey(this,_.key),Re}try{fe=z(...K)}catch(Re){throw function Ah(h,_,A,z){return ao(h,z,function(K){const fe=n(K[0].token);return`${_.message}: Error during instantiation of ${fe}!${qg(K)}.`},_)}(this,Re,Re.stack,_.key)}return fe}_getByReflectiveDependency(_){return this._getByKey(_.key,_.visibility,_.optional?null:Vi)}_getByKey(_,A,z){return _===$c.INJECTOR_KEY?this:A instanceof qu?this._getByKeySelf(_,z):this._getByKeyDefault(_,z,A)}_getObjByKeyId(_){for(let A=0;A<this.keyIds.length;A++)if(this.keyIds[A]===_)return this.objs[A]===_u&&(this.objs[A]=this._new(this._providers[A])),this.objs[A];return _u}_throwOrNull(_,A){if(A!==Vi)return A;throw function Wc(h,_){return ao(h,_,function(A){return`No provider for ${n(A[0].token)}!${qg(A)}`})}(this,_)}_getByKeySelf(_,A){const z=this._getObjByKeyId(_.id);return z!==_u?z:this._throwOrNull(_,A)}_getByKeyDefault(_,A,z){let K;for(K=z instanceof Zc?this.parent:this;K instanceof $c;){const fe=K,Re=fe._getObjByKeyId(_.id);if(Re!==_u)return Re;K=fe.parent}return null!==K?K.get(_.token,A):this._throwOrNull(_,A)}get displayName(){return`ReflectiveInjector(providers: [${function Pd(h,_){const A=[];for(let z=0;z<h._providers.length;++z)A[z]=_(h.getProviderAtIndex(z));return A}(this,A=>' "'+A.key.displayName+'" ').join(", ")}])`}toString(){return this.displayName}}function Xg(h,_=Bn.Default){const A=qi();if(null===A)return zr(h,_);return bu(Us(),A,Y(h),_)}function wb(){throw new Error("invalid")}function xC(h,_){const A=h.contentQueries;if(null!==A)for(let z=0;z<A.length;z+=2){const K=A[z],fe=A[z+1];if(-1!==fe){const Re=h.data[fe];ac(K),Re.contentQueries(2,_[fe],fe)}}}function Py(h,_,A,z,K,fe,Re,lt,vt,b,r){const u=_.blueprint.slice();return u[wn]=K,u[xi]=76|z,(null!==r||h&&1024&h[xi])&&(u[xi]|=1024),De(u),u[Cr]=u[hi]=h,u[It]=A,u[St]=Re||h&&h[St],u[Pt]=lt||h&&h[Pt],u[cn]=vt||h&&h[cn]||null,u[Qt]=b||h&&h[Qt]||null,u[Wn]=fe,u[_o]=function us(){return mu++}(),u[Si]=r,u[Ri]=2==_.type?h[Ri]:u,u}function Fv(h,_,A,z,K){let fe=h.data[_];if(null===fe)fe=Nv(h,_,A,z,K),function rs(){return Xt.lFrame.inI18n}()&&(fe.flags|=32);else if(64&fe.type){fe.type=A,fe.value=z,fe.attrs=K;const Re=Tc();fe.injectorIndex=null===Re?-1:Re.injectorIndex}return Qs(fe,!0),fe}function Nv(h,_,A,z,K){const fe=Ka(),Re=vu(),lt=Re?fe:fe&&fe.parent,vt=h.data[_]=function Xh(h,_,A,z,K,fe){let Re=_?_.injectorIndex:-1;return{type:A,index:z,insertBeforeIndex:null,injectorIndex:Re,directiveStart:-1,directiveEnd:-1,directiveStylingLast:-1,componentOffset:-1,propertyBindings:null,flags:0,providerIndexes:0,value:K,attrs:fe,mergedAttrs:null,localNames:null,initialInputs:void 0,inputs:null,outputs:null,tView:null,next:null,prev:null,projectionNext:null,child:null,parent:_,projection:null,styles:null,stylesWithoutHost:null,residualStyles:void 0,classes:null,classesWithoutHost:null,residualClasses:void 0,classBindings:0,styleBindings:0}}(0,lt,A,_,z,K);return null===h.firstChild&&(h.firstChild=vt),null!==fe&&(Re?null==fe.child&&null!==vt.parent&&(fe.child=vt):null===fe.next&&(fe.next=vt,vt.prev=fe)),vt}function S_(h,_,A,z){if(0===A)return-1;const K=_.length;for(let fe=0;fe<A;fe++)_.push(z),h.blueprint.push(z),h.data.push(null);return K}function Oy(h,_,A){Oc(_);try{const z=h.viewQuery;null!==z&&dv(1,z,A);const K=h.template;null!==K&&Uv(h,_,K,1,A),h.firstCreatePass&&(h.firstCreatePass=!1),h.staticContentQueries&&xC(h,_),h.staticViewQueries&&dv(2,h.viewQuery,A);const fe=h.components;null!==fe&&function Ib(h,_){for(let A=0;A<_.length;A++)I_(h,_[A])}(_,fe)}catch(z){throw h.firstCreatePass&&(h.incompleteFirstPass=!0,h.firstCreatePass=!1),z}finally{_[xi]&=-5,oo()}}function Bv(h,_,A,z){const K=_[xi];if(128==(128&K))return;Oc(_);try{De(_),gl(h.bindingStartIndex),null!==A&&Uv(h,_,A,2,z);const Re=3==(3&K);if(Re){const b=h.preOrderCheckHooks;null!==b&&Cd(_,b,null)}else{const b=h.preOrderHooks;null!==b&&la(_,b,0,null),ht(_,0)}if(function ep(h){for(let _=as(h);null!==_;_=ed(_)){if(!_[rl])continue;const A=_[ts];for(let z=0;z<A.length;z++){const K=A[z],fe=K[Cr];512&K[xi]||bt(fe,1),K[xi]|=512}}}(_),function Ob(h){for(let _=as(h);null!==_;_=ed(_))for(let A=gs;A<_.length;A++){const z=_[A],K=z[Gn];Ra(z)&&Bv(K,z,K.template,z[It])}}(_),null!==h.contentQueries&&xC(h,_),Re){const b=h.contentCheckHooks;null!==b&&Cd(_,b)}else{const b=h.contentHooks;null!==b&&la(_,b,1),ht(_,1)}!function d1(h,_){const A=h.hostBindingOpCodes;if(null!==A)try{for(let z=0;z<A.length;z++){const K=A[z];if(K<0)cc(~K);else{const fe=K,Re=A[++z],lt=A[++z];ks(Re,fe),lt(2,_[fe])}}}finally{cc(-1)}}(h,_);const lt=h.components;null!==lt&&function p1(h,_){for(let A=0;A<_.length;A++)rd(h,_[A])}(_,lt);const vt=h.viewQuery;if(null!==vt&&dv(2,vt,z),Re){const b=h.viewCheckHooks;null!==b&&Cd(_,b)}else{const b=h.viewHooks;null!==b&&la(_,b,2),ht(_,2)}!0===h.firstUpdatePass&&(h.firstUpdatePass=!1),_[xi]&=-41,512&_[xi]&&(_[xi]&=-513,bt(_[Cr],-1))}finally{oo()}}function Uv(h,_,A,z,K){const fe=Ia(),Re=2&z;try{cc(-1),Re&&_.length>to&&mm(h,_,to,!1),fi(Re?2:0,K),A(z,K)}finally{cc(fe),fi(Re?3:1,K)}}function rm(h,_,A){if(Mi(_)){const z=_.directiveStart,K=_.directiveEnd;for(let fe=z;fe<K;fe++){const Re=h.data[fe];Re.contentQueries&&Re.contentQueries(1,A[fe],fe)}}}function If(h,_,A){Ki()&&(function A_(h,_,A,z){const K=A.directiveStart,fe=A.directiveEnd;Di(A)&&function uv(h,_,A){const z=ho(_,h),K=h0(A),fe=h[St],Re=Ry(h,Py(h,K,null,A.onPush?32:16,z,_,fe,fe.createRenderer(z,A),null,null,null));h[_.index]=Re}(_,A,h.data[K+A.componentOffset]),h.firstCreatePass||Fi(A,_),Xu(z,_);const Re=A.initialInputs;for(let lt=K;lt<fe;lt++){const vt=h.data[lt],b=q(_,h,lt,A);if(Xu(b,_),null!==Re&&Pb(_,lt-K,b,vt,A,Re),ur(vt)){Ha(A.index,_)[It]=q(_,h,lt,A)}}}(h,_,A,ho(A,_)),64==(64&A.flags)&&h1(h,_,A))}function ku(h,_,A=ho){const z=_.localNames;if(null!==z){let K=_.index+1;for(let fe=0;fe<z.length;fe+=2){const Re=z[fe+1],lt=-1===Re?A(_,h):h[Re];h[K++]=lt}}}function h0(h){const _=h.tView;return null===_||_.incompleteFirstPass?h.tView=Nc(1,null,h.template,h.decls,h.vars,h.directiveDefs,h.pipeDefs,h.viewQuery,h.schemas,h.consts):_}function Nc(h,_,A,z,K,fe,Re,lt,vt,b){const r=to+z,u=r+K,y=function g0(h,_){const A=[];for(let z=0;z<_;z++)A.push(z<h?null:ml);return A}(r,u),L="function"==typeof b?b():b;return y[Gn]={type:h,blueprint:y,template:A,queries:null,viewQuery:lt,declTNode:_,data:y.slice().fill(null,r),bindingStartIndex:r,expandoStartIndex:u,hostBindingOpCodes:null,firstCreatePass:!0,firstUpdatePass:!0,staticViewQueries:!1,staticContentQueries:!1,preOrderHooks:null,preOrderCheckHooks:null,contentHooks:null,contentCheckHooks:null,viewHooks:null,viewCheckHooks:null,destroyHooks:null,cleanup:null,contentQueries:null,components:null,directiveRegistry:"function"==typeof fe?fe():fe,pipeRegistry:"function"==typeof Re?Re():Re,firstChild:null,schemas:vt,consts:L,incompleteFirstPass:!1}}function v0(h,_,A,z){const K=xg(_);null===A?K.push(z):(K.push(A),h.firstCreatePass&&Dg(h).push(z,K.length-1))}function Kl(h,_,A,z){for(let K in h)if(h.hasOwnProperty(K)){A=null===A?{}:A;const fe=h[K];null===z?y0(A,_,K,fe):z.hasOwnProperty(K)&&y0(A,_,z[K],fe)}return A}function y0(h,_,A,z){h.hasOwnProperty(A)?h[A].push(_,z):h[A]=[_,z]}function wh(h,_,A,z,K,fe,Re,lt){const vt=ho(_,A);let r,b=_.inputs;!lt&&null!=b&&(r=b[z])?(Zv(h,A,r,z,K),Di(_)&&function Bc(h,_){const A=Ha(_,h);16&A[xi]||(A[xi]|=32)}(A,_.index)):3&_.type?(z=function DC(h){return"class"===h?"className":"for"===h?"htmlFor":"formaction"===h?"formAction":"innerHtml"===h?"innerHTML":"readonly"===h?"readOnly":"tabindex"===h?"tabIndex":h}(z),K=null!=Re?Re(K,_.value||"",z):K,fe.setProperty(vt,z,K)):_.type}function Ly(h,_,A,z){if(Ki()){const K=null===z?null:{"":-1},fe=function e_(h,_){const A=h.directiveRegistry;let z=null,K=null;if(A)for(let fe=0;fe<A.length;fe++){const Re=A[fe];if(bC(_,Re.selectors,!1))if(z||(z=[]),ur(Re))if(null!==Re.findHostDirectiveDefs){const lt=[];K=K||new Map,Re.findHostDirectiveDefs(Re,lt,K),z.unshift(...lt,Re);eh(h,_,lt.length)}else z.unshift(Re),eh(h,_,0);else K=K||new Map,Re.findHostDirectiveDefs?.(Re,z,K),z.push(Re)}return null===z?null:[z,K]}(h,A);let Re,lt;null===fe?Re=lt=null:[Re,lt]=fe,null!==Re&&f1(h,_,A,Re,K,lt),K&&function SC(h,_,A){if(_){const z=h.localNames=[];for(let K=0;K<_.length;K+=2){const fe=A[_[K+1]];if(null==fe)throw new X(-301,!1);z.push(_[K],fe)}}}(A,z,K)}A.mergedAttrs=Os(A.mergedAttrs,A.attrs)}function f1(h,_,A,z,K,fe){for(let b=0;b<z.length;b++)Ca(Fi(A,_),h,z[b].type);!function AC(h,_,A){h.flags|=1,h.directiveStart=_,h.directiveEnd=_+A,h.providerIndexes=_}(A,h.data.length,z.length);for(let b=0;b<z.length;b++){const r=z[b];r.providersResolver&&r.providersResolver(r)}let Re=!1,lt=!1,vt=S_(h,_,z.length,null);for(let b=0;b<z.length;b++){const r=z[b];A.mergedAttrs=Os(A.mergedAttrs,r.hostAttrs),_E(h,A,_,vt,r),w_(vt,r,K),null!==r.contentQueries&&(A.flags|=4),(null!==r.hostBindings||null!==r.hostAttrs||0!==r.hostVars)&&(A.flags|=64);const u=r.type.prototype;!Re&&(u.ngOnChanges||u.ngOnInit||u.ngDoCheck)&&((h.preOrderHooks??(h.preOrderHooks=[])).push(A.index),Re=!0),!lt&&(u.ngOnChanges||u.ngDoCheck)&&((h.preOrderCheckHooks??(h.preOrderCheckHooks=[])).push(A.index),lt=!0),vt++}!function eg(h,_,A){const z=_.directiveStart,K=_.directiveEnd,fe=h.data,Re=_.attrs,lt=[];let vt=null,b=null;for(let r=z;r<K;r++){const u=fe[r],y=A?A.get(u):null,L=y?y.inputs:null,G=y?y.outputs:null;vt=Kl(u.inputs,r,vt,L),b=Kl(u.outputs,r,b,G);const Te=null===vt||null===Re||Ab(_)?null:vE(vt,r,Re);lt.push(Te)}null!==vt&&(vt.hasOwnProperty("class")&&(_.flags|=8),vt.hasOwnProperty("style")&&(_.flags|=16)),_.initialInputs=lt,_.inputs=vt,_.outputs=b}(h,A,fe)}function h1(h,_,A){const z=A.directiveStart,K=A.directiveEnd,fe=A.index,Re=function Ol(){return Xt.lFrame.currentDirectiveIndex}();try{cc(fe);for(let lt=z;lt<K;lt++){const vt=h.data[lt],b=_[lt];_c(lt),(null!==vt.hostBindings||0!==vt.hostVars||null!==vt.hostAttrs)&&hm(vt,b)}}finally{cc(-1),_c(Re)}}function hm(h,_){null!==h.hostBindings&&h.hostBindings(1,_)}function eh(h,_,A){_.componentOffset=A,(h.components??(h.components=[])).push(_.index)}function w_(h,_,A){if(A){if(_.exportAs)for(let z=0;z<_.exportAs.length;z++)A[_.exportAs[z]]=h;ur(_)&&(A[""]=h)}}function _E(h,_,A,z,K){h.data[z]=K;const fe=K.factory||(K.factory=Qr(K.type)),Re=new $i(fe,ur(K),Xg);h.blueprint[z]=Re,A[z]=Re,function ky(h,_,A,z,K){const fe=K.hostBindings;if(fe){let Re=h.hostBindingOpCodes;null===Re&&(Re=h.hostBindingOpCodes=[]);const lt=~_.index;(function zv(h){let _=h.length;for(;_>0;){const A=h[--_];if("number"==typeof A&&A<0)return A}return 0})(Re)!=lt&&Re.push(lt),Re.push(A,z,fe)}}(h,_,z,S_(h,A,K.hostVars,ml),K)}function Sp(h,_,A,z,K,fe){const Re=ho(h,_);Yv(_[Pt],Re,fe,h.value,A,z,K)}function Yv(h,_,A,z,K,fe,Re){if(null==fe)h.removeAttribute(_,K,A);else{const lt=null==Re?ye(fe):Re(fe,z||"",K);h.setAttribute(_,K,lt,A)}}function Pb(h,_,A,z,K,fe){const Re=fe[_];if(null!==Re){const lt=z.setInput;for(let vt=0;vt<Re.length;){const b=Re[vt++],r=Re[vt++],u=Re[vt++];null!==lt?z.setInput(A,u,b,r):A[r]=u}}}function vE(h,_,A){let z=null,K=0;for(;K<A.length;){const fe=A[K];if(0!==fe)if(5!==fe){if("number"==typeof fe)break;if(h.hasOwnProperty(fe)){null===z&&(z=[]);const Re=h[fe];for(let lt=0;lt<Re.length;lt+=2)if(Re[lt]===_){z.push(fe,Re[lt+1],A[K+1]);break}}K+=2}else K+=2;else K+=4}return z}function mf(h,_,A,z){return[h,!0,!1,_,null,0,z,A,null,null]}function rd(h,_){const A=Ha(_,h);if(Ra(A)){const z=A[Gn];48&A[xi]?Bv(z,A,z.template,A[It]):A[en]>0&&Pf(A)}}function Pf(h){for(let z=as(h);null!==z;z=ed(z))for(let K=gs;K<z.length;K++){const fe=z[K];if(Ra(fe))if(512&fe[xi]){const Re=fe[Gn];Bv(Re,fe,Re.template,fe[It])}else fe[en]>0&&Pf(fe)}const A=h[Gn].components;if(null!==A)for(let z=0;z<A.length;z++){const K=Ha(A[z],h);Ra(K)&&K[en]>0&&Pf(K)}}function I_(h,_){const A=Ha(_,h),z=A[Gn];(function yE(h,_){for(let A=_.length;A<h.blueprint.length;A++)_.push(h.blueprint[A])})(z,A),Oy(z,A,A[It])}function Ry(h,_){return h[Ln]?h[ii][Fr]=_:h[Ln]=_,h[ii]=_,_}function t_(h){for(;h;){h[xi]|=32;const _=jd(h);if(gi(h)&&!_)return h;h=_}return null}function Lb(h,_,A,z=!0){const K=_[St];K.begin&&K.begin();try{Bv(h,_,h.template,A)}catch(Re){throw z&&b0(_,Re),Re}finally{K.end&&K.end()}}function dv(h,_,A){ac(0),_(h,A)}function xg(h){return h[at]||(h[at]=[])}function Dg(h){return h.cleanup||(h.cleanup=[])}function Vv(h,_,A){return(null===h||ur(h))&&(A=function ro(h){for(;Array.isArray(h);){if("object"==typeof h[Uo])return h;h=h[wn]}return null}(A[_.index])),A[Pt]}function b0(h,_){const A=h[Qt],z=A?A.get(Th,null):null;z&&z.handleError(_)}function Zv(h,_,A,z,K){for(let fe=0;fe<A.length;){const Re=A[fe++],lt=A[fe++],vt=_[Re],b=h.data[Re];null!==b.setInput?b.setInput(vt,K,z,lt):vt[lt]=K}}function Of(h,_,A){const z=qr(_,h);lm(h[Pt],z,A)}function tg(h,_,A){let z=A?h.styles:null,K=A?h.classes:null,fe=0;if(null!==_)for(let Re=0;Re<_.length;Re++){const lt=_[Re];if("number"==typeof lt)fe=lt;else if(1==fe)K=P(K,lt);else if(2==fe){z=P(z,lt+": "+_[++Re]+";")}}A?h.styles=z:h.stylesWithoutHost=z,A?h.classes=K:h.classesWithoutHost=K}function Ih(h,_,A,z,K=!1){for(;null!==A;){const fe=_[A.index];if(null!==fe&&z.push(Mo(fe)),ln(fe))for(let lt=gs;lt<fe.length;lt++){const vt=fe[lt],b=vt[Gn].firstChild;null!==b&&Ih(vt[Gn],vt,b,z)}const Re=A.type;if(8&Re)Ih(h,_,A.child,z);else if(32&Re){const lt=fu(A,_);let vt;for(;vt=lt();)z.push(vt)}else if(16&Re){const lt=mp(_,A);if(Array.isArray(lt))z.push(...lt);else{const vt=jd(_[Ri]);Ih(vt[Gn],vt,lt,z,!0)}}A=K?A.projectionNext:A.next}return z}$c.INJECTOR_KEY=$m.get(ec);class Lf{get rootNodes(){const _=this._lView,A=_[Gn];return Ih(A,_,A.firstChild,[])}constructor(_,A){this._lView=_,this._cdRefInjectingView=A,this._appRef=null,this._attachedToViewContainer=!1}get context(){return this._lView[It]}set context(_){this._lView[It]=_}get destroyed(){return 128==(128&this._lView[xi])}destroy(){if(this._appRef)this._appRef.detachView(this);else if(this._attachedToViewContainer){const _=this._lView[Cr];if(ln(_)){const A=_[ps],z=A?A.indexOf(this):-1;z>-1&&(Cl(_,z),Ge(A,z))}this._attachedToViewContainer=!1}Sa(this._lView[Gn],this._lView)}onDestroy(_){v0(this._lView[Gn],this._lView,null,_)}markForCheck(){t_(this._cdRefInjectingView||this._lView)}detach(){this._lView[xi]&=-65}reattach(){this._lView[xi]|=64}detectChanges(){Lb(this._lView[Gn],this._lView,this.context)}checkNoChanges(){}attachToViewContainerRef(){if(this._appRef)throw new X(902,!1);this._attachedToViewContainer=!0}detachFromAppRef(){this._appRef=null,function Nh(h,_){fp(h,_,_[Pt],2,null,null)}(this._lView[Gn],this._lView)}attachToAppRef(_){if(this._attachedToViewContainer)throw new X(902,!1);this._appRef=_}}class CE extends Lf{constructor(_){super(_),this._view=_}detectChanges(){const _=this._view;Lb(_[Gn],_,_[It],!1)}checkNoChanges(){}get context(){return null}}class Fy extends Mg{constructor(_){super(),this.ngModule=_}resolveComponentFactory(_){const A=Ci(_);return new Wv(A,this.ngModule)}}function g1(h){const _=[];for(let A in h)if(h.hasOwnProperty(A)){const z=h[A];_.push({propName:z,templateName:A})}return _}class Gv{constructor(_,A){this.injector=_,this.parentInjector=A}get(_,A,z){z=jn(z);const K=this.injector.get(_,$h,z);return K!==$h||A===$h?K:this.parentInjector.get(_,A,z)}}class Wv extends nd{get inputs(){return g1(this.componentDef.inputs)}get outputs(){return g1(this.componentDef.outputs)}constructor(_,A){super(),this.componentDef=_,this.ngModule=A,this.componentType=_.type,this.selector=function sv(h){return h.map(Hu).join(",")}(_.selectors),this.ngContentSelectors=_.ngContentSelectors?_.ngContentSelectors:[],this.isBoundToModule=!!A}create(_,A,z,K){let fe=(K=K||this.ngModule)instanceof gd?K:K?.injector;fe&&null!==this.componentDef.getStandaloneInjector&&(fe=this.componentDef.getStandaloneInjector(fe)||fe);const Re=fe?new Gv(_,fe):_,lt=Re.get(Af,null);if(null===lt)throw new X(407,!1);const vt=Re.get(gu,null),b=lt.createRenderer(null,this.componentDef),r=this.componentDef.selectors[0][0]||"div",u=z?function _0(h,_,A){const z=A===Pn.ShadowDom;return h.selectRootElement(_,z)}(b,z,this.componentDef.encapsulation):Mf(b,r,function _1(h){const _=h.toLowerCase();return"svg"===_?Xi:"math"===_?wr:null}(r)),y=this.componentDef.onPush?288:272,L=Nc(0,null,null,1,0,null,null,null,null,null),G=Py(null,L,null,y,null,null,lt,b,vt,Re,null);let Te,Ze;Oc(G);try{const gt=this.componentDef;let Ot,sn=null;gt.findHostDirectiveDefs?(Ot=[],sn=new Map,gt.findHostDirectiveDefs(gt,Ot,sn),Ot.push(gt)):Ot=[gt];const ci=function kb(h,_){const A=h[Gn],z=to;return h[z]=_,Fv(A,z,2,"#host",null)}(G,u),Ji=function By(h,_,A,z,K,fe,Re,lt){const vt=K[Gn];!function v1(h,_,A,z){for(const K of h)_.mergedAttrs=Os(_.mergedAttrs,K.hostAttrs);null!==_.mergedAttrs&&(tg(_,_.mergedAttrs,!0),null!==A&&Ud(z,A,_))}(z,h,_,Re);const b=fe.createRenderer(_,A),r=Py(K,h0(A),null,A.onPush?32:16,K[h.index],h,fe,b,lt||null,null,null);return vt.firstCreatePass&&eh(vt,h,z.length-1),Ry(K,r),K[h.index]=r}(ci,u,gt,Ot,G,lt,b);Ze=To(L,to),u&&function Rb(h,_,A,z){if(z)_a(h,A,["ng-version",$s.full]);else{const{attrs:K,classes:fe}=function Rv(h){const _=[],A=[];let z=1,K=2;for(;z<h.length;){let fe=h[z];if("string"==typeof fe)2===K?""!==fe&&_.push(fe,h[++z]):8===K&&A.push(fe);else{if(!wd(K))break;K=fe}z++}return{attrs:_,classes:A}}(_.selectors[0]);K&&_a(h,A,K),fe&&fe.length>0&&xf(h,A,fe.join(" "))}}(b,gt,u,z),void 0!==A&&function ME(h,_,A){const z=h.projection=[];for(let K=0;K<_.length;K++){const fe=A[K];z.push(null!=fe?Array.from(fe):null)}}(Ze,this.ngContentSelectors,A),Te=function EE(h,_,A,z,K,fe){const Re=Us(),lt=K[Gn],vt=ho(Re,K);f1(lt,K,Re,A,null,z);for(let r=0;r<A.length;r++){Xu(q(K,lt,Re.directiveStart+r,Re),K)}h1(lt,K,Re),vt&&Xu(vt,K);const b=q(K,lt,Re.directiveStart+Re.componentOffset,Re);if(h[It]=K[It]=b,null!==fe)for(const r of fe)r(b,_);return rm(lt,Re,h),b}(Ji,gt,Ot,sn,G,[TE]),Oy(L,G,null)}finally{oo()}return new zp(this.componentType,Te,ov(Ze,G),G,Ze)}}class zp extends Xs{constructor(_,A,z,K,fe){super(),this.location=z,this._rootLView=K,this._tNode=fe,this.instance=A,this.hostView=this.changeDetectorRef=new CE(K),this.componentType=_}setInput(_,A){const z=this._tNode.inputs;let K;if(null!==z&&(K=z[_])){const fe=this._rootLView;Zv(fe[Gn],fe,K,_,A);t_(Ha(this._tNode.index,fe))}}get injector(){return new Ei(this._tNode,this._rootLView)}destroy(){this.hostView.destroy()}onDestroy(_){this.hostView.onDestroy(_)}}function TE(){const h=Us();qs(qi()[Gn],h)}function y1(h){return Object.getPrototypeOf(h.prototype).constructor}function wC(h){let _=y1(h.type),A=!0;const z=[h];for(;_;){let K;if(ur(h))K=_.\u0275cmp||_.\u0275dir;else{if(_.\u0275cmp)throw new X(903,!1);K=_.\u0275dir}if(K){if(A){z.push(K);const Re=h;Re.inputs=ng(h.inputs),Re.declaredInputs=ng(h.declaredInputs),Re.outputs=ng(h.outputs);const lt=K.hostBindings;lt&&xE(h,lt);const vt=K.viewQuery,b=K.contentQueries;if(vt&&Uy(h,vt),b&&Sg(h,b),T(h.inputs,K.inputs),T(h.declaredInputs,K.declaredInputs),T(h.outputs,K.outputs),ur(K)&&K.data.animation){const r=h.data;r.animation=(r.animation||[]).concat(K.data.animation)}}const fe=K.features;if(fe)for(let Re=0;Re<fe.length;Re++){const lt=fe[Re];lt&&lt.ngInherit&&lt(h),lt===wC&&(A=!1)}}_=Object.getPrototypeOf(_)}!function pv(h){let _=0,A=null;for(let z=h.length-1;z>=0;z--){const K=h[z];K.hostVars=_+=K.hostVars,K.hostAttrs=Os(K.hostAttrs,A=Os(A,K.hostAttrs))}}(z)}function ng(h){return h===Nt?{}:h===ai?[]:h}function Uy(h,_){const A=h.viewQuery;h.viewQuery=A?(z,K)=>{_(z,K),A(z,K)}:_}function Sg(h,_){const A=h.contentQueries;h.contentQueries=A?(z,K,fe)=>{_(z,K,fe),A(z,K,fe)}:_}function xE(h,_){const A=h.hostBindings;h.hostBindings=A?(z,K)=>{_(z,K),A(z,K)}:_}const Fb=["providersResolver"],mv=["template","decls","consts","vars","onPush","ngContentSelectors","styles","encapsulation","schemas"];function b1(h){let A,_=y1(h.type);A=ur(h)?_.\u0275cmp:_.\u0275dir;const z=h;for(const K of Fb)z[K]=A[K];if(ur(A))for(const K of mv)z[K]=A[K]}function C1(h){return _=>{_.findHostDirectiveDefs=IC,_.hostDirectives=(Array.isArray(h)?h:h()).map(A=>"function"==typeof A?{directive:Y(A),inputs:Nt,outputs:Nt}:{directive:Y(A.directive),inputs:PC(A.inputs),outputs:PC(A.outputs)})}}function IC(h,_,A){if(null!==h.hostDirectives)for(const z of h.hostDirectives){const K=Xn(z.directive);n_(K.declaredInputs,z.inputs),IC(K,_,A),A.set(K,z),_.push(K)}}function PC(h){if(void 0===h||0===h.length)return Nt;const _={};for(let A=0;A<h.length;A+=2)_[h[A]]=h[A+1];return _}function n_(h,_){for(const A in _)if(_.hasOwnProperty(A)){const z=_[A],K=h[A];h[z]=K}}function Ag(h){return!!C0(h)&&(Array.isArray(h)||!(h instanceof Map)&&Symbol.iterator in h)}function C0(h){return null!==h&&("function"==typeof h||"object"==typeof h)}function gm(h,_,A){return h[_]=A}function th(h,_){return h[_]}function jm(h,_,A){const z=h[_];return!Object.is(z,A)&&(h[_]=A,!0)}function fv(h,_,A,z){const K=jm(h,_,A);return jm(h,_+1,z)||K}function E0(h,_,A,z,K){const fe=fv(h,_,A,z);return jm(h,_+2,K)||fe}function ru(h,_,A,z,K,fe){const Re=fv(h,_,A,z);return fv(h,_+2,K,fe)||Re}function Nb(h,_,A,z){const K=qi();if(jm(K,ss(),_)){ia();Sp(Rs(),K,h,_,A,z)}return Nb}function Ap(h,_){let A=!1,z=Pl();for(let fe=1;fe<_.length;fe+=2)A=jm(h,z++,_[fe])||A;if(gl(z),!A)return ml;let K=_[0];for(let fe=1;fe<_.length;fe+=2)K+=ye(_[fe])+_[fe+1];return K}function jv(h,_,A,z){return jm(h,ss(),A)?_+ye(A)+z:ml}function rg(h,_,A,z,K,fe){const lt=fv(h,Pl(),A,K);return gc(2),lt?_+ye(A)+z+ye(K)+fe:ml}function ff(h,_,A,z,K,fe,Re,lt){const b=E0(h,Pl(),A,K,Re);return gc(3),b?_+ye(A)+z+ye(K)+fe+ye(Re)+lt:ml}function hf(h,_,A,z,K,fe,Re,lt,vt,b){const u=ru(h,Pl(),A,K,Re,vt);return gc(4),u?_+ye(A)+z+ye(K)+fe+ye(Re)+lt+ye(vt)+b:ml}function Kv(h,_,A,z,K,fe,Re,lt,vt,b,r,u){const y=Pl();let L=ru(h,y,A,K,Re,vt);return L=jm(h,y+4,r)||L,gc(5),L?_+ye(A)+z+ye(K)+fe+ye(Re)+lt+ye(vt)+b+ye(r)+u:ml}function Ph(h,_,A,z,K,fe,Re,lt,vt,b,r,u,y,L){const G=Pl();let Te=ru(h,G,A,K,Re,vt);return Te=fv(h,G+4,r,y)||Te,gc(6),Te?_+ye(A)+z+ye(K)+fe+ye(Re)+lt+ye(vt)+b+ye(r)+u+ye(y)+L:ml}function P_(h,_,A,z,K,fe,Re,lt,vt,b,r,u,y,L,G,Te){const Ze=Pl();let gt=ru(h,Ze,A,K,Re,vt);return gt=E0(h,Ze+4,r,y,G)||gt,gc(7),gt?_+ye(A)+z+ye(K)+fe+ye(Re)+lt+ye(vt)+b+ye(r)+u+ye(y)+L+ye(G)+Te:ml}function hv(h,_,A,z,K,fe,Re,lt,vt,b,r,u,y,L,G,Te,Ze,gt){const Ot=Pl();let sn=ru(h,Ot,A,K,Re,vt);return sn=ru(h,Ot+4,r,y,G,Ze)||sn,gc(8),sn?_+ye(A)+z+ye(K)+fe+ye(Re)+lt+ye(vt)+b+ye(r)+u+ye(y)+L+ye(G)+Te+ye(Ze)+gt:ml}function Hy(h,_,A,z,K,fe){const Re=qi(),lt=jv(Re,_,A,z);if(lt!==ml){Sp(Rs(),Re,h,lt,K,fe)}return Hy}function M0(h,_,A,z,K,fe,Re,lt){const vt=qi(),b=rg(vt,_,A,z,K,fe);if(b!==ml){Sp(Rs(),vt,h,b,Re,lt)}return M0}function i_(h,_,A,z,K,fe,Re,lt,vt,b){const r=qi(),u=ff(r,_,A,z,K,fe,Re,lt);if(u!==ml){Sp(Rs(),r,h,u,vt,b)}return i_}function r_(h,_,A,z,K,fe,Re,lt,vt,b,r,u){const y=qi(),L=hf(y,_,A,z,K,fe,Re,lt,vt,b);if(L!==ml){Sp(Rs(),y,h,L,r,u)}return r_}function Bb(h,_,A,z,K,fe,Re,lt,vt,b,r,u,y,L){const G=qi(),Te=Kv(G,_,A,z,K,fe,Re,lt,vt,b,r,u);if(Te!==ml){Sp(Rs(),G,h,Te,y,L)}return Bb}function wg(h,_,A,z,K,fe,Re,lt,vt,b,r,u,y,L,G,Te){const Ze=qi(),gt=Ph(Ze,_,A,z,K,fe,Re,lt,vt,b,r,u,y,L);if(gt!==ml){Sp(Rs(),Ze,h,gt,G,Te)}return wg}function _m(h,_,A,z,K,fe,Re,lt,vt,b,r,u,y,L,G,Te,Ze,gt){const Ot=qi(),sn=P_(Ot,_,A,z,K,fe,Re,lt,vt,b,r,u,y,L,G,Te);if(sn!==ml){Sp(Rs(),Ot,h,sn,Ze,gt)}return _m}function nh(h,_,A,z,K,fe,Re,lt,vt,b,r,u,y,L,G,Te,Ze,gt,Ot,sn){const ci=qi(),Ji=hv(ci,_,A,z,K,fe,Re,lt,vt,b,r,u,y,L,G,Te,Ze,gt);if(Ji!==ml){Sp(Rs(),ci,h,Ji,Ot,sn)}return nh}function O_(h,_,A,z){const K=qi(),fe=Ap(K,_);if(fe!==ml){Sp(Rs(),K,h,fe,A,z)}return O_}function T0(h,_,A,z,K,fe,Re,lt){const vt=qi(),b=ia(),r=h+to,u=b.firstCreatePass?function M1(h,_,A,z,K,fe,Re,lt,vt){const b=_.consts,r=Fv(_,h,4,Re||null,Jt(b,lt));Ly(_,A,r,Jt(b,vt)),qs(_,r);const u=r.tView=Nc(2,r,z,K,fe,_.directiveRegistry,_.pipeRegistry,null,_.schemas,b);return null!==_.queries&&(_.queries.template(_,r),u.queries=_.queries.embeddedTView(r)),r}(r,b,vt,_,A,z,K,fe,Re):b.data[r];Qs(u,!1);const y=vt[Pt].createComment("");nu(b,vt,y,u),Xu(y,vt),Ry(vt,vt[r]=mf(y,vt,y,u)),Er(u)&&If(b,vt,u),null!=Re&&ku(vt,u,lt)}function Zy(h){return Ao(function Wl(){return Xt.lFrame.contextLView}(),to+h)}function Ub(h,_,A){const z=qi();if(jm(z,ss(),_)){wh(ia(),Rs(),z,h,_,z[Pt],A,!1)}return Ub}function zb(h,_,A,z,K){const Re=K?"class":"style";Zv(h,A,_.inputs[Re],Re,z)}function Pg(h,_,A,z){const K=qi(),fe=ia(),Re=to+h,lt=K[Pt],vt=fe.firstCreatePass?function Jv(h,_,A,z,K,fe){const Re=_.consts,vt=Fv(_,h,2,z,Jt(Re,K));return Ly(_,A,vt,Jt(Re,fe)),null!==vt.attrs&&tg(vt,vt.attrs,!1),null!==vt.mergedAttrs&&tg(vt,vt.mergedAttrs,!0),null!==_.queries&&_.queries.elementStart(_,vt),vt}(Re,fe,K,_,A,z):fe.data[Re],b=K[Re]=Mf(lt,_,function Ju(){return Xt.lFrame.currentNamespace}()),r=Er(vt);return Qs(vt,!0),Ud(lt,b,vt),32!=(32&vt.flags)&&nu(fe,K,b,vt),0===function Fe(){return Xt.lFrame.elementDepthCount}()&&Xu(b,K),function Wt(){Xt.lFrame.elementDepthCount++}(),r&&(If(fe,K,vt),rm(fe,vt,K)),null!==z&&ku(K,vt),Pg}function L_(){let h=Us();vu()?hl():(h=h.parent,Qs(h,!1));const _=h;!function yi(){Xt.lFrame.elementDepthCount--}();const A=ia();return A.firstCreatePass&&(qs(A,h),Mi(h)&&A.queries.elementEnd(h)),null!=_.classesWithoutHost&&function Kr(h){return 0!=(8&h.flags)}(_)&&zb(A,_,qi(),_.classesWithoutHost,!0),null!=_.stylesWithoutHost&&function os(h){return 0!=(16&h.flags)}(_)&&zb(A,_,qi(),_.stylesWithoutHost,!1),L_}function o_(h,_,A,z){return Pg(h,_,A,z),L_(),o_}function Vd(h,_,A){const z=qi(),K=ia(),fe=h+to,Re=K.firstCreatePass?function x0(h,_,A,z,K){const fe=_.consts,Re=Jt(fe,z),lt=Fv(_,h,8,"ng-container",Re);return null!==Re&&tg(lt,Re,!0),Ly(_,A,lt,Jt(fe,K)),null!==_.queries&&_.queries.elementStart(_,lt),lt}(fe,K,z,_,A):K.data[fe];Qs(Re,!0);const lt=z[fe]=z[Pt].createComment("");return nu(K,z,lt,Re),Xu(lt,z),Er(Re)&&(If(K,z,Re),rm(K,Re,z)),null!=A&&ku(z,Re),Vd}function D0(){let h=Us();const _=ia();return vu()?hl():(h=h.parent,Qs(h,!1)),_.firstCreatePass&&(qs(_,h),Mi(h)&&_.queries.elementEnd(h)),D0}function gf(h,_,A){return Vd(h,_,A),D0(),gf}function gv(){return qi()}function kf(h){return!!h&&"function"==typeof h.then}function ih(h){return!!h&&"function"==typeof h.subscribe}const _v=ih;function Qv(h,_,A,z){const K=qi(),fe=ia(),Re=Us();return Ue(fe,K,K[Pt],Re,h,_,z),Qv}function U(h,_){const A=Us(),z=qi(),K=ia();return Ue(K,z,Vv(Yc(K.data),A,z),A,h,_),U}function Ue(h,_,A,z,K,fe,Re){const lt=Er(z),b=h.firstCreatePass&&Dg(h),r=_[It],u=xg(_);let y=!0;if(3&z.type||Re){const Te=ho(z,_),Ze=Re?Re(Te):Te,gt=u.length,Ot=Re?ci=>Re(Mo(ci[z.index])):z.index;let sn=null;if(!Re&&lt&&(sn=function J(h,_,A,z){const K=h.cleanup;if(null!=K)for(let fe=0;fe<K.length-1;fe+=2){const Re=K[fe];if(Re===A&&K[fe+1]===z){const lt=_[at],vt=K[fe+2];return lt.length>vt?lt[vt]:null}"string"==typeof Re&&(fe+=2)}return null}(h,_,K,z.index)),null!==sn){(sn.__ngLastListenerFn__||sn).__ngNextListenerFn__=fe,sn.__ngLastListenerFn__=fe,y=!1}else{fe=yn(z,_,r,fe,!1);const ci=A.listen(Ze,K,fe);u.push(fe,ci),b&&b.push(K,Ot,gt,gt+1)}}else fe=yn(z,_,r,fe,!1);const L=z.outputs;let G;if(y&&null!==L&&(G=L[K])){const Te=G.length;if(Te)for(let Ze=0;Ze<Te;Ze+=2){const gt=G[Ze],Ot=G[Ze+1],Ji=_[gt][Ot].subscribe(fe),xr=u.length;u.push(fe,Ji),b&&b.push(K,z.index,xr,-(xr+1))}}}function At(h,_,A,z){try{return fi(6,_,A),!1!==A(z)}catch(K){return b0(h,K),!1}finally{fi(7,_,A)}}function yn(h,_,A,z,K){return function fe(Re){if(Re===Function)return z;t_(h.componentOffset>-1?Ha(h.index,_):_);let vt=At(_,A,z,Re),b=fe.__ngNextListenerFn__;for(;b;)vt=At(_,A,b,Re)&&vt,b=b.__ngNextListenerFn__;return K&&!1===vt&&(Re.preventDefault(),Re.returnValue=!1),vt}}function zn(h=1){return da(h)}function ki(h,_){let A=null;const z=function Bp(h){const _=h.attrs;if(null!=_){const A=_.indexOf(5);if(!(1&A))return _[A+1]}return null}(h);for(let K=0;K<_.length;K++){const fe=_[K];if("*"!==fe){if(null===z?bC(h,fe,!0):nm(z,fe))return K}else A=K}return A}function ji(h){const _=qi()[Ri][Wn];if(!_.projection){const A=h?h.length:1,z=_.projection=xt(A,null),K=z.slice();let fe=_.child;for(;null!==fe;){const Re=h?ki(fe,h):0;null!==Re&&(K[Re]?K[Re].projectionNext=fe:z[Re]=fe,K[Re]=fe),fe=fe.next}}}function br(h,_=0,A){const z=qi(),K=ia(),fe=Fv(K,to+h,16,null,A||null);null===fe.projection&&(fe.projection=_),hl(),32!=(32&fe.flags)&&function Bh(h,_,A){Uh(_[Pt],0,_,A,J_(h,A,_),q_(A.parent||_[Wn],A,_))}(K,z,fe)}function io(h,_,A){return uo(h,"",_,"",A),io}function uo(h,_,A,z,K){const fe=qi(),Re=jv(fe,_,A,z);if(Re!==ml){wh(ia(),Rs(),fe,h,Re,fe[Pt],K,!1)}return uo}function Co(h,_,A,z,K,fe,Re){const lt=qi(),vt=rg(lt,_,A,z,K,fe);if(vt!==ml){wh(ia(),Rs(),lt,h,vt,lt[Pt],Re,!1)}return Co}function pa(h,_,A,z,K,fe,Re,lt,vt){const b=qi(),r=ff(b,_,A,z,K,fe,Re,lt);if(r!==ml){wh(ia(),Rs(),b,h,r,b[Pt],vt,!1)}return pa}function Ea(h,_,A,z,K,fe,Re,lt,vt,b,r){const u=qi(),y=hf(u,_,A,z,K,fe,Re,lt,vt,b);if(y!==ml){wh(ia(),Rs(),u,h,y,u[Pt],r,!1)}return Ea}function xs(h,_,A,z,K,fe,Re,lt,vt,b,r,u,y){const L=qi(),G=Kv(L,_,A,z,K,fe,Re,lt,vt,b,r,u);if(G!==ml){wh(ia(),Rs(),L,h,G,L[Pt],y,!1)}return xs}function El(h,_,A,z,K,fe,Re,lt,vt,b,r,u,y,L,G){const Te=qi(),Ze=Ph(Te,_,A,z,K,fe,Re,lt,vt,b,r,u,y,L);if(Ze!==ml){wh(ia(),Rs(),Te,h,Ze,Te[Pt],G,!1)}return El}function fs(h,_,A,z,K,fe,Re,lt,vt,b,r,u,y,L,G,Te,Ze){const gt=qi(),Ot=P_(gt,_,A,z,K,fe,Re,lt,vt,b,r,u,y,L,G,Te);if(Ot!==ml){wh(ia(),Rs(),gt,h,Ot,gt[Pt],Ze,!1)}return fs}function Bs(h,_,A,z,K,fe,Re,lt,vt,b,r,u,y,L,G,Te,Ze,gt,Ot){const sn=qi(),ci=hv(sn,_,A,z,K,fe,Re,lt,vt,b,r,u,y,L,G,Te,Ze,gt);if(ci!==ml){wh(ia(),Rs(),sn,h,ci,sn[Pt],Ot,!1)}return Bs}function Ys(h,_,A){const z=qi(),K=Ap(z,_);if(K!==ml){wh(ia(),Rs(),z,h,K,z[Pt],A,!1)}return Ys}function ou(h,_){return h<<17|_<<2}function au(h){return h>>17&32767}function vm(h){return 2|h}function wp(h){return(131068&h)>>2}function k_(h,_){return-131069&h|_<<2}function og(h){return 1|h}function SE(h,_,A,z,K,fe){let Re=fe?_.classBindings:_.styleBindings,lt=au(Re),vt=wp(Re);h[z]=A;let r,b=!1;if(Array.isArray(A)){const u=A;r=u[1],(null===r||ms(u,r)>0)&&(b=!0)}else r=A;if(K)if(0!==vt){const y=au(h[lt+1]);h[z+1]=ou(y,lt),0!==y&&(h[y+1]=k_(h[y+1],z)),h[lt+1]=function xu(h,_){return 131071&h|_<<17}(h[lt+1],z)}else h[z+1]=ou(lt,0),0!==lt&&(h[lt+1]=k_(h[lt+1],z)),lt=z;else h[z+1]=ou(vt,0),0===lt?lt=z:h[vt+1]=k_(h[vt+1],z),vt=z;b&&(h[z+1]=vm(h[z+1])),AE(h,r,z,!0,fe),AE(h,r,z,!1,fe),function RM(h,_,A,z,K){const fe=K?h.residualClasses:h.residualStyles;null!=fe&&"string"==typeof _&&ms(fe,_)>=0&&(A[z+1]=og(A[z+1]))}(_,r,h,z,fe),Re=ou(lt,vt),fe?_.classBindings=Re:_.styleBindings=Re}function AE(h,_,A,z,K){const fe=h[A+1],Re=null===_;let lt=z?au(fe):wp(fe),vt=!1;for(;0!==lt&&(!1===vt||Re);){const b=h[lt],r=h[lt+1];wE(b,_)&&(vt=!0,h[lt+1]=z?og(r):vm(r)),lt=z?au(r):wp(r)}vt&&(h[A+1]=z?vm(fe):og(fe))}function wE(h,_){return null===h||null==_||(Array.isArray(h)?h[1]:h)===_||!(!Array.isArray(h)||"string"!=typeof _)&&ms(h,_)>=0}const Om={textEnd:0,key:0,keyEnd:0,value:0,valueEnd:0};function IE(h){return h.substring(Om.key,Om.keyEnd)}function PE(h){return h.substring(Om.value,Om.valueEnd)}function NM(h,_){const A=Om.textEnd;return A===_?-1:(_=Om.keyEnd=function $y(h,_,A){for(;_<A&&h.charCodeAt(_)>32;)_++;return _}(h,Om.key=_,A),Wy(h,_,A))}function ag(h,_){const A=Om.textEnd;let z=Om.key=Wy(h,_,A);return A===z?-1:(z=Om.keyEnd=function Km(h,_,A){let z;for(;_<A&&(45===(z=h.charCodeAt(_))||95===z||(-33&z)>=65&&(-33&z)<=90||z>=48&&z<=57);)_++;return _}(h,z,A),z=LC(h,z,A,58),z=Om.value=Wy(h,z,A),z=Om.valueEnd=function sg(h,_,A){let z=-1,K=-1,fe=-1,Re=_,lt=Re;for(;Re<A;){const vt=h.charCodeAt(Re++);if(59===vt)return lt;34===vt||39===vt?lt=Re=Lg(h,vt,Re,A):_===Re-4&&85===fe&&82===K&&76===z&&40===vt?lt=Re=Lg(h,41,Re,A):vt>32&&(lt=Re),fe=K,K=z,z=-33&vt}return lt}(h,z,A),LC(h,z,A,59))}function Og(h){Om.key=0,Om.keyEnd=0,Om.value=0,Om.valueEnd=0,Om.textEnd=h.length}function Wy(h,_,A){for(;_<A&&h.charCodeAt(_)<=32;)_++;return _}function LC(h,_,A,z){return(_=Wy(h,_,A))<A&&_++,_}function Lg(h,_,A,z){let K=-1,fe=A;for(;fe<z;){const Re=h.charCodeAt(fe++);if(Re==_&&92!==K)return fe;K=92==Re&&92===K?0:Re}throw new Error}function R_(h,_,A){return oh(h,_,A,!1),R_}function A0(h,_){return oh(h,_,null,!0),A0}function rh(h){Jm(Oh,_f,h,!1)}function _f(h,_){for(let A=function el(h){return Og(h),ag(h,Wy(h,0,Om.textEnd))}(_);A>=0;A=ag(_,A))Oh(h,IE(_),PE(_))}function pc(h){Jm(Qm,ym,h,!0)}function ym(h,_){for(let A=function FM(h){return Og(h),NM(h,Wy(h,0,Om.textEnd))}(_);A>=0;A=NM(_,A))Sr(h,IE(_),!0)}function oh(h,_,A,z){const K=qi(),fe=ia(),Re=gc(2);if(fe.firstUpdatePass&&qv(fe,h,Re,z),_!==ml&&jm(K,Re,_)){yv(fe,fe.data[Ia()],K,K[Pt],h,K[Re+1]=function ix(h,_){return null==h||""===h||("string"==typeof _?h+=_:"object"==typeof h&&(h=n(Js(h)))),h}(_,A),z,Re)}}function Jm(h,_,A,z){const K=ia(),fe=gc(2);K.firstUpdatePass&&qv(K,null,fe,z);const Re=qi();if(A!==ml&&jm(Re,fe,A)){const lt=K.data[Ia()];if(BM(lt,z)&&!ah(K,fe)){let vt=z?lt.classesWithoutHost:lt.stylesWithoutHost;null!==vt&&(A=P(vt,A||"")),zb(K,lt,Re,A,z)}else!function w0(h,_,A,z,K,fe,Re,lt){K===ml&&(K=ai);let vt=0,b=0,r=0<K.length?K[0]:null,u=0<fe.length?fe[0]:null;for(;null!==r||null!==u;){const y=vt<K.length?K[vt+1]:void 0,L=b<fe.length?fe[b+1]:void 0;let Te,G=null;r===u?(vt+=2,b+=2,y!==L&&(G=u,Te=L)):null===u||null!==r&&r<u?(vt+=2,G=r):(b+=2,G=u,Te=L),null!==G&&yv(h,_,A,z,G,Te,Re,lt),r=vt<K.length?K[vt]:null,u=b<fe.length?fe[b]:null}}(K,lt,Re,Re[Pt],Re[fe+1],Re[fe+1]=function F_(h,_,A){if(null==A||""===A)return ai;const z=[],K=Js(A);if(Array.isArray(K))for(let fe=0;fe<K.length;fe++)h(z,K[fe],!0);else if("object"==typeof K)for(const fe in K)K.hasOwnProperty(fe)&&h(z,fe,K[fe]);else"string"==typeof K&&_(z,K);return z}(h,_,A),z,fe)}}function ah(h,_){return _>=h.expandoStartIndex}function qv(h,_,A,z){const K=h.data;if(null===K[A+1]){const fe=K[Ia()],Re=ah(h,A);BM(fe,z)&&null===_&&!Re&&(_=!1),_=function Yb(h,_,A,z){const K=Yc(h);let fe=z?_.residualClasses:_.residualStyles;if(null===K)0===(z?_.classBindings:_.styleBindings)&&(A=kC(null,h,_,A,z),A=RC(A,_.attrs,z),fe=null);else{const Re=_.directiveStylingLast;if(-1===Re||h[Re]!==K)if(A=kC(K,h,_,A,z),null===fe){let vt=function vv(h,_,A){const z=A?_.classBindings:_.styleBindings;if(0!==wp(z))return h[au(z)]}(h,_,z);void 0!==vt&&Array.isArray(vt)&&(vt=kC(null,h,_,vt[1],z),vt=RC(vt,_.attrs,z),function nx(h,_,A,z){const K=A?_.classBindings:_.styleBindings;h[au(K)]=z}(h,_,z,vt))}else fe=function jy(h,_,A){let z;const K=_.directiveEnd;for(let fe=1+_.directiveStylingLast;fe<K;fe++){z=RC(z,h[fe].hostAttrs,A)}return RC(z,_.attrs,A)}(h,_,z)}return void 0!==fe&&(z?_.residualClasses=fe:_.residualStyles=fe),A}(K,fe,_,z),SE(K,fe,_,A,Re,z)}}function kC(h,_,A,z,K){let fe=null;const Re=A.directiveEnd;let lt=A.directiveStylingLast;for(-1===lt?lt=A.directiveStart:lt++;lt<Re&&(fe=_[lt],z=RC(z,fe.hostAttrs,K),fe!==h);)lt++;return null!==h&&(A.directiveStylingLast=lt),z}function RC(h,_,A){const z=A?1:2;let K=-1;if(null!==_)for(let fe=0;fe<_.length;fe++){const Re=_[fe];"number"==typeof Re?K=Re:K===z&&(Array.isArray(h)||(h=void 0===h?[]:["",h]),Sr(h,Re,!!A||_[++fe]))}return void 0===h?null:h}function Oh(h,_,A){Sr(h,_,Js(A))}function Qm(h,_,A){const z=String(_);""!==z&&!z.includes(" ")&&Sr(h,z,A)}function yv(h,_,A,z,K,fe,Re,lt){if(!(3&_.type))return;const vt=h.data,b=vt[lt+1],r=function Gy(h){return 1==(1&h)}(b)?Hb(vt,_,A,K,wp(b),Re):void 0;if(!FC(r)){FC(fe)||function Rf(h){return 2==(2&h)}(b)&&(fe=Hb(vt,null,A,K,lt,Re));!function zh(h,_,A,z,K){if(_)K?h.addClass(A,z):h.removeClass(A,z);else{let fe=-1===z.indexOf("-")?void 0:Ls.DashCase;null==K?h.removeStyle(A,z,fe):("string"==typeof K&&K.endsWith("!important")&&(K=K.slice(0,-10),fe|=Ls.Important),h.setStyle(A,z,K,fe))}}(z,Re,qr(Ia(),A),K,fe)}}function Hb(h,_,A,z,K,fe){const Re=null===_;let lt;for(;K>0;){const vt=h[K],b=Array.isArray(vt),r=b?vt[1]:vt,u=null===r;let y=A[K+1];y===ml&&(y=u?ai:void 0);let L=u?fo(y,z):r===z?y:void 0;if(b&&!FC(L)&&(L=fo(vt,z)),FC(L)&&(lt=L,Re))return lt;const G=h[K+1];K=Re?au(G):wp(G)}if(null!==_){let vt=fe?_.residualClasses:_.residualStyles;null!=vt&&(lt=fo(vt,z))}return lt}function FC(h){return void 0!==h}function BM(h,_){return 0!=(h.flags&(_?8:16))}function UM(h,_=""){const A=qi(),z=ia(),K=h+to,fe=z.firstCreatePass?Fv(z,K,1,_,null):z.data[K],Re=A[K]=td(A[Pt],_);nu(z,A,Re,fe),Qs(fe,!1)}function Io(h){return Zu("",h,""),Io}function Zu(h,_,A){const z=qi(),K=jv(z,h,_,A);return K!==ml&&Of(z,Ia(),K),Zu}function lg(h,_,A,z,K){const fe=qi(),Re=rg(fe,h,_,A,z,K);return Re!==ml&&Of(fe,Ia(),Re),lg}function Od(h,_,A,z,K,fe,Re){const lt=qi(),vt=ff(lt,h,_,A,z,K,fe,Re);return vt!==ml&&Of(lt,Ia(),vt),Od}function Lh(h,_,A,z,K,fe,Re,lt,vt){const b=qi(),r=hf(b,h,_,A,z,K,fe,Re,lt,vt);return r!==ml&&Of(b,Ia(),r),Lh}function OE(h,_,A,z,K,fe,Re,lt,vt,b,r){const u=qi(),y=Kv(u,h,_,A,z,K,fe,Re,lt,vt,b,r);return y!==ml&&Of(u,Ia(),y),OE}function I0(h,_,A,z,K,fe,Re,lt,vt,b,r,u,y){const L=qi(),G=Ph(L,h,_,A,z,K,fe,Re,lt,vt,b,r,u,y);return G!==ml&&Of(L,Ia(),G),I0}function Xv(h,_,A,z,K,fe,Re,lt,vt,b,r,u,y,L,G){const Te=qi(),Ze=P_(Te,h,_,A,z,K,fe,Re,lt,vt,b,r,u,y,L,G);return Ze!==ml&&Of(Te,Ia(),Ze),Xv}function T1(h,_,A,z,K,fe,Re,lt,vt,b,r,u,y,L,G,Te,Ze){const gt=qi(),Ot=hv(gt,h,_,A,z,K,fe,Re,lt,vt,b,r,u,y,L,G,Te,Ze);return Ot!==ml&&Of(gt,Ia(),Ot),T1}function LE(h){const _=qi(),A=Ap(_,h);return A!==ml&&Of(_,Ia(),A),LE}function Ky(h,_,A){Jm(Sr,ym,jv(qi(),h,_,A),!0)}function x1(h,_,A,z,K){Jm(Sr,ym,rg(qi(),h,_,A,z,K),!0)}function kE(h,_,A,z,K,fe,Re){Jm(Sr,ym,ff(qi(),h,_,A,z,K,fe,Re),!0)}function rx(h,_,A,z,K,fe,Re,lt,vt){Jm(Sr,ym,hf(qi(),h,_,A,z,K,fe,Re,lt,vt),!0)}function P0(h,_,A,z,K,fe,Re,lt,vt,b,r){Jm(Sr,ym,Kv(qi(),h,_,A,z,K,fe,Re,lt,vt,b,r),!0)}function ox(h,_,A,z,K,fe,Re,lt,vt,b,r,u,y){Jm(Sr,ym,Ph(qi(),h,_,A,z,K,fe,Re,lt,vt,b,r,u,y),!0)}function rt(h,_,A,z,K,fe,Re,lt,vt,b,r,u,y,L,G){Jm(Sr,ym,P_(qi(),h,_,A,z,K,fe,Re,lt,vt,b,r,u,y,L,G),!0)}function ey(h,_,A,z,K,fe,Re,lt,vt,b,r,u,y,L,G,Te,Ze){Jm(Sr,ym,hv(qi(),h,_,A,z,K,fe,Re,lt,vt,b,r,u,y,L,G,Te,Ze),!0)}function bv(h){Jm(Sr,ym,Ap(qi(),h),!0)}function Vb(h,_,A){rh(jv(qi(),h,_,A))}function D1(h,_,A,z,K){rh(rg(qi(),h,_,A,z,K))}function RE(h,_,A,z,K,fe,Re){rh(ff(qi(),h,_,A,z,K,fe,Re))}function zM(h,_,A,z,K,fe,Re,lt,vt){rh(hf(qi(),h,_,A,z,K,fe,Re,lt,vt))}function Ru(h,_,A,z,K,fe,Re,lt,vt,b,r){rh(Kv(qi(),h,_,A,z,K,fe,Re,lt,vt,b,r))}function NC(h,_,A,z,K,fe,Re,lt,vt,b,r,u,y){rh(Ph(qi(),h,_,A,z,K,fe,Re,lt,vt,b,r,u,y))}function S1(h,_,A,z,K,fe,Re,lt,vt,b,r,u,y,L,G){rh(P_(qi(),h,_,A,z,K,fe,Re,lt,vt,b,r,u,y,L,G))}function Jy(h,_,A,z,K,fe,Re,lt,vt,b,r,u,y,L,G,Te,Ze){rh(hv(qi(),h,_,A,z,K,fe,Re,lt,vt,b,r,u,y,L,G,Te,Ze))}function Qy(h){rh(Ap(qi(),h))}function A1(h,_,A,z,K){return oh(h,jv(qi(),_,A,z),K,!1),A1}function qy(h,_,A,z,K,fe,Re){return oh(h,rg(qi(),_,A,z,K,fe),Re,!1),qy}function Zb(h,_,A,z,K,fe,Re,lt,vt){return oh(h,ff(qi(),_,A,z,K,fe,Re,lt),vt,!1),Zb}function Xy(h,_,A,z,K,fe,Re,lt,vt,b,r){return oh(h,hf(qi(),_,A,z,K,fe,Re,lt,vt,b),r,!1),Xy}function ty(h,_,A,z,K,fe,Re,lt,vt,b,r,u,y){return oh(h,Kv(qi(),_,A,z,K,fe,Re,lt,vt,b,r,u),y,!1),ty}function tp(h,_,A,z,K,fe,Re,lt,vt,b,r,u,y,L,G){return oh(h,Ph(qi(),_,A,z,K,fe,Re,lt,vt,b,r,u,y,L),G,!1),tp}function kg(h,_,A,z,K,fe,Re,lt,vt,b,r,u,y,L,G,Te,Ze){return oh(h,P_(qi(),_,A,z,K,fe,Re,lt,vt,b,r,u,y,L,G,Te),Ze,!1),kg}function Rg(h,_,A,z,K,fe,Re,lt,vt,b,r,u,y,L,G,Te,Ze,gt,Ot){return oh(h,hv(qi(),_,A,z,K,fe,Re,lt,vt,b,r,u,y,L,G,Te,Ze,gt),Ot,!1),Rg}function w1(h,_,A){return oh(h,Ap(qi(),_),A,!1),w1}function Cv(h,_,A){const z=qi();if(jm(z,ss(),_)){wh(ia(),Rs(),z,h,_,z[Pt],A,!0)}return Cv}function I1(h,_,A){const z=qi();if(jm(z,ss(),_)){const fe=ia(),Re=Rs();wh(fe,Re,z,h,_,Vv(Yc(fe.data),Re,z),A,!0)}return I1}const Fg=void 0;var BC=["en",[["a","p"],["AM","PM"],Fg],[["AM","PM"],Fg,Fg],[["S","M","T","W","T","F","S"],["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],["Su","Mo","Tu","We","Th","Fr","Sa"]],Fg,[["J","F","M","A","M","J","J","A","S","O","N","D"],["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],["January","February","March","April","May","June","July","August","September","October","November","December"]],Fg,[["B","A"],["BC","AD"],["Before Christ","Anno Domini"]],0,[6,0],["M/d/yy","MMM d, y","MMMM d, y","EEEE, MMMM d, y"],["h:mm a","h:mm:ss a","h:mm:ss a z","h:mm:ss a zzzz"],["{1}, {0}",Fg,"{1} 'at' {0}",Fg],[".",",",";","%","+","-","E","\xd7","\u2030","\u221e","NaN",":"],["#,##0.###","#,##0%","\xa4#,##0.00","#E0"],"USD","$","US Dollar",{},"ltr",function O0(h){const A=Math.floor(Math.abs(h)),z=h.toString().replace(/^[^.]*\.?/,"").length;return 1===A&&0===z?1:5}];let L0={};function FE(h,_,A){"string"!=typeof _&&(A=_,_=h[sh.LocaleId]),_=_.toLowerCase().replace(/_/g,"-"),L0[_]=h,A&&(L0[_][sh.ExtraData]=A)}function P1(h){const _=function eb(h){return h.toLowerCase().replace(/_/g,"-")}(h);let A=L1(_);if(A)return A;const z=_.split("-")[0];if(A=L1(z),A)return A;if("en"===z)return BC;throw new X(701,!1)}function O1(h){return P1(h)[sh.PluralCase]}function L1(h){return h in L0||(L0[h]=Fn.ng&&Fn.ng.common&&Fn.ng.common.locales&&Fn.ng.common.locales[h]),L0[h]}var sh;!function(h){h[h.LocaleId=0]="LocaleId",h[h.DayPeriodsFormat=1]="DayPeriodsFormat",h[h.DayPeriodsStandalone=2]="DayPeriodsStandalone",h[h.DaysFormat=3]="DaysFormat",h[h.DaysStandalone=4]="DaysStandalone",h[h.MonthsFormat=5]="MonthsFormat",h[h.MonthsStandalone=6]="MonthsStandalone",h[h.Eras=7]="Eras",h[h.FirstDayOfWeek=8]="FirstDayOfWeek",h[h.WeekendRange=9]="WeekendRange",h[h.DateFormat=10]="DateFormat",h[h.TimeFormat=11]="TimeFormat",h[h.DateTimeFormat=12]="DateTimeFormat",h[h.NumberSymbols=13]="NumberSymbols",h[h.NumberFormats=14]="NumberFormats",h[h.CurrencyCode=15]="CurrencyCode",h[h.CurrencySymbol=16]="CurrencySymbol",h[h.CurrencyName=17]="CurrencyName",h[h.Currencies=18]="Currencies",h[h.Directionality=19]="Directionality",h[h.PluralCase=20]="PluralCase",h[h.ExtraData=21]="ExtraData"}(sh||(sh={}));const k1=["zero","one","two","few","many"];const ny="en-US",tb={marker:"element"},Ua={marker:"ICU"};var kh;!function(h){h[h.SHIFT=2]="SHIFT",h[h.APPEND_EAGERLY=1]="APPEND_EAGERLY",h[h.COMMENT=2]="COMMENT"}(kh||(kh={}));let nb=ny;function R1(h){ut(h,"Expected localeId to be defined"),"string"==typeof h&&(nb=h.toLowerCase().replace(/_/g,"-"))}function BE(h,_,A){const z=_.insertBeforeIndex,K=Array.isArray(z)?z[0]:z;return null===K?$f(h,0,A):Mo(A[K])}function k0(h,_,A,z,K){const fe=_.insertBeforeIndex;if(Array.isArray(fe)){let Re=z,lt=null;if(3&_.type||(lt=Re,Re=K),null!==Re&&-1===_.componentOffset)for(let vt=1;vt<fe.length;vt++){vh(h,Re,A[fe[vt]],lt,!1)}}}function N_(h,_){if(h.push(_),h.length>1)for(let A=h.length-2;A>=0;A--){const z=h[A];UE(z)||ch(z,_)&&null===qm(z)&&B_(z,_.index)}}function UE(h){return!(64&h.type)}function ch(h,_){return UE(_)||h.index>_.index}function qm(h){const _=h.insertBeforeIndex;return Array.isArray(_)?_[0]:_}function B_(h,_){const A=h.insertBeforeIndex;Array.isArray(A)?A[0]=_:(E_(BE,k0),h.insertBeforeIndex=_)}function Ff(h,_){const A=h.data[_];return null===A||"string"==typeof A?null:A.hasOwnProperty("currentCaseLViewIndex")?A:A.value}function Ml(h,_,A){const z=Nv(h,A,64,null,null);return N_(_,z),z}function UC(h,_){const A=_[h.currentCaseLViewIndex];return null===A?A:A<0?~A:A}function Gb(h){return h>>>17}function N1(h){return(131070&h)>>>1}let iy=0,ry=0;function Wb(h,_,A,z){const K=A[Pt];let Re,fe=null;for(let lt=0;lt<_.length;lt++){const vt=_[lt];if("string"==typeof vt){const b=_[++lt];null===A[b]&&(A[b]=td(K,vt))}else if("number"==typeof vt)switch(1&vt){case 0:const b=Gb(vt);let r,u;if(null===fe&&(fe=b,Re=Q_(K,z)),b===fe?(r=z,u=Re):(r=null,u=Mo(A[b])),null!==u){const Te=N1(vt);vh(K,u,A[Te],r,!1);const gt=Ff(h,Te);if(null!==gt&&"object"==typeof gt){const Ot=UC(gt,A);null!==Ot&&Wb(h,gt.create[Ot],A,A[gt.anchorIdx])}}break;case 1:const y=vt>>>1,L=_[++lt],G=_[++lt];Yv(K,qr(y,A),null,null,L,G,null)}else switch(vt){case Ua:const b=_[++lt],r=_[++lt];if(null===A[r]){Xu(A[r]=mg(K,b),A)}break;case tb:const u=_[++lt],y=_[++lt];if(null===A[y]){Xu(A[y]=Mf(K,u,null),A)}}}}function zE(h,_,A,z,K){for(let fe=0;fe<A.length;fe++){const Re=A[fe],lt=A[++fe];if(Re&K){let vt="";for(let b=fe+1;b<=fe+lt;b++){const r=A[b];if("string"==typeof r)vt+=r;else if("number"==typeof r)if(r<0)vt+=ye(_[z-r]);else{const u=r>>>2;switch(3&r){case 1:const y=A[++b],L=A[++b],G=h.data[u];"string"==typeof G?Yv(_[Pt],_[u],null,G,y,vt,L):wh(h,G,_,y,vt,_[Pt],L,!1);break;case 0:const Te=_[u];null!==Te&&lm(_[Pt],Te,vt);break;case 2:U1(h,Ff(h,u),_,vt);break;case 3:oy(h,Ff(h,u),z,_)}}}}else{const vt=A[fe+1];if(vt>0&&3==(3&vt)){const r=Ff(h,vt>>>2);_[r.currentCaseLViewIndex]<0&&oy(h,r,z,_)}}fe+=lt}}function oy(h,_,A,z){let K=z[_.currentCaseLViewIndex];if(null!==K){let fe=iy;K<0&&(K=z[_.currentCaseLViewIndex]=~K,fe=-1),zE(h,z,_.update[K],A,fe)}}function U1(h,_,A,z){const K=function ZM(h,_){let A=h.cases.indexOf(_);if(-1===A)switch(h.type){case 1:{const z=function YM(h,_){const A=O1(_)(parseInt(h,10)),z=k1[A];return void 0!==z?z:"other"}(_,function sx(){return nb}());A=h.cases.indexOf(z),-1===A&&"other"!==z&&(A=h.cases.indexOf("other"));break}case 0:A=h.cases.indexOf("other")}return-1===A?null:A}(_,z);if(UC(_,A)!==K&&(VM(h,_,A),A[_.currentCaseLViewIndex]=null===K?null:~K,null!==K)){const Re=A[_.anchorIdx];Re&&Wb(h,_.create[K],A,Re)}}function VM(h,_,A){let z=UC(_,A);if(null!==z){const K=_.remove[z];for(let fe=0;fe<K.length;fe++){const Re=K[fe];if(Re>0){const lt=qr(Re,A);null!==lt&&Wp(A[Pt],lt)}else VM(h,Ff(h,~Re),A)}}}function ib(){const h=[];let A,z,_=-1;function fe(lt,vt){_=0;const b=UC(lt,vt);z=null!==b?lt.remove[b]:ai}function Re(){if(_<z.length){const lt=z[_++];if(lt>0)return A[lt];{h.push(_,z);const vt=~lt;return fe(A[Gn].data[vt],A),Re()}}return 0===h.length?null:(z=h.pop(),_=h.pop(),Re())}return function K(lt,vt){for(A=vt;h.length;)h.pop();return fe(lt.value,vt),Re}}const Mv=/\ufffd(\d+):?\d*\ufffd/gi,Tv=/({\s*\ufffd\d+:?\d*\ufffd\s*,\s*\S{6}\s*,[\s\S]*})/gi,H1=/\ufffd(\d+)\ufffd/,YC=/^\s*(\ufffd\d+:?\d*\ufffd)\s*,\s*(select|plural)\s*,/,R0="\ufffd",jb=/\ufffd\/?\*(\d+:\d+)\ufffd/gi,V1=/\ufffd(\/?[#*]\d+):?\d*\ufffd/gi,GM=/\uE500/g;function HE(h,_,A,z,K,fe){const Re=Tc(),lt=[],vt=[],b=[[]];K=function s(h,_){if(function Kb(h){return-1===h}(_))return H(h);{const A=h.indexOf(`:${_}${R0}`)+2+_.toString().length,z=h.search(new RegExp(`${R0}\\/\\*\\d+:${_}${R0}`));return H(h.substring(A,z))}}(K,fe);const r=function Z1(h){return h.replace(GM," ")}(K).split(V1);for(let u=0;u<r.length;u++){let y=r[u];if(1&u){const L=47===y.charCodeAt(0),Te=(y.charCodeAt(L?1:0),to+Number.parseInt(y.substring(L?2:1)));if(L)b.shift(),Qs(Tc(),!1);else{const Ze=Ml(h,b[0],Te);b.unshift([]),Qs(Ze,!0)}}else{const L=ie(y);for(let G=0;G<L.length;G++){let Te=L[G];if(1&G){const Ze=Te;if("object"!=typeof Ze)throw new Error(`Unable to parse ICU expression in "${K}" message.`);d(h,A,vt,_,Ze,rb(h,Re,b[0],A,lt,"",!0).index)}else{const Ze=Te;""!==Ze&&Rh(h,Re,b[0],lt,vt,A,Ze)}}}}h.data[z]={create:lt,update:vt}}function rb(h,_,A,z,K,fe,Re){const lt=S_(h,z,1,null);let vt=lt<<kh.SHIFT,b=Tc();_===b&&(b=null),null===b&&(vt|=kh.APPEND_EAGERLY),Re&&(vt|=kh.COMMENT,function up(h){void 0===dd&&(dd=h())}(ib)),K.push(vt,null===fe?"":fe);const r=Nv(h,lt,Re?32:1,null===fe?"":fe,null);N_(A,r);const u=r.index;return Qs(r,!1),null!==b&&_!==b&&function F1(h,_){let A=h.insertBeforeIndex;null===A?(E_(BE,k0),A=h.insertBeforeIndex=[null,_]):(be(Array.isArray(A),!0,"Expecting array here"),A.push(_))}(b,u),r}function Rh(h,_,A,z,K,fe,Re){const lt=Re.match(Mv),vt=rb(h,_,A,fe,z,lt?null:Re,!1);lt&&cg(K,Re,vt.index,null,0,null)}function cg(h,_,A,z,K,fe){const Re=h.length,lt=Re+1;h.push(null,null);const vt=Re+2,b=_.split(Mv);let r=0;for(let u=0;u<b.length;u++){const y=b[u];if(1&u){const L=K+parseInt(y,10);h.push(-1-L),r|=Jl(L)}else""!==y&&h.push(y)}return h.push(A<<2|(z?1:0)),z&&h.push(z,fe),h[Re]=r,h[lt]=h.length-vt,r}function xv(h){let _=0;for(let A=0;A<h.length;A++){const z=h[A];"number"==typeof z&&z<0&&_++}return _}function Jl(h){return 1<<Math.min(h,31)}function H(h){let _,fe,A="",z=0,K=!1;for(;null!==(_=jb.exec(h));)K?_[0]===`${R0}/*${fe}${R0}`&&(z=_.index,K=!1):(A+=h.substring(z,_.index+_[0].length),fe=_[1],K=!0);return A+=h.slice(z),A}function d(h,_,A,z,K,fe){let Re=0;const lt={type:K.type,currentCaseLViewIndex:S_(h,_,1,null),anchorIdx:fe,cases:[],create:[],remove:[],update:[]};(function tl(h,_,A){h.push(Jl(_.mainBinding),2,-1-_.mainBinding,A<<2|2)})(A,K,fe),function HM(h,_,A){const z=h.data[_];null===z?h.data[_]=A:z.value=A}(h,fe,lt);const vt=K.values;for(let b=0;b<vt.length;b++){const r=vt[b],u=[];for(let y=0;y<r.length;y++){const L=r[y];if("string"!=typeof L){const G=u.push(L)-1;r[y]=`\x3c!--\ufffd${G}\ufffd--\x3e`}}Re=ot(h,lt,_,A,z,K.cases[b],r.join(""),u)|Re}Re&&function bc(h,_,A){h.push(_,1,A<<2|3)}(A,Re,fe)}function k(h){const _=[],A=[];let z=1,K=0;const fe=ie(h=h.replace(YC,function(Re,lt,vt){return z="select"===vt?0:1,K=parseInt(lt.slice(1),10),""}));for(let Re=0;Re<fe.length;){let lt=fe[Re++].trim();1===z&&(lt=lt.replace(/\s*(?:=)?(\w+)\s*/,"$1")),lt.length&&_.push(lt);const vt=ie(fe[Re++]);_.length>A.length&&A.push(vt)}return{type:z,mainBinding:K,cases:_,values:A}}function ie(h){if(!h)return[];let _=0;const A=[],z=[],K=/[{}]/g;let fe;for(K.lastIndex=0;fe=K.exec(h);){const lt=fe.index;if("}"==fe[0]){if(A.pop(),0==A.length){const vt=h.substring(_,lt);YC.test(vt)?z.push(k(vt)):z.push(vt),_=lt+1}}else{if(0==A.length){const vt=h.substring(_,lt);z.push(vt),_=lt+1}A.push("{")}}const Re=h.substring(_);return z.push(Re),z}function ot(h,_,A,z,K,fe,Re,lt){const vt=[],b=[],r=[];_.cases.push(fe),_.create.push(vt),_.remove.push(b),_.update.push(r);const y=Dd(Lt()).getInertBodyElement(Re),L=vg(y)||y;return L?Cn(h,_,A,z,vt,b,r,L,K,lt,0):0}function Cn(h,_,A,z,K,fe,Re,lt,vt,b,r){let u=0,y=lt.firstChild;for(;y;){const L=S_(h,A,1,null);switch(y.nodeType){case Node.ELEMENT_NODE:const G=y,Te=G.tagName.toLowerCase();if(bp.hasOwnProperty(Te)){np(K,tb,Te,vt,L),h.data[L]=Te;const sn=G.attributes;for(let ci=0;ci<sn.length;ci++){const Ji=sn.item(ci),xr=Ji.name.toLowerCase();Ji.value.match(Mv)?Ac.hasOwnProperty(xr)&&(af[xr]?cg(Re,Ji.value,L,Ji.name,0,rv):cg(Re,Ji.value,L,Ji.name,0,null)):Ss(K,L,Ji)}u=Cn(h,_,A,z,K,fe,Re,y,L,b,r+1)|u,ir(fe,L,r)}break;case Node.TEXT_NODE:const Ze=y.textContent||"",gt=Ze.match(Mv);np(K,null,gt?"":Ze,vt,L),ir(fe,L,r),gt&&(u=cg(Re,Ze,L,null,0,null)|u);break;case Node.COMMENT_NODE:const Ot=H1.exec(y.textContent||"");if(Ot){const ci=b[parseInt(Ot[1],10)];np(K,Ua,"",vt,L),d(h,A,z,vt,ci,L),Yo(fe,L,r)}}y=y.nextSibling}return u}function ir(h,_,A){0===A&&h.push(_)}function Yo(h,_,A){0===A&&(h.push(~_),h.push(_))}function np(h,_,A,z,K){null!==_&&h.push(_),h.push(A,K,function Ev(h,_,A){return h|_<<17|A<<1}(0,z,K))}function Ss(h,_,A){h.push(_<<1|1,A.name,A.value)}const Xm=0,Du=/\[(\ufffd.+?\ufffd?)\]/,HC=/\[(\ufffd.+?\ufffd?)\]|(\ufffd\/?\*\d+:\d+\ufffd)/g,sy=/({\s*)(VAR_(PLURAL|SELECT)(_\d+)?)(\s*,)/g,Tl=/{([A-Z0-9_]+)}/g,WM=/\ufffdI18N_EXP_(ICU(_\d+)?)\ufffd/g,$M=/\/\*/,ob=/\d+\:(\d+)/;function ip(h,_,A=-1){const z=ia(),K=qi(),fe=to+h,Re=Jt(z.consts,_),lt=Tc();z.firstCreatePass&&HE(z,null===lt?0:lt.index,K,fe,Re,A);const vt=z.data[fe],r=uc(z,lt===K[Wn]?null:lt,K),u=lt&&8&lt.type?K[lt.index]:null;(function B1(h,_,A,z){const K=h[Pt];for(let fe=0;fe<_.length;fe++){const Re=_[fe++],lt=_[fe],vt=(Re&kh.COMMENT)===kh.COMMENT,b=(Re&kh.APPEND_EAGERLY)===kh.APPEND_EAGERLY,r=Re>>>kh.SHIFT;let u=h[r];null===u&&(u=h[r]=vt?K.createComment(lt):td(K,lt)),b&&null!==A&&vh(K,A,u,z,!1)}})(K,vt.create,r,u),Pc(!0)}function uh(){Pc(!1)}function Qb(h,_,A){ip(h,_,A),uh()}function F0(h,_){const A=ia(),z=Jt(A.consts,_);!function Ng(h,_,A){const K=Us().index,fe=[];if(h.firstCreatePass&&null===h.data[_]){for(let Re=0;Re<A.length;Re+=2){const lt=A[Re],vt=A[Re+1];if(""!==vt){if(Tv.test(vt))throw new Error(`ICU expressions are not supported in attributes. Message: "${vt}".`);cg(fe,vt,K,lt,xv(fe),null)}}h.data[_]=fe}}(A,h+to,z)}function jM(h){return function ID(h){h&&(iy|=1<<Math.min(ry,31)),ry++}(jm(qi(),ss(),h)),jM}function PD(h){!function lx(h,_,A){if(ry>0){const z=h.data[A];zE(h,_,Array.isArray(z)?z:z.update,Pl()-ry-1,iy)}iy=0,ry=0}(ia(),qi(),h+to)}function VE(h,_={}){return function Jb(h,_={}){let A=h;if(Du.test(h)){const z={},K=[Xm];A=A.replace(HC,(fe,Re,lt)=>{const vt=Re||lt,b=z[vt]||[];if(b.length||(vt.split("|").forEach(Te=>{const Ze=Te.match(ob),gt=Ze?parseInt(Ze[1],10):Xm,Ot=$M.test(Te);b.push([gt,Ot,Te])}),z[vt]=b),!b.length)throw new Error(`i18n postprocess: unmatched placeholder - ${vt}`);const r=K[K.length-1];let u=0;for(let Te=0;Te<b.length;Te++)if(b[Te][0]===r){u=Te;break}const[y,L,G]=b[u];return L?K.pop():r!==y&&K.push(y),b.splice(u,1),G})}return Object.keys(_).length&&(A=A.replace(sy,(z,K,fe,Re,lt,vt)=>_.hasOwnProperty(fe)?`${K}${_[fe]}${vt}`:z),A=A.replace(Tl,(z,K)=>_.hasOwnProperty(K)?_[K]:z),A=A.replace(WM,(z,K)=>{if(_.hasOwnProperty(K)){const fe=_[K];if(!fe.length)throw new Error(`i18n postprocess: unmatched ICU - ${z} with key: ${K}`);return fe.shift()}return z})),A}(h,_)}function cx(h,_,A,z,K){if(h=Y(h),Array.isArray(h))for(let fe=0;fe<h.length;fe++)cx(h[fe],_,A,z,K);else{const fe=ia(),Re=qi();let lt=pm(h)?h:Y(h.provide),vt=Gm(h);const b=Us(),r=1048575&b.providerIndexes,u=b.directiveStart,y=b.providerIndexes>>20;if(pm(h)||!h.multi){const L=new $i(vt,K,Xg),G=qb(lt,_,K?r:r+y,u);-1===G?(Ca(Fi(b,Re),fe,lt),KM(fe,h,_.length),_.push(lt),b.directiveStart++,b.directiveEnd++,K&&(b.providerIndexes+=1048576),A.push(L),Re.push(L)):(A[G]=L,Re[G]=L)}else{const L=qb(lt,_,r+y,u),G=qb(lt,_,r,r+y),Te=L>=0&&A[L],Ze=G>=0&&A[G];if(K&&!Ze||!K&&!Te){Ca(Fi(b,Re),fe,lt);const gt=function OD(h,_,A,z,K){const fe=new $i(h,A,Xg);return fe.multi=[],fe.index=_,fe.componentProviders=0,ZE(fe,K,z&&!A),fe}(K?JM:GE,A.length,K,z,vt);!K&&Ze&&(A[G].providerFactory=gt),KM(fe,h,_.length,0),_.push(lt),b.directiveStart++,b.directiveEnd++,K&&(b.providerIndexes+=1048576),A.push(gt),Re.push(gt)}else{KM(fe,h,L>-1?L:G,ZE(A[K?G:L],vt,!K&&z))}!K&&z&&Ze&&A[G].componentProviders++}}}function KM(h,_,A,z){const K=pm(_),fe=function Yd(h){return!!h.useClass}(_);if(K||fe){const vt=(fe?Y(_.useClass):_).prototype.ngOnDestroy;if(vt){const b=h.destroyHooks||(h.destroyHooks=[]);if(!K&&_.multi){const r=b.indexOf(A);-1===r?b.push(A,[z,vt]):b[r+1].push(z,vt)}else b.push(A,vt)}}}function ZE(h,_,A){return A&&h.componentProviders++,h.multi.push(_)-1}function qb(h,_,A,z){for(let K=A;K<z;K++)if(_[K]===h)return K;return-1}function GE(h,_,A,z){return W1(this.multi,[])}function JM(h,_,A,z){const K=this.multi;let fe;if(this.providerFactory){const Re=this.providerFactory.componentProviders,lt=q(A,A[Gn],this.providerFactory.index,z);fe=lt.slice(0,Re),W1(K,fe);for(let vt=Re;vt<lt.length;vt++)fe.push(lt[vt])}else fe=[],W1(K,fe);return fe}function W1(h,_){for(let A=0;A<h.length;A++){const z=h[A];_.push(z())}return _}function ux(h,_=[]){return A=>{A.providersResolver=(z,K)=>function G1(h,_,A){const z=ia();if(z.firstCreatePass){const K=ur(h);cx(A,z.data,z.blueprint,K,!0),cx(_,z.data,z.blueprint,K,!1)}}(z,K?K(h):h,_)}}class N0{}class QM{}function dx(h,_){return new mx(h,_??null)}class mx extends N0{constructor(_,A){super(),this._parent=A,this._bootstrapComponents=[],this.destroyCbs=[],this.componentFactoryResolver=new Fy(this);const z=ei(_);this._bootstrapComponents=_d(z.bootstrap),this._r3Injector=Qa(_,A,[{provide:N0,useValue:this},{provide:Mg,useValue:this.componentFactoryResolver}],n(_),new Set(["environment"])),this._r3Injector.resolveInjectorInitializers(),this.instance=this._r3Injector.get(_)}get injector(){return this._r3Injector}destroy(){const _=this._r3Injector;!_.destroyed&&_.destroy(),this.destroyCbs.forEach(A=>A()),this.destroyCbs=null}onDestroy(_){this.destroyCbs.push(_)}}class ly extends QM{constructor(_){super(),this.moduleType=_}create(_){return new mx(this.moduleType,_)}}class B0 extends N0{constructor(_,A,z){super(),this.componentFactoryResolver=new Fy(this),this.instance=null;const K=new xb([..._,{provide:N0,useValue:this},{provide:Mg,useValue:this.componentFactoryResolver}],A||Fc(),z,new Set(["environment"]));this.injector=K,K.resolveInjectorInitializers()}destroy(){this.injector.destroy()}onDestroy(_){this.injector.onDestroy(_)}}function $1(h,_,A=null){return new B0(h,_,A).injector}class WE{constructor(_){this._injector=_,this.cachedInjectors=new Map}getOrCreateStandaloneInjector(_){if(!_.standalone)return null;if(!this.cachedInjectors.has(_.id)){const A=bg(0,_.type),z=A.length>0?$1([A],this._injector,`Standalone[${_.type.name}]`):null;this.cachedInjectors.set(_.id,z)}return this.cachedInjectors.get(_.id)}ngOnDestroy(){try{for(const _ of this.cachedInjectors.values())null!==_&&_.destroy()}finally{this.cachedInjectors.clear()}}}function j1(h){h.getStandaloneInjector=_=>_.get(WE).getOrCreateStandaloneInjector(h)}function K1(h,_,A,z){return pr(()=>{const K=h;null!==_&&(K.hasOwnProperty("decorators")&&void 0!==K.decorators?K.decorators.push(..._):K.decorators=_),null!==A&&(K.ctorParameters=A),null!==z&&(K.hasOwnProperty("propDecorators")&&void 0!==K.propDecorators?K.propDecorators={...K.propDecorators,...z}:K.propDecorators=z)})}function hx(h,_,A){const z=Da()+h,K=qi();return K[z]===ml?gm(K,z,A?_.call(A):_()):th(K,z)}function gx(h,_,A,z){return a_(qi(),Da(),h,_,A,z)}function tT(h,_,A,z,K){return J1(qi(),Da(),h,_,A,z,K)}function _x(h,_,A,z,K,fe){return dh(qi(),Da(),h,_,A,z,K,fe)}function jE(h,_,A,z,K,fe,Re){return rT(qi(),Da(),h,_,A,z,K,fe,Re)}function LS(h,_,A,z,K,fe,Re,lt){const vt=Da()+h,b=qi(),r=ru(b,vt,A,z,K,fe);return jm(b,vt+4,Re)||r?gm(b,vt+5,lt?_.call(lt,A,z,K,fe,Re):_(A,z,K,fe,Re)):th(b,vt+5)}function nT(h,_,A,z,K,fe,Re,lt,vt){const b=Da()+h,r=qi(),u=ru(r,b,A,z,K,fe);return fv(r,b+4,Re,lt)||u?gm(r,b+6,vt?_.call(vt,A,z,K,fe,Re,lt):_(A,z,K,fe,Re,lt)):th(r,b+6)}function kS(h,_,A,z,K,fe,Re,lt,vt,b){const r=Da()+h,u=qi();let y=ru(u,r,A,z,K,fe);return E0(u,r+4,Re,lt,vt)||y?gm(u,r+7,b?_.call(b,A,z,K,fe,Re,lt,vt):_(A,z,K,fe,Re,lt,vt)):th(u,r+7)}function vx(h,_,A,z,K,fe,Re,lt,vt,b,r){const u=Da()+h,y=qi(),L=ru(y,u,A,z,K,fe);return ru(y,u+4,Re,lt,vt,b)||L?gm(y,u+8,r?_.call(r,A,z,K,fe,Re,lt,vt,b):_(A,z,K,fe,Re,lt,vt,b)):th(y,u+8)}function iT(h,_,A,z){return oT(qi(),Da(),h,_,A,z)}function U0(h,_){const A=h[_];return A===ml?void 0:A}function a_(h,_,A,z,K,fe){const Re=_+A;return jm(h,Re,K)?gm(h,Re+1,fe?z.call(fe,K):z(K)):U0(h,Re+1)}function J1(h,_,A,z,K,fe,Re){const lt=_+A;return fv(h,lt,K,fe)?gm(h,lt+2,Re?z.call(Re,K,fe):z(K,fe)):U0(h,lt+2)}function dh(h,_,A,z,K,fe,Re,lt){const vt=_+A;return E0(h,vt,K,fe,Re)?gm(h,vt+3,lt?z.call(lt,K,fe,Re):z(K,fe,Re)):U0(h,vt+3)}function rT(h,_,A,z,K,fe,Re,lt,vt){const b=_+A;return ru(h,b,K,fe,Re,lt)?gm(h,b+4,vt?z.call(vt,K,fe,Re,lt):z(K,fe,Re,lt)):U0(h,b+4)}function oT(h,_,A,z,K,fe){let Re=_+A,lt=!1;for(let vt=0;vt<K.length;vt++)jm(h,Re++,K[vt])&&(lt=!0);return lt?gm(h,Re,z.apply(fe,K)):U0(h,Re)}function ND(h,_){const A=ia();let z;const K=h+to;A.firstCreatePass?(z=function aT(h,_){if(_)for(let A=_.length-1;A>=0;A--){const z=_[A];if(h===z.name)return z}}(_,A.pipeRegistry),A.data[K]=z,z.onDestroy&&(A.destroyHooks??(A.destroyHooks=[])).push(K,z.onDestroy)):z=A.data[K];const fe=z.factory||(z.factory=Qr(z.type)),Re=je(Xg);try{const lt=zl(!1),vt=fe();return zl(lt),function Vy(h,_,A,z){A>=h.data.length&&(h.data[A]=null,h.blueprint[A]=null),_[A]=z}(A,qi(),K,vt),vt}finally{je(Re)}}function bx(h,_,A){const z=h+to,K=qi(),fe=Ao(K,z);return U_(K,z)?a_(K,Da(),_,fe.transform,A,fe):fe.transform(A)}function Q1(h,_,A,z){const K=h+to,fe=qi(),Re=Ao(fe,K);return U_(fe,K)?J1(fe,Da(),_,Re.transform,A,z,Re):Re.transform(A,z)}function Cx(h,_,A,z,K){const fe=h+to,Re=qi(),lt=Ao(Re,fe);return U_(Re,fe)?dh(Re,Da(),_,lt.transform,A,z,K,lt):lt.transform(A,z,K)}function sT(h,_,A,z,K,fe){const Re=h+to,lt=qi(),vt=Ao(lt,Re);return U_(lt,Re)?rT(lt,Da(),_,vt.transform,A,z,K,fe,vt):vt.transform(A,z,K,fe)}function Ex(h,_,A){const z=h+to,K=qi(),fe=Ao(K,z);return U_(K,z)?oT(K,Da(),_,fe.transform,A,fe):fe.transform.apply(fe,A)}function U_(h,_){return h[Gn].data[_].pure}WE.\u0275prov=ft({token:WE,providedIn:"environment",factory:()=>new WE(zr(gd))});class Dv extends o.x{constructor(_=!1){super(),this.__isAsync=_}emit(_){super.next(_)}subscribe(_,A,z){let K=_,fe=A||(()=>null),Re=z;if(_&&"object"==typeof _){const vt=_;K=vt.next?.bind(vt),fe=vt.error?.bind(vt),Re=vt.complete?.bind(vt)}this.__isAsync&&(fe=z0(fe),K&&(K=z0(K)),Re&&(Re=z0(Re)));const lt=super.subscribe({next:K,error:fe,complete:Re});return _ instanceof e.w0&&_.add(lt),lt}}function z0(h){return _=>{setTimeout(h,void 0,_)}}const sb=Dv;function Mx(){return this._results[Symbol.iterator]()}class KE{get changes(){return this._changes||(this._changes=new sb)}constructor(_=!1){this._emitDistinctChangesOnly=_,this.dirty=!0,this._results=[],this._changesDetected=!1,this._changes=null,this.length=0,this.first=void 0,this.last=void 0;const A=KE.prototype;A[Symbol.iterator]||(A[Symbol.iterator]=Mx)}get(_){return this._results[_]}map(_){return this._results.map(_)}filter(_){return this._results.filter(_)}find(_){return this._results.find(_)}reduce(_,A){return this._results.reduce(_,A)}forEach(_){this._results.forEach(_)}some(_){return this._results.some(_)}toArray(){return this._results.slice()}toString(){return this._results.toString()}reset(_,A){const z=this;z.dirty=!1;const K=Uu(_);(this._changesDetected=!function Lo(h,_,A){if(h.length!==_.length)return!1;for(let z=0;z<h.length;z++){let K=h[z],fe=_[z];if(A&&(K=A(K),fe=A(fe)),fe!==K)return!1}return!0}(z._results,K,A))&&(z._results=K,z.length=K.length,z.last=K[this.length-1],z.first=K[0])}notifyOnChanges(){this._changes&&(this._changesDetected||!this._emitDistinctChangesOnly)&&this._changes.emit(this)}setDirty(){this.dirty=!0}destroy(){this.changes.complete(),this.changes.unsubscribe()}}class Y0{}Y0.__NG_ELEMENT_ID__=function RS(){return lb(Us(),qi())};const BD=Y0,VC=class extends BD{constructor(_,A,z){super(),this._declarationLView=_,this._declarationTContainer=A,this.elementRef=z}createEmbeddedView(_,A){const z=this._declarationTContainer.tView,K=Py(this._declarationLView,z,_,16,null,z.declTNode,null,null,null,null,A||null),fe=this._declarationLView[this._declarationTContainer.index];K[_r]=fe;const Re=this._declarationLView[Yr];return null!==Re&&(K[Yr]=Re.createEmbeddedView(z)),Oy(z,K,_),new Lf(K)}};function lb(h,_){return 4&h.type?new VC(_,h,ov(h,_)):null}class cb{}cb.__NG_ELEMENT_ID__=function UD(){const h=Us();return xx(h,qi())};const Tx=cb,zD=class extends Tx{constructor(_,A,z){super(),this._lContainer=_,this._hostTNode=A,this._hostLView=z}get element(){return ov(this._hostTNode,this._hostLView)}get injector(){return new Ei(this._hostTNode,this._hostLView)}get parentInjector(){const _=oa(this._hostTNode,this._hostLView);if(Ks(_)){const A=Gs(_,this._hostLView),z=_l(_),K=A[Gn].data[z+8];return new Ei(K,A)}return new Ei(null,this._hostLView)}clear(){for(;this.length>0;)this.remove(this.length-1)}get(_){const A=vd(this._lContainer);return null!==A&&A[_]||null}get length(){return this._lContainer.length-gs}createEmbeddedView(_,A,z){let K,fe;"number"==typeof z?K=z:null!=z&&(K=z.index,fe=z.injector);const Re=_.createEmbeddedView(A||{},fe);return this.insert(Re,K),Re}createComponent(_,A,z,K,fe){const Re=_&&!Vc(_);let lt;if(Re)lt=A;else{const u=A||{};lt=u.index,z=u.injector,K=u.projectableNodes,fe=u.environmentInjector||u.ngModuleRef}const vt=Re?_:new Wv(Ci(_)),b=z||this.parentInjector;if(!fe&&null==vt.ngModule){const y=(Re?b:this.parentInjector).get(gd,null);y&&(fe=y)}const r=vt.create(b,K,void 0,fe);return this.insert(r.hostView,lt),r}insert(_,A){const z=_._lView,K=z[Gn];if(function ba(h){return ln(h[Cr])}(z)){const r=this.indexOf(_);if(-1!==r)this.detach(r);else{const u=z[Cr],y=new zD(u,u[Wn],u[Cr]);y.detach(y.indexOf(_))}}const fe=this._adjustIndex(A),Re=this._lContainer;Jd(K,z,Re,fe);const lt=M_(fe,Re),vt=z[Pt],b=Q_(vt,Re[Vs]);return null!==b&&function b_(h,_,A,z,K,fe){z[wn]=K,z[Wn]=_,fp(h,z,A,1,K,fe)}(K,Re[Wn],vt,z,b,lt),_.attachToViewContainerRef(),Ae(H0(Re),fe,_),_}move(_,A){return this.insert(_,A)}indexOf(_){const A=vd(this._lContainer);return null!==A?A.indexOf(_):-1}remove(_){const A=this._adjustIndex(_,-1),z=Cl(this._lContainer,A);z&&(Ge(H0(this._lContainer),A),Sa(z[Gn],z))}detach(_){const A=this._adjustIndex(_,-1),z=Cl(this._lContainer,A);return z&&null!=Ge(H0(this._lContainer),A)?new Lf(z):null}_adjustIndex(_,A=0){return _??this.length+A}};function vd(h){return h[ps]}function H0(h){return h[ps]||(h[ps]=[])}function xx(h,_){let A;const z=_[h.index];if(ln(z))A=z;else{let K;if(8&h.type)K=Mo(z);else{const fe=_[Pt];K=fe.createComment("");const Re=ho(h,_);vh(fe,Q_(fe,Re),K,function xd(h,_){return h.nextSibling(_)}(fe,Re),!1)}_[h.index]=A=mf(z,_,K,h),Ry(_,A)}return new zD(A,h,_)}class lT{constructor(_){this.queryList=_,this.matches=null}clone(){return new lT(this.queryList)}setDirty(){this.queryList.setDirty()}}class JE{constructor(_=[]){this.queries=_}createEmbeddedView(_){const A=_.queries;if(null!==A){const z=null!==_.contentQueries?_.contentQueries[0]:A.length,K=[];for(let fe=0;fe<z;fe++){const Re=A.getByIndex(fe),lt=this.queries[Re.indexInDeclarationView];K.push(lt.clone())}return new JE(K)}return null}insertView(_){this.dirtyQueriesWithMatches(_)}detachView(_){this.dirtyQueriesWithMatches(_)}dirtyQueriesWithMatches(_){for(let A=0;A<this.queries.length;A++)null!==vf(_,A).matches&&this.queries[A].setDirty()}}class cy{constructor(_,A,z=null){this.predicate=_,this.flags=A,this.read=z}}class QE{constructor(_=[]){this.queries=_}elementStart(_,A){for(let z=0;z<this.queries.length;z++)this.queries[z].elementStart(_,A)}elementEnd(_){for(let A=0;A<this.queries.length;A++)this.queries[A].elementEnd(_)}embeddedTView(_){let A=null;for(let z=0;z<this.length;z++){const K=null!==A?A.length:0,fe=this.getByIndex(z).embeddedTView(_,K);fe&&(fe.indexInDeclarationView=z,null!==A?A.push(fe):A=[fe])}return null!==A?new QE(A):null}template(_,A){for(let z=0;z<this.queries.length;z++)this.queries[z].template(_,A)}getByIndex(_){return this.queries[_]}get length(){return this.queries.length}track(_){this.queries.push(_)}}class ub{constructor(_,A=-1){this.metadata=_,this.matches=null,this.indexInDeclarationView=-1,this.crossesNgTemplate=!1,this._appliesToNextNode=!0,this._declarationNodeIndex=A}elementStart(_,A){this.isApplyingToNode(A)&&this.matchTNode(_,A)}elementEnd(_){this._declarationNodeIndex===_.index&&(this._appliesToNextNode=!1)}template(_,A){this.elementStart(_,A)}embeddedTView(_,A){return this.isApplyingToNode(_)?(this.crossesNgTemplate=!0,this.addMatch(-_.index,A),new ub(this.metadata)):null}isApplyingToNode(_){if(this._appliesToNextNode&&1!=(1&this.metadata.flags)){const A=this._declarationNodeIndex;let z=_.parent;for(;null!==z&&8&z.type&&z.index!==A;)z=z.parent;return A===(null!==z?z.index:-1)}return this._appliesToNextNode}matchTNode(_,A){const z=this.metadata.predicate;if(Array.isArray(z))for(let K=0;K<z.length;K++){const fe=z[K];this.matchTNodeWithReadOption(_,A,qE(A,fe)),this.matchTNodeWithReadOption(_,A,_t(A,_,fe,!1,!1))}else z===Y0?4&A.type&&this.matchTNodeWithReadOption(_,A,-1):this.matchTNodeWithReadOption(_,A,_t(A,_,z,!1,!1))}matchTNodeWithReadOption(_,A,z){if(null!==z){const K=this.metadata.read;if(null!==K)if(K===Wm||K===cb||K===Y0&&4&A.type)this.addMatch(A.index,-2);else{const fe=_t(A,_,K,!1,!1);null!==fe&&this.addMatch(A.index,fe)}else this.addMatch(A.index,z)}}addMatch(_,A){null===this.matches?this.matches=[_,A]:this.matches.push(_,A)}}function qE(h,_){const A=h.localNames;if(null!==A)for(let z=0;z<A.length;z+=2)if(A[z]===_)return A[z+1];return null}function NS(h,_,A,z){return-1===A?function FS(h,_){return 11&h.type?ov(h,_):4&h.type?lb(h,_):null}(_,h):-2===A?function BS(h,_,A){if(A===Wm)return ov(_,h);if(A===Y0)return lb(_,h);if(A===cb)return xx(_,h)}(h,_,z):q(h,h[Gn],A,_)}function ZC(h,_,A,z){const K=_[Yr].queries[z];if(null===K.matches){const fe=h.data,Re=A.matches,lt=[];for(let vt=0;vt<Re.length;vt+=2){const b=Re[vt];if(b<0)lt.push(null);else{const r=fe[b];lt.push(NS(_,r,Re[vt+1],A.metadata.read))}}K.matches=lt}return K.matches}function cT(h,_,A,z){const K=h.queries.getByIndex(A),fe=K.matches;if(null!==fe){const Re=ZC(h,_,K,A);for(let lt=0;lt<fe.length;lt+=2){const vt=fe[lt];if(vt>0)z.push(Re[lt/2]);else{const b=fe[lt+1],r=_[-vt];for(let u=gs;u<r.length;u++){const y=r[u];y[_r]===y[Cr]&&cT(y[Gn],y,b,z)}if(null!==r[ts]){const u=r[ts];for(let y=0;y<u.length;y++){const L=u[y];cT(L[Gn],L,b,z)}}}}}return z}function uT(h){const _=qi(),A=ia(),z=lu();ac(z+1);const K=vf(A,z);if(h.dirty&&function Ho(h){return 4==(4&h[xi])}(_)===(2==(2&K.metadata.flags))){if(null===K.matches)h.reset([]);else{const fe=K.crossesNgTemplate?cT(A,_,z,[]):ZC(A,_,K,z);h.reset(fe,Pm),h.notifyOnChanges()}return!0}return!1}function XE(h,_,A){const z=ia();z.firstCreatePass&&(q1(z,new cy(h,_,A),-1),2==(2&_)&&(z.staticViewQueries=!0)),YD(z,qi(),_)}function dT(h,_,A,z){const K=ia();if(K.firstCreatePass){const fe=Us();q1(K,new cy(_,A,z),fe.index),function KA(h,_){const A=h.contentQueries||(h.contentQueries=[]),z=A.length?A[A.length-1]:-1;_!==z&&A.push(h.queries.length-1,_)}(K,h),2==(2&A)&&(K.staticContentQueries=!0)}YD(K,qi(),A)}function uy(){return function Xb(h,_){return h[Yr].queries[_].queryList}(qi(),lu())}function YD(h,_,A){const z=new KE(4==(4&A));v0(h,_,z,z.destroy),null===_[Yr]&&(_[Yr]=new JE),_[Yr].queries.push(new lT(z))}function q1(h,_,A){null===h.queries&&(h.queries=new QE),h.queries.track(new ub(_,A))}function vf(h,_){return h.queries.getByIndex(_)}function dy(h,_){return lb(h,_)}const Ip={\u0275\u0275attribute:Nb,\u0275\u0275attributeInterpolate1:Hy,\u0275\u0275attributeInterpolate2:M0,\u0275\u0275attributeInterpolate3:i_,\u0275\u0275attributeInterpolate4:r_,\u0275\u0275attributeInterpolate5:Bb,\u0275\u0275attributeInterpolate6:wg,\u0275\u0275attributeInterpolate7:_m,\u0275\u0275attributeInterpolate8:nh,\u0275\u0275attributeInterpolateV:O_,\u0275\u0275defineComponent:lr,\u0275\u0275defineDirective:an,\u0275\u0275defineInjectable:ft,\u0275\u0275defineInjector:rn,\u0275\u0275defineNgModule:ea,\u0275\u0275definePipe:Zn,\u0275\u0275directiveInject:Xg,\u0275\u0275getInheritedFactory:En,\u0275\u0275inject:zr,\u0275\u0275injectAttribute:cs,\u0275\u0275invalidFactory:wb,\u0275\u0275invalidFactoryDep:Eo,\u0275\u0275templateRefExtractor:dy,\u0275\u0275resetView:su,\u0275\u0275HostDirectivesFeature:C1,\u0275\u0275NgOnChangesFeature:Ta,\u0275\u0275ProvidersFeature:ux,\u0275\u0275CopyDefinitionFeature:b1,\u0275\u0275InheritDefinitionFeature:wC,\u0275\u0275StandaloneFeature:j1,\u0275\u0275nextContext:zn,\u0275\u0275namespaceHTML:lp,\u0275\u0275namespaceMathML:Hc,\u0275\u0275namespaceSVG:xc,\u0275\u0275enableBindings:ya,\u0275\u0275disableBindings:Na,\u0275\u0275elementStart:Pg,\u0275\u0275elementEnd:L_,\u0275\u0275element:o_,\u0275\u0275elementContainerStart:Vd,\u0275\u0275elementContainerEnd:D0,\u0275\u0275elementContainer:gf,\u0275\u0275pureFunction0:hx,\u0275\u0275pureFunction1:gx,\u0275\u0275pureFunction2:tT,\u0275\u0275pureFunction3:_x,\u0275\u0275pureFunction4:jE,\u0275\u0275pureFunction5:LS,\u0275\u0275pureFunction6:nT,\u0275\u0275pureFunction7:kS,\u0275\u0275pureFunction8:vx,\u0275\u0275pureFunctionV:iT,\u0275\u0275getCurrentView:gv,\u0275\u0275restoreView:$o,\u0275\u0275listener:Qv,\u0275\u0275projection:br,\u0275\u0275syntheticHostProperty:I1,\u0275\u0275syntheticHostListener:U,\u0275\u0275pipeBind1:bx,\u0275\u0275pipeBind2:Q1,\u0275\u0275pipeBind3:Cx,\u0275\u0275pipeBind4:sT,\u0275\u0275pipeBindV:Ex,\u0275\u0275projectionDef:ji,\u0275\u0275hostProperty:Cv,\u0275\u0275property:Ub,\u0275\u0275propertyInterpolate:io,\u0275\u0275propertyInterpolate1:uo,\u0275\u0275propertyInterpolate2:Co,\u0275\u0275propertyInterpolate3:pa,\u0275\u0275propertyInterpolate4:Ea,\u0275\u0275propertyInterpolate5:xs,\u0275\u0275propertyInterpolate6:El,\u0275\u0275propertyInterpolate7:fs,\u0275\u0275propertyInterpolate8:Bs,\u0275\u0275propertyInterpolateV:Ys,\u0275\u0275pipe:ND,\u0275\u0275queryRefresh:uT,\u0275\u0275viewQuery:XE,\u0275\u0275loadQuery:uy,\u0275\u0275contentQuery:dT,\u0275\u0275reference:Zy,\u0275\u0275classMap:pc,\u0275\u0275classMapInterpolate1:Ky,\u0275\u0275classMapInterpolate2:x1,\u0275\u0275classMapInterpolate3:kE,\u0275\u0275classMapInterpolate4:rx,\u0275\u0275classMapInterpolate5:P0,\u0275\u0275classMapInterpolate6:ox,\u0275\u0275classMapInterpolate7:rt,\u0275\u0275classMapInterpolate8:ey,\u0275\u0275classMapInterpolateV:bv,\u0275\u0275styleMap:rh,\u0275\u0275styleMapInterpolate1:Vb,\u0275\u0275styleMapInterpolate2:D1,\u0275\u0275styleMapInterpolate3:RE,\u0275\u0275styleMapInterpolate4:zM,\u0275\u0275styleMapInterpolate5:Ru,\u0275\u0275styleMapInterpolate6:NC,\u0275\u0275styleMapInterpolate7:S1,\u0275\u0275styleMapInterpolate8:Jy,\u0275\u0275styleMapInterpolateV:Qy,\u0275\u0275styleProp:R_,\u0275\u0275stylePropInterpolate1:A1,\u0275\u0275stylePropInterpolate2:qy,\u0275\u0275stylePropInterpolate3:Zb,\u0275\u0275stylePropInterpolate4:Xy,\u0275\u0275stylePropInterpolate5:ty,\u0275\u0275stylePropInterpolate6:tp,\u0275\u0275stylePropInterpolate7:kg,\u0275\u0275stylePropInterpolate8:Rg,\u0275\u0275stylePropInterpolateV:w1,\u0275\u0275classProp:A0,\u0275\u0275advance:pf,\u0275\u0275template:T0,\u0275\u0275text:UM,\u0275\u0275textInterpolate:Io,\u0275\u0275textInterpolate1:Zu,\u0275\u0275textInterpolate2:lg,\u0275\u0275textInterpolate3:Od,\u0275\u0275textInterpolate4:Lh,\u0275\u0275textInterpolate5:OE,\u0275\u0275textInterpolate6:I0,\u0275\u0275textInterpolate7:Xv,\u0275\u0275textInterpolate8:T1,\u0275\u0275textInterpolateV:LE,\u0275\u0275i18n:Qb,\u0275\u0275i18nAttributes:F0,\u0275\u0275i18nExp:jM,\u0275\u0275i18nStart:ip,\u0275\u0275i18nEnd:uh,\u0275\u0275i18nApply:PD,\u0275\u0275i18nPostprocess:VE,\u0275\u0275resolveWindow:wf,\u0275\u0275resolveDocument:Qg,\u0275\u0275resolveBody:Np,\u0275\u0275setComponentScope:mo,\u0275\u0275setNgModuleScope:Bo,\u0275\u0275registerNgModuleType:pu,\u0275\u0275sanitizeHtml:Kg,\u0275\u0275sanitizeStyle:Qc,\u0275\u0275sanitizeResourceUrl:wc,\u0275\u0275sanitizeScript:Ep,\u0275\u0275sanitizeUrl:Zh,\u0275\u0275sanitizeUrlOrResourceUrl:dm,\u0275\u0275trustConstantHtml:Gh,\u0275\u0275trustConstantResourceUrl:qp,\u0275\u0275validateIframeAttribute:$p,forwardRef:B,resolveForwardRef:Y};let GC=null;function py(h){return void 0!==h.ngModule}function pT(h){return!!ei(h)}const eM=[];let my=!1;function X1(h){return Array.isArray(h)?h.every(X1):!!Y(h)}function HD(h,_={}){(function ys(h,_,A=!1){const z=Uu(_.declarations||ai);let K=null;Object.defineProperty(h,we,{configurable:!0,get:()=>(null===K&&(K=ws().compileNgModule(Ip,`ng:///${h.name}/\u0275mod.js`,{type:h,bootstrap:Uu(_.bootstrap||ai).map(Y),declarations:z.map(Y),imports:Uu(_.imports||ai).map(Y).map(fy),exports:Uu(_.exports||ai).map(Y).map(fy),schemas:_.schemas?Uu(_.schemas):null,id:_.id||null}),K.schemas||(K.schemas=[])),K)});let fe=null;Object.defineProperty(h,Qe,{get:()=>{if(null===fe){const lt=ws();fe=lt.compileFactory(Ip,`ng:///${h.name}/\u0275fac.js`,{name:h.name,type:h,deps:Yp(h),target:lt.FactoryTarget.NgModule,typeArgumentCount:0})}return fe},configurable:!1});let Re=null;Object.defineProperty(h,Gi,{get:()=>{if(null===Re){const lt={name:h.name,type:h,providers:_.providers||ai,imports:[(_.imports||ai).map(Y),(_.exports||ai).map(Y)]};Re=ws().compileInjector(Ip,`ng:///${h.name}/\u0275inj.js`,lt)}return Re},configurable:!1})})(h,_),void 0!==_.id&&pu(h,_.id),function ef(h,_){eM.push({moduleType:h,ngModule:_})}(h,_)}function mT(h,_){const A=Uu(_.declarations||ai),z=ka(h);A.forEach(K=>{if((K=Y(K)).hasOwnProperty(hn)){Gu(Ci(K),z)}else!K.hasOwnProperty(Le)&&!K.hasOwnProperty(ce)&&(K.ngSelectorScope=h)})}function Gu(h,_){h.directiveDefs=()=>Array.from(_.compilation.directives).map(A=>A.hasOwnProperty(hn)?Ci(A):Xn(A)).filter(A=>!!A),h.pipeDefs=()=>Array.from(_.compilation.pipes).map(A=>Et(A)),h.schemas=_.schemas,h.tView=null}function ka(h){if(pT(h))return function iM(h){const _=ei(h,!0);if(null!==_.transitiveCompileScopes)return _.transitiveCompileScopes;const A={schemas:_.schemas||null,compilation:{directives:new Set,pipes:new Set},exported:{directives:new Set,pipes:new Set}};return _d(_.imports).forEach(z=>{const K=ka(z);K.exported.directives.forEach(fe=>A.compilation.directives.add(fe)),K.exported.pipes.forEach(fe=>A.compilation.pipes.add(fe))}),_d(_.declarations).forEach(z=>{Et(z)?A.compilation.pipes.add(z):A.compilation.directives.add(z)}),_d(_.exports).forEach(z=>{const K=z;if(pT(K)){const fe=ka(K);fe.exported.directives.forEach(Re=>{A.compilation.directives.add(Re),A.exported.directives.add(Re)}),fe.exported.pipes.forEach(Re=>{A.compilation.pipes.add(Re),A.exported.pipes.add(Re)})}else Et(K)?A.exported.pipes.add(K):A.exported.directives.add(K)}),_.transitiveCompileScopes=A,A}(h);if(gn(h)){if(null!==(Ci(h)||Xn(h)))return{schemas:null,compilation:{directives:new Set,pipes:new Set},exported:{directives:new Set([h]),pipes:new Set}};if(null!==Et(h))return{schemas:null,compilation:{directives:new Set,pipes:new Set},exported:{directives:new Set,pipes:new Set([h])}}}throw new Error(`${h.name} does not have a module def (\u0275mod property)`)}function fy(h){return py(h)?h.ngModule:h}let G0=0;function ug(h,_){let A=null;(function Ti(h,_){Kc(_)&&(yl.set(h,_),dl.add(h))})(h,_),rM(h,_),Object.defineProperty(h,hn,{get:()=>{if(null===A){const z=ws();if(Kc(_)){const b=[`Component '${h.name}' is not resolved:`];throw _.templateUrl&&b.push(` - templateUrl: ${_.templateUrl}`),_.styleUrls&&_.styleUrls.length&&b.push(` - styleUrls: ${JSON.stringify(_.styleUrls)}`),b.push("Did you run and wait for 'resolveComponentResources()'?"),new Error(b.join("\n"))}const K=function nl(){return GC}();let fe=_.preserveWhitespaces;void 0===fe&&(fe=null!==K&&void 0!==K.preserveWhitespaces&&K.preserveWhitespaces);let Re=_.encapsulation;void 0===Re&&(Re=null!==K&&void 0!==K.defaultEncapsulation?K.defaultEncapsulation:Pn.Emulated);const lt=_.templateUrl||`ng:///${h.name}/template.html`,vt={...s_(h,_),typeSourceSpan:z.createParseSourceSpan("Component",h.name,lt),template:_.template||"",preserveWhitespaces:fe,styles:_.styles||ai,animations:_.animations,declarations:[],changeDetection:_.changeDetection,encapsulation:Re,interpolation:_.interpolation,viewProviders:_.viewProviders||null};G0++;try{if(vt.usesInheritance&&Ax(h),A=z.compileComponent(Ip,lt,vt),_.standalone){const b=Uu(_.imports||ai),{directiveDefs:r,pipeDefs:u}=function Bg(h,_){let A=null,z=null;return{directiveDefs:()=>{if(null===A){A=[Ci(h)];const Re=new Set;for(const lt of _){const vt=Y(lt);if(!Re.has(vt))if(Re.add(vt),ei(vt)){const b=ka(vt);for(const r of b.exported.directives){const u=Ci(r)||Xn(r);u&&!Re.has(r)&&(Re.add(r),A.push(u))}}else{const b=Ci(vt)||Xn(vt);b&&A.push(b)}}}return A},pipeDefs:()=>{if(null===z){z=[];const Re=new Set;for(const lt of _){const vt=Y(lt);if(!Re.has(vt))if(Re.add(vt),ei(vt)){const b=ka(vt);for(const r of b.exported.pipes){const u=Et(r);u&&!Re.has(r)&&(Re.add(r),z.push(u))}}else{const b=Et(vt);b&&z.push(b)}}}return z}}}(h,b);A.directiveDefs=r,A.pipeDefs=u,A.dependencies=()=>b.map(Y)}}finally{G0--}if(0===G0&&function db(){if(!my){my=!0;try{for(let h=eM.length-1;h>=0;h--){const{moduleType:_,ngModule:A}=eM[h];A.declarations&&A.declarations.every(X1)&&(eM.splice(h,1),mT(_,A))}}finally{my=!1}}}(),function VD(h){return void 0!==h.ngSelectorScope}(h)){const b=ka(h.ngSelectorScope);Gu(A,b)}if(_.schemas){if(!_.standalone)throw new Error(`The 'schemas' was specified for the ${ge(h)} but is only valid on a component that is standalone.`);A.schemas=_.schemas}else _.standalone&&(A.schemas=[])}return A},configurable:!1})}function pb(h,_){let A=null;rM(h,_||{}),Object.defineProperty(h,Le,{get:()=>{if(null===A){const z=ZD(h,_||{});A=ws().compileDirective(Ip,z.sourceMapUrl,z.metadata)}return A},configurable:!1})}function ZD(h,_){const A=h&&h.name,z=`ng:///${A}/\u0275dir.js`,K=ws(),fe=s_(h,_);return fe.typeSourceSpan=K.createParseSourceSpan("Directive",A,z),fe.usesInheritance&&Ax(h),{metadata:fe,sourceMapUrl:z}}function rM(h,_){let A=null;Object.defineProperty(h,Qe,{get:()=>{if(null===A){const z=ZD(h,_),K=ws();A=K.compileFactory(Ip,`ng:///${h.name}/\u0275fac.js`,{name:z.metadata.name,type:z.metadata.type,typeArgumentCount:0,deps:Yp(h),target:K.FactoryTarget.Directive})}return A},configurable:!1})}function fT(h){return Object.getPrototypeOf(h.prototype)===Object.prototype}function s_(h,_){const A=mc(),z=A.ownPropMetadata(h);return{name:h.name,type:h,selector:void 0!==_.selector?_.selector:null,host:_.host||Nt,propMetadata:z,inputs:_.inputs||ai,outputs:_.outputs||ai,queries:hT(h,z,fl),lifecycle:{usesOnChanges:A.hasLifecycleHook(h,"ngOnChanges")},typeSourceSpan:null,usesInheritance:!fT(h),exportAs:gT(_.exportAs),providers:_.providers||null,viewQueries:hT(h,z,_T),isStandalone:!!_.standalone,hostDirectives:_.hostDirectives?.map(K=>"function"==typeof K?{directive:K}:K)||null}}function Ax(h){const _=Object.prototype;let A=Object.getPrototypeOf(h.prototype).constructor;for(;A&&A!==_;)!Xn(A)&&!Ci(A)&&Ix(A)&&pb(A,null),A=Object.getPrototypeOf(A)}function wx(h){return"string"==typeof h?$C(h):Y(h)}function GD(h,_){return{propertyName:h,predicate:wx(_.selector),descendants:_.descendants,first:_.first,read:_.read?_.read:null,static:!!_.static,emitDistinctChangesOnly:!!_.emitDistinctChangesOnly}}function hT(h,_,A){const z=[];for(const K in _)if(_.hasOwnProperty(K)){const fe=_[K];fe.forEach(Re=>{if(A(Re)){if(!Re.selector)throw new Error(`Can't construct a query for the property "${K}" of "${ge(h)}" since the query selector wasn't defined.`);if(fe.some(oM))throw new Error("Cannot combine @Input decorators with query decorators");z.push(GD(K,Re))}})}return z}function gT(h){return void 0===h?null:$C(h)}function fl(h){const _=h.ngMetadataName;return"ContentChild"===_||"ContentChildren"===_}function _T(h){const _=h.ngMetadataName;return"ViewChild"===_||"ViewChildren"===_}function oM(h){return"Input"===h.ngMetadataName}function $C(h){return h.split(",").map(_=>_.trim())}const vT=["ngOnChanges","ngOnInit","ngOnDestroy","ngDoCheck","ngAfterViewInit","ngAfterViewChecked","ngAfterContentInit","ngAfterContentChecked"];function Ix(h){const _=mc();if(vT.some(z=>_.hasLifecycleHook(h,z)))return!0;const A=_.propMetadata(h);for(const z in A){const K=A[z];for(let fe=0;fe<K.length;fe++){const Re=K[fe],lt=Re.ngMetadataName;if(oM(Re)||fl(Re)||_T(Re)||"Output"===lt||"HostBinding"===lt||"HostListener"===lt)return!0}}return!1}function aM(h,_){return{type:h,name:h.name,pipeName:_.name,pure:void 0===_.pure||_.pure,isStandalone:!!_.standalone}}const yT=Cu("Directive",(h={})=>h,void 0,void 0,(h,_)=>pb(h,_)),bT=Cu("Component",(h={})=>({changeDetection:Sn.Default,...h}),yT,void 0,(h,_)=>ug(h,_)),US=Cu("Pipe",h=>({pure:!0,...h}),void 0,void 0,(h,_)=>function W0(h,_){let A=null,z=null;Object.defineProperty(h,Qe,{get:()=>{if(null===z){const K=aM(h,_),fe=ws(K.type);z=fe.compileFactory(Ip,`ng:///${K.name}/\u0275fac.js`,{name:K.name,type:K.type,typeArgumentCount:0,deps:Yp(h),target:fe.FactoryTarget.Pipe})}return z},configurable:!1}),Object.defineProperty(h,ce,{get:()=>{if(null===A){const K=aM(h,_);A=ws(K.type).compilePipe(Ip,`ng:///${K.name}/\u0275pipe.js`,K)}return A},configurable:!1})}(h,_)),sM=Bu("Input",h=>({bindingPropertyName:h})),CT=Bu("Output",h=>({bindingPropertyName:h})),$0=Bu("HostBinding",h=>({hostPropertyName:h})),ET=Bu("HostListener",(h,_)=>({eventName:h,args:_})),zS=Cu("NgModule",h=>h,void 0,void 0,(h,_)=>HD(h,_));function lM(...h){}const cM=new vc("Application Initializer");class e0{constructor(_){this.appInits=_,this.resolve=lM,this.reject=lM,this.initialized=!1,this.done=!1,this.donePromise=new Promise((A,z)=>{this.resolve=A,this.reject=z})}runInitializers(){if(this.initialized)return;const _=[],A=()=>{this.done=!0,this.resolve()};if(this.appInits)for(let z=0;z<this.appInits.length;z++){const K=this.appInits[z]();if(kf(K))_.push(K);else if(_v(K)){const fe=new Promise((Re,lt)=>{K.subscribe({complete:Re,error:lt})});_.push(fe)}}Promise.all(_).then(()=>{A()}).catch(z=>{this.reject(z)}),0===_.length&&A(),this.initialized=!0}}e0.\u0275fac=function(_){return new(_||e0)(zr(cM,8))},e0.\u0275prov=ft({token:e0,factory:e0.\u0275fac,providedIn:"root"});const WD=new vc("AppId",{providedIn:"root",factory:eE});function eE(){return`${MT()}${MT()}${MT()}`}function MT(){return String.fromCharCode(97+Math.floor(25*Math.random()))}const Px=new vc("Platform Initializer"),j0=new vc("Platform ID",{providedIn:"platform",factory:()=>"unknown"}),K0=(new vc("Application Packages Root URL"),new vc("AnimationModuleType"));class tE{log(_){console.log(_)}warn(_){console.warn(_)}}tE.\u0275fac=function(_){return new(_||tE)},tE.\u0275prov=ft({token:tE,factory:tE.\u0275fac,providedIn:"platform"});const uM=new vc("LocaleId",{providedIn:"root",factory:()=>mr(uM,Bn.Optional|Bn.SkipSelf)||function Lx(){return typeof $localize<"u"&&$localize.locale||ny}()}),jC=new vc("DefaultCurrencyCode",{providedIn:"root",factory:()=>"USD"});new vc("Translations"),new vc("TranslationsFormat");var dM;!function(h){h[h.Error=0]="Error",h[h.Warning=1]="Warning",h[h.Ignore=2]="Ignore"}(dM||(dM={}));class $D{constructor(_,A){this.ngModuleFactory=_,this.componentFactories=A}}class hy{compileModuleSync(_){return new ly(_)}compileModuleAsync(_){return Promise.resolve(this.compileModuleSync(_))}compileModuleAndAllComponentsSync(_){const A=this.compileModuleSync(_),K=_d(ei(_).declarations).reduce((fe,Re)=>{const lt=Ci(Re);return lt&&fe.push(new Wv(lt)),fe},[]);return new $D(A,K)}compileModuleAndAllComponentsAsync(_){return Promise.resolve(this.compileModuleAndAllComponentsSync(_))}clearCache(){}clearCacheFor(_){}getModuleId(_){}}hy.\u0275fac=function(_){return new(_||hy)},hy.\u0275prov=ft({token:hy,factory:hy.\u0275fac,providedIn:"root"});new vc("compilerOptions");const mM=Promise.resolve(0);function fM(h){typeof Zone>"u"?mM.then(()=>{h&&h.apply(null,null)}):Zone.current.scheduleMicroTask("scheduleMicrotask",h)}class Ug{constructor({enableLongStackTrace:_=!1,shouldCoalesceEventChangeDetection:A=!1,shouldCoalesceRunChangeDetection:z=!1}){if(this.hasPendingMacrotasks=!1,this.hasPendingMicrotasks=!1,this.isStable=!0,this.onUnstable=new sb(!1),this.onMicrotaskEmpty=new sb(!1),this.onStable=new sb(!1),this.onError=new sb(!1),typeof Zone>"u")throw new X(908,!1);Zone.assertZonePatched();const K=this;K._nesting=0,K._outer=K._inner=Zone.current,Zone.TaskTrackingZoneSpec&&(K._inner=K._inner.fork(new Zone.TaskTrackingZoneSpec)),_&&Zone.longStackTraceZoneSpec&&(K._inner=K._inner.fork(Zone.longStackTraceZoneSpec)),K.shouldCoalesceEventChangeDetection=!z&&A,K.shouldCoalesceRunChangeDetection=z,K.lastRequestAnimationFrameId=-1,K.nativeRequestAnimationFrame=function xT(){let h=Fn.requestAnimationFrame,_=Fn.cancelAnimationFrame;if(typeof Zone<"u"&&h&&_){const A=h[Zone.__symbol__("OriginalDelegate")];A&&(h=A);const z=_[Zone.__symbol__("OriginalDelegate")];z&&(_=z)}return{nativeRequestAnimationFrame:h,nativeCancelAnimationFrame:_}}().nativeRequestAnimationFrame,function gy(h){const _=()=>{!function nE(h){h.isCheckStableRunning||-1!==h.lastRequestAnimationFrameId||(h.lastRequestAnimationFrameId=h.nativeRequestAnimationFrame.call(Fn,()=>{h.fakeTopEventTask||(h.fakeTopEventTask=Zone.root.scheduleEventTask("fakeTopEventTask",()=>{h.lastRequestAnimationFrameId=-1,mb(h),h.isCheckStableRunning=!0,J0(h),h.isCheckStableRunning=!1},void 0,()=>{},()=>{})),h.fakeTopEventTask.invoke()}),mb(h))}(h)};h._inner=h._inner.fork({name:"angular",properties:{isAngularZone:!0},onInvokeTask:(A,z,K,fe,Re,lt)=>{try{return hM(h),A.invokeTask(K,fe,Re,lt)}finally{(h.shouldCoalesceEventChangeDetection&&"eventTask"===fe.type||h.shouldCoalesceRunChangeDetection)&&_(),ST(h)}},onInvoke:(A,z,K,fe,Re,lt,vt)=>{try{return hM(h),A.invoke(K,fe,Re,lt,vt)}finally{h.shouldCoalesceRunChangeDetection&&_(),ST(h)}},onHasTask:(A,z,K,fe)=>{A.hasTask(K,fe),z===K&&("microTask"==fe.change?(h._hasPendingMicrotasks=fe.microTask,mb(h),J0(h)):"macroTask"==fe.change&&(h.hasPendingMacrotasks=fe.macroTask))},onHandleError:(A,z,K,fe)=>(A.handleError(K,fe),h.runOutsideAngular(()=>h.onError.emit(fe)),!1)})}(K)}static isInAngularZone(){return typeof Zone<"u"&&!0===Zone.current.get("isAngularZone")}static assertInAngularZone(){if(!Ug.isInAngularZone())throw new X(909,!1)}static assertNotInAngularZone(){if(Ug.isInAngularZone())throw new X(909,!1)}run(_,A,z){return this._inner.run(_,A,z)}runTask(_,A,z,K){const fe=this._inner,Re=fe.scheduleEventTask("NgZoneEvent: "+K,_,DT,lM,lM);try{return fe.runTask(Re,A,z)}finally{fe.cancelTask(Re)}}runGuarded(_,A,z){return this._inner.runGuarded(_,A,z)}runOutsideAngular(_){return this._outer.run(_)}}const DT={};function J0(h){if(0==h._nesting&&!h.hasPendingMicrotasks&&!h.isStable)try{h._nesting++,h.onMicrotaskEmpty.emit(null)}finally{if(h._nesting--,!h.hasPendingMicrotasks)try{h.runOutsideAngular(()=>h.onStable.emit(null))}finally{h.isStable=!0}}}function mb(h){h._hasPendingMicrotasks||(h.shouldCoalesceEventChangeDetection||h.shouldCoalesceRunChangeDetection)&&-1!==h.lastRequestAnimationFrameId?h.hasPendingMicrotasks=!0:h.hasPendingMicrotasks=!1}function hM(h){h._nesting++,h.isStable&&(h.isStable=!1,h.onUnstable.emit(null))}function ST(h){h._nesting--,J0(h)}class kx{constructor(){this.hasPendingMicrotasks=!1,this.hasPendingMacrotasks=!1,this.isStable=!0,this.onUnstable=new sb,this.onMicrotaskEmpty=new sb,this.onStable=new sb,this.onError=new sb}run(_,A,z){return _.apply(A,z)}runGuarded(_,A,z){return _.apply(A,z)}runOutsideAngular(_){return _()}runTask(_,A,z,K){return _.apply(A,z)}}const AT=new vc(""),iE=new vc("");class rE{constructor(_,A,z){this._ngZone=_,this.registry=A,this._pendingCount=0,this._isZoneStable=!0,this._didWork=!1,this._callbacks=[],this.taskTrackingZone=null,Nf||(function HS(h){Nf=h}(z),z.addToWindow(A)),this._watchAngularEvents(),_.run(()=>{this.taskTrackingZone=typeof Zone>"u"?null:Zone.current.get("TaskTrackingZone")})}_watchAngularEvents(){this._ngZone.onUnstable.subscribe({next:()=>{this._didWork=!0,this._isZoneStable=!1}}),this._ngZone.runOutsideAngular(()=>{this._ngZone.onStable.subscribe({next:()=>{Ug.assertNotInAngularZone(),fM(()=>{this._isZoneStable=!0,this._runCallbacksIfReady()})}})})}increasePendingRequestCount(){return this._pendingCount+=1,this._didWork=!0,this._pendingCount}decreasePendingRequestCount(){if(this._pendingCount-=1,this._pendingCount<0)throw new Error("pending async requests below zero");return this._runCallbacksIfReady(),this._pendingCount}isStable(){return this._isZoneStable&&0===this._pendingCount&&!this._ngZone.hasPendingMacrotasks}_runCallbacksIfReady(){if(this.isStable())fM(()=>{for(;0!==this._callbacks.length;){let _=this._callbacks.pop();clearTimeout(_.timeoutId),_.doneCb(this._didWork)}this._didWork=!1});else{let _=this.getPendingTasks();this._callbacks=this._callbacks.filter(A=>!A.updateCb||!A.updateCb(_)||(clearTimeout(A.timeoutId),!1)),this._didWork=!0}}getPendingTasks(){return this.taskTrackingZone?this.taskTrackingZone.macroTasks.map(_=>({source:_.source,creationLocation:_.creationLocation,data:_.data})):[]}addCallback(_,A,z){let K=-1;A&&A>0&&(K=setTimeout(()=>{this._callbacks=this._callbacks.filter(fe=>fe.timeoutId!==K),_(this._didWork,this.getPendingTasks())},A)),this._callbacks.push({doneCb:_,timeoutId:K,updateCb:z})}whenStable(_,A,z){if(z&&!this.taskTrackingZone)throw new Error('Task tracking zone is required when passing an update callback to whenStable(). Is "zone.js/plugins/task-tracking" loaded?');this.addCallback(_,A,z),this._runCallbacksIfReady()}getPendingRequestCount(){return this._pendingCount}registerApplication(_){this.registry.registerApplication(_,this)}unregisterApplication(_){this.registry.unregisterApplication(_)}findProviders(_,A,z){return[]}}rE.\u0275fac=function(_){return new(_||rE)(zr(Ug),zr(c_),zr(iE))},rE.\u0275prov=ft({token:rE,factory:rE.\u0275fac});class c_{constructor(){this._applications=new Map}registerApplication(_,A){this._applications.set(_,A)}unregisterApplication(_){this._applications.delete(_)}unregisterAllApplications(){this._applications.clear()}getTestability(_){return this._applications.get(_)||null}getAllTestabilities(){return Array.from(this._applications.values())}getAllRootElements(){return Array.from(this._applications.keys())}findTestabilityInTree(_,A=!0){return Nf?.findTestabilityInTree(this,_,A)??null}}let Nf;c_.\u0275fac=function(_){return new(_||c_)},c_.\u0275prov=ft({token:c_,factory:c_.\u0275fac,providedIn:"platform"});const wl=!1;let Bf=null;const wT=new vc("AllowMultipleToken"),IT=new vc("PlatformDestroyListeners"),n0=new vc("appBootstrapListener");class ZS{constructor(_,A){this.name=_,this.token=A}}function oE(h){const _=h.get(Px,null);_&&_.forEach(A=>A())}function KD(h,_,A=[]){const z=`Platform: ${_}`,K=new vc(z);return(fe=[])=>{let Re=_M();if(!Re||Re.injector.get(wT,!1)){const lt=[...A,...fe,{provide:K,useValue:!0}];h?h(lt):function GS(h){if(Bf&&!Bf.get(wT,!1))throw new X(400,!1);Bf=h;const _=h.get(i0);return oE(h),_}(OT(lt,z))}return function gM(h){const _=_M();if(!_)throw new X(401,!1);return _}()}}function OT(h=[],_){return ec.create({name:_,providers:[{provide:Ya,useValue:"platform"},{provide:IT,useValue:new Set([()=>Bf=null])},...h]})}function _M(){return Bf?.get(i0)??null}class i0{constructor(_){this._injector=_,this._modules=[],this._destroyListeners=[],this._destroyed=!1}bootstrapModuleFactory(_,A){const z=Nx(A?.ngZone,Fx(A)),K=[{provide:Ug,useValue:z}];return z.run(()=>{const fe=ec.create({providers:K,parent:this.injector,name:_.moduleType.name}),Re=_.create(fe),lt=Re.injector.get(Th,null);if(!lt)throw new X(402,!1);return z.runOutsideAngular(()=>{const vt=z.onError.subscribe({next:b=>{lt.handleError(b)}});Re.onDestroy(()=>{Bx(this._modules,Re),vt.unsubscribe()})}),WS(lt,z,()=>{const vt=Re.injector.get(e0);return vt.runInitializers(),vt.donePromise.then(()=>(R1(Re.injector.get(uM,ny)||ny),this._moduleDoBootstrap(Re),Re))})})}bootstrapModule(_,A=[]){const z=JD({},A);return function PT(h,_,A){const z=new ly(A);return Promise.resolve(z)}(this.injector,0,_).then(K=>this.bootstrapModuleFactory(K,z))}_moduleDoBootstrap(_){const A=_.injector.get(Q0);if(_._bootstrapComponents.length>0)_._bootstrapComponents.forEach(z=>A.bootstrap(z));else{if(!_.instance.ngDoBootstrap)throw new X(-403,!1);_.instance.ngDoBootstrap(A)}this._modules.push(_)}onDestroy(_){this._destroyListeners.push(_)}get injector(){return this._injector}destroy(){if(this._destroyed)throw new X(404,!1);this._modules.slice().forEach(A=>A.destroy()),this._destroyListeners.forEach(A=>A());const _=this._injector.get(IT,null);_&&(_.forEach(A=>A()),_.clear()),this._destroyed=!0}get destroyed(){return this._destroyed}}function Fx(h){return{enableLongStackTrace:!1,shouldCoalesceEventChangeDetection:!(!h||!h.ngZoneEventCoalescing)||!1,shouldCoalesceRunChangeDetection:!(!h||!h.ngZoneRunCoalescing)||!1}}function Nx(h,_){let A;return A="noop"===h?new kx:("zone.js"===h?void 0:h)||new Ug(_),A}function WS(h,_,A){try{const z=A();return kf(z)?z.catch(K=>{throw _.runOutsideAngular(()=>h.handleError(K)),K}):z}catch(z){throw _.runOutsideAngular(()=>h.handleError(z)),z}}function JD(h,_){return h=Array.isArray(_)?_.reduce(JD,h):{...h,..._}}i0.\u0275fac=function(_){return new(_||i0)(zr(ec))},i0.\u0275prov=ft({token:i0,factory:i0.\u0275fac,providedIn:"platform"});class Q0{get destroyed(){return this._destroyed}get injector(){return this._injector}constructor(_,A,z){this._zone=_,this._injector=A,this._exceptionHandler=z,this._bootstrapListeners=[],this._views=[],this._runningTick=!1,this._stable=!0,this._destroyed=!1,this._destroyListeners=[],this.componentTypes=[],this.components=[],this._onMicrotaskEmptySubscription=this._zone.onMicrotaskEmpty.subscribe({next:()=>{this._zone.run(()=>{this.tick()})}});const K=new l.y(Re=>{this._stable=this._zone.isStable&&!this._zone.hasPendingMacrotasks&&!this._zone.hasPendingMicrotasks,this._zone.runOutsideAngular(()=>{Re.next(this._stable),Re.complete()})}),fe=new l.y(Re=>{let lt;this._zone.runOutsideAngular(()=>{lt=this._zone.onStable.subscribe(()=>{Ug.assertNotInAngularZone(),fM(()=>{!this._stable&&!this._zone.hasPendingMacrotasks&&!this._zone.hasPendingMicrotasks&&(this._stable=!0,Re.next(!0))})})});const vt=this._zone.onUnstable.subscribe(()=>{Ug.assertInAngularZone(),this._stable&&(this._stable=!1,this._zone.runOutsideAngular(()=>{Re.next(!1)}))});return()=>{lt.unsubscribe(),vt.unsubscribe()}});this.isStable=(0,D.T)(K,fe.pipe((0,g.B)()))}bootstrap(_,A){wl&&this.warnIfDestroyed();const z=_ instanceof nd;if(!this._injector.get(e0).done){const y="Cannot bootstrap as there are still asynchronous initializers running."+(!z&&gn(_)?"":" Bootstrap components in the `ngDoBootstrap` method of the root module.");throw new X(405,wl&&y)}let fe;fe=z?_:this._injector.get(Mg).resolveComponentFactory(_),this.componentTypes.push(fe.componentType);const Re=function jD(h){return h.isBoundToModule}(fe)?void 0:this._injector.get(N0),lt=A||fe.selector,vt=fe.create(ec.NULL,[],lt,Re),b=vt.location.nativeElement,r=vt.injector.get(AT,null);return r?.registerApplication(b),vt.onDestroy(()=>{this.detachView(vt.hostView),Bx(this.components,vt),r?.unregisterApplication(b)}),this._loadComponent(vt),vt}tick(){if(wl&&this.warnIfDestroyed(),this._runningTick)throw new X(101,!1);try{this._runningTick=!0;for(let _ of this._views)_.detectChanges()}catch(_){this._zone.runOutsideAngular(()=>this._exceptionHandler.handleError(_))}finally{this._runningTick=!1}}attachView(_){wl&&this.warnIfDestroyed();const A=_;this._views.push(A),A.attachToAppRef(this)}detachView(_){wl&&this.warnIfDestroyed();const A=_;Bx(this._views,A),A.detachFromAppRef()}_loadComponent(_){this.attachView(_.hostView),this.tick(),this.components.push(_);const A=this._injector.get(n0,[]);A.push(...this._bootstrapListeners),A.forEach(z=>z(_))}ngOnDestroy(){if(!this._destroyed)try{this._destroyListeners.forEach(_=>_()),this._views.slice().forEach(_=>_.destroy()),this._onMicrotaskEmptySubscription.unsubscribe()}finally{this._destroyed=!0,this._views=[],this._bootstrapListeners=[],this._destroyListeners=[]}}onDestroy(_){return wl&&this.warnIfDestroyed(),this._destroyListeners.push(_),()=>Bx(this._destroyListeners,_)}destroy(){if(this._destroyed)throw new X(406,!1);const _=this._injector;_.destroy&&!_.destroyed&&_.destroy()}get viewCount(){return this._views.length}warnIfDestroyed(){wl&&this._destroyed&&console.warn(ve(406,"This instance of the `ApplicationRef` has already been destroyed."))}}function Bx(h,_){const A=h.indexOf(_);A>-1&&h.splice(A,1)}function $S(){}Q0.\u0275fac=function(_){return new(_||Q0)(zr(Ug),zr(gd),zr(Th))},Q0.\u0275prov=ft({token:Q0,factory:Q0.\u0275fac,providedIn:"root"});class zx{}zx.__NG_ELEMENT_ID__=function kT(h){return function KS(h,_,A){if(Di(h)&&!A){const z=Ha(h.index,_);return new Lf(z,z)}if(47&h.type){const z=_[Ri];return new Lf(z,_)}return null}(Us(),qi(),16==(16&h))};class XD{constructor(){}supports(_){return Ag(_)}create(_){return new eS(_)}}const hb=(h,_)=>_;class eS{constructor(_){this.length=0,this._linkedRecords=null,this._unlinkedRecords=null,this._previousItHead=null,this._itHead=null,this._itTail=null,this._additionsHead=null,this._additionsTail=null,this._movesHead=null,this._movesTail=null,this._removalsHead=null,this._removalsTail=null,this._identityChangesHead=null,this._identityChangesTail=null,this._trackByFn=_||hb}forEachItem(_){let A;for(A=this._itHead;null!==A;A=A._next)_(A)}forEachOperation(_){let A=this._itHead,z=this._removalsHead,K=0,fe=null;for(;A||z;){const Re=!z||A&&A.currentIndex<nS(z,K,fe)?A:z,lt=nS(Re,K,fe),vt=Re.currentIndex;if(Re===z)K--,z=z._nextRemoved;else if(A=A._next,null==Re.previousIndex)K++;else{fe||(fe=[]);const b=lt-K,r=vt-K;if(b!=r){for(let y=0;y<b;y++){const L=y<fe.length?fe[y]:fe[y]=0,G=L+y;r<=G&&G<b&&(fe[y]=L+1)}fe[Re.previousIndex]=r-b}}lt!==vt&&_(Re,lt,vt)}}forEachPreviousItem(_){let A;for(A=this._previousItHead;null!==A;A=A._nextPrevious)_(A)}forEachAddedItem(_){let A;for(A=this._additionsHead;null!==A;A=A._nextAdded)_(A)}forEachMovedItem(_){let A;for(A=this._movesHead;null!==A;A=A._nextMoved)_(A)}forEachRemovedItem(_){let A;for(A=this._removalsHead;null!==A;A=A._nextRemoved)_(A)}forEachIdentityChange(_){let A;for(A=this._identityChangesHead;null!==A;A=A._nextIdentityChange)_(A)}diff(_){if(null==_&&(_=[]),!Ag(_))throw new X(900,!1);return this.check(_)?this:null}onDestroy(){}check(_){this._reset();let K,fe,Re,A=this._itHead,z=!1;if(Array.isArray(_)){this.length=_.length;for(let lt=0;lt<this.length;lt++)fe=_[lt],Re=this._trackByFn(lt,fe),null!==A&&Object.is(A.trackById,Re)?(z&&(A=this._verifyReinsertion(A,fe,Re,lt)),Object.is(A.item,fe)||this._addIdentityChange(A,fe)):(A=this._mismatch(A,fe,Re,lt),z=!0),A=A._next}else K=0,function E1(h,_){if(Array.isArray(h))for(let A=0;A<h.length;A++)_(h[A]);else{const A=h[Symbol.iterator]();let z;for(;!(z=A.next()).done;)_(z.value)}}(_,lt=>{Re=this._trackByFn(K,lt),null!==A&&Object.is(A.trackById,Re)?(z&&(A=this._verifyReinsertion(A,lt,Re,K)),Object.is(A.item,lt)||this._addIdentityChange(A,lt)):(A=this._mismatch(A,lt,Re,K),z=!0),A=A._next,K++}),this.length=K;return this._truncate(A),this.collection=_,this.isDirty}get isDirty(){return null!==this._additionsHead||null!==this._movesHead||null!==this._removalsHead||null!==this._identityChangesHead}_reset(){if(this.isDirty){let _;for(_=this._previousItHead=this._itHead;null!==_;_=_._next)_._nextPrevious=_._next;for(_=this._additionsHead;null!==_;_=_._nextAdded)_.previousIndex=_.currentIndex;for(this._additionsHead=this._additionsTail=null,_=this._movesHead;null!==_;_=_._nextMoved)_.previousIndex=_.currentIndex;this._movesHead=this._movesTail=null,this._removalsHead=this._removalsTail=null,this._identityChangesHead=this._identityChangesTail=null}}_mismatch(_,A,z,K){let fe;return null===_?fe=this._itTail:(fe=_._prev,this._remove(_)),null!==(_=null===this._unlinkedRecords?null:this._unlinkedRecords.get(z,null))?(Object.is(_.item,A)||this._addIdentityChange(_,A),this._reinsertAfter(_,fe,K)):null!==(_=null===this._linkedRecords?null:this._linkedRecords.get(z,K))?(Object.is(_.item,A)||this._addIdentityChange(_,A),this._moveAfter(_,fe,K)):_=this._addAfter(new qS(A,z),fe,K),_}_verifyReinsertion(_,A,z,K){let fe=null===this._unlinkedRecords?null:this._unlinkedRecords.get(z,null);return null!==fe?_=this._reinsertAfter(fe,_._prev,K):_.currentIndex!=K&&(_.currentIndex=K,this._addToMoves(_,K)),_}_truncate(_){for(;null!==_;){const A=_._next;this._addToRemovals(this._unlink(_)),_=A}null!==this._unlinkedRecords&&this._unlinkedRecords.clear(),null!==this._additionsTail&&(this._additionsTail._nextAdded=null),null!==this._movesTail&&(this._movesTail._nextMoved=null),null!==this._itTail&&(this._itTail._next=null),null!==this._removalsTail&&(this._removalsTail._nextRemoved=null),null!==this._identityChangesTail&&(this._identityChangesTail._nextIdentityChange=null)}_reinsertAfter(_,A,z){null!==this._unlinkedRecords&&this._unlinkedRecords.remove(_);const K=_._prevRemoved,fe=_._nextRemoved;return null===K?this._removalsHead=fe:K._nextRemoved=fe,null===fe?this._removalsTail=K:fe._prevRemoved=K,this._insertAfter(_,A,z),this._addToMoves(_,z),_}_moveAfter(_,A,z){return this._unlink(_),this._insertAfter(_,A,z),this._addToMoves(_,z),_}_addAfter(_,A,z){return this._insertAfter(_,A,z),null===this._additionsTail?this._additionsTail=this._additionsHead=_:this._additionsTail=this._additionsTail._nextAdded=_,_}_insertAfter(_,A,z){const K=null===A?this._itHead:A._next;return _._next=K,_._prev=A,null===K?this._itTail=_:K._prev=_,null===A?this._itHead=_:A._next=_,null===this._linkedRecords&&(this._linkedRecords=new tS),this._linkedRecords.put(_),_.currentIndex=z,_}_remove(_){return this._addToRemovals(this._unlink(_))}_unlink(_){null!==this._linkedRecords&&this._linkedRecords.remove(_);const A=_._prev,z=_._next;return null===A?this._itHead=z:A._next=z,null===z?this._itTail=A:z._prev=A,_}_addToMoves(_,A){return _.previousIndex===A||(null===this._movesTail?this._movesTail=this._movesHead=_:this._movesTail=this._movesTail._nextMoved=_),_}_addToRemovals(_){return null===this._unlinkedRecords&&(this._unlinkedRecords=new tS),this._unlinkedRecords.put(_),_.currentIndex=null,_._nextRemoved=null,null===this._removalsTail?(this._removalsTail=this._removalsHead=_,_._prevRemoved=null):(_._prevRemoved=this._removalsTail,this._removalsTail=this._removalsTail._nextRemoved=_),_}_addIdentityChange(_,A){return _.item=A,null===this._identityChangesTail?this._identityChangesTail=this._identityChangesHead=_:this._identityChangesTail=this._identityChangesTail._nextIdentityChange=_,_}}class qS{constructor(_,A){this.item=_,this.trackById=A,this.currentIndex=null,this.previousIndex=null,this._nextPrevious=null,this._prev=null,this._next=null,this._prevDup=null,this._nextDup=null,this._prevRemoved=null,this._nextRemoved=null,this._nextAdded=null,this._nextMoved=null,this._nextIdentityChange=null}}class tf{constructor(){this._head=null,this._tail=null}add(_){null===this._head?(this._head=this._tail=_,_._nextDup=null,_._prevDup=null):(this._tail._nextDup=_,_._prevDup=this._tail,_._nextDup=null,this._tail=_)}get(_,A){let z;for(z=this._head;null!==z;z=z._nextDup)if((null===A||A<=z.currentIndex)&&Object.is(z.trackById,_))return z;return null}remove(_){const A=_._prevDup,z=_._nextDup;return null===A?this._head=z:A._nextDup=z,null===z?this._tail=A:z._prevDup=A,null===this._head}}class tS{constructor(){this.map=new Map}put(_){const A=_.trackById;let z=this.map.get(A);z||(z=new tf,this.map.set(A,z)),z.add(_)}get(_,A){const z=_,K=this.map.get(z);return K?K.get(_,A):null}remove(_){const A=_.trackById;return this.map.get(A).remove(_)&&this.map.delete(A),_}get isEmpty(){return 0===this.map.size}clear(){this.map.clear()}}function nS(h,_,A){const z=h.previousIndex;if(null===z)return z;let K=0;return A&&z<A.length&&(K=A[z]),z+_+K}class Kx{constructor(){}supports(_){return _ instanceof Map||C0(_)}create(){return new XS}}class XS{constructor(){this._records=new Map,this._mapHead=null,this._appendAfter=null,this._previousMapHead=null,this._changesHead=null,this._changesTail=null,this._additionsHead=null,this._additionsTail=null,this._removalsHead=null,this._removalsTail=null}get isDirty(){return null!==this._additionsHead||null!==this._changesHead||null!==this._removalsHead}forEachItem(_){let A;for(A=this._mapHead;null!==A;A=A._next)_(A)}forEachPreviousItem(_){let A;for(A=this._previousMapHead;null!==A;A=A._nextPrevious)_(A)}forEachChangedItem(_){let A;for(A=this._changesHead;null!==A;A=A._nextChanged)_(A)}forEachAddedItem(_){let A;for(A=this._additionsHead;null!==A;A=A._nextAdded)_(A)}forEachRemovedItem(_){let A;for(A=this._removalsHead;null!==A;A=A._nextRemoved)_(A)}diff(_){if(_){if(!(_ instanceof Map||C0(_)))throw new X(900,!1)}else _=new Map;return this.check(_)?this:null}onDestroy(){}check(_){this._reset();let A=this._mapHead;if(this._appendAfter=null,this._forEach(_,(z,K)=>{if(A&&A.key===K)this._maybeAddToChanges(A,z),this._appendAfter=A,A=A._next;else{const fe=this._getOrCreateRecordForKey(K,z);A=this._insertBeforeOrAppend(A,fe)}}),A){A._prev&&(A._prev._next=null),this._removalsHead=A;for(let z=A;null!==z;z=z._nextRemoved)z===this._mapHead&&(this._mapHead=null),this._records.delete(z.key),z._nextRemoved=z._next,z.previousValue=z.currentValue,z.currentValue=null,z._prev=null,z._next=null}return this._changesTail&&(this._changesTail._nextChanged=null),this._additionsTail&&(this._additionsTail._nextAdded=null),this.isDirty}_insertBeforeOrAppend(_,A){if(_){const z=_._prev;return A._next=_,A._prev=z,_._prev=A,z&&(z._next=A),_===this._mapHead&&(this._mapHead=A),this._appendAfter=_,_}return this._appendAfter?(this._appendAfter._next=A,A._prev=this._appendAfter):this._mapHead=A,this._appendAfter=A,null}_getOrCreateRecordForKey(_,A){if(this._records.has(_)){const K=this._records.get(_);this._maybeAddToChanges(K,A);const fe=K._prev,Re=K._next;return fe&&(fe._next=Re),Re&&(Re._prev=fe),K._next=null,K._prev=null,K}const z=new Jx(_);return this._records.set(_,z),z.currentValue=A,this._addToAdditions(z),z}_reset(){if(this.isDirty){let _;for(this._previousMapHead=this._mapHead,_=this._previousMapHead;null!==_;_=_._next)_._nextPrevious=_._next;for(_=this._changesHead;null!==_;_=_._nextChanged)_.previousValue=_.currentValue;for(_=this._additionsHead;null!=_;_=_._nextAdded)_.previousValue=_.currentValue;this._changesHead=this._changesTail=null,this._additionsHead=this._additionsTail=null,this._removalsHead=null}}_maybeAddToChanges(_,A){Object.is(A,_.currentValue)||(_.previousValue=_.currentValue,_.currentValue=A,this._addToChanges(_))}_addToAdditions(_){null===this._additionsHead?this._additionsHead=this._additionsTail=_:(this._additionsTail._nextAdded=_,this._additionsTail=_)}_addToChanges(_){null===this._changesHead?this._changesHead=this._changesTail=_:(this._changesTail._nextChanged=_,this._changesTail=_)}_forEach(_,A){_ instanceof Map?_.forEach(A):Object.keys(_).forEach(z=>A(_[z],z))}}class Jx{constructor(_){this.key=_,this.previousValue=null,this.currentValue=null,this._nextPrevious=null,this._next=null,this._prev=null,this._nextAdded=null,this._nextRemoved=null,this._nextChanged=null}}function RT(){return new _y([new XD])}class _y{constructor(_){this.factories=_}static create(_,A){if(null!=A){const z=A.factories.slice();_=_.concat(z)}return new _y(_)}static extend(_){return{provide:_y,useFactory:A=>_y.create(_,A||RT()),deps:[[_y,new Zc,new Fd]]}}find(_){const A=this.factories.find(z=>z.supports(_));if(null!=A)return A;throw new X(901,!1)}}function NT(){return new H_([new Kx])}_y.\u0275prov=ft({token:_y,providedIn:"root",factory:RT});class H_{constructor(_){this.factories=_}static create(_,A){if(A){const z=A.factories.slice();_=_.concat(z)}return new H_(_)}static extend(_){return{provide:H_,useFactory:A=>H_.create(_,A||NT()),deps:[[H_,new Zc,new Fd]]}}find(_){const A=this.factories.find(z=>z.supports(_));if(A)return A;throw new X(901,!1)}}H_.\u0275prov=ft({token:H_,providedIn:"root",factory:NT});const Lm=[new Kx],tC=[new XD],KC=(new _y(tC),new H_(Lm),KD(null,"core",[]));class V_{constructor(_){}}function Av(h){return"boolean"==typeof h?h:null!=h&&"false"!==h}V_.\u0275fac=function(_){return new(_||V_)(zr(Q0))},V_.\u0275mod=ea({type:V_}),V_.\u0275inj=rn({})},24006:(qe,I,p)=>{"use strict";p.d(I,{CE:()=>Vo,Cf:()=>ve,F:()=>Wn,Fj:()=>ue,JJ:()=>wi,JL:()=>Bn,JU:()=>n,NI:()=>Qt,Oe:()=>Ao,On:()=>Si,Q7:()=>yt,QS:()=>De,UX:()=>Qi,Zs:()=>Dt,_Y:()=>to,a5:()=>Mn,cw:()=>Pn,gN:()=>Dn,kI:()=>ne,nJ:()=>Nt,oH:()=>Di,p4:()=>St,qu:()=>ba,sg:()=>ur,u:()=>wa,u5:()=>Xt,x0:()=>$t});var o=p(94650),e=p(36895),l=p(32076),D=p(4128),g=p(54004);class E{constructor(Fe,Wt){this._renderer=Fe,this._elementRef=Wt,this.onChange=yi=>{},this.onTouched=()=>{}}setProperty(Fe,Wt){this._renderer.setProperty(this._elementRef.nativeElement,Fe,Wt)}registerOnTouched(Fe){this.onTouched=Fe}registerOnChange(Fe){this.onChange=Fe}setDisabledState(Fe){this.setProperty("disabled",Fe)}}E.\u0275fac=function(Fe){return new(Fe||E)(o.Y36(o.Qsj),o.Y36(o.SBq))},E.\u0275dir=o.lG2({type:E});class T extends E{}T.\u0275fac=function(){let Kt;return function(Wt){return(Kt||(Kt=o.n5z(T)))(Wt||T)}}(),T.\u0275dir=o.lG2({type:T,features:[o.qOj]});const n=new o.OlP("NgValueAccessor"),P={provide:n,useExisting:(0,o.Gpc)(()=>w),multi:!0};class w extends T{writeValue(Fe){this.setProperty("checked",Fe)}}w.\u0275fac=function(){let Kt;return function(Wt){return(Kt||(Kt=o.n5z(w)))(Wt||w)}}(),w.\u0275dir=o.lG2({type:w,selectors:[["input","type","checkbox","formControlName",""],["input","type","checkbox","formControl",""],["input","type","checkbox","ngModel",""]],hostBindings:function(Fe,Wt){1&Fe&&o.NdJ("change",function(Ki){return Wt.onChange(Ki.target.checked)})("blur",function(){return Wt.onTouched()})},features:[o._Bn([P]),o.qOj]});const B={provide:n,useExisting:(0,o.Gpc)(()=>ue),multi:!0};const V=new o.OlP("CompositionEventMode");class ue extends E{constructor(Fe,Wt,yi){super(Fe,Wt),this._compositionMode=yi,this._composing=!1,null==this._compositionMode&&(this._compositionMode=!function Y(){const Kt=(0,e.q)()?(0,e.q)().getUserAgent():"";return/android (\d+)/.test(Kt.toLowerCase())}())}writeValue(Fe){const Wt=Fe??"";this.setProperty("value",Wt)}_handleInput(Fe){(!this._compositionMode||this._compositionMode&&!this._composing)&&this.onChange(Fe)}_compositionStart(){this._composing=!0}_compositionEnd(Fe){this._composing=!1,this._compositionMode&&this.onChange(Fe)}}ue.\u0275fac=function(Fe){return new(Fe||ue)(o.Y36(o.Qsj),o.Y36(o.SBq),o.Y36(V,8))},ue.\u0275dir=o.lG2({type:ue,selectors:[["input","formControlName","",3,"type","checkbox"],["textarea","formControlName",""],["input","formControl","",3,"type","checkbox"],["textarea","formControl",""],["input","ngModel","",3,"type","checkbox"],["textarea","ngModel",""],["","ngDefaultControl",""]],hostBindings:function(Fe,Wt){1&Fe&&o.NdJ("input",function(Ki){return Wt._handleInput(Ki.target.value)})("blur",function(){return Wt.onTouched()})("compositionstart",function(){return Wt._compositionStart()})("compositionend",function(Ki){return Wt._compositionEnd(Ki.target.value)})},features:[o._Bn([B]),o.qOj]});const he=!1;function ae(Kt){return null==Kt||("string"==typeof Kt||Array.isArray(Kt))&&0===Kt.length}function X(Kt){return null!=Kt&&"number"==typeof Kt.length}const ve=new o.OlP("NgValidators"),ye=new o.OlP("NgAsyncValidators"),ge=/^(?=.{1,254}$)(?=.{1,64}@)[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/;class ne{static min(Fe){return pe(Fe)}static max(Fe){return Pe(Fe)}static required(Fe){return xe(Fe)}static requiredTrue(Fe){return de(Fe)}static email(Fe){return re(Fe)}static minLength(Fe){return oe(Fe)}static maxLength(Fe){return me(Fe)}static pattern(Fe){return be(Fe)}static nullValidator(Fe){return null}static compose(Fe){return mt(Fe)}static composeAsync(Fe){return Ve(Fe)}}function pe(Kt){return Fe=>{if(ae(Fe.value)||ae(Kt))return null;const Wt=parseFloat(Fe.value);return!isNaN(Wt)&&Wt<Kt?{min:{min:Kt,actual:Fe.value}}:null}}function Pe(Kt){return Fe=>{if(ae(Fe.value)||ae(Kt))return null;const Wt=parseFloat(Fe.value);return!isNaN(Wt)&&Wt>Kt?{max:{max:Kt,actual:Fe.value}}:null}}function xe(Kt){return ae(Kt.value)?{required:!0}:null}function de(Kt){return!0===Kt.value?null:{required:!0}}function re(Kt){return ae(Kt.value)||ge.test(Kt.value)?null:{email:!0}}function oe(Kt){return Fe=>ae(Fe.value)||!X(Fe.value)?null:Fe.value.length<Kt?{minlength:{requiredLength:Kt,actualLength:Fe.value.length}}:null}function me(Kt){return Fe=>X(Fe.value)&&Fe.value.length>Kt?{maxlength:{requiredLength:Kt,actualLength:Fe.value.length}}:null}function be(Kt){if(!Kt)return le;let Fe,Wt;return"string"==typeof Kt?(Wt="","^"!==Kt.charAt(0)&&(Wt+="^"),Wt+=Kt,"$"!==Kt.charAt(Kt.length-1)&&(Wt+="$"),Fe=new RegExp(Wt)):(Wt=Kt.toString(),Fe=Kt),yi=>{if(ae(yi.value))return null;const Ki=yi.value;return Fe.test(Ki)?null:{pattern:{requiredPattern:Wt,actualValue:Ki}}}}function le(Kt){return null}function Z(Kt){return null!=Kt}function Oe(Kt){const Fe=(0,o.QGY)(Kt)?(0,l.D)(Kt):Kt;if(he&&!(0,o.CqO)(Fe)){let Wt="Expected async validator to return Promise or Observable.";throw"object"==typeof Kt&&(Wt+=" Are you using a synchronous validator where an async validator is expected?"),new o.vHH(-1101,Wt)}return Fe}function j(Kt){let Fe={};return Kt.forEach(Wt=>{Fe=null!=Wt?{...Fe,...Wt}:Fe}),0===Object.keys(Fe).length?null:Fe}function ke(Kt,Fe){return Fe.map(Wt=>Wt(Kt))}function nt(Kt){return Kt.map(Fe=>function Be(Kt){return!Kt.validate}(Fe)?Fe:Wt=>Fe.validate(Wt))}function mt(Kt){if(!Kt)return null;const Fe=Kt.filter(Z);return 0==Fe.length?null:function(Wt){return j(ke(Wt,Fe))}}function ut(Kt){return null!=Kt?mt(nt(Kt)):null}function Ve(Kt){if(!Kt)return null;const Fe=Kt.filter(Z);return 0==Fe.length?null:function(Wt){const yi=ke(Wt,Fe).map(Oe);return(0,D.D)(yi).pipe((0,g.U)(j))}}function tt(Kt){return null!=Kt?Ve(nt(Kt)):null}function Ne(Kt,Fe){return null===Kt?[Fe]:Array.isArray(Kt)?[...Kt,Fe]:[Kt,Fe]}function wt(Kt){return Kt._rawValidators}function ft(Kt){return Kt._rawAsyncValidators}function Ct(Kt){return Kt?Array.isArray(Kt)?Kt:[Kt]:[]}function rn(Kt,Fe){return Array.isArray(Kt)?Kt.includes(Fe):Kt===Fe}function He(Kt,Fe){const Wt=Ct(Fe);return Ct(Kt).forEach(Ki=>{rn(Wt,Ki)||Wt.push(Ki)}),Wt}function st(Kt,Fe){return Ct(Fe).filter(Wt=>!rn(Kt,Wt))}class nn{constructor(){this._rawValidators=[],this._rawAsyncValidators=[],this._onDestroyCallbacks=[]}get value(){return this.control?this.control.value:null}get valid(){return this.control?this.control.valid:null}get invalid(){return this.control?this.control.invalid:null}get pending(){return this.control?this.control.pending:null}get disabled(){return this.control?this.control.disabled:null}get enabled(){return this.control?this.control.enabled:null}get errors(){return this.control?this.control.errors:null}get pristine(){return this.control?this.control.pristine:null}get dirty(){return this.control?this.control.dirty:null}get touched(){return this.control?this.control.touched:null}get status(){return this.control?this.control.status:null}get untouched(){return this.control?this.control.untouched:null}get statusChanges(){return this.control?this.control.statusChanges:null}get valueChanges(){return this.control?this.control.valueChanges:null}get path(){return null}_setValidators(Fe){this._rawValidators=Fe||[],this._composedValidatorFn=ut(this._rawValidators)}_setAsyncValidators(Fe){this._rawAsyncValidators=Fe||[],this._composedAsyncValidatorFn=tt(this._rawAsyncValidators)}get validator(){return this._composedValidatorFn||null}get asyncValidator(){return this._composedAsyncValidatorFn||null}_registerOnDestroy(Fe){this._onDestroyCallbacks.push(Fe)}_invokeOnDestroyCallbacks(){this._onDestroyCallbacks.forEach(Fe=>Fe()),this._onDestroyCallbacks=[]}reset(Fe){this.control&&this.control.reset(Fe)}hasError(Fe,Wt){return!!this.control&&this.control.hasError(Fe,Wt)}getError(Fe,Wt){return this.control?this.control.getError(Fe,Wt):null}}class Dn extends nn{get formDirective(){return null}get path(){return null}}class Mn extends nn{constructor(){super(...arguments),this._parent=null,this.name=null,this.valueAccessor=null}}class vi{constructor(Fe){this._cd=Fe}get isTouched(){return!!this._cd?.control?.touched}get isUntouched(){return!!this._cd?.control?.untouched}get isPristine(){return!!this._cd?.control?.pristine}get isDirty(){return!!this._cd?.control?.dirty}get isValid(){return!!this._cd?.control?.valid}get isInvalid(){return!!this._cd?.control?.invalid}get isPending(){return!!this._cd?.control?.pending}get isSubmitted(){return!!this._cd?.submitted}}class wi extends vi{constructor(Fe){super(Fe)}}wi.\u0275fac=function(Fe){return new(Fe||wi)(o.Y36(Mn,2))},wi.\u0275dir=o.lG2({type:wi,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(Fe,Wt){2&Fe&&o.ekj("ng-untouched",Wt.isUntouched)("ng-touched",Wt.isTouched)("ng-pristine",Wt.isPristine)("ng-dirty",Wt.isDirty)("ng-valid",Wt.isValid)("ng-invalid",Wt.isInvalid)("ng-pending",Wt.isPending)},features:[o.qOj]});class Bn extends vi{constructor(Fe){super(Fe)}}Bn.\u0275fac=function(Fe){return new(Fe||Bn)(o.Y36(Dn,10))},Bn.\u0275dir=o.lG2({type:Bn,selectors:[["","formGroupName",""],["","formArrayName",""],["","ngModelGroup",""],["","formGroup",""],["form",3,"ngNoForm",""],["","ngForm",""]],hostVars:16,hostBindings:function(Fe,Wt){2&Fe&&o.ekj("ng-untouched",Wt.isUntouched)("ng-touched",Wt.isTouched)("ng-pristine",Wt.isPristine)("ng-dirty",Wt.isDirty)("ng-valid",Wt.isValid)("ng-invalid",Wt.isInvalid)("ng-pending",Wt.isPending)("ng-submitted",Wt.isSubmitted)},features:[o.qOj]});function vn(Kt,Fe){return Kt?`with name: '${Fe}'`:`at index: ${Fe}`}const Hi=!1,Gr="VALID",zr="INVALID",Eo="PENDING",mr="DISABLED";function jn(Kt){return(Ni(Kt)?Kt.validators:Kt)||null}function Yt(Kt,Fe){return(Ni(Fe)?Fe.asyncValidators:Kt)||null}function Ni(Kt){return null!=Kt&&!Array.isArray(Kt)&&"object"==typeof Kt}function Nn(Kt,Fe,Wt){const yi=Kt.controls;if(!(Fe?Object.keys(yi):yi).length)throw new o.vHH(1e3,Hi?function In(Kt){return`\n    There are no form controls registered with this ${Kt?"group":"array"} yet. If you're using ngModel,\n    you may want to check next tick (e.g. use setTimeout).\n  `}(Fe):"");if(!yi[Wt])throw new o.vHH(1001,Hi?function Zi(Kt,Fe){return`Cannot find form control ${vn(Kt,Fe)}`}(Fe,Wt):"")}function pr(Kt,Fe,Wt){Kt._forEachChild((yi,Ki)=>{if(void 0===Wt[Ki])throw new o.vHH(1002,Hi?function gr(Kt,Fe){return`Must supply a value for form control ${vn(Kt,Fe)}`}(Fe,Ki):"")})}class Sn{constructor(Fe,Wt){this._pendingDirty=!1,this._hasOwnPendingAsyncValidator=!1,this._pendingTouched=!1,this._onCollectionChange=()=>{},this._parent=null,this.pristine=!0,this.touched=!1,this._onDisabledChange=[],this._assignValidators(Fe),this._assignAsyncValidators(Wt)}get validator(){return this._composedValidatorFn}set validator(Fe){this._rawValidators=this._composedValidatorFn=Fe}get asyncValidator(){return this._composedAsyncValidatorFn}set asyncValidator(Fe){this._rawAsyncValidators=this._composedAsyncValidatorFn=Fe}get parent(){return this._parent}get valid(){return this.status===Gr}get invalid(){return this.status===zr}get pending(){return this.status==Eo}get disabled(){return this.status===mr}get enabled(){return this.status!==mr}get dirty(){return!this.pristine}get untouched(){return!this.touched}get updateOn(){return this._updateOn?this._updateOn:this.parent?this.parent.updateOn:"change"}setValidators(Fe){this._assignValidators(Fe)}setAsyncValidators(Fe){this._assignAsyncValidators(Fe)}addValidators(Fe){this.setValidators(He(Fe,this._rawValidators))}addAsyncValidators(Fe){this.setAsyncValidators(He(Fe,this._rawAsyncValidators))}removeValidators(Fe){this.setValidators(st(Fe,this._rawValidators))}removeAsyncValidators(Fe){this.setAsyncValidators(st(Fe,this._rawAsyncValidators))}hasValidator(Fe){return rn(this._rawValidators,Fe)}hasAsyncValidator(Fe){return rn(this._rawAsyncValidators,Fe)}clearValidators(){this.validator=null}clearAsyncValidators(){this.asyncValidator=null}markAsTouched(Fe={}){this.touched=!0,this._parent&&!Fe.onlySelf&&this._parent.markAsTouched(Fe)}markAllAsTouched(){this.markAsTouched({onlySelf:!0}),this._forEachChild(Fe=>Fe.markAllAsTouched())}markAsUntouched(Fe={}){this.touched=!1,this._pendingTouched=!1,this._forEachChild(Wt=>{Wt.markAsUntouched({onlySelf:!0})}),this._parent&&!Fe.onlySelf&&this._parent._updateTouched(Fe)}markAsDirty(Fe={}){this.pristine=!1,this._parent&&!Fe.onlySelf&&this._parent.markAsDirty(Fe)}markAsPristine(Fe={}){this.pristine=!0,this._pendingDirty=!1,this._forEachChild(Wt=>{Wt.markAsPristine({onlySelf:!0})}),this._parent&&!Fe.onlySelf&&this._parent._updatePristine(Fe)}markAsPending(Fe={}){this.status=Eo,!1!==Fe.emitEvent&&this.statusChanges.emit(this.status),this._parent&&!Fe.onlySelf&&this._parent.markAsPending(Fe)}disable(Fe={}){const Wt=this._parentMarkedDirty(Fe.onlySelf);this.status=mr,this.errors=null,this._forEachChild(yi=>{yi.disable({...Fe,onlySelf:!0})}),this._updateValue(),!1!==Fe.emitEvent&&(this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors({...Fe,skipPristineCheck:Wt}),this._onDisabledChange.forEach(yi=>yi(!0))}enable(Fe={}){const Wt=this._parentMarkedDirty(Fe.onlySelf);this.status=Gr,this._forEachChild(yi=>{yi.enable({...Fe,onlySelf:!0})}),this.updateValueAndValidity({onlySelf:!0,emitEvent:Fe.emitEvent}),this._updateAncestors({...Fe,skipPristineCheck:Wt}),this._onDisabledChange.forEach(yi=>yi(!1))}_updateAncestors(Fe){this._parent&&!Fe.onlySelf&&(this._parent.updateValueAndValidity(Fe),Fe.skipPristineCheck||this._parent._updatePristine(),this._parent._updateTouched())}setParent(Fe){this._parent=Fe}getRawValue(){return this.value}updateValueAndValidity(Fe={}){this._setInitialStatus(),this._updateValue(),this.enabled&&(this._cancelExistingSubscription(),this.errors=this._runValidator(),this.status=this._calculateStatus(),(this.status===Gr||this.status===Eo)&&this._runAsyncValidator(Fe.emitEvent)),!1!==Fe.emitEvent&&(this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._parent&&!Fe.onlySelf&&this._parent.updateValueAndValidity(Fe)}_updateTreeValidity(Fe={emitEvent:!0}){this._forEachChild(Wt=>Wt._updateTreeValidity(Fe)),this.updateValueAndValidity({onlySelf:!0,emitEvent:Fe.emitEvent})}_setInitialStatus(){this.status=this._allControlsDisabled()?mr:Gr}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(Fe){if(this.asyncValidator){this.status=Eo,this._hasOwnPendingAsyncValidator=!0;const Wt=Oe(this.asyncValidator(this));this._asyncValidationSubscription=Wt.subscribe(yi=>{this._hasOwnPendingAsyncValidator=!1,this.setErrors(yi,{emitEvent:Fe})})}}_cancelExistingSubscription(){this._asyncValidationSubscription&&(this._asyncValidationSubscription.unsubscribe(),this._hasOwnPendingAsyncValidator=!1)}setErrors(Fe,Wt={}){this.errors=Fe,this._updateControlsErrors(!1!==Wt.emitEvent)}get(Fe){let Wt=Fe;return null==Wt||(Array.isArray(Wt)||(Wt=Wt.split(".")),0===Wt.length)?null:Wt.reduce((yi,Ki)=>yi&&yi._find(Ki),this)}getError(Fe,Wt){const yi=Wt?this.get(Wt):this;return yi&&yi.errors?yi.errors[Fe]:null}hasError(Fe,Wt){return!!this.getError(Fe,Wt)}get root(){let Fe=this;for(;Fe._parent;)Fe=Fe._parent;return Fe}_updateControlsErrors(Fe){this.status=this._calculateStatus(),Fe&&this.statusChanges.emit(this.status),this._parent&&this._parent._updateControlsErrors(Fe)}_initObservables(){this.valueChanges=new o.vpe,this.statusChanges=new o.vpe}_calculateStatus(){return this._allControlsDisabled()?mr:this.errors?zr:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(Eo)?Eo:this._anyControlsHaveStatus(zr)?zr:Gr}_anyControlsHaveStatus(Fe){return this._anyControls(Wt=>Wt.status===Fe)}_anyControlsDirty(){return this._anyControls(Fe=>Fe.dirty)}_anyControlsTouched(){return this._anyControls(Fe=>Fe.touched)}_updatePristine(Fe={}){this.pristine=!this._anyControlsDirty(),this._parent&&!Fe.onlySelf&&this._parent._updatePristine(Fe)}_updateTouched(Fe={}){this.touched=this._anyControlsTouched(),this._parent&&!Fe.onlySelf&&this._parent._updateTouched(Fe)}_registerOnCollectionChange(Fe){this._onCollectionChange=Fe}_setUpdateStrategy(Fe){Ni(Fe)&&null!=Fe.updateOn&&(this._updateOn=Fe.updateOn)}_parentMarkedDirty(Fe){const Wt=this._parent&&this._parent.dirty;return!Fe&&!!Wt&&!this._parent._anyControlsDirty()}_find(Fe){return null}_assignValidators(Fe){this._rawValidators=Array.isArray(Fe)?Fe.slice():Fe,this._composedValidatorFn=function ct(Kt){return Array.isArray(Kt)?ut(Kt):Kt||null}(this._rawValidators)}_assignAsyncValidators(Fe){this._rawAsyncValidators=Array.isArray(Fe)?Fe.slice():Fe,this._composedAsyncValidatorFn=function oi(Kt){return Array.isArray(Kt)?tt(Kt):Kt||null}(this._rawAsyncValidators)}}class Pn extends Sn{constructor(Fe,Wt,yi){super(jn(Wt),Yt(yi,Wt)),this.controls=Fe,this._initObservables(),this._setUpdateStrategy(Wt),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}registerControl(Fe,Wt){return this.controls[Fe]?this.controls[Fe]:(this.controls[Fe]=Wt,Wt.setParent(this),Wt._registerOnCollectionChange(this._onCollectionChange),Wt)}addControl(Fe,Wt,yi={}){this.registerControl(Fe,Wt),this.updateValueAndValidity({emitEvent:yi.emitEvent}),this._onCollectionChange()}removeControl(Fe,Wt={}){this.controls[Fe]&&this.controls[Fe]._registerOnCollectionChange(()=>{}),delete this.controls[Fe],this.updateValueAndValidity({emitEvent:Wt.emitEvent}),this._onCollectionChange()}setControl(Fe,Wt,yi={}){this.controls[Fe]&&this.controls[Fe]._registerOnCollectionChange(()=>{}),delete this.controls[Fe],Wt&&this.registerControl(Fe,Wt),this.updateValueAndValidity({emitEvent:yi.emitEvent}),this._onCollectionChange()}contains(Fe){return this.controls.hasOwnProperty(Fe)&&this.controls[Fe].enabled}setValue(Fe,Wt={}){pr(this,!0,Fe),Object.keys(Fe).forEach(yi=>{Nn(this,!0,yi),this.controls[yi].setValue(Fe[yi],{onlySelf:!0,emitEvent:Wt.emitEvent})}),this.updateValueAndValidity(Wt)}patchValue(Fe,Wt={}){null!=Fe&&(Object.keys(Fe).forEach(yi=>{const Ki=this.controls[yi];Ki&&Ki.patchValue(Fe[yi],{onlySelf:!0,emitEvent:Wt.emitEvent})}),this.updateValueAndValidity(Wt))}reset(Fe={},Wt={}){this._forEachChild((yi,Ki)=>{yi.reset(Fe[Ki],{onlySelf:!0,emitEvent:Wt.emitEvent})}),this._updatePristine(Wt),this._updateTouched(Wt),this.updateValueAndValidity(Wt)}getRawValue(){return this._reduceChildren({},(Fe,Wt,yi)=>(Fe[yi]=Wt.getRawValue(),Fe))}_syncPendingControls(){let Fe=this._reduceChildren(!1,(Wt,yi)=>!!yi._syncPendingControls()||Wt);return Fe&&this.updateValueAndValidity({onlySelf:!0}),Fe}_forEachChild(Fe){Object.keys(this.controls).forEach(Wt=>{const yi=this.controls[Wt];yi&&Fe(yi,Wt)})}_setUpControls(){this._forEachChild(Fe=>{Fe.setParent(this),Fe._registerOnCollectionChange(this._onCollectionChange)})}_updateValue(){this.value=this._reduceValue()}_anyControls(Fe){for(const[Wt,yi]of Object.entries(this.controls))if(this.contains(Wt)&&Fe(yi))return!0;return!1}_reduceValue(){return this._reduceChildren({},(Wt,yi,Ki)=>((yi.enabled||this.disabled)&&(Wt[Ki]=yi.value),Wt))}_reduceChildren(Fe,Wt){let yi=Fe;return this._forEachChild((Ki,ya)=>{yi=Wt(yi,Ki,ya)}),yi}_allControlsDisabled(){for(const Fe of Object.keys(this.controls))if(this.controls[Fe].enabled)return!1;return Object.keys(this.controls).length>0||this.disabled}_find(Fe){return this.controls.hasOwnProperty(Fe)?this.controls[Fe]:null}}const Nt=Pn;class hn extends Pn{}const ce=new o.OlP("CallSetDisabledState",{providedIn:"root",factory:()=>we}),we="always";function Qe(Kt,Fe){return[...Fe.path,Kt]}function qt(Kt,Fe,Wt=we){rr(Kt,Fe),Fe.valueAccessor.writeValue(Kt.value),(Kt.disabled||"always"===Wt)&&Fe.valueAccessor.setDisabledState?.(Kt.disabled),function ea(Kt,Fe){Fe.valueAccessor.registerOnChange(Wt=>{Kt._pendingValue=Wt,Kt._pendingChange=!0,Kt._pendingDirty=!0,"change"===Kt.updateOn&&Ii(Kt,Fe)})}(Kt,Fe),function an(Kt,Fe){const Wt=(yi,Ki)=>{Fe.valueAccessor.writeValue(yi),Ki&&Fe.viewToModelUpdate(yi)};Kt.registerOnChange(Wt),Fe._registerOnDestroy(()=>{Kt._unregisterOnChange(Wt)})}(Kt,Fe),function Bo(Kt,Fe){Fe.valueAccessor.registerOnTouched(()=>{Kt._pendingTouched=!0,"blur"===Kt.updateOn&&Kt._pendingChange&&Ii(Kt,Fe),"submit"!==Kt.updateOn&&Kt.markAsTouched()})}(Kt,Fe),function mo(Kt,Fe){if(Fe.valueAccessor.setDisabledState){const Wt=yi=>{Fe.valueAccessor.setDisabledState(yi)};Kt.registerOnDisabledChange(Wt),Fe._registerOnDestroy(()=>{Kt._unregisterOnDisabledChange(Wt)})}}(Kt,Fe)}function Tn(Kt,Fe,Wt=!0){const yi=()=>{};Fe.valueAccessor&&(Fe.valueAccessor.registerOnChange(yi),Fe.valueAccessor.registerOnTouched(yi)),aa(Kt,Fe),Kt&&(Fe._invokeOnDestroyCallbacks(),Kt._registerOnCollectionChange(()=>{}))}function lr(Kt,Fe){Kt.forEach(Wt=>{Wt.registerOnValidatorChange&&Wt.registerOnValidatorChange(Fe)})}function rr(Kt,Fe){const Wt=wt(Kt);null!==Fe.validator?Kt.setValidators(Ne(Wt,Fe.validator)):"function"==typeof Wt&&Kt.setValidators([Wt]);const yi=ft(Kt);null!==Fe.asyncValidator?Kt.setAsyncValidators(Ne(yi,Fe.asyncValidator)):"function"==typeof yi&&Kt.setAsyncValidators([yi]);const Ki=()=>Kt.updateValueAndValidity();lr(Fe._rawValidators,Ki),lr(Fe._rawAsyncValidators,Ki)}function aa(Kt,Fe){let Wt=!1;if(null!==Kt){if(null!==Fe.validator){const Ki=wt(Kt);if(Array.isArray(Ki)&&Ki.length>0){const ya=Ki.filter(Na=>Na!==Fe.validator);ya.length!==Ki.length&&(Wt=!0,Kt.setValidators(ya))}}if(null!==Fe.asyncValidator){const Ki=ft(Kt);if(Array.isArray(Ki)&&Ki.length>0){const ya=Ki.filter(Na=>Na!==Fe.asyncValidator);ya.length!==Ki.length&&(Wt=!0,Kt.setAsyncValidators(ya))}}}const yi=()=>{};return lr(Fe._rawValidators,yi),lr(Fe._rawAsyncValidators,yi),Wt}function Ii(Kt,Fe){Kt._pendingDirty&&Kt.markAsDirty(),Kt.setValue(Kt._pendingValue,{emitModelToViewChange:!1}),Fe.viewToModelUpdate(Kt._pendingValue),Kt._pendingChange=!1}function Zn(Kt,Fe){rr(Kt,Fe)}function Ft(Kt,Fe){if(!Kt.hasOwnProperty("model"))return!1;const Wt=Kt.model;return!!Wt.isFirstChange()||!Object.is(Fe,Wt.currentValue)}function wn(Kt,Fe){Kt._syncPendingControls(),Fe.forEach(Wt=>{const yi=Wt.control;"submit"===yi.updateOn&&yi._pendingChange&&(Wt.viewToModelUpdate(yi._pendingValue),yi._pendingChange=!1)})}function Gn(Kt,Fe){if(!Fe)return null;let Wt,yi,Ki;return Array.isArray(Fe),Fe.forEach(ya=>{ya.constructor===ue?Wt=ya:function Ut(Kt){return Object.getPrototypeOf(Kt.constructor)===T}(ya)?yi=ya:Ki=ya}),Ki||yi||Wt||null}const Fr={provide:Dn,useExisting:(0,o.Gpc)(()=>Wn)},en=Promise.resolve();class Wn extends Dn{constructor(Fe,Wt,yi){super(),this.callSetDisabledState=yi,this.submitted=!1,this._directives=new Set,this.ngSubmit=new o.vpe,this.form=new Pn({},ut(Fe),tt(Wt))}ngAfterViewInit(){this._setUpdateStrategy()}get formDirective(){return this}get control(){return this.form}get path(){return[]}get controls(){return this.form.controls}addControl(Fe){en.then(()=>{const Wt=this._findContainer(Fe.path);Fe.control=Wt.registerControl(Fe.name,Fe.control),qt(Fe.control,Fe,this.callSetDisabledState),Fe.control.updateValueAndValidity({emitEvent:!1}),this._directives.add(Fe)})}getControl(Fe){return this.form.get(Fe.path)}removeControl(Fe){en.then(()=>{const Wt=this._findContainer(Fe.path);Wt&&Wt.removeControl(Fe.name),this._directives.delete(Fe)})}addFormGroup(Fe){en.then(()=>{const Wt=this._findContainer(Fe.path),yi=new Pn({});Zn(yi,Fe),Wt.registerControl(Fe.name,yi),yi.updateValueAndValidity({emitEvent:!1})})}removeFormGroup(Fe){en.then(()=>{const Wt=this._findContainer(Fe.path);Wt&&Wt.removeControl(Fe.name)})}getFormGroup(Fe){return this.form.get(Fe.path)}updateModel(Fe,Wt){en.then(()=>{this.form.get(Fe.path).setValue(Wt)})}setValue(Fe){this.control.setValue(Fe)}onSubmit(Fe){return this.submitted=!0,wn(this.form,this._directives),this.ngSubmit.emit(Fe),"dialog"===Fe?.target?.method}onReset(){this.resetForm()}resetForm(Fe){this.form.reset(Fe),this.submitted=!1}_setUpdateStrategy(){this.options&&null!=this.options.updateOn&&(this.form._updateOn=this.options.updateOn)}_findContainer(Fe){return Fe.pop(),Fe.length?this.form.get(Fe):this.form}}function at(Kt,Fe){const Wt=Kt.indexOf(Fe);Wt>-1&&Kt.splice(Wt,1)}function It(Kt){return"object"==typeof Kt&&null!==Kt&&2===Object.keys(Kt).length&&"value"in Kt&&"disabled"in Kt}Wn.\u0275fac=function(Fe){return new(Fe||Wn)(o.Y36(ve,10),o.Y36(ye,10),o.Y36(ce,8))},Wn.\u0275dir=o.lG2({type:Wn,selectors:[["form",3,"ngNoForm","",3,"formGroup",""],["ng-form"],["","ngForm",""]],hostBindings:function(Fe,Wt){1&Fe&&o.NdJ("submit",function(Ki){return Wt.onSubmit(Ki)})("reset",function(){return Wt.onReset()})},inputs:{options:["ngFormOptions","options"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[o._Bn([Fr]),o.qOj]});const Qt=class extends Sn{constructor(Fe=null,Wt,yi){super(jn(Wt),Yt(yi,Wt)),this.defaultValue=null,this._onChange=[],this._pendingChange=!1,this._applyFormState(Fe),this._setUpdateStrategy(Wt),this._initObservables(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator}),Ni(Wt)&&(Wt.nonNullable||Wt.initialValueIsDefault)&&(It(Fe)?this.defaultValue=Fe.value:this.defaultValue=Fe)}setValue(Fe,Wt={}){this.value=this._pendingValue=Fe,this._onChange.length&&!1!==Wt.emitModelToViewChange&&this._onChange.forEach(yi=>yi(this.value,!1!==Wt.emitViewToModelChange)),this.updateValueAndValidity(Wt)}patchValue(Fe,Wt={}){this.setValue(Fe,Wt)}reset(Fe=this.defaultValue,Wt={}){this._applyFormState(Fe),this.markAsPristine(Wt),this.markAsUntouched(Wt),this.setValue(this.value,Wt),this._pendingChange=!1}_updateValue(){}_anyControls(Fe){return!1}_allControlsDisabled(){return this.disabled}registerOnChange(Fe){this._onChange.push(Fe)}_unregisterOnChange(Fe){at(this._onChange,Fe)}registerOnDisabledChange(Fe){this._onDisabledChange.push(Fe)}_unregisterOnDisabledChange(Fe){at(this._onDisabledChange,Fe)}_forEachChild(Fe){}_syncPendingControls(){return!("submit"!==this.updateOn||(this._pendingDirty&&this.markAsDirty(),this._pendingTouched&&this.markAsTouched(),!this._pendingChange))&&(this.setValue(this._pendingValue,{onlySelf:!0,emitModelToViewChange:!1}),!0)}_applyFormState(Fe){It(Fe)?(this.value=this._pendingValue=Fe.value,Fe.disabled?this.disable({onlySelf:!0,emitEvent:!1}):this.enable({onlySelf:!0,emitEvent:!1})):this.value=this._pendingValue=Fe}},St=Qt;class cn extends Dn{ngOnInit(){this._checkParentType(),this.formDirective.addFormGroup(this)}ngOnDestroy(){this.formDirective&&this.formDirective.removeFormGroup(this)}get control(){return this.formDirective.getFormGroup(this)}get path(){return Qe(null==this.name?this.name:this.name.toString(),this._parent)}get formDirective(){return this._parent?this._parent.formDirective:null}_checkParentType(){}}cn.\u0275fac=function(){let Kt;return function(Wt){return(Kt||(Kt=o.n5z(cn)))(Wt||cn)}}(),cn.\u0275dir=o.lG2({type:cn,features:[o.qOj]});const _r={provide:Dn,useExisting:(0,o.Gpc)(()=>er)};class er extends cn{constructor(Fe,Wt,yi){super(),this._parent=Fe,this._setValidators(Wt),this._setAsyncValidators(yi)}_checkParentType(){!(this._parent instanceof er)&&this._parent}}er.\u0275fac=function(Fe){return new(Fe||er)(o.Y36(Dn,5),o.Y36(ve,10),o.Y36(ye,10))},er.\u0275dir=o.lG2({type:er,selectors:[["","ngModelGroup",""]],inputs:{name:["ngModelGroup","name"]},exportAs:["ngModelGroup"],features:[o._Bn([_r]),o.qOj]});const Yr={provide:Mn,useExisting:(0,o.Gpc)(()=>Si)},_o=Promise.resolve();class Si extends Mn{constructor(Fe,Wt,yi,Ki,ya,Na){super(),this._changeDetectorRef=ya,this.callSetDisabledState=Na,this.control=new Qt,this._registered=!1,this.update=new o.vpe,this._parent=Fe,this._setValidators(Wt),this._setAsyncValidators(yi),this.valueAccessor=Gn(0,Ki)}ngOnChanges(Fe){if(this._checkForErrors(),!this._registered||"name"in Fe){if(this._registered&&(this._checkName(),this.formDirective)){const Wt=Fe.name.previousValue;this.formDirective.removeControl({name:Wt,path:this._getPath(Wt)})}this._setUpControl()}"isDisabled"in Fe&&this._updateDisabled(Fe),Ft(Fe,this.viewModel)&&(this._updateValue(this.model),this.viewModel=this.model)}ngOnDestroy(){this.formDirective&&this.formDirective.removeControl(this)}get path(){return this._getPath(this.name)}get formDirective(){return this._parent?this._parent.formDirective:null}viewToModelUpdate(Fe){this.viewModel=Fe,this.update.emit(Fe)}_setUpControl(){this._setUpdateStrategy(),this._isStandalone()?this._setUpStandalone():this.formDirective.addControl(this),this._registered=!0}_setUpdateStrategy(){this.options&&null!=this.options.updateOn&&(this.control._updateOn=this.options.updateOn)}_isStandalone(){return!this._parent||!(!this.options||!this.options.standalone)}_setUpStandalone(){qt(this.control,this,this.callSetDisabledState),this.control.updateValueAndValidity({emitEvent:!1})}_checkForErrors(){this._isStandalone()||this._checkParentType(),this._checkName()}_checkParentType(){}_checkName(){this.options&&this.options.name&&(this.name=this.options.name),!this._isStandalone()&&this.name}_updateValue(Fe){_o.then(()=>{this.control.setValue(Fe,{emitViewToModelChange:!1}),this._changeDetectorRef?.markForCheck()})}_updateDisabled(Fe){const Wt=Fe.isDisabled.currentValue,yi=0!==Wt&&(0,o.D6c)(Wt);_o.then(()=>{yi&&!this.control.disabled?this.control.disable():!yi&&this.control.disabled&&this.control.enable(),this._changeDetectorRef?.markForCheck()})}_getPath(Fe){return this._parent?Qe(Fe,this._parent):[Fe]}}Si.\u0275fac=function(Fe){return new(Fe||Si)(o.Y36(Dn,9),o.Y36(ve,10),o.Y36(ye,10),o.Y36(n,10),o.Y36(o.sBO,8),o.Y36(ce,8))},Si.\u0275dir=o.lG2({type:Si,selectors:[["","ngModel","",3,"formControlName","",3,"formControl",""]],inputs:{name:"name",isDisabled:["disabled","isDisabled"],model:["ngModel","model"],options:["ngModelOptions","options"]},outputs:{update:"ngModelChange"},exportAs:["ngModel"],features:[o._Bn([Yr]),o.qOj,o.TTD]});class to{}to.\u0275fac=function(Fe){return new(Fe||to)},to.\u0275dir=o.lG2({type:to,selectors:[["form",3,"ngNoForm","",3,"ngNativeValidate",""]],hostAttrs:["novalidate",""]});const Oa={provide:n,useExisting:(0,o.Gpc)(()=>Uo),multi:!0};class Uo extends T{writeValue(Fe){const Wt=Fe??"";this.setProperty("value",Wt)}registerOnChange(Fe){this.onChange=Wt=>{Fe(""==Wt?null:parseFloat(Wt))}}}Uo.\u0275fac=function(){let Kt;return function(Wt){return(Kt||(Kt=o.n5z(Uo)))(Wt||Uo)}}(),Uo.\u0275dir=o.lG2({type:Uo,selectors:[["input","type","number","formControlName",""],["input","type","number","formControl",""],["input","type","number","ngModel",""]],hostBindings:function(Fe,Wt){1&Fe&&o.NdJ("input",function(Ki){return Wt.onChange(Ki.target.value)})("blur",function(){return Wt.onTouched()})},features:[o._Bn([Oa]),o.qOj]});const rl={provide:n,useExisting:(0,o.Gpc)(()=>gs),multi:!0};class ps{}ps.\u0275fac=function(Fe){return new(Fe||ps)},ps.\u0275mod=o.oAB({type:ps}),ps.\u0275inj=o.cJS({});class ts{constructor(){this._accessors=[]}add(Fe,Wt){this._accessors.push([Fe,Wt])}remove(Fe){for(let Wt=this._accessors.length-1;Wt>=0;--Wt)if(this._accessors[Wt][1]===Fe)return void this._accessors.splice(Wt,1)}select(Fe){this._accessors.forEach(Wt=>{this._isSameGroup(Wt,Fe)&&Wt[1]!==Fe&&Wt[1].fireUncheck(Fe.value)})}_isSameGroup(Fe,Wt){return!!Fe[0].control&&(Fe[0]._parent===Wt._control._parent&&Fe[1].name===Wt.name)}}ts.\u0275fac=function(Fe){return new(Fe||ts)},ts.\u0275prov=o.Yz7({token:ts,factory:ts.\u0275fac,providedIn:ps});class gs extends T{constructor(Fe,Wt,yi,Ki){super(Fe,Wt),this._registry=yi,this._injector=Ki,this.setDisabledStateFired=!1,this.onChange=()=>{},this.callSetDisabledState=(0,o.f3M)(ce,{optional:!0})??we}ngOnInit(){this._control=this._injector.get(Mn),this._checkName(),this._registry.add(this._control,this)}ngOnDestroy(){this._registry.remove(this)}writeValue(Fe){this._state=Fe===this.value,this.setProperty("checked",this._state)}registerOnChange(Fe){this._fn=Fe,this.onChange=()=>{Fe(this.value),this._registry.select(this)}}setDisabledState(Fe){(this.setDisabledStateFired||Fe||"whenDisabledForLegacyCode"===this.callSetDisabledState)&&this.setProperty("disabled",Fe),this.setDisabledStateFired=!0}fireUncheck(Fe){this.writeValue(Fe)}_checkName(){this.name&&this.formControlName&&(this.name,this.formControlName),!this.name&&this.formControlName&&(this.name=this.formControlName)}}gs.\u0275fac=function(Fe){return new(Fe||gs)(o.Y36(o.Qsj),o.Y36(o.SBq),o.Y36(ts),o.Y36(o.zs3))},gs.\u0275dir=o.lG2({type:gs,selectors:[["input","type","radio","formControlName",""],["input","type","radio","formControl",""],["input","type","radio","ngModel",""]],hostBindings:function(Fe,Wt){1&Fe&&o.NdJ("change",function(){return Wt.onChange()})("blur",function(){return Wt.onTouched()})},inputs:{name:"name",formControlName:"formControlName",value:"value"},features:[o._Bn([rl]),o.qOj]});const tc={provide:n,useExisting:(0,o.Gpc)(()=>$a),multi:!0};class $a extends T{writeValue(Fe){this.setProperty("value",parseFloat(Fe))}registerOnChange(Fe){this.onChange=Wt=>{Fe(""==Wt?null:parseFloat(Wt))}}}$a.\u0275fac=function(){let Kt;return function(Wt){return(Kt||(Kt=o.n5z($a)))(Wt||$a)}}(),$a.\u0275dir=o.lG2({type:$a,selectors:[["input","type","range","formControlName",""],["input","type","range","formControl",""],["input","type","range","ngModel",""]],hostBindings:function(Fe,Wt){1&Fe&&o.NdJ("change",function(Ki){return Wt.onChange(Ki.target.value)})("input",function(Ki){return Wt.onChange(Ki.target.value)})("blur",function(){return Wt.onTouched()})},features:[o._Bn([tc]),o.qOj]});const ln=new o.OlP("NgModelWithFormControlWarning"),Mi={provide:Mn,useExisting:(0,o.Gpc)(()=>Di)};class Di extends Mn{set isDisabled(Fe){}constructor(Fe,Wt,yi,Ki,ya){super(),this._ngModelWarningConfig=Ki,this.callSetDisabledState=ya,this.update=new o.vpe,this._ngModelWarningSent=!1,this._setValidators(Fe),this._setAsyncValidators(Wt),this.valueAccessor=Gn(0,yi)}ngOnChanges(Fe){if(this._isControlChanged(Fe)){const Wt=Fe.form.previousValue;Wt&&Tn(Wt,this,!1),qt(this.form,this,this.callSetDisabledState),this.form.updateValueAndValidity({emitEvent:!1})}Ft(Fe,this.viewModel)&&(this.form.setValue(this.model),this.viewModel=this.model)}ngOnDestroy(){this.form&&Tn(this.form,this,!1)}get path(){return[]}get control(){return this.form}viewToModelUpdate(Fe){this.viewModel=Fe,this.update.emit(Fe)}_isControlChanged(Fe){return Fe.hasOwnProperty("form")}}Di._ngModelWarningSentOnce=!1,Di.\u0275fac=function(Fe){return new(Fe||Di)(o.Y36(ve,10),o.Y36(ye,10),o.Y36(n,10),o.Y36(ln,8),o.Y36(ce,8))},Di.\u0275dir=o.lG2({type:Di,selectors:[["","formControl",""]],inputs:{form:["formControl","form"],isDisabled:["disabled","isDisabled"],model:["ngModel","model"]},outputs:{update:"ngModelChange"},exportAs:["ngForm"],features:[o._Bn([Mi]),o.qOj,o.TTD]});const Er={provide:Dn,useExisting:(0,o.Gpc)(()=>ur)};class ur extends Dn{constructor(Fe,Wt,yi){super(),this.callSetDisabledState=yi,this.submitted=!1,this._onCollectionChange=()=>this._updateDomValue(),this.directives=[],this.form=null,this.ngSubmit=new o.vpe,this._setValidators(Fe),this._setAsyncValidators(Wt)}ngOnChanges(Fe){this._checkFormPresent(),Fe.hasOwnProperty("form")&&(this._updateValidators(),this._updateDomValue(),this._updateRegistrations(),this._oldForm=this.form)}ngOnDestroy(){this.form&&(aa(this.form,this),this.form._onCollectionChange===this._onCollectionChange&&this.form._registerOnCollectionChange(()=>{}))}get formDirective(){return this}get control(){return this.form}get path(){return[]}addControl(Fe){const Wt=this.form.get(Fe.path);return qt(Wt,Fe,this.callSetDisabledState),Wt.updateValueAndValidity({emitEvent:!1}),this.directives.push(Fe),Wt}getControl(Fe){return this.form.get(Fe.path)}removeControl(Fe){Tn(Fe.control||null,Fe,!1),function xi(Kt,Fe){const Wt=Kt.indexOf(Fe);Wt>-1&&Kt.splice(Wt,1)}(this.directives,Fe)}addFormGroup(Fe){this._setUpFormContainer(Fe)}removeFormGroup(Fe){this._cleanUpFormContainer(Fe)}getFormGroup(Fe){return this.form.get(Fe.path)}addFormArray(Fe){this._setUpFormContainer(Fe)}removeFormArray(Fe){this._cleanUpFormContainer(Fe)}getFormArray(Fe){return this.form.get(Fe.path)}updateModel(Fe,Wt){this.form.get(Fe.path).setValue(Wt)}onSubmit(Fe){return this.submitted=!0,wn(this.form,this.directives),this.ngSubmit.emit(Fe),"dialog"===Fe?.target?.method}onReset(){this.resetForm()}resetForm(Fe){this.form.reset(Fe),this.submitted=!1}_updateDomValue(){this.directives.forEach(Fe=>{const Wt=Fe.control,yi=this.form.get(Fe.path);Wt!==yi&&(Tn(Wt||null,Fe),yi instanceof Qt&&(qt(yi,Fe,this.callSetDisabledState),Fe.control=yi))}),this.form._updateTreeValidity({emitEvent:!1})}_setUpFormContainer(Fe){const Wt=this.form.get(Fe.path);Zn(Wt,Fe),Wt.updateValueAndValidity({emitEvent:!1})}_cleanUpFormContainer(Fe){if(this.form){const Wt=this.form.get(Fe.path);Wt&&function Ci(Kt,Fe){return aa(Kt,Fe)}(Wt,Fe)&&Wt.updateValueAndValidity({emitEvent:!1})}}_updateRegistrations(){this.form._registerOnCollectionChange(this._onCollectionChange),this._oldForm&&this._oldForm._registerOnCollectionChange(()=>{})}_updateValidators(){rr(this.form,this),this._oldForm&&aa(this._oldForm,this)}_checkFormPresent(){this.form}}ur.\u0275fac=function(Fe){return new(Fe||ur)(o.Y36(ve,10),o.Y36(ye,10),o.Y36(ce,8))},ur.\u0275dir=o.lG2({type:ur,selectors:[["","formGroup",""]],hostBindings:function(Fe,Wt){1&Fe&&o.NdJ("submit",function(Ki){return Wt.onSubmit(Ki)})("reset",function(){return Wt.onReset()})},inputs:{form:["formGroup","form"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[o._Bn([Er]),o.qOj,o.TTD]});const gi={provide:Dn,useExisting:(0,o.Gpc)(()=>$t)};class $t extends cn{constructor(Fe,Wt,yi){super(),this._parent=Fe,this._setValidators(Wt),this._setAsyncValidators(yi)}_checkParentType(){Ds(this._parent)}}$t.\u0275fac=function(Fe){return new(Fe||$t)(o.Y36(Dn,13),o.Y36(ve,10),o.Y36(ye,10))},$t.\u0275dir=o.lG2({type:$t,selectors:[["","formGroupName",""]],inputs:{name:["formGroupName","name"]},features:[o._Bn([gi]),o.qOj]});const Ma={provide:Dn,useExisting:(0,o.Gpc)(()=>Vo)};class Vo extends Dn{constructor(Fe,Wt,yi){super(),this._parent=Fe,this._setValidators(Wt),this._setAsyncValidators(yi)}ngOnInit(){this._checkParentType(),this.formDirective.addFormArray(this)}ngOnDestroy(){this.formDirective&&this.formDirective.removeFormArray(this)}get control(){return this.formDirective.getFormArray(this)}get formDirective(){return this._parent?this._parent.formDirective:null}get path(){return Qe(null==this.name?this.name:this.name.toString(),this._parent)}_checkParentType(){Ds(this._parent)}}function Ds(Kt){return!(Kt instanceof $t||Kt instanceof ur||Kt instanceof Vo)}Vo.\u0275fac=function(Fe){return new(Fe||Vo)(o.Y36(Dn,13),o.Y36(ve,10),o.Y36(ye,10))},Vo.\u0275dir=o.lG2({type:Vo,selectors:[["","formArrayName",""]],inputs:{name:["formArrayName","name"]},features:[o._Bn([Ma]),o.qOj]});const ja={provide:Mn,useExisting:(0,o.Gpc)(()=>wa)};class wa extends Mn{set isDisabled(Fe){}constructor(Fe,Wt,yi,Ki,ya){super(),this._ngModelWarningConfig=ya,this._added=!1,this.update=new o.vpe,this._ngModelWarningSent=!1,this._parent=Fe,this._setValidators(Wt),this._setAsyncValidators(yi),this.valueAccessor=Gn(0,Ki)}ngOnChanges(Fe){this._added||this._setUpControl(),Ft(Fe,this.viewModel)&&(this.viewModel=this.model,this.formDirective.updateModel(this,this.model))}ngOnDestroy(){this.formDirective&&this.formDirective.removeControl(this)}viewToModelUpdate(Fe){this.viewModel=Fe,this.update.emit(Fe)}get path(){return Qe(null==this.name?this.name:this.name.toString(),this._parent)}get formDirective(){return this._parent?this._parent.formDirective:null}_checkParentType(){}_setUpControl(){this._checkParentType(),this.control=this.formDirective.addControl(this),this._added=!0}}wa._ngModelWarningSentOnce=!1,wa.\u0275fac=function(Fe){return new(Fe||wa)(o.Y36(Dn,13),o.Y36(ve,10),o.Y36(ye,10),o.Y36(n,10),o.Y36(ln,8))},wa.\u0275dir=o.lG2({type:wa,selectors:[["","formControlName",""]],inputs:{name:["formControlName","name"],isDisabled:["disabled","isDisabled"],model:["ngModel","model"]},outputs:{update:"ngModelChange"},features:[o._Bn([ja]),o.qOj,o.TTD]});const ns={provide:n,useExisting:(0,o.Gpc)(()=>Ts),multi:!0};function Cs(Kt,Fe){return null==Kt?`${Fe}`:(Fe&&"object"==typeof Fe&&(Fe="Object"),`${Kt}: ${Fe}`.slice(0,50))}class Ts extends T{constructor(){super(...arguments),this._optionMap=new Map,this._idCounter=0,this._compareWith=Object.is}set compareWith(Fe){this._compareWith=Fe}writeValue(Fe){this.value=Fe;const yi=Cs(this._getOptionId(Fe),Fe);this.setProperty("value",yi)}registerOnChange(Fe){this.onChange=Wt=>{this.value=this._getOptionValue(Wt),Fe(this.value)}}_registerOption(){return(this._idCounter++).toString()}_getOptionId(Fe){for(const Wt of Array.from(this._optionMap.keys()))if(this._compareWith(this._optionMap.get(Wt),Fe))return Wt;return null}_getOptionValue(Fe){const Wt=function $r(Kt){return Kt.split(":")[0]}(Fe);return this._optionMap.has(Wt)?this._optionMap.get(Wt):Fe}}Ts.\u0275fac=function(){let Kt;return function(Wt){return(Kt||(Kt=o.n5z(Ts)))(Wt||Ts)}}(),Ts.\u0275dir=o.lG2({type:Ts,selectors:[["select","formControlName","",3,"multiple",""],["select","formControl","",3,"multiple",""],["select","ngModel","",3,"multiple",""]],hostBindings:function(Fe,Wt){1&Fe&&o.NdJ("change",function(Ki){return Wt.onChange(Ki.target.value)})("blur",function(){return Wt.onTouched()})},inputs:{compareWith:"compareWith"},features:[o._Bn([ns]),o.qOj]});class Gl{constructor(Fe,Wt,yi){this._element=Fe,this._renderer=Wt,this._select=yi,this._select&&(this.id=this._select._registerOption())}set ngValue(Fe){null!=this._select&&(this._select._optionMap.set(this.id,Fe),this._setElementValue(Cs(this.id,Fe)),this._select.writeValue(this._select.value))}set value(Fe){this._setElementValue(Fe),this._select&&this._select.writeValue(this._select.value)}_setElementValue(Fe){this._renderer.setProperty(this._element.nativeElement,"value",Fe)}ngOnDestroy(){this._select&&(this._select._optionMap.delete(this.id),this._select.writeValue(this._select.value))}}Gl.\u0275fac=function(Fe){return new(Fe||Gl)(o.Y36(o.SBq),o.Y36(o.Qsj),o.Y36(Ts,9))},Gl.\u0275dir=o.lG2({type:Gl,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"}});const ol={provide:n,useExisting:(0,o.Gpc)(()=>tn),multi:!0};function zc(Kt,Fe){return null==Kt?`${Fe}`:("string"==typeof Fe&&(Fe=`'${Fe}'`),Fe&&"object"==typeof Fe&&(Fe="Object"),`${Kt}: ${Fe}`.slice(0,50))}class tn extends T{constructor(){super(...arguments),this._optionMap=new Map,this._idCounter=0,this._compareWith=Object.is}set compareWith(Fe){this._compareWith=Fe}writeValue(Fe){let Wt;if(this.value=Fe,Array.isArray(Fe)){const yi=Fe.map(Ki=>this._getOptionId(Ki));Wt=(Ki,ya)=>{Ki._setSelected(yi.indexOf(ya.toString())>-1)}}else Wt=(yi,Ki)=>{yi._setSelected(!1)};this._optionMap.forEach(Wt)}registerOnChange(Fe){this.onChange=Wt=>{const yi=[],Ki=Wt.selectedOptions;if(void 0!==Ki){const ya=Ki;for(let Na=0;Na<ya.length;Na++){const qi=ya[Na],ia=this._getOptionValue(qi.value);yi.push(ia)}}else{const ya=Wt.options;for(let Na=0;Na<ya.length;Na++){const qi=ya[Na];if(qi.selected){const ia=this._getOptionValue(qi.value);yi.push(ia)}}}this.value=yi,Fe(yi)}}_registerOption(Fe){const Wt=(this._idCounter++).toString();return this._optionMap.set(Wt,Fe),Wt}_getOptionId(Fe){for(const Wt of Array.from(this._optionMap.keys()))if(this._compareWith(this._optionMap.get(Wt)._value,Fe))return Wt;return null}_getOptionValue(Fe){const Wt=function al(Kt){return Kt.split(":")[0]}(Fe);return this._optionMap.has(Wt)?this._optionMap.get(Wt)._value:Fe}}tn.\u0275fac=function(){let Kt;return function(Wt){return(Kt||(Kt=o.n5z(tn)))(Wt||tn)}}(),tn.\u0275dir=o.lG2({type:tn,selectors:[["select","multiple","","formControlName",""],["select","multiple","","formControl",""],["select","multiple","","ngModel",""]],hostBindings:function(Fe,Wt){1&Fe&&o.NdJ("change",function(Ki){return Wt.onChange(Ki.target)})("blur",function(){return Wt.onTouched()})},inputs:{compareWith:"compareWith"},features:[o._Bn([ol]),o.qOj]});class ti{constructor(Fe,Wt,yi){this._element=Fe,this._renderer=Wt,this._select=yi,this._select&&(this.id=this._select._registerOption(this))}set ngValue(Fe){null!=this._select&&(this._value=Fe,this._setElementValue(zc(this.id,Fe)),this._select.writeValue(this._select.value))}set value(Fe){this._select?(this._value=Fe,this._setElementValue(zc(this.id,Fe)),this._select.writeValue(this._select.value)):this._setElementValue(Fe)}_setElementValue(Fe){this._renderer.setProperty(this._element.nativeElement,"value",Fe)}_setSelected(Fe){this._renderer.setProperty(this._element.nativeElement,"selected",Fe)}ngOnDestroy(){this._select&&(this._select._optionMap.delete(this.id),this._select.writeValue(this._select.value))}}function _i(Kt){return"number"==typeof Kt?Kt:parseInt(Kt,10)}function ar(Kt){return"number"==typeof Kt?Kt:parseFloat(Kt)}ti.\u0275fac=function(Fe){return new(Fe||ti)(o.Y36(o.SBq),o.Y36(o.Qsj),o.Y36(tn,9))},ti.\u0275dir=o.lG2({type:ti,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"}});class vr{constructor(){this._validator=le}ngOnChanges(Fe){if(this.inputName in Fe){const Wt=this.normalizeInput(Fe[this.inputName].currentValue);this._enabled=this.enabled(Wt),this._validator=this._enabled?this.createValidator(Wt):le,this._onChange&&this._onChange()}}validate(Fe){return this._validator(Fe)}registerOnValidatorChange(Fe){this._onChange=Fe}enabled(Fe){return null!=Fe}}vr.\u0275fac=function(Fe){return new(Fe||vr)},vr.\u0275dir=o.lG2({type:vr,features:[o.TTD]});const Qr={provide:ve,useExisting:(0,o.Gpc)(()=>Li),multi:!0};class Li extends vr{constructor(){super(...arguments),this.inputName="max",this.normalizeInput=Fe=>ar(Fe),this.createValidator=Fe=>Pe(Fe)}}Li.\u0275fac=function(){let Kt;return function(Wt){return(Kt||(Kt=o.n5z(Li)))(Wt||Li)}}(),Li.\u0275dir=o.lG2({type:Li,selectors:[["input","type","number","max","","formControlName",""],["input","type","number","max","","formControl",""],["input","type","number","max","","ngModel",""]],hostVars:1,hostBindings:function(Fe,Wt){2&Fe&&o.uIk("max",Wt._enabled?Wt.max:null)},inputs:{max:"max"},features:[o._Bn([Qr]),o.qOj]});const Ta={provide:ve,useExisting:(0,o.Gpc)(()=>La),multi:!0};class La extends vr{constructor(){super(...arguments),this.inputName="min",this.normalizeInput=Fe=>ar(Fe),this.createValidator=Fe=>pe(Fe)}}La.\u0275fac=function(){let Kt;return function(Wt){return(Kt||(Kt=o.n5z(La)))(Wt||La)}}(),La.\u0275dir=o.lG2({type:La,selectors:[["input","type","number","min","","formControlName",""],["input","type","number","min","","formControl",""],["input","type","number","min","","ngModel",""]],hostVars:1,hostBindings:function(Fe,Wt){2&Fe&&o.uIk("min",Wt._enabled?Wt.min:null)},inputs:{min:"min"},features:[o._Bn([Ta]),o.qOj]});const Ps={provide:ve,useExisting:(0,o.Gpc)(()=>yt),multi:!0},is={provide:ve,useExisting:(0,o.Gpc)(()=>Dt),multi:!0};class yt extends vr{constructor(){super(...arguments),this.inputName="required",this.normalizeInput=o.D6c,this.createValidator=Fe=>xe}enabled(Fe){return Fe}}yt.\u0275fac=function(){let Kt;return function(Wt){return(Kt||(Kt=o.n5z(yt)))(Wt||yt)}}(),yt.\u0275dir=o.lG2({type:yt,selectors:[["","required","","formControlName","",3,"type","checkbox"],["","required","","formControl","",3,"type","checkbox"],["","required","","ngModel","",3,"type","checkbox"]],hostVars:1,hostBindings:function(Fe,Wt){2&Fe&&o.uIk("required",Wt._enabled?"":null)},inputs:{required:"required"},features:[o._Bn([Ps]),o.qOj]});class Dt extends yt{constructor(){super(...arguments),this.createValidator=Fe=>de}}Dt.\u0275fac=function(){let Kt;return function(Wt){return(Kt||(Kt=o.n5z(Dt)))(Wt||Dt)}}(),Dt.\u0275dir=o.lG2({type:Dt,selectors:[["input","type","checkbox","required","","formControlName",""],["input","type","checkbox","required","","formControl",""],["input","type","checkbox","required","","ngModel",""]],hostVars:1,hostBindings:function(Fe,Wt){2&Fe&&o.uIk("required",Wt._enabled?"":null)},features:[o._Bn([is]),o.qOj]});const We={provide:ve,useExisting:(0,o.Gpc)(()=>Rt),multi:!0};class Rt extends vr{constructor(){super(...arguments),this.inputName="email",this.normalizeInput=o.D6c,this.createValidator=Fe=>re}enabled(Fe){return Fe}}Rt.\u0275fac=function(){let Kt;return function(Wt){return(Kt||(Kt=o.n5z(Rt)))(Wt||Rt)}}(),Rt.\u0275dir=o.lG2({type:Rt,selectors:[["","email","","formControlName",""],["","email","","formControl",""],["","email","","ngModel",""]],inputs:{email:"email"},features:[o._Bn([We]),o.qOj]});const Qn={provide:ve,useExisting:(0,o.Gpc)(()=>fi),multi:!0};class fi extends vr{constructor(){super(...arguments),this.inputName="minlength",this.normalizeInput=Fe=>_i(Fe),this.createValidator=Fe=>oe(Fe)}}fi.\u0275fac=function(){let Kt;return function(Wt){return(Kt||(Kt=o.n5z(fi)))(Wt||fi)}}(),fi.\u0275dir=o.lG2({type:fi,selectors:[["","minlength","","formControlName",""],["","minlength","","formControl",""],["","minlength","","ngModel",""]],hostVars:1,hostBindings:function(Fe,Wt){2&Fe&&o.uIk("minlength",Wt._enabled?Wt.minlength:null)},inputs:{minlength:"minlength"},features:[o._Bn([Qn]),o.qOj]});const Xi={provide:ve,useExisting:(0,o.Gpc)(()=>wr),multi:!0};class wr extends vr{constructor(){super(...arguments),this.inputName="maxlength",this.normalizeInput=Fe=>_i(Fe),this.createValidator=Fe=>me(Fe)}}wr.\u0275fac=function(){let Kt;return function(Wt){return(Kt||(Kt=o.n5z(wr)))(Wt||wr)}}(),wr.\u0275dir=o.lG2({type:wr,selectors:[["","maxlength","","formControlName",""],["","maxlength","","formControl",""],["","maxlength","","ngModel",""]],hostVars:1,hostBindings:function(Fe,Wt){2&Fe&&o.uIk("maxlength",Wt._enabled?Wt.maxlength:null)},inputs:{maxlength:"maxlength"},features:[o._Bn([Xi]),o.qOj]});const Mo={provide:ve,useExisting:(0,o.Gpc)(()=>ro),multi:!0};class ro extends vr{constructor(){super(...arguments),this.inputName="pattern",this.normalizeInput=Fe=>Fe,this.createValidator=Fe=>be(Fe)}}ro.\u0275fac=function(){let Kt;return function(Wt){return(Kt||(Kt=o.n5z(ro)))(Wt||ro)}}(),ro.\u0275dir=o.lG2({type:ro,selectors:[["","pattern","","formControlName",""],["","pattern","","formControl",""],["","pattern","","ngModel",""]],hostVars:1,hostBindings:function(Fe,Wt){2&Fe&&o.uIk("pattern",Wt._enabled?Wt.pattern:null)},inputs:{pattern:"pattern"},features:[o._Bn([Mo]),o.qOj]});class To{}To.\u0275fac=function(Fe){return new(Fe||To)},To.\u0275mod=o.oAB({type:To}),To.\u0275inj=o.cJS({imports:[ps]});class Ao extends Sn{constructor(Fe,Wt,yi){super(jn(Wt),Yt(yi,Wt)),this.controls=Fe,this._initObservables(),this._setUpdateStrategy(Wt),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}at(Fe){return this.controls[this._adjustIndex(Fe)]}push(Fe,Wt={}){this.controls.push(Fe),this._registerControl(Fe),this.updateValueAndValidity({emitEvent:Wt.emitEvent}),this._onCollectionChange()}insert(Fe,Wt,yi={}){this.controls.splice(Fe,0,Wt),this._registerControl(Wt),this.updateValueAndValidity({emitEvent:yi.emitEvent})}removeAt(Fe,Wt={}){let yi=this._adjustIndex(Fe);yi<0&&(yi=0),this.controls[yi]&&this.controls[yi]._registerOnCollectionChange(()=>{}),this.controls.splice(yi,1),this.updateValueAndValidity({emitEvent:Wt.emitEvent})}setControl(Fe,Wt,yi={}){let Ki=this._adjustIndex(Fe);Ki<0&&(Ki=0),this.controls[Ki]&&this.controls[Ki]._registerOnCollectionChange(()=>{}),this.controls.splice(Ki,1),Wt&&(this.controls.splice(Ki,0,Wt),this._registerControl(Wt)),this.updateValueAndValidity({emitEvent:yi.emitEvent}),this._onCollectionChange()}get length(){return this.controls.length}setValue(Fe,Wt={}){pr(this,!1,Fe),Fe.forEach((yi,Ki)=>{Nn(this,!1,Ki),this.at(Ki).setValue(yi,{onlySelf:!0,emitEvent:Wt.emitEvent})}),this.updateValueAndValidity(Wt)}patchValue(Fe,Wt={}){null!=Fe&&(Fe.forEach((yi,Ki)=>{this.at(Ki)&&this.at(Ki).patchValue(yi,{onlySelf:!0,emitEvent:Wt.emitEvent})}),this.updateValueAndValidity(Wt))}reset(Fe=[],Wt={}){this._forEachChild((yi,Ki)=>{yi.reset(Fe[Ki],{onlySelf:!0,emitEvent:Wt.emitEvent})}),this._updatePristine(Wt),this._updateTouched(Wt),this.updateValueAndValidity(Wt)}getRawValue(){return this.controls.map(Fe=>Fe.getRawValue())}clear(Fe={}){this.controls.length<1||(this._forEachChild(Wt=>Wt._registerOnCollectionChange(()=>{})),this.controls.splice(0),this.updateValueAndValidity({emitEvent:Fe.emitEvent}))}_adjustIndex(Fe){return Fe<0?Fe+this.length:Fe}_syncPendingControls(){let Fe=this.controls.reduce((Wt,yi)=>!!yi._syncPendingControls()||Wt,!1);return Fe&&this.updateValueAndValidity({onlySelf:!0}),Fe}_forEachChild(Fe){this.controls.forEach((Wt,yi)=>{Fe(Wt,yi)})}_updateValue(){this.value=this.controls.filter(Fe=>Fe.enabled||this.disabled).map(Fe=>Fe.value)}_anyControls(Fe){return this.controls.some(Wt=>Wt.enabled&&Fe(Wt))}_setUpControls(){this._forEachChild(Fe=>this._registerControl(Fe))}_allControlsDisabled(){for(const Fe of this.controls)if(Fe.enabled)return!1;return this.controls.length>0||this.disabled}_registerControl(Fe){Fe.setParent(this),Fe._registerOnCollectionChange(this._onCollectionChange)}_find(Fe){return this.at(Fe)??null}}function Ra(Kt){return!!Kt&&(void 0!==Kt.asyncValidators||void 0!==Kt.validators||void 0!==Kt.updateOn)}class ba{constructor(){this.useNonNullable=!1}get nonNullable(){const Fe=new ba;return Fe.useNonNullable=!0,Fe}group(Fe,Wt=null){const yi=this._reduceControls(Fe);let Ki={};return Ra(Wt)?Ki=Wt:null!==Wt&&(Ki.validators=Wt.validator,Ki.asyncValidators=Wt.asyncValidator),new Pn(yi,Ki)}record(Fe,Wt=null){const yi=this._reduceControls(Fe);return new hn(yi,Wt)}control(Fe,Wt,yi){let Ki={};return this.useNonNullable?(Ra(Wt)?Ki=Wt:(Ki.validators=Wt,Ki.asyncValidators=yi),new Qt(Fe,{...Ki,nonNullable:!0})):new Qt(Fe,Wt,yi)}array(Fe,Wt,yi){const Ki=Fe.map(ya=>this._createControl(ya));return new Ao(Ki,Wt,yi)}_reduceControls(Fe){const Wt={};return Object.keys(Fe).forEach(yi=>{Wt[yi]=this._createControl(Fe[yi])}),Wt}_createControl(Fe){if(Fe instanceof Qt)return Fe;if(Fe instanceof Sn)return Fe;if(Array.isArray(Fe)){const Wt=Fe[0],yi=Fe.length>1?Fe[1]:null,Ki=Fe.length>2?Fe[2]:null;return this.control(Wt,yi,Ki)}return this.control(Fe)}}ba.\u0275fac=function(Fe){return new(Fe||ba)},ba.\u0275prov=o.Yz7({token:ba,factory:ba.\u0275fac,providedIn:"root"});class Jt{}Jt.\u0275fac=function(Fe){return new(Fe||Jt)},Jt.\u0275prov=o.Yz7({token:Jt,factory:function(){return(0,o.f3M)(ba).nonNullable},providedIn:"root"});class De extends ba{group(Fe,Wt=null){return super.group(Fe,Wt)}control(Fe,Wt,yi){return super.control(Fe,Wt,yi)}array(Fe,Wt,yi){return super.array(Fe,Wt,yi)}}De.\u0275fac=function(){let Kt;return function(Wt){return(Kt||(Kt=o.n5z(De)))(Wt||De)}}(),De.\u0275prov=o.Yz7({token:De,factory:De.\u0275fac,providedIn:"root"});new o.GfV("15.2.9");class Xt{static withConfig(Fe){return{ngModule:Xt,providers:[{provide:ce,useValue:Fe.callSetDisabledState??we}]}}}Xt.\u0275fac=function(Fe){return new(Fe||Xt)},Xt.\u0275mod=o.oAB({type:Xt}),Xt.\u0275inj=o.cJS({imports:[To]});class Qi{static withConfig(Fe){return{ngModule:Qi,providers:[{provide:ln,useValue:Fe.warnOnNgModelWithFormControl??"always"},{provide:ce,useValue:Fe.callSetDisabledState??we}]}}}Qi.\u0275fac=function(Fe){return new(Fe||Qi)},Qi.\u0275mod=o.oAB({type:Qi}),Qi.\u0275inj=o.cJS({imports:[To]})},4859:(qe,I,p)=>{"use strict";p.d(I,{RK:()=>Be,lW:()=>de,ot:()=>mt});var o=p(83353),e=p(94650),l=p(12693),D=p(3238),g=p(21281);const E=["mat-button",""],T=[[["",8,"material-icons",3,"iconPositionEnd",""],["mat-icon",3,"iconPositionEnd",""],["","matButtonIcon","",3,"iconPositionEnd",""]],"*",[["","iconPositionEnd","",8,"material-icons"],["mat-icon","iconPositionEnd",""],["","matButtonIcon","","iconPositionEnd",""]]],n=[".material-icons:not([iconPositionEnd]), mat-icon:not([iconPositionEnd]), [matButtonIcon]:not([iconPositionEnd])","*",".material-icons[iconPositionEnd], mat-icon[iconPositionEnd], [matButtonIcon][iconPositionEnd]"],w=".cdk-high-contrast-active .mat-mdc-button:not(.mdc-button--outlined),.cdk-high-contrast-active .mat-mdc-unelevated-button:not(.mdc-button--outlined),.cdk-high-contrast-active .mat-mdc-raised-button:not(.mdc-button--outlined),.cdk-high-contrast-active .mat-mdc-outlined-button:not(.mdc-button--outlined),.cdk-high-contrast-active .mat-mdc-icon-button{outline:solid 1px}",B=["mat-fab",""],Y=["mat-mini-fab",""],V='.mdc-touch-target-wrapper{display:inline}.mdc-elevation-overlay{position:absolute;border-radius:inherit;pointer-events:none;opacity:var(--mdc-elevation-overlay-opacity, 0);transition:opacity 280ms cubic-bezier(0.4, 0, 0.2, 1)}.mdc-fab{position:relative;display:inline-flex;position:relative;align-items:center;justify-content:center;box-sizing:border-box;width:56px;height:56px;padding:0;border:none;fill:currentColor;text-decoration:none;cursor:pointer;user-select:none;-moz-appearance:none;-webkit-appearance:none;overflow:visible;transition:box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1),opacity 15ms linear 30ms,transform 270ms 0ms cubic-bezier(0, 0, 0.2, 1)}.mdc-fab .mdc-elevation-overlay{width:100%;height:100%;top:0;left:0}.mdc-fab[hidden]{display:none}.mdc-fab::-moz-focus-inner{padding:0;border:0}.mdc-fab .mdc-fab__focus-ring{position:absolute}.mdc-fab.mdc-ripple-upgraded--background-focused .mdc-fab__focus-ring,.mdc-fab:not(.mdc-ripple-upgraded):focus .mdc-fab__focus-ring{pointer-events:none;border:2px solid rgba(0,0,0,0);border-radius:6px;box-sizing:content-box;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);height:calc(\n      100% + 4px\n    );width:calc(\n      100% + 4px\n    )}@media screen and (forced-colors: active){.mdc-fab.mdc-ripple-upgraded--background-focused .mdc-fab__focus-ring,.mdc-fab:not(.mdc-ripple-upgraded):focus .mdc-fab__focus-ring{border-color:CanvasText}}.mdc-fab.mdc-ripple-upgraded--background-focused .mdc-fab__focus-ring::after,.mdc-fab:not(.mdc-ripple-upgraded):focus .mdc-fab__focus-ring::after{content:"";border:2px solid rgba(0,0,0,0);border-radius:8px;display:block;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);height:calc(100% + 4px);width:calc(100% + 4px)}@media screen and (forced-colors: active){.mdc-fab.mdc-ripple-upgraded--background-focused .mdc-fab__focus-ring::after,.mdc-fab:not(.mdc-ripple-upgraded):focus .mdc-fab__focus-ring::after{border-color:CanvasText}}.mdc-fab:active,.mdc-fab:focus{outline:none}.mdc-fab:hover{cursor:pointer}.mdc-fab>svg{width:100%}.mdc-fab--mini{width:40px;height:40px}.mdc-fab--extended{border-radius:24px;padding-left:20px;padding-right:20px;width:auto;max-width:100%;height:48px;line-height:normal}.mdc-fab--extended .mdc-fab__ripple{border-radius:24px}.mdc-fab--extended .mdc-fab__icon{margin-left:calc(12px - 20px);margin-right:12px}[dir=rtl] .mdc-fab--extended .mdc-fab__icon,.mdc-fab--extended .mdc-fab__icon[dir=rtl]{margin-left:12px;margin-right:calc(12px - 20px)}.mdc-fab--extended .mdc-fab__label+.mdc-fab__icon{margin-left:12px;margin-right:calc(12px - 20px)}[dir=rtl] .mdc-fab--extended .mdc-fab__label+.mdc-fab__icon,.mdc-fab--extended .mdc-fab__label+.mdc-fab__icon[dir=rtl]{margin-left:calc(12px - 20px);margin-right:12px}.mdc-fab--touch{margin-top:4px;margin-bottom:4px;margin-right:4px;margin-left:4px}.mdc-fab--touch .mdc-fab__touch{position:absolute;top:50%;height:48px;left:50%;width:48px;transform:translate(-50%, -50%)}.mdc-fab::before{position:absolute;box-sizing:border-box;width:100%;height:100%;top:0;left:0;border:1px solid rgba(0,0,0,0);border-radius:inherit;content:"";pointer-events:none}@media screen and (forced-colors: active){.mdc-fab::before{border-color:CanvasText}}.mdc-fab__label{justify-content:flex-start;text-overflow:ellipsis;white-space:nowrap;overflow-x:hidden;overflow-y:visible}.mdc-fab__icon{transition:transform 180ms 90ms cubic-bezier(0, 0, 0.2, 1);fill:currentColor;will-change:transform}.mdc-fab .mdc-fab__icon{display:inline-flex;align-items:center;justify-content:center}.mdc-fab--exited{transform:scale(0);opacity:0;transition:opacity 15ms linear 150ms,transform 180ms 0ms cubic-bezier(0.4, 0, 1, 1)}.mdc-fab--exited .mdc-fab__icon{transform:scale(0);transition:transform 135ms 0ms cubic-bezier(0.4, 0, 1, 1)}.mdc-fab .mdc-fab__icon{width:24px;height:24px;font-size:24px}.mdc-fab:not(.mdc-fab--extended){border-radius:50%}.mdc-fab:not(.mdc-fab--extended) .mdc-fab__ripple{border-radius:50%}.mat-mdc-fab,.mat-mdc-mini-fab{-webkit-tap-highlight-color:rgba(0,0,0,0);background-color:var(--mdc-fab-container-color, transparent);box-shadow:0px 3px 5px -1px rgba(0, 0, 0, 0.2), 0px 6px 10px 0px rgba(0, 0, 0, 0.14), 0px 1px 18px 0px rgba(0, 0, 0, 0.12);color:var(--mat-mdc-fab-color, inherit);flex-shrink:0}.mat-mdc-fab .mat-mdc-button-ripple,.mat-mdc-fab .mat-mdc-button-persistent-ripple,.mat-mdc-fab .mat-mdc-button-persistent-ripple::before,.mat-mdc-mini-fab .mat-mdc-button-ripple,.mat-mdc-mini-fab .mat-mdc-button-persistent-ripple,.mat-mdc-mini-fab .mat-mdc-button-persistent-ripple::before{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none;border-radius:inherit}.mat-mdc-fab .mat-mdc-button-persistent-ripple::before,.mat-mdc-mini-fab .mat-mdc-button-persistent-ripple::before{content:"";opacity:0;background-color:var(--mat-mdc-button-persistent-ripple-color)}.mat-mdc-fab .mat-ripple-element,.mat-mdc-mini-fab .mat-ripple-element{background-color:var(--mat-mdc-button-ripple-color)}.mat-mdc-fab .mdc-button__label,.mat-mdc-mini-fab .mdc-button__label{z-index:1}.mat-mdc-fab .mat-mdc-focus-indicator,.mat-mdc-mini-fab .mat-mdc-focus-indicator{top:0;left:0;right:0;bottom:0;position:absolute}.mat-mdc-fab:focus .mat-mdc-focus-indicator::before,.mat-mdc-mini-fab:focus .mat-mdc-focus-indicator::before{content:""}.mat-mdc-fab .mat-mdc-button-touch-target,.mat-mdc-mini-fab .mat-mdc-button-touch-target{position:absolute;top:50%;height:48px;left:50%;width:48px;transform:translate(-50%, -50%)}.mat-mdc-fab._mat-animation-noopable,.mat-mdc-mini-fab._mat-animation-noopable{transition:none !important;animation:none !important}.mat-mdc-fab:not(:disabled) .mdc-fab__icon,.mat-mdc-mini-fab:not(:disabled) .mdc-fab__icon{color:var(--mdc-fab-icon-color, inherit)}.mat-mdc-fab:not(.mdc-fab--extended),.mat-mdc-mini-fab:not(.mdc-fab--extended){border-radius:var(--mdc-fab-container-shape, 50%)}.mat-mdc-fab:not(.mdc-fab--extended) .mdc-fab__ripple,.mat-mdc-mini-fab:not(.mdc-fab--extended) .mdc-fab__ripple{border-radius:var(--mdc-fab-container-shape, 50%)}.mat-mdc-fab:hover,.mat-mdc-fab:focus,.mat-mdc-mini-fab:hover,.mat-mdc-mini-fab:focus{box-shadow:0px 5px 5px -3px rgba(0, 0, 0, 0.2), 0px 8px 10px 1px rgba(0, 0, 0, 0.14), 0px 3px 14px 2px rgba(0, 0, 0, 0.12)}.mat-mdc-fab:active,.mat-mdc-fab:focus:active,.mat-mdc-mini-fab:active,.mat-mdc-mini-fab:focus:active{box-shadow:0px 7px 8px -4px rgba(0, 0, 0, 0.2), 0px 12px 17px 2px rgba(0, 0, 0, 0.14), 0px 5px 22px 4px rgba(0, 0, 0, 0.12)}.mat-mdc-fab[disabled],.mat-mdc-mini-fab[disabled]{cursor:default;pointer-events:none;box-shadow:0px 0px 0px 0px rgba(0, 0, 0, 0.2), 0px 0px 0px 0px rgba(0, 0, 0, 0.14), 0px 0px 0px 0px rgba(0, 0, 0, 0.12)}.mat-mdc-fab:not(.mdc-ripple-upgraded):focus::before,.mat-mdc-mini-fab:not(.mdc-ripple-upgraded):focus::before{background:rgba(0,0,0,0);opacity:1}.mat-mdc-fab .mat-icon,.mat-mdc-fab .material-icons,.mat-mdc-mini-fab .mat-icon,.mat-mdc-mini-fab .material-icons{transition:transform 180ms 90ms cubic-bezier(0, 0, 0.2, 1);fill:currentColor;will-change:transform}.mat-mdc-fab .mat-mdc-focus-indicator::before,.mat-mdc-mini-fab .mat-mdc-focus-indicator::before{margin:calc(calc(var(--mat-mdc-focus-indicator-border-width, 3px) + 2px) * -1)}.mat-mdc-extended-fab{border-radius:24px;padding-left:20px;padding-right:20px;width:auto;max-width:100%;height:48px;line-height:normal}.mat-mdc-extended-fab .mdc-fab__ripple{border-radius:24px}.mat-mdc-extended-fab .mdc-fab__icon{margin-left:calc(12px - 20px);margin-right:12px}[dir=rtl] .mat-mdc-extended-fab .mdc-fab__icon,.mat-mdc-extended-fab .mdc-fab__icon[dir=rtl]{margin-left:12px;margin-right:calc(12px - 20px)}.mat-mdc-extended-fab .mdc-fab__label+.mdc-fab__icon{margin-left:12px;margin-right:calc(12px - 20px)}[dir=rtl] .mat-mdc-extended-fab .mdc-fab__label+.mdc-fab__icon,.mat-mdc-extended-fab .mdc-fab__label+.mdc-fab__icon[dir=rtl]{margin-left:calc(12px - 20px);margin-right:12px}.mat-mdc-extended-fab>.mat-icon,.mat-mdc-extended-fab>.material-icons{margin-left:calc(12px - 20px);margin-right:12px}[dir=rtl] .mat-mdc-extended-fab>.mat-icon,[dir=rtl] .mat-mdc-extended-fab>.material-icons,.mat-mdc-extended-fab>.mat-icon[dir=rtl],.mat-mdc-extended-fab>.material-icons[dir=rtl]{margin-left:12px;margin-right:calc(12px - 20px)}.mat-mdc-extended-fab .mdc-button__label+.mat-icon,.mat-mdc-extended-fab .mdc-button__label+.material-icons{margin-left:12px;margin-right:calc(12px - 20px)}[dir=rtl] .mat-mdc-extended-fab .mdc-button__label+.mat-icon,[dir=rtl] .mat-mdc-extended-fab .mdc-button__label+.material-icons,.mat-mdc-extended-fab .mdc-button__label+.mat-icon[dir=rtl],.mat-mdc-extended-fab .mdc-button__label+.material-icons[dir=rtl]{margin-left:calc(12px - 20px);margin-right:12px}.mat-mdc-extended-fab .mat-mdc-button-touch-target{width:100%}',ue=["mat-icon-button",""],ye=[{selector:"mat-button",mdcClasses:["mdc-button","mat-mdc-button"]},{selector:"mat-flat-button",mdcClasses:["mdc-button","mdc-button--unelevated","mat-mdc-unelevated-button"]},{selector:"mat-raised-button",mdcClasses:["mdc-button","mdc-button--raised","mat-mdc-raised-button"]},{selector:"mat-stroked-button",mdcClasses:["mdc-button","mdc-button--outlined","mat-mdc-outlined-button"]},{selector:"mat-fab",mdcClasses:["mdc-fab","mat-mdc-fab"]},{selector:"mat-mini-fab",mdcClasses:["mdc-fab","mdc-fab--mini","mat-mdc-mini-fab"]},{selector:"mat-icon-button",mdcClasses:["mdc-icon-button","mat-mdc-icon-button"]}],ge=(0,D.pj)((0,D.Id)((0,D.Kr)(class{constructor(ut){this._elementRef=ut}})));class ne extends ge{constructor(Ve,tt,Ne,wt){super(Ve),this._platform=tt,this._ngZone=Ne,this._animationMode=wt,this._focusMonitor=(0,e.f3M)(l.tE),this._isFab=!1;const ft=Ve.nativeElement.classList;for(const Ct of ye)this._hasHostAttributes(Ct.selector)&&Ct.mdcClasses.forEach(rn=>{ft.add(rn)})}ngAfterViewInit(){this._focusMonitor.monitor(this._elementRef,!0)}ngOnDestroy(){this._focusMonitor.stopMonitoring(this._elementRef)}focus(Ve="program",tt){Ve?this._focusMonitor.focusVia(this._elementRef.nativeElement,Ve,tt):this._elementRef.nativeElement.focus(tt)}_hasHostAttributes(...Ve){return Ve.some(tt=>this._elementRef.nativeElement.hasAttribute(tt))}_isRippleDisabled(){return this.disableRipple||this.disabled}}ne.\u0275fac=function(Ve){e.$Z()},ne.\u0275dir=e.lG2({type:ne,viewQuery:function(Ve,tt){if(1&Ve&&e.Gf(D.wG,5),2&Ve){let Ne;e.iGM(Ne=e.CRH())&&(tt.ripple=Ne.first)}},features:[e.qOj]});class xe extends ne{constructor(Ve,tt,Ne,wt){super(Ve,tt,Ne,wt),this._haltDisabledEvents=ft=>{this.disabled&&(ft.preventDefault(),ft.stopImmediatePropagation())}}ngOnInit(){this._ngZone.runOutsideAngular(()=>{this._elementRef.nativeElement.addEventListener("click",this._haltDisabledEvents)})}ngOnDestroy(){super.ngOnDestroy(),this._elementRef.nativeElement.removeEventListener("click",this._haltDisabledEvents)}}xe.\u0275fac=function(Ve){e.$Z()},xe.\u0275dir=e.lG2({type:xe,features:[e.qOj]});class de extends ne{constructor(Ve,tt,Ne,wt){super(Ve,tt,Ne,wt)}}de.\u0275fac=function(Ve){return new(Ve||de)(e.Y36(e.SBq),e.Y36(o.t4),e.Y36(e.R0b),e.Y36(e.QbO,8))},de.\u0275cmp=e.Xpm({type:de,selectors:[["button","mat-button",""],["button","mat-raised-button",""],["button","mat-flat-button",""],["button","mat-stroked-button",""]],hostVars:7,hostBindings:function(Ve,tt){2&Ve&&(e.uIk("disabled",tt.disabled||null),e.ekj("_mat-animation-noopable","NoopAnimations"===tt._animationMode)("mat-unthemed",!tt.color)("mat-mdc-button-base",!0))},inputs:{disabled:"disabled",disableRipple:"disableRipple",color:"color"},exportAs:["matButton"],features:[e.qOj],attrs:E,ngContentSelectors:n,decls:8,vars:6,consts:[[1,"mat-mdc-button-persistent-ripple"],[1,"mdc-button__label"],[1,"mat-mdc-focus-indicator"],["matRipple","",1,"mat-mdc-button-ripple",3,"matRippleDisabled","matRippleTrigger"],[1,"mat-mdc-button-touch-target"]],template:function(Ve,tt){1&Ve&&(e.F$t(T),e._UZ(0,"span",0),e.Hsn(1),e.TgZ(2,"span",1),e.Hsn(3,1),e.qZA(),e.Hsn(4,2),e._UZ(5,"span",2)(6,"span",3)(7,"span",4)),2&Ve&&(e.ekj("mdc-button__ripple",!tt._isFab)("mdc-fab__ripple",tt._isFab),e.xp6(6),e.Q6J("matRippleDisabled",tt._isRippleDisabled())("matRippleTrigger",tt._elementRef.nativeElement))},dependencies:[D.wG],styles:['.mdc-touch-target-wrapper{display:inline}.mdc-elevation-overlay{position:absolute;border-radius:inherit;pointer-events:none;opacity:var(--mdc-elevation-overlay-opacity, 0);transition:opacity 280ms cubic-bezier(0.4, 0, 0.2, 1)}.mdc-button{position:relative;display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;min-width:64px;border:none;outline:none;line-height:inherit;user-select:none;-webkit-appearance:none;overflow:visible;vertical-align:middle;background:rgba(0,0,0,0)}.mdc-button .mdc-elevation-overlay{width:100%;height:100%;top:0;left:0}.mdc-button::-moz-focus-inner{padding:0;border:0}.mdc-button:active{outline:none}.mdc-button:hover{cursor:pointer}.mdc-button:disabled{cursor:default;pointer-events:none}.mdc-button[hidden]{display:none}.mdc-button .mdc-button__icon{margin-left:0;margin-right:8px;display:inline-block;position:relative;vertical-align:top}[dir=rtl] .mdc-button .mdc-button__icon,.mdc-button .mdc-button__icon[dir=rtl]{margin-left:8px;margin-right:0}.mdc-button .mdc-button__progress-indicator{font-size:0;position:absolute;transform:translate(-50%, -50%);top:50%;left:50%;line-height:initial}.mdc-button .mdc-button__label{position:relative}.mdc-button .mdc-button__focus-ring{pointer-events:none;border:2px solid rgba(0,0,0,0);border-radius:6px;box-sizing:content-box;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);height:calc(\n      100% + 4px\n    );width:calc(\n      100% + 4px\n    );display:none}@media screen and (forced-colors: active){.mdc-button .mdc-button__focus-ring{border-color:CanvasText}}.mdc-button .mdc-button__focus-ring::after{content:"";border:2px solid rgba(0,0,0,0);border-radius:8px;display:block;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);height:calc(100% + 4px);width:calc(100% + 4px)}@media screen and (forced-colors: active){.mdc-button .mdc-button__focus-ring::after{border-color:CanvasText}}@media screen and (forced-colors: active){.mdc-button.mdc-ripple-upgraded--background-focused .mdc-button__focus-ring,.mdc-button:not(.mdc-ripple-upgraded):focus .mdc-button__focus-ring{display:block}}.mdc-button .mdc-button__touch{position:absolute;top:50%;height:48px;left:0;right:0;transform:translateY(-50%)}.mdc-button__label+.mdc-button__icon{margin-left:8px;margin-right:0}[dir=rtl] .mdc-button__label+.mdc-button__icon,.mdc-button__label+.mdc-button__icon[dir=rtl]{margin-left:0;margin-right:8px}svg.mdc-button__icon{fill:currentColor}.mdc-button--touch{margin-top:6px;margin-bottom:6px}.mdc-button{padding:0 8px 0 8px}.mdc-button--unelevated{transition:box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);padding:0 16px 0 16px}.mdc-button--unelevated.mdc-button--icon-trailing{padding:0 12px 0 16px}.mdc-button--unelevated.mdc-button--icon-leading{padding:0 16px 0 12px}.mdc-button--raised{transition:box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);padding:0 16px 0 16px}.mdc-button--raised.mdc-button--icon-trailing{padding:0 12px 0 16px}.mdc-button--raised.mdc-button--icon-leading{padding:0 16px 0 12px}.mdc-button--outlined{border-style:solid;transition:border 280ms cubic-bezier(0.4, 0, 0.2, 1)}.mdc-button--outlined .mdc-button__ripple{border-style:solid;border-color:rgba(0,0,0,0)}.mat-mdc-button{height:var(--mdc-text-button-container-height, 36px);border-radius:var(--mdc-text-button-container-shape, var(--mdc-shape-small, 4px))}.mat-mdc-button:not(:disabled){color:var(--mdc-text-button-label-text-color, inherit)}.mat-mdc-button:disabled{color:var(--mdc-text-button-disabled-label-text-color, rgba(0, 0, 0, 0.38))}.mat-mdc-button .mdc-button__ripple{border-radius:var(--mdc-text-button-container-shape, var(--mdc-shape-small, 4px))}.mat-mdc-unelevated-button{height:var(--mdc-filled-button-container-height, 36px);border-radius:var(--mdc-filled-button-container-shape, var(--mdc-shape-small, 4px))}.mat-mdc-unelevated-button:not(:disabled){background-color:var(--mdc-filled-button-container-color, transparent)}.mat-mdc-unelevated-button:disabled{background-color:var(--mdc-filled-button-disabled-container-color, rgba(0, 0, 0, 0.12))}.mat-mdc-unelevated-button:not(:disabled){color:var(--mdc-filled-button-label-text-color, inherit)}.mat-mdc-unelevated-button:disabled{color:var(--mdc-filled-button-disabled-label-text-color, rgba(0, 0, 0, 0.38))}.mat-mdc-unelevated-button .mdc-button__ripple{border-radius:var(--mdc-filled-button-container-shape, var(--mdc-shape-small, 4px))}.mat-mdc-raised-button{height:var(--mdc-protected-button-container-height, 36px);border-radius:var(--mdc-protected-button-container-shape, var(--mdc-shape-small, 4px));box-shadow:var(--mdc-protected-button-container-elevation, 0px 3px 1px -2px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 1px 5px 0px rgba(0, 0, 0, 0.12))}.mat-mdc-raised-button:not(:disabled){background-color:var(--mdc-protected-button-container-color, transparent)}.mat-mdc-raised-button:disabled{background-color:var(--mdc-protected-button-disabled-container-color, rgba(0, 0, 0, 0.12))}.mat-mdc-raised-button:not(:disabled){color:var(--mdc-protected-button-label-text-color, inherit)}.mat-mdc-raised-button:disabled{color:var(--mdc-protected-button-disabled-label-text-color, rgba(0, 0, 0, 0.38))}.mat-mdc-raised-button .mdc-button__ripple{border-radius:var(--mdc-protected-button-container-shape, var(--mdc-shape-small, 4px))}.mat-mdc-raised-button.mdc-ripple-upgraded--background-focused,.mat-mdc-raised-button:not(.mdc-ripple-upgraded):focus{box-shadow:var(--mdc-protected-button-focus-container-elevation, 0px 2px 4px -1px rgba(0, 0, 0, 0.2), 0px 4px 5px 0px rgba(0, 0, 0, 0.14), 0px 1px 10px 0px rgba(0, 0, 0, 0.12))}.mat-mdc-raised-button:hover{box-shadow:var(--mdc-protected-button-hover-container-elevation, 0px 2px 4px -1px rgba(0, 0, 0, 0.2), 0px 4px 5px 0px rgba(0, 0, 0, 0.14), 0px 1px 10px 0px rgba(0, 0, 0, 0.12))}.mat-mdc-raised-button:not(:disabled):active{box-shadow:var(--mdc-protected-button-pressed-container-elevation, 0px 5px 5px -3px rgba(0, 0, 0, 0.2), 0px 8px 10px 1px rgba(0, 0, 0, 0.14), 0px 3px 14px 2px rgba(0, 0, 0, 0.12))}.mat-mdc-raised-button:disabled{box-shadow:var(--mdc-protected-button-disabled-container-elevation, 0px 0px 0px 0px rgba(0, 0, 0, 0.2), 0px 0px 0px 0px rgba(0, 0, 0, 0.14), 0px 0px 0px 0px rgba(0, 0, 0, 0.12))}.mat-mdc-outlined-button{height:var(--mdc-outlined-button-container-height, 36px);border-radius:var(--mdc-outlined-button-container-shape, var(--mdc-shape-small, 4px));padding:0 15px 0 15px;border-width:var(--mdc-outlined-button-outline-width, 1px)}.mat-mdc-outlined-button:not(:disabled){color:var(--mdc-outlined-button-label-text-color, inherit)}.mat-mdc-outlined-button:disabled{color:var(--mdc-outlined-button-disabled-label-text-color, rgba(0, 0, 0, 0.38))}.mat-mdc-outlined-button .mdc-button__ripple{border-radius:var(--mdc-outlined-button-container-shape, var(--mdc-shape-small, 4px))}.mat-mdc-outlined-button:not(:disabled){border-color:var(--mdc-outlined-button-outline-color, rgba(0, 0, 0, 0.12))}.mat-mdc-outlined-button:disabled{border-color:var(--mdc-outlined-button-disabled-outline-color, rgba(0, 0, 0, 0.12))}.mat-mdc-outlined-button.mdc-button--icon-trailing{padding:0 11px 0 15px}.mat-mdc-outlined-button.mdc-button--icon-leading{padding:0 15px 0 11px}.mat-mdc-outlined-button .mdc-button__ripple{top:-1px;left:-1px;bottom:-1px;right:-1px;border-width:var(--mdc-outlined-button-outline-width, 1px)}.mat-mdc-outlined-button .mdc-button__touch{left:calc(-1 * var(--mdc-outlined-button-outline-width, 1px));width:calc(100% + 2 * var(--mdc-outlined-button-outline-width, 1px))}.mat-mdc-button,.mat-mdc-unelevated-button,.mat-mdc-raised-button,.mat-mdc-outlined-button{-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-mdc-button .mat-mdc-button-ripple,.mat-mdc-button .mat-mdc-button-persistent-ripple,.mat-mdc-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-unelevated-button .mat-mdc-button-ripple,.mat-mdc-unelevated-button .mat-mdc-button-persistent-ripple,.mat-mdc-unelevated-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-raised-button .mat-mdc-button-ripple,.mat-mdc-raised-button .mat-mdc-button-persistent-ripple,.mat-mdc-raised-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-outlined-button .mat-mdc-button-ripple,.mat-mdc-outlined-button .mat-mdc-button-persistent-ripple,.mat-mdc-outlined-button .mat-mdc-button-persistent-ripple::before{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none;border-radius:inherit}.mat-mdc-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-unelevated-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-raised-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-outlined-button .mat-mdc-button-persistent-ripple::before{content:"";opacity:0;background-color:var(--mat-mdc-button-persistent-ripple-color)}.mat-mdc-button .mat-ripple-element,.mat-mdc-unelevated-button .mat-ripple-element,.mat-mdc-raised-button .mat-ripple-element,.mat-mdc-outlined-button .mat-ripple-element{background-color:var(--mat-mdc-button-ripple-color)}.mat-mdc-button .mdc-button__label,.mat-mdc-unelevated-button .mdc-button__label,.mat-mdc-raised-button .mdc-button__label,.mat-mdc-outlined-button .mdc-button__label{z-index:1}.mat-mdc-button .mat-mdc-focus-indicator,.mat-mdc-unelevated-button .mat-mdc-focus-indicator,.mat-mdc-raised-button .mat-mdc-focus-indicator,.mat-mdc-outlined-button .mat-mdc-focus-indicator{top:0;left:0;right:0;bottom:0;position:absolute}.mat-mdc-button:focus .mat-mdc-focus-indicator::before,.mat-mdc-unelevated-button:focus .mat-mdc-focus-indicator::before,.mat-mdc-raised-button:focus .mat-mdc-focus-indicator::before,.mat-mdc-outlined-button:focus .mat-mdc-focus-indicator::before{content:""}.mat-mdc-button[disabled],.mat-mdc-unelevated-button[disabled],.mat-mdc-raised-button[disabled],.mat-mdc-outlined-button[disabled]{cursor:default;pointer-events:none}.mat-mdc-button .mat-mdc-button-touch-target,.mat-mdc-unelevated-button .mat-mdc-button-touch-target,.mat-mdc-raised-button .mat-mdc-button-touch-target,.mat-mdc-outlined-button .mat-mdc-button-touch-target{position:absolute;top:50%;height:48px;left:0;right:0;transform:translateY(-50%)}.mat-mdc-button._mat-animation-noopable,.mat-mdc-unelevated-button._mat-animation-noopable,.mat-mdc-raised-button._mat-animation-noopable,.mat-mdc-outlined-button._mat-animation-noopable{transition:none !important;animation:none !important}.mat-mdc-button>.mat-icon{margin-left:0;margin-right:8px;display:inline-block;position:relative;vertical-align:top;font-size:1.125rem;height:1.125rem;width:1.125rem}[dir=rtl] .mat-mdc-button>.mat-icon,.mat-mdc-button>.mat-icon[dir=rtl]{margin-left:8px;margin-right:0}.mat-mdc-button .mdc-button__label+.mat-icon{margin-left:8px;margin-right:0}[dir=rtl] .mat-mdc-button .mdc-button__label+.mat-icon,.mat-mdc-button .mdc-button__label+.mat-icon[dir=rtl]{margin-left:0;margin-right:8px}.mat-mdc-unelevated-button>.mat-icon,.mat-mdc-raised-button>.mat-icon,.mat-mdc-outlined-button>.mat-icon{margin-left:0;margin-right:8px;display:inline-block;position:relative;vertical-align:top;font-size:1.125rem;height:1.125rem;width:1.125rem;margin-left:-4px;margin-right:8px}[dir=rtl] .mat-mdc-unelevated-button>.mat-icon,[dir=rtl] .mat-mdc-raised-button>.mat-icon,[dir=rtl] .mat-mdc-outlined-button>.mat-icon,.mat-mdc-unelevated-button>.mat-icon[dir=rtl],.mat-mdc-raised-button>.mat-icon[dir=rtl],.mat-mdc-outlined-button>.mat-icon[dir=rtl]{margin-left:8px;margin-right:0}[dir=rtl] .mat-mdc-unelevated-button>.mat-icon,[dir=rtl] .mat-mdc-raised-button>.mat-icon,[dir=rtl] .mat-mdc-outlined-button>.mat-icon,.mat-mdc-unelevated-button>.mat-icon[dir=rtl],.mat-mdc-raised-button>.mat-icon[dir=rtl],.mat-mdc-outlined-button>.mat-icon[dir=rtl]{margin-left:8px;margin-right:-4px}.mat-mdc-unelevated-button .mdc-button__label+.mat-icon,.mat-mdc-raised-button .mdc-button__label+.mat-icon,.mat-mdc-outlined-button .mdc-button__label+.mat-icon{margin-left:8px;margin-right:-4px}[dir=rtl] .mat-mdc-unelevated-button .mdc-button__label+.mat-icon,[dir=rtl] .mat-mdc-raised-button .mdc-button__label+.mat-icon,[dir=rtl] .mat-mdc-outlined-button .mdc-button__label+.mat-icon,.mat-mdc-unelevated-button .mdc-button__label+.mat-icon[dir=rtl],.mat-mdc-raised-button .mdc-button__label+.mat-icon[dir=rtl],.mat-mdc-outlined-button .mdc-button__label+.mat-icon[dir=rtl]{margin-left:-4px;margin-right:8px}.mat-mdc-outlined-button .mat-mdc-button-ripple,.mat-mdc-outlined-button .mdc-button__ripple{top:-1px;left:-1px;bottom:-1px;right:-1px;border-width:-1px}.mat-mdc-unelevated-button .mat-mdc-focus-indicator::before,.mat-mdc-raised-button .mat-mdc-focus-indicator::before{margin:calc(calc(var(--mat-mdc-focus-indicator-border-width, 3px) + 2px) * -1)}.mat-mdc-outlined-button .mat-mdc-focus-indicator::before{margin:calc(calc(var(--mat-mdc-focus-indicator-border-width, 3px) + 3px) * -1)}',".cdk-high-contrast-active .mat-mdc-button:not(.mdc-button--outlined),.cdk-high-contrast-active .mat-mdc-unelevated-button:not(.mdc-button--outlined),.cdk-high-contrast-active .mat-mdc-raised-button:not(.mdc-button--outlined),.cdk-high-contrast-active .mat-mdc-outlined-button:not(.mdc-button--outlined),.cdk-high-contrast-active .mat-mdc-icon-button{outline:solid 1px}"],encapsulation:2,changeDetection:0});class re extends xe{constructor(Ve,tt,Ne,wt){super(Ve,tt,Ne,wt)}}re.\u0275fac=function(Ve){return new(Ve||re)(e.Y36(e.SBq),e.Y36(o.t4),e.Y36(e.R0b),e.Y36(e.QbO,8))},re.\u0275cmp=e.Xpm({type:re,selectors:[["a","mat-button",""],["a","mat-raised-button",""],["a","mat-flat-button",""],["a","mat-stroked-button",""]],hostVars:9,hostBindings:function(Ve,tt){2&Ve&&(e.uIk("disabled",tt.disabled||null)("tabindex",tt.disabled?-1:tt.tabIndex)("aria-disabled",tt.disabled.toString()),e.ekj("_mat-animation-noopable","NoopAnimations"===tt._animationMode)("mat-unthemed",!tt.color)("mat-mdc-button-base",!0))},inputs:{disabled:"disabled",disableRipple:"disableRipple",color:"color",tabIndex:"tabIndex"},exportAs:["matButton","matAnchor"],features:[e.qOj],attrs:E,ngContentSelectors:n,decls:8,vars:6,consts:[[1,"mat-mdc-button-persistent-ripple"],[1,"mdc-button__label"],[1,"mat-mdc-focus-indicator"],["matRipple","",1,"mat-mdc-button-ripple",3,"matRippleDisabled","matRippleTrigger"],[1,"mat-mdc-button-touch-target"]],template:function(Ve,tt){1&Ve&&(e.F$t(T),e._UZ(0,"span",0),e.Hsn(1),e.TgZ(2,"span",1),e.Hsn(3,1),e.qZA(),e.Hsn(4,2),e._UZ(5,"span",2)(6,"span",3)(7,"span",4)),2&Ve&&(e.ekj("mdc-button__ripple",!tt._isFab)("mdc-fab__ripple",tt._isFab),e.xp6(6),e.Q6J("matRippleDisabled",tt._isRippleDisabled())("matRippleTrigger",tt._elementRef.nativeElement))},dependencies:[D.wG],styles:['.mdc-touch-target-wrapper{display:inline}.mdc-elevation-overlay{position:absolute;border-radius:inherit;pointer-events:none;opacity:var(--mdc-elevation-overlay-opacity, 0);transition:opacity 280ms cubic-bezier(0.4, 0, 0.2, 1)}.mdc-button{position:relative;display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;min-width:64px;border:none;outline:none;line-height:inherit;user-select:none;-webkit-appearance:none;overflow:visible;vertical-align:middle;background:rgba(0,0,0,0)}.mdc-button .mdc-elevation-overlay{width:100%;height:100%;top:0;left:0}.mdc-button::-moz-focus-inner{padding:0;border:0}.mdc-button:active{outline:none}.mdc-button:hover{cursor:pointer}.mdc-button:disabled{cursor:default;pointer-events:none}.mdc-button[hidden]{display:none}.mdc-button .mdc-button__icon{margin-left:0;margin-right:8px;display:inline-block;position:relative;vertical-align:top}[dir=rtl] .mdc-button .mdc-button__icon,.mdc-button .mdc-button__icon[dir=rtl]{margin-left:8px;margin-right:0}.mdc-button .mdc-button__progress-indicator{font-size:0;position:absolute;transform:translate(-50%, -50%);top:50%;left:50%;line-height:initial}.mdc-button .mdc-button__label{position:relative}.mdc-button .mdc-button__focus-ring{pointer-events:none;border:2px solid rgba(0,0,0,0);border-radius:6px;box-sizing:content-box;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);height:calc(\n      100% + 4px\n    );width:calc(\n      100% + 4px\n    );display:none}@media screen and (forced-colors: active){.mdc-button .mdc-button__focus-ring{border-color:CanvasText}}.mdc-button .mdc-button__focus-ring::after{content:"";border:2px solid rgba(0,0,0,0);border-radius:8px;display:block;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);height:calc(100% + 4px);width:calc(100% + 4px)}@media screen and (forced-colors: active){.mdc-button .mdc-button__focus-ring::after{border-color:CanvasText}}@media screen and (forced-colors: active){.mdc-button.mdc-ripple-upgraded--background-focused .mdc-button__focus-ring,.mdc-button:not(.mdc-ripple-upgraded):focus .mdc-button__focus-ring{display:block}}.mdc-button .mdc-button__touch{position:absolute;top:50%;height:48px;left:0;right:0;transform:translateY(-50%)}.mdc-button__label+.mdc-button__icon{margin-left:8px;margin-right:0}[dir=rtl] .mdc-button__label+.mdc-button__icon,.mdc-button__label+.mdc-button__icon[dir=rtl]{margin-left:0;margin-right:8px}svg.mdc-button__icon{fill:currentColor}.mdc-button--touch{margin-top:6px;margin-bottom:6px}.mdc-button{padding:0 8px 0 8px}.mdc-button--unelevated{transition:box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);padding:0 16px 0 16px}.mdc-button--unelevated.mdc-button--icon-trailing{padding:0 12px 0 16px}.mdc-button--unelevated.mdc-button--icon-leading{padding:0 16px 0 12px}.mdc-button--raised{transition:box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);padding:0 16px 0 16px}.mdc-button--raised.mdc-button--icon-trailing{padding:0 12px 0 16px}.mdc-button--raised.mdc-button--icon-leading{padding:0 16px 0 12px}.mdc-button--outlined{border-style:solid;transition:border 280ms cubic-bezier(0.4, 0, 0.2, 1)}.mdc-button--outlined .mdc-button__ripple{border-style:solid;border-color:rgba(0,0,0,0)}.mat-mdc-button{height:var(--mdc-text-button-container-height, 36px);border-radius:var(--mdc-text-button-container-shape, var(--mdc-shape-small, 4px))}.mat-mdc-button:not(:disabled){color:var(--mdc-text-button-label-text-color, inherit)}.mat-mdc-button:disabled{color:var(--mdc-text-button-disabled-label-text-color, rgba(0, 0, 0, 0.38))}.mat-mdc-button .mdc-button__ripple{border-radius:var(--mdc-text-button-container-shape, var(--mdc-shape-small, 4px))}.mat-mdc-unelevated-button{height:var(--mdc-filled-button-container-height, 36px);border-radius:var(--mdc-filled-button-container-shape, var(--mdc-shape-small, 4px))}.mat-mdc-unelevated-button:not(:disabled){background-color:var(--mdc-filled-button-container-color, transparent)}.mat-mdc-unelevated-button:disabled{background-color:var(--mdc-filled-button-disabled-container-color, rgba(0, 0, 0, 0.12))}.mat-mdc-unelevated-button:not(:disabled){color:var(--mdc-filled-button-label-text-color, inherit)}.mat-mdc-unelevated-button:disabled{color:var(--mdc-filled-button-disabled-label-text-color, rgba(0, 0, 0, 0.38))}.mat-mdc-unelevated-button .mdc-button__ripple{border-radius:var(--mdc-filled-button-container-shape, var(--mdc-shape-small, 4px))}.mat-mdc-raised-button{height:var(--mdc-protected-button-container-height, 36px);border-radius:var(--mdc-protected-button-container-shape, var(--mdc-shape-small, 4px));box-shadow:var(--mdc-protected-button-container-elevation, 0px 3px 1px -2px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 1px 5px 0px rgba(0, 0, 0, 0.12))}.mat-mdc-raised-button:not(:disabled){background-color:var(--mdc-protected-button-container-color, transparent)}.mat-mdc-raised-button:disabled{background-color:var(--mdc-protected-button-disabled-container-color, rgba(0, 0, 0, 0.12))}.mat-mdc-raised-button:not(:disabled){color:var(--mdc-protected-button-label-text-color, inherit)}.mat-mdc-raised-button:disabled{color:var(--mdc-protected-button-disabled-label-text-color, rgba(0, 0, 0, 0.38))}.mat-mdc-raised-button .mdc-button__ripple{border-radius:var(--mdc-protected-button-container-shape, var(--mdc-shape-small, 4px))}.mat-mdc-raised-button.mdc-ripple-upgraded--background-focused,.mat-mdc-raised-button:not(.mdc-ripple-upgraded):focus{box-shadow:var(--mdc-protected-button-focus-container-elevation, 0px 2px 4px -1px rgba(0, 0, 0, 0.2), 0px 4px 5px 0px rgba(0, 0, 0, 0.14), 0px 1px 10px 0px rgba(0, 0, 0, 0.12))}.mat-mdc-raised-button:hover{box-shadow:var(--mdc-protected-button-hover-container-elevation, 0px 2px 4px -1px rgba(0, 0, 0, 0.2), 0px 4px 5px 0px rgba(0, 0, 0, 0.14), 0px 1px 10px 0px rgba(0, 0, 0, 0.12))}.mat-mdc-raised-button:not(:disabled):active{box-shadow:var(--mdc-protected-button-pressed-container-elevation, 0px 5px 5px -3px rgba(0, 0, 0, 0.2), 0px 8px 10px 1px rgba(0, 0, 0, 0.14), 0px 3px 14px 2px rgba(0, 0, 0, 0.12))}.mat-mdc-raised-button:disabled{box-shadow:var(--mdc-protected-button-disabled-container-elevation, 0px 0px 0px 0px rgba(0, 0, 0, 0.2), 0px 0px 0px 0px rgba(0, 0, 0, 0.14), 0px 0px 0px 0px rgba(0, 0, 0, 0.12))}.mat-mdc-outlined-button{height:var(--mdc-outlined-button-container-height, 36px);border-radius:var(--mdc-outlined-button-container-shape, var(--mdc-shape-small, 4px));padding:0 15px 0 15px;border-width:var(--mdc-outlined-button-outline-width, 1px)}.mat-mdc-outlined-button:not(:disabled){color:var(--mdc-outlined-button-label-text-color, inherit)}.mat-mdc-outlined-button:disabled{color:var(--mdc-outlined-button-disabled-label-text-color, rgba(0, 0, 0, 0.38))}.mat-mdc-outlined-button .mdc-button__ripple{border-radius:var(--mdc-outlined-button-container-shape, var(--mdc-shape-small, 4px))}.mat-mdc-outlined-button:not(:disabled){border-color:var(--mdc-outlined-button-outline-color, rgba(0, 0, 0, 0.12))}.mat-mdc-outlined-button:disabled{border-color:var(--mdc-outlined-button-disabled-outline-color, rgba(0, 0, 0, 0.12))}.mat-mdc-outlined-button.mdc-button--icon-trailing{padding:0 11px 0 15px}.mat-mdc-outlined-button.mdc-button--icon-leading{padding:0 15px 0 11px}.mat-mdc-outlined-button .mdc-button__ripple{top:-1px;left:-1px;bottom:-1px;right:-1px;border-width:var(--mdc-outlined-button-outline-width, 1px)}.mat-mdc-outlined-button .mdc-button__touch{left:calc(-1 * var(--mdc-outlined-button-outline-width, 1px));width:calc(100% + 2 * var(--mdc-outlined-button-outline-width, 1px))}.mat-mdc-button,.mat-mdc-unelevated-button,.mat-mdc-raised-button,.mat-mdc-outlined-button{-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-mdc-button .mat-mdc-button-ripple,.mat-mdc-button .mat-mdc-button-persistent-ripple,.mat-mdc-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-unelevated-button .mat-mdc-button-ripple,.mat-mdc-unelevated-button .mat-mdc-button-persistent-ripple,.mat-mdc-unelevated-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-raised-button .mat-mdc-button-ripple,.mat-mdc-raised-button .mat-mdc-button-persistent-ripple,.mat-mdc-raised-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-outlined-button .mat-mdc-button-ripple,.mat-mdc-outlined-button .mat-mdc-button-persistent-ripple,.mat-mdc-outlined-button .mat-mdc-button-persistent-ripple::before{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none;border-radius:inherit}.mat-mdc-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-unelevated-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-raised-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-outlined-button .mat-mdc-button-persistent-ripple::before{content:"";opacity:0;background-color:var(--mat-mdc-button-persistent-ripple-color)}.mat-mdc-button .mat-ripple-element,.mat-mdc-unelevated-button .mat-ripple-element,.mat-mdc-raised-button .mat-ripple-element,.mat-mdc-outlined-button .mat-ripple-element{background-color:var(--mat-mdc-button-ripple-color)}.mat-mdc-button .mdc-button__label,.mat-mdc-unelevated-button .mdc-button__label,.mat-mdc-raised-button .mdc-button__label,.mat-mdc-outlined-button .mdc-button__label{z-index:1}.mat-mdc-button .mat-mdc-focus-indicator,.mat-mdc-unelevated-button .mat-mdc-focus-indicator,.mat-mdc-raised-button .mat-mdc-focus-indicator,.mat-mdc-outlined-button .mat-mdc-focus-indicator{top:0;left:0;right:0;bottom:0;position:absolute}.mat-mdc-button:focus .mat-mdc-focus-indicator::before,.mat-mdc-unelevated-button:focus .mat-mdc-focus-indicator::before,.mat-mdc-raised-button:focus .mat-mdc-focus-indicator::before,.mat-mdc-outlined-button:focus .mat-mdc-focus-indicator::before{content:""}.mat-mdc-button[disabled],.mat-mdc-unelevated-button[disabled],.mat-mdc-raised-button[disabled],.mat-mdc-outlined-button[disabled]{cursor:default;pointer-events:none}.mat-mdc-button .mat-mdc-button-touch-target,.mat-mdc-unelevated-button .mat-mdc-button-touch-target,.mat-mdc-raised-button .mat-mdc-button-touch-target,.mat-mdc-outlined-button .mat-mdc-button-touch-target{position:absolute;top:50%;height:48px;left:0;right:0;transform:translateY(-50%)}.mat-mdc-button._mat-animation-noopable,.mat-mdc-unelevated-button._mat-animation-noopable,.mat-mdc-raised-button._mat-animation-noopable,.mat-mdc-outlined-button._mat-animation-noopable{transition:none !important;animation:none !important}.mat-mdc-button>.mat-icon{margin-left:0;margin-right:8px;display:inline-block;position:relative;vertical-align:top;font-size:1.125rem;height:1.125rem;width:1.125rem}[dir=rtl] .mat-mdc-button>.mat-icon,.mat-mdc-button>.mat-icon[dir=rtl]{margin-left:8px;margin-right:0}.mat-mdc-button .mdc-button__label+.mat-icon{margin-left:8px;margin-right:0}[dir=rtl] .mat-mdc-button .mdc-button__label+.mat-icon,.mat-mdc-button .mdc-button__label+.mat-icon[dir=rtl]{margin-left:0;margin-right:8px}.mat-mdc-unelevated-button>.mat-icon,.mat-mdc-raised-button>.mat-icon,.mat-mdc-outlined-button>.mat-icon{margin-left:0;margin-right:8px;display:inline-block;position:relative;vertical-align:top;font-size:1.125rem;height:1.125rem;width:1.125rem;margin-left:-4px;margin-right:8px}[dir=rtl] .mat-mdc-unelevated-button>.mat-icon,[dir=rtl] .mat-mdc-raised-button>.mat-icon,[dir=rtl] .mat-mdc-outlined-button>.mat-icon,.mat-mdc-unelevated-button>.mat-icon[dir=rtl],.mat-mdc-raised-button>.mat-icon[dir=rtl],.mat-mdc-outlined-button>.mat-icon[dir=rtl]{margin-left:8px;margin-right:0}[dir=rtl] .mat-mdc-unelevated-button>.mat-icon,[dir=rtl] .mat-mdc-raised-button>.mat-icon,[dir=rtl] .mat-mdc-outlined-button>.mat-icon,.mat-mdc-unelevated-button>.mat-icon[dir=rtl],.mat-mdc-raised-button>.mat-icon[dir=rtl],.mat-mdc-outlined-button>.mat-icon[dir=rtl]{margin-left:8px;margin-right:-4px}.mat-mdc-unelevated-button .mdc-button__label+.mat-icon,.mat-mdc-raised-button .mdc-button__label+.mat-icon,.mat-mdc-outlined-button .mdc-button__label+.mat-icon{margin-left:8px;margin-right:-4px}[dir=rtl] .mat-mdc-unelevated-button .mdc-button__label+.mat-icon,[dir=rtl] .mat-mdc-raised-button .mdc-button__label+.mat-icon,[dir=rtl] .mat-mdc-outlined-button .mdc-button__label+.mat-icon,.mat-mdc-unelevated-button .mdc-button__label+.mat-icon[dir=rtl],.mat-mdc-raised-button .mdc-button__label+.mat-icon[dir=rtl],.mat-mdc-outlined-button .mdc-button__label+.mat-icon[dir=rtl]{margin-left:-4px;margin-right:8px}.mat-mdc-outlined-button .mat-mdc-button-ripple,.mat-mdc-outlined-button .mdc-button__ripple{top:-1px;left:-1px;bottom:-1px;right:-1px;border-width:-1px}.mat-mdc-unelevated-button .mat-mdc-focus-indicator::before,.mat-mdc-raised-button .mat-mdc-focus-indicator::before{margin:calc(calc(var(--mat-mdc-focus-indicator-border-width, 3px) + 2px) * -1)}.mat-mdc-outlined-button .mat-mdc-focus-indicator::before{margin:calc(calc(var(--mat-mdc-focus-indicator-border-width, 3px) + 3px) * -1)}',w],encapsulation:2,changeDetection:0});const oe=new e.OlP("mat-mdc-fab-default-options",{providedIn:"root",factory:me});function me(){return{color:"accent"}}const be={color:"accent"};class Z extends ne{get extended(){return this._extended}set extended(Ve){this._extended=(0,g.Ig)(Ve)}constructor(Ve,tt,Ne,wt,ft){super(Ve,tt,Ne,wt),this._options=ft,this._isFab=!0,this._options=this._options||be,this.color=this.defaultColor=this._options.color||be.color}}Z.\u0275fac=function(Ve){return new(Ve||Z)(e.Y36(e.SBq),e.Y36(o.t4),e.Y36(e.R0b),e.Y36(e.QbO,8),e.Y36(oe,8))},Z.\u0275cmp=e.Xpm({type:Z,selectors:[["button","mat-fab",""]],hostVars:11,hostBindings:function(Ve,tt){2&Ve&&(e.uIk("disabled",tt.disabled||null),e.ekj("_mat-animation-noopable","NoopAnimations"===tt._animationMode)("mat-unthemed",!tt.color)("mat-mdc-button-base",!0)("mdc-fab--extended",tt.extended)("mat-mdc-extended-fab",tt.extended))},inputs:{disabled:"disabled",disableRipple:"disableRipple",color:"color",tabIndex:"tabIndex",extended:"extended"},exportAs:["matButton"],features:[e.qOj],attrs:B,ngContentSelectors:n,decls:8,vars:6,consts:[[1,"mat-mdc-button-persistent-ripple"],[1,"mdc-button__label"],[1,"mat-mdc-focus-indicator"],["matRipple","",1,"mat-mdc-button-ripple",3,"matRippleDisabled","matRippleTrigger"],[1,"mat-mdc-button-touch-target"]],template:function(Ve,tt){1&Ve&&(e.F$t(T),e._UZ(0,"span",0),e.Hsn(1),e.TgZ(2,"span",1),e.Hsn(3,1),e.qZA(),e.Hsn(4,2),e._UZ(5,"span",2)(6,"span",3)(7,"span",4)),2&Ve&&(e.ekj("mdc-button__ripple",!tt._isFab)("mdc-fab__ripple",tt._isFab),e.xp6(6),e.Q6J("matRippleDisabled",tt._isRippleDisabled())("matRippleTrigger",tt._elementRef.nativeElement))},dependencies:[D.wG],styles:['.mdc-touch-target-wrapper{display:inline}.mdc-elevation-overlay{position:absolute;border-radius:inherit;pointer-events:none;opacity:var(--mdc-elevation-overlay-opacity, 0);transition:opacity 280ms cubic-bezier(0.4, 0, 0.2, 1)}.mdc-fab{position:relative;display:inline-flex;position:relative;align-items:center;justify-content:center;box-sizing:border-box;width:56px;height:56px;padding:0;border:none;fill:currentColor;text-decoration:none;cursor:pointer;user-select:none;-moz-appearance:none;-webkit-appearance:none;overflow:visible;transition:box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1),opacity 15ms linear 30ms,transform 270ms 0ms cubic-bezier(0, 0, 0.2, 1)}.mdc-fab .mdc-elevation-overlay{width:100%;height:100%;top:0;left:0}.mdc-fab[hidden]{display:none}.mdc-fab::-moz-focus-inner{padding:0;border:0}.mdc-fab .mdc-fab__focus-ring{position:absolute}.mdc-fab.mdc-ripple-upgraded--background-focused .mdc-fab__focus-ring,.mdc-fab:not(.mdc-ripple-upgraded):focus .mdc-fab__focus-ring{pointer-events:none;border:2px solid rgba(0,0,0,0);border-radius:6px;box-sizing:content-box;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);height:calc(\n      100% + 4px\n    );width:calc(\n      100% + 4px\n    )}@media screen and (forced-colors: active){.mdc-fab.mdc-ripple-upgraded--background-focused .mdc-fab__focus-ring,.mdc-fab:not(.mdc-ripple-upgraded):focus .mdc-fab__focus-ring{border-color:CanvasText}}.mdc-fab.mdc-ripple-upgraded--background-focused .mdc-fab__focus-ring::after,.mdc-fab:not(.mdc-ripple-upgraded):focus .mdc-fab__focus-ring::after{content:"";border:2px solid rgba(0,0,0,0);border-radius:8px;display:block;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);height:calc(100% + 4px);width:calc(100% + 4px)}@media screen and (forced-colors: active){.mdc-fab.mdc-ripple-upgraded--background-focused .mdc-fab__focus-ring::after,.mdc-fab:not(.mdc-ripple-upgraded):focus .mdc-fab__focus-ring::after{border-color:CanvasText}}.mdc-fab:active,.mdc-fab:focus{outline:none}.mdc-fab:hover{cursor:pointer}.mdc-fab>svg{width:100%}.mdc-fab--mini{width:40px;height:40px}.mdc-fab--extended{border-radius:24px;padding-left:20px;padding-right:20px;width:auto;max-width:100%;height:48px;line-height:normal}.mdc-fab--extended .mdc-fab__ripple{border-radius:24px}.mdc-fab--extended .mdc-fab__icon{margin-left:calc(12px - 20px);margin-right:12px}[dir=rtl] .mdc-fab--extended .mdc-fab__icon,.mdc-fab--extended .mdc-fab__icon[dir=rtl]{margin-left:12px;margin-right:calc(12px - 20px)}.mdc-fab--extended .mdc-fab__label+.mdc-fab__icon{margin-left:12px;margin-right:calc(12px - 20px)}[dir=rtl] .mdc-fab--extended .mdc-fab__label+.mdc-fab__icon,.mdc-fab--extended .mdc-fab__label+.mdc-fab__icon[dir=rtl]{margin-left:calc(12px - 20px);margin-right:12px}.mdc-fab--touch{margin-top:4px;margin-bottom:4px;margin-right:4px;margin-left:4px}.mdc-fab--touch .mdc-fab__touch{position:absolute;top:50%;height:48px;left:50%;width:48px;transform:translate(-50%, -50%)}.mdc-fab::before{position:absolute;box-sizing:border-box;width:100%;height:100%;top:0;left:0;border:1px solid rgba(0,0,0,0);border-radius:inherit;content:"";pointer-events:none}@media screen and (forced-colors: active){.mdc-fab::before{border-color:CanvasText}}.mdc-fab__label{justify-content:flex-start;text-overflow:ellipsis;white-space:nowrap;overflow-x:hidden;overflow-y:visible}.mdc-fab__icon{transition:transform 180ms 90ms cubic-bezier(0, 0, 0.2, 1);fill:currentColor;will-change:transform}.mdc-fab .mdc-fab__icon{display:inline-flex;align-items:center;justify-content:center}.mdc-fab--exited{transform:scale(0);opacity:0;transition:opacity 15ms linear 150ms,transform 180ms 0ms cubic-bezier(0.4, 0, 1, 1)}.mdc-fab--exited .mdc-fab__icon{transform:scale(0);transition:transform 135ms 0ms cubic-bezier(0.4, 0, 1, 1)}.mdc-fab .mdc-fab__icon{width:24px;height:24px;font-size:24px}.mdc-fab:not(.mdc-fab--extended){border-radius:50%}.mdc-fab:not(.mdc-fab--extended) .mdc-fab__ripple{border-radius:50%}.mat-mdc-fab,.mat-mdc-mini-fab{-webkit-tap-highlight-color:rgba(0,0,0,0);background-color:var(--mdc-fab-container-color, transparent);box-shadow:0px 3px 5px -1px rgba(0, 0, 0, 0.2), 0px 6px 10px 0px rgba(0, 0, 0, 0.14), 0px 1px 18px 0px rgba(0, 0, 0, 0.12);color:var(--mat-mdc-fab-color, inherit);flex-shrink:0}.mat-mdc-fab .mat-mdc-button-ripple,.mat-mdc-fab .mat-mdc-button-persistent-ripple,.mat-mdc-fab .mat-mdc-button-persistent-ripple::before,.mat-mdc-mini-fab .mat-mdc-button-ripple,.mat-mdc-mini-fab .mat-mdc-button-persistent-ripple,.mat-mdc-mini-fab .mat-mdc-button-persistent-ripple::before{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none;border-radius:inherit}.mat-mdc-fab .mat-mdc-button-persistent-ripple::before,.mat-mdc-mini-fab .mat-mdc-button-persistent-ripple::before{content:"";opacity:0;background-color:var(--mat-mdc-button-persistent-ripple-color)}.mat-mdc-fab .mat-ripple-element,.mat-mdc-mini-fab .mat-ripple-element{background-color:var(--mat-mdc-button-ripple-color)}.mat-mdc-fab .mdc-button__label,.mat-mdc-mini-fab .mdc-button__label{z-index:1}.mat-mdc-fab .mat-mdc-focus-indicator,.mat-mdc-mini-fab .mat-mdc-focus-indicator{top:0;left:0;right:0;bottom:0;position:absolute}.mat-mdc-fab:focus .mat-mdc-focus-indicator::before,.mat-mdc-mini-fab:focus .mat-mdc-focus-indicator::before{content:""}.mat-mdc-fab .mat-mdc-button-touch-target,.mat-mdc-mini-fab .mat-mdc-button-touch-target{position:absolute;top:50%;height:48px;left:50%;width:48px;transform:translate(-50%, -50%)}.mat-mdc-fab._mat-animation-noopable,.mat-mdc-mini-fab._mat-animation-noopable{transition:none !important;animation:none !important}.mat-mdc-fab:not(:disabled) .mdc-fab__icon,.mat-mdc-mini-fab:not(:disabled) .mdc-fab__icon{color:var(--mdc-fab-icon-color, inherit)}.mat-mdc-fab:not(.mdc-fab--extended),.mat-mdc-mini-fab:not(.mdc-fab--extended){border-radius:var(--mdc-fab-container-shape, 50%)}.mat-mdc-fab:not(.mdc-fab--extended) .mdc-fab__ripple,.mat-mdc-mini-fab:not(.mdc-fab--extended) .mdc-fab__ripple{border-radius:var(--mdc-fab-container-shape, 50%)}.mat-mdc-fab:hover,.mat-mdc-fab:focus,.mat-mdc-mini-fab:hover,.mat-mdc-mini-fab:focus{box-shadow:0px 5px 5px -3px rgba(0, 0, 0, 0.2), 0px 8px 10px 1px rgba(0, 0, 0, 0.14), 0px 3px 14px 2px rgba(0, 0, 0, 0.12)}.mat-mdc-fab:active,.mat-mdc-fab:focus:active,.mat-mdc-mini-fab:active,.mat-mdc-mini-fab:focus:active{box-shadow:0px 7px 8px -4px rgba(0, 0, 0, 0.2), 0px 12px 17px 2px rgba(0, 0, 0, 0.14), 0px 5px 22px 4px rgba(0, 0, 0, 0.12)}.mat-mdc-fab[disabled],.mat-mdc-mini-fab[disabled]{cursor:default;pointer-events:none;box-shadow:0px 0px 0px 0px rgba(0, 0, 0, 0.2), 0px 0px 0px 0px rgba(0, 0, 0, 0.14), 0px 0px 0px 0px rgba(0, 0, 0, 0.12)}.mat-mdc-fab:not(.mdc-ripple-upgraded):focus::before,.mat-mdc-mini-fab:not(.mdc-ripple-upgraded):focus::before{background:rgba(0,0,0,0);opacity:1}.mat-mdc-fab .mat-icon,.mat-mdc-fab .material-icons,.mat-mdc-mini-fab .mat-icon,.mat-mdc-mini-fab .material-icons{transition:transform 180ms 90ms cubic-bezier(0, 0, 0.2, 1);fill:currentColor;will-change:transform}.mat-mdc-fab .mat-mdc-focus-indicator::before,.mat-mdc-mini-fab .mat-mdc-focus-indicator::before{margin:calc(calc(var(--mat-mdc-focus-indicator-border-width, 3px) + 2px) * -1)}.mat-mdc-extended-fab{border-radius:24px;padding-left:20px;padding-right:20px;width:auto;max-width:100%;height:48px;line-height:normal}.mat-mdc-extended-fab .mdc-fab__ripple{border-radius:24px}.mat-mdc-extended-fab .mdc-fab__icon{margin-left:calc(12px - 20px);margin-right:12px}[dir=rtl] .mat-mdc-extended-fab .mdc-fab__icon,.mat-mdc-extended-fab .mdc-fab__icon[dir=rtl]{margin-left:12px;margin-right:calc(12px - 20px)}.mat-mdc-extended-fab .mdc-fab__label+.mdc-fab__icon{margin-left:12px;margin-right:calc(12px - 20px)}[dir=rtl] .mat-mdc-extended-fab .mdc-fab__label+.mdc-fab__icon,.mat-mdc-extended-fab .mdc-fab__label+.mdc-fab__icon[dir=rtl]{margin-left:calc(12px - 20px);margin-right:12px}.mat-mdc-extended-fab>.mat-icon,.mat-mdc-extended-fab>.material-icons{margin-left:calc(12px - 20px);margin-right:12px}[dir=rtl] .mat-mdc-extended-fab>.mat-icon,[dir=rtl] .mat-mdc-extended-fab>.material-icons,.mat-mdc-extended-fab>.mat-icon[dir=rtl],.mat-mdc-extended-fab>.material-icons[dir=rtl]{margin-left:12px;margin-right:calc(12px - 20px)}.mat-mdc-extended-fab .mdc-button__label+.mat-icon,.mat-mdc-extended-fab .mdc-button__label+.material-icons{margin-left:12px;margin-right:calc(12px - 20px)}[dir=rtl] .mat-mdc-extended-fab .mdc-button__label+.mat-icon,[dir=rtl] .mat-mdc-extended-fab .mdc-button__label+.material-icons,.mat-mdc-extended-fab .mdc-button__label+.mat-icon[dir=rtl],.mat-mdc-extended-fab .mdc-button__label+.material-icons[dir=rtl]{margin-left:calc(12px - 20px);margin-right:12px}.mat-mdc-extended-fab .mat-mdc-button-touch-target{width:100%}'],encapsulation:2,changeDetection:0});class Oe extends ne{constructor(Ve,tt,Ne,wt,ft){super(Ve,tt,Ne,wt),this._options=ft,this._isFab=!0,this._options=this._options||be,this.color=this.defaultColor=this._options.color||be.color}}Oe.\u0275fac=function(Ve){return new(Ve||Oe)(e.Y36(e.SBq),e.Y36(o.t4),e.Y36(e.R0b),e.Y36(e.QbO,8),e.Y36(oe,8))},Oe.\u0275cmp=e.Xpm({type:Oe,selectors:[["button","mat-mini-fab",""]],hostVars:7,hostBindings:function(Ve,tt){2&Ve&&(e.uIk("disabled",tt.disabled||null),e.ekj("_mat-animation-noopable","NoopAnimations"===tt._animationMode)("mat-unthemed",!tt.color)("mat-mdc-button-base",!0))},inputs:{disabled:"disabled",disableRipple:"disableRipple",color:"color"},exportAs:["matButton"],features:[e.qOj],attrs:Y,ngContentSelectors:n,decls:8,vars:6,consts:[[1,"mat-mdc-button-persistent-ripple"],[1,"mdc-button__label"],[1,"mat-mdc-focus-indicator"],["matRipple","",1,"mat-mdc-button-ripple",3,"matRippleDisabled","matRippleTrigger"],[1,"mat-mdc-button-touch-target"]],template:function(Ve,tt){1&Ve&&(e.F$t(T),e._UZ(0,"span",0),e.Hsn(1),e.TgZ(2,"span",1),e.Hsn(3,1),e.qZA(),e.Hsn(4,2),e._UZ(5,"span",2)(6,"span",3)(7,"span",4)),2&Ve&&(e.ekj("mdc-button__ripple",!tt._isFab)("mdc-fab__ripple",tt._isFab),e.xp6(6),e.Q6J("matRippleDisabled",tt._isRippleDisabled())("matRippleTrigger",tt._elementRef.nativeElement))},dependencies:[D.wG],styles:[V],encapsulation:2,changeDetection:0});class j extends re{get extended(){return this._extended}set extended(Ve){this._extended=(0,g.Ig)(Ve)}constructor(Ve,tt,Ne,wt,ft){super(Ve,tt,Ne,wt),this._options=ft,this._isFab=!0,this._options=this._options||be,this.color=this.defaultColor=this._options.color||be.color}}j.\u0275fac=function(Ve){return new(Ve||j)(e.Y36(e.SBq),e.Y36(o.t4),e.Y36(e.R0b),e.Y36(e.QbO,8),e.Y36(oe,8))},j.\u0275cmp=e.Xpm({type:j,selectors:[["a","mat-fab",""]],hostVars:13,hostBindings:function(Ve,tt){2&Ve&&(e.uIk("disabled",tt.disabled||null)("tabindex",tt.disabled?-1:tt.tabIndex)("aria-disabled",tt.disabled.toString()),e.ekj("_mat-animation-noopable","NoopAnimations"===tt._animationMode)("mat-unthemed",!tt.color)("mat-mdc-button-base",!0)("mdc-fab--extended",tt.extended)("mat-mdc-extended-fab",tt.extended))},inputs:{disabled:"disabled",disableRipple:"disableRipple",color:"color",tabIndex:"tabIndex",extended:"extended"},exportAs:["matButton","matAnchor"],features:[e.qOj],attrs:B,ngContentSelectors:n,decls:8,vars:6,consts:[[1,"mat-mdc-button-persistent-ripple"],[1,"mdc-button__label"],[1,"mat-mdc-focus-indicator"],["matRipple","",1,"mat-mdc-button-ripple",3,"matRippleDisabled","matRippleTrigger"],[1,"mat-mdc-button-touch-target"]],template:function(Ve,tt){1&Ve&&(e.F$t(T),e._UZ(0,"span",0),e.Hsn(1),e.TgZ(2,"span",1),e.Hsn(3,1),e.qZA(),e.Hsn(4,2),e._UZ(5,"span",2)(6,"span",3)(7,"span",4)),2&Ve&&(e.ekj("mdc-button__ripple",!tt._isFab)("mdc-fab__ripple",tt._isFab),e.xp6(6),e.Q6J("matRippleDisabled",tt._isRippleDisabled())("matRippleTrigger",tt._elementRef.nativeElement))},dependencies:[D.wG],styles:[V],encapsulation:2,changeDetection:0});class ke extends re{constructor(Ve,tt,Ne,wt,ft){super(Ve,tt,Ne,wt),this._options=ft,this._isFab=!0,this._options=this._options||be,this.color=this.defaultColor=this._options.color||be.color}}ke.\u0275fac=function(Ve){return new(Ve||ke)(e.Y36(e.SBq),e.Y36(o.t4),e.Y36(e.R0b),e.Y36(e.QbO,8),e.Y36(oe,8))},ke.\u0275cmp=e.Xpm({type:ke,selectors:[["a","mat-mini-fab",""]],hostVars:9,hostBindings:function(Ve,tt){2&Ve&&(e.uIk("disabled",tt.disabled||null)("tabindex",tt.disabled?-1:tt.tabIndex)("aria-disabled",tt.disabled.toString()),e.ekj("_mat-animation-noopable","NoopAnimations"===tt._animationMode)("mat-unthemed",!tt.color)("mat-mdc-button-base",!0))},inputs:{disabled:"disabled",disableRipple:"disableRipple",color:"color",tabIndex:"tabIndex"},exportAs:["matButton","matAnchor"],features:[e.qOj],attrs:Y,ngContentSelectors:n,decls:8,vars:6,consts:[[1,"mat-mdc-button-persistent-ripple"],[1,"mdc-button__label"],[1,"mat-mdc-focus-indicator"],["matRipple","",1,"mat-mdc-button-ripple",3,"matRippleDisabled","matRippleTrigger"],[1,"mat-mdc-button-touch-target"]],template:function(Ve,tt){1&Ve&&(e.F$t(T),e._UZ(0,"span",0),e.Hsn(1),e.TgZ(2,"span",1),e.Hsn(3,1),e.qZA(),e.Hsn(4,2),e._UZ(5,"span",2)(6,"span",3)(7,"span",4)),2&Ve&&(e.ekj("mdc-button__ripple",!tt._isFab)("mdc-fab__ripple",tt._isFab),e.xp6(6),e.Q6J("matRippleDisabled",tt._isRippleDisabled())("matRippleTrigger",tt._elementRef.nativeElement))},dependencies:[D.wG],styles:[V],encapsulation:2,changeDetection:0});class Be extends ne{constructor(Ve,tt,Ne,wt){super(Ve,tt,Ne,wt)}}Be.\u0275fac=function(Ve){return new(Ve||Be)(e.Y36(e.SBq),e.Y36(o.t4),e.Y36(e.R0b),e.Y36(e.QbO,8))},Be.\u0275cmp=e.Xpm({type:Be,selectors:[["button","mat-icon-button",""]],hostVars:7,hostBindings:function(Ve,tt){2&Ve&&(e.uIk("disabled",tt.disabled||null),e.ekj("_mat-animation-noopable","NoopAnimations"===tt._animationMode)("mat-unthemed",!tt.color)("mat-mdc-button-base",!0))},inputs:{disabled:"disabled",disableRipple:"disableRipple",color:"color"},exportAs:["matButton"],features:[e.qOj],attrs:ue,ngContentSelectors:["*"],decls:5,vars:3,consts:[[1,"mat-mdc-button-persistent-ripple","mdc-icon-button__ripple"],[1,"mat-mdc-focus-indicator"],["matRipple","",1,"mat-mdc-button-ripple",3,"matRippleDisabled","matRippleCentered","matRippleTrigger"],[1,"mat-mdc-button-touch-target"]],template:function(Ve,tt){1&Ve&&(e.F$t(),e._UZ(0,"span",0),e.Hsn(1),e._UZ(2,"span",1)(3,"span",2)(4,"span",3)),2&Ve&&(e.xp6(3),e.Q6J("matRippleDisabled",tt._isRippleDisabled())("matRippleCentered",!0)("matRippleTrigger",tt._elementRef.nativeElement))},dependencies:[D.wG],styles:['.mdc-icon-button{font-size:24px;width:48px;height:48px;padding:12px}.mdc-icon-button .mdc-icon-button__focus-ring{max-height:48px;max-width:48px}.mdc-icon-button.mdc-icon-button--reduced-size .mdc-icon-button__ripple{width:40px;height:40px;margin-top:4px;margin-bottom:4px;margin-right:4px;margin-left:4px}.mdc-icon-button.mdc-icon-button--reduced-size .mdc-icon-button__focus-ring{max-height:40px;max-width:40px}.mdc-icon-button .mdc-icon-button__touch{position:absolute;top:50%;height:48px;left:50%;width:48px;transform:translate(-50%, -50%)}.mdc-icon-button svg,.mdc-icon-button img{width:24px;height:24px}.mdc-icon-button{display:inline-block;position:relative;box-sizing:border-box;border:none;outline:none;background-color:rgba(0,0,0,0);fill:currentColor;color:inherit;text-decoration:none;cursor:pointer;user-select:none;z-index:0;overflow:visible}.mdc-icon-button .mdc-icon-button__touch{position:absolute;top:50%;height:48px;left:50%;width:48px;transform:translate(-50%, -50%)}@media screen and (forced-colors: active){.mdc-icon-button.mdc-ripple-upgraded--background-focused .mdc-icon-button__focus-ring,.mdc-icon-button:not(.mdc-ripple-upgraded):focus .mdc-icon-button__focus-ring{display:block}}.mdc-icon-button:disabled{cursor:default;pointer-events:none}.mdc-icon-button[hidden]{display:none}.mdc-icon-button--display-flex{align-items:center;display:inline-flex;justify-content:center}.mdc-icon-button__focus-ring{pointer-events:none;border:2px solid rgba(0,0,0,0);border-radius:6px;box-sizing:content-box;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);height:100%;width:100%;display:none}@media screen and (forced-colors: active){.mdc-icon-button__focus-ring{border-color:CanvasText}}.mdc-icon-button__focus-ring::after{content:"";border:2px solid rgba(0,0,0,0);border-radius:8px;display:block;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);height:calc(100% + 4px);width:calc(100% + 4px)}@media screen and (forced-colors: active){.mdc-icon-button__focus-ring::after{border-color:CanvasText}}.mdc-icon-button__icon{display:inline-block}.mdc-icon-button__icon.mdc-icon-button__icon--on{display:none}.mdc-icon-button--on .mdc-icon-button__icon{display:none}.mdc-icon-button--on .mdc-icon-button__icon.mdc-icon-button__icon--on{display:inline-block}.mdc-icon-button__link{height:100%;left:0;outline:none;position:absolute;top:0;width:100%}.mat-mdc-icon-button{height:var(--mdc-icon-button-state-layer-size, 48px);width:var(--mdc-icon-button-state-layer-size, 48px);color:var(--mdc-icon-button-icon-color, inherit);border-radius:50%;flex-shrink:0;text-align:center;-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-mdc-icon-button .mdc-button__icon{font-size:var(--mdc-icon-button-icon-size, 24px)}.mat-mdc-icon-button svg,.mat-mdc-icon-button img{width:var(--mdc-icon-button-icon-size, 24px);height:var(--mdc-icon-button-icon-size, 24px)}.mat-mdc-icon-button:disabled{opacity:var(--mdc-icon-button-disabled-icon-opacity, 0.38)}.mat-mdc-icon-button:disabled{color:var(--mdc-icon-button-disabled-icon-color, #000)}.mat-mdc-icon-button svg{vertical-align:baseline}.mat-mdc-icon-button[disabled]{cursor:default;pointer-events:none;opacity:1}.mat-mdc-icon-button .mat-mdc-button-ripple,.mat-mdc-icon-button .mat-mdc-button-persistent-ripple,.mat-mdc-icon-button .mat-mdc-button-persistent-ripple::before{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none;border-radius:inherit}.mat-mdc-icon-button .mat-mdc-button-persistent-ripple::before{content:"";opacity:0;background-color:var(--mat-mdc-button-persistent-ripple-color)}.mat-mdc-icon-button .mat-ripple-element{background-color:var(--mat-mdc-button-ripple-color)}.mat-mdc-icon-button .mdc-button__label{z-index:1}.mat-mdc-icon-button .mat-mdc-focus-indicator{top:0;left:0;right:0;bottom:0;position:absolute}.mat-mdc-icon-button:focus .mat-mdc-focus-indicator::before{content:""}.mat-mdc-icon-button .mat-mdc-button-touch-target{position:absolute;top:50%;height:48px;left:50%;width:48px;transform:translate(-50%, -50%)}.mat-mdc-icon-button._mat-animation-noopable{transition:none !important;animation:none !important}.mat-mdc-icon-button .mat-mdc-button-persistent-ripple{border-radius:50%}.mat-mdc-icon-button.mat-unthemed:not(.mdc-ripple-upgraded):focus::before,.mat-mdc-icon-button.mat-primary:not(.mdc-ripple-upgraded):focus::before,.mat-mdc-icon-button.mat-accent:not(.mdc-ripple-upgraded):focus::before,.mat-mdc-icon-button.mat-warn:not(.mdc-ripple-upgraded):focus::before{background:rgba(0,0,0,0);opacity:1}',w],encapsulation:2,changeDetection:0});class nt extends xe{constructor(Ve,tt,Ne,wt){super(Ve,tt,Ne,wt)}}nt.\u0275fac=function(Ve){return new(Ve||nt)(e.Y36(e.SBq),e.Y36(o.t4),e.Y36(e.R0b),e.Y36(e.QbO,8))},nt.\u0275cmp=e.Xpm({type:nt,selectors:[["a","mat-icon-button",""]],hostVars:9,hostBindings:function(Ve,tt){2&Ve&&(e.uIk("disabled",tt.disabled||null)("tabindex",tt.disabled?-1:tt.tabIndex)("aria-disabled",tt.disabled.toString()),e.ekj("_mat-animation-noopable","NoopAnimations"===tt._animationMode)("mat-unthemed",!tt.color)("mat-mdc-button-base",!0))},inputs:{disabled:"disabled",disableRipple:"disableRipple",color:"color",tabIndex:"tabIndex"},exportAs:["matButton","matAnchor"],features:[e.qOj],attrs:ue,ngContentSelectors:n,decls:8,vars:6,consts:[[1,"mat-mdc-button-persistent-ripple"],[1,"mdc-button__label"],[1,"mat-mdc-focus-indicator"],["matRipple","",1,"mat-mdc-button-ripple",3,"matRippleDisabled","matRippleTrigger"],[1,"mat-mdc-button-touch-target"]],template:function(Ve,tt){1&Ve&&(e.F$t(T),e._UZ(0,"span",0),e.Hsn(1),e.TgZ(2,"span",1),e.Hsn(3,1),e.qZA(),e.Hsn(4,2),e._UZ(5,"span",2)(6,"span",3)(7,"span",4)),2&Ve&&(e.ekj("mdc-button__ripple",!tt._isFab)("mdc-fab__ripple",tt._isFab),e.xp6(6),e.Q6J("matRippleDisabled",tt._isRippleDisabled())("matRippleTrigger",tt._elementRef.nativeElement))},dependencies:[D.wG],styles:['.mdc-icon-button{font-size:24px;width:48px;height:48px;padding:12px}.mdc-icon-button .mdc-icon-button__focus-ring{max-height:48px;max-width:48px}.mdc-icon-button.mdc-icon-button--reduced-size .mdc-icon-button__ripple{width:40px;height:40px;margin-top:4px;margin-bottom:4px;margin-right:4px;margin-left:4px}.mdc-icon-button.mdc-icon-button--reduced-size .mdc-icon-button__focus-ring{max-height:40px;max-width:40px}.mdc-icon-button .mdc-icon-button__touch{position:absolute;top:50%;height:48px;left:50%;width:48px;transform:translate(-50%, -50%)}.mdc-icon-button svg,.mdc-icon-button img{width:24px;height:24px}.mdc-icon-button{display:inline-block;position:relative;box-sizing:border-box;border:none;outline:none;background-color:rgba(0,0,0,0);fill:currentColor;color:inherit;text-decoration:none;cursor:pointer;user-select:none;z-index:0;overflow:visible}.mdc-icon-button .mdc-icon-button__touch{position:absolute;top:50%;height:48px;left:50%;width:48px;transform:translate(-50%, -50%)}@media screen and (forced-colors: active){.mdc-icon-button.mdc-ripple-upgraded--background-focused .mdc-icon-button__focus-ring,.mdc-icon-button:not(.mdc-ripple-upgraded):focus .mdc-icon-button__focus-ring{display:block}}.mdc-icon-button:disabled{cursor:default;pointer-events:none}.mdc-icon-button[hidden]{display:none}.mdc-icon-button--display-flex{align-items:center;display:inline-flex;justify-content:center}.mdc-icon-button__focus-ring{pointer-events:none;border:2px solid rgba(0,0,0,0);border-radius:6px;box-sizing:content-box;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);height:100%;width:100%;display:none}@media screen and (forced-colors: active){.mdc-icon-button__focus-ring{border-color:CanvasText}}.mdc-icon-button__focus-ring::after{content:"";border:2px solid rgba(0,0,0,0);border-radius:8px;display:block;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);height:calc(100% + 4px);width:calc(100% + 4px)}@media screen and (forced-colors: active){.mdc-icon-button__focus-ring::after{border-color:CanvasText}}.mdc-icon-button__icon{display:inline-block}.mdc-icon-button__icon.mdc-icon-button__icon--on{display:none}.mdc-icon-button--on .mdc-icon-button__icon{display:none}.mdc-icon-button--on .mdc-icon-button__icon.mdc-icon-button__icon--on{display:inline-block}.mdc-icon-button__link{height:100%;left:0;outline:none;position:absolute;top:0;width:100%}.mat-mdc-icon-button{height:var(--mdc-icon-button-state-layer-size, 48px);width:var(--mdc-icon-button-state-layer-size, 48px);color:var(--mdc-icon-button-icon-color, inherit);border-radius:50%;flex-shrink:0;text-align:center;-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-mdc-icon-button .mdc-button__icon{font-size:var(--mdc-icon-button-icon-size, 24px)}.mat-mdc-icon-button svg,.mat-mdc-icon-button img{width:var(--mdc-icon-button-icon-size, 24px);height:var(--mdc-icon-button-icon-size, 24px)}.mat-mdc-icon-button:disabled{opacity:var(--mdc-icon-button-disabled-icon-opacity, 0.38)}.mat-mdc-icon-button:disabled{color:var(--mdc-icon-button-disabled-icon-color, #000)}.mat-mdc-icon-button svg{vertical-align:baseline}.mat-mdc-icon-button[disabled]{cursor:default;pointer-events:none;opacity:1}.mat-mdc-icon-button .mat-mdc-button-ripple,.mat-mdc-icon-button .mat-mdc-button-persistent-ripple,.mat-mdc-icon-button .mat-mdc-button-persistent-ripple::before{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none;border-radius:inherit}.mat-mdc-icon-button .mat-mdc-button-persistent-ripple::before{content:"";opacity:0;background-color:var(--mat-mdc-button-persistent-ripple-color)}.mat-mdc-icon-button .mat-ripple-element{background-color:var(--mat-mdc-button-ripple-color)}.mat-mdc-icon-button .mdc-button__label{z-index:1}.mat-mdc-icon-button .mat-mdc-focus-indicator{top:0;left:0;right:0;bottom:0;position:absolute}.mat-mdc-icon-button:focus .mat-mdc-focus-indicator::before{content:""}.mat-mdc-icon-button .mat-mdc-button-touch-target{position:absolute;top:50%;height:48px;left:50%;width:48px;transform:translate(-50%, -50%)}.mat-mdc-icon-button._mat-animation-noopable{transition:none !important;animation:none !important}.mat-mdc-icon-button .mat-mdc-button-persistent-ripple{border-radius:50%}.mat-mdc-icon-button.mat-unthemed:not(.mdc-ripple-upgraded):focus::before,.mat-mdc-icon-button.mat-primary:not(.mdc-ripple-upgraded):focus::before,.mat-mdc-icon-button.mat-accent:not(.mdc-ripple-upgraded):focus::before,.mat-mdc-icon-button.mat-warn:not(.mdc-ripple-upgraded):focus::before{background:rgba(0,0,0,0);opacity:1}',w],encapsulation:2,changeDetection:0});class mt{}mt.\u0275fac=function(Ve){return new(Ve||mt)},mt.\u0275mod=e.oAB({type:mt}),mt.\u0275inj=e.cJS({imports:[D.BQ,D.si,D.BQ]})},56709:(qe,I,p)=>{"use strict";p.d(I,{oG:()=>ae,p9:()=>ge});var o=p(94650),e=p(24006),l=p(3238),D=p(21281);const g=["input"],E=["label"],n=new o.OlP("mat-checkbox-default-options",{providedIn:"root",factory:P});function P(){return{color:"accent",clickAction:"check-indeterminate"}}const w={provide:e.JU,useExisting:(0,o.Gpc)(()=>ae),multi:!0};class B{}let Y=0;const V={color:"accent",clickAction:"check-indeterminate"},ue=(0,l.sb)((0,l.pj)((0,l.Kr)((0,l.Id)(class{constructor(ne){this._elementRef=ne}}))));class he extends ue{get inputId(){return`${this.id||this._uniqueId}-input`}get required(){return this._required}set required(pe){this._required=(0,D.Ig)(pe)}constructor(pe,Pe,xe,de,re,oe,me){super(Pe),this._changeDetectorRef=xe,this._ngZone=de,this._animationMode=oe,this._options=me,this.ariaLabel="",this.ariaLabelledby=null,this.labelPosition="after",this.name=null,this.change=new o.vpe,this.indeterminateChange=new o.vpe,this._onTouched=()=>{},this._currentAnimationClass="",this._currentCheckState=0,this._controlValueAccessorChangeFn=()=>{},this._checked=!1,this._disabled=!1,this._indeterminate=!1,this._options=this._options||V,this.color=this.defaultColor=this._options.color||V.color,this.tabIndex=parseInt(re)||0,this.id=this._uniqueId=`${pe}${++Y}`}ngAfterViewInit(){this._syncIndeterminate(this._indeterminate)}get checked(){return this._checked}set checked(pe){const Pe=(0,D.Ig)(pe);Pe!=this.checked&&(this._checked=Pe,this._changeDetectorRef.markForCheck())}get disabled(){return this._disabled}set disabled(pe){const Pe=(0,D.Ig)(pe);Pe!==this.disabled&&(this._disabled=Pe,this._changeDetectorRef.markForCheck())}get indeterminate(){return this._indeterminate}set indeterminate(pe){const Pe=pe!=this._indeterminate;this._indeterminate=(0,D.Ig)(pe),Pe&&(this._indeterminate?this._transitionCheckState(3):this._transitionCheckState(this.checked?1:2),this.indeterminateChange.emit(this._indeterminate)),this._syncIndeterminate(this._indeterminate)}_isRippleDisabled(){return this.disableRipple||this.disabled}_onLabelTextChange(){this._changeDetectorRef.detectChanges()}writeValue(pe){this.checked=!!pe}registerOnChange(pe){this._controlValueAccessorChangeFn=pe}registerOnTouched(pe){this._onTouched=pe}setDisabledState(pe){this.disabled=pe}_transitionCheckState(pe){let Pe=this._currentCheckState,xe=this._getAnimationTargetElement();if(Pe!==pe&&xe&&(this._currentAnimationClass&&xe.classList.remove(this._currentAnimationClass),this._currentAnimationClass=this._getAnimationClassForCheckStateTransition(Pe,pe),this._currentCheckState=pe,this._currentAnimationClass.length>0)){xe.classList.add(this._currentAnimationClass);const de=this._currentAnimationClass;this._ngZone.runOutsideAngular(()=>{setTimeout(()=>{xe.classList.remove(de)},1e3)})}}_emitChangeEvent(){this._controlValueAccessorChangeFn(this.checked),this.change.emit(this._createChangeEvent(this.checked)),this._inputElement&&(this._inputElement.nativeElement.checked=this.checked)}toggle(){this.checked=!this.checked,this._controlValueAccessorChangeFn(this.checked)}_handleInputClick(){const pe=this._options?.clickAction;this.disabled||"noop"===pe?!this.disabled&&"noop"===pe&&(this._inputElement.nativeElement.checked=this.checked,this._inputElement.nativeElement.indeterminate=this.indeterminate):(this.indeterminate&&"check"!==pe&&Promise.resolve().then(()=>{this._indeterminate=!1,this.indeterminateChange.emit(this._indeterminate)}),this._checked=!this._checked,this._transitionCheckState(this._checked?1:2),this._emitChangeEvent())}_onInteractionEvent(pe){pe.stopPropagation()}_onBlur(){Promise.resolve().then(()=>{this._onTouched(),this._changeDetectorRef.markForCheck()})}_getAnimationClassForCheckStateTransition(pe,Pe){if("NoopAnimations"===this._animationMode)return"";switch(pe){case 0:if(1===Pe)return this._animationClasses.uncheckedToChecked;if(3==Pe)return this._checked?this._animationClasses.checkedToIndeterminate:this._animationClasses.uncheckedToIndeterminate;break;case 2:return 1===Pe?this._animationClasses.uncheckedToChecked:this._animationClasses.uncheckedToIndeterminate;case 1:return 2===Pe?this._animationClasses.checkedToUnchecked:this._animationClasses.checkedToIndeterminate;case 3:return 1===Pe?this._animationClasses.indeterminateToChecked:this._animationClasses.indeterminateToUnchecked}return""}_syncIndeterminate(pe){const Pe=this._inputElement;Pe&&(Pe.nativeElement.indeterminate=pe)}}he.\u0275fac=function(pe){o.$Z()},he.\u0275dir=o.lG2({type:he,viewQuery:function(pe,Pe){if(1&pe&&(o.Gf(g,5),o.Gf(E,5),o.Gf(l.wG,5)),2&pe){let xe;o.iGM(xe=o.CRH())&&(Pe._inputElement=xe.first),o.iGM(xe=o.CRH())&&(Pe._labelElement=xe.first),o.iGM(xe=o.CRH())&&(Pe.ripple=xe.first)}},inputs:{ariaLabel:["aria-label","ariaLabel"],ariaLabelledby:["aria-labelledby","ariaLabelledby"],ariaDescribedby:["aria-describedby","ariaDescribedby"],id:"id",required:"required",labelPosition:"labelPosition",name:"name",value:"value",checked:"checked",disabled:"disabled",indeterminate:"indeterminate"},outputs:{change:"change",indeterminateChange:"indeterminateChange"},features:[o.qOj]});class ae extends he{constructor(pe,Pe,xe,de,re,oe){super("mat-mdc-checkbox-",pe,Pe,xe,de,re,oe),this._animationClasses={uncheckedToChecked:"mdc-checkbox--anim-unchecked-checked",uncheckedToIndeterminate:"mdc-checkbox--anim-unchecked-indeterminate",checkedToUnchecked:"mdc-checkbox--anim-checked-unchecked",checkedToIndeterminate:"mdc-checkbox--anim-checked-indeterminate",indeterminateToChecked:"mdc-checkbox--anim-indeterminate-checked",indeterminateToUnchecked:"mdc-checkbox--anim-indeterminate-unchecked"}}focus(){this._inputElement.nativeElement.focus()}_createChangeEvent(pe){const Pe=new B;return Pe.source=this,Pe.checked=pe,Pe}_getAnimationTargetElement(){return this._inputElement?.nativeElement}_onInputClick(){super._handleInputClick()}_onTouchTargetClick(){super._handleInputClick(),this.disabled||this._inputElement.nativeElement.focus()}_preventBubblingFromLabel(pe){pe.target&&this._labelElement.nativeElement.contains(pe.target)&&pe.stopPropagation()}}ae.\u0275fac=function(pe){return new(pe||ae)(o.Y36(o.SBq),o.Y36(o.sBO),o.Y36(o.R0b),o.$8M("tabindex"),o.Y36(o.QbO,8),o.Y36(n,8))},ae.\u0275cmp=o.Xpm({type:ae,selectors:[["mat-checkbox"]],hostAttrs:[1,"mat-mdc-checkbox"],hostVars:12,hostBindings:function(pe,Pe){2&pe&&(o.Ikx("id",Pe.id),o.uIk("tabindex",null)("aria-label",null)("aria-labelledby",null),o.ekj("_mat-animation-noopable","NoopAnimations"===Pe._animationMode)("mdc-checkbox--disabled",Pe.disabled)("mat-mdc-checkbox-disabled",Pe.disabled)("mat-mdc-checkbox-checked",Pe.checked))},inputs:{disableRipple:"disableRipple",color:"color",tabIndex:"tabIndex"},exportAs:["matCheckbox"],features:[o._Bn([w]),o.qOj],ngContentSelectors:["*"],decls:15,vars:19,consts:[[1,"mdc-form-field",3,"click"],[1,"mdc-checkbox"],["checkbox",""],[1,"mat-mdc-checkbox-touch-target",3,"click"],["type","checkbox",1,"mdc-checkbox__native-control",3,"checked","indeterminate","disabled","id","required","tabIndex","blur","click","change"],["input",""],[1,"mdc-checkbox__ripple"],[1,"mdc-checkbox__background"],["focusable","false","viewBox","0 0 24 24","aria-hidden","true",1,"mdc-checkbox__checkmark"],["fill","none","d","M1.73,12.91 8.1,19.28 22.79,4.59",1,"mdc-checkbox__checkmark-path"],[1,"mdc-checkbox__mixedmark"],["mat-ripple","",1,"mat-mdc-checkbox-ripple","mat-mdc-focus-indicator",3,"matRippleTrigger","matRippleDisabled","matRippleCentered"],[3,"for"],["label",""]],template:function(pe,Pe){if(1&pe&&(o.F$t(),o.TgZ(0,"div",0),o.NdJ("click",function(de){return Pe._preventBubblingFromLabel(de)}),o.TgZ(1,"div",1,2)(3,"div",3),o.NdJ("click",function(){return Pe._onTouchTargetClick()}),o.qZA(),o.TgZ(4,"input",4,5),o.NdJ("blur",function(){return Pe._onBlur()})("click",function(){return Pe._onInputClick()})("change",function(de){return Pe._onInteractionEvent(de)}),o.qZA(),o._UZ(6,"div",6),o.TgZ(7,"div",7),o.O4$(),o.TgZ(8,"svg",8),o._UZ(9,"path",9),o.qZA(),o.kcU(),o._UZ(10,"div",10),o.qZA(),o._UZ(11,"div",11),o.qZA(),o.TgZ(12,"label",12,13),o.Hsn(14),o.qZA()()),2&pe){const xe=o.MAs(2);o.ekj("mdc-form-field--align-end","before"==Pe.labelPosition),o.xp6(4),o.ekj("mdc-checkbox--selected",Pe.checked),o.Q6J("checked",Pe.checked)("indeterminate",Pe.indeterminate)("disabled",Pe.disabled)("id",Pe.inputId)("required",Pe.required)("tabIndex",Pe.tabIndex),o.uIk("aria-label",Pe.ariaLabel||null)("aria-labelledby",Pe.ariaLabelledby)("aria-describedby",Pe.ariaDescribedby)("name",Pe.name)("value",Pe.value),o.xp6(7),o.Q6J("matRippleTrigger",xe)("matRippleDisabled",Pe.disableRipple||Pe.disabled)("matRippleCentered",!0),o.xp6(1),o.Q6J("for",Pe.inputId)}},dependencies:[l.wG],styles:['.mdc-touch-target-wrapper{display:inline}@keyframes mdc-checkbox-unchecked-checked-checkmark-path{0%,50%{stroke-dashoffset:29.7833385}50%{animation-timing-function:cubic-bezier(0, 0, 0.2, 1)}100%{stroke-dashoffset:0}}@keyframes mdc-checkbox-unchecked-indeterminate-mixedmark{0%,68.2%{transform:scaleX(0)}68.2%{animation-timing-function:cubic-bezier(0, 0, 0, 1)}100%{transform:scaleX(1)}}@keyframes mdc-checkbox-checked-unchecked-checkmark-path{from{animation-timing-function:cubic-bezier(0.4, 0, 1, 1);opacity:1;stroke-dashoffset:0}to{opacity:0;stroke-dashoffset:-29.7833385}}@keyframes mdc-checkbox-checked-indeterminate-checkmark{from{animation-timing-function:cubic-bezier(0, 0, 0.2, 1);transform:rotate(0deg);opacity:1}to{transform:rotate(45deg);opacity:0}}@keyframes mdc-checkbox-indeterminate-checked-checkmark{from{animation-timing-function:cubic-bezier(0.14, 0, 0, 1);transform:rotate(45deg);opacity:0}to{transform:rotate(360deg);opacity:1}}@keyframes mdc-checkbox-checked-indeterminate-mixedmark{from{animation-timing-function:mdc-animation-deceleration-curve-timing-function;transform:rotate(-45deg);opacity:0}to{transform:rotate(0deg);opacity:1}}@keyframes mdc-checkbox-indeterminate-checked-mixedmark{from{animation-timing-function:cubic-bezier(0.14, 0, 0, 1);transform:rotate(0deg);opacity:1}to{transform:rotate(315deg);opacity:0}}@keyframes mdc-checkbox-indeterminate-unchecked-mixedmark{0%{animation-timing-function:linear;transform:scaleX(1);opacity:1}32.8%,100%{transform:scaleX(0);opacity:0}}.mdc-checkbox{display:inline-block;position:relative;flex:0 0 18px;box-sizing:content-box;width:18px;height:18px;line-height:0;white-space:nowrap;cursor:pointer;vertical-align:bottom}.mdc-checkbox[hidden]{display:none}.mdc-checkbox.mdc-ripple-upgraded--background-focused .mdc-checkbox__focus-ring,.mdc-checkbox:not(.mdc-ripple-upgraded):focus .mdc-checkbox__focus-ring{pointer-events:none;border:2px solid rgba(0,0,0,0);border-radius:6px;box-sizing:content-box;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);height:100%;width:100%}@media screen and (forced-colors: active){.mdc-checkbox.mdc-ripple-upgraded--background-focused .mdc-checkbox__focus-ring,.mdc-checkbox:not(.mdc-ripple-upgraded):focus .mdc-checkbox__focus-ring{border-color:CanvasText}}.mdc-checkbox.mdc-ripple-upgraded--background-focused .mdc-checkbox__focus-ring::after,.mdc-checkbox:not(.mdc-ripple-upgraded):focus .mdc-checkbox__focus-ring::after{content:"";border:2px solid rgba(0,0,0,0);border-radius:8px;display:block;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);height:calc(100% + 4px);width:calc(100% + 4px)}@media screen and (forced-colors: active){.mdc-checkbox.mdc-ripple-upgraded--background-focused .mdc-checkbox__focus-ring::after,.mdc-checkbox:not(.mdc-ripple-upgraded):focus .mdc-checkbox__focus-ring::after{border-color:CanvasText}}@media all and (-ms-high-contrast: none){.mdc-checkbox .mdc-checkbox__focus-ring{display:none}}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mdc-checkbox__mixedmark{margin:0 1px}}.mdc-checkbox--disabled{cursor:default;pointer-events:none}.mdc-checkbox__background{display:inline-flex;position:absolute;align-items:center;justify-content:center;box-sizing:border-box;width:18px;height:18px;border:2px solid currentColor;border-radius:2px;background-color:rgba(0,0,0,0);pointer-events:none;will-change:background-color,border-color;transition:background-color 90ms 0ms cubic-bezier(0.4, 0, 0.6, 1),border-color 90ms 0ms cubic-bezier(0.4, 0, 0.6, 1)}.mdc-checkbox__checkmark{position:absolute;top:0;right:0;bottom:0;left:0;width:100%;opacity:0;transition:opacity 180ms 0ms cubic-bezier(0.4, 0, 0.6, 1)}.mdc-checkbox--upgraded .mdc-checkbox__checkmark{opacity:1}.mdc-checkbox__checkmark-path{transition:stroke-dashoffset 180ms 0ms cubic-bezier(0.4, 0, 0.6, 1);stroke:currentColor;stroke-width:3.12px;stroke-dashoffset:29.7833385;stroke-dasharray:29.7833385}.mdc-checkbox__mixedmark{width:100%;height:0;transform:scaleX(0) rotate(0deg);border-width:1px;border-style:solid;opacity:0;transition:opacity 90ms 0ms cubic-bezier(0.4, 0, 0.6, 1),transform 90ms 0ms cubic-bezier(0.4, 0, 0.6, 1)}.mdc-checkbox--anim-unchecked-checked .mdc-checkbox__background,.mdc-checkbox--anim-unchecked-indeterminate .mdc-checkbox__background,.mdc-checkbox--anim-checked-unchecked .mdc-checkbox__background,.mdc-checkbox--anim-indeterminate-unchecked .mdc-checkbox__background{animation-duration:180ms;animation-timing-function:linear}.mdc-checkbox--anim-unchecked-checked .mdc-checkbox__checkmark-path{animation:mdc-checkbox-unchecked-checked-checkmark-path 180ms linear 0s;transition:none}.mdc-checkbox--anim-unchecked-indeterminate .mdc-checkbox__mixedmark{animation:mdc-checkbox-unchecked-indeterminate-mixedmark 90ms linear 0s;transition:none}.mdc-checkbox--anim-checked-unchecked .mdc-checkbox__checkmark-path{animation:mdc-checkbox-checked-unchecked-checkmark-path 90ms linear 0s;transition:none}.mdc-checkbox--anim-checked-indeterminate .mdc-checkbox__checkmark{animation:mdc-checkbox-checked-indeterminate-checkmark 90ms linear 0s;transition:none}.mdc-checkbox--anim-checked-indeterminate .mdc-checkbox__mixedmark{animation:mdc-checkbox-checked-indeterminate-mixedmark 90ms linear 0s;transition:none}.mdc-checkbox--anim-indeterminate-checked .mdc-checkbox__checkmark{animation:mdc-checkbox-indeterminate-checked-checkmark 500ms linear 0s;transition:none}.mdc-checkbox--anim-indeterminate-checked .mdc-checkbox__mixedmark{animation:mdc-checkbox-indeterminate-checked-mixedmark 500ms linear 0s;transition:none}.mdc-checkbox--anim-indeterminate-unchecked .mdc-checkbox__mixedmark{animation:mdc-checkbox-indeterminate-unchecked-mixedmark 300ms linear 0s;transition:none}.mdc-checkbox__native-control:checked~.mdc-checkbox__background,.mdc-checkbox__native-control:indeterminate~.mdc-checkbox__background,.mdc-checkbox__native-control[data-indeterminate=true]~.mdc-checkbox__background{transition:border-color 90ms 0ms cubic-bezier(0, 0, 0.2, 1),background-color 90ms 0ms cubic-bezier(0, 0, 0.2, 1)}.mdc-checkbox__native-control:checked~.mdc-checkbox__background .mdc-checkbox__checkmark-path,.mdc-checkbox__native-control:indeterminate~.mdc-checkbox__background .mdc-checkbox__checkmark-path,.mdc-checkbox__native-control[data-indeterminate=true]~.mdc-checkbox__background .mdc-checkbox__checkmark-path{stroke-dashoffset:0}.mdc-checkbox__native-control{position:absolute;margin:0;padding:0;opacity:0;cursor:inherit}.mdc-checkbox__native-control:disabled{cursor:default;pointer-events:none}.mdc-checkbox--touch{margin:calc((var(--mdc-checkbox-state-layer-size, 48px) - var(--mdc-checkbox-state-layer-size, 40px)) / 2)}.mdc-checkbox--touch .mdc-checkbox__native-control{top:calc((var(--mdc-checkbox-state-layer-size, 40px) - var(--mdc-checkbox-state-layer-size, 48px)) / 2);right:calc((var(--mdc-checkbox-state-layer-size, 40px) - var(--mdc-checkbox-state-layer-size, 48px)) / 2);left:calc((var(--mdc-checkbox-state-layer-size, 40px) - var(--mdc-checkbox-state-layer-size, 48px)) / 2);width:var(--mdc-checkbox-state-layer-size, 48px);height:var(--mdc-checkbox-state-layer-size, 48px)}.mdc-checkbox__native-control:checked~.mdc-checkbox__background .mdc-checkbox__checkmark{transition:opacity 180ms 0ms cubic-bezier(0, 0, 0.2, 1),transform 180ms 0ms cubic-bezier(0, 0, 0.2, 1);opacity:1}.mdc-checkbox__native-control:checked~.mdc-checkbox__background .mdc-checkbox__mixedmark{transform:scaleX(1) rotate(-45deg)}.mdc-checkbox__native-control:indeterminate~.mdc-checkbox__background .mdc-checkbox__checkmark,.mdc-checkbox__native-control[data-indeterminate=true]~.mdc-checkbox__background .mdc-checkbox__checkmark{transform:rotate(45deg);opacity:0;transition:opacity 90ms 0ms cubic-bezier(0.4, 0, 0.6, 1),transform 90ms 0ms cubic-bezier(0.4, 0, 0.6, 1)}.mdc-checkbox__native-control:indeterminate~.mdc-checkbox__background .mdc-checkbox__mixedmark,.mdc-checkbox__native-control[data-indeterminate=true]~.mdc-checkbox__background .mdc-checkbox__mixedmark{transform:scaleX(1) rotate(0deg);opacity:1}.mdc-checkbox.mdc-checkbox--upgraded .mdc-checkbox__background,.mdc-checkbox.mdc-checkbox--upgraded .mdc-checkbox__checkmark,.mdc-checkbox.mdc-checkbox--upgraded .mdc-checkbox__checkmark-path,.mdc-checkbox.mdc-checkbox--upgraded .mdc-checkbox__mixedmark{transition:none}.mdc-form-field{display:inline-flex;align-items:center;vertical-align:middle}.mdc-form-field[hidden]{display:none}.mdc-form-field>label{margin-left:0;margin-right:auto;padding-left:4px;padding-right:0;order:0}[dir=rtl] .mdc-form-field>label,.mdc-form-field>label[dir=rtl]{margin-left:auto;margin-right:0}[dir=rtl] .mdc-form-field>label,.mdc-form-field>label[dir=rtl]{padding-left:0;padding-right:4px}.mdc-form-field--nowrap>label{text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.mdc-form-field--align-end>label{margin-left:auto;margin-right:0;padding-left:0;padding-right:4px;order:-1}[dir=rtl] .mdc-form-field--align-end>label,.mdc-form-field--align-end>label[dir=rtl]{margin-left:0;margin-right:auto}[dir=rtl] .mdc-form-field--align-end>label,.mdc-form-field--align-end>label[dir=rtl]{padding-left:4px;padding-right:0}.mdc-form-field--space-between{justify-content:space-between}.mdc-form-field--space-between>label{margin:0}[dir=rtl] .mdc-form-field--space-between>label,.mdc-form-field--space-between>label[dir=rtl]{margin:0}.mat-mdc-checkbox{display:inline-block;position:relative;-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-mdc-checkbox .mdc-checkbox{padding:calc((var(--mdc-checkbox-state-layer-size, 40px) - 18px) / 2);margin:calc((var(--mdc-checkbox-state-layer-size, 40px) - var(--mdc-checkbox-state-layer-size, 40px)) / 2)}.mat-mdc-checkbox .mdc-checkbox .mdc-checkbox__native-control[disabled]:not(:checked):not(:indeterminate):not([data-indeterminate=true])~.mdc-checkbox__background{border-color:var(--mdc-checkbox-disabled-unselected-icon-color, rgba(0, 0, 0, 0.38));background-color:transparent}.mat-mdc-checkbox .mdc-checkbox .mdc-checkbox__native-control[disabled]:checked~.mdc-checkbox__background,.mat-mdc-checkbox .mdc-checkbox .mdc-checkbox__native-control[disabled]:indeterminate~.mdc-checkbox__background,.mat-mdc-checkbox .mdc-checkbox .mdc-checkbox__native-control[data-indeterminate=true][disabled]~.mdc-checkbox__background{border-color:transparent;background-color:var(--mdc-checkbox-disabled-selected-icon-color, rgba(0, 0, 0, 0.38))}.mat-mdc-checkbox .mdc-checkbox .mdc-checkbox__native-control:enabled~.mdc-checkbox__background .mdc-checkbox__checkmark{color:var(--mdc-checkbox-selected-checkmark-color, #fff)}.mat-mdc-checkbox .mdc-checkbox .mdc-checkbox__native-control:enabled~.mdc-checkbox__background .mdc-checkbox__mixedmark{border-color:var(--mdc-checkbox-selected-checkmark-color, #fff)}.mat-mdc-checkbox .mdc-checkbox .mdc-checkbox__native-control:disabled~.mdc-checkbox__background .mdc-checkbox__checkmark{color:var(--mdc-checkbox-disabled-selected-checkmark-color, #fff)}.mat-mdc-checkbox .mdc-checkbox .mdc-checkbox__native-control:disabled~.mdc-checkbox__background .mdc-checkbox__mixedmark{border-color:var(--mdc-checkbox-disabled-selected-checkmark-color, #fff)}.mat-mdc-checkbox .mdc-checkbox .mdc-checkbox__native-control:enabled:not(:checked):not(:indeterminate):not([data-indeterminate=true])~.mdc-checkbox__background{border-color:var(--mdc-checkbox-unselected-icon-color, rgba(0, 0, 0, 0.54));background-color:transparent}.mat-mdc-checkbox .mdc-checkbox .mdc-checkbox__native-control:enabled:checked~.mdc-checkbox__background,.mat-mdc-checkbox .mdc-checkbox .mdc-checkbox__native-control:enabled:indeterminate~.mdc-checkbox__background,.mat-mdc-checkbox .mdc-checkbox .mdc-checkbox__native-control[data-indeterminate=true]:enabled~.mdc-checkbox__background{border-color:var(--mdc-checkbox-selected-icon-color, var(--mdc-theme-secondary, #018786));background-color:var(--mdc-checkbox-selected-icon-color, var(--mdc-theme-secondary, #018786))}@keyframes mdc-checkbox-fade-in-background-8A000000FF01878600000000FF018786{0%{border-color:var(--mdc-checkbox-unselected-icon-color, rgba(0, 0, 0, 0.54));background-color:transparent}50%{border-color:var(--mdc-checkbox-selected-icon-color, var(--mdc-theme-secondary, #018786));background-color:var(--mdc-checkbox-selected-icon-color, var(--mdc-theme-secondary, #018786))}}@keyframes mdc-checkbox-fade-out-background-8A000000FF01878600000000FF018786{0%,80%{border-color:var(--mdc-checkbox-selected-icon-color, var(--mdc-theme-secondary, #018786));background-color:var(--mdc-checkbox-selected-icon-color, var(--mdc-theme-secondary, #018786))}100%{border-color:var(--mdc-checkbox-unselected-icon-color, rgba(0, 0, 0, 0.54));background-color:transparent}}.mat-mdc-checkbox .mdc-checkbox.mdc-checkbox--anim-unchecked-checked .mdc-checkbox__native-control:enabled~.mdc-checkbox__background,.mat-mdc-checkbox .mdc-checkbox.mdc-checkbox--anim-unchecked-indeterminate .mdc-checkbox__native-control:enabled~.mdc-checkbox__background{animation-name:mdc-checkbox-fade-in-background-8A000000FF01878600000000FF018786}.mat-mdc-checkbox .mdc-checkbox.mdc-checkbox--anim-checked-unchecked .mdc-checkbox__native-control:enabled~.mdc-checkbox__background,.mat-mdc-checkbox .mdc-checkbox.mdc-checkbox--anim-indeterminate-unchecked .mdc-checkbox__native-control:enabled~.mdc-checkbox__background{animation-name:mdc-checkbox-fade-out-background-8A000000FF01878600000000FF018786}.mat-mdc-checkbox .mdc-checkbox:hover .mdc-checkbox__native-control:enabled:not(:checked):not(:indeterminate):not([data-indeterminate=true])~.mdc-checkbox__background{border-color:var(--mdc-checkbox-unselected-hover-icon-color, var(--mdc-theme-secondary, #018786));background-color:transparent}.mat-mdc-checkbox .mdc-checkbox:hover .mdc-checkbox__native-control:enabled:checked~.mdc-checkbox__background,.mat-mdc-checkbox .mdc-checkbox:hover .mdc-checkbox__native-control:enabled:indeterminate~.mdc-checkbox__background,.mat-mdc-checkbox .mdc-checkbox:hover .mdc-checkbox__native-control[data-indeterminate=true]:enabled~.mdc-checkbox__background{border-color:var(--mdc-checkbox-selected-hover-icon-color, var(--mdc-theme-secondary, #018786));background-color:var(--mdc-checkbox-selected-hover-icon-color, var(--mdc-theme-secondary, #018786))}@keyframes mdc-checkbox-fade-in-background-FF018786FF01878600000000FF018786{0%{border-color:var(--mdc-checkbox-unselected-hover-icon-color, var(--mdc-theme-secondary, #018786));background-color:transparent}50%{border-color:var(--mdc-checkbox-selected-hover-icon-color, var(--mdc-theme-secondary, #018786));background-color:var(--mdc-checkbox-selected-hover-icon-color, var(--mdc-theme-secondary, #018786))}}@keyframes mdc-checkbox-fade-out-background-FF018786FF01878600000000FF018786{0%,80%{border-color:var(--mdc-checkbox-selected-hover-icon-color, var(--mdc-theme-secondary, #018786));background-color:var(--mdc-checkbox-selected-hover-icon-color, var(--mdc-theme-secondary, #018786))}100%{border-color:var(--mdc-checkbox-unselected-hover-icon-color, var(--mdc-theme-secondary, #018786));background-color:transparent}}.mat-mdc-checkbox .mdc-checkbox:hover.mdc-checkbox--anim-unchecked-checked .mdc-checkbox__native-control:enabled~.mdc-checkbox__background,.mat-mdc-checkbox .mdc-checkbox:hover.mdc-checkbox--anim-unchecked-indeterminate .mdc-checkbox__native-control:enabled~.mdc-checkbox__background{animation-name:mdc-checkbox-fade-in-background-FF018786FF01878600000000FF018786}.mat-mdc-checkbox .mdc-checkbox:hover.mdc-checkbox--anim-checked-unchecked .mdc-checkbox__native-control:enabled~.mdc-checkbox__background,.mat-mdc-checkbox .mdc-checkbox:hover.mdc-checkbox--anim-indeterminate-unchecked .mdc-checkbox__native-control:enabled~.mdc-checkbox__background{animation-name:mdc-checkbox-fade-out-background-FF018786FF01878600000000FF018786}.mat-mdc-checkbox .mdc-checkbox.mdc-ripple-upgraded--background-focused .mdc-checkbox__native-control:enabled:not(:checked):not(:indeterminate):not([data-indeterminate=true])~.mdc-checkbox__background,.mat-mdc-checkbox .mdc-checkbox:not(.mdc-ripple-upgraded):focus .mdc-checkbox__native-control:enabled:not(:checked):not(:indeterminate):not([data-indeterminate=true])~.mdc-checkbox__background{border-color:var(--mdc-checkbox-unselected-focus-icon-color, var(--mdc-theme-secondary, #018786));background-color:transparent}.mat-mdc-checkbox .mdc-checkbox.mdc-ripple-upgraded--background-focused .mdc-checkbox__native-control:enabled:checked~.mdc-checkbox__background,.mat-mdc-checkbox .mdc-checkbox.mdc-ripple-upgraded--background-focused .mdc-checkbox__native-control:enabled:indeterminate~.mdc-checkbox__background,.mat-mdc-checkbox .mdc-checkbox.mdc-ripple-upgraded--background-focused .mdc-checkbox__native-control[data-indeterminate=true]:enabled~.mdc-checkbox__background,.mat-mdc-checkbox .mdc-checkbox:not(.mdc-ripple-upgraded):focus .mdc-checkbox__native-control:enabled:checked~.mdc-checkbox__background,.mat-mdc-checkbox .mdc-checkbox:not(.mdc-ripple-upgraded):focus .mdc-checkbox__native-control:enabled:indeterminate~.mdc-checkbox__background,.mat-mdc-checkbox .mdc-checkbox:not(.mdc-ripple-upgraded):focus .mdc-checkbox__native-control[data-indeterminate=true]:enabled~.mdc-checkbox__background{border-color:var(--mdc-checkbox-selected-focus-icon-color, var(--mdc-theme-secondary, #018786));background-color:var(--mdc-checkbox-selected-focus-icon-color, var(--mdc-theme-secondary, #018786))}@keyframes mdc-checkbox-fade-in-background-FF018786FF01878600000000FF018786{0%{border-color:var(--mdc-checkbox-unselected-focus-icon-color, var(--mdc-theme-secondary, #018786));background-color:transparent}50%{border-color:var(--mdc-checkbox-selected-focus-icon-color, var(--mdc-theme-secondary, #018786));background-color:var(--mdc-checkbox-selected-focus-icon-color, var(--mdc-theme-secondary, #018786))}}@keyframes mdc-checkbox-fade-out-background-FF018786FF01878600000000FF018786{0%,80%{border-color:var(--mdc-checkbox-selected-focus-icon-color, var(--mdc-theme-secondary, #018786));background-color:var(--mdc-checkbox-selected-focus-icon-color, var(--mdc-theme-secondary, #018786))}100%{border-color:var(--mdc-checkbox-unselected-focus-icon-color, var(--mdc-theme-secondary, #018786));background-color:transparent}}.mat-mdc-checkbox .mdc-checkbox.mdc-ripple-upgraded--background-focused.mdc-checkbox--anim-unchecked-checked .mdc-checkbox__native-control:enabled~.mdc-checkbox__background,.mat-mdc-checkbox .mdc-checkbox.mdc-ripple-upgraded--background-focused.mdc-checkbox--anim-unchecked-indeterminate .mdc-checkbox__native-control:enabled~.mdc-checkbox__background,.mat-mdc-checkbox .mdc-checkbox:not(.mdc-ripple-upgraded):focus.mdc-checkbox--anim-unchecked-checked .mdc-checkbox__native-control:enabled~.mdc-checkbox__background,.mat-mdc-checkbox .mdc-checkbox:not(.mdc-ripple-upgraded):focus.mdc-checkbox--anim-unchecked-indeterminate .mdc-checkbox__native-control:enabled~.mdc-checkbox__background{animation-name:mdc-checkbox-fade-in-background-FF018786FF01878600000000FF018786}.mat-mdc-checkbox .mdc-checkbox.mdc-ripple-upgraded--background-focused.mdc-checkbox--anim-checked-unchecked .mdc-checkbox__native-control:enabled~.mdc-checkbox__background,.mat-mdc-checkbox .mdc-checkbox.mdc-ripple-upgraded--background-focused.mdc-checkbox--anim-indeterminate-unchecked .mdc-checkbox__native-control:enabled~.mdc-checkbox__background,.mat-mdc-checkbox .mdc-checkbox:not(.mdc-ripple-upgraded):focus.mdc-checkbox--anim-checked-unchecked .mdc-checkbox__native-control:enabled~.mdc-checkbox__background,.mat-mdc-checkbox .mdc-checkbox:not(.mdc-ripple-upgraded):focus.mdc-checkbox--anim-indeterminate-unchecked .mdc-checkbox__native-control:enabled~.mdc-checkbox__background{animation-name:mdc-checkbox-fade-out-background-FF018786FF01878600000000FF018786}.mat-mdc-checkbox .mdc-checkbox:not(:disabled):active .mdc-checkbox__native-control:enabled:not(:checked):not(:indeterminate):not([data-indeterminate=true])~.mdc-checkbox__background{border-color:var(--mdc-checkbox-unselected-pressed-icon-color, rgba(0, 0, 0, 0.54));background-color:transparent}.mat-mdc-checkbox .mdc-checkbox:not(:disabled):active .mdc-checkbox__native-control:enabled:checked~.mdc-checkbox__background,.mat-mdc-checkbox .mdc-checkbox:not(:disabled):active .mdc-checkbox__native-control:enabled:indeterminate~.mdc-checkbox__background,.mat-mdc-checkbox .mdc-checkbox:not(:disabled):active .mdc-checkbox__native-control[data-indeterminate=true]:enabled~.mdc-checkbox__background{border-color:var(--mdc-checkbox-selected-pressed-icon-color, var(--mdc-theme-secondary, #018786));background-color:var(--mdc-checkbox-selected-pressed-icon-color, var(--mdc-theme-secondary, #018786))}@keyframes mdc-checkbox-fade-in-background-8A000000FF01878600000000FF018786{0%{border-color:var(--mdc-checkbox-unselected-pressed-icon-color, rgba(0, 0, 0, 0.54));background-color:transparent}50%{border-color:var(--mdc-checkbox-selected-pressed-icon-color, var(--mdc-theme-secondary, #018786));background-color:var(--mdc-checkbox-selected-pressed-icon-color, var(--mdc-theme-secondary, #018786))}}@keyframes mdc-checkbox-fade-out-background-8A000000FF01878600000000FF018786{0%,80%{border-color:var(--mdc-checkbox-selected-pressed-icon-color, var(--mdc-theme-secondary, #018786));background-color:var(--mdc-checkbox-selected-pressed-icon-color, var(--mdc-theme-secondary, #018786))}100%{border-color:var(--mdc-checkbox-unselected-pressed-icon-color, rgba(0, 0, 0, 0.54));background-color:transparent}}.mat-mdc-checkbox .mdc-checkbox:not(:disabled):active.mdc-checkbox--anim-unchecked-checked .mdc-checkbox__native-control:enabled~.mdc-checkbox__background,.mat-mdc-checkbox .mdc-checkbox:not(:disabled):active.mdc-checkbox--anim-unchecked-indeterminate .mdc-checkbox__native-control:enabled~.mdc-checkbox__background{animation-name:mdc-checkbox-fade-in-background-8A000000FF01878600000000FF018786}.mat-mdc-checkbox .mdc-checkbox:not(:disabled):active.mdc-checkbox--anim-checked-unchecked .mdc-checkbox__native-control:enabled~.mdc-checkbox__background,.mat-mdc-checkbox .mdc-checkbox:not(:disabled):active.mdc-checkbox--anim-indeterminate-unchecked .mdc-checkbox__native-control:enabled~.mdc-checkbox__background{animation-name:mdc-checkbox-fade-out-background-8A000000FF01878600000000FF018786}.mat-mdc-checkbox .mdc-checkbox .mdc-checkbox__background{top:calc((var(--mdc-checkbox-state-layer-size, 40px) - 18px) / 2);left:calc((var(--mdc-checkbox-state-layer-size, 40px) - 18px) / 2)}.mat-mdc-checkbox .mdc-checkbox .mdc-checkbox__native-control{top:calc((var(--mdc-checkbox-state-layer-size, 40px) - var(--mdc-checkbox-state-layer-size, 40px)) / 2);right:calc((var(--mdc-checkbox-state-layer-size, 40px) - var(--mdc-checkbox-state-layer-size, 40px)) / 2);left:calc((var(--mdc-checkbox-state-layer-size, 40px) - var(--mdc-checkbox-state-layer-size, 40px)) / 2);width:var(--mdc-checkbox-state-layer-size, 40px);height:var(--mdc-checkbox-state-layer-size, 40px)}.mat-mdc-checkbox .mdc-checkbox:hover .mdc-checkbox__native-control:not([disabled])~.mdc-checkbox__ripple{opacity:.04;transform:scale(1);transition:opacity 80ms 0 cubic-bezier(0, 0, 0.2, 1),transform 80ms 0 cubic-bezier(0, 0, 0.2, 1)}.mat-mdc-checkbox .mdc-checkbox .mdc-checkbox__native-control:not([disabled]):focus~.mdc-checkbox__ripple{opacity:.16}.mat-mdc-checkbox .mdc-checkbox__background{-webkit-print-color-adjust:exact;color-adjust:exact}.mat-mdc-checkbox._mat-animation-noopable *,.mat-mdc-checkbox._mat-animation-noopable *::before{transition:none !important;animation:none !important}.mat-mdc-checkbox label{cursor:pointer}.mat-mdc-checkbox.mat-mdc-checkbox-disabled label{cursor:default}.mat-mdc-checkbox label:empty{display:none}.mat-mdc-checkbox .mdc-checkbox__native-control:focus:enabled:not(:checked):not(:indeterminate):not([data-indeterminate=true])~.mdc-checkbox__background{border-color:var(--mdc-checkbox-unselected-focus-icon-color, black)}.cdk-high-contrast-active .mat-mdc-checkbox.mat-mdc-checkbox-disabled{opacity:.5}.cdk-high-contrast-active .mat-mdc-checkbox .mdc-checkbox__checkmark{--mdc-checkbox-selected-checkmark-color: CanvasText;--mdc-checkbox-disabled-selected-checkmark-color: CanvasText}.mat-mdc-checkbox .mdc-checkbox__ripple{opacity:0}.mat-mdc-checkbox-ripple,.mdc-checkbox__ripple{top:0;left:0;right:0;bottom:0;position:absolute;border-radius:50%;pointer-events:none}.mat-mdc-checkbox-ripple:not(:empty),.mdc-checkbox__ripple:not(:empty){transform:translateZ(0)}.mat-mdc-checkbox-touch-target{position:absolute;top:50%;height:48px;left:50%;width:48px;transform:translate(-50%, -50%)}.mat-mdc-checkbox-ripple::before{border-radius:50%}.mdc-checkbox__native-control:focus~.mat-mdc-focus-indicator::before{content:""}'],encapsulation:2,changeDetection:0});const X={provide:e.Cf,useExisting:(0,o.Gpc)(()=>ve),multi:!0};class ve extends e.Zs{}ve.\u0275fac=function(){let ne;return function(Pe){return(ne||(ne=o.n5z(ve)))(Pe||ve)}}(),ve.\u0275dir=o.lG2({type:ve,selectors:[["mat-checkbox","required","","formControlName",""],["mat-checkbox","required","","formControl",""],["mat-checkbox","required","","ngModel",""]],features:[o._Bn([X]),o.qOj]});class ye{}ye.\u0275fac=function(pe){return new(pe||ye)},ye.\u0275mod=o.oAB({type:ye}),ye.\u0275inj=o.cJS({});class ge{}ge.\u0275fac=function(pe){return new(pe||ge)},ge.\u0275mod=o.oAB({type:ge}),ge.\u0275inj=o.cJS({imports:[l.BQ,l.si,ye,l.BQ,ye]})},3238:(qe,I,p)=>{"use strict";p.d(I,{yN:()=>ge,mZ:()=>ne,_A:()=>nt,rD:()=>rn,sG:()=>mt,Ad:()=>ke,K7:()=>vn,HF:()=>Vi,BQ:()=>xe,XK:()=>ft,ey:()=>Gr,Ng:()=>mr,wG:()=>Fn,si:()=>ui,Dn:()=>wt,CB:()=>zr,jH:()=>Eo,pj:()=>be,Kr:()=>le,Id:()=>me,FD:()=>Oe,dB:()=>j,sb:()=>Z});var o=p(94650),e=p(12693),l=p(40445);new o.GfV("15.2.9");var g=p(36895),E=p(83353),T=p(21281),n=p(69751),P=p(77579),w=p(29521);const B=["*",[["mat-option"],["ng-container"]]],V=["text"];function ue(jn,ct){if(1&jn&&o._UZ(0,"mat-pseudo-checkbox",6),2&jn){const Yt=o.oxw();o.Q6J("state",Yt.selected?"checked":"unchecked")("disabled",Yt.disabled)}}function he(jn,ct){if(1&jn&&o._UZ(0,"mat-pseudo-checkbox",7),2&jn){const Yt=o.oxw();o.Q6J("disabled",Yt.disabled)}}function ae(jn,ct){if(1&jn&&(o.TgZ(0,"span",8),o._uU(1),o.qZA()),2&jn){const Yt=o.oxw();o.xp6(1),o.hij("(",Yt.group.label,")")}}const X=[[["mat-icon"]],"*"];new o.GfV("15.2.9");class ge{}ge.STANDARD_CURVE="cubic-bezier(0.4,0.0,0.2,1)",ge.DECELERATION_CURVE="cubic-bezier(0.0,0.0,0.2,1)",ge.ACCELERATION_CURVE="cubic-bezier(0.4,0.0,1,1)",ge.SHARP_CURVE="cubic-bezier(0.4,0.0,0.6,1)";class ne{}ne.COMPLEX="375ms",ne.ENTERING="225ms",ne.EXITING="195ms";const Pe=new o.OlP("mat-sanity-checks",{providedIn:"root",factory:function pe(){return!0}});class xe{constructor(ct,Yt,oi){this._sanityChecks=Yt,this._document=oi,this._hasDoneGlobalChecks=!1,ct._applyBodyHighContrastModeCssClasses(),this._hasDoneGlobalChecks||(this._hasDoneGlobalChecks=!0)}_checkIsEnabled(ct){return!(0,E.Oy)()&&("boolean"==typeof this._sanityChecks?this._sanityChecks:!!this._sanityChecks[ct])}}function me(jn){return class extends jn{get disabled(){return this._disabled}set disabled(ct){this._disabled=(0,T.Ig)(ct)}constructor(...ct){super(...ct),this._disabled=!1}}}function be(jn,ct){return class extends jn{get color(){return this._color}set color(Yt){const oi=Yt||this.defaultColor;oi!==this._color&&(this._color&&this._elementRef.nativeElement.classList.remove(`mat-${this._color}`),oi&&this._elementRef.nativeElement.classList.add(`mat-${oi}`),this._color=oi)}constructor(...Yt){super(...Yt),this.defaultColor=ct,this.color=ct}}}function le(jn){return class extends jn{get disableRipple(){return this._disableRipple}set disableRipple(ct){this._disableRipple=(0,T.Ig)(ct)}constructor(...ct){super(...ct),this._disableRipple=!1}}}function Z(jn,ct=0){return class extends jn{get tabIndex(){return this.disabled?-1:this._tabIndex}set tabIndex(Yt){this._tabIndex=null!=Yt?(0,T.su)(Yt):this.defaultTabIndex}constructor(...Yt){super(...Yt),this._tabIndex=ct,this.defaultTabIndex=ct}}}function Oe(jn){return class extends jn{updateErrorState(){const ct=this.errorState,Yt=this._parentFormGroup||this._parentForm,oi=this.errorStateMatcher||this._defaultErrorStateMatcher,Ni=this.ngControl?this.ngControl.control:null,Nn=oi.isErrorState(Ni,Yt);Nn!==ct&&(this.errorState=Nn,this.stateChanges.next())}constructor(...ct){super(...ct),this.errorState=!1}}}function j(jn){return class extends jn{constructor(...ct){super(...ct),this._isInitialized=!1,this._pendingSubscribers=[],this.initialized=new n.y(Yt=>{this._isInitialized?this._notifySubscriber(Yt):this._pendingSubscribers.push(Yt)})}_markInitialized(){this._isInitialized,this._isInitialized=!0,this._pendingSubscribers.forEach(this._notifySubscriber),this._pendingSubscribers=null}_notifySubscriber(ct){ct.next(),ct.complete()}}}xe.\u0275fac=function(ct){return new(ct||xe)(o.LFG(e.qm),o.LFG(Pe,8),o.LFG(g.K0))},xe.\u0275mod=o.oAB({type:xe}),xe.\u0275inj=o.cJS({imports:[l.vT,l.vT]});const ke=new o.OlP("MAT_DATE_LOCALE",{providedIn:"root",factory:function Be(){return(0,o.f3M)(o.soG)}});class nt{constructor(){this._localeChanges=new P.x,this.localeChanges=this._localeChanges}getValidDateOrNull(ct){return this.isDateInstance(ct)&&this.isValid(ct)?ct:null}deserialize(ct){return null==ct||this.isDateInstance(ct)&&this.isValid(ct)?ct:this.invalid()}setLocale(ct){this.locale=ct,this._localeChanges.next()}compareDate(ct,Yt){return this.getYear(ct)-this.getYear(Yt)||this.getMonth(ct)-this.getMonth(Yt)||this.getDate(ct)-this.getDate(Yt)}sameDate(ct,Yt){if(ct&&Yt){let oi=this.isValid(ct),Ni=this.isValid(Yt);return oi&&Ni?!this.compareDate(ct,Yt):oi==Ni}return ct==Yt}clampDate(ct,Yt,oi){return Yt&&this.compareDate(ct,Yt)<0?Yt:oi&&this.compareDate(ct,oi)>0?oi:ct}}const mt=new o.OlP("mat-date-formats"),ut=/^\d{4}-\d{2}-\d{2}(?:T\d{2}:\d{2}:\d{2}(?:\.\d+)?(?:Z|(?:(?:\+|-)\d{2}:\d{2}))?)?$/;function Ve(jn,ct){const Yt=Array(jn);for(let oi=0;oi<jn;oi++)Yt[oi]=ct(oi);return Yt}class tt extends nt{constructor(ct,Yt){super(),this.useUtcForDisplay=!1,super.setLocale(ct)}getYear(ct){return ct.getFullYear()}getMonth(ct){return ct.getMonth()}getDate(ct){return ct.getDate()}getDayOfWeek(ct){return ct.getDay()}getMonthNames(ct){const Yt=new Intl.DateTimeFormat(this.locale,{month:ct,timeZone:"utc"});return Ve(12,oi=>this._format(Yt,new Date(2017,oi,1)))}getDateNames(){const ct=new Intl.DateTimeFormat(this.locale,{day:"numeric",timeZone:"utc"});return Ve(31,Yt=>this._format(ct,new Date(2017,0,Yt+1)))}getDayOfWeekNames(ct){const Yt=new Intl.DateTimeFormat(this.locale,{weekday:ct,timeZone:"utc"});return Ve(7,oi=>this._format(Yt,new Date(2017,0,oi+1)))}getYearName(ct){const Yt=new Intl.DateTimeFormat(this.locale,{year:"numeric",timeZone:"utc"});return this._format(Yt,ct)}getFirstDayOfWeek(){return 0}getNumDaysInMonth(ct){return this.getDate(this._createDateWithOverflow(this.getYear(ct),this.getMonth(ct)+1,0))}clone(ct){return new Date(ct.getTime())}createDate(ct,Yt,oi){let Ni=this._createDateWithOverflow(ct,Yt,oi);return Ni.getMonth(),Ni}today(){return new Date}parse(ct,Yt){return"number"==typeof ct?new Date(ct):ct?new Date(Date.parse(ct)):null}format(ct,Yt){if(!this.isValid(ct))throw Error("NativeDateAdapter: Cannot format invalid date.");const oi=new Intl.DateTimeFormat(this.locale,{...Yt,timeZone:"utc"});return this._format(oi,ct)}addCalendarYears(ct,Yt){return this.addCalendarMonths(ct,12*Yt)}addCalendarMonths(ct,Yt){let oi=this._createDateWithOverflow(this.getYear(ct),this.getMonth(ct)+Yt,this.getDate(ct));return this.getMonth(oi)!=((this.getMonth(ct)+Yt)%12+12)%12&&(oi=this._createDateWithOverflow(this.getYear(oi),this.getMonth(oi),0)),oi}addCalendarDays(ct,Yt){return this._createDateWithOverflow(this.getYear(ct),this.getMonth(ct),this.getDate(ct)+Yt)}toIso8601(ct){return[ct.getUTCFullYear(),this._2digit(ct.getUTCMonth()+1),this._2digit(ct.getUTCDate())].join("-")}deserialize(ct){if("string"==typeof ct){if(!ct)return null;if(ut.test(ct)){let Yt=new Date(ct);if(this.isValid(Yt))return Yt}}return super.deserialize(ct)}isDateInstance(ct){return ct instanceof Date}isValid(ct){return!isNaN(ct.getTime())}invalid(){return new Date(NaN)}_createDateWithOverflow(ct,Yt,oi){const Ni=new Date;return Ni.setFullYear(ct,Yt,oi),Ni.setHours(0,0,0,0),Ni}_2digit(ct){return("00"+ct).slice(-2)}_format(ct,Yt){const oi=new Date;return oi.setUTCFullYear(Yt.getFullYear(),Yt.getMonth(),Yt.getDate()),oi.setUTCHours(Yt.getHours(),Yt.getMinutes(),Yt.getSeconds(),Yt.getMilliseconds()),ct.format(oi)}}tt.\u0275fac=function(ct){return new(ct||tt)(o.LFG(ke,8),o.LFG(E.t4))},tt.\u0275prov=o.Yz7({token:tt,factory:tt.\u0275fac});class wt{}wt.\u0275fac=function(ct){return new(ct||wt)},wt.\u0275mod=o.oAB({type:wt}),wt.\u0275inj=o.cJS({providers:[{provide:nt,useClass:tt}]});class ft{}ft.\u0275fac=function(ct){return new(ct||ft)},ft.\u0275mod=o.oAB({type:ft}),ft.\u0275inj=o.cJS({providers:[{provide:mt,useValue:{parse:{dateInput:null},display:{dateInput:{year:"numeric",month:"numeric",day:"numeric"},monthYearLabel:{year:"numeric",month:"short"},dateA11yLabel:{year:"numeric",month:"long",day:"numeric"},monthYearA11yLabel:{year:"numeric",month:"long"}}}}],imports:[wt]});class Ct{isErrorState(ct,Yt){return!!(ct&&ct.invalid&&(ct.dirty||Yt&&Yt.submitted))}}Ct.\u0275fac=function(ct){return new(ct||Ct)},Ct.\u0275prov=o.Yz7({token:Ct,factory:Ct.\u0275fac});class rn{isErrorState(ct,Yt){return!!(ct&&ct.invalid&&(ct.touched||Yt&&Yt.submitted))}}rn.\u0275fac=function(ct){return new(ct||rn)},rn.\u0275prov=o.Yz7({token:rn,factory:rn.\u0275fac,providedIn:"root"});class He{}He.\u0275fac=function(ct){return new(ct||He)},He.\u0275dir=o.lG2({type:He,selectors:[["","mat-line",""],["","matLine",""]],hostAttrs:[1,"mat-line"]});class Dn{}Dn.\u0275fac=function(ct){return new(ct||Dn)},Dn.\u0275mod=o.oAB({type:Dn}),Dn.\u0275inj=o.cJS({imports:[xe,xe]});class Mn{constructor(ct,Yt,oi,Ni=!1){this._renderer=ct,this.element=Yt,this.config=oi,this._animationForciblyDisabledThroughCss=Ni,this.state=3}fadeOut(){this._renderer.fadeOutRipple(this)}}const vi=(0,E.i$)({passive:!0,capture:!0});const mi={enterDuration:225,exitDuration:150},Bn=(0,E.i$)({passive:!0,capture:!0}),kn=["mousedown","touchstart"],On=["mouseup","mouseleave","touchend","touchcancel"];class je{constructor(ct,Yt,oi,Ni){this._target=ct,this._ngZone=Yt,this._platform=Ni,this._isPointerDown=!1,this._activeRipples=new Map,this._pointerUpEventsRegistered=!1,Ni.isBrowser&&(this._containerElement=(0,T.fI)(oi))}fadeInRipple(ct,Yt,oi={}){const Ni=this._containerRect=this._containerRect||this._containerElement.getBoundingClientRect(),Nn={...mi,...oi.animation};oi.centered&&(ct=Ni.left+Ni.width/2,Yt=Ni.top+Ni.height/2);const pr=oi.radius||function Bt(jn,ct,Yt){const oi=Math.max(Math.abs(jn-Yt.left),Math.abs(jn-Yt.right)),Ni=Math.max(Math.abs(ct-Yt.top),Math.abs(ct-Yt.bottom));return Math.sqrt(oi*oi+Ni*Ni)}(ct,Yt,Ni),Sn=ct-Ni.left,Pn=Yt-Ni.top,Nt=Nn.enterDuration,ai=document.createElement("div");ai.classList.add("mat-ripple-element"),ai.style.left=Sn-pr+"px",ai.style.top=Pn-pr+"px",ai.style.height=2*pr+"px",ai.style.width=2*pr+"px",null!=oi.color&&(ai.style.backgroundColor=oi.color),ai.style.transitionDuration=`${Nt}ms`,this._containerElement.appendChild(ai);const hn=window.getComputedStyle(ai),Le=hn.transitionProperty,ce=hn.transitionDuration,we="none"===Le||"0s"===ce||"0s, 0s"===ce||0===Ni.width&&0===Ni.height,Qe=new Mn(this,ai,oi,we);ai.style.transform="scale3d(1, 1, 1)",Qe.state=0,oi.persistent||(this._mostRecentTransientRipple=Qe);let qt=null;return!we&&(Nt||Nn.exitDuration)&&this._ngZone.runOutsideAngular(()=>{const Tn=()=>this._finishRippleTransition(Qe),lr=()=>this._destroyRipple(Qe);ai.addEventListener("transitionend",Tn),ai.addEventListener("transitioncancel",lr),qt={onTransitionEnd:Tn,onTransitionCancel:lr}}),this._activeRipples.set(Qe,qt),(we||!Nt)&&this._finishRippleTransition(Qe),Qe}fadeOutRipple(ct){if(2===ct.state||3===ct.state)return;const Yt=ct.element,oi={...mi,...ct.config.animation};Yt.style.transitionDuration=`${oi.exitDuration}ms`,Yt.style.opacity="0",ct.state=2,(ct._animationForciblyDisabledThroughCss||!oi.exitDuration)&&this._finishRippleTransition(ct)}fadeOutAll(){this._getActiveRipples().forEach(ct=>ct.fadeOut())}fadeOutAllNonPersistent(){this._getActiveRipples().forEach(ct=>{ct.config.persistent||ct.fadeOut()})}setupTriggerEvents(ct){const Yt=(0,T.fI)(ct);!this._platform.isBrowser||!Yt||Yt===this._triggerElement||(this._removeTriggerEvents(),this._triggerElement=Yt,kn.forEach(oi=>{je._eventManager.addHandler(this._ngZone,oi,Yt,this)}))}handleEvent(ct){"mousedown"===ct.type?this._onMousedown(ct):"touchstart"===ct.type?this._onTouchStart(ct):this._onPointerUp(),this._pointerUpEventsRegistered||(this._ngZone.runOutsideAngular(()=>{On.forEach(Yt=>{this._triggerElement.addEventListener(Yt,this,Bn)})}),this._pointerUpEventsRegistered=!0)}_finishRippleTransition(ct){0===ct.state?this._startFadeOutTransition(ct):2===ct.state&&this._destroyRipple(ct)}_startFadeOutTransition(ct){const Yt=ct===this._mostRecentTransientRipple,{persistent:oi}=ct.config;ct.state=1,!oi&&(!Yt||!this._isPointerDown)&&ct.fadeOut()}_destroyRipple(ct){const Yt=this._activeRipples.get(ct)??null;this._activeRipples.delete(ct),this._activeRipples.size||(this._containerRect=null),ct===this._mostRecentTransientRipple&&(this._mostRecentTransientRipple=null),ct.state=3,null!==Yt&&(ct.element.removeEventListener("transitionend",Yt.onTransitionEnd),ct.element.removeEventListener("transitioncancel",Yt.onTransitionCancel)),ct.element.remove()}_onMousedown(ct){const Yt=(0,e.X6)(ct),oi=this._lastTouchStartEvent&&Date.now()<this._lastTouchStartEvent+800;!this._target.rippleDisabled&&!Yt&&!oi&&(this._isPointerDown=!0,this.fadeInRipple(ct.clientX,ct.clientY,this._target.rippleConfig))}_onTouchStart(ct){if(!this._target.rippleDisabled&&!(0,e.yG)(ct)){this._lastTouchStartEvent=Date.now(),this._isPointerDown=!0;const Yt=ct.changedTouches;for(let oi=0;oi<Yt.length;oi++)this.fadeInRipple(Yt[oi].clientX,Yt[oi].clientY,this._target.rippleConfig)}}_onPointerUp(){this._isPointerDown&&(this._isPointerDown=!1,this._getActiveRipples().forEach(ct=>{const Yt=1===ct.state||ct.config.terminateOnPointerUp&&0===ct.state;!ct.config.persistent&&Yt&&ct.fadeOut()}))}_getActiveRipples(){return Array.from(this._activeRipples.keys())}_removeTriggerEvents(){const ct=this._triggerElement;ct&&(kn.forEach(Yt=>je._eventManager.removeHandler(Yt,ct,this)),this._pointerUpEventsRegistered&&On.forEach(Yt=>ct.removeEventListener(Yt,this,Bn)))}}je._eventManager=new class Gi{constructor(){this._events=new Map,this._delegateEventHandler=ct=>{const Yt=(0,E.sA)(ct);Yt&&this._events.get(ct.type)?.forEach((oi,Ni)=>{(Ni===Yt||Ni.contains(Yt))&&oi.forEach(Nn=>Nn.handleEvent(ct))})}}addHandler(ct,Yt,oi,Ni){const Nn=this._events.get(Yt);if(Nn){const pr=Nn.get(oi);pr?pr.add(Ni):Nn.set(oi,new Set([Ni]))}else this._events.set(Yt,new Map([[oi,new Set([Ni])]])),ct.runOutsideAngular(()=>{document.addEventListener(Yt,this._delegateEventHandler,vi)})}removeHandler(ct,Yt,oi){const Ni=this._events.get(ct);if(!Ni)return;const Nn=Ni.get(Yt);Nn&&(Nn.delete(oi),0===Nn.size&&Ni.delete(Yt),0===Ni.size&&(this._events.delete(ct),document.removeEventListener(ct,this._delegateEventHandler,vi)))}};const xn=new o.OlP("mat-ripple-global-options");class Fn{get disabled(){return this._disabled}set disabled(ct){ct&&this.fadeOutAllNonPersistent(),this._disabled=ct,this._setupTriggerEventsIfEnabled()}get trigger(){return this._trigger||this._elementRef.nativeElement}set trigger(ct){this._trigger=ct,this._setupTriggerEventsIfEnabled()}constructor(ct,Yt,oi,Ni,Nn){this._elementRef=ct,this._animationMode=Nn,this.radius=0,this._disabled=!1,this._isInitialized=!1,this._globalOptions=Ni||{},this._rippleRenderer=new je(this,Yt,ct,oi)}ngOnInit(){this._isInitialized=!0,this._setupTriggerEventsIfEnabled()}ngOnDestroy(){this._rippleRenderer._removeTriggerEvents()}fadeOutAll(){this._rippleRenderer.fadeOutAll()}fadeOutAllNonPersistent(){this._rippleRenderer.fadeOutAllNonPersistent()}get rippleConfig(){return{centered:this.centered,radius:this.radius,color:this.color,animation:{...this._globalOptions.animation,..."NoopAnimations"===this._animationMode?{enterDuration:0,exitDuration:0}:{},...this.animation},terminateOnPointerUp:this._globalOptions.terminateOnPointerUp}}get rippleDisabled(){return this.disabled||!!this._globalOptions.disabled}_setupTriggerEventsIfEnabled(){!this.disabled&&this._isInitialized&&this._rippleRenderer.setupTriggerEvents(this.trigger)}launch(ct,Yt=0,oi){return"number"==typeof ct?this._rippleRenderer.fadeInRipple(ct,Yt,{...this.rippleConfig,...oi}):this._rippleRenderer.fadeInRipple(0,0,{...this.rippleConfig,...ct})}}Fn.\u0275fac=function(ct){return new(ct||Fn)(o.Y36(o.SBq),o.Y36(o.R0b),o.Y36(E.t4),o.Y36(xn,8),o.Y36(o.QbO,8))},Fn.\u0275dir=o.lG2({type:Fn,selectors:[["","mat-ripple",""],["","matRipple",""]],hostAttrs:[1,"mat-ripple"],hostVars:2,hostBindings:function(ct,Yt){2&ct&&o.ekj("mat-ripple-unbounded",Yt.unbounded)},inputs:{color:["matRippleColor","color"],unbounded:["matRippleUnbounded","unbounded"],centered:["matRippleCentered","centered"],radius:["matRippleRadius","radius"],animation:["matRippleAnimation","animation"],disabled:["matRippleDisabled","disabled"],trigger:["matRippleTrigger","trigger"]},exportAs:["matRipple"]});class ui{}ui.\u0275fac=function(ct){return new(ct||ui)},ui.\u0275mod=o.oAB({type:ui}),ui.\u0275inj=o.cJS({imports:[xe,xe]});class Ai{constructor(ct){this._animationMode=ct,this.state="unchecked",this.disabled=!1,this.appearance="full"}}Ai.\u0275fac=function(ct){return new(ct||Ai)(o.Y36(o.QbO,8))},Ai.\u0275cmp=o.Xpm({type:Ai,selectors:[["mat-pseudo-checkbox"]],hostAttrs:[1,"mat-pseudo-checkbox"],hostVars:12,hostBindings:function(ct,Yt){2&ct&&o.ekj("mat-pseudo-checkbox-indeterminate","indeterminate"===Yt.state)("mat-pseudo-checkbox-checked","checked"===Yt.state)("mat-pseudo-checkbox-disabled",Yt.disabled)("mat-pseudo-checkbox-minimal","minimal"===Yt.appearance)("mat-pseudo-checkbox-full","full"===Yt.appearance)("_mat-animation-noopable","NoopAnimations"===Yt._animationMode)},inputs:{state:"state",disabled:"disabled",appearance:"appearance"},decls:0,vars:0,template:function(ct,Yt){},styles:['.mat-pseudo-checkbox{border-radius:2px;cursor:pointer;display:inline-block;vertical-align:middle;box-sizing:border-box;position:relative;flex-shrink:0;transition:border-color 90ms cubic-bezier(0, 0, 0.2, 0.1),background-color 90ms cubic-bezier(0, 0, 0.2, 0.1)}.mat-pseudo-checkbox::after{position:absolute;opacity:0;content:"";border-bottom:2px solid currentColor;transition:opacity 90ms cubic-bezier(0, 0, 0.2, 0.1)}.mat-pseudo-checkbox._mat-animation-noopable{transition:none !important;animation:none !important}.mat-pseudo-checkbox._mat-animation-noopable::after{transition:none}.mat-pseudo-checkbox-disabled{cursor:default}.mat-pseudo-checkbox-indeterminate::after{left:1px;opacity:1;border-radius:2px}.mat-pseudo-checkbox-checked::after{left:1px;border-left:2px solid currentColor;transform:rotate(-45deg);opacity:1;box-sizing:content-box}.mat-pseudo-checkbox-full{border:2px solid}.mat-pseudo-checkbox-full.mat-pseudo-checkbox-checked,.mat-pseudo-checkbox-full.mat-pseudo-checkbox-indeterminate{border-color:rgba(0,0,0,0)}.mat-pseudo-checkbox{width:18px;height:18px}.mat-pseudo-checkbox-minimal.mat-pseudo-checkbox-checked::after{width:14px;height:6px;transform-origin:center;top:-4.2426406871px;left:0;bottom:0;right:0;margin:auto}.mat-pseudo-checkbox-minimal.mat-pseudo-checkbox-indeterminate::after{top:8px;width:16px}.mat-pseudo-checkbox-full.mat-pseudo-checkbox-checked::after{width:10px;height:4px;transform-origin:center;top:-2.8284271247px;left:0;bottom:0;right:0;margin:auto}.mat-pseudo-checkbox-full.mat-pseudo-checkbox-indeterminate::after{top:6px;width:12px}'],encapsulation:2,changeDetection:0});class si{}si.\u0275fac=function(ct){return new(ct||si)},si.\u0275mod=o.oAB({type:si}),si.\u0275inj=o.cJS({imports:[xe]});const Vi=new o.OlP("MAT_OPTION_PARENT_COMPONENT"),Vn=me(class{});let Hn=0;class An extends Vn{constructor(ct){super(),this._labelId="mat-optgroup-label-"+Hn++,this._inert=ct?.inertGroups??!1}}An.\u0275fac=function(ct){return new(ct||An)(o.Y36(Vi,8))},An.\u0275dir=o.lG2({type:An,inputs:{label:"label"},features:[o.qOj]});const vn=new o.OlP("MatOptgroup");class In extends An{}In.\u0275fac=function(){let jn;return function(Yt){return(jn||(jn=o.n5z(In)))(Yt||In)}}(),In.\u0275cmp=o.Xpm({type:In,selectors:[["mat-optgroup"]],hostAttrs:[1,"mat-mdc-optgroup"],hostVars:3,hostBindings:function(ct,Yt){2&ct&&o.uIk("role",Yt._inert?null:"group")("aria-disabled",Yt._inert?null:Yt.disabled.toString())("aria-labelledby",Yt._inert?null:Yt._labelId)},inputs:{disabled:"disabled"},exportAs:["matOptgroup"],features:[o._Bn([{provide:vn,useExisting:In}]),o.qOj],ngContentSelectors:["*","mat-option, ng-container"],decls:5,vars:4,consts:[["aria-hidden","true",1,"mat-mdc-optgroup-label",3,"id"],[1,"mdc-list-item__primary-text"]],template:function(ct,Yt){1&ct&&(o.F$t(B),o.TgZ(0,"span",0)(1,"span",1),o._uU(2),o.Hsn(3),o.qZA()(),o.Hsn(4,1)),2&ct&&(o.ekj("mdc-list-item--disabled",Yt.disabled),o.Q6J("id",Yt._labelId),o.xp6(2),o.hij("",Yt.label," "))},styles:[".mat-mdc-optgroup-label{display:flex;position:relative;align-items:center;justify-content:flex-start;overflow:hidden;padding:0;padding-left:16px;padding-right:16px;min-height:48px}.mat-mdc-optgroup-label:focus{outline:none}[dir=rtl] .mat-mdc-optgroup-label,.mat-mdc-optgroup-label[dir=rtl]{padding-left:16px;padding-right:16px}.mat-mdc-optgroup-label.mdc-list-item--disabled{opacity:.38}.mat-mdc-optgroup-label .mdc-list-item__primary-text{white-space:normal}"],encapsulation:2,changeDetection:0});let Zi=0;class gr{constructor(ct,Yt=!1){this.source=ct,this.isUserInput=Yt}}class Hi{get multiple(){return this._parent&&this._parent.multiple}get selected(){return this._selected}get disabled(){return this.group&&this.group.disabled||this._disabled}set disabled(ct){this._disabled=(0,T.Ig)(ct)}get disableRipple(){return!(!this._parent||!this._parent.disableRipple)}get hideSingleSelectionIndicator(){return!(!this._parent||!this._parent.hideSingleSelectionIndicator)}constructor(ct,Yt,oi,Ni){this._element=ct,this._changeDetectorRef=Yt,this._parent=oi,this.group=Ni,this._selected=!1,this._active=!1,this._disabled=!1,this._mostRecentViewValue="",this.id="mat-option-"+Zi++,this.onSelectionChange=new o.vpe,this._stateChanges=new P.x}get active(){return this._active}get viewValue(){return(this._text?.nativeElement.textContent||"").trim()}select(){this._selected||(this._selected=!0,this._changeDetectorRef.markForCheck(),this._emitSelectionChangeEvent())}deselect(){this._selected&&(this._selected=!1,this._changeDetectorRef.markForCheck(),this._emitSelectionChangeEvent())}focus(ct,Yt){const oi=this._getHostElement();"function"==typeof oi.focus&&oi.focus(Yt)}setActiveStyles(){this._active||(this._active=!0,this._changeDetectorRef.markForCheck())}setInactiveStyles(){this._active&&(this._active=!1,this._changeDetectorRef.markForCheck())}getLabel(){return this.viewValue}_handleKeydown(ct){(ct.keyCode===w.K5||ct.keyCode===w.L_)&&!(0,w.Vb)(ct)&&(this._selectViaInteraction(),ct.preventDefault())}_selectViaInteraction(){this.disabled||(this._selected=!this.multiple||!this._selected,this._changeDetectorRef.markForCheck(),this._emitSelectionChangeEvent(!0))}_getTabIndex(){return this.disabled?"-1":"0"}_getHostElement(){return this._element.nativeElement}ngAfterViewChecked(){if(this._selected){const ct=this.viewValue;ct!==this._mostRecentViewValue&&(this._mostRecentViewValue&&this._stateChanges.next(),this._mostRecentViewValue=ct)}}ngOnDestroy(){this._stateChanges.complete()}_emitSelectionChangeEvent(ct=!1){this.onSelectionChange.emit(new gr(this,ct))}}Hi.\u0275fac=function(ct){o.$Z()},Hi.\u0275dir=o.lG2({type:Hi,viewQuery:function(ct,Yt){if(1&ct&&o.Gf(V,7),2&ct){let oi;o.iGM(oi=o.CRH())&&(Yt._text=oi.first)}},inputs:{value:"value",id:"id",disabled:"disabled"},outputs:{onSelectionChange:"onSelectionChange"}});class Gr extends Hi{constructor(ct,Yt,oi,Ni){super(ct,Yt,oi,Ni)}}function zr(jn,ct,Yt){if(Yt.length){let oi=ct.toArray(),Ni=Yt.toArray(),Nn=0;for(let pr=0;pr<jn+1;pr++)oi[pr].group&&oi[pr].group===Ni[Nn]&&Nn++;return Nn}return 0}function Eo(jn,ct,Yt,oi){return jn<Yt?jn:jn+ct>Yt+oi?Math.max(0,jn-oi+ct):Yt}Gr.\u0275fac=function(ct){return new(ct||Gr)(o.Y36(o.SBq),o.Y36(o.sBO),o.Y36(Vi,8),o.Y36(vn,8))},Gr.\u0275cmp=o.Xpm({type:Gr,selectors:[["mat-option"]],hostAttrs:["role","option",1,"mat-mdc-option","mdc-list-item"],hostVars:11,hostBindings:function(ct,Yt){1&ct&&o.NdJ("click",function(){return Yt._selectViaInteraction()})("keydown",function(Ni){return Yt._handleKeydown(Ni)}),2&ct&&(o.Ikx("id",Yt.id),o.uIk("aria-selected",Yt.selected)("aria-disabled",Yt.disabled.toString()),o.ekj("mdc-list-item--selected",Yt.selected)("mat-mdc-option-multiple",Yt.multiple)("mat-mdc-option-active",Yt.active)("mdc-list-item--disabled",Yt.disabled))},exportAs:["matOption"],features:[o.qOj],ngContentSelectors:["mat-icon","*"],decls:8,vars:5,consts:[["class","mat-mdc-option-pseudo-checkbox",3,"state","disabled",4,"ngIf"],[1,"mdc-list-item__primary-text"],["text",""],["class","mat-mdc-option-pseudo-checkbox","state","checked","appearance","minimal",3,"disabled",4,"ngIf"],["class","cdk-visually-hidden",4,"ngIf"],["mat-ripple","",1,"mat-mdc-option-ripple","mat-mdc-focus-indicator",3,"matRippleTrigger","matRippleDisabled"],[1,"mat-mdc-option-pseudo-checkbox",3,"state","disabled"],["state","checked","appearance","minimal",1,"mat-mdc-option-pseudo-checkbox",3,"disabled"],[1,"cdk-visually-hidden"]],template:function(ct,Yt){1&ct&&(o.F$t(X),o.YNc(0,ue,1,2,"mat-pseudo-checkbox",0),o.Hsn(1),o.TgZ(2,"span",1,2),o.Hsn(4,1),o.qZA(),o.YNc(5,he,1,1,"mat-pseudo-checkbox",3),o.YNc(6,ae,2,1,"span",4),o._UZ(7,"div",5)),2&ct&&(o.Q6J("ngIf",Yt.multiple),o.xp6(5),o.Q6J("ngIf",!Yt.multiple&&Yt.selected&&!Yt.hideSingleSelectionIndicator),o.xp6(1),o.Q6J("ngIf",Yt.group&&Yt.group._inert),o.xp6(1),o.Q6J("matRippleTrigger",Yt._getHostElement())("matRippleDisabled",Yt.disabled||Yt.disableRipple))},dependencies:[Fn,g.O5,Ai],styles:['.mat-mdc-option{display:flex;position:relative;align-items:center;justify-content:flex-start;overflow:hidden;padding:0;padding-left:16px;padding-right:16px;-webkit-user-select:none;user-select:none;cursor:pointer;-webkit-tap-highlight-color:rgba(0,0,0,0);min-height:48px}.mat-mdc-option:focus{outline:none}[dir=rtl] .mat-mdc-option,.mat-mdc-option[dir=rtl]{padding-left:16px;padding-right:16px}.mat-mdc-option.mdc-list-item{align-items:center}.mat-mdc-option.mdc-list-item--disabled{opacity:.38;cursor:default}.mat-mdc-optgroup .mat-mdc-option:not(.mat-mdc-option-multiple){padding-left:32px}[dir=rtl] .mat-mdc-optgroup .mat-mdc-option:not(.mat-mdc-option-multiple){padding-left:16px;padding-right:32px}.mat-mdc-option .mat-icon,.mat-mdc-option .mat-pseudo-checkbox-full{margin-right:16px;flex-shrink:0}[dir=rtl] .mat-mdc-option .mat-icon,[dir=rtl] .mat-mdc-option .mat-pseudo-checkbox-full{margin-right:0;margin-left:16px}.mat-mdc-option .mat-pseudo-checkbox-minimal{margin-left:16px;flex-shrink:0}[dir=rtl] .mat-mdc-option .mat-pseudo-checkbox-minimal{margin-right:16px;margin-left:0}.mat-mdc-option .mat-mdc-option-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none}.mat-mdc-option .mdc-list-item__primary-text{white-space:normal;font-size:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;font-family:inherit;text-decoration:inherit;text-transform:inherit;margin-right:auto}[dir=rtl] .mat-mdc-option .mdc-list-item__primary-text{margin-right:0;margin-left:auto}.cdk-high-contrast-active .mat-mdc-option.mdc-list-item--selected:not(.mat-mdc-option-multiple)::after{content:"";position:absolute;top:50%;right:16px;transform:translateY(-50%);width:10px;height:0;border-bottom:solid 10px;border-radius:10px}[dir=rtl] .cdk-high-contrast-active .mat-mdc-option.mdc-list-item--selected:not(.mat-mdc-option-multiple)::after{right:auto;left:16px}.mat-mdc-option-active .mat-mdc-focus-indicator::before{content:""}'],encapsulation:2,changeDetection:0});class mr{}mr.\u0275fac=function(ct){return new(ct||mr)},mr.\u0275mod=o.oAB({type:mr}),mr.\u0275inj=o.cJS({imports:[ui,g.ez,xe,si]})},59549:(qe,I,p)=>{"use strict";p.d(I,{Eo:()=>mi,G_:()=>On,KE:()=>si,lN:()=>Vi,o2:()=>je,qo:()=>ft});var o=p(94650),e=p(40445),l=p(83353),D=p(77579),g=p(56451),E=p(82722),T=p(36895),n=p(21281),P=p(37340),w=p(49643),B=p(3238);const ue=["textField"],he=["iconPrefixContainer"],ae=["textPrefixContainer"];function X(Vn,Hn){1&Vn&&o._UZ(0,"span",19)}function ve(Vn,Hn){if(1&Vn){const An=o.EpF();o.TgZ(0,"label",17),o.NdJ("cdkObserveContent",function(){o.CHM(An);const In=o.oxw(2);return o.KtG(In._refreshOutlineNotchWidth())}),o.Hsn(1,1),o.YNc(2,X,1,0,"span",18),o.qZA()}if(2&Vn){const An=o.oxw(2);o.Q6J("floating",An._shouldLabelFloat())("cdkObserveContentDisabled",!An._hasOutline())("id",An._labelId),o.uIk("for",An._control.id)("aria-owns",An._control.id),o.xp6(2),o.Q6J("ngIf",!An.hideRequiredMarker&&An._control.required)}}function ye(Vn,Hn){if(1&Vn&&o.YNc(0,ve,3,6,"label",16),2&Vn){const An=o.oxw();o.Q6J("ngIf",An._hasFloatingLabel())}}function ge(Vn,Hn){1&Vn&&o._UZ(0,"div",20)}function ne(Vn,Hn){}function pe(Vn,Hn){if(1&Vn&&o.YNc(0,ne,0,0,"ng-template",22),2&Vn){o.oxw(2);const An=o.MAs(1);o.Q6J("ngTemplateOutlet",An)}}function Pe(Vn,Hn){if(1&Vn&&(o.TgZ(0,"div",21),o.YNc(1,pe,1,1,"ng-template",9),o.qZA()),2&Vn){const An=o.oxw();o.Q6J("matFormFieldNotchedOutlineOpen",An._shouldLabelFloat())("matFormFieldNotchedOutlineLabelWidth",An._labelWidth),o.xp6(1),o.Q6J("ngIf",!An._forceDisplayInfixLabel())}}function xe(Vn,Hn){1&Vn&&(o.TgZ(0,"div",23,24),o.Hsn(2,2),o.qZA())}function de(Vn,Hn){1&Vn&&(o.TgZ(0,"div",25,26),o.Hsn(2,3),o.qZA())}function re(Vn,Hn){}function oe(Vn,Hn){if(1&Vn&&o.YNc(0,re,0,0,"ng-template",22),2&Vn){o.oxw();const An=o.MAs(1);o.Q6J("ngTemplateOutlet",An)}}function me(Vn,Hn){1&Vn&&(o.TgZ(0,"div",27),o.Hsn(1,4),o.qZA())}function be(Vn,Hn){1&Vn&&(o.TgZ(0,"div",28),o.Hsn(1,5),o.qZA())}function le(Vn,Hn){1&Vn&&o._UZ(0,"div",29)}function Z(Vn,Hn){if(1&Vn&&(o.TgZ(0,"div",30),o.Hsn(1,6),o.qZA()),2&Vn){const An=o.oxw();o.Q6J("@transitionMessages",An._subscriptAnimationState)}}function Oe(Vn,Hn){if(1&Vn&&(o.TgZ(0,"mat-hint",34),o._uU(1),o.qZA()),2&Vn){const An=o.oxw(2);o.Q6J("id",An._hintLabelId),o.xp6(1),o.Oqu(An.hintLabel)}}function j(Vn,Hn){if(1&Vn&&(o.TgZ(0,"div",31),o.YNc(1,Oe,2,2,"mat-hint",32),o.Hsn(2,7),o._UZ(3,"div",33),o.Hsn(4,8),o.qZA()),2&Vn){const An=o.oxw();o.Q6J("@transitionMessages",An._subscriptAnimationState),o.xp6(1),o.Q6J("ngIf",An.hintLabel)}}const ke=["*",[["mat-label"]],[["","matPrefix",""],["","matIconPrefix",""]],[["","matTextPrefix",""]],[["","matTextSuffix",""]],[["","matSuffix",""],["","matIconSuffix",""]],[["mat-error"],["","matError",""]],[["mat-hint",3,"align","end"]],[["mat-hint","align","end"]]];class nt{}nt.\u0275fac=function(Hn){return new(Hn||nt)},nt.\u0275dir=o.lG2({type:nt,selectors:[["mat-label"]]});let mt=0;const ut=new o.OlP("MatError");class Ve{constructor(Hn,An){this.id="mat-mdc-error-"+mt++,Hn||An.nativeElement.setAttribute("aria-live","polite")}}Ve.\u0275fac=function(Hn){return new(Hn||Ve)(o.$8M("aria-live"),o.Y36(o.SBq))},Ve.\u0275dir=o.lG2({type:Ve,selectors:[["mat-error"],["","matError",""]],hostAttrs:["aria-atomic","true",1,"mat-mdc-form-field-error","mat-mdc-form-field-bottom-align"],hostVars:1,hostBindings:function(Hn,An){2&Hn&&o.Ikx("id",An.id)},inputs:{id:"id"},features:[o._Bn([{provide:ut,useExisting:Ve}])]});let tt=0;class Ne{constructor(){this.align="start",this.id="mat-mdc-hint-"+tt++}}Ne.\u0275fac=function(Hn){return new(Hn||Ne)},Ne.\u0275dir=o.lG2({type:Ne,selectors:[["mat-hint"]],hostAttrs:[1,"mat-mdc-form-field-hint","mat-mdc-form-field-bottom-align"],hostVars:4,hostBindings:function(Hn,An){2&Hn&&(o.Ikx("id",An.id),o.uIk("align",null),o.ekj("mat-mdc-form-field-hint-end","end"===An.align))},inputs:{align:"align",id:"id"}});const wt=new o.OlP("MatPrefix");class ft{constructor(){this._isText=!1}set _isTextSelector(Hn){this._isText=!0}}ft.\u0275fac=function(Hn){return new(Hn||ft)},ft.\u0275dir=o.lG2({type:ft,selectors:[["","matPrefix",""],["","matIconPrefix",""],["","matTextPrefix",""]],inputs:{_isTextSelector:["matTextPrefix","_isTextSelector"]},features:[o._Bn([{provide:wt,useExisting:ft}])]});const Ct=new o.OlP("MatSuffix");class rn{constructor(){this._isText=!1}set _isTextSelector(Hn){this._isText=!0}}rn.\u0275fac=function(Hn){return new(Hn||rn)},rn.\u0275dir=o.lG2({type:rn,selectors:[["","matSuffix",""],["","matIconSuffix",""],["","matTextSuffix",""]],inputs:{_isTextSelector:["matTextSuffix","_isTextSelector"]},features:[o._Bn([{provide:Ct,useExisting:rn}])]});class He{constructor(Hn){this._elementRef=Hn,this.floating=!1}getWidth(){return function st(Vn){const Hn=Vn;if(null!==Hn.offsetParent)return Hn.scrollWidth;const An=Hn.cloneNode(!0);An.style.setProperty("position","absolute"),An.style.setProperty("transform","translate(-9999px, -9999px)"),document.documentElement.appendChild(An);const vn=An.scrollWidth;return An.remove(),vn}(this._elementRef.nativeElement)}get element(){return this._elementRef.nativeElement}}He.\u0275fac=function(Hn){return new(Hn||He)(o.Y36(o.SBq))},He.\u0275dir=o.lG2({type:He,selectors:[["label","matFormFieldFloatingLabel",""]],hostAttrs:[1,"mdc-floating-label","mat-mdc-floating-label"],hostVars:2,hostBindings:function(Hn,An){2&Hn&&o.ekj("mdc-floating-label--float-above",An.floating)},inputs:{floating:"floating"}});const nn="mdc-line-ripple--active",Dn="mdc-line-ripple--deactivating";class Mn{constructor(Hn,An){this._elementRef=Hn,this._handleTransitionEnd=vn=>{const In=this._elementRef.nativeElement.classList,Zi=In.contains(Dn);"opacity"===vn.propertyName&&Zi&&In.remove(nn,Dn)},An.runOutsideAngular(()=>{Hn.nativeElement.addEventListener("transitionend",this._handleTransitionEnd)})}activate(){const Hn=this._elementRef.nativeElement.classList;Hn.remove(Dn),Hn.add(nn)}deactivate(){this._elementRef.nativeElement.classList.add(Dn)}ngOnDestroy(){this._elementRef.nativeElement.removeEventListener("transitionend",this._handleTransitionEnd)}}Mn.\u0275fac=function(Hn){return new(Hn||Mn)(o.Y36(o.SBq),o.Y36(o.R0b))},Mn.\u0275dir=o.lG2({type:Mn,selectors:[["div","matFormFieldLineRipple",""]],hostAttrs:[1,"mdc-line-ripple"]});class vi{constructor(Hn,An){this._elementRef=Hn,this._ngZone=An,this.labelWidth=0,this.open=!1}ngAfterViewInit(){const Hn=this._elementRef.nativeElement.querySelector(".mdc-floating-label");Hn?(this._elementRef.nativeElement.classList.add("mdc-notched-outline--upgraded"),"function"==typeof requestAnimationFrame&&(Hn.style.transitionDuration="0s",this._ngZone.runOutsideAngular(()=>{requestAnimationFrame(()=>Hn.style.transitionDuration="")}))):this._elementRef.nativeElement.classList.add("mdc-notched-outline--no-label")}_getNotchWidth(){return this.open?this.labelWidth>0?`calc(${this.labelWidth}px * var(--mat-mdc-form-field-floating-label-scale, 0.75) + 9px)`:"0px":null}}vi.\u0275fac=function(Hn){return new(Hn||vi)(o.Y36(o.SBq),o.Y36(o.R0b))},vi.\u0275cmp=o.Xpm({type:vi,selectors:[["div","matFormFieldNotchedOutline",""]],hostAttrs:[1,"mdc-notched-outline"],hostVars:2,hostBindings:function(Hn,An){2&Hn&&o.ekj("mdc-notched-outline--notched",An.open)},inputs:{labelWidth:["matFormFieldNotchedOutlineLabelWidth","labelWidth"],open:["matFormFieldNotchedOutlineOpen","open"]},attrs:["matFormFieldNotchedOutline",""],ngContentSelectors:["*"],decls:4,vars:2,consts:[[1,"mdc-notched-outline__leading"],[1,"mdc-notched-outline__notch"],[1,"mdc-notched-outline__trailing"]],template:function(Hn,An){1&Hn&&(o.F$t(),o._UZ(0,"div",0),o.TgZ(1,"div",1),o.Hsn(2),o.qZA(),o._UZ(3,"div",2)),2&Hn&&(o.xp6(1),o.Udp("width",An._getNotchWidth()))},encapsulation:2,changeDetection:0});const Gi={transitionMessages:(0,P.X$)("transitionMessages",[(0,P.SB)("enter",(0,P.oB)({opacity:1,transform:"translateY(0%)"})),(0,P.eR)("void => enter",[(0,P.oB)({opacity:0,transform:"translateY(-5px)"}),(0,P.jt)("300ms cubic-bezier(0.55, 0, 0.55, 0.2)")])])};class mi{}mi.\u0275fac=function(Hn){return new(Hn||mi)},mi.\u0275dir=o.lG2({type:mi});const On=new o.OlP("MatFormField"),je=new o.OlP("MAT_FORM_FIELD_DEFAULT_OPTIONS");let Bt=0;class si{get hideRequiredMarker(){return this._hideRequiredMarker}set hideRequiredMarker(Hn){this._hideRequiredMarker=(0,n.Ig)(Hn)}get floatLabel(){return this._floatLabel||this._defaults?.floatLabel||"auto"}set floatLabel(Hn){Hn!==this._floatLabel&&(this._floatLabel=Hn,this._changeDetectorRef.markForCheck())}get appearance(){return this._appearance}set appearance(Hn){const An=this._appearance,vn=Hn||this._defaults?.appearance||"fill";this._appearance=vn,"outline"===this._appearance&&this._appearance!==An&&(this._refreshOutlineNotchWidth(),this._needsOutlineLabelOffsetUpdateOnStable=!0)}get subscriptSizing(){return this._subscriptSizing||this._defaults?.subscriptSizing||"fixed"}set subscriptSizing(Hn){this._subscriptSizing=Hn||this._defaults?.subscriptSizing||"fixed"}get hintLabel(){return this._hintLabel}set hintLabel(Hn){this._hintLabel=Hn,this._processHints()}get _control(){return this._explicitFormFieldControl||this._formFieldControl}set _control(Hn){this._explicitFormFieldControl=Hn}constructor(Hn,An,vn,In,Zi,gr,Hi,Gr){this._elementRef=Hn,this._changeDetectorRef=An,this._ngZone=vn,this._dir=In,this._platform=Zi,this._defaults=gr,this._animationMode=Hi,this._document=Gr,this._hideRequiredMarker=!1,this.color="primary",this._appearance="fill",this._subscriptSizing=null,this._hintLabel="",this._hasIconPrefix=!1,this._hasTextPrefix=!1,this._hasIconSuffix=!1,this._hasTextSuffix=!1,this._labelId="mat-mdc-form-field-label-"+Bt++,this._hintLabelId="mat-mdc-hint-"+Bt++,this._subscriptAnimationState="",this._labelWidth=0,this._destroyed=new D.x,this._isFocused=null,this._needsOutlineLabelOffsetUpdateOnStable=!1,gr&&(gr.appearance&&(this.appearance=gr.appearance),this._hideRequiredMarker=Boolean(gr?.hideRequiredMarker),gr.color&&(this.color=gr.color))}ngAfterViewInit(){this._updateFocusState(),this._refreshOutlineNotchWidth(),this._document?.fonts?.ready?this._document.fonts.ready.then(()=>{this._refreshOutlineNotchWidth(),this._changeDetectorRef.markForCheck()}):setTimeout(()=>this._refreshOutlineNotchWidth(),100),this._subscriptAnimationState="enter",this._changeDetectorRef.detectChanges()}ngAfterContentInit(){this._assertFormFieldControl(),this._initializeControl(),this._initializeSubscript(),this._initializePrefixAndSuffix(),this._initializeOutlineLabelOffsetSubscriptions()}ngAfterContentChecked(){this._assertFormFieldControl()}ngOnDestroy(){this._destroyed.next(),this._destroyed.complete()}getLabelId(){return this._hasFloatingLabel()?this._labelId:null}getConnectedOverlayOrigin(){return this._textField||this._elementRef}_animateAndLockLabel(){this._hasFloatingLabel()&&(this.floatLabel="always")}_initializeControl(){const Hn=this._control;Hn.controlType&&this._elementRef.nativeElement.classList.add(`mat-mdc-form-field-type-${Hn.controlType}`),Hn.stateChanges.subscribe(()=>{this._updateFocusState(),this._syncDescribedByIds(),this._changeDetectorRef.markForCheck()}),Hn.ngControl&&Hn.ngControl.valueChanges&&Hn.ngControl.valueChanges.pipe((0,E.R)(this._destroyed)).subscribe(()=>this._changeDetectorRef.markForCheck())}_checkPrefixAndSuffixTypes(){this._hasIconPrefix=!!this._prefixChildren.find(Hn=>!Hn._isText),this._hasTextPrefix=!!this._prefixChildren.find(Hn=>Hn._isText),this._hasIconSuffix=!!this._suffixChildren.find(Hn=>!Hn._isText),this._hasTextSuffix=!!this._suffixChildren.find(Hn=>Hn._isText)}_initializePrefixAndSuffix(){this._checkPrefixAndSuffixTypes(),(0,g.T)(this._prefixChildren.changes,this._suffixChildren.changes).subscribe(()=>{this._checkPrefixAndSuffixTypes(),this._changeDetectorRef.markForCheck()})}_initializeSubscript(){this._hintChildren.changes.subscribe(()=>{this._processHints(),this._changeDetectorRef.markForCheck()}),this._errorChildren.changes.subscribe(()=>{this._syncDescribedByIds(),this._changeDetectorRef.markForCheck()}),this._validateHints(),this._syncDescribedByIds()}_assertFormFieldControl(){this._control}_updateFocusState(){this._control.focused&&!this._isFocused?(this._isFocused=!0,this._lineRipple?.activate()):!this._control.focused&&(this._isFocused||null===this._isFocused)&&(this._isFocused=!1,this._lineRipple?.deactivate()),this._textField?.nativeElement.classList.toggle("mdc-text-field--focused",this._control.focused)}_initializeOutlineLabelOffsetSubscriptions(){this._prefixChildren.changes.subscribe(()=>this._needsOutlineLabelOffsetUpdateOnStable=!0),this._ngZone.runOutsideAngular(()=>{this._ngZone.onStable.pipe((0,E.R)(this._destroyed)).subscribe(()=>{this._needsOutlineLabelOffsetUpdateOnStable&&(this._needsOutlineLabelOffsetUpdateOnStable=!1,this._updateOutlineLabelOffset())})}),this._dir.change.pipe((0,E.R)(this._destroyed)).subscribe(()=>this._needsOutlineLabelOffsetUpdateOnStable=!0)}_shouldAlwaysFloat(){return"always"===this.floatLabel}_hasOutline(){return"outline"===this.appearance}_forceDisplayInfixLabel(){return!this._platform.isBrowser&&this._prefixChildren.length&&!this._shouldLabelFloat()}_hasFloatingLabel(){return!!this._labelChildNonStatic||!!this._labelChildStatic}_shouldLabelFloat(){return this._control.shouldLabelFloat||this._shouldAlwaysFloat()}_shouldForward(Hn){const An=this._control?this._control.ngControl:null;return An&&An[Hn]}_getDisplayedMessages(){return this._errorChildren&&this._errorChildren.length>0&&this._control.errorState?"error":"hint"}_refreshOutlineNotchWidth(){!this._hasOutline()||!this._floatingLabel||(this._labelWidth=this._floatingLabel.getWidth())}_processHints(){this._validateHints(),this._syncDescribedByIds()}_validateHints(){this._hintChildren}_syncDescribedByIds(){if(this._control){let Hn=[];if(this._control.userAriaDescribedBy&&"string"==typeof this._control.userAriaDescribedBy&&Hn.push(...this._control.userAriaDescribedBy.split(" ")),"hint"===this._getDisplayedMessages()){const An=this._hintChildren?this._hintChildren.find(In=>"start"===In.align):null,vn=this._hintChildren?this._hintChildren.find(In=>"end"===In.align):null;An?Hn.push(An.id):this._hintLabel&&Hn.push(this._hintLabelId),vn&&Hn.push(vn.id)}else this._errorChildren&&Hn.push(...this._errorChildren.map(An=>An.id));this._control.setDescribedByIds(Hn)}}_updateOutlineLabelOffset(){if(!this._platform.isBrowser||!this._hasOutline()||!this._floatingLabel)return;const Hn=this._floatingLabel.element;if(!this._iconPrefixContainer&&!this._textPrefixContainer)return void(Hn.style.transform="");if(!this._isAttachedToDom())return void(this._needsOutlineLabelOffsetUpdateOnStable=!0);const An=this._iconPrefixContainer?.nativeElement,vn=this._textPrefixContainer?.nativeElement,In=An?.getBoundingClientRect().width??0,Zi=vn?.getBoundingClientRect().width??0,zr=`calc(${"rtl"===this._dir.value?"-1":"1"} * (${`${In+Zi}px`} + var(--mat-mdc-form-field-label-offset-x, 0px)))`;Hn.style.transform=`var(\n        --mat-mdc-form-field-label-transform,\n        translateY(-50%) translateX(${zr})\n    )`}_isAttachedToDom(){const Hn=this._elementRef.nativeElement;if(Hn.getRootNode){const An=Hn.getRootNode();return An&&An!==Hn}return document.documentElement.contains(Hn)}}si.\u0275fac=function(Hn){return new(Hn||si)(o.Y36(o.SBq),o.Y36(o.sBO),o.Y36(o.R0b),o.Y36(e.Is),o.Y36(l.t4),o.Y36(je,8),o.Y36(o.QbO,8),o.Y36(T.K0))},si.\u0275cmp=o.Xpm({type:si,selectors:[["mat-form-field"]],contentQueries:function(Hn,An,vn){if(1&Hn&&(o.Suo(vn,nt,5),o.Suo(vn,nt,7),o.Suo(vn,mi,5),o.Suo(vn,wt,5),o.Suo(vn,Ct,5),o.Suo(vn,ut,5),o.Suo(vn,Ne,5)),2&Hn){let In;o.iGM(In=o.CRH())&&(An._labelChildNonStatic=In.first),o.iGM(In=o.CRH())&&(An._labelChildStatic=In.first),o.iGM(In=o.CRH())&&(An._formFieldControl=In.first),o.iGM(In=o.CRH())&&(An._prefixChildren=In),o.iGM(In=o.CRH())&&(An._suffixChildren=In),o.iGM(In=o.CRH())&&(An._errorChildren=In),o.iGM(In=o.CRH())&&(An._hintChildren=In)}},viewQuery:function(Hn,An){if(1&Hn&&(o.Gf(ue,5),o.Gf(he,5),o.Gf(ae,5),o.Gf(He,5),o.Gf(vi,5),o.Gf(Mn,5)),2&Hn){let vn;o.iGM(vn=o.CRH())&&(An._textField=vn.first),o.iGM(vn=o.CRH())&&(An._iconPrefixContainer=vn.first),o.iGM(vn=o.CRH())&&(An._textPrefixContainer=vn.first),o.iGM(vn=o.CRH())&&(An._floatingLabel=vn.first),o.iGM(vn=o.CRH())&&(An._notchedOutline=vn.first),o.iGM(vn=o.CRH())&&(An._lineRipple=vn.first)}},hostAttrs:[1,"mat-mdc-form-field"],hostVars:42,hostBindings:function(Hn,An){2&Hn&&o.ekj("mat-mdc-form-field-label-always-float",An._shouldAlwaysFloat())("mat-mdc-form-field-has-icon-prefix",An._hasIconPrefix)("mat-mdc-form-field-has-icon-suffix",An._hasIconSuffix)("mat-form-field-invalid",An._control.errorState)("mat-form-field-disabled",An._control.disabled)("mat-form-field-autofilled",An._control.autofilled)("mat-form-field-no-animations","NoopAnimations"===An._animationMode)("mat-form-field-appearance-fill","fill"==An.appearance)("mat-form-field-appearance-outline","outline"==An.appearance)("mat-form-field-hide-placeholder",An._hasFloatingLabel()&&!An._shouldLabelFloat())("mat-focused",An._control.focused)("mat-primary","accent"!==An.color&&"warn"!==An.color)("mat-accent","accent"===An.color)("mat-warn","warn"===An.color)("ng-untouched",An._shouldForward("untouched"))("ng-touched",An._shouldForward("touched"))("ng-pristine",An._shouldForward("pristine"))("ng-dirty",An._shouldForward("dirty"))("ng-valid",An._shouldForward("valid"))("ng-invalid",An._shouldForward("invalid"))("ng-pending",An._shouldForward("pending"))},inputs:{hideRequiredMarker:"hideRequiredMarker",color:"color",floatLabel:"floatLabel",appearance:"appearance",subscriptSizing:"subscriptSizing",hintLabel:"hintLabel"},exportAs:["matFormField"],features:[o._Bn([{provide:On,useExisting:si}])],ngContentSelectors:["*","mat-label","[matPrefix], [matIconPrefix]","[matTextPrefix]","[matTextSuffix]","[matSuffix], [matIconSuffix]","mat-error, [matError]","mat-hint:not([align='end'])","mat-hint[align='end']"],decls:18,vars:23,consts:[["labelTemplate",""],[1,"mat-mdc-text-field-wrapper","mdc-text-field",3,"click"],["textField",""],["class","mat-mdc-form-field-focus-overlay",4,"ngIf"],[1,"mat-mdc-form-field-flex"],["matFormFieldNotchedOutline","",3,"matFormFieldNotchedOutlineOpen","matFormFieldNotchedOutlineLabelWidth",4,"ngIf"],["class","mat-mdc-form-field-icon-prefix",4,"ngIf"],["class","mat-mdc-form-field-text-prefix",4,"ngIf"],[1,"mat-mdc-form-field-infix"],[3,"ngIf"],["class","mat-mdc-form-field-text-suffix",4,"ngIf"],["class","mat-mdc-form-field-icon-suffix",4,"ngIf"],["matFormFieldLineRipple","",4,"ngIf"],[1,"mat-mdc-form-field-subscript-wrapper","mat-mdc-form-field-bottom-align",3,"ngSwitch"],["class","mat-mdc-form-field-error-wrapper",4,"ngSwitchCase"],["class","mat-mdc-form-field-hint-wrapper",4,"ngSwitchCase"],["matFormFieldFloatingLabel","",3,"floating","cdkObserveContentDisabled","id","cdkObserveContent",4,"ngIf"],["matFormFieldFloatingLabel","",3,"floating","cdkObserveContentDisabled","id","cdkObserveContent"],["aria-hidden","true","class","mat-mdc-form-field-required-marker mdc-floating-label--required",4,"ngIf"],["aria-hidden","true",1,"mat-mdc-form-field-required-marker","mdc-floating-label--required"],[1,"mat-mdc-form-field-focus-overlay"],["matFormFieldNotchedOutline","",3,"matFormFieldNotchedOutlineOpen","matFormFieldNotchedOutlineLabelWidth"],[3,"ngTemplateOutlet"],[1,"mat-mdc-form-field-icon-prefix"],["iconPrefixContainer",""],[1,"mat-mdc-form-field-text-prefix"],["textPrefixContainer",""],[1,"mat-mdc-form-field-text-suffix"],[1,"mat-mdc-form-field-icon-suffix"],["matFormFieldLineRipple",""],[1,"mat-mdc-form-field-error-wrapper"],[1,"mat-mdc-form-field-hint-wrapper"],[3,"id",4,"ngIf"],[1,"mat-mdc-form-field-hint-spacer"],[3,"id"]],template:function(Hn,An){1&Hn&&(o.F$t(ke),o.YNc(0,ye,1,1,"ng-template",null,0,o.W1O),o.TgZ(2,"div",1,2),o.NdJ("click",function(In){return An._control.onContainerClick&&An._control.onContainerClick(In)}),o.YNc(4,ge,1,0,"div",3),o.TgZ(5,"div",4),o.YNc(6,Pe,2,3,"div",5),o.YNc(7,xe,3,0,"div",6),o.YNc(8,de,3,0,"div",7),o.TgZ(9,"div",8),o.YNc(10,oe,1,1,"ng-template",9),o.Hsn(11),o.qZA(),o.YNc(12,me,2,0,"div",10),o.YNc(13,be,2,0,"div",11),o.qZA(),o.YNc(14,le,1,0,"div",12),o.qZA(),o.TgZ(15,"div",13),o.YNc(16,Z,2,1,"div",14),o.YNc(17,j,5,2,"div",15),o.qZA()),2&Hn&&(o.xp6(2),o.ekj("mdc-text-field--filled",!An._hasOutline())("mdc-text-field--outlined",An._hasOutline())("mdc-text-field--no-label",!An._hasFloatingLabel())("mdc-text-field--disabled",An._control.disabled)("mdc-text-field--invalid",An._control.errorState),o.xp6(2),o.Q6J("ngIf",!An._hasOutline()&&!An._control.disabled),o.xp6(2),o.Q6J("ngIf",An._hasOutline()),o.xp6(1),o.Q6J("ngIf",An._hasIconPrefix),o.xp6(1),o.Q6J("ngIf",An._hasTextPrefix),o.xp6(2),o.Q6J("ngIf",!An._hasOutline()||An._forceDisplayInfixLabel()),o.xp6(2),o.Q6J("ngIf",An._hasTextSuffix),o.xp6(1),o.Q6J("ngIf",An._hasIconSuffix),o.xp6(1),o.Q6J("ngIf",!An._hasOutline()),o.xp6(1),o.ekj("mat-mdc-form-field-subscript-dynamic-size","dynamic"===An.subscriptSizing),o.Q6J("ngSwitch",An._getDisplayedMessages()),o.xp6(1),o.Q6J("ngSwitchCase","error"),o.xp6(1),o.Q6J("ngSwitchCase","hint"))},dependencies:[T.O5,T.tP,T.RF,T.n9,w.wD,Ne,He,vi,Mn],styles:['.mdc-text-field{border-top-left-radius:var(--mdc-shape-small, 4px);border-top-right-radius:var(--mdc-shape-small, 4px);border-bottom-right-radius:0;border-bottom-left-radius:0;display:inline-flex;align-items:baseline;padding:0 16px;position:relative;box-sizing:border-box;overflow:hidden;will-change:opacity,transform,color}.mdc-text-field .mdc-floating-label{top:50%;transform:translateY(-50%);pointer-events:none}.mdc-text-field__input{height:28px;width:100%;min-width:0;border:none;border-radius:0;background:none;appearance:none;padding:0}.mdc-text-field__input::-ms-clear{display:none}.mdc-text-field__input::-webkit-calendar-picker-indicator{display:none}.mdc-text-field__input:focus{outline:none}.mdc-text-field__input:invalid{box-shadow:none}@media all{.mdc-text-field__input::placeholder{opacity:0}}@media all{.mdc-text-field__input:-ms-input-placeholder{opacity:0}}@media all{.mdc-text-field--no-label .mdc-text-field__input::placeholder,.mdc-text-field--focused .mdc-text-field__input::placeholder{opacity:1}}@media all{.mdc-text-field--no-label .mdc-text-field__input:-ms-input-placeholder,.mdc-text-field--focused .mdc-text-field__input:-ms-input-placeholder{opacity:1}}.mdc-text-field__affix{height:28px;opacity:0;white-space:nowrap}.mdc-text-field--label-floating .mdc-text-field__affix,.mdc-text-field--no-label .mdc-text-field__affix{opacity:1}@supports(-webkit-hyphens: none){.mdc-text-field--outlined .mdc-text-field__affix{align-items:center;align-self:center;display:inline-flex;height:100%}}.mdc-text-field__affix--prefix{padding-left:0;padding-right:2px}[dir=rtl] .mdc-text-field__affix--prefix,.mdc-text-field__affix--prefix[dir=rtl]{padding-left:2px;padding-right:0}.mdc-text-field--end-aligned .mdc-text-field__affix--prefix{padding-left:0;padding-right:12px}[dir=rtl] .mdc-text-field--end-aligned .mdc-text-field__affix--prefix,.mdc-text-field--end-aligned .mdc-text-field__affix--prefix[dir=rtl]{padding-left:12px;padding-right:0}.mdc-text-field__affix--suffix{padding-left:12px;padding-right:0}[dir=rtl] .mdc-text-field__affix--suffix,.mdc-text-field__affix--suffix[dir=rtl]{padding-left:0;padding-right:12px}.mdc-text-field--end-aligned .mdc-text-field__affix--suffix{padding-left:2px;padding-right:0}[dir=rtl] .mdc-text-field--end-aligned .mdc-text-field__affix--suffix,.mdc-text-field--end-aligned .mdc-text-field__affix--suffix[dir=rtl]{padding-left:0;padding-right:2px}.mdc-text-field--filled{height:56px}.mdc-text-field--filled::before{display:inline-block;width:0;height:40px;content:"";vertical-align:0}.mdc-text-field--filled .mdc-floating-label{left:16px;right:initial}[dir=rtl] .mdc-text-field--filled .mdc-floating-label,.mdc-text-field--filled .mdc-floating-label[dir=rtl]{left:initial;right:16px}.mdc-text-field--filled .mdc-floating-label--float-above{transform:translateY(-106%) scale(0.75)}.mdc-text-field--filled.mdc-text-field--no-label .mdc-text-field__input{height:100%}.mdc-text-field--filled.mdc-text-field--no-label .mdc-floating-label{display:none}.mdc-text-field--filled.mdc-text-field--no-label::before{display:none}@supports(-webkit-hyphens: none){.mdc-text-field--filled.mdc-text-field--no-label .mdc-text-field__affix{align-items:center;align-self:center;display:inline-flex;height:100%}}.mdc-text-field--outlined{height:56px;overflow:visible}.mdc-text-field--outlined .mdc-floating-label--float-above{transform:translateY(-37.25px) scale(1)}.mdc-text-field--outlined .mdc-floating-label--float-above{font-size:.75rem}.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{transform:translateY(-34.75px) scale(0.75)}.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{font-size:1rem}.mdc-text-field--outlined .mdc-text-field__input{height:100%}.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__leading{border-top-left-radius:var(--mdc-shape-small, 4px);border-top-right-radius:0;border-bottom-right-radius:0;border-bottom-left-radius:var(--mdc-shape-small, 4px)}[dir=rtl] .mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__leading,.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__leading[dir=rtl]{border-top-left-radius:0;border-top-right-radius:var(--mdc-shape-small, 4px);border-bottom-right-radius:var(--mdc-shape-small, 4px);border-bottom-left-radius:0}@supports(top: max(0%)){.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__leading{width:max(12px, var(--mdc-shape-small, 4px))}}@supports(top: max(0%)){.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__notch{max-width:calc(100% - max(12px, var(--mdc-shape-small, 4px))*2)}}.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__trailing{border-top-left-radius:0;border-top-right-radius:var(--mdc-shape-small, 4px);border-bottom-right-radius:var(--mdc-shape-small, 4px);border-bottom-left-radius:0}[dir=rtl] .mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__trailing,.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__trailing[dir=rtl]{border-top-left-radius:var(--mdc-shape-small, 4px);border-top-right-radius:0;border-bottom-right-radius:0;border-bottom-left-radius:var(--mdc-shape-small, 4px)}@supports(top: max(0%)){.mdc-text-field--outlined{padding-left:max(16px, calc(var(--mdc-shape-small, 4px) + 4px))}}@supports(top: max(0%)){.mdc-text-field--outlined{padding-right:max(16px, var(--mdc-shape-small, 4px))}}@supports(top: max(0%)){.mdc-text-field--outlined+.mdc-text-field-helper-line{padding-left:max(16px, calc(var(--mdc-shape-small, 4px) + 4px))}}@supports(top: max(0%)){.mdc-text-field--outlined+.mdc-text-field-helper-line{padding-right:max(16px, var(--mdc-shape-small, 4px))}}.mdc-text-field--outlined.mdc-text-field--with-leading-icon{padding-left:0}@supports(top: max(0%)){.mdc-text-field--outlined.mdc-text-field--with-leading-icon{padding-right:max(16px, var(--mdc-shape-small, 4px))}}[dir=rtl] .mdc-text-field--outlined.mdc-text-field--with-leading-icon,.mdc-text-field--outlined.mdc-text-field--with-leading-icon[dir=rtl]{padding-right:0}@supports(top: max(0%)){[dir=rtl] .mdc-text-field--outlined.mdc-text-field--with-leading-icon,.mdc-text-field--outlined.mdc-text-field--with-leading-icon[dir=rtl]{padding-left:max(16px, var(--mdc-shape-small, 4px))}}.mdc-text-field--outlined.mdc-text-field--with-trailing-icon{padding-right:0}@supports(top: max(0%)){.mdc-text-field--outlined.mdc-text-field--with-trailing-icon{padding-left:max(16px, calc(var(--mdc-shape-small, 4px) + 4px))}}[dir=rtl] .mdc-text-field--outlined.mdc-text-field--with-trailing-icon,.mdc-text-field--outlined.mdc-text-field--with-trailing-icon[dir=rtl]{padding-left:0}@supports(top: max(0%)){[dir=rtl] .mdc-text-field--outlined.mdc-text-field--with-trailing-icon,.mdc-text-field--outlined.mdc-text-field--with-trailing-icon[dir=rtl]{padding-right:max(16px, calc(var(--mdc-shape-small, 4px) + 4px))}}.mdc-text-field--outlined.mdc-text-field--with-leading-icon.mdc-text-field--with-trailing-icon{padding-left:0;padding-right:0}.mdc-text-field--outlined .mdc-notched-outline--notched .mdc-notched-outline__notch{padding-top:1px}.mdc-text-field--outlined .mdc-floating-label{left:4px;right:initial}[dir=rtl] .mdc-text-field--outlined .mdc-floating-label,.mdc-text-field--outlined .mdc-floating-label[dir=rtl]{left:initial;right:4px}.mdc-text-field--outlined .mdc-text-field__input{display:flex;border:none !important;background-color:rgba(0,0,0,0)}.mdc-text-field--outlined .mdc-notched-outline{z-index:1}.mdc-text-field--textarea{flex-direction:column;align-items:center;width:auto;height:auto;padding:0}.mdc-text-field--textarea .mdc-floating-label{top:19px}.mdc-text-field--textarea .mdc-floating-label:not(.mdc-floating-label--float-above){transform:none}.mdc-text-field--textarea .mdc-text-field__input{flex-grow:1;height:auto;min-height:1.5rem;overflow-x:hidden;overflow-y:auto;box-sizing:border-box;resize:none;padding:0 16px}.mdc-text-field--textarea.mdc-text-field--filled::before{display:none}.mdc-text-field--textarea.mdc-text-field--filled .mdc-floating-label--float-above{transform:translateY(-10.25px) scale(0.75)}.mdc-text-field--textarea.mdc-text-field--filled .mdc-text-field__input{margin-top:23px;margin-bottom:9px}.mdc-text-field--textarea.mdc-text-field--filled.mdc-text-field--no-label .mdc-text-field__input{margin-top:16px;margin-bottom:16px}.mdc-text-field--textarea.mdc-text-field--outlined .mdc-notched-outline--notched .mdc-notched-outline__notch{padding-top:0}.mdc-text-field--textarea.mdc-text-field--outlined .mdc-floating-label--float-above{transform:translateY(-27.25px) scale(1)}.mdc-text-field--textarea.mdc-text-field--outlined .mdc-floating-label--float-above{font-size:.75rem}.mdc-text-field--textarea.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--textarea.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{transform:translateY(-24.75px) scale(0.75)}.mdc-text-field--textarea.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--textarea.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{font-size:1rem}.mdc-text-field--textarea.mdc-text-field--outlined .mdc-text-field__input{margin-top:16px;margin-bottom:16px}.mdc-text-field--textarea.mdc-text-field--outlined .mdc-floating-label{top:18px}.mdc-text-field--textarea.mdc-text-field--with-internal-counter .mdc-text-field__input{margin-bottom:2px}.mdc-text-field--textarea.mdc-text-field--with-internal-counter .mdc-text-field-character-counter{align-self:flex-end;padding:0 16px}.mdc-text-field--textarea.mdc-text-field--with-internal-counter .mdc-text-field-character-counter::after{display:inline-block;width:0;height:16px;content:"";vertical-align:-16px}.mdc-text-field--textarea.mdc-text-field--with-internal-counter .mdc-text-field-character-counter::before{display:none}.mdc-text-field__resizer{align-self:stretch;display:inline-flex;flex-direction:column;flex-grow:1;max-height:100%;max-width:100%;min-height:56px;min-width:fit-content;min-width:-moz-available;min-width:-webkit-fill-available;overflow:hidden;resize:both}.mdc-text-field--filled .mdc-text-field__resizer{transform:translateY(-1px)}.mdc-text-field--filled .mdc-text-field__resizer .mdc-text-field__input,.mdc-text-field--filled .mdc-text-field__resizer .mdc-text-field-character-counter{transform:translateY(1px)}.mdc-text-field--outlined .mdc-text-field__resizer{transform:translateX(-1px) translateY(-1px)}[dir=rtl] .mdc-text-field--outlined .mdc-text-field__resizer,.mdc-text-field--outlined .mdc-text-field__resizer[dir=rtl]{transform:translateX(1px) translateY(-1px)}.mdc-text-field--outlined .mdc-text-field__resizer .mdc-text-field__input,.mdc-text-field--outlined .mdc-text-field__resizer .mdc-text-field-character-counter{transform:translateX(1px) translateY(1px)}[dir=rtl] .mdc-text-field--outlined .mdc-text-field__resizer .mdc-text-field__input,[dir=rtl] .mdc-text-field--outlined .mdc-text-field__resizer .mdc-text-field-character-counter,.mdc-text-field--outlined .mdc-text-field__resizer .mdc-text-field__input[dir=rtl],.mdc-text-field--outlined .mdc-text-field__resizer .mdc-text-field-character-counter[dir=rtl]{transform:translateX(-1px) translateY(1px)}.mdc-text-field--with-leading-icon{padding-left:0;padding-right:16px}[dir=rtl] .mdc-text-field--with-leading-icon,.mdc-text-field--with-leading-icon[dir=rtl]{padding-left:16px;padding-right:0}.mdc-text-field--with-leading-icon.mdc-text-field--filled .mdc-floating-label{max-width:calc(100% - 48px);left:48px;right:initial}[dir=rtl] .mdc-text-field--with-leading-icon.mdc-text-field--filled .mdc-floating-label,.mdc-text-field--with-leading-icon.mdc-text-field--filled .mdc-floating-label[dir=rtl]{left:initial;right:48px}.mdc-text-field--with-leading-icon.mdc-text-field--filled .mdc-floating-label--float-above{max-width:calc(100% / 0.75 - 64px / 0.75)}.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label{left:36px;right:initial}[dir=rtl] .mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label,.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label[dir=rtl]{left:initial;right:36px}.mdc-text-field--with-leading-icon.mdc-text-field--outlined :not(.mdc-notched-outline--notched) .mdc-notched-outline__notch{max-width:calc(100% - 60px)}.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label--float-above{transform:translateY(-37.25px) translateX(-32px) scale(1)}[dir=rtl] .mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label--float-above,.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label--float-above[dir=rtl]{transform:translateY(-37.25px) translateX(32px) scale(1)}.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label--float-above{font-size:.75rem}.mdc-text-field--with-leading-icon.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{transform:translateY(-34.75px) translateX(-32px) scale(0.75)}[dir=rtl] .mdc-text-field--with-leading-icon.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above,[dir=rtl] .mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--with-leading-icon.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above[dir=rtl],.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above[dir=rtl]{transform:translateY(-34.75px) translateX(32px) scale(0.75)}.mdc-text-field--with-leading-icon.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{font-size:1rem}.mdc-text-field--with-trailing-icon{padding-left:16px;padding-right:0}[dir=rtl] .mdc-text-field--with-trailing-icon,.mdc-text-field--with-trailing-icon[dir=rtl]{padding-left:0;padding-right:16px}.mdc-text-field--with-trailing-icon.mdc-text-field--filled .mdc-floating-label{max-width:calc(100% - 64px)}.mdc-text-field--with-trailing-icon.mdc-text-field--filled .mdc-floating-label--float-above{max-width:calc(100% / 0.75 - 64px / 0.75)}.mdc-text-field--with-trailing-icon.mdc-text-field--outlined :not(.mdc-notched-outline--notched) .mdc-notched-outline__notch{max-width:calc(100% - 60px)}.mdc-text-field--with-leading-icon.mdc-text-field--with-trailing-icon{padding-left:0;padding-right:0}.mdc-text-field--with-leading-icon.mdc-text-field--with-trailing-icon.mdc-text-field--filled .mdc-floating-label{max-width:calc(100% - 96px)}.mdc-text-field--with-leading-icon.mdc-text-field--with-trailing-icon.mdc-text-field--filled .mdc-floating-label--float-above{max-width:calc(100% / 0.75 - 96px / 0.75)}.mdc-text-field-helper-line{display:flex;justify-content:space-between;box-sizing:border-box}.mdc-text-field+.mdc-text-field-helper-line{padding-right:16px;padding-left:16px}.mdc-form-field>.mdc-text-field+label{align-self:flex-start}.mdc-text-field--focused .mdc-notched-outline__leading,.mdc-text-field--focused .mdc-notched-outline__notch,.mdc-text-field--focused .mdc-notched-outline__trailing{border-width:2px}.mdc-text-field--focused+.mdc-text-field-helper-line .mdc-text-field-helper-text:not(.mdc-text-field-helper-text--validation-msg){opacity:1}.mdc-text-field--focused.mdc-text-field--outlined .mdc-notched-outline--notched .mdc-notched-outline__notch{padding-top:2px}.mdc-text-field--focused.mdc-text-field--outlined.mdc-text-field--textarea .mdc-notched-outline--notched .mdc-notched-outline__notch{padding-top:0}.mdc-text-field--invalid+.mdc-text-field-helper-line .mdc-text-field-helper-text--validation-msg{opacity:1}.mdc-text-field--disabled{pointer-events:none}@media screen and (forced-colors: active){.mdc-text-field--disabled .mdc-text-field__input{background-color:Window}.mdc-text-field--disabled .mdc-floating-label{z-index:1}}.mdc-text-field--disabled .mdc-floating-label{cursor:default}.mdc-text-field--disabled.mdc-text-field--filled .mdc-text-field__ripple{display:none}.mdc-text-field--disabled .mdc-text-field__input{pointer-events:auto}.mdc-text-field--end-aligned .mdc-text-field__input{text-align:right}[dir=rtl] .mdc-text-field--end-aligned .mdc-text-field__input,.mdc-text-field--end-aligned .mdc-text-field__input[dir=rtl]{text-align:left}[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__input,[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__affix,.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__input,.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__affix{direction:ltr}[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__affix--prefix,.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__affix--prefix{padding-left:0;padding-right:2px}[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__affix--suffix,.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__affix--suffix{padding-left:12px;padding-right:0}[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__icon--leading,.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__icon--leading{order:1}[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__affix--suffix,.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__affix--suffix{order:2}[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__input,.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__input{order:3}[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__affix--prefix,.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__affix--prefix{order:4}[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__icon--trailing,.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__icon--trailing{order:5}[dir=rtl] .mdc-text-field--ltr-text.mdc-text-field--end-aligned .mdc-text-field__input,.mdc-text-field--ltr-text.mdc-text-field--end-aligned[dir=rtl] .mdc-text-field__input{text-align:right}[dir=rtl] .mdc-text-field--ltr-text.mdc-text-field--end-aligned .mdc-text-field__affix--prefix,.mdc-text-field--ltr-text.mdc-text-field--end-aligned[dir=rtl] .mdc-text-field__affix--prefix{padding-right:12px}[dir=rtl] .mdc-text-field--ltr-text.mdc-text-field--end-aligned .mdc-text-field__affix--suffix,.mdc-text-field--ltr-text.mdc-text-field--end-aligned[dir=rtl] .mdc-text-field__affix--suffix{padding-left:2px}.mdc-floating-label{position:absolute;left:0;-webkit-transform-origin:left top;transform-origin:left top;line-height:1.15rem;text-align:left;text-overflow:ellipsis;white-space:nowrap;cursor:text;overflow:hidden;will-change:transform}[dir=rtl] .mdc-floating-label,.mdc-floating-label[dir=rtl]{right:0;left:auto;-webkit-transform-origin:right top;transform-origin:right top;text-align:right}.mdc-floating-label--float-above{cursor:auto}.mdc-floating-label--required:not(.mdc-floating-label--hide-required-marker)::after{margin-left:1px;margin-right:0px;content:"*"}[dir=rtl] .mdc-floating-label--required:not(.mdc-floating-label--hide-required-marker)::after,.mdc-floating-label--required:not(.mdc-floating-label--hide-required-marker)[dir=rtl]::after{margin-left:0;margin-right:1px}.mdc-floating-label--float-above{transform:translateY(-106%) scale(0.75)}.mdc-notched-outline{display:flex;position:absolute;top:0;right:0;left:0;box-sizing:border-box;width:100%;max-width:100%;height:100%;text-align:left;pointer-events:none}[dir=rtl] .mdc-notched-outline,.mdc-notched-outline[dir=rtl]{text-align:right}.mdc-notched-outline__leading,.mdc-notched-outline__notch,.mdc-notched-outline__trailing{box-sizing:border-box;height:100%;border-top:1px solid;border-bottom:1px solid;pointer-events:none}.mdc-notched-outline__leading{border-left:1px solid;border-right:none;width:12px}[dir=rtl] .mdc-notched-outline__leading,.mdc-notched-outline__leading[dir=rtl]{border-left:none;border-right:1px solid}.mdc-notched-outline__trailing{border-left:none;border-right:1px solid;flex-grow:1}[dir=rtl] .mdc-notched-outline__trailing,.mdc-notched-outline__trailing[dir=rtl]{border-left:1px solid;border-right:none}.mdc-notched-outline__notch{flex:0 0 auto;width:auto;max-width:calc(100% - 12px * 2)}.mdc-notched-outline .mdc-floating-label{display:inline-block;position:relative;max-width:100%}.mdc-notched-outline .mdc-floating-label--float-above{text-overflow:clip}.mdc-notched-outline--upgraded .mdc-floating-label--float-above{max-width:133.3333333333%}.mdc-notched-outline--notched .mdc-notched-outline__notch{padding-left:0;padding-right:8px;border-top:none}[dir=rtl] .mdc-notched-outline--notched .mdc-notched-outline__notch,.mdc-notched-outline--notched .mdc-notched-outline__notch[dir=rtl]{padding-left:8px;padding-right:0}.mdc-notched-outline--no-label .mdc-notched-outline__notch{display:none}.mdc-line-ripple::before,.mdc-line-ripple::after{position:absolute;bottom:0;left:0;width:100%;border-bottom-style:solid;content:""}.mdc-line-ripple::before{border-bottom-width:1px}.mdc-line-ripple::after{border-bottom-width:2px}.mdc-line-ripple::before{z-index:1}.mdc-line-ripple::after{transform:scaleX(0);opacity:0;z-index:2}.mdc-line-ripple--active::after{transform:scaleX(1);opacity:1}.mdc-line-ripple--deactivating::after{opacity:0}.mat-mdc-form-field-textarea-control{vertical-align:middle;resize:vertical;box-sizing:border-box;height:auto;margin:0;padding:0;border:none;overflow:auto}.mat-mdc-form-field-input-control.mat-mdc-form-field-input-control{font:inherit;letter-spacing:inherit;text-decoration:inherit;text-transform:inherit;border:none}.mat-mdc-form-field .mat-mdc-floating-label.mdc-floating-label{line-height:normal;pointer-events:all}.mdc-text-field--no-label:not(.mdc-text-field--textarea) .mat-mdc-form-field-input-control.mdc-text-field__input,.mat-mdc-text-field-wrapper .mat-mdc-form-field-input-control{height:auto}.mat-mdc-text-field-wrapper .mat-mdc-form-field-input-control.mdc-text-field__input[type=color]{height:23px}.mat-mdc-text-field-wrapper{height:auto;flex:auto}.mat-mdc-form-field-has-icon-prefix .mat-mdc-text-field-wrapper{padding-left:0;--mat-mdc-form-field-label-offset-x: -16px}.mat-mdc-form-field-has-icon-suffix .mat-mdc-text-field-wrapper{padding-right:0}[dir=rtl] .mat-mdc-text-field-wrapper{padding-left:16px;padding-right:16px}[dir=rtl] .mat-mdc-form-field-has-icon-suffix .mat-mdc-text-field-wrapper{padding-left:0}[dir=rtl] .mat-mdc-form-field-has-icon-prefix .mat-mdc-text-field-wrapper{padding-right:0}.mat-mdc-form-field-label-always-float .mdc-text-field__input::placeholder{transition-delay:40ms;transition-duration:110ms;opacity:1}.mat-mdc-text-field-wrapper .mat-mdc-form-field-infix .mat-mdc-floating-label{left:auto;right:auto}.mat-mdc-text-field-wrapper.mdc-text-field--outlined .mdc-text-field__input{display:inline-block}.mat-mdc-form-field .mat-mdc-text-field-wrapper.mdc-text-field .mdc-notched-outline__notch{padding-top:0}.mat-mdc-text-field-wrapper::before{content:none}.mat-mdc-form-field-subscript-wrapper{box-sizing:border-box;width:100%;position:relative}.mat-mdc-form-field-hint-wrapper,.mat-mdc-form-field-error-wrapper{position:absolute;top:0;left:0;right:0;padding:0 16px}.mat-mdc-form-field-subscript-dynamic-size .mat-mdc-form-field-hint-wrapper,.mat-mdc-form-field-subscript-dynamic-size .mat-mdc-form-field-error-wrapper{position:static}.mat-mdc-form-field-bottom-align::before{content:"";display:inline-block;height:16px}.mat-mdc-form-field-bottom-align.mat-mdc-form-field-subscript-dynamic-size::before{content:unset}.mat-mdc-form-field-hint-end{order:1}.mat-mdc-form-field-hint-wrapper{display:flex}.mat-mdc-form-field-hint-spacer{flex:1 0 1em}.mat-mdc-form-field-error{display:block}.mat-mdc-form-field-focus-overlay{top:0;left:0;right:0;bottom:0;position:absolute;opacity:0;pointer-events:none}select.mat-mdc-form-field-input-control{-moz-appearance:none;-webkit-appearance:none;background-color:rgba(0,0,0,0);display:inline-flex;box-sizing:border-box}select.mat-mdc-form-field-input-control:not(:disabled){cursor:pointer}.mat-mdc-form-field-type-mat-native-select .mat-mdc-form-field-infix::after{content:"";width:0;height:0;border-left:5px solid rgba(0,0,0,0);border-right:5px solid rgba(0,0,0,0);border-top:5px solid;position:absolute;right:0;top:50%;margin-top:-2.5px;pointer-events:none}[dir=rtl] .mat-mdc-form-field-type-mat-native-select .mat-mdc-form-field-infix::after{right:auto;left:0}.mat-mdc-form-field-type-mat-native-select .mat-mdc-form-field-input-control{padding-right:15px}[dir=rtl] .mat-mdc-form-field-type-mat-native-select .mat-mdc-form-field-input-control{padding-right:0;padding-left:15px}.cdk-high-contrast-active .mat-form-field-appearance-fill .mat-mdc-text-field-wrapper{outline:solid 1px}.cdk-high-contrast-active .mat-form-field-appearance-fill.mat-form-field-disabled .mat-mdc-text-field-wrapper{outline-color:GrayText}.cdk-high-contrast-active .mat-form-field-appearance-fill.mat-focused .mat-mdc-text-field-wrapper{outline:dashed 3px}.cdk-high-contrast-active .mat-mdc-form-field.mat-focused .mdc-notched-outline{border:dashed 3px}.mat-mdc-form-field-input-control[type=date],.mat-mdc-form-field-input-control[type=datetime],.mat-mdc-form-field-input-control[type=datetime-local],.mat-mdc-form-field-input-control[type=month],.mat-mdc-form-field-input-control[type=week],.mat-mdc-form-field-input-control[type=time]{line-height:1}.mat-mdc-form-field-input-control::-webkit-datetime-edit{line-height:1;padding:0;margin-bottom:-2px}.mat-mdc-form-field{--mat-mdc-form-field-floating-label-scale: 0.75;display:inline-flex;flex-direction:column;min-width:0;text-align:left}[dir=rtl] .mat-mdc-form-field{text-align:right}.mat-mdc-form-field-flex{display:inline-flex;align-items:baseline;box-sizing:border-box;width:100%}.mat-mdc-text-field-wrapper{width:100%}.mat-mdc-form-field-icon-prefix,.mat-mdc-form-field-icon-suffix{align-self:center;line-height:0;pointer-events:auto}.mat-mdc-form-field-icon-prefix,[dir=rtl] .mat-mdc-form-field-icon-suffix{padding:0 4px 0 0}.mat-mdc-form-field-icon-suffix,[dir=rtl] .mat-mdc-form-field-icon-prefix{padding:0 0 0 4px}.mat-mdc-form-field-icon-prefix>.mat-icon,.mat-mdc-form-field-icon-suffix>.mat-icon{padding:12px;box-sizing:content-box}.mat-mdc-form-field-subscript-wrapper .mat-icon,.mat-mdc-form-field label .mat-icon{width:1em;height:1em;font-size:inherit}.mat-mdc-form-field-infix{flex:auto;min-width:0;width:180px;position:relative;box-sizing:border-box}.mat-mdc-form-field .mdc-notched-outline__notch{margin-left:-1px;-webkit-clip-path:inset(-9em -999em -9em 1px);clip-path:inset(-9em -999em -9em 1px)}[dir=rtl] .mat-mdc-form-field .mdc-notched-outline__notch{margin-left:0;margin-right:-1px;-webkit-clip-path:inset(-9em 1px -9em -999em);clip-path:inset(-9em 1px -9em -999em)}.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field__input{transition:opacity 150ms 0ms cubic-bezier(0.4, 0, 0.2, 1)}@media all{.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field__input::placeholder{transition:opacity 67ms 0ms cubic-bezier(0.4, 0, 0.2, 1)}}@media all{.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field__input:-ms-input-placeholder{transition:opacity 67ms 0ms cubic-bezier(0.4, 0, 0.2, 1)}}@media all{.mdc-text-field--no-label .mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field__input::placeholder,.mdc-text-field--focused .mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field__input::placeholder{transition-delay:40ms;transition-duration:110ms}}@media all{.mdc-text-field--no-label .mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field__input:-ms-input-placeholder,.mdc-text-field--focused .mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field__input:-ms-input-placeholder{transition-delay:40ms;transition-duration:110ms}}.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field__affix{transition:opacity 150ms 0ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field--filled.mdc-ripple-upgraded--background-focused .mdc-text-field__ripple::before,.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field--filled:not(.mdc-ripple-upgraded):focus .mdc-text-field__ripple::before{transition-duration:75ms}.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field--outlined .mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-text-field-outlined 250ms 1}@keyframes mdc-floating-label-shake-float-above-text-field-outlined{0%{transform:translateX(calc(0 - 0%)) translateY(-34.75px) scale(0.75)}33%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(calc(4% - 0%)) translateY(-34.75px) scale(0.75)}66%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(calc(-4% - 0%)) translateY(-34.75px) scale(0.75)}100%{transform:translateX(calc(0 - 0%)) translateY(-34.75px) scale(0.75)}}.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field--textarea{transition:none}.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field--textarea.mdc-text-field--filled .mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-textarea-filled 250ms 1}@keyframes mdc-floating-label-shake-float-above-textarea-filled{0%{transform:translateX(calc(0 - 0%)) translateY(-10.25px) scale(0.75)}33%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(calc(4% - 0%)) translateY(-10.25px) scale(0.75)}66%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(calc(-4% - 0%)) translateY(-10.25px) scale(0.75)}100%{transform:translateX(calc(0 - 0%)) translateY(-10.25px) scale(0.75)}}.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field--textarea.mdc-text-field--outlined .mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-textarea-outlined 250ms 1}@keyframes mdc-floating-label-shake-float-above-textarea-outlined{0%{transform:translateX(calc(0 - 0%)) translateY(-24.75px) scale(0.75)}33%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(calc(4% - 0%)) translateY(-24.75px) scale(0.75)}66%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(calc(-4% - 0%)) translateY(-24.75px) scale(0.75)}100%{transform:translateX(calc(0 - 0%)) translateY(-24.75px) scale(0.75)}}.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-text-field-outlined-leading-icon 250ms 1}@keyframes mdc-floating-label-shake-float-above-text-field-outlined-leading-icon{0%{transform:translateX(calc(0 - 32px)) translateY(-34.75px) scale(0.75)}33%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(calc(4% - 32px)) translateY(-34.75px) scale(0.75)}66%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(calc(-4% - 32px)) translateY(-34.75px) scale(0.75)}100%{transform:translateX(calc(0 - 32px)) translateY(-34.75px) scale(0.75)}}[dir=rtl] .mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label--shake,.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field--with-leading-icon.mdc-text-field--outlined[dir=rtl] .mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-text-field-outlined-leading-icon 250ms 1}@keyframes mdc-floating-label-shake-float-above-text-field-outlined-leading-icon-rtl{0%{transform:translateX(calc(0 - -32px)) translateY(-34.75px) scale(0.75)}33%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(calc(4% - -32px)) translateY(-34.75px) scale(0.75)}66%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(calc(-4% - -32px)) translateY(-34.75px) scale(0.75)}100%{transform:translateX(calc(0 - -32px)) translateY(-34.75px) scale(0.75)}}.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-floating-label{transition:transform 150ms cubic-bezier(0.4, 0, 0.2, 1),color 150ms cubic-bezier(0.4, 0, 0.2, 1)}.mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-standard 250ms 1}@keyframes mdc-floating-label-shake-float-above-standard{0%{transform:translateX(calc(0 - 0%)) translateY(-106%) scale(0.75)}33%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(calc(4% - 0%)) translateY(-106%) scale(0.75)}66%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(calc(-4% - 0%)) translateY(-106%) scale(0.75)}100%{transform:translateX(calc(0 - 0%)) translateY(-106%) scale(0.75)}}.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-line-ripple::after{transition:transform 180ms cubic-bezier(0.4, 0, 0.2, 1),opacity 180ms cubic-bezier(0.4, 0, 0.2, 1)}'],encapsulation:2,data:{animation:[Gi.transitionMessages]},changeDetection:0});class Vi{}Vi.\u0275fac=function(Hn){return new(Hn||Vi)},Vi.\u0275mod=o.oAB({type:Vi}),Vi.\u0275inj=o.cJS({imports:[B.BQ,T.ez,w.Q8,B.BQ]})},97392:(qe,I,p)=>{"use strict";p.d(I,{Hw:()=>Ve,Ps:()=>tt});var o=p(94650),e=p(3238),l=p(21281),D=p(36895),g=p(39646),E=p(62843),T=p(4128),n=p(50727),P=p(18505),w=p(54004),B=p(70262),Y=p(28746),V=p(13099),ue=p(95698),he=p(80529),ae=p(11481);let ve;function ge(Ne){return function ye(){if(void 0===ve&&(ve=null,typeof window<"u")){const Ne=window;void 0!==Ne.trustedTypes&&(ve=Ne.trustedTypes.createPolicy("angular#components",{createHTML:wt=>wt}))}return ve}()?.createHTML(Ne)||Ne}function ne(Ne){return Error(`Unable to find icon with the name "${Ne}"`)}function Pe(Ne){return Error(`The URL provided to MatIconRegistry was not trusted as a resource URL via Angular's DomSanitizer. Attempted URL was "${Ne}".`)}function xe(Ne){return Error(`The literal provided to MatIconRegistry was not trusted as safe HTML by Angular's DomSanitizer. Attempted literal was "${Ne}".`)}class de{constructor(wt,ft,Ct){this.url=wt,this.svgText=ft,this.options=Ct}}class re{constructor(wt,ft,Ct,rn){this._httpClient=wt,this._sanitizer=ft,this._errorHandler=rn,this._svgIconConfigs=new Map,this._iconSetConfigs=new Map,this._cachedIconsByUrl=new Map,this._inProgressUrlFetches=new Map,this._fontCssClassesByAlias=new Map,this._resolvers=[],this._defaultFontSetClass=["material-icons","mat-ligature-font"],this._document=Ct}addSvgIcon(wt,ft,Ct){return this.addSvgIconInNamespace("",wt,ft,Ct)}addSvgIconLiteral(wt,ft,Ct){return this.addSvgIconLiteralInNamespace("",wt,ft,Ct)}addSvgIconInNamespace(wt,ft,Ct,rn){return this._addSvgIconConfig(wt,ft,new de(Ct,null,rn))}addSvgIconResolver(wt){return this._resolvers.push(wt),this}addSvgIconLiteralInNamespace(wt,ft,Ct,rn){const He=this._sanitizer.sanitize(o.q3G.HTML,Ct);if(!He)throw xe(Ct);const st=ge(He);return this._addSvgIconConfig(wt,ft,new de("",st,rn))}addSvgIconSet(wt,ft){return this.addSvgIconSetInNamespace("",wt,ft)}addSvgIconSetLiteral(wt,ft){return this.addSvgIconSetLiteralInNamespace("",wt,ft)}addSvgIconSetInNamespace(wt,ft,Ct){return this._addSvgIconSetConfig(wt,new de(ft,null,Ct))}addSvgIconSetLiteralInNamespace(wt,ft,Ct){const rn=this._sanitizer.sanitize(o.q3G.HTML,ft);if(!rn)throw xe(ft);const He=ge(rn);return this._addSvgIconSetConfig(wt,new de("",He,Ct))}registerFontClassAlias(wt,ft=wt){return this._fontCssClassesByAlias.set(wt,ft),this}classNameForFontAlias(wt){return this._fontCssClassesByAlias.get(wt)||wt}setDefaultFontSetClass(...wt){return this._defaultFontSetClass=wt,this}getDefaultFontSetClass(){return this._defaultFontSetClass}getSvgIconFromUrl(wt){const ft=this._sanitizer.sanitize(o.q3G.RESOURCE_URL,wt);if(!ft)throw Pe(wt);const Ct=this._cachedIconsByUrl.get(ft);return Ct?(0,g.of)(be(Ct)):this._loadSvgIconFromConfig(new de(wt,null)).pipe((0,P.b)(rn=>this._cachedIconsByUrl.set(ft,rn)),(0,w.U)(rn=>be(rn)))}getNamedSvgIcon(wt,ft=""){const Ct=le(ft,wt);let rn=this._svgIconConfigs.get(Ct);if(rn)return this._getSvgFromConfig(rn);if(rn=this._getIconConfigFromResolvers(ft,wt),rn)return this._svgIconConfigs.set(Ct,rn),this._getSvgFromConfig(rn);const He=this._iconSetConfigs.get(ft);return He?this._getSvgFromIconSetConfigs(wt,He):(0,E._)(ne(Ct))}ngOnDestroy(){this._resolvers=[],this._svgIconConfigs.clear(),this._iconSetConfigs.clear(),this._cachedIconsByUrl.clear()}_getSvgFromConfig(wt){return wt.svgText?(0,g.of)(be(this._svgElementFromConfig(wt))):this._loadSvgIconFromConfig(wt).pipe((0,w.U)(ft=>be(ft)))}_getSvgFromIconSetConfigs(wt,ft){const Ct=this._extractIconWithNameFromAnySet(wt,ft);if(Ct)return(0,g.of)(Ct);const rn=ft.filter(He=>!He.svgText).map(He=>this._loadSvgIconSetFromConfig(He).pipe((0,B.K)(st=>{const Dn=`Loading icon set URL: ${this._sanitizer.sanitize(o.q3G.RESOURCE_URL,He.url)} failed: ${st.message}`;return this._errorHandler.handleError(new Error(Dn)),(0,g.of)(null)})));return(0,T.D)(rn).pipe((0,w.U)(()=>{const He=this._extractIconWithNameFromAnySet(wt,ft);if(!He)throw ne(wt);return He}))}_extractIconWithNameFromAnySet(wt,ft){for(let Ct=ft.length-1;Ct>=0;Ct--){const rn=ft[Ct];if(rn.svgText&&rn.svgText.toString().indexOf(wt)>-1){const He=this._svgElementFromConfig(rn),st=this._extractSvgIconFromSet(He,wt,rn.options);if(st)return st}}return null}_loadSvgIconFromConfig(wt){return this._fetchIcon(wt).pipe((0,P.b)(ft=>wt.svgText=ft),(0,w.U)(()=>this._svgElementFromConfig(wt)))}_loadSvgIconSetFromConfig(wt){return wt.svgText?(0,g.of)(null):this._fetchIcon(wt).pipe((0,P.b)(ft=>wt.svgText=ft))}_extractSvgIconFromSet(wt,ft,Ct){const rn=wt.querySelector(`[id="${ft}"]`);if(!rn)return null;const He=rn.cloneNode(!0);if(He.removeAttribute("id"),"svg"===He.nodeName.toLowerCase())return this._setSvgAttributes(He,Ct);if("symbol"===He.nodeName.toLowerCase())return this._setSvgAttributes(this._toSvgElement(He),Ct);const st=this._svgElementFromString(ge("<svg></svg>"));return st.appendChild(He),this._setSvgAttributes(st,Ct)}_svgElementFromString(wt){const ft=this._document.createElement("DIV");ft.innerHTML=wt;const Ct=ft.querySelector("svg");if(!Ct)throw Error("<svg> tag not found");return Ct}_toSvgElement(wt){const ft=this._svgElementFromString(ge("<svg></svg>")),Ct=wt.attributes;for(let rn=0;rn<Ct.length;rn++){const{name:He,value:st}=Ct[rn];"id"!==He&&ft.setAttribute(He,st)}for(let rn=0;rn<wt.childNodes.length;rn++)wt.childNodes[rn].nodeType===this._document.ELEMENT_NODE&&ft.appendChild(wt.childNodes[rn].cloneNode(!0));return ft}_setSvgAttributes(wt,ft){return wt.setAttribute("fit",""),wt.setAttribute("height","100%"),wt.setAttribute("width","100%"),wt.setAttribute("preserveAspectRatio","xMidYMid meet"),wt.setAttribute("focusable","false"),ft&&ft.viewBox&&wt.setAttribute("viewBox",ft.viewBox),wt}_fetchIcon(wt){const{url:ft,options:Ct}=wt,rn=Ct?.withCredentials??!1;if(!this._httpClient)throw function pe(){return Error("Could not find HttpClient provider for use with Angular Material icons. Please include the HttpClientModule from @angular/common/http in your app imports.")}();if(null==ft)throw Error(`Cannot fetch icon from URL "${ft}".`);const He=this._sanitizer.sanitize(o.q3G.RESOURCE_URL,ft);if(!He)throw Pe(ft);const st=this._inProgressUrlFetches.get(He);if(st)return st;const nn=this._httpClient.get(He,{responseType:"text",withCredentials:rn}).pipe((0,w.U)(Dn=>ge(Dn)),(0,Y.x)(()=>this._inProgressUrlFetches.delete(He)),(0,V.B)());return this._inProgressUrlFetches.set(He,nn),nn}_addSvgIconConfig(wt,ft,Ct){return this._svgIconConfigs.set(le(wt,ft),Ct),this}_addSvgIconSetConfig(wt,ft){const Ct=this._iconSetConfigs.get(wt);return Ct?Ct.push(ft):this._iconSetConfigs.set(wt,[ft]),this}_svgElementFromConfig(wt){if(!wt.svgElement){const ft=this._svgElementFromString(wt.svgText);this._setSvgAttributes(ft,wt.options),wt.svgElement=ft}return wt.svgElement}_getIconConfigFromResolvers(wt,ft){for(let Ct=0;Ct<this._resolvers.length;Ct++){const rn=this._resolvers[Ct](ft,wt);if(rn)return(Ne=rn).url&&Ne.options?new de(rn.url,null,rn.options):new de(rn,null)}var Ne}}re.\u0275fac=function(wt){return new(wt||re)(o.LFG(he.eN,8),o.LFG(ae.H7),o.LFG(D.K0,8),o.LFG(o.qLn))},re.\u0275prov=o.Yz7({token:re,factory:re.\u0275fac,providedIn:"root"});new o.FiY,new o.tp0,new o.FiY,he.eN,ae.H7,o.qLn,new o.FiY,D.K0;function be(Ne){return Ne.cloneNode(!0)}function le(Ne,wt){return Ne+":"+wt}const Oe=(0,e.pj)(class{constructor(Ne){this._elementRef=Ne}}),j=new o.OlP("MAT_ICON_DEFAULT_OPTIONS"),ke=new o.OlP("mat-icon-location",{providedIn:"root",factory:function Be(){const Ne=(0,o.f3M)(D.K0),wt=Ne?Ne.location:null;return{getPathname:()=>wt?wt.pathname+wt.search:""}}});const nt=["clip-path","color-profile","src","cursor","fill","filter","marker","marker-start","marker-mid","marker-end","mask","stroke"],mt=nt.map(Ne=>`[${Ne}]`).join(", "),ut=/^url\(['"]?#(.*?)['"]?\)$/;class Ve extends Oe{get inline(){return this._inline}set inline(wt){this._inline=(0,l.Ig)(wt)}get svgIcon(){return this._svgIcon}set svgIcon(wt){wt!==this._svgIcon&&(wt?this._updateSvgIcon(wt):this._svgIcon&&this._clearSvgElement(),this._svgIcon=wt)}get fontSet(){return this._fontSet}set fontSet(wt){const ft=this._cleanupFontValue(wt);ft!==this._fontSet&&(this._fontSet=ft,this._updateFontIconClasses())}get fontIcon(){return this._fontIcon}set fontIcon(wt){const ft=this._cleanupFontValue(wt);ft!==this._fontIcon&&(this._fontIcon=ft,this._updateFontIconClasses())}constructor(wt,ft,Ct,rn,He,st){super(wt),this._iconRegistry=ft,this._location=rn,this._errorHandler=He,this._inline=!1,this._previousFontSetClass=[],this._currentIconFetch=n.w0.EMPTY,st&&(st.color&&(this.color=this.defaultColor=st.color),st.fontSet&&(this.fontSet=st.fontSet)),Ct||wt.nativeElement.setAttribute("aria-hidden","true")}_splitIconName(wt){if(!wt)return["",""];const ft=wt.split(":");switch(ft.length){case 1:return["",ft[0]];case 2:return ft;default:throw Error(`Invalid icon name: "${wt}"`)}}ngOnInit(){this._updateFontIconClasses()}ngAfterViewChecked(){const wt=this._elementsWithExternalReferences;if(wt&&wt.size){const ft=this._location.getPathname();ft!==this._previousPath&&(this._previousPath=ft,this._prependPathToReferences(ft))}}ngOnDestroy(){this._currentIconFetch.unsubscribe(),this._elementsWithExternalReferences&&this._elementsWithExternalReferences.clear()}_usingFontIcon(){return!this.svgIcon}_setSvgElement(wt){this._clearSvgElement();const ft=this._location.getPathname();this._previousPath=ft,this._cacheChildrenWithExternalReferences(wt),this._prependPathToReferences(ft),this._elementRef.nativeElement.appendChild(wt)}_clearSvgElement(){const wt=this._elementRef.nativeElement;let ft=wt.childNodes.length;for(this._elementsWithExternalReferences&&this._elementsWithExternalReferences.clear();ft--;){const Ct=wt.childNodes[ft];(1!==Ct.nodeType||"svg"===Ct.nodeName.toLowerCase())&&Ct.remove()}}_updateFontIconClasses(){if(!this._usingFontIcon())return;const wt=this._elementRef.nativeElement,ft=(this.fontSet?this._iconRegistry.classNameForFontAlias(this.fontSet).split(/ +/):this._iconRegistry.getDefaultFontSetClass()).filter(Ct=>Ct.length>0);this._previousFontSetClass.forEach(Ct=>wt.classList.remove(Ct)),ft.forEach(Ct=>wt.classList.add(Ct)),this._previousFontSetClass=ft,this.fontIcon!==this._previousFontIconClass&&!ft.includes("mat-ligature-font")&&(this._previousFontIconClass&&wt.classList.remove(this._previousFontIconClass),this.fontIcon&&wt.classList.add(this.fontIcon),this._previousFontIconClass=this.fontIcon)}_cleanupFontValue(wt){return"string"==typeof wt?wt.trim().split(" ")[0]:wt}_prependPathToReferences(wt){const ft=this._elementsWithExternalReferences;ft&&ft.forEach((Ct,rn)=>{Ct.forEach(He=>{rn.setAttribute(He.name,`url('${wt}#${He.value}')`)})})}_cacheChildrenWithExternalReferences(wt){const ft=wt.querySelectorAll(mt),Ct=this._elementsWithExternalReferences=this._elementsWithExternalReferences||new Map;for(let rn=0;rn<ft.length;rn++)nt.forEach(He=>{const st=ft[rn],nn=st.getAttribute(He),Dn=nn?nn.match(ut):null;if(Dn){let Mn=Ct.get(st);Mn||(Mn=[],Ct.set(st,Mn)),Mn.push({name:He,value:Dn[1]})}})}_updateSvgIcon(wt){if(this._svgNamespace=null,this._svgName=null,this._currentIconFetch.unsubscribe(),wt){const[ft,Ct]=this._splitIconName(wt);ft&&(this._svgNamespace=ft),Ct&&(this._svgName=Ct),this._currentIconFetch=this._iconRegistry.getNamedSvgIcon(Ct,ft).pipe((0,ue.q)(1)).subscribe(rn=>this._setSvgElement(rn),rn=>{const He=`Error retrieving icon ${ft}:${Ct}! ${rn.message}`;this._errorHandler.handleError(new Error(He))})}}}Ve.\u0275fac=function(wt){return new(wt||Ve)(o.Y36(o.SBq),o.Y36(re),o.$8M("aria-hidden"),o.Y36(ke),o.Y36(o.qLn),o.Y36(j,8))},Ve.\u0275cmp=o.Xpm({type:Ve,selectors:[["mat-icon"]],hostAttrs:["role","img",1,"mat-icon","notranslate"],hostVars:8,hostBindings:function(wt,ft){2&wt&&(o.uIk("data-mat-icon-type",ft._usingFontIcon()?"font":"svg")("data-mat-icon-name",ft._svgName||ft.fontIcon)("data-mat-icon-namespace",ft._svgNamespace||ft.fontSet)("fontIcon",ft._usingFontIcon()?ft.fontIcon:null),o.ekj("mat-icon-inline",ft.inline)("mat-icon-no-color","primary"!==ft.color&&"accent"!==ft.color&&"warn"!==ft.color))},inputs:{color:"color",inline:"inline",svgIcon:"svgIcon",fontSet:"fontSet",fontIcon:"fontIcon"},exportAs:["matIcon"],features:[o.qOj],ngContentSelectors:["*"],decls:1,vars:0,template:function(wt,ft){1&wt&&(o.F$t(),o.Hsn(0))},styles:[".mat-icon{-webkit-user-select:none;user-select:none;background-repeat:no-repeat;display:inline-block;fill:currentColor;height:24px;width:24px;overflow:hidden}.mat-icon.mat-icon-inline{font-size:inherit;height:inherit;line-height:inherit;width:inherit}.mat-icon.mat-ligature-font[fontIcon]::before{content:attr(fontIcon)}[dir=rtl] .mat-icon-rtl-mirror{transform:scale(-1, 1)}.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-prefix .mat-icon,.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-suffix .mat-icon{display:block}.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-prefix .mat-icon-button .mat-icon,.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-suffix .mat-icon-button .mat-icon{margin:auto}"],encapsulation:2,changeDetection:0});class tt{}tt.\u0275fac=function(wt){return new(wt||tt)},tt.\u0275mod=o.oAB({type:tt}),tt.\u0275inj=o.cJS({imports:[e.BQ,e.BQ]})},44144:(qe,I,p)=>{"use strict";p.d(I,{Jk:()=>ye,Nt:()=>Pe,c:()=>xe});var o=p(21281),e=p(83353),l=p(94650),D=p(60515),g=p(77579),E=p(54968),T=p(23601),n=p(82722),P=p(36895);const w=(0,e.i$)({passive:!0});class B{constructor(re,oe){this._platform=re,this._ngZone=oe,this._monitoredElements=new Map}monitor(re){if(!this._platform.isBrowser)return D.E;const oe=(0,o.fI)(re),me=this._monitoredElements.get(oe);if(me)return me.subject;const be=new g.x,le="cdk-text-field-autofilled",Z=Oe=>{"cdk-text-field-autofill-start"!==Oe.animationName||oe.classList.contains(le)?"cdk-text-field-autofill-end"===Oe.animationName&&oe.classList.contains(le)&&(oe.classList.remove(le),this._ngZone.run(()=>be.next({target:Oe.target,isAutofilled:!1}))):(oe.classList.add(le),this._ngZone.run(()=>be.next({target:Oe.target,isAutofilled:!0})))};return this._ngZone.runOutsideAngular(()=>{oe.addEventListener("animationstart",Z,w),oe.classList.add("cdk-text-field-autofill-monitored")}),this._monitoredElements.set(oe,{subject:be,unlisten:()=>{oe.removeEventListener("animationstart",Z,w)}}),be}stopMonitoring(re){const oe=(0,o.fI)(re),me=this._monitoredElements.get(oe);me&&(me.unlisten(),me.subject.complete(),oe.classList.remove("cdk-text-field-autofill-monitored"),oe.classList.remove("cdk-text-field-autofilled"),this._monitoredElements.delete(oe))}ngOnDestroy(){this._monitoredElements.forEach((re,oe)=>this.stopMonitoring(oe))}}B.\u0275fac=function(re){return new(re||B)(l.LFG(e.t4),l.LFG(l.R0b))},B.\u0275prov=l.Yz7({token:B,factory:B.\u0275fac,providedIn:"root"});class Y{constructor(re,oe){this._elementRef=re,this._autofillMonitor=oe,this.cdkAutofill=new l.vpe}ngOnInit(){this._autofillMonitor.monitor(this._elementRef).subscribe(re=>this.cdkAutofill.emit(re))}ngOnDestroy(){this._autofillMonitor.stopMonitoring(this._elementRef)}}Y.\u0275fac=function(re){return new(re||Y)(l.Y36(l.SBq),l.Y36(B))},Y.\u0275dir=l.lG2({type:Y,selectors:[["","cdkAutofill",""]],outputs:{cdkAutofill:"cdkAutofill"}});class V{get minRows(){return this._minRows}set minRows(re){this._minRows=(0,o.su)(re),this._setMinHeight()}get maxRows(){return this._maxRows}set maxRows(re){this._maxRows=(0,o.su)(re),this._setMaxHeight()}get enabled(){return this._enabled}set enabled(re){re=(0,o.Ig)(re),this._enabled!==re&&((this._enabled=re)?this.resizeToFitContent(!0):this.reset())}get placeholder(){return this._textareaElement.placeholder}set placeholder(re){this._cachedPlaceholderHeight=void 0,re?this._textareaElement.setAttribute("placeholder",re):this._textareaElement.removeAttribute("placeholder"),this._cacheTextareaPlaceholderHeight()}constructor(re,oe,me,be){this._elementRef=re,this._platform=oe,this._ngZone=me,this._destroyed=new g.x,this._enabled=!0,this._previousMinRows=-1,this._isViewInited=!1,this._handleFocusEvent=le=>{this._hasFocus="focus"===le.type},this._document=be,this._textareaElement=this._elementRef.nativeElement}_setMinHeight(){const re=this.minRows&&this._cachedLineHeight?this.minRows*this._cachedLineHeight+"px":null;re&&(this._textareaElement.style.minHeight=re)}_setMaxHeight(){const re=this.maxRows&&this._cachedLineHeight?this.maxRows*this._cachedLineHeight+"px":null;re&&(this._textareaElement.style.maxHeight=re)}ngAfterViewInit(){this._platform.isBrowser&&(this._initialHeight=this._textareaElement.style.height,this.resizeToFitContent(),this._ngZone.runOutsideAngular(()=>{const re=this._getWindow();(0,E.R)(re,"resize").pipe((0,T.e)(16),(0,n.R)(this._destroyed)).subscribe(()=>this.resizeToFitContent(!0)),this._textareaElement.addEventListener("focus",this._handleFocusEvent),this._textareaElement.addEventListener("blur",this._handleFocusEvent)}),this._isViewInited=!0,this.resizeToFitContent(!0))}ngOnDestroy(){this._textareaElement.removeEventListener("focus",this._handleFocusEvent),this._textareaElement.removeEventListener("blur",this._handleFocusEvent),this._destroyed.next(),this._destroyed.complete()}_cacheTextareaLineHeight(){if(this._cachedLineHeight)return;let re=this._textareaElement.cloneNode(!1);re.rows=1,re.style.position="absolute",re.style.visibility="hidden",re.style.border="none",re.style.padding="0",re.style.height="",re.style.minHeight="",re.style.maxHeight="",re.style.overflow="hidden",this._textareaElement.parentNode.appendChild(re),this._cachedLineHeight=re.clientHeight,re.remove(),this._setMinHeight(),this._setMaxHeight()}_measureScrollHeight(){const re=this._textareaElement,oe=re.style.marginBottom||"",me=this._platform.FIREFOX,be=me&&this._hasFocus,le=me?"cdk-textarea-autosize-measuring-firefox":"cdk-textarea-autosize-measuring";be&&(re.style.marginBottom=`${re.clientHeight}px`),re.classList.add(le);const Z=re.scrollHeight-4;return re.classList.remove(le),be&&(re.style.marginBottom=oe),Z}_cacheTextareaPlaceholderHeight(){if(!this._isViewInited||null!=this._cachedPlaceholderHeight)return;if(!this.placeholder)return void(this._cachedPlaceholderHeight=0);const re=this._textareaElement.value;this._textareaElement.value=this._textareaElement.placeholder,this._cachedPlaceholderHeight=this._measureScrollHeight(),this._textareaElement.value=re}ngDoCheck(){this._platform.isBrowser&&this.resizeToFitContent()}resizeToFitContent(re=!1){if(!this._enabled||(this._cacheTextareaLineHeight(),this._cacheTextareaPlaceholderHeight(),!this._cachedLineHeight))return;const oe=this._elementRef.nativeElement,me=oe.value;if(!re&&this._minRows===this._previousMinRows&&me===this._previousValue)return;const be=this._measureScrollHeight(),le=Math.max(be,this._cachedPlaceholderHeight||0);oe.style.height=`${le}px`,this._ngZone.runOutsideAngular(()=>{typeof requestAnimationFrame<"u"?requestAnimationFrame(()=>this._scrollToCaretPosition(oe)):setTimeout(()=>this._scrollToCaretPosition(oe))}),this._previousValue=me,this._previousMinRows=this._minRows}reset(){void 0!==this._initialHeight&&(this._textareaElement.style.height=this._initialHeight)}_noopInputHandler(){}_getDocument(){return this._document||document}_getWindow(){return this._getDocument().defaultView||window}_scrollToCaretPosition(re){const{selectionStart:oe,selectionEnd:me}=re;!this._destroyed.isStopped&&this._hasFocus&&re.setSelectionRange(oe,me)}}V.\u0275fac=function(re){return new(re||V)(l.Y36(l.SBq),l.Y36(e.t4),l.Y36(l.R0b),l.Y36(P.K0,8))},V.\u0275dir=l.lG2({type:V,selectors:[["textarea","cdkTextareaAutosize",""]],hostAttrs:["rows","1",1,"cdk-textarea-autosize"],hostBindings:function(re,oe){1&re&&l.NdJ("input",function(){return oe._noopInputHandler()})},inputs:{minRows:["cdkAutosizeMinRows","minRows"],maxRows:["cdkAutosizeMaxRows","maxRows"],enabled:["cdkTextareaAutosize","enabled"],placeholder:"placeholder"},exportAs:["cdkTextareaAutosize"]});class ue{}ue.\u0275fac=function(re){return new(re||ue)},ue.\u0275mod=l.oAB({type:ue}),ue.\u0275inj=l.cJS({});var he=p(24006),ae=p(3238),X=p(59549);const ye=new l.OlP("MAT_INPUT_VALUE_ACCESSOR"),ge=["button","checkbox","file","hidden","image","radio","range","reset","submit"];let ne=0;const pe=(0,ae.FD)(class{constructor(de,re,oe,me){this._defaultErrorStateMatcher=de,this._parentForm=re,this._parentFormGroup=oe,this.ngControl=me,this.stateChanges=new g.x}});class Pe extends pe{get disabled(){return this._disabled}set disabled(re){this._disabled=(0,o.Ig)(re),this.focused&&(this.focused=!1,this.stateChanges.next())}get id(){return this._id}set id(re){this._id=re||this._uid}get required(){return this._required??this.ngControl?.control?.hasValidator(he.kI.required)??!1}set required(re){this._required=(0,o.Ig)(re)}get type(){return this._type}set type(re){this._type=re||"text",this._validateType(),!this._isTextarea&&(0,e.qK)().has(this._type)&&(this._elementRef.nativeElement.type=this._type)}get value(){return this._inputValueAccessor.value}set value(re){re!==this.value&&(this._inputValueAccessor.value=re,this.stateChanges.next())}get readonly(){return this._readonly}set readonly(re){this._readonly=(0,o.Ig)(re)}constructor(re,oe,me,be,le,Z,Oe,j,ke,Be){super(Z,be,le,me),this._elementRef=re,this._platform=oe,this._autofillMonitor=j,this._formField=Be,this._uid="mat-input-"+ne++,this.focused=!1,this.stateChanges=new g.x,this.controlType="mat-input",this.autofilled=!1,this._disabled=!1,this._type="text",this._readonly=!1,this._neverEmptyInputTypes=["date","datetime","datetime-local","month","time","week"].filter(ut=>(0,e.qK)().has(ut)),this._iOSKeyupListener=ut=>{const Ve=ut.target;!Ve.value&&0===Ve.selectionStart&&0===Ve.selectionEnd&&(Ve.setSelectionRange(1,1),Ve.setSelectionRange(0,0))};const nt=this._elementRef.nativeElement,mt=nt.nodeName.toLowerCase();this._inputValueAccessor=Oe||nt,this._previousNativeValue=this.value,this.id=this.id,oe.IOS&&ke.runOutsideAngular(()=>{re.nativeElement.addEventListener("keyup",this._iOSKeyupListener)}),this._isServer=!this._platform.isBrowser,this._isNativeSelect="select"===mt,this._isTextarea="textarea"===mt,this._isInFormField=!!Be,this._isNativeSelect&&(this.controlType=nt.multiple?"mat-native-select-multiple":"mat-native-select")}ngAfterViewInit(){this._platform.isBrowser&&this._autofillMonitor.monitor(this._elementRef.nativeElement).subscribe(re=>{this.autofilled=re.isAutofilled,this.stateChanges.next()})}ngOnChanges(){this.stateChanges.next()}ngOnDestroy(){this.stateChanges.complete(),this._platform.isBrowser&&this._autofillMonitor.stopMonitoring(this._elementRef.nativeElement),this._platform.IOS&&this._elementRef.nativeElement.removeEventListener("keyup",this._iOSKeyupListener)}ngDoCheck(){this.ngControl&&(this.updateErrorState(),null!==this.ngControl.disabled&&this.ngControl.disabled!==this.disabled&&(this.disabled=this.ngControl.disabled,this.stateChanges.next())),this._dirtyCheckNativeValue(),this._dirtyCheckPlaceholder()}focus(re){this._elementRef.nativeElement.focus(re)}_focusChanged(re){re!==this.focused&&(this.focused=re,this.stateChanges.next())}_onInput(){}_dirtyCheckNativeValue(){const re=this._elementRef.nativeElement.value;this._previousNativeValue!==re&&(this._previousNativeValue=re,this.stateChanges.next())}_dirtyCheckPlaceholder(){const re=this._getPlaceholder();if(re!==this._previousPlaceholder){const oe=this._elementRef.nativeElement;this._previousPlaceholder=re,re?oe.setAttribute("placeholder",re):oe.removeAttribute("placeholder")}}_getPlaceholder(){return this.placeholder||null}_validateType(){ge.indexOf(this._type)}_isNeverEmpty(){return this._neverEmptyInputTypes.indexOf(this._type)>-1}_isBadInput(){let re=this._elementRef.nativeElement.validity;return re&&re.badInput}get empty(){return!(this._isNeverEmpty()||this._elementRef.nativeElement.value||this._isBadInput()||this.autofilled)}get shouldLabelFloat(){if(this._isNativeSelect){const re=this._elementRef.nativeElement,oe=re.options[0];return this.focused||re.multiple||!this.empty||!!(re.selectedIndex>-1&&oe&&oe.label)}return this.focused||!this.empty}setDescribedByIds(re){re.length?this._elementRef.nativeElement.setAttribute("aria-describedby",re.join(" ")):this._elementRef.nativeElement.removeAttribute("aria-describedby")}onContainerClick(){this.focused||this.focus()}_isInlineSelect(){const re=this._elementRef.nativeElement;return this._isNativeSelect&&(re.multiple||re.size>1)}}Pe.\u0275fac=function(re){return new(re||Pe)(l.Y36(l.SBq),l.Y36(e.t4),l.Y36(he.a5,10),l.Y36(he.F,8),l.Y36(he.sg,8),l.Y36(ae.rD),l.Y36(ye,10),l.Y36(B),l.Y36(l.R0b),l.Y36(X.G_,8))},Pe.\u0275dir=l.lG2({type:Pe,selectors:[["input","matInput",""],["textarea","matInput",""],["select","matNativeControl",""],["input","matNativeControl",""],["textarea","matNativeControl",""]],hostAttrs:[1,"mat-mdc-input-element"],hostVars:18,hostBindings:function(re,oe){1&re&&l.NdJ("focus",function(){return oe._focusChanged(!0)})("blur",function(){return oe._focusChanged(!1)})("input",function(){return oe._onInput()}),2&re&&(l.Ikx("id",oe.id)("disabled",oe.disabled)("required",oe.required),l.uIk("name",oe.name||null)("readonly",oe.readonly&&!oe._isNativeSelect||null)("aria-invalid",oe.empty&&oe.required?null:oe.errorState)("aria-required",oe.required)("id",oe.id),l.ekj("mat-input-server",oe._isServer)("mat-mdc-form-field-textarea-control",oe._isInFormField&&oe._isTextarea)("mat-mdc-form-field-input-control",oe._isInFormField)("mdc-text-field__input",oe._isInFormField)("mat-mdc-native-select-inline",oe._isInlineSelect()))},inputs:{disabled:"disabled",id:"id",placeholder:"placeholder",name:"name",required:"required",type:"type",errorStateMatcher:"errorStateMatcher",userAriaDescribedBy:["aria-describedby","userAriaDescribedBy"],value:"value",readonly:"readonly"},exportAs:["matInput"],features:[l._Bn([{provide:X.Eo,useExisting:Pe}]),l.qOj,l.TTD]});class xe{}xe.\u0275fac=function(re){return new(re||xe)},xe.\u0275mod=l.oAB({type:xe}),xe.\u0275inj=l.cJS({imports:[ae.BQ,X.lN,X.lN,ue,ae.BQ]})},28255:(qe,I,p)=>{"use strict";p.d(I,{OP:()=>Oe,Tx:()=>wi,VK:()=>He,p6:()=>mi});var o=p(94650),e=p(12693),l=p(21281),D=p(29521),g=p(77579),E=p(56451),T=p(50727),n=p(39646),P=p(53101),w=p(68675),B=p(63900),Y=p(95698),V=p(82722),ue=p(39300),he=p(91005),ae=p(3238),X=p(36895),ve=p(84080),ye=p(37340),ge=p(40445),ne=p(98184),pe=p(83353),Pe=p(67376);function de(Bn,kn){1&Bn&&(o.O4$(),o.TgZ(0,"svg",3),o._UZ(1,"polygon",4),o.qZA())}const re=[[["mat-icon"],["","matMenuItemIcon",""]],"*"];function me(Bn,kn){if(1&Bn){const On=o.EpF();o.TgZ(0,"div",0),o.NdJ("keydown",function(Bt){o.CHM(On);const xn=o.oxw();return o.KtG(xn._handleKeydown(Bt))})("click",function(){o.CHM(On);const Bt=o.oxw();return o.KtG(Bt.closed.emit("click"))})("@transformMenu.start",function(Bt){o.CHM(On);const xn=o.oxw();return o.KtG(xn._onAnimationStart(Bt))})("@transformMenu.done",function(Bt){o.CHM(On);const xn=o.oxw();return o.KtG(xn._onAnimationDone(Bt))}),o.TgZ(1,"div",1),o.Hsn(2),o.qZA()()}if(2&Bn){const On=o.oxw();o.Q6J("id",On.panelId)("ngClass",On._classList)("@transformMenu",On._panelAnimationState),o.uIk("aria-label",On.ariaLabel||null)("aria-labelledby",On.ariaLabelledby||null)("aria-describedby",On.ariaDescribedby||null)}}const le=new o.OlP("MAT_MENU_PANEL"),Z=(0,ae.Kr)((0,ae.Id)(class{}));class Oe extends Z{constructor(kn,On,je,Bt,xn){super(),this._elementRef=kn,this._document=On,this._focusMonitor=je,this._parentMenu=Bt,this._changeDetectorRef=xn,this.role="menuitem",this._hovered=new g.x,this._focused=new g.x,this._highlighted=!1,this._triggersSubmenu=!1,Bt?.addItem?.(this)}focus(kn,On){this._focusMonitor&&kn?this._focusMonitor.focusVia(this._getHostElement(),kn,On):this._getHostElement().focus(On),this._focused.next(this)}ngAfterViewInit(){this._focusMonitor&&this._focusMonitor.monitor(this._elementRef,!1)}ngOnDestroy(){this._focusMonitor&&this._focusMonitor.stopMonitoring(this._elementRef),this._parentMenu&&this._parentMenu.removeItem&&this._parentMenu.removeItem(this),this._hovered.complete(),this._focused.complete()}_getTabIndex(){return this.disabled?"-1":"0"}_getHostElement(){return this._elementRef.nativeElement}_checkDisabled(kn){this.disabled&&(kn.preventDefault(),kn.stopPropagation())}_handleMouseEnter(){this._hovered.next(this)}getLabel(){const kn=this._elementRef.nativeElement.cloneNode(!0),On=kn.querySelectorAll("mat-icon, .material-icons");for(let je=0;je<On.length;je++)On[je].remove();return kn.textContent?.trim()||""}_setHighlighted(kn){this._highlighted=kn,this._changeDetectorRef?.markForCheck()}_setTriggersSubmenu(kn){this._triggersSubmenu=kn,this._changeDetectorRef?.markForCheck()}_hasFocus(){return this._document&&this._document.activeElement===this._getHostElement()}}Oe.\u0275fac=function(kn){return new(kn||Oe)(o.Y36(o.SBq),o.Y36(X.K0),o.Y36(e.tE),o.Y36(le,8),o.Y36(o.sBO))},Oe.\u0275cmp=o.Xpm({type:Oe,selectors:[["","mat-menu-item",""]],hostAttrs:[1,"mat-mdc-menu-item","mat-mdc-focus-indicator","mdc-list-item"],hostVars:8,hostBindings:function(kn,On){1&kn&&o.NdJ("click",function(Bt){return On._checkDisabled(Bt)})("mouseenter",function(){return On._handleMouseEnter()}),2&kn&&(o.uIk("role",On.role)("tabindex",On._getTabIndex())("aria-disabled",On.disabled)("disabled",On.disabled||null),o.ekj("mat-mdc-menu-item-highlighted",On._highlighted)("mat-mdc-menu-item-submenu-trigger",On._triggersSubmenu))},inputs:{disabled:"disabled",disableRipple:"disableRipple",role:"role"},exportAs:["matMenuItem"],features:[o.qOj],attrs:["mat-menu-item",""],ngContentSelectors:["mat-icon, [matMenuItemIcon]","*"],decls:5,vars:3,consts:[[1,"mdc-list-item__primary-text"],["matRipple","",1,"mat-mdc-menu-ripple",3,"matRippleDisabled","matRippleTrigger"],["class","mat-mdc-menu-submenu-icon","viewBox","0 0 5 10","focusable","false",4,"ngIf"],["viewBox","0 0 5 10","focusable","false",1,"mat-mdc-menu-submenu-icon"],["points","0,0 5,5 0,10"]],template:function(kn,On){1&kn&&(o.F$t(re),o.Hsn(0),o.TgZ(1,"span",0),o.Hsn(2,1),o.qZA(),o._UZ(3,"div",1),o.YNc(4,de,2,0,"svg",2)),2&kn&&(o.xp6(3),o.Q6J("matRippleDisabled",On.disableRipple||On.disabled)("matRippleTrigger",On._getHostElement()),o.xp6(1),o.Q6J("ngIf",On._triggersSubmenu))},dependencies:[X.O5,ae.wG],encapsulation:2,changeDetection:0});const nt=new o.OlP("MatMenuContent");class mt{constructor(kn,On,je,Bt,xn,Fn,ui){this._template=kn,this._componentFactoryResolver=On,this._appRef=je,this._injector=Bt,this._viewContainerRef=xn,this._document=Fn,this._changeDetectorRef=ui,this._attached=new g.x}attach(kn={}){this._portal||(this._portal=new ve.UE(this._template,this._viewContainerRef)),this.detach(),this._outlet||(this._outlet=new ve.u0(this._document.createElement("div"),this._componentFactoryResolver,this._appRef,this._injector));const On=this._template.elementRef.nativeElement;On.parentNode.insertBefore(this._outlet.outletElement,On),this._changeDetectorRef?.markForCheck(),this._portal.attach(this._outlet,kn),this._attached.next()}detach(){this._portal.isAttached&&this._portal.detach()}ngOnDestroy(){this._outlet&&this._outlet.dispose()}}mt.\u0275fac=function(kn){return new(kn||mt)(o.Y36(o.Rgc),o.Y36(o._Vd),o.Y36(o.z2F),o.Y36(o.zs3),o.Y36(o.s_b),o.Y36(X.K0),o.Y36(o.sBO))},mt.\u0275dir=o.lG2({type:mt});class ut extends mt{}ut.\u0275fac=function(){let Bn;return function(On){return(Bn||(Bn=o.n5z(ut)))(On||ut)}}(),ut.\u0275dir=o.lG2({type:ut,selectors:[["ng-template","matMenuContent",""]],features:[o._Bn([{provide:nt,useExisting:ut}]),o.qOj]});const Ve={transformMenu:(0,ye.X$)("transformMenu",[(0,ye.SB)("void",(0,ye.oB)({opacity:0,transform:"scale(0.8)"})),(0,ye.eR)("void => enter",(0,ye.jt)("120ms cubic-bezier(0, 0, 0.2, 1)",(0,ye.oB)({opacity:1,transform:"scale(1)"}))),(0,ye.eR)("* => void",(0,ye.jt)("100ms 25ms linear",(0,ye.oB)({opacity:0})))]),fadeInItems:(0,ye.X$)("fadeInItems",[(0,ye.SB)("showing",(0,ye.oB)({opacity:1})),(0,ye.eR)("void => *",[(0,ye.oB)({opacity:0}),(0,ye.jt)("400ms 100ms cubic-bezier(0.55, 0, 0.55, 0.2)")])])};Ve.fadeInItems,Ve.transformMenu;let wt=0;const ft=new o.OlP("mat-menu-default-options",{providedIn:"root",factory:function Ct(){return{overlapTrigger:!1,xPosition:"after",yPosition:"below",backdropClass:"cdk-overlay-transparent-backdrop"}}});class rn{get xPosition(){return this._xPosition}set xPosition(kn){this._xPosition=kn,this.setPositionClasses()}get yPosition(){return this._yPosition}set yPosition(kn){this._yPosition=kn,this.setPositionClasses()}get overlapTrigger(){return this._overlapTrigger}set overlapTrigger(kn){this._overlapTrigger=(0,l.Ig)(kn)}get hasBackdrop(){return this._hasBackdrop}set hasBackdrop(kn){this._hasBackdrop=(0,l.Ig)(kn)}set panelClass(kn){const On=this._previousPanelClass;On&&On.length&&On.split(" ").forEach(je=>{this._classList[je]=!1}),this._previousPanelClass=kn,kn&&kn.length&&(kn.split(" ").forEach(je=>{this._classList[je]=!0}),this._elementRef.nativeElement.className="")}get classList(){return this.panelClass}set classList(kn){this.panelClass=kn}constructor(kn,On,je,Bt){this._elementRef=kn,this._ngZone=On,this._defaultOptions=je,this._changeDetectorRef=Bt,this._xPosition=this._defaultOptions.xPosition,this._yPosition=this._defaultOptions.yPosition,this._directDescendantItems=new o.n_E,this._classList={},this._panelAnimationState="void",this._animationDone=new g.x,this.overlayPanelClass=this._defaultOptions.overlayPanelClass||"",this.backdropClass=this._defaultOptions.backdropClass,this._overlapTrigger=this._defaultOptions.overlapTrigger,this._hasBackdrop=this._defaultOptions.hasBackdrop,this.closed=new o.vpe,this.close=this.closed,this.panelId="mat-menu-panel-"+wt++}ngOnInit(){this.setPositionClasses()}ngAfterContentInit(){this._updateDirectDescendants(),this._keyManager=new e.Em(this._directDescendantItems).withWrap().withTypeAhead().withHomeAndEnd(),this._keyManager.tabOut.subscribe(()=>this.closed.emit("tab")),this._directDescendantItems.changes.pipe((0,w.O)(this._directDescendantItems),(0,B.w)(kn=>(0,E.T)(...kn.map(On=>On._focused)))).subscribe(kn=>this._keyManager.updateActiveItem(kn)),this._directDescendantItems.changes.subscribe(kn=>{const On=this._keyManager;if("enter"===this._panelAnimationState&&On.activeItem?._hasFocus()){const je=kn.toArray(),Bt=Math.max(0,Math.min(je.length-1,On.activeItemIndex||0));je[Bt]&&!je[Bt].disabled?On.setActiveItem(Bt):On.setNextItemActive()}})}ngOnDestroy(){this._keyManager?.destroy(),this._directDescendantItems.destroy(),this.closed.complete(),this._firstItemFocusSubscription?.unsubscribe()}_hovered(){return this._directDescendantItems.changes.pipe((0,w.O)(this._directDescendantItems),(0,B.w)(On=>(0,E.T)(...On.map(je=>je._hovered))))}addItem(kn){}removeItem(kn){}_handleKeydown(kn){const On=kn.keyCode,je=this._keyManager;switch(On){case D.hY:(0,D.Vb)(kn)||(kn.preventDefault(),this.closed.emit("keydown"));break;case D.oh:this.parentMenu&&"ltr"===this.direction&&this.closed.emit("keydown");break;case D.SV:this.parentMenu&&"rtl"===this.direction&&this.closed.emit("keydown");break;default:return(On===D.LH||On===D.JH)&&je.setFocusOrigin("keyboard"),void je.onKeydown(kn)}kn.stopPropagation()}focusFirstItem(kn="program"){this._firstItemFocusSubscription?.unsubscribe(),this._firstItemFocusSubscription=this._ngZone.onStable.pipe((0,Y.q)(1)).subscribe(()=>{let On=null;if(this._directDescendantItems.length&&(On=this._directDescendantItems.first._getHostElement().closest('[role="menu"]')),!On||!On.contains(document.activeElement)){const je=this._keyManager;je.setFocusOrigin(kn).setFirstItemActive(),!je.activeItem&&On&&On.focus()}})}resetActiveItem(){this._keyManager.setActiveItem(-1)}setElevation(kn){const On=Math.min(this._baseElevation+kn,24),je=`${this._elevationPrefix}${On}`,Bt=Object.keys(this._classList).find(xn=>xn.startsWith(this._elevationPrefix));(!Bt||Bt===this._previousElevation)&&(this._previousElevation&&(this._classList[this._previousElevation]=!1),this._classList[je]=!0,this._previousElevation=je)}setPositionClasses(kn=this.xPosition,On=this.yPosition){const je=this._classList;je["mat-menu-before"]="before"===kn,je["mat-menu-after"]="after"===kn,je["mat-menu-above"]="above"===On,je["mat-menu-below"]="below"===On,this._changeDetectorRef?.markForCheck()}_startAnimation(){this._panelAnimationState="enter"}_resetAnimation(){this._panelAnimationState="void"}_onAnimationDone(kn){this._animationDone.next(kn),this._isAnimating=!1}_onAnimationStart(kn){this._isAnimating=!0,"enter"===kn.toState&&0===this._keyManager.activeItemIndex&&(kn.element.scrollTop=0)}_updateDirectDescendants(){this._allItems.changes.pipe((0,w.O)(this._allItems)).subscribe(kn=>{this._directDescendantItems.reset(kn.filter(On=>On._parentMenu===this)),this._directDescendantItems.notifyOnChanges()})}}rn.\u0275fac=function(kn){return new(kn||rn)(o.Y36(o.SBq),o.Y36(o.R0b),o.Y36(ft),o.Y36(o.sBO))},rn.\u0275dir=o.lG2({type:rn,contentQueries:function(kn,On,je){if(1&kn&&(o.Suo(je,nt,5),o.Suo(je,Oe,5),o.Suo(je,Oe,4)),2&kn){let Bt;o.iGM(Bt=o.CRH())&&(On.lazyContent=Bt.first),o.iGM(Bt=o.CRH())&&(On._allItems=Bt),o.iGM(Bt=o.CRH())&&(On.items=Bt)}},viewQuery:function(kn,On){if(1&kn&&o.Gf(o.Rgc,5),2&kn){let je;o.iGM(je=o.CRH())&&(On.templateRef=je.first)}},inputs:{backdropClass:"backdropClass",ariaLabel:["aria-label","ariaLabel"],ariaLabelledby:["aria-labelledby","ariaLabelledby"],ariaDescribedby:["aria-describedby","ariaDescribedby"],xPosition:"xPosition",yPosition:"yPosition",overlapTrigger:"overlapTrigger",hasBackdrop:"hasBackdrop",panelClass:["class","panelClass"],classList:"classList"},outputs:{closed:"closed",close:"close"}});class He extends rn{constructor(kn,On,je,Bt){super(kn,On,je,Bt),this._elevationPrefix="mat-elevation-z",this._baseElevation=8}}He.\u0275fac=function(kn){return new(kn||He)(o.Y36(o.SBq),o.Y36(o.R0b),o.Y36(ft),o.Y36(o.sBO))},He.\u0275cmp=o.Xpm({type:He,selectors:[["mat-menu"]],hostVars:3,hostBindings:function(kn,On){2&kn&&o.uIk("aria-label",null)("aria-labelledby",null)("aria-describedby",null)},exportAs:["matMenu"],features:[o._Bn([{provide:le,useExisting:He}]),o.qOj],ngContentSelectors:["*"],decls:1,vars:0,consts:[["tabindex","-1","role","menu",1,"mat-mdc-menu-panel","mdc-menu-surface","mdc-menu-surface--open","mat-mdc-elevation-specific",3,"id","ngClass","keydown","click"],[1,"mat-mdc-menu-content","mdc-list"]],template:function(kn,On){1&kn&&(o.F$t(),o.YNc(0,me,3,6,"ng-template"))},dependencies:[X.mk],styles:['.mdc-menu-surface{display:none;position:absolute;box-sizing:border-box;max-width:var(--mdc-menu-max-width, calc(100vw - 32px));max-height:var(--mdc-menu-max-height, calc(100vh - 32px));margin:0;padding:0;transform:scale(1);transform-origin:top left;opacity:0;overflow:auto;will-change:transform,opacity;z-index:8;border-radius:var(--mdc-shape-medium, 4px);transform-origin-left:top left;transform-origin-right:top right}.mdc-menu-surface:focus{outline:none}.mdc-menu-surface--animating-open{display:inline-block;transform:scale(0.8);opacity:0}.mdc-menu-surface--open{display:inline-block;transform:scale(1);opacity:1}.mdc-menu-surface--animating-closed{display:inline-block;opacity:0}[dir=rtl] .mdc-menu-surface,.mdc-menu-surface[dir=rtl]{transform-origin-left:top right;transform-origin-right:top left}.mdc-menu-surface--anchor{position:relative;overflow:visible}.mdc-menu-surface--fixed{position:fixed}.mdc-menu-surface--fullwidth{width:100%}mat-menu{display:none}.mat-mdc-menu-content{margin:0;padding:8px 0;list-style-type:none}.mat-mdc-menu-content:focus{outline:none}.mat-mdc-menu-panel.ng-animating{pointer-events:none}.cdk-high-contrast-active .mat-mdc-menu-panel{outline:solid 1px}.mat-mdc-menu-panel.mat-mdc-menu-panel{min-width:112px;max-width:280px;overflow:auto;-webkit-overflow-scrolling:touch;position:relative}.mat-mdc-menu-item{display:flex;position:relative;align-items:center;justify-content:flex-start;overflow:hidden;padding:0;padding-left:16px;padding-right:16px;-webkit-user-select:none;user-select:none;cursor:pointer;outline:none;border:none;-webkit-tap-highlight-color:rgba(0,0,0,0);cursor:pointer;width:100%;text-align:left;box-sizing:border-box;color:inherit;font-size:inherit;background:none;text-decoration:none;margin:0;min-height:48px}.mat-mdc-menu-item:focus{outline:none}[dir=rtl] .mat-mdc-menu-item,.mat-mdc-menu-item[dir=rtl]{padding-left:16px;padding-right:16px}.mat-mdc-menu-item::-moz-focus-inner{border:0}.mat-mdc-menu-item.mdc-list-item{align-items:center}.mat-mdc-menu-item[disabled]{cursor:default;opacity:.38}.mat-mdc-menu-item[disabled]::after{display:block;position:absolute;content:"";top:0;left:0;bottom:0;right:0}.mat-mdc-menu-item .mat-icon{margin-right:16px}[dir=rtl] .mat-mdc-menu-item{text-align:right}[dir=rtl] .mat-mdc-menu-item .mat-icon{margin-right:0;margin-left:16px}.mat-mdc-menu-item .mdc-list-item__primary-text{white-space:normal}.mat-mdc-menu-item.mat-mdc-menu-item-submenu-trigger{padding-right:32px}[dir=rtl] .mat-mdc-menu-item.mat-mdc-menu-item-submenu-trigger{padding-right:16px;padding-left:32px}.cdk-high-contrast-active .mat-mdc-menu-item{margin-top:1px}.mat-mdc-menu-submenu-icon{position:absolute;top:50%;right:16px;transform:translateY(-50%);width:5px;height:10px;fill:currentColor}[dir=rtl] .mat-mdc-menu-submenu-icon{right:auto;left:16px;transform:translateY(-50%) scaleX(-1)}.cdk-high-contrast-active .mat-mdc-menu-submenu-icon{fill:CanvasText}.mat-mdc-menu-item .mat-mdc-menu-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none}'],encapsulation:2,data:{animation:[Ve.transformMenu,Ve.fadeInItems]},changeDetection:0});const st=new o.OlP("mat-menu-scroll-strategy");const Dn={provide:st,deps:[ne.aV],useFactory:function nn(Bn){return()=>Bn.scrollStrategies.reposition()}},Mn=(0,pe.i$)({passive:!0});class Gi{get _deprecatedMatMenuTriggerFor(){return this.menu}set _deprecatedMatMenuTriggerFor(kn){this.menu=kn}get menu(){return this._menu}set menu(kn){kn!==this._menu&&(this._menu=kn,this._menuCloseSubscription.unsubscribe(),kn&&(this._parentMaterialMenu,this._menuCloseSubscription=kn.close.subscribe(On=>{this._destroyMenu(On),("click"===On||"tab"===On)&&this._parentMaterialMenu&&this._parentMaterialMenu.closed.emit(On)})),this._menuItemInstance?._setTriggersSubmenu(this.triggersSubmenu()))}constructor(kn,On,je,Bt,xn,Fn,ui,Ai,si){this._overlay=kn,this._element=On,this._viewContainerRef=je,this._menuItemInstance=Fn,this._dir=ui,this._focusMonitor=Ai,this._ngZone=si,this._overlayRef=null,this._menuOpen=!1,this._closingActionsSubscription=T.w0.EMPTY,this._hoverSubscription=T.w0.EMPTY,this._menuCloseSubscription=T.w0.EMPTY,this._changeDetectorRef=(0,o.f3M)(o.sBO),this._handleTouchStart=Vi=>{(0,e.yG)(Vi)||(this._openedBy="touch")},this._openedBy=void 0,this.restoreFocus=!0,this.menuOpened=new o.vpe,this.onMenuOpen=this.menuOpened,this.menuClosed=new o.vpe,this.onMenuClose=this.menuClosed,this._scrollStrategy=Bt,this._parentMaterialMenu=xn instanceof rn?xn:void 0,On.nativeElement.addEventListener("touchstart",this._handleTouchStart,Mn)}ngAfterContentInit(){this._handleHover()}ngOnDestroy(){this._overlayRef&&(this._overlayRef.dispose(),this._overlayRef=null),this._element.nativeElement.removeEventListener("touchstart",this._handleTouchStart,Mn),this._menuCloseSubscription.unsubscribe(),this._closingActionsSubscription.unsubscribe(),this._hoverSubscription.unsubscribe()}get menuOpen(){return this._menuOpen}get dir(){return this._dir&&"rtl"===this._dir.value?"rtl":"ltr"}triggersSubmenu(){return!!(this._menuItemInstance&&this._parentMaterialMenu&&this.menu)}toggleMenu(){return this._menuOpen?this.closeMenu():this.openMenu()}openMenu(){const kn=this.menu;if(this._menuOpen||!kn)return;const On=this._createOverlay(kn),je=On.getConfig(),Bt=je.positionStrategy;this._setPosition(kn,Bt),je.hasBackdrop=null==kn.hasBackdrop?!this.triggersSubmenu():kn.hasBackdrop,On.attach(this._getPortal(kn)),kn.lazyContent&&kn.lazyContent.attach(this.menuData),this._closingActionsSubscription=this._menuClosingActions().subscribe(()=>this.closeMenu()),this._initMenu(kn),kn instanceof rn&&(kn._startAnimation(),kn._directDescendantItems.changes.pipe((0,V.R)(kn.close)).subscribe(()=>{Bt.withLockedPosition(!1).reapplyLastPosition(),Bt.withLockedPosition(!0)}))}closeMenu(){this.menu?.close.emit()}focus(kn,On){this._focusMonitor&&kn?this._focusMonitor.focusVia(this._element,kn,On):this._element.nativeElement.focus(On)}updatePosition(){this._overlayRef?.updatePosition()}_destroyMenu(kn){if(!this._overlayRef||!this.menuOpen)return;const On=this.menu;this._closingActionsSubscription.unsubscribe(),this._overlayRef.detach(),this.restoreFocus&&("keydown"===kn||!this._openedBy||!this.triggersSubmenu())&&this.focus(this._openedBy),this._openedBy=void 0,On instanceof rn?(On._resetAnimation(),On.lazyContent?On._animationDone.pipe((0,ue.h)(je=>"void"===je.toState),(0,Y.q)(1),(0,V.R)(On.lazyContent._attached)).subscribe({next:()=>On.lazyContent.detach(),complete:()=>this._setIsMenuOpen(!1)}):this._setIsMenuOpen(!1)):(this._setIsMenuOpen(!1),On?.lazyContent?.detach())}_initMenu(kn){kn.parentMenu=this.triggersSubmenu()?this._parentMaterialMenu:void 0,kn.direction=this.dir,this._setMenuElevation(kn),kn.focusFirstItem(this._openedBy||"program"),this._setIsMenuOpen(!0)}_setMenuElevation(kn){if(kn.setElevation){let On=0,je=kn.parentMenu;for(;je;)On++,je=je.parentMenu;kn.setElevation(On)}}_setIsMenuOpen(kn){kn!==this._menuOpen&&(this._menuOpen=kn,this._menuOpen?this.menuOpened.emit():this.menuClosed.emit(),this.triggersSubmenu()&&this._menuItemInstance._setHighlighted(kn),this._changeDetectorRef.markForCheck())}_createOverlay(kn){if(!this._overlayRef){const On=this._getOverlayConfig(kn);this._subscribeToPositions(kn,On.positionStrategy),this._overlayRef=this._overlay.create(On),this._overlayRef.keydownEvents().subscribe()}return this._overlayRef}_getOverlayConfig(kn){return new ne.X_({positionStrategy:this._overlay.position().flexibleConnectedTo(this._element).withLockedPosition().withGrowAfterOpen().withTransformOriginOn(".mat-menu-panel, .mat-mdc-menu-panel"),backdropClass:kn.backdropClass||"cdk-overlay-transparent-backdrop",panelClass:kn.overlayPanelClass,scrollStrategy:this._scrollStrategy(),direction:this._dir})}_subscribeToPositions(kn,On){kn.setPositionClasses&&On.positionChanges.subscribe(je=>{const Bt="start"===je.connectionPair.overlayX?"after":"before",xn="top"===je.connectionPair.overlayY?"below":"above";this._ngZone?this._ngZone.run(()=>kn.setPositionClasses(Bt,xn)):kn.setPositionClasses(Bt,xn)})}_setPosition(kn,On){let[je,Bt]="before"===kn.xPosition?["end","start"]:["start","end"],[xn,Fn]="above"===kn.yPosition?["bottom","top"]:["top","bottom"],[ui,Ai]=[xn,Fn],[si,Vi]=[je,Bt],Vn=0;if(this.triggersSubmenu()){if(Vi=je="before"===kn.xPosition?"start":"end",Bt=si="end"===je?"start":"end",this._parentMaterialMenu){if(null==this._parentInnerPadding){const Hn=this._parentMaterialMenu.items.first;this._parentInnerPadding=Hn?Hn._getHostElement().offsetTop:0}Vn="bottom"===xn?this._parentInnerPadding:-this._parentInnerPadding}}else kn.overlapTrigger||(ui="top"===xn?"bottom":"top",Ai="top"===Fn?"bottom":"top");On.withPositions([{originX:je,originY:ui,overlayX:si,overlayY:xn,offsetY:Vn},{originX:Bt,originY:ui,overlayX:Vi,overlayY:xn,offsetY:Vn},{originX:je,originY:Ai,overlayX:si,overlayY:Fn,offsetY:-Vn},{originX:Bt,originY:Ai,overlayX:Vi,overlayY:Fn,offsetY:-Vn}])}_menuClosingActions(){const kn=this._overlayRef.backdropClick(),On=this._overlayRef.detachments(),je=this._parentMaterialMenu?this._parentMaterialMenu.closed:(0,n.of)(),Bt=this._parentMaterialMenu?this._parentMaterialMenu._hovered().pipe((0,ue.h)(xn=>xn!==this._menuItemInstance),(0,ue.h)(()=>this._menuOpen)):(0,n.of)();return(0,E.T)(kn,je,Bt,On)}_handleMousedown(kn){(0,e.X6)(kn)||(this._openedBy=0===kn.button?"mouse":void 0,this.triggersSubmenu()&&kn.preventDefault())}_handleKeydown(kn){const On=kn.keyCode;(On===D.K5||On===D.L_)&&(this._openedBy="keyboard"),this.triggersSubmenu()&&(On===D.SV&&"ltr"===this.dir||On===D.oh&&"rtl"===this.dir)&&(this._openedBy="keyboard",this.openMenu())}_handleClick(kn){this.triggersSubmenu()?(kn.stopPropagation(),this.openMenu()):this.toggleMenu()}_handleHover(){!this.triggersSubmenu()||!this._parentMaterialMenu||(this._hoverSubscription=this._parentMaterialMenu._hovered().pipe((0,ue.h)(kn=>kn===this._menuItemInstance&&!kn.disabled),(0,he.g)(0,P.E)).subscribe(()=>{this._openedBy="mouse",this.menu instanceof rn&&this.menu._isAnimating?this.menu._animationDone.pipe((0,Y.q)(1),(0,he.g)(0,P.E),(0,V.R)(this._parentMaterialMenu._hovered())).subscribe(()=>this.openMenu()):this.openMenu()}))}_getPortal(kn){return(!this._portal||this._portal.templateRef!==kn.templateRef)&&(this._portal=new ve.UE(kn.templateRef,this._viewContainerRef)),this._portal}}Gi.\u0275fac=function(kn){return new(kn||Gi)(o.Y36(ne.aV),o.Y36(o.SBq),o.Y36(o.s_b),o.Y36(st),o.Y36(le,8),o.Y36(Oe,10),o.Y36(ge.Is,8),o.Y36(e.tE),o.Y36(o.R0b))},Gi.\u0275dir=o.lG2({type:Gi,hostVars:3,hostBindings:function(kn,On){1&kn&&o.NdJ("click",function(Bt){return On._handleClick(Bt)})("mousedown",function(Bt){return On._handleMousedown(Bt)})("keydown",function(Bt){return On._handleKeydown(Bt)}),2&kn&&o.uIk("aria-haspopup",On.menu?"menu":null)("aria-expanded",On.menuOpen)("aria-controls",On.menuOpen?On.menu.panelId:null)},inputs:{_deprecatedMatMenuTriggerFor:["mat-menu-trigger-for","_deprecatedMatMenuTriggerFor"],menu:["matMenuTriggerFor","menu"],menuData:["matMenuTriggerData","menuData"],restoreFocus:["matMenuTriggerRestoreFocus","restoreFocus"]},outputs:{menuOpened:"menuOpened",onMenuOpen:"onMenuOpen",menuClosed:"menuClosed",onMenuClose:"onMenuClose"}});class mi extends Gi{}mi.\u0275fac=function(){let Bn;return function(On){return(Bn||(Bn=o.n5z(mi)))(On||mi)}}(),mi.\u0275dir=o.lG2({type:mi,selectors:[["","mat-menu-trigger-for",""],["","matMenuTriggerFor",""]],hostAttrs:[1,"mat-mdc-menu-trigger"],exportAs:["matMenuTrigger"],features:[o.qOj]});class wi{}wi.\u0275fac=function(kn){return new(kn||wi)},wi.\u0275mod=o.oAB({type:wi}),wi.\u0275inj=o.cJS({providers:[Dn],imports:[X.ez,ae.si,ae.BQ,ne.U8,Pe.ZD,ae.BQ]})},59798:(qe,I,p)=>{"use strict";p.d(I,{NW:()=>Vn,ye:()=>On,TU:()=>Hn});var o=p(36895),e=p(94650),l=p(77579),D=p(4859),g=p(98184),E=p(3238),T=p(59549),n=p(67376),P=p(12693),w=p(40445),B=p(21281),Y=p(95017),V=p(29521),ue=p(24006),he=p(49770),ae=p(56451),X=p(68675),ve=p(63900),ye=p(95698),ge=p(39300),ne=p(54004),pe=p(71884),Pe=p(82722),xe=p(37340);const de=["trigger"],re=["panel"];function oe(An,vn){if(1&An&&(e.TgZ(0,"span",10),e._uU(1),e.qZA()),2&An){const In=e.oxw();e.xp6(1),e.Oqu(In.placeholder)}}function me(An,vn){if(1&An&&(e.TgZ(0,"span",14),e._uU(1),e.qZA()),2&An){const In=e.oxw(2);e.xp6(1),e.Oqu(In.triggerValue)}}function be(An,vn){1&An&&e.Hsn(0,0,["*ngSwitchCase","true"])}function le(An,vn){if(1&An&&(e.TgZ(0,"span",11),e.YNc(1,me,2,1,"span",12),e.YNc(2,be,1,0,"ng-content",13),e.qZA()),2&An){const In=e.oxw();e.Q6J("ngSwitch",!!In.customTrigger),e.xp6(2),e.Q6J("ngSwitchCase",!0)}}function Z(An,vn){if(1&An){const In=e.EpF();e.O4$(),e.kcU(),e.TgZ(0,"div",15,16),e.NdJ("@transformPanel.done",function(gr){e.CHM(In);const Hi=e.oxw();return e.KtG(Hi._panelDoneAnimatingStream.next(gr.toState))})("keydown",function(gr){e.CHM(In);const Hi=e.oxw();return e.KtG(Hi._handleKeydown(gr))}),e.Hsn(2,1),e.qZA()}if(2&An){const In=e.oxw();e.Gre("mat-mdc-select-panel mdc-menu-surface mdc-menu-surface--open ",In._getPanelTheme(),""),e.Q6J("ngClass",In.panelClass)("@transformPanel","showing"),e.uIk("id",In.id+"-panel")("aria-multiselectable",In.multiple)("aria-label",In.ariaLabel||null)("aria-labelledby",In._getPanelAriaLabelledby())}}const Oe=[[["mat-select-trigger"]],"*"],ke={transformPanelWrap:(0,xe.X$)("transformPanelWrap",[(0,xe.eR)("* => void",(0,xe.IO)("@transformPanel",[(0,xe.pV)()],{optional:!0}))]),transformPanel:(0,xe.X$)("transformPanel",[(0,xe.SB)("void",(0,xe.oB)({opacity:0,transform:"scale(1, 0.8)"})),(0,xe.eR)("void => showing",(0,xe.jt)("120ms cubic-bezier(0, 0, 0.2, 1)",(0,xe.oB)({opacity:1,transform:"scale(1, 1)"}))),(0,xe.eR)("* => void",(0,xe.jt)("100ms linear",(0,xe.oB)({opacity:0})))])};let ut=0;const Ve=new e.OlP("mat-select-scroll-strategy");const Ne=new e.OlP("MAT_SELECT_CONFIG"),wt={provide:Ve,deps:[g.aV],useFactory:function tt(An){return()=>An.scrollStrategies.reposition()}},ft=new e.OlP("MatSelectTrigger");class Ct{constructor(vn,In){this.source=vn,this.value=In}}const rn=(0,E.Kr)((0,E.sb)((0,E.Id)((0,E.FD)(class{constructor(An,vn,In,Zi,gr){this._elementRef=An,this._defaultErrorStateMatcher=vn,this._parentForm=In,this._parentFormGroup=Zi,this.ngControl=gr,this.stateChanges=new l.x}}))));class He extends rn{get focused(){return this._focused||this._panelOpen}get placeholder(){return this._placeholder}set placeholder(vn){this._placeholder=vn,this.stateChanges.next()}get required(){return this._required??this.ngControl?.control?.hasValidator(ue.kI.required)??!1}set required(vn){this._required=(0,B.Ig)(vn),this.stateChanges.next()}get multiple(){return this._multiple}set multiple(vn){this._selectionModel,this._multiple=(0,B.Ig)(vn)}get disableOptionCentering(){return this._disableOptionCentering}set disableOptionCentering(vn){this._disableOptionCentering=(0,B.Ig)(vn)}get compareWith(){return this._compareWith}set compareWith(vn){this._compareWith=vn,this._selectionModel&&this._initializeSelection()}get value(){return this._value}set value(vn){this._assignValue(vn)&&this._onChange(vn)}get typeaheadDebounceInterval(){return this._typeaheadDebounceInterval}set typeaheadDebounceInterval(vn){this._typeaheadDebounceInterval=(0,B.su)(vn)}get id(){return this._id}set id(vn){this._id=vn||this._uid,this.stateChanges.next()}constructor(vn,In,Zi,gr,Hi,Gr,zr,Eo,mr,jn,ct,Yt,oi,Ni){super(Hi,gr,zr,Eo,jn),this._viewportRuler=vn,this._changeDetectorRef=In,this._ngZone=Zi,this._dir=Gr,this._parentFormField=mr,this._liveAnnouncer=oi,this._defaultOptions=Ni,this._panelOpen=!1,this._compareWith=(Nn,pr)=>Nn===pr,this._uid="mat-select-"+ut++,this._triggerAriaLabelledBy=null,this._destroy=new l.x,this._onChange=()=>{},this._onTouched=()=>{},this._valueId="mat-select-value-"+ut++,this._panelDoneAnimatingStream=new l.x,this._overlayPanelClass=this._defaultOptions?.overlayPanelClass||"",this._focused=!1,this.controlType="mat-select",this._multiple=!1,this._disableOptionCentering=this._defaultOptions?.disableOptionCentering??!1,this.ariaLabel="",this.optionSelectionChanges=(0,he.P)(()=>{const Nn=this.options;return Nn?Nn.changes.pipe((0,X.O)(Nn),(0,ve.w)(()=>(0,ae.T)(...Nn.map(pr=>pr.onSelectionChange)))):this._ngZone.onStable.pipe((0,ye.q)(1),(0,ve.w)(()=>this.optionSelectionChanges))}),this.openedChange=new e.vpe,this._openedStream=this.openedChange.pipe((0,ge.h)(Nn=>Nn),(0,ne.U)(()=>{})),this._closedStream=this.openedChange.pipe((0,ge.h)(Nn=>!Nn),(0,ne.U)(()=>{})),this.selectionChange=new e.vpe,this.valueChange=new e.vpe,this.ngControl&&(this.ngControl.valueAccessor=this),null!=Ni?.typeaheadDebounceInterval&&(this._typeaheadDebounceInterval=Ni.typeaheadDebounceInterval),this._scrollStrategyFactory=Yt,this._scrollStrategy=this._scrollStrategyFactory(),this.tabIndex=parseInt(ct)||0,this.id=this.id}ngOnInit(){this._selectionModel=new Y.Ov(this.multiple),this.stateChanges.next(),this._panelDoneAnimatingStream.pipe((0,pe.x)(),(0,Pe.R)(this._destroy)).subscribe(()=>this._panelDoneAnimating(this.panelOpen))}ngAfterContentInit(){this._initKeyManager(),this._selectionModel.changed.pipe((0,Pe.R)(this._destroy)).subscribe(vn=>{vn.added.forEach(In=>In.select()),vn.removed.forEach(In=>In.deselect())}),this.options.changes.pipe((0,X.O)(null),(0,Pe.R)(this._destroy)).subscribe(()=>{this._resetOptions(),this._initializeSelection()})}ngDoCheck(){const vn=this._getTriggerAriaLabelledby(),In=this.ngControl;if(vn!==this._triggerAriaLabelledBy){const Zi=this._elementRef.nativeElement;this._triggerAriaLabelledBy=vn,vn?Zi.setAttribute("aria-labelledby",vn):Zi.removeAttribute("aria-labelledby")}In&&(this._previousControl!==In.control&&(void 0!==this._previousControl&&null!==In.disabled&&In.disabled!==this.disabled&&(this.disabled=In.disabled),this._previousControl=In.control),this.updateErrorState())}ngOnChanges(vn){(vn.disabled||vn.userAriaDescribedBy)&&this.stateChanges.next(),vn.typeaheadDebounceInterval&&this._keyManager&&this._keyManager.withTypeAhead(this._typeaheadDebounceInterval)}ngOnDestroy(){this._keyManager?.destroy(),this._destroy.next(),this._destroy.complete(),this.stateChanges.complete()}toggle(){this.panelOpen?this.close():this.open()}open(){this._canOpen()&&(this._panelOpen=!0,this._keyManager.withHorizontalOrientation(null),this._highlightCorrectOption(),this._changeDetectorRef.markForCheck())}close(){this._panelOpen&&(this._panelOpen=!1,this._keyManager.withHorizontalOrientation(this._isRtl()?"rtl":"ltr"),this._changeDetectorRef.markForCheck(),this._onTouched())}writeValue(vn){this._assignValue(vn)}registerOnChange(vn){this._onChange=vn}registerOnTouched(vn){this._onTouched=vn}setDisabledState(vn){this.disabled=vn,this._changeDetectorRef.markForCheck(),this.stateChanges.next()}get panelOpen(){return this._panelOpen}get selected(){return this.multiple?this._selectionModel?.selected||[]:this._selectionModel?.selected[0]}get triggerValue(){if(this.empty)return"";if(this._multiple){const vn=this._selectionModel.selected.map(In=>In.viewValue);return this._isRtl()&&vn.reverse(),vn.join(", ")}return this._selectionModel.selected[0].viewValue}_isRtl(){return!!this._dir&&"rtl"===this._dir.value}_handleKeydown(vn){this.disabled||(this.panelOpen?this._handleOpenKeydown(vn):this._handleClosedKeydown(vn))}_handleClosedKeydown(vn){const In=vn.keyCode,Zi=In===V.JH||In===V.LH||In===V.oh||In===V.SV,gr=In===V.K5||In===V.L_,Hi=this._keyManager;if(!Hi.isTyping()&&gr&&!(0,V.Vb)(vn)||(this.multiple||vn.altKey)&&Zi)vn.preventDefault(),this.open();else if(!this.multiple){const Gr=this.selected;Hi.onKeydown(vn);const zr=this.selected;zr&&Gr!==zr&&this._liveAnnouncer.announce(zr.viewValue,1e4)}}_handleOpenKeydown(vn){const In=this._keyManager,Zi=vn.keyCode,gr=Zi===V.JH||Zi===V.LH,Hi=In.isTyping();if(gr&&vn.altKey)vn.preventDefault(),this.close();else if(Hi||Zi!==V.K5&&Zi!==V.L_||!In.activeItem||(0,V.Vb)(vn))if(!Hi&&this._multiple&&Zi===V.A&&vn.ctrlKey){vn.preventDefault();const Gr=this.options.some(zr=>!zr.disabled&&!zr.selected);this.options.forEach(zr=>{zr.disabled||(Gr?zr.select():zr.deselect())})}else{const Gr=In.activeItemIndex;In.onKeydown(vn),this._multiple&&gr&&vn.shiftKey&&In.activeItem&&In.activeItemIndex!==Gr&&In.activeItem._selectViaInteraction()}else vn.preventDefault(),In.activeItem._selectViaInteraction()}_onFocus(){this.disabled||(this._focused=!0,this.stateChanges.next())}_onBlur(){this._focused=!1,this._keyManager?.cancelTypeahead(),!this.disabled&&!this.panelOpen&&(this._onTouched(),this._changeDetectorRef.markForCheck(),this.stateChanges.next())}_onAttached(){this._overlayDir.positionChange.pipe((0,ye.q)(1)).subscribe(()=>{this._changeDetectorRef.detectChanges(),this._positioningSettled()})}_getPanelTheme(){return this._parentFormField?`mat-${this._parentFormField.color}`:""}get empty(){return!this._selectionModel||this._selectionModel.isEmpty()}_initializeSelection(){Promise.resolve().then(()=>{this.ngControl&&(this._value=this.ngControl.value),this._setSelectionByValue(this._value),this.stateChanges.next()})}_setSelectionByValue(vn){if(this.options.forEach(In=>In.setInactiveStyles()),this._selectionModel.clear(),this.multiple&&vn)Array.isArray(vn),vn.forEach(In=>this._selectOptionByValue(In)),this._sortValues();else{const In=this._selectOptionByValue(vn);In?this._keyManager.updateActiveItem(In):this.panelOpen||this._keyManager.updateActiveItem(-1)}this._changeDetectorRef.markForCheck()}_selectOptionByValue(vn){const In=this.options.find(Zi=>{if(this._selectionModel.isSelected(Zi))return!1;try{return null!=Zi.value&&this._compareWith(Zi.value,vn)}catch{return!1}});return In&&this._selectionModel.select(In),In}_assignValue(vn){return!!(vn!==this._value||this._multiple&&Array.isArray(vn))&&(this.options&&this._setSelectionByValue(vn),this._value=vn,!0)}_initKeyManager(){this._keyManager=new P.s1(this.options).withTypeAhead(this._typeaheadDebounceInterval).withVerticalOrientation().withHorizontalOrientation(this._isRtl()?"rtl":"ltr").withHomeAndEnd().withPageUpDown().withAllowedModifierKeys(["shiftKey"]),this._keyManager.tabOut.subscribe(()=>{this.panelOpen&&(!this.multiple&&this._keyManager.activeItem&&this._keyManager.activeItem._selectViaInteraction(),this.focus(),this.close())}),this._keyManager.change.subscribe(()=>{this._panelOpen&&this.panel?this._scrollOptionIntoView(this._keyManager.activeItemIndex||0):!this._panelOpen&&!this.multiple&&this._keyManager.activeItem&&this._keyManager.activeItem._selectViaInteraction()})}_resetOptions(){const vn=(0,ae.T)(this.options.changes,this._destroy);this.optionSelectionChanges.pipe((0,Pe.R)(vn)).subscribe(In=>{this._onSelect(In.source,In.isUserInput),In.isUserInput&&!this.multiple&&this._panelOpen&&(this.close(),this.focus())}),(0,ae.T)(...this.options.map(In=>In._stateChanges)).pipe((0,Pe.R)(vn)).subscribe(()=>{this._changeDetectorRef.detectChanges(),this.stateChanges.next()})}_onSelect(vn,In){const Zi=this._selectionModel.isSelected(vn);null!=vn.value||this._multiple?(Zi!==vn.selected&&(vn.selected?this._selectionModel.select(vn):this._selectionModel.deselect(vn)),In&&this._keyManager.setActiveItem(vn),this.multiple&&(this._sortValues(),In&&this.focus())):(vn.deselect(),this._selectionModel.clear(),null!=this.value&&this._propagateChanges(vn.value)),Zi!==this._selectionModel.isSelected(vn)&&this._propagateChanges(),this.stateChanges.next()}_sortValues(){if(this.multiple){const vn=this.options.toArray();this._selectionModel.sort((In,Zi)=>this.sortComparator?this.sortComparator(In,Zi,vn):vn.indexOf(In)-vn.indexOf(Zi)),this.stateChanges.next()}}_propagateChanges(vn){let In=null;In=this.multiple?this.selected.map(Zi=>Zi.value):this.selected?this.selected.value:vn,this._value=In,this.valueChange.emit(In),this._onChange(In),this.selectionChange.emit(this._getChangeEvent(In)),this._changeDetectorRef.markForCheck()}_highlightCorrectOption(){this._keyManager&&(this.empty?this._keyManager.setFirstItemActive():this._keyManager.setActiveItem(this._selectionModel.selected[0]))}_canOpen(){return!this._panelOpen&&!this.disabled&&this.options?.length>0}focus(vn){this._elementRef.nativeElement.focus(vn)}_getPanelAriaLabelledby(){if(this.ariaLabel)return null;const vn=this._parentFormField?.getLabelId(),In=vn?vn+" ":"";return this.ariaLabelledby?In+this.ariaLabelledby:vn}_getAriaActiveDescendant(){return this.panelOpen&&this._keyManager&&this._keyManager.activeItem?this._keyManager.activeItem.id:null}_getTriggerAriaLabelledby(){if(this.ariaLabel)return null;const vn=this._parentFormField?.getLabelId();let In=(vn?vn+" ":"")+this._valueId;return this.ariaLabelledby&&(In+=" "+this.ariaLabelledby),In}_panelDoneAnimating(vn){this.openedChange.emit(vn)}setDescribedByIds(vn){vn.length?this._elementRef.nativeElement.setAttribute("aria-describedby",vn.join(" ")):this._elementRef.nativeElement.removeAttribute("aria-describedby")}onContainerClick(){this.focus(),this.open()}get shouldLabelFloat(){return this._panelOpen||!this.empty||this._focused&&!!this._placeholder}}He.\u0275fac=function(vn){return new(vn||He)(e.Y36(n.rL),e.Y36(e.sBO),e.Y36(e.R0b),e.Y36(E.rD),e.Y36(e.SBq),e.Y36(w.Is,8),e.Y36(ue.F,8),e.Y36(ue.sg,8),e.Y36(T.G_,8),e.Y36(ue.a5,10),e.$8M("tabindex"),e.Y36(Ve),e.Y36(P.Kd),e.Y36(Ne,8))},He.\u0275dir=e.lG2({type:He,viewQuery:function(vn,In){if(1&vn&&(e.Gf(de,5),e.Gf(re,5),e.Gf(g.pI,5)),2&vn){let Zi;e.iGM(Zi=e.CRH())&&(In.trigger=Zi.first),e.iGM(Zi=e.CRH())&&(In.panel=Zi.first),e.iGM(Zi=e.CRH())&&(In._overlayDir=Zi.first)}},inputs:{userAriaDescribedBy:["aria-describedby","userAriaDescribedBy"],panelClass:"panelClass",placeholder:"placeholder",required:"required",multiple:"multiple",disableOptionCentering:"disableOptionCentering",compareWith:"compareWith",value:"value",ariaLabel:["aria-label","ariaLabel"],ariaLabelledby:["aria-labelledby","ariaLabelledby"],errorStateMatcher:"errorStateMatcher",typeaheadDebounceInterval:"typeaheadDebounceInterval",sortComparator:"sortComparator",id:"id"},outputs:{openedChange:"openedChange",_openedStream:"opened",_closedStream:"closed",selectionChange:"selectionChange",valueChange:"valueChange"},features:[e.qOj,e.TTD]});class st{}st.\u0275fac=function(vn){return new(vn||st)},st.\u0275dir=e.lG2({type:st,selectors:[["mat-select-trigger"]],features:[e._Bn([{provide:ft,useExisting:st}])]});class nn extends He{constructor(){super(...arguments),this._positions=[{originX:"start",originY:"bottom",overlayX:"start",overlayY:"top"},{originX:"start",originY:"top",overlayX:"start",overlayY:"bottom",panelClass:"mat-mdc-select-panel-above"}],this._hideSingleSelectionIndicator=this._defaultOptions?.hideSingleSelectionIndicator??!1}get shouldLabelFloat(){return this.panelOpen||!this.empty||this.focused&&!!this.placeholder}ngOnInit(){super.ngOnInit(),this._viewportRuler.change().pipe((0,Pe.R)(this._destroy)).subscribe(()=>{this.panelOpen&&(this._overlayWidth=this._getOverlayWidth(),this._changeDetectorRef.detectChanges())})}ngAfterViewInit(){this._parentFormField&&(this._preferredOverlayOrigin=this._parentFormField.getConnectedOverlayOrigin())}open(){this._overlayWidth=this._getOverlayWidth(),super.open(),this.stateChanges.next()}close(){super.close(),this.stateChanges.next()}_scrollOptionIntoView(vn){const In=this.options.toArray()[vn];if(In){const Zi=this.panel.nativeElement,gr=(0,E.CB)(vn,this.options,this.optionGroups),Hi=In._getHostElement();Zi.scrollTop=0===vn&&1===gr?0:(0,E.jH)(Hi.offsetTop,Hi.offsetHeight,Zi.scrollTop,Zi.offsetHeight)}}_positioningSettled(){this._scrollOptionIntoView(this._keyManager.activeItemIndex||0)}_getChangeEvent(vn){return new Ct(this,vn)}_getOverlayWidth(){return(this._preferredOverlayOrigin instanceof g.xu?this._preferredOverlayOrigin.elementRef:this._preferredOverlayOrigin||this._elementRef).nativeElement.getBoundingClientRect().width}get hideSingleSelectionIndicator(){return this._hideSingleSelectionIndicator}set hideSingleSelectionIndicator(vn){this._hideSingleSelectionIndicator=(0,B.Ig)(vn),this._syncParentProperties()}_syncParentProperties(){if(this.options)for(const vn of this.options)vn._changeDetectorRef.markForCheck()}}nn.\u0275fac=function(){let An;return function(In){return(An||(An=e.n5z(nn)))(In||nn)}}(),nn.\u0275cmp=e.Xpm({type:nn,selectors:[["mat-select"]],contentQueries:function(vn,In,Zi){if(1&vn&&(e.Suo(Zi,ft,5),e.Suo(Zi,E.ey,5),e.Suo(Zi,E.K7,5)),2&vn){let gr;e.iGM(gr=e.CRH())&&(In.customTrigger=gr.first),e.iGM(gr=e.CRH())&&(In.options=gr),e.iGM(gr=e.CRH())&&(In.optionGroups=gr)}},hostAttrs:["role","combobox","aria-autocomplete","none","aria-haspopup","listbox",1,"mat-mdc-select"],hostVars:19,hostBindings:function(vn,In){1&vn&&e.NdJ("keydown",function(gr){return In._handleKeydown(gr)})("focus",function(){return In._onFocus()})("blur",function(){return In._onBlur()}),2&vn&&(e.uIk("id",In.id)("tabindex",In.tabIndex)("aria-controls",In.panelOpen?In.id+"-panel":null)("aria-expanded",In.panelOpen)("aria-label",In.ariaLabel||null)("aria-required",In.required.toString())("aria-disabled",In.disabled.toString())("aria-invalid",In.errorState)("aria-activedescendant",In._getAriaActiveDescendant()),e.ekj("mat-mdc-select-disabled",In.disabled)("mat-mdc-select-invalid",In.errorState)("mat-mdc-select-required",In.required)("mat-mdc-select-empty",In.empty)("mat-mdc-select-multiple",In.multiple))},inputs:{disabled:"disabled",disableRipple:"disableRipple",tabIndex:"tabIndex",hideSingleSelectionIndicator:"hideSingleSelectionIndicator"},exportAs:["matSelect"],features:[e._Bn([{provide:T.Eo,useExisting:nn},{provide:E.HF,useExisting:nn}]),e.qOj],ngContentSelectors:["mat-select-trigger","*"],decls:11,vars:11,consts:[["cdk-overlay-origin","",1,"mat-mdc-select-trigger",3,"click"],["fallbackOverlayOrigin","cdkOverlayOrigin","trigger",""],[1,"mat-mdc-select-value",3,"ngSwitch"],["class","mat-mdc-select-placeholder mat-mdc-select-min-line",4,"ngSwitchCase"],["class","mat-mdc-select-value-text",3,"ngSwitch",4,"ngSwitchCase"],[1,"mat-mdc-select-arrow-wrapper"],[1,"mat-mdc-select-arrow"],["viewBox","0 0 24 24","width","24px","height","24px","focusable","false"],["d","M7 10l5 5 5-5z"],["cdk-connected-overlay","","cdkConnectedOverlayLockPosition","","cdkConnectedOverlayHasBackdrop","","cdkConnectedOverlayBackdropClass","cdk-overlay-transparent-backdrop",3,"cdkConnectedOverlayPanelClass","cdkConnectedOverlayScrollStrategy","cdkConnectedOverlayOrigin","cdkConnectedOverlayOpen","cdkConnectedOverlayPositions","cdkConnectedOverlayWidth","backdropClick","attach","detach"],[1,"mat-mdc-select-placeholder","mat-mdc-select-min-line"],[1,"mat-mdc-select-value-text",3,"ngSwitch"],["class","mat-mdc-select-min-line",4,"ngSwitchDefault"],[4,"ngSwitchCase"],[1,"mat-mdc-select-min-line"],["role","listbox","tabindex","-1",3,"ngClass","keydown"],["panel",""]],template:function(vn,In){if(1&vn&&(e.F$t(Oe),e.TgZ(0,"div",0,1),e.NdJ("click",function(){return In.toggle()}),e.TgZ(3,"div",2),e.YNc(4,oe,2,1,"span",3),e.YNc(5,le,3,2,"span",4),e.qZA(),e.TgZ(6,"div",5)(7,"div",6),e.O4$(),e.TgZ(8,"svg",7),e._UZ(9,"path",8),e.qZA()()()(),e.YNc(10,Z,3,9,"ng-template",9),e.NdJ("backdropClick",function(){return In.close()})("attach",function(){return In._onAttached()})("detach",function(){return In.close()})),2&vn){const Zi=e.MAs(1);e.uIk("aria-owns",In.panelOpen?In.id+"-panel":null),e.xp6(3),e.Q6J("ngSwitch",In.empty),e.uIk("id",In._valueId),e.xp6(1),e.Q6J("ngSwitchCase",!0),e.xp6(1),e.Q6J("ngSwitchCase",!1),e.xp6(5),e.Q6J("cdkConnectedOverlayPanelClass",In._overlayPanelClass)("cdkConnectedOverlayScrollStrategy",In._scrollStrategy)("cdkConnectedOverlayOrigin",In._preferredOverlayOrigin||Zi)("cdkConnectedOverlayOpen",In.panelOpen)("cdkConnectedOverlayPositions",In._positions)("cdkConnectedOverlayWidth",In._overlayWidth)}},dependencies:[o.mk,o.RF,o.n9,o.ED,g.pI,g.xu],styles:['.mdc-menu-surface{display:none;position:absolute;box-sizing:border-box;max-width:calc(100vw - 32px);max-width:var(--mdc-menu-max-width, calc(100vw - 32px));max-height:calc(100vh - 32px);max-height:var(--mdc-menu-max-height, calc(100vh - 32px));margin:0;padding:0;transform:scale(1);transform-origin:top left;opacity:0;overflow:auto;will-change:transform,opacity;z-index:8;border-radius:4px;border-radius:var(--mdc-shape-medium, 4px);transform-origin-left:top left;transform-origin-right:top right}.mdc-menu-surface:focus{outline:none}.mdc-menu-surface--animating-open{display:inline-block;transform:scale(0.8);opacity:0}.mdc-menu-surface--open{display:inline-block;transform:scale(1);opacity:1}.mdc-menu-surface--animating-closed{display:inline-block;opacity:0}[dir=rtl] .mdc-menu-surface,.mdc-menu-surface[dir=rtl]{transform-origin-left:top right;transform-origin-right:top left}.mdc-menu-surface--anchor{position:relative;overflow:visible}.mdc-menu-surface--fixed{position:fixed}.mdc-menu-surface--fullwidth{width:100%}.mat-mdc-select{display:inline-block;width:100%;outline:none}.mat-mdc-select-trigger{display:inline-flex;align-items:center;cursor:pointer;position:relative;box-sizing:border-box;width:100%}.mat-mdc-select-disabled .mat-mdc-select-trigger{-webkit-user-select:none;user-select:none;cursor:default}.mat-mdc-select-value{width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mat-mdc-select-value-text{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mat-mdc-select-arrow-wrapper{height:24px;flex-shrink:0;display:inline-flex;align-items:center}.mat-form-field-appearance-fill .mat-mdc-select-arrow-wrapper{transform:translateY(-8px)}.mat-form-field-appearance-fill .mdc-text-field--no-label .mat-mdc-select-arrow-wrapper{transform:none}.mat-mdc-select-arrow{width:10px;height:5px;position:relative}.mat-mdc-select-arrow svg{fill:currentColor;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%)}.cdk-high-contrast-active .mat-mdc-select-arrow svg{fill:CanvasText}.mat-mdc-select-disabled .cdk-high-contrast-active .mat-mdc-select-arrow svg{fill:GrayText}.mdc-menu-surface.mat-mdc-select-panel{width:100%;max-height:275px;position:static;outline:0;margin:0;padding:8px 0;list-style-type:none}.mdc-menu-surface.mat-mdc-select-panel:focus{outline:none}.cdk-high-contrast-active .mdc-menu-surface.mat-mdc-select-panel{outline:solid 1px}.cdk-overlay-pane:not(.mat-mdc-select-panel-above) .mdc-menu-surface.mat-mdc-select-panel{border-top-left-radius:0;border-top-right-radius:0;transform-origin:top center}.mat-mdc-select-panel-above .mdc-menu-surface.mat-mdc-select-panel{border-bottom-left-radius:0;border-bottom-right-radius:0;transform-origin:bottom center}.mat-mdc-select-placeholder{transition:color 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1)}._mat-animation-noopable .mat-mdc-select-placeholder{transition:none}.mat-form-field-hide-placeholder .mat-mdc-select-placeholder{color:rgba(0,0,0,0);-webkit-text-fill-color:rgba(0,0,0,0);transition:none;display:block}.mat-mdc-form-field-type-mat-select.mat-form-field-appearance-fill .mat-mdc-floating-label{max-width:calc(100% - 18px)}.mat-mdc-form-field-type-mat-select.mat-form-field-appearance-fill .mdc-floating-label--float-above{max-width:calc(100% / 0.75 - 24px)}.mat-mdc-form-field-type-mat-select.mat-form-field-appearance-outline .mdc-notched-outline__notch{max-width:calc(100% - 60px)}.mat-mdc-form-field-type-mat-select.mat-form-field-appearance-outline .mdc-text-field--label-floating .mdc-notched-outline__notch{max-width:calc(100% - 24px)}.mat-mdc-select-min-line:empty::before{content:" ";white-space:pre;width:1px;display:inline-block;visibility:hidden}'],encapsulation:2,data:{animation:[ke.transformPanel]},changeDetection:0});class Dn{}Dn.\u0275fac=function(vn){return new(vn||Dn)},Dn.\u0275mod=e.oAB({type:Dn}),Dn.\u0275inj=e.cJS({providers:[wt],imports:[o.ez,g.U8,E.Ng,E.BQ,n.ZD,T.lN,E.Ng,E.BQ]});var Mn=p(10266);function vi(An,vn){if(1&An&&(e.TgZ(0,"mat-option",19),e._uU(1),e.qZA()),2&An){const In=vn.$implicit;e.Q6J("value",In),e.xp6(1),e.hij(" ",In," ")}}function Gi(An,vn){if(1&An){const In=e.EpF();e.TgZ(0,"mat-form-field",16)(1,"mat-select",17),e.NdJ("selectionChange",function(gr){e.CHM(In);const Hi=e.oxw(2);return e.KtG(Hi._changePageSize(gr.value))}),e.YNc(2,vi,2,2,"mat-option",18),e.qZA()()}if(2&An){const In=e.oxw(2);e.Q6J("appearance",In._formFieldAppearance)("color",In.color),e.xp6(1),e.Q6J("value",In.pageSize)("disabled",In.disabled)("aria-labelledby",In._pageSizeLabelId)("panelClass",In.selectConfig.panelClass||"")("disableOptionCentering",In.selectConfig.disableOptionCentering),e.xp6(1),e.Q6J("ngForOf",In._displayedPageSizeOptions)}}function mi(An,vn){if(1&An&&(e.TgZ(0,"div",20),e._uU(1),e.qZA()),2&An){const In=e.oxw(2);e.xp6(1),e.Oqu(In.pageSize)}}function wi(An,vn){if(1&An&&(e.TgZ(0,"div",12)(1,"div",13),e._uU(2),e.qZA(),e.YNc(3,Gi,3,8,"mat-form-field",14),e.YNc(4,mi,2,1,"div",15),e.qZA()),2&An){const In=e.oxw();e.xp6(1),e.s9C("id",In._pageSizeLabelId),e.xp6(1),e.hij(" ",In._intl.itemsPerPageLabel," "),e.xp6(1),e.Q6J("ngIf",In._displayedPageSizeOptions.length>1),e.xp6(1),e.Q6J("ngIf",In._displayedPageSizeOptions.length<=1)}}function Bn(An,vn){if(1&An){const In=e.EpF();e.TgZ(0,"button",21),e.NdJ("click",function(){e.CHM(In);const gr=e.oxw();return e.KtG(gr.firstPage())}),e.O4$(),e.TgZ(1,"svg",7),e._UZ(2,"path",22),e.qZA()()}if(2&An){const In=e.oxw();e.Q6J("matTooltip",In._intl.firstPageLabel)("matTooltipDisabled",In._previousButtonsDisabled())("matTooltipPosition","above")("disabled",In._previousButtonsDisabled()),e.uIk("aria-label",In._intl.firstPageLabel)}}function kn(An,vn){if(1&An){const In=e.EpF();e.O4$(),e.kcU(),e.TgZ(0,"button",23),e.NdJ("click",function(){e.CHM(In);const gr=e.oxw();return e.KtG(gr.lastPage())}),e.O4$(),e.TgZ(1,"svg",7),e._UZ(2,"path",24),e.qZA()()}if(2&An){const In=e.oxw();e.Q6J("matTooltip",In._intl.lastPageLabel)("matTooltipDisabled",In._nextButtonsDisabled())("matTooltipPosition","above")("disabled",In._nextButtonsDisabled()),e.uIk("aria-label",In._intl.lastPageLabel)}}class On{constructor(){this.changes=new l.x,this.itemsPerPageLabel="Items per page:",this.nextPageLabel="Next page",this.previousPageLabel="Previous page",this.firstPageLabel="First page",this.lastPageLabel="Last page",this.getRangeLabel=(vn,In,Zi)=>{if(0==Zi||0==In)return`0 of ${Zi}`;const gr=vn*In;return`${gr+1} \u2013 ${gr<(Zi=Math.max(Zi,0))?Math.min(gr+In,Zi):gr+In} of ${Zi}`}}}On.\u0275fac=function(vn){return new(vn||On)},On.\u0275prov=e.Yz7({token:On,factory:On.\u0275fac,providedIn:"root"});const Bt={provide:On,deps:[[new e.FiY,new e.tp0,On]],useFactory:function je(An){return An||new On}};const ui=new e.OlP("MAT_PAGINATOR_DEFAULT_OPTIONS"),Ai=(0,E.Id)((0,E.dB)(class{}));class si extends Ai{get pageIndex(){return this._pageIndex}set pageIndex(vn){this._pageIndex=Math.max((0,B.su)(vn),0),this._changeDetectorRef.markForCheck()}get length(){return this._length}set length(vn){this._length=(0,B.su)(vn),this._changeDetectorRef.markForCheck()}get pageSize(){return this._pageSize}set pageSize(vn){this._pageSize=Math.max((0,B.su)(vn),0),this._updateDisplayedPageSizeOptions()}get pageSizeOptions(){return this._pageSizeOptions}set pageSizeOptions(vn){this._pageSizeOptions=(vn||[]).map(In=>(0,B.su)(In)),this._updateDisplayedPageSizeOptions()}get hidePageSize(){return this._hidePageSize}set hidePageSize(vn){this._hidePageSize=(0,B.Ig)(vn)}get showFirstLastButtons(){return this._showFirstLastButtons}set showFirstLastButtons(vn){this._showFirstLastButtons=(0,B.Ig)(vn)}constructor(vn,In,Zi){if(super(),this._intl=vn,this._changeDetectorRef=In,this._pageIndex=0,this._length=0,this._pageSizeOptions=[],this._hidePageSize=!1,this._showFirstLastButtons=!1,this.selectConfig={},this.page=new e.vpe,this._intlChanges=vn.changes.subscribe(()=>this._changeDetectorRef.markForCheck()),Zi){const{pageSize:gr,pageSizeOptions:Hi,hidePageSize:Gr,showFirstLastButtons:zr}=Zi;null!=gr&&(this._pageSize=gr),null!=Hi&&(this._pageSizeOptions=Hi),null!=Gr&&(this._hidePageSize=Gr),null!=zr&&(this._showFirstLastButtons=zr)}}ngOnInit(){this._initialized=!0,this._updateDisplayedPageSizeOptions(),this._markInitialized()}ngOnDestroy(){this._intlChanges.unsubscribe()}nextPage(){if(!this.hasNextPage())return;const vn=this.pageIndex;this.pageIndex=this.pageIndex+1,this._emitPageEvent(vn)}previousPage(){if(!this.hasPreviousPage())return;const vn=this.pageIndex;this.pageIndex=this.pageIndex-1,this._emitPageEvent(vn)}firstPage(){if(!this.hasPreviousPage())return;const vn=this.pageIndex;this.pageIndex=0,this._emitPageEvent(vn)}lastPage(){if(!this.hasNextPage())return;const vn=this.pageIndex;this.pageIndex=this.getNumberOfPages()-1,this._emitPageEvent(vn)}hasPreviousPage(){return this.pageIndex>=1&&0!=this.pageSize}hasNextPage(){const vn=this.getNumberOfPages()-1;return this.pageIndex<vn&&0!=this.pageSize}getNumberOfPages(){return this.pageSize?Math.ceil(this.length/this.pageSize):0}_changePageSize(vn){const In=this.pageIndex*this.pageSize,Zi=this.pageIndex;this.pageIndex=Math.floor(In/vn)||0,this.pageSize=vn,this._emitPageEvent(Zi)}_nextButtonsDisabled(){return this.disabled||!this.hasNextPage()}_previousButtonsDisabled(){return this.disabled||!this.hasPreviousPage()}_updateDisplayedPageSizeOptions(){this._initialized&&(this.pageSize||(this._pageSize=0!=this.pageSizeOptions.length?this.pageSizeOptions[0]:50),this._displayedPageSizeOptions=this.pageSizeOptions.slice(),-1===this._displayedPageSizeOptions.indexOf(this.pageSize)&&this._displayedPageSizeOptions.push(this.pageSize),this._displayedPageSizeOptions.sort((vn,In)=>vn-In),this._changeDetectorRef.markForCheck())}_emitPageEvent(vn){this.page.emit({previousPageIndex:vn,pageIndex:this.pageIndex,pageSize:this.pageSize,length:this.length})}}si.\u0275fac=function(vn){e.$Z()},si.\u0275dir=e.lG2({type:si,inputs:{color:"color",pageIndex:"pageIndex",length:"length",pageSize:"pageSize",pageSizeOptions:"pageSizeOptions",hidePageSize:"hidePageSize",showFirstLastButtons:"showFirstLastButtons",selectConfig:"selectConfig"},outputs:{page:"page"},features:[e.qOj]});let Vi=0;class Vn extends si{constructor(vn,In,Zi){super(vn,In,Zi),this._pageSizeLabelId="mat-paginator-page-size-label-"+Vi++,this._formFieldAppearance=Zi?.formFieldAppearance||"outline"}}Vn.\u0275fac=function(vn){return new(vn||Vn)(e.Y36(On),e.Y36(e.sBO),e.Y36(ui,8))},Vn.\u0275cmp=e.Xpm({type:Vn,selectors:[["mat-paginator"]],hostAttrs:["role","group",1,"mat-mdc-paginator"],inputs:{disabled:"disabled"},exportAs:["matPaginator"],features:[e.qOj],decls:14,vars:14,consts:[[1,"mat-mdc-paginator-outer-container"],[1,"mat-mdc-paginator-container"],["class","mat-mdc-paginator-page-size",4,"ngIf"],[1,"mat-mdc-paginator-range-actions"],["aria-live","polite",1,"mat-mdc-paginator-range-label"],["mat-icon-button","","type","button","class","mat-mdc-paginator-navigation-first",3,"matTooltip","matTooltipDisabled","matTooltipPosition","disabled","click",4,"ngIf"],["mat-icon-button","","type","button",1,"mat-mdc-paginator-navigation-previous",3,"matTooltip","matTooltipDisabled","matTooltipPosition","disabled","click"],["viewBox","0 0 24 24","focusable","false",1,"mat-mdc-paginator-icon"],["d","M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"],["mat-icon-button","","type","button",1,"mat-mdc-paginator-navigation-next",3,"matTooltip","matTooltipDisabled","matTooltipPosition","disabled","click"],["d","M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"],["mat-icon-button","","type","button","class","mat-mdc-paginator-navigation-last",3,"matTooltip","matTooltipDisabled","matTooltipPosition","disabled","click",4,"ngIf"],[1,"mat-mdc-paginator-page-size"],[1,"mat-mdc-paginator-page-size-label",3,"id"],["class","mat-mdc-paginator-page-size-select",3,"appearance","color",4,"ngIf"],["class","mat-mdc-paginator-page-size-value",4,"ngIf"],[1,"mat-mdc-paginator-page-size-select",3,"appearance","color"],["hideSingleSelectionIndicator","",3,"value","disabled","aria-labelledby","panelClass","disableOptionCentering","selectionChange"],[3,"value",4,"ngFor","ngForOf"],[3,"value"],[1,"mat-mdc-paginator-page-size-value"],["mat-icon-button","","type","button",1,"mat-mdc-paginator-navigation-first",3,"matTooltip","matTooltipDisabled","matTooltipPosition","disabled","click"],["d","M18.41 16.59L13.82 12l4.59-4.59L17 6l-6 6 6 6zM6 6h2v12H6z"],["mat-icon-button","","type","button",1,"mat-mdc-paginator-navigation-last",3,"matTooltip","matTooltipDisabled","matTooltipPosition","disabled","click"],["d","M5.59 7.41L10.18 12l-4.59 4.59L7 18l6-6-6-6zM16 6h2v12h-2z"]],template:function(vn,In){1&vn&&(e.TgZ(0,"div",0)(1,"div",1),e.YNc(2,wi,5,4,"div",2),e.TgZ(3,"div",3)(4,"div",4),e._uU(5),e.qZA(),e.YNc(6,Bn,3,5,"button",5),e.TgZ(7,"button",6),e.NdJ("click",function(){return In.previousPage()}),e.O4$(),e.TgZ(8,"svg",7),e._UZ(9,"path",8),e.qZA()(),e.kcU(),e.TgZ(10,"button",9),e.NdJ("click",function(){return In.nextPage()}),e.O4$(),e.TgZ(11,"svg",7),e._UZ(12,"path",10),e.qZA()(),e.YNc(13,kn,3,5,"button",11),e.qZA()()()),2&vn&&(e.xp6(2),e.Q6J("ngIf",!In.hidePageSize),e.xp6(3),e.hij(" ",In._intl.getRangeLabel(In.pageIndex,In.pageSize,In.length)," "),e.xp6(1),e.Q6J("ngIf",In.showFirstLastButtons),e.xp6(1),e.Q6J("matTooltip",In._intl.previousPageLabel)("matTooltipDisabled",In._previousButtonsDisabled())("matTooltipPosition","above")("disabled",In._previousButtonsDisabled()),e.uIk("aria-label",In._intl.previousPageLabel),e.xp6(3),e.Q6J("matTooltip",In._intl.nextPageLabel)("matTooltipDisabled",In._nextButtonsDisabled())("matTooltipPosition","above")("disabled",In._nextButtonsDisabled()),e.uIk("aria-label",In._intl.nextPageLabel),e.xp6(3),e.Q6J("ngIf",In.showFirstLastButtons))},dependencies:[o.sg,o.O5,D.RK,T.KE,nn,E.ey,Mn.gM],styles:[".mat-mdc-paginator{display:block}.mat-mdc-paginator .mat-mdc-form-field-subscript-wrapper{display:none}.mat-mdc-paginator .mat-mdc-select{line-height:1.5}.mat-mdc-paginator-outer-container{display:flex}.mat-mdc-paginator-container{display:flex;align-items:center;justify-content:flex-end;padding:0 8px;flex-wrap:wrap-reverse;width:100%}.mat-mdc-paginator-page-size{display:flex;align-items:baseline;margin-right:8px}[dir=rtl] .mat-mdc-paginator-page-size{margin-right:0;margin-left:8px}.mat-mdc-paginator-page-size-label{margin:0 4px}.mat-mdc-paginator-page-size-select{margin:0 4px;width:84px}.mat-mdc-paginator-range-label{margin:0 32px 0 24px}.mat-mdc-paginator-range-actions{display:flex;align-items:center}.mat-mdc-paginator-icon{display:inline-block;width:28px}[dir=rtl] .mat-mdc-paginator-icon{transform:rotate(180deg)}.cdk-high-contrast-active .mat-mdc-icon-button[disabled] .mat-mdc-paginator-icon,.cdk-high-contrast-active .mat-mdc-paginator-icon{fill:currentColor;fill:CanvasText}.cdk-high-contrast-active .mat-mdc-paginator-range-actions .mat-mdc-icon-button{outline:solid 1px}"],encapsulation:2,changeDetection:0});class Hn{}Hn.\u0275fac=function(vn){return new(vn||Hn)},Hn.\u0275mod=e.oAB({type:Hn}),Hn.\u0275inj=e.cJS({providers:[Bt],imports:[o.ez,D.ot,Dn,Mn.AV]})},90455:(qe,I,p)=>{"use strict";p.d(I,{Rr:()=>he,rP:()=>ye});var o=p(94650),e=p(24006),l=p(12693),D=p(3238),g=p(21281),E=p(36895);const T=["switch"],P=new o.OlP("mat-slide-toggle-default-options",{providedIn:"root",factory:()=>({disableToggleValue:!1})}),w={provide:e.JU,useExisting:(0,o.Gpc)(()=>he),multi:!0};class B{constructor(ne,pe){this.source=ne,this.checked=pe}}let Y=0;const V=(0,D.sb)((0,D.pj)((0,D.Kr)((0,D.Id)(class{constructor(ge){this._elementRef=ge}}))));class ue extends V{get required(){return this._required}set required(ne){this._required=(0,g.Ig)(ne)}get checked(){return this._checked}set checked(ne){this._checked=(0,g.Ig)(ne),this._changeDetectorRef.markForCheck()}get inputId(){return`${this.id||this._uniqueId}-input`}constructor(ne,pe,Pe,xe,de,re,oe){super(ne),this._focusMonitor=pe,this._changeDetectorRef=Pe,this.defaults=de,this._onChange=me=>{},this._onTouched=()=>{},this._required=!1,this._checked=!1,this.name=null,this.labelPosition="after",this.ariaLabel=null,this.ariaLabelledby=null,this.change=new o.vpe,this.toggleChange=new o.vpe,this.tabIndex=parseInt(xe)||0,this.color=this.defaultColor=de.color||"accent",this._noopAnimations="NoopAnimations"===re,this.id=this._uniqueId=`${oe}${++Y}`}ngAfterContentInit(){this._focusMonitor.monitor(this._elementRef,!0).subscribe(ne=>{"keyboard"===ne||"program"===ne?(this._focused=!0,this._changeDetectorRef.markForCheck()):ne||Promise.resolve().then(()=>{this._focused=!1,this._onTouched(),this._changeDetectorRef.markForCheck()})})}ngOnDestroy(){this._focusMonitor.stopMonitoring(this._elementRef)}writeValue(ne){this.checked=!!ne}registerOnChange(ne){this._onChange=ne}registerOnTouched(ne){this._onTouched=ne}setDisabledState(ne){this.disabled=ne,this._changeDetectorRef.markForCheck()}toggle(){this.checked=!this.checked,this._onChange(this.checked)}_emitChangeEvent(){this._onChange(this.checked),this.change.emit(this._createChangeEvent(this.checked))}}ue.\u0275fac=function(ne){o.$Z()},ue.\u0275dir=o.lG2({type:ue,inputs:{name:"name",id:"id",labelPosition:"labelPosition",ariaLabel:["aria-label","ariaLabel"],ariaLabelledby:["aria-labelledby","ariaLabelledby"],ariaDescribedby:["aria-describedby","ariaDescribedby"],required:"required",checked:"checked"},outputs:{change:"change",toggleChange:"toggleChange"},features:[o.qOj]});class he extends ue{get buttonId(){return`${this.id||this._uniqueId}-button`}constructor(ne,pe,Pe,xe,de,re){super(ne,pe,Pe,xe,de,re,"mat-mdc-slide-toggle-"),this._labelId=this._uniqueId+"-label"}_handleClick(){this.toggleChange.emit(),this.defaults.disableToggleValue||(this.checked=!this.checked,this._onChange(this.checked),this.change.emit(new B(this,this.checked)))}focus(){this._switchElement.nativeElement.focus()}_createChangeEvent(ne){return new B(this,ne)}_getAriaLabelledBy(){return this.ariaLabelledby?this.ariaLabelledby:this.ariaLabel?null:this._labelId}}he.\u0275fac=function(ne){return new(ne||he)(o.Y36(o.SBq),o.Y36(l.tE),o.Y36(o.sBO),o.$8M("tabindex"),o.Y36(P),o.Y36(o.QbO,8))},he.\u0275cmp=o.Xpm({type:he,selectors:[["mat-slide-toggle"]],viewQuery:function(ne,pe){if(1&ne&&o.Gf(T,5),2&ne){let Pe;o.iGM(Pe=o.CRH())&&(pe._switchElement=Pe.first)}},hostAttrs:[1,"mat-mdc-slide-toggle"],hostVars:11,hostBindings:function(ne,pe){2&ne&&(o.Ikx("id",pe.id),o.uIk("tabindex",null)("aria-label",null)("name",null)("aria-labelledby",null),o.ekj("mat-mdc-slide-toggle-focused",pe._focused)("mat-mdc-slide-toggle-checked",pe.checked)("_mat-animation-noopable",pe._noopAnimations))},inputs:{disabled:"disabled",disableRipple:"disableRipple",color:"color",tabIndex:"tabIndex"},exportAs:["matSlideToggle"],features:[o._Bn([w]),o.qOj],ngContentSelectors:["*"],decls:17,vars:24,consts:[[1,"mdc-form-field"],["role","switch","type","button",1,"mdc-switch",3,"tabIndex","disabled","click"],["switch",""],[1,"mdc-switch__track"],[1,"mdc-switch__handle-track"],[1,"mdc-switch__handle"],[1,"mdc-switch__shadow"],[1,"mdc-elevation-overlay"],[1,"mdc-switch__ripple"],["mat-ripple","",1,"mat-mdc-slide-toggle-ripple","mat-mdc-focus-indicator",3,"matRippleTrigger","matRippleDisabled","matRippleCentered"],[1,"mdc-switch__icons"],["viewBox","0 0 24 24",1,"mdc-switch__icon","mdc-switch__icon--on"],["d","M19.69,5.23L8.96,15.96l-4.23-4.23L2.96,13.5l6,6L21.46,7L19.69,5.23z"],["viewBox","0 0 24 24",1,"mdc-switch__icon","mdc-switch__icon--off"],["d","M20 13H4v-2h16v2z"],[3,"for","click"]],template:function(ne,pe){if(1&ne&&(o.F$t(),o.TgZ(0,"div",0)(1,"button",1,2),o.NdJ("click",function(){return pe._handleClick()}),o._UZ(3,"div",3),o.TgZ(4,"div",4)(5,"div",5)(6,"div",6),o._UZ(7,"div",7),o.qZA(),o.TgZ(8,"div",8),o._UZ(9,"div",9),o.qZA(),o.TgZ(10,"div",10),o.O4$(),o.TgZ(11,"svg",11),o._UZ(12,"path",12),o.qZA(),o.TgZ(13,"svg",13),o._UZ(14,"path",14),o.qZA()()()()(),o.kcU(),o.TgZ(15,"label",15),o.NdJ("click",function(xe){return xe.stopPropagation()}),o.Hsn(16),o.qZA()()),2&ne){const Pe=o.MAs(2);o.ekj("mdc-form-field--align-end","before"==pe.labelPosition),o.xp6(1),o.ekj("mdc-switch--selected",pe.checked)("mdc-switch--unselected",!pe.checked)("mdc-switch--checked",pe.checked)("mdc-switch--disabled",pe.disabled),o.Q6J("tabIndex",pe.tabIndex)("disabled",pe.disabled),o.uIk("id",pe.buttonId)("name",pe.name)("aria-label",pe.ariaLabel)("aria-labelledby",pe._getAriaLabelledBy())("aria-describedby",pe.ariaDescribedby)("aria-required",pe.required||null)("aria-checked",pe.checked),o.xp6(8),o.Q6J("matRippleTrigger",Pe)("matRippleDisabled",pe.disableRipple||pe.disabled)("matRippleCentered",!0),o.xp6(6),o.Q6J("for",pe.buttonId),o.uIk("id",pe._labelId)}},dependencies:[D.wG],styles:['.mdc-form-field{display:inline-flex;align-items:center;vertical-align:middle}.mdc-form-field[hidden]{display:none}.mdc-form-field>label{margin-left:0;margin-right:auto;padding-left:4px;padding-right:0;order:0}[dir=rtl] .mdc-form-field>label,.mdc-form-field>label[dir=rtl]{margin-left:auto;margin-right:0}[dir=rtl] .mdc-form-field>label,.mdc-form-field>label[dir=rtl]{padding-left:0;padding-right:4px}.mdc-form-field--nowrap>label{text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.mdc-form-field--align-end>label{margin-left:auto;margin-right:0;padding-left:0;padding-right:4px;order:-1}[dir=rtl] .mdc-form-field--align-end>label,.mdc-form-field--align-end>label[dir=rtl]{margin-left:0;margin-right:auto}[dir=rtl] .mdc-form-field--align-end>label,.mdc-form-field--align-end>label[dir=rtl]{padding-left:4px;padding-right:0}.mdc-form-field--space-between{justify-content:space-between}.mdc-form-field--space-between>label{margin:0}[dir=rtl] .mdc-form-field--space-between>label,.mdc-form-field--space-between>label[dir=rtl]{margin:0}.mdc-elevation-overlay{position:absolute;border-radius:inherit;pointer-events:none;opacity:var(--mdc-elevation-overlay-opacity, 0);transition:opacity 280ms cubic-bezier(0.4, 0, 0.2, 1);background-color:var(--mdc-elevation-overlay-color, #fff)}.mdc-switch{align-items:center;background:none;border:none;cursor:pointer;display:inline-flex;flex-shrink:0;margin:0;outline:none;overflow:visible;padding:0;position:relative}.mdc-switch[hidden]{display:none}.mdc-switch:disabled{cursor:default;pointer-events:none}.mdc-switch__track{overflow:hidden;position:relative;width:100%}.mdc-switch__track::before,.mdc-switch__track::after{border:1px solid rgba(0,0,0,0);border-radius:inherit;box-sizing:border-box;content:"";height:100%;left:0;position:absolute;width:100%}@media screen and (forced-colors: active){.mdc-switch__track::before,.mdc-switch__track::after{border-color:currentColor}}.mdc-switch__track::before{transition:transform 75ms 0ms cubic-bezier(0, 0, 0.2, 1);transform:translateX(0)}.mdc-switch__track::after{transition:transform 75ms 0ms cubic-bezier(0.4, 0, 0.6, 1);transform:translateX(-100%)}[dir=rtl] .mdc-switch__track::after,.mdc-switch__track[dir=rtl]::after{transform:translateX(100%)}.mdc-switch--selected .mdc-switch__track::before{transition:transform 75ms 0ms cubic-bezier(0.4, 0, 0.6, 1);transform:translateX(100%)}[dir=rtl] .mdc-switch--selected .mdc-switch__track::before,.mdc-switch--selected .mdc-switch__track[dir=rtl]::before{transform:translateX(-100%)}.mdc-switch--selected .mdc-switch__track::after{transition:transform 75ms 0ms cubic-bezier(0, 0, 0.2, 1);transform:translateX(0)}.mdc-switch__handle-track{height:100%;pointer-events:none;position:absolute;top:0;transition:transform 75ms 0ms cubic-bezier(0.4, 0, 0.2, 1);left:0;right:auto;transform:translateX(0)}[dir=rtl] .mdc-switch__handle-track,.mdc-switch__handle-track[dir=rtl]{left:auto;right:0}.mdc-switch--selected .mdc-switch__handle-track{transform:translateX(100%)}[dir=rtl] .mdc-switch--selected .mdc-switch__handle-track,.mdc-switch--selected .mdc-switch__handle-track[dir=rtl]{transform:translateX(-100%)}.mdc-switch__handle{display:flex;pointer-events:auto;position:absolute;top:50%;transform:translateY(-50%);left:0;right:auto}[dir=rtl] .mdc-switch__handle,.mdc-switch__handle[dir=rtl]{left:auto;right:0}.mdc-switch__handle::before,.mdc-switch__handle::after{border:1px solid rgba(0,0,0,0);border-radius:inherit;box-sizing:border-box;content:"";width:100%;height:100%;left:0;position:absolute;top:0;transition:background-color 75ms 0ms cubic-bezier(0.4, 0, 0.2, 1),border-color 75ms 0ms cubic-bezier(0.4, 0, 0.2, 1);z-index:-1}@media screen and (forced-colors: active){.mdc-switch__handle::before,.mdc-switch__handle::after{border-color:currentColor}}.mdc-switch__shadow{border-radius:inherit;bottom:0;left:0;position:absolute;right:0;top:0}.mdc-elevation-overlay{bottom:0;left:0;right:0;top:0}.mdc-switch__ripple{left:50%;position:absolute;top:50%;transform:translate(-50%, -50%);z-index:-1}.mdc-switch:disabled .mdc-switch__ripple{display:none}.mdc-switch__icons{height:100%;position:relative;width:100%;z-index:1}.mdc-switch__icon{bottom:0;left:0;margin:auto;position:absolute;right:0;top:0;opacity:0;transition:opacity 30ms 0ms cubic-bezier(0.4, 0, 1, 1)}.mdc-switch--selected .mdc-switch__icon--on,.mdc-switch--unselected .mdc-switch__icon--off{opacity:1;transition:opacity 45ms 30ms cubic-bezier(0, 0, 0.2, 1)}.mat-mdc-slide-toggle{display:inline-block;-webkit-tap-highlight-color:rgba(0,0,0,0);outline:0}.mat-mdc-slide-toggle .mdc-switch{width:var(--mdc-switch-track-width, 36px)}.mat-mdc-slide-toggle .mdc-switch.mdc-switch--selected:enabled .mdc-switch__handle::after{background:var(--mdc-switch-selected-handle-color, var(--mdc-theme-primary, #6200ee))}.mat-mdc-slide-toggle .mdc-switch.mdc-switch--selected:enabled:hover:not(:focus):not(:active) .mdc-switch__handle::after{background:var(--mdc-switch-selected-hover-handle-color, #310077)}.mat-mdc-slide-toggle .mdc-switch.mdc-switch--selected:enabled:focus:not(:active) .mdc-switch__handle::after{background:var(--mdc-switch-selected-focus-handle-color, #310077)}.mat-mdc-slide-toggle .mdc-switch.mdc-switch--selected:enabled:active .mdc-switch__handle::after{background:var(--mdc-switch-selected-pressed-handle-color, #310077)}.mat-mdc-slide-toggle .mdc-switch.mdc-switch--selected:disabled .mdc-switch__handle::after{background:var(--mdc-switch-disabled-selected-handle-color, #424242)}.mat-mdc-slide-toggle .mdc-switch.mdc-switch--unselected:enabled .mdc-switch__handle::after{background:var(--mdc-switch-unselected-handle-color, #616161)}.mat-mdc-slide-toggle .mdc-switch.mdc-switch--unselected:enabled:hover:not(:focus):not(:active) .mdc-switch__handle::after{background:var(--mdc-switch-unselected-hover-handle-color, #212121)}.mat-mdc-slide-toggle .mdc-switch.mdc-switch--unselected:enabled:focus:not(:active) .mdc-switch__handle::after{background:var(--mdc-switch-unselected-focus-handle-color, #212121)}.mat-mdc-slide-toggle .mdc-switch.mdc-switch--unselected:enabled:active .mdc-switch__handle::after{background:var(--mdc-switch-unselected-pressed-handle-color, #212121)}.mat-mdc-slide-toggle .mdc-switch.mdc-switch--unselected:disabled .mdc-switch__handle::after{background:var(--mdc-switch-disabled-unselected-handle-color, #424242)}.mat-mdc-slide-toggle .mdc-switch .mdc-switch__handle::before{background:var(--mdc-switch-handle-surface-color, var(--mdc-theme-surface, #fff))}.mat-mdc-slide-toggle .mdc-switch:enabled .mdc-switch__shadow{box-shadow:var(--mdc-switch-handle-elevation, 0px 2px 1px -1px rgba(0, 0, 0, 0.2), 0px 1px 1px 0px rgba(0, 0, 0, 0.14), 0px 1px 3px 0px rgba(0, 0, 0, 0.12))}.mat-mdc-slide-toggle .mdc-switch:disabled .mdc-switch__shadow{box-shadow:var(--mdc-switch-disabled-handle-elevation, 0px 0px 0px 0px rgba(0, 0, 0, 0.2), 0px 0px 0px 0px rgba(0, 0, 0, 0.14), 0px 0px 0px 0px rgba(0, 0, 0, 0.12))}.mat-mdc-slide-toggle .mdc-switch .mdc-switch__focus-ring-wrapper,.mat-mdc-slide-toggle .mdc-switch .mdc-switch__handle{height:var(--mdc-switch-handle-height, 20px)}.mat-mdc-slide-toggle .mdc-switch:disabled .mdc-switch__handle::after{opacity:var(--mdc-switch-disabled-handle-opacity, 0.38)}.mat-mdc-slide-toggle .mdc-switch .mdc-switch__handle{border-radius:var(--mdc-switch-handle-shape, 10px)}.mat-mdc-slide-toggle .mdc-switch .mdc-switch__handle{width:var(--mdc-switch-handle-width, 20px)}.mat-mdc-slide-toggle .mdc-switch .mdc-switch__handle-track{width:calc(100% - var(--mdc-switch-handle-width, 20px))}.mat-mdc-slide-toggle .mdc-switch.mdc-switch--selected:enabled .mdc-switch__icon{fill:var(--mdc-switch-selected-icon-color, var(--mdc-theme-on-primary, #fff))}.mat-mdc-slide-toggle .mdc-switch.mdc-switch--selected:disabled .mdc-switch__icon{fill:var(--mdc-switch-disabled-selected-icon-color, var(--mdc-theme-on-primary, #fff))}.mat-mdc-slide-toggle .mdc-switch.mdc-switch--unselected:enabled .mdc-switch__icon{fill:var(--mdc-switch-unselected-icon-color, var(--mdc-theme-on-primary, #fff))}.mat-mdc-slide-toggle .mdc-switch.mdc-switch--unselected:disabled .mdc-switch__icon{fill:var(--mdc-switch-disabled-unselected-icon-color, var(--mdc-theme-on-primary, #fff))}.mat-mdc-slide-toggle .mdc-switch.mdc-switch--selected:disabled .mdc-switch__icons{opacity:var(--mdc-switch-disabled-selected-icon-opacity, 0.38)}.mat-mdc-slide-toggle .mdc-switch.mdc-switch--unselected:disabled .mdc-switch__icons{opacity:var(--mdc-switch-disabled-unselected-icon-opacity, 0.38)}.mat-mdc-slide-toggle .mdc-switch.mdc-switch--selected .mdc-switch__icon{width:var(--mdc-switch-selected-icon-size, 18px);height:var(--mdc-switch-selected-icon-size, 18px)}.mat-mdc-slide-toggle .mdc-switch.mdc-switch--unselected .mdc-switch__icon{width:var(--mdc-switch-unselected-icon-size, 18px);height:var(--mdc-switch-unselected-icon-size, 18px)}.mat-mdc-slide-toggle .mdc-switch.mdc-switch--selected:enabled:hover:not(:focus) .mdc-switch__ripple::before,.mat-mdc-slide-toggle .mdc-switch.mdc-switch--selected:enabled:hover:not(:focus) .mdc-switch__ripple::after{background-color:var(--mdc-switch-selected-hover-state-layer-color, var(--mdc-theme-primary, #6200ee))}.mat-mdc-slide-toggle .mdc-switch.mdc-switch--selected:enabled:focus .mdc-switch__ripple::before,.mat-mdc-slide-toggle .mdc-switch.mdc-switch--selected:enabled:focus .mdc-switch__ripple::after{background-color:var(--mdc-switch-selected-focus-state-layer-color, var(--mdc-theme-primary, #6200ee))}.mat-mdc-slide-toggle .mdc-switch.mdc-switch--selected:enabled:active .mdc-switch__ripple::before,.mat-mdc-slide-toggle .mdc-switch.mdc-switch--selected:enabled:active .mdc-switch__ripple::after{background-color:var(--mdc-switch-selected-pressed-state-layer-color, var(--mdc-theme-primary, #6200ee))}.mat-mdc-slide-toggle .mdc-switch.mdc-switch--unselected:enabled:hover:not(:focus) .mdc-switch__ripple::before,.mat-mdc-slide-toggle .mdc-switch.mdc-switch--unselected:enabled:hover:not(:focus) .mdc-switch__ripple::after{background-color:var(--mdc-switch-unselected-hover-state-layer-color, #424242)}.mat-mdc-slide-toggle .mdc-switch.mdc-switch--unselected:enabled:focus .mdc-switch__ripple::before,.mat-mdc-slide-toggle .mdc-switch.mdc-switch--unselected:enabled:focus .mdc-switch__ripple::after{background-color:var(--mdc-switch-unselected-focus-state-layer-color, #424242)}.mat-mdc-slide-toggle .mdc-switch.mdc-switch--unselected:enabled:active .mdc-switch__ripple::before,.mat-mdc-slide-toggle .mdc-switch.mdc-switch--unselected:enabled:active .mdc-switch__ripple::after{background-color:var(--mdc-switch-unselected-pressed-state-layer-color, #424242)}.mat-mdc-slide-toggle .mdc-switch.mdc-switch--selected:enabled:hover:not(:focus):hover .mdc-switch__ripple::before,.mat-mdc-slide-toggle .mdc-switch.mdc-switch--selected:enabled:hover:not(:focus).mdc-ripple-surface--hover .mdc-switch__ripple::before{opacity:var(--mdc-switch-selected-hover-state-layer-opacity, 0.04)}.mat-mdc-slide-toggle .mdc-switch.mdc-switch--selected:enabled:focus.mdc-ripple-upgraded--background-focused .mdc-switch__ripple::before,.mat-mdc-slide-toggle .mdc-switch.mdc-switch--selected:enabled:focus:not(.mdc-ripple-upgraded):focus .mdc-switch__ripple::before{transition-duration:75ms;opacity:var(--mdc-switch-selected-focus-state-layer-opacity, 0.12)}.mat-mdc-slide-toggle .mdc-switch.mdc-switch--selected:enabled:active:not(.mdc-ripple-upgraded) .mdc-switch__ripple::after{transition:opacity 150ms linear}.mat-mdc-slide-toggle .mdc-switch.mdc-switch--selected:enabled:active:not(.mdc-ripple-upgraded):active .mdc-switch__ripple::after{transition-duration:75ms;opacity:var(--mdc-switch-selected-pressed-state-layer-opacity, 0.1)}.mat-mdc-slide-toggle .mdc-switch.mdc-switch--selected:enabled:active.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-switch-selected-pressed-state-layer-opacity, 0.1)}.mat-mdc-slide-toggle .mdc-switch.mdc-switch--unselected:enabled:hover:not(:focus):hover .mdc-switch__ripple::before,.mat-mdc-slide-toggle .mdc-switch.mdc-switch--unselected:enabled:hover:not(:focus).mdc-ripple-surface--hover .mdc-switch__ripple::before{opacity:var(--mdc-switch-unselected-hover-state-layer-opacity, 0.04)}.mat-mdc-slide-toggle .mdc-switch.mdc-switch--unselected:enabled:focus.mdc-ripple-upgraded--background-focused .mdc-switch__ripple::before,.mat-mdc-slide-toggle .mdc-switch.mdc-switch--unselected:enabled:focus:not(.mdc-ripple-upgraded):focus .mdc-switch__ripple::before{transition-duration:75ms;opacity:var(--mdc-switch-unselected-focus-state-layer-opacity, 0.12)}.mat-mdc-slide-toggle .mdc-switch.mdc-switch--unselected:enabled:active:not(.mdc-ripple-upgraded) .mdc-switch__ripple::after{transition:opacity 150ms linear}.mat-mdc-slide-toggle .mdc-switch.mdc-switch--unselected:enabled:active:not(.mdc-ripple-upgraded):active .mdc-switch__ripple::after{transition-duration:75ms;opacity:var(--mdc-switch-unselected-pressed-state-layer-opacity, 0.1)}.mat-mdc-slide-toggle .mdc-switch.mdc-switch--unselected:enabled:active.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-switch-unselected-pressed-state-layer-opacity, 0.1)}.mat-mdc-slide-toggle .mdc-switch .mdc-switch__ripple{height:var(--mdc-switch-state-layer-size, 48px);width:var(--mdc-switch-state-layer-size, 48px)}.mat-mdc-slide-toggle .mdc-switch .mdc-switch__track{height:var(--mdc-switch-track-height, 14px)}.mat-mdc-slide-toggle .mdc-switch:disabled .mdc-switch__track{opacity:var(--mdc-switch-disabled-track-opacity, 0.12)}.mat-mdc-slide-toggle .mdc-switch:enabled .mdc-switch__track::after{background:var(--mdc-switch-selected-track-color, #d7bbff)}.mat-mdc-slide-toggle .mdc-switch:enabled:hover:not(:focus):not(:active) .mdc-switch__track::after{background:var(--mdc-switch-selected-hover-track-color, #d7bbff)}.mat-mdc-slide-toggle .mdc-switch:enabled:focus:not(:active) .mdc-switch__track::after{background:var(--mdc-switch-selected-focus-track-color, #d7bbff)}.mat-mdc-slide-toggle .mdc-switch:enabled:active .mdc-switch__track::after{background:var(--mdc-switch-selected-pressed-track-color, #d7bbff)}.mat-mdc-slide-toggle .mdc-switch:disabled .mdc-switch__track::after{background:var(--mdc-switch-disabled-selected-track-color, #424242)}.mat-mdc-slide-toggle .mdc-switch:enabled .mdc-switch__track::before{background:var(--mdc-switch-unselected-track-color, #e0e0e0)}.mat-mdc-slide-toggle .mdc-switch:enabled:hover:not(:focus):not(:active) .mdc-switch__track::before{background:var(--mdc-switch-unselected-hover-track-color, #e0e0e0)}.mat-mdc-slide-toggle .mdc-switch:enabled:focus:not(:active) .mdc-switch__track::before{background:var(--mdc-switch-unselected-focus-track-color, #e0e0e0)}.mat-mdc-slide-toggle .mdc-switch:enabled:active .mdc-switch__track::before{background:var(--mdc-switch-unselected-pressed-track-color, #e0e0e0)}.mat-mdc-slide-toggle .mdc-switch:disabled .mdc-switch__track::before{background:var(--mdc-switch-disabled-unselected-track-color, #424242)}.mat-mdc-slide-toggle .mdc-switch .mdc-switch__track{border-radius:var(--mdc-switch-track-shape, 7px)}.mat-mdc-slide-toggle .mat-mdc-slide-toggle-ripple,.mat-mdc-slide-toggle .mdc-switch__ripple::after{top:0;left:0;right:0;bottom:0;position:absolute;border-radius:50%;pointer-events:none}.mat-mdc-slide-toggle .mat-mdc-slide-toggle-ripple:not(:empty),.mat-mdc-slide-toggle .mdc-switch__ripple::after:not(:empty){transform:translateZ(0)}.mat-mdc-slide-toggle .mdc-switch__ripple::after{content:"";opacity:0}.mat-mdc-slide-toggle .mdc-switch:hover .mdc-switch__ripple::after{opacity:.04;transition:opacity 75ms 0ms cubic-bezier(0, 0, 0.2, 1)}.mat-mdc-slide-toggle.mat-mdc-slide-toggle-focused .mdc-switch .mdc-switch__ripple::after{opacity:.12}.mat-mdc-slide-toggle.mat-mdc-slide-toggle-focused .mat-mdc-focus-indicator::before{content:""}.mat-mdc-slide-toggle .mat-ripple-element{opacity:.12}.mat-mdc-slide-toggle .mat-mdc-focus-indicator::before{border-radius:50%}.mat-mdc-slide-toggle._mat-animation-noopable .mdc-switch__handle-track,.mat-mdc-slide-toggle._mat-animation-noopable .mdc-elevation-overlay,.mat-mdc-slide-toggle._mat-animation-noopable .mdc-switch__icon,.mat-mdc-slide-toggle._mat-animation-noopable .mdc-switch__handle::before,.mat-mdc-slide-toggle._mat-animation-noopable .mdc-switch__handle::after,.mat-mdc-slide-toggle._mat-animation-noopable .mdc-switch__track::before,.mat-mdc-slide-toggle._mat-animation-noopable .mdc-switch__track::after{transition:none}'],encapsulation:2,changeDetection:0});const ae={provide:e.Cf,useExisting:(0,o.Gpc)(()=>X),multi:!0};class X extends e.Zs{}X.\u0275fac=function(){let ge;return function(pe){return(ge||(ge=o.n5z(X)))(pe||X)}}(),X.\u0275dir=o.lG2({type:X,selectors:[["mat-slide-toggle","required","","formControlName",""],["mat-slide-toggle","required","","formControl",""],["mat-slide-toggle","required","","ngModel",""]],features:[o._Bn([ae]),o.qOj]});class ve{}ve.\u0275fac=function(ne){return new(ne||ve)},ve.\u0275mod=o.oAB({type:ve}),ve.\u0275inj=o.cJS({});class ye{}ye.\u0275fac=function(ne){return new(ne||ye)},ye.\u0275mod=o.oAB({type:ye}),ye.\u0275inj=o.cJS({imports:[ve,D.BQ,D.si,E.ez,ve,D.BQ]})},96308:(qe,I,p)=>{"use strict";p.d(I,{JX:()=>me,YE:()=>ye,nU:()=>oe});var o=p(94650),e=p(12693),l=p(21281),D=p(29521),g=p(3238),E=p(77579),T=p(56451),n=p(37340),P=p(36895);function B(be,le){if(1&be){const Z=o.EpF();o.TgZ(0,"div",3),o.NdJ("@arrowPosition.start",function(){o.CHM(Z);const j=o.oxw();return o.KtG(j._disableViewStateAnimation=!0)})("@arrowPosition.done",function(){o.CHM(Z);const j=o.oxw();return o.KtG(j._disableViewStateAnimation=!1)}),o._UZ(1,"div",4),o.TgZ(2,"div",5),o._UZ(3,"div",6)(4,"div",7)(5,"div",8),o.qZA()()}if(2&be){const Z=o.oxw();o.Q6J("@arrowOpacity",Z._getArrowViewState())("@arrowPosition",Z._getArrowViewState())("@allowChildren",Z._getArrowDirectionState()),o.xp6(2),o.Q6J("@indicator",Z._getArrowDirectionState()),o.xp6(1),o.Q6J("@leftPointer",Z._getArrowDirectionState()),o.xp6(1),o.Q6J("@rightPointer",Z._getArrowDirectionState())}}const X=new o.OlP("MAT_SORT_DEFAULT_OPTIONS"),ve=(0,g.dB)((0,g.Id)(class{}));class ye extends ve{get direction(){return this._direction}set direction(le){this._direction=le}get disableClear(){return this._disableClear}set disableClear(le){this._disableClear=(0,l.Ig)(le)}constructor(le){super(),this._defaultOptions=le,this.sortables=new Map,this._stateChanges=new E.x,this.start="asc",this._direction="",this.sortChange=new o.vpe}register(le){this.sortables.set(le.id,le)}deregister(le){this.sortables.delete(le.id)}sort(le){this.active!=le.id?(this.active=le.id,this.direction=le.start?le.start:this.start):this.direction=this.getNextSortDirection(le),this.sortChange.emit({active:this.active,direction:this.direction})}getNextSortDirection(le){if(!le)return"";const Z=le?.disableClear??this.disableClear??!!this._defaultOptions?.disableClear;let Oe=function ge(be,le){let Z=["asc","desc"];return"desc"==be&&Z.reverse(),le||Z.push(""),Z}(le.start||this.start,Z),j=Oe.indexOf(this.direction)+1;return j>=Oe.length&&(j=0),Oe[j]}ngOnInit(){this._markInitialized()}ngOnChanges(){this._stateChanges.next()}ngOnDestroy(){this._stateChanges.complete()}}ye.\u0275fac=function(le){return new(le||ye)(o.Y36(X,8))},ye.\u0275dir=o.lG2({type:ye,selectors:[["","matSort",""]],hostAttrs:[1,"mat-sort"],inputs:{disabled:["matSortDisabled","disabled"],active:["matSortActive","active"],start:["matSortStart","start"],direction:["matSortDirection","direction"],disableClear:["matSortDisableClear","disableClear"]},outputs:{sortChange:"matSortChange"},exportAs:["matSort"],features:[o.qOj,o.TTD]});const ne=g.mZ.ENTERING+" "+g.yN.STANDARD_CURVE,pe={indicator:(0,n.X$)("indicator",[(0,n.SB)("active-asc, asc",(0,n.oB)({transform:"translateY(0px)"})),(0,n.SB)("active-desc, desc",(0,n.oB)({transform:"translateY(10px)"})),(0,n.eR)("active-asc <=> active-desc",(0,n.jt)(ne))]),leftPointer:(0,n.X$)("leftPointer",[(0,n.SB)("active-asc, asc",(0,n.oB)({transform:"rotate(-45deg)"})),(0,n.SB)("active-desc, desc",(0,n.oB)({transform:"rotate(45deg)"})),(0,n.eR)("active-asc <=> active-desc",(0,n.jt)(ne))]),rightPointer:(0,n.X$)("rightPointer",[(0,n.SB)("active-asc, asc",(0,n.oB)({transform:"rotate(45deg)"})),(0,n.SB)("active-desc, desc",(0,n.oB)({transform:"rotate(-45deg)"})),(0,n.eR)("active-asc <=> active-desc",(0,n.jt)(ne))]),arrowOpacity:(0,n.X$)("arrowOpacity",[(0,n.SB)("desc-to-active, asc-to-active, active",(0,n.oB)({opacity:1})),(0,n.SB)("desc-to-hint, asc-to-hint, hint",(0,n.oB)({opacity:.54})),(0,n.SB)("hint-to-desc, active-to-desc, desc, hint-to-asc, active-to-asc, asc, void",(0,n.oB)({opacity:0})),(0,n.eR)("* => asc, * => desc, * => active, * => hint, * => void",(0,n.jt)("0ms")),(0,n.eR)("* <=> *",(0,n.jt)(ne))]),arrowPosition:(0,n.X$)("arrowPosition",[(0,n.eR)("* => desc-to-hint, * => desc-to-active",(0,n.jt)(ne,(0,n.F4)([(0,n.oB)({transform:"translateY(-25%)"}),(0,n.oB)({transform:"translateY(0)"})]))),(0,n.eR)("* => hint-to-desc, * => active-to-desc",(0,n.jt)(ne,(0,n.F4)([(0,n.oB)({transform:"translateY(0)"}),(0,n.oB)({transform:"translateY(25%)"})]))),(0,n.eR)("* => asc-to-hint, * => asc-to-active",(0,n.jt)(ne,(0,n.F4)([(0,n.oB)({transform:"translateY(25%)"}),(0,n.oB)({transform:"translateY(0)"})]))),(0,n.eR)("* => hint-to-asc, * => active-to-asc",(0,n.jt)(ne,(0,n.F4)([(0,n.oB)({transform:"translateY(0)"}),(0,n.oB)({transform:"translateY(-25%)"})]))),(0,n.SB)("desc-to-hint, asc-to-hint, hint, desc-to-active, asc-to-active, active",(0,n.oB)({transform:"translateY(0)"})),(0,n.SB)("hint-to-desc, active-to-desc, desc",(0,n.oB)({transform:"translateY(-25%)"})),(0,n.SB)("hint-to-asc, active-to-asc, asc",(0,n.oB)({transform:"translateY(25%)"}))]),allowChildren:(0,n.X$)("allowChildren",[(0,n.eR)("* <=> *",[(0,n.IO)("@*",(0,n.pV)(),{optional:!0})])])};class Pe{constructor(){this.changes=new E.x}}Pe.\u0275fac=function(le){return new(le||Pe)},Pe.\u0275prov=o.Yz7({token:Pe,factory:Pe.\u0275fac,providedIn:"root"});const de={provide:Pe,deps:[[new o.FiY,new o.tp0,Pe]],useFactory:function xe(be){return be||new Pe}},re=(0,g.Id)(class{});class oe extends re{get sortActionDescription(){return this._sortActionDescription}set sortActionDescription(le){this._updateSortActionDescription(le)}get disableClear(){return this._disableClear}set disableClear(le){this._disableClear=(0,l.Ig)(le)}constructor(le,Z,Oe,j,ke,Be,nt,mt){super(),this._intl=le,this._changeDetectorRef=Z,this._sort=Oe,this._columnDef=j,this._focusMonitor=ke,this._elementRef=Be,this._ariaDescriber=nt,this._showIndicatorHint=!1,this._viewState={},this._arrowDirection="",this._disableViewStateAnimation=!1,this.arrowPosition="after",this._sortActionDescription="Sort",mt?.arrowPosition&&(this.arrowPosition=mt?.arrowPosition),this._handleStateChanges()}ngOnInit(){!this.id&&this._columnDef&&(this.id=this._columnDef.name),this._updateArrowDirection(),this._setAnimationTransitionState({toState:this._isSorted()?"active":this._arrowDirection}),this._sort.register(this),this._sortButton=this._elementRef.nativeElement.querySelector(".mat-sort-header-container"),this._updateSortActionDescription(this._sortActionDescription)}ngAfterViewInit(){this._focusMonitor.monitor(this._elementRef,!0).subscribe(le=>{const Z=!!le;Z!==this._showIndicatorHint&&(this._setIndicatorHintVisible(Z),this._changeDetectorRef.markForCheck())})}ngOnDestroy(){this._focusMonitor.stopMonitoring(this._elementRef),this._sort.deregister(this),this._rerenderSubscription.unsubscribe()}_setIndicatorHintVisible(le){this._isDisabled()&&le||(this._showIndicatorHint=le,this._isSorted()||(this._updateArrowDirection(),this._showIndicatorHint?this._setAnimationTransitionState({fromState:this._arrowDirection,toState:"hint"}):this._setAnimationTransitionState({fromState:"hint",toState:this._arrowDirection})))}_setAnimationTransitionState(le){this._viewState=le||{},this._disableViewStateAnimation&&(this._viewState={toState:le.toState})}_toggleOnInteraction(){this._sort.sort(this),("hint"===this._viewState.toState||"active"===this._viewState.toState)&&(this._disableViewStateAnimation=!0)}_handleClick(){this._isDisabled()||this._sort.sort(this)}_handleKeydown(le){!this._isDisabled()&&(le.keyCode===D.L_||le.keyCode===D.K5)&&(le.preventDefault(),this._toggleOnInteraction())}_isSorted(){return this._sort.active==this.id&&("asc"===this._sort.direction||"desc"===this._sort.direction)}_getArrowDirectionState(){return`${this._isSorted()?"active-":""}${this._arrowDirection}`}_getArrowViewState(){const le=this._viewState.fromState;return(le?`${le}-to-`:"")+this._viewState.toState}_updateArrowDirection(){this._arrowDirection=this._isSorted()?this._sort.direction:this.start||this._sort.start}_isDisabled(){return this._sort.disabled||this.disabled}_getAriaSortAttribute(){return this._isSorted()?"asc"==this._sort.direction?"ascending":"descending":"none"}_renderArrow(){return!this._isDisabled()||this._isSorted()}_updateSortActionDescription(le){this._sortButton&&(this._ariaDescriber?.removeDescription(this._sortButton,this._sortActionDescription),this._ariaDescriber?.describe(this._sortButton,le)),this._sortActionDescription=le}_handleStateChanges(){this._rerenderSubscription=(0,T.T)(this._sort.sortChange,this._sort._stateChanges,this._intl.changes).subscribe(()=>{this._isSorted()&&(this._updateArrowDirection(),("hint"===this._viewState.toState||"active"===this._viewState.toState)&&(this._disableViewStateAnimation=!0),this._setAnimationTransitionState({fromState:this._arrowDirection,toState:"active"}),this._showIndicatorHint=!1),!this._isSorted()&&this._viewState&&"active"===this._viewState.toState&&(this._disableViewStateAnimation=!1,this._setAnimationTransitionState({fromState:"active",toState:this._arrowDirection})),this._changeDetectorRef.markForCheck()})}}oe.\u0275fac=function(le){return new(le||oe)(o.Y36(Pe),o.Y36(o.sBO),o.Y36(ye,8),o.Y36("MAT_SORT_HEADER_COLUMN_DEF",8),o.Y36(e.tE),o.Y36(o.SBq),o.Y36(e.$s,8),o.Y36(X,8))},oe.\u0275cmp=o.Xpm({type:oe,selectors:[["","mat-sort-header",""]],hostAttrs:[1,"mat-sort-header"],hostVars:3,hostBindings:function(le,Z){1&le&&o.NdJ("click",function(){return Z._handleClick()})("keydown",function(j){return Z._handleKeydown(j)})("mouseenter",function(){return Z._setIndicatorHintVisible(!0)})("mouseleave",function(){return Z._setIndicatorHintVisible(!1)}),2&le&&(o.uIk("aria-sort",Z._getAriaSortAttribute()),o.ekj("mat-sort-header-disabled",Z._isDisabled()))},inputs:{disabled:"disabled",id:["mat-sort-header","id"],arrowPosition:"arrowPosition",start:"start",sortActionDescription:"sortActionDescription",disableClear:"disableClear"},exportAs:["matSortHeader"],features:[o.qOj],attrs:["mat-sort-header",""],ngContentSelectors:["*"],decls:4,vars:7,consts:[[1,"mat-sort-header-container","mat-focus-indicator"],[1,"mat-sort-header-content"],["class","mat-sort-header-arrow",4,"ngIf"],[1,"mat-sort-header-arrow"],[1,"mat-sort-header-stem"],[1,"mat-sort-header-indicator"],[1,"mat-sort-header-pointer-left"],[1,"mat-sort-header-pointer-right"],[1,"mat-sort-header-pointer-middle"]],template:function(le,Z){1&le&&(o.F$t(),o.TgZ(0,"div",0)(1,"div",1),o.Hsn(2),o.qZA(),o.YNc(3,B,6,6,"div",2),o.qZA()),2&le&&(o.ekj("mat-sort-header-sorted",Z._isSorted())("mat-sort-header-position-before","before"===Z.arrowPosition),o.uIk("tabindex",Z._isDisabled()?null:0)("role",Z._isDisabled()?null:"button"),o.xp6(3),o.Q6J("ngIf",Z._renderArrow()))},dependencies:[P.O5],styles:[".mat-sort-header-container{display:flex;cursor:pointer;align-items:center;letter-spacing:normal;outline:0}[mat-sort-header].cdk-keyboard-focused .mat-sort-header-container,[mat-sort-header].cdk-program-focused .mat-sort-header-container{border-bottom:solid 1px currentColor}.mat-sort-header-disabled .mat-sort-header-container{cursor:default}.mat-sort-header-container::before{margin:calc(calc(var(--mat-focus-indicator-border-width, 3px) + 2px) * -1)}.mat-sort-header-content{text-align:center;display:flex;align-items:center}.mat-sort-header-position-before{flex-direction:row-reverse}.mat-sort-header-arrow{height:12px;width:12px;min-width:12px;position:relative;display:flex;opacity:0}.mat-sort-header-arrow,[dir=rtl] .mat-sort-header-position-before .mat-sort-header-arrow{margin:0 0 0 6px}.mat-sort-header-position-before .mat-sort-header-arrow,[dir=rtl] .mat-sort-header-arrow{margin:0 6px 0 0}.mat-sort-header-stem{background:currentColor;height:10px;width:2px;margin:auto;display:flex;align-items:center}.cdk-high-contrast-active .mat-sort-header-stem{width:0;border-left:solid 2px}.mat-sort-header-indicator{width:100%;height:2px;display:flex;align-items:center;position:absolute;top:0;left:0}.mat-sort-header-pointer-middle{margin:auto;height:2px;width:2px;background:currentColor;transform:rotate(45deg)}.cdk-high-contrast-active .mat-sort-header-pointer-middle{width:0;height:0;border-top:solid 2px;border-left:solid 2px}.mat-sort-header-pointer-left,.mat-sort-header-pointer-right{background:currentColor;width:6px;height:2px;position:absolute;top:0}.cdk-high-contrast-active .mat-sort-header-pointer-left,.cdk-high-contrast-active .mat-sort-header-pointer-right{width:0;height:0;border-left:solid 6px;border-top:solid 2px}.mat-sort-header-pointer-left{transform-origin:right;left:0}.mat-sort-header-pointer-right{transform-origin:left;right:0}"],encapsulation:2,data:{animation:[pe.indicator,pe.leftPointer,pe.rightPointer,pe.arrowOpacity,pe.arrowPosition,pe.allowChildren]},changeDetection:0});class me{}me.\u0275fac=function(le){return new(le||me)},me.\u0275mod=o.oAB({type:me}),me.\u0275inj=o.cJS({providers:[de],imports:[P.ez,g.BQ]})},30671:(qe,I,p)=>{"use strict";p.d(I,{ev:()=>ai,Dz:()=>Ni,w1:()=>Sn,yh:()=>Nt,mD:()=>pr,Q2:()=>Qe,Ke:()=>Le,ge:()=>Pn,fO:()=>Nn,XQ:()=>we,as:()=>hn,Gk:()=>qt,nj:()=>ce,BZ:()=>oi,by:()=>Bo,p0:()=>rr});var o=p(94650),e=p(40445),l=p(21281),D=p(95017),g=p(83353),E=p(67376),T=p(36895),n=p(77579),P=p(32076),w=p(61135),B=p(45191),Y=p(39646),V=p(82722),ue=p(95698);const he=[[["caption"]],[["colgroup"],["col"]]];function X(Ii,an){if(1&Ii&&(o.TgZ(0,"th",3),o._uU(1),o.qZA()),2&Ii){const Zn=o.oxw();o.Udp("text-align",Zn.justify),o.xp6(1),o.hij(" ",Zn.headerText," ")}}function ve(Ii,an){if(1&Ii&&(o.TgZ(0,"td",4),o._uU(1),o.qZA()),2&Ii){const Zn=an.$implicit,Ci=o.oxw();o.Udp("text-align",Ci.justify),o.xp6(1),o.hij(" ",Ci.dataAccessor(Zn,Ci.name)," ")}}function ye(Ii){return class extends Ii{get sticky(){return this._sticky}set sticky(an){const Zn=this._sticky;this._sticky=(0,l.Ig)(an),this._hasStickyChanged=Zn!==this._sticky}hasStickyChanged(){const an=this._hasStickyChanged;return this._hasStickyChanged=!1,an}resetStickyChanged(){this._hasStickyChanged=!1}constructor(...an){super(...an),this._sticky=!1,this._hasStickyChanged=!1}}}const ge=new o.OlP("CDK_TABLE"),ne=new o.OlP("text-column-options");class pe{constructor(an){this.template=an}}pe.\u0275fac=function(an){return new(an||pe)(o.Y36(o.Rgc))},pe.\u0275dir=o.lG2({type:pe,selectors:[["","cdkCellDef",""]]});class Pe{constructor(an){this.template=an}}Pe.\u0275fac=function(an){return new(an||Pe)(o.Y36(o.Rgc))},Pe.\u0275dir=o.lG2({type:Pe,selectors:[["","cdkHeaderCellDef",""]]});class xe{constructor(an){this.template=an}}xe.\u0275fac=function(an){return new(an||xe)(o.Y36(o.Rgc))},xe.\u0275dir=o.lG2({type:xe,selectors:[["","cdkFooterCellDef",""]]});const re=ye(class de{});class oe extends re{get name(){return this._name}set name(an){this._setNameInput(an)}get stickyEnd(){return this._stickyEnd}set stickyEnd(an){const Zn=this._stickyEnd;this._stickyEnd=(0,l.Ig)(an),this._hasStickyChanged=Zn!==this._stickyEnd}constructor(an){super(),this._table=an,this._stickyEnd=!1}_updateColumnCssClassName(){this._columnCssClassName=[`cdk-column-${this.cssClassFriendlyName}`]}_setNameInput(an){an&&(this._name=an,this.cssClassFriendlyName=an.replace(/[^a-z0-9_-]/gi,"-"),this._updateColumnCssClassName())}}oe.\u0275fac=function(an){return new(an||oe)(o.Y36(ge,8))},oe.\u0275dir=o.lG2({type:oe,selectors:[["","cdkColumnDef",""]],contentQueries:function(an,Zn,Ci){if(1&an&&(o.Suo(Ci,pe,5),o.Suo(Ci,Pe,5),o.Suo(Ci,xe,5)),2&an){let Xn;o.iGM(Xn=o.CRH())&&(Zn.cell=Xn.first),o.iGM(Xn=o.CRH())&&(Zn.headerCell=Xn.first),o.iGM(Xn=o.CRH())&&(Zn.footerCell=Xn.first)}},inputs:{sticky:"sticky",name:["cdkColumnDef","name"],stickyEnd:"stickyEnd"},features:[o._Bn([{provide:"MAT_SORT_HEADER_COLUMN_DEF",useExisting:oe}]),o.qOj]});class me{constructor(an,Zn){Zn.nativeElement.classList.add(...an._columnCssClassName)}}class be extends me{constructor(an,Zn){super(an,Zn)}}be.\u0275fac=function(an){return new(an||be)(o.Y36(oe),o.Y36(o.SBq))},be.\u0275dir=o.lG2({type:be,selectors:[["cdk-header-cell"],["th","cdk-header-cell",""]],hostAttrs:["role","columnheader",1,"cdk-header-cell"],features:[o.qOj]});class le extends me{constructor(an,Zn){if(super(an,Zn),1===an._table?._elementRef.nativeElement.nodeType){const Ci=an._table._elementRef.nativeElement.getAttribute("role"),Xn="grid"===Ci||"treegrid"===Ci?"gridcell":"cell";Zn.nativeElement.setAttribute("role",Xn)}}}le.\u0275fac=function(an){return new(an||le)(o.Y36(oe),o.Y36(o.SBq))},le.\u0275dir=o.lG2({type:le,selectors:[["cdk-footer-cell"],["td","cdk-footer-cell",""]],hostAttrs:[1,"cdk-footer-cell"],features:[o.qOj]});class Z extends me{constructor(an,Zn){if(super(an,Zn),1===an._table?._elementRef.nativeElement.nodeType){const Ci=an._table._elementRef.nativeElement.getAttribute("role"),Xn="grid"===Ci||"treegrid"===Ci?"gridcell":"cell";Zn.nativeElement.setAttribute("role",Xn)}}}Z.\u0275fac=function(an){return new(an||Z)(o.Y36(oe),o.Y36(o.SBq))},Z.\u0275dir=o.lG2({type:Z,selectors:[["cdk-cell"],["td","cdk-cell",""]],hostAttrs:[1,"cdk-cell"],features:[o.qOj]});class Oe{constructor(){this.tasks=[],this.endTasks=[]}}const j=new o.OlP("_COALESCED_STYLE_SCHEDULER");class ke{constructor(an){this._ngZone=an,this._currentSchedule=null,this._destroyed=new n.x}schedule(an){this._createScheduleIfNeeded(),this._currentSchedule.tasks.push(an)}scheduleEnd(an){this._createScheduleIfNeeded(),this._currentSchedule.endTasks.push(an)}ngOnDestroy(){this._destroyed.next(),this._destroyed.complete()}_createScheduleIfNeeded(){this._currentSchedule||(this._currentSchedule=new Oe,this._getScheduleObservable().pipe((0,V.R)(this._destroyed)).subscribe(()=>{for(;this._currentSchedule.tasks.length||this._currentSchedule.endTasks.length;){const an=this._currentSchedule;this._currentSchedule=new Oe;for(const Zn of an.tasks)Zn();for(const Zn of an.endTasks)Zn()}this._currentSchedule=null}))}_getScheduleObservable(){return this._ngZone.isStable?(0,P.D)(Promise.resolve(void 0)):this._ngZone.onStable.pipe((0,ue.q)(1))}}ke.\u0275fac=function(an){return new(an||ke)(o.LFG(o.R0b))},ke.\u0275prov=o.Yz7({token:ke,factory:ke.\u0275fac});class nt{constructor(an,Zn){this.template=an,this._differs=Zn}ngOnChanges(an){if(!this._columnsDiffer){const Zn=an.columns&&an.columns.currentValue||[];this._columnsDiffer=this._differs.find(Zn).create(),this._columnsDiffer.diff(Zn)}}getColumnsDiff(){return this._columnsDiffer.diff(this.columns)}extractCellTemplate(an){return this instanceof Ve?an.headerCell.template:this instanceof wt?an.footerCell.template:an.cell.template}}nt.\u0275fac=function(an){return new(an||nt)(o.Y36(o.Rgc),o.Y36(o.ZZ4))},nt.\u0275dir=o.lG2({type:nt,features:[o.TTD]});const ut=ye(class mt extends nt{});class Ve extends ut{constructor(an,Zn,Ci){super(an,Zn),this._table=Ci}ngOnChanges(an){super.ngOnChanges(an)}}Ve.\u0275fac=function(an){return new(an||Ve)(o.Y36(o.Rgc),o.Y36(o.ZZ4),o.Y36(ge,8))},Ve.\u0275dir=o.lG2({type:Ve,selectors:[["","cdkHeaderRowDef",""]],inputs:{columns:["cdkHeaderRowDef","columns"],sticky:["cdkHeaderRowDefSticky","sticky"]},features:[o.qOj,o.TTD]});const Ne=ye(class tt extends nt{});class wt extends Ne{constructor(an,Zn,Ci){super(an,Zn),this._table=Ci}ngOnChanges(an){super.ngOnChanges(an)}}wt.\u0275fac=function(an){return new(an||wt)(o.Y36(o.Rgc),o.Y36(o.ZZ4),o.Y36(ge,8))},wt.\u0275dir=o.lG2({type:wt,selectors:[["","cdkFooterRowDef",""]],inputs:{columns:["cdkFooterRowDef","columns"],sticky:["cdkFooterRowDefSticky","sticky"]},features:[o.qOj,o.TTD]});class ft extends nt{constructor(an,Zn,Ci){super(an,Zn),this._table=Ci}}ft.\u0275fac=function(an){return new(an||ft)(o.Y36(o.Rgc),o.Y36(o.ZZ4),o.Y36(ge,8))},ft.\u0275dir=o.lG2({type:ft,selectors:[["","cdkRowDef",""]],inputs:{columns:["cdkRowDefColumns","columns"],when:["cdkRowDefWhen","when"]},features:[o.qOj]});class Ct{constructor(an){this._viewContainer=an,Ct.mostRecentCellOutlet=this}ngOnDestroy(){Ct.mostRecentCellOutlet===this&&(Ct.mostRecentCellOutlet=null)}}Ct.mostRecentCellOutlet=null,Ct.\u0275fac=function(an){return new(an||Ct)(o.Y36(o.s_b))},Ct.\u0275dir=o.lG2({type:Ct,selectors:[["","cdkCellOutlet",""]]});class rn{}rn.\u0275fac=function(an){return new(an||rn)},rn.\u0275cmp=o.Xpm({type:rn,selectors:[["cdk-header-row"],["tr","cdk-header-row",""]],hostAttrs:["role","row",1,"cdk-header-row"],decls:1,vars:0,consts:[["cdkCellOutlet",""]],template:function(an,Zn){1&an&&o.GkF(0,0)},dependencies:[Ct],encapsulation:2});class He{}He.\u0275fac=function(an){return new(an||He)},He.\u0275cmp=o.Xpm({type:He,selectors:[["cdk-footer-row"],["tr","cdk-footer-row",""]],hostAttrs:["role","row",1,"cdk-footer-row"],decls:1,vars:0,consts:[["cdkCellOutlet",""]],template:function(an,Zn){1&an&&o.GkF(0,0)},dependencies:[Ct],encapsulation:2});class st{}st.\u0275fac=function(an){return new(an||st)},st.\u0275cmp=o.Xpm({type:st,selectors:[["cdk-row"],["tr","cdk-row",""]],hostAttrs:["role","row",1,"cdk-row"],decls:1,vars:0,consts:[["cdkCellOutlet",""]],template:function(an,Zn){1&an&&o.GkF(0,0)},dependencies:[Ct],encapsulation:2});class nn{constructor(an){this.templateRef=an,this._contentClassName="cdk-no-data-row"}}nn.\u0275fac=function(an){return new(an||nn)(o.Y36(o.Rgc))},nn.\u0275dir=o.lG2({type:nn,selectors:[["ng-template","cdkNoDataRow",""]]});const Dn=["top","bottom","left","right"];class Mn{constructor(an,Zn,Ci,Xn,Et=!0,gn=!0,ei){this._isNativeHtmlTable=an,this._stickCellCss=Zn,this.direction=Ci,this._coalescedStyleScheduler=Xn,this._isBrowser=Et,this._needsPositionStickyOnElement=gn,this._positionListener=ei,this._cachedCellWidths=[],this._borderCellCss={top:`${Zn}-border-elem-top`,bottom:`${Zn}-border-elem-bottom`,left:`${Zn}-border-elem-left`,right:`${Zn}-border-elem-right`}}clearStickyPositioning(an,Zn){const Ci=[];for(const Xn of an)if(Xn.nodeType===Xn.ELEMENT_NODE){Ci.push(Xn);for(let Et=0;Et<Xn.children.length;Et++)Ci.push(Xn.children[Et])}this._coalescedStyleScheduler.schedule(()=>{for(const Xn of Ci)this._removeStickyStyle(Xn,Zn)})}updateStickyColumns(an,Zn,Ci,Xn=!0){if(!an.length||!this._isBrowser||!Zn.some(Gn=>Gn)&&!Ci.some(Gn=>Gn))return void(this._positionListener&&(this._positionListener.stickyColumnsUpdated({sizes:[]}),this._positionListener.stickyEndColumnsUpdated({sizes:[]})));const Et=an[0],gn=Et.children.length,ei=this._getCellWidths(Et,Xn),un=this._getStickyStartColumnPositions(ei,Zn),Ft=this._getStickyEndColumnPositions(ei,Ci),Ut=Zn.lastIndexOf(!0),wn=Ci.indexOf(!0);this._coalescedStyleScheduler.schedule(()=>{const Gn="rtl"===this.direction,xi=Gn?"right":"left",Cr=Gn?"left":"right";for(const Fr of an)for(let en=0;en<gn;en++){const Wn=Fr.children[en];Zn[en]&&this._addStickyStyle(Wn,xi,un[en],en===Ut),Ci[en]&&this._addStickyStyle(Wn,Cr,Ft[en],en===wn)}this._positionListener&&(this._positionListener.stickyColumnsUpdated({sizes:-1===Ut?[]:ei.slice(0,Ut+1).map((Fr,en)=>Zn[en]?Fr:null)}),this._positionListener.stickyEndColumnsUpdated({sizes:-1===wn?[]:ei.slice(wn).map((Fr,en)=>Ci[en+wn]?Fr:null).reverse()}))})}stickRows(an,Zn,Ci){if(!this._isBrowser)return;const Xn="bottom"===Ci?an.slice().reverse():an,Et="bottom"===Ci?Zn.slice().reverse():Zn,gn=[],ei=[],un=[];for(let Ut=0,wn=0;Ut<Xn.length;Ut++){if(!Et[Ut])continue;gn[Ut]=wn;const Gn=Xn[Ut];un[Ut]=this._isNativeHtmlTable?Array.from(Gn.children):[Gn];const xi=Gn.getBoundingClientRect().height;wn+=xi,ei[Ut]=xi}const Ft=Et.lastIndexOf(!0);this._coalescedStyleScheduler.schedule(()=>{for(let Ut=0;Ut<Xn.length;Ut++){if(!Et[Ut])continue;const wn=gn[Ut],Gn=Ut===Ft;for(const xi of un[Ut])this._addStickyStyle(xi,Ci,wn,Gn)}"top"===Ci?this._positionListener?.stickyHeaderRowsUpdated({sizes:ei,offsets:gn,elements:un}):this._positionListener?.stickyFooterRowsUpdated({sizes:ei,offsets:gn,elements:un})})}updateStickyFooterContainer(an,Zn){if(!this._isNativeHtmlTable)return;const Ci=an.querySelector("tfoot");this._coalescedStyleScheduler.schedule(()=>{Zn.some(Xn=>!Xn)?this._removeStickyStyle(Ci,["bottom"]):this._addStickyStyle(Ci,"bottom",0,!1)})}_removeStickyStyle(an,Zn){for(const Xn of Zn)an.style[Xn]="",an.classList.remove(this._borderCellCss[Xn]);Dn.some(Xn=>-1===Zn.indexOf(Xn)&&an.style[Xn])?an.style.zIndex=this._getCalculatedZIndex(an):(an.style.zIndex="",this._needsPositionStickyOnElement&&(an.style.position=""),an.classList.remove(this._stickCellCss))}_addStickyStyle(an,Zn,Ci,Xn){an.classList.add(this._stickCellCss),Xn&&an.classList.add(this._borderCellCss[Zn]),an.style[Zn]=`${Ci}px`,an.style.zIndex=this._getCalculatedZIndex(an),this._needsPositionStickyOnElement&&(an.style.cssText+="position: -webkit-sticky; position: sticky; ")}_getCalculatedZIndex(an){const Zn={top:100,bottom:10,left:1,right:1};let Ci=0;for(const Xn of Dn)an.style[Xn]&&(Ci+=Zn[Xn]);return Ci?`${Ci}`:""}_getCellWidths(an,Zn=!0){if(!Zn&&this._cachedCellWidths.length)return this._cachedCellWidths;const Ci=[],Xn=an.children;for(let Et=0;Et<Xn.length;Et++){let gn=Xn[Et];Ci.push(gn.getBoundingClientRect().width)}return this._cachedCellWidths=Ci,Ci}_getStickyStartColumnPositions(an,Zn){const Ci=[];let Xn=0;for(let Et=0;Et<an.length;Et++)Zn[Et]&&(Ci[Et]=Xn,Xn+=an[Et]);return Ci}_getStickyEndColumnPositions(an,Zn){const Ci=[];let Xn=0;for(let Et=an.length;Et>0;Et--)Zn[Et]&&(Ci[Et]=Xn,Xn+=an[Et]);return Ci}}const Bt=new o.OlP("CDK_SPL");class xn{}xn.\u0275fac=function(an){return new(an||xn)},xn.\u0275dir=o.lG2({type:xn,selectors:[["cdk-table","recycleRows",""],["table","cdk-table","","recycleRows",""]],features:[o._Bn([{provide:D.k,useClass:D.eX}])]});class Fn{constructor(an,Zn){this.viewContainer=an,this.elementRef=Zn}}Fn.\u0275fac=function(an){return new(an||Fn)(o.Y36(o.s_b),o.Y36(o.SBq))},Fn.\u0275dir=o.lG2({type:Fn,selectors:[["","rowOutlet",""]]});class ui{constructor(an,Zn){this.viewContainer=an,this.elementRef=Zn}}ui.\u0275fac=function(an){return new(an||ui)(o.Y36(o.s_b),o.Y36(o.SBq))},ui.\u0275dir=o.lG2({type:ui,selectors:[["","headerRowOutlet",""]]});class Ai{constructor(an,Zn){this.viewContainer=an,this.elementRef=Zn}}Ai.\u0275fac=function(an){return new(an||Ai)(o.Y36(o.s_b),o.Y36(o.SBq))},Ai.\u0275dir=o.lG2({type:Ai,selectors:[["","footerRowOutlet",""]]});class si{constructor(an,Zn){this.viewContainer=an,this.elementRef=Zn}}si.\u0275fac=function(an){return new(an||si)(o.Y36(o.s_b),o.Y36(o.SBq))},si.\u0275dir=o.lG2({type:si,selectors:[["","noDataRowOutlet",""]]});class Hn{get trackBy(){return this._trackByFn}set trackBy(an){this._trackByFn=an}get dataSource(){return this._dataSource}set dataSource(an){this._dataSource!==an&&this._switchDataSource(an)}get multiTemplateDataRows(){return this._multiTemplateDataRows}set multiTemplateDataRows(an){this._multiTemplateDataRows=(0,l.Ig)(an),this._rowOutlet&&this._rowOutlet.viewContainer.length&&(this._forceRenderDataRows(),this.updateStickyColumnStyles())}get fixedLayout(){return this._fixedLayout}set fixedLayout(an){this._fixedLayout=(0,l.Ig)(an),this._forceRecalculateCellWidths=!0,this._stickyColumnStylesNeedReset=!0}constructor(an,Zn,Ci,Xn,Et,gn,ei,un,Ft,Ut,wn,Gn){this._differs=an,this._changeDetectorRef=Zn,this._elementRef=Ci,this._dir=Et,this._platform=ei,this._viewRepeater=un,this._coalescedStyleScheduler=Ft,this._viewportRuler=Ut,this._stickyPositioningListener=wn,this._ngZone=Gn,this._onDestroy=new n.x,this._columnDefsByName=new Map,this._customColumnDefs=new Set,this._customRowDefs=new Set,this._customHeaderRowDefs=new Set,this._customFooterRowDefs=new Set,this._headerRowDefChanged=!0,this._footerRowDefChanged=!0,this._stickyColumnStylesNeedReset=!0,this._forceRecalculateCellWidths=!0,this._cachedRenderRowsMap=new Map,this.stickyCssClass="cdk-table-sticky",this.needsPositionStickyOnElement=!0,this._isShowingNoDataRow=!1,this._multiTemplateDataRows=!1,this._fixedLayout=!1,this.contentChanged=new o.vpe,this.viewChange=new w.X({start:0,end:Number.MAX_VALUE}),Xn||this._elementRef.nativeElement.setAttribute("role","table"),this._document=gn,this._isNativeHtmlTable="TABLE"===this._elementRef.nativeElement.nodeName}ngOnInit(){this._setupStickyStyler(),this._isNativeHtmlTable&&this._applyNativeTableSections(),this._dataDiffer=this._differs.find([]).create((an,Zn)=>this.trackBy?this.trackBy(Zn.dataIndex,Zn.data):Zn),this._viewportRuler.change().pipe((0,V.R)(this._onDestroy)).subscribe(()=>{this._forceRecalculateCellWidths=!0})}ngAfterContentChecked(){this._cacheRowDefs(),this._cacheColumnDefs(),!this._headerRowDefs.length&&!this._footerRowDefs.length&&this._rowDefs.length;const Zn=this._renderUpdatedColumns()||this._headerRowDefChanged||this._footerRowDefChanged;this._stickyColumnStylesNeedReset=this._stickyColumnStylesNeedReset||Zn,this._forceRecalculateCellWidths=Zn,this._headerRowDefChanged&&(this._forceRenderHeaderRows(),this._headerRowDefChanged=!1),this._footerRowDefChanged&&(this._forceRenderFooterRows(),this._footerRowDefChanged=!1),this.dataSource&&this._rowDefs.length>0&&!this._renderChangeSubscription?this._observeRenderChanges():this._stickyColumnStylesNeedReset&&this.updateStickyColumnStyles(),this._checkStickyStates()}ngOnDestroy(){[this._rowOutlet.viewContainer,this._headerRowOutlet.viewContainer,this._footerRowOutlet.viewContainer,this._cachedRenderRowsMap,this._customColumnDefs,this._customRowDefs,this._customHeaderRowDefs,this._customFooterRowDefs,this._columnDefsByName].forEach(an=>{an.clear()}),this._headerRowDefs=[],this._footerRowDefs=[],this._defaultRowDef=null,this._onDestroy.next(),this._onDestroy.complete(),(0,D.Z9)(this.dataSource)&&this.dataSource.disconnect(this)}renderRows(){this._renderRows=this._getAllRenderRows();const an=this._dataDiffer.diff(this._renderRows);if(!an)return this._updateNoDataRow(),void this.contentChanged.next();const Zn=this._rowOutlet.viewContainer;this._viewRepeater.applyChanges(an,Zn,(Ci,Xn,Et)=>this._getEmbeddedViewArgs(Ci.item,Et),Ci=>Ci.item.data,Ci=>{1===Ci.operation&&Ci.context&&this._renderCellTemplateForItem(Ci.record.item.rowDef,Ci.context)}),this._updateRowIndexContext(),an.forEachIdentityChange(Ci=>{Zn.get(Ci.currentIndex).context.$implicit=Ci.item.data}),this._updateNoDataRow(),this._ngZone&&o.R0b.isInAngularZone()?this._ngZone.onStable.pipe((0,ue.q)(1),(0,V.R)(this._onDestroy)).subscribe(()=>{this.updateStickyColumnStyles()}):this.updateStickyColumnStyles(),this.contentChanged.next()}addColumnDef(an){this._customColumnDefs.add(an)}removeColumnDef(an){this._customColumnDefs.delete(an)}addRowDef(an){this._customRowDefs.add(an)}removeRowDef(an){this._customRowDefs.delete(an)}addHeaderRowDef(an){this._customHeaderRowDefs.add(an),this._headerRowDefChanged=!0}removeHeaderRowDef(an){this._customHeaderRowDefs.delete(an),this._headerRowDefChanged=!0}addFooterRowDef(an){this._customFooterRowDefs.add(an),this._footerRowDefChanged=!0}removeFooterRowDef(an){this._customFooterRowDefs.delete(an),this._footerRowDefChanged=!0}setNoDataRow(an){this._customNoDataRow=an}updateStickyHeaderRowStyles(){const an=this._getRenderedRows(this._headerRowOutlet),Ci=this._elementRef.nativeElement.querySelector("thead");Ci&&(Ci.style.display=an.length?"":"none");const Xn=this._headerRowDefs.map(Et=>Et.sticky);this._stickyStyler.clearStickyPositioning(an,["top"]),this._stickyStyler.stickRows(an,Xn,"top"),this._headerRowDefs.forEach(Et=>Et.resetStickyChanged())}updateStickyFooterRowStyles(){const an=this._getRenderedRows(this._footerRowOutlet),Ci=this._elementRef.nativeElement.querySelector("tfoot");Ci&&(Ci.style.display=an.length?"":"none");const Xn=this._footerRowDefs.map(Et=>Et.sticky);this._stickyStyler.clearStickyPositioning(an,["bottom"]),this._stickyStyler.stickRows(an,Xn,"bottom"),this._stickyStyler.updateStickyFooterContainer(this._elementRef.nativeElement,Xn),this._footerRowDefs.forEach(Et=>Et.resetStickyChanged())}updateStickyColumnStyles(){const an=this._getRenderedRows(this._headerRowOutlet),Zn=this._getRenderedRows(this._rowOutlet),Ci=this._getRenderedRows(this._footerRowOutlet);(this._isNativeHtmlTable&&!this._fixedLayout||this._stickyColumnStylesNeedReset)&&(this._stickyStyler.clearStickyPositioning([...an,...Zn,...Ci],["left","right"]),this._stickyColumnStylesNeedReset=!1),an.forEach((Xn,Et)=>{this._addStickyColumnStyles([Xn],this._headerRowDefs[Et])}),this._rowDefs.forEach(Xn=>{const Et=[];for(let gn=0;gn<Zn.length;gn++)this._renderRows[gn].rowDef===Xn&&Et.push(Zn[gn]);this._addStickyColumnStyles(Et,Xn)}),Ci.forEach((Xn,Et)=>{this._addStickyColumnStyles([Xn],this._footerRowDefs[Et])}),Array.from(this._columnDefsByName.values()).forEach(Xn=>Xn.resetStickyChanged())}_getAllRenderRows(){const an=[],Zn=this._cachedRenderRowsMap;this._cachedRenderRowsMap=new Map;for(let Ci=0;Ci<this._data.length;Ci++){let Xn=this._data[Ci];const Et=this._getRenderRowsForData(Xn,Ci,Zn.get(Xn));this._cachedRenderRowsMap.has(Xn)||this._cachedRenderRowsMap.set(Xn,new WeakMap);for(let gn=0;gn<Et.length;gn++){let ei=Et[gn];const un=this._cachedRenderRowsMap.get(ei.data);un.has(ei.rowDef)?un.get(ei.rowDef).push(ei):un.set(ei.rowDef,[ei]),an.push(ei)}}return an}_getRenderRowsForData(an,Zn,Ci){return this._getRowDefs(an,Zn).map(Et=>{const gn=Ci&&Ci.has(Et)?Ci.get(Et):[];if(gn.length){const ei=gn.shift();return ei.dataIndex=Zn,ei}return{data:an,rowDef:Et,dataIndex:Zn}})}_cacheColumnDefs(){this._columnDefsByName.clear(),An(this._getOwnDefs(this._contentColumnDefs),this._customColumnDefs).forEach(Zn=>{this._columnDefsByName.has(Zn.name),this._columnDefsByName.set(Zn.name,Zn)})}_cacheRowDefs(){this._headerRowDefs=An(this._getOwnDefs(this._contentHeaderRowDefs),this._customHeaderRowDefs),this._footerRowDefs=An(this._getOwnDefs(this._contentFooterRowDefs),this._customFooterRowDefs),this._rowDefs=An(this._getOwnDefs(this._contentRowDefs),this._customRowDefs);const an=this._rowDefs.filter(Zn=>!Zn.when);!this.multiTemplateDataRows&&an.length,this._defaultRowDef=an[0]}_renderUpdatedColumns(){const an=(Et,gn)=>Et||!!gn.getColumnsDiff(),Zn=this._rowDefs.reduce(an,!1);Zn&&this._forceRenderDataRows();const Ci=this._headerRowDefs.reduce(an,!1);Ci&&this._forceRenderHeaderRows();const Xn=this._footerRowDefs.reduce(an,!1);return Xn&&this._forceRenderFooterRows(),Zn||Ci||Xn}_switchDataSource(an){this._data=[],(0,D.Z9)(this.dataSource)&&this.dataSource.disconnect(this),this._renderChangeSubscription&&(this._renderChangeSubscription.unsubscribe(),this._renderChangeSubscription=null),an||(this._dataDiffer&&this._dataDiffer.diff([]),this._rowOutlet.viewContainer.clear()),this._dataSource=an}_observeRenderChanges(){if(!this.dataSource)return;let an;(0,D.Z9)(this.dataSource)?an=this.dataSource.connect(this):(0,B.b)(this.dataSource)?an=this.dataSource:Array.isArray(this.dataSource)&&(an=(0,Y.of)(this.dataSource)),this._renderChangeSubscription=an.pipe((0,V.R)(this._onDestroy)).subscribe(Zn=>{this._data=Zn||[],this.renderRows()})}_forceRenderHeaderRows(){this._headerRowOutlet.viewContainer.length>0&&this._headerRowOutlet.viewContainer.clear(),this._headerRowDefs.forEach((an,Zn)=>this._renderRow(this._headerRowOutlet,an,Zn)),this.updateStickyHeaderRowStyles()}_forceRenderFooterRows(){this._footerRowOutlet.viewContainer.length>0&&this._footerRowOutlet.viewContainer.clear(),this._footerRowDefs.forEach((an,Zn)=>this._renderRow(this._footerRowOutlet,an,Zn)),this.updateStickyFooterRowStyles()}_addStickyColumnStyles(an,Zn){const Ci=Array.from(Zn.columns||[]).map(gn=>this._columnDefsByName.get(gn)),Xn=Ci.map(gn=>gn.sticky),Et=Ci.map(gn=>gn.stickyEnd);this._stickyStyler.updateStickyColumns(an,Xn,Et,!this._fixedLayout||this._forceRecalculateCellWidths)}_getRenderedRows(an){const Zn=[];for(let Ci=0;Ci<an.viewContainer.length;Ci++){const Xn=an.viewContainer.get(Ci);Zn.push(Xn.rootNodes[0])}return Zn}_getRowDefs(an,Zn){if(1==this._rowDefs.length)return[this._rowDefs[0]];let Ci=[];if(this.multiTemplateDataRows)Ci=this._rowDefs.filter(Xn=>!Xn.when||Xn.when(Zn,an));else{let Xn=this._rowDefs.find(Et=>Et.when&&Et.when(Zn,an))||this._defaultRowDef;Xn&&Ci.push(Xn)}return Ci.length,Ci}_getEmbeddedViewArgs(an,Zn){const Ci=an.rowDef,Xn={$implicit:an.data};return{templateRef:Ci.template,context:Xn,index:Zn}}_renderRow(an,Zn,Ci,Xn={}){const Et=an.viewContainer.createEmbeddedView(Zn.template,Xn,Ci);return this._renderCellTemplateForItem(Zn,Xn),Et}_renderCellTemplateForItem(an,Zn){for(let Ci of this._getCellTemplates(an))Ct.mostRecentCellOutlet&&Ct.mostRecentCellOutlet._viewContainer.createEmbeddedView(Ci,Zn);this._changeDetectorRef.markForCheck()}_updateRowIndexContext(){const an=this._rowOutlet.viewContainer;for(let Zn=0,Ci=an.length;Zn<Ci;Zn++){const Et=an.get(Zn).context;Et.count=Ci,Et.first=0===Zn,Et.last=Zn===Ci-1,Et.even=Zn%2==0,Et.odd=!Et.even,this.multiTemplateDataRows?(Et.dataIndex=this._renderRows[Zn].dataIndex,Et.renderIndex=Zn):Et.index=this._renderRows[Zn].dataIndex}}_getCellTemplates(an){return an&&an.columns?Array.from(an.columns,Zn=>{const Ci=this._columnDefsByName.get(Zn);return an.extractCellTemplate(Ci)}):[]}_applyNativeTableSections(){const an=this._document.createDocumentFragment(),Zn=[{tag:"thead",outlets:[this._headerRowOutlet]},{tag:"tbody",outlets:[this._rowOutlet,this._noDataRowOutlet]},{tag:"tfoot",outlets:[this._footerRowOutlet]}];for(const Ci of Zn){const Xn=this._document.createElement(Ci.tag);Xn.setAttribute("role","rowgroup");for(const Et of Ci.outlets)Xn.appendChild(Et.elementRef.nativeElement);an.appendChild(Xn)}this._elementRef.nativeElement.appendChild(an)}_forceRenderDataRows(){this._dataDiffer.diff([]),this._rowOutlet.viewContainer.clear(),this.renderRows()}_checkStickyStates(){const an=(Zn,Ci)=>Zn||Ci.hasStickyChanged();this._headerRowDefs.reduce(an,!1)&&this.updateStickyHeaderRowStyles(),this._footerRowDefs.reduce(an,!1)&&this.updateStickyFooterRowStyles(),Array.from(this._columnDefsByName.values()).reduce(an,!1)&&(this._stickyColumnStylesNeedReset=!0,this.updateStickyColumnStyles())}_setupStickyStyler(){const an=this._dir?this._dir.value:"ltr";this._stickyStyler=new Mn(this._isNativeHtmlTable,this.stickyCssClass,an,this._coalescedStyleScheduler,this._platform.isBrowser,this.needsPositionStickyOnElement,this._stickyPositioningListener),(this._dir?this._dir.change:(0,Y.of)()).pipe((0,V.R)(this._onDestroy)).subscribe(Zn=>{this._stickyStyler.direction=Zn,this.updateStickyColumnStyles()})}_getOwnDefs(an){return an.filter(Zn=>!Zn._table||Zn._table===this)}_updateNoDataRow(){const an=this._customNoDataRow||this._noDataRow;if(!an)return;const Zn=0===this._rowOutlet.viewContainer.length;if(Zn===this._isShowingNoDataRow)return;const Ci=this._noDataRowOutlet.viewContainer;if(Zn){const Xn=Ci.createEmbeddedView(an.templateRef),Et=Xn.rootNodes[0];1===Xn.rootNodes.length&&Et?.nodeType===this._document.ELEMENT_NODE&&(Et.setAttribute("role","row"),Et.classList.add(an._contentClassName))}else Ci.clear();this._isShowingNoDataRow=Zn}}function An(Ii,an){return Ii.concat(Array.from(an))}Hn.\u0275fac=function(an){return new(an||Hn)(o.Y36(o.ZZ4),o.Y36(o.sBO),o.Y36(o.SBq),o.$8M("role"),o.Y36(e.Is,8),o.Y36(T.K0),o.Y36(g.t4),o.Y36(D.k),o.Y36(j),o.Y36(E.rL),o.Y36(Bt,12),o.Y36(o.R0b,8))},Hn.\u0275cmp=o.Xpm({type:Hn,selectors:[["cdk-table"],["table","cdk-table",""]],contentQueries:function(an,Zn,Ci){if(1&an&&(o.Suo(Ci,nn,5),o.Suo(Ci,oe,5),o.Suo(Ci,ft,5),o.Suo(Ci,Ve,5),o.Suo(Ci,wt,5)),2&an){let Xn;o.iGM(Xn=o.CRH())&&(Zn._noDataRow=Xn.first),o.iGM(Xn=o.CRH())&&(Zn._contentColumnDefs=Xn),o.iGM(Xn=o.CRH())&&(Zn._contentRowDefs=Xn),o.iGM(Xn=o.CRH())&&(Zn._contentHeaderRowDefs=Xn),o.iGM(Xn=o.CRH())&&(Zn._contentFooterRowDefs=Xn)}},viewQuery:function(an,Zn){if(1&an&&(o.Gf(Fn,7),o.Gf(ui,7),o.Gf(Ai,7),o.Gf(si,7)),2&an){let Ci;o.iGM(Ci=o.CRH())&&(Zn._rowOutlet=Ci.first),o.iGM(Ci=o.CRH())&&(Zn._headerRowOutlet=Ci.first),o.iGM(Ci=o.CRH())&&(Zn._footerRowOutlet=Ci.first),o.iGM(Ci=o.CRH())&&(Zn._noDataRowOutlet=Ci.first)}},hostAttrs:[1,"cdk-table"],hostVars:2,hostBindings:function(an,Zn){2&an&&o.ekj("cdk-table-fixed-layout",Zn.fixedLayout)},inputs:{trackBy:"trackBy",dataSource:"dataSource",multiTemplateDataRows:"multiTemplateDataRows",fixedLayout:"fixedLayout"},outputs:{contentChanged:"contentChanged"},exportAs:["cdkTable"],features:[o._Bn([{provide:ge,useExisting:Hn},{provide:D.k,useClass:D.yy},{provide:j,useClass:ke},{provide:Bt,useValue:null}])],ngContentSelectors:["caption","colgroup, col"],decls:6,vars:0,consts:[["headerRowOutlet",""],["rowOutlet",""],["noDataRowOutlet",""],["footerRowOutlet",""]],template:function(an,Zn){1&an&&(o.F$t(he),o.Hsn(0),o.Hsn(1,1),o.GkF(2,0)(3,1)(4,2)(5,3))},dependencies:[Fn,ui,Ai,si],styles:[".cdk-table-fixed-layout{table-layout:fixed}"],encapsulation:2});class vn{get name(){return this._name}set name(an){this._name=an,this._syncColumnDefName()}constructor(an,Zn){this._table=an,this._options=Zn,this.justify="start",this._options=Zn||{}}ngOnInit(){this._syncColumnDefName(),void 0===this.headerText&&(this.headerText=this._createDefaultHeaderText()),this.dataAccessor||(this.dataAccessor=this._options.defaultDataAccessor||((an,Zn)=>an[Zn])),this._table&&(this.columnDef.cell=this.cell,this.columnDef.headerCell=this.headerCell,this._table.addColumnDef(this.columnDef))}ngOnDestroy(){this._table&&this._table.removeColumnDef(this.columnDef)}_createDefaultHeaderText(){const an=this.name;return this._options&&this._options.defaultHeaderTextTransform?this._options.defaultHeaderTextTransform(an):an[0].toUpperCase()+an.slice(1)}_syncColumnDefName(){this.columnDef&&(this.columnDef.name=this.name)}}vn.\u0275fac=function(an){return new(an||vn)(o.Y36(Hn,8),o.Y36(ne,8))},vn.\u0275cmp=o.Xpm({type:vn,selectors:[["cdk-text-column"]],viewQuery:function(an,Zn){if(1&an&&(o.Gf(oe,7),o.Gf(pe,7),o.Gf(Pe,7)),2&an){let Ci;o.iGM(Ci=o.CRH())&&(Zn.columnDef=Ci.first),o.iGM(Ci=o.CRH())&&(Zn.cell=Ci.first),o.iGM(Ci=o.CRH())&&(Zn.headerCell=Ci.first)}},inputs:{name:"name",headerText:"headerText",dataAccessor:"dataAccessor",justify:"justify"},decls:3,vars:0,consts:[["cdkColumnDef",""],["cdk-header-cell","",3,"text-align",4,"cdkHeaderCellDef"],["cdk-cell","",3,"text-align",4,"cdkCellDef"],["cdk-header-cell",""],["cdk-cell",""]],template:function(an,Zn){1&an&&(o.ynx(0,0),o.YNc(1,X,2,3,"th",1),o.YNc(2,ve,2,3,"td",2),o.BQk())},dependencies:[pe,Pe,oe,Z,be],encapsulation:2});class Zi{}Zi.\u0275fac=function(an){return new(an||Zi)},Zi.\u0275mod=o.oAB({type:Zi}),Zi.\u0275inj=o.cJS({imports:[E.Cl]});var gr=p(3238),Hi=p(56451),Gr=p(39841),zr=p(54004);const Eo=[[["caption"]],[["colgroup"],["col"]]];function jn(Ii,an){if(1&Ii&&(o.TgZ(0,"th",3),o._uU(1),o.qZA()),2&Ii){const Zn=o.oxw();o.Udp("text-align",Zn.justify),o.xp6(1),o.hij(" ",Zn.headerText," ")}}function ct(Ii,an){if(1&Ii&&(o.TgZ(0,"td",4),o._uU(1),o.qZA()),2&Ii){const Zn=an.$implicit,Ci=o.oxw();o.Udp("text-align",Ci.justify),o.xp6(1),o.hij(" ",Ci.dataAccessor(Zn,Ci.name)," ")}}class Yt{}Yt.\u0275fac=function(an){return new(an||Yt)},Yt.\u0275dir=o.lG2({type:Yt,selectors:[["mat-table","recycleRows",""],["table","mat-table","","recycleRows",""]],features:[o._Bn([{provide:D.k,useClass:D.eX}])]});class oi extends Hn{constructor(){super(...arguments),this.stickyCssClass="mat-mdc-table-sticky",this.needsPositionStickyOnElement=!1}ngOnInit(){super.ngOnInit(),this._isNativeHtmlTable&&this._elementRef.nativeElement.querySelector("tbody").classList.add("mdc-data-table__content")}}oi.\u0275fac=function(){let Ii;return function(Zn){return(Ii||(Ii=o.n5z(oi)))(Zn||oi)}}(),oi.\u0275cmp=o.Xpm({type:oi,selectors:[["mat-table"],["table","mat-table",""]],hostAttrs:[1,"mat-mdc-table","mdc-data-table__table"],hostVars:2,hostBindings:function(an,Zn){2&an&&o.ekj("mdc-table-fixed-layout",Zn.fixedLayout)},exportAs:["matTable"],features:[o._Bn([{provide:Hn,useExisting:oi},{provide:ge,useExisting:oi},{provide:j,useClass:ke},{provide:D.k,useClass:D.yy},{provide:Bt,useValue:null}]),o.qOj],ngContentSelectors:["caption","colgroup, col"],decls:6,vars:0,consts:[["headerRowOutlet",""],["rowOutlet",""],["noDataRowOutlet",""],["footerRowOutlet",""]],template:function(an,Zn){1&an&&(o.F$t(Eo),o.Hsn(0),o.Hsn(1,1),o.GkF(2,0)(3,1)(4,2)(5,3))},dependencies:[Fn,ui,Ai,si],styles:[".mdc-data-table{border-radius:var(--mdc-shape-medium, 4px);border-width:1px;border-style:solid}.mdc-data-table .mdc-data-table__header-cell:first-child{border-top-left-radius:var(--mdc-shape-medium, 4px)}[dir=rtl] .mdc-data-table .mdc-data-table__header-cell:first-child,.mdc-data-table .mdc-data-table__header-cell:first-child[dir=rtl]{border-top-right-radius:var(--mdc-shape-medium, 4px);border-top-left-radius:0}.mdc-data-table .mdc-data-table__header-cell:last-child{border-top-right-radius:var(--mdc-shape-medium, 4px)}[dir=rtl] .mdc-data-table .mdc-data-table__header-cell:last-child,.mdc-data-table .mdc-data-table__header-cell:last-child[dir=rtl]{border-top-left-radius:var(--mdc-shape-medium, 4px);border-top-right-radius:0}.mdc-data-table.mdc-data-table--without-footer .mdc-data-table__row:last-child .mdc-data-table__cell:first-child{border-bottom-left-radius:var(--mdc-shape-medium, 4px)}[dir=rtl] .mdc-data-table.mdc-data-table--without-footer .mdc-data-table__row:last-child .mdc-data-table__cell:first-child,.mdc-data-table.mdc-data-table--without-footer .mdc-data-table__row:last-child .mdc-data-table__cell:first-child[dir=rtl]{border-bottom-right-radius:var(--mdc-shape-medium, 4px);border-bottom-left-radius:0}.mdc-data-table.mdc-data-table--without-footer .mdc-data-table__row:last-child .mdc-data-table__cell:last-child{border-bottom-right-radius:var(--mdc-shape-medium, 4px)}[dir=rtl] .mdc-data-table.mdc-data-table--without-footer .mdc-data-table__row:last-child .mdc-data-table__cell:last-child,.mdc-data-table.mdc-data-table--without-footer .mdc-data-table__row:last-child .mdc-data-table__cell:last-child[dir=rtl]{border-bottom-left-radius:var(--mdc-shape-medium, 4px);border-bottom-right-radius:0}.mdc-data-table__cell,.mdc-data-table__header-cell{border-bottom-width:1px;border-bottom-style:solid}.mdc-data-table__pagination{border-top-width:1px;border-top-style:solid}.mdc-data-table__row:last-child .mdc-data-table__cell{border-bottom:none}.mdc-data-table__row{height:52px}.mdc-data-table__pagination{min-height:52px}.mdc-data-table__header-row{height:56px}.mdc-data-table__cell,.mdc-data-table__header-cell{padding:0 16px 0 16px}.mdc-data-table__header-cell--checkbox,.mdc-data-table__cell--checkbox{padding-left:4px;padding-right:0}[dir=rtl] .mdc-data-table__header-cell--checkbox,[dir=rtl] .mdc-data-table__cell--checkbox,.mdc-data-table__header-cell--checkbox[dir=rtl],.mdc-data-table__cell--checkbox[dir=rtl]{padding-left:0;padding-right:4px}.mdc-data-table__cell{box-sizing:border-box;overflow:hidden;text-align:left;text-overflow:ellipsis}[dir=rtl] .mdc-data-table__cell,.mdc-data-table__cell[dir=rtl]{text-align:right}.mdc-data-table__cell--numeric{text-align:right}[dir=rtl] .mdc-data-table__cell--numeric,.mdc-data-table__cell--numeric[dir=rtl]{text-align:left}.mdc-data-table__cell--checkbox{width:1px}.mdc-data-table__header-cell{box-sizing:border-box;text-overflow:ellipsis;overflow:hidden;outline:none;text-align:left}[dir=rtl] .mdc-data-table__header-cell,.mdc-data-table__header-cell[dir=rtl]{text-align:right}.mdc-data-table__header-cell--checkbox{width:1px}.mdc-data-table__header-cell--numeric{text-align:right}[dir=rtl] .mdc-data-table__header-cell--numeric,.mdc-data-table__header-cell--numeric[dir=rtl]{text-align:left}.mdc-data-table__sort-icon-button{width:28px;height:28px;padding:2px;transform:rotate(0.0001deg);margin-left:4px;margin-right:0;opacity:0}.mdc-data-table__sort-icon-button .mdc-icon-button__focus-ring{max-height:28px;max-width:28px}.mdc-data-table__sort-icon-button.mdc-icon-button--reduced-size .mdc-icon-button__ripple{width:28px;height:28px;margin-top:0px;margin-bottom:0px;margin-right:0px;margin-left:0px}.mdc-data-table__sort-icon-button.mdc-icon-button--reduced-size .mdc-icon-button__focus-ring{max-height:28px;max-width:28px}.mdc-data-table__sort-icon-button .mdc-icon-button__touch{position:absolute;top:50%;height:28px;left:50%;width:28px;transform:translate(-50%, -50%)}[dir=rtl] .mdc-data-table__sort-icon-button,.mdc-data-table__sort-icon-button[dir=rtl]{margin-left:0;margin-right:4px}.mdc-data-table__header-cell--numeric .mdc-data-table__sort-icon-button{margin-left:0;margin-right:4px}[dir=rtl] .mdc-data-table__header-cell--numeric .mdc-data-table__sort-icon-button,.mdc-data-table__header-cell--numeric .mdc-data-table__sort-icon-button[dir=rtl]{margin-left:4px;margin-right:0}.mdc-data-table__header-cell--sorted-descending .mdc-data-table__sort-icon-button{transform:rotate(-180deg)}.mdc-data-table__sort-icon-button:focus,.mdc-data-table__header-cell:hover .mdc-data-table__sort-icon-button,.mdc-data-table__header-cell--sorted .mdc-data-table__sort-icon-button{opacity:1}.mdc-data-table__header-cell-wrapper{align-items:center;display:inline-flex;vertical-align:middle}.mdc-data-table__header-cell--with-sort{cursor:pointer}.mdc-data-table__sort-status-label{clip:rect(1px, 1px, 1px, 1px);height:1px;overflow:hidden;position:absolute;white-space:nowrap;width:1px}.mdc-data-table--sticky-header .mdc-data-table__header-cell{position:sticky;top:0;z-index:1}.mdc-data-table{-webkit-overflow-scrolling:touch;display:inline-flex;flex-direction:column;box-sizing:border-box;position:relative}.mdc-data-table__table-container{-webkit-overflow-scrolling:touch;overflow-x:auto;width:100%}.mdc-data-table__table{min-width:100%;border:0;white-space:nowrap;border-spacing:0;table-layout:fixed}.mdc-data-table__header-cell{box-sizing:border-box;text-overflow:ellipsis;overflow:hidden;outline:none;text-align:left}[dir=rtl] .mdc-data-table__header-cell,.mdc-data-table__header-cell[dir=rtl]{text-align:right}.mdc-data-table__header-cell--checkbox{width:1px}.mdc-data-table__header-cell--numeric{text-align:right}[dir=rtl] .mdc-data-table__header-cell--numeric,.mdc-data-table__header-cell--numeric[dir=rtl]{text-align:left}.mdc-data-table__sort-icon-button{width:28px;height:28px;padding:2px;transform:rotate(0.0001deg);margin-left:4px;margin-right:0;opacity:0}.mdc-data-table__sort-icon-button .mdc-icon-button__focus-ring{max-height:28px;max-width:28px}.mdc-data-table__sort-icon-button.mdc-icon-button--reduced-size .mdc-icon-button__ripple{width:28px;height:28px;margin-top:0px;margin-bottom:0px;margin-right:0px;margin-left:0px}.mdc-data-table__sort-icon-button.mdc-icon-button--reduced-size .mdc-icon-button__focus-ring{max-height:28px;max-width:28px}.mdc-data-table__sort-icon-button .mdc-icon-button__touch{position:absolute;top:50%;height:28px;left:50%;width:28px;transform:translate(-50%, -50%)}[dir=rtl] .mdc-data-table__sort-icon-button,.mdc-data-table__sort-icon-button[dir=rtl]{margin-left:0;margin-right:4px}.mdc-data-table__header-cell--numeric .mdc-data-table__sort-icon-button{margin-left:0;margin-right:4px}[dir=rtl] .mdc-data-table__header-cell--numeric .mdc-data-table__sort-icon-button,.mdc-data-table__header-cell--numeric .mdc-data-table__sort-icon-button[dir=rtl]{margin-left:4px;margin-right:0}.mdc-data-table__header-cell--sorted-descending .mdc-data-table__sort-icon-button{transform:rotate(-180deg)}.mdc-data-table__sort-icon-button:focus,.mdc-data-table__header-cell:hover .mdc-data-table__sort-icon-button,.mdc-data-table__header-cell--sorted .mdc-data-table__sort-icon-button{opacity:1}.mdc-data-table__header-cell-wrapper{align-items:center;display:inline-flex;vertical-align:middle}.mdc-data-table__header-cell--with-sort{cursor:pointer}.mdc-data-table__sort-status-label{clip:rect(1px, 1px, 1px, 1px);height:1px;overflow:hidden;position:absolute;white-space:nowrap;width:1px}.mdc-data-table__cell{box-sizing:border-box;overflow:hidden;text-align:left;text-overflow:ellipsis}[dir=rtl] .mdc-data-table__cell,.mdc-data-table__cell[dir=rtl]{text-align:right}.mdc-data-table__cell--numeric{text-align:right}[dir=rtl] .mdc-data-table__cell--numeric,.mdc-data-table__cell--numeric[dir=rtl]{text-align:left}.mdc-data-table__cell--checkbox{width:1px}.mdc-data-table__pagination{box-sizing:border-box;display:flex;justify-content:flex-end}.mdc-data-table__pagination-trailing{margin-left:4px;margin-right:0;align-items:center;display:flex;flex-wrap:wrap;justify-content:flex-end}[dir=rtl] .mdc-data-table__pagination-trailing,.mdc-data-table__pagination-trailing[dir=rtl]{margin-left:0;margin-right:4px}.mdc-data-table__pagination-navigation{align-items:center;display:flex}.mdc-data-table__pagination-button{margin-left:0;margin-right:4px}[dir=rtl] .mdc-data-table__pagination-button .mdc-button__icon,.mdc-data-table__pagination-button .mdc-button__icon[dir=rtl]{transform:rotate(180deg)}[dir=rtl] .mdc-data-table__pagination-button,.mdc-data-table__pagination-button[dir=rtl]{margin-left:4px;margin-right:0}.mdc-data-table__pagination-total{margin-left:14px;margin-right:36px;white-space:nowrap}[dir=rtl] .mdc-data-table__pagination-total,.mdc-data-table__pagination-total[dir=rtl]{margin-left:36px;margin-right:14px}.mdc-data-table__pagination-rows-per-page{margin-left:0;margin-right:22px;align-items:center;display:inline-flex}[dir=rtl] .mdc-data-table__pagination-rows-per-page,.mdc-data-table__pagination-rows-per-page[dir=rtl]{margin-left:22px;margin-right:0}.mdc-data-table__pagination-rows-per-page-label{margin-left:0;margin-right:12px;white-space:nowrap}[dir=rtl] .mdc-data-table__pagination-rows-per-page-label,.mdc-data-table__pagination-rows-per-page-label[dir=rtl]{margin-left:12px;margin-right:0}.mdc-data-table__pagination-rows-per-page-select{min-width:var(--mdc-menu-min-width, 80px);margin:8px 0}.mdc-data-table__pagination-rows-per-page-select .mdc-select__anchor{width:100%;min-width:80px}.mdc-data-table__pagination-rows-per-page-select .mdc-select__anchor{height:36px}.mdc-data-table__pagination-rows-per-page-select .mdc-select__anchor .mdc-floating-label--float-above{transform:translateY(-27.25px) scale(1)}.mdc-data-table__pagination-rows-per-page-select .mdc-select__anchor .mdc-floating-label--float-above{font-size:.75rem}.mdc-data-table__pagination-rows-per-page-select .mdc-select__anchor.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-data-table__pagination-rows-per-page-select .mdc-select__anchor .mdc-notched-outline--upgraded .mdc-floating-label--float-above{transform:translateY(-24.75px) scale(0.75)}.mdc-data-table__pagination-rows-per-page-select .mdc-select__anchor.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-data-table__pagination-rows-per-page-select .mdc-select__anchor .mdc-notched-outline--upgraded .mdc-floating-label--float-above{font-size:1rem}.mdc-data-table__pagination-rows-per-page-select .mdc-select__dropdown-icon{width:20px;height:20px}.mdc-data-table__pagination-rows-per-page-select.mdc-select--outlined .mdc-select__anchor :not(.mdc-notched-outline--notched) .mdc-notched-outline__notch{max-width:calc(100% - 56px)}.mdc-data-table__pagination-rows-per-page-select .mdc-list-item.mdc-list-item--with-one-line{height:36px}.mdc-data-table__progress-indicator{display:none;position:absolute;width:100%}.mdc-data-table--in-progress .mdc-data-table__progress-indicator{display:block}.mdc-data-table__scrim{background-color:var(--mdc-theme-surface, #fff);height:100%;opacity:.32;position:absolute;top:0;width:100%}mat-table{display:block}mat-header-row{min-height:56px}mat-row,mat-footer-row{min-height:48px}mat-row,mat-header-row,mat-footer-row{display:flex;border-width:0;border-bottom-width:1px;border-style:solid;align-items:center;box-sizing:border-box}mat-cell:first-of-type,mat-header-cell:first-of-type,mat-footer-cell:first-of-type{padding-left:24px}[dir=rtl] mat-cell:first-of-type:not(:only-of-type),[dir=rtl] mat-header-cell:first-of-type:not(:only-of-type),[dir=rtl] mat-footer-cell:first-of-type:not(:only-of-type){padding-left:0;padding-right:24px}mat-cell:last-of-type,mat-header-cell:last-of-type,mat-footer-cell:last-of-type{padding-right:24px}[dir=rtl] mat-cell:last-of-type:not(:only-of-type),[dir=rtl] mat-header-cell:last-of-type:not(:only-of-type),[dir=rtl] mat-footer-cell:last-of-type:not(:only-of-type){padding-right:0;padding-left:24px}mat-cell,mat-header-cell,mat-footer-cell{flex:1;display:flex;align-items:center;overflow:hidden;word-wrap:break-word;min-height:inherit}.mat-mdc-table-sticky{position:sticky !important}.mat-mdc-table{table-layout:auto;white-space:normal}mat-row.mat-mdc-row,mat-header-row.mat-mdc-header-row,mat-footer-row.mat-mdc-footer-row{border-bottom:none}.mat-mdc-table tbody,.mat-mdc-table tfoot,.mat-mdc-table thead,.mat-mdc-cell,.mat-mdc-footer-cell,.mat-mdc-header-row,.mat-mdc-row,.mat-mdc-footer-row,.mat-mdc-table .mat-mdc-header-cell{background:inherit}.mat-mdc-table .mat-mdc-row:hover,.mat-mdc-table .mat-mdc-footer-row:hover{background-color:inherit}.mat-mdc-table mat-header-row.mat-mdc-header-row,.mat-mdc-table mat-row.mat-mdc-row,.mat-mdc-table mat-footer-row.mat-mdc-footer-cell{height:unset}mat-header-cell.mat-mdc-header-cell,mat-cell.mat-mdc-cell,mat-footer-cell.mat-mdc-footer-cell{align-self:stretch}"],encapsulation:2});class Ni extends pe{}Ni.\u0275fac=function(){let Ii;return function(Zn){return(Ii||(Ii=o.n5z(Ni)))(Zn||Ni)}}(),Ni.\u0275dir=o.lG2({type:Ni,selectors:[["","matCellDef",""]],features:[o._Bn([{provide:pe,useExisting:Ni}]),o.qOj]});class Nn extends Pe{}Nn.\u0275fac=function(){let Ii;return function(Zn){return(Ii||(Ii=o.n5z(Nn)))(Zn||Nn)}}(),Nn.\u0275dir=o.lG2({type:Nn,selectors:[["","matHeaderCellDef",""]],features:[o._Bn([{provide:Pe,useExisting:Nn}]),o.qOj]});class pr extends xe{}pr.\u0275fac=function(){let Ii;return function(Zn){return(Ii||(Ii=o.n5z(pr)))(Zn||pr)}}(),pr.\u0275dir=o.lG2({type:pr,selectors:[["","matFooterCellDef",""]],features:[o._Bn([{provide:xe,useExisting:pr}]),o.qOj]});class Sn extends oe{get name(){return this._name}set name(an){this._setNameInput(an)}_updateColumnCssClassName(){super._updateColumnCssClassName(),this._columnCssClassName.push(`mat-column-${this.cssClassFriendlyName}`)}}Sn.\u0275fac=function(){let Ii;return function(Zn){return(Ii||(Ii=o.n5z(Sn)))(Zn||Sn)}}(),Sn.\u0275dir=o.lG2({type:Sn,selectors:[["","matColumnDef",""]],inputs:{sticky:"sticky",name:["matColumnDef","name"]},features:[o._Bn([{provide:oe,useExisting:Sn},{provide:"MAT_SORT_HEADER_COLUMN_DEF",useExisting:Sn}]),o.qOj]});class Pn extends be{}Pn.\u0275fac=function(){let Ii;return function(Zn){return(Ii||(Ii=o.n5z(Pn)))(Zn||Pn)}}(),Pn.\u0275dir=o.lG2({type:Pn,selectors:[["mat-header-cell"],["th","mat-header-cell",""]],hostAttrs:["role","columnheader",1,"mat-mdc-header-cell","mdc-data-table__header-cell"],features:[o.qOj]});class Nt extends le{}Nt.\u0275fac=function(){let Ii;return function(Zn){return(Ii||(Ii=o.n5z(Nt)))(Zn||Nt)}}(),Nt.\u0275dir=o.lG2({type:Nt,selectors:[["mat-footer-cell"],["td","mat-footer-cell",""]],hostAttrs:[1,"mat-mdc-footer-cell","mdc-data-table__cell"],features:[o.qOj]});class ai extends Z{}ai.\u0275fac=function(){let Ii;return function(Zn){return(Ii||(Ii=o.n5z(ai)))(Zn||ai)}}(),ai.\u0275dir=o.lG2({type:ai,selectors:[["mat-cell"],["td","mat-cell",""]],hostAttrs:[1,"mat-mdc-cell","mdc-data-table__cell"],features:[o.qOj]});class hn extends Ve{}hn.\u0275fac=function(){let Ii;return function(Zn){return(Ii||(Ii=o.n5z(hn)))(Zn||hn)}}(),hn.\u0275dir=o.lG2({type:hn,selectors:[["","matHeaderRowDef",""]],inputs:{columns:["matHeaderRowDef","columns"],sticky:["matHeaderRowDefSticky","sticky"]},features:[o._Bn([{provide:Ve,useExisting:hn}]),o.qOj]});class Le extends wt{}Le.\u0275fac=function(){let Ii;return function(Zn){return(Ii||(Ii=o.n5z(Le)))(Zn||Le)}}(),Le.\u0275dir=o.lG2({type:Le,selectors:[["","matFooterRowDef",""]],inputs:{columns:["matFooterRowDef","columns"],sticky:["matFooterRowDefSticky","sticky"]},features:[o._Bn([{provide:wt,useExisting:Le}]),o.qOj]});class ce extends ft{}ce.\u0275fac=function(){let Ii;return function(Zn){return(Ii||(Ii=o.n5z(ce)))(Zn||ce)}}(),ce.\u0275dir=o.lG2({type:ce,selectors:[["","matRowDef",""]],inputs:{columns:["matRowDefColumns","columns"],when:["matRowDefWhen","when"]},features:[o._Bn([{provide:ft,useExisting:ce}]),o.qOj]});class we extends rn{}we.\u0275fac=function(){let Ii;return function(Zn){return(Ii||(Ii=o.n5z(we)))(Zn||we)}}(),we.\u0275cmp=o.Xpm({type:we,selectors:[["mat-header-row"],["tr","mat-header-row",""]],hostAttrs:["role","row",1,"mat-mdc-header-row","mdc-data-table__header-row"],exportAs:["matHeaderRow"],features:[o._Bn([{provide:rn,useExisting:we}]),o.qOj],decls:1,vars:0,consts:[["cdkCellOutlet",""]],template:function(an,Zn){1&an&&o.GkF(0,0)},dependencies:[Ct],encapsulation:2});class Qe extends He{}Qe.\u0275fac=function(){let Ii;return function(Zn){return(Ii||(Ii=o.n5z(Qe)))(Zn||Qe)}}(),Qe.\u0275cmp=o.Xpm({type:Qe,selectors:[["mat-footer-row"],["tr","mat-footer-row",""]],hostAttrs:["role","row",1,"mat-mdc-footer-row","mdc-data-table__row"],exportAs:["matFooterRow"],features:[o._Bn([{provide:He,useExisting:Qe}]),o.qOj],decls:1,vars:0,consts:[["cdkCellOutlet",""]],template:function(an,Zn){1&an&&o.GkF(0,0)},dependencies:[Ct],encapsulation:2});class qt extends st{}qt.\u0275fac=function(){let Ii;return function(Zn){return(Ii||(Ii=o.n5z(qt)))(Zn||qt)}}(),qt.\u0275cmp=o.Xpm({type:qt,selectors:[["mat-row"],["tr","mat-row",""]],hostAttrs:["role","row",1,"mat-mdc-row","mdc-data-table__row"],exportAs:["matRow"],features:[o._Bn([{provide:st,useExisting:qt}]),o.qOj],decls:1,vars:0,consts:[["cdkCellOutlet",""]],template:function(an,Zn){1&an&&o.GkF(0,0)},dependencies:[Ct],encapsulation:2});class Tn extends nn{constructor(){super(...arguments),this._contentClassName="mat-mdc-no-data-row"}}Tn.\u0275fac=function(){let Ii;return function(Zn){return(Ii||(Ii=o.n5z(Tn)))(Zn||Tn)}}(),Tn.\u0275dir=o.lG2({type:Tn,selectors:[["ng-template","matNoDataRow",""]],features:[o._Bn([{provide:nn,useExisting:Tn}]),o.qOj]});class lr extends vn{}lr.\u0275fac=function(){let Ii;return function(Zn){return(Ii||(Ii=o.n5z(lr)))(Zn||lr)}}(),lr.\u0275cmp=o.Xpm({type:lr,selectors:[["mat-text-column"]],features:[o.qOj],decls:3,vars:0,consts:[["matColumnDef",""],["mat-header-cell","",3,"text-align",4,"matHeaderCellDef"],["mat-cell","",3,"text-align",4,"matCellDef"],["mat-header-cell",""],["mat-cell",""]],template:function(an,Zn){1&an&&(o.ynx(0,0),o.YNc(1,jn,2,3,"th",1),o.YNc(2,ct,2,3,"td",2),o.BQk())},dependencies:[Nn,Sn,Ni,Pn,ai],encapsulation:2});class rr{}rr.\u0275fac=function(an){return new(an||rr)},rr.\u0275mod=o.oAB({type:rr}),rr.\u0275inj=o.cJS({imports:[gr.BQ,Zi,gr.BQ]});class ea extends D.o2{get data(){return this._data.value}set data(an){an=Array.isArray(an)?an:[],this._data.next(an),this._renderChangesSubscription||this._filterData(an)}get filter(){return this._filter.value}set filter(an){this._filter.next(an),this._renderChangesSubscription||this._filterData(this.data)}get sort(){return this._sort}set sort(an){this._sort=an,this._updateChangeSubscription()}get paginator(){return this._paginator}set paginator(an){this._paginator=an,this._updateChangeSubscription()}constructor(an=[]){super(),this._renderData=new w.X([]),this._filter=new w.X(""),this._internalPageChanges=new n.x,this._renderChangesSubscription=null,this.sortingDataAccessor=(Zn,Ci)=>{const Xn=Zn[Ci];if((0,l.t6)(Xn)){const Et=Number(Xn);return Et<9007199254740991?Et:Xn}return Xn},this.sortData=(Zn,Ci)=>{const Xn=Ci.active,Et=Ci.direction;return Xn&&""!=Et?Zn.sort((gn,ei)=>{let un=this.sortingDataAccessor(gn,Xn),Ft=this.sortingDataAccessor(ei,Xn);const Ut=typeof un,wn=typeof Ft;Ut!==wn&&("number"===Ut&&(un+=""),"number"===wn&&(Ft+=""));let Gn=0;return null!=un&&null!=Ft?un>Ft?Gn=1:un<Ft&&(Gn=-1):null!=un?Gn=1:null!=Ft&&(Gn=-1),Gn*("asc"==Et?1:-1)}):Zn},this.filterPredicate=(Zn,Ci)=>{const Xn=Object.keys(Zn).reduce((gn,ei)=>gn+Zn[ei]+"\u25ec","").toLowerCase(),Et=Ci.trim().toLowerCase();return-1!=Xn.indexOf(Et)},this._data=new w.X(an),this._updateChangeSubscription()}_updateChangeSubscription(){const an=this._sort?(0,Hi.T)(this._sort.sortChange,this._sort.initialized):(0,Y.of)(null),Zn=this._paginator?(0,Hi.T)(this._paginator.page,this._internalPageChanges,this._paginator.initialized):(0,Y.of)(null),Ci=this._data,Xn=(0,Gr.a)([Ci,this._filter]).pipe((0,zr.U)(([ei])=>this._filterData(ei))),Et=(0,Gr.a)([Xn,an]).pipe((0,zr.U)(([ei])=>this._orderData(ei))),gn=(0,Gr.a)([Et,Zn]).pipe((0,zr.U)(([ei])=>this._pageData(ei)));this._renderChangesSubscription?.unsubscribe(),this._renderChangesSubscription=gn.subscribe(ei=>this._renderData.next(ei))}_filterData(an){return this.filteredData=null==this.filter||""===this.filter?an:an.filter(Zn=>this.filterPredicate(Zn,this.filter)),this.paginator&&this._updatePaginator(this.filteredData.length),this.filteredData}_orderData(an){return this.sort?this.sortData(an.slice(),this.sort):an}_pageData(an){if(!this.paginator)return an;const Zn=this.paginator.pageIndex*this.paginator.pageSize;return an.slice(Zn,Zn+this.paginator.pageSize)}_updatePaginator(an){Promise.resolve().then(()=>{const Zn=this.paginator;if(Zn&&(Zn.length=an,Zn.pageIndex>0)){const Ci=Math.ceil(Zn.length/Zn.pageSize)-1||0,Xn=Math.min(Zn.pageIndex,Ci);Xn!==Zn.pageIndex&&(Zn.pageIndex=Xn,this._internalPageChanges.next())}})}connect(){return this._renderChangesSubscription||this._updateChangeSubscription(),this._renderData}disconnect(){this._renderChangesSubscription?.unsubscribe(),this._renderChangesSubscription=null}}class Bo extends ea{}},10266:(qe,I,p)=>{"use strict";p.d(I,{AV:()=>mt,Jm:()=>Pe,gM:()=>j});var o=p(82722),e=p(95698),l=p(21281),D=p(29521),g=p(94650),E=p(36895),T=p(83353),n=p(12693),P=p(40445),w=p(98184),B=p(67376),Y=p(84080),V=p(77579),ue=p(37340),he=p(3238);const ae=["tooltip"],X=20;const ye=new g.OlP("mat-tooltip-scroll-strategy");const ne={provide:ye,deps:[w.aV],useFactory:function ge(ut){return()=>ut.scrollStrategies.reposition({scrollThrottle:X})}};const Pe=new g.OlP("mat-tooltip-default-options",{providedIn:"root",factory:function pe(){return{showDelay:0,hideDelay:0,touchendHideDelay:1500}}}),de="tooltip-panel",re=(0,T.i$)({passive:!0});class Oe{get position(){return this._position}set position(Ve){Ve!==this._position&&(this._position=Ve,this._overlayRef&&(this._updatePosition(this._overlayRef),this._tooltipInstance?.show(0),this._overlayRef.updatePosition()))}get positionAtOrigin(){return this._positionAtOrigin}set positionAtOrigin(Ve){this._positionAtOrigin=(0,l.Ig)(Ve),this._detach(),this._overlayRef=null}get disabled(){return this._disabled}set disabled(Ve){this._disabled=(0,l.Ig)(Ve),this._disabled?this.hide(0):this._setupPointerEnterEventsIfNeeded()}get showDelay(){return this._showDelay}set showDelay(Ve){this._showDelay=(0,l.su)(Ve)}get hideDelay(){return this._hideDelay}set hideDelay(Ve){this._hideDelay=(0,l.su)(Ve),this._tooltipInstance&&(this._tooltipInstance._mouseLeaveHideDelay=this._hideDelay)}get message(){return this._message}set message(Ve){this._ariaDescriber.removeDescription(this._elementRef.nativeElement,this._message,"tooltip"),this._message=null!=Ve?String(Ve).trim():"",!this._message&&this._isTooltipVisible()?this.hide(0):(this._setupPointerEnterEventsIfNeeded(),this._updateTooltipMessage(),this._ngZone.runOutsideAngular(()=>{Promise.resolve().then(()=>{this._ariaDescriber.describe(this._elementRef.nativeElement,this.message,"tooltip")})}))}get tooltipClass(){return this._tooltipClass}set tooltipClass(Ve){this._tooltipClass=Ve,this._tooltipInstance&&this._setTooltipClass(this._tooltipClass)}constructor(Ve,tt,Ne,wt,ft,Ct,rn,He,st,nn,Dn,Mn){this._overlay=Ve,this._elementRef=tt,this._scrollDispatcher=Ne,this._viewContainerRef=wt,this._ngZone=ft,this._platform=Ct,this._ariaDescriber=rn,this._focusMonitor=He,this._dir=nn,this._defaultOptions=Dn,this._position="below",this._positionAtOrigin=!1,this._disabled=!1,this._viewInitialized=!1,this._pointerExitEventsInitialized=!1,this._viewportMargin=8,this._cssClassPrefix="mat",this._showDelay=this._defaultOptions.showDelay,this._hideDelay=this._defaultOptions.hideDelay,this.touchGestures="auto",this._message="",this._passiveListeners=[],this._destroyed=new V.x,this._scrollStrategy=st,this._document=Mn,Dn&&(Dn.position&&(this.position=Dn.position),Dn.positionAtOrigin&&(this.positionAtOrigin=Dn.positionAtOrigin),Dn.touchGestures&&(this.touchGestures=Dn.touchGestures)),nn.change.pipe((0,o.R)(this._destroyed)).subscribe(()=>{this._overlayRef&&this._updatePosition(this._overlayRef)})}ngAfterViewInit(){this._viewInitialized=!0,this._setupPointerEnterEventsIfNeeded(),this._focusMonitor.monitor(this._elementRef).pipe((0,o.R)(this._destroyed)).subscribe(Ve=>{Ve?"keyboard"===Ve&&this._ngZone.run(()=>this.show()):this._ngZone.run(()=>this.hide(0))})}ngOnDestroy(){const Ve=this._elementRef.nativeElement;clearTimeout(this._touchstartTimeout),this._overlayRef&&(this._overlayRef.dispose(),this._tooltipInstance=null),this._passiveListeners.forEach(([tt,Ne])=>{Ve.removeEventListener(tt,Ne,re)}),this._passiveListeners.length=0,this._destroyed.next(),this._destroyed.complete(),this._ariaDescriber.removeDescription(Ve,this.message,"tooltip"),this._focusMonitor.stopMonitoring(Ve)}show(Ve=this.showDelay,tt){if(this.disabled||!this.message||this._isTooltipVisible())return void this._tooltipInstance?._cancelPendingAnimations();const Ne=this._createOverlay(tt);this._detach(),this._portal=this._portal||new Y.C5(this._tooltipComponent,this._viewContainerRef);const wt=this._tooltipInstance=Ne.attach(this._portal).instance;wt._triggerElement=this._elementRef.nativeElement,wt._mouseLeaveHideDelay=this._hideDelay,wt.afterHidden().pipe((0,o.R)(this._destroyed)).subscribe(()=>this._detach()),this._setTooltipClass(this._tooltipClass),this._updateTooltipMessage(),wt.show(Ve)}hide(Ve=this.hideDelay){const tt=this._tooltipInstance;tt&&(tt.isVisible()?tt.hide(Ve):(tt._cancelPendingAnimations(),this._detach()))}toggle(Ve){this._isTooltipVisible()?this.hide():this.show(void 0,Ve)}_isTooltipVisible(){return!!this._tooltipInstance&&this._tooltipInstance.isVisible()}_createOverlay(Ve){if(this._overlayRef){const wt=this._overlayRef.getConfig().positionStrategy;if((!this.positionAtOrigin||!Ve)&&wt._origin instanceof g.SBq)return this._overlayRef;this._detach()}const tt=this._scrollDispatcher.getAncestorScrollContainers(this._elementRef),Ne=this._overlay.position().flexibleConnectedTo(this.positionAtOrigin&&Ve||this._elementRef).withTransformOriginOn(`.${this._cssClassPrefix}-tooltip`).withFlexibleDimensions(!1).withViewportMargin(this._viewportMargin).withScrollableContainers(tt);return Ne.positionChanges.pipe((0,o.R)(this._destroyed)).subscribe(wt=>{this._updateCurrentPositionClass(wt.connectionPair),this._tooltipInstance&&wt.scrollableViewProperties.isOverlayClipped&&this._tooltipInstance.isVisible()&&this._ngZone.run(()=>this.hide(0))}),this._overlayRef=this._overlay.create({direction:this._dir,positionStrategy:Ne,panelClass:`${this._cssClassPrefix}-${de}`,scrollStrategy:this._scrollStrategy()}),this._updatePosition(this._overlayRef),this._overlayRef.detachments().pipe((0,o.R)(this._destroyed)).subscribe(()=>this._detach()),this._overlayRef.outsidePointerEvents().pipe((0,o.R)(this._destroyed)).subscribe(()=>this._tooltipInstance?._handleBodyInteraction()),this._overlayRef.keydownEvents().pipe((0,o.R)(this._destroyed)).subscribe(wt=>{this._isTooltipVisible()&&wt.keyCode===D.hY&&!(0,D.Vb)(wt)&&(wt.preventDefault(),wt.stopPropagation(),this._ngZone.run(()=>this.hide(0)))}),this._defaultOptions?.disableTooltipInteractivity&&this._overlayRef.addPanelClass(`${this._cssClassPrefix}-tooltip-panel-non-interactive`),this._overlayRef}_detach(){this._overlayRef&&this._overlayRef.hasAttached()&&this._overlayRef.detach(),this._tooltipInstance=null}_updatePosition(Ve){const tt=Ve.getConfig().positionStrategy,Ne=this._getOrigin(),wt=this._getOverlayPosition();tt.withPositions([this._addOffset({...Ne.main,...wt.main}),this._addOffset({...Ne.fallback,...wt.fallback})])}_addOffset(Ve){return Ve}_getOrigin(){const Ve=!this._dir||"ltr"==this._dir.value,tt=this.position;let Ne;"above"==tt||"below"==tt?Ne={originX:"center",originY:"above"==tt?"top":"bottom"}:"before"==tt||"left"==tt&&Ve||"right"==tt&&!Ve?Ne={originX:"start",originY:"center"}:("after"==tt||"right"==tt&&Ve||"left"==tt&&!Ve)&&(Ne={originX:"end",originY:"center"});const{x:wt,y:ft}=this._invertPosition(Ne.originX,Ne.originY);return{main:Ne,fallback:{originX:wt,originY:ft}}}_getOverlayPosition(){const Ve=!this._dir||"ltr"==this._dir.value,tt=this.position;let Ne;"above"==tt?Ne={overlayX:"center",overlayY:"bottom"}:"below"==tt?Ne={overlayX:"center",overlayY:"top"}:"before"==tt||"left"==tt&&Ve||"right"==tt&&!Ve?Ne={overlayX:"end",overlayY:"center"}:("after"==tt||"right"==tt&&Ve||"left"==tt&&!Ve)&&(Ne={overlayX:"start",overlayY:"center"});const{x:wt,y:ft}=this._invertPosition(Ne.overlayX,Ne.overlayY);return{main:Ne,fallback:{overlayX:wt,overlayY:ft}}}_updateTooltipMessage(){this._tooltipInstance&&(this._tooltipInstance.message=this.message,this._tooltipInstance._markForCheck(),this._ngZone.onMicrotaskEmpty.pipe((0,e.q)(1),(0,o.R)(this._destroyed)).subscribe(()=>{this._tooltipInstance&&this._overlayRef.updatePosition()}))}_setTooltipClass(Ve){this._tooltipInstance&&(this._tooltipInstance.tooltipClass=Ve,this._tooltipInstance._markForCheck())}_invertPosition(Ve,tt){return"above"===this.position||"below"===this.position?"top"===tt?tt="bottom":"bottom"===tt&&(tt="top"):"end"===Ve?Ve="start":"start"===Ve&&(Ve="end"),{x:Ve,y:tt}}_updateCurrentPositionClass(Ve){const{overlayY:tt,originX:Ne,originY:wt}=Ve;let ft;if(ft="center"===tt?this._dir&&"rtl"===this._dir.value?"end"===Ne?"left":"right":"start"===Ne?"left":"right":"bottom"===tt&&"top"===wt?"above":"below",ft!==this._currentPosition){const Ct=this._overlayRef;if(Ct){const rn=`${this._cssClassPrefix}-${de}-`;Ct.removePanelClass(rn+this._currentPosition),Ct.addPanelClass(rn+ft)}this._currentPosition=ft}}_setupPointerEnterEventsIfNeeded(){this._disabled||!this.message||!this._viewInitialized||this._passiveListeners.length||(this._platformSupportsMouseEvents()?this._passiveListeners.push(["mouseenter",Ve=>{let tt;this._setupPointerExitEventsIfNeeded(),void 0!==Ve.x&&void 0!==Ve.y&&(tt=Ve),this.show(void 0,tt)}]):"off"!==this.touchGestures&&(this._disableNativeGesturesIfNecessary(),this._passiveListeners.push(["touchstart",Ve=>{const tt=Ve.targetTouches?.[0],Ne=tt?{x:tt.clientX,y:tt.clientY}:void 0;this._setupPointerExitEventsIfNeeded(),clearTimeout(this._touchstartTimeout),this._touchstartTimeout=setTimeout(()=>this.show(void 0,Ne),500)}])),this._addListeners(this._passiveListeners))}_setupPointerExitEventsIfNeeded(){if(this._pointerExitEventsInitialized)return;this._pointerExitEventsInitialized=!0;const Ve=[];if(this._platformSupportsMouseEvents())Ve.push(["mouseleave",tt=>{const Ne=tt.relatedTarget;(!Ne||!this._overlayRef?.overlayElement.contains(Ne))&&this.hide()}],["wheel",tt=>this._wheelListener(tt)]);else if("off"!==this.touchGestures){this._disableNativeGesturesIfNecessary();const tt=()=>{clearTimeout(this._touchstartTimeout),this.hide(this._defaultOptions.touchendHideDelay)};Ve.push(["touchend",tt],["touchcancel",tt])}this._addListeners(Ve),this._passiveListeners.push(...Ve)}_addListeners(Ve){Ve.forEach(([tt,Ne])=>{this._elementRef.nativeElement.addEventListener(tt,Ne,re)})}_platformSupportsMouseEvents(){return!this._platform.IOS&&!this._platform.ANDROID}_wheelListener(Ve){if(this._isTooltipVisible()){const tt=this._document.elementFromPoint(Ve.clientX,Ve.clientY),Ne=this._elementRef.nativeElement;tt!==Ne&&!Ne.contains(tt)&&this.hide()}}_disableNativeGesturesIfNecessary(){const Ve=this.touchGestures;if("off"!==Ve){const tt=this._elementRef.nativeElement,Ne=tt.style;("on"===Ve||"INPUT"!==tt.nodeName&&"TEXTAREA"!==tt.nodeName)&&(Ne.userSelect=Ne.msUserSelect=Ne.webkitUserSelect=Ne.MozUserSelect="none"),("on"===Ve||!tt.draggable)&&(Ne.webkitUserDrag="none"),Ne.touchAction="none",Ne.webkitTapHighlightColor="transparent"}}}Oe.\u0275fac=function(Ve){g.$Z()},Oe.\u0275dir=g.lG2({type:Oe,inputs:{position:["matTooltipPosition","position"],positionAtOrigin:["matTooltipPositionAtOrigin","positionAtOrigin"],disabled:["matTooltipDisabled","disabled"],showDelay:["matTooltipShowDelay","showDelay"],hideDelay:["matTooltipHideDelay","hideDelay"],touchGestures:["matTooltipTouchGestures","touchGestures"],message:["matTooltip","message"],tooltipClass:["matTooltipClass","tooltipClass"]}});class j extends Oe{constructor(Ve,tt,Ne,wt,ft,Ct,rn,He,st,nn,Dn,Mn){super(Ve,tt,Ne,wt,ft,Ct,rn,He,st,nn,Dn,Mn),this._tooltipComponent=Be,this._cssClassPrefix="mat-mdc",this._viewportMargin=8}_addOffset(Ve){const Ne=!this._dir||"ltr"==this._dir.value;return"top"===Ve.originY?Ve.offsetY=-8:"bottom"===Ve.originY?Ve.offsetY=8:"start"===Ve.originX?Ve.offsetX=Ne?-8:8:"end"===Ve.originX&&(Ve.offsetX=Ne?8:-8),Ve}}j.\u0275fac=function(Ve){return new(Ve||j)(g.Y36(w.aV),g.Y36(g.SBq),g.Y36(B.mF),g.Y36(g.s_b),g.Y36(g.R0b),g.Y36(T.t4),g.Y36(n.$s),g.Y36(n.tE),g.Y36(ye),g.Y36(P.Is,8),g.Y36(Pe,8),g.Y36(E.K0))},j.\u0275dir=g.lG2({type:j,selectors:[["","matTooltip",""]],hostAttrs:[1,"mat-mdc-tooltip-trigger"],exportAs:["matTooltip"],features:[g.qOj]});class ke{constructor(Ve,tt){this._changeDetectorRef=Ve,this._closeOnInteraction=!1,this._isVisible=!1,this._onHide=new V.x,this._animationsDisabled="NoopAnimations"===tt}show(Ve){clearTimeout(this._hideTimeoutId),this._showTimeoutId=setTimeout(()=>{this._toggleVisibility(!0),this._showTimeoutId=void 0},Ve)}hide(Ve){clearTimeout(this._showTimeoutId),this._hideTimeoutId=setTimeout(()=>{this._toggleVisibility(!1),this._hideTimeoutId=void 0},Ve)}afterHidden(){return this._onHide}isVisible(){return this._isVisible}ngOnDestroy(){this._cancelPendingAnimations(),this._onHide.complete(),this._triggerElement=null}_handleBodyInteraction(){this._closeOnInteraction&&this.hide(0)}_markForCheck(){this._changeDetectorRef.markForCheck()}_handleMouseLeave({relatedTarget:Ve}){(!Ve||!this._triggerElement.contains(Ve))&&(this.isVisible()?this.hide(this._mouseLeaveHideDelay):this._finalizeAnimation(!1))}_onShow(){}_handleAnimationEnd({animationName:Ve}){(Ve===this._showAnimation||Ve===this._hideAnimation)&&this._finalizeAnimation(Ve===this._showAnimation)}_cancelPendingAnimations(){clearTimeout(this._showTimeoutId),clearTimeout(this._hideTimeoutId),this._showTimeoutId=this._hideTimeoutId=void 0}_finalizeAnimation(Ve){Ve?this._closeOnInteraction=!0:this.isVisible()||this._onHide.next()}_toggleVisibility(Ve){const tt=this._tooltip.nativeElement,Ne=this._showAnimation,wt=this._hideAnimation;if(tt.classList.remove(Ve?wt:Ne),tt.classList.add(Ve?Ne:wt),this._isVisible=Ve,Ve&&!this._animationsDisabled&&"function"==typeof getComputedStyle){const ft=getComputedStyle(tt);("0s"===ft.getPropertyValue("animation-duration")||"none"===ft.getPropertyValue("animation-name"))&&(this._animationsDisabled=!0)}Ve&&this._onShow(),this._animationsDisabled&&(tt.classList.add("_mat-animation-noopable"),this._finalizeAnimation(Ve))}}ke.\u0275fac=function(Ve){return new(Ve||ke)(g.Y36(g.sBO),g.Y36(g.QbO,8))},ke.\u0275dir=g.lG2({type:ke});class Be extends ke{constructor(Ve,tt,Ne){super(Ve,Ne),this._elementRef=tt,this._isMultiline=!1,this._showAnimation="mat-mdc-tooltip-show",this._hideAnimation="mat-mdc-tooltip-hide"}_onShow(){this._isMultiline=this._isTooltipMultiline(),this._markForCheck()}_isTooltipMultiline(){const Ve=this._elementRef.nativeElement.getBoundingClientRect();return Ve.height>24&&Ve.width>=200}}Be.\u0275fac=function(Ve){return new(Ve||Be)(g.Y36(g.sBO),g.Y36(g.SBq),g.Y36(g.QbO,8))},Be.\u0275cmp=g.Xpm({type:Be,selectors:[["mat-tooltip-component"]],viewQuery:function(Ve,tt){if(1&Ve&&g.Gf(ae,7),2&Ve){let Ne;g.iGM(Ne=g.CRH())&&(tt._tooltip=Ne.first)}},hostAttrs:["aria-hidden","true"],hostVars:2,hostBindings:function(Ve,tt){1&Ve&&g.NdJ("mouseleave",function(wt){return tt._handleMouseLeave(wt)}),2&Ve&&g.Udp("zoom",tt.isVisible()?1:null)},features:[g.qOj],decls:4,vars:4,consts:[[1,"mdc-tooltip","mdc-tooltip--shown","mat-mdc-tooltip",3,"ngClass","animationend"],["tooltip",""],[1,"mdc-tooltip__surface","mdc-tooltip__surface-animation"]],template:function(Ve,tt){1&Ve&&(g.TgZ(0,"div",0,1),g.NdJ("animationend",function(wt){return tt._handleAnimationEnd(wt)}),g.TgZ(2,"div",2),g._uU(3),g.qZA()()),2&Ve&&(g.ekj("mdc-tooltip--multiline",tt._isMultiline),g.Q6J("ngClass",tt.tooltipClass),g.xp6(3),g.Oqu(tt.message))},dependencies:[E.mk],styles:['.mdc-tooltip__surface{word-break:var(--mdc-tooltip-word-break, normal);overflow-wrap:anywhere}.mdc-tooltip{position:fixed;display:none;z-index:9}.mdc-tooltip-wrapper--rich{position:relative}.mdc-tooltip--shown,.mdc-tooltip--showing,.mdc-tooltip--hide{display:inline-flex}.mdc-tooltip--shown.mdc-tooltip--rich,.mdc-tooltip--showing.mdc-tooltip--rich,.mdc-tooltip--hide.mdc-tooltip--rich{display:inline-block;left:-320px;position:absolute}.mdc-tooltip__surface{line-height:16px;padding:4px 8px;min-width:40px;max-width:200px;min-height:24px;max-height:40vh;box-sizing:border-box;overflow:hidden;text-align:center}.mdc-tooltip__surface::before{position:absolute;box-sizing:border-box;width:100%;height:100%;top:0;left:0;border:1px solid rgba(0,0,0,0);border-radius:inherit;content:"";pointer-events:none}@media screen and (forced-colors: active){.mdc-tooltip__surface::before{border-color:CanvasText}}.mdc-tooltip--rich .mdc-tooltip__surface{align-items:flex-start;display:flex;flex-direction:column;min-height:24px;min-width:40px;max-width:320px;position:relative}.mdc-tooltip--multiline .mdc-tooltip__surface{text-align:left}[dir=rtl] .mdc-tooltip--multiline .mdc-tooltip__surface,.mdc-tooltip--multiline .mdc-tooltip__surface[dir=rtl]{text-align:right}.mdc-tooltip__surface .mdc-tooltip__title{margin:0 8px}.mdc-tooltip__surface .mdc-tooltip__content{max-width:calc(200px - (2 * 8px));margin:8px;text-align:left}[dir=rtl] .mdc-tooltip__surface .mdc-tooltip__content,.mdc-tooltip__surface .mdc-tooltip__content[dir=rtl]{text-align:right}.mdc-tooltip--rich .mdc-tooltip__surface .mdc-tooltip__content{max-width:calc(320px - (2 * 8px));align-self:stretch}.mdc-tooltip__surface .mdc-tooltip__content-link{text-decoration:none}.mdc-tooltip--rich-actions,.mdc-tooltip__content,.mdc-tooltip__title{z-index:1}.mdc-tooltip__surface-animation{opacity:0;transform:scale(0.8);will-change:transform,opacity}.mdc-tooltip--shown .mdc-tooltip__surface-animation{transform:scale(1);opacity:1}.mdc-tooltip--hide .mdc-tooltip__surface-animation{transform:scale(1)}.mdc-tooltip__caret-surface-top,.mdc-tooltip__caret-surface-bottom{position:absolute;height:24px;width:24px;transform:rotate(35deg) skewY(20deg) scaleX(0.9396926208)}.mdc-tooltip__caret-surface-top .mdc-elevation-overlay,.mdc-tooltip__caret-surface-bottom .mdc-elevation-overlay{width:100%;height:100%;top:0;left:0}.mdc-tooltip__caret-surface-bottom{outline:1px solid rgba(0,0,0,0);z-index:-1}@media screen and (forced-colors: active){.mdc-tooltip__caret-surface-bottom{outline-color:CanvasText}}.mdc-tooltip__surface{background-color:var(--mdc-plain-tooltip-container-color, #fff)}.mdc-tooltip__surface{border-radius:var(--mdc-plain-tooltip-container-shape, var(--mdc-shape-small, 4px))}.mdc-tooltip__caret-surface-top,.mdc-tooltip__caret-surface-bottom{border-radius:var(--mdc-plain-tooltip-container-shape, var(--mdc-shape-small, 4px))}.mdc-tooltip__surface{color:var(--mdc-plain-tooltip-supporting-text-color, #000)}.mdc-tooltip__surface{font-family:var(--mdc-plain-tooltip-supporting-text-font, inherit);font-size:var(--mdc-plain-tooltip-supporting-text-size, inherit);font-weight:var(--mdc-plain-tooltip-supporting-text-weight, inherit);letter-spacing:var(--mdc-plain-tooltip-supporting-text-tracking, inherit)}.mat-mdc-tooltip{position:relative;transform:scale(0)}.mat-mdc-tooltip::before{content:"";top:0;right:0;bottom:0;left:0;z-index:-1;position:absolute}.mat-mdc-tooltip-panel-below .mat-mdc-tooltip::before{top:-8px}.mat-mdc-tooltip-panel-above .mat-mdc-tooltip::before{bottom:-8px}.mat-mdc-tooltip-panel-right .mat-mdc-tooltip::before{left:-8px}.mat-mdc-tooltip-panel-left .mat-mdc-tooltip::before{right:-8px}.mat-mdc-tooltip._mat-animation-noopable{animation:none;transform:scale(1)}.mat-mdc-tooltip-panel-non-interactive{pointer-events:none}@keyframes mat-mdc-tooltip-show{0%{opacity:0;transform:scale(0.8)}100%{opacity:1;transform:scale(1)}}@keyframes mat-mdc-tooltip-hide{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(0.8)}}.mat-mdc-tooltip-show{animation:mat-mdc-tooltip-show 150ms cubic-bezier(0, 0, 0.2, 1) forwards}.mat-mdc-tooltip-hide{animation:mat-mdc-tooltip-hide 75ms cubic-bezier(0.4, 0, 1, 1) forwards}'],encapsulation:2,changeDetection:0});(0,ue.X$)("state",[(0,ue.SB)("initial, void, hidden",(0,ue.oB)({opacity:0,transform:"scale(0.8)"})),(0,ue.SB)("visible",(0,ue.oB)({transform:"scale(1)"})),(0,ue.eR)("* => visible",(0,ue.jt)("150ms cubic-bezier(0, 0, 0.2, 1)")),(0,ue.eR)("* => hidden",(0,ue.jt)("75ms cubic-bezier(0.4, 0, 1, 1)"))]);class mt{}mt.\u0275fac=function(Ve){return new(Ve||mt)},mt.\u0275mod=g.oAB({type:mt}),mt.\u0275inj=g.cJS({providers:[ne],imports:[n.rt,E.ez,w.U8,he.BQ,he.BQ,B.ZD]})},11481:(qe,I,p)=>{"use strict";p.d(I,{Dx:()=>ui,H7:()=>Sn,b2:()=>On,h_:()=>Bt,hm:()=>Ni,ok:()=>Yt,q6:()=>mi,se:()=>Z});var o=p(36895),e=p(94650);class l extends o.w_{constructor(){super(...arguments),this.supportsDOMEvents=!0}}class D extends l{static makeCurrent(){(0,o.HT)(new D)}onAndCancel(Le,ce,we){return Le.addEventListener(ce,we,!1),()=>{Le.removeEventListener(ce,we,!1)}}dispatchEvent(Le,ce){Le.dispatchEvent(ce)}remove(Le){Le.parentNode&&Le.parentNode.removeChild(Le)}createElement(Le,ce){return(ce=ce||this.getDefaultDocument()).createElement(Le)}createHtmlDocument(){return document.implementation.createHTMLDocument("fakeTitle")}getDefaultDocument(){return document}isElementNode(Le){return Le.nodeType===Node.ELEMENT_NODE}isShadowRoot(Le){return Le instanceof DocumentFragment}getGlobalEventTarget(Le,ce){return"window"===ce?window:"document"===ce?Le:"body"===ce?Le.body:null}getBaseHref(Le){const ce=function E(){return g=g||document.querySelector("base"),g?g.getAttribute("href"):null}();return null==ce?null:function n(hn){T=T||document.createElement("a"),T.setAttribute("href",hn);const Le=T.pathname;return"/"===Le.charAt(0)?Le:`/${Le}`}(ce)}resetBaseElement(){g=null}getUserAgent(){return window.navigator.userAgent}getCookie(Le){return(0,o.Mx)(document.cookie,Le)}}let T,g=null;const P=new e.OlP("TRANSITION_ID");const B=[{provide:e.ip1,useFactory:function w(hn,Le,ce){return()=>{ce.get(e.CZH).donePromise.then(()=>{const we=(0,o.q)(),Qe=Le.querySelectorAll(`style[ng-transition="${hn}"]`);for(let qt=0;qt<Qe.length;qt++)we.remove(Qe[qt])})}},deps:[P,o.K0,e.zs3],multi:!0}];class V{build(){return new XMLHttpRequest}}V.\u0275fac=function(Le){return new(Le||V)},V.\u0275prov=e.Yz7({token:V,factory:V.\u0275fac});const ue=new e.OlP("EventManagerPlugins");class he{constructor(Le,ce){this._zone=ce,this._eventNameToPlugin=new Map,Le.forEach(we=>{we.manager=this}),this._plugins=Le.slice().reverse()}addEventListener(Le,ce,we){return this._findPluginFor(ce).addEventListener(Le,ce,we)}addGlobalEventListener(Le,ce,we){return this._findPluginFor(ce).addGlobalEventListener(Le,ce,we)}getZone(){return this._zone}_findPluginFor(Le){const ce=this._eventNameToPlugin.get(Le);if(ce)return ce;const we=this._plugins;for(let Qe=0;Qe<we.length;Qe++){const qt=we[Qe];if(qt.supports(Le))return this._eventNameToPlugin.set(Le,qt),qt}throw new Error(`No event manager plugin found for event ${Le}`)}}he.\u0275fac=function(Le){return new(Le||he)(e.LFG(ue),e.LFG(e.R0b))},he.\u0275prov=e.Yz7({token:he,factory:he.\u0275fac});class ae{constructor(Le){this._doc=Le}addGlobalEventListener(Le,ce,we){const Qe=(0,o.q)().getGlobalEventTarget(this._doc,Le);if(!Qe)throw new Error(`Unsupported event target ${Qe} for event ${ce}`);return this.addEventListener(Qe,ce,we)}}class X{constructor(){this.usageCount=new Map}addStyles(Le){for(const ce of Le)1===this.changeUsageCount(ce,1)&&this.onStyleAdded(ce)}removeStyles(Le){for(const ce of Le)0===this.changeUsageCount(ce,-1)&&this.onStyleRemoved(ce)}onStyleRemoved(Le){}onStyleAdded(Le){}getAllStyles(){return this.usageCount.keys()}changeUsageCount(Le,ce){const we=this.usageCount;let Qe=we.get(Le)??0;return Qe+=ce,Qe>0?we.set(Le,Qe):we.delete(Le),Qe}ngOnDestroy(){for(const Le of this.getAllStyles())this.onStyleRemoved(Le);this.usageCount.clear()}}X.\u0275fac=function(Le){return new(Le||X)},X.\u0275prov=e.Yz7({token:X,factory:X.\u0275fac});class ve extends X{constructor(Le){super(),this.doc=Le,this.styleRef=new Map,this.hostNodes=new Set,this.resetHostNodes()}onStyleAdded(Le){for(const ce of this.hostNodes)this.addStyleToHost(ce,Le)}onStyleRemoved(Le){const ce=this.styleRef;ce.get(Le)?.forEach(Qe=>Qe.remove()),ce.delete(Le)}ngOnDestroy(){super.ngOnDestroy(),this.styleRef.clear(),this.resetHostNodes()}addHost(Le){this.hostNodes.add(Le);for(const ce of this.getAllStyles())this.addStyleToHost(Le,ce)}removeHost(Le){this.hostNodes.delete(Le)}addStyleToHost(Le,ce){const we=this.doc.createElement("style");we.textContent=ce,Le.appendChild(we);const Qe=this.styleRef.get(ce);Qe?Qe.push(we):this.styleRef.set(ce,[we])}resetHostNodes(){const Le=this.hostNodes;Le.clear(),Le.add(this.doc.head)}}ve.\u0275fac=function(Le){return new(Le||ve)(e.LFG(o.K0))},ve.\u0275prov=e.Yz7({token:ve,factory:ve.\u0275fac});const ye={svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/",math:"http://www.w3.org/1998/MathML/"},ge=/%COMP%/g,Pe="_nghost-%COMP%",xe="_ngcontent-%COMP%",re=new e.OlP("RemoveStylesOnCompDestory",{providedIn:"root",factory:()=>false});function be(hn,Le){return Le.flat(100).map(ce=>ce.replace(ge,hn))}function le(hn){return Le=>{if("__ngUnwrap__"===Le)return hn;!1===hn(Le)&&(Le.preventDefault(),Le.returnValue=!1)}}class Z{constructor(Le,ce,we,Qe){this.eventManager=Le,this.sharedStylesHost=ce,this.appId=we,this.removeStylesOnCompDestory=Qe,this.rendererByCompId=new Map,this.defaultRenderer=new Oe(Le)}createRenderer(Le,ce){if(!Le||!ce)return this.defaultRenderer;const we=this.getOrCreateRenderer(Le,ce);return we instanceof ut?we.applyToHost(Le):we instanceof mt&&we.applyStyles(),we}getOrCreateRenderer(Le,ce){const we=this.rendererByCompId;let Qe=we.get(ce.id);if(!Qe){const qt=this.eventManager,Tn=this.sharedStylesHost,lr=this.removeStylesOnCompDestory;switch(ce.encapsulation){case e.ifc.Emulated:Qe=new ut(qt,Tn,ce,this.appId,lr);break;case e.ifc.ShadowDom:return new nt(qt,Tn,Le,ce);default:Qe=new mt(qt,Tn,ce,lr)}Qe.onDestroy=()=>we.delete(ce.id),we.set(ce.id,Qe)}return Qe}ngOnDestroy(){this.rendererByCompId.clear()}begin(){}end(){}}Z.\u0275fac=function(Le){return new(Le||Z)(e.LFG(he),e.LFG(ve),e.LFG(e.AFp),e.LFG(re))},Z.\u0275prov=e.Yz7({token:Z,factory:Z.\u0275fac});class Oe{constructor(Le){this.eventManager=Le,this.data=Object.create(null),this.destroyNode=null}destroy(){}createElement(Le,ce){return ce?document.createElementNS(ye[ce]||ce,Le):document.createElement(Le)}createComment(Le){return document.createComment(Le)}createText(Le){return document.createTextNode(Le)}appendChild(Le,ce){(Be(Le)?Le.content:Le).appendChild(ce)}insertBefore(Le,ce,we){Le&&(Be(Le)?Le.content:Le).insertBefore(ce,we)}removeChild(Le,ce){Le&&Le.removeChild(ce)}selectRootElement(Le,ce){let we="string"==typeof Le?document.querySelector(Le):Le;if(!we)throw new Error(`The selector "${Le}" did not match any elements`);return ce||(we.textContent=""),we}parentNode(Le){return Le.parentNode}nextSibling(Le){return Le.nextSibling}setAttribute(Le,ce,we,Qe){if(Qe){ce=Qe+":"+ce;const qt=ye[Qe];qt?Le.setAttributeNS(qt,ce,we):Le.setAttribute(ce,we)}else Le.setAttribute(ce,we)}removeAttribute(Le,ce,we){if(we){const Qe=ye[we];Qe?Le.removeAttributeNS(Qe,ce):Le.removeAttribute(`${we}:${ce}`)}else Le.removeAttribute(ce)}addClass(Le,ce){Le.classList.add(ce)}removeClass(Le,ce){Le.classList.remove(ce)}setStyle(Le,ce,we,Qe){Qe&(e.JOm.DashCase|e.JOm.Important)?Le.style.setProperty(ce,we,Qe&e.JOm.Important?"important":""):Le.style[ce]=we}removeStyle(Le,ce,we){we&e.JOm.DashCase?Le.style.removeProperty(ce):Le.style[ce]=""}setProperty(Le,ce,we){Le[ce]=we}setValue(Le,ce){Le.nodeValue=ce}listen(Le,ce,we){return"string"==typeof Le?this.eventManager.addGlobalEventListener(Le,ce,le(we)):this.eventManager.addEventListener(Le,ce,le(we))}}"@".charCodeAt(0);function Be(hn){return"TEMPLATE"===hn.tagName&&void 0!==hn.content}class nt extends Oe{constructor(Le,ce,we,Qe){super(Le),this.sharedStylesHost=ce,this.hostEl=we,this.shadowRoot=we.attachShadow({mode:"open"}),this.sharedStylesHost.addHost(this.shadowRoot);const qt=be(Qe.id,Qe.styles);for(const Tn of qt){const lr=document.createElement("style");lr.textContent=Tn,this.shadowRoot.appendChild(lr)}}nodeOrShadowRoot(Le){return Le===this.hostEl?this.shadowRoot:Le}appendChild(Le,ce){return super.appendChild(this.nodeOrShadowRoot(Le),ce)}insertBefore(Le,ce,we){return super.insertBefore(this.nodeOrShadowRoot(Le),ce,we)}removeChild(Le,ce){return super.removeChild(this.nodeOrShadowRoot(Le),ce)}parentNode(Le){return this.nodeOrShadowRoot(super.parentNode(this.nodeOrShadowRoot(Le)))}destroy(){this.sharedStylesHost.removeHost(this.shadowRoot)}}class mt extends Oe{constructor(Le,ce,we,Qe,qt=we.id){super(Le),this.sharedStylesHost=ce,this.removeStylesOnCompDestory=Qe,this.rendererUsageCount=0,this.styles=be(qt,we.styles)}applyStyles(){this.sharedStylesHost.addStyles(this.styles),this.rendererUsageCount++}destroy(){this.removeStylesOnCompDestory&&(this.sharedStylesHost.removeStyles(this.styles),this.rendererUsageCount--,0===this.rendererUsageCount&&this.onDestroy?.())}}class ut extends mt{constructor(Le,ce,we,Qe,qt){const Tn=Qe+"-"+we.id;super(Le,ce,we,qt,Tn),this.contentAttr=function oe(hn){return xe.replace(ge,hn)}(Tn),this.hostAttr=function me(hn){return Pe.replace(ge,hn)}(Tn)}applyToHost(Le){this.applyStyles(),this.setAttribute(Le,this.hostAttr,"")}createElement(Le,ce){const we=super.createElement(Le,ce);return super.setAttribute(we,this.contentAttr,""),we}}class Ve extends ae{constructor(Le){super(Le)}supports(Le){return!0}addEventListener(Le,ce,we){return Le.addEventListener(ce,we,!1),()=>this.removeEventListener(Le,ce,we)}removeEventListener(Le,ce,we){return Le.removeEventListener(ce,we)}}Ve.\u0275fac=function(Le){return new(Le||Ve)(e.LFG(o.K0))},Ve.\u0275prov=e.Yz7({token:Ve,factory:Ve.\u0275fac});const tt=["alt","control","meta","shift"],Ne={"\b":"Backspace","\t":"Tab","\x7f":"Delete","\x1b":"Escape",Del:"Delete",Esc:"Escape",Left:"ArrowLeft",Right:"ArrowRight",Up:"ArrowUp",Down:"ArrowDown",Menu:"ContextMenu",Scroll:"ScrollLock",Win:"OS"},wt={alt:hn=>hn.altKey,control:hn=>hn.ctrlKey,meta:hn=>hn.metaKey,shift:hn=>hn.shiftKey};class ft extends ae{constructor(Le){super(Le)}supports(Le){return null!=ft.parseEventName(Le)}addEventListener(Le,ce,we){const Qe=ft.parseEventName(ce),qt=ft.eventCallback(Qe.fullKey,we,this.manager.getZone());return this.manager.getZone().runOutsideAngular(()=>(0,o.q)().onAndCancel(Le,Qe.domEventName,qt))}static parseEventName(Le){const ce=Le.toLowerCase().split("."),we=ce.shift();if(0===ce.length||"keydown"!==we&&"keyup"!==we)return null;const Qe=ft._normalizeKey(ce.pop());let qt="",Tn=ce.indexOf("code");if(Tn>-1&&(ce.splice(Tn,1),qt="code."),tt.forEach(mo=>{const rr=ce.indexOf(mo);rr>-1&&(ce.splice(rr,1),qt+=mo+".")}),qt+=Qe,0!=ce.length||0===Qe.length)return null;const lr={};return lr.domEventName=we,lr.fullKey=qt,lr}static matchEventFullKeyCode(Le,ce){let we=Ne[Le.key]||Le.key,Qe="";return ce.indexOf("code.")>-1&&(we=Le.code,Qe="code."),!(null==we||!we)&&(we=we.toLowerCase()," "===we?we="space":"."===we&&(we="dot"),tt.forEach(qt=>{if(qt!==we){(0,wt[qt])(Le)&&(Qe+=qt+".")}}),Qe+=we,Qe===ce)}static eventCallback(Le,ce,we){return Qe=>{ft.matchEventFullKeyCode(Qe,Le)&&we.runGuarded(()=>ce(Qe))}}static _normalizeKey(Le){return"esc"===Le?"escape":Le}}ft.\u0275fac=function(Le){return new(Le||ft)(e.LFG(o.K0))},ft.\u0275prov=e.Yz7({token:ft,factory:ft.\u0275fac});const Gi=[{provide:e.Lbi,useValue:o.bD},{provide:e.g9A,useValue:function Dn(){D.makeCurrent()},multi:!0},{provide:o.K0,useFactory:function vi(){return(0,e.RDi)(document),document},deps:[]}],mi=(0,e.eFA)(e._c5,"browser",Gi),wi=new e.OlP(""),Bn=[{provide:e.rWj,useClass:class Y{addToWindow(Le){e.dqk.getAngularTestability=(we,Qe=!0)=>{const qt=Le.findTestabilityInTree(we,Qe);if(null==qt)throw new Error("Could not find testability for element.");return qt},e.dqk.getAllAngularTestabilities=()=>Le.getAllTestabilities(),e.dqk.getAllAngularRootElements=()=>Le.getAllRootElements();e.dqk.frameworkStabilizers||(e.dqk.frameworkStabilizers=[]),e.dqk.frameworkStabilizers.push(we=>{const Qe=e.dqk.getAllAngularTestabilities();let qt=Qe.length,Tn=!1;const lr=function(mo){Tn=Tn||mo,qt--,0==qt&&we(Tn)};Qe.forEach(function(mo){mo.whenStable(lr)})})}findTestabilityInTree(Le,ce,we){if(null==ce)return null;return Le.getTestability(ce)??(we?(0,o.q)().isShadowRoot(ce)?this.findTestabilityInTree(Le,ce.host,!0):this.findTestabilityInTree(Le,ce.parentElement,!0):null)}},deps:[]},{provide:e.lri,useClass:e.dDg,deps:[e.R0b,e.eoX,e.rWj]},{provide:e.dDg,useClass:e.dDg,deps:[e.R0b,e.eoX,e.rWj]}],kn=[{provide:e.zSh,useValue:"root"},{provide:e.qLn,useFactory:function Mn(){return new e.qLn},deps:[]},{provide:ue,useClass:Ve,multi:!0,deps:[o.K0,e.R0b,e.Lbi]},{provide:ue,useClass:ft,multi:!0,deps:[o.K0]},{provide:Z,useClass:Z,deps:[he,ve,e.AFp,re]},{provide:e.FYo,useExisting:Z},{provide:X,useExisting:ve},{provide:ve,useClass:ve,deps:[o.K0]},{provide:he,useClass:he,deps:[ue,e.R0b]},{provide:o.JF,useClass:V,deps:[]},[]];class On{constructor(Le){false}static withServerTransition(Le){return{ngModule:On,providers:[{provide:e.AFp,useValue:Le.appId},{provide:P,useExisting:e.AFp},B]}}}On.\u0275fac=function(Le){return new(Le||On)(e.LFG(wi,12))},On.\u0275mod=e.oAB({type:On}),On.\u0275inj=e.cJS({providers:[...kn,...Bn],imports:[o.ez,e.hGG]});class Bt{constructor(Le){this._doc=Le,this._dom=(0,o.q)()}addTag(Le,ce=!1){return Le?this._getOrCreateElement(Le,ce):null}addTags(Le,ce=!1){return Le?Le.reduce((we,Qe)=>(Qe&&we.push(this._getOrCreateElement(Qe,ce)),we),[]):[]}getTag(Le){return Le&&this._doc.querySelector(`meta[${Le}]`)||null}getTags(Le){if(!Le)return[];const ce=this._doc.querySelectorAll(`meta[${Le}]`);return ce?[].slice.call(ce):[]}updateTag(Le,ce){if(!Le)return null;ce=ce||this._parseSelector(Le);const we=this.getTag(ce);return we?this._setMetaElementAttributes(Le,we):this._getOrCreateElement(Le,!0)}removeTag(Le){this.removeTagElement(this.getTag(Le))}removeTagElement(Le){Le&&this._dom.remove(Le)}_getOrCreateElement(Le,ce=!1){if(!ce){const qt=this._parseSelector(Le),Tn=this.getTags(qt).filter(lr=>this._containsAttributes(Le,lr))[0];if(void 0!==Tn)return Tn}const we=this._dom.createElement("meta");return this._setMetaElementAttributes(Le,we),this._doc.getElementsByTagName("head")[0].appendChild(we),we}_setMetaElementAttributes(Le,ce){return Object.keys(Le).forEach(we=>ce.setAttribute(this._getMetaKeyMap(we),Le[we])),ce}_parseSelector(Le){const ce=Le.name?"name":"property";return`${ce}="${Le[ce]}"`}_containsAttributes(Le,ce){return Object.keys(Le).every(we=>ce.getAttribute(this._getMetaKeyMap(we))===Le[we])}_getMetaKeyMap(Le){return xn[Le]||Le}}Bt.\u0275fac=function(Le){return new(Le||Bt)(e.LFG(o.K0))},Bt.\u0275prov=e.Yz7({token:Bt,factory:function(Le){let ce=null;return ce=Le?new Le:function je(){return new Bt((0,e.LFG)(o.K0))}(),ce},providedIn:"root"});const xn={httpEquiv:"http-equiv"};class ui{constructor(Le){this._doc=Le}getTitle(){return this._doc.title}setTitle(Le){this._doc.title=Le||""}}ui.\u0275fac=function(Le){return new(Le||ui)(e.LFG(o.K0))},ui.\u0275prov=e.Yz7({token:ui,factory:function(Le){let ce=null;return ce=Le?new Le:function Fn(){return new ui((0,e.LFG)(o.K0))}(),ce},providedIn:"root"});typeof window<"u"&&window;class Gr{constructor(){this.store={},this.onSerializeCallbacks={},this.store=function zr(hn,Le){const ce=hn.getElementById(Le+"-state");let we={};if(ce&&ce.textContent)try{we=JSON.parse(function gr(hn){const Le={"&a;":"&","&q;":'"',"&s;":"'","&l;":"<","&g;":">"};return hn.replace(/&[^;]+;/g,ce=>Le[ce])}(ce.textContent))}catch(Qe){console.warn("Exception while restoring TransferState for app "+Le,Qe)}return we}((0,e.f3M)(o.K0),(0,e.f3M)(e.AFp))}get(Le,ce){return void 0!==this.store[Le]?this.store[Le]:ce}set(Le,ce){this.store[Le]=ce}remove(Le){delete this.store[Le]}hasKey(Le){return this.store.hasOwnProperty(Le)}get isEmpty(){return 0===Object.keys(this.store).length}onSerialize(Le,ce){this.onSerializeCallbacks[Le]=ce}toJson(){for(const Le in this.onSerializeCallbacks)if(this.onSerializeCallbacks.hasOwnProperty(Le))try{this.store[Le]=this.onSerializeCallbacks[Le]()}catch(ce){console.warn("Exception in onSerialize callback: ",ce)}return JSON.stringify(this.store)}}Gr.\u0275fac=function(Le){return new(Le||Gr)},Gr.\u0275prov=e.Yz7({token:Gr,factory:Gr.\u0275fac,providedIn:"root"});class Eo{}Eo.\u0275fac=function(Le){return new(Le||Eo)},Eo.\u0275mod=e.oAB({type:Eo}),Eo.\u0275inj=e.cJS({});const ct={pan:!0,panstart:!0,panmove:!0,panend:!0,pancancel:!0,panleft:!0,panright:!0,panup:!0,pandown:!0,pinch:!0,pinchstart:!0,pinchmove:!0,pinchend:!0,pinchcancel:!0,pinchin:!0,pinchout:!0,press:!0,pressup:!0,rotate:!0,rotatestart:!0,rotatemove:!0,rotateend:!0,rotatecancel:!0,swipe:!0,swipeleft:!0,swiperight:!0,swipeup:!0,swipedown:!0,tap:!0,doubletap:!0},Yt=new e.OlP("HammerGestureConfig"),oi=new e.OlP("HammerLoader");class Ni{constructor(){this.events=[],this.overrides={}}buildHammer(Le){const ce=new Hammer(Le,this.options);ce.get("pinch").set({enable:!0}),ce.get("rotate").set({enable:!0});for(const we in this.overrides)ce.get(we).set(this.overrides[we]);return ce}}Ni.\u0275fac=function(Le){return new(Le||Ni)},Ni.\u0275prov=e.Yz7({token:Ni,factory:Ni.\u0275fac});class Nn extends ae{constructor(Le,ce,we,Qe){super(Le),this._config=ce,this.console=we,this.loader=Qe,this._loaderPromise=null}supports(Le){return!(!ct.hasOwnProperty(Le.toLowerCase())&&!this.isCustomEvent(Le)||!window.Hammer&&!this.loader)}addEventListener(Le,ce,we){const Qe=this.manager.getZone();if(ce=ce.toLowerCase(),!window.Hammer&&this.loader){this._loaderPromise=this._loaderPromise||Qe.runOutsideAngular(()=>this.loader());let qt=!1,Tn=()=>{qt=!0};return Qe.runOutsideAngular(()=>this._loaderPromise.then(()=>{window.Hammer?qt||(Tn=this.addEventListener(Le,ce,we)):Tn=()=>{}}).catch(()=>{Tn=()=>{}})),()=>{Tn()}}return Qe.runOutsideAngular(()=>{const qt=this._config.buildHammer(Le),Tn=function(lr){Qe.runGuarded(function(){we(lr)})};return qt.on(ce,Tn),()=>{qt.off(ce,Tn),"function"==typeof qt.destroy&&qt.destroy()}})}isCustomEvent(Le){return this._config.events.indexOf(Le)>-1}}Nn.\u0275fac=function(Le){return new(Le||Nn)(e.LFG(o.K0),e.LFG(Yt),e.LFG(e.c2e),e.LFG(oi,8))},Nn.\u0275prov=e.Yz7({token:Nn,factory:Nn.\u0275fac});class pr{}pr.\u0275fac=function(Le){return new(Le||pr)},pr.\u0275mod=e.oAB({type:pr}),pr.\u0275inj=e.cJS({providers:[{provide:ue,useClass:Nn,multi:!0,deps:[o.K0,Yt,e.c2e,[new e.FiY,oi]]},{provide:Yt,useClass:Ni,deps:[]}]});class Sn{}Sn.\u0275fac=function(Le){return new(Le||Sn)},Sn.\u0275prov=e.Yz7({token:Sn,factory:function(Le){let ce=null;return ce=Le?new(Le||Sn):e.LFG(Nt),ce},providedIn:"root"});class Nt extends Sn{constructor(Le){super(),this._doc=Le}sanitize(Le,ce){if(null==ce)return null;switch(Le){case e.q3G.NONE:return ce;case e.q3G.HTML:return(0,e.qzn)(ce,"HTML")?(0,e.z3N)(ce):(0,e.EiD)(this._doc,String(ce)).toString();case e.q3G.STYLE:return(0,e.qzn)(ce,"Style")?(0,e.z3N)(ce):ce;case e.q3G.SCRIPT:if((0,e.qzn)(ce,"Script"))return(0,e.z3N)(ce);throw new Error("unsafe value used in a script context");case e.q3G.URL:return(0,e.qzn)(ce,"URL")?(0,e.z3N)(ce):(0,e.mCW)(String(ce));case e.q3G.RESOURCE_URL:if((0,e.qzn)(ce,"ResourceURL"))return(0,e.z3N)(ce);throw new Error(`unsafe value used in a resource URL context (see ${e.JZr})`);default:throw new Error(`Unexpected SecurityContext ${Le} (see ${e.JZr})`)}}bypassSecurityTrustHtml(Le){return(0,e.JVY)(Le)}bypassSecurityTrustStyle(Le){return(0,e.L6k)(Le)}bypassSecurityTrustScript(Le){return(0,e.eBb)(Le)}bypassSecurityTrustUrl(Le){return(0,e.LAX)(Le)}bypassSecurityTrustResourceUrl(Le){return(0,e.pB0)(Le)}}Nt.\u0275fac=function(Le){return new(Le||Nt)(e.LFG(o.K0))},Nt.\u0275prov=e.Yz7({token:Nt,factory:function(Le){let ce=null;return ce=Le?new Le:function Pn(hn){return new Nt(hn.get(o.K0))}(e.LFG(e.zs3)),ce},providedIn:"root"});new e.GfV("15.2.9")},9116:(qe,I,p)=>{"use strict";p.d(I,{gz:()=>ur,y6:()=>_i,gk:()=>It,m2:()=>at,OD:()=>Wn,eC:()=>tt,wN:()=>_l,F0:()=>nr,rH:()=>oa,Bz:()=>Xc,Hx:()=>vn});var o=p(94650),e=p(32076),l=p(39646),D=p(61135),g=p(86805),E=p(39841),T=p(97272),n=p(49770),P=p(89635),w=p(62843),B=p(69751),Y=p(60515),V=p(94033),ue=p(77579),he=p(36895),ae=p(54004),X=p(63900),ve=p(95698),ye=p(68675),ge=p(39300),ne=p(95577),pe=p(50590),Pe=p(24351),xe=p(18505),de=p(70262),re=p(22940),oe=p(54482),me=p(25403);function be(et){return et<=0?()=>Y.E:(0,oe.e)((Ae,Ge)=>{let xt=[];Ae.subscribe((0,me.x)(Ge,Ht=>{xt.push(Ht),et<xt.length&&xt.shift()},()=>{for(const Ht of xt)Ge.next(Ht);Ge.complete()},void 0,()=>{xt=null}))})}var le=p(18068),Z=p(46590),Oe=p(44671);function j(et,Ae){const Ge=arguments.length>=2;return xt=>xt.pipe(et?(0,ge.h)((Ht,_n)=>et(Ht,_n,xt)):Oe.y,be(1),Ge?(0,Z.d)(Ae):(0,le.T)(()=>new g.K))}var ke=p(22529),Be=p(69718),nt=p(28746),mt=p(38343),ut=p(8189),Ve=p(11481);const tt="primary",Ne=Symbol("RouteTitle");class wt{constructor(Ae){this.params=Ae||{}}has(Ae){return Object.prototype.hasOwnProperty.call(this.params,Ae)}get(Ae){if(this.has(Ae)){const Ge=this.params[Ae];return Array.isArray(Ge)?Ge[0]:Ge}return null}getAll(Ae){if(this.has(Ae)){const Ge=this.params[Ae];return Array.isArray(Ge)?Ge:[Ge]}return[]}get keys(){return Object.keys(this.params)}}function ft(et){return new wt(et)}function Ct(et,Ae,Ge){const xt=Ge.path.split("/");if(xt.length>et.length||"full"===Ge.pathMatch&&(Ae.hasChildren()||xt.length<et.length))return null;const Ht={};for(let _n=0;_n<xt.length;_n++){const li=xt[_n],dr=et[_n];if(li.startsWith(":"))Ht[li.substring(1)]=dr;else if(li!==dr.path)return null}return{consumed:et.slice(0,xt.length),posParams:Ht}}function He(et,Ae){const Ge=et?Object.keys(et):void 0,xt=Ae?Object.keys(Ae):void 0;if(!Ge||!xt||Ge.length!=xt.length)return!1;let Ht;for(let _n=0;_n<Ge.length;_n++)if(Ht=Ge[_n],!st(et[Ht],Ae[Ht]))return!1;return!0}function st(et,Ae){if(Array.isArray(et)&&Array.isArray(Ae)){if(et.length!==Ae.length)return!1;const Ge=[...et].sort(),xt=[...Ae].sort();return Ge.every((Ht,_n)=>xt[_n]===Ht)}return et===Ae}function nn(et){return Array.prototype.concat.apply([],et)}function Dn(et){return et.length>0?et[et.length-1]:null}function vi(et,Ae){for(const Ge in et)et.hasOwnProperty(Ge)&&Ae(et[Ge],Ge)}function Gi(et){return(0,o.CqO)(et)?et:(0,o.QGY)(et)?(0,e.D)(Promise.resolve(et)):(0,l.of)(et)}const mi=!1,wi={exact:function je(et,Ae,Ge){if(!Hn(et.segments,Ae.segments)||!ui(et.segments,Ae.segments,Ge)||et.numberOfChildren!==Ae.numberOfChildren)return!1;for(const xt in Ae.children)if(!et.children[xt]||!je(et.children[xt],Ae.children[xt],Ge))return!1;return!0},subset:xn},Bn={exact:function On(et,Ae){return He(et,Ae)},subset:function Bt(et,Ae){return Object.keys(Ae).length<=Object.keys(et).length&&Object.keys(Ae).every(Ge=>st(et[Ge],Ae[Ge]))},ignored:()=>!0};function kn(et,Ae,Ge){return wi[Ge.paths](et.root,Ae.root,Ge.matrixParams)&&Bn[Ge.queryParams](et.queryParams,Ae.queryParams)&&!("exact"===Ge.fragment&&et.fragment!==Ae.fragment)}function xn(et,Ae,Ge){return Fn(et,Ae,Ae.segments,Ge)}function Fn(et,Ae,Ge,xt){if(et.segments.length>Ge.length){const Ht=et.segments.slice(0,Ge.length);return!(!Hn(Ht,Ge)||Ae.hasChildren()||!ui(Ht,Ge,xt))}if(et.segments.length===Ge.length){if(!Hn(et.segments,Ge)||!ui(et.segments,Ge,xt))return!1;for(const Ht in Ae.children)if(!et.children[Ht]||!xn(et.children[Ht],Ae.children[Ht],xt))return!1;return!0}{const Ht=Ge.slice(0,et.segments.length),_n=Ge.slice(et.segments.length);return!!(Hn(et.segments,Ht)&&ui(et.segments,Ht,xt)&&et.children[tt])&&Fn(et.children[tt],Ae,_n,xt)}}function ui(et,Ae,Ge){return Ae.every((xt,Ht)=>Bn[Ge](et[Ht].parameters,xt.parameters))}class Ai{constructor(Ae=new si([],{}),Ge={},xt=null){this.root=Ae,this.queryParams=Ge,this.fragment=xt,mi}get queryParamMap(){return this._queryParamMap||(this._queryParamMap=ft(this.queryParams)),this._queryParamMap}toString(){return Zi.serialize(this)}}class si{constructor(Ae,Ge){this.segments=Ae,this.children=Ge,this.parent=null,vi(Ge,(xt,Ht)=>xt.parent=this)}hasChildren(){return this.numberOfChildren>0}get numberOfChildren(){return Object.keys(this.children).length}toString(){return gr(this)}}class Vi{constructor(Ae,Ge){this.path=Ae,this.parameters=Ge}get parameterMap(){return this._parameterMap||(this._parameterMap=ft(this.parameters)),this._parameterMap}toString(){return Yt(this)}}function Hn(et,Ae){return et.length===Ae.length&&et.every((Ge,xt)=>Ge.path===Ae[xt].path)}class vn{}vn.\u0275fac=function(Ae){return new(Ae||vn)},vn.\u0275prov=o.Yz7({token:vn,factory:function(){return new In},providedIn:"root"});class In{parse(Ae){const Ge=new hn(Ae);return new Ai(Ge.parseRootSegment(),Ge.parseQueryParams(),Ge.parseFragment())}serialize(Ae){const Ge=`/${Hi(Ae.root,!0)}`,xt=function Ni(et){const Ae=Object.keys(et).map(Ge=>{const xt=et[Ge];return Array.isArray(xt)?xt.map(Ht=>`${zr(Ge)}=${zr(Ht)}`).join("&"):`${zr(Ge)}=${zr(xt)}`}).filter(Ge=>!!Ge);return Ae.length?`?${Ae.join("&")}`:""}(Ae.queryParams);return`${Ge}${xt}${"string"==typeof Ae.fragment?`#${function Eo(et){return encodeURI(et)}(Ae.fragment)}`:""}`}}const Zi=new In;function gr(et){return et.segments.map(Ae=>Yt(Ae)).join("/")}function Hi(et,Ae){if(!et.hasChildren())return gr(et);if(Ae){const Ge=et.children[tt]?Hi(et.children[tt],!1):"",xt=[];return vi(et.children,(Ht,_n)=>{_n!==tt&&xt.push(`${_n}:${Hi(Ht,!1)}`)}),xt.length>0?`${Ge}(${xt.join("//")})`:Ge}{const Ge=function An(et,Ae){let Ge=[];return vi(et.children,(xt,Ht)=>{Ht===tt&&(Ge=Ge.concat(Ae(xt,Ht)))}),vi(et.children,(xt,Ht)=>{Ht!==tt&&(Ge=Ge.concat(Ae(xt,Ht)))}),Ge}(et,(xt,Ht)=>Ht===tt?[Hi(et.children[tt],!1)]:[`${Ht}:${Hi(xt,!1)}`]);return 1===Object.keys(et.children).length&&null!=et.children[tt]?`${gr(et)}/${Ge[0]}`:`${gr(et)}/(${Ge.join("//")})`}}function Gr(et){return encodeURIComponent(et).replace(/%40/g,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",")}function zr(et){return Gr(et).replace(/%3B/gi,";")}function mr(et){return Gr(et).replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/%26/gi,"&")}function jn(et){return decodeURIComponent(et)}function ct(et){return jn(et.replace(/\+/g,"%20"))}function Yt(et){return`${mr(et.path)}${function oi(et){return Object.keys(et).map(Ae=>`;${mr(Ae)}=${mr(et[Ae])}`).join("")}(et.parameters)}`}const Nn=/^[^\/()?;=#]+/;function pr(et){const Ae=et.match(Nn);return Ae?Ae[0]:""}const Sn=/^[^=?&#]+/;const Nt=/^[^&#]+/;class hn{constructor(Ae){this.url=Ae,this.remaining=Ae}parseRootSegment(){return this.consumeOptional("/"),""===this.remaining||this.peekStartsWith("?")||this.peekStartsWith("#")?new si([],{}):new si([],this.parseChildren())}parseQueryParams(){const Ae={};if(this.consumeOptional("?"))do{this.parseQueryParam(Ae)}while(this.consumeOptional("&"));return Ae}parseFragment(){return this.consumeOptional("#")?decodeURIComponent(this.remaining):null}parseChildren(){if(""===this.remaining)return{};this.consumeOptional("/");const Ae=[];for(this.peekStartsWith("(")||Ae.push(this.parseSegment());this.peekStartsWith("/")&&!this.peekStartsWith("//")&&!this.peekStartsWith("/(");)this.capture("/"),Ae.push(this.parseSegment());let Ge={};this.peekStartsWith("/(")&&(this.capture("/"),Ge=this.parseParens(!0));let xt={};return this.peekStartsWith("(")&&(xt=this.parseParens(!1)),(Ae.length>0||Object.keys(Ge).length>0)&&(xt[tt]=new si(Ae,Ge)),xt}parseSegment(){const Ae=pr(this.remaining);if(""===Ae&&this.peekStartsWith(";"))throw new o.vHH(4009,mi);return this.capture(Ae),new Vi(jn(Ae),this.parseMatrixParams())}parseMatrixParams(){const Ae={};for(;this.consumeOptional(";");)this.parseParam(Ae);return Ae}parseParam(Ae){const Ge=pr(this.remaining);if(!Ge)return;this.capture(Ge);let xt="";if(this.consumeOptional("=")){const Ht=pr(this.remaining);Ht&&(xt=Ht,this.capture(xt))}Ae[jn(Ge)]=jn(xt)}parseQueryParam(Ae){const Ge=function Pn(et){const Ae=et.match(Sn);return Ae?Ae[0]:""}(this.remaining);if(!Ge)return;this.capture(Ge);let xt="";if(this.consumeOptional("=")){const li=function ai(et){const Ae=et.match(Nt);return Ae?Ae[0]:""}(this.remaining);li&&(xt=li,this.capture(xt))}const Ht=ct(Ge),_n=ct(xt);if(Ae.hasOwnProperty(Ht)){let li=Ae[Ht];Array.isArray(li)||(li=[li],Ae[Ht]=li),li.push(_n)}else Ae[Ht]=_n}parseParens(Ae){const Ge={};for(this.capture("(");!this.consumeOptional(")")&&this.remaining.length>0;){const xt=pr(this.remaining),Ht=this.remaining[xt.length];if("/"!==Ht&&")"!==Ht&&";"!==Ht)throw new o.vHH(4010,mi);let _n;xt.indexOf(":")>-1?(_n=xt.slice(0,xt.indexOf(":")),this.capture(_n),this.capture(":")):Ae&&(_n=tt);const li=this.parseChildren();Ge[_n]=1===Object.keys(li).length?li[tt]:new si([],li),this.consumeOptional("//")}return Ge}peekStartsWith(Ae){return this.remaining.startsWith(Ae)}consumeOptional(Ae){return!!this.peekStartsWith(Ae)&&(this.remaining=this.remaining.substring(Ae.length),!0)}capture(Ae){if(!this.consumeOptional(Ae))throw new o.vHH(4011,mi)}}function Le(et){return et.segments.length>0?new si([],{[tt]:et}):et}function ce(et){const Ae={};for(const xt of Object.keys(et.children)){const _n=ce(et.children[xt]);(_n.segments.length>0||_n.hasChildren())&&(Ae[xt]=_n)}return function we(et){if(1===et.numberOfChildren&&et.children[tt]){const Ae=et.children[tt];return new si(et.segments.concat(Ae.segments),Ae.children)}return et}(new si(et.segments,Ae))}function Qe(et){return et instanceof Ai}const qt=!1;function lr(et){let Ae;const xt=function Ge(_n){const li={};for(const Sr of _n.children){const fo=Ge(Sr);li[Sr.outlet]=fo}const dr=new si(_n.url,li);return _n===et&&(Ae=dr),dr}(et.root),Ht=Le(xt);return Ae??Ht}function mo(et,Ae,Ge,xt){let Ht=et;for(;Ht.parent;)Ht=Ht.parent;if(0===Ae.length)return Bo(Ht,Ht,Ht,Ge,xt);const _n=Zn(Ae);if(_n.toRoot())return Bo(Ht,Ht,new si([],{}),Ge,xt);const li=function Xn(et,Ae,Ge){if(et.isAbsolute)return new Ci(Ae,!0,0);if(!Ge)return new Ci(Ae,!1,NaN);if(null===Ge.parent)return new Ci(Ge,!0,0);const xt=aa(et.commands[0])?0:1,Ht=Ge.segments.length-1+xt;return gn(Ge,Ht,et.numberOfDoubleDots)}(_n,Ht,et),dr=li.processChildren?Ft(li.segmentGroup,li.index,_n.commands):un(li.segmentGroup,li.index,_n.commands);return Bo(Ht,li.segmentGroup,dr,Ge,xt)}function rr(et,Ae,Ge,xt,Ht){if(0===Ge.length)return Bo(Ae.root,Ae.root,Ae.root,xt,Ht);const _n=Zn(Ge);if(_n.toRoot())return Bo(Ae.root,Ae.root,new si([],{}),xt,Ht);return function li(Sr){const fo=function Et(et,Ae,Ge,xt){if(et.isAbsolute)return new Ci(Ae.root,!0,0);if(-1===xt){const li=Ge===Ae.root;return new Ci(Ge,li,0)}const Ht=aa(et.commands[0])?0:1,_n=xt+Ht;return gn(Ge,_n,et.numberOfDoubleDots)}(_n,Ae,et.snapshot?._urlSegment,Sr),ms=fo.processChildren?Ft(fo.segmentGroup,fo.index,_n.commands):un(fo.segmentGroup,fo.index,_n.commands);return Bo(Ae.root,fo.segmentGroup,ms,xt,Ht)}(et.snapshot?._lastPathIndex)}function aa(et){return"object"==typeof et&&null!=et&&!et.outlets&&!et.segmentPath}function ea(et){return"object"==typeof et&&null!=et&&et.outlets}function Bo(et,Ae,Ge,xt,Ht){let li,_n={};xt&&vi(xt,(Sr,fo)=>{_n[fo]=Array.isArray(Sr)?Sr.map(ms=>`${ms}`):`${Sr}`}),li=et===Ae?Ge:Ii(et,Ae,Ge);const dr=Le(ce(li));return new Ai(dr,_n,Ht)}function Ii(et,Ae,Ge){const xt={};return vi(et.children,(Ht,_n)=>{xt[_n]=Ht===Ae?Ge:Ii(Ht,Ae,Ge)}),new si(et.segments,xt)}class an{constructor(Ae,Ge,xt){if(this.isAbsolute=Ae,this.numberOfDoubleDots=Ge,this.commands=xt,Ae&&xt.length>0&&aa(xt[0]))throw new o.vHH(4003,qt&&"Root segment cannot have matrix parameters");const Ht=xt.find(ea);if(Ht&&Ht!==Dn(xt))throw new o.vHH(4004,qt&&"{outlets:{}} has to be the last command")}toRoot(){return this.isAbsolute&&1===this.commands.length&&"/"==this.commands[0]}}function Zn(et){if("string"==typeof et[0]&&1===et.length&&"/"===et[0])return new an(!0,0,et);let Ae=0,Ge=!1;const xt=et.reduce((Ht,_n,li)=>{if("object"==typeof _n&&null!=_n){if(_n.outlets){const dr={};return vi(_n.outlets,(Sr,fo)=>{dr[fo]="string"==typeof Sr?Sr.split("/"):Sr}),[...Ht,{outlets:dr}]}if(_n.segmentPath)return[...Ht,_n.segmentPath]}return"string"!=typeof _n?[...Ht,_n]:0===li?(_n.split("/").forEach((dr,Sr)=>{0==Sr&&"."===dr||(0==Sr&&""===dr?Ge=!0:".."===dr?Ae++:""!=dr&&Ht.push(dr))}),Ht):[...Ht,_n]},[]);return new an(Ge,Ae,xt)}class Ci{constructor(Ae,Ge,xt){this.segmentGroup=Ae,this.processChildren=Ge,this.index=xt}}function gn(et,Ae,Ge){let xt=et,Ht=Ae,_n=Ge;for(;_n>Ht;){if(_n-=Ht,xt=xt.parent,!xt)throw new o.vHH(4005,qt&&"Invalid number of '../'");Ht=xt.segments.length}return new Ci(xt,!1,Ht-_n)}function un(et,Ae,Ge){if(et||(et=new si([],{})),0===et.segments.length&&et.hasChildren())return Ft(et,Ae,Ge);const xt=function Ut(et,Ae,Ge){let xt=0,Ht=Ae;const _n={match:!1,pathIndex:0,commandIndex:0};for(;Ht<et.segments.length;){if(xt>=Ge.length)return _n;const li=et.segments[Ht],dr=Ge[xt];if(ea(dr))break;const Sr=`${dr}`,fo=xt<Ge.length-1?Ge[xt+1]:null;if(Ht>0&&void 0===Sr)break;if(Sr&&fo&&"object"==typeof fo&&void 0===fo.outlets){if(!Cr(Sr,fo,li))return _n;xt+=2}else{if(!Cr(Sr,{},li))return _n;xt++}Ht++}return{match:!0,pathIndex:Ht,commandIndex:xt}}(et,Ae,Ge),Ht=Ge.slice(xt.commandIndex);if(xt.match&&xt.pathIndex<et.segments.length){const _n=new si(et.segments.slice(0,xt.pathIndex),{});return _n.children[tt]=new si(et.segments.slice(xt.pathIndex),et.children),Ft(_n,0,Ht)}return xt.match&&0===Ht.length?new si(et.segments,{}):xt.match&&!et.hasChildren()?wn(et,Ae,Ge):xt.match?Ft(et,0,Ht):wn(et,Ae,Ge)}function Ft(et,Ae,Ge){if(0===Ge.length)return new si(et.segments,{});{const xt=function ei(et){return ea(et[0])?et[0].outlets:{[tt]:et}}(Ge),Ht={};if(!xt[tt]&&et.children[tt]&&1===et.numberOfChildren&&0===et.children[tt].segments.length){const _n=Ft(et.children[tt],Ae,Ge);return new si(et.segments,_n.children)}return vi(xt,(_n,li)=>{"string"==typeof _n&&(_n=[_n]),null!==_n&&(Ht[li]=un(et.children[li],Ae,_n))}),vi(et.children,(_n,li)=>{void 0===xt[li]&&(Ht[li]=_n)}),new si(et.segments,Ht)}}function wn(et,Ae,Ge){const xt=et.segments.slice(0,Ae);let Ht=0;for(;Ht<Ge.length;){const _n=Ge[Ht];if(ea(_n)){const Sr=Gn(_n.outlets);return new si(xt,Sr)}if(0===Ht&&aa(Ge[0])){const Sr=et.segments[Ae];xt.push(new Vi(Sr.path,xi(Ge[0]))),Ht++;continue}const li=ea(_n)?_n.outlets[tt]:`${_n}`,dr=Ht<Ge.length-1?Ge[Ht+1]:null;li&&dr&&aa(dr)?(xt.push(new Vi(li,xi(dr))),Ht+=2):(xt.push(new Vi(li,{})),Ht++)}return new si(xt,{})}function Gn(et){const Ae={};return vi(et,(Ge,xt)=>{"string"==typeof Ge&&(Ge=[Ge]),null!==Ge&&(Ae[xt]=wn(new si([],{}),0,Ge))}),Ae}function xi(et){const Ae={};return vi(et,(Ge,xt)=>Ae[xt]=`${Ge}`),Ae}function Cr(et,Ae,Ge){return et==Ge.path&&He(Ae,Ge.parameters)}const Fr="imperative";class en{constructor(Ae,Ge){this.id=Ae,this.url=Ge}}class Wn extends en{constructor(Ae,Ge,xt="imperative",Ht=null){super(Ae,Ge),this.type=0,this.navigationTrigger=xt,this.restoredState=Ht}toString(){return`NavigationStart(id: ${this.id}, url: '${this.url}')`}}class at extends en{constructor(Ae,Ge,xt){super(Ae,Ge),this.urlAfterRedirects=xt,this.type=1}toString(){return`NavigationEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}')`}}class It extends en{constructor(Ae,Ge,xt,Ht){super(Ae,Ge),this.reason=xt,this.code=Ht,this.type=2}toString(){return`NavigationCancel(id: ${this.id}, url: '${this.url}')`}}class Qt extends en{constructor(Ae,Ge,xt,Ht){super(Ae,Ge),this.reason=xt,this.code=Ht,this.type=16}}class St extends en{constructor(Ae,Ge,xt,Ht){super(Ae,Ge),this.error=xt,this.target=Ht,this.type=3}toString(){return`NavigationError(id: ${this.id}, url: '${this.url}', error: ${this.error})`}}class Pt extends en{constructor(Ae,Ge,xt,Ht){super(Ae,Ge),this.urlAfterRedirects=xt,this.state=Ht,this.type=4}toString(){return`RoutesRecognized(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class cn extends en{constructor(Ae,Ge,xt,Ht){super(Ae,Ge),this.urlAfterRedirects=xt,this.state=Ht,this.type=7}toString(){return`GuardsCheckStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class Ln extends en{constructor(Ae,Ge,xt,Ht,_n){super(Ae,Ge),this.urlAfterRedirects=xt,this.state=Ht,this.shouldActivate=_n,this.type=8}toString(){return`GuardsCheckEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state}, shouldActivate: ${this.shouldActivate})`}}class ii extends en{constructor(Ae,Ge,xt,Ht){super(Ae,Ge),this.urlAfterRedirects=xt,this.state=Ht,this.type=5}toString(){return`ResolveStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class hi extends en{constructor(Ae,Ge,xt,Ht){super(Ae,Ge),this.urlAfterRedirects=xt,this.state=Ht,this.type=6}toString(){return`ResolveEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class Ri{constructor(Ae){this.route=Ae,this.type=9}toString(){return`RouteConfigLoadStart(path: ${this.route.path})`}}class _r{constructor(Ae){this.route=Ae,this.type=10}toString(){return`RouteConfigLoadEnd(path: ${this.route.path})`}}class er{constructor(Ae){this.snapshot=Ae,this.type=11}toString(){return`ChildActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class Yr{constructor(Ae){this.snapshot=Ae,this.type=12}toString(){return`ChildActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class _o{constructor(Ae){this.snapshot=Ae,this.type=13}toString(){return`ActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class Si{constructor(Ae){this.snapshot=Ae,this.type=14}toString(){return`ActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class to{constructor(Ae,Ge,xt){this.routerEvent=Ae,this.position=Ge,this.anchor=xt,this.type=15}toString(){const Ae=this.position?`${this.position[0]}, ${this.position[1]}`:null;return`Scroll(anchor: '${this.anchor}', position: '${Ae}')`}}class rl{createUrlTree(Ae,Ge,xt,Ht,_n,li){const Sr=rr(Ae||Ge.root,xt,Ht,_n,li);return Sr}}rl.\u0275fac=function(Ae){return new(Ae||rl)},rl.\u0275prov=o.Yz7({token:rl,factory:rl.\u0275fac});class Vs{createUrlTree(Ae,Ge,xt,Ht,_n,li){let dr;try{dr=lr(Ae?Ae.snapshot:Ge.snapshot.root)}catch{("string"!=typeof Ht[0]||!Ht[0].startsWith("/"))&&(Ht=[]),dr=xt.root}return mo(dr,Ht,_n,li)}}Vs.\u0275fac=function(Ae){return new(Ae||Vs)},Vs.\u0275prov=o.Yz7({token:Vs,factory:Vs.\u0275fac});class ps{}ps.\u0275fac=function(Ae){return new(Ae||ps)},ps.\u0275prov=o.Yz7({token:ps,factory:function(et){return rl.\u0275fac(et)},providedIn:"root"});class ts{constructor(Ae){this._root=Ae}get root(){return this._root.value}parent(Ae){const Ge=this.pathFromRoot(Ae);return Ge.length>1?Ge[Ge.length-2]:null}children(Ae){const Ge=gs(Ae,this._root);return Ge?Ge.children.map(xt=>xt.value):[]}firstChild(Ae){const Ge=gs(Ae,this._root);return Ge&&Ge.children.length>0?Ge.children[0].value:null}siblings(Ae){const Ge=tc(Ae,this._root);return Ge.length<2?[]:Ge[Ge.length-2].children.map(Ht=>Ht.value).filter(Ht=>Ht!==Ae)}pathFromRoot(Ae){return tc(Ae,this._root).map(Ge=>Ge.value)}}function gs(et,Ae){if(et===Ae.value)return Ae;for(const Ge of Ae.children){const xt=gs(et,Ge);if(xt)return xt}return null}function tc(et,Ae){if(et===Ae.value)return[Ae];for(const Ge of Ae.children){const xt=tc(et,Ge);if(xt.length)return xt.unshift(Ae),xt}return[]}class $a{constructor(Ae,Ge){this.value=Ae,this.children=Ge}toString(){return`TreeNode(${this.value})`}}function ln(et){const Ae={};return et&&et.children.forEach(Ge=>Ae[Ge.value.outlet]=Ge),Ae}class Mi extends ts{constructor(Ae,Ge){super(Ae),this.snapshot=Ge,Ds(this,Ae)}toString(){return this.snapshot.toString()}}function Di(et,Ae){const Ge=function Er(et,Ae){const Ge={},xt={},Ht={},_n="",li=new Ma([],Ge,Ht,_n,xt,tt,Ae,null,et.root,-1,{});return new Vo("",new $a(li,[]))}(et,Ae),xt=new D.X([new Vi("",{})]),Ht=new D.X({}),_n=new D.X({}),li=new D.X({}),dr=new D.X(""),Sr=new ur(xt,Ht,li,dr,_n,tt,Ae,Ge.root);return Sr.snapshot=Ge.root,new Mi(new $a(Sr,[]),Ge)}class ur{constructor(Ae,Ge,xt,Ht,_n,li,dr,Sr){this.url=Ae,this.params=Ge,this.queryParams=xt,this.fragment=Ht,this.data=_n,this.outlet=li,this.component=dr,this.title=this.data?.pipe((0,ae.U)(fo=>fo[Ne]))??(0,l.of)(void 0),this._futureSnapshot=Sr}get routeConfig(){return this._futureSnapshot.routeConfig}get root(){return this._routerState.root}get parent(){return this._routerState.parent(this)}get firstChild(){return this._routerState.firstChild(this)}get children(){return this._routerState.children(this)}get pathFromRoot(){return this._routerState.pathFromRoot(this)}get paramMap(){return this._paramMap||(this._paramMap=this.params.pipe((0,ae.U)(Ae=>ft(Ae)))),this._paramMap}get queryParamMap(){return this._queryParamMap||(this._queryParamMap=this.queryParams.pipe((0,ae.U)(Ae=>ft(Ae)))),this._queryParamMap}toString(){return this.snapshot?this.snapshot.toString():`Future(${this._futureSnapshot})`}}function gi(et,Ae="emptyOnly"){const Ge=et.pathFromRoot;let xt=0;if("always"!==Ae)for(xt=Ge.length-1;xt>=1;){const Ht=Ge[xt],_n=Ge[xt-1];if(Ht.routeConfig&&""===Ht.routeConfig.path)xt--;else{if(_n.component)break;xt--}}return function $t(et){return et.reduce((Ae,Ge)=>({params:{...Ae.params,...Ge.params},data:{...Ae.data,...Ge.data},resolve:{...Ge.data,...Ae.resolve,...Ge.routeConfig?.data,...Ge._resolvedData}}),{params:{},data:{},resolve:{}})}(Ge.slice(xt))}class Ma{get title(){return this.data?.[Ne]}constructor(Ae,Ge,xt,Ht,_n,li,dr,Sr,fo,ms,Nl){this.url=Ae,this.params=Ge,this.queryParams=xt,this.fragment=Ht,this.data=_n,this.outlet=li,this.component=dr,this.routeConfig=Sr,this._urlSegment=fo,this._lastPathIndex=ms,this._resolve=Nl}get root(){return this._routerState.root}get parent(){return this._routerState.parent(this)}get firstChild(){return this._routerState.firstChild(this)}get children(){return this._routerState.children(this)}get pathFromRoot(){return this._routerState.pathFromRoot(this)}get paramMap(){return this._paramMap||(this._paramMap=ft(this.params)),this._paramMap}get queryParamMap(){return this._queryParamMap||(this._queryParamMap=ft(this.queryParams)),this._queryParamMap}toString(){return`Route(url:'${this.url.map(xt=>xt.toString()).join("/")}', path:'${this.routeConfig?this.routeConfig.path:""}')`}}class Vo extends ts{constructor(Ae,Ge){super(Ge),this.url=Ae,Ds(this,Ge)}toString(){return ja(this._root)}}function Ds(et,Ae){Ae.value._routerState=et,Ae.children.forEach(Ge=>Ds(et,Ge))}function ja(et){const Ae=et.children.length>0?` { ${et.children.map(ja).join(", ")} } `:"";return`${et.value}${Ae}`}function wa(et){if(et.snapshot){const Ae=et.snapshot,Ge=et._futureSnapshot;et.snapshot=Ge,He(Ae.queryParams,Ge.queryParams)||et.queryParams.next(Ge.queryParams),Ae.fragment!==Ge.fragment&&et.fragment.next(Ge.fragment),He(Ae.params,Ge.params)||et.params.next(Ge.params),function rn(et,Ae){if(et.length!==Ae.length)return!1;for(let Ge=0;Ge<et.length;++Ge)if(!He(et[Ge],Ae[Ge]))return!1;return!0}(Ae.url,Ge.url)||et.url.next(Ge.url),He(Ae.data,Ge.data)||et.data.next(Ge.data)}else et.snapshot=et._futureSnapshot,et.data.next(et._futureSnapshot.data)}function ns(et,Ae){const Ge=He(et.params,Ae.params)&&function Vn(et,Ae){return Hn(et,Ae)&&et.every((Ge,xt)=>He(Ge.parameters,Ae[xt].parameters))}(et.url,Ae.url),xt=!et.parent!=!Ae.parent;return Ge&&!xt&&(!et.parent||ns(et.parent,Ae.parent))}function $r(et,Ae,Ge){if(Ge&&et.shouldReuseRoute(Ae.value,Ge.value.snapshot)){const xt=Ge.value;xt._futureSnapshot=Ae.value;const Ht=function Ts(et,Ae,Ge){return Ae.children.map(xt=>{for(const Ht of Ge.children)if(et.shouldReuseRoute(xt.value,Ht.value.snapshot))return $r(et,xt,Ht);return $r(et,xt)})}(et,Ae,Ge);return new $a(xt,Ht)}{if(et.shouldAttach(Ae.value)){const _n=et.retrieve(Ae.value);if(null!==_n){const li=_n.route;return li.value._futureSnapshot=Ae.value,li.children=Ae.children.map(dr=>$r(et,dr)),li}}const xt=function Gl(et){return new ur(new D.X(et.url),new D.X(et.params),new D.X(et.queryParams),new D.X(et.fragment),new D.X(et.data),et.outlet,et.component,et)}(Ae.value),Ht=Ae.children.map(_n=>$r(et,_n));return new $a(xt,Ht)}}const ol="ngNavigationCancelingError";function zc(et,Ae){const{redirectTo:Ge,navigationBehaviorOptions:xt}=Qe(Ae)?{redirectTo:Ae,navigationBehaviorOptions:void 0}:Ae,Ht=al(!1,0,Ae);return Ht.url=Ge,Ht.navigationBehaviorOptions=xt,Ht}function al(et,Ae,Ge){const xt=new Error("NavigationCancelingError: "+(et||""));return xt[ol]=!0,xt.cancellationCode=Ae,Ge&&(xt.url=Ge),xt}function Jn(et){return tn(et)&&Qe(et.url)}function tn(et){return et&&et[ol]}class ti{constructor(){this.outlet=null,this.route=null,this.resolver=null,this.injector=null,this.children=new _i,this.attachRef=null}}class _i{constructor(){this.contexts=new Map}onChildOutletCreated(Ae,Ge){const xt=this.getOrCreateContext(Ae);xt.outlet=Ge,this.contexts.set(Ae,xt)}onChildOutletDestroyed(Ae){const Ge=this.getContext(Ae);Ge&&(Ge.outlet=null,Ge.attachRef=null)}onOutletDeactivated(){const Ae=this.contexts;return this.contexts=new Map,Ae}onOutletReAttached(Ae){this.contexts=Ae}getOrCreateContext(Ae){let Ge=this.getContext(Ae);return Ge||(Ge=new ti,this.contexts.set(Ae,Ge)),Ge}getContext(Ae){return this.contexts.get(Ae)||null}}_i.\u0275fac=function(Ae){return new(Ae||_i)},_i.\u0275prov=o.Yz7({token:_i,factory:_i.\u0275fac,providedIn:"root"});const ar=!1;class vr{constructor(){this.activated=null,this._activatedRoute=null,this.name=tt,this.activateEvents=new o.vpe,this.deactivateEvents=new o.vpe,this.attachEvents=new o.vpe,this.detachEvents=new o.vpe,this.parentContexts=(0,o.f3M)(_i),this.location=(0,o.f3M)(o.s_b),this.changeDetector=(0,o.f3M)(o.sBO),this.environmentInjector=(0,o.f3M)(o.lqb)}ngOnChanges(Ae){if(Ae.name){const{firstChange:Ge,previousValue:xt}=Ae.name;if(Ge)return;this.isTrackedInParentContexts(xt)&&(this.deactivate(),this.parentContexts.onChildOutletDestroyed(xt)),this.initializeOutletWithName()}}ngOnDestroy(){this.isTrackedInParentContexts(this.name)&&this.parentContexts.onChildOutletDestroyed(this.name)}isTrackedInParentContexts(Ae){return this.parentContexts.getContext(Ae)?.outlet===this}ngOnInit(){this.initializeOutletWithName()}initializeOutletWithName(){if(this.parentContexts.onChildOutletCreated(this.name,this),this.activated)return;const Ae=this.parentContexts.getContext(this.name);Ae?.route&&(Ae.attachRef?this.attach(Ae.attachRef,Ae.route):this.activateWith(Ae.route,Ae.injector))}get isActivated(){return!!this.activated}get component(){if(!this.activated)throw new o.vHH(4012,ar);return this.activated.instance}get activatedRoute(){if(!this.activated)throw new o.vHH(4012,ar);return this._activatedRoute}get activatedRouteData(){return this._activatedRoute?this._activatedRoute.snapshot.data:{}}detach(){if(!this.activated)throw new o.vHH(4012,ar);this.location.detach();const Ae=this.activated;return this.activated=null,this._activatedRoute=null,this.detachEvents.emit(Ae.instance),Ae}attach(Ae,Ge){this.activated=Ae,this._activatedRoute=Ge,this.location.insert(Ae.hostView),this.attachEvents.emit(Ae.instance)}deactivate(){if(this.activated){const Ae=this.component;this.activated.destroy(),this.activated=null,this._activatedRoute=null,this.deactivateEvents.emit(Ae)}}activateWith(Ae,Ge){if(this.isActivated)throw new o.vHH(4013,ar);this._activatedRoute=Ae;const xt=this.location,_n=Ae.snapshot.component,li=this.parentContexts.getOrCreateContext(this.name).children,dr=new Qr(Ae,li,xt.injector);if(Ge&&function Li(et){return!!et.resolveComponentFactory}(Ge)){const Sr=Ge.resolveComponentFactory(_n);this.activated=xt.createComponent(Sr,xt.length,dr)}else{const Sr=Ge??this.environmentInjector;this.activated=xt.createComponent(_n,{index:xt.length,injector:dr,environmentInjector:Sr})}this.changeDetector.markForCheck(),this.activateEvents.emit(this.activated.instance)}}vr.\u0275fac=function(Ae){return new(Ae||vr)},vr.\u0275dir=o.lG2({type:vr,selectors:[["router-outlet"]],inputs:{name:"name"},outputs:{activateEvents:"activate",deactivateEvents:"deactivate",attachEvents:"attach",detachEvents:"detach"},exportAs:["outlet"],standalone:!0,features:[o.TTD]});class Qr{constructor(Ae,Ge,xt){this.route=Ae,this.childContexts=Ge,this.parent=xt}get(Ae,Ge){return Ae===ur?this.route:Ae===_i?this.childContexts:this.parent.get(Ae,Ge)}}class Ta{}function La(et,Ae){return et.providers&&!et._injector&&(et._injector=(0,o.MMx)(et.providers,Ae,`Route: ${et.path}`)),et._injector??Ae}function We(et,Ae="",Ge=!1){for(let xt=0;xt<et.length;xt++){const Ht=et[xt];Qn(Ht,fi(Ae,Ht),Ge)}}function Qn(et,Ae,Ge){et.children&&We(et.children,Ae,Ge)}function fi(et,Ae){return Ae?et||Ae.path?et&&!Ae.path?`${et}/`:!et&&Ae.path?Ae.path:`${et}/${Ae.path}`:"":et}function Xi(et){const Ae=et.children&&et.children.map(Xi),Ge=Ae?{...et,children:Ae}:{...et};return!Ge.component&&!Ge.loadComponent&&(Ae||Ge.loadChildren)&&Ge.outlet&&Ge.outlet!==tt&&(Ge.component=Ta),Ge}function wr(et){return et.outlet||tt}function Mo(et,Ae){const Ge=et.filter(xt=>wr(xt)===Ae);return Ge.push(...et.filter(xt=>wr(xt)!==Ae)),Ge}function ro(et){if(!et)return null;if(et.routeConfig?._injector)return et.routeConfig._injector;for(let Ae=et.parent;Ae;Ae=Ae.parent){const Ge=Ae.routeConfig;if(Ge?._loadedInjector)return Ge._loadedInjector;if(Ge?._injector)return Ge._injector}return null}Ta.\u0275fac=function(Ae){return new(Ae||Ta)},Ta.\u0275cmp=o.Xpm({type:Ta,selectors:[["ng-component"]],standalone:!0,features:[o.jDz],decls:1,vars:0,template:function(Ae,Ge){1&Ae&&o._UZ(0,"router-outlet")},dependencies:[vr],encapsulation:2});class ho{constructor(Ae,Ge,xt,Ht){this.routeReuseStrategy=Ae,this.futureState=Ge,this.currState=xt,this.forwardEvent=Ht}activate(Ae){const Ge=this.futureState._root,xt=this.currState?this.currState._root:null;this.deactivateChildRoutes(Ge,xt,Ae),wa(this.futureState.root),this.activateChildRoutes(Ge,xt,Ae)}deactivateChildRoutes(Ae,Ge,xt){const Ht=ln(Ge);Ae.children.forEach(_n=>{const li=_n.value.outlet;this.deactivateRoutes(_n,Ht[li],xt),delete Ht[li]}),vi(Ht,(_n,li)=>{this.deactivateRouteAndItsChildren(_n,xt)})}deactivateRoutes(Ae,Ge,xt){const Ht=Ae.value,_n=Ge?Ge.value:null;if(Ht===_n)if(Ht.component){const li=xt.getContext(Ht.outlet);li&&this.deactivateChildRoutes(Ae,Ge,li.children)}else this.deactivateChildRoutes(Ae,Ge,xt);else _n&&this.deactivateRouteAndItsChildren(Ge,xt)}deactivateRouteAndItsChildren(Ae,Ge){Ae.value.component&&this.routeReuseStrategy.shouldDetach(Ae.value.snapshot)?this.detachAndStoreRouteSubtree(Ae,Ge):this.deactivateRouteAndOutlet(Ae,Ge)}detachAndStoreRouteSubtree(Ae,Ge){const xt=Ge.getContext(Ae.value.outlet),Ht=xt&&Ae.value.component?xt.children:Ge,_n=ln(Ae);for(const li of Object.keys(_n))this.deactivateRouteAndItsChildren(_n[li],Ht);if(xt&&xt.outlet){const li=xt.outlet.detach(),dr=xt.children.onOutletDeactivated();this.routeReuseStrategy.store(Ae.value.snapshot,{componentRef:li,route:Ae,contexts:dr})}}deactivateRouteAndOutlet(Ae,Ge){const xt=Ge.getContext(Ae.value.outlet),Ht=xt&&Ae.value.component?xt.children:Ge,_n=ln(Ae);for(const li of Object.keys(_n))this.deactivateRouteAndItsChildren(_n[li],Ht);xt&&(xt.outlet&&(xt.outlet.deactivate(),xt.children.onOutletDeactivated()),xt.attachRef=null,xt.resolver=null,xt.route=null)}activateChildRoutes(Ae,Ge,xt){const Ht=ln(Ge);Ae.children.forEach(_n=>{this.activateRoutes(_n,Ht[_n.value.outlet],xt),this.forwardEvent(new Si(_n.value.snapshot))}),Ae.children.length&&this.forwardEvent(new Yr(Ae.value.snapshot))}activateRoutes(Ae,Ge,xt){const Ht=Ae.value,_n=Ge?Ge.value:null;if(wa(Ht),Ht===_n)if(Ht.component){const li=xt.getOrCreateContext(Ht.outlet);this.activateChildRoutes(Ae,Ge,li.children)}else this.activateChildRoutes(Ae,Ge,xt);else if(Ht.component){const li=xt.getOrCreateContext(Ht.outlet);if(this.routeReuseStrategy.shouldAttach(Ht.snapshot)){const dr=this.routeReuseStrategy.retrieve(Ht.snapshot);this.routeReuseStrategy.store(Ht.snapshot,null),li.children.onOutletReAttached(dr.contexts),li.attachRef=dr.componentRef,li.route=dr.route.value,li.outlet&&li.outlet.attach(dr.componentRef,dr.route.value),wa(dr.route.value),this.activateChildRoutes(Ae,null,li.children)}else{const dr=ro(Ht.snapshot),Sr=dr?.get(o._Vd)??null;li.attachRef=null,li.route=Ht,li.resolver=Sr,li.injector=dr,li.outlet&&li.outlet.activateWith(Ht,li.injector),this.activateChildRoutes(Ae,null,li.children)}}else this.activateChildRoutes(Ae,null,xt)}}class xa{constructor(Ae){this.path=Ae,this.route=this.path[this.path.length-1]}}class To{constructor(Ae,Ge){this.component=Ae,this.route=Ge}}function Ao(et,Ae,Ge){const xt=et._root;return Ra(xt,Ae?Ae._root:null,Ge,[xt.value])}function Ho(et,Ae){const Ge=Symbol(),xt=Ae.get(et,Ge);return xt===Ge?"function"!=typeof et||(0,o.Z0I)(et)?Ae.get(et):et:xt}function Ra(et,Ae,Ge,xt,Ht={canDeactivateChecks:[],canActivateChecks:[]}){const _n=ln(Ae);return et.children.forEach(li=>{(function ba(et,Ae,Ge,xt,Ht={canDeactivateChecks:[],canActivateChecks:[]}){const _n=et.value,li=Ae?Ae.value:null,dr=Ge?Ge.getContext(et.value.outlet):null;if(li&&_n.routeConfig===li.routeConfig){const Sr=function Jt(et,Ae,Ge){if("function"==typeof Ge)return Ge(et,Ae);switch(Ge){case"pathParamsChange":return!Hn(et.url,Ae.url);case"pathParamsOrQueryParamsChange":return!Hn(et.url,Ae.url)||!He(et.queryParams,Ae.queryParams);case"always":return!0;case"paramsOrQueryParamsChange":return!ns(et,Ae)||!He(et.queryParams,Ae.queryParams);default:return!ns(et,Ae)}}(li,_n,_n.routeConfig.runGuardsAndResolvers);Sr?Ht.canActivateChecks.push(new xa(xt)):(_n.data=li.data,_n._resolvedData=li._resolvedData),_n.component?Ra(et,Ae,dr?dr.children:null,xt,Ht):Ra(et,Ae,Ge,xt,Ht),Sr&&dr&&dr.outlet&&dr.outlet.isActivated&&Ht.canDeactivateChecks.push(new To(dr.outlet.component,li))}else li&&De(Ae,dr,Ht),Ht.canActivateChecks.push(new xa(xt)),_n.component?Ra(et,null,dr?dr.children:null,xt,Ht):Ra(et,null,Ge,xt,Ht);return Ht})(li,_n[li.value.outlet],Ge,xt.concat([li.value]),Ht),delete _n[li.value.outlet]}),vi(_n,(li,dr)=>De(li,Ge.getContext(dr),Ht)),Ht}function De(et,Ae,Ge){const xt=ln(et),Ht=et.value;vi(xt,(_n,li)=>{Ht.component?De(_n,Ae?Ae.children.getContext(li):null,Ge):De(_n,Ae,Ge)}),Ht.component&&Ae&&Ae.outlet&&Ae.outlet.isActivated?Ge.canDeactivateChecks.push(new To(Ae.outlet.component,Ht)):Ge.canDeactivateChecks.push(new To(null,Ht))}function bt(et){return"function"==typeof et}function Na(et){return et instanceof g.K||"EmptyError"===et?.name}const qi=Symbol("INITIAL_VALUE");function ia(){return(0,X.w)(et=>(0,E.a)(et.map(Ae=>Ae.pipe((0,ve.q)(1),(0,ye.O)(qi)))).pipe((0,ae.U)(Ae=>{for(const Ge of Ae)if(!0!==Ge){if(Ge===qi)return qi;if(!1===Ge||Ge instanceof Ai)return Ge}return!0}),(0,ge.h)(Ae=>Ae!==qi),(0,ve.q)(1)))}function $o(et,Ae){return(0,ne.z)(Ge=>{const{targetSnapshot:xt,currentSnapshot:Ht,guards:{canActivateChecks:_n,canDeactivateChecks:li}}=Ge;return 0===li.length&&0===_n.length?(0,l.of)({...Ge,guardsResult:!0}):function su(et,Ae,Ge,xt){return(0,e.D)(et).pipe((0,ne.z)(Ht=>function hl(et,Ae,Ge,xt,Ht){const _n=Ae&&Ae.routeConfig?Ae.routeConfig.canDeactivate:null;if(!_n||0===_n.length)return(0,l.of)(!0);const li=_n.map(dr=>{const Sr=ro(Ae)??Ht,fo=Ho(dr,Sr);return Gi(function Wt(et){return et&&bt(et.canDeactivate)}(fo)?fo.canDeactivate(et,Ae,Ge,xt):Sr.runInContext(()=>fo(et,Ae,Ge,xt))).pipe((0,pe.P)())});return(0,l.of)(li).pipe(ia())}(Ht.component,Ht.route,Ge,Ae,xt)),(0,pe.P)(Ht=>!0!==Ht,!0))}(li,xt,Ht,et).pipe((0,ne.z)(dr=>dr&&function Xt(et){return"boolean"==typeof et}(dr)?function Us(et,Ae,Ge,xt){return(0,e.D)(Ae).pipe((0,Pe.b)(Ht=>(0,T.z)(function Tc(et,Ae){return null!==et&&Ae&&Ae(new er(et)),(0,l.of)(!0)}(Ht.route.parent,xt),function Ka(et,Ae){return null!==et&&Ae&&Ae(new _o(et)),(0,l.of)(!0)}(Ht.route,xt),function vu(et,Ae,Ge){const xt=Ae[Ae.length-1],_n=Ae.slice(0,Ae.length-1).reverse().map(li=>function Ha(et){const Ae=et.routeConfig?et.routeConfig.canActivateChild:null;return Ae&&0!==Ae.length?{node:et,guards:Ae}:null}(li)).filter(li=>null!==li).map(li=>(0,n.P)(()=>{const dr=li.guards.map(Sr=>{const fo=ro(li.node)??Ge,ms=Ho(Sr,fo);return Gi(function Fe(et){return et&&bt(et.canActivateChild)}(ms)?ms.canActivateChild(xt,et):fo.runInContext(()=>ms(xt,et))).pipe((0,pe.P)())});return(0,l.of)(dr).pipe(ia())}));return(0,l.of)(_n).pipe(ia())}(et,Ht.path,Ge),function Qs(et,Ae,Ge){const xt=Ae.routeConfig?Ae.routeConfig.canActivate:null;if(!xt||0===xt.length)return(0,l.of)(!0);const Ht=xt.map(_n=>(0,n.P)(()=>{const li=ro(Ae)??Ge,dr=Ho(_n,li);return Gi(function Kt(et){return et&&bt(et.canActivate)}(dr)?dr.canActivate(Ae,et):li.runInContext(()=>dr(Ae,et))).pipe((0,pe.P)())}));return(0,l.of)(Ht).pipe(ia())}(et,Ht.route,Ge))),(0,pe.P)(Ht=>!0!==Ht,!0))}(xt,_n,et,Ae):(0,l.of)(dr)),(0,ae.U)(dr=>({...Ge,guardsResult:dr})))})}function Wl(et,Ae,Ge,xt){const Ht=Ae.canLoad;if(void 0===Ht||0===Ht.length)return(0,l.of)(!0);const _n=Ht.map(li=>{const dr=Ho(li,et);return Gi(function Qi(et){return et&&bt(et.canLoad)}(dr)?dr.canLoad(Ae,Ge):et.runInContext(()=>dr(Ae,Ge)))});return(0,l.of)(_n).pipe(ia(),sp(xt))}function sp(et){return(0,P.z)((0,xe.b)(Ae=>{if(Qe(Ae))throw zc(0,Ae)}),(0,ae.U)(Ae=>!0===Ae))}function Ku(et,Ae,Ge,xt){const Ht=Ae.canMatch;if(!Ht||0===Ht.length)return(0,l.of)(!0);const _n=Ht.map(li=>{const dr=Ho(li,et);return Gi(function yi(et){return et&&bt(et.canMatch)}(dr)?dr.canMatch(Ae,Ge):et.runInContext(()=>dr(Ae,Ge)))});return(0,l.of)(_n).pipe(ia(),sp())}const Da={matched:!1,consumedSegments:[],remainingSegments:[],parameters:{},positionalParamSegments:{}};function Pl(et,Ae,Ge,xt,Ht){const _n=gl(et,Ae,Ge);return _n.matched?Ku(xt=La(Ae,xt),Ae,Ge).pipe((0,ae.U)(li=>!0===li?_n:{...Da})):(0,l.of)(_n)}function gl(et,Ae,Ge){if(""===Ae.path)return"full"===Ae.pathMatch&&(et.hasChildren()||Ge.length>0)?{...Da}:{matched:!0,consumedSegments:[],remainingSegments:Ge,parameters:{},positionalParamSegments:{}};const Ht=(Ae.matcher||Ct)(Ge,et,Ae);if(!Ht)return{...Da};const _n={};vi(Ht.posParams,(dr,Sr)=>{_n[Sr]=dr.path});const li=Ht.consumed.length>0?{..._n,...Ht.consumed[Ht.consumed.length-1].parameters}:_n;return{matched:!0,consumedSegments:Ht.consumed,remainingSegments:Ge.slice(Ht.consumed.length),parameters:li,positionalParamSegments:Ht.posParams??{}}}function ss(et,Ae,Ge,xt){if(Ge.length>0&&function Pc(et,Ae,Ge){return Ge.some(xt=>Ol(et,Ae,xt)&&wr(xt)!==tt)}(et,Ge,xt)){const _n=new si(Ae,function rs(et,Ae,Ge,xt){const Ht={};Ht[tt]=xt,xt._sourceSegment=et,xt._segmentIndexShift=Ae.length;for(const _n of Ge)if(""===_n.path&&wr(_n)!==tt){const li=new si([],{});li._sourceSegment=et,li._segmentIndexShift=Ae.length,Ht[wr(_n)]=li}return Ht}(et,Ae,xt,new si(Ge,et.children)));return _n._sourceSegment=et,_n._segmentIndexShift=Ae.length,{segmentGroup:_n,slicedSegments:[]}}if(0===Ge.length&&function ks(et,Ae,Ge){return Ge.some(xt=>Ol(et,Ae,xt))}(et,Ge,xt)){const _n=new si(et.segments,function gc(et,Ae,Ge,xt,Ht){const _n={};for(const li of xt)if(Ol(et,Ge,li)&&!Ht[wr(li)]){const dr=new si([],{});dr._sourceSegment=et,dr._segmentIndexShift=Ae.length,_n[wr(li)]=dr}return{...Ht,..._n}}(et,Ae,Ge,xt,et.children));return _n._sourceSegment=et,_n._segmentIndexShift=Ae.length,{segmentGroup:_n,slicedSegments:Ge}}const Ht=new si(et.segments,et.children);return Ht._sourceSegment=et,Ht._segmentIndexShift=Ae.length,{segmentGroup:Ht,slicedSegments:Ge}}function Ol(et,Ae,Ge){return(!(et.hasChildren()||Ae.length>0)||"full"!==Ge.pathMatch)&&""===Ge.path}function _c(et,Ae,Ge,xt){return!!(wr(et)===xt||xt!==tt&&Ol(Ae,Ge,et))&&("**"===et.path||gl(Ae,et,Ge).matched)}function Yc(et,Ae,Ge){return 0===Ae.length&&!et.children[Ge]}const lu=!1;class ac{constructor(Ae){this.segmentGroup=Ae||null}}class bd{constructor(Ae){this.urlTree=Ae}}function kd(et){return(0,w._)(new ac(et))}function Oc(et){return(0,w._)(new bd(et))}class Qo{constructor(Ae,Ge,xt,Ht,_n){this.injector=Ae,this.configLoader=Ge,this.urlSerializer=xt,this.urlTree=Ht,this.config=_n,this.allowRedirects=!0}apply(){const Ae=ss(this.urlTree.root,[],[],this.config).segmentGroup,Ge=new si(Ae.segments,Ae.children);return this.expandSegmentGroup(this.injector,this.config,Ge,tt).pipe((0,ae.U)(_n=>this.createUrlTree(ce(_n),this.urlTree.queryParams,this.urlTree.fragment))).pipe((0,de.K)(_n=>{if(_n instanceof bd)return this.allowRedirects=!1,this.match(_n.urlTree);throw _n instanceof ac?this.noMatchError(_n):_n}))}match(Ae){return this.expandSegmentGroup(this.injector,this.config,Ae.root,tt).pipe((0,ae.U)(Ht=>this.createUrlTree(ce(Ht),Ae.queryParams,Ae.fragment))).pipe((0,de.K)(Ht=>{throw Ht instanceof ac?this.noMatchError(Ht):Ht}))}noMatchError(Ae){return new o.vHH(4002,lu&&`Cannot match any routes. URL Segment: '${Ae.segmentGroup}'`)}createUrlTree(Ae,Ge,xt){const Ht=Le(Ae);return new Ai(Ht,Ge,xt)}expandSegmentGroup(Ae,Ge,xt,Ht){return 0===xt.segments.length&&xt.hasChildren()?this.expandChildren(Ae,Ge,xt).pipe((0,ae.U)(_n=>new si([],_n))):this.expandSegment(Ae,xt,Ge,xt.segments,Ht,!0)}expandChildren(Ae,Ge,xt){const Ht=[];for(const _n of Object.keys(xt.children))"primary"===_n?Ht.unshift(_n):Ht.push(_n);return(0,e.D)(Ht).pipe((0,Pe.b)(_n=>{const li=xt.children[_n],dr=Mo(Ge,_n);return this.expandSegmentGroup(Ae,dr,li,_n).pipe((0,ae.U)(Sr=>({segment:Sr,outlet:_n})))}),(0,re.R)((_n,li)=>(_n[li.outlet]=li.segment,_n),{}),j())}expandSegment(Ae,Ge,xt,Ht,_n,li){return(0,e.D)(xt).pipe((0,Pe.b)(dr=>this.expandSegmentAgainstRoute(Ae,Ge,xt,dr,Ht,_n,li).pipe((0,de.K)(fo=>{if(fo instanceof ac)return(0,l.of)(null);throw fo}))),(0,pe.P)(dr=>!!dr),(0,de.K)((dr,Sr)=>{if(Na(dr))return Yc(Ge,Ht,_n)?(0,l.of)(new si([],{})):kd(Ge);throw dr}))}expandSegmentAgainstRoute(Ae,Ge,xt,Ht,_n,li,dr){return _c(Ht,Ge,_n,li)?void 0===Ht.redirectTo?this.matchSegmentAgainstRoute(Ae,Ge,Ht,_n,li):dr&&this.allowRedirects?this.expandSegmentAgainstRouteUsingRedirect(Ae,Ge,xt,Ht,_n,li):kd(Ge):kd(Ge)}expandSegmentAgainstRouteUsingRedirect(Ae,Ge,xt,Ht,_n,li){return"**"===Ht.path?this.expandWildCardWithParamsAgainstRouteUsingRedirect(Ae,xt,Ht,li):this.expandRegularSegmentAgainstRouteUsingRedirect(Ae,Ge,xt,Ht,_n,li)}expandWildCardWithParamsAgainstRouteUsingRedirect(Ae,Ge,xt,Ht){const _n=this.applyRedirectCommands([],xt.redirectTo,{});return xt.redirectTo.startsWith("/")?Oc(_n):this.lineralizeSegments(xt,_n).pipe((0,ne.z)(li=>{const dr=new si(li,{});return this.expandSegment(Ae,dr,Ge,li,Ht,!1)}))}expandRegularSegmentAgainstRouteUsingRedirect(Ae,Ge,xt,Ht,_n,li){const{matched:dr,consumedSegments:Sr,remainingSegments:fo,positionalParamSegments:ms}=gl(Ge,Ht,_n);if(!dr)return kd(Ge);const Nl=this.applyRedirectCommands(Sr,Ht.redirectTo,ms);return Ht.redirectTo.startsWith("/")?Oc(Nl):this.lineralizeSegments(Ht,Nl).pipe((0,ne.z)(Dl=>this.expandSegment(Ae,Ge,xt,Dl.concat(fo),li,!1)))}matchSegmentAgainstRoute(Ae,Ge,xt,Ht,_n){return"**"===xt.path?(Ae=La(xt,Ae),xt.loadChildren?(xt._loadedRoutes?(0,l.of)({routes:xt._loadedRoutes,injector:xt._loadedInjector}):this.configLoader.loadChildren(Ae,xt)).pipe((0,ae.U)(dr=>(xt._loadedRoutes=dr.routes,xt._loadedInjector=dr.injector,new si(Ht,{})))):(0,l.of)(new si(Ht,{}))):Pl(Ge,xt,Ht,Ae,this.urlSerializer).pipe((0,X.w)(({matched:li,consumedSegments:dr,remainingSegments:Sr})=>li?(Ae=xt._injector??Ae,this.getChildConfig(Ae,xt,Ht).pipe((0,ne.z)(ms=>{const Nl=ms.injector??Ae,Dl=ms.routes,{segmentGroup:Yl,slicedSegments:cu}=ss(Ge,dr,Sr,Dl),Mr=new si(Yl.segments,Yl.children);if(0===cu.length&&Mr.hasChildren())return this.expandChildren(Nl,Dl,Mr).pipe((0,ae.U)(ll=>new si(dr,ll)));if(0===Dl.length&&0===cu.length)return(0,l.of)(new si(dr,{}));const sl=wr(xt)===_n;return this.expandSegment(Nl,Mr,Dl,cu,sl?tt:_n,!0).pipe((0,ae.U)(qo=>new si(dr.concat(qo.segments),qo.children)))}))):kd(Ge)))}getChildConfig(Ae,Ge,xt){return Ge.children?(0,l.of)({routes:Ge.children,injector:Ae}):Ge.loadChildren?void 0!==Ge._loadedRoutes?(0,l.of)({routes:Ge._loadedRoutes,injector:Ge._loadedInjector}):Wl(Ae,Ge,xt,this.urlSerializer).pipe((0,ne.z)(Ht=>Ht?this.configLoader.loadChildren(Ae,Ge).pipe((0,xe.b)(_n=>{Ge._loadedRoutes=_n.routes,Ge._loadedInjector=_n.injector})):function Dr(et){return(0,w._)(al(lu&&`Cannot load children because the guard of the route "path: '${et.path}'" returned false`,3))}(Ge))):(0,l.of)({routes:[],injector:Ae})}lineralizeSegments(Ae,Ge){let xt=[],Ht=Ge.root;for(;;){if(xt=xt.concat(Ht.segments),0===Ht.numberOfChildren)return(0,l.of)(xt);if(Ht.numberOfChildren>1||!Ht.children[tt])return et=Ae.redirectTo,(0,w._)(new o.vHH(4e3,lu&&`Only absolute redirects can have named outlets. redirectTo: '${et}'`));Ht=Ht.children[tt]}var et}applyRedirectCommands(Ae,Ge,xt){return this.applyRedirectCreateUrlTree(Ge,this.urlSerializer.parse(Ge),Ae,xt)}applyRedirectCreateUrlTree(Ae,Ge,xt,Ht){const _n=this.createSegmentGroup(Ae,Ge.root,xt,Ht);return new Ai(_n,this.createQueryParams(Ge.queryParams,this.urlTree.queryParams),Ge.fragment)}createQueryParams(Ae,Ge){const xt={};return vi(Ae,(Ht,_n)=>{if("string"==typeof Ht&&Ht.startsWith(":")){const dr=Ht.substring(1);xt[_n]=Ge[dr]}else xt[_n]=Ht}),xt}createSegmentGroup(Ae,Ge,xt,Ht){const _n=this.createSegments(Ae,Ge.segments,xt,Ht);let li={};return vi(Ge.children,(dr,Sr)=>{li[Sr]=this.createSegmentGroup(Ae,dr,xt,Ht)}),new si(_n,li)}createSegments(Ae,Ge,xt,Ht){return Ge.map(_n=>_n.path.startsWith(":")?this.findPosParam(Ae,_n,Ht):this.findOrReturn(_n,xt))}findPosParam(Ae,Ge,xt){const Ht=xt[Ge.path.substring(1)];if(!Ht)throw new o.vHH(4001,lu&&`Cannot redirect to '${Ae}'. Cannot find '${Ge.path}'.`);return Ht}findOrReturn(Ae,Ge){let xt=0;for(const Ht of Ge){if(Ht.path===Ae.path)return Ge.splice(xt),Ht;xt++}return Ae}}function oo(et,Ae,Ge,xt){return(0,X.w)(Ht=>function kr(et,Ae,Ge,xt,Ht){return new Qo(et,Ae,Ge,xt,Ht).apply()}(et,Ae,Ge,Ht.extractedUrl,xt).pipe((0,ae.U)(_n=>({...Ht,urlAfterRedirects:_n}))))}const da=!1;class ha{}function cc(et,Ae,Ge,xt,Ht,_n,li="emptyOnly"){return new Rs(et,Ae,Ge,xt,Ht,li,_n).recognize().pipe((0,X.w)(dr=>null===dr?function Ia(et){return new B.y(Ae=>Ae.error(et))}(new ha):(0,l.of)(dr)))}class Rs{constructor(Ae,Ge,xt,Ht,_n,li,dr){this.injector=Ae,this.rootComponentType=Ge,this.config=xt,this.urlTree=Ht,this.url=_n,this.paramsInheritanceStrategy=li,this.urlSerializer=dr}recognize(){const Ae=ss(this.urlTree.root,[],[],this.config.filter(Ge=>void 0===Ge.redirectTo)).segmentGroup;return this.processSegmentGroup(this.injector,this.config,Ae,tt).pipe((0,ae.U)(Ge=>{if(null===Ge)return null;const xt=new Ma([],Object.freeze({}),Object.freeze({...this.urlTree.queryParams}),this.urlTree.fragment,{},tt,this.rootComponentType,null,this.urlTree.root,-1,{}),Ht=new $a(xt,Ge),_n=new Vo(this.url,Ht);return this.inheritParamsAndData(_n._root),_n}))}inheritParamsAndData(Ae){const Ge=Ae.value,xt=gi(Ge,this.paramsInheritanceStrategy);Ge.params=Object.freeze(xt.params),Ge.data=Object.freeze(xt.data),Ae.children.forEach(Ht=>this.inheritParamsAndData(Ht))}processSegmentGroup(Ae,Ge,xt,Ht){return 0===xt.segments.length&&xt.hasChildren()?this.processChildren(Ae,Ge,xt):this.processSegment(Ae,Ge,xt,xt.segments,Ht)}processChildren(Ae,Ge,xt){return(0,e.D)(Object.keys(xt.children)).pipe((0,Pe.b)(Ht=>{const _n=xt.children[Ht],li=Mo(Ge,Ht);return this.processSegmentGroup(Ae,li,_n,Ht)}),(0,re.R)((Ht,_n)=>Ht&&_n?(Ht.push(..._n),Ht):null),(0,ke.o)(Ht=>null!==Ht),(0,Z.d)(null),j(),(0,ae.U)(Ht=>{if(null===Ht)return null;const _n=kp(Ht);return da&&function Ju(et){const Ae={};et.forEach(Ge=>{const xt=Ae[Ge.value.outlet];if(xt){const Ht=xt.url.map(li=>li.toString()).join("/"),_n=Ge.value.url.map(li=>li.toString()).join("/");throw new o.vHH(4006,da&&`Two segments cannot have the same outlet name: '${Ht}' and '${_n}'.`)}Ae[Ge.value.outlet]=Ge.value})}(_n),function xc(et){et.sort((Ae,Ge)=>Ae.value.outlet===tt?-1:Ge.value.outlet===tt?1:Ae.value.outlet.localeCompare(Ge.value.outlet))}(_n),_n}))}processSegment(Ae,Ge,xt,Ht,_n){return(0,e.D)(Ge).pipe((0,Pe.b)(li=>this.processSegmentAgainstRoute(li._injector??Ae,li,xt,Ht,_n)),(0,pe.P)(li=>!!li),(0,de.K)(li=>{if(Na(li))return Yc(xt,Ht,_n)?(0,l.of)([]):(0,l.of)(null);throw li}))}processSegmentAgainstRoute(Ae,Ge,xt,Ht,_n){if(Ge.redirectTo||!_c(Ge,xt,Ht,_n))return(0,l.of)(null);let li;if("**"===Ge.path){const dr=Ht.length>0?Dn(Ht).parameters:{},Sr=qs(xt)+Ht.length,fo=new Ma(Ht,dr,Object.freeze({...this.urlTree.queryParams}),this.urlTree.fragment,la(Ge),wr(Ge),Ge.component??Ge._loadedComponent??null,Ge,Su(xt),Sr,ht(Ge));li=(0,l.of)({snapshot:fo,consumedSegments:[],remainingSegments:[]})}else li=Pl(xt,Ge,Ht,Ae,this.urlSerializer).pipe((0,ae.U)(({matched:dr,consumedSegments:Sr,remainingSegments:fo,parameters:ms})=>{if(!dr)return null;const Nl=qs(xt)+Sr.length;return{snapshot:new Ma(Sr,ms,Object.freeze({...this.urlTree.queryParams}),this.urlTree.fragment,la(Ge),wr(Ge),Ge.component??Ge._loadedComponent??null,Ge,Su(xt),Nl,ht(Ge)),consumedSegments:Sr,remainingSegments:fo}}));return li.pipe((0,X.w)(dr=>{if(null===dr)return(0,l.of)(null);const{snapshot:Sr,consumedSegments:fo,remainingSegments:ms}=dr;Ae=Ge._injector??Ae;const Nl=Ge._loadedInjector??Ae,Dl=function Hc(et){return et.children?et.children:et.loadChildren?et._loadedRoutes:[]}(Ge),{segmentGroup:Yl,slicedSegments:cu}=ss(xt,fo,ms,Dl.filter(sl=>void 0===sl.redirectTo));if(0===cu.length&&Yl.hasChildren())return this.processChildren(Nl,Dl,Yl).pipe((0,ae.U)(sl=>null===sl?null:[new $a(Sr,sl)]));if(0===Dl.length&&0===cu.length)return(0,l.of)([new $a(Sr,[])]);const Mr=wr(Ge)===_n;return this.processSegment(Nl,Dl,Yl,cu,Mr?tt:_n).pipe((0,ae.U)(sl=>null===sl?null:[new $a(Sr,sl)]))}))}}function lp(et){const Ae=et.value.routeConfig;return Ae&&""===Ae.path&&void 0===Ae.redirectTo}function kp(et){const Ae=[],Ge=new Set;for(const xt of et){if(!lp(xt)){Ae.push(xt);continue}const Ht=Ae.find(_n=>xt.value.routeConfig===_n.value.routeConfig);void 0!==Ht?(Ht.children.push(...xt.children),Ge.add(Ht)):Ae.push(xt)}for(const xt of Ge){const Ht=kp(xt.children);Ae.push(new $a(xt.value,Ht))}return Ae.filter(xt=>!Ge.has(xt))}function Su(et){let Ae=et;for(;Ae._sourceSegment;)Ae=Ae._sourceSegment;return Ae}function qs(et){let Ae=et,Ge=Ae._segmentIndexShift??0;for(;Ae._sourceSegment;)Ae=Ae._sourceSegment,Ge+=Ae._segmentIndexShift??0;return Ge-1}function la(et){return et.data||{}}function ht(et){return et.resolve||{}}function dn(et,Ae){return(0,ne.z)(Ge=>{const{targetSnapshot:xt,guards:{canActivateChecks:Ht}}=Ge;if(!Ht.length)return(0,l.of)(Ge);let _n=0;return(0,e.D)(Ht).pipe((0,Pe.b)(li=>function Kn(et,Ae,Ge,xt){const Ht=et.routeConfig,_n=et._resolve;return void 0!==Ht?.title&&!ga(Ht)&&(_n[Ne]=Ht.title),function $i(et,Ae,Ge,xt){const Ht=function sr(et){return[...Object.keys(et),...Object.getOwnPropertySymbols(et)]}(et);if(0===Ht.length)return(0,l.of)({});const _n={};return(0,e.D)(Ht).pipe((0,ne.z)(li=>function lo(et,Ae,Ge,xt){const Ht=ro(Ae)??xt,_n=Ho(et,Ht),li=_n.resolve?_n.resolve(Ae,Ge):Ht.runInContext(()=>_n(Ae,Ge));return Gi(li)}(et[li],Ae,Ge,xt).pipe((0,pe.P)(),(0,xe.b)(dr=>{_n[li]=dr}))),be(1),(0,Be.h)(_n),(0,de.K)(li=>Na(li)?Y.E:(0,w._)(li)))}(_n,et,Ae,xt).pipe((0,ae.U)(li=>(et._resolvedData=li,et.data=gi(et,Ge).resolve,Ht&&ga(Ht)&&(et.data[Ne]=Ht.title),null)))}(li.route,xt,et,Ae)),(0,xe.b)(()=>_n++),be(1),(0,ne.z)(li=>_n===Ht.length?(0,l.of)(Ge):Y.E))})}function ga(et){return"string"==typeof et.title||null===et.title}function Zs(et){return(0,X.w)(Ae=>{const Ge=et(Ae);return Ge?(0,e.D)(Ge).pipe((0,ae.U)(()=>Ae)):(0,l.of)(Ae)})}const os=new o.OlP("ROUTES");class _s{constructor(){this.componentLoaders=new WeakMap,this.childrenLoaders=new WeakMap,this.compiler=(0,o.f3M)(o.Sil)}loadComponent(Ae){if(this.componentLoaders.get(Ae))return this.componentLoaders.get(Ae);if(Ae._loadedComponent)return(0,l.of)(Ae._loadedComponent);this.onLoadStartListener&&this.onLoadStartListener(Ae);const Ge=Gi(Ae.loadComponent()).pipe((0,ae.U)(_a),(0,xe.b)(Ht=>{this.onLoadEndListener&&this.onLoadEndListener(Ae),Ae._loadedComponent=Ht}),(0,nt.x)(()=>{this.componentLoaders.delete(Ae)})),xt=new V.c(Ge,()=>new ue.x).pipe((0,mt.x)());return this.componentLoaders.set(Ae,xt),xt}loadChildren(Ae,Ge){if(this.childrenLoaders.get(Ge))return this.childrenLoaders.get(Ge);if(Ge._loadedRoutes)return(0,l.of)({routes:Ge._loadedRoutes,injector:Ge._loadedInjector});this.onLoadStartListener&&this.onLoadStartListener(Ge);const Ht=this.loadModuleFactoryOrRoutes(Ge.loadChildren).pipe((0,ae.U)(li=>{this.onLoadEndListener&&this.onLoadEndListener(Ge);let dr,Sr,fo=!1;Array.isArray(li)?(Sr=li,fo=!0):(dr=li.create(Ae).injector,Sr=nn(dr.get(os,[],o.XFs.Self|o.XFs.Optional)));const ms=Sr.map(Xi);return{routes:ms,injector:dr}}),(0,nt.x)(()=>{this.childrenLoaders.delete(Ge)})),_n=new V.c(Ht,()=>new ue.x).pipe((0,mt.x)());return this.childrenLoaders.set(Ge,_n),_n}loadModuleFactoryOrRoutes(Ae){return Gi(Ae()).pipe((0,ae.U)(_a),(0,ne.z)(Ge=>Ge instanceof o.YKP||Array.isArray(Ge)?(0,l.of)(Ge):(0,e.D)(this.compiler.compileModuleAsync(Ge))))}}function _a(et){return function ra(et){return et&&"object"==typeof et&&"default"in et}(et)?et.default:et}_s.\u0275fac=function(Ae){return new(Ae||_s)},_s.\u0275prov=o.Yz7({token:_s,factory:_s.\u0275fac,providedIn:"root"});class $l{get hasRequestedNavigation(){return 0!==this.navigationId}constructor(){this.currentNavigation=null,this.lastSuccessfulNavigation=null,this.events=new ue.x,this.configLoader=(0,o.f3M)(_s),this.environmentInjector=(0,o.f3M)(o.lqb),this.urlSerializer=(0,o.f3M)(vn),this.rootContexts=(0,o.f3M)(_i),this.navigationId=0,this.afterPreactivation=()=>(0,l.of)(void 0),this.rootComponentType=null;this.configLoader.onLoadEndListener=xt=>this.events.next(new _r(xt)),this.configLoader.onLoadStartListener=xt=>this.events.next(new Ri(xt))}complete(){this.transitions?.complete()}handleNavigationRequest(Ae){const Ge=++this.navigationId;this.transitions?.next({...this.transitions.value,...Ae,id:Ge})}setupNavigations(Ae){return this.transitions=new D.X({id:0,targetPageId:0,currentUrlTree:Ae.currentUrlTree,currentRawUrl:Ae.currentUrlTree,extractedUrl:Ae.urlHandlingStrategy.extract(Ae.currentUrlTree),urlAfterRedirects:Ae.urlHandlingStrategy.extract(Ae.currentUrlTree),rawUrl:Ae.currentUrlTree,extras:{},resolve:null,reject:null,promise:Promise.resolve(!0),source:Fr,restoredState:null,currentSnapshot:Ae.routerState.snapshot,targetSnapshot:null,currentRouterState:Ae.routerState,targetRouterState:null,guards:{canActivateChecks:[],canDeactivateChecks:[]},guardsResult:null}),this.transitions.pipe((0,ge.h)(Ge=>0!==Ge.id),(0,ae.U)(Ge=>({...Ge,extractedUrl:Ae.urlHandlingStrategy.extract(Ge.rawUrl)})),(0,X.w)(Ge=>{let xt=!1,Ht=!1;return(0,l.of)(Ge).pipe((0,xe.b)(_n=>{this.currentNavigation={id:_n.id,initialUrl:_n.rawUrl,extractedUrl:_n.extractedUrl,trigger:_n.source,extras:_n.extras,previousNavigation:this.lastSuccessfulNavigation?{...this.lastSuccessfulNavigation,previousNavigation:null}:null}}),(0,X.w)(_n=>{const li=Ae.browserUrlTree.toString(),dr=!Ae.navigated||_n.extractedUrl.toString()!==li||li!==Ae.currentUrlTree.toString(),Sr=_n.extras.onSameUrlNavigation??Ae.onSameUrlNavigation;if(!dr&&"reload"!==Sr){const fo="";return this.events.next(new Qt(_n.id,Ae.serializeUrl(Ge.rawUrl),fo,0)),Ae.rawUrlTree=_n.rawUrl,_n.resolve(null),Y.E}if(Ae.urlHandlingStrategy.shouldProcessUrl(_n.rawUrl))return Os(_n.source)&&(Ae.browserUrlTree=_n.extractedUrl),(0,l.of)(_n).pipe((0,X.w)(fo=>{const ms=this.transitions?.getValue();return this.events.next(new Wn(fo.id,this.urlSerializer.serialize(fo.extractedUrl),fo.source,fo.restoredState)),ms!==this.transitions?.getValue()?Y.E:Promise.resolve(fo)}),oo(this.environmentInjector,this.configLoader,this.urlSerializer,Ae.config),(0,xe.b)(fo=>{this.currentNavigation={...this.currentNavigation,finalUrl:fo.urlAfterRedirects},Ge.urlAfterRedirects=fo.urlAfterRedirects}),function Ke(et,Ae,Ge,xt,Ht){return(0,ne.z)(_n=>cc(et,Ae,Ge,_n.urlAfterRedirects,xt.serialize(_n.urlAfterRedirects),xt,Ht).pipe((0,ae.U)(li=>({..._n,targetSnapshot:li}))))}(this.environmentInjector,this.rootComponentType,Ae.config,this.urlSerializer,Ae.paramsInheritanceStrategy),(0,xe.b)(fo=>{if(Ge.targetSnapshot=fo.targetSnapshot,"eager"===Ae.urlUpdateStrategy){if(!fo.extras.skipLocationChange){const Nl=Ae.urlHandlingStrategy.merge(fo.urlAfterRedirects,fo.rawUrl);Ae.setBrowserUrl(Nl,fo)}Ae.browserUrlTree=fo.urlAfterRedirects}const ms=new Pt(fo.id,this.urlSerializer.serialize(fo.extractedUrl),this.urlSerializer.serialize(fo.urlAfterRedirects),fo.targetSnapshot);this.events.next(ms)}));if(dr&&Ae.urlHandlingStrategy.shouldProcessUrl(Ae.rawUrlTree)){const{id:fo,extractedUrl:ms,source:Nl,restoredState:Dl,extras:Yl}=_n,cu=new Wn(fo,this.urlSerializer.serialize(ms),Nl,Dl);this.events.next(cu);const Mr=Di(ms,this.rootComponentType).snapshot;return Ge={..._n,targetSnapshot:Mr,urlAfterRedirects:ms,extras:{...Yl,skipLocationChange:!1,replaceUrl:!1}},(0,l.of)(Ge)}{const fo="";return this.events.next(new Qt(_n.id,Ae.serializeUrl(Ge.extractedUrl),fo,1)),Ae.rawUrlTree=_n.rawUrl,_n.resolve(null),Y.E}}),(0,xe.b)(_n=>{const li=new cn(_n.id,this.urlSerializer.serialize(_n.extractedUrl),this.urlSerializer.serialize(_n.urlAfterRedirects),_n.targetSnapshot);this.events.next(li)}),(0,ae.U)(_n=>Ge={..._n,guards:Ao(_n.targetSnapshot,_n.currentSnapshot,this.rootContexts)}),$o(this.environmentInjector,_n=>this.events.next(_n)),(0,xe.b)(_n=>{if(Ge.guardsResult=_n.guardsResult,Qe(_n.guardsResult))throw zc(this.urlSerializer,_n.guardsResult);const li=new Ln(_n.id,this.urlSerializer.serialize(_n.extractedUrl),this.urlSerializer.serialize(_n.urlAfterRedirects),_n.targetSnapshot,!!_n.guardsResult);this.events.next(li)}),(0,ge.h)(_n=>!!_n.guardsResult||(Ae.restoreHistory(_n),this.cancelNavigationTransition(_n,"",3),!1)),Zs(_n=>{if(_n.guards.canActivateChecks.length)return(0,l.of)(_n).pipe((0,xe.b)(li=>{const dr=new ii(li.id,this.urlSerializer.serialize(li.extractedUrl),this.urlSerializer.serialize(li.urlAfterRedirects),li.targetSnapshot);this.events.next(dr)}),(0,X.w)(li=>{let dr=!1;return(0,l.of)(li).pipe(dn(Ae.paramsInheritanceStrategy,this.environmentInjector),(0,xe.b)({next:()=>dr=!0,complete:()=>{dr||(Ae.restoreHistory(li),this.cancelNavigationTransition(li,"",2))}}))}),(0,xe.b)(li=>{const dr=new hi(li.id,this.urlSerializer.serialize(li.extractedUrl),this.urlSerializer.serialize(li.urlAfterRedirects),li.targetSnapshot);this.events.next(dr)}))}),Zs(_n=>{const li=dr=>{const Sr=[];dr.routeConfig?.loadComponent&&!dr.routeConfig._loadedComponent&&Sr.push(this.configLoader.loadComponent(dr.routeConfig).pipe((0,xe.b)(fo=>{dr.component=fo}),(0,ae.U)(()=>{})));for(const fo of dr.children)Sr.push(...li(fo));return Sr};return(0,E.a)(li(_n.targetSnapshot.root)).pipe((0,Z.d)(),(0,ve.q)(1))}),Zs(()=>this.afterPreactivation()),(0,ae.U)(_n=>{const li=function Cs(et,Ae,Ge){const xt=$r(et,Ae._root,Ge?Ge._root:void 0);return new Mi(xt,Ae)}(Ae.routeReuseStrategy,_n.targetSnapshot,_n.currentRouterState);return Ge={..._n,targetRouterState:li}}),(0,xe.b)(_n=>{Ae.currentUrlTree=_n.urlAfterRedirects,Ae.rawUrlTree=Ae.urlHandlingStrategy.merge(_n.urlAfterRedirects,_n.rawUrl),Ae.routerState=_n.targetRouterState,"deferred"===Ae.urlUpdateStrategy&&(_n.extras.skipLocationChange||Ae.setBrowserUrl(Ae.rawUrlTree,_n),Ae.browserUrlTree=_n.urlAfterRedirects)}),((et,Ae,Ge)=>(0,ae.U)(xt=>(new ho(Ae,xt.targetRouterState,xt.currentRouterState,Ge).activate(et),xt)))(this.rootContexts,Ae.routeReuseStrategy,_n=>this.events.next(_n)),(0,ve.q)(1),(0,xe.b)({next:_n=>{xt=!0,this.lastSuccessfulNavigation=this.currentNavigation,Ae.navigated=!0,this.events.next(new at(_n.id,this.urlSerializer.serialize(_n.extractedUrl),this.urlSerializer.serialize(Ae.currentUrlTree))),Ae.titleStrategy?.updateTitle(_n.targetRouterState.snapshot),_n.resolve(!0)},complete:()=>{xt=!0}}),(0,nt.x)(()=>{if(!xt&&!Ht){const _n="";this.cancelNavigationTransition(Ge,_n,1)}this.currentNavigation?.id===Ge.id&&(this.currentNavigation=null)}),(0,de.K)(_n=>{if(Ht=!0,tn(_n)){Jn(_n)||(Ae.navigated=!0,Ae.restoreHistory(Ge,!0));const li=new It(Ge.id,this.urlSerializer.serialize(Ge.extractedUrl),_n.message,_n.cancellationCode);if(this.events.next(li),Jn(_n)){const dr=Ae.urlHandlingStrategy.merge(_n.url,Ae.rawUrlTree),Sr={skipLocationChange:Ge.extras.skipLocationChange,replaceUrl:"eager"===Ae.urlUpdateStrategy||Os(Ge.source)};Ae.scheduleNavigation(dr,Fr,null,Sr,{resolve:Ge.resolve,reject:Ge.reject,promise:Ge.promise})}else Ge.resolve(!1)}else{Ae.restoreHistory(Ge,!0);const li=new St(Ge.id,this.urlSerializer.serialize(Ge.extractedUrl),_n,Ge.targetSnapshot??void 0);this.events.next(li);try{Ge.resolve(Ae.errorHandler(_n))}catch(dr){Ge.reject(dr)}}return Y.E}))}))}cancelNavigationTransition(Ae,Ge,xt){const Ht=new It(Ae.id,this.urlSerializer.serialize(Ae.extractedUrl),Ge,xt);this.events.next(Ht),Ae.resolve(!1)}}function Os(et){return et!==Fr}$l.\u0275fac=function(Ae){return new(Ae||$l)},$l.\u0275prov=o.Yz7({token:$l,factory:$l.\u0275fac,providedIn:"root"});class yu{buildTitle(Ae){let Ge,xt=Ae.root;for(;void 0!==xt;)Ge=this.getResolvedTitleForRoute(xt)??Ge,xt=xt.children.find(Ht=>Ht.outlet===tt);return Ge}getResolvedTitleForRoute(Ae){return Ae.data[Ne]}}yu.\u0275fac=function(Ae){return new(Ae||yu)},yu.\u0275prov=o.Yz7({token:yu,factory:function(){return(0,o.f3M)(Ks)},providedIn:"root"});class Ks extends yu{constructor(Ae){super(),this.title=Ae}updateTitle(Ae){const Ge=this.buildTitle(Ae);void 0!==Ge&&this.title.setTitle(Ge)}}Ks.\u0275fac=function(Ae){return new(Ae||Ks)(o.LFG(Ve.Dx))},Ks.\u0275prov=o.Yz7({token:Ks,factory:Ks.\u0275fac,providedIn:"root"});class _l{}_l.\u0275fac=function(Ae){return new(Ae||_l)},_l.\u0275prov=o.Yz7({token:_l,factory:function(){return(0,o.f3M)(Gs)},providedIn:"root"});class Dc{shouldDetach(Ae){return!1}store(Ae,Ge){}shouldAttach(Ae){return!1}retrieve(Ae){return null}shouldReuseRoute(Ae,Ge){return Ae.routeConfig===Ge.routeConfig}}class Gs extends Dc{}Gs.\u0275fac=function(){let et;return function(Ge){return(et||(et=o.n5z(Gs)))(Ge||Gs)}}(),Gs.\u0275prov=o.Yz7({token:Gs,factory:Gs.\u0275fac,providedIn:"root"});const zl=new o.OlP("",{providedIn:"root",factory:()=>({})});class vl{}vl.\u0275fac=function(Ae){return new(Ae||vl)},vl.\u0275prov=o.Yz7({token:vl,factory:function(){return(0,o.f3M)(Lc)},providedIn:"root"});class Lc{shouldProcessUrl(Ae){return!0}extract(Ae){return Ae}merge(Ae,Ge){return Ae}}Lc.\u0275fac=function(Ae){return new(Ae||Lc)},Lc.\u0275prov=o.Yz7({token:Lc,factory:Lc.\u0275fac,providedIn:"root"});const Xe=!1;function zt(et){throw et}function mn(et,Ae,Ge){return Ae.parse("/")}const ni={paths:"exact",fragment:"ignored",matrixParams:"ignored",queryParams:"exact"},Fi={paths:"subset",fragment:"ignored",matrixParams:"ignored",queryParams:"subset"};class nr{get navigationId(){return this.navigationTransitions.navigationId}get browserPageId(){if("computed"===this.canceledNavigationResolution)return this.location.getState()?.\u0275routerPageId}get events(){return this.navigationTransitions.events}constructor(){this.disposed=!1,this.currentPageId=0,this.console=(0,o.f3M)(o.c2e),this.isNgZoneEnabled=!1,this.options=(0,o.f3M)(zl,{optional:!0})||{},this.errorHandler=this.options.errorHandler||zt,this.malformedUriErrorHandler=this.options.malformedUriErrorHandler||mn,this.navigated=!1,this.lastSuccessfulId=-1,this.urlHandlingStrategy=(0,o.f3M)(vl),this.routeReuseStrategy=(0,o.f3M)(_l),this.urlCreationStrategy=(0,o.f3M)(ps),this.titleStrategy=(0,o.f3M)(yu),this.onSameUrlNavigation=this.options.onSameUrlNavigation||"ignore",this.paramsInheritanceStrategy=this.options.paramsInheritanceStrategy||"emptyOnly",this.urlUpdateStrategy=this.options.urlUpdateStrategy||"deferred",this.canceledNavigationResolution=this.options.canceledNavigationResolution||"replace",this.config=nn((0,o.f3M)(os,{optional:!0})??[]),this.navigationTransitions=(0,o.f3M)($l),this.urlSerializer=(0,o.f3M)(vn),this.location=(0,o.f3M)(he.Ye),this.isNgZoneEnabled=(0,o.f3M)(o.R0b)instanceof o.R0b&&o.R0b.isInAngularZone(),this.resetConfig(this.config),this.currentUrlTree=new Ai,this.rawUrlTree=this.currentUrlTree,this.browserUrlTree=this.currentUrlTree,this.routerState=Di(this.currentUrlTree,null),this.navigationTransitions.setupNavigations(this).subscribe(Ae=>{this.lastSuccessfulId=Ae.id,this.currentPageId=this.browserPageId??0},Ae=>{this.console.warn(`Unhandled Navigation Error: ${Ae}`)})}resetRootComponentType(Ae){this.routerState.root.component=Ae,this.navigationTransitions.rootComponentType=Ae}initialNavigation(){if(this.setUpLocationChangeListener(),!this.navigationTransitions.hasRequestedNavigation){const Ae=this.location.getState();this.navigateToSyncWithBrowser(this.location.path(!0),Fr,Ae)}}setUpLocationChangeListener(){this.locationSubscription||(this.locationSubscription=this.location.subscribe(Ae=>{const Ge="popstate"===Ae.type?"popstate":"hashchange";"popstate"===Ge&&setTimeout(()=>{this.navigateToSyncWithBrowser(Ae.url,Ge,Ae.state)},0)}))}navigateToSyncWithBrowser(Ae,Ge,xt){const Ht={replaceUrl:!0},_n=xt?.navigationId?xt:null;if(xt){const dr={...xt};delete dr.navigationId,delete dr.\u0275routerPageId,0!==Object.keys(dr).length&&(Ht.state=dr)}const li=this.parseUrl(Ae);this.scheduleNavigation(li,Ge,_n,Ht)}get url(){return this.serializeUrl(this.currentUrlTree)}getCurrentNavigation(){return this.navigationTransitions.currentNavigation}resetConfig(Ae){Xe&&We(Ae),this.config=Ae.map(Xi),this.navigated=!1,this.lastSuccessfulId=-1}ngOnDestroy(){this.dispose()}dispose(){this.navigationTransitions.complete(),this.locationSubscription&&(this.locationSubscription.unsubscribe(),this.locationSubscription=void 0),this.disposed=!0}createUrlTree(Ae,Ge={}){const{relativeTo:xt,queryParams:Ht,fragment:_n,queryParamsHandling:li,preserveFragment:dr}=Ge,Sr=dr?this.currentUrlTree.fragment:_n;let fo=null;switch(li){case"merge":fo={...this.currentUrlTree.queryParams,...Ht};break;case"preserve":fo=this.currentUrlTree.queryParams;break;default:fo=Ht||null}return null!==fo&&(fo=this.removeEmptyProps(fo)),this.urlCreationStrategy.createUrlTree(xt,this.routerState,this.currentUrlTree,Ae,fo,Sr??null)}navigateByUrl(Ae,Ge={skipLocationChange:!1}){Xe&&(this.isNgZoneEnabled&&!o.R0b.isInAngularZone()&&this.console.warn("Navigation triggered outside Angular zone, did you forget to call 'ngZone.run()'?"),Ae instanceof Ai&&Ae._warnIfUsedForNavigation&&this.console.warn(Ae._warnIfUsedForNavigation));const xt=Qe(Ae)?Ae:this.parseUrl(Ae),Ht=this.urlHandlingStrategy.merge(xt,this.rawUrlTree);return this.scheduleNavigation(Ht,Fr,null,Ge)}navigate(Ae,Ge={skipLocationChange:!1}){return function zo(et){for(let Ae=0;Ae<et.length;Ae++){const Ge=et[Ae];if(null==Ge)throw new o.vHH(4008,Xe&&`The requested path contains ${Ge} segment at index ${Ae}`)}}(Ae),this.navigateByUrl(this.createUrlTree(Ae,Ge),Ge)}serializeUrl(Ae){return this.urlSerializer.serialize(Ae)}parseUrl(Ae){let Ge;try{Ge=this.urlSerializer.parse(Ae)}catch(xt){Ge=this.malformedUriErrorHandler(xt,this.urlSerializer,Ae)}return Ge}isActive(Ae,Ge){let xt;if(xt=!0===Ge?{...ni}:!1===Ge?{...Fi}:Ge,Qe(Ae))return kn(this.currentUrlTree,Ae,xt);const Ht=this.parseUrl(Ae);return kn(this.currentUrlTree,Ht,xt)}removeEmptyProps(Ae){return Object.keys(Ae).reduce((Ge,xt)=>{const Ht=Ae[xt];return null!=Ht&&(Ge[xt]=Ht),Ge},{})}scheduleNavigation(Ae,Ge,xt,Ht,_n){if(this.disposed)return Promise.resolve(!1);let li,dr,Sr,fo;return _n?(li=_n.resolve,dr=_n.reject,Sr=_n.promise):Sr=new Promise((ms,Nl)=>{li=ms,dr=Nl}),fo="computed"===this.canceledNavigationResolution?xt&&xt.\u0275routerPageId?xt.\u0275routerPageId:(this.browserPageId??0)+1:0,this.navigationTransitions.handleNavigationRequest({targetPageId:fo,source:Ge,restoredState:xt,currentUrlTree:this.currentUrlTree,currentRawUrl:this.currentUrlTree,rawUrl:Ae,extras:Ht,resolve:li,reject:dr,promise:Sr,currentSnapshot:this.routerState.snapshot,currentRouterState:this.routerState}),Sr.catch(ms=>Promise.reject(ms))}setBrowserUrl(Ae,Ge){const xt=this.urlSerializer.serialize(Ae);if(this.location.isCurrentPathEqualTo(xt)||Ge.extras.replaceUrl){const Ht=this.browserPageId,_n={...Ge.extras.state,...this.generateNgRouterState(Ge.id,Ht)};this.location.replaceState(xt,"",_n)}else{const Ht={...Ge.extras.state,...this.generateNgRouterState(Ge.id,Ge.targetPageId)};this.location.go(xt,"",Ht)}}restoreHistory(Ae,Ge=!1){if("computed"===this.canceledNavigationResolution){const xt=this.browserPageId??this.currentPageId,Ht=this.currentPageId-xt;0!==Ht?this.location.historyGo(Ht):this.currentUrlTree===this.getCurrentNavigation()?.finalUrl&&0===Ht&&(this.resetState(Ae),this.browserUrlTree=Ae.currentUrlTree,this.resetUrlToCurrentUrlTree())}else"replace"===this.canceledNavigationResolution&&(Ge&&this.resetState(Ae),this.resetUrlToCurrentUrlTree())}resetState(Ae){this.routerState=Ae.currentRouterState,this.currentUrlTree=Ae.currentUrlTree,this.rawUrlTree=this.urlHandlingStrategy.merge(this.currentUrlTree,Ae.rawUrl)}resetUrlToCurrentUrlTree(){this.location.replaceState(this.urlSerializer.serialize(this.rawUrlTree),"",this.generateNgRouterState(this.lastSuccessfulId,this.currentPageId))}generateNgRouterState(Ae,Ge){return"computed"===this.canceledNavigationResolution?{navigationId:Ae,\u0275routerPageId:Ge}:{navigationId:Ae}}}nr.\u0275fac=function(Ae){return new(Ae||nr)},nr.\u0275prov=o.Yz7({token:nr,factory:nr.\u0275fac,providedIn:"root"});class oa{constructor(Ae,Ge,xt,Ht,_n,li){this.router=Ae,this.route=Ge,this.tabIndexAttribute=xt,this.renderer=Ht,this.el=_n,this.locationStrategy=li,this._preserveFragment=!1,this._skipLocationChange=!1,this._replaceUrl=!1,this.href=null,this.commands=null,this.onChanges=new ue.x;const dr=_n.nativeElement.tagName?.toLowerCase();this.isAnchorElement="a"===dr||"area"===dr,this.isAnchorElement?this.subscription=Ae.events.subscribe(Sr=>{Sr instanceof at&&this.updateHref()}):this.setTabIndexIfNotOnNativeEl("0")}set preserveFragment(Ae){this._preserveFragment=(0,o.D6c)(Ae)}get preserveFragment(){return this._preserveFragment}set skipLocationChange(Ae){this._skipLocationChange=(0,o.D6c)(Ae)}get skipLocationChange(){return this._skipLocationChange}set replaceUrl(Ae){this._replaceUrl=(0,o.D6c)(Ae)}get replaceUrl(){return this._replaceUrl}setTabIndexIfNotOnNativeEl(Ae){null!=this.tabIndexAttribute||this.isAnchorElement||this.applyAttributeValue("tabindex",Ae)}ngOnChanges(Ae){this.isAnchorElement&&this.updateHref(),this.onChanges.next(this)}set routerLink(Ae){null!=Ae?(this.commands=Array.isArray(Ae)?Ae:[Ae],this.setTabIndexIfNotOnNativeEl("0")):(this.commands=null,this.setTabIndexIfNotOnNativeEl(null))}onClick(Ae,Ge,xt,Ht,_n){if(null===this.urlTree||this.isAnchorElement&&(0!==Ae||Ge||xt||Ht||_n||"string"==typeof this.target&&"_self"!=this.target))return!0;const li={skipLocationChange:this.skipLocationChange,replaceUrl:this.replaceUrl,state:this.state};return this.router.navigateByUrl(this.urlTree,li),!this.isAnchorElement}ngOnDestroy(){this.subscription?.unsubscribe()}updateHref(){this.href=null!==this.urlTree&&this.locationStrategy?this.locationStrategy?.prepareExternalUrl(this.router.serializeUrl(this.urlTree)):null;const Ae=null===this.href?null:(0,o.P3R)(this.href,this.el.nativeElement.tagName.toLowerCase(),"href");this.applyAttributeValue("href",Ae)}applyAttributeValue(Ae,Ge){const xt=this.renderer,Ht=this.el.nativeElement;null!==Ge?xt.setAttribute(Ht,Ae,Ge):xt.removeAttribute(Ht,Ae)}get urlTree(){return null===this.commands?null:this.router.createUrlTree(this.commands,{relativeTo:void 0!==this.relativeTo?this.relativeTo:this.route,queryParams:this.queryParams,fragment:this.fragment,queryParamsHandling:this.queryParamsHandling,preserveFragment:this.preserveFragment})}}oa.\u0275fac=function(Ae){return new(Ae||oa)(o.Y36(nr),o.Y36(ur),o.$8M("tabindex"),o.Y36(o.Qsj),o.Y36(o.SBq),o.Y36(he.S$))},oa.\u0275dir=o.lG2({type:oa,selectors:[["","routerLink",""]],hostVars:1,hostBindings:function(Ae,Ge){1&Ae&&o.NdJ("click",function(Ht){return Ge.onClick(Ht.button,Ht.ctrlKey,Ht.shiftKey,Ht.altKey,Ht.metaKey)}),2&Ae&&o.uIk("target",Ge.target)},inputs:{target:"target",queryParams:"queryParams",fragment:"fragment",queryParamsHandling:"queryParamsHandling",state:"state",relativeTo:"relativeTo",preserveFragment:"preserveFragment",skipLocationChange:"skipLocationChange",replaceUrl:"replaceUrl",routerLink:"routerLink"},standalone:!0,features:[o.TTD]});class Ca{get isActive(){return this._isActive}constructor(Ae,Ge,xt,Ht,_n){this.router=Ae,this.element=Ge,this.renderer=xt,this.cdr=Ht,this.link=_n,this.classes=[],this._isActive=!1,this.routerLinkActiveOptions={exact:!1},this.isActiveChange=new o.vpe,this.routerEventsSubscription=Ae.events.subscribe(li=>{li instanceof at&&this.update()})}ngAfterContentInit(){(0,l.of)(this.links.changes,(0,l.of)(null)).pipe((0,ut.J)()).subscribe(Ae=>{this.update(),this.subscribeToEachLinkOnChanges()})}subscribeToEachLinkOnChanges(){this.linkInputChangesSubscription?.unsubscribe();const Ae=[...this.links.toArray(),this.link].filter(Ge=>!!Ge).map(Ge=>Ge.onChanges);this.linkInputChangesSubscription=(0,e.D)(Ae).pipe((0,ut.J)()).subscribe(Ge=>{this._isActive!==this.isLinkActive(this.router)(Ge)&&this.update()})}set routerLinkActive(Ae){const Ge=Array.isArray(Ae)?Ae:Ae.split(" ");this.classes=Ge.filter(xt=>!!xt)}ngOnChanges(Ae){this.update()}ngOnDestroy(){this.routerEventsSubscription.unsubscribe(),this.linkInputChangesSubscription?.unsubscribe()}update(){!this.links||!this.router.navigated||Promise.resolve().then(()=>{const Ae=this.hasActiveLinks();this._isActive!==Ae&&(this._isActive=Ae,this.cdr.markForCheck(),this.classes.forEach(Ge=>{Ae?this.renderer.addClass(this.element.nativeElement,Ge):this.renderer.removeClass(this.element.nativeElement,Ge)}),Ae&&void 0!==this.ariaCurrentWhenActive?this.renderer.setAttribute(this.element.nativeElement,"aria-current",this.ariaCurrentWhenActive.toString()):this.renderer.removeAttribute(this.element.nativeElement,"aria-current"),this.isActiveChange.emit(Ae))})}isLinkActive(Ae){const Ge=function Ba(et){return!!et.paths}(this.routerLinkActiveOptions)?this.routerLinkActiveOptions:this.routerLinkActiveOptions.exact||!1;return xt=>!!xt.urlTree&&Ae.isActive(xt.urlTree,Ge)}hasActiveLinks(){const Ae=this.isLinkActive(this.router);return this.link&&Ae(this.link)||this.links.some(Ae)}}Ca.\u0275fac=function(Ae){return new(Ae||Ca)(o.Y36(nr),o.Y36(o.SBq),o.Y36(o.Qsj),o.Y36(o.sBO),o.Y36(oa,8))},Ca.\u0275dir=o.lG2({type:Ca,selectors:[["","routerLinkActive",""]],contentQueries:function(Ae,Ge,xt){if(1&Ae&&o.Suo(xt,oa,5),2&Ae){let Ht;o.iGM(Ht=o.CRH())&&(Ge.links=Ht)}},inputs:{routerLinkActiveOptions:"routerLinkActiveOptions",ariaCurrentWhenActive:"ariaCurrentWhenActive",routerLinkActive:"routerLinkActive"},outputs:{isActiveChange:"isActiveChange"},exportAs:["routerLinkActive"],standalone:!0,features:[o.TTD]});class Is{}class ul{preload(Ae,Ge){return Ge().pipe((0,de.K)(()=>(0,l.of)(null)))}}ul.\u0275fac=function(Ae){return new(Ae||ul)},ul.\u0275prov=o.Yz7({token:ul,factory:ul.\u0275fac,providedIn:"root"});class bu{preload(Ae,Ge){return(0,l.of)(null)}}bu.\u0275fac=function(Ae){return new(Ae||bu)},bu.\u0275prov=o.Yz7({token:bu,factory:bu.\u0275fac,providedIn:"root"});class Zd{constructor(Ae,Ge,xt,Ht,_n){this.router=Ae,this.injector=xt,this.preloadingStrategy=Ht,this.loader=_n}setUpPreloading(){this.subscription=this.router.events.pipe((0,ge.h)(Ae=>Ae instanceof at),(0,Pe.b)(()=>this.preload())).subscribe(()=>{})}preload(){return this.processRoutes(this.injector,this.router.config)}ngOnDestroy(){this.subscription&&this.subscription.unsubscribe()}processRoutes(Ae,Ge){const xt=[];for(const Ht of Ge){Ht.providers&&!Ht._injector&&(Ht._injector=(0,o.MMx)(Ht.providers,Ae,`Route: ${Ht.path}`));const _n=Ht._injector??Ae,li=Ht._loadedInjector??_n;(Ht.loadChildren&&!Ht._loadedRoutes&&void 0===Ht.canLoad||Ht.loadComponent&&!Ht._loadedComponent)&&xt.push(this.preloadConfig(_n,Ht)),(Ht.children||Ht._loadedRoutes)&&xt.push(this.processRoutes(li,Ht.children??Ht._loadedRoutes))}return(0,e.D)(xt).pipe((0,ut.J)())}preloadConfig(Ae,Ge){return this.preloadingStrategy.preload(Ge,()=>{let xt;xt=Ge.loadChildren&&void 0===Ge.canLoad?this.loader.loadChildren(Ae,Ge):(0,l.of)(null);const Ht=xt.pipe((0,ne.z)(_n=>null===_n?(0,l.of)(void 0):(Ge._loadedRoutes=_n.routes,Ge._loadedInjector=_n.injector,this.processRoutes(_n.injector??Ae,_n.routes))));if(Ge.loadComponent&&!Ge._loadedComponent){const _n=this.loader.loadComponent(Ge);return(0,e.D)([Ht,_n]).pipe((0,ut.J)())}return Ht})}}Zd.\u0275fac=function(Ae){return new(Ae||Zd)(o.LFG(nr),o.LFG(o.Sil),o.LFG(o.lqb),o.LFG(Is),o.LFG(_s))},Zd.\u0275prov=o.Yz7({token:Zd,factory:Zd.\u0275fac,providedIn:"root"});const Qu=new o.OlP("");class _t{constructor(Ae,Ge,xt,Ht,_n={}){this.urlSerializer=Ae,this.transitions=Ge,this.viewportScroller=xt,this.zone=Ht,this.options=_n,this.lastId=0,this.lastSource="imperative",this.restoredId=0,this.store={},_n.scrollPositionRestoration=_n.scrollPositionRestoration||"disabled",_n.anchorScrolling=_n.anchorScrolling||"disabled"}init(){"disabled"!==this.options.scrollPositionRestoration&&this.viewportScroller.setHistoryScrollRestoration("manual"),this.routerEventsSubscription=this.createScrollEvents(),this.scrollEventsSubscription=this.consumeScrollEvents()}createScrollEvents(){return this.transitions.events.subscribe(Ae=>{Ae instanceof Wn?(this.store[this.lastId]=this.viewportScroller.getScrollPosition(),this.lastSource=Ae.navigationTrigger,this.restoredId=Ae.restoredState?Ae.restoredState.navigationId:0):Ae instanceof at&&(this.lastId=Ae.id,this.scheduleScrollEvent(Ae,this.urlSerializer.parse(Ae.urlAfterRedirects).fragment))})}consumeScrollEvents(){return this.transitions.events.subscribe(Ae=>{Ae instanceof to&&(Ae.position?"top"===this.options.scrollPositionRestoration?this.viewportScroller.scrollToPosition([0,0]):"enabled"===this.options.scrollPositionRestoration&&this.viewportScroller.scrollToPosition(Ae.position):Ae.anchor&&"enabled"===this.options.anchorScrolling?this.viewportScroller.scrollToAnchor(Ae.anchor):"disabled"!==this.options.scrollPositionRestoration&&this.viewportScroller.scrollToPosition([0,0]))})}scheduleScrollEvent(Ae,Ge){this.zone.runOutsideAngular(()=>{setTimeout(()=>{this.zone.run(()=>{this.transitions.events.next(new to(Ae,"popstate"===this.lastSource?this.store[this.restoredId]:null,Ge))})},0)})}ngOnDestroy(){this.routerEventsSubscription?.unsubscribe(),this.scrollEventsSubscription?.unsubscribe()}}var q,et;_t.\u0275fac=function(Ae){o.$Z()},_t.\u0275prov=o.Yz7({token:_t,factory:_t.\u0275fac}),(et=q||(q={}))[et.COMPLETE=0]="COMPLETE",et[et.FAILED=1]="FAILED",et[et.REDIRECTING=2]="REDIRECTING";const dt=!1;function Ei(et){return et.routerState.root}function Po(et,Ae){return{\u0275kind:et,\u0275providers:Ae}}const En=new o.OlP("",{providedIn:"root",factory:()=>!1});o.Xts;function cs(){const et=(0,o.f3M)(o.zs3);return Ae=>{const Ge=et.get(o.z2F);if(Ae!==Ge.components[0])return;const xt=et.get(nr),Ht=et.get(wu);1===et.get(Iu)&&xt.initialNavigation(),et.get(Rd,null,o.XFs.Optional)?.setUpPreloading(),et.get(Qu,null,o.XFs.Optional)?.init(),xt.resetRootComponentType(Ge.componentTypes[0]),Ht.closed||(Ht.next(),Ht.complete(),Ht.unsubscribe())}}const wu=new o.OlP(dt?"bootstrap done indicator":"",{factory:()=>new ue.x}),Iu=new o.OlP(dt?"initial navigation":"",{providedIn:"root",factory:()=>1});function sd(){return Po(2,[{provide:Iu,useValue:0},{provide:o.ip1,multi:!0,deps:[o.zs3],useFactory:Ae=>{const Ge=Ae.get(he.V_,Promise.resolve());return()=>Ge.then(()=>new Promise(xt=>{const Ht=Ae.get(nr),_n=Ae.get(wu);(function W(et,Ae){et.events.pipe((0,ge.h)(Ge=>Ge instanceof at||Ge instanceof It||Ge instanceof St||Ge instanceof Qt),(0,ae.U)(Ge=>Ge instanceof at||Ge instanceof Qt?q.COMPLETE:Ge instanceof It&&(0===Ge.code||1===Ge.code)?q.REDIRECTING:q.FAILED),(0,ge.h)(Ge=>Ge!==q.REDIRECTING),(0,ve.q)(1)).subscribe(()=>{Ae()})})(Ht,()=>{xt(!0)}),Ae.get($l).afterPreactivation=()=>(xt(!0),_n.closed?(0,l.of)(void 0):_n),Ht.initialNavigation()}))}}])}function Gd(){let et=[];return et=dt?[{provide:o.Xts,multi:!0,useFactory:()=>{const Ae=(0,o.f3M)(nr);return()=>Ae.events.subscribe(Ge=>{console.group?.(`Router Event: ${Ge.constructor.name}`),console.log(function Oa(et){if(!("type"in et))return`Unknown Router Event: ${et.constructor.name}`;switch(et.type){case 14:return`ActivationEnd(path: '${et.snapshot.routeConfig?.path||""}')`;case 13:return`ActivationStart(path: '${et.snapshot.routeConfig?.path||""}')`;case 12:return`ChildActivationEnd(path: '${et.snapshot.routeConfig?.path||""}')`;case 11:return`ChildActivationStart(path: '${et.snapshot.routeConfig?.path||""}')`;case 8:return`GuardsCheckEnd(id: ${et.id}, url: '${et.url}', urlAfterRedirects: '${et.urlAfterRedirects}', state: ${et.state}, shouldActivate: ${et.shouldActivate})`;case 7:return`GuardsCheckStart(id: ${et.id}, url: '${et.url}', urlAfterRedirects: '${et.urlAfterRedirects}', state: ${et.state})`;case 2:return`NavigationCancel(id: ${et.id}, url: '${et.url}')`;case 16:return`NavigationSkipped(id: ${et.id}, url: '${et.url}')`;case 1:return`NavigationEnd(id: ${et.id}, url: '${et.url}', urlAfterRedirects: '${et.urlAfterRedirects}')`;case 3:return`NavigationError(id: ${et.id}, url: '${et.url}', error: ${et.error})`;case 0:return`NavigationStart(id: ${et.id}, url: '${et.url}')`;case 6:return`ResolveEnd(id: ${et.id}, url: '${et.url}', urlAfterRedirects: '${et.urlAfterRedirects}', state: ${et.state})`;case 5:return`ResolveStart(id: ${et.id}, url: '${et.url}', urlAfterRedirects: '${et.urlAfterRedirects}', state: ${et.state})`;case 10:return`RouteConfigLoadEnd(path: ${et.route.path})`;case 9:return`RouteConfigLoadStart(path: ${et.route.path})`;case 4:return`RoutesRecognized(id: ${et.id}, url: '${et.url}', urlAfterRedirects: '${et.urlAfterRedirects}', state: ${et.state})`;case 15:const Ae=et.position?`${et.position[0]}, ${et.position[1]}`:null;return`Scroll(anchor: '${et.anchor}', position: '${Ae}')`}}(Ge)),console.log(Ge),console.groupEnd?.()})}}]:[],Po(1,et)}const Rd=new o.OlP(dt?"router preloader":"");function Bu(et){return Po(0,[{provide:Rd,useExisting:Zd},{provide:Is,useExisting:et}])}const Go=!1,Mm=new o.OlP(Go?"router duplicate forRoot guard":"ROUTER_FORROOT_GUARD"),am=[he.Ye,{provide:vn,useClass:In},nr,_i,{provide:ur,useFactory:Ei,deps:[nr]},_s,Go?{provide:En,useValue:!0}:[]];function Ef(){return new o.PXZ("Router",nr)}class Xc{constructor(Ae){}static forRoot(Ae,Ge){return{ngModule:Xc,providers:[am,Go&&Ge?.enableTracing?Gd().\u0275providers:[],{provide:os,multi:!0,useValue:Ae},{provide:Mm,useFactory:ws,deps:[[nr,new o.FiY,new o.tp0]]},{provide:zl,useValue:Ge||{}},Ge?.useHash?{provide:he.S$,useClass:he.Do}:{provide:he.S$,useClass:he.b0},{provide:Qu,useFactory:()=>{const et=(0,o.f3M)(he.EM),Ae=(0,o.f3M)(o.R0b),Ge=(0,o.f3M)(zl),xt=(0,o.f3M)($l),Ht=(0,o.f3M)(vn);return Ge.scrollOffset&&et.setOffset(Ge.scrollOffset),new _t(Ht,xt,et,Ae,Ge)}},Ge?.preloadingStrategy?Bu(Ge.preloadingStrategy).\u0275providers:[],{provide:o.PXZ,multi:!0,useFactory:Ef},Ge?.initialNavigation?Ll(Ge):[],[{provide:Vc,useFactory:cs},{provide:o.tb,multi:!0,useExisting:Vc}]]}}static forChild(Ae){return{ngModule:Xc,providers:[{provide:os,multi:!0,useValue:Ae}]}}}function ws(et){if(Go&&et)throw new o.vHH(4007,"The Router was provided more than once. This can happen if 'forRoot' is used outside of the root injector. Lazy loaded modules should use RouterModule.forChild() instead.");return"guarded"}function Ll(et){return["disabled"===et.initialNavigation?Po(3,[{provide:o.ip1,multi:!0,useFactory:()=>{const Ae=(0,o.f3M)(nr);return()=>{Ae.setUpLocationChangeListener()}}},{provide:Iu,useValue:2}]).\u0275providers:[],"enabledBlocking"===et.initialNavigation?sd().\u0275providers:[]]}Xc.\u0275fac=function(Ae){return new(Ae||Xc)(o.LFG(Mm,8))},Xc.\u0275mod=o.oAB({type:Xc}),Xc.\u0275inj=o.cJS({imports:[Ta]});const Vc=new o.OlP(Go?"Router Initializer":"");new o.GfV("15.2.9")},88692:(qe,I,p)=>{"use strict";p.r(I),p.d(I,{AbstractAttachmentPicker:()=>Id,AbstractRestService:()=>Ti,AbstractValidator:()=>Qf,AcceptanceDocumentStatusTypes:()=>Ws,Actions:()=>dd,Address:()=>jo,Age:()=>Ns,AgreementTypes:()=>fu,AllergyAndDietSettingsService:()=>Jm,ApplicationApplicant:()=>Nd,ApplicationArea:()=>pp,ApplicationChildBasicInfo:()=>bl,ApplicationHealthService:()=>jg,ApplicationHealthStatus:()=>mg,ApplicationMunicipality:()=>Mf,ApplicationQueryType:()=>Gg,ApplicationStates:()=>Je,ApplicationThanksMessage:()=>Td,ApplicationTypes:()=>N,ApplicationTypesLong:()=>$e,Area:()=>vh,AttachmentComponent:()=>k_,AttachmentComponentModule:()=>Gy,AttachmentFileSize:()=>fc,AttachmentPurposes:()=>Sc,AttachmentSelectorComponent:()=>fs,AttachmentSelectorComponentModule:()=>Bs,AttachmentsModule:()=>og,AttachmentsService:()=>Ys,AuthDomains:()=>Vl,AutocompleteGroupSelectComponent:()=>Gv,AutocompleteGroupSelectComponentModule:()=>Ny,BasicAddress:()=>gg,BrowserMocks:()=>O1,BrowserPlatformService:()=>Hm,ButtonsSelectComponent:()=>L_,ButtonsSelectComponentModule:()=>o_,CalendarComponent:()=>wg,CalendarComponentModule:()=>_m,ChannelStream:()=>T_,CheckboxListComponent:()=>pf,CheckboxListComponentModule:()=>mm,CheckboxToggleComponent:()=>kb,CheckboxToggleComponentModule:()=>By,Child:()=>zh,ChildResidesTypes:()=>ud,Code:()=>Tm,CodeService:()=>Kg,CodeTypes:()=>_e,CommonSearchbarComponent:()=>pv,CommonSearchbarComponentModule:()=>ng,CommunicationContacts:()=>Kf,CommunicationPreferenceTypes:()=>vs,Constants:()=>Ro,Contact:()=>Rp,ContactInfo:()=>yr,ContactTypes:()=>us,ContentLoaderComponent:()=>Cg,ContentLoaderModule:()=>zd,ContextualInstructionsService:()=>wc,CurrencyInputComponent:()=>e_,CurrencyInputComponentModule:()=>eh,DataTableSource:()=>Tg,DataTableSourceStateComponent:()=>ky,DataTableSourceStateModule:()=>zv,DateFormats:()=>as,DatepickerComponent:()=>Np,DatepickerModule:()=>_d,DatepickerWeekDates:()=>em,DecisionOrganizationTypes:()=>wo,DecisionStates:()=>Vt,DecisionStatus:()=>ua,DecisionStatusTypes:()=>Ls,DecisionTypes:()=>Rr,DecisionTypesLong:()=>Tt,DefaultWeeklyCareTimeOptions:()=>Kd,DetectValueChanges:()=>SC,DeviceTypes:()=>Bd,DirectivesModule:()=>Jc,DocumentComponent:()=>Uy,DocumentModule:()=>Sg,ECECMessageReasonCodes:()=>_f,ECECMessageTemplateType:()=>rh,EcecFeeAndValueDecisionContactDetailsService:()=>vv,EditPlacementTypes:()=>O,EducationGroup:()=>J_,Employment:()=>fg,EmploymentInfoLabels:()=>Zp,EmploymentInformationComponent:()=>w0,EmploymentInformationComponentModule:()=>yv,EmploymentTypes:()=>Xl,EmptyArrayMessageComponent:()=>Fb,EmptyArrayMessageComponentModule:()=>mv,Entity:()=>Ql,Environment:()=>hu,ErrorPage:()=>Ea,ErrorPageModule:()=>El,ErrorPageRouter:()=>hp,EventBroadcastService:()=>Kc,EventType:()=>Eg,FeeAndDecisionTemplateType:()=>pc,FileService:()=>_p,FileUtils:()=>zu,FilterComponent:()=>ig,FilterComponentModule:()=>gm,FormDatePeriodOptionsComponent:()=>Tr,FormDatePeriodOptionsComponentModule:()=>qh,FormDetailedOptionsComponent:()=>im,FormDetailedOptionsComponentModule:()=>_u,GoToInvalidDirective:()=>bp,GridColDirective:()=>af,GroupPeriod:()=>uc,GroupSimpleModel:()=>q_,Guardian:()=>Ud,GuardianCommunicationPreferencesComponent:()=>P0,GuardianContactComponent:()=>Od,GuardianPin:()=>Sl,GuardianSettingsComponent:()=>Jy,GuardianSettingsComponentModule:()=>Qy,GuardianSettingsService:()=>lg,GuardianTypes:()=>ql,HandleDownloadAttachment:()=>wE,HandleUploadAttachment:()=>NM,HealthCheckInterceptor:()=>Bl,HistoryStates:()=>dp,HtmlEditorComponent:()=>iu,HtmlEditorComponentModule:()=>xp,HtmlRendererComponent:()=>ep,HtmlRendererComponentModule:()=>rd,ImagePreviewModalComponent:()=>mf,IncomeStatementModalTypes:()=>lm,InfoMessageComponent:()=>Pf,InfoMessageModule:()=>I_,InfoMessageType:()=>bh,InfoPopupComponent:()=>qf,InfoPopupComponentModule:()=>wd,KeyboardEventsDirective:()=>Kp,KeyboardKeys:()=>sm,Language:()=>xf,LanguageCheckboxComponent:()=>n_,LanguageCheckboxModule:()=>$v,LanguageCodes:()=>Wg,LanguageExtentOptions:()=>Dm,LanguageName:()=>Nh,LanguageService:()=>Qp,LanguageSwitcherComponent:()=>zy,LanguageSwitcherModule:()=>Ag,Languages:()=>ds,LegendComponent:()=>Wc,LegendComponentModule:()=>Dp,LibCommonTestModule:()=>Kb,LoadMoreItems:()=>w_,LoaderService:()=>yl,Locale:()=>b_,LocaleLanguages:()=>xm,MESSAGES:()=>Lu,MaxLength:()=>mu,MessageTemplateApplicationReasons:()=>A0,MessageTemplateApplicationType:()=>S0,MessageTemplateDecisionType:()=>R_,MessageTemplatePath:()=>LC,MessageTemplateReasonCode:()=>Lg,MessageTemplateRestService:()=>Yb,MessageTemplateType:()=>sg,MessageTemplatesTitle:()=>Km,MessageTypes:()=>tu,MessagingService:()=>qp,MobileApp:()=>Gp,MobilePlatformService:()=>Vm,MockActionSheetController:()=>YM,MockActivatedRoute:()=>Rg,MockAlertController:()=>Cv,MockAllergyAndDietSettingsService:()=>N_,MockAndroidScannerService:()=>rb,MockAngularFireMessaging:()=>ax,MockAppStateService:()=>B_,MockAppVersion:()=>$b,MockApplicationHealthService:()=>Tv,MockAttachmentsService:()=>Ev,MockAuthService:()=>oy,MockBrowserPlatformService:()=>iy,MockCamera:()=>NE,MockChangeDetectorRef:()=>kh,MockChildHealthService:()=>Mv,MockChildService:()=>lx,MockCodeService:()=>Ff,MockContextualInstructionsService:()=>z1,MockDevice:()=>ib,MockEcecFeeAndValueDecisionContactDetailsService:()=>HE,MockEcecPlanService:()=>B1,MockEcecWeeklyCareTimeOptionsService:()=>HM,MockEnvironmentmentService:()=>zE,MockFCM:()=>sh,MockFileOpener:()=>ZM,MockFileService:()=>VM,MockGuardianSettingsService:()=>xv,MockInAppBrowser:()=>ny,MockIosScannerService:()=>Rh,MockLanguageService:()=>Ml,MockLoadingController:()=>I1,MockLocation:()=>tb,MockMessageTemplateRestService:()=>ay,MockMobilePlatformService:()=>ry,MockModalController:()=>O0,MockMomentDateAdapter:()=>F1,MockNFC:()=>Ng,MockNFCSCannerService:()=>cg,MockNavController:()=>Fg,MockNavParams:()=>UC,MockNgControl:()=>Ua,MockNgxPermissionsService:()=>YC,MockNotificationsController:()=>qm,MockNotifyService:()=>FE,MockNumberOfPlacesService:()=>jb,MockOrganizationCommonService:()=>H1,MockOrganizationService:()=>Z1,MockPermitSettingsService:()=>UE,MockPersonCommonService:()=>Gb,MockPersonService:()=>N1,MockPlatform:()=>L0,MockPlatformHelperService:()=>L1,MockPopoverController:()=>P1,MockPrintingSettingsService:()=>V1,MockQuickHandleService:()=>Y1,MockRoleService:()=>GM,MockRoleStateService:()=>zC,MockRouter:()=>kg,MockSiviErrorManagerService:()=>Aa,MockSiviModalController:()=>BC,MockSiviProjectsGatewayService:()=>ch,MockStaffService:()=>YE,MockStorage:()=>qc,MockStorageService:()=>U1,MockTechnicalEnvironmentService:()=>ID,MockToastController:()=>w1,MockTranslateService:()=>Wb,MockUserSettingsService:()=>R0,ModalNames:()=>rc,MonthSelectionComponent:()=>O_,MonthSelectionComponentModule:()=>Ig,MoreInfosType:()=>cd,Municipality:()=>um,MunicipalityAddress:()=>Sm,MunicipalityBasicInfo:()=>Cl,MunicipalityCode:()=>Sa,MunicipalityContact:()=>pd,MunicipalityNumbers:()=>Xu,NFCScannerModule:()=>Hh,NFCScannerService:()=>Cp,NavbarActionButtonComponent:()=>nd,NavbarComponent:()=>Gc,NavbarComponentModule:()=>gu,NavbarMoreOptionsComponent:()=>Df,NavigationTab:()=>Tu,NewChild:()=>$p,NewGuardian:()=>tv,NonDisclosure:()=>jd,NotSupportedBrowserPage:()=>gd,NotSupportedBrowserPageModule:()=>uf,NotificationsIndicatorComponent:()=>Sf,NotifyService:()=>md,OccupationTypes:()=>gh,Organization:()=>_h,OrganizationActivityFocus:()=>xd,OrganizationAddress:()=>C_,OrganizationAttribute:()=>cm,OrganizationChildSearch:()=>M_,OrganizationCommonService:()=>dm,OrganizationContact:()=>$g,OrganizationGeneral:()=>Jd,OrganizationLanguage:()=>Eb,OrganizationLanguageFocus:()=>Q_,OrganizationSelectorComponent:()=>_v,OrganizationSelectorModule:()=>Co,OrganizationService:()=>Qc,OrganizationTypes:()=>Fo,PRCDependent:()=>eu,PRCDomesticAddress:()=>ta,PRCPerson:()=>Hp,Pageable:()=>Wp,Pager:()=>zs,Patterns:()=>ic,Permissions:()=>Sd,PermissionsController:()=>Ch,PermitSettingsService:()=>ah,Person:()=>fp,PersonAgreementParams:()=>pu,PersonInfo:()=>Tf,PersonMainPhotoComponent:()=>el,PersonMainPhotoComponentModule:()=>ag,PersonModule:()=>Og,PersonOrganizationRole:()=>X_,PersonOrganizationRoleState:()=>Ou,PersonSearchComponent:()=>If,PersonSearchComponentModule:()=>A_,PersonSearchInterface:()=>Ja,PersonService:()=>Zh,PersonTypes:()=>$d,PersonUtils:()=>Wy,PersonalInfos:()=>Vp,PipesModule:()=>tp,PlacementDateFiltering:()=>Me,PlacementTypeTranslations:()=>Ce,PlatformHelperService:()=>Qd,PopoverButtonComponent:()=>gf,PopoverButtonComponentModule:()=>gv,PopoverComponent:()=>pm,PopoverComponentModule:()=>Yd,PrintingServiceOption:()=>oh,PrintingSettingsService:()=>qv,PrintingSettingsTypes:()=>ym,ProfileImagePickerComponent:()=>Xd,ProfileImagePickerComponentModule:()=>js,ProfileImageSize:()=>$m,ProgressBarComponent:()=>Fc,QueryParam:()=>cp,QuickHandling:()=>up,RadioListComponent:()=>Dh,RadioListComponentModule:()=>Qh,RadioListWithInputComponent:()=>Sh,RadioListWithInputComponentModule:()=>Ah,ReadTagModalComponent:()=>sf,ReadTagModalComponentModule:()=>pl,Relation:()=>Bh,RestAdUser:()=>hg,Roles:()=>Lt,ScrollIntoViewDirective:()=>wm,SelectComponent:()=>C,SelectComponentModule:()=>Q,ServiceFormat:()=>mp,SiviAbstractForm:()=>df,SiviAbstractFormControl:()=>Fp,SiviCharacterCounterDirective:()=>jl,SiviComponent:()=>Js,SiviCoreComponentModule:()=>zp,SiviCorePageModule:()=>pa,SiviErrorHandler:()=>yp,SiviErrorManagerService:()=>jp,SiviEventTypes:()=>du,SiviFormControlDirective:()=>Gm,SiviFormDirective:()=>qd,SiviFormsModule:()=>Tp,SiviLibMatPaginatorModule:()=>qy,SiviLibraryModule:()=>$y,SiviModalController:()=>Ac,SiviPage:()=>Sp,SiviProjectsGatewayService:()=>dl,SiviUtils:()=>gp,SiviValidators:()=>sc,SkeletonLoaderComponent:()=>yg,SpinnerComponent:()=>Im,SpinnerComponentModule:()=>cf,StaffFilters:()=>yh,StaffMember:()=>Uh,StaffMemberCrud:()=>ev,StaffSearch:()=>Am,StaffService:()=>lf,StorageService:()=>vp,SubscriptionTypes:()=>Um,TabSwitcher:()=>AC,TechnicalEnvironmentService:()=>of,TechnicalEnvironmentState:()=>_g,TestApplicationUtils:()=>R1,TestChildUtils:()=>sx,TestMessageTemplatesUtils:()=>k0,TestOrganizationUtils:()=>nb,TestPersonUtils:()=>BE,TestUtils:()=>lh,TimeframeCardComponent:()=>jh,TimeframeCardComponentModule:()=>xh,TimepickerComponent:()=>dv,TimepickerComponentModule:()=>Hv,TreeComponent:()=>At,TreeComponentModule:()=>uo,TreeModalComponent:()=>ih,TreeMultiSelectComponent:()=>ff,TreeMultiSelectModule:()=>hf,TreeNode:()=>Yh,Unit:()=>zm,UnitFocus:()=>E_,UnitOpeningTime:()=>Va,UnitPeriod:()=>rf,UnitSimpleModel:()=>$f,UnitStaffInfo:()=>nu,UnitSupervisor:()=>jf,UnsavedChangesGuard:()=>iv,UserPreferenceTypes:()=>pg,UserRole:()=>Wd,UserSettingsService:()=>Vh,UserSettingsState:()=>vg,Utils:()=>co,ValidationStatus:()=>td,WS_URL:()=>Ep,WarningContainerComponent:()=>tg,WarningContainerModule:()=>Ih,WeekPeriods:()=>ed,WeekpickerComponent:()=>Zv,WeekpickerComponentModule:()=>Of,createTranslateLoader:()=>Jl,elementAnimations:()=>Jf,firstNameLastNamePipe:()=>Zb,getIonicMockForAlerts:()=>eb,getIonicMockForModals:()=>k1,lastNameFirstNamePipe:()=>Xy,listAnimations:()=>Dd,minutesToHoursAndMinutesPipe:()=>ty,version:()=>nv});var o=p(15861),e=p(94650),l=p(77579),D=p(39646),g=p(61135),E=p(69751),T=p(62843),n=p(60515),P=p(32076),w=p(4128),B=p(13099),Y=p(4707),V=p(39841),ue=p(56451),he=p(83905),ae=p(80529),X=p(54004),ve=p(39300),ye=p(95698),ge=p(70262),ne=p(34986),pe=p(54482),Pe=p(25403),xe=p(38421);var re=p(5963);function oe(H,s=ne.z,d){const k=(0,re.H)(H,s);return function de(H,s){return(0,pe.e)((d,k)=>{const{leading:ie=!0,trailing:ot=!1}=s??{};let Cn=!1,ir=null,Yo=null,tl=!1;const bc=()=>{Yo?.unsubscribe(),Yo=null,ot&&(Xm(),tl&&k.complete())},np=()=>{Yo=null,tl&&k.complete()},Ss=Du=>Yo=(0,xe.Xf)(H(Du)).subscribe((0,Pe.x)(k,bc,np)),Xm=()=>{if(Cn){Cn=!1;const Du=ir;ir=null,k.next(Du),!tl&&Ss(Du)}};d.subscribe((0,Pe.x)(k,Du=>{Cn=!0,ir=Du,(!Yo||Yo.closed)&&(ie?Xm():Ss(Du))},()=>{tl=!0,(!(ot&&Cn&&Yo)||Yo.closed)&&k.complete()}))})}(()=>k,d)}var me=p(78372),be=p(71884),le=p(63900),Z=p(18505),Oe=p(95577),j=p(82722),ke=p(32518),Be=p(68675),nt=p(50590),mt=p(35684),ut=p(28746),Ve=p(24006),tt=p(45840),Ne=p(41854),wt=p(74744),ft=p(40190),Ct=p(76506),rn=p(71999),He=p(14177),st=p(27988);const Dn=function nn(H,s){return(0,st.Z)(s,function(d){return H[d]})};var Mn=p(31952);const Gi=function vi(H){return null==H?[]:Dn(H,(0,Mn.Z)(H))};var mi=p(7585),wi=p(84792),Bn=p(61149),kn=p(5229),On=p(65650),je=p(85202),Bt=p(42089),xn=p(87583);const ui=function Fn(H,s,d){var k=(0,He.Z)(H),ie=k||(0,je.Z)(H)||(0,xn.Z)(H);if(s=(0,kn.Z)(s,4),null==d){var ot=H&&H.constructor;d=ie?k?new ot:[]:(0,rn.Z)(H)&&(0,Bt.Z)(ot)?(0,wi.Z)((0,On.Z)(H)):{}}return(ie?mi.Z:Bn.Z)(H,function(Cn,ir,Yo){return s(d,Cn,ir,Yo)}),d};var Ai=p(85689),si=p(86377),Vi=p(21441),Vn=p(59378),Hn=p(49594),An=p(78033),vn=p(71178),In=p(68924),Zi=p(76224),gr=p(25946);const Gr=function(){return gr.Z.Date.now()};var zr=p(33765),Eo="Expected a function",mr=Math.max,jn=Math.min;const Yt=function ct(H,s,d){var k,ie,ot,Cn,ir,Yo,tl=0,bc=!1,np=!1,Ss=!0;if("function"!=typeof H)throw new TypeError(Eo);function Xm(ip){var uh=k,Qb=ie;return k=ie=void 0,tl=ip,Cn=H.apply(Qb,uh)}function sy(ip){var uh=ip-Yo;return void 0===Yo||uh>=s||uh<0||np&&ip-tl>=ot}function Tl(){var ip=Gr();if(sy(ip))return WM(ip);ir=setTimeout(Tl,function HC(ip){var F0=s-(ip-Yo);return np?jn(F0,ot-(ip-tl)):F0}(ip))}function WM(ip){return ir=void 0,Ss&&k?Xm(ip):(k=ie=void 0,Cn)}function Jb(){var ip=Gr(),uh=sy(ip);if(k=arguments,ie=this,Yo=ip,uh){if(void 0===ir)return function Du(ip){return tl=ip,ir=setTimeout(Tl,s),bc?Xm(ip):Cn}(Yo);if(np)return clearTimeout(ir),ir=setTimeout(Tl,s),Xm(Yo)}return void 0===ir&&(ir=setTimeout(Tl,s)),Cn}return s=(0,zr.Z)(s)||0,(0,rn.Z)(d)&&(bc=!!d.leading,ot=(np="maxWait"in d)?mr((0,zr.Z)(d.maxWait)||0,s):ot,Ss="trailing"in d?!!d.trailing:Ss),Jb.cancel=function $M(){void 0!==ir&&clearTimeout(ir),tl=0,k=Yo=ie=ir=void 0},Jb.flush=function ob(){return void 0===ir?Cn:WM(Gr())},Jb};var oi=p(78240),Ni=p(38320),Nn=p(15439),pr=p.t(Nn,2),Sn=p(64698),Pn=p(9646),Nt=p(70191),ai=p(93795),hn=p(25702),Le=p(31534),ce=p(37340),we=p(89383),Qe=p(80071),qt=p(9116),Tn=p(96895),lr=p(90849),mo=p(70655),rr=p(55419),aa=function(H){function s(){return null!==H&&H.apply(this,arguments)||this}return(0,mo.__extends)(s,H),s.prototype.readerMode=function(d){return(0,rr.DM)(this,"readerMode",{observable:!0,clearFunction:"disableReaderMode",clearWithArgs:!1},arguments)},s.prototype.scanNdef=function(d){return(0,rr.DM)(this,"scanNdef",{sync:!0},arguments)},s.prototype.scanTag=function(d){return(0,rr.DM)(this,"scanTag",{sync:!0},arguments)},s.prototype.cancelScan=function(){return(0,rr.DM)(this,"cancelScan",{sync:!0},arguments)},s.prototype.connect=function(d,k){return(0,rr.DM)(this,"connect",{sync:!0},arguments)},s.prototype.close=function(){return(0,rr.DM)(this,"close",{sync:!0},arguments)},s.prototype.transceive=function(d){return(0,rr.DM)(this,"transceive",{sync:!0},arguments)},s.prototype.beginSession=function(d,k){return(0,rr.DM)(this,"beginSession",{observable:!0,successIndex:0,errorIndex:3,clearFunction:"invalidateSession",clearWithArgs:!0},arguments)},s.prototype.addNdefListener=function(d,k){return(0,rr.DM)(this,"addNdefListener",{observable:!0,successIndex:0,errorIndex:3,clearFunction:"removeNdefListener",clearWithArgs:!0},arguments)},s.prototype.addTagDiscoveredListener=function(d,k){return(0,rr.DM)(this,"addTagDiscoveredListener",{observable:!0,successIndex:0,errorIndex:3,clearFunction:"removeTagDiscoveredListener",clearWithArgs:!0},arguments)},s.prototype.addMimeTypeListener=function(d,k,ie){return(0,rr.DM)(this,"addMimeTypeListener",{observable:!0,successIndex:1,errorIndex:4,clearFunction:"removeMimeTypeListener",clearWithArgs:!0},arguments)},s.prototype.addNdefFormatableListener=function(d,k){return(0,rr.DM)(this,"addNdefFormatableListener",{observable:!0,successIndex:0,errorIndex:3},arguments)},s.prototype.write=function(d){return(0,rr.DM)(this,"write",{},arguments)},s.prototype.makeReadOnly=function(){return(0,rr.DM)(this,"makeReadOnly",{},arguments)},s.prototype.share=function(d){return(0,rr.DM)(this,"share",{},arguments)},s.prototype.unshare=function(){return(0,rr.DM)(this,"unshare",{},arguments)},s.prototype.erase=function(){return(0,rr.DM)(this,"erase",{},arguments)},s.prototype.handover=function(d){return(0,rr.DM)(this,"handover",{},arguments)},s.prototype.stopHandover=function(){return(0,rr.DM)(this,"stopHandover",{},arguments)},s.prototype.showSettings=function(){return(0,rr.DM)(this,"showSettings",{},arguments)},s.prototype.enabled=function(){return(0,rr.DM)(this,"enabled",{},arguments)},s.prototype.bytesToString=function(d){return(0,rr.DM)(this,"bytesToString",{sync:!0},arguments)},s.prototype.stringToBytes=function(d){return(0,rr.DM)(this,"stringToBytes",{sync:!0},arguments)},s.prototype.bytesToHexString=function(d){return(0,rr.DM)(this,"bytesToHexString",{sync:!0},arguments)},Object.defineProperty(s.prototype,"FLAG_READER_NFC_A",{get:function(){return(0,rr.J2)(this,"FLAG_READER_NFC_A")},set:function(d){(0,rr.Iq)(this,"FLAG_READER_NFC_A",d)},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"FLAG_READER_NFC_B",{get:function(){return(0,rr.J2)(this,"FLAG_READER_NFC_B")},set:function(d){(0,rr.Iq)(this,"FLAG_READER_NFC_B",d)},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"FLAG_READER_NFC_F",{get:function(){return(0,rr.J2)(this,"FLAG_READER_NFC_F")},set:function(d){(0,rr.Iq)(this,"FLAG_READER_NFC_F",d)},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"FLAG_READER_NFC_V",{get:function(){return(0,rr.J2)(this,"FLAG_READER_NFC_V")},set:function(d){(0,rr.Iq)(this,"FLAG_READER_NFC_V",d)},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"FLAG_READER_NFC_BARCODE",{get:function(){return(0,rr.J2)(this,"FLAG_READER_NFC_BARCODE")},set:function(d){(0,rr.Iq)(this,"FLAG_READER_NFC_BARCODE",d)},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"FLAG_READER_SKIP_NDEF_CHECK",{get:function(){return(0,rr.J2)(this,"FLAG_READER_SKIP_NDEF_CHECK")},set:function(d){(0,rr.Iq)(this,"FLAG_READER_SKIP_NDEF_CHECK",d)},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"FLAG_READER_NO_PLATFORM_SOUNDS",{get:function(){return(0,rr.J2)(this,"FLAG_READER_NO_PLATFORM_SOUNDS")},set:function(d){(0,rr.Iq)(this,"FLAG_READER_NO_PLATFORM_SOUNDS",d)},enumerable:!1,configurable:!0}),s.pluginName="NFC",s.plugin="phonegap-nfc",s.pluginRef="nfc",s.repo="https://github.com/chariotsolutions/phonegap-nfc",s.platforms=["Android","iOS","Windows"],s.\u0275fac=function(){var d;return function(ie){return(d||(d=e.n5z(s)))(ie||s)}}(),s.\u0275prov=e.Yz7({token:s,factory:function(d){return s.\u0275fac(d)}}),s}(rr.KY),ea=function(H){function s(){return null!==H&&H.apply(this,arguments)||this}return(0,mo.__extends)(s,H),s.prototype.record=function(d,k,ie,ot){return(0,rr.DM)(this,"record",{sync:!0},arguments)},s.prototype.textRecord=function(d,k,ie){return(0,rr.DM)(this,"textRecord",{sync:!0},arguments)},s.prototype.uriRecord=function(d,k){return(0,rr.DM)(this,"uriRecord",{sync:!0},arguments)},s.prototype.absoluteUriRecord=function(d,k,ie){return(0,rr.DM)(this,"absoluteUriRecord",{sync:!0},arguments)},s.prototype.mimeMediaRecord=function(d,k){return(0,rr.DM)(this,"mimeMediaRecord",{sync:!0},arguments)},s.prototype.smartPoster=function(d,k){return(0,rr.DM)(this,"smartPoster",{sync:!0},arguments)},s.prototype.emptyRecord=function(){return(0,rr.DM)(this,"emptyRecord",{sync:!0},arguments)},s.prototype.androidApplicationRecord=function(d){return(0,rr.DM)(this,"androidApplicationRecord",{sync:!0},arguments)},s.prototype.encodeMessage=function(d){return(0,rr.DM)(this,"encodeMessage",{sync:!0},arguments)},s.prototype.decodeMessage=function(d){return(0,rr.DM)(this,"decodeMessage",{sync:!0},arguments)},s.prototype.decodeTnf=function(d){return(0,rr.DM)(this,"decodeTnf",{sync:!0},arguments)},s.prototype.encodeTnf=function(d,k,ie,ot,Cn,ir){return(0,rr.DM)(this,"encodeTnf",{sync:!0},arguments)},s.prototype.tnfToString=function(d){return(0,rr.DM)(this,"tnfToString",{sync:!0},arguments)},Object.defineProperty(s.prototype,"TNF_EMPTY",{get:function(){return(0,rr.J2)(this,"TNF_EMPTY")},set:function(d){(0,rr.Iq)(this,"TNF_EMPTY",d)},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"TNF_WELL_KNOWN",{get:function(){return(0,rr.J2)(this,"TNF_WELL_KNOWN")},set:function(d){(0,rr.Iq)(this,"TNF_WELL_KNOWN",d)},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"TNF_MIME_MEDIA",{get:function(){return(0,rr.J2)(this,"TNF_MIME_MEDIA")},set:function(d){(0,rr.Iq)(this,"TNF_MIME_MEDIA",d)},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"TNF_ABSOLUTE_URI",{get:function(){return(0,rr.J2)(this,"TNF_ABSOLUTE_URI")},set:function(d){(0,rr.Iq)(this,"TNF_ABSOLUTE_URI",d)},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"TNF_EXTERNAL_TYPE",{get:function(){return(0,rr.J2)(this,"TNF_EXTERNAL_TYPE")},set:function(d){(0,rr.Iq)(this,"TNF_EXTERNAL_TYPE",d)},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"TNF_UNKNOWN",{get:function(){return(0,rr.J2)(this,"TNF_UNKNOWN")},set:function(d){(0,rr.Iq)(this,"TNF_UNKNOWN",d)},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"TNF_UNCHANGED",{get:function(){return(0,rr.J2)(this,"TNF_UNCHANGED")},set:function(d){(0,rr.Iq)(this,"TNF_UNCHANGED",d)},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"TNF_RESERVED",{get:function(){return(0,rr.J2)(this,"TNF_RESERVED")},set:function(d){(0,rr.Iq)(this,"TNF_RESERVED",d)},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"textHelper",{get:function(){return(0,rr.J2)(this,"textHelper")},set:function(d){(0,rr.Iq)(this,"textHelper",d)},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"uriHelper",{get:function(){return(0,rr.J2)(this,"uriHelper")},set:function(d){(0,rr.Iq)(this,"uriHelper",d)},enumerable:!1,configurable:!0}),s.pluginName="NFC",s.plugin="phonegap-nfc",s.pluginRef="ndef",s.\u0275fac=function(){var d;return function(ie){return(d||(d=e.n5z(s)))(ie||s)}}(),s.\u0275prov=e.Yz7({token:s,factory:function(d){return s.\u0275fac(d)}}),s}(rr.KY),Zn=(function(H){function s(){return null!==H&&H.apply(this,arguments)||this}(0,mo.__extends)(s,H),s.prototype.toHex=function(d){return(0,rr.DM)(this,"toHex",{sync:!0},arguments)},s.prototype.toPrintable=function(d){return(0,rr.DM)(this,"toPrintable",{sync:!0},arguments)},s.prototype.bytesToString=function(d){return(0,rr.DM)(this,"bytesToString",{sync:!0},arguments)},s.prototype.stringToBytes=function(d){return(0,rr.DM)(this,"stringToBytes",{sync:!0},arguments)},s.prototype.bytesToHexString=function(d){return(0,rr.DM)(this,"bytesToHexString",{sync:!0},arguments)},s.prototype.isType=function(d,k,ie){return(0,rr.DM)(this,"isType",{sync:!0},arguments)},s.prototype.arrayBufferToHexString=function(d){return(0,rr.DM)(this,"arrayBufferToHexString",{sync:!0},arguments)},s.prototype.hexStringToArrayBuffer=function(d){return(0,rr.DM)(this,"hexStringToArrayBuffer",{sync:!0},arguments)},s.pluginName="NFC",s.plugin="phonegap-nfc",s.pluginRef="util",s.\u0275fac=function(){var d;return function(ie){return(d||(d=e.n5z(s)))(ie||s)}}(),s.\u0275prov=e.Yz7({token:s,factory:function(d){return s.\u0275fac(d)}})}(rr.KY),function(H){function s(){return null!==H&&H.apply(this,arguments)||this}(0,mo.__extends)(s,H),s.prototype.decodePayload=function(d){},s.prototype.encodePayload=function(d,k){}}(rr.KY),function(H){function s(){return null!==H&&H.apply(this,arguments)||this}(0,mo.__extends)(s,H),s.prototype.decodePayload=function(d){},s.prototype.encodePayload=function(d){}}(rr.KY),function(H){function s(){return null!==H&&H.apply(this,arguments)||this}return(0,mo.__extends)(s,H),s.prototype.vibrate=function(d){return(0,rr.DM)(this,"vibrate",{sync:!0},arguments)},s.pluginName="Vibration",s.plugin="cordova-plugin-vibration",s.pluginRef="navigator",s.repo="https://github.com/apache/cordova-plugin-vibration",s.platforms=["Android","iOS","Windows"],s.\u0275fac=function(){var d;return function(ie){return(d||(d=e.n5z(s)))(ie||s)}}(),s.\u0275prov=e.Yz7({token:s,factory:function(d){return s.\u0275fac(d)}}),s}(rr.KY)),Ci=p(17489),Xn=p(94954),Et=p(36895),gn=p(3238);const ei=Nn||pr,un=new e.OlP("MAT_MOMENT_DATE_ADAPTER_OPTIONS",{providedIn:"root",factory:function Ft(){return{useUtc:!1}}});function Ut(H,s){const d=Array(H);for(let k=0;k<H;k++)d[k]=s(k);return d}class wn extends gn._A{constructor(s,d){super(),this._options=d,this.setLocale(s||ei.locale())}setLocale(s){super.setLocale(s);let d=ei.localeData(s);this._localeData={firstDayOfWeek:d.firstDayOfWeek(),longMonths:d.months(),shortMonths:d.monthsShort(),dates:Ut(31,k=>this.createDate(2017,0,k+1).format("D")),longDaysOfWeek:d.weekdays(),shortDaysOfWeek:d.weekdaysShort(),narrowDaysOfWeek:d.weekdaysMin()}}getYear(s){return this.clone(s).year()}getMonth(s){return this.clone(s).month()}getDate(s){return this.clone(s).date()}getDayOfWeek(s){return this.clone(s).day()}getMonthNames(s){return"long"==s?this._localeData.longMonths:this._localeData.shortMonths}getDateNames(){return this._localeData.dates}getDayOfWeekNames(s){return"long"==s?this._localeData.longDaysOfWeek:"short"==s?this._localeData.shortDaysOfWeek:this._localeData.narrowDaysOfWeek}getYearName(s){return this.clone(s).format("YYYY")}getFirstDayOfWeek(){return this._localeData.firstDayOfWeek}getNumDaysInMonth(s){return this.clone(s).daysInMonth()}clone(s){return s.clone().locale(this.locale)}createDate(s,d,k){const ie=this._createMoment({year:s,month:d,date:k}).locale(this.locale);return ie.isValid(),ie}today(){return this._createMoment().locale(this.locale)}parse(s,d){return s&&"string"==typeof s?this._createMoment(s,d,this.locale):s?this._createMoment(s).locale(this.locale):null}format(s,d){return s=this.clone(s),this.isValid(s),s.format(d)}addCalendarYears(s,d){return this.clone(s).add({years:d})}addCalendarMonths(s,d){return this.clone(s).add({months:d})}addCalendarDays(s,d){return this.clone(s).add({days:d})}toIso8601(s){return this.clone(s).format()}deserialize(s){let d;if(s instanceof Date)d=this._createMoment(s).locale(this.locale);else if(this.isDateInstance(s))return this.clone(s);if("string"==typeof s){if(!s)return null;d=this._createMoment(s,ei.ISO_8601).locale(this.locale)}return d&&this.isValid(d)?this._createMoment(d).locale(this.locale):super.deserialize(s)}isDateInstance(s){return ei.isMoment(s)}isValid(s){return this.clone(s).isValid()}invalid(){return ei.invalid()}_createMoment(s,d,k){const{strict:ie,useUtc:ot}=this._options||{};return ot?ei.utc(s,d,k,ie):ei(s,d,k,ie)}}wn.\u0275fac=function(s){return new(s||wn)(e.LFG(gn.Ad,8),e.LFG(un,8))},wn.\u0275prov=e.Yz7({token:wn,factory:wn.\u0275fac});class xi{}xi.\u0275fac=function(s){return new(s||xi)},xi.\u0275mod=e.oAB({type:xi}),xi.\u0275inj=e.cJS({providers:[{provide:gn._A,useClass:wn,deps:[gn.Ad,un]}]});class Cr{}Cr.\u0275fac=function(s){return new(s||Cr)},Cr.\u0275mod=e.oAB({type:Cr}),Cr.\u0275inj=e.cJS({providers:[{provide:gn.sG,useValue:{parse:{dateInput:"l"},display:{dateInput:"l",monthYearLabel:"MMM YYYY",dateA11yLabel:"LL",monthYearA11yLabel:"MMMM YYYY"}}}],imports:[xi]});var Fr=p(12693),en=p(98184),Wn=p(84080),at=p(4859),It=p(67376),Qt=p(50727),St=p(29521),Pt=p(40445),cn=p(83353),Ln=p(21281),ii=p(59549),hi=p(44144);function _r(H,s){if(1&H&&(e.TgZ(0,"tr",3)(1,"td",4),e._uU(2),e.qZA()()),2&H){const d=e.oxw();e.xp6(1),e.Udp("padding-top",d._cellPadding)("padding-bottom",d._cellPadding),e.uIk("colspan",d.numCols),e.xp6(1),e.hij(" ",d.label," ")}}function er(H,s){if(1&H&&(e.TgZ(0,"td",4),e._uU(1),e.qZA()),2&H){const d=e.oxw(2);e.Udp("padding-top",d._cellPadding)("padding-bottom",d._cellPadding),e.uIk("colspan",d._firstRowOffset),e.xp6(1),e.hij(" ",d._firstRowOffset>=d.labelMinRequiredCells?d.label:""," ")}}function Yr(H,s){if(1&H){const d=e.EpF();e.TgZ(0,"td",8)(1,"button",9),e.NdJ("click",function(ie){const Cn=e.CHM(d).$implicit,ir=e.oxw(2);return e.KtG(ir._cellClicked(Cn,ie))})("focus",function(ie){const Cn=e.CHM(d).$implicit,ir=e.oxw(2);return e.KtG(ir._emitActiveDateChange(Cn,ie))}),e.TgZ(2,"span",10),e._uU(3),e.qZA(),e._UZ(4,"span",11),e.qZA()()}if(2&H){const d=s.$implicit,k=s.index,ie=e.oxw().index,ot=e.oxw();e.Udp("width",ot._cellWidth)("padding-top",ot._cellPadding)("padding-bottom",ot._cellPadding),e.uIk("data-mat-row",ie)("data-mat-col",k),e.xp6(1),e.ekj("mat-calendar-body-disabled",!d.enabled)("mat-calendar-body-active",ot._isActiveCell(ie,k))("mat-calendar-body-range-start",ot._isRangeStart(d.compareValue))("mat-calendar-body-range-end",ot._isRangeEnd(d.compareValue))("mat-calendar-body-in-range",ot._isInRange(d.compareValue))("mat-calendar-body-comparison-bridge-start",ot._isComparisonBridgeStart(d.compareValue,ie,k))("mat-calendar-body-comparison-bridge-end",ot._isComparisonBridgeEnd(d.compareValue,ie,k))("mat-calendar-body-comparison-start",ot._isComparisonStart(d.compareValue))("mat-calendar-body-comparison-end",ot._isComparisonEnd(d.compareValue))("mat-calendar-body-in-comparison-range",ot._isInComparisonRange(d.compareValue))("mat-calendar-body-preview-start",ot._isPreviewStart(d.compareValue))("mat-calendar-body-preview-end",ot._isPreviewEnd(d.compareValue))("mat-calendar-body-in-preview",ot._isInPreview(d.compareValue)),e.Q6J("ngClass",d.cssClasses)("tabindex",ot._isActiveCell(ie,k)?0:-1),e.uIk("aria-label",d.ariaLabel)("aria-disabled",!d.enabled||null)("aria-pressed",ot._isSelected(d.compareValue))("aria-current",ot.todayValue===d.compareValue?"date":null)("aria-describedby",ot._getDescribedby(d.compareValue)),e.xp6(1),e.ekj("mat-calendar-body-selected",ot._isSelected(d.compareValue))("mat-calendar-body-comparison-identical",ot._isComparisonIdentical(d.compareValue))("mat-calendar-body-today",ot.todayValue===d.compareValue),e.xp6(1),e.hij(" ",d.displayValue," ")}}function _o(H,s){if(1&H&&(e.TgZ(0,"tr",5),e.YNc(1,er,2,6,"td",6),e.YNc(2,Yr,5,48,"td",7),e.qZA()),2&H){const d=s.$implicit,k=s.index,ie=e.oxw();e.xp6(1),e.Q6J("ngIf",0===k&&ie._firstRowOffset),e.xp6(1),e.Q6J("ngForOf",d)}}function Si(H,s){if(1&H&&(e.TgZ(0,"th",5)(1,"span",6),e._uU(2),e.qZA(),e.TgZ(3,"span",7),e._uU(4),e.qZA()()),2&H){const d=s.$implicit;e.xp6(2),e.Oqu(d.long),e.xp6(2),e.Oqu(d.narrow)}}const to=["*"];function Oa(H,s){}function Uo(H,s){if(1&H){const d=e.EpF();e.TgZ(0,"mat-month-view",5),e.NdJ("activeDateChange",function(ie){e.CHM(d);const ot=e.oxw();return e.KtG(ot.activeDate=ie)})("_userSelection",function(ie){e.CHM(d);const ot=e.oxw();return e.KtG(ot._dateSelected(ie))})("dragStarted",function(ie){e.CHM(d);const ot=e.oxw();return e.KtG(ot._dragStarted(ie))})("dragEnded",function(ie){e.CHM(d);const ot=e.oxw();return e.KtG(ot._dragEnded(ie))}),e.qZA()}if(2&H){const d=e.oxw();e.Q6J("activeDate",d.activeDate)("selected",d.selected)("dateFilter",d.dateFilter)("maxDate",d.maxDate)("minDate",d.minDate)("dateClass",d.dateClass)("comparisonStart",d.comparisonStart)("comparisonEnd",d.comparisonEnd)("startDateAccessibleName",d.startDateAccessibleName)("endDateAccessibleName",d.endDateAccessibleName)("activeDrag",d._activeDrag)}}function rl(H,s){if(1&H){const d=e.EpF();e.TgZ(0,"mat-year-view",6),e.NdJ("activeDateChange",function(ie){e.CHM(d);const ot=e.oxw();return e.KtG(ot.activeDate=ie)})("monthSelected",function(ie){e.CHM(d);const ot=e.oxw();return e.KtG(ot._monthSelectedInYearView(ie))})("selectedChange",function(ie){e.CHM(d);const ot=e.oxw();return e.KtG(ot._goToDateInView(ie,"month"))}),e.qZA()}if(2&H){const d=e.oxw();e.Q6J("activeDate",d.activeDate)("selected",d.selected)("dateFilter",d.dateFilter)("maxDate",d.maxDate)("minDate",d.minDate)("dateClass",d.dateClass)}}function Vs(H,s){if(1&H){const d=e.EpF();e.TgZ(0,"mat-multi-year-view",7),e.NdJ("activeDateChange",function(ie){e.CHM(d);const ot=e.oxw();return e.KtG(ot.activeDate=ie)})("yearSelected",function(ie){e.CHM(d);const ot=e.oxw();return e.KtG(ot._yearSelectedInMultiYearView(ie))})("selectedChange",function(ie){e.CHM(d);const ot=e.oxw();return e.KtG(ot._goToDateInView(ie,"year"))}),e.qZA()}if(2&H){const d=e.oxw();e.Q6J("activeDate",d.activeDate)("selected",d.selected)("dateFilter",d.dateFilter)("maxDate",d.maxDate)("minDate",d.minDate)("dateClass",d.dateClass)}}function ps(H,s){}const ts=["button"];function gs(H,s){1&H&&(e.O4$(),e.TgZ(0,"svg",3),e._UZ(1,"path",4),e.qZA())}const tc=[[["","matDatepickerToggleIcon",""]]],ln=[[["input","matStartDate",""]],[["input","matEndDate",""]]];function Di(H,s){1&H&&(e.TgZ(0,"div",0),e.Hsn(1),e.qZA())}class ur{constructor(){this.changes=new l.x,this.calendarLabel="Calendar",this.openCalendarLabel="Open calendar",this.closeCalendarLabel="Close calendar",this.prevMonthLabel="Previous month",this.nextMonthLabel="Next month",this.prevYearLabel="Previous year",this.nextYearLabel="Next year",this.prevMultiYearLabel="Previous 24 years",this.nextMultiYearLabel="Next 24 years",this.switchToMonthViewLabel="Choose date",this.switchToMultiYearViewLabel="Choose month and year",this.startDateLabel="Start date",this.endDateLabel="End date"}formatYearRange(s,d){return`${s} \u2013 ${d}`}formatYearRangeLabel(s,d){return`${s} to ${d}`}}ur.\u0275fac=function(s){return new(s||ur)},ur.\u0275prov=e.Yz7({token:ur,factory:ur.\u0275fac,providedIn:"root"});class gi{constructor(s,d,k,ie,ot={},Cn=s,ir){this.value=s,this.displayValue=d,this.ariaLabel=k,this.enabled=ie,this.cssClasses=ot,this.compareValue=Cn,this.rawValue=ir}}let $t=1;class Ma{ngAfterViewChecked(){this._focusActiveCellAfterViewChecked&&(this._focusActiveCell(),this._focusActiveCellAfterViewChecked=!1)}constructor(s,d){this._elementRef=s,this._ngZone=d,this._platform=(0,e.f3M)(cn.t4),this._focusActiveCellAfterViewChecked=!1,this.numCols=7,this.activeCell=0,this.isRange=!1,this.cellAspectRatio=1,this.previewStart=null,this.previewEnd=null,this.selectedValueChange=new e.vpe,this.previewChange=new e.vpe,this.activeDateChange=new e.vpe,this.dragStarted=new e.vpe,this.dragEnded=new e.vpe,this._didDragSinceMouseDown=!1,this._enterHandler=k=>{if(this._skipNextFocus&&"focus"===k.type)this._skipNextFocus=!1;else if(k.target&&this.isRange){const ie=this._getCellFromElement(k.target);ie&&this._ngZone.run(()=>this.previewChange.emit({value:ie.enabled?ie:null,event:k}))}},this._touchmoveHandler=k=>{if(!this.isRange)return;const ie=Cs(k),ot=ie?this._getCellFromElement(ie):null;ie!==k.target&&(this._didDragSinceMouseDown=!0),Ds(k.target)&&k.preventDefault(),this._ngZone.run(()=>this.previewChange.emit({value:ot?.enabled?ot:null,event:k}))},this._leaveHandler=k=>{null!==this.previewEnd&&this.isRange&&("blur"!==k.type&&(this._didDragSinceMouseDown=!0),k.target&&this._getCellFromElement(k.target)&&(!k.relatedTarget||!this._getCellFromElement(k.relatedTarget))&&this._ngZone.run(()=>this.previewChange.emit({value:null,event:k})))},this._mousedownHandler=k=>{if(!this.isRange)return;this._didDragSinceMouseDown=!1;const ie=k.target&&this._getCellFromElement(k.target);!ie||!this._isInRange(ie.rawValue)||this._ngZone.run(()=>{this.dragStarted.emit({value:ie.rawValue,event:k})})},this._mouseupHandler=k=>{if(!this.isRange)return;const ie=Ds(k.target);ie?ie.closest(".mat-calendar-body")===this._elementRef.nativeElement&&this._ngZone.run(()=>{const ot=this._getCellFromElement(ie);this.dragEnded.emit({value:ot?.rawValue??null,event:k})}):this._ngZone.run(()=>{this.dragEnded.emit({value:null,event:k})})},this._touchendHandler=k=>{const ie=Cs(k);ie&&this._mouseupHandler({target:ie})},this._id="mat-calendar-body-"+$t++,this._startDateLabelId=`${this._id}-start-date`,this._endDateLabelId=`${this._id}-end-date`,d.runOutsideAngular(()=>{const k=s.nativeElement;k.addEventListener("mouseenter",this._enterHandler,!0),k.addEventListener("touchmove",this._touchmoveHandler,!0),k.addEventListener("focus",this._enterHandler,!0),k.addEventListener("mouseleave",this._leaveHandler,!0),k.addEventListener("blur",this._leaveHandler,!0),k.addEventListener("mousedown",this._mousedownHandler),k.addEventListener("touchstart",this._mousedownHandler),this._platform.isBrowser&&(window.addEventListener("mouseup",this._mouseupHandler),window.addEventListener("touchend",this._touchendHandler))})}_cellClicked(s,d){this._didDragSinceMouseDown||s.enabled&&this.selectedValueChange.emit({value:s.value,event:d})}_emitActiveDateChange(s,d){s.enabled&&this.activeDateChange.emit({value:s.value,event:d})}_isSelected(s){return this.startValue===s||this.endValue===s}ngOnChanges(s){const d=s.numCols,{rows:k,numCols:ie}=this;(s.rows||d)&&(this._firstRowOffset=k&&k.length&&k[0].length?ie-k[0].length:0),(s.cellAspectRatio||d||!this._cellPadding)&&(this._cellPadding=50*this.cellAspectRatio/ie+"%"),(d||!this._cellWidth)&&(this._cellWidth=100/ie+"%")}ngOnDestroy(){const s=this._elementRef.nativeElement;s.removeEventListener("mouseenter",this._enterHandler,!0),s.removeEventListener("touchmove",this._touchmoveHandler,!0),s.removeEventListener("focus",this._enterHandler,!0),s.removeEventListener("mouseleave",this._leaveHandler,!0),s.removeEventListener("blur",this._leaveHandler,!0),s.removeEventListener("mousedown",this._mousedownHandler),s.removeEventListener("touchstart",this._mousedownHandler),this._platform.isBrowser&&(window.removeEventListener("mouseup",this._mouseupHandler),window.removeEventListener("touchend",this._touchendHandler))}_isActiveCell(s,d){let k=s*this.numCols+d;return s&&(k-=this._firstRowOffset),k==this.activeCell}_focusActiveCell(s=!0){this._ngZone.runOutsideAngular(()=>{this._ngZone.onStable.pipe((0,ye.q)(1)).subscribe(()=>{setTimeout(()=>{const d=this._elementRef.nativeElement.querySelector(".mat-calendar-body-active");d&&(s||(this._skipNextFocus=!0),d.focus())})})})}_scheduleFocusActiveCellAfterViewChecked(){this._focusActiveCellAfterViewChecked=!0}_isRangeStart(s){return ja(s,this.startValue,this.endValue)}_isRangeEnd(s){return wa(s,this.startValue,this.endValue)}_isInRange(s){return ns(s,this.startValue,this.endValue,this.isRange)}_isComparisonStart(s){return ja(s,this.comparisonStart,this.comparisonEnd)}_isComparisonBridgeStart(s,d,k){if(!this._isComparisonStart(s)||this._isRangeStart(s)||!this._isInRange(s))return!1;let ie=this.rows[d][k-1];if(!ie){const ot=this.rows[d-1];ie=ot&&ot[ot.length-1]}return ie&&!this._isRangeEnd(ie.compareValue)}_isComparisonBridgeEnd(s,d,k){if(!this._isComparisonEnd(s)||this._isRangeEnd(s)||!this._isInRange(s))return!1;let ie=this.rows[d][k+1];if(!ie){const ot=this.rows[d+1];ie=ot&&ot[0]}return ie&&!this._isRangeStart(ie.compareValue)}_isComparisonEnd(s){return wa(s,this.comparisonStart,this.comparisonEnd)}_isInComparisonRange(s){return ns(s,this.comparisonStart,this.comparisonEnd,this.isRange)}_isComparisonIdentical(s){return this.comparisonStart===this.comparisonEnd&&s===this.comparisonStart}_isPreviewStart(s){return ja(s,this.previewStart,this.previewEnd)}_isPreviewEnd(s){return wa(s,this.previewStart,this.previewEnd)}_isInPreview(s){return ns(s,this.previewStart,this.previewEnd,this.isRange)}_getDescribedby(s){return this.isRange?this.startValue===s&&this.endValue===s?`${this._startDateLabelId} ${this._endDateLabelId}`:this.startValue===s?this._startDateLabelId:this.endValue===s?this._endDateLabelId:null:null}_getCellFromElement(s){const d=Ds(s);if(d){const k=d.getAttribute("data-mat-row"),ie=d.getAttribute("data-mat-col");if(k&&ie)return this.rows[parseInt(k)][parseInt(ie)]}return null}}function Vo(H){return"TD"===H?.nodeName}function Ds(H){let s;return Vo(H)?s=H:Vo(H.parentNode)?s=H.parentNode:Vo(H.parentNode?.parentNode)&&(s=H.parentNode.parentNode),null!=s?.getAttribute("data-mat-row")?s:null}function ja(H,s,d){return null!==d&&s!==d&&H<d&&H===s}function wa(H,s,d){return null!==s&&s!==d&&H>=s&&H===d}function ns(H,s,d,k){return k&&null!==s&&null!==d&&s!==d&&H>=s&&H<=d}function Cs(H){const s=H.changedTouches[0];return document.elementFromPoint(s.clientX,s.clientY)}Ma.\u0275fac=function(s){return new(s||Ma)(e.Y36(e.SBq),e.Y36(e.R0b))},Ma.\u0275cmp=e.Xpm({type:Ma,selectors:[["","mat-calendar-body",""]],hostAttrs:[1,"mat-calendar-body"],inputs:{label:"label",rows:"rows",todayValue:"todayValue",startValue:"startValue",endValue:"endValue",labelMinRequiredCells:"labelMinRequiredCells",numCols:"numCols",activeCell:"activeCell",isRange:"isRange",cellAspectRatio:"cellAspectRatio",comparisonStart:"comparisonStart",comparisonEnd:"comparisonEnd",previewStart:"previewStart",previewEnd:"previewEnd",startDateAccessibleName:"startDateAccessibleName",endDateAccessibleName:"endDateAccessibleName"},outputs:{selectedValueChange:"selectedValueChange",previewChange:"previewChange",activeDateChange:"activeDateChange",dragStarted:"dragStarted",dragEnded:"dragEnded"},exportAs:["matCalendarBody"],features:[e.TTD],attrs:["mat-calendar-body",""],decls:6,vars:6,consts:[["aria-hidden","true",4,"ngIf"],["role","row",4,"ngFor","ngForOf"],[1,"mat-calendar-body-hidden-label",3,"id"],["aria-hidden","true"],[1,"mat-calendar-body-label"],["role","row"],["class","mat-calendar-body-label",3,"paddingTop","paddingBottom",4,"ngIf"],["role","gridcell","class","mat-calendar-body-cell-container",3,"width","paddingTop","paddingBottom",4,"ngFor","ngForOf"],["role","gridcell",1,"mat-calendar-body-cell-container"],["type","button",1,"mat-calendar-body-cell",3,"ngClass","tabindex","click","focus"],[1,"mat-calendar-body-cell-content","mat-focus-indicator"],["aria-hidden","true",1,"mat-calendar-body-cell-preview"]],template:function(s,d){1&s&&(e.YNc(0,_r,3,6,"tr",0),e.YNc(1,_o,3,2,"tr",1),e.TgZ(2,"label",2),e._uU(3),e.qZA(),e.TgZ(4,"label",2),e._uU(5),e.qZA()),2&s&&(e.Q6J("ngIf",d._firstRowOffset<d.labelMinRequiredCells),e.xp6(1),e.Q6J("ngForOf",d.rows),e.xp6(1),e.Q6J("id",d._startDateLabelId),e.xp6(1),e.hij(" ",d.startDateAccessibleName,"\n"),e.xp6(1),e.Q6J("id",d._endDateLabelId),e.xp6(1),e.hij(" ",d.endDateAccessibleName,"\n"))},dependencies:[Et.mk,Et.sg,Et.O5],styles:['.mat-calendar-body{min-width:224px}.mat-calendar-body-label{height:0;line-height:0;text-align:left;padding-left:4.7142857143%;padding-right:4.7142857143%}.mat-calendar-body-hidden-label{display:none}.mat-calendar-body-cell-container{position:relative;height:0;line-height:0}.mat-calendar-body-cell{-webkit-user-select:none;user-select:none;cursor:pointer;outline:none;border:none;-webkit-tap-highlight-color:rgba(0,0,0,0);position:absolute;top:0;left:0;width:100%;height:100%;background:none;text-align:center;outline:none;font-family:inherit;margin:0}.mat-calendar-body-cell::-moz-focus-inner{border:0}.mat-calendar-body-cell::before,.mat-calendar-body-cell::after,.mat-calendar-body-cell-preview{content:"";position:absolute;top:5%;left:0;z-index:0;box-sizing:border-box;display:block;height:90%;width:100%}.mat-calendar-body-range-start:not(.mat-calendar-body-in-comparison-range)::before,.mat-calendar-body-range-start::after,.mat-calendar-body-comparison-start:not(.mat-calendar-body-comparison-bridge-start)::before,.mat-calendar-body-comparison-start::after,.mat-calendar-body-preview-start .mat-calendar-body-cell-preview{left:5%;width:95%;border-top-left-radius:999px;border-bottom-left-radius:999px}[dir=rtl] .mat-calendar-body-range-start:not(.mat-calendar-body-in-comparison-range)::before,[dir=rtl] .mat-calendar-body-range-start::after,[dir=rtl] .mat-calendar-body-comparison-start:not(.mat-calendar-body-comparison-bridge-start)::before,[dir=rtl] .mat-calendar-body-comparison-start::after,[dir=rtl] .mat-calendar-body-preview-start .mat-calendar-body-cell-preview{left:0;border-radius:0;border-top-right-radius:999px;border-bottom-right-radius:999px}.mat-calendar-body-range-end:not(.mat-calendar-body-in-comparison-range)::before,.mat-calendar-body-range-end::after,.mat-calendar-body-comparison-end:not(.mat-calendar-body-comparison-bridge-end)::before,.mat-calendar-body-comparison-end::after,.mat-calendar-body-preview-end .mat-calendar-body-cell-preview{width:95%;border-top-right-radius:999px;border-bottom-right-radius:999px}[dir=rtl] .mat-calendar-body-range-end:not(.mat-calendar-body-in-comparison-range)::before,[dir=rtl] .mat-calendar-body-range-end::after,[dir=rtl] .mat-calendar-body-comparison-end:not(.mat-calendar-body-comparison-bridge-end)::before,[dir=rtl] .mat-calendar-body-comparison-end::after,[dir=rtl] .mat-calendar-body-preview-end .mat-calendar-body-cell-preview{left:5%;border-radius:0;border-top-left-radius:999px;border-bottom-left-radius:999px}[dir=rtl] .mat-calendar-body-comparison-bridge-start.mat-calendar-body-range-end::after,[dir=rtl] .mat-calendar-body-comparison-bridge-end.mat-calendar-body-range-start::after{width:95%;border-top-right-radius:999px;border-bottom-right-radius:999px}.mat-calendar-body-comparison-start.mat-calendar-body-range-end::after,[dir=rtl] .mat-calendar-body-comparison-start.mat-calendar-body-range-end::after,.mat-calendar-body-comparison-end.mat-calendar-body-range-start::after,[dir=rtl] .mat-calendar-body-comparison-end.mat-calendar-body-range-start::after{width:90%}.mat-calendar-body-in-preview .mat-calendar-body-cell-preview{border-top:dashed 1px;border-bottom:dashed 1px}.mat-calendar-body-preview-start .mat-calendar-body-cell-preview{border-left:dashed 1px}[dir=rtl] .mat-calendar-body-preview-start .mat-calendar-body-cell-preview{border-left:0;border-right:dashed 1px}.mat-calendar-body-preview-end .mat-calendar-body-cell-preview{border-right:dashed 1px}[dir=rtl] .mat-calendar-body-preview-end .mat-calendar-body-cell-preview{border-right:0;border-left:dashed 1px}.mat-calendar-body-disabled{cursor:default}.cdk-high-contrast-active .mat-calendar-body-disabled{opacity:.5}.mat-calendar-body-cell-content{top:5%;left:5%;z-index:1;display:flex;align-items:center;justify-content:center;box-sizing:border-box;width:90%;height:90%;line-height:1;border-width:1px;border-style:solid;border-radius:999px}.mat-calendar-body-cell-content.mat-focus-indicator{position:absolute}.cdk-high-contrast-active .mat-calendar-body-cell-content{border:none}.cdk-high-contrast-active .mat-datepicker-popup:not(:empty),.cdk-high-contrast-active .mat-calendar-body-cell:not(.mat-calendar-body-in-range) .mat-calendar-body-selected{outline:solid 1px}.cdk-high-contrast-active .mat-calendar-body-today{outline:dotted 1px}.cdk-high-contrast-active .mat-calendar-body-cell::before,.cdk-high-contrast-active .mat-calendar-body-cell::after,.cdk-high-contrast-active .mat-calendar-body-selected{background:none}.cdk-high-contrast-active .mat-calendar-body-in-range::before,.cdk-high-contrast-active .mat-calendar-body-comparison-bridge-start::before,.cdk-high-contrast-active .mat-calendar-body-comparison-bridge-end::before{border-top:solid 1px;border-bottom:solid 1px}.cdk-high-contrast-active .mat-calendar-body-range-start::before{border-left:solid 1px}[dir=rtl] .cdk-high-contrast-active .mat-calendar-body-range-start::before{border-left:0;border-right:solid 1px}.cdk-high-contrast-active .mat-calendar-body-range-end::before{border-right:solid 1px}[dir=rtl] .cdk-high-contrast-active .mat-calendar-body-range-end::before{border-right:0;border-left:solid 1px}.cdk-high-contrast-active .mat-calendar-body-in-comparison-range::before{border-top:dashed 1px;border-bottom:dashed 1px}.cdk-high-contrast-active .mat-calendar-body-comparison-start::before{border-left:dashed 1px}[dir=rtl] .cdk-high-contrast-active .mat-calendar-body-comparison-start::before{border-left:0;border-right:dashed 1px}.cdk-high-contrast-active .mat-calendar-body-comparison-end::before{border-right:dashed 1px}[dir=rtl] .cdk-high-contrast-active .mat-calendar-body-comparison-end::before{border-right:0;border-left:dashed 1px}[dir=rtl] .mat-calendar-body-label{text-align:right}'],encapsulation:2,changeDetection:0});class $r{constructor(s,d){this.start=s,this.end=d}}class Ts{constructor(s,d){this.selection=s,this._adapter=d,this._selectionChanged=new l.x,this.selectionChanged=this._selectionChanged,this.selection=s}updateSelection(s,d){const k=this.selection;this.selection=s,this._selectionChanged.next({selection:s,source:d,oldValue:k})}ngOnDestroy(){this._selectionChanged.complete()}_isValidDateInstance(s){return this._adapter.isDateInstance(s)&&this._adapter.isValid(s)}}Ts.\u0275fac=function(s){e.$Z()},Ts.\u0275prov=e.Yz7({token:Ts,factory:Ts.\u0275fac});class Gl extends Ts{constructor(s){super(null,s)}add(s){super.updateSelection(s,this)}isValid(){return null!=this.selection&&this._isValidDateInstance(this.selection)}isComplete(){return null!=this.selection}clone(){const s=new Gl(this._adapter);return s.updateSelection(this.selection,this),s}}Gl.\u0275fac=function(s){return new(s||Gl)(e.LFG(gn._A))},Gl.\u0275prov=e.Yz7({token:Gl,factory:Gl.\u0275fac});class ol extends Ts{constructor(s){super(new $r(null,null),s)}add(s){let{start:d,end:k}=this.selection;null==d?d=s:null==k?k=s:(d=s,k=null),super.updateSelection(new $r(d,k),this)}isValid(){const{start:s,end:d}=this.selection;return null==s&&null==d||(null!=s&&null!=d?this._isValidDateInstance(s)&&this._isValidDateInstance(d)&&this._adapter.compareDate(s,d)<=0:(null==s||this._isValidDateInstance(s))&&(null==d||this._isValidDateInstance(d)))}isComplete(){return null!=this.selection.start&&null!=this.selection.end}clone(){const s=new ol(this._adapter);return s.updateSelection(this.selection,this),s}}ol.\u0275fac=function(s){return new(s||ol)(e.LFG(gn._A))},ol.\u0275prov=e.Yz7({token:ol,factory:ol.\u0275fac});const al={provide:Ts,deps:[[new e.FiY,new e.tp0,Ts],gn._A],useFactory:function zc(H,s){return H||new Gl(s)}};const tn={provide:Ts,deps:[[new e.FiY,new e.tp0,Ts],gn._A],useFactory:function Jn(H,s){return H||new ol(s)}},ti=new e.OlP("MAT_DATE_RANGE_SELECTION_STRATEGY");class _i{constructor(s){this._dateAdapter=s}selectionFinished(s,d){let{start:k,end:ie}=d;return null==k?k=s:null==ie&&s&&this._dateAdapter.compareDate(s,k)>=0?ie=s:(k=s,ie=null),new $r(k,ie)}createPreview(s,d){let k=null,ie=null;return d.start&&!d.end&&s&&(k=d.start,ie=s),new $r(k,ie)}createDrag(s,d,k){let ie=d.start,ot=d.end;if(!ie||!ot)return null;const Cn=this._dateAdapter,ir=0!==Cn.compareDate(ie,ot),Yo=Cn.getYear(k)-Cn.getYear(s),tl=Cn.getMonth(k)-Cn.getMonth(s),bc=Cn.getDate(k)-Cn.getDate(s);return ir&&Cn.sameDate(s,d.start)?(ie=k,Cn.compareDate(k,ot)>0&&(ot=Cn.addCalendarYears(ot,Yo),ot=Cn.addCalendarMonths(ot,tl),ot=Cn.addCalendarDays(ot,bc))):ir&&Cn.sameDate(s,d.end)?(ot=k,Cn.compareDate(k,ie)<0&&(ie=Cn.addCalendarYears(ie,Yo),ie=Cn.addCalendarMonths(ie,tl),ie=Cn.addCalendarDays(ie,bc))):(ie=Cn.addCalendarYears(ie,Yo),ie=Cn.addCalendarMonths(ie,tl),ie=Cn.addCalendarDays(ie,bc),ot=Cn.addCalendarYears(ot,Yo),ot=Cn.addCalendarMonths(ot,tl),ot=Cn.addCalendarDays(ot,bc)),new $r(ie,ot)}}_i.\u0275fac=function(s){return new(s||_i)(e.LFG(gn._A))},_i.\u0275prov=e.Yz7({token:_i,factory:_i.\u0275fac});const vr={provide:ti,deps:[[new e.FiY,new e.tp0,ti],gn._A],useFactory:function ar(H,s){return H||new _i(s)}};class Li{get activeDate(){return this._activeDate}set activeDate(s){const d=this._activeDate,k=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(s))||this._dateAdapter.today();this._activeDate=this._dateAdapter.clampDate(k,this.minDate,this.maxDate),this._hasSameMonthAndYear(d,this._activeDate)||this._init()}get selected(){return this._selected}set selected(s){this._selected=s instanceof $r?s:this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(s)),this._setRanges(this._selected)}get minDate(){return this._minDate}set minDate(s){this._minDate=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(s))}get maxDate(){return this._maxDate}set maxDate(s){this._maxDate=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(s))}constructor(s,d,k,ie,ot){this._changeDetectorRef=s,this._dateFormats=d,this._dateAdapter=k,this._dir=ie,this._rangeStrategy=ot,this._rerenderSubscription=Qt.w0.EMPTY,this.activeDrag=null,this.selectedChange=new e.vpe,this._userSelection=new e.vpe,this.dragStarted=new e.vpe,this.dragEnded=new e.vpe,this.activeDateChange=new e.vpe,this._activeDate=this._dateAdapter.today()}ngAfterContentInit(){this._rerenderSubscription=this._dateAdapter.localeChanges.pipe((0,Be.O)(null)).subscribe(()=>this._init())}ngOnChanges(s){const d=s.comparisonStart||s.comparisonEnd;d&&!d.firstChange&&this._setRanges(this.selected),s.activeDrag&&!this.activeDrag&&this._clearPreview()}ngOnDestroy(){this._rerenderSubscription.unsubscribe()}_dateSelected(s){const d=s.value,k=this._getDateFromDayOfMonth(d);let ie,ot;this._selected instanceof $r?(ie=this._getDateInCurrentMonth(this._selected.start),ot=this._getDateInCurrentMonth(this._selected.end)):ie=ot=this._getDateInCurrentMonth(this._selected),(ie!==d||ot!==d)&&this.selectedChange.emit(k),this._userSelection.emit({value:k,event:s.event}),this._clearPreview(),this._changeDetectorRef.markForCheck()}_updateActiveDate(s){const d=s.value,k=this._activeDate;this.activeDate=this._getDateFromDayOfMonth(d),this._dateAdapter.compareDate(k,this.activeDate)&&this.activeDateChange.emit(this._activeDate)}_handleCalendarBodyKeydown(s){const d=this._activeDate,k=this._isRtl();switch(s.keyCode){case St.oh:this.activeDate=this._dateAdapter.addCalendarDays(this._activeDate,k?1:-1);break;case St.SV:this.activeDate=this._dateAdapter.addCalendarDays(this._activeDate,k?-1:1);break;case St.LH:this.activeDate=this._dateAdapter.addCalendarDays(this._activeDate,-7);break;case St.JH:this.activeDate=this._dateAdapter.addCalendarDays(this._activeDate,7);break;case St.Sd:this.activeDate=this._dateAdapter.addCalendarDays(this._activeDate,1-this._dateAdapter.getDate(this._activeDate));break;case St.uR:this.activeDate=this._dateAdapter.addCalendarDays(this._activeDate,this._dateAdapter.getNumDaysInMonth(this._activeDate)-this._dateAdapter.getDate(this._activeDate));break;case St.Ku:this.activeDate=s.altKey?this._dateAdapter.addCalendarYears(this._activeDate,-1):this._dateAdapter.addCalendarMonths(this._activeDate,-1);break;case St.VM:this.activeDate=s.altKey?this._dateAdapter.addCalendarYears(this._activeDate,1):this._dateAdapter.addCalendarMonths(this._activeDate,1);break;case St.K5:case St.L_:return this._selectionKeyPressed=!0,void(this._canSelect(this._activeDate)&&s.preventDefault());case St.hY:return void(null!=this._previewEnd&&!(0,St.Vb)(s)&&(this._clearPreview(),this.activeDrag?this.dragEnded.emit({value:null,event:s}):(this.selectedChange.emit(null),this._userSelection.emit({value:null,event:s})),s.preventDefault(),s.stopPropagation()));default:return}this._dateAdapter.compareDate(d,this.activeDate)&&(this.activeDateChange.emit(this.activeDate),this._focusActiveCellAfterViewChecked()),s.preventDefault()}_handleCalendarBodyKeyup(s){(s.keyCode===St.L_||s.keyCode===St.K5)&&(this._selectionKeyPressed&&this._canSelect(this._activeDate)&&this._dateSelected({value:this._dateAdapter.getDate(this._activeDate),event:s}),this._selectionKeyPressed=!1)}_init(){this._setRanges(this.selected),this._todayDate=this._getCellCompareValue(this._dateAdapter.today()),this._monthLabel=this._dateFormats.display.monthLabel?this._dateAdapter.format(this.activeDate,this._dateFormats.display.monthLabel):this._dateAdapter.getMonthNames("short")[this._dateAdapter.getMonth(this.activeDate)].toLocaleUpperCase();let s=this._dateAdapter.createDate(this._dateAdapter.getYear(this.activeDate),this._dateAdapter.getMonth(this.activeDate),1);this._firstWeekOffset=(7+this._dateAdapter.getDayOfWeek(s)-this._dateAdapter.getFirstDayOfWeek())%7,this._initWeekdays(),this._createWeekCells(),this._changeDetectorRef.markForCheck()}_focusActiveCell(s){this._matCalendarBody._focusActiveCell(s)}_focusActiveCellAfterViewChecked(){this._matCalendarBody._scheduleFocusActiveCellAfterViewChecked()}_previewChanged({event:s,value:d}){if(this._rangeStrategy){const k=d?d.rawValue:null,ie=this._rangeStrategy.createPreview(k,this.selected,s);if(this._previewStart=this._getCellCompareValue(ie.start),this._previewEnd=this._getCellCompareValue(ie.end),this.activeDrag&&k){const ot=this._rangeStrategy.createDrag?.(this.activeDrag.value,this.selected,k,s);ot&&(this._previewStart=this._getCellCompareValue(ot.start),this._previewEnd=this._getCellCompareValue(ot.end))}this._changeDetectorRef.detectChanges()}}_dragEnded(s){if(this.activeDrag)if(s.value){const d=this._rangeStrategy?.createDrag?.(this.activeDrag.value,this.selected,s.value,s.event);this.dragEnded.emit({value:d??null,event:s.event})}else this.dragEnded.emit({value:null,event:s.event})}_getDateFromDayOfMonth(s){return this._dateAdapter.createDate(this._dateAdapter.getYear(this.activeDate),this._dateAdapter.getMonth(this.activeDate),s)}_initWeekdays(){const s=this._dateAdapter.getFirstDayOfWeek(),d=this._dateAdapter.getDayOfWeekNames("narrow");let ie=this._dateAdapter.getDayOfWeekNames("long").map((ot,Cn)=>({long:ot,narrow:d[Cn]}));this._weekdays=ie.slice(s).concat(ie.slice(0,s))}_createWeekCells(){const s=this._dateAdapter.getNumDaysInMonth(this.activeDate),d=this._dateAdapter.getDateNames();this._weeks=[[]];for(let k=0,ie=this._firstWeekOffset;k<s;k++,ie++){7==ie&&(this._weeks.push([]),ie=0);const ot=this._dateAdapter.createDate(this._dateAdapter.getYear(this.activeDate),this._dateAdapter.getMonth(this.activeDate),k+1),Cn=this._shouldEnableDate(ot),ir=this._dateAdapter.format(ot,this._dateFormats.display.dateA11yLabel),Yo=this.dateClass?this.dateClass(ot,"month"):void 0;this._weeks[this._weeks.length-1].push(new gi(k+1,d[k],ir,Cn,Yo,this._getCellCompareValue(ot),ot))}}_shouldEnableDate(s){return!!s&&(!this.minDate||this._dateAdapter.compareDate(s,this.minDate)>=0)&&(!this.maxDate||this._dateAdapter.compareDate(s,this.maxDate)<=0)&&(!this.dateFilter||this.dateFilter(s))}_getDateInCurrentMonth(s){return s&&this._hasSameMonthAndYear(s,this.activeDate)?this._dateAdapter.getDate(s):null}_hasSameMonthAndYear(s,d){return!(!s||!d||this._dateAdapter.getMonth(s)!=this._dateAdapter.getMonth(d)||this._dateAdapter.getYear(s)!=this._dateAdapter.getYear(d))}_getCellCompareValue(s){if(s){const d=this._dateAdapter.getYear(s),k=this._dateAdapter.getMonth(s),ie=this._dateAdapter.getDate(s);return new Date(d,k,ie).getTime()}return null}_isRtl(){return this._dir&&"rtl"===this._dir.value}_setRanges(s){s instanceof $r?(this._rangeStart=this._getCellCompareValue(s.start),this._rangeEnd=this._getCellCompareValue(s.end),this._isRange=!0):(this._rangeStart=this._rangeEnd=this._getCellCompareValue(s),this._isRange=!1),this._comparisonRangeStart=this._getCellCompareValue(this.comparisonStart),this._comparisonRangeEnd=this._getCellCompareValue(this.comparisonEnd)}_canSelect(s){return!this.dateFilter||this.dateFilter(s)}_clearPreview(){this._previewStart=this._previewEnd=null}}Li.\u0275fac=function(s){return new(s||Li)(e.Y36(e.sBO),e.Y36(gn.sG,8),e.Y36(gn._A,8),e.Y36(Pt.Is,8),e.Y36(ti,8))},Li.\u0275cmp=e.Xpm({type:Li,selectors:[["mat-month-view"]],viewQuery:function(s,d){if(1&s&&e.Gf(Ma,5),2&s){let k;e.iGM(k=e.CRH())&&(d._matCalendarBody=k.first)}},inputs:{activeDate:"activeDate",selected:"selected",minDate:"minDate",maxDate:"maxDate",dateFilter:"dateFilter",dateClass:"dateClass",comparisonStart:"comparisonStart",comparisonEnd:"comparisonEnd",startDateAccessibleName:"startDateAccessibleName",endDateAccessibleName:"endDateAccessibleName",activeDrag:"activeDrag"},outputs:{selectedChange:"selectedChange",_userSelection:"_userSelection",dragStarted:"dragStarted",dragEnded:"dragEnded",activeDateChange:"activeDateChange"},exportAs:["matMonthView"],features:[e.TTD],decls:7,vars:15,consts:[["role","grid",1,"mat-calendar-table"],[1,"mat-calendar-table-header"],["scope","col",4,"ngFor","ngForOf"],["aria-hidden","true","colspan","7",1,"mat-calendar-table-header-divider"],["mat-calendar-body","",3,"label","rows","todayValue","startValue","endValue","comparisonStart","comparisonEnd","previewStart","previewEnd","isRange","labelMinRequiredCells","activeCell","startDateAccessibleName","endDateAccessibleName","selectedValueChange","activeDateChange","previewChange","dragStarted","dragEnded","keyup","keydown"],["scope","col"],[1,"cdk-visually-hidden"],["aria-hidden","true"]],template:function(s,d){1&s&&(e.TgZ(0,"table",0)(1,"thead",1)(2,"tr"),e.YNc(3,Si,5,2,"th",2),e.qZA(),e.TgZ(4,"tr"),e._UZ(5,"th",3),e.qZA()(),e.TgZ(6,"tbody",4),e.NdJ("selectedValueChange",function(ie){return d._dateSelected(ie)})("activeDateChange",function(ie){return d._updateActiveDate(ie)})("previewChange",function(ie){return d._previewChanged(ie)})("dragStarted",function(ie){return d.dragStarted.emit(ie)})("dragEnded",function(ie){return d._dragEnded(ie)})("keyup",function(ie){return d._handleCalendarBodyKeyup(ie)})("keydown",function(ie){return d._handleCalendarBodyKeydown(ie)}),e.qZA()()),2&s&&(e.xp6(3),e.Q6J("ngForOf",d._weekdays),e.xp6(3),e.Q6J("label",d._monthLabel)("rows",d._weeks)("todayValue",d._todayDate)("startValue",d._rangeStart)("endValue",d._rangeEnd)("comparisonStart",d._comparisonRangeStart)("comparisonEnd",d._comparisonRangeEnd)("previewStart",d._previewStart)("previewEnd",d._previewEnd)("isRange",d._isRange)("labelMinRequiredCells",3)("activeCell",d._dateAdapter.getDate(d.activeDate)-1)("startDateAccessibleName",d.startDateAccessibleName)("endDateAccessibleName",d.endDateAccessibleName))},dependencies:[Et.sg,Ma],encapsulation:2,changeDetection:0});const Ta=24;class Ps{get activeDate(){return this._activeDate}set activeDate(s){let d=this._activeDate;const k=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(s))||this._dateAdapter.today();this._activeDate=this._dateAdapter.clampDate(k,this.minDate,this.maxDate),is(this._dateAdapter,d,this._activeDate,this.minDate,this.maxDate)||this._init()}get selected(){return this._selected}set selected(s){this._selected=s instanceof $r?s:this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(s)),this._setSelectedYear(s)}get minDate(){return this._minDate}set minDate(s){this._minDate=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(s))}get maxDate(){return this._maxDate}set maxDate(s){this._maxDate=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(s))}constructor(s,d,k){this._changeDetectorRef=s,this._dateAdapter=d,this._dir=k,this._rerenderSubscription=Qt.w0.EMPTY,this.selectedChange=new e.vpe,this.yearSelected=new e.vpe,this.activeDateChange=new e.vpe,this._dateAdapter,this._activeDate=this._dateAdapter.today()}ngAfterContentInit(){this._rerenderSubscription=this._dateAdapter.localeChanges.pipe((0,Be.O)(null)).subscribe(()=>this._init())}ngOnDestroy(){this._rerenderSubscription.unsubscribe()}_init(){this._todayYear=this._dateAdapter.getYear(this._dateAdapter.today());const d=this._dateAdapter.getYear(this._activeDate)-yt(this._dateAdapter,this.activeDate,this.minDate,this.maxDate);this._years=[];for(let k=0,ie=[];k<Ta;k++)ie.push(d+k),4==ie.length&&(this._years.push(ie.map(ot=>this._createCellForYear(ot))),ie=[]);this._changeDetectorRef.markForCheck()}_yearSelected(s){const d=s.value,k=this._dateAdapter.createDate(d,0,1),ie=this._getDateFromYear(d);this.yearSelected.emit(k),this.selectedChange.emit(ie)}_updateActiveDate(s){const d=s.value,k=this._activeDate;this.activeDate=this._getDateFromYear(d),this._dateAdapter.compareDate(k,this.activeDate)&&this.activeDateChange.emit(this.activeDate)}_handleCalendarBodyKeydown(s){const d=this._activeDate,k=this._isRtl();switch(s.keyCode){case St.oh:this.activeDate=this._dateAdapter.addCalendarYears(this._activeDate,k?1:-1);break;case St.SV:this.activeDate=this._dateAdapter.addCalendarYears(this._activeDate,k?-1:1);break;case St.LH:this.activeDate=this._dateAdapter.addCalendarYears(this._activeDate,-4);break;case St.JH:this.activeDate=this._dateAdapter.addCalendarYears(this._activeDate,4);break;case St.Sd:this.activeDate=this._dateAdapter.addCalendarYears(this._activeDate,-yt(this._dateAdapter,this.activeDate,this.minDate,this.maxDate));break;case St.uR:this.activeDate=this._dateAdapter.addCalendarYears(this._activeDate,Ta-yt(this._dateAdapter,this.activeDate,this.minDate,this.maxDate)-1);break;case St.Ku:this.activeDate=this._dateAdapter.addCalendarYears(this._activeDate,s.altKey?10*-Ta:-Ta);break;case St.VM:this.activeDate=this._dateAdapter.addCalendarYears(this._activeDate,s.altKey?10*Ta:Ta);break;case St.K5:case St.L_:this._selectionKeyPressed=!0;break;default:return}this._dateAdapter.compareDate(d,this.activeDate)&&this.activeDateChange.emit(this.activeDate),this._focusActiveCellAfterViewChecked(),s.preventDefault()}_handleCalendarBodyKeyup(s){(s.keyCode===St.L_||s.keyCode===St.K5)&&(this._selectionKeyPressed&&this._yearSelected({value:this._dateAdapter.getYear(this._activeDate),event:s}),this._selectionKeyPressed=!1)}_getActiveCell(){return yt(this._dateAdapter,this.activeDate,this.minDate,this.maxDate)}_focusActiveCell(){this._matCalendarBody._focusActiveCell()}_focusActiveCellAfterViewChecked(){this._matCalendarBody._scheduleFocusActiveCellAfterViewChecked()}_getDateFromYear(s){const d=this._dateAdapter.getMonth(this.activeDate),k=this._dateAdapter.getNumDaysInMonth(this._dateAdapter.createDate(s,d,1));return this._dateAdapter.createDate(s,d,Math.min(this._dateAdapter.getDate(this.activeDate),k))}_createCellForYear(s){const d=this._dateAdapter.createDate(s,0,1),k=this._dateAdapter.getYearName(d),ie=this.dateClass?this.dateClass(d,"multi-year"):void 0;return new gi(s,k,k,this._shouldEnableYear(s),ie)}_shouldEnableYear(s){if(null==s||this.maxDate&&s>this._dateAdapter.getYear(this.maxDate)||this.minDate&&s<this._dateAdapter.getYear(this.minDate))return!1;if(!this.dateFilter)return!0;for(let k=this._dateAdapter.createDate(s,0,1);this._dateAdapter.getYear(k)==s;k=this._dateAdapter.addCalendarDays(k,1))if(this.dateFilter(k))return!0;return!1}_isRtl(){return this._dir&&"rtl"===this._dir.value}_setSelectedYear(s){if(this._selectedYear=null,s instanceof $r){const d=s.start||s.end;d&&(this._selectedYear=this._dateAdapter.getYear(d))}else s&&(this._selectedYear=this._dateAdapter.getYear(s))}}function is(H,s,d,k,ie){const ot=H.getYear(s),Cn=H.getYear(d),ir=Dt(H,k,ie);return Math.floor((ot-ir)/Ta)===Math.floor((Cn-ir)/Ta)}function yt(H,s,d,k){return function We(H,s){return(H%s+s)%s}(H.getYear(s)-Dt(H,d,k),Ta)}function Dt(H,s,d){let k=0;return d?k=H.getYear(d)-Ta+1:s&&(k=H.getYear(s)),k}Ps.\u0275fac=function(s){return new(s||Ps)(e.Y36(e.sBO),e.Y36(gn._A,8),e.Y36(Pt.Is,8))},Ps.\u0275cmp=e.Xpm({type:Ps,selectors:[["mat-multi-year-view"]],viewQuery:function(s,d){if(1&s&&e.Gf(Ma,5),2&s){let k;e.iGM(k=e.CRH())&&(d._matCalendarBody=k.first)}},inputs:{activeDate:"activeDate",selected:"selected",minDate:"minDate",maxDate:"maxDate",dateFilter:"dateFilter",dateClass:"dateClass"},outputs:{selectedChange:"selectedChange",yearSelected:"yearSelected",activeDateChange:"activeDateChange"},exportAs:["matMultiYearView"],decls:5,vars:7,consts:[["role","grid",1,"mat-calendar-table"],["aria-hidden","true",1,"mat-calendar-table-header"],["colspan","4",1,"mat-calendar-table-header-divider"],["mat-calendar-body","",3,"rows","todayValue","startValue","endValue","numCols","cellAspectRatio","activeCell","selectedValueChange","activeDateChange","keyup","keydown"]],template:function(s,d){1&s&&(e.TgZ(0,"table",0)(1,"thead",1)(2,"tr"),e._UZ(3,"th",2),e.qZA()(),e.TgZ(4,"tbody",3),e.NdJ("selectedValueChange",function(ie){return d._yearSelected(ie)})("activeDateChange",function(ie){return d._updateActiveDate(ie)})("keyup",function(ie){return d._handleCalendarBodyKeyup(ie)})("keydown",function(ie){return d._handleCalendarBodyKeydown(ie)}),e.qZA()()),2&s&&(e.xp6(4),e.Q6J("rows",d._years)("todayValue",d._todayYear)("startValue",d._selectedYear)("endValue",d._selectedYear)("numCols",4)("cellAspectRatio",4/7)("activeCell",d._getActiveCell()))},dependencies:[Ma],encapsulation:2,changeDetection:0});class Rt{get activeDate(){return this._activeDate}set activeDate(s){let d=this._activeDate;const k=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(s))||this._dateAdapter.today();this._activeDate=this._dateAdapter.clampDate(k,this.minDate,this.maxDate),this._dateAdapter.getYear(d)!==this._dateAdapter.getYear(this._activeDate)&&this._init()}get selected(){return this._selected}set selected(s){this._selected=s instanceof $r?s:this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(s)),this._setSelectedMonth(s)}get minDate(){return this._minDate}set minDate(s){this._minDate=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(s))}get maxDate(){return this._maxDate}set maxDate(s){this._maxDate=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(s))}constructor(s,d,k,ie){this._changeDetectorRef=s,this._dateFormats=d,this._dateAdapter=k,this._dir=ie,this._rerenderSubscription=Qt.w0.EMPTY,this.selectedChange=new e.vpe,this.monthSelected=new e.vpe,this.activeDateChange=new e.vpe,this._activeDate=this._dateAdapter.today()}ngAfterContentInit(){this._rerenderSubscription=this._dateAdapter.localeChanges.pipe((0,Be.O)(null)).subscribe(()=>this._init())}ngOnDestroy(){this._rerenderSubscription.unsubscribe()}_monthSelected(s){const d=s.value,k=this._dateAdapter.createDate(this._dateAdapter.getYear(this.activeDate),d,1);this.monthSelected.emit(k);const ie=this._getDateFromMonth(d);this.selectedChange.emit(ie)}_updateActiveDate(s){const d=s.value,k=this._activeDate;this.activeDate=this._getDateFromMonth(d),this._dateAdapter.compareDate(k,this.activeDate)&&this.activeDateChange.emit(this.activeDate)}_handleCalendarBodyKeydown(s){const d=this._activeDate,k=this._isRtl();switch(s.keyCode){case St.oh:this.activeDate=this._dateAdapter.addCalendarMonths(this._activeDate,k?1:-1);break;case St.SV:this.activeDate=this._dateAdapter.addCalendarMonths(this._activeDate,k?-1:1);break;case St.LH:this.activeDate=this._dateAdapter.addCalendarMonths(this._activeDate,-4);break;case St.JH:this.activeDate=this._dateAdapter.addCalendarMonths(this._activeDate,4);break;case St.Sd:this.activeDate=this._dateAdapter.addCalendarMonths(this._activeDate,-this._dateAdapter.getMonth(this._activeDate));break;case St.uR:this.activeDate=this._dateAdapter.addCalendarMonths(this._activeDate,11-this._dateAdapter.getMonth(this._activeDate));break;case St.Ku:this.activeDate=this._dateAdapter.addCalendarYears(this._activeDate,s.altKey?-10:-1);break;case St.VM:this.activeDate=this._dateAdapter.addCalendarYears(this._activeDate,s.altKey?10:1);break;case St.K5:case St.L_:this._selectionKeyPressed=!0;break;default:return}this._dateAdapter.compareDate(d,this.activeDate)&&(this.activeDateChange.emit(this.activeDate),this._focusActiveCellAfterViewChecked()),s.preventDefault()}_handleCalendarBodyKeyup(s){(s.keyCode===St.L_||s.keyCode===St.K5)&&(this._selectionKeyPressed&&this._monthSelected({value:this._dateAdapter.getMonth(this._activeDate),event:s}),this._selectionKeyPressed=!1)}_init(){this._setSelectedMonth(this.selected),this._todayMonth=this._getMonthInCurrentYear(this._dateAdapter.today()),this._yearLabel=this._dateAdapter.getYearName(this.activeDate);let s=this._dateAdapter.getMonthNames("short");this._months=[[0,1,2,3],[4,5,6,7],[8,9,10,11]].map(d=>d.map(k=>this._createCellForMonth(k,s[k]))),this._changeDetectorRef.markForCheck()}_focusActiveCell(){this._matCalendarBody._focusActiveCell()}_focusActiveCellAfterViewChecked(){this._matCalendarBody._scheduleFocusActiveCellAfterViewChecked()}_getMonthInCurrentYear(s){return s&&this._dateAdapter.getYear(s)==this._dateAdapter.getYear(this.activeDate)?this._dateAdapter.getMonth(s):null}_getDateFromMonth(s){const d=this._dateAdapter.createDate(this._dateAdapter.getYear(this.activeDate),s,1),k=this._dateAdapter.getNumDaysInMonth(d);return this._dateAdapter.createDate(this._dateAdapter.getYear(this.activeDate),s,Math.min(this._dateAdapter.getDate(this.activeDate),k))}_createCellForMonth(s,d){const k=this._dateAdapter.createDate(this._dateAdapter.getYear(this.activeDate),s,1),ie=this._dateAdapter.format(k,this._dateFormats.display.monthYearA11yLabel),ot=this.dateClass?this.dateClass(k,"year"):void 0;return new gi(s,d.toLocaleUpperCase(),ie,this._shouldEnableMonth(s),ot)}_shouldEnableMonth(s){const d=this._dateAdapter.getYear(this.activeDate);if(null==s||this._isYearAndMonthAfterMaxDate(d,s)||this._isYearAndMonthBeforeMinDate(d,s))return!1;if(!this.dateFilter)return!0;for(let ie=this._dateAdapter.createDate(d,s,1);this._dateAdapter.getMonth(ie)==s;ie=this._dateAdapter.addCalendarDays(ie,1))if(this.dateFilter(ie))return!0;return!1}_isYearAndMonthAfterMaxDate(s,d){if(this.maxDate){const k=this._dateAdapter.getYear(this.maxDate),ie=this._dateAdapter.getMonth(this.maxDate);return s>k||s===k&&d>ie}return!1}_isYearAndMonthBeforeMinDate(s,d){if(this.minDate){const k=this._dateAdapter.getYear(this.minDate),ie=this._dateAdapter.getMonth(this.minDate);return s<k||s===k&&d<ie}return!1}_isRtl(){return this._dir&&"rtl"===this._dir.value}_setSelectedMonth(s){this._selectedMonth=s instanceof $r?this._getMonthInCurrentYear(s.start)||this._getMonthInCurrentYear(s.end):this._getMonthInCurrentYear(s)}}Rt.\u0275fac=function(s){return new(s||Rt)(e.Y36(e.sBO),e.Y36(gn.sG,8),e.Y36(gn._A,8),e.Y36(Pt.Is,8))},Rt.\u0275cmp=e.Xpm({type:Rt,selectors:[["mat-year-view"]],viewQuery:function(s,d){if(1&s&&e.Gf(Ma,5),2&s){let k;e.iGM(k=e.CRH())&&(d._matCalendarBody=k.first)}},inputs:{activeDate:"activeDate",selected:"selected",minDate:"minDate",maxDate:"maxDate",dateFilter:"dateFilter",dateClass:"dateClass"},outputs:{selectedChange:"selectedChange",monthSelected:"monthSelected",activeDateChange:"activeDateChange"},exportAs:["matYearView"],decls:5,vars:9,consts:[["role","grid",1,"mat-calendar-table"],["aria-hidden","true",1,"mat-calendar-table-header"],["colspan","4",1,"mat-calendar-table-header-divider"],["mat-calendar-body","",3,"label","rows","todayValue","startValue","endValue","labelMinRequiredCells","numCols","cellAspectRatio","activeCell","selectedValueChange","activeDateChange","keyup","keydown"]],template:function(s,d){1&s&&(e.TgZ(0,"table",0)(1,"thead",1)(2,"tr"),e._UZ(3,"th",2),e.qZA()(),e.TgZ(4,"tbody",3),e.NdJ("selectedValueChange",function(ie){return d._monthSelected(ie)})("activeDateChange",function(ie){return d._updateActiveDate(ie)})("keyup",function(ie){return d._handleCalendarBodyKeyup(ie)})("keydown",function(ie){return d._handleCalendarBodyKeydown(ie)}),e.qZA()()),2&s&&(e.xp6(4),e.Q6J("label",d._yearLabel)("rows",d._months)("todayValue",d._todayMonth)("startValue",d._selectedMonth)("endValue",d._selectedMonth)("labelMinRequiredCells",2)("numCols",4)("cellAspectRatio",4/7)("activeCell",d._dateAdapter.getMonth(d.activeDate)))},dependencies:[Ma],encapsulation:2,changeDetection:0});let Qn=1;class fi{constructor(s,d,k,ie,ot){this._intl=s,this.calendar=d,this._dateAdapter=k,this._dateFormats=ie,this._id="mat-calendar-header-"+Qn++,this._periodButtonLabelId=`${this._id}-period-label`,this.calendar.stateChanges.subscribe(()=>ot.markForCheck())}get periodButtonText(){return"month"==this.calendar.currentView?this._dateAdapter.format(this.calendar.activeDate,this._dateFormats.display.monthYearLabel).toLocaleUpperCase():"year"==this.calendar.currentView?this._dateAdapter.getYearName(this.calendar.activeDate):this._intl.formatYearRange(...this._formatMinAndMaxYearLabels())}get periodButtonDescription(){return"month"==this.calendar.currentView?this._dateAdapter.format(this.calendar.activeDate,this._dateFormats.display.monthYearLabel).toLocaleUpperCase():"year"==this.calendar.currentView?this._dateAdapter.getYearName(this.calendar.activeDate):this._intl.formatYearRangeLabel(...this._formatMinAndMaxYearLabels())}get periodButtonLabel(){return"month"==this.calendar.currentView?this._intl.switchToMultiYearViewLabel:this._intl.switchToMonthViewLabel}get prevButtonLabel(){return{month:this._intl.prevMonthLabel,year:this._intl.prevYearLabel,"multi-year":this._intl.prevMultiYearLabel}[this.calendar.currentView]}get nextButtonLabel(){return{month:this._intl.nextMonthLabel,year:this._intl.nextYearLabel,"multi-year":this._intl.nextMultiYearLabel}[this.calendar.currentView]}currentPeriodClicked(){this.calendar.currentView="month"==this.calendar.currentView?"multi-year":"month"}previousClicked(){this.calendar.activeDate="month"==this.calendar.currentView?this._dateAdapter.addCalendarMonths(this.calendar.activeDate,-1):this._dateAdapter.addCalendarYears(this.calendar.activeDate,"year"==this.calendar.currentView?-1:-Ta)}nextClicked(){this.calendar.activeDate="month"==this.calendar.currentView?this._dateAdapter.addCalendarMonths(this.calendar.activeDate,1):this._dateAdapter.addCalendarYears(this.calendar.activeDate,"year"==this.calendar.currentView?1:Ta)}previousEnabled(){return!this.calendar.minDate||(!this.calendar.minDate||!this._isSameView(this.calendar.activeDate,this.calendar.minDate))}nextEnabled(){return!this.calendar.maxDate||!this._isSameView(this.calendar.activeDate,this.calendar.maxDate)}_isSameView(s,d){return"month"==this.calendar.currentView?this._dateAdapter.getYear(s)==this._dateAdapter.getYear(d)&&this._dateAdapter.getMonth(s)==this._dateAdapter.getMonth(d):"year"==this.calendar.currentView?this._dateAdapter.getYear(s)==this._dateAdapter.getYear(d):is(this._dateAdapter,s,d,this.calendar.minDate,this.calendar.maxDate)}_formatMinAndMaxYearLabels(){const d=this._dateAdapter.getYear(this.calendar.activeDate)-yt(this._dateAdapter,this.calendar.activeDate,this.calendar.minDate,this.calendar.maxDate),k=d+Ta-1;return[this._dateAdapter.getYearName(this._dateAdapter.createDate(d,0,1)),this._dateAdapter.getYearName(this._dateAdapter.createDate(k,0,1))]}}fi.\u0275fac=function(s){return new(s||fi)(e.Y36(ur),e.Y36((0,e.Gpc)(()=>Xi)),e.Y36(gn._A,8),e.Y36(gn.sG,8),e.Y36(e.sBO))},fi.\u0275cmp=e.Xpm({type:fi,selectors:[["mat-calendar-header"]],exportAs:["matCalendarHeader"],ngContentSelectors:to,decls:13,vars:11,consts:[[1,"mat-calendar-header"],[1,"mat-calendar-controls"],["mat-button","","type","button","aria-live","polite",1,"mat-calendar-period-button",3,"click"],["aria-hidden","true"],["viewBox","0 0 10 5","focusable","false","aria-hidden","true",1,"mat-calendar-arrow"],["points","0,0 5,5 10,0"],[1,"mat-calendar-spacer"],["mat-icon-button","","type","button",1,"mat-calendar-previous-button",3,"disabled","click"],["mat-icon-button","","type","button",1,"mat-calendar-next-button",3,"disabled","click"],[1,"mat-calendar-hidden-label",3,"id"]],template:function(s,d){1&s&&(e.F$t(),e.TgZ(0,"div",0)(1,"div",1)(2,"button",2),e.NdJ("click",function(){return d.currentPeriodClicked()}),e.TgZ(3,"span",3),e._uU(4),e.qZA(),e.O4$(),e.TgZ(5,"svg",4),e._UZ(6,"polygon",5),e.qZA()(),e.kcU(),e._UZ(7,"div",6),e.Hsn(8),e.TgZ(9,"button",7),e.NdJ("click",function(){return d.previousClicked()}),e.qZA(),e.TgZ(10,"button",8),e.NdJ("click",function(){return d.nextClicked()}),e.qZA()()(),e.TgZ(11,"label",9),e._uU(12),e.qZA()),2&s&&(e.xp6(2),e.uIk("aria-label",d.periodButtonLabel)("aria-describedby",d._periodButtonLabelId),e.xp6(2),e.Oqu(d.periodButtonText),e.xp6(1),e.ekj("mat-calendar-invert","month"!==d.calendar.currentView),e.xp6(4),e.Q6J("disabled",!d.previousEnabled()),e.uIk("aria-label",d.prevButtonLabel),e.xp6(1),e.Q6J("disabled",!d.nextEnabled()),e.uIk("aria-label",d.nextButtonLabel),e.xp6(1),e.Q6J("id",d._periodButtonLabelId),e.xp6(1),e.Oqu(d.periodButtonDescription))},dependencies:[at.lW,at.RK],encapsulation:2,changeDetection:0});class Xi{get startAt(){return this._startAt}set startAt(s){this._startAt=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(s))}get selected(){return this._selected}set selected(s){this._selected=s instanceof $r?s:this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(s))}get minDate(){return this._minDate}set minDate(s){this._minDate=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(s))}get maxDate(){return this._maxDate}set maxDate(s){this._maxDate=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(s))}get activeDate(){return this._clampedActiveDate}set activeDate(s){this._clampedActiveDate=this._dateAdapter.clampDate(s,this.minDate,this.maxDate),this.stateChanges.next(),this._changeDetectorRef.markForCheck()}get currentView(){return this._currentView}set currentView(s){const d=this._currentView!==s?s:null;this._currentView=s,this._moveFocusOnNextTick=!0,this._changeDetectorRef.markForCheck(),d&&this.viewChanged.emit(d)}constructor(s,d,k,ie){this._dateAdapter=d,this._dateFormats=k,this._changeDetectorRef=ie,this._moveFocusOnNextTick=!1,this.startView="month",this.selectedChange=new e.vpe,this.yearSelected=new e.vpe,this.monthSelected=new e.vpe,this.viewChanged=new e.vpe(!0),this._userSelection=new e.vpe,this._userDragDrop=new e.vpe,this._activeDrag=null,this.stateChanges=new l.x,this._intlChanges=s.changes.subscribe(()=>{ie.markForCheck(),this.stateChanges.next()})}ngAfterContentInit(){this._calendarHeaderPortal=new Wn.C5(this.headerComponent||fi),this.activeDate=this.startAt||this._dateAdapter.today(),this._currentView=this.startView}ngAfterViewChecked(){this._moveFocusOnNextTick&&(this._moveFocusOnNextTick=!1,this.focusActiveCell())}ngOnDestroy(){this._intlChanges.unsubscribe(),this.stateChanges.complete()}ngOnChanges(s){const d=s.minDate&&!this._dateAdapter.sameDate(s.minDate.previousValue,s.minDate.currentValue)?s.minDate:void 0,k=s.maxDate&&!this._dateAdapter.sameDate(s.maxDate.previousValue,s.maxDate.currentValue)?s.maxDate:void 0,ie=d||k||s.dateFilter;if(ie&&!ie.firstChange){const ot=this._getCurrentViewComponent();ot&&(this._changeDetectorRef.detectChanges(),ot._init())}this.stateChanges.next()}focusActiveCell(){this._getCurrentViewComponent()._focusActiveCell(!1)}updateTodaysDate(){this._getCurrentViewComponent()._init()}_dateSelected(s){const d=s.value;(this.selected instanceof $r||d&&!this._dateAdapter.sameDate(d,this.selected))&&this.selectedChange.emit(d),this._userSelection.emit(s)}_yearSelectedInMultiYearView(s){this.yearSelected.emit(s)}_monthSelectedInYearView(s){this.monthSelected.emit(s)}_goToDateInView(s,d){this.activeDate=s,this.currentView=d}_dragStarted(s){this._activeDrag=s}_dragEnded(s){this._activeDrag&&(s.value&&this._userDragDrop.emit(s),this._activeDrag=null)}_getCurrentViewComponent(){return this.monthView||this.yearView||this.multiYearView}}Xi.\u0275fac=function(s){return new(s||Xi)(e.Y36(ur),e.Y36(gn._A,8),e.Y36(gn.sG,8),e.Y36(e.sBO))},Xi.\u0275cmp=e.Xpm({type:Xi,selectors:[["mat-calendar"]],viewQuery:function(s,d){if(1&s&&(e.Gf(Li,5),e.Gf(Rt,5),e.Gf(Ps,5)),2&s){let k;e.iGM(k=e.CRH())&&(d.monthView=k.first),e.iGM(k=e.CRH())&&(d.yearView=k.first),e.iGM(k=e.CRH())&&(d.multiYearView=k.first)}},hostAttrs:[1,"mat-calendar"],inputs:{headerComponent:"headerComponent",startAt:"startAt",startView:"startView",selected:"selected",minDate:"minDate",maxDate:"maxDate",dateFilter:"dateFilter",dateClass:"dateClass",comparisonStart:"comparisonStart",comparisonEnd:"comparisonEnd",startDateAccessibleName:"startDateAccessibleName",endDateAccessibleName:"endDateAccessibleName"},outputs:{selectedChange:"selectedChange",yearSelected:"yearSelected",monthSelected:"monthSelected",viewChanged:"viewChanged",_userSelection:"_userSelection",_userDragDrop:"_userDragDrop"},exportAs:["matCalendar"],features:[e._Bn([al]),e.TTD],decls:5,vars:5,consts:[[3,"cdkPortalOutlet"],["cdkMonitorSubtreeFocus","","tabindex","-1",1,"mat-calendar-content",3,"ngSwitch"],[3,"activeDate","selected","dateFilter","maxDate","minDate","dateClass","comparisonStart","comparisonEnd","startDateAccessibleName","endDateAccessibleName","activeDrag","activeDateChange","_userSelection","dragStarted","dragEnded",4,"ngSwitchCase"],[3,"activeDate","selected","dateFilter","maxDate","minDate","dateClass","activeDateChange","monthSelected","selectedChange",4,"ngSwitchCase"],[3,"activeDate","selected","dateFilter","maxDate","minDate","dateClass","activeDateChange","yearSelected","selectedChange",4,"ngSwitchCase"],[3,"activeDate","selected","dateFilter","maxDate","minDate","dateClass","comparisonStart","comparisonEnd","startDateAccessibleName","endDateAccessibleName","activeDrag","activeDateChange","_userSelection","dragStarted","dragEnded"],[3,"activeDate","selected","dateFilter","maxDate","minDate","dateClass","activeDateChange","monthSelected","selectedChange"],[3,"activeDate","selected","dateFilter","maxDate","minDate","dateClass","activeDateChange","yearSelected","selectedChange"]],template:function(s,d){1&s&&(e.YNc(0,Oa,0,0,"ng-template",0),e.TgZ(1,"div",1),e.YNc(2,Uo,1,11,"mat-month-view",2),e.YNc(3,rl,1,6,"mat-year-view",3),e.YNc(4,Vs,1,6,"mat-multi-year-view",4),e.qZA()),2&s&&(e.Q6J("cdkPortalOutlet",d._calendarHeaderPortal),e.xp6(1),e.Q6J("ngSwitch",d.currentView),e.xp6(1),e.Q6J("ngSwitchCase","month"),e.xp6(1),e.Q6J("ngSwitchCase","year"),e.xp6(1),e.Q6J("ngSwitchCase","multi-year"))},dependencies:[Et.RF,Et.n9,Fr.kH,Wn.Pl,Li,Rt,Ps],styles:['.mat-calendar{display:block}.mat-calendar-header{padding:8px 8px 0 8px}.mat-calendar-content{padding:0 8px 8px 8px;outline:none}.mat-calendar-controls{display:flex;align-items:center;margin:5% calc(4.7142857143% - 16px)}.mat-calendar-spacer{flex:1 1 auto}.mat-calendar-period-button{min-width:0;margin:0 8px}.mat-calendar-arrow{display:inline-block;width:10px;height:5px;margin:0 0 0 5px;vertical-align:middle}.mat-calendar-arrow.mat-calendar-invert{transform:rotate(180deg)}[dir=rtl] .mat-calendar-arrow{margin:0 5px 0 0}.cdk-high-contrast-active .mat-calendar-arrow{fill:CanvasText}.mat-calendar-previous-button,.mat-calendar-next-button{position:relative}.mat-calendar-previous-button::after,.mat-calendar-next-button::after{top:0;left:0;right:0;bottom:0;position:absolute;content:"";margin:15.5px;border:0 solid currentColor;border-top-width:2px}[dir=rtl] .mat-calendar-previous-button,[dir=rtl] .mat-calendar-next-button{transform:rotate(180deg)}.mat-calendar-previous-button::after{border-left-width:2px;transform:translateX(2px) rotate(-45deg)}.mat-calendar-next-button::after{border-right-width:2px;transform:translateX(-2px) rotate(45deg)}.mat-calendar-table{border-spacing:0;border-collapse:collapse;width:100%}.mat-calendar-table-header th{text-align:center;padding:0 0 8px 0}.mat-calendar-table-header-divider{position:relative;height:1px}.mat-calendar-table-header-divider::after{content:"";position:absolute;top:0;left:-8px;right:-8px;height:1px}.mat-calendar-body-cell-content::before{margin:calc(calc(var(--mat-focus-indicator-border-width, 3px) + 3px) * -1)}.mat-calendar-body-cell:focus .mat-focus-indicator::before{content:""}.mat-calendar-hidden-label{display:none}'],encapsulation:2,changeDetection:0});const wr={transformPanel:(0,ce.X$)("transformPanel",[(0,ce.eR)("void => enter-dropdown",(0,ce.jt)("120ms cubic-bezier(0, 0, 0.2, 1)",(0,ce.F4)([(0,ce.oB)({opacity:0,transform:"scale(1, 0.8)"}),(0,ce.oB)({opacity:1,transform:"scale(1, 1)"})]))),(0,ce.eR)("void => enter-dialog",(0,ce.jt)("150ms cubic-bezier(0, 0, 0.2, 1)",(0,ce.F4)([(0,ce.oB)({opacity:0,transform:"scale(0.7)"}),(0,ce.oB)({transform:"none",opacity:1})]))),(0,ce.eR)("* => void",(0,ce.jt)("100ms linear",(0,ce.oB)({opacity:0})))]),fadeInCalendar:(0,ce.X$)("fadeInCalendar",[(0,ce.SB)("void",(0,ce.oB)({opacity:0})),(0,ce.SB)("enter",(0,ce.oB)({opacity:1})),(0,ce.eR)("void => *",(0,ce.jt)("120ms 100ms cubic-bezier(0.55, 0, 0.55, 0.2)"))])};let Mo=0;const ro=new e.OlP("mat-datepicker-scroll-strategy");const ho={provide:ro,deps:[en.aV],useFactory:function qr(H){return()=>H.scrollStrategies.reposition()}},xa=(0,gn.pj)(class{constructor(H){this._elementRef=H}});class To extends xa{constructor(s,d,k,ie,ot,Cn){super(s),this._changeDetectorRef=d,this._globalModel=k,this._dateAdapter=ie,this._rangeSelectionStrategy=ot,this._subscriptions=new Qt.w0,this._animationDone=new l.x,this._isAnimating=!1,this._actionsPortal=null,this._closeButtonText=Cn.closeCalendarLabel}ngOnInit(){this._animationState=this.datepicker.touchUi?"enter-dialog":"enter-dropdown"}ngAfterViewInit(){this._subscriptions.add(this.datepicker.stateChanges.subscribe(()=>{this._changeDetectorRef.markForCheck()})),this._calendar.focusActiveCell()}ngOnDestroy(){this._subscriptions.unsubscribe(),this._animationDone.complete()}_handleUserSelection(s){const d=this._model.selection,k=s.value,ie=d instanceof $r;if(ie&&this._rangeSelectionStrategy){const ot=this._rangeSelectionStrategy.selectionFinished(k,d,s.event);this._model.updateSelection(ot,this)}else k&&(ie||!this._dateAdapter.sameDate(k,d))&&this._model.add(k);(!this._model||this._model.isComplete())&&!this._actionsPortal&&this.datepicker.close()}_handleUserDragDrop(s){this._model.updateSelection(s.value,this)}_startExitAnimation(){this._animationState="void",this._changeDetectorRef.markForCheck()}_handleAnimationEvent(s){this._isAnimating="start"===s.phaseName,this._isAnimating||this._animationDone.next()}_getSelected(){return this._model.selection}_applyPendingSelection(){this._model!==this._globalModel&&this._globalModel.updateSelection(this._model.selection,this)}_assignActions(s,d){this._model=s?this._globalModel.clone():this._globalModel,this._actionsPortal=s,d&&this._changeDetectorRef.detectChanges()}}To.\u0275fac=function(s){return new(s||To)(e.Y36(e.SBq),e.Y36(e.sBO),e.Y36(Ts),e.Y36(gn._A),e.Y36(ti,8),e.Y36(ur))},To.\u0275cmp=e.Xpm({type:To,selectors:[["mat-datepicker-content"]],viewQuery:function(s,d){if(1&s&&e.Gf(Xi,5),2&s){let k;e.iGM(k=e.CRH())&&(d._calendar=k.first)}},hostAttrs:[1,"mat-datepicker-content"],hostVars:3,hostBindings:function(s,d){1&s&&e.WFA("@transformPanel.start",function(ie){return d._handleAnimationEvent(ie)})("@transformPanel.done",function(ie){return d._handleAnimationEvent(ie)}),2&s&&(e.d8E("@transformPanel",d._animationState),e.ekj("mat-datepicker-content-touch",d.datepicker.touchUi))},inputs:{color:"color"},exportAs:["matDatepickerContent"],features:[e.qOj],decls:5,vars:26,consts:[["cdkTrapFocus","","role","dialog",1,"mat-datepicker-content-container"],[3,"id","ngClass","startAt","startView","minDate","maxDate","dateFilter","headerComponent","selected","dateClass","comparisonStart","comparisonEnd","startDateAccessibleName","endDateAccessibleName","yearSelected","monthSelected","viewChanged","_userSelection","_userDragDrop"],[3,"cdkPortalOutlet"],["type","button","mat-raised-button","",1,"mat-datepicker-close-button",3,"color","focus","blur","click"]],template:function(s,d){if(1&s&&(e.TgZ(0,"div",0)(1,"mat-calendar",1),e.NdJ("yearSelected",function(ie){return d.datepicker._selectYear(ie)})("monthSelected",function(ie){return d.datepicker._selectMonth(ie)})("viewChanged",function(ie){return d.datepicker._viewChanged(ie)})("_userSelection",function(ie){return d._handleUserSelection(ie)})("_userDragDrop",function(ie){return d._handleUserDragDrop(ie)}),e.qZA(),e.YNc(2,ps,0,0,"ng-template",2),e.TgZ(3,"button",3),e.NdJ("focus",function(){return d._closeButtonFocused=!0})("blur",function(){return d._closeButtonFocused=!1})("click",function(){return d.datepicker.close()}),e._uU(4),e.qZA()()),2&s){let k;e.ekj("mat-datepicker-content-container-with-custom-header",d.datepicker.calendarHeaderComponent)("mat-datepicker-content-container-with-actions",d._actionsPortal),e.uIk("aria-modal",!0)("aria-labelledby",null!==(k=d._dialogLabelId)&&void 0!==k?k:void 0),e.xp6(1),e.Q6J("id",d.datepicker.id)("ngClass",d.datepicker.panelClass)("startAt",d.datepicker.startAt)("startView",d.datepicker.startView)("minDate",d.datepicker._getMinDate())("maxDate",d.datepicker._getMaxDate())("dateFilter",d.datepicker._getDateFilter())("headerComponent",d.datepicker.calendarHeaderComponent)("selected",d._getSelected())("dateClass",d.datepicker.dateClass)("comparisonStart",d.comparisonStart)("comparisonEnd",d.comparisonEnd)("@fadeInCalendar","enter")("startDateAccessibleName",d.startDateAccessibleName)("endDateAccessibleName",d.endDateAccessibleName),e.xp6(1),e.Q6J("cdkPortalOutlet",d._actionsPortal),e.xp6(1),e.ekj("cdk-visually-hidden",!d._closeButtonFocused),e.Q6J("color",d.color||"primary"),e.xp6(1),e.Oqu(d._closeButtonText)}},dependencies:[Et.mk,at.lW,Fr.mK,Wn.Pl,Xi],styles:[".mat-datepicker-content{display:block;border-radius:4px}.mat-datepicker-content .mat-calendar{width:296px;height:354px}.mat-datepicker-content .mat-datepicker-content-container-with-custom-header .mat-calendar{height:auto}.mat-datepicker-content .mat-datepicker-close-button{position:absolute;top:100%;left:0;margin-top:8px}.ng-animating .mat-datepicker-content .mat-datepicker-close-button{display:none}.mat-datepicker-content-container{display:flex;flex-direction:column;justify-content:space-between}.mat-datepicker-content-touch{display:block;max-height:80vh;position:relative;overflow:visible}.mat-datepicker-content-touch .mat-datepicker-content-container{min-height:312px;max-height:788px;min-width:250px;max-width:750px}.mat-datepicker-content-touch .mat-calendar{width:100%;height:auto}@media all and (orientation: landscape){.mat-datepicker-content-touch .mat-datepicker-content-container{width:64vh;height:80vh}}@media all and (orientation: portrait){.mat-datepicker-content-touch .mat-datepicker-content-container{width:80vw;height:100vw}.mat-datepicker-content-touch .mat-datepicker-content-container-with-actions{height:115vw}}"],encapsulation:2,data:{animation:[wr.transformPanel,wr.fadeInCalendar]},changeDetection:0});class Ao{get startAt(){return this._startAt||(this.datepickerInput?this.datepickerInput.getStartValue():null)}set startAt(s){this._startAt=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(s))}get color(){return this._color||(this.datepickerInput?this.datepickerInput.getThemePalette():void 0)}set color(s){this._color=s}get touchUi(){return this._touchUi}set touchUi(s){this._touchUi=(0,Ln.Ig)(s)}get disabled(){return void 0===this._disabled&&this.datepickerInput?this.datepickerInput.disabled:!!this._disabled}set disabled(s){const d=(0,Ln.Ig)(s);d!==this._disabled&&(this._disabled=d,this.stateChanges.next(void 0))}get restoreFocus(){return this._restoreFocus}set restoreFocus(s){this._restoreFocus=(0,Ln.Ig)(s)}get panelClass(){return this._panelClass}set panelClass(s){this._panelClass=(0,Ln.du)(s)}get opened(){return this._opened}set opened(s){(0,Ln.Ig)(s)?this.open():this.close()}_getMinDate(){return this.datepickerInput&&this.datepickerInput.min}_getMaxDate(){return this.datepickerInput&&this.datepickerInput.max}_getDateFilter(){return this.datepickerInput&&this.datepickerInput.dateFilter}constructor(s,d,k,ie,ot,Cn,ir){this._overlay=s,this._ngZone=d,this._viewContainerRef=k,this._dateAdapter=ot,this._dir=Cn,this._model=ir,this._inputStateChanges=Qt.w0.EMPTY,this._document=(0,e.f3M)(Et.K0),this.startView="month",this._touchUi=!1,this.xPosition="start",this.yPosition="below",this._restoreFocus=!0,this.yearSelected=new e.vpe,this.monthSelected=new e.vpe,this.viewChanged=new e.vpe(!0),this.openedStream=new e.vpe,this.closedStream=new e.vpe,this._opened=!1,this.id="mat-datepicker-"+Mo++,this._focusedElementBeforeOpen=null,this._backdropHarnessClass=`${this.id}-backdrop`,this.stateChanges=new l.x,this._dateAdapter,this._scrollStrategy=ie}ngOnChanges(s){const d=s.xPosition||s.yPosition;if(d&&!d.firstChange&&this._overlayRef){const k=this._overlayRef.getConfig().positionStrategy;k instanceof en._G&&(this._setConnectedPositions(k),this.opened&&this._overlayRef.updatePosition())}this.stateChanges.next(void 0)}ngOnDestroy(){this._destroyOverlay(),this.close(),this._inputStateChanges.unsubscribe(),this.stateChanges.complete()}select(s){this._model.add(s)}_selectYear(s){this.yearSelected.emit(s)}_selectMonth(s){this.monthSelected.emit(s)}_viewChanged(s){this.viewChanged.emit(s)}registerInput(s){return this.datepickerInput,this._inputStateChanges.unsubscribe(),this.datepickerInput=s,this._inputStateChanges=s.stateChanges.subscribe(()=>this.stateChanges.next(void 0)),this._model}registerActions(s){this._actionsPortal,this._actionsPortal=s,this._componentRef?.instance._assignActions(s,!0)}removeActions(s){s===this._actionsPortal&&(this._actionsPortal=null,this._componentRef?.instance._assignActions(null,!0))}open(){this._opened||this.disabled||this._componentRef?.instance._isAnimating||(this.datepickerInput,this._focusedElementBeforeOpen=(0,cn.ht)(),this._openOverlay(),this._opened=!0,this.openedStream.emit())}close(){if(!this._opened||this._componentRef?.instance._isAnimating)return;const s=this._restoreFocus&&this._focusedElementBeforeOpen&&"function"==typeof this._focusedElementBeforeOpen.focus,d=()=>{this._opened&&(this._opened=!1,this.closedStream.emit())};if(this._componentRef){const{instance:k,location:ie}=this._componentRef;k._startExitAnimation(),k._animationDone.pipe((0,ye.q)(1)).subscribe(()=>{const ot=this._document.activeElement;s&&(!ot||ot===this._document.activeElement||ie.nativeElement.contains(ot))&&this._focusedElementBeforeOpen.focus(),this._focusedElementBeforeOpen=null,this._destroyOverlay()})}s?setTimeout(d):d()}_applyPendingSelection(){this._componentRef?.instance?._applyPendingSelection()}_forwardContentValues(s){s.datepicker=this,s.color=this.color,s._dialogLabelId=this.datepickerInput.getOverlayLabelId(),s._assignActions(this._actionsPortal,!1)}_openOverlay(){this._destroyOverlay();const s=this.touchUi,d=new Wn.C5(To,this._viewContainerRef),k=this._overlayRef=this._overlay.create(new en.X_({positionStrategy:s?this._getDialogStrategy():this._getDropdownStrategy(),hasBackdrop:!0,backdropClass:[s?"cdk-overlay-dark-backdrop":"mat-overlay-transparent-backdrop",this._backdropHarnessClass],direction:this._dir,scrollStrategy:s?this._overlay.scrollStrategies.block():this._scrollStrategy(),panelClass:"mat-datepicker-"+(s?"dialog":"popup")}));this._getCloseStream(k).subscribe(ie=>{ie&&ie.preventDefault(),this.close()}),k.keydownEvents().subscribe(ie=>{const ot=ie.keyCode;(ot===St.LH||ot===St.JH||ot===St.oh||ot===St.SV||ot===St.Ku||ot===St.VM)&&ie.preventDefault()}),this._componentRef=k.attach(d),this._forwardContentValues(this._componentRef.instance),s||this._ngZone.onStable.pipe((0,ye.q)(1)).subscribe(()=>k.updatePosition())}_destroyOverlay(){this._overlayRef&&(this._overlayRef.dispose(),this._overlayRef=this._componentRef=null)}_getDialogStrategy(){return this._overlay.position().global().centerHorizontally().centerVertically()}_getDropdownStrategy(){const s=this._overlay.position().flexibleConnectedTo(this.datepickerInput.getConnectedOverlayOrigin()).withTransformOriginOn(".mat-datepicker-content").withFlexibleDimensions(!1).withViewportMargin(8).withLockedPosition();return this._setConnectedPositions(s)}_setConnectedPositions(s){const d="end"===this.xPosition?"end":"start",k="start"===d?"end":"start",ie="above"===this.yPosition?"bottom":"top",ot="top"===ie?"bottom":"top";return s.withPositions([{originX:d,originY:ot,overlayX:d,overlayY:ie},{originX:d,originY:ie,overlayX:d,overlayY:ot},{originX:k,originY:ot,overlayX:k,overlayY:ie},{originX:k,originY:ie,overlayX:k,overlayY:ot}])}_getCloseStream(s){const d=["ctrlKey","shiftKey","metaKey"];return(0,ue.T)(s.backdropClick(),s.detachments(),s.keydownEvents().pipe((0,ve.h)(k=>k.keyCode===St.hY&&!(0,St.Vb)(k)||this.datepickerInput&&(0,St.Vb)(k,"altKey")&&k.keyCode===St.LH&&d.every(ie=>!(0,St.Vb)(k,ie)))))}}Ao.\u0275fac=function(s){return new(s||Ao)(e.Y36(en.aV),e.Y36(e.R0b),e.Y36(e.s_b),e.Y36(ro),e.Y36(gn._A,8),e.Y36(Pt.Is,8),e.Y36(Ts))},Ao.\u0275dir=e.lG2({type:Ao,inputs:{calendarHeaderComponent:"calendarHeaderComponent",startAt:"startAt",startView:"startView",color:"color",touchUi:"touchUi",disabled:"disabled",xPosition:"xPosition",yPosition:"yPosition",restoreFocus:"restoreFocus",dateClass:"dateClass",panelClass:"panelClass",opened:"opened"},outputs:{yearSelected:"yearSelected",monthSelected:"monthSelected",viewChanged:"viewChanged",openedStream:"opened",closedStream:"closed"},features:[e.TTD]});class Ha extends Ao{}Ha.\u0275fac=function(){let H;return function(d){return(H||(H=e.n5z(Ha)))(d||Ha)}}(),Ha.\u0275cmp=e.Xpm({type:Ha,selectors:[["mat-datepicker"]],exportAs:["matDatepicker"],features:[e._Bn([al,{provide:Ao,useExisting:Ha}]),e.qOj],decls:0,vars:0,template:function(s,d){},encapsulation:2,changeDetection:0});class Ho{constructor(s,d){this.target=s,this.targetElement=d,this.value=this.target.value}}class Ra{get value(){return this._model?this._getValueFromModel(this._model.selection):this._pendingValue}set value(s){this._assignValueProgrammatically(s)}get disabled(){return!!this._disabled||this._parentDisabled()}set disabled(s){const d=(0,Ln.Ig)(s),k=this._elementRef.nativeElement;this._disabled!==d&&(this._disabled=d,this.stateChanges.next(void 0)),d&&this._isInitialized&&k.blur&&k.blur()}_getValidators(){return[this._parseValidator,this._minValidator,this._maxValidator,this._filterValidator]}_registerModel(s){this._model=s,this._valueChangesSubscription.unsubscribe(),this._pendingValue&&this._assignValue(this._pendingValue),this._valueChangesSubscription=this._model.selectionChanged.subscribe(d=>{if(this._shouldHandleChangeEvent(d)){const k=this._getValueFromModel(d.selection);this._lastValueValid=this._isValidValue(k),this._cvaOnChange(k),this._onTouched(),this._formatValue(k),this.dateInput.emit(new Ho(this,this._elementRef.nativeElement)),this.dateChange.emit(new Ho(this,this._elementRef.nativeElement))}})}constructor(s,d,k){this._elementRef=s,this._dateAdapter=d,this._dateFormats=k,this.dateChange=new e.vpe,this.dateInput=new e.vpe,this.stateChanges=new l.x,this._onTouched=()=>{},this._validatorOnChange=()=>{},this._cvaOnChange=()=>{},this._valueChangesSubscription=Qt.w0.EMPTY,this._localeSubscription=Qt.w0.EMPTY,this._parseValidator=()=>this._lastValueValid?null:{matDatepickerParse:{text:this._elementRef.nativeElement.value}},this._filterValidator=ie=>{const ot=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(ie.value));return!ot||this._matchesFilter(ot)?null:{matDatepickerFilter:!0}},this._minValidator=ie=>{const ot=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(ie.value)),Cn=this._getMinDate();return!Cn||!ot||this._dateAdapter.compareDate(Cn,ot)<=0?null:{matDatepickerMin:{min:Cn,actual:ot}}},this._maxValidator=ie=>{const ot=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(ie.value)),Cn=this._getMaxDate();return!Cn||!ot||this._dateAdapter.compareDate(Cn,ot)>=0?null:{matDatepickerMax:{max:Cn,actual:ot}}},this._lastValueValid=!1,this._localeSubscription=d.localeChanges.subscribe(()=>{this._assignValueProgrammatically(this.value)})}ngAfterViewInit(){this._isInitialized=!0}ngOnChanges(s){ba(s,this._dateAdapter)&&this.stateChanges.next(void 0)}ngOnDestroy(){this._valueChangesSubscription.unsubscribe(),this._localeSubscription.unsubscribe(),this.stateChanges.complete()}registerOnValidatorChange(s){this._validatorOnChange=s}validate(s){return this._validator?this._validator(s):null}writeValue(s){this._assignValueProgrammatically(s)}registerOnChange(s){this._cvaOnChange=s}registerOnTouched(s){this._onTouched=s}setDisabledState(s){this.disabled=s}_onKeydown(s){(0,St.Vb)(s,"altKey")&&s.keyCode===St.JH&&["ctrlKey","shiftKey","metaKey"].every(ie=>!(0,St.Vb)(s,ie))&&!this._elementRef.nativeElement.readOnly&&(this._openPopup(),s.preventDefault())}_onInput(s){const d=this._lastValueValid;let k=this._dateAdapter.parse(s,this._dateFormats.parse.dateInput);this._lastValueValid=this._isValidValue(k),k=this._dateAdapter.getValidDateOrNull(k);const ie=!this._dateAdapter.sameDate(k,this.value);!k||ie?this._cvaOnChange(k):(s&&!this.value&&this._cvaOnChange(k),d!==this._lastValueValid&&this._validatorOnChange()),ie&&(this._assignValue(k),this.dateInput.emit(new Ho(this,this._elementRef.nativeElement)))}_onChange(){this.dateChange.emit(new Ho(this,this._elementRef.nativeElement))}_onBlur(){this.value&&this._formatValue(this.value),this._onTouched()}_formatValue(s){this._elementRef.nativeElement.value=null!=s?this._dateAdapter.format(s,this._dateFormats.display.dateInput):""}_assignValue(s){this._model?(this._assignValueToModel(s),this._pendingValue=null):this._pendingValue=s}_isValidValue(s){return!s||this._dateAdapter.isValid(s)}_parentDisabled(){return!1}_assignValueProgrammatically(s){s=this._dateAdapter.deserialize(s),this._lastValueValid=this._isValidValue(s),s=this._dateAdapter.getValidDateOrNull(s),this._assignValue(s),this._formatValue(s)}_matchesFilter(s){const d=this._getDateFilter();return!d||d(s)}}function ba(H,s){const d=Object.keys(H);for(let k of d){const{previousValue:ie,currentValue:ot}=H[k];if(!s.isDateInstance(ie)||!s.isDateInstance(ot))return!0;if(!s.sameDate(ie,ot))return!0}return!1}Ra.\u0275fac=function(s){return new(s||Ra)(e.Y36(e.SBq),e.Y36(gn._A,8),e.Y36(gn.sG,8))},Ra.\u0275dir=e.lG2({type:Ra,inputs:{value:"value",disabled:"disabled"},outputs:{dateChange:"dateChange",dateInput:"dateInput"},features:[e.TTD]});const Jt={provide:Ve.JU,useExisting:(0,e.Gpc)(()=>bt),multi:!0},De={provide:Ve.Cf,useExisting:(0,e.Gpc)(()=>bt),multi:!0};class bt extends Ra{set matDatepicker(s){s&&(this._datepicker=s,this._closedSubscription=s.closedStream.subscribe(()=>this._onTouched()),this._registerModel(s.registerInput(this)))}get min(){return this._min}set min(s){const d=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(s));this._dateAdapter.sameDate(d,this._min)||(this._min=d,this._validatorOnChange())}get max(){return this._max}set max(s){const d=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(s));this._dateAdapter.sameDate(d,this._max)||(this._max=d,this._validatorOnChange())}get dateFilter(){return this._dateFilter}set dateFilter(s){const d=this._matchesFilter(this.value);this._dateFilter=s,this._matchesFilter(this.value)!==d&&this._validatorOnChange()}constructor(s,d,k,ie){super(s,d,k),this._formField=ie,this._closedSubscription=Qt.w0.EMPTY,this._validator=Ve.kI.compose(super._getValidators())}getConnectedOverlayOrigin(){return this._formField?this._formField.getConnectedOverlayOrigin():this._elementRef}getOverlayLabelId(){return this._formField?this._formField.getLabelId():this._elementRef.nativeElement.getAttribute("aria-labelledby")}getThemePalette(){return this._formField?this._formField.color:void 0}getStartValue(){return this.value}ngOnDestroy(){super.ngOnDestroy(),this._closedSubscription.unsubscribe()}_openPopup(){this._datepicker&&this._datepicker.open()}_getValueFromModel(s){return s}_assignValueToModel(s){this._model&&this._model.updateSelection(s,this)}_getMinDate(){return this._min}_getMaxDate(){return this._max}_getDateFilter(){return this._dateFilter}_shouldHandleChangeEvent(s){return s.source!==this}}bt.\u0275fac=function(s){return new(s||bt)(e.Y36(e.SBq),e.Y36(gn._A,8),e.Y36(gn.sG,8),e.Y36(ii.G_,8))},bt.\u0275dir=e.lG2({type:bt,selectors:[["input","matDatepicker",""]],hostAttrs:[1,"mat-datepicker-input"],hostVars:6,hostBindings:function(s,d){1&s&&e.NdJ("input",function(ie){return d._onInput(ie.target.value)})("change",function(){return d._onChange()})("blur",function(){return d._onBlur()})("keydown",function(ie){return d._onKeydown(ie)}),2&s&&(e.Ikx("disabled",d.disabled),e.uIk("aria-haspopup",d._datepicker?"dialog":null)("aria-owns",(null==d._datepicker?null:d._datepicker.opened)&&d._datepicker.id||null)("min",d.min?d._dateAdapter.toIso8601(d.min):null)("max",d.max?d._dateAdapter.toIso8601(d.max):null)("data-mat-calendar",d._datepicker?d._datepicker.id:null))},inputs:{matDatepicker:"matDatepicker",min:"min",max:"max",dateFilter:["matDatepickerFilter","dateFilter"]},exportAs:["matDatepickerInput"],features:[e._Bn([Jt,De,{provide:hi.Jk,useExisting:bt}]),e.qOj]});class Xt{}Xt.\u0275fac=function(s){return new(s||Xt)},Xt.\u0275dir=e.lG2({type:Xt,selectors:[["","matDatepickerToggleIcon",""]]});class Qi{get disabled(){return void 0===this._disabled&&this.datepicker?this.datepicker.disabled:!!this._disabled}set disabled(s){this._disabled=(0,Ln.Ig)(s)}constructor(s,d,k){this._intl=s,this._changeDetectorRef=d,this._stateChanges=Qt.w0.EMPTY;const ie=Number(k);this.tabIndex=ie||0===ie?ie:null}ngOnChanges(s){s.datepicker&&this._watchStateChanges()}ngOnDestroy(){this._stateChanges.unsubscribe()}ngAfterContentInit(){this._watchStateChanges()}_open(s){this.datepicker&&!this.disabled&&(this.datepicker.open(),s.stopPropagation())}_watchStateChanges(){const s=this.datepicker?this.datepicker.stateChanges:(0,D.of)(),d=this.datepicker&&this.datepicker.datepickerInput?this.datepicker.datepickerInput.stateChanges:(0,D.of)(),k=this.datepicker?(0,ue.T)(this.datepicker.openedStream,this.datepicker.closedStream):(0,D.of)();this._stateChanges.unsubscribe(),this._stateChanges=(0,ue.T)(this._intl.changes,s,d,k).subscribe(()=>this._changeDetectorRef.markForCheck())}}function Kt(H){return Ki(H,!0)}function Fe(H){return H.nodeType===Node.ELEMENT_NODE}function Ki(H,s){if(Fe(H)&&s){const k=(H.getAttribute?.("aria-labelledby")?.split(/\s+/g)||[]).reduce((ie,ot)=>{const Cn=document.getElementById(ot);return Cn&&ie.push(Cn),ie},[]);if(k.length)return k.map(ie=>Ki(ie,!1)).join(" ")}if(Fe(H)){const d=H.getAttribute("aria-label")?.trim();if(d)return d}if(function Wt(H){return"INPUT"===H.nodeName}(H)||function yi(H){return"TEXTAREA"===H.nodeName}(H)){if(H.labels?.length)return Array.from(H.labels).map(ie=>Ki(ie,!1)).join(" ");const d=H.getAttribute("placeholder")?.trim();if(d)return d;const k=H.getAttribute("title")?.trim();if(k)return k}return(H.textContent||"").replace(/\s+/g," ").trim()}Qi.\u0275fac=function(s){return new(s||Qi)(e.Y36(ur),e.Y36(e.sBO),e.$8M("tabindex"))},Qi.\u0275cmp=e.Xpm({type:Qi,selectors:[["mat-datepicker-toggle"]],contentQueries:function(s,d,k){if(1&s&&e.Suo(k,Xt,5),2&s){let ie;e.iGM(ie=e.CRH())&&(d._customIcon=ie.first)}},viewQuery:function(s,d){if(1&s&&e.Gf(ts,5),2&s){let k;e.iGM(k=e.CRH())&&(d._button=k.first)}},hostAttrs:[1,"mat-datepicker-toggle"],hostVars:8,hostBindings:function(s,d){1&s&&e.NdJ("click",function(ie){return d._open(ie)}),2&s&&(e.uIk("tabindex",null)("data-mat-calendar",d.datepicker?d.datepicker.id:null),e.ekj("mat-datepicker-toggle-active",d.datepicker&&d.datepicker.opened)("mat-accent",d.datepicker&&"accent"===d.datepicker.color)("mat-warn",d.datepicker&&"warn"===d.datepicker.color))},inputs:{datepicker:["for","datepicker"],tabIndex:"tabIndex",ariaLabel:["aria-label","ariaLabel"],disabled:"disabled",disableRipple:"disableRipple"},exportAs:["matDatepickerToggle"],features:[e.TTD],ngContentSelectors:["[matDatepickerToggleIcon]"],decls:4,vars:6,consts:[["mat-icon-button","","type","button",3,"disabled","disableRipple"],["button",""],["class","mat-datepicker-toggle-default-icon","viewBox","0 0 24 24","width","24px","height","24px","fill","currentColor","focusable","false",4,"ngIf"],["viewBox","0 0 24 24","width","24px","height","24px","fill","currentColor","focusable","false",1,"mat-datepicker-toggle-default-icon"],["d","M19 3h-1V1h-2v2H8V1H6v2H5c-1.11 0-1.99.9-1.99 2L3 19c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H5V8h14v11zM7 10h5v5H7z"]],template:function(s,d){1&s&&(e.F$t(tc),e.TgZ(0,"button",0,1),e.YNc(2,gs,2,0,"svg",2),e.Hsn(3),e.qZA()),2&s&&(e.Q6J("disabled",d.disabled)("disableRipple",d.disableRipple),e.uIk("aria-haspopup",d.datepicker?"dialog":null)("aria-label",d.ariaLabel||d._intl.openCalendarLabel)("tabindex",d.disabled?-1:d.tabIndex),e.xp6(2),e.Q6J("ngIf",!d._customIcon))},dependencies:[Et.O5,at.RK],styles:[".mat-datepicker-toggle{pointer-events:auto}.cdk-high-contrast-active .mat-datepicker-toggle-default-icon{color:CanvasText}"],encapsulation:2,changeDetection:0});const ya=new e.OlP("MAT_DATE_RANGE_INPUT_PARENT");class Na extends Ra{constructor(s,d,k,ie,ot,Cn,ir,Yo){super(d,ir,Yo),this._rangeInput=s,this._elementRef=d,this._defaultErrorStateMatcher=k,this._injector=ie,this._parentForm=ot,this._parentFormGroup=Cn,this._dir=(0,e.f3M)(Pt.Is,{optional:!0})}ngOnInit(){const s=this._injector.get(Ve.a5,null,{optional:!0,self:!0});s&&(this.ngControl=s)}ngDoCheck(){this.ngControl&&this.updateErrorState()}isEmpty(){return 0===this._elementRef.nativeElement.value.length}_getPlaceholder(){return this._elementRef.nativeElement.placeholder}focus(){this._elementRef.nativeElement.focus()}getMirrorValue(){const s=this._elementRef.nativeElement,d=s.value;return d.length>0?d:s.placeholder}_onInput(s){super._onInput(s),this._rangeInput._handleChildValueChange()}_openPopup(){this._rangeInput._openDatepicker()}_getMinDate(){return this._rangeInput.min}_getMaxDate(){return this._rangeInput.max}_getDateFilter(){return this._rangeInput.dateFilter}_parentDisabled(){return this._rangeInput._groupDisabled}_shouldHandleChangeEvent({source:s}){return s!==this._rangeInput._startInput&&s!==this._rangeInput._endInput}_assignValueProgrammatically(s){super._assignValueProgrammatically(s),(this===this._rangeInput._startInput?this._rangeInput._endInput:this._rangeInput._startInput)?._validatorOnChange()}_getAccessibleName(){return Kt(this._elementRef.nativeElement)}}Na.\u0275fac=function(s){return new(s||Na)(e.Y36(ya),e.Y36(e.SBq),e.Y36(gn.rD),e.Y36(e.zs3),e.Y36(Ve.F,8),e.Y36(Ve.sg,8),e.Y36(gn._A,8),e.Y36(gn.sG,8))},Na.\u0275dir=e.lG2({type:Na,features:[e.qOj]});const qi=(0,gn.FD)(Na);class ia extends qi{constructor(s,d,k,ie,ot,Cn,ir,Yo){super(s,d,k,ie,ot,Cn,ir,Yo),this._startValidator=tl=>{const bc=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(tl.value)),np=this._model?this._model.selection.end:null;return!bc||!np||this._dateAdapter.compareDate(bc,np)<=0?null:{matStartDateInvalid:{end:np,actual:bc}}},this._validator=Ve.kI.compose([...super._getValidators(),this._startValidator])}_getValueFromModel(s){return s.start}_shouldHandleChangeEvent(s){return!!super._shouldHandleChangeEvent(s)&&(s.oldValue?.start?!s.selection.start||!!this._dateAdapter.compareDate(s.oldValue.start,s.selection.start):!!s.selection.start)}_assignValueToModel(s){if(this._model){const d=new $r(s,this._model.selection.end);this._model.updateSelection(d,this)}}_formatValue(s){super._formatValue(s),this._rangeInput._handleChildValueChange()}_onKeydown(s){const d=this._rangeInput._endInput,k=this._elementRef.nativeElement,ie="rtl"!==this._dir?.value;(s.keyCode===St.SV&&ie||s.keyCode===St.oh&&!ie)&&k.selectionStart===k.value.length&&k.selectionEnd===k.value.length?(s.preventDefault(),d._elementRef.nativeElement.setSelectionRange(0,0),d.focus()):super._onKeydown(s)}}ia.\u0275fac=function(s){return new(s||ia)(e.Y36(ya),e.Y36(e.SBq),e.Y36(gn.rD),e.Y36(e.zs3),e.Y36(Ve.F,8),e.Y36(Ve.sg,8),e.Y36(gn._A,8),e.Y36(gn.sG,8))},ia.\u0275dir=e.lG2({type:ia,selectors:[["input","matStartDate",""]],hostAttrs:["type","text",1,"mat-start-date","mat-date-range-input-inner"],hostVars:5,hostBindings:function(s,d){1&s&&e.NdJ("input",function(ie){return d._onInput(ie.target.value)})("change",function(){return d._onChange()})("keydown",function(ie){return d._onKeydown(ie)})("blur",function(){return d._onBlur()}),2&s&&(e.Ikx("disabled",d.disabled),e.uIk("aria-haspopup",d._rangeInput.rangePicker?"dialog":null)("aria-owns",(null==d._rangeInput.rangePicker?null:d._rangeInput.rangePicker.opened)&&d._rangeInput.rangePicker.id||null)("min",d._getMinDate()?d._dateAdapter.toIso8601(d._getMinDate()):null)("max",d._getMaxDate()?d._dateAdapter.toIso8601(d._getMaxDate()):null))},inputs:{errorStateMatcher:"errorStateMatcher"},outputs:{dateChange:"dateChange",dateInput:"dateInput"},features:[e._Bn([{provide:Ve.JU,useExisting:ia,multi:!0},{provide:Ve.Cf,useExisting:ia,multi:!0}]),e.qOj]});class $o extends qi{constructor(s,d,k,ie,ot,Cn,ir,Yo){super(s,d,k,ie,ot,Cn,ir,Yo),this._endValidator=tl=>{const bc=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(tl.value)),np=this._model?this._model.selection.start:null;return!bc||!np||this._dateAdapter.compareDate(bc,np)>=0?null:{matEndDateInvalid:{start:np,actual:bc}}},this._validator=Ve.kI.compose([...super._getValidators(),this._endValidator])}_getValueFromModel(s){return s.end}_shouldHandleChangeEvent(s){return!!super._shouldHandleChangeEvent(s)&&(s.oldValue?.end?!s.selection.end||!!this._dateAdapter.compareDate(s.oldValue.end,s.selection.end):!!s.selection.end)}_assignValueToModel(s){if(this._model){const d=new $r(this._model.selection.start,s);this._model.updateSelection(d,this)}}_onKeydown(s){const d=this._rangeInput._startInput,k=this._elementRef.nativeElement,ie="rtl"!==this._dir?.value;if(s.keyCode!==St.ZH||k.value)if((s.keyCode===St.oh&&ie||s.keyCode===St.SV&&!ie)&&0===k.selectionStart&&0===k.selectionEnd){s.preventDefault();const ot=d._elementRef.nativeElement.value.length;d._elementRef.nativeElement.setSelectionRange(ot,ot),d.focus()}else super._onKeydown(s);else d.focus()}}$o.\u0275fac=function(s){return new(s||$o)(e.Y36(ya),e.Y36(e.SBq),e.Y36(gn.rD),e.Y36(e.zs3),e.Y36(Ve.F,8),e.Y36(Ve.sg,8),e.Y36(gn._A,8),e.Y36(gn.sG,8))},$o.\u0275dir=e.lG2({type:$o,selectors:[["input","matEndDate",""]],hostAttrs:["type","text",1,"mat-end-date","mat-date-range-input-inner"],hostVars:5,hostBindings:function(s,d){1&s&&e.NdJ("input",function(ie){return d._onInput(ie.target.value)})("change",function(){return d._onChange()})("keydown",function(ie){return d._onKeydown(ie)})("blur",function(){return d._onBlur()}),2&s&&(e.Ikx("disabled",d.disabled),e.uIk("aria-haspopup",d._rangeInput.rangePicker?"dialog":null)("aria-owns",(null==d._rangeInput.rangePicker?null:d._rangeInput.rangePicker.opened)&&d._rangeInput.rangePicker.id||null)("min",d._getMinDate()?d._dateAdapter.toIso8601(d._getMinDate()):null)("max",d._getMaxDate()?d._dateAdapter.toIso8601(d._getMaxDate()):null))},inputs:{errorStateMatcher:"errorStateMatcher"},outputs:{dateChange:"dateChange",dateInput:"dateInput"},features:[e._Bn([{provide:Ve.JU,useExisting:$o,multi:!0},{provide:Ve.Cf,useExisting:$o,multi:!0}]),e.qOj]});let su=0;class Us{get value(){return this._model?this._model.selection:null}get shouldLabelFloat(){return this.focused||!this.empty}get placeholder(){const s=this._startInput?._getPlaceholder()||"",d=this._endInput?._getPlaceholder()||"";return s||d?`${s} ${this.separator} ${d}`:""}get rangePicker(){return this._rangePicker}set rangePicker(s){s&&(this._model=s.registerInput(this),this._rangePicker=s,this._closedSubscription.unsubscribe(),this._closedSubscription=s.closedStream.subscribe(()=>{this._startInput?._onTouched(),this._endInput?._onTouched()}),this._registerModel(this._model))}get required(){return this._required??(this._isTargetRequired(this)||this._isTargetRequired(this._startInput)||this._isTargetRequired(this._endInput))??!1}set required(s){this._required=(0,Ln.Ig)(s)}get dateFilter(){return this._dateFilter}set dateFilter(s){const d=this._startInput,k=this._endInput,ie=d&&d._matchesFilter(d.value),ot=k&&k._matchesFilter(d.value);this._dateFilter=s,d&&d._matchesFilter(d.value)!==ie&&d._validatorOnChange(),k&&k._matchesFilter(k.value)!==ot&&k._validatorOnChange()}get min(){return this._min}set min(s){const d=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(s));this._dateAdapter.sameDate(d,this._min)||(this._min=d,this._revalidate())}get max(){return this._max}set max(s){const d=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(s));this._dateAdapter.sameDate(d,this._max)||(this._max=d,this._revalidate())}get disabled(){return this._startInput&&this._endInput?this._startInput.disabled&&this._endInput.disabled:this._groupDisabled}set disabled(s){const d=(0,Ln.Ig)(s);d!==this._groupDisabled&&(this._groupDisabled=d,this.stateChanges.next(void 0))}get errorState(){return!(!this._startInput||!this._endInput)&&(this._startInput.errorState||this._endInput.errorState)}get empty(){const s=!!this._startInput&&this._startInput.isEmpty(),d=!!this._endInput&&this._endInput.isEmpty();return s&&d}constructor(s,d,k,ie,ot){this._changeDetectorRef=s,this._elementRef=d,this._dateAdapter=ie,this._formField=ot,this._closedSubscription=Qt.w0.EMPTY,this.id="mat-date-range-input-"+su++,this.focused=!1,this.controlType="mat-date-range-input",this._groupDisabled=!1,this._ariaDescribedBy=null,this.separator="\u2013",this.comparisonStart=null,this.comparisonEnd=null,this.stateChanges=new l.x,ot?._elementRef.nativeElement.classList.contains("mat-mdc-form-field")&&d.nativeElement.classList.add("mat-mdc-input-element","mat-mdc-form-field-input-control","mdc-text-field__input"),this.ngControl=k}setDescribedByIds(s){this._ariaDescribedBy=s.length?s.join(" "):null}onContainerClick(){!this.focused&&!this.disabled&&(this._model&&this._model.selection.start?this._endInput.focus():this._startInput.focus())}ngAfterContentInit(){this._model&&this._registerModel(this._model),(0,ue.T)(this._startInput.stateChanges,this._endInput.stateChanges).subscribe(()=>{this.stateChanges.next(void 0)})}ngOnChanges(s){ba(s,this._dateAdapter)&&this.stateChanges.next(void 0)}ngOnDestroy(){this._closedSubscription.unsubscribe(),this.stateChanges.complete()}getStartValue(){return this.value?this.value.start:null}getThemePalette(){return this._formField?this._formField.color:void 0}getConnectedOverlayOrigin(){return this._formField?this._formField.getConnectedOverlayOrigin():this._elementRef}getOverlayLabelId(){return this._formField?this._formField.getLabelId():null}_getInputMirrorValue(s){const d="start"===s?this._startInput:this._endInput;return d?d.getMirrorValue():""}_shouldHidePlaceholders(){return!!this._startInput&&!this._startInput.isEmpty()}_handleChildValueChange(){this.stateChanges.next(void 0),this._changeDetectorRef.markForCheck()}_openDatepicker(){this._rangePicker&&this._rangePicker.open()}_shouldHideSeparator(){return(!this._formField||this._formField.getLabelId()&&!this._formField._shouldLabelFloat())&&this.empty}_getAriaLabelledby(){const s=this._formField;return s&&s._hasFloatingLabel()?s._labelId:null}_getStartDateAccessibleName(){return this._startInput._getAccessibleName()}_getEndDateAccessibleName(){return this._endInput._getAccessibleName()}_updateFocus(s){this.focused=null!==s,this.stateChanges.next()}_revalidate(){this._startInput&&this._startInput._validatorOnChange(),this._endInput&&this._endInput._validatorOnChange()}_registerModel(s){this._startInput&&this._startInput._registerModel(s),this._endInput&&this._endInput._registerModel(s)}_isTargetRequired(s){return s?.ngControl?.control?.hasValidator(Ve.kI.required)}}Us.\u0275fac=function(s){return new(s||Us)(e.Y36(e.sBO),e.Y36(e.SBq),e.Y36(Ve.gN,10),e.Y36(gn._A,8),e.Y36(ii.G_,8))},Us.\u0275cmp=e.Xpm({type:Us,selectors:[["mat-date-range-input"]],contentQueries:function(s,d,k){if(1&s&&(e.Suo(k,ia,5),e.Suo(k,$o,5)),2&s){let ie;e.iGM(ie=e.CRH())&&(d._startInput=ie.first),e.iGM(ie=e.CRH())&&(d._endInput=ie.first)}},hostAttrs:["role","group",1,"mat-date-range-input"],hostVars:8,hostBindings:function(s,d){2&s&&(e.uIk("id",d.id)("aria-labelledby",d._getAriaLabelledby())("aria-describedby",d._ariaDescribedBy)("data-mat-calendar",d.rangePicker?d.rangePicker.id:null),e.ekj("mat-date-range-input-hide-placeholders",d._shouldHidePlaceholders())("mat-date-range-input-required",d.required))},inputs:{rangePicker:"rangePicker",required:"required",dateFilter:"dateFilter",min:"min",max:"max",disabled:"disabled",separator:"separator",comparisonStart:"comparisonStart",comparisonEnd:"comparisonEnd"},exportAs:["matDateRangeInput"],features:[e._Bn([{provide:ii.Eo,useExisting:Us},{provide:ya,useExisting:Us}]),e.TTD],ngContentSelectors:["input[matStartDate]","input[matEndDate]"],decls:11,vars:5,consts:[["cdkMonitorSubtreeFocus","",1,"mat-date-range-input-container",3,"cdkFocusChange"],[1,"mat-date-range-input-wrapper"],["aria-hidden","true",1,"mat-date-range-input-mirror"],[1,"mat-date-range-input-separator"],[1,"mat-date-range-input-wrapper","mat-date-range-input-end-wrapper"]],template:function(s,d){1&s&&(e.F$t(ln),e.TgZ(0,"div",0),e.NdJ("cdkFocusChange",function(ie){return d._updateFocus(ie)}),e.TgZ(1,"div",1),e.Hsn(2),e.TgZ(3,"span",2),e._uU(4),e.qZA()(),e.TgZ(5,"span",3),e._uU(6),e.qZA(),e.TgZ(7,"div",4),e.Hsn(8,1),e.TgZ(9,"span",2),e._uU(10),e.qZA()()()),2&s&&(e.xp6(4),e.Oqu(d._getInputMirrorValue("start")),e.xp6(1),e.ekj("mat-date-range-input-separator-hidden",d._shouldHideSeparator()),e.xp6(1),e.Oqu(d.separator),e.xp6(4),e.Oqu(d._getInputMirrorValue("end")))},dependencies:[Fr.kH],styles:[".mat-date-range-input{display:block;width:100%}.mat-date-range-input-container{display:flex;align-items:center}.mat-date-range-input-separator{transition:opacity 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1);margin:0 4px}._mat-animation-noopable .mat-date-range-input-separator{transition:none}.mat-date-range-input-separator-hidden{-webkit-user-select:none;user-select:none;opacity:0;transition:none}.mat-date-range-input-wrapper{position:relative;overflow:hidden;max-width:calc(50% - 4px)}.mat-date-range-input-end-wrapper{flex-grow:1}.mat-date-range-input-inner{position:absolute;top:0;left:0;font:inherit;background:rgba(0,0,0,0);color:currentColor;border:none;outline:none;padding:0;margin:0;vertical-align:bottom;text-align:inherit;-webkit-appearance:none;width:100%;height:100%}.mat-date-range-input-inner:-moz-ui-invalid{box-shadow:none}.mat-date-range-input-inner::placeholder{transition:color 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-date-range-input-inner::-moz-placeholder{transition:color 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-date-range-input-inner::-webkit-input-placeholder{transition:color 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-date-range-input-inner:-ms-input-placeholder{transition:color 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-form-field-hide-placeholder .mat-date-range-input-inner::placeholder,.mat-date-range-input-hide-placeholders .mat-date-range-input-inner::placeholder{-webkit-user-select:none;user-select:none;color:rgba(0,0,0,0) !important;-webkit-text-fill-color:rgba(0,0,0,0);transition:none}.cdk-high-contrast-active .mat-form-field-hide-placeholder .mat-date-range-input-inner::placeholder,.cdk-high-contrast-active .mat-date-range-input-hide-placeholders .mat-date-range-input-inner::placeholder{opacity:0}.mat-form-field-hide-placeholder .mat-date-range-input-inner::-moz-placeholder,.mat-date-range-input-hide-placeholders .mat-date-range-input-inner::-moz-placeholder{-webkit-user-select:none;user-select:none;color:rgba(0,0,0,0) !important;-webkit-text-fill-color:rgba(0,0,0,0);transition:none}.cdk-high-contrast-active .mat-form-field-hide-placeholder .mat-date-range-input-inner::-moz-placeholder,.cdk-high-contrast-active .mat-date-range-input-hide-placeholders .mat-date-range-input-inner::-moz-placeholder{opacity:0}.mat-form-field-hide-placeholder .mat-date-range-input-inner::-webkit-input-placeholder,.mat-date-range-input-hide-placeholders .mat-date-range-input-inner::-webkit-input-placeholder{-webkit-user-select:none;user-select:none;color:rgba(0,0,0,0) !important;-webkit-text-fill-color:rgba(0,0,0,0);transition:none}.cdk-high-contrast-active .mat-form-field-hide-placeholder .mat-date-range-input-inner::-webkit-input-placeholder,.cdk-high-contrast-active .mat-date-range-input-hide-placeholders .mat-date-range-input-inner::-webkit-input-placeholder{opacity:0}.mat-form-field-hide-placeholder .mat-date-range-input-inner:-ms-input-placeholder,.mat-date-range-input-hide-placeholders .mat-date-range-input-inner:-ms-input-placeholder{-webkit-user-select:none;user-select:none;color:rgba(0,0,0,0) !important;-webkit-text-fill-color:rgba(0,0,0,0);transition:none}.cdk-high-contrast-active .mat-form-field-hide-placeholder .mat-date-range-input-inner:-ms-input-placeholder,.cdk-high-contrast-active .mat-date-range-input-hide-placeholders .mat-date-range-input-inner:-ms-input-placeholder{opacity:0}._mat-animation-noopable .mat-date-range-input-inner::placeholder{transition:none}._mat-animation-noopable .mat-date-range-input-inner::-moz-placeholder{transition:none}._mat-animation-noopable .mat-date-range-input-inner::-webkit-input-placeholder{transition:none}._mat-animation-noopable .mat-date-range-input-inner:-ms-input-placeholder{transition:none}.mat-date-range-input-mirror{-webkit-user-select:none;user-select:none;visibility:hidden;white-space:nowrap;display:inline-block;min-width:2px}.mat-mdc-form-field-type-mat-date-range-input .mat-mdc-form-field-infix{width:200px}"],encapsulation:2,changeDetection:0});class Ka extends Ao{_forwardContentValues(s){super._forwardContentValues(s);const d=this.datepickerInput;d&&(s.comparisonStart=d.comparisonStart,s.comparisonEnd=d.comparisonEnd,s.startDateAccessibleName=d._getStartDateAccessibleName(),s.endDateAccessibleName=d._getEndDateAccessibleName())}}Ka.\u0275fac=function(){let H;return function(d){return(H||(H=e.n5z(Ka)))(d||Ka)}}(),Ka.\u0275cmp=e.Xpm({type:Ka,selectors:[["mat-date-range-picker"]],exportAs:["matDateRangePicker"],features:[e._Bn([tn,vr,{provide:Ao,useExisting:Ka}]),e.qOj],decls:0,vars:0,template:function(s,d){},encapsulation:2,changeDetection:0});class Tc{constructor(s){this._datepicker=s}_applySelection(){this._datepicker._applyPendingSelection(),this._datepicker.close()}}Tc.\u0275fac=function(s){return new(s||Tc)(e.Y36(Ao))},Tc.\u0275dir=e.lG2({type:Tc,selectors:[["","matDatepickerApply",""],["","matDateRangePickerApply",""]],hostBindings:function(s,d){1&s&&e.NdJ("click",function(){return d._applySelection()})}});class Qs{constructor(s){this._datepicker=s}}Qs.\u0275fac=function(s){return new(s||Qs)(e.Y36(Ao))},Qs.\u0275dir=e.lG2({type:Qs,selectors:[["","matDatepickerCancel",""],["","matDateRangePickerCancel",""]],hostBindings:function(s,d){1&s&&e.NdJ("click",function(){return d._datepicker.close()})}});class vu{constructor(s,d){this._datepicker=s,this._viewContainerRef=d}ngAfterViewInit(){this._portal=new Wn.UE(this._template,this._viewContainerRef),this._datepicker.registerActions(this._portal)}ngOnDestroy(){this._datepicker.removeActions(this._portal),this._portal&&this._portal.isAttached&&this._portal?.detach()}}vu.\u0275fac=function(s){return new(s||vu)(e.Y36(Ao),e.Y36(e.s_b))},vu.\u0275cmp=e.Xpm({type:vu,selectors:[["mat-datepicker-actions"],["mat-date-range-picker-actions"]],viewQuery:function(s,d){if(1&s&&e.Gf(e.Rgc,5),2&s){let k;e.iGM(k=e.CRH())&&(d._template=k.first)}},ngContentSelectors:to,decls:1,vars:0,consts:[[1,"mat-datepicker-actions"]],template:function(s,d){1&s&&(e.F$t(),e.YNc(0,Di,2,0,"ng-template"))},styles:[".mat-datepicker-actions{display:flex;justify-content:flex-end;align-items:center;padding:0 8px 8px 8px}.mat-datepicker-actions .mat-mdc-button-base+.mat-mdc-button-base{margin-left:8px}[dir=rtl] .mat-datepicker-actions .mat-mdc-button-base+.mat-mdc-button-base{margin-left:0;margin-right:8px}"],encapsulation:2,changeDetection:0});class hl{}hl.\u0275fac=function(s){return new(s||hl)},hl.\u0275mod=e.oAB({type:hl}),hl.\u0275inj=e.cJS({providers:[ur,ho],imports:[Et.ez,at.ot,en.U8,Fr.rt,Wn.eL,gn.BQ,It.ZD]});var Wl=p(90093),rs=(p(84306),p(35642),p(54797),p(14219),p(40944),p(77743),p(66827),p(95017)),Pc=p(59798),ks=p(30671),Ol=p(11481),_c=p(45191);class Yc extends gn._A{constructor(s){super(),this._delegate=s}getValidDateOrNull(s){return this.isDateInstance(s)&&this.isValid(s)?s:null}compareDatetime(s,d,k=!0){return this.compareDate(s,d)||this.getHour(s)-this.getHour(d)||k&&this.getMinute(s)-this.getMinute(d)}sameDatetime(s,d){if(s&&d){const k=this.isValid(s),ie=this.isValid(d);return k&&ie?!this.compareDatetime(s,d):k===ie}return s===d}sameYear(s,d){return s&&d&&this.getYear(s)===this.getYear(d)}sameDay(s,d){return s&&d&&this.getDate(s)===this.getDate(d)&&this.sameMonthAndYear(s,d)}sameHour(s,d){return s&&d&&this.getHour(s)===this.getHour(d)&&this.sameDay(s,d)}sameMinute(s,d){return s&&d&&this.getMinute(s)===this.getMinute(d)&&this.sameHour(s,d)}sameMonthAndYear(s,d){if(s&&d){const k=this.isValid(s),ie=this.isValid(d);return k&&ie?!(this.getYear(s)-this.getYear(d)||this.getMonth(s)-this.getMonth(d)):k===ie}return s===d}clone(s){return this._delegate.clone(s)}addCalendarYears(s,d){return this._delegate.addCalendarYears(s,d)}addCalendarMonths(s,d){return this._delegate.addCalendarMonths(s,d)}addCalendarDays(s,d){return this._delegate.addCalendarDays(s,d)}getYear(s){return this._delegate.getYear(s)}getMonth(s){return this._delegate.getMonth(s)}getDate(s){return this._delegate.getDate(s)}getDayOfWeek(s){return this._delegate.getDayOfWeek(s)}getMonthNames(s){return this._delegate.getMonthNames(s)}getDateNames(){return this._delegate.getDateNames()}getDayOfWeekNames(s){return this._delegate.getDayOfWeekNames(s)}getYearName(s){return this._delegate.getYearName(s)}getFirstDayOfWeek(){return this._delegate.getFirstDayOfWeek()}getNumDaysInMonth(s){return this._delegate.getNumDaysInMonth(s)}createDate(s,d,k){return this._delegate.createDate(s,d,k)}today(){return this._delegate.today()}parse(s,d){return this._delegate.parse(s,d)}format(s,d){return this._delegate.format(s,d)}toIso8601(s){return this._delegate.toIso8601(s)}isDateInstance(s){return this._delegate.isDateInstance(s)}isValid(s){return this._delegate.isValid(s)}invalid(){return this._delegate.invalid()}clampDate(s,d,k){return d&&this.compareDatetime(s,d)<0?d:k&&this.compareDatetime(s,k)>0?k:s}}const lu=new e.OlP("mtx-datetime-formats"),ac=kd(24,H=>String(H)),bd=kd(60,H=>String(H));function kd(H,s){const d=Array(H);for(let k=0;k<H;k++)d[k]=s(k);return d}class Oc extends Yc{constructor(s,d){super(d),this.setLocale(s)}clone(s){return this.createDatetime(this.getYear(s),this.getMonth(s),this.getDate(s),this.getHour(s),this.getMinute(s))}getHour(s){return s.getHours()}getMinute(s){return s.getMinutes()}isInNextMonth(s,d){const k=this.getDateInNextMonth(s);return this.sameMonthAndYear(k,d)}createDatetime(s,d,k,ie,ot){if(d<0||d>11)throw Error(`Invalid month index "${d}". Month index has to be between 0 and 11.`);if(k<1)throw Error(`Invalid date "${k}". Date has to be greater than 0.`);if(ie<0||ie>23)throw Error(`Invalid hour "${ie}". Hour has to be between 0 and 23.`);if(ot<0||ot>59)throw Error(`Invalid minute "${ot}". Minute has to be between 0 and 59.`);const Cn=this._createDateWithOverflow(s,d,k,ie,ot);if(Cn.getMonth()!==d)throw Error(`Invalid date "${k}" for month with index "${d}".`);return Cn}getFirstDateOfMonth(s){const d=new Date;return d.setFullYear(s.getFullYear(),s.getMonth(),1),d}getHourNames(){return ac}getMinuteNames(){return bd}addCalendarYears(s,d){return this.addCalendarMonths(s,12*d)}addCalendarMonths(s,d){let k=this._createDateWithOverflow(this.getYear(s),this.getMonth(s)+d,this.getDate(s),this.getHour(s),this.getMinute(s));return this.getMonth(k)!==((this.getMonth(s)+d)%12+12)%12&&(k=this._createDateWithOverflow(this.getYear(k),this.getMonth(k),0,this.getHour(s),this.getMinute(s))),k}addCalendarDays(s,d){return this._createDateWithOverflow(this.getYear(s),this.getMonth(s),this.getDate(s)+d,this.getHour(s),this.getMinute(s))}addCalendarHours(s,d){return this._createDateWithOverflow(this.getYear(s),this.getMonth(s),this.getDate(s),this.getHour(s)+d,this.getMinute(s))}addCalendarMinutes(s,d){return this._createDateWithOverflow(this.getYear(s),this.getMonth(s),this.getDate(s),this.getHour(s),this.getMinute(s)+d)}toIso8601(s){return super.toIso8601(s)+"T"+[this._2digit(s.getUTCHours()),this._2digit(s.getUTCMinutes())].join(":")}getDateInNextMonth(s){return new Date(s.getFullYear(),s.getMonth()+1,1,s.getHours(),s.getMinutes())}_stripDirectionalityCharacters(s){return s.replace(/[\u200e\u200f]/g,"")}_2digit(s){return("00"+s).slice(-2)}_createDateWithOverflow(s,d,k,ie,ot){const Cn=new Date(s,d,k,ie,ot);return s>=0&&s<100&&Cn.setFullYear(this.getYear(Cn)-1900),Cn}}Oc.\u0275fac=function(s){return new(s||Oc)(e.LFG(gn.Ad,8),e.LFG(gn._A))},Oc.\u0275prov=e.Yz7({token:Oc,factory:Oc.\u0275fac});class Dr{}Dr.\u0275fac=function(s){return new(s||Dr)},Dr.\u0275mod=e.oAB({type:Dr}),Dr.\u0275inj=e.cJS({providers:[{provide:Yc,useClass:Oc}],imports:[gn.Dn]});class kr{}kr.\u0275fac=function(s){return new(s||kr)},kr.\u0275mod=e.oAB({type:kr}),kr.\u0275inj=e.cJS({providers:[{provide:lu,useValue:{parse:{},display:{dateInput:{year:"numeric",month:"2-digit",day:"2-digit"},monthInput:{month:"long"},datetimeInput:{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"},timeInput:{hour:"2-digit",minute:"2-digit"},monthYearLabel:{year:"numeric",month:"short"},dateA11yLabel:{year:"numeric",month:"long",day:"numeric"},monthYearA11yLabel:{year:"numeric",month:"long"},popupHeaderDateLabel:{weekday:"short",month:"short",day:"2-digit"}}}}],imports:[Dr,gn.XK]});class Qo{transform(s){return(0,_c.b)(s)?s:(0,D.of)(s)}}Qo.\u0275fac=function(s){return new(s||Qo)},Qo.\u0275pipe=e.Yjl({name:"toObservable",type:Qo,pure:!0});class oo{transform(s){return s instanceof e.Rgc}}oo.\u0275fac=function(s){return new(s||oo)},oo.\u0275pipe=e.Yjl({name:"isTemplateRef",type:oo,pure:!0});class da{}da.\u0275fac=function(s){return new(s||da)},da.\u0275mod=e.oAB({type:da}),da.\u0275inj=e.cJS({imports:[Et.ez]});function Ia(H,s){if(1&H&&(e.TgZ(0,"tr",2)(1,"td",3),e._uU(2),e.qZA()()),2&H){const d=e.oxw();e.xp6(1),e.uIk("colspan",d.numCols),e.xp6(1),e.Oqu(d.label)}}function cc(H,s){if(1&H&&(e.TgZ(0,"td",7),e._uU(1),e.qZA()),2&H){const d=e.oxw(2);e.uIk("colspan",d._firstRowOffset),e.xp6(1),e.hij(" ",d._firstRowOffset>=d.labelMinRequiredCells?d.label:""," ")}}function Rs(H,s){if(1&H){const d=e.EpF();e.TgZ(0,"td",8),e.NdJ("click",function(){const ot=e.CHM(d).$implicit,Cn=e.oxw(2);return e.KtG(Cn._cellClicked(ot))}),e.TgZ(1,"div",9),e._uU(2),e.qZA()()}if(2&H){const d=s.$implicit,k=s.index,ie=e.oxw().index,ot=e.oxw();e.ekj("mtx-calendar-body-active",ot._isActiveCell(ie,k))("mtx-calendar-body-disabled",!d.enabled),e.Q6J("tabindex",ot._isActiveCell(ie,k)?0:-1),e.uIk("data-mat-row",ie)("data-mat-col",k)("aria-label",d.ariaLabel)("aria-disabled",!d.enabled||null),e.xp6(1),e.ekj("mtx-calendar-body-selected",ot.selectedValue===d.value)("mtx-calendar-body-today",ot.todayValue===d.value),e.uIk("aria-selected",ot.selectedValue===d.value),e.xp6(1),e.hij(" ",d.displayValue," ")}}function xc(H,s){if(1&H&&(e.TgZ(0,"tr",4),e.YNc(1,cc,2,2,"td",5),e.YNc(2,Rs,3,15,"td",6),e.qZA()),2&H){const d=s.$implicit,k=s.index,ie=e.oxw();e.xp6(1),e.Q6J("ngIf",0===k&&ie._firstRowOffset),e.xp6(1),e.Q6J("ngForOf",d)}}function Hc(H,s){if(1&H&&(e.TgZ(0,"div",7),e._uU(1),e.qZA()),2&H){const d=s.$implicit,k=e.oxw();e.Udp("font-size",d.fontSize)("left",d.left+"%")("top",d.top+"%"),e.ekj("mtx-clock-cell-disabled",!d.enabled)("mtx-clock-cell-selected",k._selectedHour===d.value),e.xp6(1),e.Oqu(d.displayValue)}}function lp(H,s){if(1&H&&(e.TgZ(0,"div",7),e._uU(1),e.qZA()),2&H){const d=s.$implicit,k=e.oxw();e.Udp("left",d.left+"%")("top",d.top+"%"),e.ekj("mtx-clock-cell-disabled",!d.enabled)("mtx-clock-cell-selected",k._selectedMinute===d.value),e.xp6(1),e.Oqu(d.displayValue)}}const kp=["hourInput"],Ju=["minuteInput"];function Su(H,s){if(1&H){const d=e.EpF();e.TgZ(0,"div",12)(1,"button",13),e.NdJ("keydown",function(ie){return ie.stopPropagation()})("click",function(){e.CHM(d);const ie=e.oxw();return e.KtG(ie.ampmChange.emit("AM"))}),e._uU(2,"AM"),e.qZA(),e.TgZ(3,"button",14),e.NdJ("keydown",function(ie){return ie.stopPropagation()})("click",function(){e.CHM(d);const ie=e.oxw();return e.KtG(ie.ampmChange.emit("PM"))}),e._uU(4,"PM"),e.qZA()()}if(2&H){const d=e.oxw();e.xp6(1),e.ekj("mtx-time-ampm-active","AM"===d.AMPM),e.xp6(2),e.ekj("mtx-time-ampm-active","PM"===d.AMPM)}}function qs(H,s){if(1&H&&(e.TgZ(0,"th"),e._uU(1),e.qZA()),2&H){const d=s.$implicit;e.uIk("aria-label",d.long),e.xp6(1),e.Oqu(d.narrow)}}function Cd(H,s){1&H&&(e.O4$(),e.TgZ(0,"svg",10),e._UZ(1,"path",11),e.qZA())}function la(H,s){if(1&H){const d=e.EpF();e.TgZ(0,"button",8),e.NdJ("click",function(){e.CHM(d);const ie=e.oxw();return e.KtG(ie._yearClicked())}),e.TgZ(1,"span"),e._uU(2),e.qZA(),e.YNc(3,Cd,2,0,"svg",9),e.qZA()}if(2&H){const d=e.oxw();e.ekj("active","year"===d.currentView||"multi-year"===d.currentView),e.uIk("aria-label",d._yearButtonLabel),e.xp6(2),e.Oqu(d._yearButtonText),e.xp6(1),e.Q6J("ngIf",d.multiYearSelector||"year"===d.type)}}function ht(H,s){if(1&H){const d=e.EpF();e.TgZ(0,"button",15),e.NdJ("click",function(){e.CHM(d);const ie=e.oxw(2);return e.KtG(ie._dateClicked())}),e._uU(1),e.qZA()}if(2&H){const d=e.oxw(2);e.ekj("active","month"===d.currentView)("not-clickable","month"===d.type),e.uIk("aria-label",d._dateButtonLabel),e.xp6(1),e.Oqu(d._dateButtonText)}}function Ke(H,s){if(1&H){const d=e.EpF();e.TgZ(0,"span",22)(1,"button",23),e.NdJ("click",function(){e.CHM(d);const ie=e.oxw(3);return e.KtG(ie._ampmClicked("AM"))}),e._uU(2,"AM"),e.qZA(),e.TgZ(3,"button",24),e.NdJ("click",function(){e.CHM(d);const ie=e.oxw(3);return e.KtG(ie._ampmClicked("PM"))}),e._uU(4,"PM"),e.qZA()()}if(2&H){const d=e.oxw(3);e.xp6(1),e.ekj("active","AM"===d._AMPM),e.xp6(2),e.ekj("active","PM"===d._AMPM)}}function dn(H,s){if(1&H){const d=e.EpF();e.TgZ(0,"span",16)(1,"span",17)(2,"button",18),e.NdJ("click",function(){e.CHM(d);const ie=e.oxw(2);return e.KtG(ie._hoursClicked())}),e._uU(3),e.qZA(),e.TgZ(4,"span",19),e._uU(5,":"),e.qZA(),e.TgZ(6,"button",20),e.NdJ("click",function(){e.CHM(d);const ie=e.oxw(2);return e.KtG(ie._minutesClicked())}),e._uU(7),e.qZA()(),e.YNc(8,Ke,5,4,"span",21),e.qZA()}if(2&H){const d=e.oxw(2);e.ekj("active","clock"===d.currentView),e.xp6(2),e.ekj("active","hour"===d._clockView),e.uIk("aria-label",d._hourButtonLabel),e.xp6(1),e.Oqu(d._hoursButtonText),e.xp6(3),e.ekj("active","minute"===d._clockView),e.uIk("aria-label",d._minuteButtonLabel),e.xp6(1),e.Oqu(d._minutesButtonText),e.xp6(1),e.Q6J("ngIf",d.twelvehour)}}function Kn(H,s){if(1&H&&(e.TgZ(0,"div",12),e.YNc(1,ht,2,6,"button",13),e.YNc(2,dn,9,11,"span",14),e.qZA()),2&H){const d=e.oxw();e.xp6(1),e.Q6J("ngIf","time"!==d.type),e.xp6(1),e.Q6J("ngIf",d.type.endsWith("time"))}}function $i(H,s){if(1&H){const d=e.EpF();e.TgZ(0,"div",25)(1,"div",26)(2,"button",27),e.NdJ("click",function(){e.CHM(d);const ie=e.oxw();return e.KtG(ie._previousClicked())}),e.O4$(),e.TgZ(3,"svg",28),e._UZ(4,"path",29),e.qZA()(),e.kcU(),e.TgZ(5,"div",30),e.NdJ("@slideCalendar.done",function(){e.CHM(d);const ie=e.oxw();return e.KtG(ie._calendarStateDone())}),e.TgZ(6,"strong"),e._uU(7),e.qZA()(),e.TgZ(8,"button",31),e.NdJ("click",function(){e.CHM(d);const ie=e.oxw();return e.KtG(ie._nextClicked())}),e.O4$(),e.TgZ(9,"svg",28),e._UZ(10,"path",32),e.qZA()()()()}if(2&H){const d=e.oxw();e.xp6(2),e.ekj("disabled",!d._previousEnabled()),e.uIk("aria-disabled",!d._previousEnabled())("aria-label",d._prevButtonLabel),e.xp6(3),e.Q6J("@slideCalendar",d._calendarState),e.xp6(2),e.Oqu(d._yearPeriodText),e.xp6(1),e.ekj("disabled",!d._nextEnabled()),e.uIk("aria-disabled",!d._nextEnabled())("aria-label",d._nextButtonLabel)}}function sr(H,s){if(1&H){const d=e.EpF();e.TgZ(0,"mtx-month-view",33),e.NdJ("_userSelection",function(){e.CHM(d);const ie=e.oxw();return e.KtG(ie._userSelected())})("selectedChange",function(ie){e.CHM(d);const ot=e.oxw();return e.KtG(ot._dateSelected(ie))}),e.qZA()}if(2&H){const d=e.oxw();e.Q6J("activeDate",d._activeDate)("dateFilter",d._dateFilterForViews)("selected",d.selected)("type",d.type)}}function lo(H,s){if(1&H){const d=e.EpF();e.TgZ(0,"mtx-year-view",33),e.NdJ("_userSelection",function(){e.CHM(d);const ie=e.oxw();return e.KtG(ie._userSelected())})("selectedChange",function(ie){e.CHM(d);const ot=e.oxw();return e.KtG(ot._monthSelected(ie))}),e.qZA()}if(2&H){const d=e.oxw();e.Q6J("activeDate",d._activeDate)("dateFilter",d._dateFilterForViews)("selected",d.selected)("type",d.type)}}function ga(H,s){if(1&H){const d=e.EpF();e.TgZ(0,"mtx-multi-year-view",34),e.NdJ("_userSelection",function(){e.CHM(d);const ie=e.oxw();return e.KtG(ie._userSelected())})("selectedChange",function(ie){e.CHM(d);const ot=e.oxw();return e.KtG(ot._yearSelected(ie))}),e.qZA()}if(2&H){const d=e.oxw();e.Q6J("activeDate",d._activeDate)("dateFilter",d._dateFilterForViews)("maxDate",d.maxDate)("minDate",d.minDate)("selected",d.selected)("type",d.type)}}function Zs(H,s){if(1&H){const d=e.EpF();e.TgZ(0,"mtx-time",37),e.NdJ("_userSelection",function(){e.CHM(d);const ie=e.oxw(2);return e.KtG(ie._userSelected())})("activeDateChange",function(ie){e.CHM(d);const ot=e.oxw(2);return e.KtG(ot._onActiveDateChange(ie))})("selectedChange",function(ie){e.CHM(d);const ot=e.oxw(2);return e.KtG(ot._timeSelected(ie))})("ampmChange",function(ie){e.CHM(d);const ot=e.oxw(2);return e.KtG(ot._ampmClicked(ie))})("clockViewChange",function(ie){e.CHM(d);const ot=e.oxw(2);return e.KtG(ot._clockView=ie)}),e.qZA()}if(2&H){const d=e.oxw(2);e.Q6J("AMPM",d._AMPM)("clockView",d._clockView)("twelvehour",d.twelvehour)("dateFilter",d.dateFilter)("interval",d.timeInterval)("maxDate",d.maxDate)("minDate",d.minDate)("selected",d._activeDate)}}function Kr(H,s){if(1&H){const d=e.EpF();e.TgZ(0,"mtx-clock",38),e.NdJ("_userSelection",function(){e.CHM(d);const ie=e.oxw(2);return e.KtG(ie._userSelected())})("activeDateChange",function(ie){e.CHM(d);const ot=e.oxw(2);return e.KtG(ot._onActiveDateChange(ie))})("selectedChange",function(ie){e.CHM(d);const ot=e.oxw(2);return e.KtG(ot._dialTimeSelected(ie))}),e.qZA()}if(2&H){const d=e.oxw(2);e.Q6J("AMPM",d._AMPM)("dateFilter",d.dateFilter)("interval",d.timeInterval)("maxDate",d.maxDate)("minDate",d.minDate)("selected",d._activeDate)("startView",d._clockView)("twelvehour",d.twelvehour)}}function os(H,s){if(1&H&&(e.ynx(0),e.YNc(1,Zs,1,8,"mtx-time",35),e.YNc(2,Kr,1,8,"ng-template",null,36,e.W1O),e.BQk()),2&H){const d=e.MAs(3),k=e.oxw();e.xp6(1),e.Q6J("ngIf",k.timeInput)("ngIfElse",d)}}const _s=["button"];function ra(H,s){1&H&&(e.O4$(),e.TgZ(0,"svg",6),e._UZ(1,"path",7),e.qZA())}function _a(H,s){1&H&&(e.O4$(),e.TgZ(0,"svg",6),e._UZ(1,"path",8),e.qZA())}function xl(H,s){1&H&&(e.O4$(),e.TgZ(0,"svg",6),e._UZ(1,"path",9)(2,"path",10),e.qZA())}function $l(H,s){if(1&H&&(e.ynx(0,3),e.YNc(1,ra,2,0,"svg",4),e.YNc(2,_a,2,0,"svg",4),e.YNc(3,xl,3,0,"svg",5),e.BQk()),2&H){const d=e.oxw();e.Q6J("ngSwitch",d.datetimepicker.type),e.xp6(1),e.Q6J("ngSwitchCase","time"),e.xp6(1),e.Q6J("ngSwitchCase","datetime")}}const Os=[[["","mtxDatetimepickerToggleIcon",""]]],Ks={transformPanel:(0,ce.X$)("transformPanel",[(0,ce.eR)("void => enter-dropdown",(0,ce.jt)("120ms cubic-bezier(0, 0, 0.2, 1)",(0,ce.F4)([(0,ce.oB)({opacity:0,transform:"scale(1, 0.8)"}),(0,ce.oB)({opacity:1,transform:"scale(1, 1)"})]))),(0,ce.eR)("void => enter-dialog",(0,ce.jt)("150ms cubic-bezier(0, 0, 0.2, 1)",(0,ce.F4)([(0,ce.oB)({opacity:0,transform:"scale(0.7)"}),(0,ce.oB)({transform:"none",opacity:1})]))),(0,ce.eR)("* => void",(0,ce.jt)("100ms linear",(0,ce.oB)({opacity:0})))]),fadeInCalendar:(0,ce.X$)("fadeInCalendar",[(0,ce.SB)("void",(0,ce.oB)({opacity:0})),(0,ce.SB)("enter",(0,ce.oB)({opacity:1})),(0,ce.eR)("void => *",(0,ce.jt)("120ms 100ms cubic-bezier(0.55, 0, 0.55, 0.2)"))]),slideCalendar:(0,ce.X$)("slideCalendar",[(0,ce.eR)("* => left",[(0,ce.jt)(180,(0,ce.F4)([(0,ce.oB)({transform:"translateX(100%)",offset:.5}),(0,ce.oB)({transform:"translateX(-100%)",offset:.51}),(0,ce.oB)({transform:"translateX(0)",offset:1})]))]),(0,ce.eR)("* => right",[(0,ce.jt)(180,(0,ce.F4)([(0,ce.oB)({transform:"translateX(-100%)",offset:.5}),(0,ce.oB)({transform:"translateX(100%)",offset:.51}),(0,ce.oB)({transform:"translateX(0)",offset:1})]))])])};function _l(H){return Error(`MtxDatetimepicker: No provider found for ${H}. You must import one of the following modules at your application root: MtxNativeDatetimeModule, MtxMomentDatetimeModule, or provide a custom implementation.`)}var Dc,H;(H=Dc||(Dc={}))[H.DATE=0]="DATE",H[H.HOUR=1]="HOUR",H[H.MINUTE=2]="MINUTE";class Gs{constructor(s,d,k,ie){this.value=s,this.displayValue=d,this.ariaLabel=k,this.enabled=ie}}class Ed{constructor(){this.numCols=7,this.allowDisabledSelection=!1,this.activeCell=0,this.selectedValueChange=new e.vpe}get _firstRowOffset(){return this.rows&&this.rows.length&&this.rows[0].length?this.numCols-this.rows[0].length:0}_cellClicked(s){!this.allowDisabledSelection&&!s.enabled||this.selectedValueChange.emit(s.value)}_isActiveCell(s,d){let k=s*this.numCols+d;return s&&(k-=this._firstRowOffset),k===this.activeCell}}Ed.\u0275fac=function(s){return new(s||Ed)},Ed.\u0275cmp=e.Xpm({type:Ed,selectors:[["","mtx-calendar-body",""]],hostAttrs:[1,"mtx-calendar-body"],inputs:{label:"label",rows:"rows",todayValue:"todayValue",selectedValue:"selectedValue",labelMinRequiredCells:"labelMinRequiredCells",numCols:"numCols",allowDisabledSelection:"allowDisabledSelection",activeCell:"activeCell"},outputs:{selectedValueChange:"selectedValueChange"},exportAs:["mtxCalendarBody"],attrs:["mtx-calendar-body",""],decls:2,vars:2,consts:[["aria-hidden","true",4,"ngIf"],["role","row",4,"ngFor","ngForOf"],["aria-hidden","true"],[1,"mtx-calendar-body-label"],["role","row"],["class","mtx-calendar-body-label","aria-hidden","true",4,"ngIf"],["role","gridcell","class","mtx-calendar-body-cell",3,"mtx-calendar-body-active","mtx-calendar-body-disabled","tabindex","click",4,"ngFor","ngForOf"],["aria-hidden","true",1,"mtx-calendar-body-label"],["role","gridcell",1,"mtx-calendar-body-cell",3,"tabindex","click"],[1,"mtx-calendar-body-cell-content"]],template:function(s,d){1&s&&(e.YNc(0,Ia,3,2,"tr",0),e.YNc(1,xc,3,2,"tr",1)),2&s&&(e.Q6J("ngIf",d._firstRowOffset<d.labelMinRequiredCells),e.xp6(1),e.Q6J("ngForOf",d.rows))},dependencies:[Et.sg,Et.O5],styles:[".mtx-calendar-body{min-width:224px}.mtx-calendar-body-label{height:0;line-height:0;text-align:left;padding:7.1428571429% 4.7142857143%}[dir=rtl] .mtx-calendar-body-label{text-align:right}.mtx-calendar-body-cell{position:relative;width:14.2857142857%;height:0;line-height:0;padding:7.1428571429% 0;text-align:center;outline:none;cursor:pointer}.mtx-calendar-body-disabled{cursor:default;pointer-events:none}.mtx-calendar-body-cell-content{position:absolute;top:5%;left:5%;display:flex;align-items:center;justify-content:center;box-sizing:border-box;width:90%;height:90%;border:1px solid transparent;border-radius:999px}\n"],encapsulation:2,changeDetection:0});const zl=24;class Lc{constructor(s,d){if(this._adapter=s,this._dateFormats=d,this.type="date",this.selectedChange=new e.vpe,this._userSelection=new e.vpe,!this._adapter)throw _l("DatetimeAdapter");if(!this._dateFormats)throw _l("MTX_DATETIME_FORMATS");this._activeDate=this._adapter.today()}get activeDate(){return this._activeDate}set activeDate(s){const d=this._activeDate;this._activeDate=s||this._adapter.today(),d&&this._activeDate&&!Xe(this._adapter,d,this._activeDate,this.minDate,this.maxDate)&&this._init()}get selected(){return this._selected}set selected(s){this._selected=s,this._selectedYear=this._selected&&this._adapter.getYear(this._selected)}get minDate(){return this._minDate}set minDate(s){this._minDate=this._getValidDateOrNull(this._adapter.deserialize(s))}get maxDate(){return this._maxDate}set maxDate(s){this._maxDate=this._getValidDateOrNull(this._adapter.deserialize(s))}ngAfterContentInit(){this._init()}_yearSelected(s){const d=this._adapter.getMonth(this.activeDate),k=this._adapter.createDatetime(s,d,1,0,0);this.selectedChange.emit(this._adapter.createDatetime(s,d,Math.min(this._adapter.getDate(this.activeDate),this._adapter.getNumDaysInMonth(k)),this._adapter.getHour(this.activeDate),this._adapter.getMinute(this.activeDate))),"year"===this.type&&this._userSelection.emit()}_getActiveCell(){return zt(this._adapter,this.activeDate,this.minDate,this.maxDate)}_calendarStateDone(){this._calendarState=""}_init(){this._todayYear=this._adapter.getYear(this._adapter.today()),this._yearLabel=this._adapter.getYearName(this.activeDate);const d=this._adapter.getYear(this.activeDate)-zt(this._adapter,this.activeDate,this.minDate,this.maxDate);this._years=[];for(let k=0,ie=[];k<zl;k++)ie.push(d+k),4===ie.length&&(this._years.push(ie.map(ot=>this._createCellForYear(ot))),ie=[])}_createCellForYear(s){const d=this._adapter.getYearName(this._adapter.createDate(s,0,1));return new Gs(s,d,d,this._shouldEnableYear(s))}_shouldEnableYear(s){if(null==s||this.maxDate&&s>this._adapter.getYear(this.maxDate)||this.minDate&&s<this._adapter.getYear(this.minDate))return!1;if(!this.dateFilter)return!0;for(let k=this._adapter.createDate(s,0,1);this._adapter.getYear(k)===s;k=this._adapter.addCalendarDays(k,1))if(this.dateFilter(k))return!0;return!1}_getYearInCurrentRange(s){const d=this._adapter.getYear(s);return this._isInRange(d)?d:null}_isInRange(s){return!0}_getValidDateOrNull(s){return this._adapter.isDateInstance(s)&&this._adapter.isValid(s)?s:null}}function Xe(H,s,d,k,ie){const ot=H.getYear(s),Cn=H.getYear(d),ir=mn(H,k,ie);return Math.floor((ot-ir)/zl)===Math.floor((Cn-ir)/zl)}function zt(H,s,d,k){return function ni(H,s){return(H%s+s)%s}(H.getYear(s)-mn(H,d,k),zl)}function mn(H,s,d){let k=0;return d?k=H.getYear(d)-zl+1:s&&(k=H.getYear(s)),k}Lc.\u0275fac=function(s){return new(s||Lc)(e.Y36(Yc,8),e.Y36(lu,8))},Lc.\u0275cmp=e.Xpm({type:Lc,selectors:[["mtx-multi-year-view"]],inputs:{type:"type",dateFilter:"dateFilter",activeDate:"activeDate",selected:"selected",minDate:"minDate",maxDate:"maxDate"},outputs:{selectedChange:"selectedChange",_userSelection:"_userSelection"},exportAs:["mtxMultiYearView"],decls:3,vars:7,consts:[["role","grid",1,"mtx-calendar-table"],[1,"mtx-calendar-table-header"],["mtx-calendar-body","",3,"todayValue","rows","numCols","activeCell","allowDisabledSelection","selectedValue","selectedValueChange"]],template:function(s,d){1&s&&(e.TgZ(0,"table",0),e._UZ(1,"thead",1),e.TgZ(2,"tbody",2),e.NdJ("@slideCalendar.done",function(){return d._calendarStateDone()})("selectedValueChange",function(ie){return d._yearSelected(ie)}),e.qZA()()),2&s&&(e.xp6(2),e.Q6J("@slideCalendar",d._calendarState)("todayValue",d._todayYear)("rows",d._years)("numCols",4)("activeCell",d._getActiveCell())("allowDisabledSelection",!0)("selectedValue",d._selectedYear))},dependencies:[Ed],encapsulation:2,data:{animation:[Ks.slideCalendar]},changeDetection:0});class Fi{constructor(){this.changes=new l.x,this.calendarLabel="Calendar",this.openCalendarLabel="Open calendar",this.closeCalendarLabel="Close calendar",this.prevMonthLabel="Previous month",this.nextMonthLabel="Next month",this.prevYearLabel="Previous year",this.nextYearLabel="Next year",this.prevMultiYearLabel="Previous 24 years",this.nextMultiYearLabel="Next 24 years",this.switchToMonthViewLabel="Choose date",this.switchToYearViewLabel="Choose month",this.switchToMultiYearViewLabel="Choose month and year",this.startDateLabel="Start date",this.endDateLabel="End date",this.switchToClockHourViewLabel="Choose hour",this.switchToClockMinuteViewLabel="Choose minute",this.okLabel="OK",this.cancelLabel="Cancel"}formatYearRange(s,d){return`${s} \u2013 ${d}`}formatYearRangeLabel(s,d){return`${s} to ${d}`}}Fi.\u0275fac=function(s){return new(s||Fi)},Fi.\u0275prov=e.Yz7({token:Fi,factory:Fi.\u0275fac,providedIn:"root"});const nr=(0,cn.i$)({passive:!1}),Ca=41.25,Ba=7.0833;class Is{constructor(s,d,k,ie){this._elementRef=s,this._adapter=d,this._changeDetectorRef=k,this._document=ie,this.interval=1,this.twelvehour=!1,this.AMPM="AM",this.selectedChange=new e.vpe,this.activeDateChange=new e.vpe,this._userSelection=new e.vpe,this._hourView=!0,this._hours=[],this._minutes=[],this._timeChanged=!1,this._pointerDown=ot=>{this._timeChanged=!1,this.setTime(ot),this._bindGlobalEvents(ot)},this._pointerMove=ot=>{ot.cancelable&&ot.preventDefault(),this.setTime(ot)},this._pointerUp=ot=>{ot.cancelable&&ot.preventDefault(),this._removeGlobalEvents(),this._timeChanged&&(this.selectedChange.emit(this.activeDate),this._hourView||this._userSelection.emit())}}get activeDate(){return this._activeDate}set activeDate(s){const d=this._activeDate;this._activeDate=this._adapter.clampDate(s,this.minDate,this.maxDate),this._adapter.sameMinute(d,this._activeDate)||this._init()}get selected(){return this._selected}set selected(s){this._selected=this._adapter.getValidDateOrNull(this._adapter.deserialize(s)),this._selected&&(this.activeDate=this._selected)}get minDate(){return this._minDate}set minDate(s){this._minDate=this._adapter.getValidDateOrNull(this._adapter.deserialize(s))}get maxDate(){return this._maxDate}set maxDate(s){this._maxDate=this._adapter.getValidDateOrNull(this._adapter.deserialize(s))}set startView(s){this._hourView="minute"!==s}get _hand(){const s=this._adapter.getHour(this.activeDate);this._selectedHour=s,this._selectedMinute=this._adapter.getMinute(this.activeDate);let d=0,k=Ca;return this._hourView?(k=this._selectedHour>0&&this._selectedHour<13?Ca:27.5,this.twelvehour&&(k=Ca),d=Math.round(30*this._selectedHour)):d=Math.round(6*this._selectedMinute),{height:`${k}%`,marginTop:50-k+"%",transform:`rotate(${d}deg)`}}ngAfterContentInit(){this.activeDate=this._activeDate||this._adapter.today(),this._init()}ngOnDestroy(){this._removeGlobalEvents()}ngOnChanges(){this._init()}_bindGlobalEvents(s){const d=this._document,k=ul(s),ie=k?"touchmove":"mousemove",ot=k?"touchend":"mouseup";d.addEventListener(ie,this._pointerMove,nr),d.addEventListener(ot,this._pointerUp,nr),k&&d.addEventListener("touchcancel",this._pointerUp,nr)}_removeGlobalEvents(){const s=this._document;s.removeEventListener("mousemove",this._pointerMove,nr),s.removeEventListener("mouseup",this._pointerUp,nr),s.removeEventListener("touchmove",this._pointerMove,nr),s.removeEventListener("touchend",this._pointerUp,nr),s.removeEventListener("touchcancel",this._pointerUp,nr)}_init(){this._hours.length=0,this._minutes.length=0;const s=this._adapter.getHourNames(),d=this._adapter.getMinuteNames();if(this.twelvehour){const k=[];for(let ie=0;ie<s.length;ie++){const ot=ie/6*Math.PI,Cn=Ca,ir=ie,Yo=this._adapter.createDatetime(this._adapter.getYear(this.activeDate),this._adapter.getMonth(this.activeDate),this._adapter.getDate(this.activeDate),ir,0),tl=(!this.minDate||this._adapter.compareDatetime(Yo,this.minDate,!1)>=0)&&(!this.maxDate||this._adapter.compareDatetime(Yo,this.maxDate,!1)<=0)&&(!this.dateFilter||this.dateFilter(Yo,Dc.HOUR));k.push({value:ie,displayValue:ie%12==0?"12":s[ie%12],enabled:tl,top:50-Math.cos(ot)*Cn-Ba,left:50+Math.sin(ot)*Cn-Ba})}"AM"===this.AMPM?this._hours=k.filter(ie=>ie.value<12):this._hours=k.filter(ie=>ie.value>=12)}else for(let k=0;k<s.length;k++){const ie=k/6*Math.PI,Cn=k>0&&k<13?Ca:27.5,ir=this._adapter.createDatetime(this._adapter.getYear(this.activeDate),this._adapter.getMonth(this.activeDate),this._adapter.getDate(this.activeDate),k,0),Yo=(!this.minDate||this._adapter.compareDatetime(ir,this.minDate,!1)>=0)&&(!this.maxDate||this._adapter.compareDatetime(ir,this.maxDate,!1)<=0)&&(!this.dateFilter||this.dateFilter(ir,Dc.HOUR));this._hours.push({value:k,displayValue:0===k?"00":s[k],enabled:Yo,top:50-Math.cos(ie)*Cn-Ba,left:50+Math.sin(ie)*Cn-Ba,fontSize:k>0&&k<13?"":"80%"})}for(let k=0;k<d.length;k+=5){const ie=k/30*Math.PI,ot=this._adapter.createDatetime(this._adapter.getYear(this.activeDate),this._adapter.getMonth(this.activeDate),this._adapter.getDate(this.activeDate),this._adapter.getHour(this.activeDate),k),Cn=(!this.minDate||this._adapter.compareDatetime(ot,this.minDate)>=0)&&(!this.maxDate||this._adapter.compareDatetime(ot,this.maxDate)<=0)&&(!this.dateFilter||this.dateFilter(ot,Dc.MINUTE));this._minutes.push({value:k,displayValue:0===k?"00":d[k],enabled:Cn,top:50-Math.cos(ie)*Ca-Ba,left:50+Math.sin(ie)*Ca-Ba})}}setTime(s){const d=this._elementRef.nativeElement,k=d.getBoundingClientRect(),ie=d.offsetWidth,ot=d.offsetHeight,{pageX:Cn,pageY:ir}=function bu(H){let s;return s=ul(H)?H.touches[0]||H.changedTouches[0]:H,s}(s),Yo=ie/2-(Cn-k.left-window.pageXOffset),tl=ot/2-(ir-k.top-window.pageYOffset);let bc=Math.atan2(-Yo,tl);const np=Math.PI/(this._hourView?6:this.interval?30/this.interval:30),Ss=Math.sqrt(Yo*Yo+tl*tl),Xm=this._hourView&&Ss>(.4125*ie+.275*ie)/2;bc<0&&(bc=2*Math.PI+bc);let HC,Du=Math.round(bc/np);this._hourView?(this.twelvehour?Du="AM"===this.AMPM?0===Du?12:Du:12===Du?0:Du+12:(12===Du&&(Du=0),Du=Xm?0===Du?12:Du:0===Du?0:Du+12),HC=this._adapter.createDatetime(this._adapter.getYear(this.activeDate),this._adapter.getMonth(this.activeDate),this._adapter.getDate(this.activeDate),Du,this._adapter.getMinute(this.activeDate))):(this.interval&&(Du*=this.interval),60===Du&&(Du=0),HC=this._adapter.createDatetime(this._adapter.getYear(this.activeDate),this._adapter.getMonth(this.activeDate),this._adapter.getDate(this.activeDate),this._adapter.getHour(this.activeDate),Du)),(!this.dateFilter||this.dateFilter(HC,this._hourView?Dc.HOUR:Dc.MINUTE))&&(this._timeChanged=!0,this.activeDate=HC,this._changeDetectorRef.markForCheck(),this.activeDateChange.emit(this.activeDate))}}function ul(H){return"t"===H.type[0]}function Zd(H,s){for(H=String(H);H.length<s;)H="0"+H;return H}Is.\u0275fac=function(s){return new(s||Is)(e.Y36(e.SBq),e.Y36(Yc),e.Y36(e.sBO),e.Y36(Et.K0))},Is.\u0275cmp=e.Xpm({type:Is,selectors:[["mtx-clock"]],hostAttrs:["role","clock",1,"mtx-clock"],hostBindings:function(s,d){1&s&&e.NdJ("mousedown",function(ie){return d._pointerDown(ie)})("touchstart",function(ie){return d._pointerDown(ie)})},inputs:{dateFilter:"dateFilter",interval:"interval",twelvehour:"twelvehour",AMPM:"AMPM",activeDate:"activeDate",selected:"selected",minDate:"minDate",maxDate:"maxDate",startView:"startView"},outputs:{selectedChange:"selectedChange",activeDateChange:"activeDateChange",_userSelection:"_userSelection"},exportAs:["mtxClock"],features:[e.TTD],decls:7,vars:7,consts:[[1,"mtx-clock-wrapper"],[1,"mtx-clock-center"],[1,"mtx-clock-hand",3,"ngStyle"],[1,"mtx-clock-hours"],["class","mtx-clock-cell",3,"mtx-clock-cell-disabled","mtx-clock-cell-selected","fontSize","left","top",4,"ngFor","ngForOf"],[1,"mtx-clock-minutes"],["class","mtx-clock-cell",3,"mtx-clock-cell-disabled","mtx-clock-cell-selected","left","top",4,"ngFor","ngForOf"],[1,"mtx-clock-cell"]],template:function(s,d){1&s&&(e.TgZ(0,"div",0),e._UZ(1,"div",1)(2,"div",2),e.TgZ(3,"div",3),e.YNc(4,Hc,2,11,"div",4),e.qZA(),e.TgZ(5,"div",5),e.YNc(6,lp,2,9,"div",6),e.qZA()()),2&s&&(e.xp6(2),e.Q6J("ngStyle",d._hand),e.xp6(1),e.ekj("active",d._hourView),e.xp6(1),e.Q6J("ngForOf",d._hours),e.xp6(1),e.ekj("active",!d._hourView),e.xp6(1),e.Q6J("ngForOf",d._minutes))},dependencies:[Et.sg,Et.PC],styles:['.mtx-clock{position:relative;display:block;min-width:224px;margin:12px;box-sizing:border-box;-webkit-user-select:none;user-select:none;touch-action:none}.mtx-clock-wrapper{position:relative;width:100%;height:0;padding-top:100%;border-radius:50%}.mtx-clock-center{position:absolute;top:50%;left:50%;width:2%;height:2%;margin:-1%;border-radius:50%}.mtx-clock-hand{position:absolute;inset:0;width:1px;margin:0 auto;transform-origin:bottom}.mtx-clock-hand:before{content:"";position:absolute;top:-4px;left:-4px;width:8px;height:8px;border-radius:50%}.mtx-clock-hours,.mtx-clock-minutes{position:absolute;top:0;left:0;width:100%;height:100%;opacity:0;visibility:hidden;transition:.35s;transform:scale(1.2)}.mtx-clock-hours.active,.mtx-clock-minutes.active{opacity:1;visibility:visible;transform:scale(1)}.mtx-clock-minutes{transform:scale(.8)}.mtx-clock-cell{position:absolute;display:flex;width:14.1666%;height:14.1666%;justify-content:center;box-sizing:border-box;border-radius:50%;align-items:center;cursor:pointer}.mtx-clock-cell.mtx-clock-cell-disabled{pointer-events:none}\n'],encapsulation:2,changeDetection:0});class Qu{set timeInterval(s){this._interval=(0,Ln.su)(s)}set timeMin(s){this._min=(0,Ln.su)(s)}set timeMax(s){this._max=(0,Ln.su)(s)}set timeValue(s){this._value=(0,Ln.su)(s),this.hasFocus||this.writeValue(this._value),this.writePlaceholder(this._value)}constructor(s,d){this.element=s,this.cdr=d,this._interval=1,this._min=0,this._max=1/0,this.timeValueChanged=new e.vpe,this.keyDownListener=this.keyDownHandler.bind(this),this.keyPressListener=this.keyPressHandler.bind(this),this.inputEventListener=this.inputChangedHandler.bind(this),this.inputElement.addEventListener("keydown",this.keyDownListener,{passive:!0}),this.inputElement.addEventListener("keypress",this.keyPressListener),this.inputElement.addEventListener("input",this.inputEventListener,{passive:!0})}get hasFocus(){return this.element.nativeElement&&this.element?.nativeElement===document?.activeElement}get inputElement(){return this.element.nativeElement}get valid(){return!this._value||(String(this.inputElement.value).length?this._value==this.inputElement.value:this._value==this.inputElement.placeholder)}get invalid(){return!this.valid}blur(){this.writeValue(this._value),this.writePlaceholder(this._value),this.timeValueChanged.emit(this._value)}focus(){this.writeValue("")}writeValue(s){this.inputElement.value=""!==s?Zd(s,2):"",this.cdr.markForCheck()}writePlaceholder(s){this.inputElement.placeholder=Zd(s,2),this.cdr.markForCheck()}keyDownHandler(s){if(String(this.inputElement.value).length>0){let d=null;s.keyCode===St.LH?(d=(0,Ln.su)(this._value),d+=this._interval,s.stopPropagation()):s.keyCode===St.JH&&(d=(0,Ln.su)(this._value),d-=this._interval,s.stopPropagation()),"number"==typeof d&&(this.writeValue(d),this.writePlaceholder(d),this.clampInputValue(),this.timeValueChanged.emit(this._value))}}keyPressHandler(s){const d=s?.key??null;isNaN(Number(d))&&"Enter"!==d&&s.preventDefault()}inputChangedHandler(){this.clampInputValue(),this.timeValueChanged.emit(this._value)}clampInputValue(){if(""===this.inputElement?.value)return;const s=(0,Ln.su)(this.inputElement?.value??null);if(s||0===this._min&&0===s){const d=Math.min(Math.max(s,this._min),this._max);d!==s&&(this.writeValue(d),this.writePlaceholder(d)),this._value=d}}ngOnDestroy(){this.inputElement.removeEventListener("keydown",this.keyDownListener),this.inputElement.removeEventListener("keypress",this.keyPressListener),this.inputElement.removeEventListener("input",this.inputEventListener)}}Qu.\u0275fac=function(s){return new(s||Qu)(e.Y36(e.SBq),e.Y36(e.sBO))},Qu.\u0275dir=e.lG2({type:Qu,selectors:[["input",8,"mtx-time-input"]],hostBindings:function(s,d){1&s&&e.NdJ("blur",function(ie){return d.blur(ie)})("focus",function(ie){return d.focus(ie)})},inputs:{timeInterval:"timeInterval",timeMin:"timeMin",timeMax:"timeMax",timeValue:"timeValue"},outputs:{timeValueChanged:"timeValueChanged"},exportAs:["mtxTimeInput"]});class _t{get twelvehour(){return this._twelvehour}set twelvehour(s){this._twelvehour=(0,Ln.Ig)(s)}get activeDate(){return this._activeDate}set activeDate(s){this._activeDate=this._adapter.clampDate(s,this.minDate,this.maxDate)}get selected(){return this._selected}set selected(s){this._selected=this._adapter.getValidDateOrNull(this._adapter.deserialize(s)),this._selected&&(this.activeDate=this._selected)}get minDate(){return this._minDate}set minDate(s){this._minDate=this._adapter.getValidDateOrNull(this._adapter.deserialize(s))}get maxDate(){return this._maxDate}set maxDate(s){this._maxDate=this._adapter.getValidDateOrNull(this._adapter.deserialize(s))}get clockView(){return this._clockView}set clockView(s){this._clockView=s}get isHourView(){return"hour"===this._clockView}get isMinuteView(){return"hour"===this._clockView}get hour(){if(!this.activeDate)return this.twelvehour?"12":"00";const s=Number(this._adapter.getHour(this.activeDate));return this.twelvehour?0===s?"12":this.prefixWithZero(s>12?s-12:s):this.prefixWithZero(s)}get minute(){return this.activeDate?this.prefixWithZero(this._adapter.getMinute(this.activeDate)):"00"}prefixWithZero(s){return s<10?"0"+String(s):String(s)}constructor(s,d,k){this._adapter=s,this._changeDetectorRef=d,this._datetimepickerIntl=k,this.selectedChange=new e.vpe,this.activeDateChange=new e.vpe,this._userSelection=new e.vpe,this.ampmChange=new e.vpe,this.clockViewChange=new e.vpe,this.interval=1,this._twelvehour=!1,this.AMPM="AM",this._clockView="hour",this.datetimepickerIntlChangesSubscription=this._datetimepickerIntl.changes.subscribe(()=>{this._changeDetectorRef.detectChanges()})}ngOnChanges(s){s.clockView&&s.clockView.currentValue!==s.clockView.previousValue&&this.focusInputElement()}ngAfterViewInit(){this.focusInputElement()}focusInputElement(){"hour"===this.clockView?this.hourInputElement&&this.hourInputElement.nativeElement.focus():this.minuteInputElement&&this.minuteInputElement.nativeElement.focus()}handleHourInputChange(s){const d=(0,Ln.su)(s);if(d||0===d){const k=this._adapter.createDatetime(this._adapter.getYear(this.activeDate),this._adapter.getMonth(this.activeDate),this._adapter.getDate(this.activeDate),this.updateHourForAmPm(d),this._adapter.getMinute(this.activeDate));this._activeDate=this._adapter.clampDate(k,this.minDate,this.maxDate),this.activeDateChange.emit(this.activeDate),this.hourInputDirective&&(this.hourInputDirective.timeValue=this.hour)}}updateHourForAmPm(s){return this.twelvehour?"AM"===this.AMPM?0===s||12===s?0:s:0===s||12===s?12:s+12:s}handleMinuteInputChange(s){const d=(0,Ln.su)(s);if(d||0===d){const k=this._adapter.createDatetime(this._adapter.getYear(this.activeDate),this._adapter.getMonth(this.activeDate),this._adapter.getDate(this.activeDate),this._adapter.getHour(this._activeDate),d);this._activeDate=this._adapter.clampDate(k,this.minDate,this.maxDate),this.activeDateChange.emit(this.activeDate),this.minuteInputDirective&&(this.minuteInputDirective.timeValue=this.minute)}}handleFocus(s){this.clockView=s,this.clockViewChange.emit(s)}_timeSelected(s){"hour"===this.clockView&&(this.clockView="minute"),this._activeDate=this.selected=s}_onActiveDateChange(s){this._activeDate=s,this.activeDateChange.emit(s)}handleOk(){this._selected&&this.selectedChange.emit(this._selected),this._userSelection.emit()}handleCancel(){this._userSelection.emit()}ngOnDestroy(){this.datetimepickerIntlChangesSubscription&&this.datetimepickerIntlChangesSubscription.unsubscribe()}}_t.\u0275fac=function(s){return new(s||_t)(e.Y36(Yc),e.Y36(e.sBO),e.Y36(Fi))},_t.\u0275cmp=e.Xpm({type:_t,selectors:[["mtx-time"]],viewQuery:function(s,d){if(1&s&&(e.Gf(kp,5,e.SBq),e.Gf(kp,5,Qu),e.Gf(Ju,5,e.SBq),e.Gf(Ju,5,Qu)),2&s){let k;e.iGM(k=e.CRH())&&(d.hourInputElement=k.first),e.iGM(k=e.CRH())&&(d.hourInputDirective=k.first),e.iGM(k=e.CRH())&&(d.minuteInputElement=k.first),e.iGM(k=e.CRH())&&(d.minuteInputDirective=k.first)}},hostAttrs:[1,"mtx-time"],inputs:{dateFilter:"dateFilter",interval:"interval",twelvehour:"twelvehour",AMPM:"AMPM",activeDate:"activeDate",selected:"selected",minDate:"minDate",maxDate:"maxDate",clockView:"clockView"},outputs:{selectedChange:"selectedChange",activeDateChange:"activeDateChange",_userSelection:"_userSelection",ampmChange:"ampmChange",clockViewChange:"clockViewChange"},exportAs:["mtxTime"],features:[e.TTD],decls:15,vars:27,consts:[[1,"mtx-time-input-wrapper"],[1,"mtx-time-input-inner"],["type","text","inputmode","numeric","maxlength","2",1,"mtx-time-input",3,"timeMin","timeMax","timeValue","timeValueChanged","focus"],["hourInput","mtxTimeInput"],[1,"mtx-time-seperator"],["type","text","inputmode","numeric","maxlength","2",1,"mtx-time-input",3,"timeMin","timeMax","timeValue","timeInterval","timeValueChanged","focus"],["minuteInput","mtxTimeInput"],["class","mtx-time-ampm",4,"ngIf"],[3,"AMPM","dateFilter","interval","maxDate","minDate","selected","startView","twelvehour","selectedChange","activeDateChange"],[1,"mtx-time-button-wrapper"],["mat-button","","type","button",1,"mtx-time-cancel-button",3,"click"],["mat-button","","type","button",1,"mtx-time-ok-button",3,"disabled","click"],[1,"mtx-time-ampm"],["mat-button","","type","button","aria-label","AM",1,"mtx-time-am",3,"keydown","click"],["mat-button","","type","button","aria-label","PM",1,"mtx-time-pm",3,"keydown","click"]],template:function(s,d){if(1&s&&(e.TgZ(0,"div",0)(1,"div",1)(2,"input",2,3),e.NdJ("timeValueChanged",function(ie){return d.handleHourInputChange(ie)})("focus",function(){return d.handleFocus("hour")}),e.qZA(),e.TgZ(4,"div",4),e._uU(5,":"),e.qZA(),e.TgZ(6,"input",5,6),e.NdJ("timeValueChanged",function(ie){return d.handleMinuteInputChange(ie)})("focus",function(){return d.handleFocus("minute")}),e.qZA(),e.YNc(8,Su,5,4,"div",7),e.qZA()(),e.TgZ(9,"mtx-clock",8),e.NdJ("selectedChange",function(ie){return d._timeSelected(ie)})("activeDateChange",function(ie){return d._onActiveDateChange(ie)}),e.qZA(),e.TgZ(10,"div",9)(11,"button",10),e.NdJ("click",function(){return d.handleCancel()}),e._uU(12),e.qZA(),e.TgZ(13,"button",11),e.NdJ("click",function(){return d.handleOk()}),e._uU(14),e.qZA()()),2&s){const k=e.MAs(3),ie=e.MAs(7);e.xp6(2),e.ekj("mtx-time-input-active","hour"===d.clockView)("mtx-time-input-warning",!k.valid),e.Q6J("timeMin",d.twelvehour?1:0)("timeMax",d.twelvehour?12:23)("timeValue",d.hour),e.xp6(4),e.ekj("mtx-time-input-active","minute"===d.clockView)("mtx-time-input-warning",!ie.valid),e.Q6J("timeMin",0)("timeMax",59)("timeValue",d.minute)("timeInterval",d.interval),e.xp6(2),e.Q6J("ngIf",d.twelvehour),e.xp6(1),e.Q6J("AMPM",d.AMPM)("dateFilter",d.dateFilter)("interval",d.interval)("maxDate",d.maxDate)("minDate",d.minDate)("selected",d.selected)("startView",d.clockView)("twelvehour",d.twelvehour),e.xp6(3),e.hij(" ",d._datetimepickerIntl.cancelLabel," "),e.xp6(1),e.Q6J("disabled",(null==d.minuteInputDirective?null:d.minuteInputDirective.invalid)||(null==d.hourInputDirective?null:d.hourInputDirective.invalid)),e.xp6(1),e.hij(" ",d._datetimepickerIntl.okLabel," ")}},dependencies:[Et.O5,at.lW,Is,Qu],styles:[".mtx-time{display:block;outline:none;-webkit-user-select:none;user-select:none}.mtx-time-input-wrapper{padding:8px 0;text-align:center}.mtx-time-input-inner{display:inline-flex;height:56px}.mtx-time-input{box-sizing:border-box;width:72px;height:100%;padding:0;font-size:36px;text-align:center;border-radius:8px;border:2px solid transparent;-webkit-appearance:none;appearance:none;outline:none}.mtx-time-seperator{display:inline-flex;justify-content:center;align-items:center;width:24px;font-size:36px}.mtx-time-ampm{display:inline-flex;flex-direction:column;margin-left:12px}[dir=rtl] .mtx-time-ampm{margin-left:auto;margin-right:12px}.mtx-time-ampm .mtx-time-am,.mtx-time-ampm .mtx-time-pm{--mdc-typography-button-font-weight: 400;flex:1;width:40px;min-width:auto;border-width:1px;border-style:solid}.mtx-time-ampm .mtx-time-am .mat-mdc-button-touch-target,.mtx-time-ampm .mtx-time-pm .mat-mdc-button-touch-target{height:100%}.mtx-time-ampm .mtx-time-am{border-radius:8px 8px 0 0}.mtx-time-ampm .mtx-time-pm{border-radius:0 0 8px 8px;border-top:none}.mtx-time-button-wrapper{display:flex;justify-content:flex-end;padding-top:8px}.mtx-time-button-wrapper .mat-mdc-button-base+.mat-mdc-button-base{margin-left:8px}[dir=rtl] .mtx-time-button-wrapper .mat-mdc-button-base+.mat-mdc-button-base{margin-left:0;margin-right:8px}\n"],encapsulation:2,changeDetection:0});class W{constructor(s,d){if(this._adapter=s,this._dateFormats=d,this.type="date",this.selectedChange=new e.vpe,this._userSelection=new e.vpe,!this._adapter)throw _l("DatetimeAdapter");if(!this._dateFormats)throw _l("MTX_DATETIME_FORMATS");const k=this._adapter.getFirstDayOfWeek(),ie=this._adapter.getDayOfWeekNames("narrow"),Cn=this._adapter.getDayOfWeekNames("long").map((ir,Yo)=>({long:ir,narrow:ie[Yo]}));this._weekdays=Cn.slice(k).concat(Cn.slice(0,k)),this._activeDate=this._adapter.today()}get activeDate(){return this._activeDate}set activeDate(s){const d=this._activeDate;this._activeDate=s||this._adapter.today(),d&&this._activeDate&&!this._adapter.sameMonthAndYear(d,this._activeDate)&&(this._init(),this._adapter.isInNextMonth(d,this._activeDate)?this.calendarState("right"):this.calendarState("left"))}get selected(){return this._selected}set selected(s){this._selected=s,this._selectedDate=this._getDateInCurrentMonth(this.selected)}ngAfterContentInit(){this._init()}_dateSelected(s){this.selectedChange.emit(this._adapter.createDatetime(this._adapter.getYear(this.activeDate),this._adapter.getMonth(this.activeDate),s,this._adapter.getHour(this.activeDate),this._adapter.getMinute(this.activeDate))),"date"===this.type&&this._userSelection.emit()}_calendarStateDone(){this._calendarState=""}_init(){this._selectedDate=this._getDateInCurrentMonth(this.selected),this._todayDate=this._getDateInCurrentMonth(this._adapter.today());const s=this._adapter.createDatetime(this._adapter.getYear(this.activeDate),this._adapter.getMonth(this.activeDate),1,this._adapter.getHour(this.activeDate),this._adapter.getMinute(this.activeDate));this._firstWeekOffset=(7+this._adapter.getDayOfWeek(s)-this._adapter.getFirstDayOfWeek())%7,this._createWeekCells()}_createWeekCells(){const s=this._adapter.getNumDaysInMonth(this.activeDate),d=this._adapter.getDateNames();this._weeks=[[]];for(let k=0,ie=this._firstWeekOffset;k<s;k++,ie++){7===ie&&(this._weeks.push([]),ie=0);const ot=this._adapter.createDatetime(this._adapter.getYear(this.activeDate),this._adapter.getMonth(this.activeDate),k+1,this._adapter.getHour(this.activeDate),this._adapter.getMinute(this.activeDate)),Cn=!this.dateFilter||this.dateFilter(ot),ir=this._adapter.format(ot,this._dateFormats.display.dateA11yLabel);this._weeks[this._weeks.length-1].push(new Gs(k+1,d[k],ir,Cn))}}_getDateInCurrentMonth(s){return this._adapter.sameMonthAndYear(s,this.activeDate)?this._adapter.getDate(s):null}calendarState(s){this._calendarState=s}}W.\u0275fac=function(s){return new(s||W)(e.Y36(Yc,8),e.Y36(lu,8))},W.\u0275cmp=e.Xpm({type:W,selectors:[["mtx-month-view"]],inputs:{type:"type",dateFilter:"dateFilter",activeDate:"activeDate",selected:"selected"},outputs:{selectedChange:"selectedChange",_userSelection:"_userSelection"},exportAs:["mtxMonthView"],decls:5,vars:6,consts:[["role","grid",1,"mtx-calendar-table"],[1,"mtx-calendar-table-header"],[4,"ngFor","ngForOf"],["mtx-calendar-body","",3,"rows","todayValue","activeCell","selectedValue","selectedValueChange"]],template:function(s,d){1&s&&(e.TgZ(0,"table",0)(1,"thead",1)(2,"tr"),e.YNc(3,qs,2,2,"th",2),e.qZA()(),e.TgZ(4,"tbody",3),e.NdJ("@slideCalendar.done",function(){return d._calendarStateDone()})("selectedValueChange",function(ie){return d._dateSelected(ie)}),e.qZA()()),2&s&&(e.xp6(3),e.Q6J("ngForOf",d._weekdays),e.xp6(1),e.Q6J("@slideCalendar",d._calendarState)("rows",d._weeks)("todayValue",d._todayDate)("activeCell",d._adapter.getDate(d.activeDate)-1)("selectedValue",d._selectedDate))},dependencies:[Et.sg,Ed],encapsulation:2,data:{animation:[Ks.slideCalendar]},changeDetection:0});class dt{constructor(s,d){if(this._adapter=s,this._dateFormats=d,this.type="date",this.selectedChange=new e.vpe,this._userSelection=new e.vpe,!this._adapter)throw _l("DatetimeAdapter");if(!this._dateFormats)throw _l("MTX_DATETIME_FORMATS");this._activeDate=this._adapter.today()}get activeDate(){return this._activeDate}set activeDate(s){const d=this._activeDate;this._activeDate=s||this._adapter.today(),d&&this._activeDate&&!this._adapter.sameYear(d,this._activeDate)&&this._init()}get selected(){return this._selected}set selected(s){this._selected=s,this._selectedMonth=this._getMonthInCurrentYear(this.selected)}ngAfterContentInit(){this._init()}_monthSelected(s){const d=this._adapter.createDatetime(this._adapter.getYear(this.activeDate),s,1,0,0);this.selectedChange.emit(this._adapter.createDatetime(this._adapter.getYear(this.activeDate),s,Math.min(this._adapter.getDate(this.activeDate),this._adapter.getNumDaysInMonth(d)),this._adapter.getHour(this.activeDate),this._adapter.getMinute(this.activeDate))),"month"===this.type&&this._userSelection.emit()}_calendarStateDone(){this._calendarState=""}_init(){this._selectedMonth=this._getMonthInCurrentYear(this.selected),this._todayMonth=this._getMonthInCurrentYear(this._adapter.today()),this._yearLabel=this._adapter.getYearName(this.activeDate);const s=this._adapter.getMonthNames("short");this._months=[[0,1,2,3],[4,5,6,7],[8,9,10,11]].map(d=>d.map(k=>this._createCellForMonth(k,s[k])))}_getMonthInCurrentYear(s){return this._adapter.sameYear(s,this.activeDate)?this._adapter.getMonth(s):null}_createCellForMonth(s,d){const k=this._adapter.format(this._adapter.createDatetime(this._adapter.getYear(this.activeDate),s,1,this._adapter.getHour(this.activeDate),this._adapter.getMinute(this.activeDate)),this._dateFormats.display.monthYearA11yLabel);return new Gs(s,d.toLocaleUpperCase(),k,this._isMonthEnabled(s))}_isMonthEnabled(s){if(!this.dateFilter)return!0;for(let k=this._adapter.createDatetime(this._adapter.getYear(this.activeDate),s,1,this._adapter.getHour(this.activeDate),this._adapter.getMinute(this.activeDate));this._adapter.getMonth(k)===s;k=this._adapter.addCalendarDays(k,1))if(this.dateFilter(k))return!0;return!1}}dt.\u0275fac=function(s){return new(s||dt)(e.Y36(Yc,8),e.Y36(lu,8))},dt.\u0275cmp=e.Xpm({type:dt,selectors:[["mtx-year-view"]],inputs:{type:"type",dateFilter:"dateFilter",activeDate:"activeDate",selected:"selected"},outputs:{selectedChange:"selectedChange",_userSelection:"_userSelection"},exportAs:["mtxYearView"],decls:3,vars:9,consts:[["role","grid",1,"mtx-calendar-table"],[1,"mtx-calendar-table-header"],["mtx-calendar-body","",3,"label","rows","todayValue","labelMinRequiredCells","numCols","activeCell","selectedValue","allowDisabledSelection","selectedValueChange"]],template:function(s,d){1&s&&(e.TgZ(0,"table",0),e._UZ(1,"thead",1),e.TgZ(2,"tbody",2),e.NdJ("@slideCalendar.done",function(){return d._calendarStateDone()})("selectedValueChange",function(ie){return d._monthSelected(ie)}),e.qZA()()),2&s&&(e.xp6(2),e.Q6J("@slideCalendar",d._calendarState)("label",d._yearLabel)("rows",d._months)("todayValue",d._todayMonth)("labelMinRequiredCells",2)("numCols",4)("activeCell",d._adapter.getMonth(d.activeDate))("selectedValue",d._selectedMonth)("allowDisabledSelection",!0))},dependencies:[Ed],encapsulation:2,data:{animation:[Ks.slideCalendar]},changeDetection:0});class fn{get multiYearSelector(){return this._multiYearSelector}set multiYearSelector(s){this._multiYearSelector=(0,Ln.Ig)(s)}get twelvehour(){return this._twelvehour}set twelvehour(s){this._twelvehour=(0,Ln.Ig)(s)}constructor(s,d,k,ie,ot,Cn){if(this._elementRef=s,this._intl=d,this._ngZone=k,this._adapter=ie,this._dateFormats=ot,this._multiYearSelector=!1,this._twelvehour=!1,this.startView="month",this.timeInterval=1,this.preventSameDateTimeSelection=!1,this.selectedChange=new e.vpe,this.viewChanged=new e.vpe,this._userSelection=new e.vpe,this._clockView="hour",this._type="date",this._timeInput=!1,this._dateFilterForViews=ir=>!!ir&&(!this.dateFilter||this.dateFilter(ir,Dc.DATE))&&(!this.minDate||this._adapter.compareDate(ir,this.minDate)>=0)&&(!this.maxDate||this._adapter.compareDate(ir,this.maxDate)<=0),!this._adapter)throw _l("DatetimeAdapter");if(!this._dateFormats)throw _l("MTX_DATETIME_FORMATS");this._intlChanges=d.changes.subscribe(()=>Cn.markForCheck())}get type(){return this._type}set type(s){this._type=s||"date","year"===this.type&&(this.multiYearSelector=!0)}get startAt(){return this._startAt}set startAt(s){this._startAt=this._adapter.getValidDateOrNull(s)}get timeInput(){return this._timeInput}set timeInput(s){this._timeInput=(0,Ln.Ig)(s)}get selected(){return this._selected}set selected(s){this._selected=this._adapter.getValidDateOrNull(s)}get minDate(){return this._minDate}set minDate(s){this._minDate=this._adapter.getValidDateOrNull(s)}get maxDate(){return this._maxDate}set maxDate(s){this._maxDate=this._adapter.getValidDateOrNull(s)}get _activeDate(){return this._clampedActiveDate}set _activeDate(s){const d=this._clampedActiveDate;this._clampedActiveDate=this._adapter.clampDate(s,this.minDate,this.maxDate),this._selectAMPM(this._clampedActiveDate),d&&this._clampedActiveDate&&"month"===this.currentView&&!this._adapter.sameMonthAndYear(d,this._clampedActiveDate)&&(this._adapter.isInNextMonth(d,this._clampedActiveDate)?this.calendarState("right"):this.calendarState("left"))}get currentView(){return this._currentView}set currentView(s){this._currentView=s,this.viewChanged.emit(s)}get _yearPeriodText(){if("multi-year"===this.currentView){const d=this._adapter.getYear(this._activeDate)-zt(this._adapter,this._activeDate,this.minDate,this.maxDate),k=d+zl-1,ie=this._adapter.getYearName(this._adapter.createDate(d,0,1)),ot=this._adapter.getYearName(this._adapter.createDate(k,0,1));return this._intl.formatYearRange(ie,ot)}return"month"===this.currentView?this._adapter.getMonthNames("long")[this._adapter.getMonth(this._activeDate)]:this._adapter.getYearName(this._activeDate)}get _yearButtonText(){return this._adapter.getYearName(this._activeDate)}get _yearButtonLabel(){return this.multiYearSelector?this._intl.switchToMultiYearViewLabel:this._intl.switchToYearViewLabel}get _dateButtonText(){return"month"===this.type?this._adapter.getMonthNames("long")[this._adapter.getMonth(this._activeDate)]:this._adapter.format(this._activeDate,this._dateFormats.display.popupHeaderDateLabel)}get _dateButtonLabel(){return this._intl.switchToMonthViewLabel}get _hoursButtonText(){let s=this._adapter.getHour(this._activeDate);return this.twelvehour&&(0===s&&(s=24),s=s>12?s-12:s),this._2digit(s)}get _hourButtonLabel(){return this._intl.switchToClockHourViewLabel}get _minutesButtonText(){return this._2digit(this._adapter.getMinute(this._activeDate))}get _minuteButtonLabel(){return this._intl.switchToClockMinuteViewLabel}get _prevButtonLabel(){switch(this._currentView){case"month":return this._intl.prevMonthLabel;case"year":return this._intl.prevYearLabel;case"multi-year":return this._intl.prevMultiYearLabel;default:return""}}get _nextButtonLabel(){switch(this._currentView){case"month":return this._intl.nextMonthLabel;case"year":return this._intl.nextYearLabel;case"multi-year":return this._intl.nextMultiYearLabel;default:return""}}_userSelected(){this._userSelection.emit()}ngAfterContentInit(){this._activeDate=this.startAt||this._adapter.today(),this._selectAMPM(this._activeDate),"year"===this.type?this.currentView="multi-year":"month"===this.type?this.currentView="year":"time"===this.type?this.currentView="clock":this.currentView=this.startView||"month"}ngOnDestroy(){this._intlChanges.unsubscribe()}_dateSelected(s){"date"===this.type?(!this._adapter.sameDate(s,this.selected)||!this.preventSameDateTimeSelection)&&this.selectedChange.emit(s):(this._activeDate=s,this.currentView="clock")}_monthSelected(s){"month"===this.type?(!this._adapter.sameMonthAndYear(s,this.selected)||!this.preventSameDateTimeSelection)&&this.selectedChange.emit(this._adapter.getFirstDateOfMonth(s)):(this._activeDate=s,this.currentView="month",this._clockView="hour")}_yearSelected(s){if("year"===this.type){if(!this._adapter.sameYear(s,this.selected)||!this.preventSameDateTimeSelection){const d=this._adapter.createDatetime(this._adapter.getYear(s),0,1,0,0);this.selectedChange.emit(d)}}else this._activeDate=s,this.currentView="year"}_timeSelected(s){this._activeDate=this._updateDate(s),(!this._adapter.sameDatetime(s,this.selected)||!this.preventSameDateTimeSelection)&&this.selectedChange.emit(s)}_dialTimeSelected(s){"minute"!==this._clockView?(this._activeDate=this._updateDate(s),this._clockView="minute"):(!this._adapter.sameDatetime(s,this.selected)||!this.preventSameDateTimeSelection)&&this.selectedChange.emit(s)}_onActiveDateChange(s){this._activeDate=s}_updateDate(s){if(this.twelvehour)if(12===this._adapter.getHour(s)){if("AM"===this._AMPM)return this._adapter.addCalendarHours(s,-12)}else if("PM"===this._AMPM)return this._adapter.addCalendarHours(s,12);return s}_selectAMPM(s){this._adapter.getHour(s)>11?this._AMPM="PM":this._AMPM="AM"}_ampmClicked(s){if(this._currentView="clock",s===this._AMPM)return;const d=this._adapter.getHour(this._activeDate);let k;k="AM"===s?d>=12?this._adapter.getHour(this._activeDate)-12:12:(d+12)%24;const ie=this._adapter.clampDate(this._adapter.createDatetime(this._adapter.getYear(this._activeDate),this._adapter.getMonth(this._activeDate),this._adapter.getDate(this._activeDate),k,this._adapter.getMinute(this._activeDate)),this.minDate,this.maxDate);this._adapter.getHour(ie)===k&&(this._activeDate=ie,this._AMPM=s)}_yearClicked(){"year"===this.type||this.multiYearSelector?this.currentView="multi-year":this.currentView="year"}_dateClicked(){"month"!==this.type&&(this.currentView="month")}_hoursClicked(){this.currentView="clock",this._clockView="hour"}_minutesClicked(){this.currentView="clock",this._clockView="minute"}_previousClicked(){this._activeDate="month"===this.currentView?this._adapter.addCalendarMonths(this._activeDate,-1):this._adapter.addCalendarYears(this._activeDate,"year"===this.currentView?-1:-zl)}_nextClicked(){this._activeDate="month"===this.currentView?this._adapter.addCalendarMonths(this._activeDate,1):this._adapter.addCalendarYears(this._activeDate,"year"===this.currentView?1:zl)}_previousEnabled(){return!this.minDate||(!this.minDate||!this._isSameView(this._activeDate,this.minDate))}_nextEnabled(){return!this.maxDate||!this._isSameView(this._activeDate,this.maxDate)}_handleCalendarBodyKeydown(s){"month"===this.currentView?this._handleCalendarBodyKeydownInMonthView(s):"year"===this.currentView?this._handleCalendarBodyKeydownInYearView(s):"multi-year"===this.currentView?this._handleCalendarBodyKeydownInMultiYearView(s):this._handleCalendarBodyKeydownInClockView(s)}_focusActiveCell(){this._ngZone.runOutsideAngular(()=>{this._ngZone.onStable.asObservable().pipe((0,nt.P)()).subscribe(()=>{this._elementRef.nativeElement.focus()})})}_calendarStateDone(){this._calendarState=""}_isSameView(s,d){return"month"===this.currentView?this._adapter.getYear(s)===this._adapter.getYear(d)&&this._adapter.getMonth(s)===this._adapter.getMonth(d):"year"===this.currentView?this._adapter.getYear(s)===this._adapter.getYear(d):Xe(this._adapter,s,d,this.minDate,this.maxDate)}_handleCalendarBodyKeydownInMonthView(s){switch(s.keyCode){case St.oh:this._activeDate=this._adapter.addCalendarDays(this._activeDate,-1);break;case St.SV:this._activeDate=this._adapter.addCalendarDays(this._activeDate,1);break;case St.LH:this._activeDate=this._adapter.addCalendarDays(this._activeDate,-7);break;case St.JH:this._activeDate=this._adapter.addCalendarDays(this._activeDate,7);break;case St.Sd:this._activeDate=this._adapter.addCalendarDays(this._activeDate,1-this._adapter.getDate(this._activeDate));break;case St.uR:this._activeDate=this._adapter.addCalendarDays(this._activeDate,this._adapter.getNumDaysInMonth(this._activeDate)-this._adapter.getDate(this._activeDate));break;case St.Ku:this._activeDate=s.altKey?this._adapter.addCalendarYears(this._activeDate,-1):this._adapter.addCalendarMonths(this._activeDate,-1);break;case St.VM:this._activeDate=s.altKey?this._adapter.addCalendarYears(this._activeDate,1):this._adapter.addCalendarMonths(this._activeDate,1);break;case St.K5:return void(this._dateFilterForViews(this._activeDate)&&(this._dateSelected(this._activeDate),s.preventDefault()));default:return}s.preventDefault()}_handleCalendarBodyKeydownInYearView(s){switch(s.keyCode){case St.oh:this._activeDate=this._adapter.addCalendarMonths(this._activeDate,-1);break;case St.SV:this._activeDate=this._adapter.addCalendarMonths(this._activeDate,1);break;case St.LH:this._activeDate=this._prevMonthInSameCol(this._activeDate);break;case St.JH:this._activeDate=this._nextMonthInSameCol(this._activeDate);break;case St.Sd:this._activeDate=this._adapter.addCalendarMonths(this._activeDate,-this._adapter.getMonth(this._activeDate));break;case St.uR:this._activeDate=this._adapter.addCalendarMonths(this._activeDate,11-this._adapter.getMonth(this._activeDate));break;case St.Ku:this._activeDate=this._adapter.addCalendarYears(this._activeDate,s.altKey?-10:-1);break;case St.VM:this._activeDate=this._adapter.addCalendarYears(this._activeDate,s.altKey?10:1);break;case St.K5:this._monthSelected(this._activeDate);break;default:return}s.preventDefault()}_handleCalendarBodyKeydownInMultiYearView(s){switch(s.keyCode){case St.oh:this._activeDate=this._adapter.addCalendarYears(this._activeDate,-1);break;case St.SV:this._activeDate=this._adapter.addCalendarYears(this._activeDate,1);break;case St.LH:this._activeDate=this._adapter.addCalendarYears(this._activeDate,-4);break;case St.JH:this._activeDate=this._adapter.addCalendarYears(this._activeDate,4);break;case St.Sd:this._activeDate=this._adapter.addCalendarYears(this._activeDate,-zt(this._adapter,this._activeDate,this.minDate,this.maxDate));break;case St.uR:this._activeDate=this._adapter.addCalendarYears(this._activeDate,zl-zt(this._adapter,this._activeDate,this.minDate,this.maxDate)-1);break;case St.Ku:this._activeDate=this._adapter.addCalendarYears(this._activeDate,s.altKey?10*-zl:-zl);break;case St.VM:this._activeDate=this._adapter.addCalendarYears(this._activeDate,s.altKey?10*zl:zl);break;case St.K5:this._yearSelected(this._activeDate);break;default:return}}_handleCalendarBodyKeydownInClockView(s){switch(s.keyCode){case St.LH:this._activeDate="hour"===this._clockView?this._adapter.addCalendarHours(this._activeDate,1):this._adapter.addCalendarMinutes(this._activeDate,this.timeInterval);break;case St.JH:this._activeDate="hour"===this._clockView?this._adapter.addCalendarHours(this._activeDate,-1):this._adapter.addCalendarMinutes(this._activeDate,-this.timeInterval);break;case St.K5:return void(this.timeInput||this._dialTimeSelected(this._activeDate));default:return}s.preventDefault()}_prevMonthInSameCol(s){const d=this._adapter.getMonth(s)<=4?-5:this._adapter.getMonth(s)>=7?-7:-12;return this._adapter.addCalendarMonths(s,d)}_nextMonthInSameCol(s){const d=this._adapter.getMonth(s)<=4?7:this._adapter.getMonth(s)>=7?5:12;return this._adapter.addCalendarMonths(s,d)}calendarState(s){this._calendarState=s}_2digit(s){return("00"+s).slice(-2)}}fn.\u0275fac=function(s){return new(s||fn)(e.Y36(e.SBq),e.Y36(Fi),e.Y36(e.R0b),e.Y36(Yc,8),e.Y36(lu,8),e.Y36(e.sBO))},fn.\u0275cmp=e.Xpm({type:fn,selectors:[["mtx-calendar"]],hostAttrs:["tabindex","0",1,"mtx-calendar"],hostVars:2,hostBindings:function(s,d){1&s&&e.NdJ("keydown",function(ie){return d._handleCalendarBodyKeydown(ie)}),2&s&&e.ekj("mtx-calendar-with-time-input",d.timeInput)},inputs:{multiYearSelector:"multiYearSelector",twelvehour:"twelvehour",startView:"startView",timeInterval:"timeInterval",dateFilter:"dateFilter",preventSameDateTimeSelection:"preventSameDateTimeSelection",type:"type",startAt:"startAt",timeInput:"timeInput",selected:"selected",minDate:"minDate",maxDate:"maxDate"},outputs:{selectedChange:"selectedChange",viewChanged:"viewChanged",_userSelection:"_userSelection"},exportAs:["mtxCalendar"],decls:9,vars:7,consts:[[1,"mtx-calendar-header"],["mat-button","","type","button","class","mtx-calendar-header-year",3,"active","click",4,"ngIf"],["class","mtx-calendar-header-date-time",4,"ngIf"],[1,"mtx-calendar-content",3,"ngSwitch"],["class","mtx-month-content",4,"ngIf"],[3,"activeDate","dateFilter","selected","type","_userSelection","selectedChange",4,"ngSwitchCase"],[3,"activeDate","dateFilter","maxDate","minDate","selected","type","_userSelection","selectedChange",4,"ngSwitchCase"],[4,"ngSwitchDefault"],["mat-button","","type","button",1,"mtx-calendar-header-year",3,"click"],["class","mtx-calendar-header-year-dropdown","matButtonIcon","","iconPositionEnd","","width","24","height","24","viewBox","0 0 24 24","fill","currentColor",4,"ngIf"],["matButtonIcon","","iconPositionEnd","","width","24","height","24","viewBox","0 0 24 24","fill","currentColor",1,"mtx-calendar-header-year-dropdown"],["d","M7,10L12,15L17,10H7Z"],[1,"mtx-calendar-header-date-time"],["mat-button","","type","button","class","mtx-calendar-header-date",3,"active","not-clickable","click",4,"ngIf"],["class","mtx-calendar-header-time",3,"active",4,"ngIf"],["mat-button","","type","button",1,"mtx-calendar-header-date",3,"click"],[1,"mtx-calendar-header-time"],[1,"mtx-calendar-header-hour-minute-container"],["mat-button","","type","button",1,"mtx-calendar-header-hours",3,"click"],[1,"mtx-calendar-header-hour-minute-separator"],["mat-button","","type","button",1,"mtx-calendar-header-minutes",3,"click"],["class","mtx-calendar-header-ampm-container",4,"ngIf"],[1,"mtx-calendar-header-ampm-container"],["mat-button","","type","button","aria-label","AM",1,"mtx-calendar-header-ampm",3,"click"],["mat-button","","type","button","aria-label","PM",1,"mtx-calendar-header-ampm",3,"click"],[1,"mtx-month-content"],[1,"mtx-calendar-controls"],["mat-icon-button","","type","button",1,"mtx-calendar-previous-button",3,"click"],["width","24","height","24","viewBox","0 0 24 24"],["d","M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"],[1,"mtx-calendar-period-button"],["mat-icon-button","","type","button",1,"mtx-calendar-next-button",3,"click"],["d","M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"],[3,"activeDate","dateFilter","selected","type","_userSelection","selectedChange"],[3,"activeDate","dateFilter","maxDate","minDate","selected","type","_userSelection","selectedChange"],[3,"AMPM","clockView","twelvehour","dateFilter","interval","maxDate","minDate","selected","_userSelection","activeDateChange","selectedChange","ampmChange","clockViewChange",4,"ngIf","ngIfElse"],["clock",""],[3,"AMPM","clockView","twelvehour","dateFilter","interval","maxDate","minDate","selected","_userSelection","activeDateChange","selectedChange","ampmChange","clockViewChange"],[3,"AMPM","dateFilter","interval","maxDate","minDate","selected","startView","twelvehour","_userSelection","activeDateChange","selectedChange"]],template:function(s,d){1&s&&(e.TgZ(0,"div",0),e.YNc(1,la,4,5,"button",1),e.YNc(2,Kn,3,2,"div",2),e.qZA(),e.TgZ(3,"div",3),e.YNc(4,$i,11,10,"div",4),e.YNc(5,sr,1,4,"mtx-month-view",5),e.YNc(6,lo,1,4,"mtx-year-view",5),e.YNc(7,ga,1,6,"mtx-multi-year-view",6),e.YNc(8,os,4,2,"ng-container",7),e.qZA()),2&s&&(e.xp6(1),e.Q6J("ngIf","time"!==d.type),e.xp6(1),e.Q6J("ngIf","year"!==d.type),e.xp6(1),e.Q6J("ngSwitch",d.currentView),e.xp6(1),e.Q6J("ngIf","month"===d.currentView||"year"===d.currentView||"multi-year"===d.currentView),e.xp6(1),e.Q6J("ngSwitchCase","month"),e.xp6(1),e.Q6J("ngSwitchCase","year"),e.xp6(1),e.Q6J("ngSwitchCase","multi-year"))},dependencies:[Et.O5,Et.RF,Et.n9,Et.ED,at.lW,at.RK,Is,_t,W,dt,Lc],styles:[".mtx-calendar{display:block;outline:none}.mtx-calendar-header{box-sizing:border-box;padding:8px;border-radius:4px 4px 0 0}.mtx-calendar-header .mtx-calendar-header-year,.mtx-calendar-header .mtx-calendar-header-date,.mtx-calendar-header .mtx-calendar-header-hours,.mtx-calendar-header .mtx-calendar-header-minutes,.mtx-calendar-header .mtx-calendar-header-ampm{height:auto;min-width:auto;padding:0 4px;text-align:inherit;line-height:inherit;color:inherit;font-size:inherit;font-weight:inherit;letter-spacing:normal;white-space:normal;word-break:break-word}.mtx-calendar-header .mtx-calendar-header-year .mat-mdc-button-touch-target,.mtx-calendar-header .mtx-calendar-header-date .mat-mdc-button-touch-target,.mtx-calendar-header .mtx-calendar-header-hours .mat-mdc-button-touch-target,.mtx-calendar-header .mtx-calendar-header-minutes .mat-mdc-button-touch-target,.mtx-calendar-header .mtx-calendar-header-ampm .mat-mdc-button-touch-target{height:100%}.mtx-calendar-header .mtx-calendar-header-year{line-height:24px}.mtx-calendar-header-date-time{font-size:24px;line-height:36px}.mtx-calendar-header-year:not(.active),.mtx-calendar-header-date:not(.active),.mtx-calendar-header-hours:not(.active),.mtx-calendar-header-minutes:not(.active),.mtx-calendar-header-ampm:not(.active){opacity:.6}.mtx-calendar-header-year.not-clickable,.mtx-calendar-header-date.not-clickable,.mtx-calendar-header-hours.not-clickable,.mtx-calendar-header-minutes.not-clickable,.mtx-calendar-header-ampm.not-clickable{cursor:initial}.mtx-calendar-header-time{display:inline-flex}.mtx-calendar-header-time:not(.active){opacity:.6}.mtx-calendar-header-time:not(.active) .mtx-calendar-header-hours,.mtx-calendar-header-time:not(.active) .mtx-calendar-header-minutes,.mtx-calendar-header-time:not(.active) .mtx-calendar-header-ampm{opacity:1}.mtx-calendar-header-hour-minute-separator{display:inline-block;width:8px;text-align:center}.mtx-calendar-header-ampm-container{display:inline-flex;flex-direction:column;line-height:18px;font-size:12px}[mode=landscape] .mtx-calendar{display:flex}[mode=landscape] .mtx-calendar .mtx-calendar-header{width:144px;min-width:144px;padding:16px 8px;border-radius:4px 0 0 4px}[dir=rtl] [mode=landscape] .mtx-calendar .mtx-calendar-header{border-radius:0 4px 4px 0}[mode=landscape] .mtx-calendar .mtx-calendar-header-year+.mtx-calendar-header-date-time,[mode=landscape] .mtx-calendar .mtx-calendar-header-date+.mtx-calendar-header-time{margin-top:4px}[mode=landscape] .mtx-calendar .mtx-calendar-header-date-time{font-size:28px}[mode=landscape] .mtx-calendar .mtx-calendar-header-time{display:flex;flex-direction:column}[mode=landscape] .mtx-calendar .mtx-calendar-header-time .mtx-calendar-header-hours,[mode=landscape] .mtx-calendar .mtx-calendar-header-time .mtx-calendar-header-minutes,[mode=landscape] .mtx-calendar .mtx-calendar-header-time .mtx-calendar-header-ampm{width:40px;text-align:center}[mode=landscape] .mtx-calendar .mtx-calendar-header-ampm-container{flex-direction:row;font-size:20px}[mode=landscape] .mtx-calendar .mtx-calendar-header-ampm{padding:4px}[mode=landscape] .mtx-calendar .mtx-calendar-header-ampm+.mtx-calendar-header-ampm{margin:0 8px}@media all and (orientation: landscape){[mode=auto] .mtx-calendar{display:flex}[mode=auto] .mtx-calendar .mtx-calendar-header{width:144px;min-width:144px;padding:16px 8px;border-radius:4px 0 0 4px}[dir=rtl] [mode=auto] .mtx-calendar .mtx-calendar-header{border-radius:0 4px 4px 0}[mode=auto] .mtx-calendar .mtx-calendar-header-year+.mtx-calendar-header-date-time,[mode=auto] .mtx-calendar .mtx-calendar-header-date+.mtx-calendar-header-time{margin-top:4px}[mode=auto] .mtx-calendar .mtx-calendar-header-date-time{font-size:28px}[mode=auto] .mtx-calendar .mtx-calendar-header-time{display:flex;flex-direction:column}[mode=auto] .mtx-calendar .mtx-calendar-header-time .mtx-calendar-header-hours,[mode=auto] .mtx-calendar .mtx-calendar-header-time .mtx-calendar-header-minutes,[mode=auto] .mtx-calendar .mtx-calendar-header-time .mtx-calendar-header-ampm{width:40px;text-align:center}[mode=auto] .mtx-calendar .mtx-calendar-header-ampm-container{flex-direction:row;font-size:20px}[mode=auto] .mtx-calendar .mtx-calendar-header-ampm{padding:4px}[mode=auto] .mtx-calendar .mtx-calendar-header-ampm+.mtx-calendar-header-ampm{margin:0 8px}}.mtx-calendar-content{width:100%;padding:8px;outline:none;box-sizing:border-box;overflow:hidden}.mtx-calendar-controls{display:flex;align-items:center;justify-content:space-between;margin:0 calc(4.7142857143% - 16px)}.mtx-calendar-controls .mat-icon-button:hover .mat-button-focus-overlay{opacity:.04}.mtx-calendar-period-button{display:inline-block;height:40px;line-height:40px;outline:none;border:0;background:transparent;box-sizing:border-box}.mtx-calendar-previous-button.disabled,.mtx-calendar-next-button.disabled{pointer-events:none}.mtx-calendar-previous-button svg,.mtx-calendar-next-button svg{fill:currentColor;vertical-align:top}[dir=rtl] .mtx-calendar-previous-button svg,[dir=rtl] .mtx-calendar-next-button svg{transform:rotate(180deg)}.mtx-calendar-table{border-spacing:0;border-collapse:collapse;width:100%}.mtx-calendar-table-header th{text-align:center;padding:8px 0}\n"],encapsulation:2,data:{animation:[Ks.slideCalendar]},changeDetection:0});let Ei=0;const Po=new e.OlP("mtx-datetimepicker-scroll-strategy");const ls={provide:Po,deps:[en.aV],useFactory:function En(H){return()=>H.scrollStrategies.reposition()}},Au=(0,gn.pj)(class{constructor(H){this._elementRef=H}});class kc extends Au{constructor(s,d){super(s),this._changeDetectorRef=d,this._animationDone=new l.x,this._dialogLabelId=null}ngOnInit(){this._animationState=this.datetimepicker.touchUi?"enter-dialog":"enter-dropdown"}ngAfterContentInit(){this._calendar._focusActiveCell()}_startExitAnimation(){this._animationState="void",this._changeDetectorRef.markForCheck()}ngOnDestroy(){this._animationDone.complete()}}kc.\u0275fac=function(s){return new(s||kc)(e.Y36(e.SBq),e.Y36(e.sBO))},kc.\u0275cmp=e.Xpm({type:kc,selectors:[["mtx-datetimepicker-content"]],viewQuery:function(s,d){if(1&s&&e.Gf(fn,7),2&s){let k;e.iGM(k=e.CRH())&&(d._calendar=k.first)}},hostAttrs:[1,"mtx-datetimepicker-content"],hostVars:4,hostBindings:function(s,d){1&s&&e.WFA("@transformPanel.done",function(){return d._animationDone.next()}),2&s&&(e.uIk("mode",d.datetimepicker.mode),e.d8E("@transformPanel",d._animationState),e.ekj("mtx-datetimepicker-content-touch",null==d.datetimepicker?null:d.datetimepicker.touchUi))},inputs:{color:"color"},features:[e.qOj],decls:2,vars:19,consts:[["cdkTrapFocus","","role","dialog",1,"mtx-datetimepicker-content-container"],[3,"id","ngClass","type","startAt","startView","maxDate","minDate","dateFilter","multiYearSelector","preventSameDateTimeSelection","timeInterval","twelvehour","selected","timeInput","selectedChange","viewChanged","_userSelection"]],template:function(s,d){if(1&s&&(e.TgZ(0,"div",0)(1,"mtx-calendar",1),e.NdJ("selectedChange",function(ie){return d.datetimepicker._select(ie)})("viewChanged",function(ie){return d.datetimepicker._viewChanged(ie)})("_userSelection",function(){return d.datetimepicker.close()}),e.qZA()()),2&s){let k;e.uIk("aria-modal",!0)("aria-labelledby",null!==(k=d._dialogLabelId)&&void 0!==k?k:void 0)("mode",d.datetimepicker.mode),e.xp6(1),e.Q6J("id",d.datetimepicker.id)("ngClass",d.datetimepicker.panelClass)("type",d.datetimepicker.type)("startAt",d.datetimepicker.startAt)("startView",d.datetimepicker.startView)("maxDate",d.datetimepicker._maxDate)("minDate",d.datetimepicker._minDate)("dateFilter",d.datetimepicker._dateFilter)("multiYearSelector",d.datetimepicker.multiYearSelector)("preventSameDateTimeSelection",d.datetimepicker.preventSameDateTimeSelection)("timeInterval",d.datetimepicker.timeInterval)("twelvehour",d.datetimepicker.twelvehour)("selected",d.datetimepicker._selected)("timeInput",d.datetimepicker.timeInput)("@fadeInCalendar","enter"),e.uIk("mode",d.datetimepicker.mode)}},dependencies:[Et.mk,Fr.mK,fn],styles:[".mtx-datetimepicker-content{display:block;border-radius:4px}.mtx-datetimepicker-content-container{display:flex;flex-direction:column;justify-content:space-between}.mtx-datetimepicker-content .mtx-calendar{width:296px;height:424px}.mtx-datetimepicker-content .mtx-calendar.mtx-calendar-with-time-input{height:490px}.mtx-datetimepicker-content[mode=landscape] .mtx-calendar{width:432px;height:328px}.mtx-datetimepicker-content[mode=landscape] .mtx-calendar.mtx-calendar-with-time-input{height:404px}@media all and (orientation: landscape){.mtx-datetimepicker-content[mode=auto] .mtx-calendar{width:432px;height:328px}.mtx-datetimepicker-content[mode=auto] .mtx-calendar.mtx-calendar-with-time-input{height:404px}}.mtx-datetimepicker-content-touch{display:block;max-height:80vh;position:relative;overflow:visible}.mtx-datetimepicker-content-touch .mtx-datetimepicker-content-container{min-height:300px;max-height:850px;min-width:250px;max-width:750px}.mtx-datetimepicker-content-touch .mtx-calendar{width:100%;height:auto}@media all and (orientation: landscape){.mtx-datetimepicker-content-touch .mtx-datetimepicker-content-container[mode=auto],.mtx-datetimepicker-content-touch .mtx-datetimepicker-content-container[mode=landscape]{width:120vh;height:80vh}.mtx-datetimepicker-content-touch .mtx-datetimepicker-content-container[mode=auto] .mtx-calendar,.mtx-datetimepicker-content-touch .mtx-datetimepicker-content-container[mode=landscape] .mtx-calendar{width:auto;height:100%}.mtx-datetimepicker-content-touch .mtx-datetimepicker-content-container[mode=portrait]{width:64vh;height:90vh}.mtx-datetimepicker-content-touch .mtx-datetimepicker-content-container[mode=portrait] .mtx-calendar{width:100%;height:auto}}@media all and (orientation: portrait){.mtx-datetimepicker-content-touch .mtx-datetimepicker-content-container[mode=auto],.mtx-datetimepicker-content-touch .mtx-datetimepicker-content-container[mode=portrait]{width:80vw;height:120vw}.mtx-datetimepicker-content-touch .mtx-datetimepicker-content-container[mode=auto] .mtx-calendar,.mtx-datetimepicker-content-touch .mtx-datetimepicker-content-container[mode=portrait] .mtx-calendar{width:100%;height:auto}.mtx-datetimepicker-content-touch .mtx-datetimepicker-content-container[mode=landscape]{width:90vw;height:64vw}.mtx-datetimepicker-content-touch .mtx-datetimepicker-content-container[mode=landscape] .mtx-calendar{width:auto;height:100%}.mtx-datetimepicker-content-touch .mtx-datetimepicker-content-container-with-actions{height:135vw}}\n"],encapsulation:2,data:{animation:[Ks.transformPanel,Ks.fadeInCalendar]},changeDetection:0});class cs{get multiYearSelector(){return this._multiYearSelector}set multiYearSelector(s){this._multiYearSelector=(0,Ln.Ig)(s)}get twelvehour(){return this._twelvehour}set twelvehour(s){this._twelvehour=(0,Ln.Ig)(s)}get panelClass(){return this._panelClass}set panelClass(s){this._panelClass=(0,Ln.du)(s)}get opened(){return this._opened}set opened(s){(0,Ln.Ig)(s)?this.open():this.close()}get color(){return this._color||(this.datetimepickerInput?this.datetimepickerInput.getThemePalette():void 0)}set color(s){this._color=s}constructor(s,d,k,ie,ot,Cn){if(this._overlay=s,this._ngZone=d,this._viewContainerRef=k,this._scrollStrategy=ie,this._dateAdapter=ot,this._dir=Cn,this._document=(0,e.f3M)(Et.K0),this._multiYearSelector=!1,this._twelvehour=!1,this.startView="month",this.mode="auto",this.timeInterval=1,this.preventSameDateTimeSelection=!1,this.selectedChanged=new e.vpe,this.openedStream=new e.vpe,this.closedStream=new e.vpe,this.viewChanged=new e.vpe,this._opened=!1,this.id="mtx-datetimepicker-"+Ei++,this._disabledChange=new l.x,this._validSelected=null,this._focusedElementBeforeOpen=null,this._backdropHarnessClass=`${this.id}-backdrop`,this._inputStateChanges=Qt.w0.EMPTY,this._type="datetime",this._touchUi=!1,this._timeInput=!1,this.xPosition="start",this.yPosition="below",this._restoreFocus=!0,!this._dateAdapter)throw _l("DateAdapter")}get startAt(){return this._startAt||(this.datetimepickerInput?this.datetimepickerInput.value:null)}set startAt(s){this._startAt=this._dateAdapter.getValidDateOrNull(s)}get type(){return this._type}set type(s){this._type=s||"datetime"}get touchUi(){return this._touchUi}set touchUi(s){this._touchUi=(0,Ln.Ig)(s)}get timeInput(){return this._timeInput&&!this.touchUi}set timeInput(s){this._timeInput=(0,Ln.Ig)(s)}get disabled(){return void 0===this._disabled&&this.datetimepickerInput?this.datetimepickerInput.disabled:!!this._disabled}set disabled(s){const d=(0,Ln.Ig)(s);d!==this._disabled&&(this._disabled=d,this._disabledChange.next(d))}get restoreFocus(){return this._restoreFocus}set restoreFocus(s){this._restoreFocus=(0,Ln.Ig)(s)}get _selected(){return this._validSelected}set _selected(s){this._validSelected=s}get _minDate(){return this.datetimepickerInput&&this.datetimepickerInput.min}get _maxDate(){return this.datetimepickerInput&&this.datetimepickerInput.max}get _dateFilter(){return this.datetimepickerInput&&this.datetimepickerInput._dateFilter}_viewChanged(s){this.viewChanged.emit(s)}ngOnDestroy(){this._destroyOverlay(),this.close(),this._inputStateChanges.unsubscribe(),this._disabledChange.complete()}_select(s){const d=this._selected;this._selected=s,this._dateAdapter.sameDatetime(d,this._selected)||this.selectedChanged.emit(s)}_registerInput(s){if(this.datetimepickerInput)throw Error("A MtxDatetimepicker can only be associated with a single input.");this.datetimepickerInput=s,this._inputStateChanges=this.datetimepickerInput._valueChange.subscribe(d=>this._selected=d)}open(){if(!this._opened&&!this.disabled){if(!this.datetimepickerInput)throw Error("Attempted to open an MtxDatetimepicker with no associated input.");this._focusedElementBeforeOpen=(0,cn.ht)(),this._openOverlay(),this._opened=!0,this.openedStream.emit()}}close(){if(!this._opened)return;const s=this._restoreFocus&&this._focusedElementBeforeOpen&&"function"==typeof this._focusedElementBeforeOpen.focus,d=()=>{this._opened&&(this._opened=!1,this.closedStream.emit())};if(this._componentRef){const{instance:k,location:ie}=this._componentRef;k._startExitAnimation(),k._animationDone.pipe((0,ye.q)(1)).subscribe(()=>{const ot=this._document.activeElement;s&&(!ot||ot===this._document.activeElement||ie.nativeElement.contains(ot))&&this._focusedElementBeforeOpen.focus(),this._focusedElementBeforeOpen=null,this._destroyOverlay()})}s?setTimeout(d):d()}_forwardContentValues(s){s.datetimepicker=this,s.color=this.color,s._dialogLabelId=this.datetimepickerInput.getOverlayLabelId()}_openOverlay(){this._destroyOverlay();const s=this.touchUi,d=this.datetimepickerInput.getOverlayLabelId(),k=new Wn.C5(kc,this._viewContainerRef),ie=this._overlayRef=this._overlay.create(new en.X_({positionStrategy:s?this._getDialogStrategy():this._getDropdownStrategy(),hasBackdrop:!0,backdropClass:[s?"cdk-overlay-dark-backdrop":"mat-overlay-transparent-backdrop",this._backdropHarnessClass],direction:this._dir,scrollStrategy:s?this._overlay.scrollStrategies.block():this._scrollStrategy(),panelClass:"mtx-datetimepicker-"+(s?"dialog":"popup")})),ot=ie.overlayElement;ot.setAttribute("role","dialog"),d&&ot.setAttribute("aria-labelledby",d),s&&ot.setAttribute("aria-modal","true"),this._getCloseStream(ie).subscribe(Cn=>{Cn&&Cn.preventDefault(),this.close()}),this._componentRef=ie.attach(k),this._forwardContentValues(this._componentRef.instance),s||this._ngZone.onStable.pipe((0,ye.q)(1)).subscribe(()=>ie.updatePosition())}_destroyOverlay(){this._overlayRef&&(this._overlayRef.dispose(),this._overlayRef=this._componentRef=null)}_getDialogStrategy(){return this._overlay.position().global().centerHorizontally().centerVertically()}_getDropdownStrategy(){const s=this._overlay.position().flexibleConnectedTo(this.datetimepickerInput.getConnectedOverlayOrigin()).withTransformOriginOn(".mtx-datetimepicker-content").withFlexibleDimensions(!1).withViewportMargin(8).withLockedPosition();return this._setConnectedPositions(s)}_setConnectedPositions(s){const d="end"===this.xPosition?"end":"start",k="start"===d?"end":"start",ie="above"===this.yPosition?"bottom":"top",ot="top"===ie?"bottom":"top";return s.withPositions([{originX:d,originY:ot,overlayX:d,overlayY:ie},{originX:d,originY:ie,overlayX:d,overlayY:ot},{originX:k,originY:ot,overlayX:k,overlayY:ie},{originX:k,originY:ie,overlayX:k,overlayY:ot}])}_getCloseStream(s){return(0,ue.T)(s.backdropClick(),s.detachments(),s.keydownEvents().pipe((0,ve.h)(d=>d.keyCode===St.hY&&!(0,St.Vb)(d)||this.datetimepickerInput&&(0,St.Vb)(d,"altKey")&&d.keyCode===St.LH)))}}cs.\u0275fac=function(s){return new(s||cs)(e.Y36(en.aV),e.Y36(e.R0b),e.Y36(e.s_b),e.Y36(Po),e.Y36(Yc,8),e.Y36(Pt.Is,8))},cs.\u0275cmp=e.Xpm({type:cs,selectors:[["mtx-datetimepicker"]],inputs:{multiYearSelector:"multiYearSelector",twelvehour:"twelvehour",startView:"startView",mode:"mode",timeInterval:"timeInterval",preventSameDateTimeSelection:"preventSameDateTimeSelection",panelClass:"panelClass",opened:"opened",color:"color",startAt:"startAt",type:"type",touchUi:"touchUi",timeInput:"timeInput",disabled:"disabled",xPosition:"xPosition",yPosition:"yPosition",restoreFocus:"restoreFocus"},outputs:{selectedChanged:"selectedChanged",openedStream:"opened",closedStream:"closed",viewChanged:"viewChanged"},exportAs:["mtxDatetimepicker"],decls:0,vars:0,template:function(s,d){},encapsulation:2,changeDetection:0});const wu={provide:Ve.JU,useExisting:(0,e.Gpc)(()=>Cu),multi:!0},Iu={provide:Ve.Cf,useExisting:(0,e.Gpc)(()=>Cu),multi:!0};class sd{constructor(s,d){this.target=s,this.targetElement=d,this.value=this.target.value}}class Cu{constructor(s,d,k,ie){if(this._elementRef=s,this._dateAdapter=d,this._dateFormats=k,this._formField=ie,this.dateChange=new e.vpe,this.dateInput=new e.vpe,this._valueChange=new e.vpe,this._disabledChange=new e.vpe,this._datetimepickerSubscription=Qt.w0.EMPTY,this._localeSubscription=Qt.w0.EMPTY,this._lastValueValid=!1,this._onTouched=()=>{},this._cvaOnChange=()=>{},this._validatorOnChange=()=>{},this._parseValidator=()=>this._lastValueValid?null:{mtxDatetimepickerParse:{text:this._elementRef.nativeElement.value}},this._minValidator=ot=>{const Cn=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(ot.value));return!this.min||!Cn||this._dateAdapter.compareDatetime(this.min,Cn)<=0?null:{mtxDatetimepickerMin:{min:this.min,actual:Cn}}},this._maxValidator=ot=>{const Cn=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(ot.value));return!this.max||!Cn||this._dateAdapter.compareDatetime(this.max,Cn)>=0?null:{mtxDatetimepickerMax:{max:this.max,actual:Cn}}},this._filterValidator=ot=>{const Cn=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(ot.value));return this._dateFilter&&Cn&&!this._dateFilter(Cn,Dc.DATE)?{mtxDatetimepickerFilter:!0}:null},this._validator=Ve.kI.compose([this._parseValidator,this._minValidator,this._maxValidator,this._filterValidator]),!this._dateAdapter)throw _l("DatetimeAdapter");if(!this._dateFormats)throw _l("MTX_DATETIME_FORMATS");this._localeSubscription=d.localeChanges.subscribe(()=>{this.value=this._dateAdapter.deserialize(this.value)})}set mtxDatetimepicker(s){this.registerDatetimepicker(s)}set mtxDatetimepickerFilter(s){this._dateFilter=s,this._validatorOnChange()}get value(){return this._value}set value(s){s=this._dateAdapter.deserialize(s),this._lastValueValid=!s||this._dateAdapter.isValid(s),s=this._dateAdapter.getValidDateOrNull(s);const d=this.value;this._value=s,this._formatValue(s),setTimeout(()=>{this._dateAdapter.sameDatetime(d,s)||this._valueChange.emit(s)})}get min(){return this._min}set min(s){this._min=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(s)),this._validatorOnChange()}get max(){return this._max}set max(s){this._max=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(s)),this._validatorOnChange()}get disabled(){return!!this._disabled}set disabled(s){const d=(0,Ln.Ig)(s);this._disabled!==d&&(this._disabled=d,this._disabledChange.emit(d))}ngAfterContentInit(){this._datetimepicker&&(this._datetimepickerSubscription=this._datetimepicker.selectedChanged.subscribe(s=>{this.value=s,this._cvaOnChange(s),this._onTouched(),this.dateInput.emit(new sd(this,this._elementRef.nativeElement)),this.dateChange.emit(new sd(this,this._elementRef.nativeElement))}))}ngOnDestroy(){this._datetimepickerSubscription.unsubscribe(),this._localeSubscription.unsubscribe(),this._valueChange.complete(),this._disabledChange.complete()}registerOnValidatorChange(s){this._validatorOnChange=s}validate(s){return this._validator?this._validator(s):null}getConnectedOverlayOrigin(){return this._formField?this._formField.getConnectedOverlayOrigin():this._elementRef}getOverlayLabelId(){return this._formField?this._formField.getLabelId():this._elementRef.nativeElement.getAttribute("aria-labelledby")}writeValue(s){this.value=s}registerOnChange(s){this._cvaOnChange=s}registerOnTouched(s){this._onTouched=s}setDisabledState(s){this.disabled=s}_onKeydown(s){s.altKey&&s.keyCode===St.JH&&(this._datetimepicker.open(),s.preventDefault())}_onInput(s){let d=this._dateAdapter.parse(s,this.getParseFormat());this._lastValueValid=!d||this._dateAdapter.isValid(d),d=this._dateAdapter.getValidDateOrNull(d),this._value=d,this._cvaOnChange(d),this._valueChange.emit(d),this.dateInput.emit(new sd(this,this._elementRef.nativeElement))}_onChange(){this.dateChange.emit(new sd(this,this._elementRef.nativeElement))}_onBlur(){this.value&&this._formatValue(this.value),this._onTouched()}registerDatetimepicker(s){s&&(this._datetimepicker=s,this._datetimepicker._registerInput(this))}getDisplayFormat(){switch(this._datetimepicker.type){case"date":return this._dateFormats.display.dateInput;case"datetime":return this._dateFormats.display.datetimeInput;case"time":return this._dateFormats.display.timeInput;case"month":return this._dateFormats.display.monthInput;case"year":return this._dateFormats.display.yearInput}}getParseFormat(){let s;switch(this._datetimepicker.type){case"date":s=this._dateFormats.parse.dateInput;break;case"datetime":s=this._dateFormats.parse.datetimeInput;break;case"time":s=this._dateFormats.parse.timeInput;break;case"month":s=this._dateFormats.parse.monthInput;break;case"year":s=this._dateFormats.parse.yearInput}return s||(s=this._dateFormats.parse.dateInput),s}_formatValue(s){this._elementRef.nativeElement.value=s?this._dateAdapter.format(s,this.getDisplayFormat()):""}getThemePalette(){return this._formField?this._formField.color:void 0}}Cu.\u0275fac=function(s){return new(s||Cu)(e.Y36(e.SBq),e.Y36(Yc,8),e.Y36(lu,8),e.Y36(ii.KE,8))},Cu.\u0275dir=e.lG2({type:Cu,selectors:[["input","mtxDatetimepicker",""]],hostVars:5,hostBindings:function(s,d){1&s&&e.NdJ("input",function(ie){return d._onInput(ie.target.value)})("change",function(){return d._onChange()})("blur",function(){return d._onBlur()})("keydown",function(ie){return d._onKeydown(ie)}),2&s&&(e.Ikx("disabled",d.disabled),e.uIk("aria-haspopup",!0)("aria-owns",(null==d._datetimepicker?null:d._datetimepicker.opened)&&d._datetimepicker.id||null)("min",d.min?d._dateAdapter.toIso8601(d.min):null)("max",d.max?d._dateAdapter.toIso8601(d.max):null))},inputs:{mtxDatetimepicker:"mtxDatetimepicker",mtxDatetimepickerFilter:"mtxDatetimepickerFilter",value:"value",min:"min",max:"max",disabled:"disabled"},outputs:{dateChange:"dateChange",dateInput:"dateInput"},exportAs:["mtxDatetimepickerInput"],features:[e._Bn([wu,Iu,{provide:hi.Jk,useExisting:Cu}])]});class Gd{}Gd.\u0275fac=function(s){return new(s||Gd)},Gd.\u0275dir=e.lG2({type:Gd,selectors:[["","mtxDatetimepickerToggleIcon",""]]});class Rd{get disabled(){return void 0===this._disabled?this.datetimepicker.disabled:!!this._disabled}set disabled(s){this._disabled=(0,Ln.Ig)(s)}constructor(s,d,k){this._intl=s,this._changeDetectorRef=d,this._stateChanges=Qt.w0.EMPTY;const ie=Number(k);this.tabIndex=ie||0===ie?ie:null}ngOnChanges(s){s.datetimepicker&&this._watchStateChanges()}ngOnDestroy(){this._stateChanges.unsubscribe()}ngAfterContentInit(){this._watchStateChanges()}_open(s){this.datetimepicker&&!this.disabled&&(this.datetimepicker.open(),s.stopPropagation())}_watchStateChanges(){const s=this.datetimepicker?this.datetimepicker._disabledChange:(0,D.of)(),d=this.datetimepicker&&this.datetimepicker.datetimepickerInput?this.datetimepicker.datetimepickerInput._disabledChange:(0,D.of)(),k=this.datetimepicker?(0,ue.T)(this.datetimepicker.openedStream,this.datetimepicker.closedStream):(0,D.of)();this._stateChanges.unsubscribe(),this._stateChanges=(0,ue.T)(this._intl.changes,s,d,k).subscribe(()=>this._changeDetectorRef.markForCheck())}}Rd.\u0275fac=function(s){return new(s||Rd)(e.Y36(Fi),e.Y36(e.sBO),e.$8M("tabindex"))},Rd.\u0275cmp=e.Xpm({type:Rd,selectors:[["mtx-datetimepicker-toggle"]],contentQueries:function(s,d,k){if(1&s&&e.Suo(k,Gd,5),2&s){let ie;e.iGM(ie=e.CRH())&&(d._customIcon=ie.first)}},viewQuery:function(s,d){if(1&s&&e.Gf(_s,5),2&s){let k;e.iGM(k=e.CRH())&&(d._button=k.first)}},hostAttrs:[1,"mtx-datetimepicker-toggle"],hostVars:8,hostBindings:function(s,d){1&s&&e.NdJ("click",function(ie){return d._open(ie)}),2&s&&(e.uIk("tabindex",null)("data-mtx-calendar",d.datetimepicker?d.datetimepicker.id:null),e.ekj("mtx-datetimepicker-toggle-active",d.datetimepicker&&d.datetimepicker.opened)("mat-accent",d.datetimepicker&&"accent"===d.datetimepicker.color)("mat-warn",d.datetimepicker&&"warn"===d.datetimepicker.color))},inputs:{datetimepicker:["for","datetimepicker"],tabIndex:"tabIndex",ariaLabel:["aria-label","ariaLabel"],disabled:"disabled",disableRipple:"disableRipple"},exportAs:["mtxDatetimepickerToggle"],features:[e.TTD],ngContentSelectors:["[mtxDatetimepickerToggleIcon]"],decls:4,vars:6,consts:[["mat-icon-button","","type","button",3,"disabled","disableRipple"],["button",""],[3,"ngSwitch",4,"ngIf"],[3,"ngSwitch"],["class","mtx-datetimepicker-toggle-default-icon","viewBox","0 0 24 24","width","24px","height","24px","fill","currentColor","focusable","false",4,"ngSwitchCase"],["class","mtx-datetimepicker-toggle-default-icon","viewBox","0 0 24 24","width","24px","height","24px","fill","currentColor","focusable","false",4,"ngSwitchDefault"],["viewBox","0 0 24 24","width","24px","height","24px","fill","currentColor","focusable","false",1,"mtx-datetimepicker-toggle-default-icon"],["d","M12,20A8,8 0 0,0 20,12A8,8 0 0,0 12,4A8,8 0 0,0 4,12A8,8 0 0,0 12,20M12,2A10,10 0 0,1 22,12A10,10 0 0,1 12,22C6.47,22 2,17.5 2,12A10,10 0 0,1 12,2M12.5,7V12.25L17,14.92L16.25,16.15L11,13V7H12.5Z"],["d","M15,13H16.5V15.82L18.94,17.23L18.19,18.53L15,16.69V13M19,8H5V19H9.67C9.24,18.09 9,17.07 9,16A7,7 0 0,1 16,9C17.07,9 18.09,9.24 19,9.67V8M5,21C3.89,21 3,20.1 3,19V5C3,3.89 3.89,3 5,3H6V1H8V3H16V1H18V3H19A2,2 0 0,1 21,5V11.1C22.24,12.36 23,14.09 23,16A7,7 0 0,1 16,23C14.09,23 12.36,22.24 11.1,21H5M16,11.15A4.85,4.85 0 0,0 11.15,16C11.15,18.68 13.32,20.85 16,20.85A4.85,4.85 0 0,0 20.85,16C20.85,13.32 18.68,11.15 16,11.15Z"],["d","M0 0h24v24H0z","fill","none"],["d","M19 3h-1V1h-2v2H8V1H6v2H5c-1.11 0-1.99.9-1.99 2L3 19c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H5V8h14v11zM7 10h5v5H7z"]],template:function(s,d){1&s&&(e.F$t(Os),e.TgZ(0,"button",0,1),e.YNc(2,$l,4,3,"ng-container",2),e.Hsn(3),e.qZA()),2&s&&(e.Q6J("disabled",d.disabled)("disableRipple",d.disableRipple),e.uIk("aria-haspopup",d.datetimepicker?"dialog":null)("aria-label",d.ariaLabel||d._intl.openCalendarLabel)("tabindex",d.disabled?-1:d.tabIndex),e.xp6(2),e.Q6J("ngIf",!d._customIcon))},dependencies:[Et.O5,Et.RF,Et.n9,Et.ED,at.RK],styles:[".mat-form-field-appearance-legacy .mat-form-field-prefix .mtx-datetimepicker-toggle-default-icon,.mat-form-field-appearance-legacy .mat-form-field-suffix .mtx-datetimepicker-toggle-default-icon{width:1em}.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-prefix .mtx-datetimepicker-toggle-default-icon,.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-suffix .mtx-datetimepicker-toggle-default-icon{display:block;width:1.5em;height:1.5em}.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-prefix .mat-icon-button .mtx-datetimepicker-toggle-default-icon,.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-suffix .mat-icon-button .mtx-datetimepicker-toggle-default-icon{margin:auto}\n"],encapsulation:2,changeDetection:0});class Bu{}Bu.\u0275fac=function(s){return new(s||Bu)},Bu.\u0275mod=e.oAB({type:Bu}),Bu.\u0275inj=e.cJS({providers:[ls],imports:[Et.ez,at.ot,en.U8,Fr.rt,Wn.eL]});const Wf=Nn;function vc(H,s){const d=Array(H);for(let k=0;k<H;k++)d[k]=s(k);return d}class Rc extends Yc{constructor(s,d,k){super(k),this._useUtc=!1,this.setLocale(s||Wf.locale()),this._useUtc=d.useUtc}setLocale(s){super.setLocale(s);const d=Wf.localeData(s);this._localeData={firstDayOfWeek:d.firstDayOfWeek(),longMonths:d.months(),shortMonths:d.monthsShort(),dates:vc(31,k=>super.createDate(2017,0,k+1).format("D")),hours:vc(24,k=>this.createDatetime(2017,0,1,k,0).format("H")),minutes:vc(60,k=>this.createDatetime(2017,0,1,1,k).format("m")),longDaysOfWeek:d.weekdays(),shortDaysOfWeek:d.weekdaysShort(),narrowDaysOfWeek:d.weekdaysMin()}}getHour(s){return super.clone(s).hour()}getMinute(s){return super.clone(s).minute()}isInNextMonth(s,d){const k=this.getDateInNextMonth(s);return super.sameMonthAndYear(k,d)}createDatetime(s,d,k,ie,ot){if(d<0||d>11)throw Error(`Invalid month index "${d}". Month index has to be between 0 and 11.`);if(k<1)throw Error(`Invalid date "${k}". Date has to be greater than 0.`);if(ie<0||ie>23)throw Error(`Invalid hour "${ie}". Hour has to be between 0 and 23.`);if(ot<0||ot>59)throw Error(`Invalid minute "${ot}". Minute has to be between 0 and 59.`);let Cn=Wf({year:s,month:d,date:k,hour:ie,minute:ot});if(this._useUtc&&(Cn=Cn.utc()),!Cn.isValid())throw Error(`Invalid date "${k}" for month with index "${d}".`);return Cn}getFirstDateOfMonth(s){return super.clone(s).startOf("month")}getHourNames(){return this._localeData.hours}getMinuteNames(){return this._localeData.minutes}addCalendarHours(s,d){return super.clone(s).add({hours:d})}addCalendarMinutes(s,d){return super.clone(s).add({minutes:d})}deserialize(s){return this._delegate.deserialize(s)}getDateInNextMonth(s){return super.clone(s).date(1).add({month:1})}}Rc.\u0275fac=function(s){return new(s||Rc)(e.LFG(gn.Ad,8),e.LFG(un,8),e.LFG(gn._A))},Rc.\u0275prov=e.Yz7({token:Rc,factory:Rc.\u0275fac});class Md{}Md.\u0275fac=function(s){return new(s||Md)},Md.\u0275mod=e.oAB({type:Md}),Md.\u0275inj=e.cJS({providers:[{provide:Yc,useClass:Rc}],imports:[xi]});class Mm{}Mm.\u0275fac=function(s){return new(s||Mm)},Mm.\u0275mod=e.oAB({type:Mm}),Mm.\u0275inj=e.cJS({providers:[{provide:lu,useValue:{parse:{dateInput:"L",monthInput:"MMMM",yearInput:"YYYY",timeInput:"LT",datetimeInput:"L LT"},display:{dateInput:"L",monthInput:"MMMM",yearInput:"YYYY",datetimeInput:"L LT",timeInput:"LT",monthYearLabel:"MMM YYYY",dateA11yLabel:"LL",monthYearA11yLabel:"MMMM YYYY",popupHeaderDateLabel:"ddd, DD MMM"}}}],imports:[Md,Cr]});var am=p(97392);class Ef{constructor(){this.expansionModel=new rs.Ov(!0)}toggle(s){this.expansionModel.toggle(this._trackByValue(s))}expand(s){this.expansionModel.select(this._trackByValue(s))}collapse(s){this.expansionModel.deselect(this._trackByValue(s))}isExpanded(s){return this.expansionModel.isSelected(this._trackByValue(s))}toggleDescendants(s){this.expansionModel.isSelected(this._trackByValue(s))?this.collapseDescendants(s):this.expandDescendants(s)}collapseAll(){this.expansionModel.clear()}expandDescendants(s){let d=[s];d.push(...this.getDescendants(s)),this.expansionModel.select(...d.map(k=>this._trackByValue(k)))}collapseDescendants(s){let d=[s];d.push(...this.getDescendants(s)),this.expansionModel.deselect(...d.map(k=>this._trackByValue(k)))}_trackByValue(s){return this.trackBy?this.trackBy(s):s}}class yc extends Ef{constructor(s,d){super(),this.getChildren=s,this.options=d,this.options&&(this.trackBy=this.options.trackBy)}expandAll(){this.expansionModel.clear();const s=this.dataNodes.reduce((d,k)=>[...d,...this.getDescendants(k),k],[]);this.expansionModel.select(...s.map(d=>this._trackByValue(d)))}getDescendants(s){const d=[];return this._getDescendants(d,s),d.splice(1)}_getDescendants(s,d){s.push(d);const k=this.getChildren(d);Array.isArray(k)?k.forEach(ie=>this._getDescendants(s,ie)):(0,_c.b)(k)&&k.pipe((0,ye.q)(1),(0,ve.h)(Boolean)).subscribe(ie=>{for(const ot of ie)this._getDescendants(s,ot)})}}const Eu=new e.OlP("CDK_TREE_NODE_OUTLET_NODE");class Mu{constructor(s,d){this.viewContainer=s,this._node=d}}Mu.\u0275fac=function(s){return new(s||Mu)(e.Y36(e.s_b),e.Y36(Eu,8))},Mu.\u0275dir=e.lG2({type:Mu,selectors:[["","cdkTreeNodeOutlet",""]]});class ws{constructor(s){this.$implicit=s}}class Ll{constructor(s){this.template=s}}Ll.\u0275fac=function(s){return new(s||Ll)(e.Y36(e.Rgc))},Ll.\u0275dir=e.lG2({type:Ll,selectors:[["","cdkTreeNodeDef",""]],inputs:{when:["cdkTreeNodeDefWhen","when"]}});class Ge{get dataSource(){return this._dataSource}set dataSource(s){this._dataSource!==s&&this._switchDataSource(s)}constructor(s,d){this._differs=s,this._changeDetectorRef=d,this._onDestroy=new l.x,this._levels=new Map,this.viewChange=new g.X({start:0,end:Number.MAX_VALUE})}ngOnInit(){this._dataDiffer=this._differs.find([]).create(this.trackBy),this.treeControl}ngOnDestroy(){this._nodeOutlet.viewContainer.clear(),this.viewChange.complete(),this._onDestroy.next(),this._onDestroy.complete(),this._dataSource&&"function"==typeof this._dataSource.disconnect&&this.dataSource.disconnect(this),this._dataSubscription&&(this._dataSubscription.unsubscribe(),this._dataSubscription=null)}ngAfterContentChecked(){const s=this._nodeDefs.filter(d=>!d.when);s.length,this._defaultNodeDef=s[0],this.dataSource&&this._nodeDefs&&!this._dataSubscription&&this._observeRenderChanges()}_switchDataSource(s){this._dataSource&&"function"==typeof this._dataSource.disconnect&&this.dataSource.disconnect(this),this._dataSubscription&&(this._dataSubscription.unsubscribe(),this._dataSubscription=null),s||this._nodeOutlet.viewContainer.clear(),this._dataSource=s,this._nodeDefs&&this._observeRenderChanges()}_observeRenderChanges(){let s;(0,rs.Z9)(this._dataSource)?s=this._dataSource.connect(this):(0,_c.b)(this._dataSource)?s=this._dataSource:Array.isArray(this._dataSource)&&(s=(0,D.of)(this._dataSource)),s&&(this._dataSubscription=s.pipe((0,j.R)(this._onDestroy)).subscribe(d=>this.renderNodeChanges(d)))}renderNodeChanges(s,d=this._dataDiffer,k=this._nodeOutlet.viewContainer,ie){const ot=d.diff(s);ot&&(ot.forEachOperation((Cn,ir,Yo)=>{if(null==Cn.previousIndex)this.insertNode(s[Yo],Yo,k,ie);else if(null==Yo)k.remove(ir),this._levels.delete(Cn.item);else{const tl=k.get(ir);k.move(tl,Yo)}}),this._changeDetectorRef.detectChanges())}_getNodeDef(s,d){if(1===this._nodeDefs.length)return this._nodeDefs.first;return this._nodeDefs.find(ie=>ie.when&&ie.when(d,s))||this._defaultNodeDef}insertNode(s,d,k,ie){const ot=this._getNodeDef(s,d),Cn=new ws(s);this.treeControl.getLevel?Cn.level=this.treeControl.getLevel(s):typeof ie<"u"&&this._levels.has(ie)?Cn.level=this._levels.get(ie)+1:Cn.level=0,this._levels.set(s,Cn.level),(k||this._nodeOutlet.viewContainer).createEmbeddedView(ot.template,Cn,d),xt.mostRecentTreeNode&&(xt.mostRecentTreeNode.data=s)}}Ge.\u0275fac=function(s){return new(s||Ge)(e.Y36(e.ZZ4),e.Y36(e.sBO))},Ge.\u0275cmp=e.Xpm({type:Ge,selectors:[["cdk-tree"]],contentQueries:function(s,d,k){if(1&s&&e.Suo(k,Ll,5),2&s){let ie;e.iGM(ie=e.CRH())&&(d._nodeDefs=ie)}},viewQuery:function(s,d){if(1&s&&e.Gf(Mu,7),2&s){let k;e.iGM(k=e.CRH())&&(d._nodeOutlet=k.first)}},hostAttrs:["role","tree",1,"cdk-tree"],inputs:{dataSource:"dataSource",treeControl:"treeControl",trackBy:"trackBy"},exportAs:["cdkTree"],decls:1,vars:0,consts:[["cdkTreeNodeOutlet",""]],template:function(s,d){1&s&&e.GkF(0,0)},dependencies:[Mu],encapsulation:2});class xt{get role(){return"treeitem"}set role(s){this._elementRef.nativeElement.setAttribute("role",s)}get data(){return this._data}set data(s){s!==this._data&&(this._data=s,this._setRoleFromData(),this._dataChanges.next())}get isExpanded(){return this._tree.treeControl.isExpanded(this._data)}get level(){return this._tree.treeControl.getLevel?this._tree.treeControl.getLevel(this._data):this._parentNodeAriaLevel}constructor(s,d){this._elementRef=s,this._tree=d,this._destroyed=new l.x,this._dataChanges=new l.x,xt.mostRecentTreeNode=this,this.role="treeitem"}ngOnInit(){this._parentNodeAriaLevel=function Ht(H){let s=H.parentElement;for(;s&&!_n(s);)s=s.parentElement;return s?s.classList.contains("cdk-nested-tree-node")?(0,Ln.su)(s.getAttribute("aria-level")):0:-1}(this._elementRef.nativeElement),this._elementRef.nativeElement.setAttribute("aria-level",`${this.level+1}`)}ngOnDestroy(){xt.mostRecentTreeNode===this&&(xt.mostRecentTreeNode=null),this._dataChanges.complete(),this._destroyed.next(),this._destroyed.complete()}focus(){this._elementRef.nativeElement.focus()}_setRoleFromData(){!this._tree.treeControl.isExpandable&&this._tree.treeControl.getChildren,this.role="treeitem"}}function _n(H){const s=H.classList;return!(!s?.contains("cdk-nested-tree-node")&&!s?.contains("cdk-tree"))}xt.mostRecentTreeNode=null,xt.\u0275fac=function(s){return new(s||xt)(e.Y36(e.SBq),e.Y36(Ge))},xt.\u0275dir=e.lG2({type:xt,selectors:[["cdk-tree-node"]],hostAttrs:[1,"cdk-tree-node"],hostVars:1,hostBindings:function(s,d){2&s&&e.uIk("aria-expanded",d.isExpanded)},inputs:{role:"role"},exportAs:["cdkTreeNode"]});class li extends xt{constructor(s,d,k){super(s,d),this._differs=k}ngAfterContentInit(){this._dataDiffer=this._differs.find([]).create(this._tree.trackBy),this._tree.treeControl.getChildren;const s=this._tree.treeControl.getChildren(this.data);Array.isArray(s)?this.updateChildrenNodes(s):(0,_c.b)(s)&&s.pipe((0,j.R)(this._destroyed)).subscribe(d=>this.updateChildrenNodes(d)),this.nodeOutlet.changes.pipe((0,j.R)(this._destroyed)).subscribe(()=>this.updateChildrenNodes())}ngOnInit(){super.ngOnInit()}ngOnDestroy(){this._clear(),super.ngOnDestroy()}updateChildrenNodes(s){const d=this._getNodeOutlet();if(s&&(this._children=s),d&&this._children){const k=d.viewContainer;this._tree.renderNodeChanges(this._children,this._dataDiffer,k,this._data)}else this._dataDiffer.diff([])}_clear(){const s=this._getNodeOutlet();s&&(s.viewContainer.clear(),this._dataDiffer.diff([]))}_getNodeOutlet(){const s=this.nodeOutlet;return s&&s.find(d=>!d._node||d._node===this)}}li.\u0275fac=function(s){return new(s||li)(e.Y36(e.SBq),e.Y36(Ge),e.Y36(e.ZZ4))},li.\u0275dir=e.lG2({type:li,selectors:[["cdk-nested-tree-node"]],contentQueries:function(s,d,k){if(1&s&&e.Suo(k,Mu,5),2&s){let ie;e.iGM(ie=e.CRH())&&(d.nodeOutlet=ie)}},hostAttrs:[1,"cdk-nested-tree-node"],inputs:{role:"role",disabled:"disabled",tabIndex:"tabIndex"},exportAs:["cdkNestedTreeNode"],features:[e._Bn([{provide:xt,useExisting:li},{provide:Eu,useExisting:li}]),e.qOj]});const dr=/([A-Za-z%]+)$/;class Sr{get level(){return this._level}set level(s){this._setLevelInput(s)}get indent(){return this._indent}set indent(s){this._setIndentInput(s)}constructor(s,d,k,ie){this._treeNode=s,this._tree=d,this._element=k,this._dir=ie,this._destroyed=new l.x,this.indentUnits="px",this._indent=40,this._setPadding(),ie&&ie.change.pipe((0,j.R)(this._destroyed)).subscribe(()=>this._setPadding(!0)),s._dataChanges.subscribe(()=>this._setPadding())}ngOnDestroy(){this._destroyed.next(),this._destroyed.complete()}_paddingIndent(){const s=this._treeNode.data&&this._tree.treeControl.getLevel?this._tree.treeControl.getLevel(this._treeNode.data):null,d=null==this._level?s:this._level;return"number"==typeof d?`${d*this._indent}${this.indentUnits}`:null}_setPadding(s=!1){const d=this._paddingIndent();if(d!==this._currentPadding||s){const k=this._element.nativeElement,ie=this._dir&&"rtl"===this._dir.value?"paddingRight":"paddingLeft",ot="paddingLeft"===ie?"paddingRight":"paddingLeft";k.style[ie]=d||"",k.style[ot]="",this._currentPadding=d}}_setLevelInput(s){this._level=(0,Ln.su)(s,null),this._setPadding()}_setIndentInput(s){let d=s,k="px";if("string"==typeof s){const ie=s.split(dr);d=ie[0],k=ie[1]||k}this.indentUnits=k,this._indent=(0,Ln.su)(d),this._setPadding()}}Sr.\u0275fac=function(s){return new(s||Sr)(e.Y36(xt),e.Y36(Ge),e.Y36(e.SBq),e.Y36(Pt.Is,8))},Sr.\u0275dir=e.lG2({type:Sr,selectors:[["","cdkTreeNodePadding",""]],inputs:{level:["cdkTreeNodePadding","level"],indent:["cdkTreeNodePaddingIndent","indent"]}});class fo{get recursive(){return this._recursive}set recursive(s){this._recursive=(0,Ln.Ig)(s)}constructor(s,d){this._tree=s,this._treeNode=d,this._recursive=!1}_toggle(s){this.recursive?this._tree.treeControl.toggleDescendants(this._treeNode.data):this._tree.treeControl.toggle(this._treeNode.data),s.stopPropagation()}}fo.\u0275fac=function(s){return new(s||fo)(e.Y36(Ge),e.Y36(xt))},fo.\u0275dir=e.lG2({type:fo,selectors:[["","cdkTreeNodeToggle",""]],hostBindings:function(s,d){1&s&&e.NdJ("click",function(ie){return d._toggle(ie)})},inputs:{recursive:["cdkTreeNodeToggleRecursive","recursive"]}});class Nl{}Nl.\u0275fac=function(s){return new(s||Nl)},Nl.\u0275mod=e.oAB({type:Nl}),Nl.\u0275inj=e.cJS({});const Dl=(0,gn.sb)((0,gn.Id)(xt));class Yl extends Dl{constructor(s,d,k){super(s,d),this.tabIndex=Number(k)||0}ngOnInit(){super.ngOnInit()}ngOnDestroy(){super.ngOnDestroy()}}Yl.\u0275fac=function(s){return new(s||Yl)(e.Y36(e.SBq),e.Y36(Ge),e.$8M("tabindex"))},Yl.\u0275dir=e.lG2({type:Yl,selectors:[["mat-tree-node"]],hostAttrs:[1,"mat-tree-node"],inputs:{role:"role",disabled:"disabled",tabIndex:"tabIndex"},exportAs:["matTreeNode"],features:[e._Bn([{provide:xt,useExisting:Yl}]),e.qOj]});class cu extends Ll{}cu.\u0275fac=function(){let H;return function(d){return(H||(H=e.n5z(cu)))(d||cu)}}(),cu.\u0275dir=e.lG2({type:cu,selectors:[["","matTreeNodeDef",""]],inputs:{when:["matTreeNodeDefWhen","when"],data:["matTreeNode","data"]},features:[e._Bn([{provide:Ll,useExisting:cu}]),e.qOj]});class Mr extends li{get disabled(){return this._disabled}set disabled(s){this._disabled=(0,Ln.Ig)(s)}get tabIndex(){return this.disabled?-1:this._tabIndex}set tabIndex(s){this._tabIndex=s??0}constructor(s,d,k,ie){super(s,d,k),this._disabled=!1,this.tabIndex=Number(ie)||0}ngOnInit(){super.ngOnInit()}ngAfterContentInit(){super.ngAfterContentInit()}ngOnDestroy(){super.ngOnDestroy()}}Mr.\u0275fac=function(s){return new(s||Mr)(e.Y36(e.SBq),e.Y36(Ge),e.Y36(e.ZZ4),e.$8M("tabindex"))},Mr.\u0275dir=e.lG2({type:Mr,selectors:[["mat-nested-tree-node"]],hostAttrs:[1,"mat-nested-tree-node"],inputs:{role:"role",disabled:"disabled",tabIndex:"tabIndex",node:["matNestedTreeNode","node"]},exportAs:["matNestedTreeNode"],features:[e._Bn([{provide:li,useExisting:Mr},{provide:xt,useExisting:Mr},{provide:Eu,useExisting:Mr}]),e.qOj]});class sl extends Sr{get level(){return this._level}set level(s){this._setLevelInput(s)}get indent(){return this._indent}set indent(s){this._setIndentInput(s)}}sl.\u0275fac=function(){let H;return function(d){return(H||(H=e.n5z(sl)))(d||sl)}}(),sl.\u0275dir=e.lG2({type:sl,selectors:[["","matTreeNodePadding",""]],inputs:{level:["matTreeNodePadding","level"],indent:["matTreeNodePaddingIndent","indent"]},features:[e._Bn([{provide:Sr,useExisting:sl}]),e.qOj]});class ld{constructor(s,d){this.viewContainer=s,this._node=d}}ld.\u0275fac=function(s){return new(s||ld)(e.Y36(e.s_b),e.Y36(Eu,8))},ld.\u0275dir=e.lG2({type:ld,selectors:[["","matTreeNodeOutlet",""]],features:[e._Bn([{provide:Mu,useExisting:ld}])]});class qo extends Ge{}qo.\u0275fac=function(){let H;return function(d){return(H||(H=e.n5z(qo)))(d||qo)}}(),qo.\u0275cmp=e.Xpm({type:qo,selectors:[["mat-tree"]],viewQuery:function(s,d){if(1&s&&e.Gf(ld,7),2&s){let k;e.iGM(k=e.CRH())&&(d._nodeOutlet=k.first)}},hostAttrs:["role","tree",1,"mat-tree"],exportAs:["matTree"],features:[e._Bn([{provide:Ge,useExisting:qo}]),e.qOj],decls:1,vars:0,consts:[["matTreeNodeOutlet",""]],template:function(s,d){1&s&&e.GkF(0,0)},dependencies:[ld],styles:[".mat-tree{display:block}.mat-tree-node{display:flex;align-items:center;flex:1;word-wrap:break-word}.mat-nested-tree-node{border-bottom-width:0}"],encapsulation:2});class ll extends fo{}ll.\u0275fac=function(){let H;return function(d){return(H||(H=e.n5z(ll)))(d||ll)}}(),ll.\u0275dir=e.lG2({type:ll,selectors:[["","matTreeNodeToggle",""]],inputs:{recursive:["matTreeNodeToggleRecursive","recursive"]},features:[e._Bn([{provide:fo,useExisting:ll}]),e.qOj]});class Hl{}Hl.\u0275fac=function(s){return new(s||Hl)},Hl.\u0275mod=e.oAB({type:Hl}),Hl.\u0275inj=e.cJS({imports:[Nl,gn.BQ,gn.BQ]});class Zc extends rs.o2{constructor(){super(...arguments),this._data=new g.X([])}get data(){return this._data.value}set data(s){this._data.next(s)}connect(s){return(0,ue.T)(s.viewChange,this._data).pipe((0,X.U)(()=>this.data))}disconnect(){}}var Vl,fc,Je,Vt,Kd,dp,lm,mg,mp,uu=p(56709),Es=p(90455),mc=p(31111),Yp=p(63834),Fs=p(10266),nc=p(19832),Pu=p(80645);class yl{constructor(){this.loading$=new l.x}getState(){return this.loading$.asObservable()}showLoading(){setTimeout(()=>{this.loading$.next(!0)},1)}hideLoading(){setTimeout(()=>{this.loading$.next(!1)},1)}}yl.\u0275fac=function(s){return new(s||yl)},yl.\u0275prov=e.Yz7({token:yl,factory:yl.\u0275fac,providedIn:"root"});class dl{constructor(s,d,k,ie){this.http=s,this.authService=d,this.environmentService=k,this.appStateService=ie}getAuthService(){return this.authService}getEnvironmentService(){return this.environmentService}getAppStateService(){return this.appStateService}}dl.\u0275fac=function(s){return new(s||dl)(e.LFG(ae.eN),e.LFG("AuthService"),e.LFG("EnvironmentService"),e.LFG("AppStateService"))},dl.\u0275prov=e.Yz7({token:dl,factory:dl.\u0275fac,providedIn:"root"});class Ti{constructor(s,d){this.http=s,this.siviProjectsGateway=d}saveEntity(s,d){return s&&s.id?this.http.put(this.formUrl(d),s,this.getCommonOptions()):this.http.post(this.formUrl(d),s,this.getCommonOptions())}sendEntity(s,d){return this.http.post(this.formUrl(d),s,this.getCommonOptions())}saveArray(s,d){return this.http.post(this.formUrl(d),s,this.getCommonOptions())}saveFile(s,d){const k=new FormData;return k.append("file",s),this.http.post(this.formUrl(d),k,this.getCommonOptions())}put(s,d,k){return k=k||this.getCommonOptions(),this.http.put(this.formUrl(d),s,k)}post(s,d,k){return k=k||this.getCommonOptions(),this.http.post(this.formUrl(s),d,k)}postMultipart(s,d){const k=new FormData;for(const ot in d)d.hasOwnProperty(ot)&&(d[ot]instanceof Array||(d[ot]=[d[ot]]),d[ot].forEach(Cn=>{const ir="application/json"===Cn.type?JSON.stringify(Cn.content):Cn.content,Yo=new Blob([ir],{type:Cn.type}),tl=Cn.content.name?[ot,Yo,Cn.content.name]:[ot,Yo];k.append(...tl)}));const ie=this.getCommonOptions();return this.http.post(this.formUrl(s),k,ie)}getFileWithProgress(s,d){const k=d||this.getCommonOptions(),ie=new ae.aW("GET",this.formUrl(s),null,{...k,responseType:"blob",reportProgress:!0});return this.http.request(ie)}postFileWithProgress(s,d,k){const ie=k||this.getCommonOptions(),ot=new FormData;ot.append("file",d,d.name);const Cn=new ae.aW("POST",this.formUrl(s),ot,{...ie,reportProgress:!0});return this.http.request(Cn)}patch(s,d){return this.http.patch(this.formUrl(d),s,this.getCommonOptions())}get(s,d){return d=d||this.getCommonOptions(),this.http.get(this.formUrl(s),d)}delete(s,d=this.getCommonOptions()){return this.http.delete(this.formUrl(s),d)}getCommonPageableSearchOptions(s=0,d=20,k=""){let ie=(new ae.LE).set("page",""+s).set("size",""+d);return k&&(ie=ie.set("sort",k)),{headers:this.getCommonSearchOptions().headers,params:ie}}getCommonSearchOptions(){return this.getCommonOptions()}getCommonOptions(){return{headers:this.siviProjectsGateway.getAuthService().getAuthorizationHeaders()}}getImage(s,d,k){return this.http.get(this.formUrl(s),d).pipe((0,X.U)(ie=>new Blob([ie],{type:"image/"+k}),ie=>(console.log(ie),(0,D.of)(null))))}getCommonPageableSearchOptionsMultipleSorts(s=0,d=20,k=[]){let ie=(new ae.LE).set("page",""+s).set("size",""+d);return k.length&&k.forEach(ot=>{ie=ie.append("sort",`${ot.active},${ot.direction}`)}),{headers:this.getCommonSearchOptions().headers,params:ie}}formUrl(s){return this.siviProjectsGateway.getEnvironmentService().getEnvironment().API+s}}Ti.\u0275fac=function(s){return new(s||Ti)(e.LFG(ae.eN),e.LFG(dl))},Ti.\u0275prov=e.Yz7({token:Ti,factory:Ti.\u0275fac,providedIn:"root"});class du{}du.NOTIFICATIONS_SHOW="NOTIFICATIONS_SHOW",du.NOTIFICATIONS_UNREAD_AMOUNT="NOTIFICATIONS_UNREAD_AMOUNT";class Kc{constructor(){this.eventQueue$=new g.X(null)}getEventQueue(){return this.eventQueue$.asObservable()}getEventQueueById(s){return this.getEventQueue().pipe((0,ve.h)(d=>d&&d.id===s),(0,X.U)(d=>d.data))}broadcastEvent(s,d){this.eventQueue$.next({id:s,data:d})}}Kc.\u0275fac=function(s){return new(s||Kc)},Kc.\u0275prov=e.Yz7({token:Kc,factory:Kc.\u0275fac,providedIn:"root"});class Wd{}!function(H){H.LOCALHOST="localhost",H.DEV1="https://dev1.cgivesa.fi/"}(Vl||(Vl={}));class bl{}class Sl{}class Nd{}class Hp{}class eu{}class ta{}class pu{}!function(H){H.THUMB="THUMB",H.TINY="TINY",H.SMALL="SMALL",H.MEDIUM="MEDIUM",H.ORIGINAL="ORIGINAL"}(fc||(fc={}));class Tu{}class cp{}class Ql{}class Tm extends Ql{}class Ro{}Ro.PAGE_NUMBER_FIRST=0,Ro.HIGH_API_RESPONSES=95,Ro.MAX_API_RESPONSES=999,Ro.PAGING_MAX_RESPONSES=20,Ro.PAGINATOR_PAGE_SIZES=[10,20,50,100,200,300],Ro.MAX_FILE_SIZE_IN_MEGABYTES=5,Ro.MAX_FILE_SIZE_IN_BYTES=5242880,Ro.CURRENT="CURRENT",Ro.FUTURE="FUTURE",Ro.EXPIRED="EXPIRED",Ro.DELETED="DELETED",Ro.DRAFT="DRAFT",Ro.PUBLISH="PUBLISH",Ro.SAVED="SAVED",Ro.SENT="SENT",Ro.CANCELLED="CANCELLED",Ro.FINAL="FINAL",Ro.TARGETCHILD="TARGETCHILD",Ro.NO_ID="no-id",Ro.NEW_ID="new",Ro.MODAL="modal",Ro.SETTINGS="settings",Ro.AUTOSAVE_WAIT_TIME=1e3,Ro.VALUES_UPDATE_WAIT_TIME=500,Ro.APPLICATION_AUTOSAVE_WAIT_TIME=2e3,Ro.APPLICATION_DEFAULT_MIN_PREFERRED_UNITS=2,Ro.APPLICATION_DEFAULT_MAX_PREFERRED_UNITS=3,Ro.FILTER_WAIT_TIME=1e3,Ro.VALIDATOR_WAIT_TIME=100,Ro.NFC_READ_WAIT_TIME=2e3,Ro.YES="yes",Ro.NO="no",Ro.PROFESSIONAL_LOGIN_METHOD_PREFIX="OAUTH2",Ro.BACKEND_ERROR_PREFIX="Backend.Error.",Ro.TRANSLATED_UI_LANGUAGES=["fi","sv","en"],Ro.MIDNIGHT_IN_MINUTES_START=0,Ro.MIDNIGHT_IN_MINUTES_END=1440,Ro.MINUTES_IN_HOUR=60,Ro.FUSE_SEARCH_THRESHOLD=.1,Ro.FUSE_MIN_MATCH_CHARACTERS=3,Ro.FUSE_SEARCH_DISTANCE=1,Ro.ROLE_TYPE_PROFESSIONAL="professional",Ro.ROLE_TYPE_GUARDIAN="guardian",Ro.ECEC="early-childhood-education",Ro.NO_SERVICE_FORMAT="noServiceFormat",Ro.EDUCATION="education",Ro.ANY_FDCP="ECEC.Application.Instructions.FamilyDaycare";class Fo{}Fo.MUNICIPALITY="sivi.organization.type.municipality",Fo.MUNICIPALITY_AREA="sivi.organization.type.municipalityarea",Fo.DAYCAREPLACE="sivi.organization.type.daycareplace.type",Fo.DAYCAREPLACE_TYPE_OPEN_DAYCARE="sivi.organization.type.daycareplace.type.opendaycare",Fo.DAYCAREPLACE_TYPE_FAMILY_DAYCARE="sivi.organization.type.daycareplace.type.familydaycare",Fo.DAYCAREPLACE_TYPE_GROUP_FAMILY_DAYCARE="sivi.organization.type.daycareplace.type.groupfamilydaycare",Fo.DAYCAREPLACE_TYPE_DAYCARE_CENTRE="sivi.organization.type.daycareplace.type.daycarecentre",Fo.DAYCAREPLACE_GROUP="sivi.organization.type.daycareplace.group",Fo.DAYCAREPLACE_GROUP_PRESCHOOL="sivi.organization.type.daycareplace.group.preschool",Fo.DAYCAREPLACE_GROUP_REGULAR="sivi.organization.type.daycareplace.group.regular",Fo.SCHOOL="sivi.organization.type.school.type",Fo.SCHOOL_TYPE_SCHOOL="sivi.organization.type.school.type.school",Fo.MUNICIPALITY_AREA_CODE="sivi.organization.type.municipalityarea",Fo.ORGANIZATION_TYPE_GENERAL="sivi.organization.type.general",Fo.ORGANIZATION_TYPE_AREA="sivi.organization.type.area-department",Fo.ORGANIZATIONAL_AREA="sivi.organization.type.area",Fo.MUNICIPALITY_SHORT="municipality",Fo.ORGANIZATION_GENERAL_SHORT="general",Fo.DAYCAREPLACE_SHORT="unit",Fo.DAYCAREPLACE_GROUP_SHORT="group",Fo.MUNICIPALITY_AREA_USAGE="sivi.organization.type.municipalityarea.usage",Fo.EDUCATION="sivi.organization.type.municipalityarea.usage.education",Fo.EARLY_CHILDHOOD_AND_EDUCATION="sivi.organization.type.municipalityarea.usage.early-childhood-education",Fo.ECEC_AND_EDUCATION="sivi.organization.type.municipalityarea.usage.ecec-and-education",Fo.ORGANIZATION_FORMAT_PUBLIC="sivi.organization.type.daycareplace.format.public",Fo.ORGANIZATION_FORMAT_PRIVATE="sivi.organization.type.daycareplace.format.private",Fo.FAMILY_DAYCARE_TYPES=[Fo.DAYCAREPLACE_TYPE_FAMILY_DAYCARE],Fo.GOVERNMENT_OID="organization.attribute.government.oid";class vs{}vs.PREFERRED_SERVICE_TYPE="sivi.municipality.communication.preference.preferred.service.type",vs.PREFERRED_SERVICE_TYPE_TEXT_MESSAGE="sivi.municipality.communication.preference.preferred.service.type.textmessage",vs.PREFERRED_SERVICE_TYPE_EMAIL="sivi.municipality.communication.preference.preferred.service.type.email",vs.PREFERRED_SERVICE_TYPE_CGI_VESA="sivi.municipality.communication.preference.preferred.service.type.cgi.vesa",vs.OFFICIAL_DECISION="sivi.municipality.communication.preference.official.decision",vs.OFFICIAL_DECISION_TYPE_SUOMI_FI="sivi.municipality.communication.preference.official.decision.type.suomi.fi",vs.OFFICIAL_DECISION_TYPE_PAPER_POST="sivi.municipality.communication.preference.official.decision.type.paper.post";class _e{}_e.ACTIVITY_FOCUS="sivi.unit.code.type.activityfocus.",_e.ORGANIZATIONAL_FORM="sivi.unit.code.type.organizationalform.",_e.EDUCATIONAL_SYSTEM="sivi.unit.code.type.educationalsystem.",_e.LANGUAGEFOCUSEXTENT="sivi.organization.languagefocus.extent",_e.DAYCARE_PLACE_TYPE="sivi.organization.type.daycareplace.type.";class $e{}$e.PPE="sivi.organization.type.application.type.ppe",$e.CLUB="sivi.organization.type.application.type.club",$e.ECEC="sivi.organization.type.application.type.ecec",$e.PPEWITHECEC="sivi.organization.type.application.type.ppewithecec",$e.VC_ECEC="Application.Type.VC_ECEC",$e.C_ECEC="Application.Type.C_ECEC",$e.V_ECEC="Application.Type.V_ECEC";class Tt{}Tt.ECEC="sivi.organization.type.decision.type.ecec",Tt.PPE="sivi.organization.type.decision.type.ppe",Tt.CLUB="sivi.organization.type.decision.type.club",Tt.OPEN_DAYCARE="sivi.organization.type.decision.type.opendaycare",Tt.VOUCHER="sivi.organization.type.decision.type.voucher",Tt.PURCHASE="sivi.organization.type.decision.type.purchase";class Me{}Me.DATERANGE="DATERANGE",Me.ACTIVE="ACTIVE",Me.ENDED="ENDED";class N{}N.PPE="PPE",N.CLUB="CLUB",N.ECEC="ECEC",N.PPEWITHECEC="PPEWITHECEC",N.VC_ECEC="VC_ECEC",N.C_ECEC="C_ECEC",N.V_ECEC="V_ECEC",N.ALL_PLACEMENT_TYPES=[N.VC_ECEC,N.C_ECEC,N.V_ECEC];class O{}O.ECEC="ECEC",O.ECEC_COMPLEMENTING="C_ECEC",O.ECEC_VOUCHER="V_ECEC",O.ECEC_COMPLEMENTING_VOUCHER="VC_ECEC";class Ce{}Ce.PPE="sivi.organization.type.decision.type.ppe",Ce.CLUB="sivi.organization.type.decision.type.club",Ce.ECEC="sivi.organization.type.decision.type.ecec",Ce.C_ECEC="sivi.organization.type.placement.ecec.complementing",Ce.V_ECEC="sivi.organization.type.placement.ecec.voucher",Ce.VC_ECEC="sivi.organization.type.placement.ecec.complementing-voucher",function(H){H.DRAFT="DRAFT",H.SAVED="SAVED",H.WAITING_FOR_MORE_INFO="WAITING_FOR_MORE_INFO",H.BACK_FROM_HANDLING="BACK_FROM_HANDLING",H.IN_HANDLING="IN_HANDLING",H.WAITING_FOR_PRE_PLACEMENT="WAITING_FOR_PRE_PLACEMENT",H.IN_PRE_PLACEMENT="IN_PRE_PLACEMENT",H.IN_PLACEMENT="IN_PLACEMENT",H.DECISION_MADE="DECISION_MADE",H.DECISION_SENT="DECISION_SENT",H.APPROVED="APPROVED",H.REJECTED="REJECTED",H.DISAPPROVED="DISAPPROVED",H.CANCELLED="CANCELLED",H.VOUCHER_PENDING="VOUCHER_PENDING",H.FINAL="FINAL"}(Je||(Je={})),function(H){H.REPLACE_DECISION="REPLACE_DECISION",H.CHANGE_DECISION="CHANGE_DECISION",H.NULLIFY_DECISION="NULLIFY_DECISION"}(Vt||(Vt={}));class Rr{}Rr.ECEC="ECEC",Rr.PPE="PPE",Rr.CLUB="CLUB",Rr.VOUCHER="VOUCHER",Rr.ECEC_VOUCHER="V_ECEC",Rr.ECEC_COMPLEMENTING_VOUCHER="VC_ECEC",Rr.PURCHASE="PURCHASE";class wo{}wo.DAYCARE_CENTRE="DAYCARECENTER",wo.GROUP_FAMILY_DAYCARE="GROUP_FAMILY_DAYCARE",wo.FAMILY_DAYCARE="FAMILY_DAYCARE",wo.OPEN_DAYCARE="OPEN_DAYCARE";class ua{}ua.APPROVED="APPROVED",ua.DISAPPROVED="DISAPPROVED",ua.NULLIFIED="NULLIFIED",ua.CANCELLED="CANCELLED";class Ls{}Ls.APPROVED="sivi.decision.status.approved",Ls.DISAPPROVED="sivi.decision.status.disapproved",Ls.NULLIFIED="sivi.decision.status.nullified",Ls.CANCELLED="sivi.decision.status.cancelled";class Ws{}Ws.APPROVED="APPROVED",Ws.DECLINED="DECLINED",Ws.WAITING="WAITING";class tu{}tu.DRAFT_APPLICATION="DRAFT_APPLICATION_MESSAGE",tu.SAVED_APPLICATION="SAVED_APPLICATION_MESSAGE";class Sc{}Sc.APPLICATION="ApplicationAttachment",Sc.CHILD="ChildInfoAttachment",Sc.PERSON_ATTACHMENT="personAttachment",Sc.PROFILE_PICTURE="ProfileMainPicture";class Um{}Um.PERSON_SUBSCRIPTION="sivi.subscription.type.message.person";class ic{}ic.ALPHABETS=/^['a-zA-Z\xc0-\u017e\u0430-\u044f\u0410-\u042f\s-]+$/,ic.ALPHANUMERIC=/^([a-zA-Z\xc0-\u017e\u0430-\u044f\u0410-\u042f0-9\s])+$/,ic.FINNISH_ALPHABET_WITH_SPECIAL=/^([a-zA-Z0-9\xe5\xe4\xf6\xc5\xc4\xd6@._\-])+$/,ic.ONLYNUMBERS=/^([0-9])+$/,ic.NUMBERSWITHDECIMAL=/^[0-9]{1,}([,.][0-9]{1,2})?$/,ic.EMAIL=/^(?!.{100})(?!\.)(?!.*\.@)(?!.*\.\.)[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@(?!\.)(?!-)(?!.*\.\.)(?!.*-\.)[a-z0-9-.]+\.[a-z0-9]{2,14}$/,ic.SPACE=/^\s/,ic.PHONE_NUMBER=/^[+][0-9\s]{2,19}$|^[0-9\s]{3,20}$/,ic.POSTAL_CODE=/\d{5}/g,ic.HOUR_24FORMAT=/^([0-9]|0[0-9]|1[0-9]|2[0-3]):[0-5][0-9]$/,ic.HOUR_24FORMAT_STRICT=/^(0[0-9]|1[0-9]|2[0-3]):[0-5][0-9]$/,ic.CURRENCY_STRING=/^([0-9]+[0-9\s]*[,.]{0,1}[0-9]{0,2}){0,1}$/,ic.CURRENCY_STRING_WITH_NEGATIVES=/^(-?[0-9]+[0-9\s]*[,.]{0,1}[0-9]{0,2}){0,1}$/,ic.NUMERIC_INTEGER=/^(-?\d+)?$/,ic.NUMERIC_INTEGER_PART=/^(-?\d*)?$/;class mu{}mu.PHONE=20,mu.POSTALCODE=5,mu.DEFAULT=100,mu.INFORMATION=200,mu.MESSAGE_LENGTH_300=300,mu.MESSAGE_LENGTH_4000=4e3;class us{}us.ADDRESS="address",us.HOME="home",us.WORK="work",us.EMAIL="email",us.PHONE="phone",us.ADDRESS_TYPE="sivi.contact.type.address",us.ADDRESS_TYPE_ORGANIZATION_PHYSICAL="sivi.contact.type.address.organization.physical",us.ADDRESS_TYPE_POSTAL_ADDRESS="sivi.contact.type.address.organization.postal",us.ADDRESS_POSTAL_TYPE="sivi.contact.type.postal.address",us.ADDRESS_HOME_TYPE="sivi.contact.type.address.home",us.ADDRESS_WORK_TYPE="sivi.contact.type.address.work",us.ADDRESS_PERMANENT="sivi.contact.type.address.personal.permanent",us.ADDRESS_PERSONAL_PERMANENT_TYPE="sivi.contact.type.address.personal.permanent",us.EMAIL_TYPE="sivi.contact.type.email",us.EMAIL_ECEC_TYPE="sivi.contact.type.ecec.email",us.EMAIL_HOME_TYPE="sivi.contact.type.email.home",us.EMAIL_WORK_TYPE="sivi.contact.type.email.work",us.PHONE_TYPE="sivi.contact.type.phone",us.PHONE_ECEC_TYPE="sivi.contact.type.ecec.phone",us.PHONE_HOME_TYPE="sivi.contact.type.phone.home",us.PHONE_WORK_TYPE="sivi.contact.type.phone.work",us.TEXT_MESSAGE="sivi.contact.type.textmessage",us.UI_MESSAGE="sivi.contact.type.uimessage",us.DOCUMENT_TEXT="sivi.contact.type.documenttext",us.MUNICIPALITY_ACCESSIBILITY_EMAIL="sivi.contact.type.accessibility.email";class Gg{}Gg.ECEC="ECEC",Gg.PPE="PPE",Gg.CLUB="CLUB",Gg.PPE_WITH_ECEC="PPEWITHECEC";class cd{}cd.ENROLMENT="APPLICATION_ENROLLMENT_MOREINFO",cd.SPECIAL_NEEDS="SPECIAL_NEEDS",cd.MEDICINE_OR_THERAPHY="MEDICINE_OR_THERAPHY",cd.CHILD_RESIDES="CHILD_RESIDES",cd.WITH_BOTH_GUARDIANS="WITH_BOTH_GUARDIANS",cd.WITH_ONE_GUARDIAN="WITH_ONE_GUARDIAN",cd.SHARED_RESIDENCE="SHARED_RESIDENCE",cd.ELSEWHERE="ELSEWHERE",cd.PLACE_OF_DOMICILE="PLACE_OF_DOMICILE",cd.PETS_AT_HOME="PETS_AT_HOME",cd.PERSON_OID="PERSON_OID";class ds{}ds.FINNISH="fi",ds.SWEDISH="sv",ds.ENGLISH="en",ds.RUSSIAN="ru";class xm{}xm.FINNISH="General.Language.Finnish",xm.SWEDISH="General.Language.Swedish",xm.ENGLISH="General.Language.English",xm.RUSSIAN="General.Language.Russian";class Ns{}Ns.UNDER_3Y_OR_SAME="Age.UnderThreeOrSame",Ns.OVER_3Y="Age.OverThree";class Dm{}Dm.ENRICHED="sivi.organization.languagefocus.extent.languageenrichededucation",Dm.EXTENSIVE="sivi.organization.languagefocus.extent.extensivebilingualeducation",Dm.IMMERSION="sivi.organization.languagefocus.extent.languageimmersion";class rc{}rc.Modal="modal",rc.TEMPLATE="template",rc.THEME="theme",rc.MUNICIPALITY_EDITOR="municipality-editor",rc.ORGANIZATION_GENERAL_EDITOR="organization-general-editor",rc.UNIT_EDITOR="unit-editor",rc.GROUP_EDITOR="group-editor",rc.HIERARCHY_MODAL="hierarchy-modal",rc.ACCESSIBILITY_INFO="accessibility-info",rc.SEARCH_PERSON="search-person",rc.MERGE_PERSON="merge-person",rc.GUARDIAN_EDITOR="guardian-editor",rc.CHOOSE_GUARDIAN="choose-guardian",rc.NEW_INCOME_STATEMENT_REQUEST="new-income-statement-request",rc.FEE_OR_VALUE_DECISION_ID="fee-or-value-decision-id",rc.CHILD_EDITOR="child-editor",rc.ADD_GUARDIANSHIP="add-guardianship",rc.HOUSEHOLD="household",rc.QUEUE_ROW_DETAILS="queue-row-details",rc.INVOICING_ROW_DETAILS="invoicing-row-details",rc.INVOICED_ROW_DETAILS="invoiced-row-details",rc.FEE_DECISION_ID="fee-decision-id";class sm{}sm.ENTER="Enter",sm.SPACE=" ";class Xu{}Xu.VANTAA="092",Xu.UNKNOWN="199";class Td{}Td.THANKS_MESSAGE="thanksmessage";class pg{}pg.LANGUAGE="sivi.user.preference.type.language",pg.MENU="sivi.user.preference.type.menu",pg.MUNICIPALITY="sivi.user.preference.type.municipality",pg.MENU_ROLE_GUARDIAN="sivi.user.preference.type.menu.role.guardian",pg.MENU_ROLE_PROFESSIONAL="sivi.user.preference.type.menu.role.professional";class ud{}ud.MAIN_TYPE="sivi.person.info.child.resides",ud.BOTH_GUARDIANS="sivi.person.info.child.resides.type.with-both-guardians",ud.ONE_GUARDIAN="sivi.person.info.child.resides.type.with-one-guardian",ud.SHARED_RESIDENCE="sivi.person.info.child.resides.type.shared-residence",ud.ELSEWHERE="sivi.person.info.child.resides.type.elsewhere";class Vp{}Vp.PLACE_OF_DOMICILE="sivi.contact.type.address.personal.place-of-domicile",Vp.MEDICINE_OR_THERAPHY="sivi.person.info.type.medicine-or-theraphy",Vp.BOTH_GUARDIANS="sivi.person.info.child.resides.type.with-both-guardians",Vp.PETS_AT_HOME="sivi.person.info.type.pets-at-home",Vp.PERSON_OID="person.oid";class Wg{}Wg.MOTHER_TONGUE="sivi.person.language.type.mother-tongue",Wg.SPOKEN_AT_HOME="sivi.person.language.type.spoken-at-home",Wg.COMMUNICATION_LANGUAGE="sivi.person.language.type.communication-language";class ql{}ql.RESIDENT_TYPE="sivi.person.relation.guardian.type.resident",ql.NON_RESIDENT_TYPE="sivi.person.relation.guardian.type.non-resident",ql.SPOUSE_TYPE="sivi.person.relation.guardian.type.spouse-guardian",ql.PERIPHERAL_TYPE="sivi.person.relation.guardian.type.peripheral-guardian",ql.SUBSTITUTE_TYPE="sivi.person.relation.guardian.type.substitute-guardian";class Bd{}Bd.BROWSER="browser",Bd.NATIVE="native";class Xl{}Xl.EMPLOYEE_OR_ENTREPRENEUR="sivi.person.employmentinfo.type.employee-or-entrepreneur",Xl.STUDENT="sivi.person.employmentinfo.type.student",Xl.JOBSEEKER="sivi.person.employmentinfo.type.job-applicant",Xl.OTHER="sivi.person.employmentinfo.type.other";class gh{}gh.FULLTIME="sivi.person.employment.type.fulltime",gh.PARTTIME="sivi.person.employment.type.parttime";class Zp{}Zp.WORK="Form.Label.WorkPlace",Zp.STUDY="Form.Label.StudyPlace";class $d{}$d.GUARDIAN="sivi.person.type.guardian",$d.CHILD="sivi.person.type.child";class dd{}dd.DELETE="delete",dd.EDIT="edit",dd.ADD="add",dd.MOVE_UP="move_up",dd.MOVE_DOWN="move_down";class fu{}fu.TERMS_AND_CONDITIONS="sivi.userlogin.consent.termsandconditions",fu.COOKIES="sivi.userlogin.consent.cookie";class up{}up.ACUTE="sivi.application.handling.type.acute",up.QUICK_HANDLING="sivi.application.handling.type.quick-handling",up.MONTHS_BETWEEN=4,up.DAYS_BETWEEN=14;class jd{}jd.NON_DISCLOSURE="NON_DISCLOSURE",jd.NON_DICSLOSURE_CONTACT_TYPE="sivi.contact.type.non-disclosure";class hu{}hu.REMOTE_DEV="remote-dev",hu.DEV="dev",hu.DEV1="dev1",hu.SIT="sit",hu.SIT2="sit2",hu.UAT="uat",hu.TEST="test",hu.DEMO="demo",hu.PREPROD="preprod",hu.PERF="perf",hu.PRODUCTION="prod",hu.LOCAL_VM="local-vm",hu.LOCAL_PROD="prod-local",hu.TRAINING="training",hu.DEV_LIETO="dev-lieto",hu.TEST_LIETO="test-lieto",hu.TRAINING_LIETO="training-lieto",hu.QA="QA",hu.E2E="e2e",hu.E2E1="e2e1",function(H){H.MON_FRI="sivi.municipality.settings.type.weeklycaretime.mon-fri",H.MON_FRI_MORNINGS="sivi.municipality.settings.type.weeklycaretime.mon-fri-mornings",H.MON_FRI_EVENINGS="sivi.municipality.settings.type.weeklycaretime.mon-fri-evenings",H.MON_FRI_LATE_EVENINGS="sivi.municipality.settings.type.weeklycaretime.mon-fri-late-evenings",H.MON_FRI_FULL_EVENINGS="sivi.municipality.settings.type.weeklycaretime.mon-fri-full-evenings",H.WEEKENDS="sivi.municipality.settings.type.weeklycaretime.weekends",H.ROUND_THE_CLOCK="sivi.municipality.settings.type.weeklycaretime.round-the-clock"}(Kd||(Kd={}));class as{}as.FINNISH_ANGULAR="d.M.yyyy",as.FINNISH_ANGULAR_WITH_TIME="d.M.yyyy HH:mm",as.FINNISH_ANGULAR_WITH_TIME_AND_SECONDS="d.M.yyyy HH:mm:ss",as.FINNISH_MOMENT="D.M.YYYY",as.FINNISH_MOMENT_WITH_TIME="D.M.YYYY HH:mm",as.FINNISH_MOMENT_WITH_TIME_AND_SECONDS="D.M.YYYY HH:mm:ss",as.STANDARD="YYYY-MM-DD",as.STANDARD_WITH_TIME="YYYY-MM-DDTHH:mm:ssZ",as.STANDARD_WITH_TIME_AND_MILLISECONDS="YYYY-MM-DDTHH:mm:ss.SSS[Z]",as.STANDARD_MIN_DATE="1900-01-01",as.STANDARD_MAX_DATE="2100-12-31",as.PERSON_SEARCH_FILTER="DDMMYY",as.TIME_WITH_LEADING_ZEROES="HH:mm",as.TIME_WITHOUT_LEADING_ZEROES="H.mm";class ed{}ed.MONDAY="MONDAY",ed.TUESDAY="TUESDAY",ed.WEDNESDAY="WEDNESDAY",ed.THURSDAY="THURSDAY",ed.FRIDAY="FRIDAY",ed.SATURDAY="SATURDAY",ed.SUNDAY="SUNDAY",ed.MON_FRI="MON_FRI",ed.MON_SUN="MON_SUN",ed.SAT_SUN="SAT_SUN",function(H){H.DRAFT="DRAFT",H.APPLICATION_SENT="APPLICATION_SENT",H.WAITING_FOR_MORE_INFO="WAITING_FOR_MORE_INFO",H.BACK_FROM_HANDLING="BACK_FROM_HANDLING",H.WAITING_FOR_HANDLING="WAITING_FOR_HANDLING",H.IN_HANDLING="IN_HANDLING",H.WAITING_FOR_PRE_PLACEMENT="WAITING_FOR_PRE_PLACEMENT",H.IN_PRE_PLACEMENT="IN_PRE_PLACEMENT",H.IN_PLACEMENT="IN_PLACEMENT",H.DECISION_MADE="DECISION_MADE",H.DECISION_SENT="DECISION_SENT",H.APPROVED="APPROVED",H.REJECTED="REJECTED",H.DISAPPROVED="DISAPPROVED",H.CANCELLED="CANCELLED",H.VOUCHER_PENDING="VOUCHER_PENDING",H.FINAL="FINAL",H.PERMISSIONS_ADDED="PERMISSIONS_ADDED",H.PERMISSIONS_REMOVED="PERMISSIONS_REMOVED",H.EDITED="EDITED"}(dp||(dp={}));class Gp{}Gp.AppStoreLink="https://itunes.apple.com/gb/app/id1477037174",Gp.GooglePlayLink="market://details?id=com.cgi.vesa";class td{}td.VALID="VALID",td.INVALID="INVALID",td.PENDING="PENDING",td.DISABLED="DISABLED",function(H){H.INCOME="INCOME",H.DEDUCTION="DEDUCTION"}(lm||(lm={})),function(H){H.UP="UP",H.DOWN="DOWN",H.OUT_OF_SERVICE="OUT_OF_SERVICE",H.UNKNOWN="UNKNOWN"}(mg||(mg={}));class Mf{}class pp{}class b_{}class Nh{}class _h extends Ql{}class Jd extends Ql{}class cm{}class um extends _h{constructor(){super()}}class Cl{}class Sa{}class pd{}class Sm{}class zm extends _h{constructor(){super()}}class J_ extends _h{constructor(){super()}}class uc extends _h{}class vh extends _h{constructor(){super()}}class $g extends Ql{constructor(){super()}}class C_ extends Ql{constructor(){super()}}class yr{}class Eb extends Ql{constructor(){super()}}class Q_ extends Ql{constructor(){super()}}class xd extends Ql{constructor(){super()}}class q_ extends _h{}class $f extends _h{}class jf{}class rf{}class E_{}class nu extends Ql{}class Va{}!function(H){H.PRIVATE="sivi.organization.type.daycareplace.format.private",H.PUBLIC="sivi.organization.type.daycareplace.format.public"}(mp||(mp={}));class M_{}class Wp{}class X_ extends Ql{}class fp extends Ql{}class Bh{}class Uh extends fp{}class ev{}class zh extends fp{constructor(){super()}}class Tf{}class xf extends Ql{constructor(){super()}}class Ud extends fp{}class Rp extends Ql{constructor(){super()}}class Kf{}class fg extends Ql{}class jo extends Ql{}class Ou{}Ou.CURRENT="CURRENT",Ou.FUTURE="FUTURE",Ou.EXPIRED="EXPIRED",Ou.DELETED="DELETED";class Ja{}class $p extends Ql{}class tv{}class hg{}class Lt{}Lt.ORGANIZATION_MEMBER="ROLE_ORGANIZATION_MEMBER",Lt.GENERAL_ADMIN="ROLE_GENERAL_ADMIN",Lt.MUNICIPALITY_ADMIN="ROLE_ORGANIZATION_ADMIN",Lt.USER="ROLE_USER",Lt.GUARDIAN="ROLE_MUNICIPALITY_MEMBER",Lt.CHILD="ROLE_CHILD",Lt.NON_DISCLOSURE="ROLE_NON_DISCLOSURE",Lt.GUARDIAN_USER="ROLE_GUARDIAN",Lt.ECEC_LEAD="ROLE_ECEC_LEAD",Lt.DCP_CHIEF="ROLE_DCP_CHIEF",Lt.DCP_TEACHER="ROLE_DCP_TEACHER",Lt.DCP_CHILDCARER="ROLE_DCP_CHILDCARER",Lt.CHILDMINDER="ROLE_DCP_CHILDMINDER",Lt.SERVICE_ADVISER="ROLE_INFO_POINT_COUNSELOR",Lt.ECEC_SERVICE_COUNSELOR="ROLE_SERVICE_COUNSELOR",Lt.SPECIAL_EDUCATION_TEACHER="ROLE_SPECIAL_EDUCATION_TEACHER",Lt.MUNICIPALITY_STATISTICS="ROLE_MUNICIPALITY_STATISTICS",Lt.DCP_STAFF=[Lt.DCP_CHIEF,Lt.DCP_TEACHER,Lt.DCP_CHILDCARER,Lt.CHILDMINDER],Lt.FINANCIAL_LEAD="ROLE_FINANCIAL_LEAD",Lt.PRIVATE_SERVICE_PROVIDER="ROLE_PRIVATE_SERVICE_PROVIDER",Lt.SERVICE_SECRETARY="ROLE_SERVICE_SECRETARY",Lt.ECEC_PROFESSIONALS=[...Lt.DCP_STAFF,Lt.ECEC_SERVICE_COUNSELOR,Lt.ECEC_LEAD],Lt.MUNICIPALITY_SUPPORT="ROLE_MUNICIPALITY_SUPPORT",Lt.ALL_PROFESSIONALS=[...Lt.ECEC_PROFESSIONALS,Lt.SERVICE_ADVISER,Lt.MUNICIPALITY_ADMIN,Lt.MUNICIPALITY_SUPPORT];class Am{}class yh{}const Lu={CONNECT:"CONNECT",CONNECT_SUCCESS:"CONNECT_SUCCESS",CONNECT_ERROR:"CONNECT_ERROR",DISCONNECT:"DISCONNECT",SUBSCRIBE_CHANNEL:"SUBSCRIBE_CHANNEL",UNSUBSCRIBE_CHANNEL:"UNSUBSCRIBE_CHANNEL",UNSUBSCRIBE_CHANNEL_SUCCESS:"UNSUBSCRIBE_CHANNEL_SUCCESS",WORKER_MESSAGE:"WORKER_MESSAGE"};class T_ extends E.y{constructor(s,d){super(s),this.port=d}close(){this.port.postMessage({type:Lu.UNSUBSCRIBE_CHANNEL})}}var bh,hp;!function(H){H.WARNING="WARNING",H.SUCCESS="SUCCESS",H.INFO="INFO"}(bh||(bh={})),function(H){H.UPDATING_SERVICE="/error/updating-service",H.ACCESS_DENIED="/error/access-denied",H.NOT_FOUND="/error/not-found",H.NOT_SUPPORTED_BROWSER="/error/not-supported-browser"}(hp||(hp={}));class Yh extends Ql{}class gg{}class Ym{static containsAtleastOneDigit(s){return s.match(".*[0-9].*")}static containsAtleastOneCharacterLowerCase(s){return s.match(".*[a-z]|[\xe4\xf6\xe5].*")}static containsAtleastOneCharacterUpperCase(s){return s.match(".*[A-Z]|[\xc4\xd6\xc5].*")}static containsAtleastOneSpecialCharacter(s){return s.match(".*[!@#$%^&'()-+,*./:_;<=>?~{|}].*")}}class co extends Ym{static arrayByKeyToListUppercase(s,d){return s.map(k=>{if(k[d])return k[d].toUpperCase();console.error("Utils.arrayByKeyToListUppercase property not found by key",d)}).join(", ")}static flattenNestedArray(s,d){const k=(0,tt.Z)(s);delete k[d];const ie=[k];if(s[d])for(const ot of s[d])ie.push(...co.flattenNestedArray(ot,d));return ie}static arrayByKeysToList(s,d){if(s)return s.map(k=>d.map(ie=>{if(k[ie])return k[ie];console.warn("Utils.arrayByKeysToList property not found by key",ie)}).join(" ")?.trim()).join(", ")?.trim()}static filterObjectKeys(s,d){if(s&&s.length>0){const k=[];return s.forEach(ie=>{const ot=Object.keys(ie).filter(Cn=>d.includes(Cn)).reduce((Cn,ir)=>(Cn[ir]=ie[ir],Cn),{});k.push(ot)}),k}}static checkIfFilteredObjectExists(s,d,k){return!!d.length&&d.some(ie=>this.compareObjectProperties(s,ie,k))}static compareObjectProperties(s,d,k){return(0,Ne.Z)((0,wt.Z)(s,k),(0,wt.Z)(d,k))}static getSinglePropertyFromObjectArray(s,d){const k=[];if(!d)return k;for(const ie of d)ie[s]&&k.push(ie[s]);return k}static getDateOfBirthFromPIC(s){if(!s||11!==s.length)return;const d=s.substr(0,2),k=s.substr(2,2);let ie=s.substr(4,2);switch(s.substr(6,1)){case"+":ie="18"+s.substr(4,2);break;case"-":ie="19"+s.substr(4,2);break;case"A":ie="20"+s.substr(4,2);break;default:console.error("Invalid year indicator on pic",s)}return Nn(d+k+ie,"DDMMYYYY").format("YYYY-MM-DD")}static getAutocompleteOptions(s){return s.map(d=>({element:{text:d.name},value:d}))}static removeEmptyValues(s){if(s)return Object.keys(s).forEach(d=>{const k=Array.isArray(s[d])&&0===s[d].length,ie=void 0===s[d],ot=null===s[d],Cn=""===s[d];k||ie||ot||Cn?delete s[d]:s[d]&&"object"==typeof s[d]&&co.removeEmptyValues(s[d])}),s;console.error("removeEmptyValues: No object given")}static convertNumbersToStrings(s){if(!s)return void console.error("convertNumbersToStrings: No object given");const d=Object.entries(s).reduce((k,[ie,ot])=>({...k,[ie]:(0,ft.Z)(ot)?(0,Ct.Z)(ot):(0,rn.Z)(ot)?co.convertNumbersToStrings(ot):ot}),{});return(0,He.Z)(s)?Gi(d):d}static removeEmptyProperties(s){return Object.keys(s).forEach(d=>""===s[d]||null===s[d]||void 0===s[d]?delete s[d]:""),s}static moveItemInArray(s,d,k){return k>=s.length&&(k=s.length-1),s.splice(k,0,s.splice(d,1)[0]),s}static convertDateToFinnishStandard(s,d=as.FINNISH_MOMENT){return s&&(Nn(s).isValid()?Nn(s).format(d):Nn(s,as.FINNISH_MOMENT).format(d))}static getSelectOptionsFromArray(s,d,k,ie){if(!s||!s.length)return void console.error("getSelectOptionsFromArray given elements parameter is not an array!",s);const ot=[];for(const Cn of s)ot.push({value:Cn[d],text:ie?Cn[k]+" "+Cn[ie]:Cn[k]});return ot}static getObjectDiff(s,d){return function k(ie,ot){return ui(ie,function(Cn,ir,Yo){(0,Ne.Z)(ir,ot[Yo])||(Cn[Yo]=(0,rn.Z)(ir)&&(0,rn.Z)(ot[Yo])?k(ir,ot[Yo]):ir)})}(s,d)}static convertDateToTime(s,d){return Nn(s).format(d)}static convertDateToTimeOrDate(s,d=as.TIME_WITH_LEADING_ZEROES){return Nn().utc(!0).format("YYYY-MM-DD")!==Nn(s).utc(!0).format("YYYY-MM-DD")?this.convertDateToFinnishStandard(s):this.convertDateToTime(s,d)}static convertDateToLocalDate(s){const d=Nn().utcOffset();return Nn(s).utcOffset(d).local(!0).toISOString()}static getStartOfDay(s){const d=Nn(s,Nn.ISO_8601);return d.isValid()?d.startOf("day").toISOString():s||null}static getEndOfDay(s){const d=Nn(s,Nn.ISO_8601);return d.isValid()?d.endOf("day").toISOString():s||null}static compareByLang(s,d,k){return new Intl.Collator(s).compare(d,k)}static compareByDate(s,d,k="desc"){const ie=Nn(s).isBefore(Nn(d));return"desc"===k?ie?1:-1:ie?-1:1}static patchCollectionBy(s,d,k){return(d instanceof Array?d:[d]).forEach(ot=>{const Cn=s.findIndex(ir=>ir[k]===ot[k]);Cn>-1?s.splice(Cn,1,ot):s.push(ot)}),s}static patchImmutableCollectionBy(s,d,k){const ie=(0,tt.Z)(s);return co.patchCollectionBy(ie,d,k)}static createAttachmentFile(s,d,k){const ie=new Blob(s,{type:k});return ie.name=d,ie.lastModified=Nn().milliseconds(),ie}static copyFile(s){return Object.assign(this.createAttachmentFile([s],s.name,s.type),s)}static isAfter(s,d){return s&&d?Nn(s).isAfter(Nn(d),"day"):(console.warn("startDate or endDate undefined, defaulting to false"),!1)}static isSameOrAfter(s,d){return s&&d?Nn(s).isSameOrAfter(Nn(d),"day"):(console.warn("startDate or endDate undefined, defaulting to false"),!1)}static isBefore(s,d){return s&&d?Nn(s).isBefore(Nn(d),"day"):(console.warn("startDate or endDate undefined, defaulting to false"),!1)}static isSameOrBefore(s,d){return s&&d?Nn(s).isSameOrBefore(Nn(d),"day"):(console.warn("startDate or endDate undefined, defaulting to false"),!1)}static isISODate(s){return Nn(s,Nn.ISO_8601,!0).isValid()}static isValidTime(s,d=!1){return d?ic.HOUR_24FORMAT_STRICT.test(s):ic.HOUR_24FORMAT.test(s)}static addDays(s,d){return Nn(s).add(d,"days")}static subtractDays(s,d){return Nn(s).subtract(d,"days")}static getTodayDateISO(){return Nn().format("YYYY-MM-DD")}static isDateBetweenRangeInclusive(s,d,k){const ie=Nn(k).endOf("day");return s.isBetween(d,ie,null,"[]")}static getYearsAndMonthsBetweenTwoDates(s,d){const k=Nn(s,as.FINNISH_MOMENT),ie=Nn(d,as.FINNISH_MOMENT);return{years:k.diff(ie,"years"),months:k.diff(ie,"months")%12}}static sortFirstArrayAsSecondByKey(s,d,k){return s?d.reduce((ie,ot)=>[...ie,...s.filter(ir=>ir[k]===ot)],[]):(console.error("sortFirstArrayAsSecondByKey arrayToSort is null",s),[])}static sortFirstArrayAsSecondByPartialKey(s,d,k){return d.reduce((ie,ot)=>[...ie,...s.filter(ir=>ir[k].includes(ot))],[])}static reorderArray(s,d){if(d.from<0||d.to<0||d.from>=s.length||d.to>=s.length)return console.warn("Invalid index while trying to reorder array - returning original array",s,d),s;const k=s[d.from];return s.splice(d.from,1),s.splice(d.to,0,k),s}static checkObjectValidity(s){return Object.keys(s).every(d=>!0===s[d])}static generateCodes(s,d){return{...co.createCode(s),childCodes:d.map(ot=>co.createCode(ot))}}static createCode(s){return"string"==typeof s?{name:s}:{id:s.id,name:s.name}}static createUUID(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,s=>{const d=16*Math.random()|0;return("x"===s?d:3&d|8).toString(16)})}static getParamFromURL(s,d){try{return new URL(d||window.document.location.href).searchParams.get(s)}catch{return null}}static getParamFromSearchParams(s,d){try{const k=d.substring(d.indexOf("?"));return new URLSearchParams(k).get(s)}catch{return null}}static addParamsToURL(s,d){const k=new URL(s);if(d)for(const ie of d)k.searchParams.append(ie.name,ie.value);return k.href}static getPathParamFromRouterSnapshot(s,d){let k;do{if(d.paramMap.get(s)){k=d.paramMap.get(s);break}d=d.firstChild}while(d);return k}static commaToDotConversion(s,d){for(const k in s)d.includes(k)&&(0,Ai.Z)(s[k])&&(s[k]=Number(s[k].replace(/,/g,".")));return s}static isAddressInvalid(s){if("object"==typeof s){const d=["streetAddress","postOffice","zipcode","latitude","longitude"],k=[];return Object.keys(s).forEach(ie=>{d.includes(ie)&&k.push(ie)}),k.length!==d.length}return!0}static goToInvalid(s){const k=document.querySelector(s).querySelector(".invalid");if(k){const ie=k.querySelector("input");this.scrollToView(ie,k)}}static scrollToView(s,d){setTimeout(()=>{const k=s||d;try{k.focus({preventScroll:!0}),k.blur(),k.focus({preventScroll:!0})}catch{console.log("focusing and blurring failed for element",k)}d.scrollIntoView({behavior:"smooth",block:"start",inline:"nearest"})},200)}static capitalizeString(s){return s.charAt(0).toUpperCase()+s.slice(1)}static dateIsBetween(s,d,k){const ie=Nn(k,"YYYY-MM-DD");return Nn(s).isBetween(d,ie,null,"[]")}static sortArrayByDate(s){const d=(0,si.Z)(s,k=>Nn(k.fromDate).format("YYYYMMDD"),"asc");return co.createValidUntilDate(d)}static createValidUntilDate(s){const d=[];return s.forEach((k,ie)=>{k={...k,validUntil:ie<s.length-1?co.calculateValidUntilDate(s[ie+1].fromDate):""},d.push(k)}),d}static getLocaleByLanguageCode(s,d){if(!d||!d.length)return s;const k=d.find(ie=>ie.code===s);return k?k.name:s}static calculateValidUntilDate(s){return Nn(s).subtract(1,"day").format("YYYY-MM-DD")}static mapToUniqueArrayObjects(s,d){return[...new Map(s.map(k=>[k[d],k])).values()]}static getDateRangeText({validFrom:s,validUntil:d}){const k=ie=>co.convertDateToFinnishStandard(ie)||"";return`${k(s)} - ${k(d)}`}static checkIfNextDatePeriodOverlapsPrevious(s,d,k){const ie=k[d+1],ot=s.validFrom===ie?.validFrom;return!!ie&&(ot||Nn(s.validUntil).isSameOrAfter(ie.validFrom))}static getEnglishOrdinalSuffix(s){const d=s%10,k=s%100;return 1===d&&11!==k?s+"st":2===d&&12!==k?s+"nd":3===d&&13!==k?s+"rd":s+"th"}static getGenericOrdinalSuffix(s){return`${s}.`}static getFixedLocale(s){return"en"===s?"en-GB":s||"fi"}static waitForMilliseconds(s=Ro.VALUES_UPDATE_WAIT_TIME){return(0,o.Z)(function*(){return new Promise(d=>setTimeout(()=>d(),s))})()}static replaceAccentCharacters(s){return s?s.toLowerCase().replace(/\xe5/g,"<PLACEHOLDER_A>").replace(/\xe4/g,"<PLACEHOLDER_B>").replace(/\xf6/g,"<PLACEHOLDER_C>").normalize("NFD").replace(/[\u0300-\u036f]/g,"").replace(/<PLACEHOLDER_A>/g,"\xe5").replace(/<PLACEHOLDER_B>/g,"\xe4").replace(/<PLACEHOLDER_C>/g,"\xf6"):""}static getDatesFromRange(s){const[d,k]=[...s].sort((ir,Yo)=>co.compareByDate(ir,Yo,"asc")),ie=Nn(d,as.STANDARD),ot=Nn(k,as.STANDARD),Cn=[];if(ie.isValid()&&ot.isValid())do{Cn.push(ie.format(as.STANDARD)),ie.add(1,"day")}while(ie.isSameOrBefore(ot));return Cn}static getMonthPeriodFromDate(s){return[s.startOf("month").format(as.STANDARD),s.endOf("month").format(as.STANDARD)]}static splitArrayByCondition(s,d){return s.reduce((k,ie)=>(k[d(ie)?0:1].push(ie),k),[[],[]])}}co.isFirstOfTheMonth=H=>!(0,Vi.Z)(H)&&1===H.date(),co.isLastOfTheMonth=H=>{if((0,Vi.Z)(H))return!1;return H.clone().endOf("month").format("D")===H.clone().format("D")};class sc extends Ve.kI{constructor(s){super(),this.translate=s}static matchControl(s){return d=>{const k=d.value;if(k){if(k!==d.root.get(s).value)return{matchControl:!0}}return null}}static validateControl(s){return d=>{const k=d.root.get(s);return k&&(k.value&&k.markAsTouched(),k.updateValueAndValidity()),null}}static validateInvalidControl(s){return d=>{const k=d.root.get(s);return k&&k.invalid&&k.updateValueAndValidity(),null}}static checkComplexity(){return s=>{const d=!co.containsAtleastOneCharacterLowerCase(s.value),k=!co.containsAtleastOneCharacterUpperCase(s.value),ie=!co.containsAtleastOneDigit(s.value),ot=!co.containsAtleastOneSpecialCharacter(s.value),Cn={};return d&&(Cn.lowercase=d),k&&(Cn.uppercase=k),ie&&(Cn.digit=ie),ot&&(Cn.specialcharacter=ie),(0,Vn.Z)(Cn)?null:Cn}}static validatePin(){return d=>{const k=d.value,ie=!k||Sn.c.validate(k),ot=(d=>{if(!d)return!1;const ie=d.substring(0,2),ot=d.substring(2,4),Cn=d.substring(4,6),ir=d.substring(6,7),tl=`${ie}-${ot}-${(["-","Y","X","W","V","U"].includes(ir)?"19":"20").concat(Cn)}`;return Nn(tl,"DD-MM-YYYY").isAfter()})(k),Cn=new Ve.p4(k,Ve.kI.maxLength(mu.DEFAULT));let ir=null;return!ie||ot?ir={validatePin:!0}:k&&Cn.errors&&(ir={maxlength:!0}),ir}}static validatePinAndAge(s){return d=>{const k=d.value,ie=Sn.c.parse(k),ot=new Ve.p4(k,Ve.kI.maxLength(mu.DEFAULT));let Cn=null;return ie.valid?0<=ie.ageInYears&&ie.ageInYears<=s?k&&ot.errors&&(Cn={maxLength:!0}):Cn={personAgeNotInAcceptableRange:!0}:Cn={validatePin:!0},Cn}}static validatePhoneNumber(){return s=>{const d=s.value,k=new RegExp(ic.PHONE_NUMBER),ie=new Ve.p4(d,Ve.kI.maxLength(mu.PHONE));let ot=null;return d&&!k.test(d)?ot={validatePhoneNumber:!0}:d&&ie.errors&&(ot={maxlength:!0}),ot}}static validateName(){return s=>{const d=s.value,k=new RegExp(ic.ALPHABETS),ie=new Ve.p4(d,Ve.kI.maxLength(mu.DEFAULT));let ot=null;return d&&!k.test(d)?ot={onlyAlphabets:!0}:d&&ie.errors&&(ot={maxlength:!0}),ot}}static validateArrayLength(s){return d=>d.value&&d.value.length<s?{notEnoughValues:!0}:null}static required(s){return super.required(s)||((0,Ai.Z)(s.value)&&(0,Vn.Z)(s.value.trim())?{required:!0}:null)}static validateDate(){return s=>s.value?co.isISODate(s.value)?null:{invalidDate:!0}:null}static validateFirstDateOfMonth(){return s=>{if(!s.value)return null;const d=Nn(s.value).startOf("month");return Nn(s.value).isSame(d)?null:{selectFirstDateOfMonth:!0}}}static validateHour(s=!1){return d=>{const k=d.value;return k?s?k.match(ic.HOUR_24FORMAT_STRICT)?null:{invalidTime:!0}:k.match(ic.HOUR_24FORMAT)?null:{invalidTime:!0}:null}}static validateFromHourBeforeUntilHour(s){return d=>{const k=d.value;return k&&s&&!Nn(k,"HH:mm").isBefore(Nn(s,"HH:mm"))?{fromHourAfterUntilHour:!0}:null}}static validateUntilHourAfterFromHour(s){return d=>{const k=d.value;return k&&s&&!Nn(k,"HH:mm").isAfter(Nn(s,"HH:mm"))?{untilHourBeforeFromHour:!0}:null}}static validateFromHourBeforeControl(s,d=!1){return k=>{if(k&&co.isValidTime(k.value,d)){const ie=k.parent?.get(s);if(ie&&co.isValidTime(ie.value,d)&&Nn(ie.value,"HH:mm").isBefore(Nn(k.value,"HH:mm")))return{fromHourAfterUntilHour:!0}}}}static validateUntilHourAfterControl(s,d=!1){return k=>{if(k&&co.isValidTime(k.value,d)){const ie=k.parent?.get(s);if(ie&&co.isValidTime(ie.value,d)&&Nn(ie.value,"HH:mm").isAfter(Nn(k.value,"HH:mm")))return{untilHourBeforeFromHour:!0}}}}static validateDateLaterThanToday(){return s=>{if(!s.value)return null;const d=Nn().endOf("day");return co.isISODate(s.value)&&Nn(s.value).startOf("day").isAfter(d,"day")?null:{invalidDate:!0}}}static validatePostalCode(){return s=>{const d=s.value,k=new RegExp(ic.ONLYNUMBERS),ie=new Ve.p4(d,Ve.kI.maxLength(mu.POSTALCODE));let ot=null;return d&&!k.test(d)?ot={onlyNumbers:!0}:d&&ie.errors&&(ot={maxLengthPostalCode:!0}),ot}}static validateEmail(){return s=>{const d=s.value,k=new RegExp(ic.EMAIL),ie=new Ve.p4(d,Ve.kI.maxLength(mu.DEFAULT));let ot=null;return d&&!k.test(d)?ot={validateEmail:!0}:d&&ie.errors&&(ot={maxlength:!0}),ot}}static validateCity(){return s=>{const d=s.value,k=new RegExp(ic.ALPHABETS),ie=new Ve.p4(d,Ve.kI.maxLength(mu.DEFAULT));let ot=null;return d&&!k.test(d)?ot={onlyAlphabets:!0}:d&&ie.errors&&(ot={maxlength:!0}),ot}}static changeDateIfAfterThan(s){return d=>{if(d&&d.value&&co.isISODate(d.value)){const k=d.root.get(s);k&&co.isISODate(k.value)&&co.isAfter(d.value,k.value)&&d.patchValue(k.value)}}}static changeDateIfSameOrAfterThan(s){return d=>{if(d&&d.value&&co.isISODate(d.value)){const k=d.root.get(s);if(k&&co.isISODate(k.value)&&co.isSameOrAfter(d.value,k.value)){const ie=co.subtractDays(k.value,1);d.patchValue(ie)}}}}static changeDateIfBeforeThan(s){return d=>{if(d&&co.isISODate(d.value)){const k=d.root.get(s);k&&co.isISODate(k.value)&&co.isBefore(d.value,k.value)&&d.patchValue(k.value)}}}static changeDateIfSameOrBeforeThan(s){return d=>{if(d&&co.isISODate(d.value)){const k=d.root.get(s);if(k&&co.isISODate(k.value)&&co.isSameOrBefore(d.value,k.value)){const ie=co.addDays(k.value,1);d.patchValue(ie)}}}}static validateDateIsBeforeThan(s){return d=>{if(d&&co.isISODate(d.value)){const k=d.parent?.get(s);if(k&&co.isISODate(k.value)&&co.isBefore(d.value,k.value))return{isSameOrAfter:!0}}}}static validateIfSameOrBeforeThan(s){return d=>{if(d&&co.isISODate(d.value)){const k=d.root.get(s);if(k&&co.isISODate(k.value)&&co.isSameOrBefore(d.value,k.value))return{isSameOrAfter:!0}}}}static validateDateIsAfterThan(s){return d=>{if(d&&co.isISODate(d.value)){const k=d.parent?.get(s);if(k&&co.isISODate(k.value)&&co.isAfter(d.value,k.value))return{isSameOrAfter:!0}}}}static validateTargetIsGreater(s){return d=>{if(d&&d.value){const k=d.root.get(s),ie=parseInt(k.value,10),ot=parseInt(d.value,10);if(!ie||isNaN(ie)||!ot||isNaN(ot))return;if(ie>ot)return{targetIsGreaterThanControl:!0}}}}static validateTargetIsSmaller(s){return d=>{if(d&&d.value){const k=d.root.get(s),ie=parseInt(k.value,10),ot=parseInt(d.value,10);if(!ie||isNaN(ie)||!ot||isNaN(ot))return;if(ie<ot)return{targetIsSmallerThanControl:!0}}}}static validateIsSameOrAfter(s){return d=>{const k=d.root.get(s);return d&&co.isISODate(d.value)&&k&&co.isISODate(k.value)&&co.isSameOrAfter(d.value,k.value)?void 0:{invalidDate:!0}}}static validateDateIsBeforeThanParameter(s){return d=>{if(!s)return;const k=d.value;return d&&co.isISODate(d.value)&&co.isISODate(s)&&co.isBefore(k,s)?{isBefore:!0}:void 0}}static validateDateIsSameOrBeforeThanParameter(s){return d=>{if(!s)return;const k=d.value;return d&&co.isISODate(d.value)&&co.isISODate(s)&&!co.isSameOrBefore(k,s)?{isSameOrBefore:!0}:void 0}}static validateDateIsAfterThanParameter(s){return d=>{if(!s)return;const k=d.value;return d&&co.isISODate(d.value)&&co.isISODate(s)&&co.isAfter(k,s)?{isAfter:!0}:void 0}}static validateDateIsSameOrAfterThanParameter(s){return d=>{const k=d.value;if(s&&d&&co.isISODate(d.value)&&co.isISODate(s)&&!co.isSameOrAfter(k,s))return{isSameOrAfter:!0}}}static isControlGreaterThanParameter(s,d){const k=d||"controlIsGreaterThanParameter";return ie=>{const ot=parseInt(ie.value,10),Cn=parseInt(s,10)||0;return!ot&&0!==ot||isNaN(ot)||!Cn&&0!==Cn||isNaN(Cn)||ot>Cn?null:{[k]:!0}}}static isControlGreaterOrSameThanParameter(s){return d=>{const k=parseInt(d.value,10),ie=parseInt(s,10)||0;return!k&&0!==k||isNaN(k)||!ie&&0!==ie||isNaN(ie)?null:k>ie?{controlIsGreaterOrSameThanParameter:!0}:null}}static isControlSmallerOrSameThanParameter(s){return d=>{const k=parseInt(d.value,10),ie=parseInt(s,10)||0;return!k||isNaN(k)||!ie&&0!==ie||isNaN(ie)?null:k<=ie?{controlIsSmallerOrSameThanParameter:!0}:null}}static isControlSmallerThanParameter(s){return d=>{const k=parseInt(d.value,10),ie=parseInt(s,10);return isNaN(k)||isNaN(ie)||k<ie?null:{controlIsSmallerThanParameter:!0}}}static checkUniqueness(s,d){return k=>{const ie=k.value;return ie?s.every(Cn=>{const ir=Cn.fromDate;let Yo;try{Yo=Nn(ir,as.FINNISH_MOMENT).format(as.FINNISH_MOMENT)}catch{Yo=ir}return co.convertDateToFinnishStandard(ie)!==Yo||Cn.id===d})?null:{checkUniqueness:!0}:null}}static validateGuardianAge(){return s=>{const d=Nn().subtract(10,"year").format("YYYY-MM-DD"),k=s.value;if(k&&co.isISODate(k)&&co.isISODate(d)&&co.isAfter(k,d))return{incorrectAge:!0}}}static validateChildAge(){return s=>{const d=Nn().subtract(10,"year").format("YYYY-MM-DD"),k=s.value;if(k&&co.isISODate(k)&&co.isISODate(d)&&co.isBefore(k,d))return{incorrectAge:!0}}}static validateTimeAsMinutesNumber(){return s=>{const d=s.value;return(0,Vi.Z)(d)||(0,ft.Z)(d)&&d>=0&&d<=1440?null:{notValidTime:!0}}}static validateTimeAsMinutesNumberIsNotAfter(s){return d=>{const k=d.value,ie=d.parent?.get(s)?.value,ot=Cn=>(0,Vi.Z)(Cn)||isNaN(Cn);return ot(k)||ot(ie)||k<ie?null:{timeIsAfter:!0}}}static validateTimeAsMinutesNumberIsNotBefore(s){return d=>{const k=d.value,ie=d.parent?.get(s)?.value,ot=Cn=>(0,Vi.Z)(Cn)||isNaN(Cn);return ot(k)||ot(ie)||k>ie?null:{timeIsBefore:!0}}}static validateTimeAsMinutesNumberIsNotInFuture(){return s=>{const d=s.value,ie=Nn().format("H:mm"),ot=Nn.duration(ie,"minutes").asMinutes();return Cn=d,(0,Vi.Z)(Cn)||isNaN(Cn)||d<=ot?null:{timeIsFuture:!0};var Cn}}static validateTimeAsMinutesNumberIsInFuture(){return s=>{const d=s.value,ie=Nn().format("H:mm"),ot=Nn.duration(ie,"minutes").asMinutes();return Cn=d,(0,Vi.Z)(Cn)||isNaN(Cn)||d>=ot?null:{timeIsPast:!0};var Cn}}static validateIfDateIsBetweenRange(s,d){return k=>{for(const ie of s)if(this.checkDateFrameOverlap(ie,d))return{isDateBetweenRange:!0}}}static validateDateIsInRange(s){return d=>!(d.value&&s.validFrom&&s.validUntil)||Nn(d.value).isSameOrAfter(s.validFrom)&&Nn(d.value).isSameOrBefore(s.validUntil)?null:{dateNotInRange:!0}}static validateDateIsNotInRanges(s){return d=>{if(!d.value)return null;for(const k of s)if(k.validUntil){if(Nn(d.value).isSameOrAfter(k.validFrom)&&Nn(d.value).isSameOrBefore(k.validUntil))return{overlappingTimeRanges:!0}}else if(Nn(d.value).isSameOrAfter(k.validFrom))return{overlappingTimeRanges:!0};return null}}static validateChildAgeByPIC(){return s=>{const d=Nn().subtract(10,"year").format("YYYY-MM-DD"),k=co.getDateOfBirthFromPIC(s.value);if(k&&co.isISODate(k)&&co.isISODate(d)&&co.isBefore(k,d))return{childTooOld:!0}}}static validateGuardianAgeByPIC(){return s=>{const d=Nn().subtract(10,"year").format("YYYY-MM-DD"),k=co.getDateOfBirthFromPIC(s.value);if(k&&co.isISODate(k)&&co.isISODate(d)&&co.isAfter(k,d))return{incorrectAge:!0}}}static checkDateFrameOverlap(s,d){return!(s.id&&s.id===d.id||s.tempId&&s.tempId===d.tempId)&&!!(!s.validUntil&&(Nn(d.validFrom).isSameOrAfter(s.validFrom)||Nn(d.validUntil).isSameOrAfter(s.validFrom))||!s.validFrom&&(Nn(d.validFrom).isSameOrBefore(s.validFrom)||Nn(d.validUntil).isSameOrBefore(s.validFrom))||d.validFrom&&Nn(d.validFrom).isBetween(s.validFrom,s.validUntil,null,"[]")||d.validUntil&&Nn(d.validUntil).isBetween(s.validFrom,s.validUntil,null,"[]"))}static validatePreferredLocation(s){return()=>{if(co.isAddressInvalid(s))return{invalidAddress:!0}}}static validateDateIsFirstOfTheMonth(){return s=>{if(co.isISODate(s?.value)&&!co.isFirstOfTheMonth(Nn(s.value)))return{outsideFirstOfTheMonth:!0}}}static validateZeroOrMoreThanThreeCharacters(s){const d=s.value;return 0===d.length||d.length>2?null:{zeroOrMoreThanThreeCharacters:!0}}static validateControlIsNot(s){return d=>{const k=d.value;if(s.includes(k))return{numberIncluded:!0}}}static validateIsIntegerOrNil(){return s=>{const d=s.value;return d?.toString().includes(",")||d?.toString().includes(".")?{pattern:!0}:(0,Vi.Z)(d)||Number.isInteger(d)||new RegExp(ic.NUMERIC_INTEGER).test(d?.toString())?null:{pattern:!0}}}static uniqueValidFromValidator(s){return d=>{const k=d.value;return k&&s.includes(k)?{notUniqValidFrom:!0}:null}}}class Js{constructor(){this.destroy$=new l.x}trackByFn(s,d){return d.id||d.tempId}trackByFnIndex(s){return s}trackByFnAll(s,d){return JSON.stringify(d)}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}}Js.\u0275fac=function(s){return new(s||Js)},Js.\u0275dir=e.lG2({type:Js});class zs{constructor(s){this.page=0,this.size=s}getPage(){return this.page}setPage(s){this.page=s}getSize(){return this.size}setSize(s){this.size=s}nextPage(){this.page++}}class gp{static generatePreferredNameOptions(s){if(!s)return[];let d=[];const k=s?s.split(" "):"";for(const ie of k){""!==ie&&(d=[...d,{value:ie,text:ie}]);const ot=ie.split("-");if(ot.length>1)for(const Cn of ot)""!==Cn&&(d=[...d,{value:Cn,text:Cn}])}return d}static convertPageableToPageEvent(s){return{pageIndex:s.number,pageSize:s.size,length:s.totalElements}}}class zu{static getFileMimeType(s){try{const d=s.split(".").pop();return zu.allowedTypes.find(k=>k.extension==="."+d.toLowerCase()).mimeType}catch{return console.error("getFileMimeType mimetype not found, using default application/octet-stream"),"application/octet-stream"}}}zu.maxFileSizeInBytes=1024*Ro.MAX_FILE_SIZE_IN_MEGABYTES*1e3,zu.allowedImageTypes=[{extension:".jpg",mimeType:"image/jpg"},{extension:".jpeg",mimeType:"image/jpeg"},{extension:".png",mimeType:"image/png"},{extension:".gif",mimeType:"image/gif"},{extension:".bmp",mimeType:"image/bmp"}],zu.allowedTypes=[{extension:".pdf",mimeType:"application/pdf"},{extension:".doc",mimeType:"application/msword"},{extension:".docx",mimeType:"application/vnd.openxmlformats-officedocument.wordprocessingml.document"},{extension:".xls",mimeType:"application/vnd.ms-excel"},{extension:".xlsx",mimeType:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"},{extension:".txt",mimeType:"text/plain"},{extension:".ppt",mimeType:"application/vnd.ms-powerpoint"},{extension:".pptx",mimeType:"application/vnd.openxmlformats-officedocument.presentationml.presentation"},{extension:".xml",mimeType:"text/xml"},{extension:".rtf",mimeType:"application/rtf"},{extension:".sxw",mimeType:"application/vnd.sun.xml.writer"},{extension:".sxc",mimeType:"application/vnd.sun.xml.calc"},{extension:".sxi",mimeType:"application/vnd.sun.xml.impress"},...zu.allowedImageTypes];class _p{constructor(s,d){this.camera=s,this.alertCtrl=d}getPictureFromMobileCamera(){const s={quality:80,sourceType:this.camera.PictureSourceType.CAMERA,destinationType:this.camera.DestinationType.DATA_URL,encodingType:this.camera.EncodingType.JPEG,mediaType:this.camera.MediaType.PICTURE};return this.camera.getPicture(s).then(d=>"data:image/jpeg;base64,"+d).catch(d=>{console.error("getPicture camera error",d),this.displayErrorWarning("Failed to get file")})}getFilesUsingBrowserAPI(s,d){return new Promise(k=>{const ie=this.convertNonImagesToAttachmentFiles(s),ot=this.getImageFiles(s);if(0!==ot.length)for(const Cn of ot){const ir=new FileReader;ir.readAsDataURL(Cn),ir.onloadend=()=>{ie.push(this.createAttachmentFileFromFile(Cn,ir.result)),ie.length===s.length&&k(ie)}}else k(ie)})}isImage(s){return s&&s.type&&s.type.includes("image/")}getAllowedFileTypes(){return co.getSinglePropertyFromObjectArray("extension",zu.allowedTypes)}getAllowedImageFileTypes(){return co.getSinglePropertyFromObjectArray("extension",zu.allowedImageTypes)}isFileSizeValid(s){return s.size<=zu.maxFileSizeInBytes}isImageTypeValid(s){const d="."+s.name.split(".").slice(-1)[0];return!!this.getAllowedImageFileTypes().includes(d.toLowerCase())}createAttachmentFileFromFile(s,d){const k=s;return k.contentBase64=d,k}displayErrorWarning(s){var d=this;return(0,o.Z)(function*(){return yield(yield d.alertCtrl.create({header:"Error",subHeader:s,buttons:["Ok"]})).present()})()}getImageFiles(s){const d=[];for(const k of s)this.isImage(k)&&d.push(k);return d}convertNonImagesToAttachmentFiles(s){const d=[];for(const k of s)this.isImage(k)||d.push(this.createAttachmentFileFromFile(k,null));return d}}_p.\u0275fac=function(s){return new(s||_p)(e.LFG(Pn.V1),e.LFG(Nt.Br))},_p.\u0275prov=e.Yz7({token:_p,factory:_p.\u0275fac});const nv="4.3.0-109";class Hm{constructor(s){this.deviceService=s}getPlatformInformation(){return new E.y(s=>{s.next({deviceId:this.generateDeviceId(this.deviceService.getDeviceInfo()),deviceCategoryType:this.getDeviceCategoryType(),deviceFullName:this.deviceService.getDeviceInfo().device,osVersion:this.deviceService.getDeviceInfo().os,appVersion:nv,browser:this.deviceService.getDeviceInfo().browser}),s.complete()})}generateDeviceId(s){return s.browser+"|"+s.os+"|"+s.os_version}getDeviceCategoryType(){return"core"}}Hm.\u0275fac=function(s){return new(s||Hm)(e.LFG(ai.x0))},Hm.\u0275prov=e.Yz7({token:Hm,factory:Hm.\u0275fac,providedIn:"root"});class Vm{constructor(s,d,k){this.device=s,this.appVersion=d,this.platform=k}getPlatformInformation(){return new E.y(s=>{this.appVersion.getVersionNumber().then(d=>{s.next({deviceId:this.device.uuid,deviceCategoryType:this.getDeviceCategoryType(),deviceFullName:this.device.manufacturer+" "+this.device.model,osVersion:this.device.version,appVersion:d}),s.complete()}).catch(d=>{console.error("getVersionNumber failed",d)})})}getDeviceCategoryType(){return this.platform.is("ios")?"ios":"android"}}Vm.\u0275fac=function(s){return new(s||Vm)(e.LFG(hn.A),e.LFG(Le.b),e.LFG(Nt.t4))},Vm.\u0275prov=e.Yz7({token:Vm,factory:Vm.\u0275fac,providedIn:"root"});const Dd=[(0,ce.X$)("animatedItem",[(0,ce.eR)(":enter",[(0,ce.oB)({transform:"translateX(-10px)",opacity:0}),(0,ce.jt)("0.4s cubic-bezier(.8, -0.6, 0.26, .6)",(0,ce.oB)({transform:"translateX(-0px)",opacity:1}))]),(0,ce.eR)(":leave",[(0,ce.jt)("0.4s cubic-bezier(.8, -0.6, 0.26, .6)",(0,ce.oB)({transform:"translateY(20px)",opacity:0}))])]),(0,ce.X$)("animatedItemEnter",[(0,ce.eR)(":enter",[(0,ce.oB)({transform:"translateX(-10px)",opacity:0}),(0,ce.jt)("0.4s cubic-bezier(.8, -0.6, 0.26, .6)",(0,ce.oB)({transform:"translateX(-0px)",opacity:1}))])]),(0,ce.X$)("animatedItemEnterQuick",[(0,ce.eR)(":enter",[(0,ce.oB)({transform:"translateX(-10px)",opacity:0}),(0,ce.jt)("0.2s cubic-bezier(.8, -0.6, 0.26, .6)",(0,ce.oB)({transform:"translateX(-0px)",opacity:1}))])]),(0,ce.X$)("animatedList",[(0,ce.eR)("* => *",[(0,ce.IO)(":enter",[(0,ce.EY)(35,(0,ce.pV)())],{optional:!0})])]),(0,ce.X$)("animatedItemSliding",[(0,ce.eR)(":enter",[(0,ce.oB)({transform:"translate3d(0, 75px, 0)",opacity:0}),(0,ce.jt)("0.8s cubic-bezier(0.25, 0.69, 0.41, 1.01)",(0,ce.oB)({transform:"translate3d(0, 0, 0)",opacity:1}))])]),(0,ce.X$)("animatedListSliding",[(0,ce.eR)("* => *",[(0,ce.IO)("@animatedItemSliding",[(0,ce.EY)(25,[(0,ce.pV)()])],{optional:!0})])]),(0,ce.X$)("slideInOut",[(0,ce.eR)(":enter",[(0,ce.oB)({transform:"translateY(-100%)"}),(0,ce.jt)("200ms cubic-bezier(0.25, 0.69, 0.41, 1.01)",(0,ce.oB)({transform:"translateY(0%)"}))]),(0,ce.eR)(":leave",[(0,ce.jt)("200ms cubic-bezier(0.25, 0.69, 0.41, 1.01)",(0,ce.oB)({transform:"translateY(-100%)"}))])])],Jf=[(0,ce.X$)("slideInOut",[(0,ce.eR)(":enter",[(0,ce.oB)({transform:"translateY(50px)",opacity:0}),(0,ce.jt)("700ms cubic-bezier(0.25, 0.69, 0.41, 1.01)",(0,ce.oB)({transform:"translateY(0%)",opacity:1}))]),(0,ce.eR)(":leave",[(0,ce.jt)("700ms cubic-bezier(0.25, 0.69, 0.41, 1.01)",(0,ce.oB)({transform:"translateY(20px)",opacity:0}))])]),(0,ce.X$)("slideInOutFromUp",[(0,ce.eR)(":enter",[(0,ce.oB)({transform:"translateY(-150px)",opacity:0}),(0,ce.jt)("400ms ease-in",(0,ce.oB)({transform:"translateY(0%)",opacity:1}))]),(0,ce.eR)(":leave",[(0,ce.jt)("400ms ease-in",(0,ce.oB)({transform:"translateY(-150px)",opacity:0}))])]),(0,ce.X$)("collapseColumn",[(0,ce.eR)(":enter",[(0,ce.oB)({opacity:0}),(0,ce.jt)("0.4s ease-in-out",(0,ce.oB)({opacity:1}))]),(0,ce.eR)(":leave",[(0,ce.oB)({opacity:1}),(0,ce.jt)("0.4s ease-in-out",(0,ce.oB)({opacity:0}))])])];class iv{constructor(s){this.notify=s}canDeactivate(s){try{if(s.canDeactivate())return(0,D.of)(!0)}catch(d){throw console.error("UnsavedChangesGuard canDeactivate error: ",d),new TypeError(`UnsavedChangesGuard: component\n              ${s.constructor.name} failed with canDeactivate().\n              Does it extend class DetectValueChanges?`)}return this.showDiscardDialog()}showDiscardDialog(){var s=this;return new E.y(d=>{(0,o.Z)(function*(){(yield s.notify.promptDiscardChanges()).onDidDismiss().then(ie=>{d.next(ie.data),d.complete()})})()})}}iv.\u0275fac=function(s){return new(s||iv)(e.LFG(md))},iv.\u0275prov=e.Yz7({token:iv,factory:iv.\u0275fac,providedIn:"root"});class Sd{}Sd.Child={CAN_SEE_CHILD_PAGE:[...Lt.DCP_STAFF,Lt.ECEC_SERVICE_COUNSELOR,Lt.SERVICE_ADVISER,Lt.MUNICIPALITY_ADMIN,Lt.ECEC_LEAD,Lt.GUARDIAN,Lt.FINANCIAL_LEAD,Lt.SERVICE_SECRETARY,Lt.DCP_CHILDCARER,Lt.SPECIAL_EDUCATION_TEACHER],CAN_SAVE_CHILD_EDITOR_DATA:[...Lt.DCP_STAFF,Lt.ECEC_SERVICE_COUNSELOR,Lt.SERVICE_ADVISER,Lt.MUNICIPALITY_ADMIN,Lt.ECEC_LEAD,Lt.SERVICE_SECRETARY],CAN_CHANGE_PROFILE_PICTURE:[Lt.SERVICE_ADVISER,Lt.DCP_CHIEF,Lt.ECEC_SERVICE_COUNSELOR,Lt.GUARDIAN,Lt.MUNICIPALITY_ADMIN,Lt.ECEC_LEAD,Lt.SERVICE_SECRETARY],CAN_SEE_PROFILE_PICTURE:[...Lt.DCP_STAFF,Lt.SERVICE_ADVISER,Lt.ECEC_SERVICE_COUNSELOR,Lt.GUARDIAN,Lt.MUNICIPALITY_ADMIN,Lt.ECEC_LEAD,Lt.FINANCIAL_LEAD,Lt.SERVICE_SECRETARY,Lt.SPECIAL_EDUCATION_TEACHER],CAN_SEE_HEALTH_TAB:[Lt.MUNICIPALITY_ADMIN,Lt.ECEC_LEAD],CAN_SEE_DOCUMENTS_TAB:[Lt.SERVICE_ADVISER,Lt.DCP_CHIEF,Lt.ECEC_SERVICE_COUNSELOR,Lt.MUNICIPALITY_ADMIN,Lt.ECEC_LEAD,Lt.SPECIAL_EDUCATION_TEACHER,Lt.FINANCIAL_LEAD,Lt.SERVICE_SECRETARY,Lt.MUNICIPALITY_SUPPORT]},Sd.StaffMember={CAN_ACCESS_STAFF_BASIC_INFO:[...Lt.ECEC_PROFESSIONALS,Lt.MUNICIPALITY_ADMIN,Lt.MUNICIPALITY_SUPPORT,Lt.FINANCIAL_LEAD,Lt.SERVICE_SECRETARY,Lt.SPECIAL_EDUCATION_TEACHER],CAN_EDIT_STAFF_BASIC_INFO:Lt.ALL_PROFESSIONALS.filter(H=>!1===[Lt.ECEC_SERVICE_COUNSELOR,Lt.SERVICE_ADVISER,Lt.ECEC_LEAD].includes(H))},Sd.ApplicationManagement={CAN_ACCESS_APPLICATION_MANAGEMENT:[Lt.DCP_CHIEF,Lt.MUNICIPALITY_ADMIN,Lt.ECEC_SERVICE_COUNSELOR,Lt.ECEC_LEAD],CAN_SEE_STATE_BUTTONS:[Lt.ECEC_SERVICE_COUNSELOR,Lt.MUNICIPALITY_ADMIN],CAN_TAKE_IN_OR_REMOVE_FROM_HANDLING:[Lt.ECEC_SERVICE_COUNSELOR,Lt.MUNICIPALITY_ADMIN],CAN_MAKE_DECISION:[Lt.DCP_CHIEF,Lt.ECEC_LEAD,Lt.ECEC_SERVICE_COUNSELOR],CAN_MAKE_DISAPPROVE_DECISION_FOR_PUBLIC:[Lt.DCP_CHIEF,Lt.ECEC_LEAD,Lt.ECEC_SERVICE_COUNSELOR],CAN_MAKE_DISAPPROVE_DECISION_FOR_PRIVATE:[Lt.ECEC_LEAD,Lt.ECEC_SERVICE_COUNSELOR],CAN_TAKE_BACK:[Lt.ECEC_SERVICE_COUNSELOR,Lt.MUNICIPALITY_ADMIN],CAN_ACCESS_PRE_PLACEMENT:[Lt.MUNICIPALITY_ADMIN,Lt.ECEC_SERVICE_COUNSELOR],CAN_ACCESS_PLACEMENT:[Lt.MUNICIPALITY_ADMIN,Lt.DCP_CHIEF,Lt.ECEC_LEAD,Lt.ECEC_SERVICE_COUNSELOR],CAN_ACCESS_DECISIONS:[Lt.MUNICIPALITY_ADMIN,Lt.DCP_CHIEF,Lt.ECEC_LEAD,Lt.ECEC_SERVICE_COUNSELOR],CAN_INFORM_DECISIONS:[Lt.MUNICIPALITY_ADMIN,Lt.DCP_CHIEF,Lt.ECEC_LEAD,Lt.ECEC_SERVICE_COUNSELOR]},Sd.Application={CAN_ACCESS_COMMENTS:[Lt.ECEC_SERVICE_COUNSELOR,Lt.MUNICIPALITY_ADMIN,Lt.DCP_CHIEF,Lt.ECEC_LEAD,Lt.GUARDIAN,Lt.MUNICIPALITY_SUPPORT],CAN_ACCESS_NOTES:[Lt.ECEC_SERVICE_COUNSELOR,Lt.MUNICIPALITY_ADMIN,Lt.DCP_CHIEF,Lt.ECEC_LEAD,Lt.MUNICIPALITY_SUPPORT,Lt.SPECIAL_EDUCATION_TEACHER],CAN_ADD_COMMENT:[Lt.ECEC_SERVICE_COUNSELOR,Lt.MUNICIPALITY_ADMIN,Lt.GUARDIAN,Lt.MUNICIPALITY_SUPPORT],CAN_ADD_NOTES:[Lt.ECEC_SERVICE_COUNSELOR,Lt.MUNICIPALITY_ADMIN,Lt.DCP_CHIEF,Lt.ECEC_LEAD,Lt.MUNICIPALITY_SUPPORT,Lt.SPECIAL_EDUCATION_TEACHER],CAN_EDIT_AND_CANCEL_APPLICATION:[Lt.ECEC_SERVICE_COUNSELOR,Lt.MUNICIPALITY_ADMIN,Lt.GUARDIAN],CAN_ACCESS_HISTORY:[Lt.ECEC_SERVICE_COUNSELOR,Lt.MUNICIPALITY_ADMIN,Lt.DCP_CHIEF,Lt.ECEC_LEAD,Lt.GUARDIAN,Lt.MUNICIPALITY_SUPPORT],CAN_REVIEW_SENT_APPLICATION:[Lt.MUNICIPALITY_ADMIN,Lt.GUARDIAN,Lt.MUNICIPALITY_SUPPORT]},Sd.Placement={CAN_CHANGE_PLACEMENT:[Lt.MUNICIPALITY_ADMIN,Lt.ECEC_LEAD,Lt.DCP_CHIEF],CAN_CREATE_NEW_PLACEMENT_AND_DECISION:[Lt.ECEC_LEAD,Lt.DCP_CHIEF,Lt.ECEC_SERVICE_COUNSELOR],CAN_CREATE_NEW_PLACEMENT_TO_DIFFERENT_UNIT:[Lt.ECEC_LEAD,Lt.DCP_CHIEF,Lt.ECEC_SERVICE_COUNSELOR],CAN_MOVE_TO_LISTING:[Lt.MUNICIPALITY_ADMIN,Lt.ECEC_LEAD,Lt.DCP_CHIEF],CAN_MOVE_TO_ANOTHER_GROUP:[Lt.MUNICIPALITY_ADMIN,Lt.ECEC_LEAD,Lt.DCP_CHIEF],CAN_MOVE_BACK:[Lt.MUNICIPALITY_ADMIN,Lt.ECEC_LEAD,Lt.DCP_CHIEF],CAN_END_DECISION:[Lt.MUNICIPALITY_ADMIN,Lt.ECEC_LEAD,Lt.DCP_CHIEF,Lt.ECEC_SERVICE_COUNSELOR],CAN_DELETE_PLACEMENT_AND_CANCEL_DECISION:[Lt.ECEC_LEAD,Lt.ECEC_SERVICE_COUNSELOR],CAN_REMOVE_PENDING_STATUS:[Lt.MUNICIPALITY_ADMIN,Lt.ECEC_LEAD,Lt.ECEC_SERVICE_COUNSELOR],CAN_DECLINE_PLACE:[Lt.ECEC_SERVICE_COUNSELOR,Lt.ECEC_LEAD,Lt.DCP_CHIEF],CAN_NO_ADDITIONAL_NEED:[Lt.ECEC_SERVICE_COUNSELOR,Lt.ECEC_LEAD,Lt.DCP_CHIEF]},Sd.PersonSearch={CAN_ADD_NEW_CHILD:[Lt.MUNICIPALITY_ADMIN,Lt.SERVICE_ADVISER,Lt.DCP_CHIEF,Lt.ECEC_SERVICE_COUNSELOR,Lt.ECEC_LEAD,Lt.MUNICIPALITY_SUPPORT,Lt.FINANCIAL_LEAD,Lt.SERVICE_SECRETARY]},Sd.Menu={CAN_ACCESS_MUNICIPALITY_SETTINGS:[Lt.MUNICIPALITY_ADMIN,Lt.MUNICIPALITY_SUPPORT,Lt.GENERAL_ADMIN,Lt.ECEC_LEAD,Lt.SERVICE_SECRETARY],CAN_ACCESS_APPLICATIONS:[Lt.MUNICIPALITY_ADMIN,Lt.MUNICIPALITY_SUPPORT,Lt.ECEC_LEAD,Lt.DCP_CHIEF,Lt.GENERAL_ADMIN,Lt.ECEC_SERVICE_COUNSELOR],CAN_SEE_ATTENDANCE:[Lt.MUNICIPALITY_ADMIN,Lt.MUNICIPALITY_SUPPORT,Lt.DCP_CHIEF,Lt.ECEC_LEAD,Lt.DCP_TEACHER,Lt.DCP_CHILDCARER,Lt.CHILDMINDER],CAN_ACCESS_ORGANIZATIONS:[Lt.DCP_CHIEF,Lt.ECEC_SERVICE_COUNSELOR,Lt.ECEC_LEAD,Lt.MUNICIPALITY_ADMIN,Lt.MUNICIPALITY_SUPPORT,Lt.FINANCIAL_LEAD,Lt.SERVICE_SECRETARY,Lt.DCP_TEACHER,Lt.DCP_CHILDCARER,Lt.CHILDMINDER,Lt.SPECIAL_EDUCATION_TEACHER],CAN_ACESSS_GUARDIANS_AND_CHILDREN:[Lt.MUNICIPALITY_ADMIN,Lt.SERVICE_ADVISER,Lt.DCP_CHIEF,Lt.ECEC_SERVICE_COUNSELOR,Lt.ECEC_LEAD,Lt.FINANCIAL_LEAD,Lt.SERVICE_SECRETARY,Lt.MUNICIPALITY_SUPPORT,Lt.SPECIAL_EDUCATION_TEACHER],CAN_ACCESS_FEES:[Lt.MUNICIPALITY_ADMIN,Lt.MUNICIPALITY_SUPPORT,Lt.SERVICE_SECRETARY,Lt.FINANCIAL_LEAD],CAN_ACCESS_INVOICING:[Lt.MUNICIPALITY_ADMIN,Lt.MUNICIPALITY_SUPPORT,Lt.SERVICE_SECRETARY],CAN_ACCESS_REPORTS:[Lt.MUNICIPALITY_ADMIN,Lt.MUNICIPALITY_SUPPORT,Lt.ECEC_LEAD,Lt.FINANCIAL_LEAD,Lt.SERVICE_SECRETARY,Lt.MUNICIPALITY_STATISTICS],CAN_ACCESS_OTHER_DECISIONS:[Lt.MUNICIPALITY_ADMIN,Lt.MUNICIPALITY_SUPPORT,Lt.DCP_CHIEF,Lt.ECEC_LEAD,Lt.SPECIAL_EDUCATION_TEACHER]},Sd.ChildDocuments={CAN_SEE_ACTIONS_BUTTON:[Lt.GUARDIAN,Lt.MUNICIPALITY_ADMIN,Lt.ECEC_SERVICE_COUNSELOR,Lt.SERVICE_ADVISER,Lt.SERVICE_SECRETARY,Lt.DCP_CHIEF,Lt.ECEC_LEAD,Lt.SPECIAL_EDUCATION_TEACHER],CAN_CREATE_APPLICATION:[Lt.GUARDIAN,Lt.MUNICIPALITY_ADMIN,Lt.ECEC_SERVICE_COUNSELOR,Lt.SERVICE_ADVISER],CAN_SEE_DECISIONS:[Lt.GUARDIAN,Lt.ECEC_SERVICE_COUNSELOR,Lt.MUNICIPALITY_ADMIN,Lt.ECEC_LEAD,Lt.DCP_CHIEF,Lt.SERVICE_SECRETARY,Lt.SPECIAL_EDUCATION_TEACHER],CAN_SEE_IMPORTED_DECISIONS:[Lt.ECEC_SERVICE_COUNSELOR,Lt.MUNICIPALITY_ADMIN,Lt.ECEC_LEAD,Lt.DCP_CHIEF,Lt.SERVICE_SECRETARY,Lt.SPECIAL_EDUCATION_TEACHER],CAN_SEE_APPLICATIONS:[Lt.GUARDIAN,Lt.MUNICIPALITY_ADMIN,Lt.ECEC_SERVICE_COUNSELOR,Lt.SERVICE_ADVISER,Lt.ECEC_LEAD,Lt.DCP_CHIEF,Lt.SERVICE_SECRETARY,Lt.SPECIAL_EDUCATION_TEACHER],CAN_SEE_FEES:[Lt.GUARDIAN,Lt.MUNICIPALITY_ADMIN,Lt.MUNICIPALITY_SUPPORT,Lt.SERVICE_SECRETARY,Lt.FINANCIAL_LEAD],CAN_SEE_AGREEMENTS:[Lt.GUARDIAN,Lt.MUNICIPALITY_ADMIN,Lt.ECEC_SERVICE_COUNSELOR,Lt.ECEC_LEAD,Lt.DCP_CHIEF,Lt.FINANCIAL_LEAD,Lt.SERVICE_SECRETARY,Lt.SPECIAL_EDUCATION_TEACHER],CAN_SEE_ACCEPTANCE_DOCUMENTS:[Lt.GUARDIAN,Lt.MUNICIPALITY_ADMIN,Lt.ECEC_SERVICE_COUNSELOR,Lt.DCP_CHIEF,Lt.ECEC_LEAD],CAN_OPEN_APPLICATION:[Lt.GUARDIAN,Lt.MUNICIPALITY_ADMIN,Lt.ECEC_SERVICE_COUNSELOR,Lt.ECEC_LEAD,Lt.DCP_CHIEF,Lt.SERVICE_SECRETARY,Lt.SPECIAL_EDUCATION_TEACHER],CAN_OPEN_INCOME_STATEMENT:[Lt.GUARDIAN,Lt.MUNICIPALITY_ADMIN,Lt.SERVICE_SECRETARY],CAN_CREATE_NEW_INCOME_STATEMENT:[Lt.GUARDIAN,Lt.MUNICIPALITY_ADMIN,Lt.SERVICE_SECRETARY],CAN_CREATE_NEW_INCOME_STATEMENT_REQUEST:[Lt.MUNICIPALITY_ADMIN,Lt.SERVICE_SECRETARY],CAN_SEE_NEW_INCOME_STATEMENT_ACTION_BUTTON:[Lt.GUARDIAN,Lt.MUNICIPALITY_ADMIN,Lt.SERVICE_SECRETARY,Lt.MUNICIPALITY_SUPPORT],CAN_SEE_TAKE_TO_HANDLING_BUTTON:[Lt.SERVICE_SECRETARY],CAN_SEE_IN_HANDLING_BUTTON:[Lt.SERVICE_SECRETARY,Lt.MUNICIPALITY_ADMIN,Lt.MUNICIPALITY_SUPPORT,Lt.FINANCIAL_LEAD],CAN_MAKE_FEE_DECISION:[Lt.SERVICE_SECRETARY,Lt.FINANCIAL_LEAD],CAN_MOVE_TO_DECISION_MAKING:[Lt.SERVICE_SECRETARY,Lt.FINANCIAL_LEAD],CAN_NAVIGATE_IN_FEE_DECISION_IN_EDITMODE:[Lt.SERVICE_SECRETARY,Lt.FINANCIAL_LEAD],CAN_NAVIGATE_FEE_DECISION_IN_VIEWMODE:[Lt.MUNICIPALITY_ADMIN,Lt.SERVICE_SECRETARY,Lt.FINANCIAL_LEAD,Lt.MUNICIPALITY_SUPPORT,Lt.GUARDIAN,Lt.FINANCIAL_LEAD]},Sd.ChildBasicInfo={CAN_SEE_HEALTH_TAB:[Lt.MUNICIPALITY_ADMIN,Lt.ECEC_SERVICE_COUNSELOR,Lt.ECEC_LEAD,Lt.DCP_CHIEF,Lt.GUARDIAN],CAN_SEE_PERMITS_TAB:[Lt.MUNICIPALITY_ADMIN,Lt.ECEC_SERVICE_COUNSELOR,Lt.ECEC_LEAD,Lt.DCP_CHIEF,Lt.GUARDIAN],CAN_SEE_OPEN_DAYCARE_FEE:[Lt.MUNICIPALITY_ADMIN,,Lt.MUNICIPALITY_SUPPORT,Lt.ECEC_SERVICE_COUNSELOR,Lt.DCP_CHIEF,Lt.ECEC_LEAD,Lt.FINANCIAL_LEAD,Lt.SERVICE_SECRETARY,Lt.MUNICIPALITY_SUPPORT],CAN_EDIT_OPEN_DAYCARE_FEE:[Lt.MUNICIPALITY_ADMIN,Lt.DCP_CHIEF,Lt.ECEC_LEAD,Lt.SERVICE_SECRETARY]},Sd.ChildHealthInformation={CAN_VIEW_HEALTH_SUPPORT:[Lt.MUNICIPALITY_ADMIN,Lt.MUNICIPALITY_SUPPORT,Lt.ECEC_SERVICE_COUNSELOR,Lt.DCP_CHIEF,Lt.ECEC_LEAD,Lt.DCP_TEACHER,Lt.DCP_CHILDCARER,Lt.CHILDMINDER,Lt.SPECIAL_EDUCATION_TEACHER,Lt.GUARDIAN],CAN_EDIT_HEALTH_SUPPORT_CURRENT:[Lt.MUNICIPALITY_ADMIN,Lt.SPECIAL_EDUCATION_TEACHER],CAN_EDIT_HEALTH_SUPPORT_HISTORY:[Lt.MUNICIPALITY_ADMIN]},Sd.OrganizationsHierarchy={CAN_SEE_TABS:[Lt.MUNICIPALITY_ADMIN,Lt.FINANCIAL_LEAD,Lt.SERVICE_SECRETARY,Lt.DCP_TEACHER,Lt.CHILDMINDER,Lt.SPECIAL_EDUCATION_TEACHER,Lt.DCP_CHILDCARER,Lt.DCP_CHIEF],CAN_ACCESS:[Lt.DCP_CHIEF,Lt.DCP_TEACHER,Lt.ECEC_SERVICE_COUNSELOR,Lt.ECEC_LEAD,Lt.MUNICIPALITY_ADMIN,Lt.MUNICIPALITY_SUPPORT,Lt.FINANCIAL_LEAD,Lt.SERVICE_SECRETARY,Lt.DCP_CHILDCARER,Lt.CHILDMINDER,Lt.SPECIAL_EDUCATION_TEACHER]},Sd.GuardianBasicInfo={CAN_SEE_SETTINGS_TAB:[Lt.MUNICIPALITY_ADMIN,Lt.ECEC_SERVICE_COUNSELOR,Lt.ECEC_LEAD,Lt.DCP_CHIEF,Lt.FINANCIAL_LEAD,Lt.SERVICE_SECRETARY,Lt.SERVICE_ADVISER],CAN_SEE_LINK_HOUSEHOLD:[Lt.MUNICIPALITY_ADMIN,Lt.MUNICIPALITY_SUPPORT,Lt.ECEC_SERVICE_COUNSELOR,Lt.DCP_CHIEF,Lt.ECEC_LEAD,Lt.FINANCIAL_LEAD,Lt.SERVICE_SECRETARY]},Sd.GuardianshipInformation={CAN_READ_INDIVIDUAL_GUARDIANS:[Lt.MUNICIPALITY_ADMIN,Lt.MUNICIPALITY_SUPPORT,Lt.SERVICE_ADVISER,Lt.ECEC_SERVICE_COUNSELOR,Lt.ECEC_LEAD,Lt.DCP_CHIEF,Lt.FINANCIAL_LEAD,Lt.SERVICE_SECRETARY,Lt.DCP_TEACHER,Lt.DCP_CHILDCARER,Lt.CHILDMINDER,Lt.SPECIAL_EDUCATION_TEACHER],CAN_EDIT_DELETE_GUARDIANSHIP_MANUALLY_ADDED:[Lt.MUNICIPALITY_ADMIN,Lt.ECEC_SERVICE_COUNSELOR,Lt.ECEC_LEAD,Lt.DCP_CHIEF,Lt.SERVICE_SECRETARY],CAR_READ_SUBSTITUTE_PRC_GUARDIAN:[Lt.MUNICIPALITY_ADMIN,Lt.MUNICIPALITY_SUPPORT,Lt.SERVICE_ADVISER,Lt.ECEC_SERVICE_COUNSELOR,Lt.ECEC_LEAD,Lt.DCP_CHIEF,Lt.FINANCIAL_LEAD,Lt.SERVICE_SECRETARY,Lt.DCP_TEACHER,Lt.DCP_CHILDCARER,Lt.CHILDMINDER,Lt.SPECIAL_EDUCATION_TEACHER],CAR_EDIT_SUBSTITUTE_PRC_GUARDIAN:[Lt.MUNICIPALITY_ADMIN,Lt.ECEC_SERVICE_COUNSELOR,Lt.ECEC_LEAD,Lt.DCP_CHIEF,Lt.SERVICE_SECRETARY],CAN_READ_FORMER_GUARDIANS_SECTION:[Lt.MUNICIPALITY_ADMIN,Lt.MUNICIPALITY_SUPPORT,Lt.ECEC_SERVICE_COUNSELOR,Lt.ECEC_LEAD,Lt.DCP_CHIEF,Lt.FINANCIAL_LEAD,Lt.SERVICE_SECRETARY],CAN_VIEW_GUARDIANS_DEPENDENTS:[Lt.MUNICIPALITY_ADMIN,Lt.MUNICIPALITY_SUPPORT,Lt.SERVICE_ADVISER,Lt.ECEC_SERVICE_COUNSELOR,Lt.ECEC_LEAD,Lt.DCP_CHIEF,Lt.FINANCIAL_LEAD,Lt.SERVICE_SECRETARY,Lt.DCP_TEACHER,Lt.DCP_CHILDCARER,Lt.CHILDMINDER,Lt.SPECIAL_EDUCATION_TEACHER,Lt.GUARDIAN],CAN_CONTINUE_ADDING_GUARDIAN:[Lt.MUNICIPALITY_ADMIN,Lt.ECEC_SERVICE_COUNSELOR,Lt.ECEC_LEAD,Lt.DCP_CHIEF,Lt.SERVICE_SECRETARY,Lt.SERVICE_ADVISER],CAN_ADD_SPOUSE:[Lt.MUNICIPALITY_ADMIN,Lt.ECEC_SERVICE_COUNSELOR,Lt.ECEC_LEAD,Lt.DCP_CHIEF]},Sd.Household={CAN_EDIT_HOUSEHOLD:[Lt.MUNICIPALITY_ADMIN,Lt.ECEC_SERVICE_COUNSELOR,Lt.DCP_CHIEF,Lt.ECEC_LEAD,Lt.SERVICE_SECRETARY,Lt.FINANCIAL_LEAD],CAN_INVALIDATE_HOUSEHOLD:[Lt.MUNICIPALITY_ADMIN,Lt.ECEC_SERVICE_COUNSELOR,Lt.DCP_CHIEF,Lt.ECEC_LEAD,Lt.SERVICE_SECRETARY,Lt.FINANCIAL_LEAD],CAN_SEE_HOUSEHOLD:[Lt.MUNICIPALITY_ADMIN,Lt.ECEC_SERVICE_COUNSELOR,Lt.DCP_CHIEF,Lt.ECEC_LEAD,Lt.SERVICE_SECRETARY,Lt.FINANCIAL_LEAD],CAN_SEE_PROPOSED_HOUSEHOLD:[Lt.MUNICIPALITY_ADMIN,Lt.MUNICIPALITY_SUPPORT,Lt.ECEC_SERVICE_COUNSELOR,Lt.DCP_CHIEF,Lt.ECEC_LEAD,Lt.FINANCIAL_LEAD,Lt.SERVICE_SECRETARY]},Sd.FeeHandling={CAN_CHECK_HOUSEHOLD:[Lt.MUNICIPALITY_ADMIN,Lt.MUNICIPALITY_SUPPORT,Lt.SERVICE_SECRETARY,Lt.FINANCIAL_LEAD],CAN_OPEN_FEE_DECISION_PDF:[Lt.MUNICIPALITY_ADMIN,Lt.MUNICIPALITY_SUPPORT,Lt.SERVICE_SECRETARY,Lt.FINANCIAL_LEAD],CAN_SEE_QUEUE_ACTIONS:[Lt.SERVICE_SECRETARY,Lt.FINANCIAL_LEAD,Lt.MUNICIPALITY_ADMIN],CAN_SEE_DECISIONS_ACTIONS:[Lt.SERVICE_SECRETARY,Lt.FINANCIAL_LEAD],CAN_REQUEST_NEW_INCOME_STATEMENT:[Lt.SERVICE_SECRETARY,Lt.FINANCIAL_LEAD],CAN_EDIT_FEE_OR_VALUE_DECISION:[Lt.SERVICE_SECRETARY,Lt.FINANCIAL_LEAD],CAN_DO_INDEX_INCREASE:[Lt.SERVICE_SECRETARY,Lt.MUNICIPALITY_ADMIN]},Sd.Invoicing={CAN_DELETE_TEMPORARILY_PAUSED_DATE_FROM_PAST:[Lt.MUNICIPALITY_ADMIN]},Sd.Attendance={CAN_ACCESS:[Lt.MUNICIPALITY_ADMIN,Lt.MUNICIPALITY_SUPPORT,Lt.DCP_CHIEF,Lt.ECEC_LEAD,Lt.DCP_TEACHER,Lt.DCP_CHILDCARER,Lt.CHILDMINDER],CAN_ACCESS_APPROVALS:[Lt.MUNICIPALITY_ADMIN,Lt.MUNICIPALITY_SUPPORT,Lt.DCP_CHIEF,Lt.ECEC_LEAD,Lt.CHILDMINDER]},Sd.Reports={CAN_DOWNLOAD_REPORTS_OF_VALUE_DECISIONS_FOR_SERVICE_VOUCHERS:[Lt.MUNICIPALITY_ADMIN,Lt.MUNICIPALITY_SUPPORT,Lt.ECEC_LEAD,Lt.FINANCIAL_LEAD,Lt.SERVICE_SECRETARY],CAN_DOWNLOAD_REPORTS_OF_ATTENDANCE_HOURS:[Lt.MUNICIPALITY_ADMIN,Lt.MUNICIPALITY_SUPPORT,Lt.ECEC_LEAD,Lt.FINANCIAL_LEAD,Lt.SERVICE_SECRETARY]},Sd.NFC={CAN_READ_TAG:[Lt.MUNICIPALITY_ADMIN,Lt.MUNICIPALITY_SUPPORT,Lt.DCP_CHIEF,Lt.ECEC_LEAD,Lt.DCP_TEACHER,Lt.DCP_CHILDCARER,Lt.CHILDMINDER],CAN_READ_TAG_INFO:[Lt.MUNICIPALITY_ADMIN,Lt.MUNICIPALITY_SUPPORT,Lt.DCP_CHIEF,Lt.ECEC_LEAD,Lt.DCP_TEACHER,Lt.DCP_CHILDCARER,Lt.CHILDMINDER],CAN_REGISTER_WITH_TAG:[Lt.MUNICIPALITY_ADMIN,Lt.DCP_CHIEF,Lt.ECEC_LEAD,Lt.DCP_TEACHER,Lt.DCP_CHILDCARER,Lt.CHILDMINDER],CAN_EDIT_TAGS:[Lt.MUNICIPALITY_ADMIN,Lt.DCP_CHIEF,Lt.ECEC_LEAD,Lt.DCP_TEACHER,Lt.DCP_CHILDCARER,Lt.CHILDMINDER]};class jg{constructor(s,d,k){this.http=s,this.router=d,this.siviProjectsGatewayService=k,this.lastVisitedUrl="",this.isHealthyApplication=!0}getApplicationHealth(){const d=this.siviProjectsGatewayService.getEnvironmentService().getEnvironment().API+"./api/sivi-accounts-api/actuator/health";return this.http.get(d)}setApplicationHealtStatus(s){this.applicationHealthStatus=s}getApplicationHealthStatus(){return this.applicationHealthStatus}setLastVisitedUrl(s){s!==hp.UPDATING_SERVICE&&(this.lastVisitedUrl=s)}getLastVisitedUrl(){return this.lastVisitedUrl}setIsHealthyApplication(s){this.isHealthyApplication=s}getIsHealthyApplication(){return this.isHealthyApplication}}jg.\u0275fac=function(s){return new(s||jg)(e.LFG(ae.eN),e.LFG(qt.F0),e.LFG(dl))},jg.\u0275prov=e.Yz7({token:jg,factory:jg.\u0275fac,providedIn:"root"});class rv{constructor(){this.userSession={lifetime:"session"},this.userSettings={lifetime:"permanent"},this.technicalEnvironment={lifetime:"session"},this.authenticationProcessData={lifetime:"session"}}}class vp extends Tn.y{constructor(s,d){super(new rv),this.storage=s,this.translate=d,this.STORAGE_KEY="vesa-storage"}loadSettings(){for(const s of Ro.TRANSLATED_UI_LANGUAGES)this.translate.addLangs([s]);return this.loadStorage()}getUserSession(){return this.state$.pipe((0,X.U)(s=>s&&s.userSession?s.userSession:this.getDefaultUserSession()))}saveUserSession(s){s.lifetime="session";const d={...this.state,userSession:s};this.updateStorage(d)}getTechnicalEnvironment(){return this.state$.pipe((0,X.U)(s=>s&&s.technicalEnvironment?s.technicalEnvironment:this.getDefaultTechnicalEnvironmentData()))}saveTechnicalEnvironment(s){s.lifetime="session";const d={...this.state,technicalEnvironment:s};this.updateStorage(d)}getUserSettings(){return this.state$.pipe((0,X.U)(s=>s&&s.userSettings?s.userSettings:this.getDefaultUserSettings()))}saveUserSettings(s){s.lifetime="permanent";const d={...this.state,userSettings:s};this.updateStorage(d)}saveAuthenticationProcessData(s){s.lifetime="session";const d={...this.state,authenticationProcessData:s};this.updateStorage(d)}getAuthenticationProcessData(){return this.state$.pipe((0,X.U)(s=>s&&s.authenticationProcessData?s.authenticationProcessData:null))}clearSessionData(){const s=(0,tt.Z)(this.state);for(const d in s)s.hasOwnProperty(d)&&"permanent"!==s[d].lifetime&&delete s[d];this.updateStorage(s),console.log("clearSessionData done",s)}updateStorage(s){this.setState(s),this.saveStorage(s)}saveStorage(s){this.storage.set(this.STORAGE_KEY,s)}loadStorage(){return new Promise(s=>{this.storage.create().then(()=>this.storage.get(this.STORAGE_KEY).then(d=>{console.log("loaded storage",d),this.setState(d||new rv);const k=(0,Hn.Z)(this.state.userSettings.language,"language","fi");this.setUserLanguage(k).then(()=>{s(!0)})},d=>{console.error("failed to load storage",d),s(!1)}),d=>{console.error("failed to start storage",d),s(!1)})})}setUserLanguage(s){return this.translate.setDefaultLang("fi"),this.translate.use(s).toPromise()}getDefaultUserSession(){return{token:null,userPersonData:{userId:null,firstNames:null,lastName:null,language:"fi",municipalityId:null,professional:!1,termsAndConditions:!1,cookieConsent:!1,professionalRoles:[]},userAccountData:{pin:null,exp:null,firstName:null,lastName:null,user_name:null}}}getDefaultUserSettings(){return{pushNotificationsPermission:"denied"}}getDefaultTechnicalEnvironmentData(){return{platformInformation:null,fcmToken:null}}}vp.\u0275fac=function(s){return new(s||vp)(e.LFG(lr.K),e.LFG(we.sK))},vp.\u0275prov=e.Yz7({token:vp,factory:vp.\u0275fac,providedIn:"root"});class _g{}class of extends Tn.y{constructor(s){super(new _g),this.storageService=s,this.loadSettingsFromStorage()}getTechnicalEnvironmentSettings(){return this.state$}setPlatformInformation(s){this.setState({...this.state,platformInformation:s}),this.saveSettings()}setFcmToken(s){this.setState({...this.state,fcmToken:s}),this.saveSettings()}saveSettings(){this.storageService.saveTechnicalEnvironment(this.state)}loadSettingsFromStorage(){this.storageService.getTechnicalEnvironment().pipe((0,ye.q)(1)).subscribe(s=>{s&&this.setState(s)})}}of.\u0275fac=function(s){return new(s||of)(e.LFG(vp))},of.\u0275prov=e.Yz7({token:of,factory:of.\u0275fac,providedIn:"root"});class Qd{constructor(s,d,k,ie,ot){this.ionicPlatform=s,this.browserPlatform=d,this.mobilePlatform=k,this.technicalEnvironmentService=ie,this.router=ot}getDevicePlatformInformation(){return this.isMobilePlatform()?this.mobilePlatform.getPlatformInformation():this.browserPlatform.getPlatformInformation()}isTabletPlatform(){return this.ionicPlatform.is("tablet")}isMobilePlatform(){return this.ionicPlatform.is("cordova")}isMobileWebPlatform(){return!this.ionicPlatform.is("cordova")&&!this.ionicPlatform.is("desktop")}isMobileOrBrowser(){return this.isMobilePlatform()?"mobile":"browser"}isMobilePlatformWithRequestDesktopMode(){return this.ionicPlatform.is("mobileweb")&&!this.ionicPlatform.is("android")&&!this.ionicPlatform.is("ios")}isMediumDisplay(){return this.ionicPlatform.width()<960}isSmallDisplay(){return this.ionicPlatform.width()<768}setPlatformInformation(s){this.technicalEnvironmentService.setPlatformInformation(s)}getPlatformInformation(){return this.technicalEnvironmentService.getTechnicalEnvironmentSettings().pipe((0,ye.q)(1),(0,X.U)(s=>s.platformInformation))}openNewTab(s){const d=this.router.serializeUrl(this.router.createUrlTree([s])),k=this.isMobilePlatform()?"_self":"_blank";window.open(d,k)}}Qd.\u0275fac=function(s){return new(s||Qd)(e.LFG(Nt.t4),e.LFG(Hm),e.LFG(Vm),e.LFG(of),e.LFG(qt.F0))},Qd.\u0275prov=e.Yz7({token:Qd,factory:Qd.\u0275fac,providedIn:"root"});class jp{constructor(){this.errors=[]}getErrors(){return this.errors.slice(-10)}addError(s){this.errors.push({id:s,date:new Date})}resetErrors(){this.errors=[]}}jp.\u0275fac=function(s){return new(s||jp)},jp.\u0275prov=e.Yz7({token:jp,factory:jp.\u0275fac,providedIn:"root"});class yp extends e.qLn{constructor(s,d,k,ie,ot,Cn){super(),this.notify=s,this.platformHelper=d,this.siviErrorManagerService=k,this.storageService=ie,this.router=ot,this.injector=Cn}handleError(s){var d=()=>super.handleError,k=this;return(0,o.Z)(function*(){if(d().call(k,s),!k.platformHelper.isMobilePlatform()&&k.isChunkLoadError(s))return void k.promptToUpdateApplication();const ot=k.injector.get(jg).getApplicationHealthStatus();if(!ot||ot===mg.UP)return k.reportSentryError(s).then(Cn=>{Cn&&k.trackErrorIdsForProfessionals(Cn)},Cn=>{console.error("reportSentryError failed",Cn)});k.router.navigate([hp.UPDATING_SERVICE])})()}trackErrorIdsForProfessionals(s){this.storageService.getUserSession().pipe((0,ye.q)(1)).subscribe(d=>{(0,Hn.Z)(d.userPersonData,"professional",!1)&&this.siviErrorManagerService.addError(s)})}reportSentryError(s){return(0,o.Z)(function*(){return Qe.Tb(s.originalError||s)})()}promptToUpdateApplication(){var s=this;return(0,o.Z)(function*(){(yield s.notify.createConfirmationPopUp("Browser.App.UpdateAvailable.Title","Browser.App.UpdateAvailable.Message","Browser.App.UpdateAvailable.ReloadToUpdate")).onDidDismiss().then(k=>{k&&k.data&&window.location.reload()},k=>{console.error("promptToUpdateApplication failed",k)})})()}isChunkLoadError(s){return/Loading chunk [\d]+ failed/.test(s.message)}}yp.\u0275fac=function(s){return new(s||yp)(e.LFG(md),e.LFG(Qd),e.LFG(jp),e.LFG(vp),e.LFG(qt.F0),e.LFG(e.zs3))},yp.\u0275prov=e.Yz7({token:yp,factory:yp.\u0275fac});class Bl{constructor(s,d){this.injector=s,this.router=d}intercept(s,d){return d.handle(s).pipe((0,ge.K)(k=>{const ie=this.injector.get(jg);return k.status>=500&&k.status<=503&&ie.getApplicationHealthStatus()===mg.DOWN&&(console.error("Interceptor error",k),this.router.navigate([hp.UPDATING_SERVICE])),(0,T._)(k)}))}}Bl.\u0275fac=function(s){return new(s||Bl)(e.LFG(e.zs3),e.LFG(qt.F0))},Bl.\u0275prov=e.Yz7({token:Bl,factory:Bl.\u0275fac});class Kp{constructor(){this.siviClick=new e.vpe}keypress(s){(s.key===sm.SPACE||s.key===sm.ENTER)&&this.siviClick.emit(s)}click(s){this.siviClick.emit(s)}}Kp.\u0275fac=function(s){return new(s||Kp)},Kp.\u0275dir=e.lG2({type:Kp,selectors:[["","siviKeyboardEvents",""]],hostBindings:function(s,d){1&s&&e.NdJ("keypress",function(ie){return d.keypress(ie)})("click",function(ie){return d.click(ie)})},outputs:{siviClick:"siviClick"}});class bp{constructor(s){this.elRef=s}ngOnInit(){this.goToInvalidSub=this.goToInvalid$.subscribe(()=>this.scrollIntoInvalid())}ngOnDestroy(){this.goToInvalidSub.unsubscribe()}scrollIntoInvalid(){const s=this.elRef.nativeElement.querySelector(".invalid");if(s){s.dispatchEvent(new Event("blur"));const d=s.querySelector("input");d&&d.focus({preventScroll:!0}),s.scrollIntoView({behavior:"smooth",block:"start",inline:"nearest"})}}}bp.\u0275fac=function(s){return new(s||bp)(e.Y36(e.SBq))},bp.\u0275dir=e.lG2({type:bp,selectors:[["","siviGoToInvalid",""]],inputs:{goToInvalid$:["siviGoToInvalid","goToInvalid$"]}});class af{constructor(s,d){this.renderer=s,this.$elem=d.nativeElement}ngOnInit(){this.align&&(this.renderer.setAttribute(this.$elem,"size","12"),this.renderer.setAttribute(this.$elem,"size-md","6"),this.renderer.setAttribute(this.$elem,"size-lg","5"),this.renderer.setAttribute(this.$elem,"size-xl","4"),"right"===this.align&&this.renderer.setAttribute(this.$elem,"offset-lg","1"))}}af.\u0275fac=function(s){return new(s||af)(e.Y36(e.Qsj),e.Y36(e.SBq))},af.\u0275dir=e.lG2({type:af,selectors:[["","siviGridCol",""]],inputs:{align:["siviGridCol","align"]}});class wm{constructor(s){this.elRef=s,this.shouldScroll=!0}ngOnInit(){this.shouldScroll&&this.elRef.nativeElement.scrollIntoView({behavior:"smooth"})}}wm.\u0275fac=function(s){return new(s||wm)(e.Y36(e.SBq))},wm.\u0275dir=e.lG2({type:wm,selectors:[["","siviScrollIntoView",""]],inputs:{shouldScroll:"shouldScroll"}});class Jc{}Jc.\u0275fac=function(s){return new(s||Jc)},Jc.\u0275mod=e.oAB({type:Jc}),Jc.\u0275inj=e.cJS({imports:[Nt.Pc]});class Ac{constructor(s,d,k){this.modalCtrl=s,this.route=d,this.router=k}openModal(s,d=Ro.MODAL,k="true",ie){var ot=this;return(0,o.Z)(function*(){ie=ie||[],"modal-full-size"===s.cssClass&&(s.backdropDismiss=!1);try{const Cn=yield ot.modalCtrl.create(s);return ot.route||console.error("activatedRoute provider is not injected to the page that is extending SiviPage class!"),Cn.onDidDismiss().then(()=>ot.removeQueryParams([d,...co.getSinglePropertyFromObjectArray("id",ie)])),yield Cn.present(),ot.updateQueryParams(ot.combineQueryParams(d,k,ie)),Cn}catch(Cn){console.error("openModal failed",Cn)}})()}create(s){var d=this;return(0,o.Z)(function*(){try{return yield d.modalCtrl.create(s)}catch(k){console.error("create failed",k)}})()}dismiss(s,d,k){var ie=this;return(0,o.Z)(function*(){return ie.modalCtrl.dismiss(s,d,k)})()}getTop(){var s=this;return(0,o.Z)(function*(){return s.modalCtrl.getTop()})()}updateQueryParam(s,d,k=!1){try{const ie={};ie[s]=d;const ot=this.router.createUrlTree([],{queryParams:ie,queryParamsHandling:"merge",preserveFragment:!0});this.router.navigateByUrl(ot,{replaceUrl:k})}catch(ie){console.error("updateQueryParam failed",ie)}}updateQueryParams(s,d=!1){try{const k={queryParams:s,queryParamsHandling:"merge",preserveFragment:!0},ie=this.router.createUrlTree([],k);this.router.navigateByUrl(ie,{replaceUrl:d})}catch(k){console.error("updateQueryParams failed",k)}}removeQueryParam(s){this.updateQueryParam(s,null,!0)}removeQueryParams(s){const d=s.reduce((k,ie)=>({...k,[ie]:null}),{});this.updateQueryParams(d,!0)}combineQueryParams(s,d,k){const ie={};ie[s]=d;for(const ot of k)ie[ot.id]=ot.value;return ie}}Ac.\u0275fac=function(s){return new(s||Ac)(e.LFG(Nt.IN),e.LFG(qt.gz),e.LFG(qt.F0))},Ac.\u0275prov=e.Yz7({token:Ac,factory:Ac.\u0275fac,providedIn:"root"});class sf{constructor(s){this.modalCtrl=s}onDismiss(){var s=this;return(0,o.Z)(function*(){yield(yield s.modalCtrl.getTop()).dismiss()})()}}sf.\u0275fac=function(s){return new(s||sf)(e.Y36(Ac))},sf.\u0275cmp=e.Xpm({type:sf,selectors:[["sivi-lib-read-tag-modal"]],decls:11,vars:9,consts:[[1,"header"],["fill","clear","size","small",3,"click"],["name","close"],[1,"modal"],[1,"title"],[3,"click"]],template:function(s,d){1&s&&(e.TgZ(0,"div",0)(1,"ion-button",1),e.NdJ("click",function(){return d.onDismiss()}),e.ALo(2,"translate"),e._UZ(3,"cgi-icon",2),e.qZA()(),e.TgZ(4,"div",3)(5,"h3",4),e._uU(6),e.ALo(7,"translate"),e.qZA(),e.TgZ(8,"ion-button",5),e.NdJ("click",function(){return d.onDismiss()}),e._uU(9),e.ALo(10,"translate"),e.qZA()()),2&s&&(e.xp6(1),e.uIk("aria-label",e.lcZ(2,3,"General.Buttons.Close")),e.xp6(5),e.Oqu(e.lcZ(7,5,"Mobile.NFC.ReadTag")),e.xp6(3),e.Oqu(e.lcZ(10,7,"General.Buttons.Close")))},dependencies:[we.X$],styles:[".modal[_ngcontent-%COMP%]{height:200px;display:flex;flex-direction:column;align-items:center;justify-content:space-between;padding:25px}.title[_ngcontent-%COMP%]{color:var(--ion-color-secondary)}ion-button[_ngcontent-%COMP%]{min-width:30px}"]});class pl{}pl.\u0275fac=function(s){return new(s||pl)},pl.\u0275mod=e.oAB({type:pl}),pl.\u0275inj=e.cJS({imports:[we.aw]});class Zm{constructor(s,d,k){this.vibration=s,this.nfc=d,this.modalCtrl=k,this.isInitialized=!1,this.shouldReadTag=!1,this.vibrateDuration=250,this.scannerReadEvents$=new l.x}initialize(){console.log("Initialize android scanner service"),this.nfc.addTagDiscoveredListener(()=>{console.log("[nfc-scanner-android] addTagDiscoveredListener attached")},s=>{console.error("[nfc-scanner-android] tag listener failed to attach",JSON.stringify(s)),this.scannerReadEvents$.error(new Error("listener failed to attach"))}).subscribe({next:s=>{const d=this.shouldReadTag;this.shouldReadTag&&this.disableScanning(),this.scannerReadEvents$.next({...s,isEnabled:d})},error:s=>{console.error("[nfc-scanner-android] failed to read tag",JSON.stringify(s)),this.scannerReadEvents$.next(null)}}),this.isInitialized=!0}enableScanning(){this.shouldReadTag=!0,this.openNfcModal()}disableScanning(){this.shouldReadTag=!1,this.modal&&(this.modal.dismiss(),this.modal=null)}listenForReadEvents(){return this.scannerReadEvents$.asObservable()}openNfcModal(){var s=this;return(0,o.Z)(function*(){s.modal=yield s.modalCtrl.create({component:sf,cssClass:"modal-auto-height-from-small"}),s.vibration.vibrate(s.vibrateDuration),yield s.modal.present()})()}}Zm.\u0275fac=function(s){return new(s||Zm)(e.LFG(Zn),e.LFG(aa),e.LFG(Ac))},Zm.\u0275prov=e.Yz7({token:Zm,factory:Zm.\u0275fac});class Jp{constructor(s){this.nfc=s,this.isInitialized=!1,this.scannerReadEvents$=new l.x}initialize(){console.log("Initialize ios scanner service"),this.isInitialized=!0}enableScanning(){this.nfc.scanTag().then(s=>{console.log("[nfc-scanner-ios] tag scanned",JSON.stringify(s)),this.scannerReadEvents$.next({tag:s,isEnabled:!0})},s=>{console.error("[nfc-scanner-ios] scanNdef error",JSON.stringify(s)),this.scannerReadEvents$.next(null)})}disableScanning(){}listenForReadEvents(){return this.scannerReadEvents$.asObservable()}}Jp.\u0275fac=function(s){return new(s||Jp)(e.LFG(aa))},Jp.\u0275prov=e.Yz7({token:Jp,factory:Jp.\u0275fac});class Cp{constructor(s,d,k,ie){this.platform=s,this.nfc=d,this.androidScannerService=k,this.iosScannerService=ie,this.scannerService=this.androidScannerService,this.initialized=!1}initialize(){var s=this;return(0,o.Z)(function*(){if(s.initialized)return s.isEnabledOnDevice();if("cordova"!==(yield s.platform.ready()))return s.initialized=!0,!1;s.scannerService=s.platform.is("ios")?s.iosScannerService:s.androidScannerService,s.scannerService.isInitialized||s.scannerService.initialize();const k=yield s.isEnabledOnDevice();return s.initialized=!0,k})()}enableScanning(){this.scannerService.enableScanning()}disableScanning(){this.scannerService.disableScanning()}isEnabledOnDevice(){return this.platform.is("ios")?Promise.resolve(!0):this.platform.is("cordova")?this.nfc.enabled():Promise.resolve(!1)}listenForReadEvents(){return this.scannerService.listenForReadEvents().pipe((0,ve.h)(s=>!!s),oe(Ro.NFC_READ_WAIT_TIME),(0,X.U)(s=>{try{return{...s,tagId:this.nfc.bytesToHexString(s.tag.id)}}catch(d){return console.error("[nfc-scanner] failed to get tag uid",JSON.stringify(d)),null}}))}}Cp.\u0275fac=function(s){return new(s||Cp)(e.LFG(Nt.t4),e.LFG(aa),e.LFG(Zm),e.LFG(Jp))},Cp.\u0275prov=e.Yz7({token:Cp,factory:Cp.\u0275fac});class Hh{}Hh.\u0275fac=function(s){return new(s||Hh)},Hh.\u0275mod=e.oAB({type:Hh}),Hh.\u0275inj=e.cJS({providers:[aa,ea,Zn,Cp,Zm,Jp]});class md{constructor(s,d,k,ie){this.toastCtrl=s,this.alertCtrl=d,this.translate=k,this.siviErrorManagerService=ie,this.errors=[]}toast(s){this.createToast(s)}toastSaveSuccess(){this.createToast("Message.Save.Success")}toastDeleteSuccess(){this.createToast("Message.Delete.Success")}toastCancelSuccess(){this.createToast("Message.Cancel.Success")}alert(s,d){this.createErrorAlert(s,d)}alertWithOptions(s,d,k,ie){return this.createErrorAlert(s,d,k,ie,!1)}alertBackendError(s,d="Message.Error.GeneralTitle",k,ie=!0){let ot=this.getErrorMessage(s),Cn=this.getErrorParts(ot);const ir="Backend.Error.";let Yo=this.translate.instant(ir.concat(Cn[0]));(!ot||Yo===ir.concat(Cn[0]))&&(ot=(0,Hn.Z)(s,"error.error")||(0,Hn.Z)(s,"error"),Cn=ot&&"string"==typeof ot?ot.split(" "):[ot],Yo=this.translate.instant(ir.concat(Cn[0]))),ot&&Yo!==ir.concat(Cn[0])?this.createAlertPopup(d,Yo,Cn,k,ie):(console.warn("Unknown error: ",s),this.alertByStatus(s,d))}alertBackendErrorWithCode(s,d="Message.Error.GeneralTitle"){var k=this;return(0,o.Z)(function*(){const ie=s?.error?.code;if(ie){const ot="Backend.Error.";return k.createErrorAlert(d,ot+ie)}yield k.alertBackendError(s)})()}alertByStatus(s,d="Message.Error.GeneralTitle"){if(s&&s.status)if(403===s.status)this.alertNoPermissionError();else this.createErrorAlert(d,"Message.Error.UnknownError");else this.createErrorAlert(d,"Message.Error.UnknownError")}deleteConfirmPopup(s="Message.Delete.Question",d="General.Buttons.Delete"){return this.createConfirmationPopUp("Message.Delete.Title",s,d)}inactivationConfirmPopup(){const s=this.translate.instant("Message.Inactivation.Title"),d=this.translate.instant("Message.Inactivation.Question");return this.createConfirmationPopUp(s,d,"General.Buttons.Inactivate")}alertSaveError(){this.createErrorAlert("Message.Save.Error")}alertNoPermissionError(){this.createErrorAlert("Message.Error.GeneralTitle","Message.Error.NoPermission")}alertDeleteError(){this.createErrorAlert("Message.Delete.Error")}alertFormError(){this.createErrorAlert("Message.Error.GeneralTitle","Message.Error.ReviewFormData")}alertFormSaveFailed(){this.createErrorAlert("Message.Save.Error","Message.Error.TryAgainLater")}alertFailedToCommunicateWithBackend(){this.createErrorAlert("Message.Error.GeneralTitle","Message.Error.GeneralBackendError")}alertFailedToLoadData(){this.createErrorAlert("Message.Error.GeneralTitle","Message.Loading.Error")}alertDeleteFailed(){this.createErrorAlert("Message.Delete.Error")}alertDeleteSuccess(){this.createErrorAlert("Message.Delete.Success")}promptDiscardChanges(){return this.createConfirmationPopUp("Message.Navigation.Confirm.Title","Message.Changes.DiscardAndNavigate.UnsavedChanges","General.Buttons.DiscardChanges")}createToast(s){var d=this;return(0,o.Z)(function*(){(yield d.toastCtrl.create({message:d.translate.instant(s),duration:3e3})).present()})()}createErrorAlert(s,d,k,ie,ot=!0){var Cn=this;return(0,o.Z)(function*(){const ir=ot?"<br>"+Cn.getSentryErrorMessage():"";d=d&&d.length>0?"<br>"+Cn.translate.instant(d)+ir:"";const Yo=k&&k.length>0?k.map(bc=>`<b>${bc}</b>`):"",tl=yield Cn.alertCtrl.create({cssClass:ie?"alert-custom-css alert-custom-big":"alert-custom-css",header:s.length>0?Cn.translate.instant(s):"",message:[d,...Yo].join("<br>"),buttons:[{cssClass:"confirm-button",text:Cn.translate.instant("General.Buttons.Ok"),handler:()=>(tl.dismiss(!0),!1)}]});return yield tl.present(),Cn.addClickListenerToButtonInModal("copyErrorButton"),tl})()}createAlertWithValueToDisplay(s,d,k){var ie=this;return(0,o.Z)(function*(){yield(yield ie.alertCtrl.create({cssClass:"alert-custom-css",header:s.length>0?ie.translate.instant(s):"",message:d&&d.length>0?ie.translate.instant(d,k):"",buttons:[{cssClass:"confirm-button",text:ie.translate.instant("General.Buttons.Ok")}]})).present()})()}createConfirmationPopUp(s,d,k){var ie=this;return(0,o.Z)(function*(){const ot=k&&k.length>0?k:"General.Buttons.Ok",Cn=yield ie.alertCtrl.create({cssClass:"alert-custom-css",header:s.length>0?ie.translate.instant(s):"",message:d&&d.length>0?ie.translate.instant(d):"",buttons:[{cssClass:"cancel-button",text:ie.translate.instant("General.Buttons.Cancel"),handler:()=>(Cn.dismiss(!1),!1)},{cssClass:"confirm-button",text:ie.translate.instant(ot),handler:()=>(Cn.dismiss(!0),!1)}]});return yield Cn.present(),ie.addClickListenerToButtonInModal("copyErrorButton"),Cn})()}createCustomConfirmationPopUp(s,d,k,ie,ot){var Cn=this;return(0,o.Z)(function*(){const ir=yield Cn.alertCtrl.create({cssClass:"alert-custom-css",header:Cn.translate.instant(s),message:Cn.translate.instant(d),inputs:ot||[],buttons:[{cssClass:"cancel-button",text:Cn.translate.instant(ie),handler:()=>(ir.dismiss(!1),!1)},{cssClass:"confirm-button",text:Cn.translate.instant(k),handler:()=>(ir.dismiss(!0),!1)}]});return yield ir.present(),ir})()}getSentryErrorMessage(){try{const s=Nn().subtract(1,"minutes");if(this.errors=this.siviErrorManagerService.getErrors().filter(d=>Nn(d.date,as.STANDARD_WITH_TIME).isAfter(s)),this.errors&&this.errors.length>0)return this.siviErrorManagerService.resetErrors(),`<br><br>${this.translate.instant("Message.Error.SentryIdentification")}\n        <ul>${this.errors.map(d=>"<li>"+d.id+"</li>").join("")}</ul>\n        <button id="copyErrorButton">\n          <i class="material-icons" [attr.aria-label]="'Message.Error.CopyContent' | translate">\n            <span aria-hidden="true">content_copy</span>\n          </i>${this.translate.instant("Message.Error.CopyContent")}\n        </button>`}catch(s){return console.error("getSentryErrorMessage failed",s),""}return""}addClickListenerToButtonInModal(s){try{document.querySelector(`#${s}`)&&document.querySelector(`#${s}`).addEventListener("click",this.copyErrorToClipboard.bind(this,s))}catch(d){console.error(`Could not add the click listener to the button ${s}`,d)}}copyErrorToClipboard(s){const k=this.errors.map(ie=>ie.id).join(", ");navigator.clipboard.writeText(k).then(()=>{this.toast(this.translate.instant("Message.Confirmation.CopiedToClipboard"));try{document.querySelector(`#${s}`).removeEventListener("click",this.copyErrorToClipboard.bind(this,s))}catch(ie){console.error(`Could not remove the click listener to the button ${s}`,ie)}},ie=>{console.log("Error copying to the clipboard",ie)})}getDeleteConfirmation(s="Message.Delete.Question",d="General.Buttons.Delete"){var k=this;return(0,o.Z)(function*(){const ot=yield(yield k.deleteConfirmPopup(s,d)).onDidDismiss();return ot&&ot.data})()}getErrorMessage(s){return"string"==typeof s?s:s&&s.error&&s.error.message}getErrorParts(s){return s?s.split(" "):[s]}createAlertPopup(s,d,k,ie,ot=!0){for(let Cn=1;Cn<k.length;Cn++)d+=" "+k[Cn];ie?this.createAlertWithValueToDisplay(s,d,ie):this.createErrorAlert(s,d,[],!1,ot)}}md.\u0275fac=function(s){return new(s||md)(e.LFG(Nt.yF),e.LFG(Nt.Br),e.LFG(we.sK),e.LFG(jp))},md.\u0275prov=e.Yz7({token:md,factory:md.\u0275fac,providedIn:"root"});class vg{constructor(){this.pushNotificationsPermission="default",this.selectedMunicipalityId=""}}class Vh extends Tn.y{constructor(s){super(new vg),this.storageService=s,this.loadSettingsFromStorage()}getSettings(){return this.state$}getUserSettingsByKey(s){return this.state$.pipe((0,me.b)(500),(0,ve.h)(d=>!(0,Ci.isUndefined)(d[s])&&""!==d[s]),(0,X.U)(d=>d[s]),(0,be.x)((d,k)=>(0,Ci.isEqual)(d,k)))}setMunicipalityId(s){this.setState({...this.state,selectedMunicipalityId:s}),this.saveSettings()}setSelectedMunicipality(s){this.setState({...this.state,selectedMunicipality:s}),this.saveSettings()}setSelectedMunicipalityUrls(s){this.setState({...this.state,selectedMunicipalityUrls:s}),this.saveSettings()}resetMunicipalitySelection(){this.setState({...this.state,selectedMunicipality:void 0,selectedMunicipalityUrls:void 0}),this.saveSettings()}setPushNotificationsPermissionState(s){this.setState({...this.state,pushNotificationsPermission:s}),this.saveSettings()}setLanguage(s){this.setState({...this.state,language:s}),this.saveSettings()}saveSettings(){this.storageService.saveUserSettings(this.state)}loadSettingsFromStorage(){this.storageService.getUserSettings().subscribe(s=>{s&&this.setState(s)})}}Vh.\u0275fac=function(s){return new(s||Vh)(e.LFG(vp))},Vh.\u0275prov=e.Yz7({token:Vh,factory:Vh.\u0275fac,providedIn:"root"});class Qp{constructor(s,d,k){this.http=s,this.translate=d,this.userSettingsService=k,this.fi={language:ds.FINNISH,country:"FI",text:"Suomeksi",simpleLanguage:"Suomi"},this.sv={language:ds.SWEDISH,country:"SE",text:"P\xe5 Svenska",simpleLanguage:"Svenska"},this.en={language:ds.ENGLISH,country:"GB",text:"In English",simpleLanguage:"English"},this.technical_language={language:"technical",country:"",text:"",simpleLanguage:""},this.locales=[this.fi,this.sv,this.en],this.defaultLanguage=this.fi,this.fullLanguageLists={fi:void 0,en:void 0,sv:void 0},this.translations={},this.languageInUse$=new g.X(this.fi),this.languagesPath=document.location.origin+"/assets/json/languages/",this.initLanguages(),this.getFullLanguageLists()}instant(s){return this.translate.instant(s)}setLanguage(s,d=!1){if(!s)throw new Error("setLanguage value not found");d||!d&&!this._getForcedLanguage()?(this.languageInUse$.next(s),this.translate.use(this.languageInUse$.getValue().language),this.userSettingsService.setLanguage(this.languageInUse$.getValue())):console.log("setLanguage will not change language due to vesaLanguage param in the URL",s)}getLanguagesText(s=[]){const d=this.getCurrentUserLanguage().language,k=this.fullLanguageLists[d];return d&&k?k.filter(ot=>s.includes(ot.code)||s.includes(ot.code.toUpperCase())||s.includes(ot.code.toLowerCase())).map(ot=>ot.name).join(", "):""}setLanguageByLanguageCode(s){const d=this.getLanguageLocaleByLanguageCode(s);d&&this.setLanguage(d)}getLanguageLocaleByLanguageCode(s){return s?this.locales.find(d=>d.language===s.toLowerCase()):null}getAllTranslatedLanguages(){return this.locales}getUserLanguage(){return this.languageInUse$.asObservable()}getTranslationByLocale(s,d){let k;d||(d=this.translate.currentLang);try{k=this.translations[d][s]}catch(ie){return console.log("Error retrieving key: ",s,"with locale",d),console.log(ie),s}return k||s}getSimpleLanguages(){return[ds.FINNISH,ds.SWEDISH,ds.ENGLISH]}getCurrentUserLanguage(){return this.languageInUse$.value}setLanguageFromURL(){const s=this._getForcedLanguage();s&&(console.log("setLanguageFromURL set language",s),this.setLanguage(s,!0))}_showTranslations(s){const d=s?this.defaultLanguage.language:this.technical_language.language;this.translate.setDefaultLang(d),this.translate.use(d)}_getForcedLanguage(){const s=co.getParamFromURL("vesaLanguage");return this.locales.find(d=>d.language===s)}setInitialLanguage(s){let d=s||this.defaultLanguage;const k=this._getForcedLanguage();k&&(d=k,this.userSettingsService.setLanguage(k)),console.log("setInitialLanguage",s),this.languageInUse$.next(d),this.translate.setDefaultLang(d.language),this.translate.use(d.language)}getLanguageList(s,d=!1){if(!s)return n.E;const k=`?cb=${(new Date).getDate()}${(new Date).getMonth()}`,ie=`${this.languagesPath}${s}.json${k}`;return this.http.get(ie).pipe((0,X.U)(ot=>{if(d){const Cn=this.getAllTranslatedLanguages().map(ir=>ir.language.toUpperCase());ot=ot.filter(ir=>!Cn.includes(ir.code.toUpperCase()))}return ot}))}getSelectedLanguagesText(s,d){if(!s||0===s.length||s.includes(void 0))return"-";if("string"==typeof s)return s;s=s.map(ie=>{if(ie)return ie.toUpperCase()});const k=[];return s.map(ie=>{const ot=d.find(Cn=>ie===Cn.code);ot&&k.push(ot.name)}),k.join(", ")}initLanguages(){var s=this;return(0,o.Z)(function*(){for(const d of s.locales)yield s.translate.getTranslation(d.language).pipe((0,ye.q)(1)).subscribe(k=>{s.translations={...s.translations,[d.language]:k}})})()}getFullLanguageLists(){this.getLanguageList("fi",!1).pipe((0,ye.q)(1)).subscribe(s=>this.fullLanguageLists.fi=s),this.getLanguageList("sv",!1).pipe((0,ye.q)(1)).subscribe(s=>this.fullLanguageLists.sv=s),this.getLanguageList("en",!1).pipe((0,ye.q)(1)).subscribe(s=>this.fullLanguageLists.en=s)}}Qp.\u0275fac=function(s){return new(s||Qp)(e.LFG(ae.eN),e.LFG(we.sK),e.LFG(Vh))},Qp.\u0275prov=e.Yz7({token:Qp,factory:Qp.\u0275fac});class Kg extends Ti{constructor(s,d){super(s,d),this.http=s,this.siviProjectsGateway=d}getCodesByName(s){const d="./api/sivi-codes-api/codes/name/"+s+"/";return this.get(d)}getCodesByNameIncludedExternal(s){const d=`./api/sivi-codes-api/codes/?name=${s}&includeExternal=true`;return this.get(d)}getCodesByParentType(s){const d="./api/sivi-codes-api/codes/"+s;return this.get(d).pipe((0,X.U)(k=>k.childCodes))}}Kg.\u0275fac=function(s){return new(s||Kg)(e.LFG(ae.eN),e.LFG(dl))},Kg.\u0275prov=e.Yz7({token:Kg,factory:Kg.\u0275fac});class Qc extends Ti{constructor(s,d){super(s,d),this.http=s,this.siviProjectsGatewayService=d}deleteOrganization(s){const d=`./api/sivi-accounts-api/orgs/${s}?deleteChildOrganizations=false`;return this.delete(d)}getOrganization(s){const d="./api/sivi-accounts-api/orgs/?ids="+s,k=this.getCommonPageableSearchOptions(0,1);return this.get(d,k).pipe((0,X.U)(ie=>ie&&ie.content?ie.content[0]:null))}getDaycarePlaces(s,d,k,ie){const ot=`./api/sivi-accounts-api/orgs/municipalities/${k}/daycareplaces`,Cn=this.getCommonPageableSearchOptions(s,d,ie);return this.get(ot,Cn)}getSimpleListOfDaycarePlaces(s){const d=`./api/sivi-accounts-api/orgs/municipality/${s}/daycare`;return this.get(d)}getAssignedDaycarePlaces(s){const d=`./api/sivi-accounts-api/orgs/municipalities/${s}/daycareplaces/own`,k=this.getCommonOptions();return this.get(d,k)}getDaycarePlaceGroups(s,d,k){const ie="./api/sivi-accounts-api/manage/daycare/"+k+"/groups",ot=this.getCommonPageableSearchOptions(s,d);return this.get(ie,ot)}getChildrenForLoggedInGuardian(){return this.get("./api/sivi-accounts-api/guardians/me/children")}getChildrenForGuardian(s){return this.get("./api/sivi-accounts-api/people/me/children",this.getCommonPageableSearchOptions(s.page,s.count))}getChildrenForOrganization(s,d,k,ie){const ot="./api/sivi-accounts-api/person-search/children?organizationId="+k,Cn=this.getCommonPageableSearchOptions(s,d,ie);return this.get(ot,Cn)}getChildrenForOrganizationWithSearchParam(s,d){const k="./api/sivi-accounts-api/person-search/children?organizationId="+s,ie=this.getCommonPageableSearchOptions(d.page,d.count,d.sortParam);return d.searchTerm&&(ie.params=ie.params.set("searchTerm",d.searchTerm)),this.get(k,ie)}getMunicipalities(s,d){const ie=this.getCommonPageableSearchOptions(s,d);return this.get("./api/sivi-accounts-api/orgs/municipalities",ie)}getUnit(s){const d="./api/sivi-accounts-api/manage/daycare/"+s;return this.get(d)}getMunicipality(s){const d="./api/sivi-accounts-api/orgs/municipalities/"+s;return this.get(d)}getUnitFocuses(s,d,k){const ot=`./api/sivi-accounts-api/manage/daycare/${s}/focuses?validFrom=${d}${k?`&validUntil=${k}`:""}`;return this.get(ot)}getUnitFocusesOnDate(s,d){const k=`./api/sivi-accounts-api/daycares/${s}/focuses`,ie=this.getCommonOptions(),ot=(new ae.LE).set("date",d);return this.get(k,{...ie,params:ot})}getGroup(s){const d="./api/sivi-accounts-api/manage/group/"+s;return this.get(d)}saveGroup(s){return this.saveEntity(s,"./api/sivi-accounts-api/manage/group/")}saveUnit(s){return this.saveEntity(s,"./api/sivi-accounts-api/manage/daycare/")}reactivateUnit(s){const d=`./api/sivi-accounts-api/manage/daycare/${s}/reactivate`;return this.put(null,d)}reactivateGroup(s){const d=`./api/sivi-accounts-api/manage/group/${s}/reactivate`;return this.put(null,d)}saveUnitContactsAndChildminderPic(s){return this.saveEntity(s,"./api/sivi-accounts-api/manage/daycare/contacts-and-childminder-pic")}saveUnitContactInformation(s){return this.saveEntity(s,"./api/sivi-accounts-api/manage/daycare/contacts")}saveOrganizationGeneral(s){return this.saveEntity(s,"./api/sivi-accounts-api/orgs/")}saveMunicipality(s){return this.saveEntity(s,"./api/sivi-accounts-api/orgs/municipalities")}saveChild(s){return this.saveEntity(s,"./api/sivi-accounts-api/people/children")}getOrganizationPhoto(s){const d="./api/sivi-accounts-api/orgs/"+s+"/documents/organization-main-picture";return this.getFileWithProgress(d).pipe((0,le.w)(k=>this.getImageFile(k,s)))}saveOrganizationPhoto(s,d){const k="./api/sivi-accounts-api/orgs/"+s+"/documents";return this.saveFile(d,k)}saveOrganizationLogo(s,d){const k="./api/sivi-accounts-api/orgs/"+s+"/documents/organization-logo";return this.saveFile(d,k)}deleteOrganizationPhoto(s){const d="./api/sivi-accounts-api/orgs/"+s+"/documents/organization-main-picture",k={...this.getCommonOptions(),responseType:"arraybuffer"};return this.delete(d,k)}findEducationalOrganizationsByLocation(s){const k={...this.getCommonPageableSearchOptions(Ro.PAGE_NUMBER_FIRST,Ro.HIGH_API_RESPONSES),params:s};return this.get("./api/sivi-accounts-api/orgs/pre-primary-education-place/",k)}getOrganizationTreeByOrganizationId(s){if(!s)throw new Error("getOrganizationTreeByOrganizationId organizationId is missing");const d=`./api/sivi-accounts-api/orgs/organization-tree/${s}`;return this.get(d)}getMunicipalityCodeList(s){const d=`./api/sivi-accounts-api/municipality-list?language=${s}`;return this.get(d)}getMunicipalityLogo(s){const d=`./api/sivi-accounts-api/orgs/${s}/documents/organization-logo?documentSize=MEDIUM`;return this.getFileWithProgress(d).pipe((0,le.w)(k=>this.getImageFile(k)))}getImageFile(s,d){if(s.type===ae.dt.Response&&200===s.status){const k=s.headers.get("Content-Disposition").split(";")[1].trim().split("=")[1],ie=k.split("."),ot="image/"+ie[ie.length-1],Cn=co.createAttachmentFile([s.body],k,ot);Cn.relatedEntityId=d;const ir=new FileReader;return ir.readAsDataURL(Cn),ir.onloadend=()=>{Cn.contentBase64=ir.result,Cn.relatedEntityId=d},(0,D.of)(Cn)}return(0,P.D)([])}deleteOrganizationLogo(s,d){const k=`./api/sivi-accounts-api/orgs/${s}/documents/${d}`,ie={...this.getCommonOptions(),responseType:"arraybuffer"};return this.delete(k,ie)}findAllReceivedApplicationByOrganization(s){const d=`./api/sivi-ada-api/applications/received-count-for-organization?organizationId=${s}`;return this.get(d)}}Qc.\u0275fac=function(s){return new(s||Qc)(e.LFG(ae.eN),e.LFG(dl))},Qc.\u0275prov=e.Yz7({token:Qc,factory:Qc.\u0275fac,providedIn:"root"});class Zh extends Ti{constructor(s,d){super(s,d),this.http=s,this.siviProjectsGatewayService=d,this.personSearchUrl="api/sivi-accounts-api/person-search"}getChildByPin(s){const d=`${this.personSearchUrl}/pin/child`;return this.post(d,s,this.getCommonOptions())}getPersonByPin(s){const d=`${this.personSearchUrl}/pin`;return this.post(d,s,this.getCommonOptions())}getGuardianshipGuardianByPin(s){const d=`${this.personSearchUrl}/pin/guardian-for-relationship`;return this.post(d,s,this.getCommonOptions())}getGuardianByPin(s){const d=`${this.personSearchUrl}/pin/guardian`;return this.post(d,s,this.getCommonOptions())}getChildByPinFromPrc(s){const d=`${this.personSearchUrl}/pin/child-vrk-only`;return this.post(d,s,this.getCommonOptions())}getGuardianByPinFromPrc(s){const d=`${this.personSearchUrl}/pin/guardian-vrk-only`;return this.post(d,s,this.getCommonOptions())}getChildrenForOrganization(s,d,k){const ie="./api/sivi-accounts-api/orgs/organization/"+k+"/children",ot=this.getCommonPageableSearchOptions(s,d);return this.get(ie,ot)}getChildById(s){const d=`./api/sivi-accounts-api/user/child/${s}`;return this.get(d)}saveCurrentUserUILanguage(s){this.siviProjectsGateway.getAuthService().isAuthenticated()&&this.put(s,"./api/sivi-accounts-api/user/settings/ui-language").subscribe(()=>{},d=>{console.error("saveCurrentUserUILanguage failed",d)})}getPerson(s,d=!1,k=!1){const ie=`./api/sivi-accounts-api/people/${s};full=${d}?family=${k}`,ot=this.getCommonSearchOptions();return this.get(ie,ot)}getPersonById(s){const d=`${this.personSearchUrl}/id/${s}`;return this.get(d)}getGuardiansAndChildrenForAddingPeople(s,d){const k=`${this.personSearchUrl}/for-add-users/`;let ie=this.getCommonPageableSearchOptions(s.page,s.count),ot=ie.params;return Object.keys(d).forEach(Cn=>ot=ot.set(Cn,d[Cn])),ie={...ie,params:ot},this.get(k,ie)}addPersonFromVRKToVesa(s){const d=`./api/sivi-accounts-api/people/${s}/vrk-to-vesa`;return this.post(d,s)}mergePersons(s){return this.put(s,"./api/sivi-accounts-api/people/merge-with-prc")}getChild(s){const d="./api/sivi-accounts-api/people/children/"+s,k=this.getCommonSearchOptions();return this.get(d,k)}saveChild(s){return this.saveEntity(s,"./api/sivi-accounts-api/user/child")}saveChildByPin(s){return this.post("./api/sivi-accounts-api/user/child/pin",s)}getGuardians(s){const d="./api/sivi-accounts-api/people/children/"+s+"/guardians",k=this.getCommonSearchOptions();return this.get(d,k)}getPersonMainPhoto(s,d){if(!s)return void console.error("getPersonMainPhoto personId parameter is mandatory");const k={...this.getCommonOptions()},ie=d||fc.TINY;k.params=(new ae.LE).set("documentSize",ie);const ot=`./api/sivi-accounts-api/people/${s}/documents/person-main-picture`;return this.getFile(s,ot,k)}getPersonMainPhotosWithoutCache(s){const d={...this.getCommonOptions()};d.headers=d.headers.append("Cache-Control","no-cache, no-store, must-revalidate, post-check=0, pre-check=0, max-age=10"),d.headers=d.headers.append("Pragma","no-cache"),d.headers=d.headers.append("Expires","0");const k=`./api/sivi-accounts-api/people/${s}/documents/person-main-picture`,ie={};for(const ot of Object.values(fc)){const Cn={...d,params:(new ae.LE).set("documentSize",ot)};ie[ot]=this.getFile(s,k,Cn)}return(0,w.D)(ie)}getFile(s,d,k){return this.getFileWithProgress(d,k).pipe((0,le.w)(ie=>{if(ie.type===ae.dt.Response&&200===ie.status){const ot=ie.headers.get("Content-Disposition").split(";")[1].trim().split("=")[1],Cn=ot.split("."),ir="image/"+Cn[Cn.length-1],Yo=co.createAttachmentFile([ie.body],ot,ir);return Yo.relatedEntityId=s,new E.y(tl=>{const bc=new FileReader;bc.readAsDataURL(Yo),bc.onloadend=()=>{Yo.contentBase64=bc.result,tl.next(Yo),tl.complete()}})}return n.E}))}savePersonMainPhoto(s,d){const k="./api/sivi-accounts-api/people/"+s+"/documents";return this.saveFile(d,k)}deletePersonMainPhoto(s){const d="./api/sivi-accounts-api/people/"+s+"/documents/person-main-picture",k={...this.getCommonOptions()};return this.delete(d,k)}getGuardianDependents(){return this.get("./api/sivi-accounts-api/vrk/guardian-dependents/draft")}}Zh.\u0275fac=function(s){return new(s||Zh)(e.LFG(ae.eN),e.LFG(dl))},Zh.\u0275prov=e.Yz7({token:Zh,factory:Zh.\u0275fac,providedIn:"root"});class wc extends Ti{constructor(s,d){super(s,d),this.http=s,this.siviProjectsGateway=d}getInstruction(s,d){return this.contextualInstructions||(this.contextualInstructions=this.getAll().pipe((0,B.B)({connector:()=>new Y.t(1),resetOnError:!1,resetOnComplete:!1,resetOnRefCountZero:!1}))),this.contextualInstructions.pipe((0,X.U)(k=>k.find(ie=>ie.key===s)),(0,X.U)(k=>k?.["translation"+d.toUpperCase()]))}getAll(){return this.get("./api/sivi-accounts-api/municipality-settings/contextual-instructions/",this.getCommonOptions())}save(s){s.map(k=>({...k,translationFI:k.translationFI?k.translationFI.trim():null,translationSV:k.translationSV?k.translationSV.trim():null,translationEN:k.translationEN?k.translationEN.trim():null}));return this.put(s,"./api/sivi-accounts-api/municipality-settings/contextual-instructions/",this.getCommonOptions()).pipe((0,Z.b)(()=>{this.contextualInstructions=(0,D.of)(s)}))}}wc.\u0275fac=function(s){return new(s||wc)(e.LFG(ae.eN),e.LFG(dl))},wc.\u0275prov=e.Yz7({token:wc,factory:wc.\u0275fac,providedIn:"root"});const Ep="sivi-messaging-api/sivi-websocket";class qp extends Ti{get timeoutTime(){return this.timeout[this.timeoutIndex]||0}get onWsConnected$(){return this.wsConnect$.pipe((0,ve.h)(Boolean),(0,ye.q)(1))}get onWsReconnect$(){return this.wsConnectError$.pipe((0,ve.h)(Boolean),(0,le.w)(()=>this.onWsConnected$))}constructor(s,d,k){super(s,d),this.http=s,this.siviProjectsGatewayService=d,this.zone=k,this.timeout=[1e3,1e3,5e3,5e3,5e3],this.timeoutIndex=-1,this.url=Ep,this.wsConnectError$=new g.X(!1),this.wsConnect$=new g.X(!1),this.auth=this.siviProjectsGatewayService.getAuthService(),this.environmentService=this.siviProjectsGatewayService.getEnvironmentService(),this.worker=new Worker(document.location.origin+"/assets/js/messaging.worker.js"),this.listenWorkerEvents()}listenWorkerEvents(){this.worker.onmessage=s=>{const d=s.data;switch(d.type){case Lu.CONNECT_SUCCESS:this.connectSuccess();break;case Lu.CONNECT_ERROR:this.connectError(d.content)}}}connectSuccess(){this.wsConnect$.next(!0),this.timeoutIndex=-1,this.wsConnectError$.next(!1)}connectError(s){"string"==typeof s&&s.toLowerCase().includes("lost connection")&&(this.wsConnect$.next(!1),this.timeoutIndex++,this.timeoutIndex===this.timeout.length&&(this.timeoutIndex=0),this.wsConnectError$.next(!0),setTimeout(()=>this.wsConnect(),this.timeoutTime)),console.warn("WS DISCONNECTED - CONNECT ERROR",s)}wsConnect(s){if(!this.auth.isAuthenticated())return;s&&(this.url=s);const d=this.auth.getAuthorizationHeaders().get("Authorization"),k={type:Lu.CONNECT,url:document.location.origin+"/",headers:{Authorization:d},content:{serverUrl:this.environmentService.getEnvironment().API+this.url}};this.worker.postMessage(k)}wsDisconnect(){this.wsConnect$.next(!1),this.worker.postMessage({type:Lu.DISCONNECT})}subscribeChannel(s){const d=new Y.t,k=new MessageChannel,ie=k.port1,ot=k.port2,Cn={messagePort:ie,...s};return this.onWsConnected$.subscribe(()=>{this.sendMessage(Lu.SUBSCRIBE_CHANNEL,Cn,[ie])}),ot.onmessage=ir=>{const Yo=ir.data;ir.data.type===Lu.UNSUBSCRIBE_CHANNEL_SUCCESS?(d.complete(),ot.close()):this.zone.run(()=>{d.next(Yo)})},new T_(ir=>{d.subscribe(Yo=>ir.next(Yo))},ot)}sendMessage(s,d,k){const ie={type:s,content:d};this.onWsConnected$.subscribe(()=>{k?this.worker.postMessage(ie,k):this.worker.postMessage(ie)})}}qp.\u0275fac=function(s){return new(s||qp)(e.LFG(ae.eN),e.LFG(dl),e.LFG(e.R0b))},qp.\u0275prov=e.Yz7({token:qp,factory:qp.\u0275fac});class lf extends Ti{constructor(s,d){super(s,d),this.http=s,this.siviProjectsGatewayService=d,this.personSearchUrl="api/sivi-accounts-api/person-search"}getStaff(s,d){const{pageIndex:k,pageSize:ie}=s.pager,ot=this.getCommonPageableSearchOptions(k,ie,s.sortParam);Object.keys(s.filters).map(ir=>ot.params=ot.params.set(ir,s.filters[ir])),ot.params=ot.params.set("organizationId",d);const Cn=`${this.personSearchUrl}/staff`;return this.get(Cn,ot)}getStaffMemberWithRoles(s){const d="./api/sivi-accounts-api/people/staff/"+s,k=this.getCommonSearchOptions();return this.get(d,k)}getStaffMemberPermissions(s){const d=`./api/sivi-accounts-api/people/staff/${s}/permissions`,k=this.getCommonSearchOptions();return this.get(d,k)}getStaffMember(s){const d="./api/sivi-accounts-api/professional-user/"+s,k=this.getCommonSearchOptions();return this.get(d,k)}saveStaffMember(s){return this.saveEntity(s,"./api/sivi-accounts-api/professional-user")}getJobPositionTitlesForEcec(){return this.get("/api/sivi-codes-api/codes/name/sivi.professional.position-title.ecec")}saveStaffRole(s){const d="./api/sivi-accounts-api/personorganizationroles/"+s.id;return this.saveEntity(s,d)}getAllRolesByStaffId(s,d){const k="./api/sivi-accounts-api/personorganizationroles/?personId="+s+"&restEntityState="+d;return this.get(k)}inactivateStaffRole(s){const k={id:s.id,organizationId:s.organizationId};return this.patch(k,"./api/sivi-accounts-api/personorganizationroles/")}}lf.\u0275fac=function(s){return new(s||lf)(e.LFG(ae.eN),e.LFG(dl))},lf.\u0275prov=e.Yz7({token:lf,factory:lf.\u0275fac,providedIn:"root"});class dm{constructor(s){this.translate=s,this.unitTypes=[Fo.DAYCAREPLACE,Fo.DAYCAREPLACE_TYPE_DAYCARE_CENTRE,Fo.DAYCAREPLACE_TYPE_FAMILY_DAYCARE,Fo.DAYCAREPLACE_TYPE_GROUP_FAMILY_DAYCARE,Fo.DAYCAREPLACE_TYPE_OPEN_DAYCARE],this.unitsWithoutGroups=[Fo.DAYCAREPLACE_TYPE_FAMILY_DAYCARE,Fo.DAYCAREPLACE_TYPE_GROUP_FAMILY_DAYCARE],this.groupTypes=[Fo.DAYCAREPLACE_GROUP,Fo.DAYCAREPLACE_GROUP_REGULAR,Fo.DAYCAREPLACE_GROUP_PRESCHOOL]}orderEcecOrganizationTypeCodes(s){let d=s.sort((ie,ot)=>ie.name.localeCompare(ot.name));const k=s.findIndex(ie=>ie.name===Fo.DAYCAREPLACE);return k>=0&&(d=co.moveItemInArray(d,k,0)),d}getWeeklyCareTimeOptionOrder(){return[Kd.MON_FRI,Kd.MON_FRI_MORNINGS,Kd.MON_FRI_EVENINGS,Kd.MON_FRI_LATE_EVENINGS,Kd.MON_FRI_FULL_EVENINGS,Kd.WEEKENDS,Kd.ROUND_THE_CLOCK]}isTypeOfOrganizationGeneral(s){return s===Fo.ORGANIZATION_TYPE_GENERAL||s===Fo.ORGANIZATION_TYPE_AREA}isTypeOfUnit(s){return this.unitTypes.includes(s)}isTypeOfGroup(s){return this.groupTypes.includes(s)}doesOrganizationTypeHaveGroups(s){return!this.unitsWithoutGroups.includes(s.organizationType)}isDaycareplaceOrSchool(s){return s.includes(Fo.DAYCAREPLACE)||s.includes(Fo.SCHOOL)}isDaycareplaceGroupOrSchool(s){return s.includes(Fo.DAYCAREPLACE_GROUP)||s.includes(Fo.SCHOOL_TYPE_SCHOOL)}isDaycareplaceGroup(s){return s.includes(Fo.DAYCAREPLACE_GROUP)}isMunicipality(s){return s.includes(Fo.MUNICIPALITY)}getNewOrganizationContact(s){return{organization:{id:s.id},contact:{id:null,contactTypeCode:"",contactTypeDescription:"",value:"",info:""},primary:!1,validFrom:null,validUntill:null}}getNewGroup(s){return{id:null,name:"",organizationType:"",countChildren:0,maximumNoOfChildren:null,validFrom:"",validUntil:"",parent:{id:s?s.id:null,name:s?s.name:null},organizationContacts:[],organizationGroupPeriods:[]}}getNewPeriod(){return{validFrom:null,validUntil:null,tempId:Date.now().toString(),maxNoOfChildrenInPeriod:null}}getOrganizationFormats(){return[{value:Fo.ORGANIZATION_FORMAT_PUBLIC,text:this.translate.instant("General.SelectOption.Public")},{value:Fo.ORGANIZATION_FORMAT_PRIVATE,text:this.translate.instant("General.SelectOption.Private")}]}getSectorFormats(){return[{value:Fo.DAYCAREPLACE,text:this.translate.instant("Education.Title.EarlyEducation")},{value:Fo.SCHOOL,text:this.translate.instant("Education.Title.BasicEducation")}]}createParentOrganizationOptionsFromTree(s,d){console.log("createParentOrganizationOptionsFromTree",s);const k=[];if(!s)return k;if(!s.childOrganizations)return[{value:s.id,text:s.name}];for(const ot of s.childOrganizations)k.push(...co.flattenNestedArray(ot,"childOrganizations"));const ie=[];for(const ot of k)(!d||d&&d!==ot.organizationType)&&ie.push({value:ot.id,text:ot.name});return ie.unshift({value:s.id,text:s.name}),ie}flattenOrganizations(s,d=[]){if(s.children&&s.children.length>0){d.find(k=>k.id===s.id)||d.push(s);for(const k of s.children)d.find(ie=>ie.id===k.id)||d.push(k),this.flattenOrganizations(k,d)}return d}buildTreeStructure(s,d=[]){return{id:s.id,name:s.name,path:s.organizationPath,type:s.organizationType,children:s.childOrganizations?this.getChildOrganizations(s.childOrganizations,d):[],restEntityState:s.restEntityState,validFrom:s.validFrom,validUntil:s.validUntil,canAddPersonToRole:s.canAddPersonToRole,canAddChildOrganization:s.canAddChildOrganization}}getChildOrganizations(s,d=[]){const k=[];for(const ie of s){let ot=new Yh;ot={...ot,name:ie?.name?this.translate.instant(ie.name):"",id:ie.id?ie.id:"",path:ie.organizationPath?ie.organizationPath:"",type:ie.organizationType,children:ie.childOrganizations&&ie.childOrganizations.length>0?this.getChildOrganizations(ie.childOrganizations,d):[],restEntityState:ie.restEntityState,validFrom:ie.validFrom,validUntil:ie.validUntil,canAddPersonToRole:ie.canAddPersonToRole,canAddChildOrganization:ie.canAddChildOrganization},(!d.length||d.includes(ot.restEntityState))&&k.push(ot)}return k}findContact(s,d){if(!(s.length<0))return s.find(k=>k.contact.contactTypeCode===d)}getSelectOptionsFromCodes(s){const d=[];return s.forEach(k=>{d.push({value:k.name,text:this.translate.instant(k.name)})}),d}getOrganizationTypeShortVersion(s){if(s===Fo.MUNICIPALITY)return Fo.MUNICIPALITY_SHORT;if(s===Fo.ORGANIZATION_TYPE_GENERAL||s===Fo.ORGANIZATION_TYPE_AREA)return Fo.ORGANIZATION_GENERAL_SHORT;if(this.isTypeOfUnit(s))return Fo.DAYCAREPLACE_SHORT;if(this.isTypeOfGroup(s))return Fo.DAYCAREPLACE_GROUP_SHORT;throw Error("getOrganizationTypeShortVersion unsupported organization type: "+s)}isActive(s){return[Ro.CURRENT,Ro.FUTURE].includes(s.restEntityState)}}dm.\u0275fac=function(s){return new(s||dm)(e.LFG(we.sK))},dm.\u0275prov=e.Yz7({token:dm,factory:dm.\u0275fac,providedIn:"root"});class Ch{constructor(s,d,k){this.siviProjectsGatewayService=s,this.settingsService=d,this.permissionsService=k,this.destroy$=new l.x,this.authService=this.siviProjectsGatewayService.getAuthService(),this.environmentService=this.siviProjectsGatewayService.getEnvironmentService()}initPermissions(){this.authService.isAuthenticated$().pipe((0,Oe.z)(d=>d?this.getPermissions():(this.permissionsService.flushPermissions(),n.E)),(0,j.R)(this.destroy$)).subscribe(d=>{this.permissionsService.loadPermissions(d)})}getPermissions(){const s=this.getAuthorities(),d=this.environmentService.getEnvironment().environmentName;return(0,V.a)([s]).pipe((0,ye.q)(1),(0,X.U)(([k])=>[...k,d]))}getCurrentMunicipality(){return this.settingsService.getUserSettingsByKey("selectedMunicipalityId").pipe((0,ve.h)(s=>!!s))}getAuthorities(){return this.authService.getAuthorities().pipe((0,Oe.z)(d=>(0,P.D)(d).pipe((0,X.U)(k=>k.roleName),(0,ke.q)())))}userLoggedOut(){this.destroy$.next(),this.destroy$.complete()}}Ch.\u0275fac=function(s){return new(s||Ch)(e.LFG(dl),e.LFG(Vh),e.LFG(Xn.YI))},Ch.\u0275prov=e.Yz7({token:Ch,factory:Ch.\u0275fac,providedIn:"root"});const Ov=["validator"];class Qf extends Js{set isValid(s){this._isValid=s}get isValid(){return this._isValid}constructor(s){super(),this.translate=s,this._isValid=!1,this.validatorOptions=[],this.destroy$=new l.x,this.refresh$=new l.x}ngOnInit(){this.refresh$.pipe((0,me.b)(1e3),(0,j.R)(this.destroy$)).subscribe(()=>{this.validatorOptions=[...this.validatorOptions]})}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}valuesChange(s){s.stopPropagation(),this.onValidatorValuesChange(s)}statusChange(s){s.stopPropagation(),this.onValidatorStatusChange(s)}didLoad(s){s.stopPropagation(),this.refresh$.next()}dateChange(s){const d=s.target.name||s.detail.name;-1!==this.validatorOptions.findIndex(ie=>ie.name===d)&&this.updateControlValue(s)}selectChange(s){const d=s.target.name||s.detail.name;-1!==this.validatorOptions.findIndex(ie=>ie.name===d)&&this.updateControlValue(s)}siviChange(s){const d=s.target.name||s.detail.name;-1!==this.validatorOptions.findIndex(ie=>ie.name===d)&&this.updateControlValue(s)}updateControlValue(s){this.validator.nativeElement.updateValue(s)}onValidatorStatusChange(s){this._isValid="VALID"===s.detail}checkForInvalidClass(s){return!!s.querySelector(".invalid")}onValidatorValuesChange(s){}createValidatorOption(s,d,k,ie,ot){return{name:s,value:d,validator:k.length>0?[sc.compose([...k])]:[],messages:{...this.getCommonMessages(ot),...ie}}}resetControlValidators(s,d){var k=this;return(0,o.Z)(function*(){if(k.validator&&k.validator.nativeElement){const ie=yield k.getControl(s);return ie&&(ie.setValidators(d),ie.updateValueAndValidity(),k.updateRequiredIndicator()),ie}})()}getCommonMessages(s=mu.DEFAULT){return{maxlength:this.translate.instant("Form.Error.MaxLengthIsChactersCount",{count:s}),required:this.translate.instant("Form.Error.Required"),pattern:this.translate.instant("Form.Error.AlphaNumericCharacters"),lowercase:this.translate.instant("Form.Error.AddOneLowerCaseCharacter"),uppercase:this.translate.instant("Form.Error.AddOneUpperCaseCharacter"),digit:this.translate.instant("Form.Error.AddOneNumber"),specialcharacter:this.translate.instant("Form.Error.AddOneSpecialCharacter"),validatePin:this.translate.instant("Form.Error.Invalid.Pic"),validatePhoneNumber:this.translate.instant("Form.Error.Invalid.Phone"),maxLengthPhoneNumber:this.translate.instant("Form.Error.MaxLengthIsChactersCount",{count:20}),validateEmail:this.translate.instant("Form.Error.Invalid.Email"),onlyAlphabets:this.translate.instant("Form.Error.OnlyAlphabets"),invalidDate:this.translate.instant("Form.Error.Invalid.Date"),invalidTime:this.translate.instant("Form.Error.Invalid.Hour"),isSameOrAfter:this.translate.instant("Form.Error.Invalid.ToPeriodDateShouldGreaterThanFromPeriod"),maxLengthPostalCode:this.translate.instant("Form.Error.MaxLengthIsChactersCount",{count:5}),onlyNumbers:this.translate.instant("Form.Error.OnlyNumbers"),checkUniqueness:this.translate.instant("Form.Error.MustBeUnique"),personAgeNotInAcceptableRange:this.translate.instant("Form.Error.PersonAgeNotInAcceptableRange"),notEnoughValues:this.translate.instant("Form.Error.NotEnoughValues"),invalidAddress:this.translate.instant("Form.Error.InvalidAddress"),fromHourAfterUntilHour:this.translate.instant("ECEC.WeeklyTimeOptions.Table.Error.FromHourAfterUntilHour"),untilHourBeforeFromHour:this.translate.instant("ECEC.WeeklyTimeOptions.Table.Error.UntilHourBeforeFromHour"),childTooOld:this.translate.instant("Backend.Error.CANNOT_ADD_GUARDIAN_AS_CHILD"),incorrectAge:this.translate.instant("Backend.Error.GUARDIAN_TOO_YOUNG"),selectFirstDateOfMonth:this.translate.instant("Form.Error.SelectFirstDateOfMonth"),overlappingTimeRanges:this.translate.instant("Form.Error.OverlappingTimeRanges")}}getControl(s){var d=this;return(0,o.Z)(function*(){try{return d.validator.nativeElement.getFormControl(s)}catch(k){console.error(k)}})()}markControlAsTouched(s){var d=this;return(0,o.Z)(function*(){const k=yield d.getControl(s);return k&&!k.touched&&(k.markAsTouched(),k.updateValueAndValidity()),k||null})()}addFormControl(s){this.validator.nativeElement.addFormControl(s)}updateRequiredIndicator(){this.validator.nativeElement.updateRequiredIndicator()}markAllFieldsTouched(s){var d=this;return(0,o.Z)(function*(){s.forEach(function(){var k=(0,o.Z)(function*(ie){d.markControlAsTouched(ie.name)});return function(ie){return k.apply(this,arguments)}}())})()}}Qf.\u0275fac=function(s){return new(s||Qf)(e.Y36(we.sK))},Qf.\u0275dir=e.lG2({type:Qf,viewQuery:function(s,d){if(1&s&&e.Gf(Ov,5),2&s){let k;e.iGM(k=e.CRH())&&(d.validator=k.first)}},hostBindings:function(s,d){1&s&&e.NdJ("valuesChange",function(ie){return d.valuesChange(ie)})("statusChange",function(ie){return d.statusChange(ie)})("siviDidLoad",function(ie){return d.didLoad(ie)})("dateChange",function(ie){return d.dateChange(ie)})("selectChange",function(ie){return d.selectChange(ie)})("siviChange",function(ie){return d.siviChange(ie)})},features:[e.qOj]});class yg{}function Mb(H,s){1&H&&e._UZ(0,"sivi-lib-skeleton-loader")}function Tb(H,s){if(1&H&&(e.TgZ(0,"div"),e._UZ(1,"cgi-status-view",3),e.ALo(2,"translate"),e.ALo(3,"translate"),e.qZA()),2&H){const d=e.oxw();e.Q6J("@slideInOut",void 0),e.xp6(1),e.Q6J("icon",d.noContentIcon)("header",e.lcZ(2,4,d.noContentTitle))("text",e.lcZ(3,6,d.noContentText))}}function x_(H,s){if(1&H&&(e.TgZ(0,"div"),e._UZ(1,"cgi-status-view",3),e.ALo(2,"translate"),e.ALo(3,"translate"),e.qZA()),2&H){const d=e.oxw();e.Q6J("@slideInOut",void 0),e.xp6(1),e.Q6J("icon",d.errorIcon)("header",e.lcZ(2,4,d.errorTitle))("text",e.lcZ(3,6,d.errorText))}}function Mp(H,s){1&H&&e._UZ(0,"ion-spinner",6)}function Jg(H,s){if(1&H&&(e.TgZ(0,"div",4),e.YNc(1,Mp,1,0,"ion-spinner",5),e.qZA()),2&H){const d=e.oxw();e.xp6(1),e.Q6J("ngIf",d.shouldShowLoader())}}function bg(H,s){1&H&&e.Hsn(0,0,["*ngIf","shouldShowContent()","[@slideInOut]",""])}function fd(H,s){if(1&H&&(e.TgZ(0,"div",7),e._uU(1),e.ALo(2,"uppercase"),e.qZA()),2&H){const d=e.oxw();e.xp6(1),e.hij(" ",e.lcZ(2,1,d.statusText),"\n")}}yg.\u0275fac=function(s){return new(s||yg)},yg.\u0275cmp=e.Xpm({type:yg,selectors:[["sivi-lib-skeleton-loader"]],decls:30,vars:0,consts:[[1,"ion-padding","custom-skeleton"],["animated","",2,"width","55%"],["animated","",2,"width","85%"],["animated","",2,"width","78%"],["animated","",2,"width","60%"],["animated","",2,"width","50%"],["animated","",2,"width","20%"],["animated","",2,"width","45%"],["animated","",2,"width","75%"],["animated","",2,"width","58%"],["animated","",2,"width","40%"],["animated","",2,"width","30%"]],template:function(s,d){1&s&&(e.TgZ(0,"div",0),e._UZ(1,"ion-skeleton-text",1)(2,"ion-skeleton-text",2)(3,"ion-skeleton-text",3)(4,"ion-skeleton-text",4)(5,"ion-skeleton-text",5)(6,"br")(7,"ion-skeleton-text",6)(8,"br")(9,"ion-skeleton-text",7)(10,"ion-skeleton-text",8)(11,"ion-skeleton-text",9)(12,"ion-skeleton-text",10)(13,"ion-skeleton-text",11)(14,"br")(15,"ion-skeleton-text",6)(16,"br")(17,"ion-skeleton-text",1)(18,"ion-skeleton-text",2)(19,"ion-skeleton-text",3)(20,"ion-skeleton-text",4)(21,"ion-skeleton-text",5)(22,"br")(23,"ion-skeleton-text",6)(24,"br")(25,"ion-skeleton-text",7)(26,"ion-skeleton-text",8)(27,"ion-skeleton-text",9)(28,"ion-skeleton-text",10)(29,"ion-skeleton-text",11),e.qZA())},styles:[".custom-skeleton[_ngcontent-%COMP%]   ion-skeleton-text[_ngcontent-%COMP%]{line-height:13px}.custom-skeleton[_ngcontent-%COMP%]   ion-skeleton-text[_ngcontent-%COMP%]:last-child{margin-bottom:5px}"]});class Cg{set source(s){this.showLoader(),s.pipe((0,ye.q)(1)).subscribe(d=>{this.showContent(d)},d=>{this.showError(),console.warn("ContentLoader set source observable encountered error",d)})}constructor(s,d){this.loaderService=s,this.translate=d,this.secondaryMode=!1,this.loadingByDefault=!1,this.expectation="array",this.noContentTitle="Message.Error.NoContent.Title",this.noContentText="Message.Error.NoContent.LongExplanation",this.noContentIcon="settings",this.errorTitle="Message.Error.GeneralTitle",this.errorText="Message.Error.SomethingWentWrong",this.errorIcon="warning",this.skeleton="none",this.state="none"}ngOnInit(){this.loadingByDefault&&this.showLoader()}showContent(s){try{if("array"===this.expectation&&0===s.length)return void this.showNoContent();if(!("property.id"!==this.expectation||s&&s.id))return void this.showNoContent();if("object"===this.expectation&&!s)return void this.showNoContent()}catch{console.error("handleResultFromSource failed to determinate expected outcome",{result:s,expectation:this.expectation})}this.hideLoader(),this.state="done"}showLoader(){this.state="loading",this.secondaryMode||this.loaderService.showLoading()}showSavingLoader(){this.state="saving",this.loaderService.showLoading()}showNoContent(){this.state="no-content",this.secondaryMode||this.loaderService.hideLoading()}hideLoader(){this.state="none",this.secondaryMode||this.loaderService.hideLoading()}showError(){this.state="error",this.secondaryMode||this.loaderService.hideLoading()}autoSaveSuccess(s=!1){let d=this.translate.instant("Message.Save.Success");s&&(d=d+" "+Nn().format("HH.mm")),this.changeStatus(d)}autoSaveFailed(){this.changeStatus(this.translate.instant("Message.Save.Error"))}changeStatus(s){this.statusText=s}clearStatus(){this.statusText=""}shouldShowContent(){return"error"!==this.state&&"no-content"!==this.state&&!this.shouldShowSkeletonLoader()}shouldShowSkeletonLoader(){return"form"===this.skeleton&&this.shouldShowLoader()}shouldShowLoader(){return"loading"===this.state}shouldShowNoContent(){return"no-content"===this.state&&!this.shouldShowSkeletonLoader()}shouldShowError(){return"error"===this.state}ngOnDestroy(){this.loaderService.hideLoading()}}Cg.\u0275fac=function(s){return new(s||Cg)(e.Y36(yl),e.Y36(we.sK))},Cg.\u0275cmp=e.Xpm({type:Cg,selectors:[["sivi-lib-content-loader"]],inputs:{source:"source",secondaryMode:"secondaryMode",loadingByDefault:"loadingByDefault",expectation:"expectation",noContentTitle:"noContentTitle",noContentText:"noContentText",noContentIcon:"noContentIcon",errorTitle:"errorTitle",errorText:"errorText",errorIcon:"errorIcon",skeleton:"skeleton"},ngContentSelectors:["*"],decls:6,vars:6,consts:[[4,"ngIf"],["class","ion-text-center ion-margin-top",4,"ngIf"],["class","status-text",4,"ngIf"],["color","primary",3,"icon","header","text"],[1,"ion-text-center","ion-margin-top"],["color","primary",4,"ngIf"],["color","primary"],[1,"status-text"]],template:function(s,d){1&s&&(e.F$t(),e.YNc(0,Mb,1,0,"sivi-lib-skeleton-loader",0),e.YNc(1,Tb,4,8,"div",0),e.YNc(2,x_,4,8,"div",0),e.YNc(3,Jg,2,1,"div",1),e.YNc(4,bg,1,0,"ng-content",0),e.YNc(5,fd,3,3,"div",2)),2&s&&(e.Q6J("ngIf",d.shouldShowSkeletonLoader()),e.xp6(1),e.Q6J("ngIf",d.shouldShowNoContent()),e.xp6(1),e.Q6J("ngIf",d.shouldShowError()),e.xp6(1),e.Q6J("ngIf",d.secondaryMode&&"none"===d.skeleton),e.xp6(1),e.Q6J("ngIf",d.shouldShowContent()),e.xp6(1),e.Q6J("ngIf",d.statusText))},dependencies:[Et.O5,yg,Et.gd,we.X$],styles:[".status-text[_ngcontent-%COMP%]{font-size:.9em;top:1rem;position:absolute;right:1rem}"],data:{animation:[Jf]}});class zd{}zd.\u0275fac=function(s){return new(s||zd)},zd.\u0275mod=e.oAB({type:zd}),zd.\u0275inj=e.cJS({imports:[Et.ez,we.aw]});class Ga{}function hd(H,s){if(1&H&&e._UZ(0,"cgi-icon",5),2&H){const d=e.oxw().$implicit;e.Q6J("ngClass",d.icon?"item-icon":"")("name",d.icon)}}function Eh(H,s){if(1&H&&(e.TgZ(0,"small"),e._uU(1),e.qZA()),2&H){const d=e.oxw().$implicit;e.xp6(1),e.Oqu(d.subtext)}}function Al(H,s){if(1&H){const d=e.EpF();e.TgZ(0,"ion-item",1),e.NdJ("click",function(){const ot=e.CHM(d).$implicit,Cn=e.oxw();return e.KtG(Cn.onClick(ot.id))}),e.YNc(1,hd,1,2,"cgi-icon",2),e.TgZ(2,"ion-label",3),e._uU(3),e.ALo(4,"translate"),e._UZ(5,"br"),e.YNc(6,Eh,2,1,"small",4),e.qZA()()}if(2&H){const d=s.$implicit;e.xp6(1),e.Q6J("ngIf",d.icon),e.xp6(1),e.uIk("aria-label",d.ariaLabel),e.xp6(1),e.hij(" ",e.lcZ(4,4,d.text)," "),e.xp6(3),e.Q6J("ngIf",d.subtext)}}Ga.\u0275fac=function(s){return new(s||Ga)},Ga.\u0275mod=e.oAB({type:Ga}),Ga.\u0275inj=e.cJS({imports:[Et.ez,Nt.Pc,we.aw,Et.ez,Nt.Pc,we.aw,zd,Jc]});class pm{constructor(s){this.popoverCtrl=s}onClick(s){this.popoverCtrl.dismiss(s)}trackByIndex(s){return s}}pm.\u0275fac=function(s){return new(s||pm)(e.Y36(Nt.Dh))},pm.\u0275cmp=e.Xpm({type:pm,selectors:[["sivi-lib-popover"]],inputs:{items:"items"},decls:2,vars:3,consts:[["button","","lines","none","class","popover-button big","tabindex","0",3,"click",4,"ngFor","ngForOf","ngForTrackBy"],["button","","lines","none","tabindex","0",1,"popover-button","big",3,"click"],[3,"ngClass","name",4,"ngIf"],["color","primary",1,"popover-label","big"],[4,"ngIf"],[3,"ngClass","name"]],template:function(s,d){1&s&&(e.TgZ(0,"ion-content"),e.YNc(1,Al,7,6,"ion-item",0),e.qZA()),2&s&&(e.Q6J("@animatedItem",void 0),e.xp6(1),e.Q6J("ngForOf",d.items)("ngForTrackBy",d.trackByIndex))},dependencies:[Et.mk,Et.sg,Et.O5,Nt.W2,Nt.Ie,Nt.Q$,we.X$],styles:["ion-content[_ngcontent-%COMP%]{--padding: 8px;--padding-end: var(--padding);--padding-start: var(--padding)}ion-content[_ngcontent-%COMP%]   .item-icon[_ngcontent-%COMP%]{padding-right:var(--padding)}.popover-label[_ngcontent-%COMP%]{white-space:normal}"],data:{animation:[Dd]}});class Yd{}function Ya(H,s){if(1&H&&e._UZ(0,"ion-spinner",1),2&H){const d=e.oxw();e.Q6J("ngClass",d.show?"show fadeInUp":"fadeOutDown")}}Yd.\u0275fac=function(s){return new(s||Yd)},Yd.\u0275mod=e.oAB({type:Yd}),Yd.\u0275inj=e.cJS({imports:[Ga]});class Im{constructor(){this.show=!1}}Im.\u0275fac=function(s){return new(s||Im)},Im.\u0275cmp=e.Xpm({type:Im,selectors:[["sivi-lib-spinner"]],inputs:{show:"show"},decls:1,vars:1,consts:[["class","spinner-energized; animated",3,"ngClass",4,"ngIf"],[1,"spinner-energized;","animated",3,"ngClass"]],template:function(s,d){1&s&&e.YNc(0,Ya,1,1,"ion-spinner",0),2&s&&e.Q6J("ngIf",d.show)},dependencies:[Et.mk,Et.O5,Nt.PQ],encapsulation:2,changeDetection:0});class cf{}function Lv(H,s){if(1&H&&e._UZ(0,"ion-progress-bar",1),2&H){const d=e.oxw();e.Q6J("ngClass",d.show?"show fadeInUp":"fadeOutDown")}}cf.\u0275fac=function(s){return new(s||cf)},cf.\u0275mod=e.oAB({type:cf}),cf.\u0275inj=e.cJS({imports:[Ga]});class Fc{constructor(){this.show=!1}}Fc.\u0275fac=function(s){return new(s||Fc)},Fc.\u0275cmp=e.Xpm({type:Fc,selectors:[["sivi-lib-progress-bar"]],inputs:{show:"show"},decls:1,vars:1,consts:[["class","animated","color","secondary","type","indeterminate","mode","md",3,"ngClass",4,"ngIf"],["color","secondary","type","indeterminate","mode","md",1,"animated",3,"ngClass"]],template:function(s,d){1&s&&e.YNc(0,Lv,1,1,"ion-progress-bar",0),2&s&&e.Q6J("ngIf",d.show)},dependencies:[Et.mk,Et.O5,Nt.X7],encapsulation:2,changeDetection:0});class gd{constructor(){}}gd.\u0275fac=function(s){return new(s||gd)},gd.\u0275cmp=e.Xpm({type:gd,selectors:[["sivi-lib-not-supported-browser"]],decls:10,vars:6,consts:[["xmlns","http://www.w3.org/2000/svg","height","200","viewBox","0 0 24 24","width","200"],["d","M0 0h24v24H0V0z","fill","none"],["d","M11 15h2v2h-2zm0-8h2v6h-2zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z","fill","currentColor"]],template:function(s,d){1&s&&(e.TgZ(0,"article"),e.O4$(),e.TgZ(1,"svg",0),e._UZ(2,"path",1)(3,"path",2),e.qZA(),e.kcU(),e.TgZ(4,"h2"),e._uU(5),e.ALo(6,"translate"),e.qZA(),e.TgZ(7,"p"),e._uU(8),e.ALo(9,"translate"),e.qZA()()),2&s&&(e.xp6(5),e.Oqu(e.lcZ(6,2,"Message.Error.UnsupportedBrowser.Plural")),e.xp6(3),e.Oqu(e.lcZ(9,4,"Message.Error.UnsupportedBrowser")))},dependencies:[we.X$],styles:["body{background-color:#fff}article{align-items:center;display:flex;flex-direction:column;height:80vh;justify-content:center;padding:24px}article>h2,article p{max-width:25em;text-align:center}@media screen\\fffd{article{color:#407080}}_:-ms-fullscreen article,:root article{color:#407080}\n"],encapsulation:2});const xb=[{path:"",component:gd}];class uf{}uf.\u0275fac=function(s){return new(s||uf)},uf.\u0275mod=e.oAB({type:uf}),uf.\u0275inj=e.cJS({imports:[Et.ez,Ve.u5,Nt.Pc,qt.Bz.forChild(xb),we.aw]});class jl{onSiviInputEvent(s){this.updateCountElement(s.detail.value?.length||0)}onSiviChangeEvent(s){this.updateCountElement(s.detail.value?.length||0)}onUpdateEvent(s){this.updateCountElement(s?.length||0)}get element(){return this.elRef.nativeElement}get parent(){return this.element.parentElement}constructor(s,d){this.elRef=s,this.renderer=d}ngOnInit(){this.renderer.setStyle(this.element,"position","relative"),this.renderer.setStyle(this.element,"display","block"),this.addCountElement(this.value?.length||0)}addCountElement(s){const d=this.createCountElement(s);this.renderer.appendChild(this.element,d)}createCountElement(s){const d=this.renderer.createElement("div"),k=this.renderer.createText(this.getCounterText(s));return this.renderer.appendChild(d,k),this.renderer.addClass(d,jl.counterClassName),this.renderer.setStyle(d,"position","var(--counter-position, absolute)"),this.renderer.setStyle(d,"right","var(--counter-right, 0)"),this.renderer.setStyle(d,"bottom","var(--counter-bottom, 0)"),this.renderer.setStyle(d,"padding-top","var(--counter-padding-top, 5px)"),this.renderer.setStyle(d,"transform","translate(0, 100%)"),this.renderer.setStyle(d,"color","rgba(0, 0, 0, 0.5)"),d}updateCountElement(s){Array.from(this.parent.getElementsByClassName(jl.counterClassName)).forEach(d=>this.renderer.removeChild(this.element,d)),this.addCountElement(s)}getCounterText(s){return Number(this.siviCharacterCounter)?`${s}/${this.siviCharacterCounter}`:`${s}`}}var Eg;jl.counterClassName="sivi-character-counter",jl.\u0275fac=function(s){return new(s||jl)(e.Y36(e.SBq),e.Y36(e.Qsj))},jl.\u0275dir=e.lG2({type:jl,selectors:[["","siviCharacterCounter",""]],hostBindings:function(s,d){1&s&&e.NdJ("siviInput",function(ie){return d.onSiviInputEvent(ie)})("siviChange",function(ie){return d.onSiviChangeEvent(ie)})("update",function(ie){return d.onUpdateEvent(ie)})},inputs:{siviCharacterCounter:"siviCharacterCounter",value:"value"}}),function(H){H.SIVI_CHANGE="siviChange",H.DATE_CHANGE="dateChange",H.SELECT_CHANGE="selectChange",H.VALUE_CHANGE="valueChange"}(Eg||(Eg={}));class Gm{set formControlName(s){this.onSetFormControlName(s)}set showRequiredIndicator(s){this.isRequiredIndicatorVisible=s,this.updateValueAndValidity()}set disabled(s){this.elRef.nativeElement.setAttribute("disabled",s),this.elRef.nativeElement.disabled=s}set value(s){this._value=s,this.setAndEmitValue(s),this.onChange(s)}get value(){return this._value}get control(){return this.ngControl.control}get name(){return this.attrName||this._formControlName}get element(){return this.elRef.nativeElement}get errorElementClassName(){return`error-message-${this.uuid}`}get isRequired(){if(!this.control||!this.control.validator)return!1;const s=new Ve.p4;s.setValue("");const k=this.control.validator.bind({},s)();return null!==k&&k.hasOwnProperty("required")}get isValid$(){const s=[td.VALID,td.DISABLED];return this.control.statusChanges.pipe((0,X.U)(d=>s.includes(d)))}constructor(s,d,k){this.elRef=s,this.ngControl=d,this.translate=k,this.errorMessages={},this.listenEvents=!0,this.siviFormControlValueUpdate=new e.vpe,this.siviFormControlNameUpdate=new e.vpe,this.uuid=co.createUUID(),this.isRequiredIndicatorVisible=!0,this.destroy$=new l.x,this.onChange=()=>{},this.onTouch=()=>{},this.ngControl.valueAccessor=this}onInputEvent(s){const d=(0,Hn.Z)(s,"target.value"),k=(0,Hn.Z)(s,"target.name");this.canListen(s)&&String(k)===String(this.name)&&this.writeValue(d)}onSiviChangeEvent(s){this.handleCustomEvent(s)}onDateChangeEvent(s){this.handleCustomEvent(s)}onSelectChangeEvent(s){this.handleCustomEvent(s)}onValueChangeEvent(s){this.handleCustomEvent(s)}onBlurEvent(){setTimeout(()=>{this.onTouch(),this.updateValueAndValidity()})}onSiviDidLoadEvent(){this.updateValueAndValidity()}onSetFormControlName(s){(0,Ne.Z)(s,this.name)||(this._formControlName=s,this.setAndEmitName(s),this.updateValueAndValidity())}ngOnInit(){this.control.disabled&&this.control.enable(),this.addStyleElement(),this.toggleInvalidClass(),this.handleValueAndStatusChanges(),this.updateValidityOnMarkAsTouched(),this.updateValidityOnSetValidators()}ngOnDestroy(){this.clearErrorMessages(),this.destroy$.next(),this.destroy$.complete(),this.control&&(this.control.markAsUntouched(),this.control.enabled&&this.control.disable())}ngAfterViewInit(){this.updateValueAndValidity()}handleValueAndStatusChanges(){const s=(0,ue.T)(this.control.statusChanges,this.control.valueChanges).pipe((0,j.R)(this.destroy$));s.pipe((0,me.b)(500)).subscribe(()=>this.renderRequiredIndicator()),s.pipe((0,me.b)(50)).subscribe(()=>this.renderErrorMessages())}handleCustomEvent(s){const d=(0,Hn.Z)(s,"detail.value"),k=(0,Hn.Z)(s,"target.name");this.canListen(s)&&String(k)===String(this.name)&&this.writeValue(d)}canListen(s){return this.listenEvents&&(!this.listenEvent||(0,Ne.Z)(this.listenEvent,s.type))}clearErrorMessages(){const s=this.element.parentElement;s&&Array.from(s.getElementsByClassName(this.errorElementClassName)).forEach(d=>s.removeChild(d))}addErrorMessage(){if(this.element.parentElement){const s=this.createMessageElement();this.element.parentElement.insertBefore(s,this.element.nextSibling)}}addStyleElement(){const s=document.createElement("style");s.innerHTML="\n    .required-indicator::after {\n          color: var(--ion-color-warning);\n          content: '*';\n          margin-left: .3em;\n    }",this.element.insertBefore(s,this.element.firstChild),this.element.shadowRoot&&this.element.shadowRoot.insertBefore(s,this.element.shadowRoot.firstChild)}createMessageElement(){const s={...this.getCommonMessages(),...this.errorMessages},d=(0,An.Z)(Object.keys(this.control.errors)),k=this.element.getElementsByClassName(jl.counterClassName).item(0),ie=document.createElement("div");return ie.classList.add(this.errorElementClassName),ie.style.color="var(--ion-color-warning, #c000)",ie.style.paddingTop="5px",ie.style.paddingRight=`${k?.offsetWidth||0}px`,ie.style.paddingBottom="5px",ie.style.paddingLeft="3px",ie.setAttribute("role","alert"),ie.innerHTML=s[d],ie}setAndEmitValue(s){this.elRef.nativeElement.setAttribute("value",s),this.elRef.nativeElement.value=s,this.siviFormControlValueUpdate.emit(s)}setAndEmitName(s){this.elRef.nativeElement.setAttribute("name",s),this.elRef.nativeElement.name=s,this.siviFormControlNameUpdate.emit(s)}updateValueAndValidity(){this.control&&this.control.updateValueAndValidity()}updateValidityOnMarkAsTouched(){const s=this.control.markAsTouched;this.control.markAsTouched=(...d)=>{s.apply(this.control,d),this.updateValueAndValidity()}}updateValidityOnSetValidators(){const s=this.control.setValidators;this.control.setValidators=(...d)=>{s.apply(this.control,d),this.updateValueAndValidity()}}renderRequiredIndicator(){const s=this.element.parentElement.querySelector(`[name="${this.name}"]`);if(!s)return;const d=this.getLabelElement(s);d&&(this.isRequired&&this.isRequiredIndicatorVisible?d.classList.add("required-indicator"):d.classList.remove("required-indicator"))}renderErrorMessages(){this.clearErrorMessages(),this.control.errors&&this.control.touched&&this.addErrorMessage()}toggleInvalidClass(){this.isValid$.pipe((0,j.R)(this.destroy$)).subscribe(d=>d?this.element.classList.remove("invalid"):this.element.classList.add("invalid"))}getLabelElement(s){const d=s.shadowRoot||s;return d.querySelector("ion-label")||d.querySelector("mat-label")||d.querySelector("label")}getCommonMessages(){return{maxlength:this.translate.instant("Form.Error.MaxLengthIsChactersCount",{count:mu.DEFAULT}),required:this.translate.instant("Form.Error.Required"),pattern:this.translate.instant("Form.Error.AlphaNumericCharacters"),lowercase:this.translate.instant("Form.Error.AddOneLowerCaseCharacter"),uppercase:this.translate.instant("Form.Error.AddOneUpperCaseCharacter"),digit:this.translate.instant("Form.Error.AddOneNumber"),specialcharacter:this.translate.instant("Form.Error.AddOneSpecialCharacter"),validatePin:this.translate.instant("Form.Error.Invalid.Pic"),validatePhoneNumber:this.translate.instant("Form.Error.Invalid.Phone"),maxLengthPhoneNumber:this.translate.instant("Form.Error.MaxLengthIsChactersCount",{count:20}),validateEmail:this.translate.instant("Form.Error.Invalid.Email"),onlyAlphabets:this.translate.instant("Form.Error.OnlyAlphabets"),invalidDate:this.translate.instant("Form.Error.Invalid.Date"),invalidTime:this.translate.instant("Form.Error.Invalid.Hour"),isSameOrAfter:this.translate.instant("Form.Error.Invalid.ToPeriodDateShouldGreaterThanFromPeriod"),maxLengthPostalCode:this.translate.instant("Form.Error.MaxLengthIsChactersCount",{count:5}),onlyNumbers:this.translate.instant("Form.Error.OnlyNumbers"),checkUniqueness:this.translate.instant("Form.Error.MustBeUnique"),personAgeNotInAcceptableRange:this.translate.instant("Form.Error.PersonAgeNotInAcceptableRange"),notEnoughValues:this.translate.instant("Form.Error.NotEnoughValues"),invalidAddress:this.translate.instant("Form.Error.InvalidAddress"),fromHourAfterUntilHour:this.translate.instant("ECEC.WeeklyTimeOptions.Table.Error.FromHourAfterUntilHour"),untilHourBeforeFromHour:this.translate.instant("ECEC.WeeklyTimeOptions.Table.Error.UntilHourBeforeFromHour"),childTooOld:this.translate.instant("Backend.Error.CANNOT_ADD_GUARDIAN_AS_CHILD"),incorrectAge:this.translate.instant("Backend.Error.GUARDIAN_TOO_YOUNG"),notValidTime:this.translate.instant("Form.Error.NotValidTime"),selectFirstDateOfMonth:this.translate.instant("Form.Error.SelectFirstDateOfMonth"),overlappingTimeRanges:this.translate.instant("Form.Error.OverlappingTimeRanges")}}writeValue(s){(0,Ne.Z)(this.value,s)||(this.value=s)}registerOnChange(s){this.onChange=s}registerOnTouched(s){this.onTouch=s}}Gm.\u0275fac=function(s){return new(s||Gm)(e.Y36(e.SBq),e.Y36(Ve.a5),e.Y36(we.sK))},Gm.\u0275dir=e.lG2({type:Gm,selectors:[["","siviLibFormControl",""]],hostBindings:function(s,d){1&s&&e.NdJ("input",function(ie){return d.onInputEvent(ie)})("siviChange",function(ie){return d.onSiviChangeEvent(ie)})("dateChange",function(ie){return d.onDateChangeEvent(ie)})("selectChange",function(ie){return d.onSelectChangeEvent(ie)})("valueChange",function(ie){return d.onValueChangeEvent(ie)})("blur",function(ie){return d.onBlurEvent(ie)})("siviDidLoad",function(ie){return d.onSiviDidLoadEvent(ie)})},inputs:{formControlName:"formControlName",attrName:["name","attrName"],errorMessages:"errorMessages",listenEvent:"listenEvent",listenEvents:"listenEvents",showRequiredIndicator:"showRequiredIndicator",disabled:"disabled"},outputs:{siviFormControlValueUpdate:"siviFormControlValueUpdate",siviFormControlNameUpdate:"siviFormControlNameUpdate"}});class qd{constructor(s){this.elRef=s,this.destroy$=new l.x}ngOnInit(){this.handleStatusChange(),this.handleValuesChange()}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}handleStatusChange(){this.formGroup.statusChanges.pipe((0,me.b)(50),(0,X.U)(s=>[td.VALID,td.DISABLED].includes(s)),(0,Be.O)(this.formGroup.valid),(0,j.R)(this.destroy$)).subscribe(s=>this.emitEvent("siviFormStatusChange",s))}handleValuesChange(){this.formGroup.valueChanges.pipe((0,me.b)(50),(0,Be.O)(this.formGroup.value),(0,j.R)(this.destroy$)).subscribe(s=>this.emitEvent("siviFormValueChange",s))}emitEvent(s,d){const k=new CustomEvent(s,{detail:d,bubbles:!0});this.elRef.nativeElement.dispatchEvent(k)}}qd.\u0275fac=function(s){return new(s||qd)(e.Y36(e.SBq))},qd.\u0275dir=e.lG2({type:qd,selectors:[["","siviLibForm",""]],inputs:{formGroup:"formGroup"}});class Tp{}Tp.\u0275fac=function(s){return new(s||Tp)},Tp.\u0275mod=e.oAB({type:Tp}),Tp.\u0275inj=e.cJS({imports:[Ga,Ve.UX,Ve.UX]});class df extends Qf{constructor(){super(...arguments),this._isValid=!1,this.goToInvalid$=new l.x}set isValid(s){this._isValid=s}get isValid(){return this._isValid}onSiviFormStatusChange(s){s.stopPropagation(),this.isValid=s.detail,this.onFormStatusChange(s.detail)}onSiviFormValuesChange(s){s.stopPropagation(),this.onFormValueChange(s.detail)}onFormStatusChange(s){}onFormValueChange(s){}}df.\u0275fac=function(){let H;return function(d){return(H||(H=e.n5z(df)))(d||df)}}(),df.\u0275dir=e.lG2({type:df,hostBindings:function(s,d){1&s&&e.NdJ("siviFormStatusChange",function(ie){return d.onSiviFormStatusChange(ie)})("siviFormValueChange",function(ie){return d.onSiviFormValuesChange(ie)})},features:[e.qOj]});class Fp extends Js{onControlValueUpdate(s){this.value=s}onControlNameUpdate(s){this.name=s}get componentName(){return this.name||this.formControlName}}function xy(H,s){if(1&H&&(e.TgZ(0,"i",4)(1,"span",5),e._uU(2),e.qZA()()),2&H){const d=e.oxw();e.uIk("aria-label",d.ariaLabel),e.xp6(2),e.Oqu(d.icon)}}function Xs(H,s){if(1&H&&(e.TgZ(0,"i",6)(1,"span",5),e._uU(2),e.qZA()()),2&H){const d=e.oxw();e.uIk("aria-label",d.ariaLabel),e.xp6(2),e.Oqu(d.icon)}}Fp.\u0275fac=function(){let H;return function(d){return(H||(H=e.n5z(Fp)))(d||Fp)}}(),Fp.\u0275dir=e.lG2({type:Fp,hostBindings:function(s,d){1&s&&e.NdJ("siviFormControlValueUpdate",function(ie){return d.onControlValueUpdate(ie)})("siviFormControlNameUpdate",function(ie){return d.onControlNameUpdate(ie)})},inputs:{formControlName:"formControlName"},features:[e.qOj]});class nd{constructor(){this.text="General.Buttons.Save",this.icon="check",this.ariaLabel=this.text,this.clicked=new e.vpe}}nd.\u0275fac=function(s){return new(s||nd)},nd.\u0275cmp=e.Xpm({type:nd,selectors:[["sivi-lib-navbar-action-button"]],inputs:{disabled:"disabled",text:"text",icon:"icon",ariaLabel:"ariaLabel"},outputs:{clicked:"clicked"},decls:7,vars:9,consts:[["fill","clear","role","button","no-min-width","",1,"action-button","color--white",3,"disabled","click"],[1,"h-hidden","show-xs"],["class","material-icons hidden-xsi",4,"ngIf"],["class","material-icons",4,"ngIf"],[1,"material-icons","hidden-xsi"],["aria-hidden","true"],[1,"material-icons"]],template:function(s,d){1&s&&(e.TgZ(0,"ion-button",0),e.NdJ("click",function(){return d.clicked.emit()}),e.ALo(1,"translate"),e.TgZ(2,"span",1),e._uU(3),e.ALo(4,"translate"),e.qZA(),e.YNc(5,xy,3,2,"i",2),e.YNc(6,Xs,3,2,"i",3),e.qZA()),2&s&&(e.Q6J("disabled",d.disabled),e.uIk("aria-label",e.lcZ(1,5,d.text)),e.xp6(3),e.Oqu(e.lcZ(4,7,d.text)),e.xp6(2),e.Q6J("ngIf",d.text),e.xp6(1),e.Q6J("ngIf",!d.text))},dependencies:[Et.O5,Nt.YG,we.X$],styles:[".action-button.ion-focused[_ngcontent-%COMP%]{outline:2px dashed var(--ion-color-contrast)!important;outline-offset:2px!important}"]});class Df{constructor(s){this.popoverCtrl=s,this.clickedSettings=new e.vpe}presentPopover(s){var d=this;return(0,o.Z)(function*(){const k=[];d.showSettings&&k.push({id:"click-settings",text:"General.BasicInfo",icon:"settings",ariaLabel:d.ariaLabel}),d.options&&d.options.length&&d.options.forEach(ot=>{k.push({id:ot.id,text:ot.text,icon:ot.icon,ariaLabel:ot.ariaLabel})});const ie=yield d.popoverCtrl.create({component:pm,event:s,translucent:!1,componentProps:{items:k}});return ie.onDidDismiss().then(ot=>d.handlePopoverClose(ot)),yield ie.present()})()}handlePopoverClose(s){switch(s.data){case"click-settings":this.clickedSettings.emit();break;case void 0:break;default:this.clickedSettings.emit(s)}}}function Db(H,s){if(1&H&&(e.TgZ(0,"mark",4),e._uU(1),e.ALo(2,"async"),e.qZA()),2&H){const d=e.oxw();e.xp6(1),e.hij(" ",e.lcZ(2,1,d.uncheckedCount$)," ")}}Df.\u0275fac=function(s){return new(s||Df)(e.Y36(Nt.Dh))},Df.\u0275cmp=e.Xpm({type:Df,selectors:[["sivi-lib-navbar-more-options"]],inputs:{showSettings:"showSettings",ariaLabel:"ariaLabel",options:"options"},outputs:{clickedSettings:"clickedSettings"},decls:3,vars:3,consts:[[1,"more-options-button",3,"click"],["name","more_vert"]],template:function(s,d){1&s&&(e.TgZ(0,"button",0),e.NdJ("click",function(ie){return d.presentPopover(ie)}),e.ALo(1,"translate"),e._UZ(2,"cgi-icon",1),e.qZA()),2&s&&e.uIk("aria-label",e.lcZ(1,1,"General.Buttons.MoreOptions"))},dependencies:[we.X$],encapsulation:2});class Sf{constructor(s){this.eventBroadcaster=s}ngOnInit(){this.uncheckedCount$=this.eventBroadcaster.getEventQueueById(du.NOTIFICATIONS_UNREAD_AMOUNT)}showNotifications(s){var d=this;return(0,o.Z)(function*(){d.eventBroadcaster.broadcastEvent(du.NOTIFICATIONS_SHOW,s)})()}}Sf.\u0275fac=function(s){return new(s||Sf)(e.Y36(Kc))},Sf.\u0275cmp=e.Xpm({type:Sf,selectors:[["sivi-lib-notifications-indicator"]],decls:7,vars:6,consts:[["no-min-width","","shape","round",1,"notifications-icon",3,"click"],[1,"bell","material-icons"],["aria-hidden","true"],["class","badge count","aria-hidden","true",4,"ngIf"],["aria-hidden","true",1,"badge","count"]],template:function(s,d){1&s&&(e.TgZ(0,"ion-button",0),e.NdJ("click",function(ie){return d.showNotifications(ie)}),e.TgZ(1,"i",1),e.ALo(2,"translate"),e.TgZ(3,"span",2),e._uU(4,"notifications"),e.qZA()(),e.YNc(5,Db,3,3,"mark",3),e.ALo(6,"async"),e.qZA()),2&s&&(e.xp6(1),e.uIk("aria-label",e.lcZ(2,2,"General.Buttons.Notifications")),e.xp6(4),e.Q6J("ngIf",e.lcZ(6,4,d.uncheckedCount$)>0))},dependencies:[Et.O5,Nt.YG,Et.Ov,we.X$],styles:[".notifications-icon[_ngcontent-%COMP%]{display:inline-block;cursor:pointer;height:48px;margin:4px 8px 0 0;position:relative;width:48px}.notifications-icon[_ngcontent-%COMP%]:hover{opacity:1!important}.notifications-icon.ion-focused[_ngcontent-%COMP%]{outline:2px dashed var(--ion-color-primary-contrast);outline-offset:0}.button-native[_ngcontent-%COMP%]{padding:0}.badge[_ngcontent-%COMP%]{--radius: 18px;align-items:center;background-color:var(--ion-color-secondary)!important;border:1px solid var(--ion-color-primary);border-radius:calc(var(--radius) / 2);box-sizing:border-box;color:var(--ion-color-secondary-contrast);display:flex;font-size:calc(var(--radius) / 1.6);font-weight:600;height:var(--radius);justify-content:center;line-height:var(--radius);min-width:var(--radius);padding:0 2px;position:absolute;right:4px;top:4px}.bell[_ngcontent-%COMP%]{color:var(--ion-color-primary-contrast);display:block}.bell[_ngcontent-%COMP%], .bell[_ngcontent-%COMP%]:hover{opacity:1}.ion-focused[_ngcontent-%COMP%], [_ngcontent-%COMP%]:focus{outline:2px dashed var(--ion-color-primary-contrast);outline-offset:2px}"]});const Mh=["secondaryToolbarContent"];function Mg(H,s){1&H&&e._UZ(0,"ion-menu-button",10)}function vC(H,s){if(1&H&&e._UZ(0,"ion-back-button",11),2&H){const d=e.oxw();e.Q6J("defaultHref",d.backButtonHref)}}function ov(H,s){if(1&H){const d=e.EpF();e.TgZ(0,"button",12),e.NdJ("click",function(){e.CHM(d);const ie=e.oxw();return e.KtG(ie.closeView())}),e.ALo(1,"translate"),e._UZ(2,"cgi-icon",13),e.qZA()}if(2&H){const d=e.oxw();e.Q6J("disabled",d.closeButtonDisabled),e.uIk("aria-label",e.lcZ(1,2,"General.Buttons.Close"))}}function Wm(H,s){1&H&&e._UZ(0,"sivi-lib-notifications-indicator")}function Pm(H,s){1&H&&e._UZ(0,"ion-progress-bar",14),2&H&&e.Q6J("@slideInOutFromUp",void 0)}const Af=[[["","navbar-title",""]],[["","navbar-buttons-right",""]],[["","navbar-secondary-toolbar",""]]];class Gc extends Js{constructor(s,d,k){super(),this.cdRef=s,this.loaderService=d,this.platformHelper=k,this.closeButton=!1,this.hideNotifications=!1,this.closeButtonDisabled=!1,this.closed=new e.vpe,this.showSecondaryToolbar=!1,this.showLoader=!1,this.menuButton=!1,this.loaderService.getState().pipe((0,j.R)(this.destroy$)).subscribe(ie=>{this.showLoader=ie})}handleMenuButtonVis(s){this.menuButton=!s}ngAfterViewInit(){this.showSecondaryToolbar=this.secondaryToolbar.nativeElement&&this.secondaryToolbar.nativeElement.children.length>0,this.cdRef.detectChanges(),document.querySelector(".left-navigation")&&(this.menuButton=!document.querySelector(".left-navigation").classList.contains("menu-pane-visible"))}closeView(){this.closed.emit()}}Gc.\u0275fac=function(s){return new(s||Gc)(e.Y36(e.sBO),e.Y36(yl),e.Y36(Qd))},Gc.\u0275cmp=e.Xpm({type:Gc,selectors:[["sivi-lib-navbar"]],viewQuery:function(s,d){if(1&s&&e.Gf(Mh,5),2&s){let k;e.iGM(k=e.CRH())&&(d.secondaryToolbar=k.first)}},hostBindings:function(s,d){1&s&&e.NdJ("ionSplitPaneVisible",function(ie){return d.handleMenuButtonVis(ie.detail.visible)},!1,e.pYS)},inputs:{backButton:"backButton",backButtonHref:"backButtonHref",closeButton:"closeButton",hideNotifications:"hideNotifications",closeButtonDisabled:"closeButtonDisabled"},outputs:{closed:"closed"},features:[e.qOj],ngContentSelectors:["[navbar-title]","[navbar-buttons-right]","[navbar-secondary-toolbar]"],decls:15,vars:6,consts:[["color","primary"],["slot","start"],["autoHide","true","menu","main-navigation-menu","class","hilite-focus",4,"ngIf"],["class","hilite-focus",3,"defaultHref",4,"ngIf"],["class","navbar-close-button hilite-focus",3,"disabled","click",4,"ngIf"],["slot","primary","no-min-width",""],[4,"ngIf"],[1,"secondary-toolbar",3,"hidden"],["secondaryToolbarContent",""],["class","sivi-main-loader-progress-bar","color","secondary","type","indeterminate","mode","md",4,"ngIf"],["autoHide","true","menu","main-navigation-menu",1,"hilite-focus"],[1,"hilite-focus",3,"defaultHref"],[1,"navbar-close-button","hilite-focus",3,"disabled","click"],["name","close"],["color","secondary","type","indeterminate","mode","md",1,"sivi-main-loader-progress-bar"]],template:function(s,d){1&s&&(e.F$t(Af),e.TgZ(0,"ion-toolbar",0)(1,"ion-buttons",1),e.YNc(2,Mg,1,0,"ion-menu-button",2),e.YNc(3,vC,1,1,"ion-back-button",3),e.YNc(4,ov,3,4,"button",4),e.qZA(),e.TgZ(5,"ion-title"),e.Hsn(6),e.qZA(),e.TgZ(7,"ion-buttons",5),e.YNc(8,Wm,1,0,"sivi-lib-notifications-indicator",6),e.Hsn(9,1),e.qZA()(),e.TgZ(10,"ion-toolbar",7)(11,"div",null,8),e.Hsn(13,2),e.qZA()(),e.YNc(14,Pm,1,1,"ion-progress-bar",9)),2&s&&(e.xp6(2),e.Q6J("ngIf",!d.closeButton&&!d.backButton&&d.menuButton),e.xp6(1),e.Q6J("ngIf",d.backButton),e.xp6(1),e.Q6J("ngIf",d.closeButton),e.xp6(4),e.Q6J("ngIf",!d.hideNotifications),e.xp6(2),e.Q6J("hidden",!d.showSecondaryToolbar),e.xp6(4),e.Q6J("ngIf",d.showLoader))},styles:["[_ngcontent-%COMP%]:focus, .ion-focused[_ngcontent-%COMP%]{outline:2px dashed var(--ion-color-primary);outline-offset:2px}[_nghost-%COMP%]{display:block}[_nghost-%COMP%]   ion-toolbar[_ngcontent-%COMP%]{--padding-start: 4px}[_nghost-%COMP%]   .secondary-toolbar[_ngcontent-%COMP%]{--padding-top: 0;--padding-end: 0;--padding-bottom: 0;--padding-start: 0}ion-back-button[_ngcontent-%COMP%]{--opacity: 1}[slot=start][_ngcontent-%COMP%]{order:2}.toolbar-content[_ngcontent-%COMP%]{order:3}[slot=secondary][_ngcontent-%COMP%]{order:4}[slot=primary][_ngcontent-%COMP%]{order:5;text-align:end}[slot=end][_ngcontent-%COMP%]{order:6;text-align:end}.navbar-close-button[_ngcontent-%COMP%]{padding:8px;background:transparent}.navbar-close-button[_ngcontent-%COMP%]   cgi-icon[_ngcontent-%COMP%]{color:var(--ion-color-primary-contrast)}ion-progress-bar[_ngcontent-%COMP%]{position:absolute}.hilite-focus[_ngcontent-%COMP%]:focus-within, .hilite-focus[_ngcontent-%COMP%]:focus, .hilite-focus.ion-focused[_ngcontent-%COMP%]{outline:2px dashed var(--ion-color-primary-contrast);outline-offset:0}"],data:{animation:[Jf]}});class gu{}function Ad(H,s){if(1&H){const d=e.EpF();e.TgZ(0,"ion-col",10)(1,"sivi-lib-datepicker",11),e.NdJ("blur",function(){e.CHM(d);const ie=e.oxw(2);return e.KtG(ie.updateControlValidity("validUntil"))}),e.qZA()()}if(2&H){const d=e.oxw(2);e.xp6(1),e.Q6J("label","Form.Label.From")("readonly",d.state===d.constants.CURRENT||d.viewMode)("minDate",d.todayDate)("maxDate",d.formValues.validUntil)("value",d.formValues.validFrom)}}function $s(H,s){if(1&H){const d=e.EpF();e.TgZ(0,"ion-col",10)(1,"sivi-lib-datepicker",12),e.NdJ("blur",function(){e.CHM(d);const ie=e.oxw(2);return e.KtG(ie.updateControlValidity("validFrom"))}),e._uU(2,' [readonly]="viewMode" [minDate]="formValues.validFrom || todayDate" [value]="formValues.validUntil"> '),e.qZA()()}2&H&&(e.xp6(1),e.Q6J("label","Form.Label.Until"))}function $h(H,s){if(1&H&&(e.TgZ(0,"ion-col",13)(1,"div",14)(2,"p"),e._uU(3),e.ALo(4,"translate"),e.ALo(5,"date"),e.ALo(6,"date"),e.qZA()()()),2&H){const d=e.oxw(2);e.xp6(3),e.lnq("",e.lcZ(4,3,"General.Text.Valid"),": ",e.xi3(5,5,d.formValues.validFrom,d.dateFormats.FINNISH_ANGULAR)," - ",e.xi3(6,8,d.formValues.validUntil,d.dateFormats.FINNISH_ANGULAR),"")}}function av(H,s){if(1&H&&(e.TgZ(0,"div",6),e.ALo(1,"translate"),e.TgZ(2,"div",7)(3,"ion-row"),e.YNc(4,Ad,2,5,"ion-col",8),e.YNc(5,$s,3,1,"ion-col",8),e.YNc(6,$h,7,11,"ion-col",9),e.qZA()()()),2&H){const d=e.oxw();e.uIk("aria-label",e.lcZ(1,5,"General.Text.Validity")),e.xp6(2),e.Q6J("formGroup",d.formGroup),e.xp6(2),e.Q6J("ngIf",d.state!==d.constants.EXPIRED),e.xp6(1),e.Q6J("ngIf",d.state!==d.constants.EXPIRED),e.xp6(1),e.Q6J("ngIf",d.state===d.constants.EXPIRED)}}function Yu(H,s){1&H&&e._UZ(0,"ion-row",15)}function Xp(H,s){if(1&H){const d=e.EpF();e.TgZ(0,"ion-button",19),e.NdJ("click",function(){e.CHM(d);const ie=e.oxw(2);return e.KtG(ie.onClickMainAction())}),e._uU(1),e.qZA()}if(2&H){const d=e.oxw(2);e.xp6(1),e.hij(" ",d.textMainActionButton," ")}}function Th(H,s){if(1&H){const d=e.EpF();e.ynx(0),e.TgZ(1,"div",20)(2,"ion-button",21),e.NdJ("click",function(){e.CHM(d);const ie=e.oxw(2);return e.KtG(ie.onClickCancel())}),e._uU(3),e.ALo(4,"translate"),e.qZA(),e.TgZ(5,"ion-button",22),e.NdJ("click",function(){e.CHM(d);const ie=e.oxw(2);return e.KtG(ie.onClickSave())}),e._uU(6),e.ALo(7,"translate"),e.qZA()(),e.BQk()}if(2&H){const d=e.oxw(2);e.xp6(2),e.Q6J("disabled",d.getButtonDisabledStatus()),e.xp6(1),e.hij(" ",e.lcZ(4,4,"General.Buttons.Cancel")," "),e.xp6(2),e.Q6J("disabled",d.getButtonDisabledStatus()||!d.isValid),e.xp6(1),e.hij(" ",e.lcZ(7,6,"General.Buttons.Save")," ")}}function yC(H,s){if(1&H&&(e.TgZ(0,"footer",16),e.YNc(1,Xp,2,1,"ion-button",17),e.YNc(2,Th,8,8,"ng-container",18),e.qZA()),2&H){const d=e.oxw();e.xp6(1),e.Q6J("ngIf",d.textMainActionButton),e.xp6(1),e.Q6J("ngIf",d.state!==d.constants.EXPIRED&&!d.viewMode)}}gu.\u0275fac=function(s){return new(s||gu)},gu.\u0275mod=e.oAB({type:gu}),gu.\u0275inj=e.cJS({imports:[Ve.u5,Jc,Ga,Tp]}),e.B6R(Gc,[Et.O5,Nt.oU,Nt.Sm,Nt.fG,Nt.X7,Nt.wd,Nt.sr,Nt.cs,Sf],[we.X$]);class jh extends df{constructor(s,d){super(),this.translate=s,this.fb=d,this.viewMode=!1,this.isFooterHidden=!1,this.isBodyHidden=!1,this.clickCardHeaderEvent=new e.vpe,this.clickMainActionEvent=new e.vpe,this.clickSaveEvent=new e.vpe,this.constants=Ro,this.todayDate=Nn().format("YYYY-MM-DD"),this.formValues={},this.dateFormats=as,this.validFromValidators=[sc.validateDate(),sc.validateDateIsAfterThan("validUntil")],this.validUntilValidators=[sc.validateDate(),sc.validateDateIsBeforeThan("validFrom")],this.isValidFromRequired=!1,this.formGroup=this.fb.group({validFrom:["",this.validFromValidators],validUntil:["",this.validUntilValidators]})}ngOnInit(){this.formValues={validFrom:co.getStartOfDay(this.validFrom),validUntil:co.getEndOfDay(this.validUntil)},this.lastSavedValues={...this.formValues},this.formGroup.patchValue(this.formValues),this.setValidators()}ngOnChanges(s){this.updateFormValues(s)}updateFormValues(s){const d=s.validFrom,k=s.validUntil;d&&!d.firstChange&&(this.formValues.validFrom=co.getStartOfDay(d.currentValue)),k&&!k.firstChange&&(this.formValues.validUntil=co.getEndOfDay(k.currentValue)),this.lastSavedValues={...this.formValues},this.setValidators()}onClickCardHeader(){this.clickCardHeaderEvent.emit(this.id)}onClickMainAction(){this.lastSavedValues={...this.formValues};const s={id:this.id,...this.formValues};this.clickMainActionEvent.emit(s)}onClickSave(){this.lastSavedValues={...this.formValues};const s={id:this.id,...this.formValues};this.clickSaveEvent.emit(s)}onClickCancel(){this.formValues={...this.lastSavedValues}}onFormValueChange(s){const d=co.getStartOfDay(s.validFrom),k=co.getEndOfDay(s.validUntil);this.formValues={...this.formValues,validFrom:d,validUntil:k},this.setValidators()}setValidators(){const s=this.formValues.validUntil?[sc.required,...this.validFromValidators]:this.validFromValidators;this.formGroup.get("validFrom").setValidators(s)}updateControlValidity(s){this.formGroup.get(s).updateValueAndValidity({onlySelf:!0})}getButtonDisabledStatus(){return(0,Ne.Z)(this.formValues,this.lastSavedValues)}}jh.\u0275fac=function(s){return new(s||jh)(e.Y36(we.sK),e.Y36(Ve.QS))},jh.\u0275cmp=e.Xpm({type:jh,selectors:[["sivi-lib-timeframe-card"]],inputs:{id:"id",title:"title",subtitle:"subtitle",validFrom:"validFrom",validUntil:"validUntil",state:"state",viewMode:"viewMode",textMainActionButton:"textMainActionButton",isFooterHidden:"isFooterHidden",isBodyHidden:"isBodyHidden"},outputs:{clickCardHeaderEvent:"clickCardHeaderEvent",clickMainActionEvent:"clickMainActionEvent",clickSaveEvent:"clickSaveEvent"},features:[e.qOj,e.TTD],decls:11,vars:7,consts:[[1,"sivi-card","timeframe-card"],["tabindex","0","role","link","siviKeyboardEvents","",1,"header",3,"siviClick"],[1,"text-ellipsis","card-title"],["role","form","class","p1",4,"ngIf","ngIfElse"],["hiddenBody",""],["class","footer ion-padding",4,"ngIf"],["role","form",1,"p1"],["siviLibForm","",3,"formGroup"],["sizeSm","12","sizeMd","6",4,"ngIf"],["size","12",4,"ngIf"],["sizeSm","12","sizeMd","6"],["formControlName","validFrom","siviLibFormControl","",3,"label","readonly","minDate","maxDate","value","blur"],["formControlName","validUntil","siviLibFormControl","",3,"label","blur"],["size","12"],[1,"content-left"],[1,"hidden-card-body"],[1,"footer","ion-padding"],["no-min-width","","size","small","class","primaryActionButton",3,"click",4,"ngIf"],[4,"ngIf"],["no-min-width","","size","small",1,"primaryActionButton",3,"click"],[1,"secondaryActionButtonsArea"],["no-min-width","","fill","clear","size","small",3,"disabled","click"],["no-min-width","","size","small","fill","clear",3,"disabled","click"]],template:function(s,d){if(1&s&&(e.TgZ(0,"div",0)(1,"div",1),e.NdJ("siviClick",function(){return d.onClickCardHeader()}),e.TgZ(2,"h5",2),e._uU(3),e.qZA(),e.TgZ(4,"h5"),e._uU(5),e.ALo(6,"uppercase"),e.qZA()(),e.YNc(7,av,7,7,"div",3),e.YNc(8,Yu,1,0,"ng-template",null,4,e.W1O),e.YNc(10,yC,3,2,"footer",5),e.qZA()),2&s){const k=e.MAs(9);e.xp6(3),e.Oqu(d.title),e.xp6(2),e.Oqu(e.lcZ(6,5,d.subtitle)),e.xp6(2),e.Q6J("ngIf",!d.isBodyHidden)("ngIfElse",k),e.xp6(3),e.Q6J("ngIf",!d.isFooterHidden)}},styles:[".timeframe-card[_ngcontent-%COMP%]   .header[_ngcontent-%COMP%]{cursor:pointer;font-weight:600;font-size:1.8rem;color:var(--ion-color-primary-contrast);white-space:normal;background-color:var(--ion-color-primary);padding:.5em 0 2em 1em;max-height:7em}.timeframe-card[_ngcontent-%COMP%]   ion-input[disabled=true][_ngcontent-%COMP%]{line-height:1}@supports (-ms-ime-align: auto){.timeframe-card[_ngcontent-%COMP%]   ion-input[disabled=true][_ngcontent-%COMP%]{line-height:inherit}}@supports (-moz-appearance: none){.timeframe-card[_ngcontent-%COMP%]   ion-input[disabled=true][_ngcontent-%COMP%]{line-height:normal}}.timeframe-card[_ngcontent-%COMP%]   footer[_ngcontent-%COMP%]{display:flex;flex-wrap:nowrap;justify-content:space-between}.timeframe-card[_ngcontent-%COMP%]   footer[_ngcontent-%COMP%]   .button-disabled[_ngcontent-%COMP%]{opacity:.5}.timeframe-card[_ngcontent-%COMP%]   footer[_ngcontent-%COMP%]   .secondaryActionButtonsArea[_ngcontent-%COMP%]{align-items:center;display:flex;justify-content:flex-end}.timeframe-card[_ngcontent-%COMP%]   .text-ellipsis[_ngcontent-%COMP%]{white-space:normal;padding-right:.75em}.timeframe-card[_ngcontent-%COMP%]   .hidden-card-body[_ngcontent-%COMP%]{height:3em}"],data:{animation:[Dd]}});const Kh=["datepickerInput"];function D_(H,s){if(1&H){const d=e.EpF();e.ynx(0),e.TgZ(1,"ion-label",2),e._uU(2),e.ALo(3,"translate"),e.qZA(),e.TgZ(4,"mat-form-field",null,3),e._UZ(6,"mat-datepicker-toggle",4)(7,"mat-datepicker",5,6),e.TgZ(9,"input",7,8),e.NdJ("blur",function(){e.CHM(d);const ie=e.oxw();return e.KtG(ie.onBlur())})("dateChange",function(ie){e.CHM(d);const ot=e.oxw();return e.KtG(ot.onChange(ie))}),e.qZA()(),e.BQk()}if(2&H){const d=e.MAs(8),k=e.oxw();e.xp6(2),e.hij(" ",e.lcZ(3,12,k.getLabel())," "),e.xp6(4),e.Q6J("for",d),e.xp6(1),e.Q6J("dateClass",k.dateClass)("startAt",null==k.dateForm?null:k.dateForm.value),e.xp6(2),e.Q6J("placeholder",k.placeholder)("min",k.min)("max",k.max)("formControl",k.dateForm)("matDatepicker",d)("name",k.componentName+"input1")("matDatepickerFilter",k.filterOutDatesFn),e.uIk("data-cy","datepicker-"+k.componentName)}}function wf(H,s){if(1&H&&(e._UZ(0,"cgi-input",9),e.ALo(1,"translate")),2&H){const d=e.oxw();e.Q6J("name",d.componentName+"input2")("label-position",d.labelPosition)("viewMode",d.readonly)("label",e.lcZ(1,6,d.getLabel()))("value",d.readonlyValue||d.getDateText()),e.uIk("data-cy","datepicker-readonly-"+d.componentName)}}const Qg={parse:{dateInput:as.FINNISH_MOMENT},display:{dateInput:as.FINNISH_MOMENT,monthYearLabel:"YYYY",dateA11yLabel:"LL",monthYearA11yLabel:"YYYY"}};class Np extends Fp{set value(s){s&&Nn(s).isValid()?this.dateForm.setValue(Nn(s)):this.dateForm.setValue("")}set minDate(s){this.min=s?new Date(Nn(s).format(as.STANDARD)):new Date(as.STANDARD_MIN_DATE)}set maxDate(s){this.max=s?new Date(Nn(s).format(as.STANDARD)):new Date(as.STANDARD_MAX_DATE)}constructor(s,d,k){super(),this.translate=s,this.dateAdapter=d,this.elRef=k,this.autofocus=!1,this.readonly=!1,this.placeholder="",this.outputFormat=as.STANDARD,this.labelPosition="floating",this.highlightDates=[],this.update=new e.vpe,this.dateForm=new Ve.p4,this.min=new Date(as.STANDARD_MIN_DATE),this.max=new Date(as.STANDARD_MAX_DATE),this.dateClass=(ie,ot)=>{if(this.highlightDates&&"month"===ot&&this.highlightDates.length>0){const Cn=ie.format(as.STANDARD);return this.highlightDates.includes(Cn)?"highlightDates":""}},this.dateAdapter.setLocale(co.getFixedLocale(this.translate.currentLang))}ngAfterViewInit(){this.setAutofocus()}onBlur(){const s=new Event("blur",{bubbles:!0});this.elRef.nativeElement.dispatchEvent(s)}onChange(s){if(!s)return;const d={name:this.name,value:s.value?s.value.format(this.outputFormat):s.targetElement.value},k=new CustomEvent("dateChange",{detail:d,bubbles:!0});this.elRef.nativeElement.dispatchEvent(k),this.update.emit(d),setTimeout(()=>{this.setFocus(),this.setBlur()})}setAutofocus(){this.autofocus&&this.setFocus()}setFocus(){this.datepickerInput&&this.datepickerInput.nativeElement.focus()}setBlur(){try{this.datepickerInput&&this.datepickerInput.nativeElement.blur()}catch(s){console.error("setBlur error",s)}}getDateText(){return this.dateForm&&this.dateForm.value?Nn(this.dateForm.value).format(as.FINNISH_MOMENT):"-"}getLabel(){return this.noLabel?"":this.label||"General.SelectDate"}}Np.\u0275fac=function(s){return new(s||Np)(e.Y36(we.sK),e.Y36(gn._A),e.Y36(e.SBq))},Np.\u0275cmp=e.Xpm({type:Np,selectors:[["sivi-lib-datepicker"]],viewQuery:function(s,d){if(1&s&&e.Gf(Kh,5),2&s){let k;e.iGM(k=e.CRH())&&(d.datepickerInput=k.first)}},inputs:{value:"value",minDate:"minDate",maxDate:"maxDate",name:"name",label:"label",noLabel:"noLabel",autofocus:"autofocus",readonly:"readonly",readonlyValue:"readonlyValue",placeholder:"placeholder",outputFormat:"outputFormat",labelPosition:"labelPosition",highlightDates:"highlightDates",filterOutDatesFn:"filterOutDatesFn"},outputs:{update:"update"},features:[e._Bn([{provide:gn._A,useClass:wn,deps:[gn.Ad,un]},{provide:gn.sG,useValue:Qg}]),e.qOj],decls:3,vars:2,consts:[[4,"ngIf","ngIfElse"],["readonlyOn",""],["position","stacked",1,"ion-text-wrap","label"],["matFormField",""],["matPrefix","",3,"for"],[3,"dateClass","startAt"],["picker",""],["matInput","",3,"placeholder","min","max","formControl","matDatepicker","name","matDatepickerFilter","blur","dateChange"],["datepickerInput",""],["type","text",3,"name","label-position","viewMode","label","value"]],template:function(s,d){if(1&s&&(e.YNc(0,D_,11,14,"ng-container",0),e.YNc(1,wf,2,8,"ng-template",null,1,e.W1O)),2&s){const k=e.MAs(2);e.Q6J("ngIf",!d.readonly)("ngIfElse",k)}},dependencies:[Et.O5,Nt.Q$,Ve.Fj,Ve.JJ,Ve.oH,Ha,bt,Qi,ii.KE,ii.qo,hi.Nt,we.X$],styles:[":host{display:block}.mat-mdc-form-field{display:block!important}mat-form-field{margin-top:1em;margin-bottom:.5em}.label{display:block;line-height:1.5;margin-bottom:10px}.item-has-focus .label-floating,.item-has-value .label-floating,.label-stacked{max-width:133%;width:133%}ion-item:focus,input{background-color:transparent;border:none}.highlightDates{background:#00FF00!important;border-radius:100%}\n"],encapsulation:2,changeDetection:0});class em{}em.SUNDAY=0,em.MONDAY=1,em.TUESDAY=2,em.WEDNESDAY=3,em.THURSDAY=4,em.FRIDAY=5,em.SATURDAY=6;class _d{}_d.\u0275fac=function(s){return new(s||_d)},_d.\u0275mod=e.oAB({type:_d}),_d.\u0275inj=e.cJS({imports:[Ga,Ve.UX,gn.XK,hl,xi,ii.lN,hi.c]});class xh{}xh.\u0275fac=function(s){return new(s||xh)},xh.\u0275mod=e.oAB({type:xh}),xh.\u0275inj=e.cJS({imports:[Ga,Tp,_d]}),e.B6R(jh,[Et.O5,Nt.YG,Nt.wI,Nt.Nd,Kp,qd,Gm,Ve.JJ,Ve.JL,Ve.sg,Ve.u,Np],[Et.gd,Et.uU,we.X$]);class iu{constructor(s,d){this.languageService=s,this.elementRef=d,this.id=co.createUUID(),this.toolbar=!0,this.allowImages=!0,this.update=new e.vpe,this.LANGUAGE_FILES_DIR="/assets/i18n/tinymce/",this.configuration={selector:"#"+this.id,language:"fi",inline:!1,entity_encoding:"raw",language_url:this.LANGUAGE_FILES_DIR+"fi.js",base_url:"/tinymce",suffix:".min",skin:"CUSTOM",skin_url:"/assets/js/tinymce-skin/ui/CUSTOM",height:500,menubar:!1,branding:!1,plugins:["lists link image paste"],toolbar:this.toolbar?"undo redo | formatselect | bold italic strikethrough underline removeformat |          alignleft aligncenter alignright alignjustify indent outdent |          numlist bullist | link unlink":"",paste_data_images:!0,file_picker_types:"image",file_picker_callback(k,ie,ot){if("image"===ot.filetype){const Cn=document.getElementById("file-picker-input");Cn.click(),Cn.onchange=()=>{const ir=Cn.files[0],Yo=new FileReader;Yo.onload=tl=>{k(tl.target.result,{alt:ir.name})},Yo.readAsDataURL(ir)}}},setup:k=>{k.on("keyup change",()=>{const ie=k.getContent();this.onInputChange(ie)})}}}ngAfterContentInit(){setTimeout(()=>{const s=this.languageService.getCurrentUserLanguage(),d={...this.configuration,...this.getLanguageConfiguration(s.language)};this.allowImages&&(d.toolbar+=" | image"),d.toolbar=this.toolbar?d.toolbar:"",Wl.init(d)},100)}ngOnDestroy(){Wl&&Wl.EditorManager.execCommand("mceRemoveEditor",!0,"#"+this.id)}getLanguageConfiguration(s){const d={language:s=s||"fi",language_url:this.LANGUAGE_FILES_DIR+s+".js"};return"sv"===s?d.language="sv_SE":"en"===s&&(d.language="en_US",delete d.language_url),d}onInputChange(s){if(s!==this.value){this.value=s;const d=new CustomEvent("siviChange",{detail:{name:this.name,value:this.value},bubbles:!0});this.elementRef.nativeElement.dispatchEvent(d),this.update.emit(s)}}}iu.\u0275fac=function(s){return new(s||iu)(e.Y36(Qp),e.Y36(e.SBq))},iu.\u0275cmp=e.Xpm({type:iu,selectors:[["sivi-lib-html-editor"]],inputs:{name:"name",label:"label",value:"value",toolbar:"toolbar",allowImages:"allowImages"},outputs:{update:"update"},decls:5,vars:4,consts:[["id","file-picker-input","type","file","name","file-picker-input","onchange","",2,"display","none"],["position","stacked"],[3,"id","name"]],template:function(s,d){1&s&&(e._UZ(0,"input",0),e.TgZ(1,"ion-label",1),e._uU(2),e.qZA(),e.TgZ(3,"textarea",2),e._uU(4),e.qZA()),2&s&&(e.xp6(2),e.Oqu(d.label),e.xp6(1),e.Q6J("id",d.id)("name",d.name),e.xp6(1),e.hij(" ",d.value," "))},dependencies:[Nt.Q$]});class xp{}function kv(H,s){if(1&H&&(e.TgZ(0,"ion-item",2),e._UZ(1,"cgi-input",3),e.ALo(2,"translate"),e.qZA()),2&H){const d=e.oxw();e.xp6(1),e.Q6J("label",e.lcZ(2,4,d.label))("viewMode",d.viewMode)("value",d.viewModeValue),e.uIk("data-cy","radio-list-readonly-"+d.componentName)}}function id(H,s){if(1&H&&(e.ynx(0),e._UZ(1,"sivi-lib-info-popup",8),e.ALo(2,"translate"),e.BQk()),2&H){const d=e.oxw(3);e.xp6(1),e.Q6J("text",d.helpText)("buttonLabel",e.lcZ(2,2,"General.Text.Contextual.Help"))}}function Dy(H,s){if(1&H&&(e.TgZ(0,"ion-list-header")(1,"ion-label",7),e._uU(2),e.ALo(3,"translate"),e.qZA(),e.YNc(4,id,3,4,"ng-container",5),e.qZA()),2&H){const d=e.oxw(2);e.xp6(1),e.Q6J("ngClass",d.labelClass),e.xp6(1),e.Oqu(e.lcZ(3,3,d.label)),e.xp6(2),e.Q6J("ngIf",d.helpText)}}xp.\u0275fac=function(s){return new(s||xp)},xp.\u0275mod=e.oAB({type:xp}),xp.\u0275inj=e.cJS({imports:[Ga]});const Jh=function(H){return{"radio-checked":H}};function Sb(H,s){if(1&H&&(e.TgZ(0,"ion-item")(1,"ion-label",9),e._uU(2),e.ALo(3,"translate"),e.qZA(),e._UZ(4,"ion-radio",10),e.ALo(5,"translate"),e.qZA()),2&H){const d=s.$implicit,k=e.oxw(2);e.xp6(2),e.Oqu(e.lcZ(3,7,d.text)),e.xp6(2),e.Q6J("disabled",d.disabled||k.disabled)("value",d.value)("ngClass",e.VKq(11,Jh,k.isChecked(d))),e.uIk("aria-label",e.lcZ(5,9,d.text))("data-cy","radio-list-option-"+d.value)("aria-checked",k.isChecked(d))}}const f0=function(H){return{horizontalMode:H}};function Ab(H,s){if(1&H){const d=e.EpF();e.TgZ(0,"ion-list")(1,"ion-radio-group",4),e.NdJ("ionChange",function(ie){e.CHM(d);const ot=e.oxw();return e.KtG(ot.onRadioOptionChange(ie))}),e.YNc(2,Dy,5,5,"ion-list-header",5),e.YNc(3,Sb,6,13,"ion-item",6),e.qZA()()}if(2&H){const d=e.oxw();e.uIk("data-cy","radio-list-"+d.componentName),e.xp6(1),e.Q6J("ngClass",e.VKq(6,f0,d.horizontalMode))("value",d.value),e.xp6(1),e.Q6J("ngIf",d.label),e.xp6(1),e.Q6J("ngForOf",d.options)("ngForTrackBy",d.trackByValue)}}class Dh extends Fp{set options(s){this.optionsItems=s||[],this.setViewModeValue()}get options(){return this.optionsItems}set value(s){this.valueItem=s,this.setViewModeValue()}get value(){return this.valueItem}constructor(s){super(),this.elementRef=s,this.viewMode=!1,this.disabled=!1,this.horizontalMode=!1}ngAfterViewInit(){const s=new CustomEvent("siviDidLoad",{bubbles:!0});this.elementRef.nativeElement.dispatchEvent(s)}onRadioOptionChange(s){const d={name:this.name,value:s.detail.value},k=new CustomEvent("siviChange",{detail:d,bubbles:!0});this.setViewModeValue(),this.elementRef.nativeElement.dispatchEvent(k)}trackByValue(s,d){return d.value}isChecked(s){return s.value===this.value}setViewModeValue(){if((0,Hn.Z)(this.options,"length",0)>0){const d=this.options.find(k=>k.value===this.value);(0,Hn.Z)(d,"text",null)&&(this.viewModeValue=d.text)}}}Dh.\u0275fac=function(s){return new(s||Dh)(e.Y36(e.SBq))},Dh.\u0275cmp=e.Xpm({type:Dh,selectors:[["sivi-lib-radio-list"]],inputs:{label:"label",name:"name",options:"options",value:"value",viewMode:"viewMode",disabled:"disabled",horizontalMode:"horizontalMode",helpText:"helpText",labelClass:"labelClass"},features:[e.qOj],decls:3,vars:2,consts:[["lines","none",4,"ngIf","ngIfElse"],["viewModeOff",""],["lines","none"],["type","text",3,"label","viewMode","value"],["role","radiogroup",3,"ngClass","value","ionChange"],[4,"ngIf"],[4,"ngFor","ngForOf","ngForTrackBy"],[1,"ion-text-wrap","weight-600",3,"ngClass"],[3,"text","buttonLabel"],[1,"ion-text-wrap"],["role","radio","slot","start",1,"ion-no-padding",3,"disabled","value","ngClass"]],template:function(s,d){if(1&s&&(e.YNc(0,kv,3,6,"ion-item",0),e.YNc(1,Ab,4,8,"ng-template",null,1,e.W1O)),2&s){const k=e.MAs(2);e.Q6J("ngIf",d.viewMode)("ngIfElse",k)}},styles:['[_nghost-%COMP%]{display:block}ion-list[_ngcontent-%COMP%]{contain:initial}ion-list-header[_ngcontent-%COMP%], ion-label[_ngcontent-%COMP%], ion-item[_ngcontent-%COMP%]{--inner-padding-start: 0;--padding-start: 0}ion-list-header[_ngcontent-%COMP%]{font-size:1em;overflow:visible;padding-left:0;position:relative;z-index:3}ion-radio[_ngcontent-%COMP%]{margin-right:16px}.horizontalMode[_ngcontent-%COMP%]{display:inline-flex}sivi-lib-info-popup[_ngcontent-%COMP%]{font-size:26px;margin-left:.3em}ion-list[_ngcontent-%COMP%]{background-color:transparent}.force-required-asterisk[_ngcontent-%COMP%]:after{margin-left:.3rem;content:"*";color:var(--ion-color-warning)}.weight-normal[_ngcontent-%COMP%]{font-weight:400}'],changeDetection:0});class qf extends Js{get text(){return this._text}set text(s){this.replaceTextWithContextualInstruction(s)}constructor(s,d){super(),this.translate=s,this.contextualInstructions=d,this._text=""}replaceTextWithContextualInstruction(s){const d=this.translate.currentLang||"en";console.log("replaceTextWithContextualInstruction",{key:s,currentLang:this.translate.currentLang}),this.contextualInstructions.getInstruction(s,d).pipe((0,j.R)(this.destroy$)).subscribe(k=>{console.log("replaceTextWithContextualInstruction",k),this._text=k||s},k=>{console.error("getInstruction failed",k),this._text=s})}}qf.\u0275fac=function(s){return new(s||qf)(e.Y36(we.sK),e.Y36(wc))},qf.\u0275cmp=e.Xpm({type:qf,selectors:[["sivi-lib-info-popup"]],inputs:{text:"text"},features:[e.qOj],decls:4,vars:9,consts:[[3,"text","buttonLabel"]],template:function(s,d){1&s&&(e._UZ(0,"cgi-info-popup",0),e.ALo(1,"translate"),e.ALo(2,"translate"),e.ALo(3,"translate")),2&s&&(e.Q6J("text",e.lcZ(1,3,d.text))("buttonLabel",e.lcZ(2,5,"General.Text.Contextual.Help")),e.uIk("aria-label",e.lcZ(3,7,d.text)))},dependencies:[we.X$]});class wd{}wd.\u0275fac=function(s){return new(s||wd)},wd.\u0275mod=e.oAB({type:wd}),wd.\u0275inj=e.cJS({imports:[Ga]});class Qh{}function bC(H,s){1&H&&(e.TgZ(0,"span",8),e._uU(1,"*"),e.qZA())}function Bp(H,s){1&H&&e._UZ(0,"ion-label")}function tm(H,s){if(1&H&&(e.ynx(0),e._UZ(1,"sivi-lib-info-popup",9),e.ALo(2,"translate"),e.BQk()),2&H){const d=e.oxw(3);e.xp6(1),e.Q6J("text",d.helpText)("buttonLabel",e.lcZ(2,2,"General.Text.Contextual.Help"))}}function Hd(H,s){if(1&H&&(e.TgZ(0,"ion-row",4)(1,"ion-col")(2,"h5",5),e._uU(3),e.YNc(4,bC,2,0,"span",6),e.YNc(5,Bp,1,0,"ng-template",null,7,e.W1O),e.YNc(7,tm,3,4,"ng-container",0),e.qZA()()()),2&H){const d=e.MAs(6),k=e.oxw(2);e.xp6(3),e.hij(" ",k.label," "),e.xp6(1),e.Q6J("ngIf",k.required)("ngIfElse",d),e.xp6(3),e.Q6J("ngIf",k.helpText)}}function nm(H,s){if(1&H){const d=e.EpF();e.TgZ(0,"ion-col",12)(1,"ion-item",13)(2,"ion-checkbox",14),e.NdJ("ionChange",function(ie){e.CHM(d);const ot=e.oxw(3);return e.KtG(ot.onOptionChange(ie))}),e.ALo(3,"translate"),e.qZA(),e.TgZ(4,"ion-label",15),e._uU(5),e.ALo(6,"translate"),e.qZA()()()}if(2&H){const d=s.$implicit,k=s.index,ie=e.oxw(3);e.xp6(2),e.Q6J("disabled",ie.disabled||d.disabled)("value",d.value)("checked",ie.getCheckedStatus(d.value)||d.selected),e.uIk("aria-label",e.lcZ(3,7,d.text))("data-cy","checkbox-list-option-"+d.value)("data-cy-index","checkbox-list-option-"+ie.name+"-index-"+k),e.xp6(3),e.hij(" ",e.lcZ(6,9,d.text)," ")}}function Up(H,s){if(1&H&&(e.TgZ(0,"ion-row",10),e.YNc(1,nm,7,11,"ion-col",11),e.qZA()),2&H){const d=e.oxw(2);e.uIk("data-cy","checkbox-list-"+d.name)("aria-label",d.label),e.xp6(1),e.Q6J("ngForOf",d.options)("ngForTrackBy",d.trackByFn)}}function Hu(H,s){if(1&H){const d=e.EpF();e.TgZ(0,"ion-item",13)(1,"ion-checkbox",14),e.NdJ("ionChange",function(ie){e.CHM(d);const ot=e.oxw(3);return e.KtG(ot.onOptionChange(ie))}),e.ALo(2,"translate"),e.qZA(),e.TgZ(3,"ion-label",18),e._uU(4),e.ALo(5,"translate"),e.qZA()()}if(2&H){const d=s.$implicit,k=s.index,ie=e.oxw(3);e.xp6(1),e.Q6J("disabled",ie.disabled||d.disabled)("value",d.value)("checked",ie.getCheckedStatus(d.value)||d.selected),e.uIk("aria-label",e.lcZ(2,7,d.text))("data-cy","checkbox-list-option-"+d.value)("data-cy-index","checkbox-list-option-"+ie.name+"-index-"+k),e.xp6(3),e.hij(" ",e.lcZ(5,9,d.text)," ")}}function sv(H,s){if(1&H&&(e.TgZ(0,"ion-row")(1,"ion-col",16),e.YNc(2,Hu,6,11,"ion-item",17),e.qZA()()),2&H){const d=e.oxw(2);e.xp6(1),e.uIk("data-cy","checkbox-list-"+d.name)("aria-label",d.label),e.xp6(1),e.Q6J("ngForOf",d.options)("ngForTrackBy",d.trackByFn)}}function Rv(H,s){if(1&H&&(e.ynx(0),e.TgZ(1,"ion-grid",1),e.YNc(2,Hd,8,4,"ion-row",2),e.YNc(3,Up,2,4,"ion-row",3),e.YNc(4,sv,3,4,"ion-row",0),e.qZA(),e.BQk()),2&H){const d=e.oxw();e.xp6(2),e.Q6J("ngIf",d.label),e.xp6(1),e.Q6J("ngIf",!d.verticalMode),e.xp6(1),e.Q6J("ngIf",d.verticalMode)}}function ml(H,s){if(1&H&&(e.ynx(0),e._UZ(1,"cgi-input",19),e.BQk()),2&H){const d=e.oxw();e.xp6(1),e.Q6J("viewMode",d.viewMode)("label",d.label)("value",d.selectedValuesText),e.uIk("data-cy","checkbox-list-view-"+d.name)}}Qh.\u0275fac=function(s){return new(s||Qh)},Qh.\u0275mod=e.oAB({type:Qh}),Qh.\u0275inj=e.cJS({imports:[Ga,wd]}),e.B6R(Dh,[Et.mk,Et.sg,Et.O5,Nt.Ie,Nt.Q$,Nt.q_,Nt.yh,Nt.B7,Nt.se,Nt.U5,Nt.QI,qf],[we.X$]);class pf extends Fp{set value(s){this.selectedValues=[...(0,Ci.isArray)(s)?s:[s]]}constructor(s){super(),this.elementRef=s,this.viewMode=!1,this.required=!1,this.verticalMode=!1,this.selectedValuesText="",this.siviChange=new e.vpe,this.selectedValues=[]}getCheckedStatus(s){return!!this.selectedValues&&this.selectedValues.findIndex(k=>(0,Ne.Z)(s,k))>-1}onOptionChange(s){const d=(0,tt.Z)(this.selectedValues);if(void 0===s.detail.checked)return;const k=s.detail.value,ie=this.selectedValues.includes(k);if(s.detail.checked&&ie||(s.detail.checked&&!ie?this.selectedValues=[...this.selectedValues,k]:this.selectedValues=this.selectedValues.filter(tl=>!(0,Ne.Z)(tl,k)),(0,Ne.Z)(d,this.selectedValues)))return;const ot={name:this.name,value:this.selectedValues},Cn=new CustomEvent("selectChange",{detail:ot,bubbles:!0}),ir=new Event("blur",{bubbles:!0}),Yo=new CustomEvent("siviChange",{detail:ot,bubbles:!0});this.elementRef.nativeElement.dispatchEvent(Cn),this.elementRef.nativeElement.dispatchEvent(ir),this.siviChange.emit(Yo)}}pf.\u0275fac=function(s){return new(s||pf)(e.Y36(e.SBq))},pf.\u0275cmp=e.Xpm({type:pf,selectors:[["sivi-lib-checkbox-list"]],inputs:{label:"label",name:"name",disabled:"disabled",viewMode:"viewMode",required:"required",options:"options",value:"value",verticalMode:"verticalMode",helpText:"helpText",selectedValuesText:"selectedValuesText"},outputs:{siviChange:"siviChange"},features:[e.qOj],decls:2,vars:2,consts:[[4,"ngIf"],[1,"ion-no-padding"],["class","ion-margin-top",4,"ngIf"],["role","group","aria-labelledby","checkboxlabel","tabindex","0",4,"ngIf"],[1,"ion-margin-top"],["id","checkboxlabel",1,"mb0"],["class","form-error",4,"ngIf","ngIfElse"],["validatorLabel",""],[1,"form-error"],[3,"text","buttonLabel"],["role","group","aria-labelledby","checkboxlabel","tabindex","0"],["size-sm","12","size-md","5","size-lg","3",4,"ngFor","ngForOf","ngForTrackBy"],["size-sm","12","size-md","5","size-lg","3"],["lines","none",1,"checkbox"],["role","checkbox",3,"disabled","value","checked","ionChange"],["color","primary",1,"ion-margin-start","ion-text-wrap"],["aria-labelledby","checkboxlabel","role","group","tabindex","0"],["class","checkbox","lines","none",4,"ngFor","ngForOf","ngForTrackBy"],[1,"ion-margin-start","ion-text-wrap"],["type","text","label-position","floating",3,"viewMode","label","value"]],template:function(s,d){1&s&&(e.YNc(0,Rv,5,3,"ng-container",0),e.YNc(1,ml,2,4,"ng-container",0)),2&s&&(e.Q6J("ngIf",!d.viewMode),e.xp6(1),e.Q6J("ngIf",d.viewMode))},styles:[".checkbox[_ngcontent-%COMP%]{--padding-start: 0}sivi-lib-info-popup[_ngcontent-%COMP%]{font-size:26px}"],changeDetection:0});class mm{}function Sy(H,s){if(1&H&&(e.TgZ(0,"ion-select-option",5),e._uU(1),e.ALo(2,"translate"),e.qZA()),2&H){const d=s.$implicit,k=s.index,ie=e.oxw(2);e.Q6J("value",d.value),e.uIk("data-cy","select-"+ie.componentName+"-option-"+k),e.xp6(1),e.hij("",e.lcZ(2,3,d.text)," ")}}function te(H,s){if(1&H){const d=e.EpF();e.ynx(0),e.TgZ(1,"ion-item",1)(2,"ion-label",2),e._uU(3),e.ALo(4,"translate"),e.qZA(),e.TgZ(5,"ion-select",3),e.NdJ("ionChange",function(ie){e.CHM(d);const ot=e.oxw();return e.KtG(ot.onSelectionChange(ie))})("ionCancel",function(){e.CHM(d);const ie=e.oxw();return e.KtG(ie.blurElement())}),e.ALo(6,"translate"),e.ALo(7,"translate"),e.ALo(8,"translate"),e.YNc(9,Sy,3,5,"ion-select-option",4),e.qZA()(),e.BQk()}if(2&H){const d=e.oxw();e.xp6(3),e.Oqu(e.lcZ(4,11,d.label)),e.xp6(2),e.s9C("placeholder",e.lcZ(6,13,d.placeholder)),e.s9C("okText",e.lcZ(7,15,"General.Buttons.Ok")),e.s9C("cancelText",e.lcZ(8,17,"General.Buttons.Cancel")),e.Q6J("multiple",d.multiple)("disabled",d.disabled||!d.options.length)("selectedText",d.selectedText)("value",d.value),e.uIk("data-cy","select-"+d.componentName),e.xp6(4),e.Q6J("ngForOf",d.options)("ngForTrackBy",d.trackByOptions)}}function M(H,s){if(1&H&&(e.ynx(0),e._UZ(1,"cgi-input",6),e.ALo(2,"translate"),e.BQk()),2&H){const d=e.oxw();e.xp6(1),e.Q6J("label",e.lcZ(2,5,d.label))("viewMode",!0)("viewModePlainText",d.viewModePlainText)("value",d.getViewModeText(d.value)),e.uIk("data-cy","select-view-"+d.componentName)}}mm.\u0275fac=function(s){return new(s||mm)},mm.\u0275mod=e.oAB({type:mm}),mm.\u0275inj=e.cJS({imports:[Ga,wd]}),e.B6R(pf,[Et.sg,Et.O5,Nt.nz,Nt.wI,Nt.jY,Nt.Ie,Nt.Q$,Nt.Nd,Nt.w,qf],[we.X$]);class C extends Fp{constructor(s,d){super(),this.elRef=s,this.platform=d,this.options=[],this.disabled=!1,this.viewMode=!1,this.multiple=!1,this.viewModePlainText=!1,this.inputCss="",this.siviChange=new e.vpe}ngAfterViewInit(){const s=new CustomEvent("siviDidLoad",{bubbles:!0});if(this.elRef.nativeElement.dispatchEvent(s),this.platform.is("iphone")||this.platform.is("ipad")){const d=document.createElement("style");d.innerHTML="@supports (-webkit-touch-callout: none) {\n          sivi-lib-select :focus, sivi-lib-select .ion-focused {\n            outline: none!important;\n          }\n        }",this.elRef.nativeElement.append(d)}}onSelectionChange(s){this.value=s.detail.value,this.siviChange.emit({[this.name]:this.value});const d={name:this.name,value:this.value},k=new CustomEvent("selectChange",{detail:d,bubbles:!0});this.elRef.nativeElement.dispatchEvent(k),this.blurElement()}blurElement(){const s=new Event("blur",{bubbles:!0});this.elRef.nativeElement.dispatchEvent(s)}getViewModeText(s){return this.selectedText?this.selectedText:this.options.length?s instanceof Array?this.getTextFromArrayValues(s):this.getTextFromStringValue(s):"-"}getTextFromArrayValues(s){const d=[];return s.forEach(k=>{const ie=this.options.find(ot=>ot.value===k);ie&&d.push(ie.text)}),d.length?d.join(", "):"-"}getTextFromStringValue(s){const d=this.options.find(k=>k.value===s);return d?d.text:"-"}trackByOptions(s,d){return d.value}}C.\u0275fac=function(s){return new(s||C)(e.Y36(e.SBq),e.Y36(Nt.t4))},C.\u0275cmp=e.Xpm({type:C,selectors:[["sivi-lib-select"]],inputs:{name:"name",formControlName:"formControlName",label:"label",options:"options",disabled:"disabled",viewMode:"viewMode",multiple:"multiple",viewModePlainText:"viewModePlainText",placeholder:"placeholder",inputCss:"inputCss",value:"value",selectedText:"selectedText"},outputs:{siviChange:"siviChange"},features:[e.qOj],decls:2,vars:2,consts:[[4,"ngIf"],[1,"item-padding","z-0"],["position","stacked",1,"ion-text-wrap"],[3,"multiple","disabled","selectedText","value","placeholder","okText","cancelText","ionChange","ionCancel"],[3,"value",4,"ngFor","ngForOf","ngForTrackBy"],[3,"value"],["labelPosition","stacked",3,"label","viewMode","viewModePlainText","value"]],template:function(s,d){1&s&&(e.YNc(0,te,10,19,"ng-container",0),e.YNc(1,M,3,7,"ng-container",0)),2&s&&(e.Q6J("ngIf",!d.viewMode&&d.options),e.xp6(1),e.Q6J("ngIf",d.viewMode&&d.options&&d.options.length))},dependencies:[Et.sg,Et.O5,Nt.Ie,Nt.Q$,Nt.t9,Nt.n0,Nt.QI,we.X$],styles:["[_nghost-%COMP%]{display:block}[_nghost-%COMP%]:focus-within{outline:2px dashed var(--ion-color-primary);outline-offset:2px}ion-select[_ngcontent-%COMP%]{outline:none}.item-has-focus[_ngcontent-%COMP%]   .label-floating[_ngcontent-%COMP%], .item-has-value[_ngcontent-%COMP%]   .label-floating[_ngcontent-%COMP%], .label-stacked[_ngcontent-%COMP%]{max-width:133%;width:133%;padding-left:5px}@media screen and (max-width: 840px){.item-has-focus[_ngcontent-%COMP%]   .label-floating[_ngcontent-%COMP%], .item-has-value[_ngcontent-%COMP%]   .label-floating[_ngcontent-%COMP%], .label-stacked[_ngcontent-%COMP%]{padding-bottom:9px}}.z-0[_ngcontent-%COMP%]{z-index:0}.item-padding[_ngcontent-%COMP%]{--padding-start: 0px}ion-item[_ngcontent-%COMP%]{font-size:inherit}ion-select[_ngcontent-%COMP%]{padding-left:3px!important}ion-label[_ngcontent-%COMP%]{padding-bottom:9px}"]});class Q{}function Ye(H,s){if(1&H&&(e.TgZ(0,"ion-row")(1,"ion-label",2),e._uU(2),e.qZA()()),2&H){const d=e.oxw();e.xp6(1),e.Q6J("ngClass",d.titleCssClass),e.xp6(1),e.hij(" ",d.title,"")}}function Zt(H,s){if(1&H&&(e.TgZ(0,"ion-row")(1,"ion-label",2),e._uU(2),e.qZA()()),2&H){const d=e.oxw();e.xp6(1),e.Q6J("ngClass",d.subTitleCssClass),e.xp6(1),e.hij(" ",d.subTitle,"")}}function Pi(H,s){if(1&H&&(e.TgZ(0,"ion-row"),e._UZ(1,"sivi-lib-radio-list",3),e.qZA()),2&H){const d=e.oxw();e.xp6(1),e.Q6J("showRequiredIndicator",!1)("options",d.options)("label",d.additionalText)("labelClass",d.labelClass)("disabled",d.readonly)}}Q.\u0275fac=function(s){return new(s||Q)},Q.\u0275mod=e.oAB({type:Q}),Q.\u0275inj=e.cJS({imports:[Ga]});const Ir=function(H){return{marginTop:H}};function xo(H,s){if(1&H&&(e.TgZ(0,"ion-col",7),e._UZ(1,"img",8),e.ALo(2,"translate"),e.ALo(3,"translate"),e.qZA()),2&H){const d=e.oxw(2);e.xp6(1),e.Akn(e.VKq(9,Ir,d.readonly?"20px":"30px")),e.MGl("src","/assets/icon/",d.svgImage,"",e.LSH),e.Q6J("alt",e.lcZ(2,5,"legendText")),e.uIk("aria-label",e.lcZ(3,7,"legendText"))}}function Qa(H,s){if(1&H&&(e.TgZ(0,"ion-row")(1,"ion-col",9),e._UZ(2,"sivi-lib-legend",10),e.qZA()()),2&H){const d=e.oxw(2);e.xp6(2),e.Q6J("svgImage",d.svgImage)("text",d.legendText)}}function ec(H,s){if(1&H&&(e.TgZ(0,"section")(1,"ion-row")(2,"ion-col",4),e._UZ(3,"cgi-input",5),e.qZA(),e.YNc(4,xo,4,11,"ion-col",6),e.qZA(),e.YNc(5,Qa,3,2,"ion-row",1),e.qZA()),2&H){const d=e.oxw();e.xp6(2),e.Q6J("size",d.svgImage?10:12),e.xp6(1),e.Q6J("disabled",!d.isInputVisible)("viewMode",d.readonly)("label",d.readonly?"":d.textFieldLabel),e.xp6(1),e.Q6J("ngIf",d.svgImage),e.xp6(1),e.Q6J("ngIf",d.svgImage)}}class Sh extends df{set inputValue(s){s&&!(0,Ne.Z)(s,this.inputValue)&&this.formGroup.patchValue(s)}get inputValue(){return this._inputValue}get isInputVisible(){return this.formGroup.get("value").value===this.textFieldEnabler}constructor(s,d){super(s),this.translate=s,this.fb=d,this.required=!1,this.readonly=!1,this.showInput=!0,this.svgImage="",this.legendText="",this.update=new e.vpe,this.validityChange=new e.vpe,this.formGroup=this.fb.group({id:[null],infoType:[null],info:[null],value:[null]}),this._inputValue={}}ngOnInit(){this.inputValue||(this.inputValue=this.getFormFields()),this.setValidators(),this.clearInfoFieldIfValueIsNotInfoEnabler(),this.setValidatorsOnValueChange()}checkFormValidity(){return this.isValid}clearInfoFieldIfValueIsNotInfoEnabler(){const s=this.formGroup.get("value"),d=this.formGroup.get("info");s.valueChanges.pipe((0,j.R)(this.destroy$)).subscribe(ie=>ie!==this.textFieldEnabler&&d.patchValue(void 0))}setValidatorsOnValueChange(){this.formGroup.get("value").valueChanges.pipe((0,j.R)(this.destroy$),(0,be.x)()).subscribe(()=>this.setValidators())}onFormStatusChange(s){super.onFormStatusChange(s),this.validityChange.emit(s)}onFormValueChange(s){s&&!(0,Ne.Z)(s,this._inputValue)&&(this._inputValue={...this._inputValue,...s},this.update.emit(this.inputValue))}setValidators(){const s=this.isInputVisible?[sc.required,sc.maxLength(mu.INFORMATION)]:[],d=this.required?[sc.required]:[];this.formGroup.get("info").setValidators(s),this.formGroup.get("value").setValidators(d)}getFormFields(){return{id:null,infoType:this.type,value:"",info:""}}}function qg(H,s){if(1&H&&(e._UZ(0,"cgi-icon",4),e.ALo(1,"translate")),2&H){const d=e.oxw();e.Q6J("size",d.size+"px")("name",d.icon),e.uIk("aria-label",e.lcZ(1,3,d.ariaLabel))}}function ao(H,s){if(1&H&&(e._UZ(0,"img",5),e.ALo(1,"translate"),e.ALo(2,"translate")),2&H){const d=e.oxw();e.MGl("src","/assets/icon/",d.svgImage,"",e.LSH),e.Q6J("width",d.size)("height",d.size)("alt",e.lcZ(1,5,d.ariaLabel)),e.uIk("aria-label",e.lcZ(2,7,d.ariaLabel))}}function Ay(H,s){if(1&H&&(e.TgZ(0,"span",6),e._uU(1),e.ALo(2,"translate"),e.qZA()),2&H){const d=e.oxw();e.xp6(1),e.Oqu(e.lcZ(2,1,d.text))}}Sh.\u0275fac=function(s){return new(s||Sh)(e.Y36(we.sK),e.Y36(Ve.QS))},Sh.\u0275cmp=e.Xpm({type:Sh,selectors:[["sivi-lib-radio-list-with-input"]],inputs:{inputValue:"inputValue",title:"title",type:"type",subTitle:"subTitle",additionalText:"additionalText",textFieldLabel:"textFieldLabel",textFieldEnabler:"textFieldEnabler",options:"options",required:"required",readonly:"readonly",showInput:"showInput",titleCssClass:"titleCssClass",subTitleCssClass:"subTitleCssClass",svgImage:"svgImage",legendText:"legendText",labelClass:"labelClass"},outputs:{update:"update",validityChange:"validityChange"},features:[e.qOj],decls:5,vars:5,consts:[["siviLibForm","",1,"ion-no-padding",3,"formGroup"],[4,"ngIf"],[3,"ngClass"],["siviLibFormControl","","formControlName","value",3,"showRequiredIndicator","options","label","labelClass","disabled"],[1,"ion-no-padding","input-field",3,"size"],["siviLibFormControl","","formControlName","info","label-position","floating",3,"disabled","viewMode","label"],["size","1",4,"ngIf"],["size","1"],[3,"alt","src"],["size","12",1,"ion-no-padding","input-legend"],[3,"svgImage","text"]],template:function(s,d){1&s&&(e.TgZ(0,"ion-grid",0),e.YNc(1,Ye,3,2,"ion-row",1),e.YNc(2,Zt,3,2,"ion-row",1),e.YNc(3,Pi,2,5,"ion-row",1),e.YNc(4,ec,6,6,"section",1),e.qZA()),2&s&&(e.Q6J("formGroup",d.formGroup),e.xp6(1),e.Q6J("ngIf",d.title),e.xp6(1),e.Q6J("ngIf",d.subTitle),e.xp6(1),e.Q6J("ngIf",d.options.length>0),e.xp6(1),e.Q6J("ngIf",d.showInput))},styles:['.input-field[_ngcontent-%COMP%]{margin-left:42px;margin-top:-20px;padding-right:47px}sivi-lib-radio-list[_ngcontent-%COMP%]{margin-left:-2px}ion-grid[_ngcontent-%COMP%]{border-bottom:none}.force-required-asterisk[_ngcontent-%COMP%]:after{margin-left:.3rem;content:"*";color:var(--ion-color-warning)}.input-legend[_ngcontent-%COMP%]{margin:20px 0 8px 42px}']});class Wc extends Js{constructor(){super(...arguments),this.size=20}}Wc.\u0275fac=function(){let H;return function(d){return(H||(H=e.n5z(Wc)))(d||Wc)}}(),Wc.\u0275cmp=e.Xpm({type:Wc,selectors:[["sivi-lib-legend"]],inputs:{text:"text",icon:"icon",svgImage:"svgImage",ariaLabel:"ariaLabel"},features:[e.qOj],decls:4,vars:3,consts:[[1,"icon-wrapper"],["slot","icon-only","class","action-icon",3,"size","name",4,"ngIf"],["slot","icon-only","class","action-icon",3,"width","height","alt","src",4,"ngIf"],["class","text-wrapper",4,"ngIf"],["slot","icon-only",1,"action-icon",3,"size","name"],["slot","icon-only",1,"action-icon",3,"width","height","alt","src"],[1,"text-wrapper"]],template:function(s,d){1&s&&(e.TgZ(0,"div",0),e.YNc(1,qg,2,5,"cgi-icon",1),e.YNc(2,ao,3,9,"img",2),e.qZA(),e.YNc(3,Ay,3,3,"span",3)),2&s&&(e.xp6(1),e.Q6J("ngIf",d.icon),e.xp6(1),e.Q6J("ngIf",d.svgImage),e.xp6(1),e.Q6J("ngIf",d.text))},dependencies:[Et.O5,we.X$],styles:["[_nghost-%COMP%]{display:flex;align-items:center}.icon-wrapper[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;margin-right:8px}.text-wrapper[_ngcontent-%COMP%]{font-size:14px}"],changeDetection:0});class Dp{}Dp.\u0275fac=function(s){return new(s||Dp)},Dp.\u0275mod=e.oAB({type:Dp}),Dp.\u0275inj=e.cJS({imports:[Ga]});class Ah{}Ah.\u0275fac=function(s){return new(s||Ah)},Ah.\u0275mod=e.oAB({type:Ah}),Ah.\u0275inj=e.cJS({imports:[Ga,Qh,Tp,Dp]}),e.B6R(Sh,[Et.mk,Et.O5,Nt.wI,Nt.jY,Nt.Q$,Nt.Nd,Dh,qd,Gm,Ve.JJ,Ve.JL,Ve.sg,Ve.u,Wc],[we.X$]);const CC=["fileInput"];class Id{constructor(s,d,k){this.fileService=s,this.translate=d,this.notify=k,this.files=[],this.files$=new g.X([]),this.inputConfiguration={multiple:!0,fileExtensions:this.fileService.getAllowedFileTypes(),maxSize:Ro.MAX_FILE_SIZE_IN_BYTES},this.imageInputConfiguration={multiple:!0,fileExtensions:this.fileService.getAllowedImageFileTypes(),maxSize:Ro.MAX_FILE_SIZE_IN_BYTES}}onSelectFile(){this.fileInput.nativeElement.click()}onTakePictureWithCamera(){this.fileService.getPictureFromMobileCamera().then(s=>{console.log("getPictureFromMobileCamera success",s)},s=>{console.error("getPictureFromMobileCamera failed",s)})}addFiles(s){this.files=[];const d=this.filterInvalidFiles(s.target.files,this.inputConfiguration);this.fileService.getFilesUsingBrowserAPI(d,this.inputConfiguration).then(k=>{console.log("getFilesUsingBrowserAPI success",k),this.files=[...this.files,...k],this.files$.next(k),console.log("addFiles",this.files),s.target.value=""},k=>{console.error("getFilesUsingBrowserAPI failed",k)})}addImages(s){this.files=[];const d=this.filterInvalidFiles(s.target.files,this.imageInputConfiguration);this.fileService.getFilesUsingBrowserAPI(d,this.imageInputConfiguration).then(k=>{console.log("getFilesUsingBrowserAPI success",k),this.files=[...this.files,...k],this.files$.next(k),console.log("addImages",this.files),s.target.value=""},k=>{console.error("getFilesUsingBrowserAPI failed",k)})}filterInvalidFiles(s,d){const k={size:!0,type:!0},ie=Array.from(s).filter(ot=>{const Cn=this.isFileValid(ot,d);return Cn.size||(k.size=!1),Cn.type||(k.type=!1),Cn.size&&Cn.type});return this.displayError(k,d),[...ie]}isFileValid(s,d){if(!d||!d.maxSize||!d.fileExtensions)return void console.warn("Config not valid!",d);const k="."+s.name.split(".").slice(-1)[0],ie={size:!1,type:!1};return ie.size=s.size<d.maxSize,ie.type=k&&d.fileExtensions.includes(k.toLowerCase()),ie}isFileTypeValid(s){const d="."+s.name.split(".").slice(-1)[0];return this.fileService.getAllowedFileTypes().includes(d.toLowerCase())}displayError(s,d){if(s.size){if(!s.type){const k=d.fileExtensions.join(", "),ie=this.translate.instant("Message.Error.FileTypeNotSupported",{allowedFileTypes:k});this.notify.alert("Message.Save.Error",ie)}}else{const k=Ro.MAX_FILE_SIZE_IN_MEGABYTES+" MB",ie=this.translate.instant("Message.Error.FileSizeExceededTheLimit",{maxFileSize:k});this.notify.alert("Message.Save.Error",ie)}}}function Xf(H,s){if(1&H){const d=e.EpF();e.TgZ(0,"input",6,7),e.NdJ("change",function(ie){e.CHM(d);const ot=e.oxw();return e.KtG(ot.onAdd(ie))}),e.qZA()}2&H&&e.Q6J("hidden",!0)}function EC(H,s){if(1&H){const d=e.EpF();e.TgZ(0,"button",8),e.NdJ("click",function(){e.CHM(d);const ie=e.oxw();return e.KtG(ie.onRemoveElement())}),e._UZ(1,"cgi-icon",9),e.qZA()}if(2&H){const d=e.oxw();e.uIk("aria-label",d.removeImageLabel)}}var $m;Id.\u0275fac=function(s){return new(s||Id)(e.Y36(_p),e.Y36(we.sK),e.Y36(md))},Id.\u0275dir=e.lG2({type:Id,viewQuery:function(s,d){if(1&s&&e.Gf(CC,5),2&s){let k;e.iGM(k=e.CRH())&&(d.fileInput=k.first)}}}),function(H){H.SMALL="small",H.BIG="big"}($m||($m={}));class Xd extends Id{set profileImage(s){this.image!==s&&(this.image=s)}constructor(s,d,k,ie,ot){super(s,ot,ie),this.fileService=s,this.platformHelper=d,this.actionSheetCtrl=k,this.notify=ie,this.translateService=ot,this.title="",this.text="",this.loading=!1,this.viewMode=!1,this.clickable=!1,this.placeholder="",this.shaped=!0,this.size=$m.BIG,this.removeImage=new e.vpe,this.changeImage=new e.vpe,this.listenForFileChange()}onAdd(s){this.loading||this.addImages(s)}getImage(){return this.image?this.image.contentBase64:""}listenForFileChange(){this.files$.subscribe(s=>{s&&s.length>0&&(this.changeImage.emit(s[0]),this.image=s[0])})}getAttachedFile(){return this.image?this.image:null}onSelectImage(){this.loading||this.viewMode?console.warn("User does not have permission to change profile picture."):this.onSelectFile()}onRemoveElement(){var s=this;return(0,o.Z)(function*(){s.loading||(yield s.notify.deleteConfirmPopup()).onDidDismiss().then(k=>{k.data&&s.removeElement()})})()}removeElement(){this.removeImage.emit()}}Xd.\u0275fac=function(s){return new(s||Xd)(e.Y36(_p),e.Y36(Qd),e.Y36(Nt.BX),e.Y36(md),e.Y36(we.sK))},Xd.\u0275cmp=e.Xpm({type:Xd,selectors:[["sivi-lib-profile-image-picker"]],inputs:{profileImage:"profileImage",title:"title",text:"text",uploadImageLabel:"uploadImageLabel",removeImageLabel:"removeImageLabel",loading:"loading",viewMode:"viewMode",clickable:"clickable",placeholder:"placeholder",shaped:"shaped",size:"size"},outputs:{removeImage:"removeImage",changeImage:"changeImage"},features:[e._Bn([_p,Qd]),e.qOj],decls:8,vars:15,consts:[[3,"ngClass"],["type","file","accept","image/*;capture=camera",3,"hidden","change",4,"ngIf"],[1,"profile-image",3,"ngClass"],["class","cancel-button",3,"click",4,"ngIf"],["color","primary"],["siviKeyboardEvents","","id","image-picker",3,"role","name","text","imgUrl","imageType","disabled","placeholder","shaped","siviClick"],["type","file","accept","image/*;capture=camera",3,"hidden","change"],["fileInput",""],[1,"cancel-button",3,"click"],["name","cancel"]],template:function(s,d){1&s&&(e.TgZ(0,"div",0),e.YNc(1,Xf,2,1,"input",1),e.TgZ(2,"section",2),e.YNc(3,EC,2,1,"button",3),e.TgZ(4,"div",0)(5,"div"),e._UZ(6,"ion-spinner",4),e.qZA(),e.TgZ(7,"cgi-profile-image",5),e.NdJ("siviClick",function(){return d.onSelectImage()}),e.qZA()()()()),2&s&&(e.Q6J("ngClass","small"===d.size?"profile-image-container-small":"profile-image-container-big"),e.xp6(1),e.Q6J("ngIf",!d.viewMode),e.xp6(1),e.Q6J("ngClass","small"===d.size?"profile-image-small":"profile-image-big"),e.xp6(1),e.Q6J("ngIf",d.getAttachedFile()&&!d.viewMode),e.xp6(1),e.Q6J("ngClass",d.loading?"loader":""),e.xp6(3),e.Q6J("role",d.viewMode&&!d.clickable?"img":"button")("name",d.title)("text",d.text)("imgUrl",d.getImage())("imageType","add")("disabled",d.viewMode&&!d.clickable)("placeholder",d.placeholder)("shaped",d.shaped),e.uIk("aria-label",d.uploadImageLabel)("tabindex",d.viewMode?"-1":"0"))},dependencies:[Et.mk,Et.O5,Nt.PQ,Kp],styles:["cgi-profile-image[_ngcontent-%COMP%]{margin:8px}.profile-image[_ngcontent-%COMP%]{position:relative}.profile-image-small[_ngcontent-%COMP%]{min-height:100px}.profile-image-big[_ngcontent-%COMP%]{min-height:250px}.cancel-button[_ngcontent-%COMP%]{position:absolute;right:4px;top:8px;cursor:pointer;background:transparent}.profile-image-container-small[_ngcontent-%COMP%]{min-width:100px;width:100px}.profile-image-container-big[_ngcontent-%COMP%]{min-width:250px;width:250px}@media screen and (min-width: 840px){.profile-image-container-big[_ngcontent-%COMP%]{min-width:300px;width:300px}}ion-spinner[_ngcontent-%COMP%]{display:none}.loader[_ngcontent-%COMP%]   div[_ngcontent-%COMP%]{height:100%;width:100%}.loader[_ngcontent-%COMP%]   ion-spinner[_ngcontent-%COMP%]{display:inline-block;position:absolute;font-weight:600;top:50%;left:50%;z-index:2;transform:translate(-50%) translateY(-50%)}"]});class js{}function wy(H,s){if(1&H&&(e.TgZ(0,"ion-row",3)(1,"ion-col",4)(2,"ion-item",5),e._uU(3),e.ALo(4,"translate"),e.qZA()()()),2&H){const d=s.$implicit,k=e.oxw(2);e.xp6(3),e.AsE(" ",e.lcZ(4,2,k.label)," ",k.getDateRangeText(d.value)," ")}}function Vu(H,s){if(1&H&&(e.ynx(0),e.YNc(1,wy,5,4,"ion-row",2),e.BQk()),2&H){const d=e.oxw();e.xp6(1),e.Q6J("ngForOf",d.periodsFormArray.controls)("ngForTrackBy",d.trackByFnIndex)}}function dc(H,s){if(1&H&&(e.TgZ(0,"ion-row",12)(1,"ion-col",13),e._uU(2),e.ALo(3,"translate"),e.qZA()()),2&H){const d=e.oxw(2);e.xp6(2),e.hij(" ",e.lcZ(3,1,d.error)," ")}}function MC(H,s){if(1&H){const d=e.EpF();e.TgZ(0,"ion-button",19),e.NdJ("click",function(){e.CHM(d);const ie=e.oxw(4);return e.KtG(ie.onAddClick())}),e._UZ(1,"cgi-icon",22),e.qZA()}}function fm(H,s){if(1&H){const d=e.EpF();e.TgZ(0,"div")(1,"ion-row",15)(2,"ion-col",16)(3,"sivi-lib-datepicker",17),e.NdJ("update",function(){const ot=e.CHM(d).index,Cn=e.oxw(3);return e.KtG(Cn.markDatepickerAsTouched(ot,"validUntil"))}),e.qZA()(),e.TgZ(4,"ion-col",16)(5,"sivi-lib-datepicker",18),e.NdJ("update",function(){const ot=e.CHM(d).index,Cn=e.oxw(3);return e.KtG(Cn.markDatepickerAsTouched(ot,"validFrom"))}),e.qZA()(),e.TgZ(6,"ion-col",4)(7,"ion-button",19),e.NdJ("click",function(){const ot=e.CHM(d).index,Cn=e.oxw(3);return e.KtG(Cn.onDeleteClick(ot))}),e._UZ(8,"cgi-icon",20),e.qZA(),e.YNc(9,MC,2,0,"ion-button",21),e.qZA()()()}if(2&H){const d=s.index,k=s.first;e.xp6(1),e.Q6J("formGroupName",d),e.xp6(2),e.Q6J("label","Form.Label.From"),e.xp6(2),e.Q6J("label","Form.Label.Until"),e.xp6(4),e.Q6J("ngIf",k)}}function lv(H,s){if(1&H&&(e.ynx(0),e.TgZ(1,"div",12),e.YNc(2,fm,10,4,"div",14),e.qZA(),e.BQk()),2&H){const d=e.oxw(2);e.xp6(2),e.Q6J("ngForOf",d.periodsFormArray.controls)("ngForTrackBy",d.trackBy)}}function cv(H,s){if(1&H){const d=e.EpF();e.TgZ(0,"ion-row")(1,"ion-col",4)(2,"ion-item",6)(3,"ion-label"),e._uU(4),e.ALo(5,"translate"),e.qZA(),e.TgZ(6,"ion-checkbox",7),e.NdJ("ionChange",function(ie){e.CHM(d);const ot=e.oxw();return e.KtG(ot.onCheckboxChange(ie))}),e.qZA()()()(),e.YNc(7,dc,4,3,"ion-row",8),e.TgZ(8,"form",9)(9,"div",10),e.YNc(10,lv,3,2,"ng-container",11),e.qZA()()}if(2&H){const d=e.oxw();e.xp6(4),e.Oqu(e.lcZ(5,5,d.label)),e.xp6(2),e.Q6J("checked",d.checked),e.xp6(1),e.Q6J("ngIf",d.error),e.xp6(1),e.Q6J("formGroup",d.form),e.xp6(2),e.Q6J("ngIf",d.form.enabled)}}js.\u0275fac=function(s){return new(s||js)},js.\u0275mod=e.oAB({type:js}),js.\u0275inj=e.cJS({imports:[Ga]});const TC={id:null,validFrom:null,validUntil:null};class Tr extends df{set checked(s){this.onSetChecked(s)}get checked(){return this._checked}set value(s){s||this.periodsFormArray.clear(),s&&!(0,Ne.Z)(this.value,s)&&(this.form.patchValue(s),this.refreshPeriodsFormArray(s.periods))}get value(){return this._value}set isValid(s){this._isValid=s}get isValid(){return this.readonly||!this.checked||this._isValid}get periodsFormArray(){return this.form.get("periods")}get isPeriodsArrayEmpty(){return(0,Vn.Z)(this.periodsFormArray.getRawValue())}constructor(s,d,k){super(),this.translate=s,this.fb=d,this.notify=k,this.label="",this.type="",this.readonly=!1,this.valueChange=new e.vpe,this.checkboxChange=new e.vpe,this.form=this.fb.group({type:[null],periods:this.fb.array([])}),this._value={},this._checked=!1,this.validFromValidators=[sc.required,sc.validateDate(),sc.validateDateIsAfterThan("validUntil")],this.validUntilValidators=[sc.validateDate(),sc.validateDateIsBeforeThan("validFrom")]}onAddClick(){this.unshiftPeriod()}onDeleteClick(s){var d=this;return(0,o.Z)(function*(){(yield d.notify.getDeleteConfirmation())&&d.periodsFormArray.removeAt(s||0),d.isPeriodsArrayEmpty&&(d.checked=!1)})()}onCheckboxChange(s){var d=this;return(0,o.Z)(function*(){if(s?.detail?.checked)return void(d.checked=!0);d._checked=!1;const ie=d.isPeriodsArrayEmpty||(yield d.notify.getDeleteConfirmation());d.checked=!ie})()}onSetChecked(s){this._checked=s,this.toggleForm();const d=this.value.type||this.type;this.checkboxChange.emit({type:d,checked:s})}onFormValueChange(s){const d=s.periods.map(ie=>(0,vn.Z)(ie,Vn.Z)),k={...this.value,...s,periods:d,type:s.type||this.type};(0,Ne.Z)(k,this._value)||(this._value=k,this.setValidUntilValidators(),this.valueChange.emit({...this.value}))}getDateRangeText(s){return co.getDateRangeText(s)}refreshPeriodsFormArray(s=[]){this.periodsFormArray.clear(),s.forEach(d=>this.pushPeriod(d))}pushPeriod(s){this.periodsFormArray.push(this.getPeriodFormGroup(s))}unshiftPeriod(s){this.periodsFormArray.insert(0,this.getPeriodFormGroup(s))}toggleForm(){this.checked?(this.enableFormWithAtLeastOnePeriod(),this.showPeriodsErrorMessages()):this.form.disable()}showPeriodsErrorMessages(){this.periodsFormArray.controls.forEach(s=>{this.markAsTouchedIfValueExist(s.get("validFrom")),this.markAsTouchedIfValueExist(s.get("validUntil"))})}markDatepickerAsTouched(s,d){const k=this.periodsFormArray.get([s,d]);this.markAsTouchedIfValueExist(k)}markAsTouchedIfValueExist(s){s?.value&&s.markAsTouched()}setValidUntilValidators(){this.periodsFormArray.controls.forEach((s,d,k)=>{const Cn=(k.some(Yo=>Nn(Yo.value.validFrom).isAfter(s.value.validFrom))?[sc.required]:[]).concat(this.validUntilValidators),ir=s.get("validUntil");ir.setValidators(Cn),ir.updateValueAndValidity()})}trackBy(s,d){return d}enableFormWithAtLeastOnePeriod(){this.isPeriodsArrayEmpty&&this.pushPeriod(),this.form.enable()}getPeriodFormGroup(s=TC){return this.fb.group({id:[s.id],validFrom:[s.validFrom,this.validFromValidators],validUntil:[s.validUntil]})}}Tr.\u0275fac=function(s){return new(s||Tr)(e.Y36(we.sK),e.Y36(Ve.QS),e.Y36(md))},Tr.\u0275cmp=e.Xpm({type:Tr,selectors:[["sivi-lib-form-date-period-options"]],inputs:{checked:"checked",value:"value",label:"label",type:"type",readonly:"readonly",error:"error"},outputs:{valueChange:"valueChange",checkboxChange:"checkboxChange"},features:[e.qOj],decls:3,vars:2,consts:[[4,"ngIf","ngIfElse"],["notReadonly",""],["class","",4,"ngFor","ngForOf","ngForTrackBy"],[1,""],["size","auto"],["lines","none",1,"ion-text-nowrap"],["lines","none"],["slot","start",3,"checked","ionChange"],["class","row-container",4,"ngIf"],["siviLibForm","",3,"formGroup"],["formArrayName","periods"],[4,"ngIf"],[1,"row-container"],[1,"error-message","invalid"],[4,"ngFor","ngForOf","ngForTrackBy"],[1,"ion-align-items-center",3,"formGroupName"],["size","4","size-xl","3",1,"ion-align-self-start"],["formControlName","validFrom","siviLibFormControl","",3,"label","update"],["formControlName","validUntil","siviLibFormControl","",3,"label","update"],["color","primary","fill","clear","role","button","size","small","no-min-width","",3,"click"],["name","delete"],["color","primary","fill","clear","role","button","size","small","no-min-width","",3,"click",4,"ngIf"],["name","add"]],template:function(s,d){if(1&s&&(e.YNc(0,Vu,2,2,"ng-container",0),e.YNc(1,cv,11,7,"ng-template",null,1,e.W1O)),2&s){const k=e.MAs(2);e.Q6J("ngIf",d.readonly)("ngIfElse",k)}},styles:[".row-container[_ngcontent-%COMP%]{margin-left:40px}ion-checkbox[_ngcontent-%COMP%]{margin:18px 18px 18px 4px}ion-item[_ngcontent-%COMP%]{--padding-start: 0}.error-message[_ngcontent-%COMP%]{color:var(--ion-color-warning, rgba(204, 0, 0, 0))}"]});class qh{}function Iy(H,s){if(1&H){const d=e.EpF();e.TgZ(0,"ion-radio-group",9),e.NdJ("ionChange",function(ie){e.CHM(d);const ot=e.oxw();return e.KtG(ot.onRadioGroupChange(ie))}),e.TgZ(1,"ion-row",10)(2,"ion-col",11)(3,"ion-item"),e._UZ(4,"ion-radio",12),e.TgZ(5,"ion-label"),e._uU(6),e.qZA()()(),e.TgZ(7,"ion-col",11)(8,"ion-item"),e._UZ(9,"ion-radio",12),e.TgZ(10,"ion-label"),e._uU(11),e.qZA()()()()()}if(2&H){const d=e.oxw();e.Q6J("value",d.value.radio),e.xp6(4),e.Q6J("disabled",d.isInputDisabled)("value",!0),e.xp6(2),e.Oqu(d.radio1Label),e.xp6(3),e.Q6J("disabled",d.isInputDisabled)("value",!1),e.xp6(2),e.Oqu(d.radio2Label)}}function u1(H,s){if(1&H&&(e.TgZ(0,"ion-row")(1,"ion-col",1)(2,"div",13),e._UZ(3,"cgi-input",14),e.qZA()()()),2&H){const d=e.oxw();e.xp6(3),e.Q6J("viewMode",!1)("disabled",d.isInputDisabled)("label",d.inputLabel)}}qh.\u0275fac=function(s){return new(s||qh)},qh.\u0275mod=e.oAB({type:qh}),qh.\u0275inj=e.cJS({imports:[Ve.u5,Jc,Ga,Tp,_d]}),e.B6R(Tr,[Ve._Y,Ve.JJ,Ve.JL,Et.sg,Et.O5,Nt.YG,Nt.nz,Nt.wI,Nt.Ie,Nt.Q$,Nt.Nd,Nt.w,qd,Gm,Ve.sg,Ve.u,Ve.x0,Ve.CE,Np],[we.X$]);class im extends df{set showInput(s){this._showInput=s,this.setInputValidators()}get showInput(){return this._showInput}set value(s){(0,Ne.Z)(this.value,s)||this.form.patchValue(s)}get value(){return this._value}get isInputDisabled(){return this.disabled||!this.value.checkbox}constructor(s,d){super(),this.fb=s,this.cdr=d,this._showInput=!0,this.showRadio=!0,this.disabled=!1,this.checkboxLabel="CHECKBOX LABEL",this.inputLabel="INPUT LABEL",this.radio1Label="RADIO 1 LABEL",this.radio2Label="RADIO 2 LABEL",this._value={},this.valueChange=new e.vpe,this.form=this.fb.group({type:[""],checkbox:[!1],radio:[!0],input:[{value:"",disabled:!0}]})}onCheckboxChange(s){this.form.get("checkbox").patchValue(s.detail.checked),this.cdr.detectChanges()}onRadioGroupChange(s){this.form.get("radio").patchValue(s.detail.value),this.cdr.detectChanges()}onInputChange(s){this.form.get("input").patchValue(s.detail.value)}onFormValueChange(s){const d={...this.value,...s};(0,Ne.Z)(this.value,d)||(this._value=d,this.setInputValidators(),this.emitValueChange(),this.cdr.detectChanges())}emitValueChange(){const s={...this.value};this.showInput||delete s.input,this.showRadio||delete s.radio,this.valueChange.emit(s)}setInputValidators(){const s=this.form.get("checkbox").value,d=this.showInput&&s?[sc.required]:[];this.form.get("input").setValidators(d),this.form.updateValueAndValidity()}}im.\u0275fac=function(s){return new(s||im)(e.Y36(Ve.QS),e.Y36(e.sBO))},im.\u0275cmp=e.Xpm({type:im,selectors:[["sivi-lib-form-detailed-options"]],inputs:{showInput:"showInput",showRadio:"showRadio",disabled:"disabled",checkboxLabel:"checkboxLabel",inputLabel:"inputLabel",radio1Label:"radio1Label",radio2Label:"radio2Label",value:"value"},outputs:{valueChange:"valueChange"},features:[e.qOj],decls:12,vars:9,consts:[["siviLibForm","",3,"formGroup"],["size","12"],["lines","none"],["value","checkbox-value",3,"disabled","checked","ionChange"],[1,"checkbox-label"],["size-md","6","size","12"],[1,"information"],["role","radiogroup",3,"value","ionChange",4,"ngIf"],[4,"ngIf"],["role","radiogroup",3,"value","ionChange"],[1,"pb0","pt0"],["size-md","12",1,"pb0","pt0"],["role","radio",3,"disabled","value"],[1,"input-container"],["type","text","label-position","floating","formControlName","input","siviLibFormControl","",3,"viewMode","disabled","label"]],template:function(s,d){1&s&&(e.TgZ(0,"div",0)(1,"ion-row")(2,"ion-col",1)(3,"ion-item",2)(4,"ion-checkbox",3),e.NdJ("ionChange",function(ie){return d.onCheckboxChange(ie)}),e.ALo(5,"translate"),e.qZA(),e.TgZ(6,"ion-label",4),e._uU(7),e.qZA()()(),e.TgZ(8,"ion-col",5)(9,"div",6),e.YNc(10,Iy,12,7,"ion-radio-group",7),e.YNc(11,u1,4,3,"ion-row",8),e.qZA()()()()),2&s&&(e.Q6J("formGroup",d.form),e.xp6(4),e.Q6J("disabled",d.disabled)("checked",!d.disabled&&d.value.checkbox),e.uIk("aria-label",e.lcZ(5,7,d.value.type)),e.xp6(3),e.hij(" ",d.checkboxLabel," "),e.xp6(3),e.Q6J("ngIf",d.showRadio),e.xp6(1),e.Q6J("ngIf",d.showInput))},styles:[".input-container[_ngcontent-%COMP%], .information[_ngcontent-%COMP%]{display:block;padding-left:16px}.checkbox-label[_ngcontent-%COMP%]{margin-left:16px}ion-radio-group[_ngcontent-%COMP%]   ion-label[_ngcontent-%COMP%]{margin-left:16px}ion-item[_ngcontent-%COMP%]{--padding-start: 0}"]});class _u{}_u.\u0275fac=function(s){return new(s||_u)},_u.\u0275mod=e.oAB({type:_u}),_u.\u0275inj=e.cJS({imports:[Jc,Ga,Tp]}),e.B6R(im,[Et.O5,Nt.nz,Nt.wI,Nt.Ie,Nt.Q$,Nt.B7,Nt.se,Nt.Nd,Nt.w,Nt.U5,Nt.QI,qd,Gm,Ve.JJ,Ve.JL,Ve.sg,Ve.u],[we.X$]);class Tg extends rs.o2{constructor(){super(),this.data$=new g.X([]),this.state$=new g.X("loading"),this.paginator$=new g.X({length:0,pageIndex:Ro.PAGE_NUMBER_FIRST,pageSize:100})}source(s){s&&(this.state$.next("loading"),s.pipe((0,ye.q)(1)).subscribe(d=>{d.content.length>0?this.state$.next("loaded"):this.state$.next("no-content"),this.data$.next(d.content),this.paginator$.next({length:d.totalElements,pageIndex:d.number,pageSize:d.size})},d=>{this.state$.next("error"),console.warn("DataTableSource set source observable encountered error",d)}))}getState(){return this.state$.asObservable()}hasContent(){return"loaded"===this.state$.getValue()}getPaginatorOptions(){return this.paginator$.value}getData(){return this.data$.value}connect(s){return this.data$.asObservable()}disconnect(s){this.data$.complete(),this.state$.complete()}}var $c;function Pd(H,s){1&H&&(e.ynx(0),e.TgZ(1,"ion-col",14),e._UZ(2,"cgi-input",15),e.ALo(3,"translate"),e.qZA(),e.BQk()),2&H&&(e.xp6(2),e.Q6J("label",e.lcZ(3,1,"Form.Label.Pic")))}function Xg(H,s){1&H&&(e.TgZ(0,"ion-col",14),e._uU(1),e.ALo(2,"translate"),e.qZA()),2&H&&(e.xp6(1),e.hij(" ",e.lcZ(2,1,"Form.Label.CheckIfPersonHasBeenAddedAlready")," "))}function wb(H,s){if(1&H&&(e.YNc(0,Xg,3,3,"ion-col",16),e.TgZ(1,"ion-col",14),e._UZ(2,"cgi-input",17),e.ALo(3,"translate"),e.qZA()),2&H){const d=e.oxw();e.Q6J("ngIf",d.showCheckPersonText),e.xp6(2),e.Q6J("errorMessages",d.minLengthErrorMsg)("label",e.lcZ(3,3,"Form.Label.Filter"))}}function d1(H,s){1&H&&e._UZ(0,"ion-spinner",18)}function xC(H,s){if(1&H&&(e.TgZ(0,"ion-col",14),e._uU(1),e.ALo(2,"translate"),e.qZA()),2&H){const d=e.oxw(2);e.xp6(1),e.hij(" ",e.lcZ(2,1,d.noResultLabel)," ")}}function p1(H,s){if(1&H&&(e.TgZ(0,"ion-col",14),e._uU(1),e.ALo(2,"translate"),e.qZA()),2&H){const d=e.oxw(3);e.xp6(1),e.hij(" ",e.lcZ(2,1,d.noResultLabel)," ")}}function Ib(H,s){if(1&H&&(e.ynx(0),e.TgZ(1,"ion-col",19),e._uU(2),e.ALo(3,"translate"),e.qZA(),e.YNc(4,p1,3,3,"ion-col",20),e.BQk()),2&H){const d=e.oxw(2),k=e.MAs(25);e.xp6(2),e.hij(" ",e.lcZ(3,3,"General.Text.PRC")," "),e.xp6(2),e.Q6J("ngIf",!d.selectedPerson||!d.isPersonFromPrc())("ngIfElse",k)}}function Py(H,s){if(1&H&&(e.TgZ(0,"ion-row")(1,"ion-col",19),e._uU(2),e.ALo(3,"translate"),e.qZA(),e.YNc(4,xC,3,3,"ion-col",20),e.YNc(5,Ib,5,5,"ng-container",12),e.qZA()),2&H){const d=e.oxw(),k=e.MAs(25);e.xp6(2),e.hij(" ",e.lcZ(3,4,"General.Text.VESA")," "),e.xp6(2),e.Q6J("ngIf",!d.selectedPerson||d.isPersonFromPrc())("ngIfElse",k),e.xp6(1),e.Q6J("ngIf",d.showPrcResult&&(!d.selectedPerson||d.isPersonFromPrc()))}}function Fv(H,s){if(1&H){const d=e.EpF();e.TgZ(0,"ion-item",22)(1,"ion-checkbox",23),e.NdJ("ionChange",function(ie){e.CHM(d);const ot=e.oxw(2);return e.KtG(ot.onSelectManuallyFill(ie))}),e.qZA(),e.TgZ(2,"ion-label",24),e._uU(3),e.ALo(4,"translate"),e.qZA()()}if(2&H){const d=e.oxw(2);e.xp6(1),e.Q6J("checked",d.manuallyFill)("disabled",d.picAvailable&&d.selectedPerson),e.xp6(2),e.hij(" ",e.lcZ(4,3,"Form.Label.PersonNotFound")," ")}}function Nv(H,s){if(1&H&&(e.TgZ(0,"ion-row")(1,"ion-col",14),e.YNc(2,Fv,5,5,"ion-item",21),e.qZA()()),2&H){const d=e.oxw();e.xp6(2),e.Q6J("ngIf",d.showResults)}}function S_(H,s){if(1&H&&(e._UZ(0,"cgi-input",25),e.ALo(1,"translate")),2&H){const d=e.oxw(4);e.Q6J("viewMode",!0)("value",d.selectedPerson.address)("label",e.lcZ(1,3,"Form.Label.Address"))}}function Oy(H,s){1&H&&(e._UZ(0,"cgi-input",28),e.ALo(1,"translate"),e.ALo(2,"translate")),2&H&&e.Q6J("css",".nda .field-value { color: var(--ion-color-warning); text-transform: uppercase; }")("label",e.lcZ(1,4,"Form.Label.Address"))("value",e.lcZ(2,6,"NonDisclosure.ContactDetails"))("viewMode",!0)}function Bv(H,s){if(1&H&&(e.TgZ(0,"ion-col",14),e.YNc(1,S_,2,5,"cgi-input",26),e.YNc(2,Oy,3,8,"ng-template",null,27,e.W1O),e.qZA()),2&H){const d=e.MAs(3),k=e.oxw(3);e.xp6(1),e.Q6J("ngIf",!k.isNonDisclosure)("ngIfElse",d)}}function Uv(H,s){if(1&H&&(e.ynx(0),e.TgZ(1,"ion-col",14),e._UZ(2,"cgi-input",25),e.ALo(3,"translate"),e.qZA(),e.TgZ(4,"ion-col",14),e._UZ(5,"cgi-input",25),e.ALo(6,"translate"),e.qZA(),e.TgZ(7,"ion-col",14),e._UZ(8,"cgi-input",25),e.ALo(9,"date"),e.ALo(10,"translate"),e.qZA(),e.YNc(11,Bv,4,2,"ion-col",16),e.BQk()),2&H){const d=e.oxw(2);e.xp6(2),e.Q6J("viewMode",!0)("value",null==d.selectedPerson?null:d.selectedPerson.firstName)("label",e.lcZ(3,10,"Form.Label.FirstName")),e.xp6(3),e.Q6J("viewMode",!0)("value",null==d.selectedPerson?null:d.selectedPerson.lastName)("label",e.lcZ(6,12,"Form.Label.LastName")),e.xp6(3),e.Q6J("viewMode",!0)("value",e.xi3(9,14,null==d.selectedPerson?null:d.selectedPerson.birthDate,d.dateFormats.FINNISH_ANGULAR))("label",e.lcZ(10,17,"Form.Label.BirthDate")),e.xp6(3),e.Q6J("ngIf",null==d.selectedPerson?null:d.selectedPerson.address)}}function rm(H,s){if(1&H&&e.YNc(0,Uv,12,19,"ng-container",12),2&H){const d=e.oxw();e.Q6J("ngIf",d.selectedPerson)}}!function(H){H.VESA="VESA",H.PRC="PRC"}($c||($c={}));class If extends df{set personsPageable(s){s&&(this.showResults=!0,this.dataSource=new Tg,this.dataSource.source((0,D.of)(s)))}set selectedPerson(s){((0,In.Z)(s)||!(0,Vn.Z)(s))&&(this.showResults=!0,this._selectedPerson=s)}get selectedPerson(){return this._selectedPerson}get isNonDisclosure(){return this.selectedPerson.nonDisclosure===jd.NON_DISCLOSURE}get textControl(){return this.form.get("text")}get textValidators(){return[sc.required,this.picAvailable?sc.validatePin():sc.minLength(3)]}constructor(s,d){super(),this.translate=s,this.fb=d,this.allowSearch=!0,this.isLoading=!1,this.showFillManually=!0,this.showPrcResult=!0,this.showAddress=!0,this.noResultLabel="Message.NoDataFound",this.showCheckPersonText=!0,this.search=new e.vpe,this.personSelect=new e.vpe,this.dataSource=new Tg,this.picAvailable=!0,this.inputValue="",this.showResults=!1,this.dateFormats=as,this.options=this.getRadioOptions(),this.form=this.fb.group({text:["",this.textValidators]}),this.pageEvent=this.getInitialPageEvent(),this.minLengthErrorMsg={minlength:this.translate.instant("Form.Error.MinLengthIsChactersCount",{count:3})}}onRadioChange(s){this.showResults=!1,this.manuallyFill=!1,this.onSelectPerson(void 0),this.picAvailable=s.detail.value,this.textControl.patchValue(""),this.textControl.setValidators(this.textValidators)}onSelectPerson(s){this._selectedPerson=s,this.personSelect.emit(s)}onPageChange(s){this.pageEvent=s,this.emitSearch()}onSelectManuallyFill(s){const d=s.detail.checked;if((0,Vi.Z)(d))return;this.manuallyFill=d;const k=this.manuallyFill?{}:this.selectedPerson;this.personSelect.emit(k)}onFormValueChange(s){this.inputValue=s.text,this.pageEvent=this.getInitialPageEvent()}isPersonFromVesa(){const{vesa:s,source:d}=this.selectedPerson||{};return s||d===$c.VESA}isPersonFromPrc(){const{prc:s,source:d}=this.selectedPerson||{};return!this.isPersonFromVesa()&&(s||d===$c.PRC)}emitSearch(){const s=this.getPersonSearchEvent();this.search.emit(s)}getRadioOptions(){return[{value:!0,text:this.translate.instant("General.Text.Yes")},{value:!1,text:this.translate.instant("General.Text.No")}]}getInitialPageEvent(){return{length:0,pageIndex:0,pageSize:(0,An.Z)(Ro.PAGINATOR_PAGE_SIZES)}}getPersonSearchEvent(){return{picAvailable:this.picAvailable,text:this.inputValue,pageOptions:this.pageEvent}}}function ku(H,s){1&H&&(e.TgZ(0,"th",15),e._uU(1),e.ALo(2,"translate"),e.qZA()),2&H&&(e.xp6(1),e.Oqu(e.lcZ(2,1,"Form.Label.FirstName")))}function h0(H,s){if(1&H&&(e.TgZ(0,"td",16),e._uU(1),e.qZA()),2&H){const d=s.$implicit;e.xp6(1),e.hij("",d.firstName," ")}}function Nc(H,s){1&H&&(e.TgZ(0,"th",15),e._uU(1),e.ALo(2,"translate"),e.qZA()),2&H&&(e.xp6(1),e.Oqu(e.lcZ(2,1,"Form.Label.LastName")))}function g0(H,s){if(1&H&&(e.TgZ(0,"td",16),e._uU(1),e.qZA()),2&H){const d=s.$implicit;e.xp6(1),e.hij("",d.lastName," ")}}function _0(H,s){if(1&H&&(e.TgZ(0,"th",15),e._uU(1),e.qZA()),2&H){const d=e.oxw(2);e.xp6(1),e.hij(" ",d.birthDateOrPinColumnTitle||d.defaultBirthDateOrPinColumnTitle," ")}}function v0(H,s){if(1&H&&(e.TgZ(0,"td",16),e._uU(1),e.qZA()),2&H){const d=s.$implicit,k=e.oxw(2);e.xp6(1),e.Oqu(k.getPinOrDateOfBirth(d))}}function Xh(H,s){if(1&H&&(e.TgZ(0,"th",17),e._uU(1),e.ALo(2,"translate"),e.qZA()),2&H){const d=e.oxw(2);e.Q6J("hidden",!d.showAddress),e.xp6(1),e.hij(" ",e.lcZ(2,2,"Form.Label.Address")," ")}}function Kl(H,s){if(1&H&&(e.TgZ(0,"td",18),e._uU(1),e.qZA()),2&H){const d=s.$implicit,k=e.oxw(2);e.Q6J("hidden",!k.showAddress),e.xp6(1),e.Oqu(d.address)}}function y0(H,s){1&H&&e._UZ(0,"tr",19)}If.\u0275fac=function(s){return new(s||If)(e.Y36(we.sK),e.Y36(Ve.QS))},If.\u0275cmp=e.Xpm({type:If,selectors:[["sivi-lib-person-search"]],inputs:{title:"title",infoText:"infoText",allowSearch:"allowSearch",isLoading:"isLoading",showFillManually:"showFillManually",showPrcResult:"showPrcResult",showAddress:"showAddress",birthDateOrPinColumnTitle:"birthDateOrPinColumnTitle",noResultLabel:"noResultLabel",showCheckPersonText:"showCheckPersonText",personsPageable:"personsPageable",selectedPerson:"selectedPerson"},outputs:{search:"search",personSelect:"personSelect"},features:[e.qOj],decls:26,vars:22,consts:[["size","12",1,"weight-600","great"],[3,"text"],["siviLibForm","",1,"ion-margin-vertical",3,"formGroup"],["size","12",1,"weight-600"],[3,"options","value","siviChange"],[4,"ngIf","ngIfElse"],["showFilter",""],["siviGridCol","left"],["fill","outline","size","default",1,"ion-no-margin",3,"disabled","click"],["color","primary",4,"ngIf"],[3,"hidden"],[3,"showAddress","noResultLabel","dataSource","birthDateOrPinColumnTitle","selectedRow","pageChange"],[4,"ngIf"],["personData",""],["size","12"],["formControlName","text","siviLibFormControl","","label-position","floating",3,"label"],["size","12",4,"ngIf"],["formControlName","text","siviLibFormControl","","label-position","floating",3,"errorMessages","label"],["color","primary"],["size","12",1,"weight-600","great","title"],["size","12",4,"ngIf","ngIfElse"],["lines","none","class","manually-fill-checkbox",4,"ngIf"],["lines","none",1,"manually-fill-checkbox"],["role","checkbox",3,"checked","disabled","ionChange"],[1,"ion-text-wrap","ion-margin-start"],["label-position","floating",3,"viewMode","value","label"],["label-position","floating",3,"viewMode","value","label",4,"ngIf","ngIfElse"],["nonDisclosureAddress",""],["type","text","label-position","floating",1,"nda",3,"css","label","value","viewMode"]],template:function(s,d){if(1&s&&(e.TgZ(0,"ion-row")(1,"ion-col",0),e._uU(2),e._UZ(3,"sivi-lib-info-popup",1),e.qZA()(),e.TgZ(4,"ion-row",2)(5,"ion-col",3),e._uU(6),e.ALo(7,"translate"),e.qZA(),e.TgZ(8,"ion-col")(9,"sivi-lib-radio-list",4),e.NdJ("siviChange",function(ie){return d.onRadioChange(ie)}),e.qZA()(),e.YNc(10,Pd,4,3,"ng-container",5),e.YNc(11,wb,4,5,"ng-template",null,6,e.W1O),e.TgZ(13,"ion-col",7)(14,"ion-button",8),e.NdJ("click",function(){return d.emitSearch()}),e._uU(15),e.ALo(16,"translate"),e.YNc(17,d1,1,0,"ion-spinner",9),e.qZA()()(),e.TgZ(18,"ion-row",10)(19,"ion-col")(20,"cgi-card")(21,"sivi-lib-person-search-table",11),e.NdJ("selectedRow",function(ie){return d.onSelectPerson(ie)})("pageChange",function(ie){return d.onPageChange(ie)}),e.qZA()()()(),e.YNc(22,Py,6,6,"ion-row",12),e.YNc(23,Nv,3,1,"ion-row",12),e.YNc(24,rm,1,1,"ng-template",null,13,e.W1O)),2&s){const k=e.MAs(12);e.xp6(2),e.hij(" ",d.title," "),e.xp6(1),e.Q6J("text",d.infoText),e.xp6(1),e.Q6J("formGroup",d.form),e.xp6(2),e.Oqu(e.lcZ(7,18,"Form.Label.PIC.Available")),e.xp6(3),e.Q6J("options",d.options)("value",d.picAvailable),e.xp6(1),e.Q6J("ngIf",d.picAvailable)("ngIfElse",k),e.xp6(4),e.Q6J("disabled",!d.allowSearch||d.isLoading||!d.isValid),e.xp6(1),e.hij(" ",e.lcZ(16,20,"General.Text.Search")," "),e.xp6(2),e.Q6J("ngIf",d.isLoading),e.xp6(1),e.Q6J("hidden",d.picAvailable||!d.showResults||d.manuallyFill),e.xp6(3),e.Q6J("showAddress",d.showAddress)("noResultLabel",d.noResultLabel)("dataSource",d.dataSource)("birthDateOrPinColumnTitle",d.birthDateOrPinColumnTitle),e.xp6(1),e.Q6J("ngIf",d.picAvailable&&d.showResults),e.xp6(1),e.Q6J("ngIf",d.showFillManually)}},styles:[".manually-fill-checkbox[_ngcontent-%COMP%]{--padding-start: 0}cgi-card[_ngcontent-%COMP%]{--margin: 0}"]});const eg=function(H){return{selected:H}};function DC(H,s){if(1&H){const d=e.EpF();e.TgZ(0,"tr",20),e.NdJ("siviClick",function(){const ot=e.CHM(d).$implicit,Cn=e.oxw(2);return e.KtG(Cn.onClickPerson(ot))}),e.qZA()}if(2&H){const d=s.$implicit,k=e.oxw(2);e.Q6J("tabIndex",0)("ngClass",e.VKq(2,eg,k.selectedPersonId===d.personId))}}function wh(H,s){if(1&H&&(e.TgZ(0,"div",3)(1,"table",4),e.ynx(2,5),e.YNc(3,ku,3,3,"th",6),e.YNc(4,h0,2,1,"td",7),e.BQk(),e.ynx(5,8),e.YNc(6,Nc,3,3,"th",6),e.YNc(7,g0,2,1,"td",7),e.BQk(),e.ynx(8,9),e.YNc(9,_0,2,1,"th",6),e.YNc(10,v0,2,1,"td",7),e.BQk(),e.ynx(11,10),e.YNc(12,Xh,3,4,"th",11),e.YNc(13,Kl,2,2,"td",12),e.BQk(),e.YNc(14,y0,1,0,"tr",13),e.YNc(15,DC,1,4,"tr",14),e.qZA()()),2&H){const d=e.oxw();e.xp6(1),e.Q6J("dataSource",d.dataSource),e.xp6(13),e.Q6J("matHeaderRowDef",d.displayedColumns),e.xp6(1),e.Q6J("matRowDefColumns",d.displayedColumns)}}class Bc extends Js{constructor(s){super(),this.translate=s,this.noResultLabel="Message.NoDataFound",this.showAddress=!0,this.selectedRow=new e.vpe,this.pageChange=new e.vpe,this.displayedColumns=[],this.pageSizeOptions=Ro.PAGINATOR_PAGE_SIZES,this.defaultBirthDateOrPinColumnTitle=`${this.translate.instant("Form.Label.PIC.ShortName")} / ${this.translate.instant("Form.Label.BirthDate")}`,this.displayedColumns=["firstName","lastName","pinOrDateOfBirth","address"]}ngOnInit(){this.paginator.page.pipe((0,j.R)(this.destroy$),(0,Z.b)(()=>this.onPageChange())).subscribe()}getPinOrDateOfBirth(s){return s.pin||co.convertDateToFinnishStandard(s.birthDate)}onClickPerson(s){this.selectedPersonId=s.personId,this.selectedRow.emit(s)}onPageChange(){const s={length:this.paginator.length,pageIndex:this.paginator.pageIndex,pageSize:this.paginator.pageSize};this.selectedPersonId=void 0,this.pageChange.emit(s)}}function m1(H,s){1&H&&(e.TgZ(0,"div"),e._UZ(1,"sivi-lib-spinner",3),e.qZA()),2&H&&(e.xp6(1),e.Q6J("show",!0))}function gE(H,s){if(1&H&&(e.TgZ(0,"div"),e._uU(1),e.ALo(2,"translate"),e.qZA()),2&H){const d=e.oxw(2);e.xp6(1),e.hij(" ",e.lcZ(2,1,d.noResultLabel)," ")}}function Ly(H,s){1&H&&(e.TgZ(0,"div"),e._uU(1),e.ALo(2,"translate"),e.qZA()),2&H&&(e.xp6(1),e.hij(" ",e.lcZ(2,1,"Message.Error.UnknownError")," "))}function f1(H,s){if(1&H&&(e.TgZ(0,"div",1),e.YNc(1,m1,2,1,"div",2),e.YNc(2,gE,3,3,"div",2),e.YNc(3,Ly,3,3,"div",2),e.qZA()),2&H){const d=e.oxw();e.xp6(1),e.Q6J("ngIf","loading"===d.state),e.xp6(1),e.Q6J("ngIf","no-content"===d.state),e.xp6(1),e.Q6J("ngIf","error"===d.state)}}Bc.\u0275fac=function(s){return new(s||Bc)(e.Y36(we.sK))},Bc.\u0275cmp=e.Xpm({type:Bc,selectors:[["sivi-lib-person-search-table"]],viewQuery:function(s,d){if(1&s&&e.Gf(Pc.NW,7),2&s){let k;e.iGM(k=e.CRH())&&(d.paginator=k.first)}},inputs:{dataSource:"dataSource",noResultLabel:"noResultLabel",showAddress:"showAddress",birthDateOrPinColumnTitle:"birthDateOrPinColumnTitle"},outputs:{selectedRow:"selectedRow",pageChange:"pageChange"},features:[e.qOj],decls:4,vars:9,consts:[[3,"state","noResultLabel"],["class","table-container",4,"ngIf"],[3,"length","pageSize","pageSizeOptions","pageIndex"],[1,"table-container"],["mat-table","",1,"mat-elevation-z8",3,"dataSource"],["matColumnDef","firstName"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","lastName"],["matColumnDef","pinOrDateOfBirth"],["matColumnDef","address"],["mat-header-cell","",3,"hidden",4,"matHeaderCellDef"],["mat-cell","",3,"hidden",4,"matCellDef"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","","siviKeyboardEvents","","class","pointer",3,"tabIndex","ngClass","siviClick",4,"matRowDef","matRowDefColumns"],["mat-header-cell",""],["mat-cell",""],["mat-header-cell","",3,"hidden"],["mat-cell","",3,"hidden"],["mat-header-row",""],["mat-row","","siviKeyboardEvents","",1,"pointer",3,"tabIndex","ngClass","siviClick"]],template:function(s,d){1&s&&(e._UZ(0,"sivi-lib-data-table-source-state",0),e.ALo(1,"async"),e.YNc(2,wh,16,3,"div",1),e._UZ(3,"mat-paginator",2)),2&s&&(e.Q6J("state",e.lcZ(1,7,d.dataSource.getState()))("noResultLabel",d.noResultLabel),e.xp6(2),e.Q6J("ngIf",d.dataSource.hasContent()),e.xp6(1),e.Q6J("length",d.dataSource.getPaginatorOptions().length)("pageSize",d.dataSource.getPaginatorOptions().pageSize)("pageSizeOptions",d.pageSizeOptions)("pageIndex",d.dataSource.getPaginatorOptions().pageIndex))},styles:[".title[_ngcontent-%COMP%]{margin-top:16px}table[_ngcontent-%COMP%]{width:100%}.selected[_ngcontent-%COMP%]{outline:2px dashed var(--ion-color-primary);outline-offset:-1px}tr[_ngcontent-%COMP%]:focus{outline-offset:-1px}.table-container[_ngcontent-%COMP%]{overflow-x:scroll}.table-container[_ngcontent-%COMP%]   table[_ngcontent-%COMP%]{min-width:650px}"]});class ky extends Js{constructor(){super(),this.noResultLabel="Message.NoDataFound"}}ky.\u0275fac=function(s){return new(s||ky)},ky.\u0275cmp=e.Xpm({type:ky,selectors:[["sivi-lib-data-table-source-state"]],inputs:{state:"state",noResultLabel:"noResultLabel"},features:[e.qOj],decls:1,vars:1,consts:[["class","mat-elevation-z8 state-container",4,"ngIf"],[1,"mat-elevation-z8","state-container"],[4,"ngIf"],[3,"show"]],template:function(s,d){1&s&&e.YNc(0,f1,4,3,"div",0),2&s&&e.Q6J("ngIf","loaded"!==d.state)},dependencies:[Et.O5,Im,we.X$],styles:[".state-container[_ngcontent-%COMP%]{width:100%;text-align:center;padding:20px;display:table}"]});class zv{}zv.\u0275fac=function(s){return new(s||zv)},zv.\u0275mod=e.oAB({type:zv}),zv.\u0275inj=e.cJS({imports:[Ga,cf]});class A_{}function h1(H,s){if(1&H&&(e.TgZ(0,"div",2)(1,"ion-label"),e._uU(2),e.qZA(),e.TgZ(3,"div",3),e._uU(4),e.qZA()()),2&H){const d=e.oxw();e.xp6(2),e.Oqu(d.label),e.xp6(2),e.Oqu(d.lastValidValue)}}function hm(H,s){if(1&H){const d=e.EpF();e.TgZ(0,"ion-item")(1,"ion-label",4),e._uU(2),e.qZA(),e.TgZ(3,"ion-input",5),e.NdJ("keypress",function(ie){e.CHM(d);const ot=e.oxw();return e.KtG(ot.handleKeypress(ie))})("ionChange",function(ie){e.CHM(d);const ot=e.oxw();return e.KtG(ot.handleChange(ie))})("ionBlur",function(ie){e.CHM(d);const ot=e.oxw();return e.KtG(ot.transformValue(ie))}),e.qZA()()}if(2&H){const d=e.oxw();e.xp6(2),e.Oqu(d.label),e.xp6(1),e.Q6J("name",d.name)("value",d.lastValidValue)("readonly",d.readonly)("required",d.required)("disabled",d.disabled)("errorMessages",d.errorMessages)}}A_.\u0275fac=function(s){return new(s||A_)},A_.\u0275mod=e.oAB({type:A_}),A_.\u0275inj=e.cJS({imports:[Ga,wd,Qh,Jc,zv,ks.p0,Pc.TU,Tp]}),e.B6R(If,[Et.O5,Nt.YG,Nt.nz,Nt.wI,Nt.Ie,Nt.Q$,Nt.Nd,Nt.PQ,Nt.w,af,qf,Dh,qd,Gm,Ve.JJ,Ve.JL,Ve.sg,Ve.u,Bc],[Et.uU,we.X$]),e.B6R(Bc,[Et.mk,Et.O5,Kp,ky,ks.BZ,ks.fO,ks.as,ks.w1,ks.Dz,ks.nj,ks.ge,ks.ev,ks.XQ,ks.Gk,Pc.NW],[Et.Ov,we.X$]);class e_ extends Fp{set value(s){this.lastValidValue="number"==typeof s?this.formatValueToCurrency(s.toString()):s?this.formatValueToCurrency(s):""}constructor(s){super(),this.elementRef=s,this.required=!0,this.disabled=!1,this.currency="EUR",this.readonly=!1,this.numberOfDecimals=2,this.allowNegativeNumbers=!1,this.siviChange=new e.vpe,this.MINUS_CHAR_CODE_45="-"}isValidInput(s){return s===this.MINUS_CHAR_CODE_45||this.getRegex().test(s)}getRegex(){return this.allowNegativeNumbers?new RegExp(ic.CURRENCY_STRING_WITH_NEGATIVES,"g"):new RegExp(ic.CURRENCY_STRING,"g")}handleKeypress(s){new RegExp(/[0-9\s,.-]+/,"g").test(s.key)||s.preventDefault()}handleChange(s){this.isValidInput(s.target.value?.toString())?this.lastValidValue=s.target.value?.toString():s.target.value=this.lastValidValue}transformValue(s){const d=s.target.value?s.target.value.toString().replace(/\s+/g," "):"";if(this.isValidInput(d)){const k=this.formatValueToCurrency(d);this.lastValidValue=Number.isNaN(k)?this.lastValidValue:k;const ie=0===this.lastValidValue.toString().length?"":this.lastValidValue;this.value!==ie&&this.emitValue(ie)}}formatValueToCurrency(s){if(void 0===s||0===s.length||isNaN(Number(s.replace(/\s+/g,"").replace(",","."))))return"";const d=new Intl.NumberFormat("fi-FI",{style:"currency",currency:this.currency,maximumFractionDigits:this.numberOfDecimals,minimumFractionDigits:this.numberOfDecimals}).format(this.formatValueToNumber(s)).split("\u20ac")[0].replace(/\s+/g," ").trim();return this.formatNegativeNumbers(d)}formatNegativeNumbers(s){let d=s;return 8722===s.charCodeAt(0)&&(d=this.MINUS_CHAR_CODE_45+s.slice(1)),d}formatValueToNumber(s){return"number"==typeof s?s:""!==s?Number(s.replace(/\s+/g,"").replace(",",".")):void 0}emitValue(s=this.lastValidValue){const d=this.formatValueToNumber(s);this.siviChange.emit({[this.name]:d});const k={name:this.name,value:d},ie=new CustomEvent("valueChange",{detail:k,bubbles:!0});this.elementRef.nativeElement.dispatchEvent(ie);const ot=new Event("blur",{bubbles:!0});this.elementRef.nativeElement.dispatchEvent(ot)}}e_.\u0275fac=function(s){return new(s||e_)(e.Y36(e.SBq))},e_.\u0275cmp=e.Xpm({type:e_,selectors:[["sivi-lib-currency-input"]],inputs:{value:"value",name:"name",label:"label",required:"required",disabled:"disabled",errorMessages:"errorMessages",currency:"currency",readonly:"readonly",numberOfDecimals:"numberOfDecimals",allowNegativeNumbers:"allowNegativeNumbers"},outputs:{siviChange:"siviChange"},features:[e.qOj],decls:3,vars:2,consts:[["aria-disabled","true",4,"ngIf","ngIfElse"],["inputMode",""],["aria-disabled","true"],[1,"field-value"],["position","floating",1,"label"],["type","text","inputmode","decimal",3,"name","value","readonly","required","disabled","errorMessages","keypress","ionChange","ionBlur"]],template:function(s,d){if(1&s&&(e.YNc(0,h1,5,2,"div",0),e.YNc(1,hm,4,7,"ng-template",null,1,e.W1O)),2&s){const k=e.MAs(2);e.Q6J("ngIf",d.readonly)("ngIfElse",k)}},dependencies:[Et.O5,Nt.pK,Nt.Ie,Nt.Q$,Nt.j9],styles:[".field-value[_ngcontent-%COMP%]{font-weight:700}.label[_ngcontent-%COMP%]{white-space:break-spaces;margin-bottom:.5em;max-width:23em}ion-item[_ngcontent-%COMP%]{--padding-start: 0}"],changeDetection:0});class eh{}eh.\u0275fac=function(s){return new(s||eh)},eh.\u0275mod=e.oAB({type:eh}),eh.\u0275inj=e.cJS({imports:[Ga]});class SC{watchForValueChanges(s,d){this.originalEntities=(0,tt.Z)(s),this.currentEntities=s,this.ignoreProperties=d||[]}updateWatchedEntities(s){this.currentEntities=s}canDeactivate(){if(void 0===this.originalEntities&&void 0===this.currentEntities||(0,Ne.Z)(this.originalEntities,this.currentEntities))return!0;const s=co.removeEmptyValues((0,tt.Z)(this.originalEntities)),d=co.removeEmptyValues((0,tt.Z)(this.currentEntities));return this.removeIgnoredProperties(s),this.removeIgnoredProperties(d),JSON.stringify(s)===JSON.stringify(d)}removeIgnoredProperties(s){if(s&&this.ignoreProperties)for(const d of s)if(!(0,Vn.Z)(d))for(const k of this.ignoreProperties)delete d[k]}}class w_{constructor(s){this.translate=s}canLoadMoreItems(){return this.displayedCount<this.totalCount}setLoadMoreTotalCount(s){this.totalCount=s}setLoadMoreDisplayedCount(s){this.displayedCount=s}getLoadMoreTotalCount(){return this.totalCount}getLoadMoreDisplayedCount(){return this.displayedCount}getLoadMoreText(){return this.translate.instant("General.Buttons.LoadMore",{elements:this.displayedCount,totalCount:this.totalCount})}}class AC{getViewTabs(){return this.tabs}isCurrentViewTab(s){return this.currentTabId===s}getCurrentTabId(){return this.currentTabId?this.currentTabId:this.tabs&&this.tabs[0]?this.tabs[0].id:null}setCurrentTab(s){this.currentTabId=s}}class Sp extends df{constructor(s,d,k,ie,ot,Cn){super(d),this.notify=s,this.translate=d,this.router=k,this.route=ie,this.location=ot,this.siviModalController=Cn,this.pager=new zs(Ro.PAGING_MAX_RESPONSES),this.tabs=[],this.destroy$=new l.x}ionViewWillLeave(){this.routingChangeSubscription?.unsubscribe(),this.routingChangeSubscription=void 0}watchForValueChanges(s,d){}canDeactivate(){return!1}removeIgnoredProperties(s){}updateWatchedEntities(s){}getViewTabs(){return[]}isCurrentViewTab(s){return!1}getCurrentTabId(){return null}setCurrentTab(s){}canLoadMoreItems(){return!1}getLoadMoreText(){return null}setLoadMoreTotalCount(s){}setLoadMoreDisplayedCount(s){}getLoadMoreTotalCount(){return null}getLoadMoreDisplayedCount(){return null}controlRefresher(s){}setTabs(s){this.tabs=s,this.route?this.setCurrentTabIdFromRoute():this.currentTabId=this.tabs[0].id,this.watchRoutingChanged()}watchRoutingChanged(){this.routingChangeSubscription||(this.routingChangeSubscription=this.router.events.pipe((0,ve.h)(s=>s instanceof qt.m2||s instanceof qt.gk)).subscribe(s=>this.setCurrentTabIdFromNavigationEvent(s)))}setCurrentTabIdFromNavigationEvent(s){if(!s)return;const d=this.router.parseUrl(this.router.url)?.queryParams?.tabId;if(d)return void(this.currentTabId=d);const ot=((s instanceof qt.gk?this.router.url:s.urlAfterRedirects)?.split("/")||[]).pop()||"",Cn=ot.includes("?")&&"?",ir=ot.includes("#")&&"#",Yo=Cn||ir,tl=Yo?ot.slice(0,ot.indexOf(Yo)):ot,bc=this.tabs.find(Ss=>tl.includes(Ss.id)),np=this.tabs[0]?.id||"";this.currentTabId=bc?tl:np}getTabs(){return this.tabs}setCurrentTabIdFromRoute(){try{if(!this.tabs.length)return;const s=ie=>this.tabs.map(ot=>ot.id).find(ot=>ie?.includes(ot)),d=this.router.url.split("/").pop(),k=this.route.snapshot?.queryParams?.tabId;this.currentTabId=s(d)||s(k)||this.tabs[0].id}catch(s){console.error("setActiveViewTab failed",s)}}openModal(s,d=Ro.MODAL,k="true",ie){var ot=this;return(0,o.Z)(function*(){ie=ie||[];try{return ot.siviModalController.openModal(s,d,k,ie)}catch{console.error("openModal. Possibly no SiviModalController provided")}})()}navigateByRelativeURL(s){const d=this.router.parseUrl(this.router.url);if(d.root.children.primary){const k=d.root.children.primary.segments.map(ot=>ot.path).join("/"),ie="/"===k.slice(-1)?"":"/";console.log("navigateByRelativeURL",k+ie+s),this.router.navigateByUrl(k+ie+s)}}trackByFn(s,d){try{return d.id||d.tempId||s.toString()}catch{console.error("trackByFn error. Parameter missing",{index:s,item:d})}}trackByFnIndex(s){return s}ngOnInit(){this.route&&this.route.queryParams&&this.route.queryParams.pipe((0,j.R)(this.destroy$)).subscribe(s=>{s.tab?this.setCurrentTab(s.tab):this.setCurrentTabIdFromRoute()})}ngOnDestroy(){this.routingChangeSubscription?.unsubscribe(),this.destroy$.next(),this.destroy$.complete()}}function Yv(H,s){if(1&H){const d=e.EpF();e.TgZ(0,"ion-button",5)(1,"i",6),e.NdJ("click",function(){e.CHM(d);const ie=e.oxw();return e.KtG(ie.handleCancelClick())}),e.ALo(2,"translate"),e.TgZ(3,"span",7),e._uU(4,"close"),e.qZA()()()}2&H&&(e.Q6J("@fadeInOut",void 0),e.xp6(1),e.uIk("aria-label",e.lcZ(2,2,"General.Buttons.Close")))}function Pb(H,s){if(1&H){const d=e.EpF();e.TgZ(0,"i",13),e.NdJ("click",function(ie){e.CHM(d);const ot=e.oxw(2);return ie.stopPropagation(),e.KtG(ot.resetZoom())}),e._uU(1,"unfold_less"),e.qZA()}2&H&&e.Q6J("@fadeInOutRotate",void 0)}function vE(H,s){if(1&H){const d=e.EpF();e.TgZ(0,"div",8)(1,"ion-range",9),e.NdJ("ionChange",function(ie){e.CHM(d);const ot=e.oxw();return e.KtG(ot.updateTransformScale(ie))}),e.TgZ(2,"ion-label",10),e._uU(3,"100%"),e.qZA(),e.TgZ(4,"ion-label",11),e._uU(5,"200%"),e.qZA()(),e.YNc(6,Pb,2,1,"i",12),e.qZA()}if(2&H){const d=e.oxw();e.Q6J("@fadeInOut",void 0),e.xp6(1),e.Q6J("value",d.zoomValue),e.xp6(5),e.Q6J("ngIf",d.zoomValue>1.5)}}Sp.\u0275fac=function(s){return new(s||Sp)(e.Y36(md),e.Y36(we.sK),e.Y36(qt.F0),e.Y36(qt.gz),e.Y36(Et.Ye),e.Y36(Ac))},Sp.\u0275dir=e.lG2({type:Sp,features:[e.qOj]}),function uv(H,s){s.forEach(d=>{Object.getOwnPropertyNames(d.prototype).forEach(k=>{"constructor"!==k&&(H.prototype[k]=d.prototype[k])})})}(Sp,[SC,AC,w_,class _E{controlRefresher(s){s&&s.target.complete()}}]);class mf extends Sp{constructor(s,d,k,ie,ot,Cn){super(s,d,k,ot,Cn,ie),this.notify=s,this.translate=d,this.router=k,this.modalCtrl=ie,this.route=ot,this.location=Cn,this.zoomEnabled=!1}handleMousemove(s){this.zoomEnabled||this.setTransformOrigin(s)}onResize(){const s=document.getElementById("image"),d=document.querySelector("ion-modal");s.style.height=this.height.toString()+"px",s.style.width=this.width.toString()+"px",s.style.maxHeight=(.8*d.clientHeight).toString()+"px",s.style.maxWidth=(.8*d.clientWidth).toString()+"px"}ngOnInit(){const s=new Image;s.src=this.attachment.contentBase64,s.onload=()=>{this.adjustImageDimensions(s),this.setImageStyles()}}adjustImageDimensions(s){const d=document.querySelector("ion-modal");this.height=.8*d.clientHeight>s.height?s.height:.8*d.clientHeight,this.width=.8*d.clientWidth>s.width?s.width:.8*d.clientWidth}setImageStyles(){const s=`url(${this.attachment.contentBase64})`,d=document.getElementById("image"),k=document.querySelector("ion-modal");d.style.backgroundImage=s,d.style.height=this.height.toString()+"px",d.style.width=this.width.toString()+"px",d.style.maxHeight=(.8*k.clientHeight).toString()+"px",d.style.maxWidth=(.8*k.clientWidth).toString()+"px",d.style.backgroundSize="contain",d.style.backgroundRepeat="no-repeat",d.style.backgroundPosition="center"}setTransformOrigin(s){const d=document.getElementById("image"),k=document.querySelector("ion-modal"),ie=Math.round(s.y-(k.clientHeight-this.height)/2),Cn=Math.round(s.x-(k.clientWidth-this.width)/2).toString().concat("px ")+ie.toString().concat("px");d.style.transformOrigin=Cn}updateTransformScale(s){const d=document.getElementById("image");this.zoomValue=s.detail.value,d.style.transform=`scale(${this.zoomValue})`}resetZoom(){this.zoomValue=1.5}toggleZoom(){this.zoomValue=1.5;const s=document.getElementById("image");let d;this.zoomEnabled?(d="zoom-in",s.style.transform="scale(1)"):(d="zoom-out",s.style.transform="scale(1.5)"),s.style.cursor=d,this.zoomEnabled=!this.zoomEnabled}handleCancelClick(){this.siviModalController.dismiss()}}mf.\u0275fac=function(s){return new(s||mf)(e.Y36(md),e.Y36(we.sK),e.Y36(qt.F0),e.Y36(Ac),e.Y36(qt.gz),e.Y36(Et.Ye))},mf.\u0275cmp=e.Xpm({type:mf,selectors:[["sivi-lib-image-preview-modal"]],hostBindings:function(s,d){1&s&&e.NdJ("mousemove",function(ie){return d.handleMousemove(ie)})("resize",function(ie){return d.onResize(ie)},!1,e.Jf7)},inputs:{attachment:"attachment"},features:[e.qOj],decls:5,vars:2,consts:[[1,"content"],["id","clickable"],["id","image",1,"image",3,"click"],["class","close-button","fill","clear","color","light","shape","round","no-min-width","","id","close-button","size","large",4,"ngIf"],["class","range",4,"ngIf"],["fill","clear","color","light","shape","round","no-min-width","","id","close-button","size","large",1,"close-button"],["id","close",1,"material-icons","close",3,"click"],["aria-hidden","true"],[1,"range"],["min","1.5","max","3","step","0.01","color","light",3,"value","ionChange"],["slot","start","color","light"],["slot","end","color","light"],["class","material-icons zoom","color","light","id","zoom",3,"click",4,"ngIf"],["color","light","id","zoom",1,"material-icons","zoom",3,"click"]],template:function(s,d){1&s&&(e.TgZ(0,"div",0)(1,"div",1)(2,"div",2),e.NdJ("click",function(){return d.toggleZoom()}),e.qZA(),e.YNc(3,Yv,5,4,"ion-button",3),e.YNc(4,vE,7,3,"div",4),e.qZA()()),2&s&&(e.xp6(3),e.Q6J("ngIf",!d.zoomEnabled),e.xp6(1),e.Q6J("ngIf",d.zoomEnabled))},dependencies:[Et.O5,Nt.YG,Nt.Q$,Nt.I_,Nt.QI,we.X$],styles:[".content[_ngcontent-%COMP%]{height:100%;display:flex;justify-content:center;align-items:center}.inner-scroll[_ngcontent-%COMP%]{background:transparent}#clickable[_ngcontent-%COMP%]{position:relative;padding-bottom:10px}input[type=checkbox][_ngcontent-%COMP%]{display:none}.image[_ngcontent-%COMP%]{transform:scale(1);transition:transform .2s;cursor:zoom-in}.close-button[_ngcontent-%COMP%]{position:fixed;margin-left:auto;margin-right:auto;width:40px;height:40px;font-size:20px;left:0;bottom:0;right:0}.close[_ngcontent-%COMP%]{box-shadow:1px 1px 4px #00000080;font-size:20px;padding:5px;color:var(--ion-color-dark);background:var(--ion-color-light);border-radius:50%}.zoom[_ngcontent-%COMP%]{cursor:pointer;margin-right:10px;font-size:22px;color:var(--ion-color-light);border-radius:5px}.test[_ngcontent-%COMP%]{padding:0}.range[_ngcontent-%COMP%]{display:flex;align-items:center;position:fixed;margin-left:auto;margin-right:auto;left:0;bottom:0;right:0;width:300px;border-radius:5px;box-shadow:1px 1px 4px #00000080;background:var(--ion-color-dark)}"],data:{animation:[(0,ce.X$)("fadeInOut",[(0,ce.eR)(":enter",[(0,ce.oB)({transform:"translateY(50px)",opacity:0}),(0,ce.jt)("400ms cubic-bezier(0.25, 0.69, 0.41, 1.01)",(0,ce.oB)({transform:"translateY(0%)",opacity:1}))]),(0,ce.eR)(":leave",[(0,ce.jt)("400ms cubic-bezier(0.25, 0.69, 0.41, 1.01)",(0,ce.oB)({transform:"translateY(20px)",opacity:0}))])]),(0,ce.X$)("fadeInOutRotate",[(0,ce.eR)(":enter",[(0,ce.oB)({transform:"rotate(90deg)",opacity:0}),(0,ce.jt)("300ms cubic-bezier(0.25, 0.69, 0.41, 1.01)",(0,ce.oB)({transform:"rotate(180deg)",opacity:1}))]),(0,ce.eR)(":leave",[(0,ce.oB)({transform:"rotate(180deg)"}),(0,ce.jt)("300ms cubic-bezier(0.25, 0.69, 0.41, 1.01)",(0,ce.oB)({transform:"rotate(90deg)",opacity:0}))])])]}});const Ob=function(H){return{margin:H}};class ep{constructor(s){this.sanitized=s,this.margin=!0}ngOnChanges(s){s.text.currentValue&&(this.textMarkup=this.sanitized.bypassSecurityTrustHtml(this.text))}ngAfterViewInit(){document.getElementById("formatted-text").onclick=function(s){if("A"===s.target.tagName)return window.open(s.target.href,"_blank","location=yes"),!1}}}ep.\u0275fac=function(s){return new(s||ep)(e.Y36(Ol.H7))},ep.\u0275cmp=e.Xpm({type:ep,selectors:[["sivi-lib-html-renderer"]],inputs:{text:"text",margin:"margin"},features:[e.TTD],decls:1,vars:4,consts:[["id","formatted-text",3,"ngClass","innerHTML"]],template:function(s,d){1&s&&e._UZ(0,"div",0),2&s&&e.Q6J("ngClass",e.VKq(2,Ob,d.margin))("innerHTML",d.textMarkup,e.oJD)},dependencies:[Et.mk],styles:[".margin[_ngcontent-%COMP%]{margin:1em}"]});class rd{}rd.\u0275fac=function(s){return new(s||rd)},rd.\u0275mod=e.oAB({type:rd}),rd.\u0275inj=e.cJS({imports:[Ga]});class Pf{get icon(){switch(this.type){case bh.WARNING:return"warning";case bh.SUCCESS:return"done";case bh.INFO:return"new_releases"}}get class(){switch(this.type){case bh.WARNING:return"warning";case bh.SUCCESS:return"success";case bh.INFO:return"info"}}}Pf.\u0275fac=function(s){return new(s||Pf)},Pf.\u0275cmp=e.Xpm({type:Pf,selectors:[["sivi-lib-info-message"]],inputs:{message:"message",type:"type"},decls:6,vars:6,consts:[[1,"box-wrapper",3,"ngClass"],[1,"icon-wrapper"],[1,"icon-base",3,"name","ngClass"],[1,"info-message"]],template:function(s,d){1&s&&(e.TgZ(0,"div",0)(1,"div",1),e._UZ(2,"cgi-icon",2),e.qZA(),e.TgZ(3,"p",3),e._uU(4),e.ALo(5,"translate"),e.qZA()()),2&s&&(e.Q6J("ngClass",d.class),e.xp6(2),e.Q6J("name",d.icon)("ngClass",d.class),e.xp6(2),e.Oqu(e.lcZ(5,4,d.message)))},dependencies:[Et.mk,we.X$],styles:[".box-wrapper[_ngcontent-%COMP%]{display:flex;flex-direction:row;justify-content:flex-start;align-items:stretch;border-radius:.5em}.box-wrapper.success[_ngcontent-%COMP%]{border:1px solid var(--ion-color-success)}.box-wrapper.warning[_ngcontent-%COMP%]{border:1px solid var(--ion-color-warning)}.box-wrapper.info[_ngcontent-%COMP%]{border:1px solid var(--ion-color-primary)}.icon-base[_ngcontent-%COMP%]{flex:1 0 0px;height:100%;justify-content:center;align-items:center;color:#fff;border-radius:.5em 0 0 .5em;width:100%}.icon-base.warning[_ngcontent-%COMP%]{background-color:var(--ion-color-warning)}.icon-base.success[_ngcontent-%COMP%]{background-color:var(--ion-color-success)}.icon-base.info[_ngcontent-%COMP%]{background-color:var(--ion-color-primary)}.icon-wrapper[_ngcontent-%COMP%]{display:flex;flex-direction:column;width:3em;align-items:center}.info-message[_ngcontent-%COMP%]{flex:1 0 0px;margin:1em;line-break:normal;line-height:1.5em;word-break:normal}"],changeDetection:0});class I_{}I_.\u0275fac=function(s){return new(s||I_)},I_.\u0275mod=e.oAB({type:I_}),I_.\u0275inj=e.cJS({imports:[Ga]});const yE=["timepicker"],Ry=["continueButton"];class t_{constructor(s,d){this.popoverCtrl=s,this.zone=d}ionViewDidEnter(){this.zone.runOutsideAngular(()=>{this.zone.onStable.asObservable().pipe((0,nt.P)()).subscribe(()=>{this.timepicker.nativeElement.focus()})})}continue(){var s=this;return(0,o.Z)(function*(){yield s.popoverCtrl.dismiss(s.value)})()}cancel(){var s=this;return(0,o.Z)(function*(){yield s.popoverCtrl.dismiss()})()}onSelectedChange(s){this.value=s,this.continueButton.nativeElement.shadowRoot.querySelector("button").focus()}}function Lb(H,s){if(1&H&&e._UZ(0,"ion-input",6),2&H){const d=e.oxw();e.Q6J("value",d.hiddenInputText)}}t_.\u0275fac=function(s){return new(s||t_)(e.Y36(Nt.Dh),e.Y36(e.R0b))},t_.\u0275cmp=e.Xpm({type:t_,selectors:[["sivi-lib-timepicker-popover"]],viewQuery:function(s,d){if(1&s&&(e.Gf(yE,5,e.SBq),e.Gf(Ry,5,e.SBq)),2&s){let k;e.iGM(k=e.CRH())&&(d.timepicker=k.first),e.iGM(k=e.CRH())&&(d.continueButton=k.first)}},inputs:{startAt:"startAt"},decls:12,vars:8,consts:[["type","time","startView","clock",3,"startAt","selectedChange"],["timepicker",""],[1,"buttons-wrapper","ion-justify-content-between"],["size","auto",1,"ion-no-padding"],["fill","outline","size","default","no-min-width","",3,"click"],["fill","solid","size","default","no-min-width","",3,"disabled","click"],["continueButton",""]],template:function(s,d){1&s&&(e.TgZ(0,"mtx-calendar",0,1),e.NdJ("selectedChange",function(ie){return d.onSelectedChange(ie)}),e.qZA(),e.TgZ(2,"ion-row",2)(3,"ion-col",3)(4,"ion-button",4),e.NdJ("click",function(){return d.cancel()}),e._uU(5),e.ALo(6,"translate"),e.qZA()(),e.TgZ(7,"ion-col",3)(8,"ion-button",5,6),e.NdJ("click",function(){return d.continue()}),e._uU(10),e.ALo(11,"translate"),e.qZA()()()),2&s&&(e.Q6J("startAt",d.startAt),e.xp6(5),e.hij(" ",e.lcZ(6,4,"General.Buttons.Cancel")," "),e.xp6(3),e.Q6J("disabled",!d.value),e.xp6(2),e.hij(" ",e.lcZ(11,6,"General.Buttons.Ok")," "))},dependencies:[Nt.YG,Nt.wI,Nt.Nd,fn,we.X$],styles:["ion-content[_ngcontent-%COMP%]{--padding: 8px;--padding-end: var(--padding);--padding-start: var(--padding)}ion-content[_ngcontent-%COMP%]   .item-icon[_ngcontent-%COMP%]{padding-right:var(--padding)}.popover-label[_ngcontent-%COMP%]{white-space:normal}.buttons-wrapper[_ngcontent-%COMP%]{margin:8px}"]});const bE=function(H,s){return{invalid:H,"no-events":s}};class dv extends Fp{set value(s){this.time=this.getTimeFromNumber(s)}get value(){return this.getNumberFromTime(this.time)}get valid(){return!this.time||this.isValidTime(this.time)}get tabindex(){return this.readonly?-1:0}constructor(s,d){super(),this.popoverCtrl=s,this.elRef=d,this.label="Label",this.readonly=!1,this.iconName="icon_clock.svg",this.hideInput=!1,this.valueChange=new e.vpe,this.timeFormat="H:mm"}onChange(s){const d=s.target.value;this.value=this.getNumberFromTime(d),this.dispatchSiviChange()}onInput(s){this.time=s.target.value}isValidTime(s){return!!s&&Nn(s,this.timeFormat).isValid()}dispatchFocus(){const s=new Event("focus",{bubbles:!0});this.elRef.nativeElement.dispatchEvent(s)}dispatchBlur(){const s=new Event("blur",{bubbles:!0});this.elRef.nativeElement.dispatchEvent(s)}dispatchSiviChange(){const s={name:this.name,value:this.value},d=new CustomEvent("siviChange",{detail:s,bubbles:!0});this.elRef.nativeElement.dispatchEvent(d),this.valueChange.emit(this.value)}openTimePicker(s){var d=this;return(0,o.Z)(function*(){try{const k=Nn(d.time,d.timeFormat),ie=yield d.popoverCtrl.create({component:t_,event:s,translucent:!1,componentProps:{startAt:k}});yield ie.present();const{data:ot}=yield ie.onDidDismiss();ot&&(d.value=d.getNumberFromTime(ot),d.dispatchSiviChange(),d.dispatchBlur())}catch(k){console.error(k)}})()}getNumberFromTime(s){if(!s)return null;if(!this.isValidTime(s))return NaN;const d=Nn(s,this.timeFormat).format(this.timeFormat);return Nn.duration(d,"minutes").asMinutes()}getTimeFromNumber(s){return(0,Vi.Z)(s)?null:isNaN(s)?this.time:Nn.utc().startOf("day").add(s,"minutes").format(this.timeFormat)}}dv.\u0275fac=function(s){return new(s||dv)(e.Y36(Nt.Dh),e.Y36(e.SBq))},dv.\u0275cmp=e.Xpm({type:dv,selectors:[["sivi-lib-timepicker"]],inputs:{name:"name",label:"label",readonly:"readonly",iconName:"iconName",hideInput:"hideInput",hiddenInputText:"hiddenInputText",value:"value"},outputs:{valueChange:"valueChange"},features:[e.qOj],decls:10,vars:21,consts:[[1,"ion-align-items-end","ion-no-padding",3,"ngClass"],["position","stacked",1,"label"],[3,"hidden","readonly","value","input","change","ionFocus","ionBlur"],["readonly","true",3,"value",4,"ngIf"],["siviKeyboardEvents","","slot","start",1,"icon-wrapper",3,"siviClick"],[1,"button",3,"alt","src"],["readonly","true",3,"value"]],template:function(s,d){1&s&&(e.TgZ(0,"ion-item",0),e.ALo(1,"translate"),e.TgZ(2,"ion-label",1),e._uU(3),e.ALo(4,"translate"),e.qZA(),e.TgZ(5,"ion-input",2),e.NdJ("input",function(ie){return d.onInput(ie)})("change",function(ie){return d.onChange(ie)})("ionFocus",function(){return d.dispatchFocus()})("ionBlur",function(){return d.dispatchBlur()}),e.qZA(),e.YNc(6,Lb,1,1,"ion-input",3),e.TgZ(7,"div",4),e.NdJ("siviClick",function(ie){return d.openTimePicker(ie)}),e._UZ(8,"img",5),e.ALo(9,"translate"),e.qZA()()),2&s&&(e.Q6J("ngClass",e.WLB(18,bE,!d.valid,d.readonly)),e.uIk("tabindex",d.tabindex)("aria-label",e.lcZ(1,12,d.label)),e.xp6(3),e.Oqu(e.lcZ(4,14,d.label)),e.xp6(2),e.Q6J("hidden",d.hideInput)("readonly",d.readonly)("value",d.time),e.uIk("tabindex",d.tabindex),e.xp6(1),e.Q6J("ngIf",d.hideInput&&d.hiddenInputText),e.xp6(1),e.uIk("tabindex",d.tabindex),e.xp6(1),e.MGl("src","/assets/icon/",d.iconName,"",e.LSH),e.Q6J("alt",e.lcZ(9,16,d.label)))},dependencies:[Et.mk,Et.O5,Nt.pK,Nt.Ie,Nt.Q$,Nt.j9,Kp,we.X$],styles:["[_nghost-%COMP%]{--icon-color: var(--ion-color-primary);--icon-size: 25px;--icon-margin-bottom: 8px;--label-margin: -30px}ion-item[_ngcontent-%COMP%]{overflow:visible;min-width:90px;--inner-padding-end: none;--min-height: 71px}ion-item[_ngcontent-%COMP%]   ion-input[_ngcontent-%COMP%]{align-self:flex-start}ion-item[_ngcontent-%COMP%]   ion-label.label[_ngcontent-%COMP%]{max-width:60px;text-overflow:initial;overflow:initial}ion-label.label[_ngcontent-%COMP%]{margin-left:var(--label-margin)}.icon-wrapper[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;width:var(--icon-size);height:var(--icon-size);max-width:var(--icon-size);max-height:var(--icon-size);min-width:var(--icon-size);min-height:var(--icon-size);margin-inline-end:6px;margin-bottom:var(--icon-margin-bottom)}.icon-wrapper[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{color:var(--icon-color);width:100%;max-width:100%;height:100%;max-height:100%}.invalid[_ngcontent-%COMP%]{--border-color: var(--ion-color-danger);--highlight-background: var(--ion-color-danger)}.no-events[_ngcontent-%COMP%]{pointer-events:none!important}"]});class Hv{}Hv.\u0275fac=function(s){return new(s||Hv)},Hv.\u0275mod=e.oAB({type:Hv}),Hv.\u0275inj=e.cJS({imports:[Ga,Ve.UX,Bu,ii.lN,hi.c,Mm,Yd]});class xg{constructor(s){this._dateAdapter=s}selectionFinished(s){return this._createSevenDayRange(s)}createPreview(s){return this._createSevenDayRange(s)}_createSevenDayRange(s){if(s){const d=this._dateAdapter.toIso8601(s),k=Nn(d).isoWeekday()-1,ie=Nn(s).subtract(k,"days").format(),ot=Nn(ie).add(6,"days").format();return new $r(this._dateAdapter.parse(ie,as.STANDARD),this._dateAdapter.parse(ot,as.STANDARD))}return new $r(null,null)}}xg.\u0275fac=function(s){return new(s||xg)(e.LFG(gn._A))},xg.\u0275prov=e.Yz7({token:xg,factory:xg.\u0275fac});class Dg{transform(s){const d=s?.start,k=s?.end;if(!d||!k)return!1;return d.isoWeek()===k.isoWeek()}}Dg.\u0275fac=function(s){return new(s||Dg)},Dg.\u0275pipe=e.Yjl({name:"siviRangeValidity",type:Dg,pure:!0});class Vv{constructor(s,d){this.rangeValidityPipe=s,this.translate=d}transform(s){const d=this.translate.instant("General.Text.Week"),k=this.translate.instant("General.Text.ChooseWeek");return this.rangeValidityPipe.transform(s)?`${d} `+Nn(s.start).isoWeek():k}}Vv.\u0275fac=function(s){return new(s||Vv)(e.Y36(Dg,16),e.Y36(we.sK,16))},Vv.\u0275pipe=e.Yjl({name:"siviWeekInfo",type:Vv,pure:!0});const b0={parse:{dateInput:as.STANDARD},display:{dateInput:as.FINNISH_MOMENT,monthYearLabel:"YYYY",dateA11yLabel:"LL",monthYearA11yLabel:"YYYY"}};class Zv extends Fp{set value(s){this.patchForm(s)}get value(){return this._value}get currentWeekEnd(){return Nn().endOf("isoWeek")}get canSelectNextWeek(){const s=Nn().startOf("isoWeek"),d=Nn(this.form.value.end).endOf("isoWeek");return this.rangeValidityPipe.transform(this.form.value)&&this.futureWeeksSelectable||d.isBefore(s)}get rangeStart(){return this.form.get("start").value}get rangeEnd(){return this.form.get("end").value}constructor(s,d,k){super(),this.translate=s,this.rangeValidityPipe=d,this.dateAdapter=k,this.futureWeeksSelectable=!0,this.siviChange=new e.vpe,this.form=new Ve.nJ({start:new Ve.p4,end:new Ve.p4}),this.valueChangesDebounceTime=50}ngOnInit(){this.dateAdapter.setLocale(co.getFixedLocale(this.translate.currentLang)),this.listenFormValueChanges()}listenFormValueChanges(){this.form.valueChanges.pipe((0,me.b)(this.valueChangesDebounceTime),(0,j.R)(this.destroy$)).subscribe(({start:s,end:d})=>{this._value={start:s?.format(as.STANDARD),end:d?.format(as.STANDARD)},this.siviChange.emit(this.value)})}oneWeekLess(){this.form.patchValue({start:this.rangeStart.subtract(1,"w"),end:this.rangeEnd.subtract(1,"w")})}oneWeekMore(){this.form.patchValue({start:this.rangeStart.add(1,"w"),end:this.rangeEnd.add(1,"w")})}patchForm(s){this.form.patchValue({start:Nn(s.start),end:Nn(s.end)})}}Zv.\u0275fac=function(s){return new(s||Zv)(e.Y36(we.sK),e.Y36(Dg),e.Y36(gn._A))},Zv.\u0275cmp=e.Xpm({type:Zv,selectors:[["sivi-lib-weekpicker"]],inputs:{value:"value",futureWeeksSelectable:"futureWeeksSelectable"},outputs:{siviChange:"siviChange"},features:[e._Bn([{provide:gn._A,useClass:wn,deps:[gn.Ad,un]},{provide:gn.sG,useValue:b0},{provide:ti,useClass:xg}]),e.qOj],decls:16,vars:12,consts:[[1,"week-picker"],["no-min-width","","fill","clear","size","small","shape","round",3,"disabled","click"],["aria-hidden","false","aria-label","One week less"],[1,"week-picker-text","ion-text-nowrap",3,"click"],["aria-hidden","false","aria-label","One week more"],[3,"max","formGroup","rangePicker"],["matStartDate","","formControlName","start"],["matEndDate","","formControlName","end"],["picker",""]],template:function(s,d){if(1&s){const k=e.EpF();e.TgZ(0,"div",0)(1,"ion-button",1),e.NdJ("click",function(){return d.oneWeekLess()}),e.ALo(2,"siviRangeValidity"),e.TgZ(3,"mat-icon",2),e._uU(4," chevron_left "),e.qZA()(),e.TgZ(5,"button",3),e.NdJ("click",function(){e.CHM(k);const ot=e.MAs(15);return e.KtG(ot.open())}),e._uU(6),e.ALo(7,"siviWeekInfo"),e.qZA(),e.TgZ(8,"ion-button",1),e.NdJ("click",function(){return d.oneWeekMore()}),e.TgZ(9,"mat-icon",4),e._uU(10," chevron_right "),e.qZA()(),e.TgZ(11,"mat-date-range-input",5),e._UZ(12,"input",6)(13,"input",7),e.qZA(),e._UZ(14,"mat-date-range-picker",null,8),e.qZA()}if(2&s){const k=e.MAs(15);e.xp6(1),e.Q6J("disabled",!e.lcZ(2,8,d.form.value)),e.xp6(5),e.hij(" ",e.lcZ(7,10,d.form.value)," "),e.xp6(2),e.Q6J("disabled",!d.canSelectNextWeek),e.xp6(3),e.Udp("visibility","hidden"),e.Q6J("max",d.futureWeeksSelectable?null:d.currentWeekEnd)("formGroup",d.form)("rangePicker",k)}},dependencies:[Nt.YG,am.Hw,Us,ia,$o,Ka,Ve.Fj,Ve.JJ,Ve.JL,Ve.sg,Ve.u,Vv,Dg],styles:["mat-date-range-input[_ngcontent-%COMP%]{height:0;width:0}.week-picker[_ngcontent-%COMP%]{display:flex;flex:0 1 auto;align-items:center;justify-content:center;min-width:180px}.week-picker[_ngcontent-%COMP%]   .week-picker-text[_ngcontent-%COMP%]{min-width:80px}"]});class Of{}Of.\u0275fac=function(s){return new(s||Of)},Of.\u0275mod=e.oAB({type:Of}),Of.\u0275inj=e.cJS({providers:[Dg],imports:[Ga,am.Ps,hl,Ve.UX]});class tg{}tg.\u0275fac=function(s){return new(s||tg)},tg.\u0275cmp=e.Xpm({type:tg,selectors:[["sivi-lib-warning-container"]],inputs:{icon:"icon",label:"label"},decls:8,vars:4,consts:[[1,"warning-container"],["aria-hidden","false"]],template:function(s,d){1&s&&(e.TgZ(0,"ion-row")(1,"ion-col")(2,"div",0)(3,"mat-icon",1),e._uU(4),e.qZA(),e.TgZ(5,"ion-label"),e._uU(6),e.ALo(7,"translate"),e.qZA()()()()),2&s&&(e.xp6(4),e.Oqu(d.icon),e.xp6(2),e.Oqu(e.lcZ(7,2,d.label)))},dependencies:[Nt.wI,Nt.Q$,Nt.Nd,am.Hw,we.X$],styles:[".warning-container[_ngcontent-%COMP%]{display:flex;border:1px solid var(--ion-color-warning);background-color:var(--ion-color-warning-contrast);color:var(--ion-color-warning);padding:16px;margin:16px;border-radius:3px;min-height:56px}.warning-container[_ngcontent-%COMP%]   mat-icon[_ngcontent-%COMP%]{margin-right:16px}.warning-container[_ngcontent-%COMP%]   mat-icon[_ngcontent-%COMP%], .warning-container[_ngcontent-%COMP%]   ion-label[_ngcontent-%COMP%]{vertical-align:middle}"],changeDetection:0});class Ih{}function Lf(H,s){if(1&H&&(e.TgZ(0,"div",5),e._UZ(1,"cgi-input",6),e.qZA()),2&H){const d=s.index,k=e.oxw(3);e.xp6(1),e.Q6J("viewMode",k.viewMode)("label",k.label)("value",k.options[d].element.text)}}function CE(H,s){if(1&H&&(e.TgZ(0,"div"),e.YNc(1,Lf,2,3,"div",4),e.qZA()),2&H){const d=e.oxw(2);e.xp6(1),e.Q6J("ngForOf",d.availableSelectableValues)("ngForTrackBy",d.trackByFnIndex)}}function Fy(H,s){if(1&H){const d=e.EpF();e.TgZ(0,"ion-row",8)(1,"ion-col",1)(2,"cgi-autocomplete",9),e.NdJ("valueChange",function(ie){const Cn=e.CHM(d).index,ir=e.oxw(3);return e.KtG(ir.onValueChange(ie,Cn))}),e.ALo(3,"translate"),e.ALo(4,"translate"),e.ALo(5,"translate"),e.ALo(6,"translate"),e.ALo(7,"translate"),e.qZA()()()}if(2&H){const d=s.index,k=e.oxw(3);e.xp6(2),e.Q6J("multiSelect",!1)("options",k.options)("value",k.selectedItems[d])("placeholderImage",k.placeholderImage)("placeholder",e.lcZ(3,9,"ECEC.Application.Instructions.AnyDaycarePlace"))("selectAllText",e.lcZ(4,11,"General.Buttons.SelectAll"))("removeAllText",e.lcZ(5,13,"General.Buttons.RemoveAll"))("allSelectedText",e.lcZ(6,15,"Conversation.Recipients.AllSelected"))("noItemsText",e.lcZ(7,17,"Conversation.Recipients.NoRecipients"))}}function g1(H,s){if(1&H&&e.YNc(0,Fy,8,19,"ion-row",7),2&H){const d=e.oxw(2);e.Q6J("ngForOf",d.availableSelectableValues)("ngForTrackBy",d.trackByFnIndex)}}function _1(H,s){if(1&H&&(e.TgZ(0,"ion-grid",1),e.YNc(1,CE,2,2,"div",2),e.YNc(2,g1,1,2,"ng-template",null,3,e.W1O),e.qZA()),2&H){const d=e.MAs(3),k=e.oxw();e.xp6(1),e.Q6J("ngIf",k.viewMode)("ngIfElse",d)}}Ih.\u0275fac=function(s){return new(s||Ih)},Ih.\u0275mod=e.oAB({type:Ih}),Ih.\u0275inj=e.cJS({imports:[Ga,am.Ps]});class Gv extends Js{constructor(s){super(),this.translate=s,this.options=[],this.viewMode=!1,this.preventEmitingSameValue=!1,this.selectionChange=new e.vpe,this.objectKeys=["id","organizationActivityFocuses","organizationLanguageFocuses"],this.viewLoaded=!1}ngOnInit(){this.updateOptions()}ngOnChanges(){this.updateOptions()}updateOptions(){const s=Math.min(this.selectableValues,this.options.length);this.availableSelectableValues=Array.from(Array(s).keys()),this.selectedItems=[...this.getPreferences(this.options,this.availableSelectableValues.length)],this.options=[...this.options]}onValueChange(s,d){let k=s.detail.value;if(this.availableSelectableValues.length>1)s.detail.value&&s.detail.value.length&&this.reorderSelectedItems(s,d),k=(0,Zi.Z)(this.selectedItems);else if(this.preventEmitingSameValue&&(0,Ne.Z)(k[0],this.options[0]?.value))return;this.selectionChange.emit(k)}reorderSelectedItems(s,d){const k=this.selectedItems,ie=s.detail.value,ot=[...this.selectedItems[d]],Cn=this.findDuplicate(ie);k.splice(d,1,ie),Cn>-1&&this.selectedItems.length>=2&&k.splice(Cn,1,ot),this.selectedItems=[...k]}findDuplicate(s){return this.selectedItems.findIndex(d=>co.compareObjectProperties(d[0],s[0],this.objectKeys))}getPreferences(s,d){const k=[];for(let ie=0;ie<d;ie++)k.push([s[ie].value]);return k}}Gv.\u0275fac=function(s){return new(s||Gv)(e.Y36(we.sK))},Gv.\u0275cmp=e.Xpm({type:Gv,selectors:[["sivi-lib-autocomplete-group-select"]],inputs:{options:"options",viewMode:"viewMode",placeholderImage:"placeholderImage",label:"label",selectableValues:"selectableValues",preventEmitingSameValue:"preventEmitingSameValue"},outputs:{selectionChange:"selectionChange"},features:[e.qOj,e.TTD],decls:1,vars:1,consts:[["class","ion-no-padding",4,"ngIf"],[1,"ion-no-padding"],[4,"ngIf","ngIfElse"],["viewModeOff",""],["class","viewmode",4,"ngFor","ngForOf","ngForTrackBy"],[1,"viewmode"],["type","text","label-position","floating",3,"viewMode","label","value"],["class","ion-margin-bottom",4,"ngFor","ngForOf","ngForTrackBy"],[1,"ion-margin-bottom"],[3,"multiSelect","options","value","placeholderImage","placeholder","selectAllText","removeAllText","allSelectedText","noItemsText","valueChange"]],template:function(s,d){1&s&&e.YNc(0,_1,4,2,"ion-grid",0),2&s&&e.Q6J("ngIf",(null==d.options?null:d.options.length)>0)},dependencies:[Nt.wI,Nt.jY,Nt.Nd,Et.sg,Et.O5,we.X$],encapsulation:2,changeDetection:0});class zp{}zp.\u0275fac=function(s){return new(s||zp)},zp.\u0275mod=e.oAB({type:zp}),zp.\u0275inj=e.cJS({imports:[cf,Yd,wd,Ga,wd,cf,Yd,Nt.Pc,Et.ez,Ve.u5,we.aw,Jc,zd]});class Ny{}Ny.\u0275fac=function(s){return new(s||Ny)},Ny.\u0275mod=e.oAB({type:Ny}),Ny.\u0275inj=e.cJS({imports:[zp]});class kb{constructor(){this.update=new e.vpe}getCheckedStatus(){return this.checked}onToggleChecked(s){const d={name:this.name,value:s.detail.checked},k=new CustomEvent("siviChange",{detail:d,bubbles:!0});this.update.emit(k)}}kb.\u0275fac=function(s){return new(s||kb)},kb.\u0275cmp=e.Xpm({type:kb,selectors:[["sivi-lib-checkbox-toggle"]],inputs:{viewMode:"viewMode",label:"label",name:"name",checked:"checked"},outputs:{update:"update"},decls:5,vars:5,consts:[["lines","none",1,"checkbox","ion-no-padding"],["color","primary",3,"disabled","checked","ionChange"],[1,"ion-margin-start"]],template:function(s,d){1&s&&(e.TgZ(0,"ion-item",0)(1,"ion-checkbox",1),e.NdJ("ionChange",function(ie){return d.onToggleChecked(ie)}),e.qZA(),e.TgZ(2,"ion-label",2),e._uU(3),e.ALo(4,"translate"),e.qZA()()),2&s&&(e.xp6(1),e.Q6J("disabled",d.viewMode)("checked",d.getCheckedStatus()),e.xp6(2),e.Oqu(e.lcZ(4,3,d.label)))},dependencies:[Nt.nz,Nt.Ie,Nt.Q$,Nt.w,we.X$],styles:["ion-label[_ngcontent-%COMP%]{white-space:pre-line!important}"]});class By{}By.\u0275fac=function(s){return new(s||By)},By.\u0275mod=e.oAB({type:By}),By.\u0275inj=e.cJS({imports:[zp]});const v1=["searchbar"];function EE(H,s){if(1&H){const d=e.EpF();e.TgZ(0,"ion-button",4),e.NdJ("click",function(){e.CHM(d);const ie=e.oxw();return e.KtG(ie.toggleSearchbar())}),e.TgZ(1,"i",5),e.ALo(2,"translate"),e.TgZ(3,"span",6),e._uU(4,"search"),e.qZA()()()}2&H&&(e.xp6(1),e.uIk("aria-label",e.lcZ(2,1,"General.Buttons.Search")))}function Rb(H,s){if(1&H&&(e.TgZ(0,"ion-item"),e._UZ(1,"cgi-input",7),e.qZA()),2&H){const d=e.oxw();e.xp6(1),e.Q6J("viewMode",d.viewMode)("label",d.searchLabel)("value",d.inputValue)}}const ME=function(){return{standalone:!0}};function TE(H,s){if(1&H){const d=e.EpF();e.TgZ(0,"ion-input",15,16),e.NdJ("ngModelChange",function(ie){e.CHM(d);const ot=e.oxw(2);return e.KtG(ot.inputValue=ie)})("ionInput",function(ie){e.CHM(d);const ot=e.oxw(2);return e.KtG(ot.onSearch(ie))})("ionBlur",function(){e.CHM(d);const ie=e.oxw(2);return e.KtG(ie.closeEmptySearchbar())})("ionClear",function(){e.CHM(d);const ie=e.oxw(2);return e.KtG(ie.closeSearchbar())}),e.qZA()}if(2&H){const d=e.oxw(2);e.Q6J("spellcheck",!1)("animated",!1)("ngModel",d.inputValue)("ngModelOptions",e.DdM(4,ME))}}function y1(H,s){1&H&&(e.TgZ(0,"div",17),e._UZ(1,"ion-spinner",18),e.qZA())}function wC(H,s){if(1&H&&(e.TgZ(0,"ion-row",8)(1,"ion-col",9)(2,"ion-item",10)(3,"ion-label",11),e._uU(4),e.ALo(5,"translate"),e.qZA(),e.YNc(6,TE,2,5,"ion-input",12),e.qZA()(),e.TgZ(7,"ion-col",13),e.YNc(8,y1,2,0,"div",14),e.qZA()()),2&H){const d=e.oxw();e.xp6(4),e.hij(" ",e.lcZ(5,3,d.searchLabel),""),e.xp6(2),e.Q6J("ngIf","open"===d.searchbarState),e.xp6(2),e.Q6J("ngIf",d.loadingResults)}}class pv extends Js{constructor(s,d,k,ie,ot){super(),this.popoverCtrl=s,this.organizationService=d,this.translate=k,this.elementRef=ie,this.platform=ot,this.alwaysOpen=!1,this.searchKeyword=new e.vpe,this.selectedResult=new e.vpe,this.siviChange=new e.vpe,this.searchbarState="closed",this.loadingResults=!1,this.searchResults=[],this.search$=new l.x,this.setSearchbarStateForView(this.alwaysOpen),this.bindSearchByInput()}setSearchbarStateForView(s){s?this.searchbarState="open":this.closeEmptySearchbar()}onSearch(s){(0,Hn.Z)(this.searchbar,"value").length>=3?(this.loadingResults=!0,this.search$.next({value:this.searchbar.value,event:s})):(this.clearResultsList(),this.closeResultsPopover().then(()=>this.setFocusOnSearchbar()))}bindSearchByInput(){this.search$.pipe((0,me.b)(500),(0,be.x)(),(0,Z.b)(()=>this.scrollTop()),(0,j.R)(this.destroy$)).subscribe(s=>{this.inputFieldEvent=s.event,this.searchKeyword.emit(s.value),this.loadingResults=!1})}scrollTop(){const s=document.querySelector("#row");s&&s.scrollIntoView(!0)}displayResults(s,d){if(d=d||this.inputFieldEvent,"closed"!==this.searchbarState){if(!s)return void this.displayError(d);if(0===s.length)return void this.displayNoResults(d);if(this.popoverIsVisible()){this.clearResultsList();for(const k of s)this.searchResults.push(k)}else this.presentPopover(s,d).then(()=>this.setFocusOnSearchbar())}}popoverIsVisible(){return this.popover&&this.popover.isConnected}clearResultsList(){this.searchResults.splice(0,this.searchResults.length)}displayError(s){this.displayResults([{id:"",text:this.translate.instant("Message.Error.UnknownError")}],s)}displayNoResults(s){this.displayResults([{id:"",text:this.translate.instant("Message.Error.NoContent.Title")}],s)}presentPopover(s,d){var k=this;return(0,o.Z)(function*(){return k.searchResults=s,k.popover=yield k.popoverCtrl.create({component:pm,event:d,cssClass:"common-searchbar-results-popover",backdropDismiss:!0,showBackdrop:!1,animated:!1,componentProps:{items:k.searchResults}}),k.popover.onDidDismiss().then(ie=>{const ot=ie.data;ot&&k.selectedResult.emit(ot)}),yield k.popover.present()})()}closeResultsPopover(){return this.popover?this.popover.dismiss():Promise.resolve(!0)}openSearchbar(){this.searchbarState="open",this.searchbar&&this.setFocusOnSearchbar()}closeSearchbar(){this.alwaysOpen||(this.searchbarState="closed"),this.popover&&this.popover.dismiss()}toggleSearchbar(){this.alwaysOpen&&"open"===this.searchbarState||("closed"===this.searchbarState?this.openSearchbar():this.closeSearchbar())}closeEmptySearchbar(){this.searchbar&&""===(this.inputValue||"").trim()&&this.closeSearchbar()}setFocusOnSearchbar(){var s=this;return(0,o.Z)(function*(){s.searchbar&&s.searchbar.setFocus&&s.searchbar.setFocus()})()}ngOnChanges(s){s.alwaysOpen&&this.setSearchbarStateForView(s.alwaysOpen.currentValue)}setValue(s){this.inputValue=s}ngOnDestroy(){this.closeResultsPopover()}}pv.\u0275fac=function(s){return new(s||pv)(e.Y36(Nt.Dh),e.Y36(Qc),e.Y36(we.sK),e.Y36(e.SBq),e.Y36(Nt.t4))},pv.\u0275cmp=e.Xpm({type:pv,selectors:[["sivi-lib-common-searchbar"]],viewQuery:function(s,d){if(1&s&&e.Gf(v1,5),2&s){let k;e.iGM(k=e.CRH())&&(d.searchbar=k.first)}},inputs:{alwaysOpen:"alwaysOpen",searchLabel:"searchLabel",name:"name",viewMode:"viewMode"},outputs:{searchKeyword:"searchKeyword",selectedResult:"selectedResult",siviChange:"siviChange"},features:[e.qOj,e.TTD],decls:5,vars:3,consts:[["class","searchbar-icon-only","size","small","clear","","no-min-width","",3,"click",4,"ngIf"],["autocomplete","off"],[4,"ngIf","ngIfElse"],["viewModeOff",""],["size","small","clear","","no-min-width","",1,"searchbar-icon-only",3,"click"],[1,"material-icons"],["aria-hidden","true"],["type","text",3,"viewMode","label","value"],["id","row",1,"ion-no-padding"],["size","11",1,"ion-no-padding"],[1,"ion-no-padding","z-0"],["position","floating",2,"opacity","1"],["class","searchbar-extended","placeholder","","showCancelButton","false","autocomplete","off","autocorrect","off","autocapitalize","off",3,"spellcheck","animated","ngModel","ngModelOptions","ngModelChange","ionInput","ionBlur","ionClear",4,"ngIf"],["size","1"],["class","spinner",4,"ngIf"],["placeholder","","showCancelButton","false","autocomplete","off","autocorrect","off","autocapitalize","off",1,"searchbar-extended",3,"spellcheck","animated","ngModel","ngModelOptions","ngModelChange","ionInput","ionBlur","ionClear"],["searchbar",""],[1,"spinner"],["color","secondary"]],template:function(s,d){if(1&s&&(e.YNc(0,EE,5,3,"ion-button",0),e.TgZ(1,"form",1),e.YNc(2,Rb,2,3,"ion-item",2),e.YNc(3,wC,9,5,"ng-template",null,3,e.W1O),e.qZA()),2&s){const k=e.MAs(4);e.Q6J("ngIf","closed"===d.searchbarState),e.xp6(2),e.Q6J("ngIf",d.viewMode)("ngIfElse",k)}},dependencies:[Nt.YG,Nt.wI,Nt.pK,Nt.Ie,Nt.Q$,Nt.Nd,Nt.PQ,Nt.j9,Et.O5,Ve._Y,Ve.JJ,Ve.JL,Ve.On,Ve.F,we.X$],styles:["sivi-lib-common-searchbar .z-0{z-index:0}sivi-lib-common-searchbar .searchbar-extended{padding:8px;text-align:start}sivi-lib-common-searchbar .searchbar-extended .searchbar-input{font-size:14px;line-height:22px}sivi-lib-common-searchbar .searchbar-extended .searchbar-search-icon{top:7px}.fill{height:4px}.spinner{position:absolute;top:53%;transform:translate(-40px)}.warning-date cgi-icon{color:var(--ion-color-secondary)}\n"],encapsulation:2});class ng{}ng.\u0275fac=function(s){return new(s||ng)},ng.\u0275mod=e.oAB({type:ng}),ng.\u0275inj=e.cJS({imports:[zp]});class Uy extends Js{constructor(){super(),this.clickDocument=new e.vpe}onClickDocument(){this.clickDocument.emit(this.documentId)}}Uy.\u0275fac=function(s){return new(s||Uy)},Uy.\u0275cmp=e.Xpm({type:Uy,selectors:[["sivi-lib-document-component"]],inputs:{title:"title",documentId:"documentId"},outputs:{clickDocument:"clickDocument"},features:[e.qOj],decls:4,vars:1,consts:[["tabindex","0","siviKeyboardEvents","",1,"document",3,"click"],["name","content_copy"]],template:function(s,d){1&s&&(e.TgZ(0,"div",0),e.NdJ("click",function(){return d.onClickDocument()}),e._UZ(1,"cgi-icon",1),e.TgZ(2,"span"),e._uU(3),e.qZA()()),2&s&&(e.xp6(3),e.Oqu(d.title))},dependencies:[Kp],styles:["[_nghost-%COMP%]{margin:.5em;padding:.5em}[_nghost-%COMP%]   cgi-icon[_ngcontent-%COMP%]{display:flex;justify-content:center;margin-bottom:.5em}[_nghost-%COMP%]   .document[_ngcontent-%COMP%]{cursor:pointer}"]});class Sg{}function xE(H,s){if(1&H&&(e.TgZ(0,"ion-row"),e._uU(1),e.qZA()),2&H){const d=e.oxw();e.Tol(d.styleClass),e.xp6(1),e.hij(" ",d.text,"\n")}}Sg.\u0275fac=function(s){return new(s||Sg)},Sg.\u0275mod=e.oAB({type:Sg}),Sg.\u0275inj=e.cJS({imports:[zp]});class Fb extends Js{constructor(){super(),this.styleClass="",this.text=""}}Fb.\u0275fac=function(s){return new(s||Fb)},Fb.\u0275cmp=e.Xpm({type:Fb,selectors:[["sivi-lib-empty-array-message"]],inputs:{styleClass:"styleClass",text:"text",array:"array"},features:[e.qOj],decls:1,vars:1,consts:[[3,"class",4,"ngIf"]],template:function(s,d){1&s&&e.YNc(0,xE,2,3,"ion-row",0),2&s&&e.Q6J("ngIf",0===(null==d.array?null:d.array.length))},dependencies:[Nt.Nd,Et.O5],encapsulation:2});class mv{}function b1(H,s){if(1&H){const d=e.EpF();e.TgZ(0,"ion-col",11)(1,"ion-item",7)(2,"ion-checkbox",12),e.NdJ("ionChange",function(ie){e.CHM(d);const ot=e.oxw(2);return e.KtG(ot.onUpdateLanguageCheckbox(ie))}),e.qZA(),e.TgZ(3,"ion-label",9),e._uU(4),e.ALo(5,"translate"),e.qZA()()()}if(2&H){const d=s.$implicit,k=e.oxw(2);e.xp6(2),e.Q6J("disabled",k.disabled)("name",d.text)("value",d.value)("checked",k.getCheckboxValue(d)),e.xp6(2),e.Oqu(e.lcZ(5,5,d.text))}}function C1(H,s){if(1&H){const d=e.EpF();e.TgZ(0,"ion-col",13)(1,"cgi-autocomplete",14),e.NdJ("valueChange",function(ie){e.CHM(d);const ot=e.oxw(2);return e.KtG(ot.onChangeOtherLanguageDebounced(ie))}),e.ALo(2,"async"),e.ALo(3,"translate"),e.ALo(4,"translate"),e.ALo(5,"translate"),e.qZA()()}if(2&H){const d=e.oxw(2);e.xp6(1),e.Q6J("value",e.lcZ(2,7,d.selectedOtherLanguages$))("multiSelect",!0)("options",d.otherLanguageOptions)("placeholderImage","")("selectAllText",e.lcZ(3,9,"General.Buttons.SelectAll"))("removeAllText",e.lcZ(4,11,"General.Buttons.RemoveAll"))("placeholder",e.lcZ(5,13,"Organization.Educational.ChooseLanguage"))}}function IC(H,s){if(1&H){const d=e.EpF();e.ynx(0),e.TgZ(1,"cgi-validator",1,2)(3,"ion-grid",3)(4,"ion-row")(5,"ion-col")(6,"ion-label",4),e._uU(7),e.ALo(8,"translate"),e.qZA()()(),e.TgZ(9,"ion-row"),e.YNc(10,b1,6,7,"ion-col",5),e.TgZ(11,"ion-col",6)(12,"ion-item",7)(13,"ion-checkbox",8),e.NdJ("ionChange",function(ie){e.CHM(d);const ot=e.oxw();return e.KtG(ot.onChangeOtherCheckbox(ie))}),e.qZA(),e.TgZ(14,"ion-label",9),e._uU(15),e.ALo(16,"translate"),e.qZA()()(),e.YNc(17,C1,6,15,"ion-col",10),e.qZA()()(),e.BQk()}if(2&H){const d=e.oxw();e.xp6(1),e.Q6J("validatorOptions",d.validatorOptions),e.xp6(6),e.hij(" ",e.lcZ(8,8,"General.Language.Singular")," "),e.xp6(3),e.Q6J("ngForOf",d.defaultOptions)("ngForTrackBy",d.trackByFn),e.xp6(3),e.Q6J("disabled",d.disabled)("checked",d.otherChecked),e.xp6(2),e.Oqu(e.lcZ(16,10,"General.Other")),e.xp6(2),e.Q6J("ngIf",d.otherChecked)}}function PC(H,s){if(1&H&&(e.ynx(0),e._UZ(1,"cgi-input",15),e.BQk()),2&H){const d=e.oxw();e.xp6(1),e.Q6J("viewMode",d.readonly)("value",d.readonlyValue)}}mv.\u0275fac=function(s){return new(s||mv)},mv.\u0275mod=e.oAB({type:mv}),mv.\u0275inj=e.cJS({imports:[zp]});class n_ extends Qf{set languages(s){s&&(this.selectedLanguages=s.map(d=>d.toUpperCase()),this.filterOtherLanguage())}constructor(s,d,k,ie){super(s),this.translate=s,this.notify=d,this.languageService=k,this.elementRef=ie,this.readonly=!1,this.update=new e.vpe,this.selectedLanguages=[],this.selectedOtherLanguages$=new l.x,this.otherChecked=!1,this.readonlyValue="",this.defaultOptions=[{value:"FI",text:"General.Language.Finnish"},{value:"SV",text:"General.Language.Swedish"},{value:"EN",text:"General.Language.English"}],this.defaultLanguages=["FI","SV","EN"],this.onChangeOtherLanguageDebounced=Yt(this.onChangeOtherLanguage.bind(this),300)}ngOnInit(){this.filterOtherLanguage(),this.getOtherLanguageOptions()}emitValues(s){this.update.emit(s);const d={name:this.name,value:s},k=new CustomEvent("siviChange",{detail:d,bubbles:!0});this.elementRef.nativeElement.dispatchEvent(k)}onUpdateLanguageCheckbox(s){if(!this.selectedLanguages)return void console.error("onUpdateLanguageCheckbox: languages are not set");const d=s.detail;this.selectedLanguages.find(ie=>ie===d.value)?(0,oi.Z)(this.selectedLanguages,ie=>ie.toUpperCase()===d.value):this.selectedLanguages=[...this.selectedLanguages,d.value],this.emitValues(this.selectedLanguages)}updateLanguages(s){if(this.selectedLanguages){if(s)if(this.otherChecked){const d=this.removeOtherLanguages(this.selectedLanguages);this.selectedLanguages=[...d,...s]}else{const d=this.removeOtherLanguages(this.selectedLanguages);this.selectedLanguages=[...d]}this.emitValues(this.selectedLanguages)}else console.error("updateLanguages: languages are not set")}removeOtherLanguages(s){return s.filter(d=>this.defaultLanguages.includes(d.toUpperCase()))}onChangeOtherCheckbox(s){const d=s.detail.checked;this.otherChecked=d,d?this.updateLanguages():this.updateLanguages(this.otherLanguage),this.otherLanguage=[],this.validatorOptions=this.getValidatorOptions()}onChangeOtherLanguage(s){this.selectedOtherLanguages$.next(s.detail.value);const d=s.detail.value.map(({code:k})=>k.toUpperCase());this.otherLanguage=d,this.updateLanguages(d)}filterOtherLanguage(){const s=this.selectedLanguages.filter(d=>{const k=!this.defaultLanguages.includes(d.toUpperCase());return k&&(this.otherChecked=!0),k});this.readonly&&(this.readonlyValue=this.languageService.getLanguagesText(this.selectedLanguages)),this.otherLanguage=s?s.map(d=>d.toUpperCase()):[]}getCheckboxValue(s){if(!this.selectedLanguages)return!1;let d=!1;for(const k of this.selectedLanguages)if(k.toUpperCase()===s.value.toUpperCase()){d=!0;break}return d}trackByFn(s,d){return d.id||d.tempId}getValidatorOptions(){const s=this.otherChecked?[sc.required]:[];return[this.createValidatorOption("otherLanguage",this.otherLanguage,s)]}getOtherLanguageOptions(){var s=this;return(0,o.Z)(function*(){try{const d=yield(0,he.z)(s.languageService.getLanguageList(s.translate.currentLang));if(!d.length)return;const k=co.getAutocompleteOptions(d),ie=["FI","SV","EN"];s.otherLanguageOptions=k.filter(ot=>!ie.includes(ot.value.code)),s.otherLanguage&&s.selectedOtherLanguages$.next(s.otherLanguageOptions.filter(ot=>s.otherLanguage.includes(ot.value.code)).map(ot=>ot.value))}catch(d){console.error("LanguageCheckboxComponent: getLanguageOptions failed",d),s.notify.alertBackendError(d)}})()}}n_.\u0275fac=function(s){return new(s||n_)(e.Y36(we.sK),e.Y36(md),e.Y36(Qp),e.Y36(e.SBq))},n_.\u0275cmp=e.Xpm({type:n_,selectors:[["sivi-lib-language-checkbox"]],inputs:{name:"name",languages:"languages",disabled:"disabled",readonly:"readonly"},outputs:{update:"update"},features:[e.qOj],decls:2,vars:2,consts:[[4,"ngIf"],[3,"validatorOptions"],["validator",""],[1,"ion-no-padding"],[1,"language-label"],["size","12",4,"ngFor","ngForOf","ngForTrackBy"],["siviGridCol","left"],["lines","none"],["name","other",3,"disabled","checked","ionChange"],[1,"label","ion-margin-horizontal"],["siviGridCol","right",4,"ngIf"],["size","12"],[3,"disabled","name","value","checked","ionChange"],["siviGridCol","right"],["name","otherLanguage",3,"value","multiSelect","options","placeholderImage","selectAllText","removeAllText","placeholder","valueChange"],["type","text",3,"viewMode","value"]],template:function(s,d){1&s&&(e.YNc(0,IC,18,12,"ng-container",0),e.YNc(1,PC,2,2,"ng-container",0)),2&s&&(e.Q6J("ngIf",!d.readonly),e.xp6(1),e.Q6J("ngIf",d.readonly))},dependencies:[af,Nt.nz,Nt.wI,Nt.jY,Nt.Ie,Nt.Q$,Nt.Nd,Nt.w,Et.sg,Et.O5,Et.Ov,we.X$],styles:["ion-col[_ngcontent-%COMP%]{padding:0}.language-label[_ngcontent-%COMP%]{font-weight:600;font-size:18px}"],changeDetection:0});class $v{}function OC(H,s){if(1&H){const d=e.EpF();e.TgZ(0,"sivi-lib-select",1),e.NdJ("siviChange",function(ie){e.CHM(d);const ot=e.oxw();return e.KtG(ot.onChangeLanguage(ie))}),e.ALo(1,"translate"),e.ALo(2,"translate"),e.qZA()}if(2&H){const d=e.oxw();e.Q6J("value",d.currentLanguage)("options",d.languageOptions)("label",e.lcZ(2,6,"General.Language.Singular")),e.uIk("aria-label",e.lcZ(1,4,"General.Language.Singular"))}}$v.\u0275fac=function(s){return new(s||$v)},$v.\u0275mod=e.oAB({type:$v}),$v.\u0275inj=e.cJS({imports:[Jc,zp,Q]});class zy{constructor(s,d,k){this.translate=s,this.languageService=d,this.personService=k}ngAfterViewInit(){this.initializeUI()}initializeUI(){this.languageService.getUserLanguage().pipe((0,ye.q)(1)).subscribe(s=>{this.currentLanguage=s.language,setTimeout(()=>{this.languageOptions=this.generateLangOptions()},50)})}onChangeLanguage(s){const{language:d}=s;d&&(this.languageService.setLanguageByLanguageCode(d),this.currentLanguage=d,this.languageOptions=this.generateLangOptions(),this.personService.saveCurrentUserUILanguage(this.currentLanguage))}generateLangOptions(){return this.languageService.getAllTranslatedLanguages().map(s=>{const d=s.language;return{value:d,text:this.translate.instant("General.Language.Code."+d),selected:d===this.currentLanguage}})}}zy.\u0275fac=function(s){return new(s||zy)(e.Y36(we.sK),e.Y36(Qp),e.Y36(Zh))},zy.\u0275cmp=e.Xpm({type:zy,selectors:[["sivi-lib-language-switcher"]],decls:1,vars:1,consts:[["name","language",3,"value","options","label","siviChange",4,"ngIf"],["name","language",3,"value","options","label","siviChange"]],template:function(s,d){1&s&&e.YNc(0,OC,3,8,"sivi-lib-select",0),2&s&&e.Q6J("ngIf",d.languageOptions)},styles:[".language-container[_ngcontent-%COMP%]{color:#fff;font-size:1.6rem;font-weight:500;cursor:pointer;margin:0;max-width:100%!important}.language-container[_ngcontent-%COMP%]   .select-text[_ngcontent-%COMP%]{color:#333}.language-container[_ngcontent-%COMP%]   .select-icon[_ngcontent-%COMP%]   .select-icon-inner[_ngcontent-%COMP%]{color:#333!important}.language-container[_ngcontent-%COMP%]   .item-cover[_ngcontent-%COMP%]{height:0}"]});class Ag{}function Yy(H,s){if(1&H){const d=e.EpF();e.TgZ(0,"ion-col",7)(1,"ion-item",8)(2,"ion-label",9),e._uU(3),e.ALo(4,"translate"),e.qZA(),e.TgZ(5,"ion-checkbox",10),e.NdJ("ionChange",function(ie){e.CHM(d);const ot=e.oxw();return e.KtG(ot.toggleAll(ie))}),e.ALo(6,"async"),e.qZA()()()}if(2&H){const d=e.oxw();e.xp6(3),e.Oqu(e.lcZ(4,2,"General.Buttons.SelectAll")),e.xp6(2),e.Q6J("checked",e.lcZ(6,4,d.allSelected$))}}function E1(H,s){if(1&H){const d=e.EpF();e.TgZ(0,"ion-item",14)(1,"ion-label"),e._uU(2),e.ALo(3,"translate"),e.qZA(),e.TgZ(4,"ion-checkbox",15),e.NdJ("ionChange",function(ie){e.CHM(d);const ot=e.oxw().$implicit,Cn=e.oxw();return e.KtG(Cn.onCheckboxChange(ie,ot.name))}),e.qZA()()}if(2&H){const d=s.$implicit;e.xp6(2),e.Oqu(e.lcZ(3,4,d.name)),e.xp6(2),e.Q6J("value",d.id||d.name)("checked",d.selected)("disabled",d.disabled)}}function C0(H,s){if(1&H&&(e.TgZ(0,"ion-col",11)(1,"h5",12),e._uU(2),e.ALo(3,"translate"),e.qZA(),e.YNc(4,E1,5,6,"ion-item",13),e.qZA()),2&H){const d=s.$implicit,k=e.oxw();e.xp6(2),e.Oqu(e.lcZ(3,3,d.name)),e.xp6(2),e.Q6J("ngForOf",d.childCodes)("ngForTrackBy",k.trackByFn)}}Ag.\u0275fac=function(s){return new(s||Ag)},Ag.\u0275mod=e.oAB({type:Ag}),Ag.\u0275inj=e.cJS({imports:[Ga,zp,Q]}),e.B6R(zy,[Et.O5,C],[we.X$]);class ig extends Js{set options(s){this.options$.next(s)}constructor(){super(),this.selectAllOption=!0,this.valueChange=new e.vpe,this.options$=new g.X([]),this.open=!1}ngOnInit(){this.allSelected$=this.isAllSelected(),this.options$.pipe((0,be.x)(Ne.Z),(0,j.R)(this.destroy$)).subscribe(s=>{const d=new CustomEvent("valueChange",{detail:{name:this.name,value:s}});this.valueChange.emit(d)})}toggleAccordion(){this.open=!this.open}isAllSelected(){return this.options$.pipe((0,X.U)(s=>(0,Zi.Z)(s.map(d=>d.childCodes))),(0,X.U)(s=>s.every(d=>d.selected)))}onCheckboxChange(s,d){var k=this;return(0,o.Z)(function*(){try{const{value:ie,checked:ot}=s.detail,Cn=yield k.options$.pipe((0,ye.q)(1)).toPromise(),ir=(0,tt.Z)(Cn);ir.find(bc=>bc.name===d).childCodes.find(({id:bc,name:np})=>(bc||np)===ie).selected=ot,k.options$.next(ir)}catch(ie){console.log(ie)}})()}toggleAll(s){var d=this;return(0,o.Z)(function*(){try{const{checked:k}=s.detail,ie=yield d.isAllSelected().pipe((0,ye.q)(1)).toPromise(),ot=k&&!ie,Cn=!k&&ie;if(ot||Cn){const ir=ot||!Cn;yield d.setCodesSelected(ir)}}catch(k){console.log(k)}})()}setCodesSelected(s){var d=this;return(0,o.Z)(function*(){try{const k=yield d.options$.pipe((0,ye.q)(1)).toPromise(),ie=(0,tt.Z)(k);ie.map(ir=>ir.childCodes).map(ir=>ir.map(Yo=>({...Yo,selected:s}))).forEach((ir,Yo)=>{ie[Yo].childCodes=ir}),d.options$.next(ie)}catch(k){console.log(k)}})()}}ig.\u0275fac=function(s){return new(s||ig)},ig.\u0275cmp=e.Xpm({type:ig,selectors:[["sivi-lib-filter"]],inputs:{name:"name",selectAllOption:"selectAllOption",options:"options"},outputs:{valueChange:"valueChange"},features:[e.qOj],decls:15,vars:17,consts:[[1,"filter-container"],[1,"block",3,"open"],["slot","header",1,"header","pointer","m2",3,"click"],["tabindex","-1",3,"open","ariaLabel"],["slot","content",1,"ph2","pb2"],["size","12",4,"ngIf"],["size-xs","12","size-sm","6",4,"ngFor","ngForOf","ngForTrackBy"],["size","12"],["lines","none",1,"ion-no-padding"],[1,"ion-margin-start"],["slot","start",3,"checked","ionChange"],["size-xs","12","size-sm","6"],[1,"weight-600"],["lines","none",4,"ngFor","ngForOf","ngForTrackBy"],["lines","none"],["slot","start",3,"value","checked","disabled","ionChange"]],template:function(s,d){1&s&&(e.TgZ(0,"div",0)(1,"cgi-accordion-item",1)(2,"button",2),e.NdJ("click",function(){return d.toggleAccordion()}),e._uU(3),e.ALo(4,"translate"),e.ALo(5,"translate"),e._UZ(6,"cgi-toggle-accordion",3),e.ALo(7,"translate"),e.ALo(8,"translate"),e.qZA(),e.TgZ(9,"div",4)(10,"ion-grid")(11,"ion-row"),e.YNc(12,Yy,7,6,"ion-col",5),e.YNc(13,C0,5,5,"ion-col",6),e.ALo(14,"async"),e.qZA()()()()()),2&s&&(e.xp6(1),e.Q6J("open",d.open),e.xp6(2),e.hij(" ",d.open?e.lcZ(4,7,"General.HideFilters"):e.lcZ(5,9,"General.ShowFilters")," "),e.xp6(3),e.Q6J("open",d.open)("ariaLabel",d.open?e.lcZ(7,11,"General.Buttons.Close"):e.lcZ(8,13,"General.Buttons.Open")),e.xp6(6),e.Q6J("ngIf",d.selectAllOption),e.xp6(1),e.Q6J("ngForOf",e.lcZ(14,15,d.options$))("ngForTrackBy",d.trackByFn))},dependencies:[Nt.nz,Nt.wI,Nt.jY,Nt.Ie,Nt.Q$,Nt.Nd,Nt.w,Et.sg,Et.O5,Et.Ov,we.X$],styles:["[_nghost-%COMP%]{background:var(--ion-color-light);display:block}cgi-accordion-item[_ngcontent-%COMP%]{display:block}.filter-container[_ngcontent-%COMP%]{color:var(--ion-color-primary)}.header[_ngcontent-%COMP%]{align-items:center;background:none;border:none;color:var(--ion-color-primary);display:flex;font-size:inherit;font-weight:600;justify-content:space-between;width:calc(100% - 32px)}[slot=content][_ngcontent-%COMP%]{border-top:2px solid var(--ion-color-medium)}ion-label[_ngcontent-%COMP%]{white-space:normal!important}"]});class gm{}gm.\u0275fac=function(s){return new(s||gm)},gm.\u0275mod=e.oAB({type:gm}),gm.\u0275inj=e.cJS({imports:[zp]});class th{transform(s,d){const k=this.flattenTreeNodes(d);return(s||[]).map(ie=>k.find(ot=>ot.id===ie))}flattenTreeNodes(s){return(s||[]).reduce((d,k)=>{if(k.children?.length){const ie=this.flattenTreeNodes(k.children);d=[...d,...ie]}return[...d,k]},[])}}function jm(H,s){if(1&H){const d=e.EpF();e.TgZ(0,"mat-tree-node",15)(1,"div",16)(2,"button",17),e._UZ(3,"cgi-icon",18),e.qZA(),e.TgZ(4,"ion-item",19)(5,"ion-label"),e._uU(6),e.qZA(),e.TgZ(7,"ion-checkbox",20),e.NdJ("ionChange",function(ie){const Cn=e.CHM(d).$implicit,ir=e.oxw();return e.KtG(ir.onClickNode(ie,Cn))}),e.qZA()()()()}if(2&H){const d=s.$implicit,k=e.oxw();e.xp6(6),e.Oqu(d.text),e.xp6(1),e.Q6J("checked",k.selection.isSelected(d.id))}}function fv(H,s){1&H&&(e.TgZ(0,"div",27),e.GkF(1,28),e.qZA())}function E0(H,s){if(1&H){const d=e.EpF();e.TgZ(0,"mat-nested-tree-node",21)(1,"div",22)(2,"button",23),e._UZ(3,"cgi-icon",24),e.qZA(),e.TgZ(4,"ion-item",25)(5,"ion-label"),e._uU(6),e.qZA(),e.TgZ(7,"ion-checkbox",20),e.NdJ("ionChange",function(ie){const Cn=e.CHM(d).$implicit,ir=e.oxw();return e.KtG(ir.onClickNode(ie,Cn))}),e.qZA()()(),e.YNc(8,fv,2,0,"div",26),e.qZA()}if(2&H){const d=s.$implicit,k=e.oxw();e.xp6(2),e.Q6J("matTreeNodeToggleRecursive",k.treeControl.isExpanded(d)),e.uIk("aria-label","toggle node "+d.name),e.xp6(1),e.Q6J("name",k.treeControl.isExpanded(d)?"expand_more":"chevron_right"),e.xp6(3),e.Oqu(d.text),e.xp6(1),e.Q6J("checked",k.selection.isSelected(d.id)),e.xp6(1),e.Q6J("ngIf",k.treeControl.isExpanded(d))}}th.\u0275fac=function(s){return new(s||th)},th.\u0275pipe=e.Yjl({name:"siviSelectedTreeNodes",type:th,pure:!0});class ru extends Js{get initialTreeNodes(){return this.toggleOptionalTreeNodes(this._initialTreeNodes)}set initialTreeNodes(s){this._initialTreeNodes=s}constructor(s,d){super(),this.siviModalController=s,this.selectedTreeNodesPipe=d,this.selectBranchText="Select branch",this.showOptionalText="Show optional",this.selectBranch=!1,this.showOptional=!0,this.selection=new rs.Ov(!0),this.treeControl=new yc(k=>k.children),this.filterText$=new g.X(""),this.filterTrigger$=new g.X(null)}ngOnInit(){this.initialTreeNodes=this.treeNodes,this.flattenedTreeNodes=this.selectedTreeNodesPipe.flattenTreeNodes(this.treeNodes),this.selection.select(...this.value),this.expandNodesThatChildIsActiveOrIncludesText(this.treeNodes),this.listenFilterText()}onClickNode(s,d){const k=s.detail.checked,ie=this.selection.isSelected(d.id);k&&ie||!k&&!ie||(this.toggleNodeSelection(d.id,k),this.selectBranch&&d.children?.length&&(this.toggleBranchSelection(d),this.expandNodesThatChildIsActiveOrIncludesText([d])))}onClickOk(){var s=this;return(0,o.Z)(function*(){yield s.siviModalController.dismiss(s.selection.selected)})()}onClickCancel(){var s=this;return(0,o.Z)(function*(){yield s.siviModalController.dismiss()})()}onChangeFilter(s){const d=s.detail.value?.trim()||"";this.filterText$.next(d)}onFilterTextChange(s){this.treeControl.collapseAll(),this.treeNodes=s?this.filterTreeNodes(this.initialTreeNodes,s):this.initialTreeNodes,this.expandNodesThatChildIsActiveOrIncludesText(this.treeNodes,s)}onShowOptionalChange(s){this.showOptional=s,this.showOptional||this.deselectOptionalTreeNodes(),this.filterTrigger$.next()}deselectOptionalTreeNodes(){this.selectedTreeNodesPipe.transform(this.selection.selected,this.treeNodes).forEach(d=>d.optional&&this.deselectTreeNodes([d]))}listenFilterText(){const s=this.filterText$.pipe((0,be.x)());(0,V.a)([s,this.filterTrigger$]).pipe((0,me.b)(100),(0,X.U)(([d])=>d?.length>2?d:null),(0,mt.T)(1),(0,j.R)(this.destroy$)).subscribe(d=>this.onFilterTextChange(d))}hasChildren(s,d){return!(0,Vn.Z)(d.children)}filterTreeNodes(s,d){return(s||[]).reduce((k,ie)=>{const ot=(0,tt.Z)(ie);return ot.text.includes(d)||this.selection.isSelected(ot.id)?[...k,ot]:(ot.children=this.filterTreeNodes(ot.children,d),ot.children.length?[...k,ot]:k)},[])}expandNodesThatChildIsActiveOrIncludesText(s,d=null){(s||[]).forEach(k=>{k.children?.length&&(this.expandNodesThatChildIsActiveOrIncludesText(k.children,d),k.children.some(ot=>this.isActiveTreeNode(ot)||d&&ot.text.includes(d))&&this.expandFirstLevelTreeNodes([k]))})}isActiveTreeNode(s){return this.selection.isSelected(s.id)||this.treeControl.isExpanded(s)}expandFirstLevelTreeNodes(s){s.forEach(d=>this.treeControl.expand(d))}toggleBranchSelection(s){this.selection.isSelected(s.id)?this.selectTreeNodes(s.children):this.deselectTreeNodes(s.children)}toggleNodeSelection(s,d){d?this.selection.select(s):this.selection.deselect(s)}selectTreeNodes(s){(s||[]).forEach(d=>{d.children?.length&&this.selectTreeNodes(d.children),this.selection.select(d.id)})}deselectTreeNodes(s){(s||[]).forEach(d=>{d.children?.length&&this.deselectTreeNodes(d.children),this.selection.deselect(d.id)})}toggleOptionalTreeNodes(s){return s.reduce((d,k)=>{if(!this.showOptional&&k.optional)return d;const ie=(0,tt.Z)(k);return ie.children=this.toggleOptionalTreeNodes(ie.children),[...d,ie]},[])}}function Nb(H,s){if(1&H&&(e.TgZ(0,"span",4),e._uU(1),e.ALo(2,"translate"),e.qZA()),2&H){const d=e.oxw();e.xp6(1),e.Oqu(e.lcZ(2,1,d.noItemsText))}}function Ap(H,s){if(1&H&&(e.TgZ(0,"mat-icon",9),e._uU(1),e.qZA()),2&H){const d=e.oxw(3);e.xp6(1),e.Oqu(d.icon)}}function jv(H,s){if(1&H){const d=e.EpF();e.TgZ(0,"ion-col",6)(1,"ion-chip"),e.YNc(2,Ap,2,1,"mat-icon",7),e.TgZ(3,"ion-label"),e._uU(4),e.qZA(),e.TgZ(5,"ion-icon",8),e.NdJ("siviClick",function(ie){const Cn=e.CHM(d).$implicit,ir=e.oxw(2);return ie.stopPropagation(),e.KtG(ir.removeChip(Cn.id))}),e.qZA()()()}if(2&H){const d=s.$implicit,k=e.oxw(2);e.xp6(2),e.Q6J("ngIf",k.icon),e.xp6(2),e.Oqu(d.text)}}function rg(H,s){if(1&H&&(e.TgZ(0,"ion-row"),e.YNc(1,jv,6,2,"ion-col",5),e.ALo(2,"siviSelectedTreeNodes"),e.qZA()),2&H){const d=e.oxw();e.xp6(1),e.Q6J("ngForOf",e.xi3(2,2,d.value,d.treeNodes))("ngForTrackBy",d.trackByFn)}}ru.\u0275fac=function(s){return new(s||ru)(e.Y36(Ac),e.Y36(th))},ru.\u0275cmp=e.Xpm({type:ru,selectors:[["sivi-lib-tree-multi-select-modal"]],inputs:{treeNodes:"treeNodes",value:"value",title:"title",selectBranchText:"selectBranchText",showOptionalText:"showOptionalText",selectBranch:"selectBranch",showOptional:"showOptional"},features:[e.qOj],decls:31,vars:25,consts:[[3,"closeButton","hideNotifications","closed"],["navbar-title",""],[1,"filter"],["size","12"],["label-position","floating",3,"label","siviChange"],[3,"checked","change"],[1,"modal-content","ion-padding-horizontal"],["data-cy","tree-results-content",1,"content-div",3,"dataSource","treeControl"],["matTreeNodeToggle","","role","treeitem",4,"matTreeNodeDef"],["role","treeitem",4,"matTreeNodeDef","matTreeNodeDefWhen"],[1,"ion-align-items-center","ion-justify-content-between","ion-padding"],["size","auto"],[3,"ngModel","ngModelChange"],["no-min-width","","fill","outline","size","default",3,"click"],["fill","solid","size","default",3,"click"],["matTreeNodeToggle","","role","treeitem"],[1,"flex"],["mat-icon-button","","disabled",""],["name",""],["lines","none",1,"tree-node-item"],["slot","start",3,"checked","ionChange"],["role","treeitem"],[1,"flex","flex-align-items-center"],["matTreeNodeToggle","",3,"matTreeNodeToggleRecursive"],[3,"name"],["lines","none"],["role","group",4,"ngIf"],["role","group"],["matTreeNodeOutlet",""]],template:function(s,d){1&s&&(e.TgZ(0,"div")(1,"ion-header")(2,"sivi-lib-navbar",0),e.NdJ("closed",function(){return d.onClickCancel()}),e.TgZ(3,"div",1),e._uU(4),e.ALo(5,"translate"),e.qZA()()(),e.TgZ(6,"ion-row",2)(7,"ion-col",3)(8,"cgi-input",4),e.NdJ("siviChange",function(ie){return d.onChangeFilter(ie)}),e.ALo(9,"translate"),e.qZA()(),e.TgZ(10,"ion-col",3)(11,"mat-slide-toggle",5),e.NdJ("change",function(ie){return d.onShowOptionalChange(ie.checked)}),e._uU(12),e.ALo(13,"translate"),e.qZA()()()(),e.TgZ(14,"ion-row",6)(15,"ion-col",3)(16,"mat-tree",7),e.YNc(17,jm,8,2,"mat-tree-node",8),e.YNc(18,E0,9,6,"mat-nested-tree-node",9),e.qZA()()(),e.TgZ(19,"ion-row",10)(20,"ion-col",11)(21,"mat-slide-toggle",12),e.NdJ("ngModelChange",function(ie){return d.selectBranch=ie}),e._uU(22),e.ALo(23,"translate"),e.qZA()(),e.TgZ(24,"ion-col",11)(25,"ion-button",13),e.NdJ("click",function(){return d.onClickCancel()}),e._uU(26),e.ALo(27,"translate"),e.qZA(),e.TgZ(28,"ion-button",14),e.NdJ("click",function(){return d.onClickOk()}),e._uU(29),e.ALo(30,"translate"),e.qZA()()()),2&s&&(e.xp6(2),e.Q6J("closeButton",!0)("hideNotifications",!0),e.xp6(2),e.hij(" ",e.lcZ(5,13,d.title)," "),e.xp6(4),e.s9C("label",e.lcZ(9,15,"Form.Label.Filter")),e.xp6(3),e.Q6J("checked",d.showOptional),e.xp6(1),e.hij(" ",e.lcZ(13,17,d.showOptionalText)," "),e.xp6(4),e.Q6J("dataSource",d.treeNodes)("treeControl",d.treeControl),e.xp6(2),e.Q6J("matTreeNodeDefWhen",d.hasChildren),e.xp6(3),e.Q6J("ngModel",d.selectBranch),e.xp6(1),e.hij(" ",e.lcZ(23,19,d.selectBranchText)," "),e.xp6(4),e.hij(" ",e.lcZ(27,21,"General.Buttons.Cancel")," "),e.xp6(3),e.hij(" ",e.lcZ(30,23,"General.Buttons.Ok")," "))},styles:[".mat-nested-tree-node[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]{margin-top:2px;outline-offset:-2px}.mat-nested-tree-node[_ngcontent-%COMP%]   .mat-tree-node[_ngcontent-%COMP%] > div[_ngcontent-%COMP%], .mat-nested-tree-node[_ngcontent-%COMP%]   .mat-nested-tree-node[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{flex-wrap:nowrap;margin-left:24px;min-height:36px;width:calc(100% - 24px);align-items:center}.filter[_ngcontent-%COMP%]{padding:0 1em 1em}.modal-content[_ngcontent-%COMP%]{display:flex;flex-flow:column;justify-content:space-between;margin-bottom:auto}.mat-tree-node[_ngcontent-%COMP%]{min-height:36px}ion-item[_ngcontent-%COMP%]{--min-height: 36px;--padding-start: 0}ion-item[_ngcontent-%COMP%]   ion-checkbox[_ngcontent-%COMP%]{margin-inline-end:8px;margin-top:0;margin-bottom:0}ion-item[_ngcontent-%COMP%]   ion-label[_ngcontent-%COMP%]{margin-top:0;margin-bottom:0}ion-item.tree-node-item[_ngcontent-%COMP%]{overflow:visible}"]});class ff extends Js{constructor(s){super(),this.siviModalController=s,this.showOptional=!0,this.selectBranch=!1,this.title="Organizations",this.icon="location_city",this.selectBranchText="Select branch",this.showOptionalText="Show optional",this.noItemsText="Please select",this.siviChange=new e.vpe}openModal(){var s=this;return(0,o.Z)(function*(){const k=yield(yield s.siviModalController.openModal({component:ru,cssClass:"modal-auto-height-from-medium",backdropDismiss:!1,componentProps:{treeNodes:s.treeNodes,value:s.value,showOptional:s.showOptional,selectBranch:s.selectBranch,title:s.title,selectBranchText:s.selectBranchText,showOptionalText:s.showOptionalText}})).onDidDismiss();k.data&&(s.value=k.data,s.siviChange.emit(s.value))})()}removeChip(s){this.value=this.value.filter(d=>d!==s),this.siviChange.emit(this.value)}}ff.\u0275fac=function(s){return new(s||ff)(e.Y36(Ac))},ff.\u0275cmp=e.Xpm({type:ff,selectors:[["sivi-lib-tree-multi-select"]],inputs:{value:"value",treeNodes:"treeNodes",showOptional:"showOptional",selectBranch:"selectBranch",title:"title",icon:"icon",selectBranchText:"selectBranchText",showOptionalText:"showOptionalText",noItemsText:"noItemsText"},outputs:{siviChange:"siviChange"},features:[e.qOj],decls:7,vars:3,consts:[["tabindex","0","siviKeyboardEvents","",3,"siviClick"],[1,"pointer"],["class","no-items-text",4,"ngIf","ngIfElse"],["chips",""],[1,"no-items-text"],["class","ion-no-padding","size","auto",4,"ngFor","ngForOf","ngForTrackBy"],["size","auto",1,"ion-no-padding"],["color","primary","aria-hidden","false",4,"ngIf"],["tabindex","0","name","close","siviKeyboardEvents","",3,"siviClick"],["color","primary","aria-hidden","false"]],template:function(s,d){if(1&s&&(e.TgZ(0,"h5"),e._uU(1),e.qZA(),e.TgZ(2,"div",0),e.NdJ("siviClick",function(){return d.openModal()}),e.TgZ(3,"ion-item",1),e.YNc(4,Nb,3,3,"span",2),e.YNc(5,rg,3,5,"ng-template",null,3,e.W1O),e.qZA()()),2&s){const k=e.MAs(6);e.xp6(1),e.Oqu(d.title),e.xp6(3),e.Q6J("ngIf",!(null!=d.value&&d.value.length))("ngIfElse",k)}},dependencies:[Et.sg,Et.O5,Nt.hM,Nt.wI,Nt.gu,Nt.Ie,Nt.Q$,Nt.Nd,Kp,am.Hw,we.X$,th],styles:["ion-icon[_ngcontent-%COMP%]{outline-offset:-1px}ion-item[_ngcontent-%COMP%]{--padding-start: 0}ion-chip[_ngcontent-%COMP%]   ion-label[_ngcontent-%COMP%]{overflow:visible}mat-icon[_ngcontent-%COMP%]{margin-right:4px}.no-items-text[_ngcontent-%COMP%]{color:#0000004d}"]});class hf{}function Kv(H,s){if(1&H&&(e.TgZ(0,"ion-label"),e._uU(1),e.ALo(2,"translate"),e.qZA()),2&H){const d=e.oxw();e.xp6(1),e.hij(" ",e.lcZ(2,1,d.label),"\n")}}function Ph(H,s){1&H&&e._UZ(0,"ion-col",12)}function P_(H,s){if(1&H&&(e.TgZ(0,"ion-col",13)(1,"span"),e._uU(2),e.qZA()()),2&H){const d=s.$implicit;e.xp6(2),e.Oqu(d)}}function hv(H,s){if(1&H&&(e.TgZ(0,"ion-col",12)(1,"div",16)(2,"span"),e._uU(3),e.qZA()()()),2&H){const d=e.oxw().$implicit,k=e.oxw();e.xp6(3),e.Oqu(k.getWeekNumber(d))}}function Hy(H,s){if(1&H&&e._UZ(0,"img",23),2&H){const d=s.ngIf;e.MGl("src","/assets/icon/",d,".svg",e.LSH)}}function M0(H,s){if(1&H&&e._UZ(0,"img",24),2&H){const d=s.ngIf;e.MGl("src","/assets/icon/",d,".svg",e.LSH)}}function i_(H,s){if(1&H){const d=e.EpF();e.TgZ(0,"button",18),e.NdJ("mousedown",function(ie){e.CHM(d);const ot=e.oxw().$implicit,Cn=e.oxw(2);return e.KtG(Cn.onMouseDown(ie,ot))})("touchstart",function(ie){e.CHM(d);const ot=e.oxw().$implicit,Cn=e.oxw(2);return e.KtG(Cn.onTouchStart(ie,ot))})("mouseup",function(){e.CHM(d);const ie=e.oxw(3);return e.KtG(ie.onMouseUp())})("touchend",function(){e.CHM(d);const ie=e.oxw(3);return e.KtG(ie.onTouchEnd())})("mousemove",function(ie){e.CHM(d);const ot=e.oxw().$implicit,Cn=e.oxw(2);return e.KtG(Cn.onMouseMove(ie,ot))})("touchmove",function(ie){e.CHM(d);const ot=e.oxw().$implicit,Cn=e.oxw(2);return e.KtG(Cn.onTouchMove(ie,ot))}),e.TgZ(1,"div",19),e.YNc(2,Hy,1,1,"img",20),e.TgZ(3,"span",21),e._uU(4),e.qZA(),e.YNc(5,M0,1,1,"img",22),e.qZA()()}if(2&H){const d=e.oxw().$implicit,k=e.oxw(2);let ie,ot;e.s9C("tabindex",k.isDisabled(d)?-1:0),e.xp6(1),e.Q6J("ngClass",k.getDayClasses(d)),e.uIk("data-day",d),e.xp6(1),e.Q6J("ngIf",null==(ie=k.getFeedForDay(d))?null:ie.topRightIcon),e.xp6(2),e.Oqu(d),e.xp6(1),e.Q6J("ngIf",null==(ot=k.getFeedForDay(d))?null:ot.bottomIcon)}}function r_(H,s){if(1&H&&(e.TgZ(0,"ion-col",12),e.YNc(1,i_,6,6,"button",17),e.qZA()),2&H){const d=s.$implicit;e.xp6(1),e.Q6J("ngIf",d)}}function Bb(H,s){if(1&H&&(e.TgZ(0,"ion-row",14),e.YNc(1,hv,4,1,"ion-col",8),e.YNc(2,r_,2,1,"ion-col",15),e.qZA()),2&H){const d=s.$implicit,k=e.oxw();e.xp6(1),e.Q6J("ngIf",k.showWeekNumbers),e.xp6(1),e.Q6J("ngForOf",d)("ngForTrackBy",k.trackDayFn)}}hf.\u0275fac=function(s){return new(s||hf)},hf.\u0275mod=e.oAB({type:hf}),hf.\u0275inj=e.cJS({providers:[th,Ac],imports:[Ga,Hl,uu.p9,Es.rP,Ve.u5,gu,am.Ps]}),e.B6R(ru,[Et.O5,Nt.YG,Nt.nz,Nt.wI,Nt.Gu,Nt.Ie,Nt.Q$,Nt.Nd,Nt.w,Mr,cu,ll,qo,Yl,ld,Es.Rr,Ve.JJ,Ve.On,Gc],[we.X$]);class wg extends Fp{set value(s){this.selectedDates=s}get value(){return this.selection.selected}set date(s){this.date.isSame(s)||(this._date=s,this.calendarData=this.getCalendarData())}get date(){return this._date}set selectedDates(s){this.selection.clear(),s&&this.selection.select(...s),this.cdr.detectChanges()}get nameOfSelectedMonth(){const s=this.dateAdapter.getMonth(this.date);return this.dateAdapter.getMonthNames("short")[s]}get selectedMonth(){return this.dateAdapter.getMonth(this.date)}get selectedYear(){return this.dateAdapter.getYear(this.date)}get ongoingMonth(){return Nn().month()}get ongoingYear(){return Nn().year()}onMouseUpListener(){this.paintingFromDay=null}constructor(s,d,k,ie,ot){super(),this.dateAdapter=s,this.translate=d,this.notify=k,this.cdr=ie,this.elRef=ot,this.calendarData=[],this.blockPeriodChange=!1,this.multiSelection=!0,this.paintSelection=!1,this.showWeekNumbers=!1,this.preventPastMonthNavigation=!1,this.selectionChanged=new e.vpe,this.valueChanged=new e.vpe,this.periodChanged=new e.vpe,this.periodChangeAttempt=new e.vpe,this.dayOfWeekNames=[],this.selection=new rs.Ov(!0,[]),this.shouldSelect=!1,this.selectionBeforePaint=[],this.longTouchTimeout=200,this.canNavigateToPreviousMonth=!0,this._date=this.dateAdapter.today()}ngOnInit(){this.dateAdapter.setLocale(co.getFixedLocale(this.translate.currentLang)),this.calendarData=this.getCalendarData(),this.dayOfWeekNames=this.getDayOfWeekNames(),this.dispatchFocusOnFocusIn(),this.dispatchBlurOnFocusOut(),this.updateNavigationAbility(this.ongoingMonth,this.ongoingYear,this.selectedMonth,this.selectedYear)}updateNavigationAbility(s,d,k,ie){this.preventPastMonthNavigation&&(this.canNavigateToPreviousMonth=!(s===k&&d===ie))}onMouseDown(s,d){this.paintingFromDay=this.paintSelection?d:null,this.selectionBeforePaint=this.selection.selected,this.shouldSelect=!this.isSelected(d);const k=this.getCurrentDateForDayFormatted(d);this.handleDatesSelection([k])}onMouseUp(){this.paintingFromDay=null,this.selectionBeforePaint=[]}onMouseMove(s,d){if(this.paintingFromDay&&this.multiSelection){s.preventDefault();const k=this.getPaintSelectionEndDay(s,d);if(!k)return;const ie=this.getCurrentDateForDayFormatted(k),ot=this.getCurrentDateForDayFormatted(this.paintingFromDay),Cn=co.getDatesFromRange([ie,ot]);this.selection.clear(),this.selection.select(...this.selectionBeforePaint),this.handleDatesSelection(Cn)}}onTouchStart(s,d){this.longTouchTimer=setTimeout(()=>this.onLongTouch(s,d),this.longTouchTimeout)}onTouchEnd(){clearTimeout(this.longTouchTimer),this.onMouseUp()}onTouchMove(s,d){clearTimeout(this.longTouchTimer),this.onMouseMove(s,d)}onLongTouch(s,d){s.preventDefault(),this.onMouseDown(s,d)}getPaintSelectionEndDay(s,d){if("mousemove"===s.type)return d;let k=document.elementFromPoint(s.touches[0]?.pageX,s.touches[0]?.pageY);return k?(k.classList.contains("day")||(k=k.parentElement),Number(k.getAttribute("data-day"))):null}getWeekNumber(s){const d=s.find(ie=>!!ie);return this.getCurrentDateForDay(d).isoWeek()}dispatchSiviChange(){const s={name:this.name,value:this.value},d=new CustomEvent("siviChange",{detail:s,bubbles:!0});this.elRef.nativeElement.dispatchEvent(d)}handleDatesSelection(s){if(this.multiSelection||this.selection.clear(),this.shouldSelect){const d=s.filter(k=>this.isDateSelectable(Nn(k)));this.selection.select(...d)}else this.selection.deselect(...s);this.selectionChanged.emit(this.selection.selected),this.dispatchSiviChange()}isCurrentDay(s){if(!s)return!1;const d=this.getCurrentDateForDay(s);return this.dateAdapter.sameDate(d,this.dateAdapter.today())}isSelected(s){if(!s)return!1;const d=this.getCurrentDateForDayFormatted(s);return this.selection.isSelected(d)}isLeftRounded(s){return this.isSelected(s)&&!this.isSelected(s-1)}isRightRounded(s){return this.isSelected(s)&&!this.isSelected(s+1)}isDisabled(s){if(!s)return!1;const d=this.getCurrentDateForDayFormatted(s);return!this.isDateSelectable(Nn(d))}getDayClasses(s){return{"current-day":this.isCurrentDay(s),selected:this.isSelected(s),inactive:this.getFeedForDay(s)?.inactive||this.isDisabled(s),"left-rounded":this.isLeftRounded(s),"right-rounded":this.isRightRounded(s)}}getCalendarData(){const s=this.getDaysInMonth(this.date),d=this.getDaysWithEmptyWeekDays(s);return this.splitArrayToChunks(d,7)}getDayOfWeekNames(){const s=[...this.dateAdapter.getDayOfWeekNames("short")];return s.push(s.shift()),s}getCurrentDateForDay(s){return this.dateAdapter.parse(`${this.selectedYear}-${this.selectedMonth+1}-${s}`,as.STANDARD)}getCurrentDateForDayFormatted(s){const d=this.getCurrentDateForDay(s);return d.isValid()?this.dateAdapter.format(d,as.STANDARD):null}getDaysInMonth(s){const d=[],k=this.dateAdapter.getNumDaysInMonth(s);for(let ie=0;ie<k;ie++)d.push(ie+1);return d}getDaysWithEmptyWeekDays(s){const d=[...s],k=this.getCurrentDateForDay((0,An.Z)(d)),ie=this.dateAdapter.getDayOfWeek(k)||7;for(let ir=1;ir<ie;ir++)d.unshift(null);const ot=this.getCurrentDateForDay((0,Ni.Z)(d)),Cn=this.dateAdapter.getDayOfWeek(ot)||7;for(let ir=7;ir>Cn;ir--)d.push(null);return d}splitArrayToChunks(s,d){const k=[];for(let ie=0;ie<s.length;ie+=d){const ot=s.slice(ie,ie+d);k.push(ot)}return k}goToLastMonth(){var s=this;return(0,o.Z)(function*(){yield s.changeMonth(-1)})()}goToNextMonth(){var s=this;return(0,o.Z)(function*(){yield s.changeMonth(1)})()}changeMonth(s){var d=this;return(0,o.Z)(function*(){const k=d.dateAdapter.addCalendarMonths(d.date,s);if(d.blockPeriodChange)return d.emitPeriodChangeAttempt(k),void d.updateNavigationAbility(d.ongoingMonth,d.ongoingYear,k.month(),k.year());(yield d.getClearSelectionConfirmation())&&(d.selection.clear(),d.date=k,d.emitPeriodChanged(d.date),d.updateNavigationAbility(d.ongoingMonth,d.ongoingYear,d.selectedMonth,d.selectedYear),d.cdr.markForCheck())})()}emitPeriodChanged(s){const d=this.getMonthPeriodFromDate(s);this.periodChanged.emit(d)}emitPeriodChangeAttempt(s){const d=this.getMonthPeriodFromDate(s);this.periodChangeAttempt.emit(d)}getMonthPeriodFromDate(s){return[s.startOf("month").format(as.STANDARD),s.endOf("month").format(as.STANDARD)]}getClearSelectionConfirmation(){var s=this;return(0,o.Z)(function*(){if(!s.selection.hasValue())return!0;return(yield(yield s.notify.createConfirmationPopUp("Calendar.MonthChangeConfirmation.Title","Calendar.MonthChangeConfirmation.Question","Calendar.MonthChangeConfirmation.ConfirmButton")).onDidDismiss()).data})()}getFeedForDay(s){const d=this.getCurrentDateForDayFormatted(s);return this.feed?.[d]}dispatchFocusOnFocusIn(){this.elRef.nativeElement.addEventListener("focusin",()=>{if(this.elRef.nativeElement.matches(":focus-within")){const s=new Event("focus",{bubbles:!0});this.elRef.nativeElement.dispatchEvent(s)}})}dispatchBlurOnFocusOut(){this.elRef.nativeElement.addEventListener("focusout",()=>{if(!this.elRef.nativeElement.matches(":focus-within")){const s=new Event("blur",{bubbles:!0});this.elRef.nativeElement.dispatchEvent(s)}})}trackDayFn(s,d){return d}trackWeekFn(s,d){return d}datesFilter(s){return!this.datesFilterFn||this.datesFilterFn(s)}isDateSelectable(s){return this.datesFilter(s)}}wg.\u0275fac=function(s){return new(s||wg)(e.Y36(gn._A),e.Y36(we.sK),e.Y36(md),e.Y36(e.sBO),e.Y36(e.SBq))},wg.\u0275cmp=e.Xpm({type:wg,selectors:[["sivi-lib-calendar"]],hostBindings:function(s,d){1&s&&e.NdJ("mouseup",function(){return d.onMouseUpListener()},!1,e.Jf7)},inputs:{value:"value",date:"date",selectedDates:"selectedDates",name:"name",label:"label",calendarData:"calendarData",feed:"feed",blockPeriodChange:"blockPeriodChange",multiSelection:"multiSelection",paintSelection:"paintSelection",showWeekNumbers:"showWeekNumbers",preventPastMonthNavigation:"preventPastMonthNavigation",datesFilterFn:"datesFilterFn"},outputs:{selectionChanged:"selectionChanged",valueChanged:"valueChanged",periodChanged:"periodChanged",periodChangeAttempt:"periodChangeAttempt"},features:[e._Bn([{provide:gn._A,useClass:wn,deps:[gn.Ad,un]}]),e.qOj],decls:15,vars:9,consts:[[4,"ngIf"],[1,"ion-text-center","ion-margin-vertical","ion-align-items-center","ion-justify-content-between"],["size","auto",1,"date-period"],["size","auto"],["fill","clear","no-min-width","",3,"disabled","click"],["name","arrow-back"],["fill","clear","no-min-width","",3,"click"],["name","arrow-forward"],["class","ion-no-padding",4,"ngIf"],["class","day-header ion-no-padding",4,"ngFor","ngForOf","ngForTrackBy"],[1,"calendar-content"],["class","ion-nowrap",4,"ngFor","ngForOf","ngForTrackBy"],[1,"ion-no-padding"],[1,"day-header","ion-no-padding"],[1,"ion-nowrap"],["class","ion-no-padding",4,"ngFor","ngForOf","ngForTrackBy"],[1,"week-number"],["class","day-container",3,"tabindex","mousedown","touchstart","mouseup","touchend","mousemove","touchmove",4,"ngIf"],[1,"day-container",3,"tabindex","mousedown","touchstart","mouseup","touchend","mousemove","touchmove"],[1,"day",3,"ngClass"],["class","calendar-icon-top-right",3,"src",4,"ngIf"],[1,"day-number"],["class","calendar-icon-bottom",3,"src",4,"ngIf"],[1,"calendar-icon-top-right",3,"src"],[1,"calendar-icon-bottom",3,"src"]],template:function(s,d){1&s&&(e.YNc(0,Kv,3,3,"ion-label",0),e.TgZ(1,"ion-row",1)(2,"ion-col",2),e._uU(3),e.qZA(),e.TgZ(4,"ion-col",3)(5,"ion-button",4),e.NdJ("click",function(){return d.goToLastMonth()}),e._UZ(6,"ion-icon",5),e.qZA(),e.TgZ(7,"ion-button",6),e.NdJ("click",function(){return d.goToNextMonth()}),e._UZ(8,"ion-icon",7),e.qZA()()(),e.TgZ(9,"ion-grid")(10,"ion-row"),e.YNc(11,Ph,1,0,"ion-col",8),e.YNc(12,P_,3,1,"ion-col",9),e.qZA(),e.TgZ(13,"div",10),e.YNc(14,Bb,3,3,"ion-row",11),e.qZA()()),2&s&&(e.Q6J("ngIf",d.label),e.xp6(3),e.AsE("",d.nameOfSelectedMonth," ",d.selectedYear,""),e.xp6(2),e.Q6J("disabled",!d.canNavigateToPreviousMonth),e.xp6(6),e.Q6J("ngIf",d.showWeekNumbers),e.xp6(1),e.Q6J("ngForOf",d.dayOfWeekNames)("ngForTrackBy",d.trackByFnAll),e.xp6(2),e.Q6J("ngForOf",d.calendarData)("ngForTrackBy",d.trackWeekFn))},dependencies:[Nt.YG,Nt.wI,Nt.jY,Nt.gu,Nt.Q$,Nt.Nd,Et.mk,Et.sg,Et.O5,we.X$],styles:['[_nghost-%COMP%]{height:100%;overflow:scroll;--date-period-margin-left: .7em;--date-period-font-size: 1.4em;--day-header-color: var(--ion-color-primary);--day-header-font-size: 16px;--day-color: var(--ion-color-primary);--day-font-size: 1.5em;--day-width: 100%;--day-hover-background-color: rgba(0, 0 ,0, .05);--day-selected-background-color: var(--ion-color-success);--day-selected-color: var(--ion-color-success-contrast);--current-day-color: var(--ion-color-primary);--current-day-border-color: var(--ion-color-secondary);--current-day-border-size: 1px;--top-right-icon-top: 0;--top-right-icon-right: 5%;--bottom-icon-bottom: -2px;--bottom-icon-right: 50%;--week-number-font-size: 12px;--week-number-font-style: italic;--week-number-color: var(--ion-color-primary);--week-number-background: none}ion-content[_ngcontent-%COMP%]{min-width:16em}ion-grid[_ngcontent-%COMP%]{display:flex;flex-flow:column;aspect-ratio:1/.9}.calendar-content[_ngcontent-%COMP%]{display:flex;flex-flow:column;flex:1 0 auto}.calendar-content[_ngcontent-%COMP%]   ion-row[_ngcontent-%COMP%]{flex:1 0 auto}.day[_ngcontent-%COMP%]{display:flex;position:relative;flex-flow:column;justify-content:center;align-items:center;font-size:var(--day-font-size);min-width:1em;min-height:1em;width:var(--day-width);aspect-ratio:1/1;color:var(--day-color)}.day.current-day[_ngcontent-%COMP%]{color:var(--current-day-color)}.day.current-day[_ngcontent-%COMP%]:after{content:"";position:absolute;inset:0;border:var(--current-day-border-size) solid var(--current-day-border-color);border-radius:50%;padding:0;margin:4px}.day.inactive[_ngcontent-%COMP%]{color:#0003}.day.selected[_ngcontent-%COMP%]{color:var(--day-selected-color);background-color:var(--day-selected-background-color)}.day.left-rounded[_ngcontent-%COMP%]{border-top-left-radius:50%;border-bottom-left-radius:50%}.day.right-rounded[_ngcontent-%COMP%]{border-top-right-radius:50%;border-bottom-right-radius:50%}.day-header[_ngcontent-%COMP%]{color:var(--day-header-color);font-size:var(--day-header-font-size);text-align:center}.day-container[_ngcontent-%COMP%]{display:flex;flex-flow:column;justify-content:center;align-items:center;width:100%;height:100%;padding:0;-webkit-user-select:none;user-select:none}.day-container[tabindex="-1"][_ngcontent-%COMP%]{cursor:default}.day-container[tabindex="-1"][_ngcontent-%COMP%]:focus{outline:0}.day-container[_ngcontent-%COMP%]:hover:not([tabindex="-1"]){background-color:var(--day-hover-background-color)}.date-period[_ngcontent-%COMP%]{font-size:var(--date-period-font-size);margin-left:var(--date-period-margin-left)}.calendar-icon-top-right[_ngcontent-%COMP%]{position:absolute;right:var(--top-right-icon-right);top:var(--top-right-icon-top);width:35%;max-width:30px}.calendar-icon-bottom[_ngcontent-%COMP%]{position:absolute;right:var(--bottom-icon-right);bottom:var(--bottom-icon-bottom);transform:translate(50%);width:35%;max-width:20px}ion-label[_ngcontent-%COMP%]{display:block;margin-bottom:-16px}.week-number[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;height:100%;width:100%;font-size:var(--week-number-font-size);font-style:var(--week-number-font-style);color:var(--week-number-color);background:var(--week-number-background)}'],changeDetection:0});class _m{}function nh(H,s){if(1&H&&(e.TgZ(0,"ion-label"),e._uU(1),e.ALo(2,"translate"),e.qZA()),2&H){const d=e.oxw();e.xp6(1),e.hij(" ",e.lcZ(2,1,d.label),"\n")}}_m.\u0275fac=function(s){return new(s||_m)},_m.\u0275mod=e.oAB({type:_m}),_m.\u0275inj=e.cJS({imports:[Nt.Pc,Et.ez,zp]});class O_{get nameOfSelectedMonth(){const s=this.dateAdapter.getMonth(this.date);return this.dateAdapter.getMonthNames("short")[s]}get selectedMonth(){return this.dateAdapter.getMonth(this.date)}get selectedYear(){return this.dateAdapter.getYear(this.date)}constructor(s,d,k){this.dateAdapter=s,this.translate=d,this.cdr=k,this.date=this.dateAdapter.today(),this.periodChanged=new e.vpe}ngOnInit(){this.dateAdapter.setLocale(co.getFixedLocale(this.translate.currentLang))}goToLastMonth(){var s=this;return(0,o.Z)(function*(){yield s.changeMonth(-1)})()}goToNextMonth(){var s=this;return(0,o.Z)(function*(){yield s.changeMonth(1)})()}changeMonth(s){var d=this;return(0,o.Z)(function*(){d.date=d.dateAdapter.addCalendarMonths(d.date,s),d.emitPeriodChanged(d.date),d.cdr.markForCheck()})()}emitPeriodChanged(s){const d=co.getMonthPeriodFromDate(s);this.periodChanged.emit(d)}}O_.\u0275fac=function(s){return new(s||O_)(e.Y36(gn._A),e.Y36(we.sK),e.Y36(e.sBO))},O_.\u0275cmp=e.Xpm({type:O_,selectors:[["sivi-lib-month-selection"]],inputs:{name:"name",label:"label",date:"date"},outputs:{periodChanged:"periodChanged"},features:[e._Bn([{provide:gn._A,useClass:wn,deps:[gn.Ad,un]}])],decls:9,vars:3,consts:[[4,"ngIf"],[1,"ion-text-center","ion-margin-vertical","ion-align-items-center","ion-justify-content-between"],["size","auto",1,"date-period"],["size","auto"],["fill","clear","no-min-width","",3,"click"],["name","arrow-back"],["name","arrow-forward"]],template:function(s,d){1&s&&(e.YNc(0,nh,3,3,"ion-label",0),e.TgZ(1,"ion-row",1)(2,"ion-col",2),e._uU(3),e.qZA(),e.TgZ(4,"ion-col",3)(5,"ion-button",4),e.NdJ("click",function(){return d.goToLastMonth()}),e._UZ(6,"ion-icon",5),e.qZA(),e.TgZ(7,"ion-button",4),e.NdJ("click",function(){return d.goToNextMonth()}),e._UZ(8,"ion-icon",6),e.qZA()()()),2&s&&(e.Q6J("ngIf",d.label),e.xp6(3),e.AsE("",d.nameOfSelectedMonth," ",d.selectedYear,""))},dependencies:[Nt.YG,Nt.wI,Nt.gu,Nt.Q$,Nt.Nd,Et.O5,we.X$],styles:["[_nghost-%COMP%]{--date-period-margin-left: .7em;--date-period-font-size: 1.4em;--date-period-color: var(--ion-color-primary)}ion-label[_ngcontent-%COMP%]{display:block;margin-bottom:-16px}.date-period[_ngcontent-%COMP%]{font-size:var(--date-period-font-size);margin-left:var(--date-period-margin-left);color:var(--date-period-color)}"],changeDetection:0});class Ig{}function M1(H,s){if(1&H&&e._UZ(0,"sivi-lib-info-popup",5),2&H){const d=e.oxw(2);e.Q6J("text",d.labelInfo)}}function T0(H,s){if(1&H&&(e.TgZ(0,"div",3)(1,"ion-label"),e._uU(2),e.ALo(3,"translate"),e.qZA(),e.YNc(4,M1,1,1,"sivi-lib-info-popup",4),e.qZA()),2&H){const d=e.oxw();e.xp6(2),e.hij(" ",e.lcZ(3,2,d.label)," "),e.xp6(2),e.Q6J("ngIf",d.labelInfo)}}function Vy(H,s){1&H&&e.GkF(0)}Ig.\u0275fac=function(s){return new(s||Ig)},Ig.\u0275mod=e.oAB({type:Ig}),Ig.\u0275inj=e.cJS({imports:[zp]});const Zy=function(H){return{selectedOptionValue:H}};function Ub(H,s){if(1&H&&(e.ynx(0),e.TgZ(1,"span",8),e.YNc(2,Vy,1,0,"ng-container",9),e.qZA(),e.BQk()),2&H){const d=e.oxw().$implicit,k=e.oxw();e.xp6(2),e.Q6J("ngTemplateOutlet",k.contentTemplate)("ngTemplateOutletContext",e.VKq(2,Zy,d.value))}}const zb=function(H){return{"button-selected":H}};function Jv(H,s){if(1&H){const d=e.EpF();e.ynx(0),e.TgZ(1,"ion-button",6),e.NdJ("click",function(){const ot=e.CHM(d).$implicit,Cn=e.oxw();return e.KtG(Cn.onButtonClick(ot.value))}),e._uU(2),e.qZA(),e.YNc(3,Ub,3,4,"ng-container",7),e.BQk()}if(2&H){const d=s.$implicit,k=e.oxw();e.xp6(1),e.Q6J("fill",k.buttonsSelection.isSelected(d.value)?"solid":"outline")("ngClass",e.VKq(4,zb,k.buttonsSelection.isSelected(d.value))),e.xp6(1),e.hij(" ",d.text," "),e.xp6(1),e.Q6J("ngIf",k.buttonsSelection.isSelected(d.value)&&k.showContentProjection)}}const Pg=function(H){return{"inline-buttons":H}};class L_ extends Js{set value(s){(0,Ne.Z)(s,this.value)||(this.buttonsSelection.clear(),this.shouldAutoSelect?this.selectFirstOption():this.buttonsSelection.select(...s))}get value(){return this.buttonsSelection.selected}set options(s){(0,Ne.Z)(s,this.options)||(this._options=s,this.clearValueOnOptionsChange&&this.buttonsSelection.clear(),this.shouldAutoSelect&&this.selectFirstOption())}get options(){return this._options}get shouldAutoSelect(){return this.shouldAutoSelectWhenNoChoice&&1===this.options.length}constructor(s,d){super(),this.translate=s,this.elRef=d,this.multiple=!0,this.clearable=!0,this.shouldAutoSelectWhenNoChoice=!0,this.clearValueOnOptionsChange=!0,this.color="success",this.inline=!0,this.showContentProjection=!1,this.valueChange=new e.vpe,this.buttonsSelection=new rs.Ov(!0,null),this._options=[],this.buttonsSelection.changed.pipe((0,be.x)(Ne.Z),(0,j.R)(this.destroy$)).subscribe(k=>this.dispatchSelectionChange(k.source.selected)),this.dispatchFocusOnFocusIn(),this.dispatchBlurOnFocusOut()}onButtonClick(s){this.buttonsSelection.isSelected(s)?this.deselectValueIfAllowed(s):(this.multiple||this.buttonsSelection.clear(),this.buttonsSelection.select(s))}dispatchSelectionChange(s){const k=new CustomEvent("siviChange",{detail:{value:s},bubbles:!0});this.elRef.nativeElement.dispatchEvent(k),this.valueChange.emit(s)}deselectValueIfAllowed(s){(this.buttonsSelection.selected.length>1||this.clearable)&&this.buttonsSelection.deselect(s)}selectFirstOption(){this.buttonsSelection.select((0,An.Z)(this.options).value)}dispatchFocusOnFocusIn(){this.elRef.nativeElement.addEventListener("focusin",()=>{if(this.elRef.nativeElement.matches(":focus-within")){const s=new Event("focus",{bubbles:!0});this.elRef.nativeElement.dispatchEvent(s)}})}dispatchBlurOnFocusOut(){this.elRef.nativeElement.addEventListener("focusout",()=>{if(!this.elRef.nativeElement.matches(":focus-within")){const s=new Event("blur",{bubbles:!0});this.elRef.nativeElement.dispatchEvent(s)}})}}L_.\u0275fac=function(s){return new(s||L_)(e.Y36(we.sK),e.Y36(e.SBq))},L_.\u0275cmp=e.Xpm({type:L_,selectors:[["sivi-lib-buttons-select"]],inputs:{value:"value",options:"options",name:"name",multiple:"multiple",clearable:"clearable",shouldAutoSelectWhenNoChoice:"shouldAutoSelectWhenNoChoice",clearValueOnOptionsChange:"clearValueOnOptionsChange",color:"color",label:"label",labelInfo:"labelInfo",inline:"inline",showContentProjection:"showContentProjection",contentTemplate:"contentTemplate"},outputs:{valueChange:"valueChange"},features:[e.qOj],decls:3,vars:6,consts:[["class","label-wrapper",4,"ngIf"],[1,"buttons-container",3,"ngClass"],[4,"ngFor","ngForOf","ngForTrackBy"],[1,"label-wrapper"],[3,"text",4,"ngIf"],[3,"text"],["color","success","no-min-width","","shape","round",3,"fill","ngClass","click"],[4,"ngIf"],[1,"fit"],[4,"ngTemplateOutlet","ngTemplateOutletContext"]],template:function(s,d){1&s&&(e.YNc(0,T0,5,4,"div",0),e.TgZ(1,"div",1),e.YNc(2,Jv,4,6,"ng-container",2),e.qZA()),2&s&&(e.Q6J("ngIf",d.label),e.xp6(1),e.Q6J("ngClass",e.VKq(4,Pg,d.inline)),e.xp6(1),e.Q6J("ngForOf",d.options)("ngForTrackBy",d.trackByFn))},styles:["[_nghost-%COMP%]{--label-margin-bottom: 0}.button-selected[_ngcontent-%COMP%]{--border-width: 2px;--border-style: solid;--border-color: var(--ion-color-base)}.label-wrapper[_ngcontent-%COMP%]{margin-bottom:var(--label-margin-bottom, 0)}.buttons-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-start}.inline-buttons[_ngcontent-%COMP%]{flex-direction:row;flex-wrap:wrap}  .fit{display:block;width:100%;padding-top:1em;padding-bottom:1em}"],changeDetection:0});class o_{}function x0(H,s){if(1&H&&e._UZ(0,"cgi-icon",4),2&H){const d=e.oxw(2);e.Q6J("name",d.icon)}}function Vd(H,s){if(1&H){const d=e.EpF();e.TgZ(0,"ion-button",2),e.NdJ("click",function(ie){e.CHM(d);const ot=e.oxw();return e.KtG(ot.showActionsPopover(ie))}),e._uU(1),e.YNc(2,x0,1,1,"cgi-icon",3),e.qZA()}if(2&H){const d=e.oxw();e.Q6J("fill",d.fill),e.xp6(1),e.hij(" ",d.buttonText," "),e.xp6(1),e.Q6J("ngIf",d.icon)}}function D0(H,s){if(1&H){const d=e.EpF();e.TgZ(0,"ion-button",2),e.NdJ("click",function(){e.CHM(d);const ie=e.oxw();return e.KtG(ie.onActionClick(ie.options[0]))}),e._uU(1),e.qZA()}if(2&H){const d=e.oxw();e.Q6J("fill",d.fill),e.xp6(1),e.hij(" ",null==d.options[0]?null:d.options[0].text," ")}}o_.\u0275fac=function(s){return new(s||o_)},o_.\u0275mod=e.oAB({type:o_}),o_.\u0275inj=e.cJS({imports:[zp]}),e.B6R(L_,[qf,Nt.YG,Nt.Q$,Et.mk,Et.sg,Et.O5,Et.tP],[we.X$]);class gf extends Js{constructor(s,d){super(),this.translate=s,this.popoverCtrl=d,this.fill="outline",this.actionClick=new e.vpe}onActionClick(s){this.actionClick.emit(s)}showActionsPopover(s){var d=this;return(0,o.Z)(function*(){const k=d.options,ie=yield d.popoverCtrl.create({component:pm,event:s,backdropDismiss:!0,showBackdrop:!1,componentProps:{items:k}});yield ie.present();const Cn=(yield ie.onDidDismiss()).data;Cn&&d.onActionClick(d.getOptionById(Cn))})()}getOptionById(s){return this.options.find(d=>d.id===s)}}gf.\u0275fac=function(s){return new(s||gf)(e.Y36(we.sK),e.Y36(Nt.Dh))},gf.\u0275cmp=e.Xpm({type:gf,selectors:[["sivi-lib-popover-button"]],inputs:{options:"options",buttonText:"buttonText",fill:"fill",icon:"icon"},outputs:{actionClick:"actionClick"},features:[e.qOj],decls:3,vars:2,consts:[[3,"fill","click",4,"ngIf","ngIfElse"],["singleOption",""],[3,"fill","click"],[3,"name",4,"ngIf"],[3,"name"]],template:function(s,d){if(1&s&&(e.YNc(0,Vd,3,3,"ion-button",0),e.YNc(1,D0,2,2,"ng-template",null,1,e.W1O)),2&s){const k=e.MAs(2);e.Q6J("ngIf",d.options.length>1)("ngIfElse",k)}},dependencies:[Et.O5,Nt.YG],encapsulation:2});class gv{}function kf(H,s){if(1&H){const d=e.EpF();e.TgZ(0,"sivi-lib-tree",7),e.NdJ("clickedNode",function(ie){e.CHM(d);const ot=e.oxw();return e.KtG(ot.changeSelection(ie))}),e.qZA()}if(2&H){const d=e.oxw();e.Q6J("node",d.hierarchyTreeNode)("allowedTypes",d.allowedTypes)("restrictToProperty",d.restrictToProperty)("useRadioButtonForSelection",d.useRadioButtonForSelection)("currentOrganizationId",d.selectedOrganization?d.selectedOrganization.id:null)("expandAll",!1)}}gv.\u0275fac=function(s){return new(s||gv)},gv.\u0275mod=e.oAB({type:gv}),gv.\u0275inj=e.cJS({providers:[Nt.Dh],imports:[Ga,Yd]});class ih{constructor(s,d,k,ie,ot){this.modalCtrl=s,this.translate=d,this.organizationService=k,this.organizationCommonService=ie,this.cdr=ot,this.useRadioButtonForSelection=!1,this.loading=!1}ngOnInit(){this.getOrganizationTreeForMunicipality(this.municipalityId)}getOrganizationTreeForMunicipality(s){s?(this.loading=!0,this.organizationService.getOrganizationTreeByOrganizationId(s).pipe((0,ye.q)(1)).subscribe(d=>{this.hierarchyTreeNode=this.organizationCommonService.buildTreeStructure(d,[Ro.CURRENT,Ro.FUTURE]),this.selectedOrganization={id:this.organizationId}},d=>{console.error("organization tree for municipality failed",d)},()=>{this.loading=!1,this.cdr.detectChanges()})):console.error("getOrganizationTreeForMunicipality municipalityId is missing")}changeSelection(s){this.selectedOrganization=s}onDismiss(s){this.modalCtrl.dismiss(s)}}ih.\u0275fac=function(s){return new(s||ih)(e.Y36(Ac),e.Y36(we.sK),e.Y36(Qc),e.Y36(dm),e.Y36(e.sBO))},ih.\u0275cmp=e.Xpm({type:ih,selectors:[["sivi-lib-selector-modal"]],inputs:{municipalityId:"municipalityId",organizationId:"organizationId",allowedTypes:"allowedTypes",restrictToProperty:"restrictToProperty",useRadioButtonForSelection:"useRadioButtonForSelection"},decls:13,vars:14,consts:[[1,"ion-padding"],[3,"show"],[1,"sivi-lib-tree-container"],[3,"node","allowedTypes","restrictToProperty","useRadioButtonForSelection","currentOrganizationId","expandAll","clickedNode",4,"ngIf"],[1,"buttons-container","p3"],["fill","outline","role","button",1,"mr2",3,"click"],["role","button",3,"click"],[3,"node","allowedTypes","restrictToProperty","useRadioButtonForSelection","currentOrganizationId","expandAll","clickedNode"]],template:function(s,d){1&s&&(e.TgZ(0,"ion-content",0),e._UZ(1,"sivi-progress-bar",1),e.TgZ(2,"div",2),e.YNc(3,kf,1,6,"sivi-lib-tree",3),e.qZA(),e.TgZ(4,"div",4)(5,"ion-button",5),e.NdJ("click",function(){return d.onDismiss()}),e.ALo(6,"translate"),e._uU(7),e.ALo(8,"translate"),e.qZA(),e.TgZ(9,"ion-button",6),e.NdJ("click",function(){return d.onDismiss(d.selectedOrganization)}),e.ALo(10,"translate"),e._uU(11),e.ALo(12,"translate"),e.qZA()()()),2&s&&(e.xp6(1),e.Q6J("show",d.loading),e.xp6(2),e.Q6J("ngIf",d.hierarchyTreeNode),e.xp6(2),e.uIk("aria-label",e.lcZ(6,6,"General.Buttons.Close")),e.xp6(2),e.hij(" ",e.lcZ(8,8,"General.Buttons.Close")," "),e.xp6(2),e.uIk("aria-label",e.lcZ(10,10,"General.Buttons.Ok")),e.xp6(2),e.hij(" ",e.lcZ(12,12,"General.Buttons.Ok")," "))},styles:["h1[_ngcontent-%COMP%]{color:var(--ion-color-secondary);margin-top:16px}.buttons-container[_ngcontent-%COMP%]{display:flex;position:fixed;bottom:15px;right:15px}.buttons-container[_ngcontent-%COMP%]   ion-button[_ngcontent-%COMP%]{width:35%}.sivi-lib-tree-container[_ngcontent-%COMP%]{height:85%;overflow-y:auto;overflow-x:hidden}"],changeDetection:0});class _v{constructor(s,d,k,ie){this.modalCtrl=s,this.translate=d,this.cdr=k,this.elementRef=ie,this.title="Form.Label.ParentOrganization",this.disabled=!1,this.name="organization",this.changed=new e.vpe}showOrganizationsModal(){var s=this;return(0,o.Z)(function*(){if(s.disabled)return;const d=yield s.modalCtrl.create({component:ih,componentProps:{municipalityId:s.municipalityId,organizationId:s.organization?s.organization.id:null,allowedTypes:s.allowedTypes,useRadioButtonForSelection:!0,restrictToProperty:s.restrictToProperty}});d.present(),d.onDidDismiss().then(k=>{k&&k.data&&s.updateSelectedOrganization(k.data)})})()}updateSelectedOrganization(s){this.organization=s,this.changed.emit(this.organization),this.cdr.detectChanges();const d=new CustomEvent("siviChange",{detail:{name:this.name,value:{id:s?s.id:null,name:s?s.name:null}},bubbles:!0});this.elementRef.nativeElement.dispatchEvent(d)}}function Qv(H,s){if(1&H){const d=e.EpF();e.TgZ(0,"ion-button",7),e.NdJ("click",function(){const ot=e.CHM(d).$implicit,Cn=e.oxw();return e.KtG(Cn.clickExtraButton(ot.id))}),e._uU(1),e.ALo(2,"translate"),e.qZA()}if(2&H){const d=s.$implicit;e.uIk("data-cy","extra-button-id-"+d.id),e.xp6(1),e.hij(" ",e.lcZ(2,2,d.text),"\n")}}function U(H,s){if(1&H){const d=e.EpF();e.TgZ(0,"mat-tree-node",8)(1,"div",9)(2,"button",10),e._UZ(3,"cgi-icon",11),e.qZA(),e.TgZ(4,"sivi-lib-tree-node",12),e.NdJ("click",function(){const ot=e.CHM(d).$implicit,Cn=e.oxw();return e.KtG(Cn.onClickNode(ot))}),e.qZA()()()}if(2&H){const d=s.$implicit,k=e.oxw();e.xp6(4),e.Q6J("node",d)("currentOrganization",k.currentOrganization)("useRadioButtonForSelection",k.useRadioButtonForSelection)}}function J(H,s){1&H&&(e.TgZ(0,"div",18),e.GkF(1,19),e.qZA())}function Ue(H,s){if(1&H){const d=e.EpF();e.TgZ(0,"mat-nested-tree-node",13)(1,"div",14)(2,"button",15),e._UZ(3,"cgi-icon",16),e.qZA(),e.TgZ(4,"sivi-lib-tree-node",12),e.NdJ("click",function(){const ot=e.CHM(d).$implicit,Cn=e.oxw();return e.KtG(Cn.onClickNode(ot))}),e.qZA()(),e.YNc(5,J,2,0,"div",17),e.qZA()}if(2&H){const d=s.$implicit,k=e.oxw();e.xp6(2),e.uIk("aria-label","toggle node "+d.name),e.xp6(1),e.Q6J("name",k.treeControl.isExpanded(d)?"expand_more":"chevron_right"),e.xp6(1),e.Q6J("node",d)("currentOrganization",k.currentOrganization)("useRadioButtonForSelection",k.useRadioButtonForSelection),e.xp6(1),e.Q6J("ngIf",k.treeControl.isExpanded(d))}}_v.\u0275fac=function(s){return new(s||_v)(e.Y36(Ac),e.Y36(we.sK),e.Y36(e.sBO),e.Y36(e.SBq))},_v.\u0275cmp=e.Xpm({type:_v,selectors:[["sivi-lib-organization-selector"]],inputs:{title:"title",municipalityId:"municipalityId",organization:"organization",disabled:"disabled",allowedTypes:"allowedTypes",name:"name",restrictToProperty:"restrictToProperty"},outputs:{changed:"changed"},decls:3,vars:5,consts:[["type","text","label-position","floating","siviKeyboardEvents","","readonly","",3,"label","viewMode","value","siviClick"],["parentOrganization",""]],template:function(s,d){1&s&&(e.TgZ(0,"cgi-input",0,1),e.NdJ("siviClick",function(){return d.showOrganizationsModal()}),e.ALo(2,"translate"),e.qZA()),2&s&&e.Q6J("label",e.lcZ(2,3,d.title))("viewMode",d.disabled)("value",null==d.organization?null:d.organization.name)},dependencies:[Kp,we.X$],changeDetection:0});class At extends Js{set node(s){this.saveExpandedNodes(),this.treeNode=s,this.initTreeData(),this.showCurrentNode(),this.restoreExpandedNodes()}constructor(s,d){super(),this.translate=s,this.organizationCommonService=d,this.expandAll=!1,this.useRadioButtonForSelection=!1,this.allowedTypes=[],this.clickedNode=new e.vpe,this.clickedExtraButton=new e.vpe,this.treeControl=new yc(k=>k.children),this.dataSource=new Zc,this.searchFilter$=new l.x}ngOnInit(){this.currentOrganization=this.getNode(this.currentOrganizationId),this.restrictNodeTree(this.treeNode,this.allowedTypes,this.restrictToProperty),this.searchFilter$.pipe((0,j.R)(this.destroy$)).subscribe(s=>{s&&s.length>=3?this.treeControl.dataNodes=this.filterByName(s):this.treeControl.dataNodes=this.treeNode.children,this.dataSource.data=this.treeControl.dataNodes})}ngOnChanges(s){s.currentOrganizationId&&(this.currentOrganization=this.getNode(s.currentOrganizationId.currentValue))}initTreeData(){this.flattenedTreeNodes=this.organizationCommonService.flattenOrganizations(this.treeNode),this.dataSource.data=this.treeNode.children,this.treeControl.dataNodes=this.treeNode.children,this.expandAll&&this.treeControl.expandAll()}showCurrentNode(){const s=this.getNode(this.currentOrganizationId);if(s&&s.path){const d=s.path.split("->");for(const k of d)this.treeControl.expand(this.getNode(k));this.currentOrganizationId&&setTimeout(()=>{this.scrollToNode(this.currentOrganizationId)},100)}}getNode(s){return this.flattenedTreeNodes.find(d=>d.id===s)}scrollToNode(s){const d=document.querySelector("#node-"+s);d&&d.scrollIntoView({behavior:"smooth",block:"start",inline:"nearest"})}saveExpandedNodes(){if(this.expandedNodes=[],this.treeControl&&this.treeControl.dataNodes)for(const s of this.flattenedTreeNodes)this.treeControl.isExpanded(s)&&this.expandedNodes.push(s)}restoreExpandedNodes(){this.searchFilter$.next("");for(const s of this.expandedNodes)this.treeControl.expand(this.getNode(s.id))}hasChildren(s,d){return!!d.children&&d.children.length>0}toggleTreeHierarchy(){this.treeControl.dataNodes&&(this.treeControl.dataNodes.every(d=>this.treeControl.isExpanded(d))?this.treeControl.collapseAll():this.treeControl.expandAll())}onClickNode(s){s&&!s.disabled&&(this.clickedNode.emit(s),this.currentOrganization=s)}clickExtraButton(s){this.clickedExtraButton.emit(s)}onChangeFilterText(s){this.searchFilter$.next(s.detail.value)}restrictNodeTree(s,d,k){if((d||k)&&(d&&d.length>0&&(s.disabled=!d.includes(s.type)),!s.disabled&&k&&(s.disabled=!s[k]),s.children))for(const ie of s.children)this.restrictNodeTree(ie,d,k)}filterByName(s){return this.flattenedTreeNodes.filter(d=>d.name.toLowerCase().includes(s.toLowerCase()))}}At.\u0275fac=function(s){return new(s||At)(e.Y36(we.sK),e.Y36(dm))},At.\u0275cmp=e.Xpm({type:At,selectors:[["sivi-lib-tree"]],inputs:{node:"node",expandAll:"expandAll",extraButtons:"extraButtons",currentOrganizationId:"currentOrganizationId",useRadioButtonForSelection:"useRadioButtonForSelection",allowedTypes:"allowedTypes",restrictToProperty:"restrictToProperty"},outputs:{clickedNode:"clickedNode",clickedExtraButton:"clickedExtraButton"},features:[e.qOj,e.TTD],decls:13,vars:14,consts:[["color","primary","fill","outline","data-cy","tree-toggle-hierarchy",3,"click"],["color","primary","fill","outline",3,"click",4,"ngFor","ngForOf","ngForTrackBy"],["position","floating"],["data-cy","tree-search-input",3,"value","ionChange"],["data-cy","tree-results-content",1,"content-div",3,"dataSource","treeControl"],["matTreeNodeToggle","","role","treeitem",4,"matTreeNodeDef"],["role","treeitem",4,"matTreeNodeDef","matTreeNodeDefWhen"],["color","primary","fill","outline",3,"click"],["matTreeNodeToggle","","role","treeitem"],[1,"flex"],["mat-icon-button","","disabled",""],["name",""],[3,"node","currentOrganization","useRadioButtonForSelection","click"],["role","treeitem"],[1,"flex","flex-align-items-center"],["matTreeNodeToggle",""],[3,"name"],["role","group",4,"ngIf"],["role","group"],["matTreeNodeOutlet",""]],template:function(s,d){1&s&&(e.TgZ(0,"ion-button",0),e.NdJ("click",function(){return d.toggleTreeHierarchy()}),e._uU(1),e.ALo(2,"translate"),e.qZA(),e.YNc(3,Qv,3,4,"ion-button",1),e.TgZ(4,"ion-item")(5,"ion-label",2),e._uU(6),e.ALo(7,"translate"),e.qZA(),e.TgZ(8,"ion-input",3),e.NdJ("ionChange",function(ie){return d.onChangeFilterText(ie)}),e.ALo(9,"async"),e.qZA()(),e.TgZ(10,"mat-tree",4),e.YNc(11,U,5,3,"mat-tree-node",5),e.YNc(12,Ue,6,6,"mat-nested-tree-node",6),e.qZA()),2&s&&(e.xp6(1),e.hij(" ",e.lcZ(2,8,"General.Buttons.ExpandOrCollapse.All"),"\n"),e.xp6(2),e.Q6J("ngForOf",d.extraButtons)("ngForTrackBy",d.trackByFn),e.xp6(3),e.Oqu(e.lcZ(7,10,"Form.Label.Filter")),e.xp6(2),e.Q6J("value",e.lcZ(9,12,d.searchFilter$)),e.xp6(2),e.Q6J("dataSource",d.dataSource)("treeControl",d.treeControl),e.xp6(2),e.Q6J("matTreeNodeDefWhen",d.hasChildren))},styles:[".mat-tree[_ngcontent-%COMP%]{background-color:transparent}.mat-tree-node[_ngcontent-%COMP%], .mat-tree-node[_ngcontent-%COMP%]   .flex[_ngcontent-%COMP%], .mat-tree-node[_ngcontent-%COMP%]   [role=group][_ngcontent-%COMP%], .mat-nested-tree-node[_ngcontent-%COMP%], .mat-nested-tree-node[_ngcontent-%COMP%]   .flex[_ngcontent-%COMP%], .mat-nested-tree-node[_ngcontent-%COMP%]   [role=group][_ngcontent-%COMP%]{width:100%;margin:4px}.mat-tree-node[_ngcontent-%COMP%], .mat-nested-tree-node[_ngcontent-%COMP%]{align-items:flex-start;display:flex;flex-wrap:wrap;min-height:30px}.mat-nested-tree-node[_ngcontent-%COMP%]   .mat-tree-node[_ngcontent-%COMP%] > div[_ngcontent-%COMP%], .mat-nested-tree-node[_ngcontent-%COMP%]   .mat-nested-tree-node[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{flex-wrap:nowrap;margin-left:24px;min-height:24px;width:calc(100% - 24px)}.mat-tree-node[_ngcontent-%COMP%]   button[_ngcontent-%COMP%], .mat-nested-tree-node[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]{background-color:transparent;color:var(--ion-color-primary);height:24px;padding:0 3px}button[_ngcontent-%COMP%]:disabled{opacity:.5}button[_ngcontent-%COMP%], ion-icon[_ngcontent-%COMP%]{align-self:inherit}"],changeDetection:0});const yn=function(H,s,d,k){return{pointer:H,selected:s,highlight:d,disabled:k}};function zn(H,s){if(1&H&&(e.TgZ(0,"a",2),e._uU(1),e.qZA()),2&H){const d=e.oxw();e.s9C("id","node-"+d.node.id),e.Q6J("ngClass",e.l5B(4,yn,!!d.node.id,d.node.id&&d.node.id===(null==d.currentOrganization?null:d.currentOrganization.id),null==d.currentOrganization?null:d.currentOrganization.path.includes(d.node.id),d.node.disabled)),e.uIk("tabindex",!d.node.disabled&&d.node.id?"0":"-1"),e.xp6(1),e.hij(" ",d.node.name,"\n")}}const ki=function(H){return{"radio-checked":H}},ji=function(H,s,d){return{pointer:H,highlight:s,disabled:d}};function br(H,s){if(1&H&&(e.TgZ(0,"ion-item",3),e._UZ(1,"ion-radio",4),e.TgZ(2,"ion-label",5),e._uU(3),e.qZA()()),2&H){const d=e.oxw();e.s9C("id","node-"+d.node.id),e.xp6(1),e.Q6J("disabled",d.node.disabled)("ngClass",e.VKq(6,ki,d.isChecked(d.node))),e.uIk("aria-checked",d.isChecked(d.node)),e.xp6(1),e.Q6J("ngClass",e.kEZ(8,ji,!!d.node.id,null==d.currentOrganization?null:d.currentOrganization.path.includes(d.node.id),d.node.disabled)),e.xp6(1),e.hij(" ",d.node.name," ")}}class io extends Js{constructor(){super(...arguments),this.useRadioButtonForSelection=!1}isChecked(s){return!(!s||!this.currentOrganization)&&s.id===this.currentOrganization.id}}io.\u0275fac=function(){let H;return function(d){return(H||(H=e.n5z(io)))(d||io)}}(),io.\u0275cmp=e.Xpm({type:io,selectors:[["sivi-lib-tree-node"]],inputs:{node:"node",currentOrganization:"currentOrganization",useRadioButtonForSelection:"useRadioButtonForSelection"},features:[e.qOj],decls:2,vars:2,consts:[["class","node-selection","siviKeyboardEvents","",3,"id","ngClass",4,"ngIf"],["class","node-radio-selection","lines","none",3,"id",4,"ngIf"],["siviKeyboardEvents","",1,"node-selection",3,"id","ngClass"],["lines","none",1,"node-radio-selection",3,"id"],["siviKeyboardEvents","",3,"disabled","ngClass"],[3,"ngClass"]],template:function(s,d){1&s&&(e.YNc(0,zn,2,9,"a",0),e.YNc(1,br,4,12,"ion-item",1)),2&s&&(e.Q6J("ngIf",!d.useRadioButtonForSelection&&d.node),e.xp6(1),e.Q6J("ngIf",d.useRadioButtonForSelection&&d.node))},dependencies:[Et.mk,Et.O5,Nt.Ie,Nt.Q$,Nt.B7,Nt.U5,Kp],styles:[".selected[_ngcontent-%COMP%]{outline:2px var(--ion-color-secondary) solid;outline-offset:2px}.selected[_ngcontent-%COMP%]:focus, .selected[_ngcontent-%COMP%]:focus-within{outline-offset:1px;outline-style:dashed;outline-width:3px}.highlight[_ngcontent-%COMP%]{font-weight:700}.disabled[_ngcontent-%COMP%]{cursor:default}button[_ngcontent-%COMP%]:focus{outline-offset:-2px}button[_ngcontent-%COMP%], ion-icon[_ngcontent-%COMP%]{align-self:inherit}ion-item[_ngcontent-%COMP%]{--min-height: 32px}ion-radio[_ngcontent-%COMP%]{--color: var(--ion-color-primary);--padding-bottom: 0;--padding-top: 0;margin:0 8px 0 0}ion-label[_ngcontent-%COMP%]{margin:0}"],changeDetection:0});class uo{}uo.\u0275fac=function(s){return new(s||uo)},uo.\u0275mod=e.oAB({type:uo}),uo.\u0275inj=e.cJS({imports:[Et.ez,Nl,Hl,Ga]}),e.B6R(At,[Et.sg,Et.O5,Mr,cu,ll,qo,Yl,ld,Nt.YG,Nt.pK,Nt.Ie,Nt.Q$,Nt.j9,io],[Et.Ov,we.X$]);class Co{}Co.\u0275fac=function(s){return new(s||Co)},Co.\u0275mod=e.oAB({type:Co}),Co.\u0275inj=e.cJS({providers:[Ac,Qc,dm],imports:[uo,Ga]}),e.B6R(ih,[At,Et.O5,Nt.YG,Nt.W2],[we.X$]);class pa{}pa.\u0275fac=function(s){return new(s||pa)},pa.\u0275mod=e.oAB({type:pa}),pa.\u0275inj=e.cJS({imports:[zp,gu,zp,gu]});class Ea{constructor(s){this.route=s,this.errorCode=this.route.snapshot.paramMap.get("errorCode"),this.errorHeader="Message.Error.UnknownError",this.errorMessage="",this.errorIcon="error_outline"}ngOnInit(){this.createErrorMessage()}createErrorMessage(){"access-denied"===this.errorCode&&(this.errorHeader="Message.Error.AccessDenied"),"not-supported-browser"===this.errorCode&&(this.errorHeader="Message.Error.UnsupportedBrowser.Plural",this.errorMessage="Message.Error.UnsupportedBrowser"),"not-found"===this.errorCode&&(this.errorHeader="Message.Error.PageNotFound"),"updating-service"===this.errorCode&&(this.errorIcon="update",this.errorHeader="Message.Error.UpdatingService.Title",this.errorMessage="Message.Error.UpdatingService.LongExplanation")}}Ea.\u0275fac=function(s){return new(s||Ea)(e.Y36(qt.gz))},Ea.\u0275cmp=e.Xpm({type:Ea,selectors:[["sivi-lib-error"]],decls:4,vars:7,consts:[[1,"ion-padding"],["color","primary",3,"icon","header","text"]],template:function(s,d){1&s&&(e.TgZ(0,"ion-content",0),e._UZ(1,"cgi-status-view",1),e.ALo(2,"translate"),e.ALo(3,"translate"),e.qZA()),2&s&&(e.xp6(1),e.Q6J("icon",d.errorIcon)("header",e.lcZ(2,3,d.errorHeader))("text",e.lcZ(3,5,d.errorMessage)))},dependencies:[Nt.W2,we.X$],styles:["cgi-status-view[_ngcontent-%COMP%]{display:flex;margin-top:10%;width:100%}"]});const xs=[{path:"",component:Ea}];class El{}El.\u0275fac=function(s){return new(s||El)},El.\u0275mod=e.oAB({type:El}),El.\u0275inj=e.cJS({imports:[pa,qt.Bz.forChild(xs)]});class fs extends Id{constructor(s,d,k){super(s,d,k),this.fileService=s,this.translateService=d,this.notifyService=k,this.multiple=this.inputConfiguration.multiple}getFiles(){return this.files$.asObservable()}}fs.\u0275fac=function(s){return new(s||fs)(e.Y36(_p),e.Y36(we.sK),e.Y36(md))},fs.\u0275cmp=e.Xpm({type:fs,selectors:[["sivi-lib-attachment-selector"]],inputs:{multiple:"multiple"},features:[e._Bn([_p,Qd]),e.qOj],decls:3,vars:1,consts:[["hidden",""],["type","file","id","fileUpload","name","file[]",3,"multiple","change"],["fileInput",""]],template:function(s,d){1&s&&(e.TgZ(0,"div",0)(1,"input",1,2),e.NdJ("change",function(ie){return d.addFiles(ie)}),e.qZA()()),2&s&&(e.xp6(1),e.Q6J("multiple",d.multiple))},encapsulation:2});class Bs{}Bs.\u0275fac=function(s){return new(s||Bs)},Bs.\u0275mod=e.oAB({type:Bs}),Bs.\u0275inj=e.cJS({imports:[Ga]});class Ys{constructor(s,d,k,ie,ot,Cn){this.http=s,this.notify=d,this.fileSystem=k,this.platform=ie,this.fileOpener=ot,this.platformHelper=Cn}writeAttachmentToDevice(s,d=!0){let k;return this.platform.is("cordova")?(this.platform.is("android")?k=this.fileSystem.dataDirectory:this.platform.is("ios")&&(k=this.fileSystem.documentsDirectory),new Promise(ie=>{this.fileSystem.writeFile(k,s.name,s,{replace:!0}).then(ot=>{d&&this.notify.toastSaveSuccess(),ie(ot)},ot=>{this.notify.alertSaveError(),console.error("openAttachment failed",ot)})})):new Promise(ie=>{const ot=document.createElement("a"),Cn=new FileReader;Cn.onloadend=()=>{ot.download=s.name,ot.href=Cn.result.toString(),document.body.appendChild(ot),ot.click(),document.body.removeChild(ot),ie(s)},Cn.readAsDataURL(s)})}openFile(s){if(this.platformHelper.isMobilePlatform())this.writeAttachmentToDevice(s,!1).then(d=>{try{this.openFileWithUrl(d.nativeURL)}catch(k){console.error("openFileWithUrl",k),this.notify.alertFailedToLoadData()}}).catch(d=>{console.error("Error opening file",d),this.notify.alertFailedToLoadData()});else try{const d=new Blob([s],{type:zu.getFileMimeType(s.name)}),k=(window.URL||window.webkitURL).createObjectURL(d),ie=document.createElement("a");ie.href=k,ie.download=s.name,document.body.appendChild(ie),ie.click(),document.body.removeChild(ie)}catch(d){console.error("failed to open file",d),this.notify.alertFailedToLoadData()}}openFileWithUrl(s){const d=zu.getFileMimeType(s);this.fileOpener.open(s,d).catch(k=>{this.notify.alertFailedToLoadData(),console.error("openFileWithUrl",k)})}handleBlobError(s){var d=this;return(0,o.Z)(function*(){if("application/json"===(0,Hn.Z)(s,"error.type","")){const ie=yield d.getBlobErrorAsText(s);d.notify.alert(`${Ro.BACKEND_ERROR_PREFIX}${ie}`)}else d.notify.alertBackendError(s)})()}getBlobErrorAsText(s){return(0,o.Z)(function*(){return new Promise((d,k)=>{const ie=new FileReader;ie.onload=ot=>d(ot.target.result),ie.onerror=()=>k(s),ie.readAsText(s.error)})})()}}function ou(H,s){if(1&H&&(e.TgZ(0,"ion-text",13),e._uU(1),e.qZA()),2&H){const d=e.oxw(2);e.xp6(1),e.hij(" ",d.attachment.loadingProgress+"%"," ")}}function au(H,s){if(1&H&&(e.TgZ(0,"div",10)(1,"ion-row",11)(2,"ion-col"),e.YNc(3,ou,2,1,"ion-text",12),e.qZA(),e.TgZ(4,"ion-col"),e._UZ(5,"ion-spinner",13),e.qZA()()()),2&H){const d=e.oxw();e.xp6(3),e.Q6J("ngIf",d.attachment.loadingProgress)}}function Rf(H,s){if(1&H&&(e.TgZ(0,"div",14),e._UZ(1,"img",15),e.qZA()),2&H){const d=e.oxw();e.xp6(1),e.Q6J("src",d.attachment.contentBase64,e.LSH)}}function xu(H,s){if(1&H&&(e.TgZ(0,"span"),e._uU(1),e.qZA()),2&H){const d=e.oxw();e.xp6(1),e.Oqu(d.attachment.name)}}Ys.\u0275fac=function(s){return new(s||Ys)(e.LFG(ae.eN),e.LFG(md),e.LFG(mc.$),e.LFG(Nt.t4),e.LFG(Yp.u),e.LFG(Qd))},Ys.\u0275prov=e.Yz7({token:Ys,factory:Ys.\u0275fac});const vm=function(H){return{"attachment-preview":H}};var wp;!function(H){H.viewImage="view-image",H.downloadAttachment="download-attachment"}(wp||(wp={}));class k_{constructor(s,d,k){this.modalCtrl=s,this.attachmentsService=d,this.popoverCtrl=k,this.showCancelButton=!0,this.cancelClick=new e.vpe}handleCancelClick(){this.cancelClick.emit(this.attachment)}isImage(s){return!!s&&s.toString().includes("image/")}downloadAttachment(){this.attachmentsService.openFile(this.attachment)}openImage(){var s=this;return(0,o.Z)(function*(){(yield s.modalCtrl.create({component:mf,cssClass:"modal-auto-size",componentProps:{attachment:s.attachment}})).present()})()}getPopoverActions(s){return s?[{id:wp.downloadAttachment,text:"General.Buttons.Download.Attachment",icon:null},{id:wp.viewImage,text:"General.Buttons.View.Image",icon:null}]:[{id:wp.downloadAttachment,text:"General.Buttons.Download.Attachment",icon:null}]}onOpenPopover(s){var d=this;return(0,o.Z)(function*(){if("cancel"===(0,Hn.Z)(s,"srcEvent.target.innerHTML"))return;const k=d.getPopoverActions(d.isImage(d.attachment.type)),ie=yield d.popoverCtrl.create({component:pm,event:s,translucent:!1,componentProps:{items:k}});return ie.onDidDismiss().then(ot=>{switch(ot.data){case wp.downloadAttachment:d.downloadAttachment();break;case wp.viewImage:d.openImage()}}),yield ie.present()})()}}k_.\u0275fac=function(s){return new(s||k_)(e.Y36(Ac),e.Y36(Ys),e.Y36(Nt.Dh))},k_.\u0275cmp=e.Xpm({type:k_,selectors:[["sivi-lib-attachment"]],inputs:{attachment:"attachment",showCancelButton:"showCancelButton",viewMode:"viewMode"},outputs:{cancelClick:"cancelClick"},features:[e._Bn([Ys])],decls:12,vars:11,consts:[[1,"attachment-container",3,"ngClass","click"],["class","loader",4,"ngIf"],["class","attachment-image",4,"ngIf"],[1,"attachment-info"],[1,"attachment-name"],[4,"ngIf"],[1,"cancel-button"],["fill","clear","color","light","shape","round","no-min-width","","size","small",3,"hidden","disabled","click"],[1,"material-icons"],["aria-hidden","true"],[1,"loader"],[1,"ion-justify-content-center","ion-align-items-center"],["color","secondary",4,"ngIf"],["color","secondary"],[1,"attachment-image"],["height","auto","width","100%",3,"src"]],template:function(s,d){1&s&&(e.TgZ(0,"div",0),e.NdJ("click",function(ie){return d.onOpenPopover(ie)}),e.YNc(1,au,6,1,"div",1),e.YNc(2,Rf,2,1,"div",2),e.TgZ(3,"div",3)(4,"div",4),e.YNc(5,xu,2,1,"span",5),e.qZA(),e.TgZ(6,"div",6)(7,"ion-button",7),e.NdJ("click",function(ie){return ie.stopPropagation(),d.handleCancelClick()}),e.TgZ(8,"i",8),e.ALo(9,"translate"),e.TgZ(10,"span",9),e._uU(11,"cancel"),e.qZA()()()()()()),2&s&&(e.Q6J("ngClass",e.VKq(9,vm,d.isImage(d.attachment.type))),e.xp6(1),e.Q6J("ngIf",d.attachment.isLoading),e.xp6(1),e.Q6J("ngIf",d.isImage(d.attachment.type)&&d.attachment.contentBase64),e.xp6(3),e.Q6J("ngIf",!d.isImage(d.attachment.type)),e.xp6(2),e.Q6J("hidden",!d.showCancelButton)("disabled",d.attachment.locked||d.viewMode),e.xp6(1),e.uIk("aria-label",e.lcZ(9,7,"General.Buttons.Cancel")))},dependencies:[Et.mk,Et.O5,Nt.YG,Nt.wI,Nt.Nd,Nt.PQ,Nt.yW,we.X$],styles:["[_nghost-%COMP%]{display:block}.primary-image[_nghost-%COMP%]   .attachment-info[_ngcontent-%COMP%]{position:absolute;height:100%;width:100%}.primary-image[_nghost-%COMP%]   .attachment-preview[_ngcontent-%COMP%]{height:auto}.primary-image[_nghost-%COMP%]   .attachment-image[_ngcontent-%COMP%]{position:relative;height:auto}.primary-image[_nghost-%COMP%]   .cancel-button[_ngcontent-%COMP%]{align-self:flex-start}[_nghost-%COMP%]   .attachment-container[_ngcontent-%COMP%]{display:flex;position:relative;align-items:center;overflow:hidden;border-radius:4px;border:2px solid var(--ion-color-primary);height:50px;background-color:var(--ion-color-primary);cursor:pointer}[_nghost-%COMP%]   .attachment-preview[_ngcontent-%COMP%]{background-color:#fff}[_nghost-%COMP%]   .attachment-image[_ngcontent-%COMP%]{display:flex;flex-flow:row;position:absolute;justify-content:center;align-items:center;width:100%;height:100%;z-index:1}[_nghost-%COMP%]   .attachment-info[_ngcontent-%COMP%]{display:flex;flex:1;flex-flow:row;position:relative;justify-content:space-between;height:100%;z-index:2;max-width:100%}[_nghost-%COMP%]   .loader[_ngcontent-%COMP%]{display:flex;flex-flow:row;position:absolute;justify-content:center;align-items:center;font-weight:600;inset:0;z-index:2;background:rgba(0,0,0,.3)}[_nghost-%COMP%]   .cancel-button[_ngcontent-%COMP%]{align-self:center;padding-right:1.2rem}[_nghost-%COMP%]   .attachment-name[_ngcontent-%COMP%]{font-weight:600;color:#fff;align-self:center;padding-left:6px;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}[_nghost-%COMP%]   ion-button[_ngcontent-%COMP%]{width:24px}[_nghost-%COMP%]   .material-icons[_ngcontent-%COMP%]{color:var(--ion-color-primary-contrast);background-color:var(--ion-color-primary);border-radius:50%}"]});class Gy{}Gy.\u0275fac=function(s){return new(s||Gy)},Gy.\u0275mod=e.oAB({type:Gy}),Gy.\u0275inj=e.cJS({providers:[Ac],imports:[Ga,Fs.AV,Yd]});class og{}og.\u0275fac=function(s){return new(s||og)},og.\u0275mod=e.oAB({type:og}),og.\u0275inj=e.cJS({imports:[Gy,Bs,Gy,Bs]});const DE=H=>"PICTURE"===H.documentType,kM=(H,s)=>{const d=s.name.split(".").pop(),k=DE(s)?"image/"+d:"application/octet-stream";return co.createAttachmentFile([H],s.name,k)},SE=H=>()=>{const s=co.copyFile(H);return s.isLoading=!0,(0,D.of)(s)},RM=H=>s=>{console.log(s);const d=kM(s.body,H);if(d.id=H.id,d.createdDate=H.createdDate,DE(H)){const k=new FileReader;k.onloadend=()=>d.contentBase64=k.result,k.readAsDataURL(d)}return(0,D.of)(d)},AE=(H,s)=>d=>{const k={[ae.dt.Sent]:SE(s),[ae.dt.Response]:RM(H)};return k[d.type]?k[d.type](d):n.E};function wE(){return function(H,s,d){const k=d.value;d.value=function(){const ie=arguments[0],ot=kM("",ie);return ot.id=ie.id,k.apply(this,arguments).pipe((0,le.w)(AE(ie,ot)))}}}const Om=H=>()=>{const s=co.copyFile(H);return s.loadingProgress=0,(0,D.of)(s)},IE=H=>s=>{const d=co.copyFile(H);return d.loadingProgress=Math.floor(100*(s.loaded-1)/s.total),(0,D.of)(d)},PE=H=>s=>{const{id:d,createdDate:k}=s.body,ie=co.copyFile(H);return ie.id=d,ie.createdDate=k,ie.isLoading=!1,delete ie.cancelRequestSub$,delete ie.loadingProgress,(0,D.of)(ie)},FM=H=>s=>{const d={[ae.dt.Sent]:Om(H),[ae.dt.UploadProgress]:IE(H),[ae.dt.Response]:PE(H)};return d[s.type]?d[s.type](s):n.E};function NM(){return function(H,s,d){const k=d.value;d.value=function(){const ie=new l.x,ot=co.copyFile(arguments[0]);return ot.tempId=co.createUUID(),ot.cancelRequestSub$=ie,ot.isLoading=!0,k.apply(this,arguments).pipe((0,le.w)(FM(ot)),(0,j.R)(ie))}}}class el{constructor(s,d,k){this.translate=s,this.notify=d,this.personService=k,this.readonly=!1,this.clickable=!1,this.size=$m.BIG,this.uploadImageLabel=this.getUploadImageLabel(),this.removeImageLabel=this.getRemoveImageLabel(),this.isProfileImageLoading=!1}ngOnInit(){this.getProfileImage(this.personId)}getUploadImageLabel(){return this.translate.instant((0,Vi.Z)(this.profileImage)?"Message.Upload.Image":"Message.Change.Image",{name:this.translate.instant("Child.Singular")})}getRemoveImageLabel(){return this.translate.instant("Message.Delete.Image",{name:this.translate.instant("Child.Singular")})}getProfileImage(s){var d=this;return(0,o.Z)(function*(){if(s){d.isProfileImageLoading=!0;try{const k=d.personService.getPersonMainPhoto(s,d.documentSize).toPromise();d.profileImage=yield k}catch(k){d.notify.alertBackendError(k)}finally{d.isProfileImageLoading=!1,d.uploadImageLabel=d.getUploadImageLabel()}}else console.warn("No id was provided")})()}saveProfileImage(s){var d=this;return(0,o.Z)(function*(){try{return yield d.personService.savePersonMainPhoto(d.personId,s).toPromise(),d.profileImage=s,d.uploadImageLabel=d.getUploadImageLabel(),!0}catch(k){return d.notify.alertBackendError(k),!1}})()}loadPicturesWithoutCache(){var s=this;return(0,o.Z)(function*(){try{yield s.personService.getPersonMainPhotosWithoutCache(s.personId).toPromise()}catch(d){s.notify.alertFailedToLoadData(),console.error("Error loading the pictures. The app did not update the cached photos",d)}})()}saveImageAndUpdateCache(s){var d=this;return(0,o.Z)(function*(){d.isProfileImageLoading=!0,(yield d.saveProfileImage(s))&&(yield d.loadPicturesWithoutCache()),d.isProfileImageLoading=!1})()}removeProfileImage(){var s=this;return(0,o.Z)(function*(){s.isProfileImageLoading=!0;try{yield s.personService.deletePersonMainPhoto(s.personId).toPromise(),s.profileImage=null}catch(d){s.notify.alertBackendError(d)}finally{s.isProfileImageLoading=!1,s.uploadImageLabel=s.getUploadImageLabel(),s.loadPicturesWithoutCache()}})()}}el.\u0275fac=function(s){return new(s||el)(e.Y36(we.sK),e.Y36(md),e.Y36(Zh))},el.\u0275cmp=e.Xpm({type:el,selectors:[["sivi-lib-person-main-photo"]],inputs:{personId:"personId",readonly:"readonly",clickable:"clickable",size:"size",documentSize:"documentSize",placeholder:"placeholder"},decls:1,vars:8,consts:[[3,"uploadImageLabel","removeImageLabel","profileImage","loading","viewMode","clickable","size","placeholder","changeImage","removeImage"]],template:function(s,d){1&s&&(e.TgZ(0,"sivi-lib-profile-image-picker",0),e.NdJ("changeImage",function(ie){return d.saveImageAndUpdateCache(ie)})("removeImage",function(){return d.removeProfileImage()}),e.qZA()),2&s&&e.Q6J("uploadImageLabel",d.uploadImageLabel)("removeImageLabel",d.removeImageLabel)("profileImage",d.profileImage)("loading",d.isProfileImageLoading)("viewMode",d.readonly)("clickable",d.clickable)("size",d.size)("placeholder",d.placeholder)},dependencies:[Xd]});class ag{}ag.\u0275fac=function(s){return new(s||ag)},ag.\u0275mod=e.oAB({type:ag}),ag.\u0275inj=e.cJS({imports:[Jc,Ga,js]});class Og{}Og.\u0275fac=function(s){return new(s||Og)},Og.\u0275mod=e.oAB({type:Og}),Og.\u0275inj=e.cJS({});class Wy{static updatePersonContacts(s,d,k){let ie;if(s){let ot=!1;s.forEach((Cn,ir)=>{Cn.contact.contactTypeCode===k&&(s[ir]=d,ot=!0)}),ot||s.push(d),ie=s}else ie=[d];return ie}static getNonDisclosureContact(s){let d="";if(s){const k=s.filter(ie=>ie.contact.contactTypeCode===jd.NON_DICSLOSURE_CONTACT_TYPE);k.length>0&&(d=k[0].contact.value)}return d}static getPlainAddress(s){console.log("getPlainAddress",s);let d="";if(s){const{street:k,postalCode:ie,city:ot}=s;k&&(d+=k,(ie||ot)&&(d+=", ")),ie&&(d+=ie+" "),ot&&(d+=ot)}return d}static getPersonOID(s,d,k=!1){const ie=s&&s.find(ot=>ot.infoType===Vp.PERSON_OID);return!d&&!k||ie&&ie.value?ie&&ie.value?ie.value:null:"-"}static updatePersonOID(s,d){const k=d.detail,ie=s?s.slice():[];let ot=ie.find(Cn=>Cn.infoType===Vp.PERSON_OID);return ot?ot.value=k.value:(ot={id:null,infoType:Vp.PERSON_OID,value:k.value,info:""},ie.push(ot)),ie}}class $y{static forRoot(s,d,k,ie,ot){return{ngModule:$y,providers:[{provide:"AuthService",useExisting:s.AuthService},{provide:"TranslateService",useExisting:d.TranslateService},{provide:"AbstractRestService",useExisting:k.AbstractRestService},{provide:"EnvironmentService",useExisting:ie.EnvironmentService},{provide:"AppStateService",useExisting:ot.AppStateService}]}}constructor(){console.log("[sivi-library] version: ",nv)}}$y.\u0275fac=function(s){return new(s||$y)},$y.\u0275mod=e.oAB({type:$y}),$y.\u0275inj=e.cJS({});class Km{}Km.APPLICATION_TEMPLATES_TITLE="Page.Templates.Application.Message.Title.Plural",Km.DECISION_TEMPLATES_TITLE="Page.Templates.Decision.Text.Title.Plural",Km.GENERAL_TEMPLATE_TITLE="Page.Message.Template.Title.Plural",Km.DECISION_FEE_TEMPLATES_TITLE="Page.MunicipalitySettings.FeeAndValueDecision.Title";class LC{}LC.APPLICATION_TEMPLATE_PATH="message-templates-application",LC.DECISION_TEMPLATE_PATH="message-templates-decision",LC.DECISION_FEE_TEMPLATE_PATH="fee-and-value-decision";class sg{}sg.APPLICATION="sivi.message.template.type.application",sg.DECISION="sivi.message.template.type.decision",sg.ECEC_MESSAGE="sivi.message.template.starting-and-ending.ecec",sg.DECISION_FEE="sivi.message.template.type.fee";class Lg{}Lg.APPLICATION_REASON="sivi.message.template.application",Lg.DECISION_REASON="sivi.message.template.decision",Lg.STARTING_AND_ENDING_REASON="sivi.message.template.starting-and-ending",Lg.DECISION_FEE_REASON="sivi.message.template.fee";class S0{}S0.ECEC="sivi.message.template.application.ecec",S0.PPE="sivi.message.template.application.ppe",S0.PPEWITHECEC="sivi.message.template.application.ppewithecec",S0.CLUB="sivi.message.template.application.club";class R_{}R_.ECEC="sivi.message.template.decision.ecec",R_.PPE="sivi.message.template.decision.ppe",R_.CLUB="sivi.message.template.decision.club",R_.VOUCHER="sivi.message.template.decision.voucher",R_.OTHERDECISION="sivi.message.template.decision.other";class A0{}A0.DRAFT="draftlink",A0.THANKS="thanksmessage",A0.HANDLING="inhandling",A0.COMMENT_MESSAGE="commentmessage";class rh{}rh.ECEC="sivi.message.template.type.starting-and-ending.ecec",rh.ECEC_AGREEMENT="sivi.message.template.type.starting-and-ending.ecec-agreement",rh.SERVICE_VOUCHER="sivi.message.template.type.starting-and-ending.service-voucher",rh.CLUB="sivi.message.template.type.starting-and-ending.club";class _f{}_f.ECEC_ACCEPT_OR_DECLINE="sivi.message.template.starting-and-ending.ecec.accept-or-decline",_f.ECEC_ACCEPTED="sivi.message.template.starting-and-ending.ecec.accepted",_f.ECEC_DECLINED="sivi.message.template.starting-and-ending.ecec.declined",_f.ECEC_DISMISS="sivi.message.template.starting-and-ending.ecec.dismiss",_f.ECEC_IS_DISMISSED="sivi.message.template.starting-and-ending.ecec.is-dismissed",_f.CLUB_ACCEPT_OR_DECLINE="sivi.message.template.starting-and-ending.club.accept-or-decline",_f.CLUB_ACCEPTED="sivi.message.template.starting-and-ending.club.accepted",_f.CLUB_DECLINED="sivi.message.template.starting-and-ending.club.declined",_f.SV_ACCEPT_OR_DECLINE="sivi.message.template.starting-and-ending.service-voucher.accept-or-decline",_f.SV_ACCEPTED="sivi.message.template.starting-and-ending.service-voucher.accepted",_f.SV_DECLINED="sivi.message.template.starting-and-ending.service-voucher.declined",_f.SV_DISMISS="sivi.message.template.starting-and-ending.service-voucher.dismiss",_f.SV_IS_DISMISSED="sivi.message.template.starting-and-ending.service-voucher.is-dismissed",_f.ECEC_AGREEMENT="sivi.message.template.starting-and-ending.ecec-agreement.fill-agreement";class pc{static ALL_TEXT(){return[this.TEXT,this.TEXT_FEE_DECISION,this.TEXT_VALUE_DECISION,this.TEXT_FEE_BASIS_DECISION,this.TEXT_FEE_DECISION_INCOME,this.TEXT_ACCEPT_MINIMUM_FEE,this.TEXT_ACCEPT_MAXIMUM_FEE,this.TEXT_DECISION_INCOME,this.TEXT_DECISION_LOWEST_VALUE,this.TEXT_DECISION_LOWEST_INCOME,this.TEXT_JUSTIFICATION,this.TEXT_JUSTIFICATION_INCOME,this.TEXT_JUSTIFICATION_MAX_FEE,this.TEXT_JUSTIFICATION_HIGHEST_FEE,this.TEXT_JUSTIFICATION_EXTENT,this.TEXT_JUSTIFICATION_FAMILY_SIZE,this.TEXT_JUSTIFICATION_FEE_INDEX_INCREASE,this.TEXT_JUSTIFICATION_REVISION_INCOME,this.TEXT_JUSTIFICATION_REVISION_SERVICE,this.TEXT_JUSTIFICATION_REVISION_VOUCHER,this.TEXT_JUSTIFICATION_REVISION_EXTENT_CHANGE,this.TEXT_JUSTIFICATION_REVISION_CHANGE_FAMILY_SIZE,this.TEXT_JUSTIFICATION_REVISION_INDEX_INCREASE]}static ALL_FEE_REDUCTION(){return[this.FEE_REDUCTION_GENERAL,this.FEE_REDUCTION_APPLICATION]}}var ym;pc.GENERAL="sivi.message.template.fee",pc.TEXT="sivi.message.template.fee.text",pc.TEXT_FEE_DECISION="sivi.message.template.fee.text.fee-decision",pc.TEXT_VALUE_DECISION="sivi.message.template.fee.text.value-decision",pc.TEXT_FEE_BASIS_DECISION="sivi.message.template.fee.decision-basis",pc.TEXT_FEE_DECISION_INCOME="sivi.message.template.fee.decision-basis.fee-decision-income",pc.TEXT_ACCEPT_MINIMUM_FEE="sivi.message.template.fee.decision-basis.fee-decision-max-accepted-fee",pc.TEXT_ACCEPT_MAXIMUM_FEE="sivi.message.template.fee.decision-basis.fee-decision-max-fee-no-income-statement",pc.TEXT_DECISION_INCOME="sivi.message.template.fee.decision-basis.value-decision-income",pc.TEXT_DECISION_LOWEST_VALUE="sivi.message.template.fee.decision-basis.value-decision-min-accepted-value",pc.TEXT_DECISION_LOWEST_INCOME="sivi.message.template.fee.decision-basis.value-decision-min-value-no-income-statement",pc.TEXT_DECISION_FREE_OF_CHARGE="sivi.message.template.fee.decision-basis.fee-decision-free-of-charge",pc.TEXT_JUSTIFICATION="sivi.message.template.fee.fee-revision-justification",pc.TEXT_JUSTIFICATION_INCOME="sivi.message.template.fee.fee-revision-justification.fee-decision-income",pc.TEXT_JUSTIFICATION_MAX_FEE="sivi.message.template.fee.fee-revision-justification.fee-decision-max-accepted-fee",pc.TEXT_JUSTIFICATION_HIGHEST_FEE="sivi.message.template.fee.fee-revision-justification.fee-decision-highest-fee",pc.TEXT_JUSTIFICATION_EXTENT="sivi.message.template.fee.fee-revision-justification.fee-decision-extent-change",pc.TEXT_JUSTIFICATION_FAMILY_SIZE="sivi.message.template.fee.fee-revision-justification.fee-decision-family-size-change",pc.TEXT_JUSTIFICATION_FEE_INDEX_INCREASE="sivi.message.template.fee.fee-revision-justification.fee-decision-index-increase",pc.TEXT_JUSTIFICATION_CHANGE_NUMBER_OF_CHILDREN_IN_ECEC="sivi.message.template.fee.fee-revision-justification.fee-decision.change-number-of-children-in-ecec",pc.TEXT_JUSTIFICATION_REVISION_INCOME="sivi.message.template.fee.fee-revision-justification.value-decision-income",pc.TEXT_JUSTIFICATION_REVISION_EXTENT_CHANGE="sivi.message.template.fee.fee-revision-justification.value-decision-extent-change",pc.TEXT_JUSTIFICATION_REVISION_INDEX_INCREASE="sivi.message.template.fee.fee-revision-justification.value-decision-index-increase",pc.TEXT_JUSTIFICATION_REVISION_SERVICE="sivi.message.template.fee.fee-revision-justification.value-decision-service-voucher-lowest-accepted-value",pc.TEXT_JUSTIFICATION_REVISION_VOUCHER="sivi.message.template.fee.fee-revision-justification.value-decision-service-voucher-lowest-value",pc.TEXT_JUSTIFICATION_REVISION_CHANGE_FAMILY_SIZE="sivi.message.template.fee.fee-revision-justification.value-decision-family-size-change",pc.TEXT_JUSTIFICATION_REVISION_CHANGE_NUMBER_OF_CHILDREN_IN_ECEC="sivi.message.template.fee.fee-revision-justification.value-decision.change-number-of-children-in-ecec",pc.TEXT_JUSTIFICATION_REVISION_CHILD_TURNS_THREE_YEARS_OLD="sivi.message.template.fee.fee-revision-justification.value-decision-child-turns-three-years-old",pc.FEE_REDUCTION="sivi.message.template.fee.fee-reduction",pc.FEE_REDUCTION_GENERAL="sivi.message.template.fee.fee-reduction.text",pc.FEE_REDUCTION_APPLICATION="sivi.message.template.fee.fee-reduction.application",pc.INSTRUCTIONS="sivi.message.template.fee.revised-decision-instructions",pc.INSTRUCTIONS_FEE_DECISION="sivi.message.template.fee.revised-decision-instructions.fee-decision",pc.INSTRUCTIONS_VALUE_DECISION="sivi.message.template.fee.revised-decision-instructions.value-decision",pc.INCOME="sivi.message.template.fee.income-statement",pc.FILL_IN_INCOME="sivi.message.template.fee.income-statement.fill",pc.SENT_INCOME="sivi.message.template.fee.income-statement.sent",pc.MORE_INFO_INCOME="sivi.message.template.fee.income-statement.more-info",function(H){H.LOCAL="LOCAL",H.EXTERNAL="EXTERNAL"}(ym||(ym={}));class oh extends Ql{}class Jm extends Ti{constructor(s,d){super(s,d),this.http=s,this.siviProjectsGateway=d}getAllergyOptions(){return this.get("./api/sivi-accounts-api/municipality-settings/allergies")}saveAllergyOptions(s){const d={allergiesMunicipalitySetting:s};return this.put(d,"./api/sivi-accounts-api/municipality-settings/allergies")}getDietOptions(){return this.get("./api/sivi-accounts-api/municipality-settings/special-diets")}saveDietOptions(s){const d={specialDietsMunicipalitySetting:s};return this.put(d,"./api/sivi-accounts-api/municipality-settings/special-diets")}}Jm.\u0275fac=function(s){return new(s||Jm)(e.LFG(ae.eN),e.LFG(dl))},Jm.\u0275prov=e.Yz7({token:Jm,factory:Jm.\u0275fac});class ah extends Ti{constructor(s,d){super(s,d),this.http=s,this.siviProjectsGateway=d}getPermits(){return this.get("./api/sivi-accounts-api/municipality-settings/permits")}savePermits(s){const d={permitsMunicipalitySetting:s};return this.put(d,"./api/sivi-accounts-api/municipality-settings/permits")}}ah.\u0275fac=function(s){return new(s||ah)(e.LFG(ae.eN),e.LFG(dl))},ah.\u0275prov=e.Yz7({token:ah,factory:ah.\u0275fac});class qv extends Ti{constructor(s,d){super(s,d),this.http=s,this.siviProjectsGateway=d}getPrintingServiceByMunicipalityId(s){const d="./api/sivi-accounts-api/municipality-settings/printing-service?municipalityId="+s;return this.get(d)}}qv.\u0275fac=function(s){return new(s||qv)(e.LFG(ae.eN),e.LFG(dl))},qv.\u0275prov=e.Yz7({token:qv,factory:qv.\u0275fac});class Yb extends Ti{constructor(s,d){super(s,d),this.http=s,this.siviProjectsGatewayService=d,this.options=this.getCommonOptions()}getMessageReasons(s){const d="./api/sivi-ada-api/message-template/"+s+"/reasons";return this.get(d,this.options).pipe((0,X.U)(k=>k.content))}getMessageReasonsByType(s,d){const k="./api/sivi-ada-api/message-template/"+s+"/reasons/"+d;return this.get(k,this.options).pipe((0,X.U)(ie=>ie.content))}getTemplates(s,d){const k="./api/sivi-ada-api/message-template/organization/"+s,ie={...this.options};return d&&(ie.params=(new ae.LE).set("messageReason",d)),this.get(k,ie).pipe((0,X.U)(ot=>ot.content))}getTemplateByReasonAndMunicipality(s,d){const ie={...this.getCommonOptions()};return ie.params=(new ae.LE).set("messageReason",s).set("organizationId",d).set("restEntityState",Ro.CURRENT),this.get("./api/sivi-ada-api/message-template/",ie).pipe((0,X.U)(ot=>ot.content))}getTemplate(s){const d="./api/sivi-ada-api/message-template/"+s;return this.get(d,this.options)}saveTemplate(s){return this.saveEntity(s,"./api/sivi-ada-api/message-template/")}getApprovalTemplatesByType(s,d){const k=`sivi.message.template.decision.${d}.approved`,ot={...this.getCommonOptions()};return ot.params=(new ae.LE).set("messageReason",k).set("organizationId",s),this.get("./api/sivi-ada-api/message-template/",ot).pipe((0,X.U)(Cn=>Cn.content))}}Yb.\u0275fac=function(s){return new(s||Yb)(e.LFG(ae.eN),e.LFG(dl))},Yb.\u0275prov=e.Yz7({token:Yb,factory:Yb.\u0275fac});class vv extends Ti{constructor(s,d){super(s,d),this.http=s,this.siviProjectsGateway=d,this.url="./api/sivi-accounts-api/municipality-settings/contacts"}getContactDetails(){return this.get(this.url)}updateContactDetails(s){return this.put(s,this.url)}}vv.\u0275fac=function(s){return new(s||vv)(e.LFG(ae.eN),e.LFG(dl))},vv.\u0275prov=e.Yz7({token:vv,factory:vv.\u0275fac});const nx=["infoPart"],jy=function(H){return{invalid:H}};function kC(H,s){if(1&H){const d=e.EpF();e.TgZ(0,"sivi-lib-form-detailed-options",1,2),e.NdJ("valueChange",function(ie){e.CHM(d);const ot=e.oxw();return e.KtG(ot.onFormChange(ie))}),e.ALo(2,"translate"),e.ALo(3,"translate"),e.ALo(4,"translate"),e.ALo(5,"translate"),e.qZA()}if(2&H){const d=s.$implicit,k=e.oxw();e.Q6J("ngClass",e.VKq(17,jy,!k._value.length))("value",d)("disabled",k.isDisabled(d.type))("checkboxLabel",e.lcZ(2,9,d.type))("inputLabel",e.lcZ(3,11,k.inputLabels[d.type]))("radio1Label",e.lcZ(4,13,k.radioLabels.label1))("radio2Label",e.lcZ(5,15,k.radioLabels.label2))("showRadio",void 0!==d.radio)("showInput",void 0!==d.input)}}const RC=[{type:Xl.EMPLOYEE_OR_ENTREPRENEUR,checkbox:!1,radio:!0,input:""},{type:Xl.STUDENT,checkbox:!1,radio:!0,input:""},{type:Xl.JOBSEEKER,checkbox:!1},{type:Xl.OTHER,checkbox:!1,input:""}],F_={[Xl.EMPLOYEE_OR_ENTREPRENEUR]:"Form.Label.WorkPlace",[Xl.STUDENT]:"Form.Label.StudyPlace",[Xl.OTHER]:"Form.Label.Specify"},Oh={label1:"sivi.person.employment.type.fulltime",label2:"sivi.person.employment.type.parttime"},Qm={[Xl.EMPLOYEE_OR_ENTREPRENEUR]:[Xl.JOBSEEKER,Xl.OTHER],[Xl.STUDENT]:[Xl.JOBSEEKER,Xl.OTHER],[Xl.JOBSEEKER]:[Xl.EMPLOYEE_OR_ENTREPRENEUR,Xl.STUDENT,Xl.OTHER],[Xl.OTHER]:[]};class w0 extends Js{set state(s){this.onSetState(s)}get state(){return this._state}set value(s){s&&this.onSetValue(s)}get isValid(){return 0===this.state.filter(s=>s.checkbox).length||this.checkPartsValidity(this.infoParts)}constructor(s){super(),this.cdr=s,this.inputLabels=F_,this.radioLabels=Oh,this.disabledOptions=Qm,this._state=RC,this._value=[],this.valueChange=new e.vpe,this.employmentTypes=Xl}onFormChange(s){this.state=this.state.map(d=>d.type===s.type?{...this.getObjectWithUpdatedProps(d,s)}:d)}onSetState(s){(0,Ne.Z)(s,this._state)||(this._state=[...s],this.cdr.detectChanges(),this.emitCheckedItems())}onSetValue(s){const d=k=>!this.isDisabled(k);this._value=s.map(k=>({...k,checked:d(k.type)})).map(k=>this.mapEmploymentToFormDetailedOptions(k)),this.cdr.detectChanges(),this.updateState()}emitCheckedItems(){const s=this.state.filter(d=>d.checkbox).map(d=>({...d,checkbox:void 0})).map(d=>this.mapFormDetailedOptionsToEmployment(d));this.valueChange.emit(s)}checkPartsValidity(s){return!!s&&s.map(d=>d.isValid).every(d=>d)}updateState(){this.state=this.state.map(s=>{const d=this._value.find(k=>s.type===k.type);return d?{...this.getObjectWithUpdatedProps(s,d)}:s})}getObjectWithUpdatedProps(s,d){const k={...s};return Object.keys(k).forEach(ie=>{void 0!==d[ie]&&(k[ie]=d[ie])}),k}mapEmploymentToFormDetailedOptions(s){return{type:s.type,checkbox:s.checked,radio:s.fullTime,input:s.description}}mapFormDetailedOptionsToEmployment({type:s,checkbox:d,radio:k,input:ie}){return{type:s,...void 0===d?{}:{checked:d},...void 0===k?{}:{fullTime:k},...void 0===ie?{}:{description:ie}}}isDisabled(s){const d=k=>this.state.find(ie=>ie.type===k)||{};return(this.disabledOptions[s]||[]).map(k=>d(k)).map(k=>k.checkbox).some(k=>!!k)}trackByFn(s,d){return d.type}}w0.\u0275fac=function(s){return new(s||w0)(e.Y36(e.sBO))},w0.\u0275cmp=e.Xpm({type:w0,selectors:[["sivi-lib-employment-information"]],viewQuery:function(s,d){if(1&s&&e.Gf(nx,5),2&s){let k;e.iGM(k=e.CRH())&&(d.infoParts=k)}},inputs:{state:"state",value:"value",inputLabels:"inputLabels",radioLabels:"radioLabels",disabledOptions:"disabledOptions"},outputs:{valueChange:"valueChange"},features:[e.qOj],decls:4,vars:5,consts:[[3,"ngClass","value","disabled","checkboxLabel","inputLabel","radio1Label","radio2Label","showRadio","showInput","valueChange",4,"ngFor","ngForOf","ngForTrackBy"],[3,"ngClass","value","disabled","checkboxLabel","inputLabel","radio1Label","radio2Label","showRadio","showInput","valueChange"],["infoPart",""]],template:function(s,d){1&s&&(e.TgZ(0,"h2"),e._uU(1),e.ALo(2,"translate"),e.qZA(),e.YNc(3,kC,6,19,"sivi-lib-form-detailed-options",0)),2&s&&(e.xp6(1),e.Oqu(e.lcZ(2,3,"General.Text.Employment.Information")),e.xp6(2),e.Q6J("ngForOf",d.state)("ngForTrackBy",d.trackByFn))},dependencies:[Et.mk,Et.sg,im,we.X$],changeDetection:0});class yv{}function Hb(H,s){if(1&H&&(e.ynx(0),e.TgZ(1,"h2"),e._uU(2,"Palaute"),e.qZA(),e.TgZ(3,"p"),e._uU(4," Saavutettavuuteen liittyv\xe4\xe4 palautetta voi antaa s\xe4hk\xf6postitse CGI Vesa -palvelua k\xe4ytt\xe4v\xe4lle kunnalle: "),e._UZ(5,"br"),e.TgZ(6,"a",5),e._uU(7),e.qZA()(),e.BQk()),2&H){const d=e.oxw(2);e.xp6(6),e.MGl("href","mailto:",d.accessibilityEmail,"",e.LSH),e.xp6(1),e.hij(" ",d.accessibilityEmail," ")}}function FC(H,s){if(1&H&&(e.TgZ(0,"div")(1,"h1"),e._uU(2,"CGI Vesa -palvelun saavutettavuusseloste"),e.qZA(),e.TgZ(3,"p"),e._uU(4,"T\xe4m\xe4 saavutettavuusseloste koskee CGI Vesa -palvelua (selain- ja mobiilisovellukset) ja se on laadittu 05.12.2019. T\xe4m\xe4n digipalvelun saavutettavuuden tilan on itsearvioinut CGI Vesan kehitt\xe4j\xe4t."),e.qZA(),e.TgZ(5,"h2"),e._uU(6,"Saavutettavuuden tila"),e.qZA(),e.TgZ(7,"p"),e._uU(8,"CGI Vesa t\xe4ytt\xe4\xe4 saavutettavuusvaatimukset osittain."),e.qZA(),e.TgZ(9,"h3"),e._uU(10,"CGI Vesan ei-saavutettava sis\xe4lt\xf6 (WCAG-kriteerien mukaan)"),e.qZA(),e.TgZ(11,"h4"),e._uU(12,"Saavuttamaton sis\xe4lt\xf6 ja sen puutteet "),e.qZA(),e.TgZ(13,"p"),e._uU(14,"Sis\xe4ll\xf6ss\xe4 on osittaisia puutteita semanttisessa rakenteessa, sek\xe4 sy\xf6tteen tarkoituksen m\xe4\xe4rittelyss\xe4."),e.qZA(),e.TgZ(15,"p"),e._uU(16,"Osa ammattilaisen k\xe4ytt\xf6liittym\xe4n sis\xe4ll\xf6st\xe4 ei ole k\xe4ytett\xe4v\xe4 pienill\xe4 n\xe4yt\xf6ill\xe4."),e.qZA(),e.TgZ(17,"p"),e._uU(18,"Sis\xe4ll\xf6n kielen m\xe4\xe4ritt\xe4misess\xe4 on osittaisia puutteita, kuten my\xf6s joidenkin virheviestien sis\xe4ll\xf6iss\xe4."),e.qZA(),e.TgZ(19,"h4"),e._uU(20,"WCAG:n Saavutettavuusvaatimukset, jotka eiv\xe4t t\xe4yty"),e.qZA(),e.TgZ(21,"ul")(22,"li"),e._uU(23,"1.3.1 Informaatio ja suhteet"),e.qZA(),e.TgZ(24,"li"),e._uU(25,"1.3.5 M\xe4\xe4rittele sy\xf6tteen tarkoitus"),e.qZA(),e.TgZ(26,"li"),e._uU(27,"1.4.10 Responsiivisuus"),e.qZA(),e.TgZ(28,"li"),e._uU(29,"3.1.1 Sivun kieli"),e.qZA(),e.TgZ(30,"li"),e._uU(31,"3.3.3 Virheen korjausehdotus"),e.qZA()(),e.TgZ(32,"h4"),e._uU(33,"Syyt vaatimusten noudattamatta j\xe4tt\xe4miselle "),e.qZA(),e.TgZ(34,"p"),e._uU(35," Kohtuuton rasite: J\xe4rjestelm\xe4n kehitys on alkuvaiheessa ja tullaan korjaamaan tulevissa julkaisuissa. Ammattilaisten n\xe4kymien laaja sis\xe4lt\xf6 vaatii n\xe4yt\xf6lt\xe4 riitt\xe4v\xe4sti tilaa, eik\xe4 niit\xe4 ole tarkoitettu k\xe4ytett\xe4v\xe4ksi pienill\xe4 n\xe4yt\xf6ill\xe4. "),e.qZA(),e.YNc(36,Hb,8,2,"ng-container",1),e.TgZ(37,"h2"),e._uU(38,"Valvontaviranomainen"),e.qZA(),e.TgZ(39,"p"),e._uU(40,"Jos huomaat sivustolla saavutettavuusongelmia, anna ensin palautetta yll\xe4 olevaan kunnan yhteyss\xe4hk\xf6postiosoitteeseen. Vastauksen saamisessa voi menn\xe4 14 vuorokautta. Jos et ole tyytyv\xe4inen saamaasi vastaukseen tai et saa vastausta lainkaan 14 vuorokauden aikana, "),e.TgZ(41,"a",4),e._uU(42,"voit tehd\xe4 ilmoituksen Etel\xe4-Suomen aluehallintovirastoon"),e.qZA(),e._uU(43,". Etel\xe4-Suomen aluehallintoviraston sivulla kerrotaan tarkasti, miten ilmoituksen voi tehd\xe4 ja miten asia k\xe4sitell\xe4\xe4n."),e.qZA(),e.TgZ(44,"h3"),e._uU(45,"Valvontaviranomaisen yhteystiedot"),e.qZA(),e.TgZ(46,"address"),e._uU(47,"Etel\xe4-Suomen aluehallintovirasto"),e._UZ(48,"br"),e._uU(49," Saavutettavuuden valvonnan yksikk\xf6"),e._UZ(50,"br"),e._uU(51," www.saavutettavuusvaatimukset.fi "),e._UZ(52,"br"),e._uU(53," saavutettavuus(at)avi.fi"),e._UZ(54,"br"),e._uU(55," puhelinnumero vaihde 0295 016 000 "),e.qZA()()),2&H){const d=e.oxw();e.xp6(36),e.Q6J("ngIf",d.accessibilityEmail)}}function ix(H,s){if(1&H&&(e.ynx(0),e.TgZ(1,"h2"),e._uU(2,"Feedback"),e.qZA(),e.TgZ(3,"p"),e._uU(4," Accessibility feedback can be provided via email to municipality using CGI Vesa service: "),e.TgZ(5,"a",5),e._uU(6),e.qZA()(),e.BQk()),2&H){const d=e.oxw(2);e.xp6(5),e.MGl("href","mailto:",d.accessibilityEmail,"",e.LSH),e.xp6(1),e.hij(" ",d.accessibilityEmail," ")}}function BM(H,s){if(1&H&&(e.TgZ(0,"div")(1,"h1"),e._uU(2,"Accessibility statement for CGI Vesa-service"),e.qZA(),e.TgZ(3,"p"),e._uU(4,"This accessibility statement is for CGI Vesa-service (browser and mobile applications) and it is updated 05.12.2019. Accessibility of the CGI Vesa service was self-assessed by the developers of CGI Vesa."),e.qZA(),e.TgZ(5,"h2"),e._uU(6,"Conformance status"),e.qZA(),e.TgZ(7,"p"),e._uU(8,"CGI Vesa fullfills accessibility requirements partly."),e.qZA(),e.TgZ(9,"h3"),e._uU(10,"Non accessible content in CGI Vesa (according to WCAG guidelines)"),e.qZA(),e.TgZ(11,"h4"),e._uU(12,"Non accessible content and shortcomings"),e.qZA(),e.TgZ(13,"p"),e._uU(14,"The content has partial shortcomings in the semantic structure, as well as in the definition of the purpose of the input."),e.qZA(),e.TgZ(15,"p"),e._uU(16,"Some of the content in the professional interface is not optimised to be used on small screens."),e.qZA(),e.TgZ(17,"p"),e._uU(18,"There are partial shortcomings in the contents of some error messages."),e.qZA(),e.TgZ(19,"h4"),e._uU(20,"WCAG guidelines to which the shortcomings are related"),e.qZA(),e.TgZ(21,"ul")(22,"li"),e._uU(23,"1.3.1 Info and Relationships"),e.qZA(),e.TgZ(24,"li"),e._uU(25,"1.3.5 Identify Input Purpose"),e.qZA(),e.TgZ(26,"li"),e._uU(27,"1.4.10 Reflow"),e.qZA(),e.TgZ(28,"li"),e._uU(29,"3.1.1 Language of Page"),e.qZA(),e.TgZ(30,"li"),e._uU(31,"3.3.3 Error suggestion"),e.qZA()(),e.TgZ(32,"h4"),e._uU(33,"The reasons for not following the guidelines "),e.qZA(),e.TgZ(34,"p"),e._uU(35," Unreasonable burden: The development of the system is in its infancy and will be corrected in future releases. The extensive content of professional views requires enough screen space and is not intended for use on small screens. "),e.qZA(),e.YNc(36,ix,7,2,"ng-container",1),e.TgZ(37,"h2"),e._uU(38,"Authority"),e.qZA(),e.TgZ(39,"p"),e._uU(40,"If you notice accessibility issues on the service, first provide feedback to the municipality\u2019s contact email address above. It can take up to 14 days to receive a response. If you are not satisfied with the answer you received or do not receive a reply at all within 14 days, "),e.TgZ(41,"a",4),e._uU(42,"you can make a report to Regional State Administrative Agency for Southern Finland "),e.qZA(),e._uU(43,". Regional State Administrative Agency for Southern Finland\u2019s web page has instructions available in Finnish and in Swedish."),e.qZA(),e.TgZ(44,"h3"),e._uU(45,"Authority contact details"),e.qZA(),e.TgZ(46,"address"),e._uU(47," Regional State Administrative Agency for Southern Finland "),e._UZ(48,"br"),e._uU(49," Accessibility control unit "),e._UZ(50,"br"),e._uU(51," www.saavutettavuusvaatimukset.fi "),e._UZ(52,"br"),e._uU(53," saavutettavuus(at)avi.fi"),e._UZ(54,"br"),e._uU(55," Phone 0295 016 000 "),e.qZA()()),2&H){const d=e.oxw();e.xp6(36),e.Q6J("ngIf",d.accessibilityEmail)}}function UM(H,s){if(1&H&&(e.ynx(0),e.TgZ(1,"h2"),e._uU(2,"Feedback"),e.qZA(),e.TgZ(3,"p"),e._uU(4," Feedback p\xe5 tillg\xe4ngligheten kan ges via e-post till den kommun som anv\xe4nder CGI Vesa-tj\xe4nsten: "),e.TgZ(5,"a",5),e._uU(6),e.qZA()(),e.BQk()),2&H){const d=e.oxw(2);e.xp6(5),e.MGl("href","mailto:",d.accessibilityEmail,"",e.LSH),e.xp6(1),e.hij(" ",d.accessibilityEmail," ")}}function Io(H,s){if(1&H&&(e.TgZ(0,"div")(1,"h1"),e._uU(2,"CGI Vesa-tj\xe4nstens tillg\xe4nglighetsutl\xe5tande"),e.qZA(),e.TgZ(3,"p"),e._uU(4,"Detta tillg\xe4nglighetsutl\xe5tande g\xe4ller CGI Vesa-tj\xe4nsten (applikationer f\xf6r webbl\xe4sare och mobiler) och har uppr\xe4ttats 05.12.2019. Tillg\xe4nglighetsstatusen f\xf6r denna digitala tj\xe4nst har utv\xe4rderats av CGI Vesas utvecklare sj\xe4lva."),e.qZA(),e.TgZ(5,"h2"),e._uU(6,"Status f\xf6r tillg\xe4nglighet"),e.qZA(),e.TgZ(7,"p"),e._uU(8,"CGI Vesa uppfyller till stor del de krav p\xe5 tillg\xe4nglighet som st\xe4lls i lagen."),e.qZA(),e.TgZ(9,"h3"),e._uU(10,"Icke tillg\xe4ngligt inneh\xe5ll i CGI Vesa (enligt WCAG-kriterier)"),e.qZA(),e.TgZ(11,"h4"),e._uU(12,"Icke tillg\xe4ngligt inneh\xe5ll och de st\xf6rsta bristerna"),e.qZA(),e.TgZ(13,"p"),e._uU(14,"Inneh\xe5llet har vissa brister i den semantiska strukturen samt i definitionen av syftet med inmatning."),e.qZA(),e.TgZ(15,"p"),e._uU(16,"En del av inneh\xe5llet i det professionella gr\xe4nssnittet kan inte anv\xe4ndas p\xe5 sm\xe5 sk\xe4rmar."),e.qZA(),e.TgZ(17,"p"),e._uU(18,"Det finns vissa brister i definitionen av inneh\xe5llets spr\xe5k, samt i definitionen av vissa felmeddelandens inneh\xe5ll."),e.qZA(),e.TgZ(19,"h4"),e._uU(20,"WCAG:s tillg\xe4nglighetskrav som inte uppfylls"),e.qZA(),e.TgZ(21,"ul")(22,"li"),e._uU(23,"1.3.1 Information och relationer"),e.qZA(),e.TgZ(24,"li"),e._uU(25,"1.3.5 Identifiera inmatningssyfte"),e.qZA(),e.TgZ(26,"li"),e._uU(27,"1.4.10 Omfl\xf6dning"),e.qZA(),e.TgZ(28,"li"),e._uU(29,"3.1.1 Sidans spr\xe5k"),e.qZA(),e.TgZ(30,"li"),e._uU(31,"3.3.3 F\xf6rslag vid felhantering"),e.qZA()(),e.TgZ(32,"h4"),e._uU(33,"Anledning till att kraven inte uppfylls"),e.qZA(),e.TgZ(34,"p"),e._uU(35," Oproportionell b\xf6rda: Systemutvecklingen finns i ett tidigt skede och bristerna kommer att \xe5tg\xe4rdas i framtida versioner. Det omfattande inneh\xe5llet i vyerna f\xf6r professionella anv\xe4ndare kr\xe4ver mycket utrymme p\xe5 sk\xe4rmen och \xe4r inte avsedda f\xf6r anv\xe4ndning p\xe5 sm\xe5 sk\xe4rmar. "),e.qZA(),e.YNc(36,UM,7,2,"ng-container",1),e.TgZ(37,"h2"),e._uU(38,"Tillsynsmyndighet"),e.qZA(),e.TgZ(39,"p"),e._uU(40,"Ifall du uppt\xe4cker brister i tillg\xe4ngligheten p\xe5 webbplatsen, v\xe4nligen skicka f\xf6rst feedback till kommunens e-postadress ovan. Det kan ta 14 dagar att f\xe5 ett svar. Om du inte \xe4r n\xf6jd med svaret du fick eller du inte har f\xe5tt ett svar inom 14 dagar, "),e.TgZ(41,"a",4),e._uU(42,"kan du anm\xe4la det till Regionf\xf6rvaltningsverket i S\xf6dra Finland "),e.qZA(),e._uU(43,". Detaljerad information om hur man g\xf6r anm\xe4lningen och hur \xe4rendet behandlas finns p\xe5 webbplatsen f\xf6r Regionf\xf6rvaltningsverket i S\xf6dra Finland."),e.qZA(),e.TgZ(44,"h3"),e._uU(45,"Tillsynsmyndighetens kontaktuppgifter"),e.qZA(),e.TgZ(46,"address"),e._uU(47," Tillsynsmyndighetens kontaktuppgifter"),e._UZ(48,"br"),e._uU(49," Enheten f\xf6r tillg\xe4nglighetstillsyn"),e._UZ(50,"br"),e._uU(51," www.saavutettavuusvaatimukset.fi "),e._UZ(52,"br"),e._uU(53," saavutettavuus(at)avi.fi"),e._UZ(54,"br"),e._uU(55," telefonnummer v\xe4xel 0295 016 000 "),e.qZA()()),2&H){const d=e.oxw();e.xp6(36),e.Q6J("ngIf",d.accessibilityEmail)}}yv.\u0275fac=function(s){return new(s||yv)},yv.\u0275mod=e.oAB({type:yv}),yv.\u0275inj=e.cJS({imports:[Jc,Ga,_u]});class Zu extends Js{constructor(s,d,k){super(),this.siviModalController=s,this.translate=d,this.platformHelperService=k}ngOnInit(){this.language=this.translate.currentLang}ngAfterViewInit(){(this.platformHelperService.isMobilePlatform()||this.platformHelperService.isMobileWebPlatform())&&(document.getElementById("info-page").onclick=function(s){if("A"===s.target.tagName)return window.open(s.target.href,"_blank","location=yes"),!1})}onDismiss(){this.siviModalController.dismiss()}}Zu.\u0275fac=function(s){return new(s||Zu)(e.Y36(Ac),e.Y36(we.sK),e.Y36(Qd))},Zu.\u0275cmp=e.Xpm({type:Zu,selectors:[["sivi-lib-guardian-accessibility"]],inputs:{accessibilityEmail:"accessibilityEmail"},features:[e.qOj],decls:9,vars:6,consts:[["id","info-page",1,"ion-padding"],[4,"ngIf"],[1,"button-container"],["color","primary","fill","solid",3,"click"],["href","https://www.saavutettavuusvaatimukset.fi/oikeutesi/","target","_blank","rel","noopener"],[3,"href"]],template:function(s,d){1&s&&(e.TgZ(0,"ion-content",0)(1,"div"),e.YNc(2,FC,56,1,"div",1),e.YNc(3,BM,56,1,"div",1),e.qZA(),e.YNc(4,Io,56,1,"div",1),e.TgZ(5,"div",2)(6,"ion-button",3),e.NdJ("click",function(){return d.onDismiss()}),e._uU(7),e.ALo(8,"translate"),e.qZA()()()),2&s&&(e.xp6(2),e.Q6J("ngIf","fi"===d.language),e.xp6(1),e.Q6J("ngIf","en"===d.language),e.xp6(1),e.Q6J("ngIf","sv"===d.language),e.xp6(3),e.hij(" ",e.lcZ(8,4,"General.Buttons.Close")," "))},dependencies:[Et.O5,Nt.YG,Nt.W2,we.X$],styles:["[_nghost-%COMP%]{padding:var(--ion-padding);margin-bottom:var(--ion-padding)}.button-container[_ngcontent-%COMP%]{padding-top:2em;position:absolute;right:2em}"]});class lg extends Ti{constructor(s,d){super(s,d),this.http=s,this.siviProjectsGatewayService=d}putGuardianBasicInfo(s,d){const k=`./api/sivi-accounts-api/guardians/${s}/settings`;return this.put(d,k)}postGuardianBasicInfo(s,d){const k=`./api/sivi-accounts-api/guardians/${s}/settings`;return this.post(k,d)}getGuardianSettings(s){const d=`./api/sivi-accounts-api/guardians/${s}/settings`;return this.get(d)}getGuardianSettingsPermissions(s){const d=`./api/sivi-accounts-api/guardians/${s}/settings/permissions`;return this.get(d)}getPersonAgreements(s,d){const k={locale:s,content:!0,guardianId:d},ot={...this.getCommonSearchOptions(),params:k};return this.get("./api/sivi-accounts-api/personagreement/",ot)}deletePersonAgreement(s){const d=`./api/sivi-accounts-api/personagreement/${s}`;return this.delete(d)}getMunicipalityAccessibilityEmail(){const d={...this.getCommonOptions(),responseType:"text"};return this.get("/api/sivi-accounts-api/municipality-accessibility-email",d)}getGuardianPersonalDataAgreementIsNeeded(){return this.get("./api/sivi-accounts-api/guardians/personal-data-storage-agreement-needed")}setGuardianPersonalDataAgreementStatus(s){const k={...this.getCommonOptions(),params:{personalDataStorageAgreement:s}};return this.put({},"./api/sivi-accounts-api/guardians/personal-data-storage-agreement",k)}}lg.\u0275fac=function(s){return new(s||lg)(e.LFG(ae.eN),e.LFG(dl))},lg.\u0275prov=e.Yz7({token:lg,factory:lg.\u0275fac,providedIn:"root"});class Od extends df{set contact(s){this.onSetContact(s)}get phone(){return(0,Hn.Z)(this.formValue,"phone")}get email(){return(0,Hn.Z)(this.formValue,"email")}get emptyForm(){return!this.email&&!this.phone}get phoneValidators(){return[...this.emptyForm?[sc.required]:[],...this.phone?[sc.validatePhoneNumber()]:[]]}get emailValidators(){return[...this.emptyForm?[sc.required]:[],...this.email?[sc.validateEmail()]:[]]}get isFormValid(){return this.form.valid}constructor(s){super(),this.fb=s,this.readonly=!1,this.contactsChange=new e.vpe,this.form=this.fb.group({email:["",this.emailValidators],phone:["",this.phoneValidators]}),this.formValue={...this.form.value}}onFormValueChange(s){(0,Ne.Z)(this.formValue,s)||(this.formValue={...s},this.setValidators(),this.contactsChange.emit(this.formValue))}onSetContact(s){(0,Ne.Z)(s,this._contact)||(this._contact=s,this.form.patchValue(co.removeEmptyValues(s)),this.setValidators())}setValidators(){this.form.get("phone").setValidators(this.phoneValidators),this.form.get("email").setValidators(this.emailValidators),this.form.updateValueAndValidity()}}function Lh(H,s){if(1&H&&(e.TgZ(0,"div",4)(1,"h3",5),e._uU(2),e.qZA(),e.TgZ(3,"p",6),e._uU(4),e.qZA()()),2&H){const d=s.$implicit;e.xp6(2),e.Oqu(d.title),e.xp6(2),e.Oqu(d.content)}}function OE(H,s){1&H&&e._UZ(0,"ion-spinner")}function I0(H,s){if(1&H){const d=e.EpF();e.TgZ(0,"ion-button",7),e.NdJ("click",function(){e.CHM(d);const ie=e.oxw();return e.KtG(ie.onWithdrawConsents())}),e.YNc(1,OE,1,0,"ion-spinner",8),e._uU(2),e.ALo(3,"translate"),e.qZA()}if(2&H){const d=e.oxw();e.Q6J("disabled",!d.allowWithdraw),e.xp6(1),e.Q6J("ngIf",!d.allowWithdraw),e.xp6(1),e.hij(" ",e.lcZ(3,3,"General.Buttons.WithdrawApproval")," ")}}Od.\u0275fac=function(s){return new(s||Od)(e.Y36(Ve.QS))},Od.\u0275cmp=e.Xpm({type:Od,selectors:[["sivi-lib-guardian-contact"]],inputs:{contact:"contact",municipalityName:"municipalityName",readonly:"readonly"},outputs:{contactsChange:"contactsChange"},features:[e.qOj],decls:16,vars:15,consts:[["siviLibForm","",3,"formGroup"],["siviGridCol","left"],["formControlName","phone","siviLibFormControl","","type","text","label-position","floating",3,"viewMode","label"],["formControlName","email","siviLibFormControl","","type","text","label-position","floating",3,"viewMode","label"]],template:function(s,d){1&s&&(e.ynx(0),e.TgZ(1,"h2"),e._uU(2),e.ALo(3,"translate"),e.qZA(),e.TgZ(4,"form",0)(5,"ion-row")(6,"ion-col",1),e._UZ(7,"cgi-input",2),e.ALo(8,"translate"),e.qZA()(),e.TgZ(9,"ion-row")(10,"ion-col",1),e._UZ(11,"cgi-input",3),e.ALo(12,"translate"),e.qZA()()(),e.TgZ(13,"p"),e._uU(14),e.ALo(15,"translate"),e.qZA(),e.BQk()),2&s&&(e.xp6(2),e.Oqu(e.lcZ(3,7,"Title.ContactDetails")),e.xp6(2),e.Q6J("formGroup",d.form),e.xp6(3),e.Q6J("viewMode",d.readonly)("label",e.lcZ(8,9,"Form.Label.Phone.Home")),e.xp6(4),e.Q6J("viewMode",d.readonly)("label",e.lcZ(12,11,"Form.Label.Email.Home")),e.xp6(3),e.Oqu(e.lcZ(15,13,"General.Text.Contact.Details.Instruction")))},dependencies:[af,Nt.wI,Nt.Nd,qd,Gm,Ve._Y,Ve.JJ,Ve.JL,Ve.sg,Ve.u,we.X$],styles:["[_nghost-%COMP%]{margin-left:var(--ion-padding);margin-bottom:var(--ion-padding)}"]});class Xv{constructor(s,d,k,ie){this.notify=s,this.translate=d,this.guardianSettingsService=k,this.siviProjectsGatewayService=ie,this.personAgreements=[],this.allowWithdraw=!0,this.authService=this.siviProjectsGatewayService.getAuthService()}ngOnInit(){this.getPersonAgreements(this.translate.currentLang),this.watchIfLanguageChange()}watchIfLanguageChange(){this.translate.onLangChange.subscribe(s=>{this.getPersonAgreements(s.lang)})}getPersonAgreements(s){this.guardianSettingsService.getPersonAgreements(s,this.guardianId).pipe((0,ye.q)(1)).subscribe(d=>{this.setPersonAgreements(d),this.setAgreementsApprovedDate((0,Hn.Z)(d,"[0].createdDate"))},d=>{this.notify.alertBackendError(d,"Message.Alert.Title",null,!1)})}setPersonAgreements(s){const d=[fu.TERMS_AND_CONDITIONS,fu.COOKIES];this.personAgreements=co.sortFirstArrayAsSecondByKey(s,d,"agreementType")}setAgreementsApprovedDate(s){if(s){const d=co.convertDateToFinnishStandard(s,as.FINNISH_MOMENT_WITH_TIME);this.agreementsApprovedDate=this.translate.instant("Consent.Instructions.Approved",{approvalDate:d})}}onWithdrawConsents(){var s=this;return(0,o.Z)(function*(){(yield s.notify.createConfirmationPopUp("Consent.Plural","Consent.Messages.Removal","General.Buttons.StopUsingThisService")).onDidDismiss().then(k=>{k&&k.data&&(s.allowWithdraw=!1,s.deletePersonAgreements())})})()}deletePersonAgreements(){const s=[],d=this.personAgreements;for(const k of d)s.push(this.guardianSettingsService.deletePersonAgreement(k.id).pipe((0,ge.K)(ie=>(0,D.of)({error:ie}))));(0,w.D)(s).subscribe(k=>{k.filter(ot=>"error"in ot).length===this.personAgreements.length?(this.allowWithdraw=!0,this.notify.alertDeleteError()):this.authService.logout()})}trackByFn(s,d){return d.id||d.tempId}}function T1(H,s){1&H&&(e.TgZ(0,"strong"),e._uU(1),e.ALo(2,"translate"),e.qZA()),2&H&&(e.xp6(1),e.hij(" ",e.lcZ(2,1,"Title.OfficialDecisions"),""))}function LE(H,s){1&H&&(e.TgZ(0,"strong"),e._uU(1),e.ALo(2,"translate"),e.qZA()),2&H&&(e.xp6(1),e.Oqu(e.lcZ(2,1,"Title.OfficialDecisions.PC")))}function Ky(H,s){if(1&H){const d=e.EpF();e.TgZ(0,"ion-item",4)(1,"ion-label"),e._uU(2),e.ALo(3,"translate"),e.qZA(),e.TgZ(4,"ion-checkbox",5),e.NdJ("ionChange",function(ie){e.CHM(d);const ot=e.oxw(2);return e.KtG(ot.onPreferencesChange(ie))}),e.ALo(5,"translate"),e.qZA()()}if(2&H){const d=e.oxw(2);e.xp6(2),e.hij(" ",e.lcZ(3,5,"sivi.municipality.communication.preference.official.decision.type.paper.post")," "),e.xp6(2),e.Q6J("value","paperDecisionConsent")("disabled",!d.permissions.canUpdateDecisionSentInPaper)("checked",d.preferences.paperDecisionConsent),e.uIk("aria-label",e.lcZ(5,7,"sivi.municipality.communication.preference.official.decisions"))}}function x1(H,s){if(1&H&&(e.TgZ(0,"div"),e.YNc(1,T1,3,3,"strong",1),e.YNc(2,LE,3,3,"ng-template",null,2,e.W1O),e.YNc(4,Ky,6,9,"ion-item",3),e.qZA()),2&H){const d=e.MAs(3),k=e.oxw();e.xp6(1),e.Q6J("ngIf",k.municipalityVantaa)("ngIfElse",d),e.xp6(3),e.Q6J("ngIf",k.preferences)}}function kE(H,s){if(1&H){const d=e.EpF();e.TgZ(0,"ion-item",4)(1,"ion-label"),e._uU(2),e.ALo(3,"translate"),e.qZA(),e.TgZ(4,"ion-checkbox",5),e.NdJ("ionChange",function(ie){e.CHM(d);const ot=e.oxw(2);return e.KtG(ot.onPreferencesChange(ie))}),e.qZA()()}if(2&H){const d=e.oxw(2);e.xp6(2),e.hij(" ",e.lcZ(3,4,"Allow.PushNotifications")," "),e.xp6(2),e.Q6J("value","pushNotificationsConsent")("disabled",!d.permissions.canUpdatePushNotificationsConsent)("checked",d.preferences.pushNotificationsConsent)}}function rx(H,s){if(1&H&&(e.TgZ(0,"div")(1,"strong"),e._uU(2),e.ALo(3,"translate"),e.qZA(),e.YNc(4,kE,5,6,"ion-item",3),e.qZA()),2&H){const d=e.oxw();e.xp6(2),e.Oqu(e.lcZ(3,2,"Allow.PushNotifications.Title")),e.xp6(2),e.Q6J("ngIf",d.preferences)}}Xv.\u0275fac=function(s){return new(s||Xv)(e.Y36(md),e.Y36(we.sK),e.Y36(lg),e.Y36(dl))},Xv.\u0275cmp=e.Xpm({type:Xv,selectors:[["sivi-lib-guardian-consents"]],inputs:{guardianId:"guardianId",canSeeWithdrawButton:"canSeeWithdrawButton"},decls:13,vars:10,consts:[[1,"consent-container","ion-padding"],[1,"mt05"],["class","mb2",4,"ngFor","ngForOf","ngForTrackBy"],["class","weight-bold","fill","outline","size","default",3,"disabled","click",4,"ngIf"],[1,"mb2"],[1,"mt0"],[1,"normal"],["fill","outline","size","default",1,"weight-bold",3,"disabled","click"],[4,"ngIf"]],template:function(s,d){1&s&&(e.ynx(0,0),e.TgZ(1,"h2",1),e._uU(2),e.ALo(3,"translate"),e.qZA(),e.YNc(4,Lh,5,2,"div",2),e.TgZ(5,"p")(6,"strong"),e._uU(7),e.ALo(8,"translate"),e.qZA()(),e.TgZ(9,"p")(10,"strong"),e._uU(11),e.qZA()(),e.YNc(12,I0,4,5,"ion-button",3),e.BQk()),2&s&&(e.xp6(2),e.Oqu(e.lcZ(3,6,"Consent.Plural")),e.xp6(2),e.Q6J("ngForOf",d.personAgreements)("ngForTrackBy",d.trackByFn),e.xp6(3),e.Oqu(e.lcZ(8,8,"Consent.Instructions.ApprovalRequired")),e.xp6(4),e.Oqu(d.agreementsApprovedDate),e.xp6(1),e.Q6J("ngIf",d.canSeeWithdrawButton))},dependencies:[Et.sg,Et.O5,Nt.YG,Nt.PQ,we.X$],styles:["[_nghost-%COMP%]{margin-left:var(--ion-padding);margin-bottom:var(--ion-padding)}ion-checkbox[_ngcontent-%COMP%]{margin-left:var(--ion-padding)}"]});class P0{constructor(s){this.siviProjectsGatewayService=s,this.preferences={paperDecisionConsent:!1,pushNotificationsConsent:!1},this.communicationPreferencesChange=new e.vpe,this.shouldShowFeaturePushNotifications=!this.siviProjectsGatewayService.getEnvironmentService().isPreprodOrProdEnvironment(),this.environmentService=this.siviProjectsGatewayService.getEnvironmentService(),this.municipalityVantaa=!this.environmentService.proConsona}onPreferencesChange(s){const{checked:d,value:k}=s.detail;this.communicationPreferencesChange.emit({[k]:d})}}function ox(H,s){if(1&H&&(e.TgZ(0,"div")(1,"span"),e._uU(2),e.qZA()()),2&H){const d=s.$implicit,k=e.oxw(2);e.xp6(2),e.Oqu(k.getIncomeRegisterConsentHistoryRecordDescription(d))}}function rt(H,s){if(1&H&&(e.TgZ(0,"div",3),e.YNc(1,ox,3,1,"div",4),e.qZA()),2&H){const d=e.oxw();e.xp6(1),e.Q6J("ngForOf",d.incomeRegister.incomeRegisterConsentHistory)("ngForTrackBy",d.trackByIndex)}}P0.\u0275fac=function(s){return new(s||P0)(e.Y36(dl))},P0.\u0275cmp=e.Xpm({type:P0,selectors:[["sivi-lib-guardian-communication-preferences"]],inputs:{preferences:"preferences",permissions:"permissions"},outputs:{communicationPreferencesChange:"communicationPreferencesChange"},decls:7,vars:5,consts:[[4,"ngIf"],[4,"ngIf","ngIfElse"],["otherMunicipalities",""],["lines","none",4,"ngIf"],["lines","none"],["role","checkbox","slot","start",3,"value","disabled","checked","ionChange"]],template:function(s,d){1&s&&(e.ynx(0),e.TgZ(1,"div")(2,"h2"),e._uU(3),e.ALo(4,"translate"),e.qZA(),e.YNc(5,x1,5,3,"div",0),e.YNc(6,rx,5,4,"div",0),e.qZA(),e.BQk()),2&s&&(e.xp6(3),e.Oqu(e.lcZ(4,3,"Title.CommunicationPreferences")),e.xp6(2),e.Q6J("ngIf",null==d.permissions?null:d.permissions.canReadDecisionSentInPaper),e.xp6(1),e.Q6J("ngIf",(null==d.permissions?null:d.permissions.canReadPushNotificationsConsent)&&d.shouldShowFeaturePushNotifications))},dependencies:[Et.O5,Nt.nz,Nt.Ie,Nt.Q$,Nt.w,we.X$],styles:["[_nghost-%COMP%]{margin-left:var(--ion-padding);margin-bottom:var(--ion-padding)}ion-checkbox[_ngcontent-%COMP%]{margin:0 10px 0 0}ion-label[_ngcontent-%COMP%]{white-space:normal!important}"]});class ey extends Js{constructor(s){super(),this.translate=s,this.incomeRegister={incomeRegisterConsent:!1},this.incomeRegisterChange=new e.vpe}ngOnInit(){this.makeTranslations(),this.watchIfLanguageChange()}watchIfLanguageChange(){this.translate.onLangChange.pipe((0,j.R)(this.destroy$),(0,Z.b)(()=>this.makeTranslations())).subscribe()}makeTranslations(){this.useOfAllowed=this.translate.instant("Title.Income.Register.Use.Of.Allowed"),this.useOfDenied=this.translate.instant("Title.Income.Register.Use.Of.Denied"),this.behalfOfPerson=this.translate.instant("Title.Income.Register.On.Behalf.Of.Person")}onIncomeRegisterChange(s){const{checked:d,value:k}=s.detail;this.incomeRegisterChange.emit({[k]:d})}getIncomeRegisterConsentHistoryRecordDescription(s){const{checked:d,professional:k,firstName:ie,lastName:ot,dateTime:Cn}=s;return`${d?this.useOfAllowed:this.useOfDenied} ${co.convertDateToFinnishStandard(Cn,as.FINNISH_MOMENT_WITH_TIME)} (${[this.getName(ie,ot)," ",k?this.behalfOfPerson:""].join("").trim()})`}getName(s,d){return[s,d].filter(k=>!!k).join(" ")}trackByIndex(s){return s}}ey.\u0275fac=function(s){return new(s||ey)(e.Y36(we.sK))},ey.\u0275cmp=e.Xpm({type:ey,selectors:[["sivi-lib-guardian-income-register"]],inputs:{incomeRegister:"incomeRegister",canChangeIncomeRegister:"canChangeIncomeRegister"},outputs:{incomeRegisterChange:"incomeRegisterChange"},features:[e.qOj],decls:15,vars:16,consts:[["lines","none"],["role","checkbox","slot","start",3,"value","disabled","checked","ionChange"],["class","income-register-use-is",4,"ngIf"],[1,"income-register-use-is"],[4,"ngFor","ngForOf","ngForTrackBy"]],template:function(s,d){1&s&&(e.ynx(0),e.TgZ(1,"div")(2,"h2"),e._uU(3),e.ALo(4,"translate"),e.qZA(),e.TgZ(5,"strong"),e._uU(6),e.ALo(7,"translate"),e.qZA(),e.TgZ(8,"ion-item",0)(9,"ion-label"),e._uU(10),e.ALo(11,"translate"),e.qZA(),e.TgZ(12,"ion-checkbox",1),e.NdJ("ionChange",function(ie){return d.onIncomeRegisterChange(ie)}),e.ALo(13,"translate"),e.qZA()()(),e.YNc(14,rt,2,2,"div",2),e.BQk()),2&s&&(e.xp6(3),e.Oqu(e.lcZ(4,8,"Title.IncomeRegister")),e.xp6(3),e.Oqu(e.lcZ(7,10,"Title.IncomeRegister.ForFeeAndValueDecisions")),e.xp6(4),e.hij(" ",e.lcZ(11,12,"Title.IncomeRegister.Checkbox")," "),e.xp6(2),e.Q6J("value","incomeRegisterConsent")("disabled",!d.canChangeIncomeRegister)("checked",d.incomeRegister.incomeRegisterConsent),e.uIk("aria-label",e.lcZ(13,14,"Title.IncomeRegister.Checkbox")),e.xp6(2),e.Q6J("ngIf",d.incomeRegister.incomeRegisterConsentHistory))},dependencies:[Et.sg,Et.O5,Nt.nz,Nt.Ie,Nt.Q$,Nt.w,we.X$],styles:["[_nghost-%COMP%]{margin-left:var(--ion-padding);margin-bottom:var(--ion-padding)}.income-register-use-is[_ngcontent-%COMP%]{margin-top:10px 0}ion-checkbox[_ngcontent-%COMP%]{margin:0 10px 0 0}ion-label[_ngcontent-%COMP%]{white-space:normal!important}"]});const bv=["contactComponent"],Vb=["contentLoader"];function D1(H,s){if(1&H){const d=e.EpF();e.TgZ(0,"sivi-lib-guardian-contact",8,9),e.NdJ("contactsChange",function(ie){e.CHM(d);const ot=e.oxw(2);return e.KtG(ot.guardianSettingsChange(ie))}),e.qZA()}if(2&H){const d=e.oxw(2);e.Q6J("contact",d.contact)("readonly",!(null!=d.permissions&&d.permissions.canUpdateContactDetails))}}function RE(H,s){if(1&H){const d=e.EpF();e.TgZ(0,"sivi-lib-guardian-communication-preferences",10),e.NdJ("communicationPreferencesChange",function(ie){e.CHM(d);const ot=e.oxw(2);return e.KtG(ot.guardianSettingsChange(ie))}),e.qZA()}if(2&H){const d=e.oxw(2);e.Q6J("preferences",d.preferences)("permissions",d.permissions)}}function zM(H,s){if(1&H){const d=e.EpF();e.TgZ(0,"sivi-lib-guardian-income-register",11),e.NdJ("incomeRegisterChange",function(ie){e.CHM(d);const ot=e.oxw(2);return e.KtG(ot.guardianSettingsChange(ie))}),e.qZA()}if(2&H){const d=e.oxw(2);e.Q6J("incomeRegister",d.incomeRegister)("canChangeIncomeRegister",null==d.permissions?null:d.permissions.canUpdateIncomeRegister)}}function Ru(H,s){if(1&H&&e._UZ(0,"sivi-lib-guardian-consents",12),2&H){const d=e.oxw(2);e.Q6J("guardianId",d.guardianId)("canSeeWithdrawButton",null==d.permissions?null:d.permissions.canReadWithdrawApprovalButton)}}function NC(H,s){if(1&H){const d=e.EpF();e.TgZ(0,"div")(1,"h2"),e._uU(2),e.ALo(3,"translate"),e.qZA(),e.TgZ(4,"p",13)(5,"a",14),e.NdJ("siviClick",function(){e.CHM(d);const ie=e.oxw(2);return e.KtG(ie.openAccessibilityModal())}),e._uU(6),e.ALo(7,"translate"),e.qZA()()()}2&H&&(e.xp6(2),e.Oqu(e.lcZ(3,2,"General.Accessibility")),e.xp6(4),e.hij("",e.lcZ(7,4,"General.AccessibilityInfo")," "))}function S1(H,s){if(1&H&&(e.ynx(0),e.TgZ(1,"h1",3),e._uU(2),e.ALo(3,"translate"),e.qZA(),e.TgZ(4,"h2"),e._uU(5),e.ALo(6,"translate"),e.qZA(),e.TgZ(7,"p")(8,"strong"),e._uU(9),e.ALo(10,"translate"),e.qZA()(),e.YNc(11,D1,2,2,"sivi-lib-guardian-contact",4),e.YNc(12,RE,1,2,"sivi-lib-guardian-communication-preferences",5),e.YNc(13,zM,1,2,"sivi-lib-guardian-income-register",6),e.YNc(14,Ru,1,2,"sivi-lib-guardian-consents",7),e.YNc(15,NC,8,6,"div",2),e.BQk()),2&H){const d=e.oxw();e.xp6(2),e.Oqu(e.lcZ(3,8,"General.Info")),e.xp6(3),e.Oqu(e.lcZ(6,10,"Municipality.Name")),e.xp6(4),e.Oqu(e.lcZ(10,12,"Municipality.Names."+d.getMunicipalityNamePostFix())),e.xp6(2),e.Q6J("ngIf",null==d.permissions?null:d.permissions.canReadContactDetails),e.xp6(1),e.Q6J("ngIf",(null==d.permissions?null:d.permissions.canReadDecisionSentInPaper)||(null==d.permissions?null:d.permissions.canReadPushNotificationsConsent)),e.xp6(1),e.Q6J("ngIf",null==d.permissions?null:d.permissions.canReadIncomeRegister),e.xp6(1),e.Q6J("ngIf",null==d.permissions?null:d.permissions.canReadHistoryOfAcceptingTerms),e.xp6(1),e.Q6J("ngIf",null==d.permissions?null:d.permissions.canReadAccessibility)}}class Jy{get isValid(){return[this.contactComponent].every(d=>!d||d.isFormValid)}constructor(s,d,k,ie,ot,Cn,ir){this.route=s,this.router=d,this.notify=k,this.translate=ie,this.modalCtrl=ot,this.siviProjectsGatewayService=Cn,this.guardianSettingsService=ir,this.savedValue={},this.contact={},this.preferences={},this.incomeRegister={},this.goToInvalid$=new l.x,this.authService=this.siviProjectsGatewayService.getAuthService()}ngOnInit(){this.setPermissions(),this.getAccessibilityEmail(),this.getGuardianSettings(),this.restoreModal()}setPermissions(){var s=this;return(0,o.Z)(function*(){s.permissions=yield s.guardianSettingsService.getGuardianSettingsPermissions(s.guardianId).pipe((0,ye.q)(1)).toPromise()})()}getGuardianSettings(){this.guardianSettingsService.getGuardianSettings(this.guardianId).pipe((0,Z.b)(()=>this.contentLoader.showLoader()),(0,Z.b)(s=>this.savedValue={...s}),(0,ut.x)(()=>this.contentLoader.hideLoader())).subscribe(s=>this.onSetGuardianSettings(s))}onSetGuardianSettings(s){s&&!(0,Ne.Z)(s,this.settings)&&(this.settings=s,this.setGuardianComponentsInputs(s))}setGuardianComponentsInputs(s){const{phone:d,email:k,incomeRegisterConsent:ie,paperDecisionConsent:ot,pushNotificationsConsent:Cn,incomeRegisterConsentHistory:ir}=s;this.contact={phone:d,email:k},this.incomeRegister={incomeRegisterConsent:ie,incomeRegisterConsentHistory:ir},this.preferences={paperDecisionConsent:ot,pushNotificationsConsent:Cn}}guardianSettingsChange(s){const d={...this.settings,...s},k=co.removeEmptyProperties(d);this.settings=k}saveGuardianSettings(){const s=co.removeEmptyProperties(this.settings);return this.guardianSettingsService.putGuardianBasicInfo(this.guardianId,s)}onSaveClick(){var s=this;return(0,o.Z)(function*(){if(s.isValid)try{s.contentLoader.showLoader(),yield s.saveGuardianSettings().toPromise(),s.getGuardianSettings(),s.savedValue={...s.settings},s.notify.toastSaveSuccess()}catch(d){s.notify.alertBackendError(d)}finally{s.contentLoader.hideLoader()}else s.goToInvalid$.next()})()}openAccessibilityModal(){const s={component:Zu,componentProps:{accessibilityEmail:this.accessibilityEmail},cssClass:"modal-large-size"};this.modalCtrl.openModal(s,Ro.MODAL,rc.ACCESSIBILITY_INFO)}getAccessibilityEmail(){this.guardianSettingsService.getMunicipalityAccessibilityEmail().pipe((0,ye.q)(1)).subscribe(s=>{this.accessibilityEmail=s},s=>{this.notify.alertBackendError(s)})}getMunicipalityNamePostFix(){return this.settings?.municipalityName?.split(" ").join(".")}notChanged(){return(0,Ne.Z)(this.settings,this.savedValue)}restoreModal(){this.route?.snapshot?.queryParams?.modal===rc.ACCESSIBILITY_INFO&&this.openAccessibilityModal()}}Jy.\u0275fac=function(s){return new(s||Jy)(e.Y36(qt.gz),e.Y36(qt.F0),e.Y36(md),e.Y36(we.sK),e.Y36(Ac),e.Y36(dl),e.Y36(lg))},Jy.\u0275cmp=e.Xpm({type:Jy,selectors:[["sivi-lib-guardian-settings"]],viewQuery:function(s,d){if(1&s&&(e.Gf(bv,5),e.Gf(Vb,7)),2&s){let k;e.iGM(k=e.CRH())&&(d.contactComponent=k.first),e.iGM(k=e.CRH())&&(d.contentLoader=k.first)}},inputs:{guardianId:"guardianId"},decls:3,vars:2,consts:[[3,"siviGoToInvalid"],["contentLoader",""],[4,"ngIf"],[1,"ion-no-margin"],[3,"contact","readonly","contactsChange",4,"ngIf"],[3,"preferences","permissions","communicationPreferencesChange",4,"ngIf"],[3,"incomeRegister","canChangeIncomeRegister","incomeRegisterChange",4,"ngIf"],[3,"guardianId","canSeeWithdrawButton",4,"ngIf"],[3,"contact","readonly","contactsChange"],["contactComponent",""],[3,"preferences","permissions","communicationPreferencesChange"],[3,"incomeRegister","canChangeIncomeRegister","incomeRegisterChange"],[3,"guardianId","canSeeWithdrawButton"],[1,"mb5"],["role","button","siviKeyboardEvents","",3,"siviClick"]],template:function(s,d){1&s&&(e.TgZ(0,"sivi-lib-content-loader",0,1),e.YNc(2,S1,16,14,"ng-container",2),e.qZA()),2&s&&(e.Q6J("siviGoToInvalid",d.goToInvalid$),e.xp6(2),e.Q6J("ngIf",d.settings))},dependencies:[bp,Kp,Et.O5,Cg,Od,Xv,P0,ey,we.X$],styles:["a[_ngcontent-%COMP%]{cursor:pointer;text-decoration:underline}"]});class Qy{}Qy.\u0275fac=function(s){return new(s||Qy)},Qy.\u0275mod=e.oAB({type:Qy}),Qy.\u0275inj=e.cJS({providers:[lg,Ac],imports:[Jc,Ga,we.aw,Tp]});class A1 extends Pc.ye{constructor(s){super(),this.translate=s,this.getRangeLabel=(d,k,ie)=>{const ot=this.translate.instant("Table.Pagination.Of");if(0===ie||0===k)return`0 ${ot} ${ie}`;const Cn=d*k;return`${Cn+1} - ${Cn<(ie=Math.max(ie,0))?Math.min(Cn+k,ie):Cn+k} ${ot} ${ie}`},this.translateLabels(),this.translate.onLangChange.subscribe(()=>this.translateLabels())}translateLabels(){this.firstPageLabel=this.translate.instant("Table.Pagination.FirstPage"),this.lastPageLabel=this.translate.instant("Table.Pagination.LastPage"),this.nextPageLabel=this.translate.instant("Table.Pagination.NextPage"),this.previousPageLabel=this.translate.instant("Table.Pagination.PreviousPage"),this.itemsPerPageLabel=this.translate.instant("Table.Pagination.ItemsPerPage")}}class qy{}qy.\u0275fac=function(s){return new(s||qy)},qy.\u0275mod=e.oAB({type:qy}),qy.\u0275inj=e.cJS({providers:[{provide:Pc.ye,useFactory:H=>new A1(H),deps:[we.sK]}],imports:[Pc.TU,Pc.TU]});class Zb{transform(s,d=" "){const k=s?.firstName||s?.firstNames||"",ie=s?.lastName||"";return" "===d||k&&ie?`${k}${d}${ie}`.trim():`${k}${ie}`}}Zb.\u0275fac=function(s){return new(s||Zb)},Zb.\u0275pipe=e.Yjl({name:"firstNameLastName",type:Zb,pure:!0});class Xy{transform(s,d=" "){const k=s?.firstName||s?.firstNames||"",ie=s?.lastName||"";return" "===d||k&&ie?`${ie}${d}${k}`.trim():`${ie}${k}`}}Xy.\u0275fac=function(s){return new(s||Xy)},Xy.\u0275pipe=e.Yjl({name:"lastNameFirstName",type:Xy,pure:!0});class ty{constructor(s){this.translate=s}transform(s){const d=s<0,k=Math.abs(s),ie=Math.floor(k/60),ot=k%60;return`${d?`-${ie}`:`${ie}`} ${this.translate.instant("General.Text.Hour.Abbreviation")} ${ot} ${this.translate.instant("General.Text.Minute.Abbreviation")}`}}ty.\u0275fac=function(s){return new(s||ty)(e.Y36(we.sK,16))},ty.\u0275pipe=e.Yjl({name:"minutesToHoursAndMinutes",type:ty,pure:!0});class tp{}tp.\u0275fac=function(s){return new(s||tp)},tp.\u0275mod=e.oAB({type:tp}),tp.\u0275inj=e.cJS({imports:[Et.ez]});class kg{navigate(){}navigateByUrl(s){return s}parseUrl(){}}class Rg{constructor(){return{snapshot:{queryParamMap:{get:function(){return{}}},paramMap:{get:function(){return{}}}}}}}class w1{create(){return Promise.resolve(this)}present(){return Promise.resolve()}}class Cv{create(){return Promise.resolve(this)}present(){return Promise.resolve()}dismiss(){return Promise.resolve()}onDidDismiss(){return Promise.resolve()}}Cv.\u0275fac=function(s){return new(s||Cv)},Cv.\u0275prov=e.Yz7({token:Cv,factory:Cv.\u0275fac});class I1{}class Fg{}class O0{create(){return(0,o.Z)(function*(){return Promise.resolve({present:function(){},dismiss:function(){Promise.resolve({})},onDidDismiss:function(){Promise.resolve({})}})})()}dismiss(){return(0,o.Z)(function*(){return Promise.resolve()})()}present(){}}class BC{openModal(){return(0,o.Z)(function*(){return Promise.resolve({present:function(){},dismiss:function(){Promise.resolve({})},onDidDismiss:function(){Promise.resolve({})}})})()}create(){return(0,o.Z)(function*(){return Promise.resolve()})()}dismiss(){return(0,o.Z)(function*(){return Promise.resolve()})()}getTop(){return(0,o.Z)(function*(){return Promise.resolve()})()}updateQueryParam(){}updateQueryParams(){}combineQueryParams(){}removeQueryParam(){}removeQueryParams(){}}class L0{ready(){return(0,o.Z)(function*(){return Promise.resolve(!0)})()}is(s){return!1}}class FE{toast(){return(0,o.Z)(function*(){return eb()})()}toastSaveSuccess(){return(0,o.Z)(function*(){return eb()})()}toastDeleteSuccess(){return(0,o.Z)(function*(){eb()})()}alert(){return(0,o.Z)(function*(){return eb()})()}alertBackendError(){}deleteConfirmPopup(){}alertSaveError(){}alertDeleteError(){}alertFormError(){}alertFormSaveFailed(){}alertFailedToCommunicateWithBackend(){}alertFailedToLoadData(){}alertDeleteFailed(){}alertDeleteSuccess(){}promptDiscardChanges(){}alertBackendErrorWithCode(){return(0,o.Z)(function*(){Promise.resolve(!0)})()}getDeleteConfirmation(){return(0,o.Z)(function*(){Promise.resolve(!0)})()}createToast(){return(0,o.Z)(function*(){return eb()})()}createErrorAlert(){return(0,o.Z)(function*(){return eb()})()}createConfirmationPopUp(){return(0,o.Z)(function*(){return k1()})()}createCustomConfirmationPopUp(){return(0,o.Z)(function*(){return k1()})()}createAlertWithValueToDisplay(){}}class P1{create(){return Promise.resolve(this)}present(){}dismiss(){}onDidDismiss(){return Promise.resolve({})}}class ax{constructor(){this.getToken=(0,D.of)("12345"),this.requestPermission=(0,D.of)(),this.tokenChanges=(0,D.of)("89123")}deleteToken(s){return(0,D.of)(!0)}}class O1{static getLocalStorageMock(){let s={};return spyOn(localStorage,"getItem").and.callFake(d=>s[d]||null),spyOn(localStorage,"removeItem").and.callFake(d=>{delete s[d]}),spyOn(localStorage,"setItem").and.callFake((d,k)=>s[d]=k),spyOn(localStorage,"clear").and.callFake(()=>{s={}}),s}}class L1{getPlatformInformation(){return(0,D.of)({deviceId:"chrome|mac|mac-os-x-13",deviceCategoryType:"core",deviceFullName:"unknown",osVersion:"mac",appVersion:"0.0.12",browser:"chrome"})}openNewTab(s){}isMobileOrBrowser(){return!1}isMobilePlatform(){return!1}isTabletPlatform(){return!1}setPlatformInformation(){}getDevicePlatformInformation(){return(0,D.of)({deviceId:"chrome|mac|mac-os-x-13",deviceCategoryType:"core",deviceFullName:"unknown",osVersion:"mac",appVersion:"0.0.12",browser:"chrome"})}}class qc{set(s){return Promise.resolve(s)}get(){return Promise.resolve(null)}}class sh{getToken(){return(0,D.of)("12345").toPromise()}onTokenRefresh(){return(0,D.of)("3456")}onNotification(){return(0,D.of)()}}function eb(){return Promise.resolve({present:function(){},onDidDismiss:function(){Promise.resolve({})}})}function k1(){return Promise.resolve({present:function(){},onDidDismiss:function(){Promise.resolve({})}})}class YM{create(){return Promise.resolve(this)}present(){}}class ny{create(){return{on:function(){return(0,D.of)({})}}}}class NE{getPicture(){return(0,D.of)({})}}class tb{}const Ua={control:{enabled:!0,disabled:!1,touched:!1,errors:null,enable(){},disable(){},markAsUntouched(){},markAsTouched(){},setValidators(){},validator(){},updateValueAndValidity(){},statusChanges:(0,D.of)(),valueChanges:(0,D.of)()}};function kh(){return{detectChanges:()=>{},markForCheck:()=>{},detach:()=>{},checkNoChanges:()=>{},reattach:()=>{}}}class lh{static createMouseEvent(){return new MouseEvent("MouseEvent")}static createCustomEvent(s){return new CustomEvent("test-event",{detail:s})}static formUrlForAPI(s){return"https://dev.cgivesa.fi/"+s}static getLanguages(){return[{value:"FI",text:"Finnish"},{value:"SV",text:"Swedish"},{value:"EN",text:"English"}]}static getPersonAgreements(){return[{id:"ef698963-047b-4650-ae64-0d92f95c1d9a",createdDate:"2019-02-28T09:38:25.403258Z",personId:"085c4fd0-71f3-43cb-ad85-ea8615b1d17b",agreementId:"d74fd4d1-5058-4604-9586-e77ce49888ad",agreementType:fu.TERMS_AND_CONDITIONS,required:!1,title:"Terms and conditions",content:"accept Terms and conditions",deleted:!1},{id:"ef698963-047b-4650-ae64-0d92f95c1d8a",createdDate:"2019-03-04T07:11:52.397267Z",personId:"085c4fd0-71f3-43cb-ad85-ea8615b1d17b",agreementId:"d74fd4d1-5058-4604-9586-e77ce49998ad",agreementType:fu.COOKIES,required:!1,title:"Cookies",content:"accept cookies",deleted:!1}]}static getStaffMemberCRUD(){return{id:"123",firstName:"Lisa",lastName:"Simpson",username:"test.username",jobTitle:"profession",workPhone:"87654321",workEmail:"workemail@testingemailvesa.fi",address:{street:"street 123",postalCode:"96343",city:"somecity"}}}static getChildren(){return[lh.createChild("child-id-1","Albert","Albertson","101016A10101"),lh.createChild("child-id-2","\xd6\xf6\xd6","Test 2","201017A10101"),lh.createChild("child-id-3","Daniel","Test 3","040316A10101","tester"),lh.createChild("child-id-4","Jessica","Test 4","150615A10101")]}static createChild(s,d,k,ie,ot){const Cn=new zh;return Cn.id=s,Cn.firstName=d,Cn.lastName=k,Cn.pin=ie,ot&&(Cn.nickName=ot),Cn.stringRoles=[Lt.CHILD],Cn}static getStaffMember(){return{firstName:"First Name",lastName:"Last Name",id:"1234567",pin:"090888-301N",stringRoles:[Lt.DCP_TEACHER],contacts:[{id:"11",primary:!0,contact:{id:"11",value:"11A@eurobetis.es",contactTypeCode:us.EMAIL_TYPE,contactTypeDescription:us.EMAIL},person:{id:"123"}},{id:"12",primary:!1,contact:{id:"12",value:"12A@eurobetis.es",contactTypeCode:us.EMAIL_HOME_TYPE,contactTypeDescription:us.EMAIL},person:{id:"123"}},{primary:!1,tempId:"this has not been saved yet, so it has tempId and no id",contact:{value:"this has not been saved yet because it has no id",contactTypeCode:us.EMAIL_WORK_TYPE,contactTypeDescription:us.EMAIL},person:{id:null}},{id:"21",primary:!0,contact:{id:"21",value:"2100",contactTypeCode:us.PHONE_TYPE,contactTypeDescription:us.PHONE},person:{id:"123"}},{id:"22",primary:!1,contact:{id:"22",value:"2200",contactTypeCode:us.PHONE_HOME_TYPE,contactTypeDescription:us.PHONE},person:{id:"123"}},{primary:!1,contact:{value:"unsaved contact",contactTypeCode:us.PHONE_WORK_TYPE,contactTypeDescription:us.PHONE},person:{}}],address:[{id:"31",address:{id:"31",city:"City",street:"Street",postalCode:"123",addressTypeCode:us.ADDRESS_TYPE,addressTypeDescription:us.ADDRESS},person:{id:"123"},primary:!0},{id:"32",address:{city:"City",street:"Street",postalCode:"123",addressTypeCode:us.ADDRESS_HOME_TYPE,addressTypeDescription:us.ADDRESS},person:{id:"123"},primary:!1},{id:"33",address:{city:"City",street:"Street",postalCode:"123",addressTypeCode:us.ADDRESS_WORK_TYPE,addressTypeDescription:us.ADDRESS},person:{id:"123"},primary:!1},{address:{city:"unsaved address",street:"unsaved address",postalCode:"unsaved address",addressTypeCode:us.ADDRESS_WORK_TYPE,addressTypeDescription:us.ADDRESS},person:{},primary:!1,tempId:"this has not been saved yet, so it has tempId and no id"}]}}static getStaffMembers(){return[{id:"staff-1",firstName:"Willy",lastName:"Worker",pin:"010101-0101",roles:[]},{id:"staff-2",firstName:"Senor",lastName:"Siesta",roles:[]}]}static getFamilyMembers(){return[{id:"7a9ac141-8ef6-4cee-bbf5-43775b6cff1e",lastName:"G",firstName:"Prasanna",pin:"070293-663H",nickName:"L",age:10,roles:[{id:"ddfaae36-eddc-4eff-a3f7-3e645d2b831f",organizationId:"a3e8811f-683c-45e6-ae1e-e75b8103487d",personId:"7a9ac141-8ef6-4cee-bbf5-43775b6cff1e",roleId:"83694a7d-0c88-4782-87b3-a63166e28ec0",organizationName:"VenkatUnit",personName:"G, Prasanna",roleName:"ROLE_CHILD",organizationPathName:"Venkat - VenkatUnit",organizationPathIds:"983adc05-26a4-4bd5-97c6-efc12e2e6e0d - a3e8811f-683c-45e6-ae1e-e75b8103487d",organizationType:"sivi.organization.type.daycareplace.type.groupfamilydaycare"}]},{id:"7e756bce-56af-45d5-aca6-ffe6ab2cd7b1",lastName:"K",firstName:"Leena",pin:"070584-697P",nickName:"Banglaore",age:6,roles:[{id:"ff3476b2-c156-48e3-a74c-f8ad40a75f06",organizationId:"a3e8811f-683c-45e6-ae1e-e75b8103487d",personId:"7e756bce-56af-45d5-aca6-ffe6ab2cd7b1",roleId:"83694a7d-0c88-4782-87b3-a63166e28ec0",organizationName:"VenkatUnit",personName:"K, Leena",roleName:"ROLE_CHILD",organizationPathName:"Venkat - VenkatUnit",organizationPathIds:"983adc05-26a4-4bd5-97c6-efc12e2e6e0d - a3e8811f-683c-45e6-ae1e-e75b8103487d",organizationType:"sivi.organization.type.daycareplace.type.groupfamilydaycare"}]},{id:"7a9ac141-8ef6-4cee-bbf5-23879287492",lastName:"T",firstName:"Ko Ko",pin:"070293-5690",nickName:"Ko",age:30,roles:[{id:"ddfaae36-eddc-4eff-a3f7-3e645d2b831f",organizationId:"a3e8811f-683c-45e6-ae1e-e75b8103487d",personId:"7a9ac141-8ef6-4cee-bbf5-43775b6cff1e",roleId:"83694a7d-0c88-4782-87b3-a63166e28ec0",organizationName:"VenkatUnit",personName:"T, Ko Ko",roleName:"ROLE_GUARDIAN",organizationPathName:"Venkat - VenkatUnit",organizationPathIds:"983adc05-26a4-4bd5-97c6-efc12e2e6e0d - a3e8811f-683c-45e6-ae1e-e75b8103487d",organizationType:"sivi.organization.type.daycareplace.type.groupfamilydaycare"}]}]}static getB64Image(){return"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGYAAABGCAYAAAA+c+FUAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6ODg2MTI5QUMyNzY2MTFFMjkwOUM4NEM4QTZBMEEwQjIiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6ODg2MTI5QUQyNzY2MTFFMjkwOUM4NEM4QTZBMEEwQjIiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo4ODYxMjlBQTI3NjYxMUUyOTA5Qzg0QzhBNkEwQTBCMiIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo4ODYxMjlBQjI3NjYxMUUyOTA5Qzg0QzhBNkEwQTBCMiIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PlMNwIIAAAQZSURBVHja7JxNdtpADMcNjwOw7Ko1J0i66TZwgsANwgmAE0BPkOYEIScAThBYthvoCequ2iU3SKX35NepO/YIfzGGv96bZx4JHqGfNBppnLTe3t4CiH/ShgkABgIwAAMBGICBAAwEYAAGAjAAAwEYCMAADARgLkVaRW/w892nLl1ujbcOH35/O9b5JUgHnr9bhw51nV+1chhhSJc7Gv0EkKREbCAaOxpbMtShJAghXUwdug4dIkOHreL+D3QJ0+73/tfXpTdgxBis8MRhiMBhpDWNlzyQxGAThzNohHXYkA7LlHleBbhNtgRm4EWOIUUXdNnTmBeAEogXTvledM/nE4D0afygl88lQAkk2p4FgLfScazbZRnDBkmTux4lUq9OOmleSpdVwQgpuqF4rcgpmglGkvvqXApJPtufyym8BGMsX3kSe2QsU2GBSMkTqUfZAcbSvxgwOYyylN3NOmM5vJdkqwV1Sk5jEE+yDY5SIq8v2+ph0yLQjJi50oBcC4xtxjBFagYeM1keJ1meLL8zVEbHOM0hjPkjcR4eY40O3rVkxLummiihLzxwQbEYac2fo5cDY8lLyqMySnouKA4delLLNCJi5koo4yKTSRT1xHu11bYJZVC01SJONRJn9DtiFEvIoSiUpPcm3poolq9Bmf2vU6O+djDiva7EOKt4e+xK+LO6G6M+RMydK9lrmn8FxJWMo7S+1qXXMS5vfalYhxvHz9fKqDu5dUPAFz6D0STdKsXlGDvFPULlBiYp3oJpu8CUdY5SQLxO0lXvyrwVDxwDYFLyR/9awWwdhjl36717rWBc9UHVHutK7vfXCKYjhsmq/Lkq/1KhDq4cMqSodRWYvEH4bHn/LmjoEUBH6oSsBmLIvawKizxX8cpL2TRrayvtlYVlGV40FUxbvpTLax/lvKashD40jHpUFJETD3LdWXZlTwqvfS0Khz9PYxX837TUzL8q0zkaAUaWKVfU3AqcsECU7G35zDhUc1X3+2uJHLOO0XSQb8U4C633MhB5hmvl6DJo5g/FORaXHj0tS7LU9pzi3MC7uijuQEtB2A3+nrXbYGzlNDEJcRroTjLj+TnSN7but+gxz0r+9LmW5XNePIlpU4wfiHioeF4rmBrn9x5MO2VJOVt/Sk5Kl8GVS9timCONj+c0DuBkNDHFODNFyyaPHJVwRhXN31wwYhxuxZQZPVzM8jNhI2Xk8OaiV0H0HH2PSPUfLkn9Mg9Of6ox3r1t8jwPlph/Epz2ZGdSD969bViftN6bt7sypZH6ovyNQAplRDL4S38PKnqQQ4rMeP5QdIgLT3O+nehz0B64Wf5s8B+4BKaWjVEL/xOzgTkGAjAQgAEYCMAADARgAAYCMBCAARgIwAAMBGAgAAMwEIC5VPkjwACyWJQ2HR+hDwAAAABJRU5ErkJggg=="}static getSafeResourceUrlPNGImage(){return{changingThisBreaksApplicationSecurity:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGYAAABGCAYAAAA+c+FUAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6ODg2MTI5QUMyNzY2MTFFMjkwOUM4NEM4QTZBMEEwQjIiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6ODg2MTI5QUQyNzY2MTFFMjkwOUM4NEM4QTZBMEEwQjIiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo4ODYxMjlBQTI3NjYxMUUyOTA5Qzg0QzhBNkEwQTBCMiIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo4ODYxMjlBQjI3NjYxMUUyOTA5Qzg0QzhBNkEwQTBCMiIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PlMNwIIAAAQZSURBVHja7JxNdtpADMcNjwOw7Ko1J0i66TZwgsANwgmAE0BPkOYEIScAThBYthvoCequ2iU3SKX35NepO/YIfzGGv96bZx4JHqGfNBppnLTe3t4CiH/ShgkABgIwAAMBGICBAAwEYAAGAjAAAwEYCMAADARgLkVaRW/w892nLl1ujbcOH35/O9b5JUgHnr9bhw51nV+1chhhSJc7Gv0EkKREbCAaOxpbMtShJAghXUwdug4dIkOHreL+D3QJ0+73/tfXpTdgxBis8MRhiMBhpDWNlzyQxGAThzNohHXYkA7LlHleBbhNtgRm4EWOIUUXdNnTmBeAEogXTvledM/nE4D0afygl88lQAkk2p4FgLfScazbZRnDBkmTux4lUq9OOmleSpdVwQgpuqF4rcgpmglGkvvqXApJPtufyym8BGMsX3kSe2QsU2GBSMkTqUfZAcbSvxgwOYyylN3NOmM5vJdkqwV1Sk5jEE+yDY5SIq8v2+ph0yLQjJi50oBcC4xtxjBFagYeM1keJ1meLL8zVEbHOM0hjPkjcR4eY40O3rVkxLummiihLzxwQbEYac2fo5cDY8lLyqMySnouKA4delLLNCJi5koo4yKTSRT1xHu11bYJZVC01SJONRJn9DtiFEvIoSiUpPcm3poolq9Bmf2vU6O+djDiva7EOKt4e+xK+LO6G6M+RMydK9lrmn8FxJWMo7S+1qXXMS5vfalYhxvHz9fKqDu5dUPAFz6D0STdKsXlGDvFPULlBiYp3oJpu8CUdY5SQLxO0lXvyrwVDxwDYFLyR/9awWwdhjl36717rWBc9UHVHutK7vfXCKYjhsmq/Lkq/1KhDq4cMqSodRWYvEH4bHn/LmjoEUBH6oSsBmLIvawKizxX8cpL2TRrayvtlYVlGV40FUxbvpTLax/lvKashD40jHpUFJETD3LdWXZlTwqvfS0Khz9PYxX837TUzL8q0zkaAUaWKVfU3AqcsECU7G35zDhUc1X3+2uJHLOO0XSQb8U4C633MhB5hmvl6DJo5g/FORaXHj0tS7LU9pzi3MC7uijuQEtB2A3+nrXbYGzlNDEJcRroTjLj+TnSN7but+gxz0r+9LmW5XNePIlpU4wfiHioeF4rmBrn9x5MO2VJOVt/Sk5Kl8GVS9timCONj+c0DuBkNDHFODNFyyaPHJVwRhXN31wwYhxuxZQZPVzM8jNhI2Xk8OaiV0H0HH2PSPUfLkn9Mg9Of6ox3r1t8jwPlph/Epz2ZGdSD969bViftN6bt7sypZH6ovyNQAplRDL4S38PKnqQQ4rMeP5QdIgLT3O+nehz0B64Wf5s8B+4BKaWjVEL/xOzgTkGAjAQgAEYCMAADARgAAYCMBCAARgIwAAMBGAgAAMwEIC5VPkjwACyWJQ2HR+hDwAAAABJRU5ErkJggg=="}}static getFiles(){return[lh.getImageFile("test file picture 1"),lh.getTextFile("test file text 1"),lh.getImageFile("test picture 2"),lh.getExcelFile("test file excel 1"),lh.getImageFile("test picture 3")]}static getFilesTypes(){const s=[];for(const d of lh.getFiles())s.push(d.type);return s}static getTextFile(s){return new File(["some content of a text file"],s||"example.txt",{type:"text/plain"})}static getImageFile(s){return new File(["some image content would be here"],s||"example.png",{type:"image/png"})}static getPDFFile(s){return new File(["some pdf content would be here"],s||"example.pdf",{type:"application/pdf"})}static getExcelFile(s){return new File(["some content of excel binary"],s||"example.xlsx",{type:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"})}static getPlatformInformation(){return{deviceId:"chrome|mac|mac-os-x-99",deviceCategoryType:"core",deviceFullName:"Some fancy test device",osVersion:"mac",fcmToken:"",appVersion:"1",browser:"chrome"}}static getMockPageEvent(){return{pageIndex:1,pageSize:10,length:100}}static getMockedFormPeriodOptions(){return[{type:"SPECIAL_NEEDS_SUPPORT",periods:[{validFrom:"2000-11-03",validUntil:"2002-07-05"}]},{type:"SEVERELY_DISABLED",periods:[{validFrom:"2000-10-06",validUntil:"2002-05-08"},{validFrom:"2002-05-09",validUntil:"2004-05-08"}]}]}static getMockAttachmentFile(){return{size:0,type:null,text:null,arrayBuffer:null,slice:null,stream:null,relatedEntityId:""}}static mockModal(){return{present:(s=(0,o.Z)(function*(){}),function(){return s.apply(this,arguments)}),onDidDismiss:function(){var s=(0,o.Z)(function*(){});return function(){return s.apply(this,arguments)}}()};var s}}class nb{static getUnit(){return{id:"1",languages:["EN","ES"],oid:"",serviceFormat:"sivi.organization.type.daycareplace.format.private",serviceForm:"sivi.organization.type.daycareplace.type.daycarecentre",name:"Daycare Place Name",validFrom:"2020-02-21",validUntil:"",educationalSystem:"sivi.unit.code.type.educationalsystem.montessori",organizationalForm:"sivi.unit.code.type.organizationalform.municipalitypurchase",parent:{id:"58adb5f3-70f4-488f-92e7-2f7870d2e846",name:"Vantaa"},timeOptions:["sivi.municipality.settings.type.weeklycaretime.mon-fri-mornings","sivi.municipality.settings.type.weeklycaretime.mon-fri-evenings"],email:"primary@email.fi",secondaryEmail:"secondary@email.fi",phone:"23487293847",secondaryPhone:"23487293848",address:{street:"Pohjoisesplanadi 53",postalCode:"00210",city:"Helsinki"},postalAddress:{street:"Rauhankatu 75",postalCode:"00860",city:"Helsinki"},periods:[{id:"1",ececPlaces:"11",ppePlaces:"11",validFrom:"2021-01-01",validUntil:"2021-12-31",restEntityState:Ro.FUTURE,focuses:this.getFocuses()},{id:"2",ececPlaces:"22",ppePlaces:"22",validFrom:"2020-01-01",validUntil:"2020-12-31",restEntityState:Ro.CURRENT,focuses:this.getFocuses()},{id:"3",ececPlaces:"33",ppePlaces:"33",validFrom:"2019-01-01",validUntil:"2019-12-31",restEntityState:Ro.EXPIRED,focuses:this.getFocuses()}],abnormalPeriods:[{id:"2",validFrom:"2020-02-21",validUntil:"",ececPlaces:"100",ppePlaces:"100",restEntityState:Ro.CURRENT,focuses:this.getFocuses()},{id:"1",validFrom:"2019-02-21",validUntil:"2019-12-31",ececPlaces:"20",ppePlaces:"15",restEntityState:Ro.EXPIRED,focuses:this.getFocuses()}],unitLeaders:[this.getStaffInfo("leader1"),this.getStaffInfo("leader2"),this.getStaffInfo("leader3")],unitCounselors:[this.getStaffInfo("counselor1"),this.getStaffInfo("counselor2")],unitSupervisorId:null}}static getFocuses(){return[{id:"1",activity:"sivi.unit.code.type.activityfocus.music",language:"SV",languageExtent:"sivi.organization.languagefocus.extent.languageimmersion",validFrom:"2020-05-21",validUntil:"",ececPlaces:"11",ppePlaces:"11"},{id:"2",activity:"sivi.unit.code.type.activityfocus.science",language:"FI",languageExtent:"sivi.organization.languagefocus.extent.languageimmersion",validFrom:"2018-01-01",validUntil:"",ececPlaces:"22",ppePlaces:"22"},{id:"3",activity:"sivi.unit.code.type.activityfocus.science",language:"",languageExtent:"",validFrom:"2019-01-01",validUntil:"",ececPlaces:"33",ppePlaces:"33"},{id:"4",activity:"",language:"FI",languageExtent:"",validFrom:"2018-01-01",validUntil:"",ececPlaces:"44",ppePlaces:"44"}]}static getGroup(){return{name:"Group name",parent:{id:"1",name:"Parent daycare place"},validFrom:"2020-01-30",validUntil:"",ececPlaces:"10",ppePlaces:"5",focuses:["1","2"],phone:"111",secondaryPhone:"222",email:"email@email",secondaryEmail:"secondary@secondary"}}static getCodesActivityOptions(){return[{id:"1",name:"sivi.unit.code.type.activityfocus.music",value:"External code type activity focus",externalCodes:[{externalId:"TP01",externalValue:" ",description:"Music"}]},{id:"a",name:"sivi.unit.code.type.activityfocus.physicaleducation",value:"External code type activity focus",externalCodes:[{externalId:"TP02",externalValue:" ",description:"Physical education"}]}]}static getMainOrganizationTypesWithChildCodes(){return[{id:"id-1",name:"ecec centres",childCodes:[{id:"id-1-1",name:"Kourula"},{id:"id-1-2",name:"Sammonlahti"},{id:"id-1-3",name:"Voisalmi"}]},{id:"id-2",name:"schools",childCodes:[{id:"id-2-1",name:"Myllym\xe4ki"},{id:"id-2-2",name:"Armilan koulu"},{id:"id-2-3",name:"Hytin kyl\xe4koulu"}]}]}static getStaffInfo(s){return{firstName:"name-"+s,lastName:"lastname-"+s,phoneWork:"phoneWork"+s,emailWork:"emailWork"+s}}static getOrganizations(){return[{id:"123",name:"Example Organization"},{id:"200",name:"Testing Organization"},{id:"201",name:"Another Organization"}]}static getDaycarePlaces(){return[this.createDaycarePlace("daycarePlace-id-1","daycare place 1"),this.createDaycarePlace("daycarePlace-id-2","daycare place 2"),this.createDaycarePlace("daycarePlace-id-3","daycare place 3"),this.createEducationGroup("daycarePlace-id-4","daycare place 4",Fo.DAYCAREPLACE_TYPE_FAMILY_DAYCARE),this.createEducationGroup("daycarePlace-id-5","daycare place 5",Fo.DAYCAREPLACE_TYPE_GROUP_FAMILY_DAYCARE)]}static createDaycarePlace(s,d){const k=new zm;return k.id=s,k.organizationId=s,k.name=d,k.organizationType=Fo.DAYCAREPLACE,k.parent=this.createMunicipality("municipality-3","municipality 3"),k.area="1234",k.areaName="area name",k}static createMunicipality(s,d){const k=new um;return k.id=s,k.businessId="",k.municipalityNumber="",k.ececIbanNumber="",k.name=d,k.organizationType=Fo.MUNICIPALITY,k.updatedDate="2020-02-20T20:02:20.202020Z",k}static createEducationGroup(s,d,k){const ie=new J_;return ie.id=s,ie.name=d,ie.type=k,ie.parent=this.createDaycarePlace("daycarePlace-id-3","daycare place 3"),ie}static getMunicipalities(){return[this.createMunicipality("municipality-1","municipality 1"),this.createMunicipality("municipality-2","municipality 2"),this.createMunicipality("municipality-3","municipality 3")]}static getEducationGroups(){const s=Fo.SCHOOL_TYPE_SCHOOL;return[this.createEducationGroup("education-group-id-1","education group 1",s),this.createEducationGroup("education-group-id-2","education group 2",s),this.createEducationGroup("education-group-id-3","education group 3",s)]}static getUnitTypes(){return[Fo.DAYCAREPLACE,Fo.DAYCAREPLACE_TYPE_DAYCARE_CENTRE,Fo.DAYCAREPLACE_TYPE_FAMILY_DAYCARE,Fo.DAYCAREPLACE_TYPE_GROUP_FAMILY_DAYCARE,Fo.DAYCAREPLACE_TYPE_OPEN_DAYCARE]}static getGroupTypes(){return[Fo.DAYCAREPLACE_GROUP,Fo.DAYCAREPLACE_GROUP_REGULAR,Fo.DAYCAREPLACE_GROUP_PRESCHOOL]}static getOrganizationTreeForMunicipality(){return{id:"4e4580d0-e008-484f-a238-48172029d7b0",name:"organization tree",restEntityState:Ro.CURRENT,childOrganizations:[{name:"sivi.organization.type.municipalityarea.usage.early-childhood-education",childOrganizations:[{id:"759fecf7-567b-4652-8848-dd39212f52c5",restEntityState:"CURRENT",name:"3131 test",type:"sivi.organization.type.area-department"},{id:"b96f54d5-f08d-4cf0-b90d-3b1176438e6a",name:"3193 test",childOrganizations:[{id:"45182f35-b0d4-47ee-a85f-bae32603ff71",name:"Multiple GroupPeriods",type:"sivi.organization.type.daycareplace.group.regular"}],type:"sivi.organization.type.daycareplace.type.daycarecentre"}]}],type:"sivi.organization.type.municipality"}}static getMunicipality(){return{id:"56694857-9ef8-45c3-b09a-4bb8a227f74c",name:"005 Alaj\xe4rvi",organizationType:"sivi.organization.type.municipality",organizationPath:"76e3584f-8fb9-4a9a-b185-8b385bbf0428",organizationContacts:[{id:"2797989a-9f76-4492-96dc-9f0c81cdbf30",organization:{id:"56694857-9ef8-45c3-b09a-4bb8a227f74c"},contact:{id:"860b56da-32dc-4598-89c4-9b50b1e958ab",contactTypeDescription:"contact-common",contactTypeCode:"sivi.contact.type.ecec.email",value:"005@vesa.fi"},primary:!1},{id:"1319a472-66ea-4140-983e-3e2187a4b17e",organization:{id:"56694857-9ef8-45c3-b09a-4bb8a227f74c"},contact:{id:"e185f1d1-d180-4e54-892c-878499abf3b3",contactTypeDescription:"contact-common",contactTypeCode:"sivi.contact.type.ecec.phone",value:"989898"},primary:!1},{id:"2797989a-9f76-4492-343-01010101010101",organization:{id:"56694857-9ef8-45c3-b09a-01010101010101"},contact:{id:"860b56da-32dc-4598-89c4-01010101010101",contactTypeDescription:"contact-common",contactTypeCode:us.MUNICIPALITY_ACCESSIBILITY_EMAIL,value:"006@accessibilityemailvesa.fi"},primary:!1}],organizationAddresses:[{id:"6768ab15-2128-4bd4-8b54-3e8119e97bc8",organization:{id:"56694857-9ef8-45c3-b09a-4bb8a227f74c"},address:{id:"a43fdbf2-206d-4616-87bd-15e89dad0514",addressTypeCode:"sivi.contact.type.address",street:"OM layout",postalCode:"56004",city:"BLR"},primary:!0},{id:"4430969c-161f-4f3b-a8bc-57941981ec65",organization:{id:"56694857-9ef8-45c3-b09a-4bb8a227f74c"},address:{id:"0fde4e6e-6a30-4a6a-ba42-243331f9780d",addressTypeCode:"sivi.contact.type.postal.address",street:"Green park layout",postalCode:"56005",city:"BLR"},primary:!0}],businessId:"1234500-5",municipalityNumber:"005",ececIbanNumber:"00512345",resources:[{id:"8a9a2a66-92ad-4fac-a872-e7319ac8c7b8",name:"Alaj\xe4rvi.vaakuna.png",relatedEntities:[{entityId:"56694857-9ef8-45c3-b09a-4bb8a227f74c",primary:!1}],documentType:"PICTURE"}]}}static getTreeNode(){return{id:"4e4580d0-e008-484f-a238-48172029d7b0",name:"treenode first element",restEntityState:"CURRENT",canAddPersonToRole:!0,type:Fo.MUNICIPALITY,children:[{id:"first-child",name:"Devs",restEntityState:"CURRENT",type:Fo.ORGANIZATION_TYPE_GENERAL,canAddPersonToRole:!0,children:[{id:"759fecf7-567b-4652-8848-dd39212f52c5",name:"3131 test",type:"sivi.organization.type.daycareplace.type.familydaycare",restEntityState:"CURRENT",path:"4e4580d0-e008-484f-a238-48172029d7b0->759fecf7-567b-4652-8848-dd39212f52c5",canAddPersonToRole:!0},{id:"b96f54d5-f08d-4cf0-b90d-3b1176438e6a",name:"3193 test",canAddPersonToRole:!1,children:[{id:"45182f35-b0d4-47ee-a85f-bae32603ff71",name:"Multiple GroupPeriods",type:"sivi.organization.type.daycareplace.group.regular",restEntityState:"EXPIRED",canAddPersonToRole:!1,path:"4e4580d0-e008-484f-a238-48172029d7b0->b96f54d5-f08d-4cf0-b90d-3b1176438e6a->45182f35-b0d4-47ee-a85f-bae32603ff71"}],type:"sivi.organization.type.daycareplace.type.daycarecentre",restEntityState:"CURRENT",path:"4e4580d0-e008-484f-a238-48172029d7b0->b96f54d5-f08d-4cf0-b90d-3b1176438e6a"}]},{id:"some-area",name:"Area",type:Fo.ORGANIZATION_TYPE_AREA,restEntityState:"CURRENT",path:"4e4580d0-e008-484f-a238-48172029d7b0->some-area"}]}}static getJobPositionTitles(){return{name:"sivi.professional.position-title.ecec",value:"Position Title for ECEC",childCodes:[{name:"sivi.professional.position-title.ecec.director",value:"Director of early childhood education and care"},{name:"sivi.professional.position-title.ecec.head",value:"Head of early childhood education and care"},{name:"sivi.professional.position-title.ecec.manager",value:"Manager of day care centre"},{name:"sivi.professional.position-title.ecec.teacher",value:"Teacher of early childhood education and care"},{name:"sivi.professional.position-title.ecec.service-advisor",value:"Service advisor of early childhood education and care"}]}}static getAllActiveRoles(){return[{id:"1",personId:"1234-4321",roleId:"role-1234",organizationId:"org-1234",roleName:"TEACHER",organizationName:"SCHOOL",validFrom:"1994-10-05T00:00:00.000Z",validUntil:"2018-10-11T00:00:00.000Z",restEntityState:"CURRENT",restOrganization:{}}]}static getAllHistoryRoles(){return[{id:"3",personId:"1234-4321",roleId:"role-1234",organizationId:"org-1234",roleName:"TEACHER",organizationName:"SCHOOL",validFrom:"1994-10-05T00:00:00.000Z",validUntil:"2018-10-11T00:00:00.000Z",restEntityState:"EXPIRED",restOrganization:{}}]}static getAllRoles(){return[{id:"1",personId:"1234-4321",roleId:"role-1234",organizationId:"org-1234",roleName:Lt.DCP_TEACHER,organizationName:"SCHOOL",validFrom:"1994-10-05T00:00:00.000Z",validUntil:"2018-12-30T00:00:00.000Z",restEntityState:"CURRENT",restOrganization:{}},{id:"2",personId:"5432-5432",roleId:"role-5432",organizationId:"org-5432",roleName:Lt.ORGANIZATION_MEMBER,organizationName:"SCHOOL",validFrom:"1994-10-05T00:00:00.000Z",validUntil:"2018-12-30T00:00:00.000Z",restEntityState:"CURRENT",restOrganization:{}}]}static getAllFutureRoles(){return[{id:"2",personId:"1234-4321",roleId:"role-1234",organizationId:"org-1234",roleName:"TEACHER",organizationName:"SCHOOL",validFrom:"1994-10-05T00:00:00.000Z",validUntil:"2018-10-11T00:00:00.000Z",restEntityState:"FUTURE",restOrganization:{}}]}}class R1{static getApplicationChildInformation(){return{firstNames:"Aapo Miko",lastName:"Aapinen",fullName:"Aapo Miko Aapinen",preferredFirstName:"Aapo",nickName:"Monkey",birthday:"2019-06-19",pin:"190619A999A",id:"any",prc:!0,address:this.getApplicationContactAddress(),nonDisclosureContact:"",contactAddress:this.getApplicationContactAddress(),motherTongue:"fi",otherLanguages:["es","kl"],residence:{},placeOfDomicile:"092",additionalInformation:"Nothing special",nonDisclosure:"",needsECEC:!1}}static getEcecFormPayLoad(){return[{state:"DRAFT",applicationPeople:[{applicationPerson:{id:"12345",lastName:"Person",firstName:"Person",pin:"123",ppePlaces:[],guardians:[],personLanguages:[],sameAddressAsApplicant:!1,nickName:"test",preferredFirstName:"test"},role:"ANOTHERGUARDIAN",pin:"123"}],description:"",restApplicationPlaces:[{organizationId:"a",preferenceChoice:1},{organizationId:"b",preferenceChoice:2}],restApplicationServiceForm:{types:[{type:"sivi.organization.type.daycareplace.type.familydaycare"}],formats:[{organizationFormat:"sivi.organization.type.daycareplace.format.public"}]},restApplicationMunicipality:{municipalityId:"1",restApplicationAreas:[{areaId:"a",preferenceChoice:1},{areaId:"b",preferenceChoice:2}]}},{state:"DRAFT",applicationPeople:[{applicationPerson:{id:"12345",lastName:"Person",firstName:"Person",pin:"123",ppePlaces:[],guardians:[],personLanguages:[],sameAddressAsApplicant:!1,nickName:"test",preferredFirstName:"test"},role:"ANOTHERGUARDIAN",pin:"123"}],description:"",restApplicationPlaces:[{organizationId:"a",preferenceChoice:1},{organizationId:"b",preferenceChoice:2}],restApplicationServiceForm:{},restApplicationMunicipality:{municipalityId:"1",restApplicationAreas:[{areaId:"a",preferenceChoice:1}]}},{state:"DRAFT",applicationPeople:[{applicationPerson:{id:"12345",lastName:"Person",firstName:"Person",pin:"123",ppePlaces:[],guardians:[],personLanguages:[],sameAddressAsApplicant:!1,nickName:"test",preferredFirstName:"test"},role:"ANOTHERGUARDIAN",pin:"123"}],description:"",restApplicationPlaces:[],restApplicationServiceForm:{},restApplicationMunicipality:{municipalityId:"1",restApplicationAreas:[]}},{state:"DRAFT",applicationPeople:[{applicationPerson:{id:null,lastName:"Person",firstName:"Person",pin:"123",ppePlaces:[],guardians:[],personLanguages:[],sameAddressAsApplicant:!1,nickName:"test",preferredFirstName:"test"},role:"ANOTHERGUARDIAN",pin:"123"}],description:"",restApplicationPlaces:[{organizationId:"a",preferenceChoice:1},{organizationId:"b",preferenceChoice:2}],restApplicationServiceForm:{types:[{type:"sivi.organization.type.daycareplace.type.familydaycare"}],formats:[{organizationFormat:"sivi.organization.type.daycareplace.format.public"}]},restApplicationMunicipality:{municipalityId:"1",restApplicationAreas:[{areaId:"a",preferenceChoice:1},{areaId:"b",preferenceChoice:2}]}}]}static overwriteApplicationRole(s,d){return d.applicationPeople[0].role=s,d}static getFullApplication(){const s=this.overwriteApplicationRole("APPLICANT",this.getEcecFormPayLoad()[0]),d=this.overwriteApplicationRole("TARGETCHILD",this.getEcecFormPayLoad()[0]),k=this.getEcecFormPayLoad()[0];return s.applicationPeople.push(d.applicationPeople[0]),s.applicationPeople.push(k.applicationPeople[0]),s}static getFullApplicationWithId(){const s=this.getFullApplication();return s.id="111",s.restApplicationMunicipality=this.getApplicationMunicipality(),s.restApplicationServiceForm=this.getRestServiceForm(),s}static getApplicationOnlyWithApplicant(){const s=this.overwriteApplicationRole("APPLICANT",this.getEcecFormPayLoad()[0]);return s.id="111",s}static getApplicationMunicipality(){return{id:"aaa-aaa",municipalityId:"000",restApplicationAreas:[{id:"bbb-bbb",areaId:"111",preferenceChoice:1},{id:"ccc-ccc",areaId:"222",preferenceChoice:1}]}}static getRestServiceForm(){return{types:[{type:"sivi.organization.type.daycareplace.type.familydaycare"}],formats:[{organizationFormat:"sivi.organization.type.daycareplace.format.public"}]}}static getAllDraftsData(){return[{id:"1",createTime:"2018-08-24T11:39:38.486Z"},{id:"2",createTime:"2018-08-24T11:39:38.486Z"},{id:"3",createTime:"2018-08-24T11:39:38.486Z"}]}static getAllDraftsForTargetChild(){return{content:[{createTime:"2018-08-24T11:39:38.486Z"},{createTime:"2018-08-24T11:39:38.486Z"},{createTime:"2018-08-24T11:39:38.486Z"},{createTime:"2018-08-24T11:39:38.486Z"}],totalElements:15}}static getFormWithData(){const s={firstName:"Person",lastName:"Person",pin:"123",street:"street",postalCode:"12345",city:"City",phone:"12345678",email:"email@email.com"};return s}static getMunicipalites(){return{content:[{id:"444",name:"municipality 444"},{id:"555",name:"municipality 555"}]}}static getAreas(){return{content:[{id:"444",name:"area 444"},{id:"555",name:"area 555"}]}}static getApplicationChildBasicInfo(){return{firstName:"firstName",lastName:"lastName",nickName:"Child",prc:!1,address:[{address:{addressTypeCode:"sivi.contact.type.address",city:"India",id:"1889574a-d55a-4c77-95f2-80ea1a087970",postalCode:"67687",street:"Banglaore"}}],personLanguages:[{languageCode:"fi",languageType:"sivi.person.language.type.mother-tongue"},{languageCode:"sv",languageType:"sivi.person.language.type.spoken-at-home"}],ececInfos:[{infoType:"sivi.ecec.start-date",value:""},{infoType:"sivi.ecec.reasons",value:""},{infoType:"sivi.ecec.for-the-nonce",value:""},{infoType:"sivi.ecec.end-date",value:""}]}}static getApplicationContactAddress(){return{name:"Ary",streetAddress:"Sep\xe4nkatu 11 A 3",zipcode:"70100",postOffice:"KUOPIO"}}static getPRCPerson(){return{firstName:"Applicant",lastName:"Suomalainen",language:"fi",dependents:[this.getPRCDependent("1"),this.getPRCDependent("2")],personAddresses:{domesticAddresses:[this.getPRCAddress()]}}}static getApplicationGuardians(){return[{firstName:"Esteri Klaus",lastName:"Klusteri",preferredFirstName:"Esteri",address:[{address:{addressTypeCode:"sivi.contact.type.address",city:"India",id:"1889574a-d55a-4c77-95f2-80ea1a087970",postalCode:"67687",street:"Banglaore"}}],personLanguages:[{languageCode:"fi",languageType:" sivi.person.language.type.communication-language"}],contacts:[{contact:{contactTypeCode:"sivi.contact.type.email",value:"test@test.com"}},{contact:{contactTypeCode:"sivi.contact.type.phone",value:"12345678"}}]},{firstName:"Jakob Beast",lastName:"Lapio",preferredFirstName:"Beast",pin:"101082-12X",personLanguages:[{languageCode:"fi",languageType:"  sivi.person.language.type.communication-language"}],contacts:[{contact:{contactTypeCode:"sivi.contact.type.email",value:""}},{contact:{contactTypeCode:"sivi.contact.type.phone",value:""}}]}]}static getPRCDependent(s){return{pin:s}}static getPRCAddress(){return{postOffice:"VANTAA",streetAddress:"Applicant Address 1",zipcode:"00222"}}static getPPEApplication(){return{id:"4f86f917-8ab7-406d-a736-29649e0d0751",state:Je.DRAFT,nonce:!0,homeMunicipalityName:"Vantaa",endDate:"",fullTime:!0,municipalityId:"58adb5f3-70f4-488f-92e7-2f7870d2e846",municipalityName:"",child:{id:"8dec1b5b-cf22-4a6b-adbf-d9cd0ed26646",pin:"010113A951F",prc:!0,firstNames:"Tom Emil",lastName:"Bergvall Tes",fullName:"Tom Emil Bergvall Tes",preferredFirstName:"Emil",nickName:"tomppa",birthday:"2013-01-01",address:{streetAddress:"Kasarminkatu 29 as 3",zipcode:"65100",postOffice:"VAASA",latitude:21.623642,longitude:63.093122},motherTongue:"sv",otherLanguages:["fi"],placeOfDomicile:"Vaasa",residence:{value:"",info:""}},guardians:[{id:"6ed41b16-4379-4dee-9757-370c324273a6",pin:"231278-952B",prc:!0,primary:!0,firstNames:"Siv Marie",lastName:"Rasmussen Tes",preferredFirstName:"Siv",address:{streetAddress:"Kasarminkatu 29 as 3",zipcode:"65100",postOffice:"VAASA",latitude:21.623642},motherTongue:"no",otherLanguages:[],phone:"12343243",nonDisclosureContact:""}],preferredLocation:{streetAddress:"Kasarminkatu 29 as 3",zipcode:"65100",postOffice:"VAASA",latitude:21.623642,longitude:63.093122},selectedUnits:[{id:"6bcf73d5-2865-4808-b84d-244675083d35",name:"Test name 1",organizationType:"sivi.organization.type.daycareplace.type.daycarecentre",organizationFormat:"sivi.organization.type.daycareplace.format.public",preferenceChoice:0},{id:"3c84ae25-1378-4358-8818-2641816b3baa",name:"Test name 2",organizationType:"sivi.organization.type.daycareplace.type.opendaycare",organizationFormat:"sivi.organization.type.daycareplace.format.public",preferenceChoice:1},{id:"800be25e-efa2-4209-b285-1ecac0d62046",name:"Test name 3",organizationType:"sivi.organization.type.daycareplace.type.opendaycare",organizationFormat:"sivi.organization.type.daycareplace.format.public",preferenceChoice:2}],type:N.PPE,desiredStartDate:"2020-08-13",preferredLanguages:["fi"],createdBy:"6ed41b16-4379-4dee-9757-370c324273a6",createdDate:"2020-01-22T11:30:47.052123+02:00",updatedDate:"2020-01-22T11:59:06.872683+02:00",childNeedsECEC:!1,specialNeeds:{value:"no"},siblingsAtSameUnit:!0}}static getECECApplication(){return{id:"4f86f917-8ab7-406d-a736-29649e0d0751",state:Je.DRAFT,nonce:!0,homeMunicipalityName:"Vantaa",endDate:"",municipalityId:"58adb5f3-70f4-488f-92e7-2f7870d2e846",municipalityName:"",child:{id:"8dec1b5b-cf22-4a6b-adbf-d9cd0ed26646",pin:"010113A951F",prc:!0,firstNames:"Tom Emil",lastName:"Bergvall Tes",preferredFirstName:"Emil",nickName:"tomppa",birthday:"2013-01-01",address:{streetAddress:"Kasarminkatu 29 as 3",zipcode:"65100",postOffice:"VAASA",latitude:21.623642,longitude:63.093122},motherTongue:"sv",otherLanguages:[],placeOfDomicile:"Vaasa",residence:{value:"",info:""}},guardians:[{id:"6ed41b16-4379-4dee-9757-370c324273a6",pin:"231278-952B",prc:!0,primary:!0,firstNames:"Siv Marie",lastName:"Rasmussen Tes",preferredFirstName:"Siv",address:{streetAddress:"Kasarminkatu 29 as 3",zipcode:"65100",postOffice:"VAASA",latitude:21.623642,longitude:63.093122},motherTongue:"no",otherLanguages:[],phone:"12343243",nonDisclosureContact:""}],preferredLocation:{streetAddress:"Kasarminkatu 29 as 3",zipcode:"65100",postOffice:"VAASA",latitude:21.623642,longitude:63.093122},selectedUnits:[{id:"6bcf73d5-2865-4808-b84d-244675083d35",name:"Test name 1",organizationType:"sivi.organization.type.daycareplace.type.daycarecentre",organizationFormat:"sivi.organization.type.daycareplace.format.public",preferenceChoice:0},{id:"3c84ae25-1378-4358-8818-2641816b3baa",name:"Test name 2",organizationType:"sivi.organization.type.daycareplace.type.daycarecentre",organizationFormat:"sivi.organization.type.daycareplace.format.public",preferenceChoice:1},{id:"800be25e-efa2-4209-b285-1ecac0d62046",name:"Test name 3",organizationType:"sivi.organization.type.daycareplace.type.daycarecentre",organizationFormat:"sivi.organization.type.daycareplace.format.public",preferenceChoice:2}],type:N.ECEC,desiredStartDate:"2020-08-13",preferredLanguages:["fi, sv"],weeklyCareNeedOption:!0,dailyCareNeedOption:!0,weeklyHoursOption:"1",ececDesiredStartDate:"2020-08-13",createdBy:"6ed41b16-4379-4dee-9757-370c324273a6",currentUnit:"1",quickHandlingReason:"3",siblingsAtSameUnit:!0,childNeedsECEC:!1,specialNeeds:{value:"no"}}}static getClubApplication(){return{id:"4f86f917-8ab7-406d-a736-29649e0d0751",state:Je.DRAFT,nonce:!0,homeMunicipalityName:"Vantaa",endDate:"",fullTime:!0,municipalityId:"58adb5f3-70f4-488f-92e7-2f7870d2e846",municipalityName:"",child:{id:"8dec1b5b-cf22-4a6b-adbf-d9cd0ed26646",pin:"010113A951F",prc:!0,firstNames:"Tom Emil",lastName:"Bergvall Tes",fullName:"Tom Emil Bergvall Tes",preferredFirstName:"Emil",nickName:"tomppa",birthday:"2013-01-01",address:{streetAddress:"Kasarminkatu 29 as 3",zipcode:"65100",postOffice:"VAASA",latitude:21.623642,longitude:63.093122},motherTongue:"sv",otherLanguages:["fi"],placeOfDomicile:"Vaasa",residence:{value:"",info:""}},guardians:[{id:"6ed41b16-4379-4dee-9757-370c324273a6",pin:"231278-952B",prc:!0,primary:!0,firstNames:"Siv Marie",lastName:"Rasmussen Tes",preferredFirstName:"Siv",address:{streetAddress:"Kasarminkatu 29 as 3",zipcode:"65100",postOffice:"VAASA",latitude:21.623642},motherTongue:"no",otherLanguages:[],phone:"12343243",nonDisclosureContact:""},{id:"secondary guardian",prc:!1,primary:!1,firstNames:"Guardian",lastName:"Guardiano",preferredFirstName:"Guardian",address:{streetAddress:"Kasarminkatu 29 as 3",zipcode:"65100",postOffice:"VAASA",latitude:21.623642},motherTongue:"no",otherLanguages:[],phone:"12343243",nonDisclosureContact:""}],preferredLocation:{streetAddress:"Kasarminkatu 29 as 3",zipcode:"65100",postOffice:"VAASA",latitude:21.623642,longitude:63.093122},selectedUnits:[{id:"6bcf73d5-2865-4808-b84d-244675083d35",name:"Test name 1",organizationType:"sivi.organization.type.daycareplace.type.daycarecentre",organizationFormat:"sivi.organization.type.daycareplace.format.public",preferenceChoice:0},{id:"3c84ae25-1378-4358-8818-2641816b3baa",name:"Test name 2",organizationType:"sivi.organization.type.daycareplace.type.opendaycare",organizationFormat:"sivi.organization.type.daycareplace.format.public",preferenceChoice:1},{id:"800be25e-efa2-4209-b285-1ecac0d62046",name:"Test name 3",organizationType:"sivi.organization.type.daycareplace.type.opendaycare",organizationFormat:"sivi.organization.type.daycareplace.format.public",preferenceChoice:2}],type:N.CLUB,desiredStartDate:"2020-08-13",preferredLanguages:["fi"],createdBy:"6ed41b16-4379-4dee-9757-370c324273a6",createdDate:"2020-01-22T11:30:47.052123+02:00",updatedDate:"2020-01-22T11:59:06.872683+02:00",childNeedsECEC:!1,specialNeeds:{value:"no"},siblingsAtSameUnit:!0}}}class sx{static getNewChild(){return{addressPermanent:{city:"lappeenranta",postalCode:"12345",street:"valtakatu 40"},addressPostal:{city:"postal address city",postalCode:"postal address postal code",street:"postal address street"},addressToBeUsed:{city:"address to be used city",postalCode:"address to be used postal code",street:"address to be used street"},oid:"some-oid",birthday:"2019-12-31",childLives:ud.ELSEWHERE,childLivesDescription:"Lives somewhere",firstNames:"LTC Company",homeMunicipalityNumber:"082",lastName:"Otso",motherTongue:"FI",nickName:"Otsito",nonDisclosure:!1,nonDisclosureContact:"",otherLanguages:["ES","LA"],pin:"",prc:!1,preferredFirstName:"LTC",specialNeeds:!0,specialNeedsDescription:"Money",guardians:[{firstNames:"firstName",guardianType:ql.RESIDENT_TYPE,homeMunicipalityNumber:"090",id:"string",lastName:"lastName",nonDisclosure:!1,nonDisclosureContact:"",phone:"phone",pin:"pin",prc:!0,prcGuardianRelation:!0,preferredFirstName:"preferredFirstName",addressPermanent:{city:"addressPermanentcity",postalCode:"addressPermanentpostalCode",street:"addressPermanentstreet"},addressPostal:{city:"addressPostalcity",postalCode:"addressPostalpostalCode",street:"addressPostalstreet"},addressToBeUsed:{city:"addressToBeUsedcity",postalCode:"addressToBeUsedpostalCode",street:"addressToBeUsedstreet"},birthday:"birthday",communicationsLanguage:"PL",email:"email",employments:[{type:"sivi.person.employmentinfo.type.job-applicant",checked:!0,fullTime:!1},{type:"sivi.person.employmentinfo.type.employee-or-entrepreneur",fullTime:!0,description:"The job",checked:!0},{type:"sivi.person.employmentinfo.type.student",fullTime:!0,description:"The studies",checked:!0},{type:"sivi.person.employmentinfo.type.other",description:"Other work",checked:!0,fullTime:!0}]}]}}static getChild(){return{id:"41a78ddf-750d-4baa-be0f-de7eea425ad7",lastName:"Haapakoski",firstName:"Ella Josefiina",pin:"030919A950R",nickName:"EJ",language:"sv",guardians:[{id:"dc404281-afbe-429b-9d9c-6c47918968f8",lastName:"Haapakoski",firstName:"Sini Kukka-Maaria",pin:"200596-998W",age:24,contacts:[{id:"b85bc94a-d744-45d7-8b3a-ac8664e890eb",contact:{id:"539c05d2-8aa4-4a3f-ad42-4a066a6d9b48",contactTypeCode:us.PHONE_TYPE,value:"56489125888"}},{id:"b85bc94a-d744-45d7-8b3a-ac8664e890eb",contact:{id:"539c05d2-8aa4-4a3f-ad42-4a066a6d9b48",contactTypeCode:us.EMAIL_TYPE,value:"some email"}}],address:[{address:{addressTypeCode:us.ADDRESS_PERMANENT,street:"Kauppa Puistikko 6 A 17",postalCode:"65100",city:"VAASA"}}],prc:!0,preferredFirstName:"Sini",personLanguages:[{languageCode:"fi",languageType:"sivi.person.language.type.mother-tongue"},{languageCode:"sv",languageType:"sivi.person.language.type.communication-language"}],relations:[{addedManually:!1,relationType:ql.RESIDENT_TYPE}],placeOfDomicile:"Varkaus",homeMunicipalityNumber:"915"},{id:"a1b98895-c1d7-4ff9-bb46-66fc691817ed",lastName:"M\xe4enp\xe4\xe4",firstName:"Pihla Lena",pin:"260987-998N",age:33,contacts:[{contact:{contactTypeCode:"sivi.contact.type.email",value:"oasdoais@mail.com"}},{contact:{contactTypeCode:"sivi.contact.type.phone",value:"55566555"}}],address:[{address:{addressTypeCode:us.ADDRESS_PERMANENT,street:"Kauppa Puistikko 6 A 17",postalCode:"65100",city:"VAASA"}}],prc:!0,preferredFirstName:"Pihla",dateOfBirth:"1987-09-26",relations:[{addedManually:!1,relationType:ql.RESIDENT_TYPE}],personLanguages:[{languageCode:"fi",languageType:"sivi.person.language.type.mother-tongue"},{languageCode:"fi",languageType:"sivi.person.language.type.communication-language"}],personEmployment:[{type:"sivi.person.employmentinfo.type.job-applicant",checked:!0,fullTime:!0,description:"",id:"whatever"},{type:"sivi.person.employmentinfo.type.employee-or-entrepreneur",fullTime:!0,description:"The job",checked:!0},{type:"sivi.person.employmentinfo.type.student",fullTime:!0,description:"The studies",checked:!0},{type:"sivi.person.employmentinfo.type.other",description:"Other work",checked:!0,fullTime:!0,id:"whatever"}],placeOfDomicile:"Vaasa",homeMunicipalityNumber:"905"}],personInfos:[{infoType:"sivi.person.info.type.medicine-or-theraphy",value:!0,info:"l\xe4\xe4kityst\xe4"},{infoType:"sivi.person.info.child.resides",value:"sivi.person.info.child.resides.type.with-one-guardian",info:"info"}],address:[{address:{addressTypeCode:us.ADDRESS_PERMANENT,street:"Iso Haukka Linnun Kuja 1 I 36",postalCode:"78850",city:"VARKAUS"}},{address:{addressTypeCode:us.ADDRESS_TYPE,street:"Contact street",postalCode:"contact postal code",city:"contact city"}}],prc:!0,preferredFirstName:"Josefiina",dateOfBirth:"2019-09-03",personLanguages:[{languageCode:"sv",languageType:"sivi.person.language.type.mother-tongue"},{languageCode:"en",languageType:"sivi.person.language.type.spoken-at-home"},{languageCode:"es",languageType:"sivi.person.language.type.spoken-at-home"}],placeOfDomicile:"Varkaus",homeMunicipalityNumber:"915"}}}class BE{static getCompleteUser(){return{address:this.getAddresses(),contacts:this.getContacts(),firstName:"Mister",lastName:"Potato",id:"1",info:"Some user info",language:"fi",nickName:"Patata",phone:"+358401234567",pin:"120315+123A"}}static getContacts(){return[{contact:{contactTypeDescription:"email",contactTypeCode:"sivi.contact.type.email",value:"potato@potato.com"},primary:!0,person:{id:""},id:void 0,tempId:"tempContactId1"},{contact:{contactTypeDescription:"phone",contactTypeCode:"sivi.contact.type.phone",value:"+358401234567"},primary:!0,person:{id:""},id:"contactId"},{contact:{contactTypeDescription:"phone",contactTypeCode:"sivi.contact.type.phone",value:"+358401234566"},primary:!1,person:{id:""},id:void 0,tempId:"tempContactId2"},{contact:{contactTypeDescription:"phone",contactTypeCode:"sivi.contact.type.phone",value:"+358401234567"},primary:!1,person:{id:""},id:"contactId3"}]}static getAddresses(){return[{address:{id:"123",addressTypeCode:"1",addressTypeDescription:"main",city:"sevilla",postalCode:"41000",street:"palmeras"},person:{id:""},primary:!0,id:void 0,tempId:"tempAddressId1"},{address:{id:"123",addressTypeCode:"2",addressTypeDescription:"secondary",city:"lappeenranta",postalCode:"53100",street:"kauppakatu"},person:{id:""},id:"addressId"},{address:{id:"123",addressTypeCode:"2",addressTypeDescription:"secondary",city:"lappeenranta",postalCode:"53100",street:"kauppakatu"},person:{id:""},id:void 0,tempId:"tempAddressId2"}]}static getBasicAddresses(){return[{name:"Ary",id:"123",addressTypeCode:"1",addressTypeDescription:"main",city:"sevilla",postalCode:"41000",street:"palmeras"}]}static getPersonInfos(){return[this.getPersonInfo(ud.MAIN_TYPE,ud.ELSEWHERE,"hostel"),this.getPersonInfo(Vp.PETS_AT_HOME,Ro.YES,"dog"),this.getPersonInfo(Vp.MEDICINE_OR_THERAPHY,Ro.NO),this.getPersonInfo(Vp.PLACE_OF_DOMICILE,"NALAPAD")]}static getPersonInfo(s,d,k){return{infoType:s,value:d,info:k}}static getUserInfo(){return{id:"gjh23",firstName:"john",lastName:"Michel",pin:"123",roles:[{roleId:"xxxx",roleName:Fo.DAYCAREPLACE_GROUP_REGULAR,id:"2bfbd181-4c11-4296-b200-59e7f2c5551a",organizationId:"540d39da-1aff-45a7-9b76-6632f683b214",organizationPathIds:"167e6ffb-d669-4ab0-9d48 - 723f64a0-087a-47c4-8d36 - 540d39da-1aff-45a7",organizationType:"sivi.organization.type.daycareplace.group.regular",restEntityState:"CURRENT",organizationName:"test"},{roleId:"yyyy1111",roleName:Fo.DAYCAREPLACE,id:"2bfbd181-4c11-4296-b200-59e7f2c5751a",organizationId:"540d39da-1aff-45a7-9b76-6632f683b314",organizationType:"sivi.organization.type.municipality",restEntityState:"CURRENT",organizationPathIds:"167e6ffb-d669-4ab0-9d48 - 723f64a0-087a-47c4-8d36 - 540d39da-1aff-45a7",organizationName:"test"},{roleId:"2343243",id:"2bfbd181-4c11-4296-b200-59e7f2c5751a",roleName:Fo.DAYCAREPLACE,organizationId:"540d39da-1aff-45a7-9b76-6632f683b314",organizationType:"sivi.organization.type.daycareplace.type",restEntityState:"CURRENT",organizationPathIds:"167e6ffb-d669-4ab0-9d48 - 723f64a0-087a-47c4-8d36 - 540d39da-1aff-45a7",organizationName:"daycareCenter"}]}}static getAuthenticatedUser(){return{userId:"123ABC",firstNames:"john",lastName:"Michel",cookieConsent:!0,termsAndConditions:!0,municipalityId:"municipality-1",language:"en",professional:!0,professionalRoles:[]}}}class k0{static getMessageReasons(){return[{id:"747d2b50-081f-4944-8a02-5fd6aa817980",reason:"sivi.message.template.application.thanksmessage",description:"thanks message"}]}static getMessageTemplate(){return{id:"1",languageDescriptions:[{id:"1",language:"fi",checked:!1},{id:"2",language:"en",checked:!0}],messageReason:"sivi.message.template.application.ecec.thanksmessage",organizationId:"12345",restEntityState:Ro.CURRENT,validFrom:"01.01.2018",validUntil:"01.01.2019",messageModes:[{id:null,messageContentId:null,modeType:"sivi.contact.type.email",checked:!0,languages:[{id:null,messageModeId:null,language:"fi",title:"FI Email title",description:"FI Email Desc"},{id:null,messageModeId:null,language:"en",title:"EN Email title",description:"EN Email Desc"}]},{id:null,messageContentId:null,modeType:"sivi.contact.type.textmessage",checked:!0,languages:[{id:null,messageModeId:null,language:"fi",title:"FI TextMessage title",description:"FI TextMessage Desc"},{id:null,messageModeId:null,language:"en",title:"EN TextMessage title",description:"EN TextMessage Desc"}]},{id:null,messageContentId:null,modeType:"sivi.contact.type.uimessage",checked:!0,languages:[{id:null,messageModeId:null,language:"fi",title:"FI TextMessage title",description:"FI TextMessage Desc"},{id:null,messageModeId:null,language:"en",title:"EN UI Message title",description:"EN UI Message Desc"}]}]}}static getMessageTemplates(){return[{id:"1",languageDescriptions:[{id:"1",templateName:"suomeksi",language:"fi",checked:!1},{id:"2",templateName:"english",language:"en",checked:!0},{id:null,templateName:"svenska",language:"sv",checked:!1}],messageReason:"sivi.message.template.application.ecec.thanksmessage",organizationId:"12345",restEntityState:Ro.CURRENT,validFrom:"01.01.2018",validUntil:"01.01.2019",messageModes:[{id:null,messageContentId:null,modeType:"sivi.contact.type.email",checked:!0,languages:[{id:null,messageModeId:null,language:"fi",title:"FI Email title",description:"FI Email Desc"},{id:null,messageModeId:null,language:"en",title:"EN Email title",description:"EN Email Desc"}]},{id:null,messageContentId:null,modeType:"sivi.contact.type.textmessage",checked:!0,languages:[{id:null,messageModeId:null,language:"fi",title:"FI TextMessage title",description:"FI TextMessage Desc"},{id:null,messageModeId:null,language:"en",title:"EN TextMessage title",description:"EN TextMessage Desc"}]},{id:null,messageContentId:null,modeType:"sivi.contact.type.uimessage",checked:!0,languages:[{id:null,messageModeId:null,language:"fi",title:"FI TextMessage title",description:"FI TextMessage Desc"},{id:null,messageModeId:null,language:"en",title:"EN UI Message title",description:"EN UI Message Desc"}]}]},{id:"2",organizationId:"12345",languageDescriptions:[{id:"1",language:"fi"},{id:"2",language:"en"}],restEntityState:Ro.FUTURE,validFrom:"",validUntil:"",messageModes:[]},{id:"3",languageDescriptions:[{id:"1",language:"fi",checked:!1},{id:"2",language:"en",checked:!0}],organizationId:"12345",restEntityState:Ro.EXPIRED,validFrom:"01.01.2018",validUntil:"12.12.2017",messageModes:[]}]}static getMessageTemplateTypes(){return{id:"id-1",name:"sivi.message.template.application",childCodes:[{id:"id-1-1",name:"sivi.message.template.application"}]}}static getTemplate(){return{id:"te1",organizationId:"111",languages:[{id:"1l1",language:ds.FINNISH,subject:"FIN Urheilu",description:"FIN Harjoitella  urheilu"},{id:"2l2",language:ds.ENGLISH,subject:"EN Sports",description:"EN Practice sports"}],restEntityState:"ACTIVE",validFrom:"01.01.2018",validUntil:"01.01.2019",themesOrder:["th1","th3","th5","th2","th4","th6"]}}static getMessageTemplateResponse(){return[{id:"9589af2a-8c9b-4ce1-bc18-79a2bf231836",validFrom:"2020-06-17T00:00:00+03:00",validUntil:"2029-06-17T00:00:00+03:00",organizationId:"4dfd8810-e15d-490a-83c6-e03a09e4ad06",type:"sivi.message.template.decision.ppe.demand-rectification",restEntityState:Ro.CURRENT,languageDescriptions:[{id:"60af35d6-f52d-4196-a7ec-3c5fc9f1ba4e",messageContentId:"98018672-2952-44f7-b7c8-67a294aec14b",language:"fi",description:"test 1",checked:!0},{id:"07c3ee7d-09d9-43dd-bb12-723b2498dbc8",messageContentId:"6f7cbf07-e5ba-44d0-8e4b-bc727ca12db9",language:"en",description:"test 1",checked:!0}],messageModes:[{messageContentId:"896469df-6766-401e-ab78-551726a62fd9",modeType:us.DOCUMENT_TEXT,languages:[{language:"fi",description:"test"}]}]}]}}class N_{getDietOptions(){return(0,D.of)([])}saveDietOptions(s){return(0,D.of)(s)}getAllergyOptions(){return(0,D.of)([])}saveAllergyOptions(s){return(0,D.of)(s)}}class UE{getPermits(){return(0,D.of)([])}savePermits(s){return(0,D.of)(s)}}class ch{getAuthService(){return new oy}getEnvironmentService(){return new zE}getAppStateService(){return new B_}}class qm{get uncheckedCount$(){return(0,D.of)(null)}get loadingStatus$(){return(0,D.of)(null)}get notificationsCount$(){return(0,D.of)(null)}get totalNotificationsCount$(){return(0,D.of)(null)}get notifications$(){return(0,D.of)([])}get images$(){return(0,D.of)({})}init(){return(0,o.Z)(function*(){})()}destroy(){}loadMore(){}subscribeNotifications(){}unsubscribeNotifications(){}onNotificationClick(s){return(0,o.Z)(function*(){})()}markNotificationAsRead(s){return(0,D.of)()}checkUncheckedNotifications(){return(0,D.of)()}clearNotifications(){}}class B_{getMunicipality(){return(0,D.of)({})}getOrganization(){}setOrganization(){}updateOrganization(){}setMunicipality(){}}class Ff{getCodesByName(s){return(0,D.of)([])}getCodesByNameIncludedExternal(s){return(0,D.of)([])}getCodesByParentType(){}}class HM{getCurrentWeeklyCareTimeOptionByMunicipalityId(){return(0,D.of)({})}getWeeklyCareTimeOptionsByMunicipalityId(){return(0,D.of)({})}saveWeeklyCareTimeOptions(){return(0,D.of)({})}}class F1{setLocale(){}isValid(){}}class Ml{constructor(){this.translate=new Wb,this.fi={language:"fi",country:"FI",text:"Suomeksi",simpleLanguage:"Suomi"},this.sv={language:"sv",country:"SE",text:"P\xe5 Svenska",simpleLanguage:"Svenska"},this.en={language:"en",country:"GB",text:"In English",simpleLanguage:"English"}}getSimpleLanguages(){return[ds.FINNISH,ds.SWEDISH,ds.ENGLISH]}getSelectedLanguagesText(){return""}getLanguagesText(){return"\xe4"}setDefaultLanguage(){}getUserLanguage(){return(0,D.of)({language:"fi"})}getLanguageIndex(s){return(0,D.of)(0)}getTranslationByLocale(s,d){switch(d){case"fi":return"suomeksi";case"sv":return"p\xe5 svenska";case"en":return"in english";default:return s}return"suomeksi"}getTranslation(){return""}setLanguage(){}setLanguageByLanguageCode(){}getLanguageLocaleByLanguageCode(){}getAllTranslatedLanguages(){return[{language:"fi",country:"FI",text:"Suomeksi",simpleLanguage:"Suomi"},{language:"en",country:"GB",text:"In English",simpleLanguage:"English"},{language:"sv",country:"SE",text:"P\xe5 Svenska",simpleLanguage:"Svenska"},{language:"ru",country:"RU",text:"Ven\xe4j\xe4ksi",simpleLanguage:"P\u0443\u0441\u0441\u043a\u0438\u0439"}]}getLanguageList(){return(0,D.of)([{code:"FI",short_name:"Finnish",name:"Finnish"},{code:"SV",short_name:"Swedish",name:"Swedish"},{code:"EN",short_name:"English",name:"English"}])}setInitialLanguage(){}getCurrentUserLanguage(){return{language:"fi",country:"FI",text:"Suomeksi",simpleLanguage:"Suomi"}}setLanguageFromURL(){}}class UC{constructor(){}get(){}}class Gb{}class N1{getGuardianshipGuardianByPin(s){return(0,D.of)({})}getGuardiansAndChildrenForAddingPeople(s,d){return(0,D.of)({})}getGuardianByPin(s){return(0,D.of)({})}getPersonMainPhoto(s){return(0,D.of)(lh.getMockAttachmentFile())}getChild(s){return(0,D.of)()}}class zC{addNewRole(){}updatePersonRole(){}savePersonRole(){}fetchPersonRoles(){}deleteRole(){}updateLocalRoleList(){}createErrorResponseFromCode(){}createMoreErrorResponseFromCode(){}removeRoleByName(){}}class Ev{handleDeleteAttachment(){}onSelectFile(){}openFile(){}getFile(){}}class iy{getPlatformInformation(){}}class ry{getPlatformInformation(){}}class ID{getTechnicalEnvironmentSettings(){return(0,D.of)({platformInformation:lh.getPlatformInformation()})}setPlatformInformation(){}}class lx{getPlan(){}handleDeleteAttachment(){return(0,D.of)({})}deleteGuardianRelation(){return(0,D.of)({})}}class B1{updateAdditionalInformation(){}addAdditionalInformation(){}getPlan(s){return(0,D.of)({})}}class Wb{constructor(){this.currentLang="en"}instant(s){return s}addLangs(){}use(){}setDefaultLang(){}get(){}getTranslation(){}getDefaultLang(){}}class zE{getEnvironment(){return{API:"https://dev.cgivesa.fi/"}}isDevOrE2eEnvironment(){}isProduction(){}isPreprodOrProdEnvironment(){}isSitOrTrainingOrDemo(){}isUAT(){}isUatPreprodOrProdEnvironment(){}}class oy{constructor(){this.authenticated$=new g.X(null),this.authenticatedWithBackend$=new g.X(null),this.isLoggingOut$=new l.x}resetSession(){}isMunicipalitySupportUser(){return!1}isAuthorizedToViewConsents(){return!1}isGuardian(){return!1}isProfessional(){return!1}getUserAccountData(){return{}}getAuthorizationHeaders(){return{get:s=>s}}hasAnyRole(s){return!0}hasAnyOfRolesIn(s){return!0}mapPermissionsForSupportUser(s){return s}isSomethingPermitted(s){return!1}hasRole(s){return!0}isAdmin(){return!0}getPersonInfoByUrlToken(){return!0}isAuthenticated$(){return this.authenticated$}authenticate(s,d){return this.authenticated$}authenticateWithSSO(){return(0,D.of)({})}isAuthenticated(){return this.authenticated$.getValue()}updatePassword(s,d,k){return(0,D.of)(!0)}updateOwnPassword(s,d,k){return(0,D.of)(!0)}getUserPersonData(){return(0,D.of)({firstName:"John",lastName:"Doe",primaryEmail:"user@primaryemailexample.com",pin:"010101-0101",id:"12345"})}getAuthorities(){return(0,D.of)([{authority:"ROLE_GUDIAN",organizationName:" 1 Lappeenranta",roleName:"ROLE_GUDIAN"},{authority:"ROLE_USER",organizationName:" 1 Lappeenrant2",roleName:"ROLE_USER"}])}logout(){}}class U1{getUserSession(){return(0,D.of)({token:{access_token:"eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOlsic2l2aS10ZXN0YXV0aC1hcGkiLCJ2YWthLWFwaSIsInNpdmktaW50ZWdyYXRpb25zIiwic2l2aS1kb2N1bWVudHMtYXBpIiwic2l2aS1jb2Rlcy1hcGkiLCJjbG91ZC1nYXRld2F5Iiwic2l2aS1hZGEtYXBpIiwic2l2aS1ncm93aW5nLWFwaSIsInZha2EtdWkiLCJzaXZpLWFwaSIsInNpdmktc3dzLWFwaSIsInNpdmktYWNjb3VudHMtYXBpIiwic2l2aS1tZXNzYWdpbmctYXBpIl0sImZpcnN0TmFtZSI6bnVsbCwibGFzdE5hbWUiOm51bGwsInBpbiI6IjAxMDEwMS0xMjNOIiwidXNlcl9uYW1lIjoiYWRtaW4iLCJzY29wZSI6WyJyZWFkIiwid3JpdGUiLCJvcGVuaWQiXSwiZXhwIjoxNTY1ODg4MjU3LCJhdXRob3JpdGllcyI6WyJST0xFX0dFTkVSQUxfQURNSU4iLCJST0xFX1VTRVIiXSwianRpIjoiNmY5MzU0ZjItOTg2MC00NTM1LTllMDAtNWYzMjAxYWY2NTA4IiwiY2xpZW50X2lkIjoiYWNtZSJ9.l56KuqlbyfYKK3KMc42QujFQJDC905YFzpeIyEE8Vzi8gZviAmRsB-k09mF8FPhB5jWPpdXMeEZ9sXYag3Nyhg14aJu9qzKzBuYgwa7-C57HWXF7sP5ok6-ptFHKhi51RipaEo0JWCPr6jso5vAIQvJhXZ3e90MnluL1R8DuWlWh4FpiN0Ba-NxOLgCjoK-cMzd4qZWXr0TLmWvEx5D9-arjTJAspD4kAZBWCX-TmV3sKZlCrjcZFYgyHSwBbNC5bo4Rp7YWT677P9PnW-wmUtLS8Qoy6EgxiHEYFO54xqrVTUQD7xn1WI5T8eg6drGCR3iUiGH-BY1m2WDpNjNkXw",expires_in:35999,jti:"6f9354f2-1111-4535-9999-5f3201bf6508",refresh_token:"some-token",scope:"read write openid",token_type:"bearer"},userPersonData:{userId:"",firstNames:"",lastName:"",language:"fi",municipalityId:"",professional:!0,termsAndConditions:!0,cookieConsent:!0,professionalRoles:[]},userAccountData:{exp:1e3,firstName:"Harry",lastName:"Hacker",user_name:"harry.hacker.test@cgi-test.fi",pin:"220337-1244"}})}saveUserSession(){}saveUserSettings(){}saveTechnicalEnvironment(){}getUserSettings(){return(0,D.of)({pushNotificationsPermission:"default",selectedMunicipalityId:""})}getTechnicalEnvironment(){return(0,D.of)({platformInformation:lh.getPlatformInformation()})}clearSessionData(){}}class VM{getAllowedFileTypes(){}getAllowedImageFileTypes(){}}class ZM{open(){}}class ib{}ib.\u0275fac=function(s){return new(s||ib)},ib.\u0275prov=e.Yz7({token:ib,factory:ib.\u0275fac});class $b{getVersionNumber(){return{}}}$b.\u0275fac=function(s){return new(s||$b)},$b.\u0275prov=e.Yz7({token:$b,factory:$b.\u0275fac});class Aa{getErrors(){return[]}resetErrors(){}addError(){}}class z1{getInstruction(){return(0,D.of)("this is the instruction")}}class Y1{getQuickHandleOptionsByMunicipalityId(){}getCurrentQuickHandlingOptionNamesByMunicipality(){}getQuickHandlingTypes(){}}class YE{getStaff(){}getStaffMemberWithRoles(){}getStaffMemberPermissions(){}getStaffMember(){}saveStaffMember(){}getJobPositionTitlesForEcec(){}saveStaffRole(){}getAllRolesByStaffId(){}inactivateStaffRole(){}}class Mv{getHealthPermissions(){}getHealthInformation(){}putHealthInformation(){}postHealthAttachment(){}getHealthAttachment(){}deleteAttachment(){}}class Tv{getApplicationHealth(){}setApplicationHealtStatus(){}getApplicationHealthStatus(){}setLastVisitedUrl(){}getLastVisitedUrl(){}setIsHealthyApplication(){}getIsHealthyApplication(){}getDefaultHeaders(){}}class H1{isTypesParentDaycareType(s){return!0}isDaycareplaceOrSchool(s){return!0}doesOrganizationTypeHaveGroups(){return!0}getSectorFormats(){}findContact(){}getSelectOptionsFromCodes(){}isActive(){return!1}orderEcecOrganizationTypeCodes(){}flattenOrganizations(){}}class YC{flushPermissions(){}getPermissions(){}getPermission(){}loadPermissions(){}getCurrentMunicipality(){}}class R0{getSettings(){return(0,D.of)({pushNotificationsPermission:"default",selectedMunicipalityId:"municipality-1"})}setMunicipalityId(){}getPushNotificationsPermission(){return"denied"}getUserSettingsByKey(){return(0,D.of)({})}setPushNotificationsPermissionState(){}setLanguage(){}resetMunicipalitySelection(){}setSelectedMunicipality(){}setSelectedMunicipalityUrls(){}}class jb{getNumberOfMandatoryPlaces(){}saveNumberOfMandatoryPlaces(){}}class V1{getPrintingServiceByMunicipalityId(){}}class GM{getAllRoles(){}getChildRole(){}}class Z1{constructor(){}getMunicipalityCodeList(){}getChildrenForOrganization(){}getMunicipalityLogo(){return(0,D.of)(new File([],"name.png",{type:"image/png"}))}getDaycarePlace(){return(0,D.of)(nb.getUnit())}getUnit(){return(0,D.of)(nb.getUnit())}getGroup(){return(0,D.of)(nb.getGroup())}getMunicipality(){return(0,D.of)(nb.getMunicipalities()[0])}getDaycarePlaceGroups(){const s={content:nb.getEducationGroups()};return(0,D.of)(s)}getOrganization(s){const d=nb.createEducationGroup(s,"education group 1",Fo.SCHOOL_TYPE_SCHOOL);return(0,D.of)(d)}getMunicipalities(){const s={content:nb.getMunicipalities()};return(0,D.of)(s)}saveOrganizationPhoto(){}saveEducationalOrganization(){}deleteOrganizationPhoto(){}getOrganizationPhoto(){}getOrganizationTreeByOrganizationId(){return(0,D.of)([])}deleteOrganizationLogo(){return(0,D.of)({})}saveOrganizationLogo(){return(0,D.of)({})}reactivateUnit(){}saveUnitContactsAndChildminderPic(){}saveUnit(){}findAllReceivedApplicationByOrganization(){}saveMunicipality(){}getChildrenForOrganizationWithSearchParam(){}getUnitFocusesOnDate(){}getChildrenForLoggedInGuardian(){}getChildrenForGuardian(){}getSimpleListOfDaycarePlaces(){}}class ay{getTemplate(){return(0,D.of)({})}getTemplates(){return(0,D.of)([])}getApprovalTemplatesByType(){return(0,D.of)([])}getMessageReasons(){return(0,D.of)([])}getTemplateByReasonAndMunicipality(){return(0,D.of)([])}getMessageReasonsByType(){return(0,D.of)([])}saveTemplate(){return(0,D.of)([])}}class HE{getContactDetails(){return(0,D.of)({})}updateContactDetails(){return(0,D.of)({})}}class rb{listenForReadEvents(){return(0,D.of)("")}initialize(){}}rb.\u0275fac=function(s){return new(s||rb)},rb.\u0275prov=e.Yz7({token:rb,factory:rb.\u0275fac});class Rh{listenForReadEvents(){return(0,D.of)("")}initialize(){}}Rh.\u0275fac=function(s){return new(s||Rh)},Rh.\u0275prov=e.Yz7({token:Rh,factory:Rh.\u0275fac});class Ng{enabled(){return Promise.resolve(!0)}bytesToHexString(s){return s.toString()+"-supposedly-converted"}addTagDiscoveredListener(){return(0,D.of)({tag:{id:[1,2,3]}})}scanTag(){return Promise.resolve({id:[4,5,6]})}}Ng.\u0275fac=function(s){return new(s||Ng)},Ng.\u0275prov=e.Yz7({token:Ng,factory:Ng.\u0275fac});class cg{constructor(){}initialize(){return Promise.resolve(!0)}enableScanning(){}disableScanning(){}isEnabledOnDevice(){return Promise.resolve(!0)}listenForReadEvents(){return(0,D.of)("")}}cg.\u0275fac=function(s){return new(s||cg)},cg.\u0275prov=e.Yz7({token:cg,factory:cg.\u0275fac});class xv{putGuardianBasicInfo(){}postGuardianBasicInfo(){}getGuardianSettings(){}getGuardianSettingsPermissions(){}getPersonAgreements(){}deletePersonAgreement(){}getMunicipalityAccessibilityEmail(){}getGuardianPersonalDataAgreementIsNeeded(){}setGuardianPersonalDataAgreementStatus(){}}function Jl(H){return new nc.w(H,"./assets/i18n/",".json")}xv.\u0275fac=function(s){return new(s||xv)},xv.\u0275prov=e.Yz7({token:xv,factory:xv.\u0275fac});class Kb{}Kb.\u0275fac=function(s){return new(s||Kb)},Kb.\u0275mod=e.oAB({type:Kb}),Kb.\u0275inj=e.cJS({providers:[{provide:jp,useClass:Aa}],imports:[Nt.Pc,Et.ez,Pu.Pl,we.aw.forRoot({loader:{provide:we.Zw,useFactory:Jl,deps:[ae.eN]}}),Nt.Pc,Et.ez,we.aw]})},19227:(qe,I,p)=>{"use strict";p.r(I),p.d(I,{MessagesModule:()=>Ci,MessagesPage:()=>an,MessagingPermissions:()=>Gi,MessagingSharedModule:()=>Be,MockMessagesService:()=>Xn,MockOrganizationService:()=>Et,RecipientType:()=>ut,SendMessageType:()=>nt,SenderType:()=>mt,SiviMessagingLibraryModule:()=>ke,TestUtils:()=>ei,modalMock:()=>gn});var o=p(15861),e=p(94650),l=p(36895),D=p(9116),g=p(88692),E=p(80529),T=p(70191),n=p(89383),P=p(61135),w=p(60515),B=p(77579),Y=p(32076),V=p(39646),ue=p(4128),he=p(56451),ae=p(70262),X=p(54004),ve=p(28746),ye=p(78372),ge=p(82722),ne=p(95577),pe=p(32518),Pe=p(95698),xe=p(18505),de=p(22940),re=p(95017),oe=p(78033),me=p(21441),be=p(38320),le=p(24006),Z=p(97392),Oe=p(44144);class ke{static forRoot(Ft,Ut,wn,Gn,xi){return{ngModule:ke,providers:[{provide:"AuthService",useExisting:Ft.AuthService},{provide:"TranslateService",useExisting:Ut.TranslateService},{provide:"AbstractRestService",useExisting:wn.AbstractRestService},{provide:"EnvironmentService",useExisting:Gn.EnvironmentService},{provide:"AppStateService",useExisting:xi.AppStateService}]}}constructor(){console.log("[sivi-messaging] version: ","4.3.0-100")}}ke.\u0275fac=function(Ft){return new(Ft||ke)},ke.\u0275mod=e.oAB({type:ke}),ke.\u0275inj=e.cJS({});class Be{}var nt,mt,ut;Be.\u0275fac=function(Ft){return new(Ft||Be)},Be.\u0275mod=e.oAB({type:Be}),Be.\u0275inj=e.cJS({imports:[l.ez,T.Pc,n.aw.forChild({loader:{provide:n.Zw,useFactory:g.createTranslateLoader,deps:[E.eN]}}),g.ContentLoaderModule,g.DirectivesModule,l.ez,T.Pc,n.aw,g.ContentLoaderModule,g.DirectivesModule]}),(nt||(nt={})).MESSAGE="application/json",function(un){un.CHILD="CHILD",un.GROUP="GROUP"}(mt||(mt={})),function(un){un.CHILD="CHILD",un.GROUP="GROUP"}(ut||(ut={}));class Ve extends g.AbstractRestService{constructor(Ft,Ut){super(Ft,Ut),this.http=Ft,this.siviProjectsGatewayService=Ut}getMessages(Ft=null,Ut=null,wn=0){let xi=this.getCommonPageableSearchOptions(wn,10);return Ft&&(xi={...xi,params:xi.params.set("groupId",Ft)}),Ut&&(xi={...xi,params:xi.params.set("startsAfterId",Ut)}),this.get("./api/sivi-messaging-api/messages/",xi)}getMessage(Ft){const Ut=`./api/sivi-messaging-api/messages/${Ft}`;return this.get(Ut)}getMessageThread(Ft,Ut){const Gn={...this.getCommonOptions(),params:(new E.LE).set("masterId",Ft).set("childId",Ut)};return this.get("./api/sivi-messaging-api/messages/by-master-and-child",Gn)}getMessageThreads(Ft){const wn={...this.getCommonOptions(),params:(new E.LE).set("masterId",Ft)};return this.get("./api/sivi-messaging-api/messages/threads",wn)}getMessageRecipients(Ft){let wn=this.getCommonOptions();return Ft&&(wn={...wn,params:(new E.LE).set("groupId",Ft)}),this.get("./api/sivi-messaging-api/messages/recipients",wn)}markMessageAsRead(Ft){const Ut=`./api/sivi-messaging-api/messages/${Ft}/read`;return this.put(null,Ut)}sendMessageAsChild(Ft){const wn={command:{type:nt.MESSAGE,content:Ft}};return this.postMultipart("./api/sivi-messaging-api/messages/send-as-child",wn)}sendMessageAsGroup(Ft){const wn={command:{type:nt.MESSAGE,content:Ft}};return this.postMultipart("./api/sivi-messaging-api/messages/send-as-group",wn)}}function tt(un,Ft){if(1&un){const Ut=e.EpF();e.TgZ(0,"ion-item",7)(1,"ion-input",8),e.NdJ("ngModelChange",function(Gn){e.CHM(Ut);const xi=e.oxw();return e.KtG(xi.title=Gn)}),e.ALo(2,"translate"),e.qZA()()}if(2&un){const Ut=e.oxw();e.xp6(1),e.Q6J("ngModel",Ut.title)("placeholder",e.lcZ(2,2,"Professional.Messaging.CreateNewMessage.Subject"))}}function Ne(un,Ft){if(1&un){const Ut=e.EpF();e.TgZ(0,"ion-button",9),e.NdJ("click",function(){e.CHM(Ut);const Gn=e.oxw();return e.KtG(Gn.onSend())}),e._UZ(1,"cgi-icon",10),e.qZA()}if(2&un){const Ut=e.oxw();e.Q6J("disabled",Ut.sendButtonDisabled||Ut.showTitle&&!Ut.title||!Ut.content)}}function wt(un,Ft){1&un&&e._UZ(0,"ion-spinner",11)}Ve.\u0275fac=function(Ft){return new(Ft||Ve)(e.LFG(E.eN),e.LFG(g.SiviProjectsGatewayService))},Ve.\u0275prov=e.Yz7({token:Ve,factory:Ve.\u0275fac,providedIn:"root"});class ft extends g.SiviComponent{constructor(){super(),this.showTitle=!0,this.messageChange=new e.vpe}ngOnInit(){this.title=this.message?.title,this.content=this.message?.content}onSend(){const Ft={title:this.title,content:this.content};this.showTitle||delete Ft.title,this.messageChange.emit(Ft)}}ft.\u0275fac=function(Ft){return new(Ft||ft)},ft.\u0275cmp=e.Xpm({type:ft,selectors:[["sivi-messaging-message-input"]],inputs:{message:"message",showTitle:"showTitle",sendButtonDisabled:"sendButtonDisabled",isSending:"isSending"},outputs:{messageChange:"messageChange"},features:[e.qOj],decls:9,vars:4,consts:[[1,"ion-card","new-message"],["class","ion-no-padding",4,"ngIf"],["rows","6",3,"ngModel","ngModelChange"],[1,"ion-footer"],[1,"ion-footer-row"],["name","send","no-min-width","","fill","clear",3,"disabled","click",4,"ngIf","ngIfElse"],["spinner",""],[1,"ion-no-padding"],["color","primary",3,"ngModel","placeholder","ngModelChange"],["name","send","no-min-width","","fill","clear",3,"disabled","click"],["name","send"],["color","secondary"]],template:function(Ft,Ut){if(1&Ft&&(e.TgZ(0,"ion-card",0)(1,"ion-card-content"),e.YNc(2,tt,3,4,"ion-item",1),e.TgZ(3,"ion-textarea",2),e.NdJ("ngModelChange",function(Gn){return Ut.content=Gn}),e.qZA()(),e.TgZ(4,"ion-footer",3)(5,"ion-row",4),e.YNc(6,Ne,2,1,"ion-button",5),e.YNc(7,wt,1,0,"ng-template",null,6,e.W1O),e.qZA()()()),2&Ft){const wn=e.MAs(8);e.xp6(2),e.Q6J("ngIf",Ut.showTitle),e.xp6(1),e.Q6J("ngModel",Ut.content),e.xp6(3),e.Q6J("ngIf",!Ut.isSending)("ngIfElse",wn)}},dependencies:[l.O5,T.YG,T.PM,T.FN,T.fr,T.pK,T.Ie,T.Nd,T.PQ,T.g2,T.j9,le.JJ,le.On,n.X$],styles:[".ion-card[_ngcontent-%COMP%]{border:solid 1.5px;margin:0}.ion-footer[_ngcontent-%COMP%]{background-color:#f1f6f8;min-height:45px}.ion-footer[_ngcontent-%COMP%]   .ion-footer-row[_ngcontent-%COMP%]{flex:0 0 auto;width:auto;justify-content:flex-end}ion-col[_ngcontent-%COMP%]   p[_ngcontent-%COMP%], ion-col[_ngcontent-%COMP%]   h1[_ngcontent-%COMP%]{margin:0}ion-textarea[_ngcontent-%COMP%]{--padding-start: 0}"]});const Ct=["contentLoader"];function rn(un,Ft){if(1&un){const Ut=e.EpF();e.TgZ(0,"ion-row")(1,"ion-col",8)(2,"h4"),e._uU(3),e.ALo(4,"translate"),e.qZA(),e.TgZ(5,"cgi-autocomplete",9),e.NdJ("valueChange",function(Gn){e.CHM(Ut);const xi=e.oxw();return e.KtG(xi.onFilterChange(Gn))}),e.ALo(6,"async"),e.ALo(7,"translate"),e.ALo(8,"translate"),e.ALo(9,"translate"),e.ALo(10,"translate"),e.ALo(11,"translate"),e.qZA()()()}if(2&un){const Ut=e.oxw(),wn=e.MAs(4);e.xp6(3),e.Oqu(e.lcZ(4,10,"Professional.Messaging.CreateNewMessage.SelectRecipients")),e.xp6(2),e.Q6J("multiSelect",!0)("options",e.lcZ(6,12,Ut.autocompleteOptions$))("placeholderImage","")("selectAllText",e.lcZ(7,14,"General.Buttons.SelectAll"))("removeAllText",e.lcZ(8,16,"General.Buttons.RemoveAll"))("allSelectedText",e.lcZ(9,18,"Conversation.Recipients.AllSelected"))("placeholder",e.lcZ(10,20,"General.Text.Search"))("noItemsText",e.lcZ(11,22,"Conversation.Recipients.NoRecipients")),e.uIk("readonly",wn.shouldShowLoader())}}function He(un,Ft){1&un&&(e.TgZ(0,"i",19),e._uU(1,"done"),e.qZA())}function st(un,Ft){if(1&un&&(e.TgZ(0,"span"),e._uU(1),e.qZA()),2&un){const Ut=Ft.$implicit;e.xp6(1),e.hij(" (",Ut.fullName,") ")}}const nn=function(un){return{selected:un}};function Dn(un,Ft){if(1&un){const Ut=e.EpF();e.TgZ(0,"ion-col",10)(1,"ion-chip",12),e.NdJ("click",function(){const xi=e.CHM(Ut).$implicit,Cr=e.oxw(2);return e.KtG(Cr.onClickChip(xi))}),e.TgZ(2,"ion-row",13)(3,"ion-col",14)(4,"div",15),e.YNc(5,He,2,0,"i",16),e.qZA()(),e.TgZ(6,"ion-col")(7,"ion-label")(8,"span",17),e._uU(9),e.qZA(),e.TgZ(10,"span"),e._uU(11),e.qZA(),e.YNc(12,st,2,1,"span",18),e.qZA()()()()()}if(2&un){const Ut=Ft.$implicit,wn=e.oxw(2);e.xp6(1),e.Q6J("outline",!0)("ngClass",e.VKq(7,nn,wn.chipsSelection.isSelected(Ut))),e.xp6(4),e.Q6J("ngIf",wn.chipsSelection.isSelected(Ut)),e.xp6(4),e.Oqu(Ut.group.name),e.xp6(2),e.hij("(",Ut.childFullName,")"),e.xp6(1),e.Q6J("ngForOf",Ut.guardians)("ngForTrackBy",wn.trackByFn)}}function Mn(un,Ft){if(1&un&&(e.TgZ(0,"ion-row",8)(1,"ion-col",10)(2,"h4"),e._uU(3),e.ALo(4,"translate"),e.qZA()(),e.YNc(5,Dn,13,9,"ion-col",11),e.ALo(6,"async"),e.qZA()),2&un){const Ut=e.oxw();e.xp6(3),e.Oqu(e.lcZ(4,3,"Professional.Messaging.CreateNewMessage.SelectRecipients")),e.xp6(2),e.Q6J("ngForOf",e.lcZ(6,5,Ut.chipOptions$))("ngForTrackBy",Ut.trackByFn)}}class vi extends g.SiviComponent{get isSendButtonDisabled(){return this.chipsSelection.selected.length<1}constructor(Ft,Ut,wn,Gn,xi,Cr,Fr,en){super(),this.modalCtrl=Ft,this.messagesService=Ut,this.translate=wn,this.notifyService=Gn,this.organizationService=xi,this.fb=Cr,this.notify=Fr,this.siviProjectsGatewayService=en,this.authService=this.siviProjectsGatewayService.getAuthService(),this.isGuardian=!1,this.recipients$=new P.X([]),this.chipsSelection=new re.Ov(!0,null)}ngOnInit(){this.isGuardian=this.authService.isGuardian(),this.setSenderName(),this.getRecipients(),this.setRecipientOptions()}getRecipients(){const Ft=this.isGuardian?null:this.senderId;this.messagesService.getMessageRecipients(Ft).pipe((0,ae.K)(Ut=>this.handleError(Ut))).subscribe(Ut=>this.recipients$.next(Ut))}setSenderName(){(this.isGuardian?this.getSenderNameForGuardian():this.getSenderNameForGroup()).pipe((0,ae.K)(Ut=>this.handleError(Ut))).subscribe(Ut=>this.senderName=Ut)}setRecipientOptions(){this.chipOptions$=this.recipients$.pipe((0,X.U)(Ft=>this.getChipOptions(Ft))),this.autocompleteOptions$=this.recipients$.pipe((0,X.U)(Ft=>this.getAutocompleteOptions(Ft)))}getSenderNameForGroup(){return this.organizationService.getGroup(this.senderId).pipe((0,X.U)(Ft=>Ft.name))}getSenderNameForGuardian(){return this.authService.getUserPersonData().pipe((0,X.U)(Ft=>Ft.firstNames+" "+Ft.lastName))}handleError(Ft){return this.notifyService.alertBackendError(Ft),console.error(Ft),w.E}getAutocompleteOptions(Ft){return Ft.map(Ut=>this.createAutocompleteOption(Ut)).sort((Ut,wn)=>g.Utils.compareByLang(this.translate.currentLang,Ut.element.text,wn.element.text))}getChipOptions(Ft){return Ft.reduce((Ut,wn)=>[...Ut,...wn.groups.map(xi=>this.createChipOption(wn,xi))],[]).sort((Ut,wn)=>g.Utils.compareByLang(this.translate.currentLang,Ut.group.name,wn.group.name))}onClose(){this.modalCtrl.dismiss()}onFilterChange(Ft){this.chipsSelection.clear(),this.chipsSelection.select(...Ft.detail.value)}onSend(Ft){this.contentLoader.showLoader(),this.getSendMessageStream(Ft).pipe((0,ve.x)(()=>this.contentLoader.hideLoader()),(0,ae.K)(Ut=>(console.error("Sending New message details failed",Ut),this.notify.alert("Message.Sent.Error"),w.E))).subscribe(()=>{this.notify.toast("Message.Sent.Success"),this.modalCtrl.dismiss()})}onClickChip(Ft){this.chipsSelection.clear(),this.chipsSelection.select(Ft)}getSendMessageStream(Ft){return this.isGuardian?this.messagesService.sendMessageAsChild(this.getNewMessageAsChild(Ft)):this.messagesService.sendMessageAsGroup(this.getNewMessageAsGroup(Ft))}createChipOption(Ft,Ut=null){return{childId:Ft.childId,childFullName:Ft.childFullName,group:Ut,guardians:Ft.guardians}}createAutocompleteOption(Ft){const Ut=this.createChipOption(Ft);return{value:Ut,element:{text:`${Ut.childFullName}`,additionalText:(Gn=Ut.guardians,Gn.map(xi=>`(${xi.fullName})`).join(" "))}};var Gn}getNewMessageAsChild(Ft){const Ut=(0,oe.Z)(this.chipsSelection.selected);return{title:Ft.title,content:Ft.content,senderChildId:Ut.childId,recipientGroupId:Ut.group.id}}getNewMessageAsGroup(Ft){const Ut=this.chipsSelection.selected.map(wn=>wn.childId);return{title:Ft.title,content:Ft.content,senderGroupId:this.senderId,recipientChildrenIds:Ut}}}vi.\u0275fac=function(Ft){return new(Ft||vi)(e.Y36(g.SiviModalController),e.Y36(Ve),e.Y36(n.sK),e.Y36(g.NotifyService),e.Y36(g.OrganizationService),e.Y36(le.qu),e.Y36(g.NotifyService),e.Y36(g.SiviProjectsGatewayService))},vi.\u0275cmp=e.Xpm({type:vi,selectors:[["sivi-messaging-new-message"]],viewQuery:function(Ft,Ut){if(1&Ft&&e.Gf(Ct,7),2&Ft){let wn;e.iGM(wn=e.CRH())&&(Ut.contentLoader=wn.first)}},inputs:{senderId:"senderId"},features:[e.qOj],decls:21,vars:14,consts:[[3,"closeButton","hideNotifications","showSecondaryToolbar","closed"],[1,"ion-padding"],["contentLoader",""],["text","Professional.Messaging.CreateNewMessage.Title.ContextInfo"],["label-position","floating",3,"value","label","viewMode"],[4,"ngIf"],["class","ion-searchbar",4,"ngIf"],[3,"sendButtonDisabled","messageChange"],[1,"ion-searchbar"],["name","children",3,"multiSelect","options","placeholderImage","selectAllText","removeAllText","allSelectedText","placeholder","noItemsText","valueChange"],["size","12"],["size","12",4,"ngFor","ngForOf","ngForTrackBy"],[1,"child-chip",3,"outline","ngClass","click"],[1,"ion-align-items-center"],["size","auto"],[1,"chip-icon-wrapper"],["class","material-icons",4,"ngIf"],[1,"bold"],[4,"ngFor","ngForOf","ngForTrackBy"],[1,"material-icons"]],template:function(Ft,Ut){1&Ft&&(e.TgZ(0,"ion-header")(1,"sivi-lib-navbar",0),e.NdJ("closed",function(){return Ut.onClose()}),e.qZA()(),e.TgZ(2,"ion-content",1)(3,"sivi-lib-content-loader",null,2)(5,"ion-grid")(6,"ion-row")(7,"ion-col")(8,"h1"),e._uU(9),e.ALo(10,"translate"),e._UZ(11,"sivi-lib-info-popup",3),e.qZA()()(),e.TgZ(12,"ion-row")(13,"ion-col"),e._UZ(14,"cgi-input",4),e.ALo(15,"translate"),e.qZA()(),e.YNc(16,rn,12,24,"ion-row",5),e.YNc(17,Mn,7,7,"ion-row",6),e.TgZ(18,"ion-row")(19,"ion-col")(20,"sivi-messaging-message-input",7),e.NdJ("messageChange",function(Gn){return Ut.onSend(Gn)}),e.qZA()()()()()()),2&Ft&&(e.xp6(1),e.Q6J("closeButton",!0)("hideNotifications",!0)("showSecondaryToolbar",!0),e.xp6(8),e.hij("",e.lcZ(10,10,"Professional.Messaging.CreateNewMessage.Title")," "),e.xp6(5),e.Q6J("value",Ut.senderName)("label",e.lcZ(15,12,"Professional.Messaging.CreateNewMessage.Sender"))("viewMode",!0),e.xp6(2),e.Q6J("ngIf",!Ut.isGuardian),e.xp6(1),e.Q6J("ngIf",Ut.isGuardian),e.xp6(3),e.Q6J("sendButtonDisabled",Ut.isSendButtonDisabled))},dependencies:[l.mk,l.sg,l.O5,T.hM,T.wI,T.W2,T.jY,T.Gu,T.Q$,T.Nd,g.ContentLoaderComponent,g.InfoPopupComponent,g.NavbarComponent,ft,l.Ov,n.X$],styles:[".ion-card[_ngcontent-%COMP%]{border:solid 1.5px;margin:0}.ion-footer[_ngcontent-%COMP%]{background-color:#f1f6f8}.ion-footer[_ngcontent-%COMP%]   .ion-footer-row[_ngcontent-%COMP%]{flex:0 0 auto;width:auto;justify-content:flex-end}ion-col[_ngcontent-%COMP%]   p[_ngcontent-%COMP%], ion-col[_ngcontent-%COMP%]   h1[_ngcontent-%COMP%]{margin:0}ion-chip.child-chip[_ngcontent-%COMP%]{height:100%;padding-left:8px;border-radius:25rem;padding-top:1px;padding-bottom:1px;margin:0;min-width:130px;min-height:40px}@media screen and (width < 400px){ion-chip.child-chip[_ngcontent-%COMP%]{min-width:auto}}ion-chip.child-chip[_ngcontent-%COMP%]   .chip-content[_ngcontent-%COMP%]{height:100%}.chip-icon-wrapper[_ngcontent-%COMP%]{min-width:25px;max-width:25px}.selected[_ngcontent-%COMP%]{background-color:var(--ion-color-success);color:var(--ion-color-light)}"]});class Gi{}var mi,wi,Bn,kn,On;Gi.Messaging={CAN_NAVIGATE_GROUP_PAGE_MESSAGES:[g.Roles.MUNICIPALITY_SUPPORT,g.Roles.DCP_CHIEF,g.Roles.DCP_TEACHER,g.Roles.DCP_CHILDCARER,g.Roles.SPECIAL_EDUCATION_TEACHER],CAN_CREATE_NEW_MESSAGE:[g.Roles.DCP_CHIEF,g.Roles.DCP_TEACHER,g.Roles.DCP_CHILDCARER]},function(un){un.CREATE_NEW_MESSAGE="create-new-message",un.READ_MESSAGE="read-message",un.MESSAGE_THREADS="message-threads"}(mi||(mi={})),function(un){un.PUBLISH="PUBLISH",un.READ="READ"}(wi||(wi={})),function(un){un.PERSON_RECIPIENT_TYPE="person",un.GROUP_RECIPIENT_TYPE="group"}(Bn||(Bn={})),function(un){un.LOW="LOW",un.MINOR="MINOR",un.NORMAL="NORMAL",un.HIGH="HIGH",un.URGENT="URGENT"}(kn||(kn={})),function(un){un.GROUP="group",un.PERSON="person"}(On||(On={}));class je{constructor(){this.senderNameKey={[mt.CHILD]:"childFullName",[mt.GROUP]:"groupName"},this.recipientNameKey={[ut.CHILD]:"childFullName",[ut.GROUP]:"groupName"}}mapMessages(Ft){return Ft.map(Ut=>({...Ut,sender:this.mapSender(Ut.sender),recipients:this.mapRecipients(Ut.recipients)}))}mapSender(Ft){const Ut=Ft.type===mt.CHILD?{guardians:this.getSenderGuardians(Ft)}:{};return{...Ft,...Ut,name:this.getMessageSenderName(Ft)}}mapRecipients(Ft){return Ft.map(Ut=>({...Ut,name:this.getMessageRecipientName(Ut)}))}getMessageRecipientName(Ft){return Ft[this.recipientNameKey[Ft.type]]}getMessageSenderName(Ft){return Ft[this.senderNameKey[Ft.type]]}getSenderGuardians(Ft){return[...Ft.guardians].sort((Ut,wn)=>Ut.sender?-1:wn.sender?1:0)}}je.\u0275fac=function(Ft){return new(Ft||je)},je.\u0275prov=e.Yz7({token:je,factory:je.\u0275fac,providedIn:"root"});const Bt=["contentLoader"],xn=function(un){return{"text-decoration-underline":un}};function Fn(un,Ft){if(1&un&&(e.TgZ(0,"div")(1,"span",18),e._uU(2),e.qZA()()),2&un){const Ut=Ft.$implicit;e.xp6(1),e.Q6J("ngClass",e.VKq(2,xn,Ut.sender)),e.xp6(1),e.hij(" (",Ut.fullName,") ")}}function ui(un,Ft){if(1&un&&(e.TgZ(0,"div"),e.YNc(1,Fn,3,4,"div",15),e.qZA()),2&un){const Ut=e.oxw().ngIf,wn=e.oxw();e.xp6(1),e.Q6J("ngForOf",Ut.guardians)("ngForTrackBy",wn.trackByFn)}}function Ai(un,Ft){if(1&un&&(e.TgZ(0,"ion-col")(1,"div"),e._uU(2),e.ALo(3,"translate"),e.qZA(),e.TgZ(4,"div",17),e._uU(5),e.qZA(),e.YNc(6,ui,2,2,"div",5),e.qZA()),2&un){const Ut=Ft.ngIf,wn=e.oxw();e.xp6(2),e.Oqu(e.lcZ(3,3,"Professional.Messaging.CreateNewMessage.Sender")),e.xp6(3),e.Oqu(Ut.name),e.xp6(1),e.Q6J("ngIf",Ut.type===wn.senderType.CHILD)}}function si(un,Ft){if(1&un&&(e.TgZ(0,"div")(1,"span"),e._uU(2),e.qZA()()),2&un){const Ut=Ft.$implicit;e.xp6(2),e.hij("(",Ut,")")}}function Vi(un,Ft){if(1&un&&(e.TgZ(0,"div"),e.YNc(1,si,3,1,"div",15),e.qZA()),2&un){const Ut=e.oxw().$implicit,wn=e.oxw(2);e.xp6(1),e.Q6J("ngForOf",Ut.guardiansFullNames)("ngForTrackBy",wn.trackByFn)}}function Vn(un,Ft){if(1&un&&(e.TgZ(0,"div")(1,"ion-row")(2,"ion-chip",24)(3,"div",17),e._uU(4),e.qZA(),e.YNc(5,Vi,2,2,"div",5),e.qZA()()()),2&un){const Ut=Ft.$implicit,wn=e.oxw(2);e.xp6(4),e.Oqu(Ut.name),e.xp6(1),e.Q6J("ngIf",Ut.type===wn.recipientType.CHILD)}}function Hn(un,Ft){if(1&un){const Ut=e.EpF();e.TgZ(0,"div")(1,"cgi-accordion-item",19)(2,"div",20),e.NdJ("click",function(){e.CHM(Ut);const Gn=e.oxw();return e.KtG(Gn.previewOpenToggle=!Gn.previewOpenToggle)}),e.TgZ(3,"h6",21),e._uU(4),e.ALo(5,"translate"),e.qZA()(),e.TgZ(6,"cgi-toggle-accordion",22),e.NdJ("click",function(){e.CHM(Ut);const Gn=e.oxw();return e.KtG(Gn.previewOpenToggle=!Gn.previewOpenToggle)}),e.ALo(7,"translate"),e.ALo(8,"translate"),e.qZA(),e.TgZ(9,"div",23),e.YNc(10,Vn,6,2,"div",15),e.qZA()()()}if(2&un){const Ut=e.oxw();e.xp6(1),e.Q6J("open",Ut.previewOpenToggle),e.xp6(3),e.hij(" ",e.lcZ(5,6,"Professional.Messaging.OpenReadMessage.Recipients")," "),e.xp6(2),e.Q6J("ariaLabel",Ut.previewOpenToggle?e.lcZ(7,8,"General.Buttons.Close"):e.lcZ(8,10,"General.Buttons.Open"))("open",Ut.previewOpenToggle),e.xp6(4),e.Q6J("ngForOf",null==Ut.masterMessage?null:Ut.masterMessage.recipients)("ngForTrackBy",Ut.trackByFn)}}function An(un,Ft){if(1&un&&(e.TgZ(0,"div")(1,"span"),e._uU(2),e.qZA()()),2&un){const Ut=Ft.$implicit;e.xp6(2),e.hij("(",Ut,")")}}function vn(un,Ft){if(1&un&&(e.TgZ(0,"div"),e.YNc(1,An,3,1,"div",15),e.qZA()),2&un){const Ut=e.oxw().ngIf,wn=e.oxw(2);e.xp6(1),e.Q6J("ngForOf",Ut.guardiansFullNames)("ngForTrackBy",wn.trackByFn)}}function In(un,Ft){if(1&un&&(e.TgZ(0,"ion-chip",26)(1,"div",17),e._uU(2),e.qZA(),e.YNc(3,vn,2,2,"div",5),e.qZA()),2&un){const Ut=Ft.ngIf,wn=e.oxw(2);e.xp6(2),e.Oqu(Ut.name),e.xp6(1),e.Q6J("ngIf",Ut.type===wn.recipientType.CHILD)}}function Zi(un,Ft){if(1&un&&(e.TgZ(0,"div")(1,"ion-label"),e._uU(2),e.ALo(3,"translate"),e.qZA()(),e.TgZ(4,"div"),e.YNc(5,In,4,2,"ion-chip",25),e.qZA()),2&un){const Ut=e.oxw();e.xp6(2),e.hij(" ",e.lcZ(3,2,"Professional.Messaging.OpenReadMessage.Recipients")," "),e.xp6(3),e.Q6J("ngIf",null==Ut.masterMessage?null:Ut.masterMessage.recipients[0])}}function gr(un,Ft){if(1&un&&(e.TgZ(0,"div")(1,"span",18),e._uU(2),e.qZA()()),2&un){const Ut=Ft.$implicit;e.xp6(1),e.Q6J("ngClass",e.VKq(2,xn,Ut.sender)),e.xp6(1),e.hij(" (",Ut.fullName,") ")}}function Hi(un,Ft){if(1&un&&(e.TgZ(0,"ion-label",29)(1,"div",30),e.YNc(2,gr,3,4,"div",15),e.qZA()()),2&un){const Ut=e.oxw().ngIf,wn=e.oxw(2);e.xp6(2),e.Q6J("ngForOf",Ut.guardians)("ngForTrackBy",wn.trackByFn)}}function Gr(un,Ft){if(1&un&&(e.TgZ(0,"ion-col")(1,"ion-label"),e._uU(2),e.qZA(),e.YNc(3,Hi,3,2,"ion-label",28),e.qZA()),2&un){const Ut=Ft.ngIf,wn=e.oxw(2);e.xp6(2),e.Oqu(Ut.name),e.xp6(1),e.Q6J("ngIf",Ut.type===wn.senderType.CHILD)}}const zr=function(un){return{reply:un}};function Eo(un,Ft){if(1&un&&(e.TgZ(0,"ion-row")(1,"ion-col")(2,"ion-card",27)(3,"ion-card-content")(4,"ion-row"),e.YNc(5,Gr,4,2,"ion-col",5),e.TgZ(6,"ion-col",11)(7,"ion-label"),e._uU(8),e.qZA()(),e.TgZ(9,"ion-col",12),e._uU(10),e.qZA()()()()()()),2&un){const Ut=Ft.$implicit,wn=e.oxw();e.xp6(2),e.Q6J("ngClass",e.VKq(4,zr,Ut.sender.type!==wn.masterMessage.sender.type)),e.xp6(3),e.Q6J("ngIf",Ut.sender),e.xp6(3),e.hij(" ",wn.getTimeOrDate(Ut.createTime)," "),e.xp6(2),e.hij(" ",Ut.content," ")}}class mr extends g.SiviComponent{constructor(Ft,Ut,wn,Gn,xi,Cr){super(),this.modalCtrl=Ft,this.messagesService=Ut,this.messagesMapperService=wn,this.notify=Gn,this.router=xi,this.siviProjectsGatewayService=Cr,this.previewOpenToggle=!1,this.senderType=mt,this.recipientType=ut,this.authService=this.siviProjectsGatewayService.getAuthService(),this.scrollToBottom$=new B.x}ngOnInit(){this.getMessageThread(),this.scrollToBottom$.pipe((0,ye.b)(100),(0,ge.R)(this.destroy$)).subscribe(()=>this.ionContent.scrollToBottom(500))}getMessageThread(){this.contentLoader.showLoader(),this.messagesService.getMessageThread(this.messageId,this.childId).pipe((0,X.U)(Ft=>this.messagesMapperService.mapMessages(Ft)),(0,ne.z)(Ft=>(0,Y.D)(Ft).pipe((0,ne.z)(Ut=>this.markMessageAsRead(Ut)),(0,pe.q)())),(0,ve.x)(()=>{this.contentLoader.hideLoader(),this.scrollToBottom$.next()}),(0,ae.K)(Ft=>this.handleError(Ft))).subscribe(Ft=>{this.masterMessage=Ft.find(Ut=>!Ut.masterId),this.replyMessages=Ft.filter(Ut=>Ut.masterId).sort((Ut,wn)=>g.Utils.compareByDate(Ut.createTime,wn.createTime,"asc")),this.setMessageDateAndTime(this.masterMessage.createTime)})}onClose(){this.modalCtrl.dismiss()}onSend(Ft){this.isSending=!0,this.getSendMessageStream(Ft).pipe((0,ve.x)(()=>this.isSending=!1),(0,ae.K)(Ut=>(console.error("Sending New message details failed",Ut),this.notify.alert("Message.Sent.Error"),w.E))).subscribe(()=>{this.notify.toast("Message.Sent.Success"),this.modalCtrl.dismiss(!0)})}getSendMessageStream(Ft){return this.authService.isGuardian()?this.messagesService.sendMessageAsChild(this.getNewMessageAsChild(Ft)):this.messagesService.sendMessageAsGroup(this.getNewMessageAsGroup(Ft))}markMessageAsRead(Ft){return(Ft.read?(0,V.of)(null):this.messagesService.markMessageAsRead(Ft.id)).pipe((0,X.U)(()=>Ft))}setMessageDateAndTime(Ft){this.messageSentDate=g.Utils.convertDateToFinnishStandard(Ft),this.messageSentTime=g.Utils.convertDateToTime(Ft,g.DateFormats.TIME_WITHOUT_LEADING_ZEROES)}handleError(Ft){return this.notify.alertBackendError(Ft),w.E}getTimeOrDate(Ft){return g.Utils.convertDateToTimeOrDate(Ft,g.DateFormats.TIME_WITHOUT_LEADING_ZEROES)}getNewMessageAsChild(Ft){const{sender:Ut,recipients:wn,title:Gn}=this.masterMessage,xi=Ut.type===mt.GROUP?Ut.groupId:wn[0].groupId;return{title:"Re: "+Gn,content:Ft.content,senderChildId:this.childId,recipientGroupId:xi,masterId:this.masterMessage.id}}getNewMessageAsGroup(Ft){const{sender:Ut,recipients:wn,title:Gn}=this.masterMessage,xi=Ut.type===mt.GROUP?Ut.groupId:wn[0].groupId;return{title:"Re: "+Gn,content:Ft.content,senderGroupId:xi,recipientChildrenIds:[this.childId],masterId:this.masterMessage.id}}}mr.\u0275fac=function(Ft){return new(Ft||mr)(e.Y36(g.SiviModalController),e.Y36(Ve),e.Y36(je),e.Y36(g.NotifyService),e.Y36(D.F0),e.Y36(g.SiviProjectsGatewayService))},mr.\u0275cmp=e.Xpm({type:mr,selectors:[["sivi-messaging-read-message"]],viewQuery:function(Ft,Ut){if(1&Ft&&(e.Gf(Bt,7),e.Gf(T.W2,7)),2&Ft){let wn;e.iGM(wn=e.CRH())&&(Ut.contentLoader=wn.first),e.iGM(wn=e.CRH())&&(Ut.ionContent=wn.first)}},inputs:{messageId:"messageId",childId:"childId"},features:[e.qOj],decls:39,vars:22,consts:[[3,"closeButton","hideNotifications","showSecondaryToolbar","closed"],[1,"ion-padding"],["skeleton","form"],["contentLoader",""],[1,"mt0"],[4,"ngIf"],[4,"ngIf","ngIfElse"],["recipient",""],[1,"message-label"],[3,"label","value","viewMode"],[1,"ion-card"],["size","auto",1,"ion-text-right"],["size","12"],[1,"horizontal-line"],["readonly","true","rows","6",3,"autoGrow","value"],[4,"ngFor","ngForOf","ngForTrackBy"],[3,"showTitle","isSending","messageChange"],[1,"bold"],[3,"ngClass"],[3,"open"],["slot","header",1,"header",3,"click"],[1,"toggle-text","pointer"],["slot","end",1,"pointer",3,"ariaLabel","open","click"],["slot","content",1,"content","preview"],["size","large"],["class","ml0","size","large",4,"ngIf"],["size","large",1,"ml0"],[1,"ion-card",3,"ngClass"],["class","ion-no-margin guardians-names",4,"ngIf"],[1,"ion-no-margin","guardians-names"],[1,"flex","flex-direction-row-wrap"]],template:function(Ft,Ut){if(1&Ft&&(e.TgZ(0,"ion-header")(1,"sivi-lib-navbar",0),e.NdJ("closed",function(){return Ut.onClose()}),e.qZA()(),e.TgZ(2,"ion-content",1)(3,"sivi-lib-content-loader",2,3)(5,"ion-row")(6,"ion-col")(7,"h1",4),e._uU(8),e.ALo(9,"translate"),e.qZA()()(),e.TgZ(10,"ion-row"),e.YNc(11,Ai,7,5,"ion-col",5),e.qZA(),e.TgZ(12,"ion-row")(13,"ion-col"),e.YNc(14,Hn,11,12,"div",6),e.YNc(15,Zi,6,4,"ng-template",null,7,e.W1O),e.qZA()(),e.TgZ(17,"ion-row",8)(18,"ion-col"),e._UZ(19,"cgi-input",9),e.ALo(20,"translate"),e.qZA()(),e.TgZ(21,"ion-row")(22,"ion-col")(23,"ion-card",10)(24,"ion-card-content")(25,"ion-row")(26,"ion-col")(27,"ion-label"),e._uU(28),e.qZA()(),e.TgZ(29,"ion-col",11),e._uU(30),e.qZA(),e.TgZ(31,"ion-col",12),e._UZ(32,"div",13),e.qZA(),e.TgZ(33,"ion-col",12),e._UZ(34,"ion-textarea",14),e.qZA()()()()()(),e.YNc(35,Eo,11,6,"ion-row",15),e.TgZ(36,"ion-row")(37,"ion-col")(38,"sivi-messaging-message-input",16),e.NdJ("messageChange",function(Gn){return Ut.onSend(Gn)}),e.qZA()()()()()),2&Ft){const wn=e.MAs(16);e.xp6(1),e.Q6J("closeButton",!0)("hideNotifications",!0)("showSecondaryToolbar",!0),e.xp6(7),e.hij("",e.lcZ(9,18,"Professional.Messaging.OpenReadMessage.Title")," "),e.xp6(3),e.Q6J("ngIf",null==Ut.masterMessage?null:Ut.masterMessage.sender),e.xp6(3),e.Q6J("ngIf",(null==Ut.masterMessage||null==Ut.masterMessage.recipients?null:Ut.masterMessage.recipients.length)>1)("ngIfElse",wn),e.xp6(5),e.Q6J("label",e.lcZ(20,20,"General.Text.Date"))("value",Ut.messageSentDate)("viewMode",!0),e.xp6(9),e.Oqu(null==Ut.masterMessage?null:Ut.masterMessage.title),e.xp6(2),e.hij(" ",Ut.messageSentTime," "),e.xp6(4),e.Q6J("autoGrow",!0)("value",null==Ut.masterMessage?null:Ut.masterMessage.content),e.xp6(1),e.Q6J("ngForOf",Ut.replyMessages)("ngForTrackBy",Ut.trackByFn),e.xp6(3),e.Q6J("showTitle",!1)("isSending",Ut.isSending)}},dependencies:[l.mk,l.sg,l.O5,T.PM,T.FN,T.hM,T.wI,T.W2,T.Gu,T.Q$,T.Nd,T.g2,T.j9,g.ContentLoaderComponent,g.NavbarComponent,ft,n.X$],styles:['.horizontal-line[_ngcontent-%COMP%]{border:1px solid}.ion-card[_ngcontent-%COMP%]{border:solid 1.5px;font-weight:700;background-color:var(--ion-color-light);margin:0;overflow:visible}.ion-card.new-message[_ngcontent-%COMP%]{background-color:transparent}.ion-card.reply[_ngcontent-%COMP%]{background-color:transparent;margin-left:16px}.ion-card.reply[_ngcontent-%COMP%]:before{z-index:0;content:"";position:absolute;border:12px solid var(--color);transform:rotate(45deg);top:15px;left:-13px}.ion-card.reply[_ngcontent-%COMP%]:after{z-index:0;content:"";position:absolute;border:12px solid white;transform:rotate(45deg);top:15px;left:-11px}.toggle-text[_ngcontent-%COMP%]{font-weight:400}ion-chip[_ngcontent-%COMP%]{--background: var(--ion-color-light);flex-flow:column;align-items:flex-start}[size=large][_ngcontent-%COMP%]{height:100%!important}ion-textarea[_ngcontent-%COMP%]{--padding-start: 0;--padding-end: 0;--padding-top: 0;--padding-bottom: 0;margin-top:0}.ion-footer[_ngcontent-%COMP%]{background-color:#f1f6f8}.ion-footer[_ngcontent-%COMP%]   .ion-footer-row[_ngcontent-%COMP%]{flex:0 0 auto;width:auto;justify-content:flex-end}.guardians-names[_ngcontent-%COMP%]{font-style:italic}']});const jn=["contentLoader"],ct=function(un){return{"text-decoration-underline":un}};function Yt(un,Ft){if(1&un&&(e.TgZ(0,"div")(1,"span",22),e._uU(2),e.qZA()()),2&un){const Ut=Ft.$implicit;e.xp6(1),e.Q6J("ngClass",e.VKq(2,ct,Ut.sender)),e.xp6(1),e.hij(" (",Ut.fullName,") ")}}function oi(un,Ft){if(1&un&&(e.TgZ(0,"div"),e.YNc(1,Yt,3,4,"div",11),e.qZA()),2&un){const Ut=e.oxw().ngIf,wn=e.oxw();e.xp6(1),e.Q6J("ngForOf",Ut.guardians)("ngForTrackBy",wn.trackByFn)}}function Ni(un,Ft){if(1&un&&(e.ynx(0),e.TgZ(1,"ion-row")(2,"ion-col")(3,"div"),e._uU(4),e.ALo(5,"translate"),e.qZA(),e.TgZ(6,"div",21),e._uU(7),e.qZA(),e.YNc(8,oi,2,2,"div",5),e.qZA()(),e.BQk()),2&un){const Ut=Ft.ngIf,wn=e.oxw();e.xp6(4),e.Oqu(e.lcZ(5,3,"Professional.Messaging.CreateNewMessage.Sender")),e.xp6(3),e.Oqu(Ut.name),e.xp6(1),e.Q6J("ngIf",Ut.type===wn.senderType.CHILD)}}function Nn(un,Ft){if(1&un&&(e.TgZ(0,"div")(1,"span"),e._uU(2),e.qZA()()),2&un){const Ut=Ft.$implicit;e.xp6(2),e.hij("(",Ut,")")}}function pr(un,Ft){if(1&un&&(e.TgZ(0,"div"),e.YNc(1,Nn,3,1,"div",11),e.qZA()),2&un){const Ut=e.oxw().$implicit,wn=e.oxw();e.xp6(1),e.Q6J("ngForOf",Ut.guardiansFullNames)("ngForTrackBy",wn.trackByFn)}}function Sn(un,Ft){if(1&un&&(e.TgZ(0,"div")(1,"ion-row")(2,"ion-chip",23)(3,"div",21),e._uU(4),e.qZA(),e.YNc(5,pr,2,2,"div",5),e.qZA()()()),2&un){const Ut=Ft.$implicit,wn=e.oxw();e.xp6(4),e.Oqu(Ut.name),e.xp6(1),e.Q6J("ngIf",Ut.type===wn.recipientType.CHILD)}}function Pn(un,Ft){if(1&un&&(e.TgZ(0,"div"),e._uU(1),e.qZA()),2&un){const Ut=Ft.$implicit;e.xp6(1),e.hij(" (",Ut.fullName,") ")}}function Nt(un,Ft){if(1&un&&(e.TgZ(0,"h6",35)(1,"div",36),e.YNc(2,Pn,2,1,"div",11),e.qZA()()),2&un){const Ut=e.oxw().ngIf,wn=e.oxw(2);e.xp6(2),e.Q6J("ngForOf",Ut.guardians)("ngForTrackBy",wn.trackByFn)}}function ai(un,Ft){if(1&un&&(e.TgZ(0,"ion-col",32),e.YNc(1,Nt,3,2,"h6",33),e.TgZ(2,"div",34),e._uU(3),e.qZA()()),2&un){const Ut=Ft.ngIf,wn=e.oxw().$implicit,Gn=e.oxw();e.xp6(1),e.Q6J("ngIf",Ut.type===Gn.senderType.CHILD),e.xp6(2),e.Oqu(wn.content)}}function hn(un,Ft){1&un&&(e.TgZ(0,"cgi-tag",37),e._uU(1),e.ALo(2,"translate"),e.qZA()),2&un&&(e.xp6(1),e.hij(" ",e.lcZ(2,1,"General.Text.New")," "))}function Le(un,Ft){1&un&&e._UZ(0,"ion-icon",38)}function ce(un,Ft){if(1&un){const Ut=e.EpF();e.TgZ(0,"ion-item",24)(1,"div",25),e.NdJ("click",function(){const xi=e.CHM(Ut).$implicit,Cr=e.oxw();return e.KtG(Cr.onMessageClick(xi.id))}),e.TgZ(2,"ion-row")(3,"ion-col",26)(4,"h3",27),e._uU(5),e.qZA()(),e.TgZ(6,"ion-col",16)(7,"ion-label"),e._uU(8),e.qZA()()(),e.TgZ(9,"ion-row"),e.YNc(10,ai,4,2,"ion-col",28),e.TgZ(11,"ion-col",29),e.YNc(12,hn,3,3,"cgi-tag",30),e.YNc(13,Le,1,0,"ion-icon",31),e.qZA()()()()}if(2&un){const Ut=Ft.$implicit,wn=e.oxw();e.xp6(5),e.Oqu(null==Ut?null:Ut.sender.name),e.xp6(3),e.Oqu(wn.getTimeOrDate(Ut.createTime)),e.xp6(2),e.Q6J("ngIf",Ut.sender),e.xp6(2),e.Q6J("ngIf",!Ut.read||Ut.unreadReplies),e.xp6(1),e.Q6J("ngIf",Ut.replies)}}function we(un,Ft){1&un&&(e.TgZ(0,"i",47),e._uU(1,"done"),e.qZA())}function Qe(un,Ft){if(1&un&&(e.TgZ(0,"span"),e._uU(1),e.qZA()),2&un){const Ut=Ft.$implicit;e.xp6(1),e.hij(" (",Ut.fullName,") ")}}const qt=function(un){return{selected:un}};function Tn(un,Ft){if(1&un){const Ut=e.EpF();e.TgZ(0,"ion-col",17)(1,"ion-chip",42),e.NdJ("click",function(){const xi=e.CHM(Ut).$implicit,Cr=e.oxw(2);return e.KtG(Cr.onClickChip(xi.childId))}),e.TgZ(2,"ion-row",43)(3,"ion-col",44)(4,"div",45),e.YNc(5,we,2,0,"i",46),e.qZA()(),e.TgZ(6,"ion-col")(7,"ion-label")(8,"span",21),e._uU(9),e.qZA(),e.YNc(10,Qe,2,1,"span",11),e.qZA()()()()()}if(2&un){const Ut=Ft.$implicit,wn=e.oxw(2);e.xp6(1),e.Q6J("outline",!0)("ngClass",e.VKq(6,qt,wn.chipsSelection.isSelected(Ut.childId))),e.xp6(4),e.Q6J("ngIf",wn.chipsSelection.isSelected(Ut.childId)),e.xp6(4),e.Oqu(Ut.childFullName),e.xp6(1),e.Q6J("ngForOf",Ut.guardians)("ngForTrackBy",wn.trackByFn)}}function lr(un,Ft){if(1&un){const Ut=e.EpF();e.TgZ(0,"div")(1,"ion-row")(2,"ion-col",17)(3,"h4",39),e._uU(4),e.ALo(5,"translate"),e.qZA()(),e.YNc(6,Tn,11,8,"ion-col",40),e.qZA(),e.TgZ(7,"ion-row")(8,"ion-col")(9,"sivi-messaging-message-input",41),e.NdJ("messageChange",function(Gn){e.CHM(Ut);const xi=e.oxw();return e.KtG(xi.onSend(Gn))}),e.qZA()()()()}if(2&un){const Ut=e.oxw();e.xp6(4),e.Oqu(e.lcZ(5,5,"Text.Messaging.SelectChild")),e.xp6(2),e.Q6J("ngForOf",Ut.chipOptions)("ngForTrackBy",Ut.trackByFn),e.xp6(3),e.Q6J("showTitle",!1)("isSending",Ut.isSending)}}class mo extends g.SiviComponent{constructor(Ft,Ut,wn,Gn,xi,Cr,Fr){super(),this.modalCtrl=Ft,this.messagesService=Ut,this.messagesMapperService=wn,this.notify=Gn,this.translate=xi,this.router=Cr,this.siviProjectsGatewayService=Fr,this.previewOpenToggle=!1,this.senderType=mt,this.recipientType=ut,this.initialized=!1,this.authService=this.siviProjectsGatewayService.getAuthService(),this.chipsSelection=new re.Ov(!0,null),this.chipOptions=[]}ngOnInit(){this.isGuardian=this.authService.isGuardian(),this.getMessageThreads()}onClickChip(Ft){this.chipsSelection.clear(),this.chipsSelection.select(Ft)}getMessageThreads(){this.contentLoader.showLoader(),(0,ue.D)([this.messagesService.getMessage(this.messageId).pipe((0,ne.z)(Ft=>this.markMessageAsRead(Ft))),this.messagesService.getMessageThreads(this.messageId).pipe((0,X.U)(Ft=>Ft.sort((Ut,wn)=>g.Utils.compareByDate(Ut.createTime,wn.createTime,"desc"))))]).pipe((0,X.U)(([Ft,Ut])=>this.messagesMapperService.mapMessages([Ft,...Ut])),(0,ae.K)(Ft=>this.handleError(Ft)),(0,ve.x)(()=>this.contentLoader.hideLoader())).subscribe(Ft=>{this.initialized=!0,this.masterMessage=Ft.find(Ut=>!Ut.masterId),this.threads=Ft.filter(Ut=>Ut.masterId),this.chipOptions=this.masterMessage.recipients.map(Ut=>this.createChipOption(Ut)).sort((Ut,wn)=>g.Utils.compareByLang(this.translate.currentLang,Ut.childFullName,wn.childFullName)),this.setMessageDateAndTime(this.masterMessage.createTime)})}onClose(){this.modalCtrl.dismiss()}onMessageClick(Ft){const Ut=this.threads.find(Gn=>Gn.id===Ft),wn=Ut.sender.type===mt.CHILD?Ut.sender.childId:Ut.recipients[0].childId;this.openReadMessageModal(this.masterMessage.id,wn)}onSend(Ft){this.isSending=!0,this.messagesService.sendMessageAsChild(this.getNewMessageAsChild(Ft)).pipe((0,ve.x)(()=>this.isSending=!1),(0,ae.K)(Ut=>(console.error("Sending New message details failed",Ut),this.notify.alert("Message.Sent.Error"),w.E))).subscribe(()=>{this.notify.toast("Message.Sent.Success"),this.modalCtrl.dismiss(!0)})}markMessageAsRead(Ft){return(Ft.read?(0,V.of)(null):this.messagesService.markMessageAsRead(Ft.id)).pipe((0,X.U)(()=>Ft))}getTimeOrDate(Ft){return g.Utils.convertDateToTimeOrDate(Ft,g.DateFormats.TIME_WITHOUT_LEADING_ZEROES)}setMessageDateAndTime(Ft){this.messageSentDate=g.Utils.convertDateToFinnishStandard(Ft),this.messageSentTime=g.Utils.convertDateToTime(Ft,g.DateFormats.TIME_WITHOUT_LEADING_ZEROES)}handleError(Ft){return this.notify.alertBackendError(Ft),w.E}openReadMessageModal(Ft,Ut){var wn=this;return(0,o.Z)(function*(){const Gn={component:mr,cssClass:"modal-large-size read-message-modal",backdropDismiss:!1,componentProps:{messageId:Ft,childId:Ut}};yield(yield wn.modalCtrl.openModal(Gn,mi.READ_MESSAGE,Ft,[{id:"childId",value:Ut}])).onDidDismiss(),wn.getMessageThreads()})()}createChipOption(Ft){return{childId:Ft.childId,childFullName:Ft.childFullName,guardians:Ft.guardiansFullNames?.map(Ut=>({id:null,fullName:Ut}))}}getNewMessageAsChild(Ft){const{sender:Ut,recipients:wn,title:Gn}=this.masterMessage,xi=Ut.type===mt.GROUP?Ut.groupId:wn[0].groupId;return{title:"Re: "+Gn,content:Ft.content,senderChildId:(0,oe.Z)(this.chipsSelection.selected),recipientGroupId:xi,masterId:this.masterMessage.id}}}mo.\u0275fac=function(Ft){return new(Ft||mo)(e.Y36(g.SiviModalController),e.Y36(Ve),e.Y36(je),e.Y36(g.NotifyService),e.Y36(n.sK),e.Y36(D.F0),e.Y36(g.SiviProjectsGatewayService))},mo.\u0275cmp=e.Xpm({type:mo,selectors:[["sivi-messaging-message-threads"]],viewQuery:function(Ft,Ut){if(1&Ft&&e.Gf(jn,7),2&Ft){let wn;e.iGM(wn=e.CRH())&&(Ut.contentLoader=wn.first)}},inputs:{messageId:"messageId"},features:[e.qOj],decls:43,vars:32,consts:[[3,"closeButton","hideNotifications","showSecondaryToolbar","closed"],[1,"ion-padding"],[3,"skeleton"],["contentLoader",""],[1,"mt0"],[4,"ngIf"],[3,"open"],["slot","header",1,"header",3,"click"],[1,"toggle-text","pointer"],["slot","end",1,"pointer",3,"ariaLabel","open","click"],["slot","content",1,"content","preview"],[4,"ngFor","ngForOf","ngForTrackBy"],[1,"message-label"],[3,"label","value","viewMode"],[1,"mb2"],[1,"ion-card"],["size","auto",1,"ion-text-right"],["size","12"],[1,"horizontal-line"],["readonly","true","rows","6",3,"autoGrow","value"],["class","ion-no-padding",4,"ngFor","ngForOf","ngForTrackBy"],[1,"bold"],[3,"ngClass"],["size","large"],[1,"ion-no-padding"],[1,"message-wrapper","pt2",3,"click"],[1,"pb0"],[1,"ion-no-margin"],["class","pt0",4,"ngIf"],["size","auto",1,"flex","flex-align-items-flex-end","flex-justify-content-space-between","flex-direction-column"],["color","primary",4,"ngIf"],["class","replies-icon","size","large","color","primary","name","chevron-down-circle-outline",4,"ngIf"],[1,"pt0"],["class","ion-no-margin guardians-names",4,"ngIf"],[1,"line-truncate","message-content"],[1,"ion-no-margin","guardians-names"],[1,"flex","flex-direction-row-wrap"],["color","primary"],["size","large","color","primary","name","chevron-down-circle-outline",1,"replies-icon"],[1,"ph2"],["size","12",4,"ngFor","ngForOf","ngForTrackBy"],[3,"showTitle","isSending","messageChange"],[1,"child-chip",3,"outline","ngClass","click"],[1,"ion-align-items-center","chip-content"],["size","auto"],[1,"chip-icon-wrapper"],["class","material-icons",4,"ngIf"],[1,"material-icons"]],template:function(Ft,Ut){1&Ft&&(e.TgZ(0,"ion-header")(1,"sivi-lib-navbar",0),e.NdJ("closed",function(){return Ut.onClose()}),e.qZA()(),e.TgZ(2,"ion-content",1)(3,"sivi-lib-content-loader",2,3)(5,"ion-row")(6,"ion-col")(7,"h1",4),e._uU(8),e.ALo(9,"translate"),e.qZA()()(),e.YNc(10,Ni,9,5,"ng-container",5),e.TgZ(11,"ion-row")(12,"ion-col")(13,"cgi-accordion-item",6)(14,"div",7),e.NdJ("click",function(){return Ut.previewOpenToggle=!Ut.previewOpenToggle}),e.TgZ(15,"h6",8),e._uU(16),e.ALo(17,"translate"),e.qZA()(),e.TgZ(18,"cgi-toggle-accordion",9),e.NdJ("click",function(){return Ut.previewOpenToggle=!Ut.previewOpenToggle}),e.ALo(19,"translate"),e.ALo(20,"translate"),e.qZA(),e.TgZ(21,"div",10),e.YNc(22,Sn,6,2,"div",11),e.qZA()()()(),e.TgZ(23,"ion-row",12)(24,"ion-col"),e._UZ(25,"cgi-input",13),e.ALo(26,"translate"),e.qZA()(),e.TgZ(27,"ion-row",14)(28,"ion-col")(29,"ion-card",15)(30,"ion-card-content")(31,"ion-row")(32,"ion-col")(33,"ion-label"),e._uU(34),e.qZA()(),e.TgZ(35,"ion-col",16),e._uU(36),e.qZA(),e.TgZ(37,"ion-col",17),e._UZ(38,"div",18),e.qZA(),e.TgZ(39,"ion-col",17),e._UZ(40,"ion-textarea",19),e.qZA()()()()()(),e.YNc(41,ce,14,5,"ion-item",20),e.YNc(42,lr,10,7,"div",5),e.qZA()()),2&Ft&&(e.xp6(1),e.Q6J("closeButton",!0)("hideNotifications",!0)("showSecondaryToolbar",!0),e.xp6(2),e.Q6J("skeleton",Ut.initialized?"none":"form"),e.xp6(5),e.hij("",e.lcZ(9,22,"Professional.Messaging.OpenReadMessage.Title")," "),e.xp6(2),e.Q6J("ngIf",null==Ut.masterMessage?null:Ut.masterMessage.sender),e.xp6(3),e.Q6J("open",Ut.previewOpenToggle),e.xp6(3),e.hij(" ",e.lcZ(17,24,"Professional.Messaging.OpenReadMessage.Recipients")," "),e.xp6(2),e.Q6J("ariaLabel",Ut.previewOpenToggle?e.lcZ(19,26,"General.Buttons.Close"):e.lcZ(20,28,"General.Buttons.Open"))("open",Ut.previewOpenToggle),e.xp6(4),e.Q6J("ngForOf",null==Ut.masterMessage?null:Ut.masterMessage.recipients)("ngForTrackBy",Ut.trackByFn),e.xp6(3),e.Q6J("label",e.lcZ(26,30,"General.Text.Date"))("value",Ut.messageSentDate)("viewMode",!0),e.xp6(9),e.Oqu(null==Ut.masterMessage?null:Ut.masterMessage.title),e.xp6(2),e.hij(" ",Ut.messageSentTime," "),e.xp6(4),e.Q6J("autoGrow",!0)("value",null==Ut.masterMessage?null:Ut.masterMessage.content),e.xp6(1),e.Q6J("ngForOf",Ut.threads)("ngForTrackBy",Ut.trackByFn),e.xp6(1),e.Q6J("ngIf",Ut.isGuardian))},dependencies:[l.mk,l.sg,l.O5,T.PM,T.FN,T.hM,T.wI,T.W2,T.Gu,T.gu,T.Ie,T.Q$,T.Nd,T.g2,T.j9,g.ContentLoaderComponent,g.NavbarComponent,ft,n.X$],styles:[".horizontal-line[_ngcontent-%COMP%]{border:1px solid}.ion-card[_ngcontent-%COMP%]{border:solid 1.5px;font-weight:700;background-color:var(--ion-color-light);margin:0;overflow:visible}.ion-card.new-message[_ngcontent-%COMP%]{background-color:transparent}.ion-footer[_ngcontent-%COMP%]{background-color:var(--ion-color-light)}.ion-footer[_ngcontent-%COMP%]   .ion-footer-row[_ngcontent-%COMP%]{flex:0 0 auto;width:auto;justify-content:flex-end}.toggle-text[_ngcontent-%COMP%]{font-weight:400}ion-chip[_ngcontent-%COMP%]{--background: var(--ion-color-light);flex-flow:column;align-items:flex-start}[size=large][_ngcontent-%COMP%]{height:100%!important}ion-textarea[_ngcontent-%COMP%]{--padding-start: 0;--padding-end: 0;--padding-top: 0;--padding-bottom: 0;margin-top:0}.line-truncate[_ngcontent-%COMP%]{display:block;max-height:3.6em;line-height:1.8em;overflow:hidden}.message-content[_ngcontent-%COMP%]{padding-top:8px;margin-bottom:16px}.horizontal-line[_ngcontent-%COMP%]{border:1px solid var(--ion-color-light-shade);margin-top:8px}ion-chip.child-chip[_ngcontent-%COMP%]{height:100%;padding-left:8px;border-radius:25rem;padding-top:1px;padding-bottom:1px;margin:0;min-width:130px;min-height:40px}@media screen and (width < 400px){ion-chip.child-chip[_ngcontent-%COMP%]{min-width:auto}}ion-chip.child-chip[_ngcontent-%COMP%]   .chip-content[_ngcontent-%COMP%]{height:100%}.chip-icon-wrapper[_ngcontent-%COMP%]{min-width:25px;max-width:25px}.selected[_ngcontent-%COMP%]{background-color:var(--ion-color-success);color:var(--ion-color-light)}.replies-icon[_ngcontent-%COMP%]{margin-top:auto;max-height:32px;margin-bottom:10px}.guardians-names[_ngcontent-%COMP%]{min-height:22px}cgi-tag[_ngcontent-%COMP%]{margin:0}.message-wrapper[_ngcontent-%COMP%]{width:100%}"]});const rr=["contentLoader"];function aa(un,Ft){1&un&&(e.TgZ(0,"cgi-tag",19),e._uU(1),e.ALo(2,"translate"),e.qZA()),2&un&&(e.xp6(1),e.hij(" ",e.lcZ(2,1,"General.Text.New")," "))}function ea(un,Ft){1&un&&e._UZ(0,"ion-icon",20)}function Bo(un,Ft){if(1&un){const Ut=e.EpF();e.TgZ(0,"ion-item",9)(1,"div",10),e.NdJ("click",function(){const xi=e.CHM(Ut).$implicit,Cr=e.oxw();return e.KtG(Cr.onMessageClick(xi.id))}),e.TgZ(2,"ion-row")(3,"ion-col",11)(4,"h3",12),e._uU(5),e.qZA()(),e.TgZ(6,"ion-col",13)(7,"ion-label"),e._uU(8),e.qZA()()(),e.TgZ(9,"ion-row")(10,"ion-col")(11,"h6",14),e._uU(12),e.qZA(),e.TgZ(13,"div",15),e._uU(14),e.qZA()(),e.TgZ(15,"ion-col",16),e.YNc(16,aa,3,3,"cgi-tag",17),e.YNc(17,ea,1,0,"ion-icon",18),e.qZA()()()()}if(2&un){const Ut=Ft.$implicit,wn=e.oxw();e.xp6(5),e.Oqu(null==Ut?null:Ut.sender.name),e.xp6(3),e.Oqu(wn.getTimeOrDate(Ut.createTime)),e.xp6(4),e.Oqu(Ut.title),e.xp6(2),e.Oqu(Ut.content),e.xp6(2),e.Q6J("ngIf",!Ut.read||Ut.unreadReplies),e.xp6(1),e.Q6J("ngIf",Ut.replies)}}function Ii(un,Ft){if(1&un){const Ut=e.EpF();e.TgZ(0,"cgi-fab",21),e.NdJ("click",function(){e.CHM(Ut);const Gn=e.oxw();return e.KtG(Gn.onNewMessageButtonClick())}),e.qZA()}}class an extends g.SiviPage{get canCreateMessage(){return this.authService.isGuardian()||this.authService.hasAnyRole(Gi.Messaging.CAN_CREATE_NEW_MESSAGE)}get messagesIds(){return this.messages.map(Ft=>Ft.id)}constructor(Ft,Ut,wn,Gn,xi,Cr,Fr,en,Wn,at){super(Ft,wn,Ut),this.notify=Ft,this.router=Ut,this.translate=wn,this.modalCtrl=Gn,this.siviProjectsGatewayService=xi,this.messagesService=Cr,this.messagesMapperService=Fr,this.messaging=en,this.route=Wn,this.cdr=at,this.groupId=g.Utils.getPathParamFromRouterSnapshot("groupId",this.router.routerState.snapshot.root),this.authService=this.siviProjectsGatewayService.getAuthService(),this.messages=[],this.restMessages$=new B.x,this.elementsOnPage=10,this.activeModals=new re.Ov(!0),this.infiniteScrollDisabled=!1}ngOnInit(){super.ngOnInit(),this.route.queryParamMap.pipe((0,ge.R)(this.destroy$)).subscribe(Ft=>this.restoreModal(Ft)),this.handleGetAllMessages()}ngOnDestroy(){super.ngOnDestroy(),this.messagesChannelStream$&&this.messagesChannelStream$.close()}onMessageClick(Ft){const{READ_MESSAGE:Ut,MESSAGE_THREADS:wn}=mi,Gn=this.messages.find(Fr=>Fr.id===Ft),xi=1===Gn.recipients.length?Ut:wn,Cr={[xi]:Ft};xi===Ut&&(Cr.childId=Gn.sender.type===mt.CHILD?Gn.sender.childId:(0,oe.Z)(Gn.recipients).childId),this.modalCtrl.updateQueryParams(Cr)}onNewMessageButtonClick(){this.modalCtrl.updateQueryParam(mi.CREATE_NEW_MESSAGE,!0)}handleGetAllMessages(){this.contentLoader.showLoader(),this.getAllMessages$().pipe((0,ge.R)(this.destroy$)).subscribe(Ft=>{this.contentLoader.hideLoader(),this.messages=Ft,this.infiniteScroll?.complete(),this.cdr.detectChanges()})}getMessagesChannelOptions$(){const Ft=(0,V.of)(this.groupId),Ut=this.authService.getUserPersonData().pipe((0,Pe.q)(1),(0,X.U)(Fr=>Fr.userId)),wn=this.authService.isGuardian(),xi=wn?"guardians":"groups";return(wn?Ut:Ft).pipe((0,X.U)(Fr=>({channelName:"messages",channelId:xi,action:Fr})))}getChannelMessages$(){return this.getMessagesChannelOptions$().pipe((0,X.U)(Ft=>this.messaging.subscribeChannel(Ft)),(0,xe.b)(Ft=>this.messagesChannelStream$=Ft),(0,ne.z)(Ft=>Ft))}getTimeOrDate(Ft){return g.Utils.convertDateToTimeOrDate(Ft,g.DateFormats.TIME_WITHOUT_LEADING_ZEROES)}restoreModal(Ft){var Ut=this;return(0,o.Z)(function*(){const{MESSAGE_THREADS:wn,READ_MESSAGE:Gn,CREATE_NEW_MESSAGE:xi}=mi,Cr=Ft.get(wn);yield Ut.handleModalOpen(wn,Cr,()=>Ut.openMessageThreadsModal(Cr));const Fr=Ft.get(mi.READ_MESSAGE),en=yield Ut.modalCtrl.getTop();(!en||!en.classList.contains("read-message-modal"))&&(yield Ut.handleModalOpen(Gn,Fr,()=>Ut.openReadMessageModal(Fr,Ft.get("childId"))));const Wn=Ft.get(mi.CREATE_NEW_MESSAGE);yield Ut.handleModalOpen(xi,Wn,()=>Ut.openNewMessageModal())})()}handleModalOpen(Ft,Ut,wn){var Gn=this;return(0,o.Z)(function*(){Ut&&!Gn.activeModals.isSelected(Ft)&&(Gn.activeModals.select(Ft),(yield wn()).onDidDismiss().then(()=>Gn.activeModals.deselect(Ft)).then(()=>Gn.cdr.detectChanges()))})()}getAllMessages$(){const Ft=this.getChannelMessages$().pipe((0,X.U)(Gn=>this.extractMessagesFromChannel(Gn)));return(0,he.T)(Ft,this.restMessages$).pipe((0,X.U)(Gn=>this.messagesMapperService.mapMessages(Gn)),(0,de.R)((Gn,xi)=>g.Utils.patchImmutableCollectionBy(Gn,xi,"id"),[]),(0,X.U)(Gn=>[...Gn].sort((xi,Cr)=>g.Utils.compareByDate(xi.lastActivityTime,Cr.lastActivityTime))))}extractMessagesFromChannel(Ft){const Ut=Ft?.body,wn=Ut.totalElements;return(0,me.Z)(wn)?[Ut]:Ut.content}getRestMessages(){const Ft=(0,be.Z)(this.messages)?.id;this.messagesService.getMessages(this.groupId,Ft,0).pipe((0,ae.K)(Ut=>(console.error(Ut),this.notify.alertBackendError(Ut),w.E))).subscribe(Ut=>{Ut.last&&(this.infiniteScrollDisabled=!0),this.restMessages$.next(Ut.content),this.cdr.detectChanges()})}openReadMessageModal(Ft,Ut){var wn=this;return(0,o.Z)(function*(){const Gn={component:mr,cssClass:"modal-large-size read-message-modal",backdropDismiss:!1,componentProps:{messageId:Ft,childId:Ut}};return wn.modalCtrl.openModal(Gn,mi.READ_MESSAGE,Ft,[{id:"childId",value:Ut}])})()}openMessageThreadsModal(Ft){var Ut=this;return(0,o.Z)(function*(){const wn={component:mo,cssClass:"modal-large-size message-threads-modal",backdropDismiss:!1,componentProps:{messageId:Ft}};return Ut.modalCtrl.openModal(wn,mi.MESSAGE_THREADS,Ft)})()}openNewMessageModal(){var Ft=this;return(0,o.Z)(function*(){const Ut={component:vi,cssClass:"modal-large-size new-message-modal",backdropDismiss:!1,componentProps:{senderId:Ft.groupId}};return Ft.modalCtrl.openModal(Ut,mi.CREATE_NEW_MESSAGE)})()}onIonInfinite(){this.getRestMessages()}}an.\u0275fac=function(Ft){return new(Ft||an)(e.Y36(g.NotifyService),e.Y36(D.F0),e.Y36(n.sK),e.Y36(g.SiviModalController),e.Y36(g.SiviProjectsGatewayService),e.Y36(Ve),e.Y36(je),e.Y36(g.MessagingService),e.Y36(D.gz),e.Y36(e.sBO))},an.\u0275cmp=e.Xpm({type:an,selectors:[["sivi-messaging-messages"]],viewQuery:function(Ft,Ut){if(1&Ft&&(e.Gf(rr,7),e.Gf(T.ju,7)),2&Ft){let wn;e.iGM(wn=e.CRH())&&(Ut.contentLoader=wn.first),e.iGM(wn=e.CRH())&&(Ut.infiniteScroll=wn.first)}},features:[e.qOj],decls:14,vars:8,consts:[[1,"ion-padding"],["skeleton","form"],["contentLoader",""],[1,"mh0"],[3,"text","click"],["class","ion-no-padding",4,"ngFor","ngForOf","ngForTrackBy"],[3,"disabled","ionInfinite"],["loadingSpinner","circular"],[3,"click",4,"ngIf"],[1,"ion-no-padding"],[1,"message-wrapper","pt2",3,"click"],[1,"pb0"],[1,"ion-no-margin"],["size","auto",1,"ion-text-right"],[1,"ion-no-margin","message-title"],[1,"line-truncate","message-content"],["size","auto",1,"flex","flex-align-items-flex-end","flex-justify-content-space-between","flex-direction-column"],["color","primary",4,"ngIf"],["class","replies-icon","size","large","color","primary","name","chevron-down-circle-outline",4,"ngIf"],["color","primary"],["size","large","color","primary","name","chevron-down-circle-outline",1,"replies-icon"],[3,"click"]],template:function(Ft,Ut){1&Ft&&(e.TgZ(0,"ion-content",0)(1,"sivi-lib-content-loader",1,2)(3,"ion-row")(4,"ion-col")(5,"h1",3),e._uU(6),e.ALo(7,"translate"),e.TgZ(8,"sivi-lib-info-popup",4),e.NdJ("click",function(Gn){return Gn.stopPropagation()}),e.qZA()()()(),e.TgZ(9,"ion-list"),e.YNc(10,Bo,18,6,"ion-item",5),e.qZA(),e.TgZ(11,"ion-infinite-scroll",6),e.NdJ("ionInfinite",function(){return Ut.onIonInfinite()}),e._UZ(12,"ion-infinite-scroll-content",7),e.qZA(),e.YNc(13,Ii,1,0,"cgi-fab",8),e.qZA()()),2&Ft&&(e.xp6(6),e.hij("",e.lcZ(7,6,"Messaging.Messages.Title")," "),e.xp6(2),e.Q6J("text","Messaging.Messages.Title.Info"),e.xp6(2),e.Q6J("ngForOf",Ut.messages)("ngForTrackBy",Ut.trackByFn),e.xp6(1),e.Q6J("disabled",Ut.infiniteScrollDisabled),e.xp6(2),e.Q6J("ngIf",Ut.canCreateMessage))},dependencies:[l.sg,l.O5,T.wI,T.W2,T.gu,T.ju,T.MB,T.Ie,T.Q$,T.q_,T.Nd,g.ContentLoaderComponent,g.InfoPopupComponent,n.X$],styles:[".line-truncate[_ngcontent-%COMP%]{display:block;max-height:4.1em;line-height:1.8em;overflow:hidden}.message-content[_ngcontent-%COMP%]{padding-top:8px;margin-bottom:16px}.horizontal-line[_ngcontent-%COMP%]{border:1px solid var(--ion-color-light-shade)}.group-margin[_ngcontent-%COMP%]{margin-top:0}ion-grid[_ngcontent-%COMP%]{padding:0}.load-more-button-wrapper[_ngcontent-%COMP%]{min-height:100px}cgi-tag[_ngcontent-%COMP%]{margin:0}.replies-icon[_ngcontent-%COMP%]{margin-top:auto;margin-bottom:14px}.message-wrapper[_ngcontent-%COMP%]{width:100%}ion-infinite-scroll[_ngcontent-%COMP%]{display:block}ion-infinite-scroll-content[_ngcontent-%COMP%]{min-height:84px}"]});const Zn=[{path:"",component:an,children:[{path:"messages",component:an,pathMatch:"full"}]}];class Ci{}Ci.\u0275fac=function(Ft){return new(Ft||Ci)},Ci.\u0275mod=e.oAB({type:Ci}),Ci.\u0275inj=e.cJS({providers:[g.SiviModalController,Ve,je],imports:[D.Bz.forChild(Zn),Be,l.ez,g.SiviCorePageModule,g.SiviFormsModule,Z.Ps,Oe.c]});class Xn{getMessages(Ft){return(0,V.of)({content:[]})}sendMessageAsChild(Ft){return(0,V.of)(null)}sendMessageAsGroup(Ft){return(0,V.of)(null)}getMessage(Ft){return(0,V.of)(null)}markMessageAsRead(Ft){return(0,V.of)(null)}getMessageRecipients(Ft){return(0,V.of)(null)}getMessageThread(){return(0,V.of)(null)}getMessageThreads(){return(0,V.of)(null)}}Xn.\u0275fac=function(Ft){return new(Ft||Xn)},Xn.\u0275prov=e.Yz7({token:Xn,factory:Xn.\u0275fac});class Et{getGroup(){return(0,V.of)(g.TestOrganizationUtils.getGroup())}}Et.\u0275fac=function(Ft){return new(Ft||Et)},Et.\u0275prov=e.Yz7({token:Et,factory:Et.\u0275fac});const gn=function(){var un=(0,o.Z)(function*(){return{present:(Ft=(0,o.Z)(function*(){}),function(){return Ft.apply(this,arguments)}),onDidDismiss:function(){var Ft=(0,o.Z)(function*(){});return function(){return Ft.apply(this,arguments)}}()};var Ft});return function(){return un.apply(this,arguments)}}();class ei{static getMessageFromChild(){return{content:"message from child",createTime:"2024-01-31T18:24:29.132525",id:g.Utils.createUUID(),read:!0,recipients:[{groupId:"340a366e-3648-487e-8e8e-fa2a67fc3b31",groupName:"Demo Group",type:"GROUP"}],sender:{type:"CHILD",childId:"6385c3e4-3214-4b6d-accc-19d934fb34d6",childFullName:"Armas J\xe4rvites",guardians:[ei.getChildSenderGuardian(),ei.getChildSenderGuardian(!0)]},title:"Child message title"}}static getMessageFromGroup(){return{content:"message from group",createTime:"2024-01-31T15:24:29.132525",id:g.Utils.createUUID(),read:!0,recipients:[{childId:g.Utils.createUUID(),childFullName:"Child child",type:"CHILD"}],sender:{type:"GROUP",groupId:g.Utils.createUUID(),groupName:"Group name"},title:"Group message title"}}static getMessageThread(){const Ft=ei.getMessageFromGroup(),Ut=ei.getMessageFromChild();Ut.masterId=Ft.id;const wn=ei.getMessageFromGroup();wn.masterId=Ft.id;const Gn=ei.getMessageFromChild();return Gn.masterId=Ft.id,[Ft,Ut,wn,Gn]}static getNewMessageAsGroup(){return{title:"title",content:"content",senderGroupId:"senderId",recipientChildrenIds:["1","2"]}}static getNewMessageAsChild(){return{title:"title",content:"content",senderChildId:"childId",recipientGroupId:"groupId"}}static getChipOption(){return{childId:"childId",childFullName:"childFullName",group:{id:"groupId",name:"groupName"},guardians:[{id:"guardianId",fullName:"guardianFullName"}]}}static getNewMessageRecipient(){return{childId:"childId",childFullName:"childFullName",guardians:[{id:"guardianId",fullName:"guardianFullName"}],groups:[{id:"groupId",name:"groupName"}]}}static getChildSenderGuardian(Ft=!1){return{fullName:"fullName",sender:Ft}}static formUrlForAPI(Ft){return"https://dev.cgivesa.fi/"+Ft}}},44438:(qe,I,p)=>{"use strict";p.r(I),p.d(I,{AllergyAndDietPage:()=>ui,AllergyAndDietPageModule:()=>Ai,ApplicationNumberOfPreferredPlacesPage:()=>vn,ApplicationNumberOfPreferredPlacesPageModule:()=>Zi,ApplicationQuickHandlingPage:()=>en,ContextualInstructionsModule:()=>Si,ContextualInstructionsPage:()=>_o,CreditAccountsPage:()=>al,CreditAccountsPageModule:()=>tn,CreditAccountsService:()=>to,DecisionFeeMessagesPageModule:()=>cc,DecisionFeeMessagesTemplatePage:()=>ha,ECECMessageTemplatesService:()=>Pc,EcecExtentOptionPageModule:()=>Mu,EcecExtentOptionsPage:()=>yc,EcecExtentOptionsService:()=>Rs,EcecFeeAndValueDecisionsContactDetailsModule:()=>Vc,EcecFeeAndValueDecisionsContactDetailsPage:()=>ws,EcecFeeParametersPage:()=>Zc,EcecFeeParametersPageModule:()=>Es,EcecFeeParametersService:()=>fo,EcecIncomeAndDeductionPage:()=>eu,EcecIncomeAndDeductionPageModule:()=>pu,EcecIncomeAndDeductionTypeComponent:()=>Fs,EcecIncomeAndDeductionTypeService:()=>mc,EcecIncomeAndDeductionTypesPage:()=>Wd,EcecMessageTemplatesPage:()=>bd,EcecMessageTemplatesPageModule:()=>Oc,EcecVoucherParametersPage:()=>O,EcecVoucherParametersPageModule:()=>Je,EcecVoucherParametersService:()=>fc,EcecWeeklyCareTimeOptionsPage:()=>pd,EcecWeeklyCareTimeOptionsPageModule:()=>Sm,EcecWeeklyCareTimeOptionsService:()=>Vt,ExpenseReimbursementsModule:()=>sc,ExpenseReimbursementsPage:()=>Yh,ExpenseReimbursementsService:()=>zm,ExtentOptionTypes:()=>xc,IntegrationService:()=>Js,IntegrationsPage:()=>_p,IntegrationsPageModule:()=>Hm,MessageTemplateCreationModalComponent:()=>qi,MessageTemplateCreationModalModule:()=>$o,MessageTemplateEditorPage:()=>yi,MessageTemplateEditorPageModule:()=>ya,MessageTemplatesPage:()=>ss,MessageTemplatesPageModule:()=>rs,MockCreditAccountsService:()=>bC,MockECECMessageTemplatesService:()=>Sb,MockEcecFeeParametersService:()=>f0,MockEcecIncomeAndDeductionTypeService:()=>wd,MockEcecTemplateService:()=>qf,MockEcecVoucherParametersService:()=>Dh,MockEcecWeeklyCareTimeOptionsService:()=>id,MockExpenseReimbursementsService:()=>Ab,MockLockingTimesService:()=>Hd,MockMunicipalitySettingsService:()=>kv,MockNgxPermissionsService:()=>Dy,MockOpenDayCareInvoiceService:()=>tm,MockOtherDecisionsSettingsService:()=>Bp,MockPeriodsService:()=>Jh,MockReminderAndDeadlineService:()=>Qh,MunicipalityPeriod:()=>fd,MunicipalityPeriodArea:()=>Cg,MunicipalityPeriodUnit:()=>Wh,MunicipalityPeriodsAndPlannedUnitsModule:()=>Ad,MunicipalitySettingsModule:()=>Vm,MunicipalitySettingsPage:()=>_d,MunicipalitySettingsPageModule:()=>iu,MunicipalitySettingsPermissions:()=>xp,MunicipalitySettingsUtils:()=>Hc,NumberOfPlacesService:()=>si,OtherDecisionLanguages:()=>ar,OtherDecisionTypesKnownErrors:()=>vr,OtherDecisionsPage:()=>ho,OtherDecisionsPageModule:()=>To,OtherDecisionsSettingsService:()=>Qr,PeriodsAndPlannedPage:()=>Wm,PeriodsService:()=>zd,PermitComponent:()=>$s,PermitSettingsPage:()=>Yu,PermitSettingsPageModule:()=>Xp,QuickHandleService:()=>gr,QuickHandlingPageModule:()=>at,ReminderAndDeadlinePage:()=>Kh,ReminderAndDeadlinePageModule:()=>wf,SiviMunicipalitySettingsLibraryModule:()=>vi,TestCreditAccountsUtils:()=>Up,TestEcecExtentOptionsUtils:()=>Hu,TestEcecFeeParametersUtils:()=>sv,TestEcecIcomeAndDeductionTypes:()=>Rv,TestEcecMessageTemplatesUtils:()=>ml,TestEcecWeeklyCareTimeOptions:()=>pf,TestIntegrationsUtils:()=>mm,TestPeriodsAndPlannedUnitsUtils:()=>Sy,modalMock:()=>nm});var o=p(15861),e=p(94650),l=p(88692),D=p(36895),g=p(80529),E=p(70191),T=p(89383),n=p(95698),P=p(28746),w=p(82722),B=p(70262),Y=p(54004),V=p(18505),ue=p(63900),he=p(71884),ae=p(39300),X=p(41854),ve=p(45840),ye=p(21441),ge=p(27988),ne=p(74526),pe=p(57965),Pe=p(64183),xe=p(38320),de=(0,pe.Z)(function(te){var M=(0,xe.Z)(te),C=(0,ge.Z)(te,Pe.Z);return(M="function"==typeof M?M:void 0)&&C.pop(),C.length&&C[0]===te[0]?(0,ne.Z)(C,void 0,M):[]});const re=de;var oe=p(49594),me=p(71178),be=p(59378),le=p(92686),Z=p(76506),Oe=p(33765),j=p(9116),ke=p(61135),Be=p(4128),nt=p(39841),mt=p(60515),ut=p(49808),Ve=p(77579),tt=p(39646),Ne=p(95577),wt=p(83905),ft=p(48382),Ct=p(24006),rn=p(15439),He=p(17489),st=p(30671),nn=p(97392),Dn=p(94954);class vi{static forRoot(M,C,Q,Ye,Zt){return{ngModule:vi,providers:[{provide:"AuthService",useExisting:M.AuthService},{provide:"TranslateService",useExisting:C.TranslateService},{provide:"AbstractRestService",useExisting:Q.AbstractRestService},{provide:"EnvironmentService",useExisting:Ye.EnvironmentService},{provide:"AppStateService",useExisting:Zt.AppStateService}]}}constructor(){console.log("[sivi-municipality-settings] version: ","4.3.0-115")}}vi.\u0275fac=function(M){return new(M||vi)},vi.\u0275mod=e.oAB({type:vi}),vi.\u0275inj=e.cJS({});class Gi{}Gi.\u0275fac=function(M){return new(M||Gi)},Gi.\u0275mod=e.oAB({type:Gi}),Gi.\u0275inj=e.cJS({imports:[D.ez,E.Pc,T.aw.forChild({loader:{provide:T.Zw,useFactory:l.createTranslateLoader,deps:[g.eN]}}),l.ContentLoaderModule,l.DirectivesModule,D.ez,E.Pc,T.aw,l.ContentLoaderModule,l.DirectivesModule]});class mi extends l.SiviComponent{constructor(M,C){super(),this.notify=M,this.translate=C,this.update=new e.vpe}onOptionChange(M){const C=M.detail.checked,Q={...this.allergy,active:C};(0,X.Z)(Q,this.allergy)||this.update.emit(Q)}}mi.\u0275fac=function(M){return new(M||mi)(e.Y36(l.NotifyService),e.Y36(T.sK))},mi.\u0275cmp=e.Xpm({type:mi,selectors:[["sivi-mun-set-allergy-component"]],inputs:{allergy:"allergy"},outputs:{update:"update"},features:[e.qOj],decls:9,vars:7,consts:[[1,"option-item-container"],[1,"option-item"],["size","6"],["lines","none",1,"checkbox"],["role","checkbox",3,"value","checked","ionChange"],["color","primary",1,"ion-margin-start","ion-text-wrap"]],template:function(M,C){1&M&&(e.TgZ(0,"div",0)(1,"ion-item")(2,"ion-row",1)(3,"ion-col",2)(4,"ion-item",3)(5,"ion-checkbox",4),e.NdJ("ionChange",function(Ye){return C.onOptionChange(Ye)}),e.qZA(),e.TgZ(6,"ion-label",5),e._uU(7),e.ALo(8,"translate"),e.qZA()()()()()()),2&M&&(e.xp6(5),e.Q6J("value",C.allergy.name)("checked",C.allergy.active),e.uIk("aria-label",C.allergy.name)("data-cy","checkbox-list-option-"+C.allergy.name),e.xp6(2),e.hij(" ",e.lcZ(8,5,C.allergy.displayText)," "))},dependencies:[E.nz,E.wI,E.Ie,E.Q$,E.Nd,E.w,T.X$],styles:[".option-item[_ngcontent-%COMP%]{display:flex;width:100%}.checkbox[_ngcontent-%COMP%]{--padding-start: 0}"]});class wi extends l.SiviComponent{constructor(M,C){super(),this.notify=M,this.translate=C,this.update=new e.vpe}onOptionChange(M){const C=M.detail.checked,Q=!!C&&this.diet.certificateNeeded,Ye={...this.diet,active:C,certificateNeeded:Q};(0,X.Z)(Ye,this.diet)||this.update.emit(Ye)}onCertificateNeededChange(M){const C=M.detail.checked,Q={...this.diet,certificateNeeded:C};(0,X.Z)(Q,this.diet)||this.update.emit(Q)}}wi.\u0275fac=function(M){return new(M||wi)(e.Y36(l.NotifyService),e.Y36(T.sK))},wi.\u0275cmp=e.Xpm({type:wi,selectors:[["sivi-mun-set-diet-component"]],inputs:{diet:"diet"},outputs:{update:"update"},features:[e.qOj],decls:12,vars:12,consts:[[1,"option-item-container"],[1,"option-item"],["size","6"],["lines","none",1,"checkbox"],["role","checkbox",3,"value","checked","ionChange"],["color","primary",1,"ion-margin-start","ion-text-wrap"],["role","checkbox",3,"value","disabled","checked","ionChange"]],template:function(M,C){1&M&&(e.TgZ(0,"div",0)(1,"ion-item")(2,"ion-row",1)(3,"ion-col",2)(4,"ion-item",3)(5,"ion-checkbox",4),e.NdJ("ionChange",function(Ye){return C.onOptionChange(Ye)}),e.qZA(),e.TgZ(6,"ion-label",5),e._uU(7),e.ALo(8,"translate"),e.qZA()()(),e.TgZ(9,"ion-col",2)(10,"ion-item",3)(11,"ion-checkbox",6),e.NdJ("ionChange",function(Ye){return C.onCertificateNeededChange(Ye)}),e.qZA()()()()()()),2&M&&(e.xp6(5),e.Q6J("value",C.diet.name)("checked",C.diet.active),e.uIk("aria-label",C.diet.name)("data-cy","checkbox-list-option-"+C.diet.name),e.xp6(2),e.hij(" ",e.lcZ(8,10,C.diet.displayText)," "),e.xp6(4),e.Q6J("value",C.diet.name)("disabled",!C.diet.active)("checked",C.diet.certificateNeeded),e.uIk("aria-label",C.diet.name)("data-cy","checkbox-list-option-"+C.diet.name+"-certificate-needed"))},dependencies:[E.nz,E.wI,E.Ie,E.Q$,E.Nd,E.w,T.X$],styles:[".option-item[_ngcontent-%COMP%]{display:flex;width:100%}.checkbox[_ngcontent-%COMP%]{--padding-start: 0}"]});const Bn=["siviContent"];function kn(te,M){1&te&&(e.TgZ(0,"h1"),e._uU(1),e.ALo(2,"translate"),e._UZ(3,"sivi-lib-info-popup",12),e.qZA()),2&te&&(e.xp6(1),e.hij("",e.lcZ(2,2,"Page.MunicipalitySettings.AllergySettings.Title")," "),e.xp6(2),e.Q6J("text","Page.MunicipalitySettings.AllergySettings.Info"))}function On(te,M){1&te&&(e.TgZ(0,"h1"),e._uU(1),e.ALo(2,"translate"),e._UZ(3,"sivi-lib-info-popup",12),e.qZA()),2&te&&(e.xp6(1),e.hij("",e.lcZ(2,2,"Page.MunicipalitySettings.SpecialDietSettings.Title")," "),e.xp6(2),e.Q6J("text","Page.MunicipalitySettings.SpecialDietSettings.Info"))}function je(te,M){1&te&&(e.TgZ(0,"span"),e._uU(1),e.ALo(2,"translate"),e.qZA()),2&te&&(e.xp6(1),e.hij(" ",e.lcZ(2,1,"Page.MunicipalitySettings.SpecialDietSettings.CertificateNeeded")," "))}function Bt(te,M){if(1&te){const C=e.EpF();e.ynx(0),e.TgZ(1,"sivi-mun-set-allergy-component",13),e.NdJ("update",function(Ye){e.CHM(C);const Zt=e.oxw(2);return e.KtG(Zt.onUpdateOption(Ye))}),e.qZA(),e.BQk()}if(2&te){const C=e.oxw().$implicit;e.xp6(1),e.Q6J("allergy",C)}}function xn(te,M){if(1&te){const C=e.EpF();e.TgZ(0,"sivi-mun-set-diet-component",14),e.NdJ("update",function(Ye){e.CHM(C);const Zt=e.oxw(2);return e.KtG(Zt.onUpdateOption(Ye))}),e.qZA()}if(2&te){const C=e.oxw().$implicit;e.Q6J("diet",C)}}function Fn(te,M){if(1&te&&(e.ynx(0),e.YNc(1,Bt,2,1,"ng-container",5),e.YNc(2,xn,1,1,"ng-template",null,6,e.W1O),e.BQk()),2&te){const C=e.MAs(3),Q=e.oxw();e.xp6(1),e.Q6J("ngIf",Q.isAllergyPage)("ngIfElse",C)}}class ui extends l.SiviPage{constructor(M,C,Q,Ye,Zt,Pi,Ir){super(M,C,Q),this.notifyService=M,this.translate=C,this.router=Q,this.unsavedChanges=Ye,this.modalCtrl=Zt,this.siviProjectsGatewayService=Pi,this.allergyAndDietSettingsService=Ir,this.options=[],this.saving=!1}ngOnInit(){this.pageType="child-allergy-settings"===this.path?"allergy":"diet",this.getOptions()}getOptions(){this.contentLoader.showLoader(),(this.isAllergyPage?this.allergyAndDietSettingsService.getAllergyOptions():this.allergyAndDietSettingsService.getDietOptions()).pipe((0,n.q)(1)).subscribe(C=>{const Q=this.translateOptions(C),Ye=this.sortOptions(Q);this.options=Ye,this.watchForValueChanges(Ye),this.contentLoader.hideLoader()},C=>{console.error("Fetching "+this.pageType+" settings failed",C),this.notify.alertBackendError(C,"Message.Loading.Error"),this.contentLoader.showError()})}onUpdateOption(M){const C=this.options.findIndex(Q=>Q.name===M.name);this.options[C]=M}onDismiss(){this.unsavedChanges.canDeactivate(this).pipe((0,n.q)(1)).subscribe(M=>{M&&this.modalCtrl.dismiss(null)})}saveOptions(){const M=this.options;this.saving=!0,(this.isAllergyPage?this.allergyAndDietSettingsService.saveAllergyOptions(M):this.allergyAndDietSettingsService.saveDietOptions(M)).pipe((0,n.q)(1)).subscribe(()=>{this.watchForValueChanges(this.options),this.saving=!1,this.notify.toastSaveSuccess()},Q=>{console.error("Saving "+this.pageType+" settings failed",Q),this.notify.alertBackendError(Q,"Message.Save.Error"),this.saving=!1})}translateOptions(M){const C=(0,ve.Z)(M),Q=this.isAllergyPage?"Allergy.":"Diet.";for(const Ye of C)Ye.displayText=this.translate.instant(Q+Ye.name);return C}sortOptions(M){const C=(0,ve.Z)(M);if(!C.some(Q=>!Q.displayText))return C.sort((Q,Ye)=>this.sortFn(Q,Ye)),C;console.error("Items are not translated. Please translate first.")}sortFn(M,C){return"OTHER"===M.name?1:"OTHER"===C.name?-1:M.displayText>C.displayText?1:-1}get isAllergyPage(){return"allergy"===this.pageType}}ui.\u0275fac=function(M){return new(M||ui)(e.Y36(l.NotifyService),e.Y36(T.sK),e.Y36(j.F0),e.Y36(l.UnsavedChangesGuard),e.Y36(l.SiviModalController),e.Y36(l.SiviProjectsGatewayService),e.Y36(l.AllergyAndDietSettingsService))},ui.\u0275cmp=e.Xpm({type:ui,selectors:[["sivi-mun-set-allergy-and-diet-page"]],viewQuery:function(M,C){if(1&M&&e.Gf(Bn,7),2&M){let Q;e.iGM(Q=e.CRH())&&(C.contentLoader=Q.first)}},inputs:{path:"path"},features:[e.qOj],decls:23,vars:17,consts:[[3,"closeButton","hideNotifications","closed"],["navbar-title",""],["navbar-buttons-right",""],[3,"disabled","clicked"],[1,"ion-padding"],[4,"ngIf","ngIfElse"],["diet",""],["skeleton","form"],["siviContent",""],["size","6"],[4,"ngIf"],[4,"ngFor","ngForOf","ngForTrackBy"],[3,"text"],[3,"allergy","update"],[3,"diet","update"]],template:function(M,C){if(1&M&&(e.TgZ(0,"ion-header")(1,"sivi-lib-navbar",0),e.NdJ("closed",function(){return C.onDismiss()}),e.TgZ(2,"div",1),e._uU(3),e.ALo(4,"translate"),e.TgZ(5,"span"),e._uU(6),e.ALo(7,"async"),e.qZA()(),e.TgZ(8,"div",2)(9,"sivi-lib-navbar-action-button",3),e.NdJ("clicked",function(){return C.saveOptions()}),e.qZA()()()(),e.TgZ(10,"ion-content",4),e.YNc(11,kn,4,4,"h1",5),e.YNc(12,On,4,4,"ng-template",null,6,e.W1O),e.TgZ(14,"sivi-lib-content-loader",7,8)(16,"ion-item")(17,"ion-col",9),e._uU(18),e.ALo(19,"translate"),e.qZA(),e.TgZ(20,"ion-col",9),e.YNc(21,je,3,3,"span",10),e.qZA()(),e.YNc(22,Fn,4,2,"ng-container",11),e.qZA()()),2&M){const Q=e.MAs(13);let Ye;e.xp6(1),e.Q6J("closeButton",!0)("hideNotifications",!0),e.xp6(2),e.hij(" ",e.lcZ(4,11,C.isAllergyPage?"Page.MunicipalitySettings.AllergySettings.Title":"Page.MunicipalitySettings.SpecialDietSettings.Title")," "),e.xp6(3),e.hij(" (",null==(Ye=e.lcZ(7,13,C.siviProjectsGatewayService.getAppStateService().getMunicipality()))?null:Ye.name,") "),e.xp6(3),e.Q6J("disabled",C.saving),e.xp6(2),e.Q6J("ngIf",C.isAllergyPage)("ngIfElse",Q),e.xp6(7),e.hij(" ",e.lcZ(19,15,C.isAllergyPage?"Title.Health.Allergy":"Title.Health.SpecialDiet")," "),e.xp6(3),e.Q6J("ngIf",!C.isAllergyPage),e.xp6(1),e.Q6J("ngForOf",C.options)("ngForTrackBy",C.trackByFnIndex)}},dependencies:[D.sg,D.O5,E.wI,E.W2,E.Gu,E.Ie,l.ContentLoaderComponent,l.NavbarComponent,l.NavbarActionButtonComponent,l.InfoPopupComponent,mi,wi,D.Ov,T.X$],styles:["sivi-lib-info-popup[_ngcontent-%COMP%]{color:var(--ion-color-primary);font-weight:400}.info-text[_ngcontent-%COMP%]{width:100%}"]});class Ai{}Ai.\u0275fac=function(M){return new(M||Ai)},Ai.\u0275mod=e.oAB({type:Ai}),Ai.\u0275inj=e.cJS({providers:[l.AllergyAndDietSettingsService,l.PermitSettingsService,l.SiviModalController],imports:[Gi,l.NavbarComponentModule,l.InfoPopupComponentModule]});class si extends l.AbstractRestService{constructor(M,C){super(M,C),this.http=M,this.siviProjectsGateway=C}getNumberOfMandatoryPlaces(M){const C=`./api/sivi-accounts-api/municipality-settings/preferred-places-number?municipalityId=${M}`;return this.get(C)}saveNumberOfMandatoryPlaces(M,C){const Q=`./api/sivi-accounts-api/municipality-settings/preferred-places-number?municipalityId=${C}`;return this.put(M,Q,this.getCommonOptions())}}si.\u0275fac=function(M){return new(M||si)(e.LFG(g.eN),e.LFG(l.SiviProjectsGatewayService))},si.\u0275prov=e.Yz7({token:si,factory:si.\u0275fac});class Vi extends l.SiviAbstractForm{set numberOfMandatoryPlaces(M){this._numberOfMandatoryPlaces=M,this.patchFormValues()}get numberOfMandatoryPlaces(){return this._numberOfMandatoryPlaces}constructor(M,C){super(),this.fb=M,this.translate=C,this.update=new e.vpe,this.form=this.fb.group({mandatoryECECNumber:[null,[l.SiviValidators.min(1),l.SiviValidators.max(3),l.SiviValidators.required]],mandatoryPPENumber:[null,[l.SiviValidators.min(1),l.SiviValidators.max(3)]],mandatoryClubNumber:[null,[l.SiviValidators.min(1),l.SiviValidators.max(3)]]}),this.errorMessages={max:this.translate.instant("Page.MunicipalitySettings.NumberOfPreferredPlaces.Form.Maximum"),min:this.translate.instant("Page.MunicipalitySettings.NumberOfPreferredPlaces.Form.Minimum")}}patchFormValues(){(0,X.Z)(this.form.value,this.numberOfMandatoryPlaces)||this.form.patchValue(this.numberOfMandatoryPlaces)}onFormValueChange(M){Object.keys(M).forEach(C=>{M[C]=(0,ye.Z)(M[C])?null:Number.parseInt(M[C])}),(0,X.Z)(M,this.numberOfMandatoryPlaces)||this.update.emit(M)}}Vi.\u0275fac=function(M){return new(M||Vi)(e.Y36(Ct.qu),e.Y36(T.sK))},Vi.\u0275cmp=e.Xpm({type:Vi,selectors:[["sivi-mun-set-application-number-of-places-form"]],inputs:{numberOfMandatoryPlaces:"numberOfMandatoryPlaces"},outputs:{update:"update"},features:[e.qOj],decls:16,vars:22,consts:[["siviLibForm","",3,"formGroup"],["size-lg","4","size-md","6"],["formControlName","mandatoryECECNumber","siviLibFormControl","","type","number","label-position","floating",3,"errorMessages","label"],["formControlName","mandatoryPPENumber","siviLibFormControl","","type","number","label-position","floating",3,"errorMessages","label"],["formControlName","mandatoryClubNumber","siviLibFormControl","","type","number","label-position","floating",3,"errorMessages","label"]],template:function(M,C){1&M&&(e.TgZ(0,"form",0)(1,"ion-row")(2,"ion-col",1),e._UZ(3,"cgi-input",2),e.ALo(4,"translate"),e.ALo(5,"translate"),e.qZA()(),e.TgZ(6,"ion-row")(7,"ion-col",1),e._UZ(8,"cgi-input",3),e.ALo(9,"translate"),e.ALo(10,"translate"),e.qZA()(),e.TgZ(11,"ion-row")(12,"ion-col",1),e._UZ(13,"cgi-input",4),e.ALo(14,"translate"),e.ALo(15,"translate"),e.qZA()()()),2&M&&(e.Q6J("formGroup",C.form),e.xp6(3),e.Q6J("errorMessages",C.errorMessages)("label",e.lcZ(4,10,"Page.MunicipalitySettings.NumberOfPreferredPlaces.ApplicationTypes.ECEC.label")),e.uIk("aria-label",e.lcZ(5,12,"Page.MunicipalitySettings.NumberOfPreferredPlaces.ApplicationTypes.ECEC.label")),e.xp6(5),e.Q6J("errorMessages",C.errorMessages)("label",e.lcZ(9,14,"Page.MunicipalitySettings.NumberOfPreferredPlaces.ApplicationTypes.PPE.label")),e.uIk("aria-label",e.lcZ(10,16,"Page.MunicipalitySettings.NumberOfPreferredPlaces.ApplicationTypes.PPE.label")),e.xp6(5),e.Q6J("errorMessages",C.errorMessages)("label",e.lcZ(14,18,"Page.MunicipalitySettings.NumberOfPreferredPlaces.ApplicationTypes.Club.label")),e.uIk("aria-label",e.lcZ(15,20,"Page.MunicipalitySettings.NumberOfPreferredPlaces.ApplicationTypes.Club.label")))},dependencies:[E.wI,E.Nd,l.SiviFormDirective,l.SiviFormControlDirective,Ct._Y,Ct.JJ,Ct.JL,Ct.sg,Ct.u,T.X$],changeDetection:0});const Vn=["siviContent"],Hn=["formComponent"];function An(te,M){if(1&te&&(e.TgZ(0,"span"),e._uU(1),e.ALo(2,"async"),e.qZA()),2&te){const C=e.oxw();let Q;e.xp6(1),e.hij(" (",null==(Q=e.lcZ(2,1,C.siviGatewayService.getAppStateService().getMunicipality()))?null:Q.name,") ")}}class vn extends l.SiviPage{constructor(M,C,Q,Ye,Zt,Pi,Ir,xo){super(Pi,M,C),this.translate=M,this.router=C,this.route=Q,this.unsavedChanges=Ye,this.siviGatewayService=Zt,this.notifyService=Pi,this.modalCtrl=Ir,this.numberOfPlacesService=xo,this.numberOfMandatoryPlaces$=new ke.X(null),this.municipalityId=this.route.snapshot.paramMap.get("municipalityId")}get canSave(){return this.formComponent?.isValid}ngOnInit(){this.getNumberOfMandatoryPlaces()}getNumberOfMandatoryPlaces(){this.contentLoader.showLoader(),this.numberOfPlacesService.getNumberOfMandatoryPlaces(this.municipalityId).subscribe({next:M=>{const C={mandatoryECECNumber:M.mandatoryECECNumber,mandatoryPPENumber:M.mandatoryPPENumber||null,mandatoryClubNumber:M.mandatoryClubNumber||null};this.originalValues=C,this.numberOfMandatoryPlaces$.next(C),this.contentLoader.hideLoader()},error:M=>{console.error("Error fetching values:",M),this.contentLoader.showError()}})}onSave(){this.contentLoader.showLoader();const M=(0,ve.Z)(this.numberOfMandatoryPlaces$.value);this.numberOfPlacesService.saveNumberOfMandatoryPlaces(M,this.municipalityId).pipe((0,P.x)(()=>{this.contentLoader.hideLoader()})).subscribe(()=>{this.originalValues=M,this.notify.toastSaveSuccess()},C=>{console.error("Error saving values:",C),this.notify.alertSaveError()})}updateValues(M){this.numberOfMandatoryPlaces$.next(M)}canDeactivate(){return(0,X.Z)(this.originalValues,this.numberOfMandatoryPlaces$.value)}onDismiss(){this.unsavedChanges.canDeactivate(this).pipe((0,w.R)(this.destroy$)).subscribe(M=>{M&&this.modalCtrl.dismiss(null)})}}vn.\u0275fac=function(M){return new(M||vn)(e.Y36(T.sK),e.Y36(j.F0),e.Y36(j.gz),e.Y36(l.UnsavedChangesGuard),e.Y36(l.SiviProjectsGatewayService),e.Y36(l.NotifyService),e.Y36(l.SiviModalController),e.Y36(si))},vn.\u0275cmp=e.Xpm({type:vn,selectors:[["sivi-mun-set-application-number-of-preferred-places"]],viewQuery:function(M,C){if(1&M&&(e.Gf(Vn,7),e.Gf(Hn,7)),2&M){let Q;e.iGM(Q=e.CRH())&&(C.contentLoader=Q.first),e.iGM(Q=e.CRH())&&(C.formComponent=Q.first)}},features:[e.qOj],decls:20,vars:16,consts:[[3,"closeButton","hideNotifications","closed"],["navbar-title",""],[4,"ngIf"],["navbar-buttons-right",""],[3,"disabled","clicked"],[1,"ion-padding"],["skeleton","none"],["siviContent",""],[3,"numberOfMandatoryPlaces","update"],["formComponent",""]],template:function(M,C){1&M&&(e.TgZ(0,"ion-header")(1,"sivi-lib-navbar",0),e.NdJ("closed",function(){return C.onDismiss()}),e.TgZ(2,"div",1),e._uU(3),e.ALo(4,"translate"),e.YNc(5,An,3,3,"span",2),e.qZA(),e.TgZ(6,"div",3)(7,"sivi-lib-navbar-action-button",4),e.NdJ("clicked",function(){return C.onSave()}),e.qZA()()()(),e.TgZ(8,"ion-content",5)(9,"sivi-lib-content-loader",6,7)(11,"h1"),e._uU(12),e.ALo(13,"translate"),e.qZA(),e.TgZ(14,"h5"),e._uU(15),e.ALo(16,"translate"),e.qZA(),e.TgZ(17,"sivi-mun-set-application-number-of-places-form",8,9),e.NdJ("update",function(Ye){return C.updateValues(Ye)}),e.ALo(19,"async"),e.qZA()()()),2&M&&(e.xp6(1),e.Q6J("closeButton",!0)("hideNotifications",!0),e.xp6(2),e.hij(" ",e.lcZ(4,8,"Page.MunicipalitySettings.NumberOfPreferredPlaces.Header")," "),e.xp6(2),e.Q6J("ngIf",C.municipalityId),e.xp6(2),e.Q6J("disabled",!C.canSave),e.xp6(5),e.Oqu(e.lcZ(13,10,"Page.MunicipalitySettings.NumberOfPreferredPlaces.Title")),e.xp6(3),e.Oqu(e.lcZ(16,12,"Page.MunicipalitySettings.NumberOfPreferredPlaces.Info")),e.xp6(2),e.Q6J("numberOfMandatoryPlaces",e.lcZ(19,14,C.numberOfMandatoryPlaces$)))},dependencies:[D.O5,E.W2,E.Gu,l.ContentLoaderComponent,l.NavbarComponent,l.NavbarActionButtonComponent,Vi,D.Ov,T.X$],changeDetection:0});const In=[{path:"number-of-preferred-places",component:vn,canDeactivate:[l.UnsavedChangesGuard]}];class Zi{}Zi.\u0275fac=function(M){return new(M||Zi)},Zi.\u0275mod=e.oAB({type:Zi}),Zi.\u0275inj=e.cJS({providers:[l.SiviProjectsGatewayService,l.SiviModalController,si],imports:[Gi,l.NavbarComponentModule,j.Bz.forChild(In),l.SiviFormsModule,l.DirectivesModule]});class gr extends l.AbstractRestService{constructor(M,C){super(M,C),this.http=M,this.siviProjectsGateway=C}saveQuickHandleOptions(M){return this.put(M,"./api/sivi-accounts-api/quickhandlingmunicipalitysettings/")}getQuickHandleOptionsByMunicipalityId(M){const C=`./api/sivi-accounts-api/quickhandlingmunicipalitysettings/?municipalityId=${M}`;return this.get(C)}getQuickHandlingTypes(){return this.get("./api/sivi-codes-api/codes/name/sivi.application.handling.type")}getQuickHandlingOptionNames(){return this.get("./api/sivi-accounts-api/quickhandlingoption/")}getCurrentQuickHandlingOptionNamesByMunicipality(M){const C=`./api/sivi-accounts-api/quickhandlingmunicipalitysettings/current?municipalityId=${M}`;return this.get(C)}}function Hi(te,M){if(1&te&&(e.TgZ(0,"ion-col",24),e._UZ(1,"sivi-lib-datepicker",25),e.qZA()),2&te){const C=e.oxw(2);e.xp6(1),e.Q6J("minDate",C.minDate)}}function Gr(te,M){if(1&te&&(e.TgZ(0,"ion-col",26),e._UZ(1,"cgi-input",27),e.ALo(2,"translate"),e.qZA()),2&te){const C=e.oxw(2);e.xp6(1),e.Q6J("viewMode",!0)("label",e.lcZ(2,3,"Form.Label.From"))("value",C.getFormattedTimeOrDate(C.option.fromDate))}}function zr(te,M){if(1&te&&(e._UZ(0,"cgi-input",27),e.ALo(1,"translate"),e.ALo(2,"date")),2&te){const C=e.oxw(2);e.Q6J("viewMode",!0)("label",e.lcZ(1,3,"Form.Label.Until"))("value",e.xi3(2,5,C.option.validUntil,C.dateFormats.FINNISH_ANGULAR))}}function Eo(te,M){if(1&te){const C=e.EpF();e.TgZ(0,"ion-button",28),e.NdJ("click",function(){e.CHM(C);const Ye=e.oxw(2);return e.KtG(Ye.onCancelTable())}),e._uU(1),e.ALo(2,"translate"),e.qZA()}if(2&te){const C=e.oxw(2);e.uIk("aria-label",C.deleteOptionLabel),e.xp6(1),e.hij(" ",e.lcZ(2,2,"General.Buttons.Cancel")," ")}}function mr(te,M){if(1&te){const C=e.EpF();e.TgZ(0,"ion-button",29),e.NdJ("click",function(){e.CHM(C);const Ye=e.oxw(2);return e.KtG(Ye.onClickEdit())}),e._uU(1),e.ALo(2,"translate"),e.qZA()}if(2&te){const C=e.oxw(2);e.uIk("aria-label",C.editOptionLabel),e.xp6(1),e.hij(" ",e.lcZ(2,2,"General.Buttons.Edit")," ")}}function jn(te,M){if(1&te){const C=e.EpF();e.TgZ(0,"ion-button",28),e.NdJ("click",function(){e.CHM(C);const Ye=e.oxw(2);return e.KtG(Ye.onClickAddRow())}),e.ALo(1,"translate"),e._uU(2),e.ALo(3,"translate"),e.qZA()}2&te&&(e.uIk("aria-label",e.lcZ(1,2,"General.Buttons.AddRow ")),e.xp6(2),e.hij(" ",e.lcZ(3,4,"General.Buttons.Add.Row")," "))}function ct(te,M){1&te&&(e.TgZ(0,"th",30),e._uU(1),e.ALo(2,"translate"),e.qZA()),2&te&&(e.xp6(1),e.Oqu(e.lcZ(2,1,"Form.Label.HandlingType")))}function Yt(te,M){if(1&te&&e._UZ(0,"sivi-lib-select",34),2&te){const C=e.oxw().$implicit,Q=e.oxw(2);e.Q6J("multiple",!1)("viewMode",!Q.editMode||C.id)("options",Q.quickHandlingOptions)}}function oi(te,M){if(1&te&&(e.TgZ(0,"span"),e._uU(1),e.ALo(2,"translate"),e.qZA()),2&te){const C=e.oxw().$implicit;e.xp6(1),e.Oqu(e.lcZ(2,1,C.handlingType))}}function Ni(te,M){if(1&te&&(e.TgZ(0,"td",31),e.YNc(1,Yt,1,3,"sivi-lib-select",32),e.YNc(2,oi,3,3,"span",33),e.qZA()),2&te){const C=M.$implicit,Q=M.index,Ye=e.oxw(2);e.Q6J("formGroupName",Q),e.xp6(1),e.Q6J("ngIf",Ye.editMode&&!C.id),e.xp6(1),e.Q6J("ngIf",!Ye.editMode||C.id)}}function Nn(te,M){1&te&&(e.TgZ(0,"th",30),e._uU(1),e.ALo(2,"translate"),e.qZA()),2&te&&(e.xp6(1),e.hij(" ",e.lcZ(2,1,"Form.Label.OptionName")+" (FI)"," "))}function pr(te,M){1&te&&e._UZ(0,"cgi-input",39)}function Sn(te,M){if(1&te&&(e.TgZ(0,"span"),e._uU(1),e.qZA()),2&te){const C=e.oxw().$implicit;e.xp6(1),e.Oqu(null==C||null==C.localizations[0]?null:C.localizations[0].name)}}function Pn(te,M){if(1&te&&(e.TgZ(0,"td",31)(1,"div",35)(2,"div",36),e.YNc(3,pr,1,0,"cgi-input",37),e.YNc(4,Sn,2,1,"ng-template",null,38,e.W1O),e.qZA()()()),2&te){const C=M.$implicit,Q=M.index,Ye=e.MAs(5),Zt=e.oxw(2);e.Q6J("formGroupName",Q),e.xp6(2),e.Q6J("formGroupName",0),e.xp6(1),e.Q6J("ngIf",Zt.editMode&&!C.id)("ngIfElse",Ye)}}function Nt(te,M){1&te&&(e.TgZ(0,"th",30),e._uU(1),e.ALo(2,"translate"),e.qZA()),2&te&&(e.xp6(1),e.hij(" ",e.lcZ(2,1,"Form.Label.OptionName")+" (SV)"," "))}function ai(te,M){1&te&&e._UZ(0,"cgi-input",39)}function hn(te,M){if(1&te&&(e.TgZ(0,"span"),e._uU(1),e.qZA()),2&te){const C=e.oxw(2).$implicit;e.xp6(1),e.Oqu(null==C||null==C.localizations[1]?null:C.localizations[1].name)}}function Le(te,M){if(1&te&&e.YNc(0,hn,2,1,"span",33),2&te){const C=e.oxw().$implicit,Q=e.oxw(2);e.Q6J("ngIf",!Q.editMode||C.id)}}function ce(te,M){if(1&te&&(e.TgZ(0,"td",31)(1,"div",35)(2,"div",36),e.YNc(3,ai,1,0,"cgi-input",37),e.YNc(4,Le,1,1,"ng-template",null,40,e.W1O),e.qZA()()()),2&te){const C=M.$implicit,Q=M.index,Ye=e.MAs(5),Zt=e.oxw(2);e.Q6J("formGroupName",Q),e.xp6(2),e.Q6J("formGroupName",1),e.xp6(1),e.Q6J("ngIf",Zt.editMode&&!C.id)("ngIfElse",Ye)}}function we(te,M){1&te&&(e.TgZ(0,"th",30),e._uU(1),e.ALo(2,"translate"),e.qZA()),2&te&&(e.xp6(1),e.hij(" ",e.lcZ(2,1,"Form.Label.OptionName")+" (EN)"," "))}function Qe(te,M){1&te&&e._UZ(0,"cgi-input",39)}function qt(te,M){if(1&te&&(e.TgZ(0,"span"),e._uU(1),e.qZA()),2&te){const C=e.oxw().$implicit;e.xp6(1),e.Oqu(null==C||null==C.localizations[2]?null:C.localizations[2].name)}}function Tn(te,M){if(1&te&&(e.TgZ(0,"td",31)(1,"div",35)(2,"div",36),e.YNc(3,Qe,1,0,"cgi-input",37),e.YNc(4,qt,2,1,"ng-template",null,41,e.W1O),e.qZA()()()),2&te){const C=M.$implicit,Q=M.index,Ye=e.MAs(5),Zt=e.oxw(2);e.Q6J("formGroupName",Q),e.xp6(2),e.Q6J("formGroupName",2),e.xp6(1),e.Q6J("ngIf",Zt.editMode&&!C.id)("ngIfElse",Ye)}}function lr(te,M){1&te&&e._UZ(0,"th",30)}function mo(te,M){if(1&te){const C=e.EpF();e.TgZ(0,"ion-button",44),e.NdJ("click",function(){e.CHM(C);const Ye=e.oxw().index,Zt=e.oxw(2);return e.KtG(Zt.onDeleteOption(Ye))}),e._UZ(1,"cgi-icon",45),e.qZA()}}function rr(te,M){if(1&te&&(e.TgZ(0,"td",42),e.YNc(1,mo,2,0,"ion-button",43),e.qZA()),2&te){const C=M.$implicit,Q=e.oxw(2);e.xp6(1),e.Q6J("ngIf",Q.editMode&&!C.id)}}function aa(te,M){1&te&&e._UZ(0,"tr",46)}function ea(te,M){1&te&&e._UZ(0,"tr",47)}gr.\u0275fac=function(M){return new(M||gr)(e.LFG(g.eN),e.LFG(l.SiviProjectsGatewayService))},gr.\u0275prov=e.Yz7({token:gr,factory:gr.\u0275fac});const Bo=function(te){return{edit:te}},Ii=function(te){return{"edit addrow":te}};function an(te,M){if(1&te&&(e.TgZ(0,"ion-grid",1)(1,"ion-row",2),e.YNc(2,Hi,2,1,"ion-col",3),e.YNc(3,Gr,3,5,"ng-template",null,4,e.W1O),e.TgZ(5,"ion-col",5),e.YNc(6,zr,3,8,"cgi-input",6),e.qZA(),e.TgZ(7,"ion-col",7),e.YNc(8,Eo,3,4,"ion-button",8),e.qZA(),e.TgZ(9,"ion-col",9),e.YNc(10,mr,3,4,"ion-button",10),e.YNc(11,jn,4,6,"ion-button",11),e.qZA()(),e.TgZ(12,"ion-row",12)(13,"table",13),e.ynx(14,14),e.YNc(15,ct,3,3,"th",15),e.YNc(16,Ni,3,3,"td",16),e.BQk(),e.ynx(17,17),e.YNc(18,Nn,3,3,"th",15),e.YNc(19,Pn,6,4,"td",16),e.BQk(),e.ynx(20,18),e.YNc(21,Nt,3,3,"th",15),e.YNc(22,ce,6,4,"td",16),e.BQk(),e.ynx(23,19),e.YNc(24,we,3,3,"th",15),e.YNc(25,Tn,6,4,"td",16),e.BQk(),e.ynx(26,20),e.YNc(27,lr,1,0,"th",15),e.YNc(28,rr,2,1,"td",21),e.BQk(),e.YNc(29,aa,1,0,"tr",22),e.YNc(30,ea,1,0,"tr",23),e.qZA()()()),2&te){const C=e.MAs(4),Q=e.oxw();e.Q6J("formGroup",Q.form),e.xp6(2),e.Q6J("ngIf",!Q.option.id||Q.editMode&&Q.option.restEntityState!==Q.constants.CURRENT)("ngIfElse",C),e.xp6(4),e.Q6J("ngIf",Q.option.validUntil),e.xp6(2),e.Q6J("ngIf",Q.option.tempId),e.xp6(2),e.Q6J("ngIf",Q.showEditButton(Q.option)),e.xp6(1),e.Q6J("ngIf",Q.showAddRowButton(Q.option)),e.xp6(2),e.Q6J("dataSource",Q.tableData)("trackBy",Q.trackFn)("ngClass",e.VKq(13,Bo,Q.editMode))("ngClass",e.VKq(15,Ii,Q.addRow)),e.xp6(16),e.Q6J("matHeaderRowDef",Q.displayedColumns),e.xp6(1),e.Q6J("matRowDefColumns",Q.displayedColumns)}}class Zn extends l.SiviAbstractForm{set option(M){(0,He.isEqual)(M,this.form.getRawValue())||(this._option=M,this.initForm())}get option(){return this._option}constructor(M,C,Q,Ye,Zt){super(),this.notify=M,this.translate=C,this.router=Q,this.siviProjectsGatewayService=Ye,this.fb=Zt,this.quickHandlingOptions=[],this.readonly=!1,this.valueChange=new e.vpe,this.cancelTable=new e.vpe,this.constants=l.Constants,this.dateFormats=l.DateFormats,this.fromDates=[],this.editMode=!1,this.addRow=!1,this.minDate=rn().add(1,"days").format("YYYY-MM-DD"),this.editOptionLabel=this.translate.instant("Message.Edit",{name:this.translate.instant("Message.Edit")}),this.deleteOptionLabel=this.translate.instant("Message.Delete",{name:this.translate.instant("Message.Delete")}),this.displayedColumns=["handlingType","optionFi","optionSv","optionEn","button"],this.form=this.fb.group({fromDate:[""],municipalityId:[""],restEntityState:[""],quickHandlingOptions:this.fb.array([])})}initForm(){this.option.tempId&&(this.editMode=!0),this.option.quickHandlingOptions||(this.option.quickHandlingOptions=[]),this.setFormValues(),this.setFromDateValidator()}get tableData(){return this.form?this.form.get("quickHandlingOptions").value:[]}setFormValues(){this.option.id?this.form.addControl("id",new Ct.p4(this.option.id)):this.form.addControl("tempId",new Ct.p4(this.option.tempId)),Object.keys(this.option).includes("validUntil")&&this.form.addControl("validUntil",new Ct.p4(this.option.validUntil)),this.form.get("fromDate").setValue(this.option.fromDate),this.form.get("municipalityId").setValue(this.option.municipalityId),this.form.get("restEntityState").setValue(this.option.restEntityState),this.form.get("quickHandlingOptions").clear(),this.option.quickHandlingOptions.forEach(M=>{this.onAddRow(M)})}getFormattedTimeOrDate(M){return l.Utils.convertDateToFinnishStandard(M)}onClickEdit(){var M=this;return(0,o.Z)(function*(){M.option.restEntityState===l.Constants.FUTURE?(yield M.notify.createConfirmationPopUp("Message.EditFutureValues.Title","Message.EditFutureValues.Message","General.Buttons.Continue")).onDidDismiss().then(Q=>{Q&&Q.data&&(M.editMode=!0)}):M.editMode=!0})()}onDeleteOption(M){var C=this;return(0,o.Z)(function*(){(yield C.notify.deleteConfirmPopup()).onDidDismiss().then(Ye=>{Ye&&Ye.data&&C.onDeleteRow(M)})})()}onDeleteRow(M){this.form.get("quickHandlingOptions").removeAt(M)}onCancelTable(){this.cancelTable.emit(this.option)}onAddRow(M){const C=M?this.createExistingRow(M):this.createEmptyRow();this.form.get("quickHandlingOptions").push(C)}createEmptyRow(){const M=[l.SiviValidators.required],Q=["fi","sv","en"].map(Zt=>this.fb.group({lang:[Zt],name:["",M]}));return this.fb.group({handlingType:["",M],tempId:[l.Utils.createUUID()],localizations:this.fb.array(Q)})}createExistingRow(M){const C=["fi","sv","en"].map((Ye,Zt)=>this.fb.group({createdDate:[M.localizations[Zt].createdDate],id:[M.localizations[Zt].id],parentId:[M.localizations[Zt].parentId],lang:[Ye],name:[M.localizations[Zt].name]})),Q=this.fb.group({createdDate:[(0,He.get)(M,"createdDate")],handlingType:[(0,He.get)(M,"handlingType")],id:[(0,He.get)(M,"id")],localizations:this.fb.array(C)});return M.createdBy&&Q.patchValue({createdBy:M.createdBy}),Q}onFormValueChange(M){this.valueChange.emit(M)}onClickAddRow(){this.onAddRow(),this.addRow=!0}setFromDateValidator(){const M=this.option.id||this.option.tempId,C=this.editMode?[l.SiviValidators.required,l.SiviValidators.validateDate(),l.SiviValidators.validateDateLaterThanToday(),l.SiviValidators.checkUniqueness(this.fromDates,M)]:[];this.form.get("fromDate").setValidators(C)}showAddRowButton(M){return(M.restEntityState===l.Constants.CURRENT||M.restEntityState===l.Constants.FUTURE)&&this.editMode&&!this.readonly||!M.id}showEditButton(M){return(M.restEntityState===l.Constants.FUTURE||M.restEntityState===l.Constants.CURRENT)&&M.id&&!this.editMode&&!this.readonly}trackFn(M,C){return C.tempId||C.id}isComponentValid(){return this.form.valid&&!!this.form.get("quickHandlingOptions").getRawValue().length}}Zn.\u0275fac=function(M){return new(M||Zn)(e.Y36(l.NotifyService),e.Y36(T.sK),e.Y36(j.F0),e.Y36(l.SiviProjectsGatewayService),e.Y36(Ct.QS))},Zn.\u0275cmp=e.Xpm({type:Zn,selectors:[["sivi-mun-set-quick-handling-option"]],inputs:{option:"option",quickHandlingOptions:"quickHandlingOptions",readonly:"readonly"},outputs:{valueChange:"valueChange",cancelTable:"cancelTable"},features:[e.qOj],decls:1,vars:1,consts:[["siviLibForm","","class","ion-no-padding",3,"formGroup",4,"ngIf"],["siviLibForm","",1,"ion-no-padding",3,"formGroup"],[1,"ion-justify-content-start","ion-no-padding"],["size","12","size-md","3","class","ion-align-self-start ion-no-padding",4,"ngIf","ngIfElse"],["readonlyFromDate",""],["size","12","size-md","3"],[3,"viewMode","label","value",4,"ngIf"],["size","12","size-md","2","offset-md","2",1,"ion-text-end"],["no-min-width","","role","button","fill","outline","class","ion-margin-end",3,"click",4,"ngIf"],["size","12","size-md","2",1,"ion-text-end"],["no-min-width","","fill","outline","role","button","class","button-primary-inverted","class","ion-margin-end",3,"click",4,"ngIf"],["no-min-width","","role","button","fill","outline","class","button-primary-inverted","class","ion-margin-end",3,"click",4,"ngIf"],[1,"ion-no-padding"],["mat-table","","formArrayName","quickHandlingOptions",1,"mat-elevation-z8",3,"dataSource","trackBy","ngClass"],["matColumnDef","handlingType"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",3,"formGroupName",4,"matCellDef"],["matColumnDef","optionFi"],["matColumnDef","optionSv"],["matColumnDef","optionEn"],["matColumnDef","button"],["mat-cell","",4,"matCellDef"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["size","12","size-md","3",1,"ion-align-self-start","ion-no-padding"],["formControlName","fromDate","siviLibFormControl","","label","Form.Label.From",3,"minDate"],["size","12","size-md","3",1,"ion-no-padding"],[3,"viewMode","label","value"],["no-min-width","","role","button","fill","outline",1,"ion-margin-end",3,"click"],["no-min-width","","fill","outline","role","button",1,"ion-margin-end",3,"click"],["mat-header-cell",""],["mat-cell","",3,"formGroupName"],["formControlName","handlingType","siviLibFormControl","",3,"multiple","viewMode","options",4,"ngIf"],[4,"ngIf"],["formControlName","handlingType","siviLibFormControl","",3,"multiple","viewMode","options"],["formGroupName","localizations"],[3,"formGroupName"],["formControlName","name","siviLibFormControl","","type","text","label-position","floating",4,"ngIf","ngIfElse"],["viewOptionFi",""],["formControlName","name","siviLibFormControl","","type","text","label-position","floating"],["viewOptionSv",""],["viewOptionEn",""],["mat-cell",""],["color","primary","fill","clear","role","button","size","small","no-min-width","","class","ml2",3,"click",4,"ngIf"],["color","primary","fill","clear","role","button","size","small","no-min-width","",1,"ml2",3,"click"],["name","delete"],["mat-header-row",""],["mat-row",""]],template:function(M,C){1&M&&e.YNc(0,an,31,17,"ion-grid",0),2&M&&e.Q6J("ngIf",C.option)},dependencies:[D.mk,D.O5,E.YG,E.wI,E.jY,E.Nd,l.DatepickerComponent,st.BZ,st.fO,st.as,st.w1,st.Dz,st.nj,st.ge,st.ev,st.XQ,st.Gk,l.SelectComponent,l.SiviFormDirective,l.SiviFormControlDirective,Ct.JJ,Ct.JL,Ct.sg,Ct.u,Ct.x0,Ct.CE,D.uU,T.X$],styles:["table[_ngcontent-%COMP%]{width:100%;margin-bottom:30px}table[_ngcontent-%COMP%]   th.mat-mdc-header-cell[_ngcontent-%COMP%]{font-size:14px}table[_ngcontent-%COMP%]   cgi-input[_ngcontent-%COMP%]   ion-item[_ngcontent-%COMP%]{padding-bottom:20px}.mat-mdc-table.edit[_ngcontent-%COMP%]   th[_ngcontent-%COMP%], .mat-mdc-table.edit[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]{padding-bottom:8px;padding-top:8px;padding-right:16px}.mat-mdc-table.addrow[_ngcontent-%COMP%]   tr[_ngcontent-%COMP%]:last-of-type   td[_ngcontent-%COMP%]{vertical-align:bottom}cgi-icon[_ngcontent-%COMP%]{color:var(--ion-color-primary)}"]});const Ci=["siviContent"];function Xn(te,M){if(1&te&&(e.TgZ(0,"span"),e._uU(1),e.ALo(2,"async"),e.qZA()),2&te){const C=e.oxw();let Q;e.xp6(1),e.hij(" (",null==(Q=e.lcZ(2,1,C.siviGatewayService.getAppStateService().getMunicipality()))?null:Q.name,") ")}}function Et(te,M){if(1&te){const C=e.EpF();e.TgZ(0,"sivi-lib-navbar-action-button",14),e.NdJ("clicked",function(){e.CHM(C);const Ye=e.oxw();return e.KtG(Ye.onSaveOptions())}),e.qZA()}if(2&te){const C=e.oxw();e.Q6J("disabled",!C.canSave)}}function gn(te,M){if(1&te){const C=e.EpF();e.ynx(0),e.TgZ(1,"sivi-mun-set-quick-handling-option",16),e.NdJ("cancelTable",function(Ye){e.CHM(C);const Zt=e.oxw(2);return e.KtG(Zt.onDeleteOption(Ye))})("valueChange",function(Ye){e.CHM(C);const Zt=e.oxw(2);return e.KtG(Zt.handleValueChange(Ye))}),e.qZA(),e.BQk()}if(2&te){const C=M.$implicit,Q=e.oxw(2);e.xp6(1),e.Q6J("option",C)("readonly",Q.readonly)("quickHandlingOptions",Q.quickHandlingOptions)}}function ei(te,M){if(1&te&&(e.TgZ(0,"div"),e.YNc(1,gn,2,3,"ng-container",15),e.qZA()),2&te){const C=e.oxw();e.xp6(1),e.Q6J("ngForOf",C.activeOptions)("ngForTrackBy",C.trackByFn)}}function un(te,M){1&te&&(e._uU(0),e.ALo(1,"translate")),2&te&&e.hij(" ",e.lcZ(1,1,"Message.NoDataFound")," ")}function Ft(te,M){if(1&te){const C=e.EpF();e.TgZ(0,"ion-button",17),e.NdJ("click",function(){e.CHM(C);const Ye=e.oxw();return e.KtG(Ye.onClickAdd())}),e.ALo(1,"translate"),e._uU(2),e.ALo(3,"translate"),e.qZA()}2&te&&(e.uIk("aria-label",e.lcZ(1,2,"General.Buttons.NewReasons")),e.xp6(2),e.hij(" ",e.lcZ(3,4,"General.Buttons.NewReasons")," "))}function Ut(te,M){if(1&te){const C=e.EpF();e.ynx(0),e.TgZ(1,"sivi-mun-set-quick-handling-option",18),e.NdJ("valueChange",function(Ye){e.CHM(C);const Zt=e.oxw(2);return e.KtG(Zt.handleValueChange(Ye))}),e.qZA(),e.BQk()}if(2&te){const C=M.$implicit,Q=e.oxw(2);e.xp6(1),e.Q6J("option",C)("readonly",Q.readonly)("quickHandlingOptions",Q.quickHandlingOptions)}}function wn(te,M){if(1&te&&(e.TgZ(0,"div"),e.YNc(1,Ut,2,3,"ng-container",15),e.qZA()),2&te){const C=e.oxw();e.xp6(1),e.Q6J("ngForOf",C.futureOptions)("ngForTrackBy",C.trackByFn)}}function Gn(te,M){1&te&&(e._uU(0),e.ALo(1,"translate")),2&te&&e.hij(" ",e.lcZ(1,1,"Message.NoDataFound")," ")}function xi(te,M){if(1&te&&(e.ynx(0),e._UZ(1,"sivi-mun-set-quick-handling-option",19),e.BQk()),2&te){const C=M.$implicit,Q=e.oxw(2);e.xp6(1),e.Q6J("option",C)("readonly",Q.readonly)("quickHandlingOptions",Q.quickHandlingOptions)}}function Cr(te,M){if(1&te&&(e.TgZ(0,"div"),e.YNc(1,xi,2,3,"ng-container",15),e.qZA()),2&te){const C=e.oxw();e.xp6(1),e.Q6J("ngForOf",C.historyOptions)("ngForTrackBy",C.trackByFn)}}function Fr(te,M){1&te&&(e._uU(0),e.ALo(1,"translate")),2&te&&e.hij(" ",e.lcZ(1,1,"Message.NoDataFound")," ")}class en extends l.SiviPage{constructor(M,C,Q,Ye,Zt,Pi,Ir,xo,Qa){super(Pi,M,C),this.translate=M,this.router=C,this.route=Q,this.unsavedChanges=Ye,this.siviGatewayService=Zt,this.notifyService=Pi,this.modalCtrl=Ir,this.quickHandleService=xo,this.languageService=Qa,this.options=[],this.historyOptions=[],this.activeOptions=[],this.futureOptions=[],this.quickHandlingOptions=[],this.showNewOptionButton=!0,this.fromDates=[],this.oldFromDates=[],this.loading=!0,this.saving=!1,this.readonly=!this.siviGatewayService.getAuthService().hasAnyRole([l.Roles.MUNICIPALITY_ADMIN]),this.municipalityId=this.route.snapshot.paramMap.get("municipalityId")}ngOnInit(){this.getQuickHandlingOptions(this.municipalityId)}get hasChanges(){return!(0,X.Z)(this.originalEntities,this.currentEntities)}get canSave(){return this.hasChanges&&!this.saving&&!this.loading}createHandlingOptions(M){return M.childCodes.forEach(C=>{C.value=C.name,C.text=this.translate.instant(C.name)}),M.childCodes}getQuickHandlingOptions(M){this.loading=!0,this.contentLoader.showLoader();const C=this.quickHandleService.getQuickHandleOptionsByMunicipalityId(M),Q=this.quickHandleService.getQuickHandlingTypes();this.languageService.getUserLanguage().pipe((0,n.q)(1)).subscribe(Ye=>this.userLanguage=Ye),(0,Be.D)([C,Q]).pipe((0,n.q)(1)).subscribe(Ye=>{const Zt=l.Utils.sortArrayByDate(Ye[0].content);this.quickHandlingOptions=this.createHandlingOptions(Ye[1]),this.filterOptions(Zt),this.contentLoader.hideLoader(),this.watchForValueChanges([this.activeOptions,this.futureOptions,this.historyOptions])},Ye=>{console.error("getQuickHandleOptions failed",Ye),this.contentLoader.showError()},()=>{this.loading=!1})}onSaveOptions(){if(!this.isPageValid())return void this.goToInvalid$.next();const M=this.getPayload();this.saveOptions(M)}saveOptions(M){var C=this;return(0,o.Z)(function*(){C.saving=!0,C.contentLoader.showSavingLoader(),C.quickHandleService.saveQuickHandleOptions(M).pipe((0,n.q)(1)).subscribe(function(){var Q=(0,o.Z)(function*(Ye){C.contentLoader.showContent(Ye);const Zt=l.Utils.sortArrayByDate(Ye.quickHandlingOptionList);C.filterOptions(Zt),C.showNewOptionButton=!0,C.watchForValueChanges([C.activeOptions,C.futureOptions,C.historyOptions]),C.notify.toastSaveSuccess(),C.saving=!1});return function(Ye){return Q.apply(this,arguments)}}(),Q=>{C.saving=!1,C.contentLoader.hideLoader(),console.error("Saving quick handling options failed",Q),null==Q.error?C.notify.alertFormSaveFailed():C.notify.alertBackendError(Q.error.message)})})()}canDeactivate(){return!this.hasChanges}onDismiss(){this.unsavedChanges.canDeactivate(this).pipe((0,n.q)(1)).subscribe(M=>{M&&this.modalCtrl.dismiss(null)})}handleValueChange(M){const C=M.restEntityState===l.Constants.CURRENT?this.activeOptions:this.futureOptions,Q=C.findIndex(Ye=>M.id?M.id===Ye.id:M.tempId===Ye.tempId);Q>-1?C[Q]={...C[Q],...M}:console.warn("No index found")}onClickAdd(){this.activeOptions.unshift(this.createOption()),this.showNewOptionButton=!1}getFromDates(){this.oldFromDates=this.fromDates;const M=[],C=this.optionsChildren.toArray();C.forEach(Q=>{if(l.Utils.isISODate(Q.option.fromDate)){const Ye={id:Q.option.id||Q.option.tempId,fromDate:l.Utils.convertDateToFinnishStandard(Q.option.fromDate)};M.push(Ye)}}),(0,X.Z)(M,this.oldFromDates)||(C.forEach(Q=>{Q.fromDates=M,Q.setFromDateValidator()}),this.fromDates=M)}onDeleteOption(M){var C=this;return(0,o.Z)(function*(){(yield C.notify.deleteConfirmPopup()).onDidDismiss().then(Ye=>{Ye.data&&(C.activeOptions=C.activeOptions.filter(Zt=>Zt.tempId!==M.tempId),C.showNewOptionButton=!0,C.notify.toastDeleteSuccess())})})()}isPageValid(){return this.updateWatchedEntities([this.activeOptions,this.futureOptions,this.historyOptions]),this.getFromDates(),this.optionsChildren.toArray().every(Q=>Q.isComponentValid())}getPayload(){const C=this.optionsChildren.toArray().map(Q=>{const Ye=Q.form.value;return{...Ye,quickHandlingOptions:this.removeEmptyRows(Ye.quickHandlingOptions)}});return C.forEach(Q=>{Q.quickHandlingOptions.forEach(Ye=>{Ye.localizations.forEach(Zt=>{Zt.name=Zt&&Zt.name&&Zt.name.trim()})})}),{quickHandlingOptionList:C}}removeEmptyRows(M){return M.filter(Q=>{if(Q.handlingType||Q.localizations[0].name||Q.localizations[1].name||Q.localizations[2].name)return Q})}createOption(){return{municipalityId:this.municipalityId,tempId:(Date.now()*Math.random()).toString(),quickHandlingOptions:[]}}filterOptions(M){const C=M.filter(Zt=>Zt.restEntityState===l.Constants.CURRENT),Q=M.filter(Zt=>Zt.restEntityState===l.Constants.FUTURE||Zt.tempId),Ye=M.filter(Zt=>Zt.restEntityState===l.Constants.EXPIRED);this.activeOptions=(0,ve.Z)(C),this.futureOptions=(0,ve.Z)(Q),this.historyOptions=(0,ve.Z)(Ye)}}en.\u0275fac=function(M){return new(M||en)(e.Y36(T.sK),e.Y36(j.F0),e.Y36(j.gz),e.Y36(l.UnsavedChangesGuard),e.Y36(l.SiviProjectsGatewayService),e.Y36(l.NotifyService),e.Y36(l.SiviModalController),e.Y36(gr),e.Y36(l.LanguageService))},en.\u0275cmp=e.Xpm({type:en,selectors:[["sivi-mun-set-application-quick-handling"]],viewQuery:function(M,C){if(1&M&&(e.Gf(Ci,7),e.Gf(Zn,5)),2&M){let Q;e.iGM(Q=e.CRH())&&(C.contentLoader=Q.first),e.iGM(Q=e.CRH())&&(C.optionsChildren=Q)}},features:[e.qOj],decls:33,vars:25,consts:[[3,"closeButton","hideNotifications","closed"],["navbar-title",""],[4,"ngIf"],["navbar-buttons-right",""],[3,"disabled","clicked",4,"ngIf"],[1,"ion-padding",3,"siviGoToInvalid"],["skeleton","form",3,"loadingByDefault"],["siviContent",""],[4,"ngIf","ngIfElse"],["noActiveOptions",""],["fill","outline",3,"click",4,"ngIf"],[1,"bg-light"],["noFutureOptions",""],["noHistoryOptions",""],[3,"disabled","clicked"],[4,"ngFor","ngForOf","ngForTrackBy"],[3,"option","readonly","quickHandlingOptions","cancelTable","valueChange"],["fill","outline",3,"click"],[3,"option","readonly","quickHandlingOptions","valueChange"],[3,"option","readonly","quickHandlingOptions"]],template:function(M,C){if(1&M&&(e.TgZ(0,"ion-header")(1,"sivi-lib-navbar",0),e.NdJ("closed",function(){return C.onDismiss()}),e.TgZ(2,"div",1),e._uU(3),e.ALo(4,"translate"),e.YNc(5,Xn,3,3,"span",2),e.qZA(),e.TgZ(6,"div",3),e.YNc(7,Et,1,1,"sivi-lib-navbar-action-button",4),e.qZA()()(),e.TgZ(8,"ion-content",5)(9,"sivi-lib-content-loader",6,7)(11,"div")(12,"h2"),e._uU(13),e.ALo(14,"translate"),e.qZA(),e.YNc(15,ei,2,2,"div",8),e.YNc(16,un,2,3,"ng-template",null,9,e.W1O),e.YNc(18,Ft,4,6,"ion-button",10),e.qZA(),e.TgZ(19,"div",11)(20,"h2"),e._uU(21),e.ALo(22,"translate"),e.qZA(),e.YNc(23,wn,2,2,"div",8),e.YNc(24,Gn,2,3,"ng-template",null,12,e.W1O),e.qZA(),e.TgZ(26,"div")(27,"h2"),e._uU(28),e.ALo(29,"translate"),e.qZA(),e.YNc(30,Cr,2,2,"div",8),e.YNc(31,Fr,2,3,"ng-template",null,13,e.W1O),e.qZA()()()),2&M){const Q=e.MAs(17),Ye=e.MAs(25),Zt=e.MAs(32);e.xp6(1),e.Q6J("closeButton",!0)("hideNotifications",!0),e.xp6(2),e.hij(" ",e.lcZ(4,17,"QuickHandlingReason.Title")," "),e.xp6(2),e.Q6J("ngIf",C.municipalityId),e.xp6(2),e.Q6J("ngIf",!C.readonly),e.xp6(1),e.Q6J("siviGoToInvalid",C.goToInvalid$),e.xp6(1),e.Q6J("loadingByDefault",!0),e.xp6(4),e.Oqu(e.lcZ(14,19,"General.Text.Active")),e.xp6(2),e.Q6J("ngIf",C.activeOptions.length>0)("ngIfElse",Q),e.xp6(3),e.Q6J("ngIf",C.showNewOptionButton&&!C.readonly),e.xp6(3),e.Oqu(e.lcZ(22,21,"General.Text.Future")),e.xp6(2),e.Q6J("ngIf",C.futureOptions.length>0)("ngIfElse",Ye),e.xp6(5),e.Oqu(e.lcZ(29,23,"General.Text.History")),e.xp6(2),e.Q6J("ngIf",C.historyOptions.length>0)("ngIfElse",Zt)}},dependencies:[D.sg,D.O5,E.YG,E.W2,E.Gu,l.ContentLoaderComponent,l.GoToInvalidDirective,l.NavbarComponent,l.NavbarActionButtonComponent,Zn,D.Ov,T.X$],styles:[".bg-light[_ngcontent-%COMP%]{background-color:var(--ion-color-light);margin:16px -24px;padding:24px}"]});const Wn=[{path:"application-quick-handling",component:en,canDeactivate:[l.UnsavedChangesGuard]}];class at{}at.\u0275fac=function(M){return new(M||at)},at.\u0275mod=e.oAB({type:at}),at.\u0275inj=e.cJS({providers:[gr,l.SiviProjectsGatewayService,l.SiviModalController],imports:[Gi,l.NavbarComponentModule,j.Bz.forChild(Wn),l.DatepickerModule,st.p0,l.SelectComponentModule,l.SiviFormsModule,l.DirectivesModule]});class It{constructor(M){this.modalCtrl=M}updateInstruction(M,C){this.contextualInstruction={...this.contextualInstruction,["translation"+M]:C}}onEdit(){this.modalCtrl.dismiss(this.contextualInstruction)}onCancel(){this.modalCtrl.dismiss()}}It.\u0275fac=function(M){return new(M||It)(e.Y36(l.SiviModalController))},It.\u0275cmp=e.Xpm({type:It,selectors:[["sivi-mun-set-contextual-instructions-editor-modal"]],inputs:{contextualInstruction:"contextualInstruction"},decls:27,vars:24,consts:[[1,"ion-padding"],[3,"toolbar","value","allowImages","update"],[1,"ion-text-right"],["color","primary","fill","outline",3,"click"],["color","primary",3,"click"]],template:function(M,C){1&M&&(e.TgZ(0,"ion-content",0)(1,"ion-grid")(2,"ion-row")(3,"ion-col"),e._uU(4),e.ALo(5,"translate"),e.TgZ(6,"sivi-lib-html-editor",1),e.NdJ("update",function(Ye){return C.updateInstruction("FI",Ye)}),e.qZA()()(),e.TgZ(7,"ion-row")(8,"ion-col"),e._uU(9),e.ALo(10,"translate"),e.TgZ(11,"sivi-lib-html-editor",1),e.NdJ("update",function(Ye){return C.updateInstruction("SV",Ye)}),e.qZA()()(),e.TgZ(12,"ion-row")(13,"ion-col"),e._uU(14),e.ALo(15,"translate"),e.TgZ(16,"sivi-lib-html-editor",1),e.NdJ("update",function(Ye){return C.updateInstruction("EN",Ye)}),e.qZA()()()()(),e.TgZ(17,"ion-footer")(18,"ion-grid",2)(19,"ion-row")(20,"ion-col")(21,"ion-button",3),e.NdJ("click",function(){return C.onCancel()}),e._uU(22),e.ALo(23,"translate"),e.qZA(),e.TgZ(24,"ion-button",4),e.NdJ("click",function(){return C.onEdit()}),e._uU(25),e.ALo(26,"translate"),e.qZA()()()()()),2&M&&(e.xp6(4),e.hij(" ",e.lcZ(5,14,"General.Language.Code.fi")," "),e.xp6(2),e.Q6J("toolbar",C.contextualInstruction.allowFormatting)("value",C.contextualInstruction.translationFI)("allowImages",!1),e.xp6(3),e.hij(" ",e.lcZ(10,16,"General.Language.Code.sv")," "),e.xp6(2),e.Q6J("toolbar",C.contextualInstruction.allowFormatting)("value",C.contextualInstruction.translationSV)("allowImages",!1),e.xp6(3),e.hij(" ",e.lcZ(15,18,"General.Language.Code.en")," "),e.xp6(2),e.Q6J("toolbar",C.contextualInstruction.allowFormatting)("value",C.contextualInstruction.translationEN)("allowImages",!1),e.xp6(6),e.hij(" ",e.lcZ(23,20,"General.Buttons.Cancel")," "),e.xp6(3),e.hij(" ",e.lcZ(26,22,"General.Buttons.Ok")," "))},dependencies:[E.YG,E.wI,E.W2,E.fr,E.jY,E.Nd,l.HtmlEditorComponent,T.X$],styles:["sivi-lib-html-editor[_ngcontent-%COMP%]{height:300px}"]});const Qt=["contentLoader"];function St(te,M){1&te&&(e.TgZ(0,"th",18),e._uU(1),e.ALo(2,"translate"),e.qZA()),2&te&&(e.xp6(1),e.hij(" ",e.lcZ(2,1,"General.Key")," "))}function Pt(te,M){if(1&te&&(e.TgZ(0,"td",19)(1,"p"),e._uU(2),e.qZA()()),2&te){const C=M.$implicit;e.xp6(2),e.Oqu(C.key)}}function cn(te,M){1&te&&(e.TgZ(0,"th",20),e._uU(1),e.ALo(2,"translate"),e.qZA()),2&te&&(e.xp6(1),e.hij(" ",e.lcZ(2,1,"General.Language.Code.fi")," "))}function Ln(te,M){if(1&te&&(e.TgZ(0,"td",19),e._UZ(1,"sivi-lib-html-renderer",21),e.qZA()),2&te){const C=M.$implicit;e.xp6(1),e.Q6J("text",C.translationFI)}}function ii(te,M){1&te&&(e.TgZ(0,"th",20),e._uU(1),e.ALo(2,"translate"),e.qZA()),2&te&&(e.xp6(1),e.hij(" ",e.lcZ(2,1,"General.Language.Code.sv")," "))}function hi(te,M){if(1&te&&(e.TgZ(0,"td",19),e._UZ(1,"sivi-lib-html-renderer",21),e.qZA()),2&te){const C=M.$implicit;e.xp6(1),e.Q6J("text",C.translationSV)}}function Ri(te,M){1&te&&(e.TgZ(0,"th",20),e._uU(1),e.ALo(2,"translate"),e.qZA()),2&te&&(e.xp6(1),e.hij(" ",e.lcZ(2,1,"General.Language.Code.en")," "))}function _r(te,M){if(1&te&&(e.TgZ(0,"td",22),e._UZ(1,"sivi-lib-html-renderer",21),e.qZA()),2&te){const C=M.$implicit;e.xp6(1),e.Q6J("text",C.translationEN)}}function er(te,M){1&te&&e._UZ(0,"tr",23)}function Yr(te,M){if(1&te){const C=e.EpF();e.TgZ(0,"tr",24),e.NdJ("click",function(){const Zt=e.CHM(C).$implicit,Pi=e.oxw();return e.KtG(Pi.showEditTranslationModal(Zt))}),e.qZA()}}class _o extends l.SiviPage{constructor(M,C,Q,Ye,Zt,Pi,Ir,xo,Qa){super(M,C,Q,Pi,Qa,Zt),this.notifyService=M,this.translate=C,this.router=Q,this.unsavedChanges=Ye,this.modalCtrl=Zt,this.route=Pi,this.siviProjectsGatewayService=Ir,this.contextualInstructionsService=xo,this.location=Qa,this.saving=!1,this.displayedColumns=["key","translationFI","translationSV","translationEN"],this.instructionsToUpdate=[]}ngOnInit(){this.getContextualInstructions()}getContextualInstructions(){this.contentLoader.showLoader(),this.contextualInstructionsService.getAll().subscribe(M=>{console.log("getContextualInstructions",M),this.contextualInstructions=M,this.watchForValueChanges(this.contextualInstructions),this.contentLoader.hideLoader()},M=>{console.error("getContextualInstructions failed",M),this.contentLoader.showError()})}showEditTranslationModal(M){var C=this;return(0,o.Z)(function*(){const Q={component:It,cssClass:["modal-extra-large-size","backdrop-color-enabled"],backdropDismiss:!0,showBackdrop:!0,componentProps:{contextualInstruction:M}};(yield C.openModal(Q,"applicationId")).onDidDismiss().then(Zt=>{Zt.data&&C.updateInstruction(Zt.data)})})()}updateInstruction(M){this.instructionsToUpdate.find(C=>C===M.key)||(this.instructionsToUpdate.push(M.key),console.log("updateInstruction",M.key)),this.contextualInstructions=l.Utils.patchImmutableCollectionBy(this.contextualInstructions,M,"key"),this.updateWatchedEntities(this.contextualInstructions)}save(){this.contentLoader.showSavingLoader();const M=re(this.contextualInstructions,this.instructionsToUpdate,(C,Q)=>C.key===Q);this.contextualInstructionsService.save(M).subscribe(()=>{this.notifyService.toastSaveSuccess(),this.watchForValueChanges(this.contextualInstructions),this.contentLoader.hideLoader(),this.instructionsToUpdate=[]},C=>{console.error("save failed",C),this.notifyService.alertSaveError(),this.contentLoader.hideLoader()})}onDismiss(){this.unsavedChanges.canDeactivate(this).pipe((0,n.q)(1)).subscribe(M=>{M&&this.modalCtrl.dismiss(null)})}}_o.\u0275fac=function(M){return new(M||_o)(e.Y36(l.NotifyService),e.Y36(T.sK),e.Y36(j.F0),e.Y36(l.UnsavedChangesGuard),e.Y36(l.SiviModalController),e.Y36(j.gz),e.Y36(l.SiviProjectsGatewayService),e.Y36(l.ContextualInstructionsService),e.Y36(D.Ye))},_o.\u0275cmp=e.Xpm({type:_o,selectors:[["sivi-mun-set-contextual-instructions-page"]],viewQuery:function(M,C){if(1&M&&e.Gf(Qt,7),2&M){let Q;e.iGM(Q=e.CRH())&&(C.contentLoader=Q.first)}},features:[e.qOj],decls:28,vars:12,consts:[[3,"closeButton","hideNotifications","closed"],["navbar-title",""],["navbar-buttons-right",""],[3,"disabled","clicked"],[1,"ion-padding"],["skeleton","form"],["contentLoader",""],["mat-table","",1,"mat-elevation-z8",3,"dataSource"],["matColumnDef","key"],["mat-header-cell","","class","column-key",4,"matHeaderCellDef"],["mat-cell","","class","cell-with-border",4,"matCellDef"],["matColumnDef","translationFI"],["mat-header-cell","",4,"matHeaderCellDef"],["matColumnDef","translationSV"],["matColumnDef","translationEN"],["mat-cell","",4,"matCellDef"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",3,"click",4,"matRowDef","matRowDefColumns"],["mat-header-cell","",1,"column-key"],["mat-cell","",1,"cell-with-border"],["mat-header-cell",""],[3,"text"],["mat-cell",""],["mat-header-row",""],["mat-row","",3,"click"]],template:function(M,C){1&M&&(e.TgZ(0,"ion-header")(1,"sivi-lib-navbar",0),e.NdJ("closed",function(){return C.onDismiss()}),e.TgZ(2,"div",1),e._uU(3),e.ALo(4,"translate"),e.qZA(),e.TgZ(5,"div",2)(6,"sivi-lib-navbar-action-button",3),e.NdJ("clicked",function(){return C.save()}),e.qZA()()()(),e.TgZ(7,"ion-content",4)(8,"sivi-lib-content-loader",5,6)(10,"p"),e._uU(11),e.ALo(12,"translate"),e.qZA(),e.TgZ(13,"table",7),e.ynx(14,8),e.YNc(15,St,3,3,"th",9),e.YNc(16,Pt,3,1,"td",10),e.BQk(),e.ynx(17,11),e.YNc(18,cn,3,3,"th",12),e.YNc(19,Ln,2,1,"td",10),e.BQk(),e.ynx(20,13),e.YNc(21,ii,3,3,"th",12),e.YNc(22,hi,2,1,"td",10),e.BQk(),e.ynx(23,14),e.YNc(24,Ri,3,3,"th",12),e.YNc(25,_r,2,1,"td",15),e.BQk(),e.YNc(26,er,1,0,"tr",16),e.YNc(27,Yr,1,0,"tr",17),e.qZA()()()),2&M&&(e.xp6(1),e.Q6J("closeButton",!0)("hideNotifications",!0),e.xp6(2),e.hij(" ",e.lcZ(4,8,"Page.ContextualInstructions.Title")," "),e.xp6(3),e.Q6J("disabled",C.saving||0===C.instructionsToUpdate.length),e.xp6(5),e.hij(" ",e.lcZ(12,10,"Page.ContextualInstructions.Description")," "),e.xp6(2),e.Q6J("dataSource",C.contextualInstructions),e.xp6(13),e.Q6J("matHeaderRowDef",C.displayedColumns),e.xp6(1),e.Q6J("matRowDefColumns",C.displayedColumns))},dependencies:[E.W2,E.Gu,l.ContentLoaderComponent,l.NavbarComponent,l.NavbarActionButtonComponent,st.BZ,st.fO,st.as,st.w1,st.Dz,st.nj,st.ge,st.ev,st.XQ,st.Gk,l.HtmlRendererComponent,T.X$],styles:["table[_ngcontent-%COMP%]{width:100%}td[_ngcontent-%COMP%]{vertical-align:top}.mat-column-key[_ngcontent-%COMP%]{width:10%}.mat-mdc-row[_ngcontent-%COMP%]{cursor:pointer}.mat-mdc-cell[_ngcontent-%COMP%]{padding-left:.5em;padding-right:.5em}.cell-with-border[_ngcontent-%COMP%]{border-right:1px solid #e0e0e0}"]});class Si{}Si.\u0275fac=function(M){return new(M||Si)},Si.\u0275mod=e.oAB({type:Si}),Si.\u0275inj=e.cJS({providers:[l.SiviModalController],imports:[Gi,l.NavbarComponentModule,l.HtmlEditorComponentModule,st.p0,l.HtmlRendererComponentModule]});class to extends l.AbstractRestService{constructor(M,C){super(M,C),this.http=M,this.siviProjectsGateway=C}getCreditAccounts(){return this.get("./api/vesa-invoicing/credit-settings")}getCreditAccountWithId(M){const C=`./api/vesa-invoicing/credit-settings/${M}`;return this.get(C)}getCreditAccountOrganizationStructure(M){const C=(new g.LE).set("periodStartDate",M),Ye=this.getCommonOptions();return this.get("./api/vesa-invoicing/credit-settings/draft?",{...Ye,params:C})}updateCreditSettings(M){return this.put(M,"./api/vesa-invoicing/credit-settings",this.getCommonOptions())}}function Oa(te,M){1&te&&(e.TgZ(0,"th",9)(1,"p",10),e._uU(2),e.ALo(3,"translate"),e.qZA()()),2&te&&(e.xp6(2),e.hij(" ",e.lcZ(3,1,"Application.View.Filters.Headers.ServiceForm")," "))}function Uo(te,M){if(1&te&&(e.TgZ(0,"td",11)(1,"p",10),e._uU(2),e.ALo(3,"translate"),e.qZA()()),2&te){const C=M.$implicit;e.xp6(2),e.Oqu(e.lcZ(3,1,C.name))}}function rl(te,M){1&te&&(e.TgZ(0,"th",9)(1,"p",10),e._uU(2),e.ALo(3,"translate"),e.qZA()()),2&te&&(e.xp6(2),e.hij(" ",e.lcZ(3,1,"Page.MunicipalitySettings.CreditAccounts.CreditAccount.Label")," "))}to.\u0275fac=function(M){return new(M||to)(e.LFG(g.eN),e.LFG(l.SiviProjectsGatewayService))},to.\u0275prov=e.Yz7({token:to,factory:to.\u0275fac});const Vs=function(te){return{readonly:te}};function ps(te,M){if(1&te&&(e.TgZ(0,"td",12),e._UZ(1,"cgi-input",13),e.qZA()),2&te){const C=M.$implicit,Q=e.oxw();e.Q6J("ngClass",e.VKq(5,Vs,Q.readonly)),e.xp6(1),e.Q6J("formControl",C.control)("siviCharacterCounter",60)("errorMessages",Q.maxLengthErrorMsg)("viewMode",Q.readonly)}}function ts(te,M){1&te&&e._UZ(0,"tr",14)}function gs(te,M){1&te&&e._UZ(0,"tr",15)}class tc extends l.SiviAbstractForm{set serviceForm(M){this._serviceForm=M,this.form&&this.form.patchValue(M)}get serviceForm(){return this._serviceForm}constructor(M,C){super(),this.translateService=M,this.fb=C,this.updateServiceForm=new e.vpe,this.form=this.fb.group({daycareCentre:new Ct.NI("",[l.SiviValidators.maxLength(60)]),familyDaycare:new Ct.NI("",[l.SiviValidators.maxLength(60)]),groupFamilyDaycare:new Ct.NI("",[l.SiviValidators.maxLength(60)]),club:new Ct.NI("",[l.SiviValidators.maxLength(60)])}),this.dataSource=[{name:"sivi.organization.type.daycareplace.type.daycarecentre",control:this.form.controls.daycareCentre},{name:"sivi.organization.type.daycareplace.type.familydaycare",control:this.form.controls.familyDaycare},{name:"sivi.organization.type.daycareplace.type.groupfamilydaycare",control:this.form.controls.groupFamilyDaycare},{name:"sivi.organization.type.decision.type.club",control:this.form.controls.club}],this.maxLengthErrorMsg={maxlength:this.translateService.instant("Form.Error.MaxLengthIsChactersCount",{count:60})},this.displayedColumns=["serviceForm","creditAccount"]}onFormValueChange(M){this.updateServiceForm.emit({serviceForm:M})}}function $a(te,M){if(1&te){const C=e.EpF();e.TgZ(0,"button",17),e.NdJ("click",function(){e.CHM(C);const Ye=e.oxw().$implicit,Zt=e.oxw();return e.KtG(Zt.toggleChildren(Ye))}),e.TgZ(1,"mat-icon",18),e._uU(2),e.qZA()()}if(2&te){const C=e.oxw().$implicit;e.xp6(2),e.Oqu(C.showChildren?"expand_less":"expand_more")}}function ln(te,M){if(1&te&&(e.ynx(0),e._UZ(1,"cgi-input",19),e.BQk()),2&te){const C=e.oxw().$implicit,Q=e.oxw();e.xp6(1),e.Q6J("formControl",Q.getFormControl(C.organizationId))("siviCharacterCounter",60)("errorMessages",Q.maxLengthErrorMsg)("viewMode",Q.readonly)}}tc.\u0275fac=function(M){return new(M||tc)(e.Y36(T.sK),e.Y36(Ct.qu))},tc.\u0275cmp=e.Xpm({type:tc,selectors:[["sivi-mun-set-credit-account-service-form"]],inputs:{serviceForm:"serviceForm",readonly:"readonly"},outputs:{updateServiceForm:"updateServiceForm"},features:[e.qOj],decls:11,vars:4,consts:[["siviLibForm","",3,"formGroup"],["mat-table","",1,"mat-elevation-z8",3,"dataSource"],["matColumnDef","serviceForm"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","creditAccount"],["mat-cell","",3,"ngClass",4,"matCellDef"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["mat-header-cell",""],[1,"weight-500","big"],["mat-cell",""],["mat-cell","",3,"ngClass"],["siviLibFormControl","","label-position","floating",1,"credit-account-input",3,"formControl","siviCharacterCounter","errorMessages","viewMode"],["mat-header-row",""],["mat-row",""]],template:function(M,C){1&M&&(e.TgZ(0,"form",0)(1,"ion-grid")(2,"table",1),e.ynx(3,2),e.YNc(4,Oa,4,3,"th",3),e.YNc(5,Uo,4,3,"td",4),e.BQk(),e.ynx(6,5),e.YNc(7,rl,4,3,"th",3),e.YNc(8,ps,2,7,"td",6),e.BQk(),e.YNc(9,ts,1,0,"tr",7),e.YNc(10,gs,1,0,"tr",8),e.qZA()()()),2&M&&(e.Q6J("formGroup",C.form),e.xp6(2),e.Q6J("dataSource",C.dataSource),e.xp6(7),e.Q6J("matHeaderRowDef",C.displayedColumns),e.xp6(1),e.Q6J("matRowDefColumns",C.displayedColumns))},dependencies:[D.mk,E.jY,l.SiviFormDirective,l.SiviFormControlDirective,l.SiviCharacterCounterDirective,Ct._Y,Ct.JJ,Ct.JL,Ct.oH,Ct.sg,st.BZ,st.fO,st.as,st.w1,st.Dz,st.nj,st.ge,st.ev,st.XQ,st.Gk,T.X$],styles:["table.mat-mdc-table[_ngcontent-%COMP%]{width:100%}table.mat-mdc-table[_ngcontent-%COMP%]   th[_ngcontent-%COMP%], table.mat-mdc-table[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]{padding:0 2em 30px;white-space:nowrap}.credit-account-input[_ngcontent-%COMP%]{width:100%}.readonly[_ngcontent-%COMP%]{text-align:right}"],changeDetection:0});const Mi=function(te){return["show-on-top",te]},Di=function(te){return["name",te]},Er=function(te){return{readonly:te}};function ur(te,M){if(1&te&&(e.TgZ(0,"div")(1,"ion-row",10)(2,"ion-col",11),e.YNc(3,$a,3,1,"button",12),e.qZA(),e.TgZ(4,"ion-col",13)(5,"p"),e._uU(6),e.qZA()(),e.TgZ(7,"ion-col",14),e.YNc(8,ln,2,4,"ng-container",15),e.qZA()(),e._UZ(9,"ion-row",16),e.qZA()),2&te){const C=M.$implicit,Q=e.oxw();e.xp6(2),e.Q6J("ngClass",e.VKq(8,Mi,"hierarchy-level-"+C.level))("rel",C.level),e.xp6(1),e.Q6J("ngIf",C.hasChildren),e.xp6(1),e.Q6J("ngClass",e.VKq(10,Di,"hierarchy-level-"+C.level))("rel",C.level),e.xp6(2),e.Oqu(C.name),e.xp6(1),e.Q6J("ngClass",e.VKq(12,Er,Q.readonly)),e.xp6(1),e.Q6J("ngIf",C.organizationId)}}class gi extends l.SiviAbstractForm{constructor(M,C){super(),this.translateService=M,this.fb=C,this.updateOrganizations=new e.vpe,this.openToggle=!1,this.displayedColumns=["actions","name","creditAccount"],this.maxLengthErrorMsg={maxlength:this.translateService.instant("Form.Error.MaxLengthIsChactersCount",{count:60})}}ngOnInit(){this.originalData=this.organizationAccountSettings;const M=this.flattenData(this.originalData,0,!1);this.dataSource=new st.by(M),this.initFormControls(M)}initFormControls(M){this.formGroups=M.reduce((C,Q)=>(C[Q.organizationId]=this.fb.group({organizationId:Q.organizationId,creditAccount:new Ct.NI(Q.creditAccount,[l.SiviValidators.maxLength(60)])}),C),{}),this.rowsFormArray=this.fb.array(Object.values(this.formGroups)),this.form=this.fb.group({rows:this.rowsFormArray})}flattenData(M,C,Q){const Ye=[];return M.forEach(Zt=>{const{childrenOrganizations:Pi,...Ir}=Zt,xo=!!Pi&&Pi.length>0,Qa={...Ir,level:C,showChildren:Zt.showChildren??Q,hasChildren:xo};if(Ye.push(Qa),xo&&Qa.showChildren){const ec=this.flattenData(Pi,C+1,Qa.showChildren);Ye.push(...ec)}}),Ye}toggleChildren(M){this.updateChildrenVisibility(this.originalData,M);const C=this.flattenData(this.originalData,0,!1);this.dataSource.data=C,C.forEach(Q=>{this.formGroups[Q.organizationId]||(this.formGroups[Q.organizationId]=this.fb.group({organizationId:Q.organizationId,creditAccount:new Ct.NI(Q.creditAccount,[l.SiviValidators.maxLength(60)])}))}),this.rowsFormArray=this.fb.array(Object.values(this.formGroups)),this.form.setControl("rows",this.rowsFormArray)}getFormControl(M){return this.formGroups?.[M]?.get("creditAccount")}updateChildrenVisibility(M,C){for(const Q of M)if(Q.organizationId===C.organizationId){if(Q.showChildren=!Q.showChildren,Q.childrenOrganizations&&Q.childrenOrganizations.length)for(const Ye of Q.childrenOrganizations)Ye.showChildren=!1,this.updateChildrenVisibility(Ye.childrenOrganizations,Ye)}else Q.childrenOrganizations&&Q.childrenOrganizations.length&&this.updateChildrenVisibility(Q.childrenOrganizations,C)}onFormValueChange(M){this.updateOrganizations.emit(M)}trackByFn(M,C){return C.organizationId}}gi.\u0275fac=function(M){return new(M||gi)(e.Y36(T.sK),e.Y36(Ct.qu))},gi.\u0275cmp=e.Xpm({type:gi,selectors:[["sivi-mun-set-credit-account-organizations"]],inputs:{organizationAccountSettings:"organizationAccountSettings",readonly:"readonly"},outputs:{updateOrganizations:"updateOrganizations"},features:[e.qOj],decls:20,vars:16,consts:[["siviLibForm","",3,"formGroup"],[1,"ion-align-items-stretch"],[1,"mat-elevation-z8","ml10"],[3,"open"],["slot","header",1,"header",3,"click"],[1,"ion-padding-start","ml4"],["slot","content",1,"content"],["offset","6","size","6"],[4,"ngFor","ngForOf","ngForTrackBy"],["slot","end",1,"mr5",3,"ariaLabel","open","click"],[1,"ion-align-items-center","row-padding"],["size","1",3,"ngClass","rel"],["mat-icon-button","",3,"click",4,"ngIf"],["size","5",3,"ngClass","rel"],["size","6",1,"input",3,"ngClass"],[4,"ngIf"],[1,"line"],["mat-icon-button","",3,"click"],["aria-hidden","false"],["siviLibFormControl","","label-position","floating",1,"credit-account-input",3,"formControl","siviCharacterCounter","errorMessages","viewMode"]],template:function(M,C){1&M&&(e.TgZ(0,"form",0)(1,"ion-grid")(2,"ion-row",1)(3,"ion-col")(4,"div",2)(5,"cgi-accordion-item",3)(6,"div",4),e.NdJ("click",function(){return C.openToggle=!C.openToggle}),e.TgZ(7,"h3",5),e._uU(8),e.ALo(9,"translate"),e.qZA()(),e.TgZ(10,"div",6)(11,"ion-grid")(12,"ion-row")(13,"ion-col",7),e._uU(14),e.ALo(15,"translate"),e.qZA()(),e.YNc(16,ur,10,14,"div",8),e.qZA()(),e.TgZ(17,"cgi-toggle-accordion",9),e.NdJ("click",function(){return C.openToggle=!C.openToggle}),e.ALo(18,"translate"),e.ALo(19,"translate"),e.qZA()()()()()()()),2&M&&(e.Q6J("formGroup",C.form),e.xp6(5),e.Q6J("open",C.openToggle),e.xp6(3),e.hij(" ",e.lcZ(9,8,"Organization.Singular")," "),e.xp6(6),e.Oqu(e.lcZ(15,10,"Page.MunicipalitySettings.CreditAccounts.CreditAccount.Label")),e.xp6(2),e.Q6J("ngForOf",C.dataSource.data)("ngForTrackBy",C.trackByFn),e.xp6(1),e.Q6J("ariaLabel",C.openToggle?e.lcZ(18,12,"General.Buttons.Close"):e.lcZ(19,14,"General.Buttons.Open"))("open",C.openToggle))},dependencies:[D.mk,D.sg,D.O5,E.wI,E.jY,E.Nd,l.SiviFormDirective,l.SiviFormControlDirective,l.SiviCharacterCounterDirective,Ct._Y,Ct.JJ,Ct.JL,Ct.oH,Ct.sg,nn.Hw,T.X$],styles:[".hierarchy-level-0[_ngcontent-%COMP%]{padding-left:0}.hierarchy-level-1[_ngcontent-%COMP%]{padding-left:2em}.hierarchy-level-2[_ngcontent-%COMP%]{padding-left:4em}.hierarchy-level-3[_ngcontent-%COMP%]{padding-left:6em}.hierarchy-level-4[_ngcontent-%COMP%]{padding-left:8em}.hierarchy-level-5[_ngcontent-%COMP%]{padding-left:10em}.hierarchy-level-6[_ngcontent-%COMP%]{padding-left:12em}.name[_ngcontent-%COMP%]{display:flex;text-align:left}.input[_ngcontent-%COMP%]{width:500px;text-align:left}table.mat-mdc-table[_ngcontent-%COMP%]{width:100%}table.mat-mdc-table[_ngcontent-%COMP%]   th[_ngcontent-%COMP%], table.mat-mdc-table[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]{padding:0 2em 30px;white-space:nowrap}.line[_ngcontent-%COMP%]{border-bottom:1px solid var(--ion-color-light-shade);padding-bottom:22px}.row-padding[_ngcontent-%COMP%]{padding:0 2em}.credit-account-input[_ngcontent-%COMP%]{width:100%}.readonly[_ngcontent-%COMP%]{text-align:right}"],changeDetection:0});const $t=["siviContent"];function Ma(te,M){if(1&te){const C=e.EpF();e.TgZ(0,"div",12)(1,"sivi-lib-navbar-action-button",13),e.NdJ("clicked",function(){e.CHM(C);const Ye=e.oxw();return e.KtG(Ye.onSaveCreditAccount())}),e.qZA()()}}function Vo(te,M){1&te&&(e.TgZ(0,"ion-col",6),e._UZ(1,"sivi-lib-datepicker",14),e.qZA()),2&te&&(e.xp6(1),e.Q6J("label","Form.Label.Until")("readonly",!0))}function Ds(te,M){if(1&te){const C=e.EpF();e.TgZ(0,"ion-row",15)(1,"ion-col",9)(2,"sivi-mun-set-credit-account-organizations",16),e.NdJ("updateOrganizations",function(Ye){e.CHM(C);const Zt=e.oxw();return e.KtG(Zt.onUpdateOrganizations(Ye))}),e.qZA()()()}if(2&te){const C=e.oxw();e.xp6(2),e.Q6J("organizationAccountSettings",C.organizationAccountSettings)("readonly",C.readonly)}}class ja extends l.SiviPage{get isChildComponentsValid(){return this.serviceFormComponent?.isValid&&this.organizationsComponent?.isValid}get readonly(){return this.readonly$.value}constructor(M,C,Q,Ye,Zt,Pi,Ir){super(M,C,Ye),this.notify=M,this.translateService=C,this.modalCtrl=Q,this.router=Ye,this.creditAccountsService=Zt,this.unsavedChanges=Pi,this.fb=Ir,this.readonly$=new ke.X(!1),this.creditAccountSettings=this.createCreditAccountSettings(),this.date=this.creditAccountSettings.validFrom,this.minDate=rn().add(1,"day").format(l.DateFormats.STANDARD),this.validFromErrorMsg={invalidDate:this.translate.instant("Form.Error.DateShouldBeInFuture"),notUniqValidFrom:this.translate.instant("Page.MunicipalitySettings.Error.NotUniqValidFromDate")},this.form=this.fb.group({validFrom:new Ct.NI("",[]),validUntil:new Ct.NI("",[])})}ngOnInit(){this.initializeCreditAccount(),this.handleSetValidators()}handleSetValidators(){(0,nt.a)([this.readonly$,this.futureCreditAccounts$]).pipe((0,w.R)(this.destroy$)).subscribe(([M,C])=>{const Q=C.filter(Ye=>Ye.id!==this.creditAccountId).map(Ye=>Ye.validFrom);this.setValidators(M,Q)})}setValidators(M,C){M||this.form.get("validFrom").addValidators([l.SiviValidators.required,l.SiviValidators.validateDateLaterThanToday(),l.SiviValidators.uniqueValidFromValidator(C)])}initializeCreditAccount(){this.creditAccountId!==l.Constants.NEW_ID?(this.contentLoader.showLoader(),this.creditAccountsService.getCreditAccountWithId(this.creditAccountId).pipe((0,n.q)(1),(0,P.x)(()=>this.contentLoader.hideLoader())).subscribe(M=>{this.updateComponentValues(M),this.readonly$.next(M.state!==l.Constants.FUTURE)},M=>{console.error(M),this.contentLoader.showError()})):(this.creditAccount={id:this.creditAccountId,state:l.Constants.FUTURE,validFrom:this.date},this.originalAccountValues=(0,ve.Z)(this.creditAccountSettings),this.getOrganizationAccountSettings(this.date),this.readonly$.next(!1))}getOrganizationAccountSettings(M){!M||this.creditAccountId!==l.Constants.NEW_ID||(this.contentLoader.showLoader(),this.creditAccountsService.getCreditAccountOrganizationStructure(M).subscribe(C=>{this.organizationAccountSettings=C.organizationAccountSettings.map(Q=>({...Q,creditAccount:Q.creditAccount})),this.flatOrganizationSettings=this.flattenOrganizations(C.organizationAccountSettings),this.originalFlatOrganizationValues=(0,ve.Z)(this.flatOrganizationSettings),this.contentLoader.hideLoader()},C=>{console.error(C),this.contentLoader.showError()}))}onFormValueChange(M){M.validFrom&&M.validFrom!==this.date&&(this.date=M.validFrom,this.getOrganizationAccountSettings(this.date)),this.creditAccountSettings={...this.creditAccountSettings,...M}}onUpdateOrganizations(M){M.rows.forEach(C=>{const Q=this.flatOrganizationSettings.findIndex(Ye=>Ye.organizationId===C.organizationId);Q>-1&&(this.flatOrganizationSettings[Q]={...this.flatOrganizationSettings[Q],...C})}),this.organizationAccountSettings=M.rows.map((C,Q)=>({...this.organizationAccountSettings[Q],...C}))}onSaveCreditAccount(){if(!this.isValid||!this.isChildComponentsValid)return void this.goToInvalid$.next();this.contentLoader.showLoader();const M=this.createCreditAccountDto();this.creditAccountsService.updateCreditSettings(M).pipe((0,P.x)(()=>this.contentLoader.hideLoader())).subscribe(C=>{this.updateComponentValues(C),this.notify.toastSaveSuccess()},C=>{console.error(C),this.notify.alertBackendErrorWithCode(C,"Message.Save.Error")})}updateComponentValues(M){this.creditAccountId!==M.id&&(this.creditAccountId=M.id),this.form.get("validUntil").patchValue(M.validUntil),this.form.get("validFrom").patchValue(M.validFrom),this.date=M.validFrom,this.organizationAccountSettings=(0,ve.Z)(M.organizationAccountSettings),this.flatOrganizationSettings=this.flattenOrganizations(M.organizationAccountSettings),this.creditAccountSettings=this.createCreditAccountSettings(M),this.creditAccount=(0,ve.Z)(M),this.originalFlatOrganizationValues=(0,ve.Z)(this.flatOrganizationSettings),this.originalAccountValues=(0,ve.Z)(this.creditAccountSettings)}flattenOrganizations(M){const C=[];return M?.forEach(Q=>{const Ye=Q.childrenOrganizations?.length>0;C.push({organizationId:Q.organizationId,id:Q.id,creditAccount:Q.creditAccount,name:Q.name}),Ye&&C.push(...this.flattenOrganizations(Q.childrenOrganizations))}),C}createCreditAccountSettings(M=null){return(0,ye.Z)(M)?{serviceForm:{daycareCentre:"",familyDaycare:"",groupFamilyDaycare:"",club:""},validFrom:"",validUntil:""}:{validFrom:M.validFrom,validUntil:M.validUntil,serviceForm:{club:M.clubCreditAccount,daycareCentre:M.daycareCentreCreditAccount,familyDaycare:M.familyDaycareCreditAccount,groupFamilyDaycare:M.groupFamilyDaycareCreditAccount}}}createCreditAccountDto(){const M={id:this.creditAccountId,validFrom:this.creditAccountSettings.validFrom,clubCreditAccount:this.creditAccountSettings.serviceForm.club,familyDaycareCreditAccount:this.creditAccountSettings.serviceForm.familyDaycare,groupFamilyDaycareCreditAccount:this.creditAccountSettings.serviceForm.groupFamilyDaycare,daycareCentreCreditAccount:this.creditAccountSettings.serviceForm.daycareCentre,organizationAccountSettings:this.createCreditAccountOrgDto()};return M.id===l.Constants.NEW_ID&&delete M.id,M}createCreditAccountOrgDto(){return this.flatOrganizationSettings.map(M=>{const C=this.originalFlatOrganizationValues.find(Q=>Q.organizationId===M.organizationId);if(C?.creditAccount!==M.creditAccount){if(""===M.creditAccount&&null===C.creditAccount)return null;const Q={id:M.id||null,creditAccount:M.creditAccount,organizationId:M.organizationId};return(0,ye.Z)(Q.id)&&delete Q.id,Q}}).filter(M=>!(0,ye.Z)(M))}canDeactivate(){return(0,X.Z)(this.creditAccountSettings,this.originalAccountValues)&&(0,X.Z)(this.flatOrganizationSettings,this.originalFlatOrganizationValues)}onDismiss(){this.unsavedChanges.canDeactivate(this).pipe((0,n.q)(1)).subscribe(M=>{M&&this.modalCtrl.dismiss(null)})}}ja.\u0275fac=function(M){return new(M||ja)(e.Y36(l.NotifyService),e.Y36(T.sK),e.Y36(l.SiviModalController),e.Y36(j.F0),e.Y36(to),e.Y36(l.UnsavedChangesGuard),e.Y36(Ct.qu))},ja.\u0275cmp=e.Xpm({type:ja,selectors:[["sivi-mun-set-credit-account-modal"]],viewQuery:function(M,C){if(1&M&&(e.Gf($t,7),e.Gf(tc,5),e.Gf(gi,5)),2&M){let Q;e.iGM(Q=e.CRH())&&(C.contentLoader=Q.first),e.iGM(Q=e.CRH())&&(C.serviceFormComponent=Q.first),e.iGM(Q=e.CRH())&&(C.organizationsComponent=Q.first)}},inputs:{creditAccountId:"creditAccountId",futureCreditAccounts$:"futureCreditAccounts$"},features:[e.qOj],decls:22,vars:19,consts:[[3,"closeButton","hideNotifications","closed"],["navbar-title",""],["navbar-buttons-right","",4,"ngIf"],[1,"ion-padding",3,"siviGoToInvalid"],["siviContent",""],["siviLibForm","",3,"formGroup"],["size","12","size-sm","12","size-md","3",1,"mr5"],["formControlName","validFrom","siviLibFormControl","",3,"label","minDate","errorMessages","readonly"],["size","12","size-sm","12","size-md","3","class","mr5",4,"ngIf"],["size","12"],[3,"serviceForm","readonly","updateServiceForm"],["class","ion-padding-top",4,"ngIf"],["navbar-buttons-right",""],[3,"clicked"],["formControlName","validUntil","siviLibFormControl","",3,"label","readonly"],[1,"ion-padding-top"],[3,"organizationAccountSettings","readonly","updateOrganizations"]],template:function(M,C){1&M&&(e.TgZ(0,"ion-header")(1,"sivi-lib-navbar",0),e.NdJ("closed",function(){return C.onDismiss()}),e.TgZ(2,"div",1),e._uU(3),e.ALo(4,"translate"),e.qZA(),e.YNc(5,Ma,2,0,"div",2),e.qZA()(),e.TgZ(6,"ion-content",3)(7,"sivi-lib-content-loader",null,4)(9,"form",5)(10,"h1"),e._uU(11),e.ALo(12,"translate"),e.qZA(),e.TgZ(13,"ion-grid")(14,"ion-row")(15,"ion-col",6),e._UZ(16,"sivi-lib-datepicker",7),e.qZA(),e.YNc(17,Vo,2,2,"ion-col",8),e.qZA(),e.TgZ(18,"ion-row")(19,"ion-col",9)(20,"sivi-mun-set-credit-account-service-form",10),e.NdJ("updateServiceForm",function(Ye){return C.onFormValueChange(Ye)}),e.qZA()()(),e.YNc(21,Ds,3,2,"ion-row",11),e.qZA()()()()),2&M&&(e.xp6(1),e.Q6J("closeButton",!0)("hideNotifications",!0),e.xp6(2),e.hij(" ",e.lcZ(4,15,"Page.MunicipalitySettings.CreditAccounts.Title")," "),e.xp6(2),e.Q6J("ngIf",!C.readonly),e.xp6(1),e.Q6J("siviGoToInvalid",C.goToInvalid$),e.xp6(3),e.Q6J("formGroup",C.form),e.xp6(2),e.Oqu(e.lcZ(12,17,"Page.MunicipalitySettings.CreditAccounts.Title")),e.xp6(5),e.Q6J("label","Form.Label.From")("minDate",C.minDate)("errorMessages",C.validFromErrorMsg)("readonly",C.readonly),e.xp6(1),e.Q6J("ngIf",C.readonly),e.xp6(3),e.Q6J("serviceForm",null==C.creditAccountSettings?null:C.creditAccountSettings.serviceForm)("readonly",C.readonly),e.xp6(1),e.Q6J("ngIf",C.organizationAccountSettings))},dependencies:[D.O5,E.wI,E.W2,E.jY,E.Gu,E.Nd,l.ContentLoaderComponent,l.GoToInvalidDirective,l.NavbarComponent,l.NavbarActionButtonComponent,l.DatepickerComponent,l.SiviFormDirective,l.SiviFormControlDirective,Ct._Y,Ct.JJ,Ct.JL,Ct.sg,Ct.u,tc,gi,T.X$]});const wa=["siviContent"];function ns(te,M){if(1&te){const C=e.EpF();e.TgZ(0,"ion-col",9)(1,"sivi-lib-timeframe-card",10),e.NdJ("clickCardHeaderEvent",function(Ye){e.CHM(C);const Zt=e.oxw(2);return e.KtG(Zt.showCreditAccountModal(Ye))}),e.qZA()()}if(2&te){const C=M.$implicit;e.xp6(1),e.Q6J("id",C.id)("title",C.title)("viewMode",!0)("isFooterHidden",!0)("isBodyHidden",!0)}}function Cs(te,M){if(1&te&&(e.TgZ(0,"ion-grid")(1,"ion-row"),e.YNc(2,ns,2,5,"ion-col",8),e.qZA()()),2&te){const C=e.oxw();e.xp6(2),e.Q6J("ngForOf",C.currentAccounts)("ngForTrackBy",C.trackByFn)}}function $r(te,M){if(1&te){const C=e.EpF();e.TgZ(0,"ion-col",9)(1,"sivi-lib-timeframe-card",10),e.NdJ("clickCardHeaderEvent",function(Ye){e.CHM(C);const Zt=e.oxw(2);return e.KtG(Zt.showCreditAccountModal(Ye))}),e.qZA()()}if(2&te){const C=M.$implicit;e.xp6(1),e.Q6J("id",C.id)("title",C.title)("viewMode",!0)("isFooterHidden",!0)("isBodyHidden",!0)}}function Ts(te,M){if(1&te&&(e.TgZ(0,"ion-grid")(1,"ion-row"),e.YNc(2,$r,2,5,"ion-col",8),e.qZA()()),2&te){const C=e.oxw();e.xp6(2),e.Q6J("ngForOf",C.futureAccounts)("ngForTrackBy",C.trackByFn)}}function Gl(te,M){if(1&te){const C=e.EpF();e.TgZ(0,"ion-col",9)(1,"sivi-lib-timeframe-card",10),e.NdJ("clickCardHeaderEvent",function(Ye){e.CHM(C);const Zt=e.oxw(2);return e.KtG(Zt.showCreditAccountModal(Ye))}),e.qZA()()}if(2&te){const C=M.$implicit;e.xp6(1),e.Q6J("id",C.id)("title",C.title)("viewMode",!0)("isFooterHidden",!0)("isBodyHidden",!0)}}function ol(te,M){if(1&te&&(e.TgZ(0,"ion-grid")(1,"ion-row"),e.YNc(2,Gl,2,5,"ion-col",8),e.qZA()()),2&te){const C=e.oxw();e.xp6(2),e.Q6J("ngForOf",C.expiredAccounts)("ngForTrackBy",C.trackByFn)}}function zc(te,M){1&te&&(e.TgZ(0,"p",11),e._uU(1),e.ALo(2,"translate"),e.qZA()),2&te&&(e.xp6(1),e.Oqu(e.lcZ(2,1,"Message.NoDataFound")))}class al extends l.SiviPage{constructor(M,C,Q,Ye,Zt,Pi){super(M,C,Zt),this.notify=M,this.translateService=C,this.modalCtrl=Q,this.route=Ye,this.router=Zt,this.creditAccountsService=Pi,this.currentAccounts=[],this.futureAccounts=[],this.expiredAccounts=[],this.futureCreditAccounts$=new ke.X([])}ngOnInit(){this.getAccounts(),this.restoreModal()}getAccounts(){this.contentLoader.showLoader(),this.creditAccountsService.getCreditAccounts().pipe((0,n.q)(1),(0,P.x)(()=>this.contentLoader.hideLoader())).subscribe(M=>this.categorizeAccounts(M))}categorizeAccounts(M){const C={CURRENT:[],FUTURE:[],EXPIRED:[]};M.forEach(Q=>{C[Q.state].push({...Q,title:this.getTitle(Q)})}),this.currentAccounts=C.CURRENT,this.futureAccounts=C.FUTURE,this.expiredAccounts=C.EXPIRED,this.futureCreditAccounts$.next(this.futureAccounts)}getTitle({validFrom:M,validUntil:C=""}){return M=l.Utils.convertDateToFinnishStandard(M),C&&(C=l.Utils.convertDateToFinnishStandard(C)),`${M} - ${C||""}`}showNewCreditAccountModal(){this.showCreditAccountModal(l.Constants.NEW_ID)}showCreditAccountModal(M){var C=this;return(0,o.Z)(function*(){yield(yield C.modalCtrl.openModal({component:ja,componentProps:{creditAccountId:M,futureCreditAccounts$:C.futureCreditAccounts$.asObservable()},backdropDismiss:!1,cssClass:"modal-full-size"},"accountId",M)).onDidDismiss(),C.getAccounts()})()}restoreModal(){var M=this;return(0,o.Z)(function*(){const C=M.route.snapshot.queryParamMap.get("accountId");C&&(yield M.showCreditAccountModal(C))})()}onDismiss(){this.modalCtrl.dismiss(null)}}al.\u0275fac=function(M){return new(M||al)(e.Y36(l.NotifyService),e.Y36(T.sK),e.Y36(l.SiviModalController),e.Y36(j.gz),e.Y36(j.F0),e.Y36(to))},al.\u0275cmp=e.Xpm({type:al,selectors:[["sivi-mun-set-credit-accounts"]],viewQuery:function(M,C){if(1&M&&e.Gf(wa,7),2&M){let Q;e.iGM(Q=e.CRH())&&(C.contentLoader=Q.first)}},features:[e.qOj],decls:27,vars:23,consts:[[3,"closeButton","hideNotifications","closed"],["navbar-title",""],["siviKeyboardEvents","","tabindex","0","role","link",3,"siviClick"],["siviContent",""],[1,"accounts"],[4,"ngIf","ngIfElse"],[1,"accounts","future-accounts"],["noDataFound",""],["class","generic-card-container",4,"ngFor","ngForOf","ngForTrackBy"],[1,"generic-card-container"],[1,"generic-card-container",3,"id","title","viewMode","isFooterHidden","isBodyHidden","clickCardHeaderEvent"],[1,"no-data-found"]],template:function(M,C){if(1&M&&(e.TgZ(0,"ion-header")(1,"sivi-lib-navbar",0),e.NdJ("closed",function(){return C.onDismiss()}),e.TgZ(2,"div",1),e._uU(3),e.ALo(4,"translate"),e.qZA()()(),e.TgZ(5,"ion-content")(6,"cgi-fab",2),e.NdJ("siviClick",function(){return C.showNewCreditAccountModal()}),e.ALo(7,"translate"),e.qZA(),e.TgZ(8,"sivi-lib-content-loader",null,3)(10,"section",4)(11,"h1"),e._uU(12),e.ALo(13,"translate"),e.qZA(),e.YNc(14,Cs,3,2,"ion-grid",5),e.qZA(),e.TgZ(15,"section",6)(16,"h1"),e._uU(17),e.ALo(18,"translate"),e.qZA(),e.YNc(19,Ts,3,2,"ion-grid",5),e.qZA(),e.TgZ(20,"section",4)(21,"h1"),e._uU(22),e.ALo(23,"translate"),e.qZA(),e.YNc(24,ol,3,2,"ion-grid",5),e.qZA()(),e.YNc(25,zc,3,3,"ng-template",null,7,e.W1O),e.qZA()),2&M){const Q=e.MAs(26);e.xp6(1),e.Q6J("closeButton",!0)("hideNotifications",!0),e.xp6(2),e.hij(" ",e.lcZ(4,13,"Page.MunicipalitySettings.CreditAccounts.Title")," "),e.xp6(3),e.uIk("aria-label",e.lcZ(7,15,"Page.MunicipalitySettings.CreditAccounts.Add")),e.xp6(6),e.Oqu(e.lcZ(13,17,"General.Text.Active")),e.xp6(2),e.Q6J("ngIf",C.currentAccounts.length>0)("ngIfElse",Q),e.xp6(3),e.Oqu(e.lcZ(18,19,"General.Text.Future")),e.xp6(2),e.Q6J("ngIf",C.futureAccounts.length>0)("ngIfElse",Q),e.xp6(3),e.Oqu(e.lcZ(23,21,"General.Text.History")),e.xp6(2),e.Q6J("ngIf",C.expiredAccounts.length>0)("ngIfElse",Q)}},dependencies:[l.TimeframeCardComponent,D.sg,D.O5,E.wI,E.W2,E.jY,E.Gu,E.Nd,l.ContentLoaderComponent,l.KeyboardEventsDirective,l.NavbarComponent,T.X$],styles:[".accounts[_ngcontent-%COMP%]{padding:2em}.accounts[_ngcontent-%COMP%]   h1[_ngcontent-%COMP%]{margin:.25em 0 .25em .75em}.accounts.future-accounts[_ngcontent-%COMP%]{background-color:var(--ion-color-light, #f1f6f8)}.no-data-found[_ngcontent-%COMP%]{font-weight:700;color:var(--ion-color-primary);margin-left:1.25em}"]});class Jn{}Jn.\u0275fac=function(M){return new(M||Jn)},Jn.\u0275mod=e.oAB({type:Jn}),Jn.\u0275inj=e.cJS({providers:[l.SiviModalController,to],imports:[Gi,l.NavbarComponentModule,l.DatepickerModule,l.SiviFormsModule,st.p0,nn.Ps]});class tn{}tn.\u0275fac=function(M){return new(M||tn)},tn.\u0275mod=e.oAB({type:tn}),tn.\u0275inj=e.cJS({providers:[l.SiviModalController,to],imports:[l.TimeframeCardComponentModule,Gi,l.NavbarComponentModule,Jn]});class ti extends l.SiviAbstractFormControl{constructor(M,C,Q){super(),this.fb=M,this.elRef=C,this.languageService=Q}ngOnInit(){this.populateTitles()}updateContent(M){const Q=new CustomEvent("valueChange",{detail:{value:M}});this.elRef.nativeElement.dispatchEvent(Q)}populateTitles(){const M=this.languageService.getTranslationByLocale(this.labelKey,this.language);this.descriptionLabel=`${M} (${this.language.toUpperCase()})`}}ti.\u0275fac=function(M){return new(M||ti)(e.Y36(Ct.QS),e.Y36(e.SBq),e.Y36(l.LanguageService))},ti.\u0275cmp=e.Xpm({type:ti,selectors:[["sivi-mun-set-html-message-editor"]],inputs:{name:"name",labelKey:"labelKey",language:"language",value:"value"},features:[e.qOj],decls:3,vars:3,consts:[["size","12"],[3,"name","label","value","update"]],template:function(M,C){1&M&&(e.TgZ(0,"ion-row")(1,"ion-col",0)(2,"sivi-lib-html-editor",1),e.NdJ("update",function(Ye){return C.updateContent(Ye)}),e.qZA()()()),2&M&&(e.xp6(2),e.Q6J("name",C.name)("label",C.descriptionLabel)("value",C.value))},dependencies:[l.HtmlEditorComponent,E.wI,E.Nd],encapsulation:2});class _i extends l.SiviPage{constructor(M,C,Q,Ye,Zt){super(M,C,Q),this.notify=M,this.translate=C,this.router=Q,this.fb=Ye,this.languageService=Zt,this.update=new e.vpe,this.form=this.fb.group({})}ngOnInit(){this.initializeValidator()}initializeValidator(){this.form=this.fb.group({[`templateName_${this.language}`]:["",l.SiviValidators.required]}),setTimeout(()=>{this.form.get(`templateName_${this.language}`).patchValue(this.templateName)},50)}onTemplateNameChange(M){const C={[M.detail.name]:M.detail.value};this.update.emit(C)}getTitle(M){return`${this.languageService.getTranslationByLocale("ECEC.Plan.Template.Name",M)} (${M.toUpperCase()})`}}var ar,te,vr;_i.\u0275fac=function(M){return new(M||_i)(e.Y36(l.NotifyService),e.Y36(T.sK),e.Y36(j.F0),e.Y36(Ct.QS),e.Y36(l.LanguageService))},_i.\u0275cmp=e.Xpm({type:_i,selectors:[["sivi-mun-set-message-template-name"]],inputs:{language:"language",templateName:"templateName"},outputs:{update:"update"},features:[e.qOj],decls:3,vars:4,consts:[["siviLibForm","",3,"formGroup"],["size","12"],["siviLibFormControl","","type","text","label-position","floating",3,"formControlName","label","value","siviChange"]],template:function(M,C){1&M&&(e.TgZ(0,"ion-row",0)(1,"ion-col",1)(2,"cgi-input",2),e.NdJ("siviChange",function(Ye){return C.onTemplateNameChange(Ye)}),e.qZA()()()),2&M&&(e.Q6J("formGroup",C.form),e.xp6(2),e.Q6J("formControlName","templateName_"+C.language)("label",C.getTitle(C.language))("value",C.templateName))},dependencies:[E.wI,E.Nd,l.SiviFormDirective,l.SiviFormControlDirective,Ct.JJ,Ct.JL,Ct.sg,Ct.u],encapsulation:2}),(te=ar||(ar={})).EN="en",te.FI="fi",te.SV="sv",function(te){te.DECISION_SETTING_NOT_FOUND="DECISION_SETTING_NOT_FOUND",te.OTHER_DECISION_DISAPPROVED_TEMPLATE_ALREADY_EXISTS="OTHER_DECISION_DISAPPROVED_TEMPLATE_ALREADY_EXISTS"}(vr||(vr={}));class Qr extends l.AbstractRestService{constructor(M,C){super(M,C),this.http=M,this.siviProjectsGateway=C,this.ensureUntilDate=Q=>({...Q,untilDate:Q.untilDate||""})}getOtherDecisionsSettings(){return this.get("./api/vesa-other-decisions/decisions/settings").pipe((0,Y.U)(C=>C.map(Q=>{const Ye=Q.validDates.map(this.ensureUntilDate);return{...Q,validDates:Ye}})))}saveOtherDecisionsSettings(M){return this.put(M,"./api/vesa-other-decisions/decisions/settings")}getOtherDecisionTypes(M,C){const Ye=this.getCommonSearchOptions();if(Ye.params=(new g.LE).set("state",M),"ACTIVE"!==M&&"NOT_ENDED"!==M||C)return C&&(Ye.params=Ye.params.append("date",C)),this.get("./api/vesa-other-decisions/decisions/settings/types",Ye);console.warn(`Warning: Date is required when the state is "${M}".`)}getChildSupport(M,C,Q){const Zt=this.getCommonSearchOptions();let Pi=(new g.LE).set("childId",M).set("from",C);return Q&&(Pi=Pi.append("to",Q)),Zt.params=Pi,this.get("./api/sivi-accounts-api/children/child-support",Zt)}getOtherDecisionTexts(M,C,Q){const Zt=(new g.LE).set("messageReason",Q).set("validAt",M).set("language",C),Pi=this.getCommonOptions();return Pi.params=Zt,this.get("/api/sivi-ada-api/decision/other-decisions/decision-message-template-name",Pi)}}Qr.\u0275fac=function(M){return new(M||Qr)(e.LFG(g.eN),e.LFG(l.SiviProjectsGatewayService))},Qr.\u0275prov=e.Yz7({token:Qr,factory:Qr.\u0275fac,providedIn:"root"});class Li{transform(M,C){return M||C?M&&l.Utils.isISODate(M)&&rn(M).isSameOrAfter(C)?M:C:(console.warn("no dates"),"")}}function Ta(te,M){if(1&te){const C=e.EpF();e.TgZ(0,"ion-row")(1,"ion-col",13)(2,"ion-button",14),e.NdJ("click",function(){e.CHM(C);const Ye=e.oxw(2);return e.KtG(Ye.deleteType())}),e._UZ(3,"cgi-icon",15),e.qZA()()()}}function La(te,M){if(1&te){const C=e.EpF();e.TgZ(0,"ion-button",14),e.NdJ("click",function(){e.CHM(C);const Ye=e.oxw().index,Zt=e.oxw(2);return e.KtG(Zt.removeDateRange(Ye))}),e._UZ(1,"cgi-icon",15),e.qZA()}}function Ps(te,M){1&te&&(e.TgZ(0,"ion-row")(1,"ion-col")(2,"span",21),e._uU(3),e.ALo(4,"translate"),e.qZA()()()),2&te&&(e.xp6(3),e.Oqu(e.lcZ(4,1,"Backend.Error.PERIOD_OVERLAPS_ANOTHER")))}function is(te,M){if(1&te&&(e.TgZ(0,"ion-row"),e.ynx(1,16),e.TgZ(2,"ion-col")(3,"ion-row",4)(4,"ion-col",17),e._UZ(5,"sivi-lib-datepicker",18),e.qZA(),e.TgZ(6,"ion-col",17),e._UZ(7,"sivi-lib-datepicker",19),e.ALo(8,"untilDateMinValue"),e.qZA(),e.TgZ(9,"ion-col"),e.YNc(10,La,2,0,"ion-button",20),e.qZA()(),e.YNc(11,Ps,5,3,"ion-row",0),e.qZA(),e.BQk(),e.qZA()),2&te){const C=M.$implicit,Q=M.index,Ye=e.oxw(2);let Zt,Pi,Ir,xo,Qa;e.xp6(1),e.Q6J("formGroupName",Q),e.xp6(4),e.Q6J("label","Form.Label.From")("readonly",!(null!=(Zt=C.get("canEditFromDate"))&&Zt.value))("minDate",Ye.tomorrow)("maxDate",(null==(Pi=C.get("untilDate"))?null:Pi.value)||"")("errorMessages",Ye.fromDateErrorMessages),e.xp6(2),e.Q6J("label","Form.Label.Until")("readonly",!(null!=(Ir=C.get("canEditUntilDate"))&&Ir.value))("minDate",e.xi3(8,12,null==(xo=C.get("fromDate"))?null:xo.value,Ye.tomorrow))("errorMessages",Ye.untilDateErrorMessages),e.xp6(3),e.Q6J("ngIf",(0!==Q||1!==Ye.validDates.controls.length)&&(null==(Qa=C.get("canDelete"))?null:Qa.value)),e.xp6(1),e.Q6J("ngIf",null==Ye.validDates.at(Q).errors?null:Ye.validDates.at(Q).errors.dateRangeOverlap)}}function yt(te,M){if(1&te){const C=e.EpF();e.TgZ(0,"ion-row")(1,"ion-col")(2,"ion-button",22),e.NdJ("click",function(){e.CHM(C);const Ye=e.oxw(2);return e.KtG(Ye.addNewDateRange())}),e._UZ(3,"cgi-icon",23),e.qZA()()()}}function Dt(te,M){if(1&te){const C=e.EpF();e.ynx(0),e.TgZ(1,"ion-row",1)(2,"ion-col",2)(3,"form",3),e.YNc(4,Ta,4,0,"ion-row",0),e.TgZ(5,"ion-row",4)(6,"ion-col"),e._UZ(7,"cgi-input",5),e.ALo(8,"translate"),e.ALo(9,"translate"),e.qZA(),e.TgZ(10,"ion-col"),e._UZ(11,"cgi-input",6),e.ALo(12,"translate"),e.ALo(13,"translate"),e.qZA(),e.TgZ(14,"ion-col"),e._UZ(15,"cgi-input",7),e.ALo(16,"translate"),e.ALo(17,"translate"),e.qZA(),e.TgZ(18,"ion-col")(19,"ion-item",8)(20,"ion-checkbox",9),e.NdJ("ionChange",function(Ye){e.CHM(C);const Zt=e.oxw();return e.KtG(Zt.toggleDevAndLearningSupport(Ye.detail.checked))}),e.qZA(),e.TgZ(21,"ion-label",10),e.ALo(22,"translate"),e._uU(23),e.ALo(24,"translate"),e.qZA()()()(),e.ynx(25,11),e.YNc(26,is,12,15,"ion-row",12),e.YNc(27,yt,4,0,"ion-row",0),e.BQk(),e.qZA()()(),e.BQk()}if(2&te){const C=e.oxw();e.xp6(3),e.Q6J("formGroup",C.form),e.xp6(1),e.Q6J("ngIf",C.decisionType.canEdit),e.xp6(3),e.Q6J("viewMode",!C.decisionType.canEdit)("showRequiredIndicator",!0)("label",e.lcZ(9,23,"Decision.Type")+"(FI)"),e.uIk("aria-label",e.lcZ(8,21,"Decision.Type")+"(FI)"),e.xp6(4),e.Q6J("viewMode",!C.decisionType.canEdit)("showRequiredIndicator",!0)("label",e.lcZ(13,27,"Decision.Type")+"(SV)"),e.uIk("aria-label",e.lcZ(12,25,"Decision.Type")+"(SV)"),e.xp6(4),e.Q6J("viewMode",!C.decisionType.canEdit)("showRequiredIndicator",!0)("label",e.lcZ(17,31,"Decision.Type")+"(EN)"),e.uIk("aria-label",e.lcZ(16,29,"Decision.Type")+"(EN)"),e.xp6(5),e.Q6J("disabled",!C.decisionType.canEdit)("checked",C.form.value.developmentAndLearningSupport||!1),e.xp6(1),e.uIk("aria-label",e.lcZ(22,33,"Title.Health.DevAndLearningSupport")),e.xp6(2),e.hij(" ",e.lcZ(24,35,"Title.Health.DevAndLearningSupport"),""),e.xp6(3),e.Q6J("ngForOf",C.validDates.controls)("ngForTrackBy",C.trackBy),e.xp6(1),e.Q6J("ngIf",!C.isDecisionInUse)}}Li.\u0275fac=function(M){return new(M||Li)},Li.\u0275pipe=e.Yjl({name:"untilDateMinValue",type:Li,pure:!0});class We extends l.SiviAbstractForm{get validDates(){return this.form.get("validDates")}constructor(M,C,Q){super(),this.fb=M,this.translate=C,this.notify=Q,this.updateDecisionType=new e.vpe,this.removeDecisionType=new e.vpe,this.today=(new Date).toISOString(),this.tomorrow=rn().add(1,"day").format(l.DateFormats.STANDARD),this.isDecisionInUse=!1,this.form=this.fb.group({nameInFinnish:["",[l.SiviValidators.required,l.SiviValidators.maxLength(100)]],nameInSwedish:["",[l.SiviValidators.required,l.SiviValidators.maxLength(100)]],nameInEnglish:["",[l.SiviValidators.required,l.SiviValidators.maxLength(100)]],developmentAndLearningSupport:[!1,[l.SiviValidators.required]],validDates:this.fb.array([],this.dateRangeValidator)}),this.fromDateErrorMessages={isBefore:this.translate.instant("Form.Error.DateShouldBeInFuture"),isSameOrAfter:this.translate.instant("Form.Error.Invalid.EndDateShouldGreaterSameStartDate")},this.untilDateErrorMessages={isBefore:this.translate.instant("Form.Error.DateShouldBeInFuture"),isSameOrAfter:this.translate.instant("Form.Error.Invalid.EndDateShouldGreaterSameStartDate")},this.requiredValidator=l.SiviValidators.required,this.isDateValidator=l.SiviValidators.validateDate(),this.isFromDateBeforeUntilDateValidator=l.SiviValidators.validateDateIsAfterThan("untilDate"),this.isDateBeforeTomorrowValidator=l.SiviValidators.validateDateIsBeforeThanParameter(this.tomorrow),this.isUntilDateAfterFromDateValidator=l.SiviValidators.validateDateIsBeforeThan("fromDate")}ngOnInit(){this.isDecisionInUse=!this.decisionType.canEdit,this.form.patchValue({...this.decisionType}),this.decisionType.validDates.length?this.decisionType.validDates.forEach(M=>this.addExistingDateRange(M)):this.addNewDateRange()}addExistingDateRange({fromDate:M,untilDate:C,id:Q}){const Ye=this.canEditFromDate(M),Zt=this.canEditUntilDate(C),Pi=this.fb.group({fromDate:[M||""],untilDate:[C||""],id:[Q||""],canDelete:[!this.isDecisionInUse],canEditFromDate:[Ye],canEditUntilDate:[Zt]});Ye&&Pi.get("fromDate").addValidators([this.requiredValidator,this.isDateValidator,this.isFromDateBeforeUntilDateValidator,this.isDateBeforeTomorrowValidator]),Zt&&Pi.get("untilDate").addValidators([this.isDateValidator,this.isUntilDateAfterFromDateValidator,this.isDateBeforeTomorrowValidator]),this.validDates.push(Pi)}canEditFromDate(M){return!this.isDecisionInUse&&l.Utils.isAfter(M,this.today)}canEditUntilDate(M){return!this.isDecisionInUse&&(!M||l.Utils.isAfter(M,this.today))}addNewDateRange(){const M=this.fb.group({fromDate:["",[this.requiredValidator,this.isDateValidator,this.isFromDateBeforeUntilDateValidator,this.isDateBeforeTomorrowValidator]],untilDate:["",[this.isDateValidator,this.isUntilDateAfterFromDateValidator,this.isDateBeforeTomorrowValidator]],id:[""],canDelete:[!0],canEditFromDate:[!0],canEditUntilDate:[!0]});this.validDates.push(M)}removeDateRange(M){var C=this;return(0,o.Z)(function*(){C.hasDateRangeValue(M)&&!(yield(yield C.notify.deleteConfirmPopup()).onDidDismiss()).data||(C.validDates.removeAt(M),C.validDates.controls.forEach(Q=>Q.updateValueAndValidity()))})()}hasDateRangeValue(M){return!!this.validDates.at(M).value.fromDate||!!this.validDates.at(M).value.untilDate}toggleDevAndLearningSupport(M){this.form.get("developmentAndLearningSupport").patchValue(M)}deleteType(){this.removeDecisionType.emit()}onFormValueChange(M){const C={...this.decisionType,...M,validDates:M.validDates.map(Q=>{const{canDelete:Ye,canEditFromDate:Zt,canEditUntilDate:Pi,...Ir}=Q;return Ir})};this.updateDecisionType.emit(C)}trackBy(M,C){return C}dateRangeValidator(M){const C=M.value;for(let Q=0;Q<C.length;Q++)for(let Ye=Q+1;Ye<C.length;Ye++){const Zt=C[Q],Pi=C[Ye];let Ir=Zt.untilDate,xo=Pi.untilDate;if(Ir||(Ir="9999-12-31"),xo||(xo="9999-12-31"),new Date(Zt.fromDate)<new Date(xo)&&new Date(Ir)>new Date(Pi.fromDate))return M.at(Q).setErrors({dateRangeOverlap:!0}),M.at(Ye).setErrors({dateRangeOverlap:!0}),{dateRangeOverlap:!0};M.at(Q).setErrors({...M.at(Q).errors,dateRangeOverlap:null}),M.at(Ye).setErrors({...M.at(Ye).errors,dateRangeOverlap:null}),M.at(Q).updateValueAndValidity({onlySelf:!0,emitEvent:!1}),M.at(Ye).updateValueAndValidity({onlySelf:!0,emitEvent:!1})}return null}}We.\u0275fac=function(M){return new(M||We)(e.Y36(Ct.qu),e.Y36(T.sK),e.Y36(l.NotifyService))},We.\u0275cmp=e.Xpm({type:We,selectors:[["sivi-mun-set-decision-type"]],inputs:{decisionType:"decisionType",originalDecisionType:"originalDecisionType"},outputs:{updateDecisionType:"updateDecisionType",removeDecisionType:"removeDecisionType"},features:[e.qOj],decls:1,vars:1,consts:[[4,"ngIf"],[1,"wrapper"],[1,"box-shadow"],["siviLibForm","",3,"formGroup"],[1,"ion-align-items-end"],["formControlName","nameInFinnish","siviLibFormControl","","type","text","label-position","floating",3,"viewMode","showRequiredIndicator","label"],["formControlName","nameInSwedish","siviLibFormControl","","type","text","label-position","floating",3,"viewMode","showRequiredIndicator","label"],["formControlName","nameInEnglish","siviLibFormControl","","type","text","label-position","floating",3,"viewMode","showRequiredIndicator","label"],["lines","none"],["color","primary",3,"disabled","checked","ionChange"],[1,"label","ion-margin-horizontal","ion-text-wrap"],["formArrayName","validDates"],[4,"ngFor","ngForOf","ngForTrackBy"],[1,"ion-text-right"],["no-min-width","","color","primary","icon-only","","fill","clear",1,"delete-button",3,"click"],["name","delete"],[3,"formGroupName"],["size-xs","5","size-md","3","size-lg","2"],["formControlName","fromDate","siviLibFormControl","",3,"label","readonly","minDate","maxDate","errorMessages"],["formControlName","untilDate","siviLibFormControl","",3,"label","readonly","minDate","errorMessages"],["no-min-width","","color","primary","class","delete-button","icon-only","","fill","clear",3,"click",4,"ngIf"],[1,"error-message"],["color","primary","fill","clear","role","button","no-min-width","",3,"click"],["name","add"]],template:function(M,C){1&M&&e.YNc(0,Dt,28,37,"ng-container",0),2&M&&e.Q6J("ngIf",C.decisionType)},dependencies:[D.sg,D.O5,E.YG,E.nz,E.wI,E.Ie,E.Q$,E.Nd,E.w,l.SiviFormDirective,l.SiviFormControlDirective,Ct._Y,Ct.JJ,Ct.JL,Ct.sg,Ct.u,Ct.x0,Ct.CE,l.DatepickerComponent,T.X$,Li],styles:[".wrapper[_ngcontent-%COMP%]:first-of-type{margin-top:3rem}.box-shadow[_ngcontent-%COMP%]{padding:4px;box-shadow:0 5px 5px -3px #0003,0 8px 10px 1px #00000024,0 3px 14px 2px #0000001f}.error-message[_ngcontent-%COMP%]{color:var(--ion-color-warning, rgba(204, 0, 0, 0))}"],changeDetection:0});class Rt{}Rt.\u0275fac=function(M){return new(M||Rt)},Rt.\u0275mod=e.oAB({type:Rt}),Rt.\u0275inj=e.cJS({imports:[Gi,l.InfoPopupComponentModule,l.SiviFormsModule,l.DatepickerModule]});const Qn=["siviContent"],fi=["decisionTypeComponent"];function Xi(te,M){if(1&te){const C=e.EpF();e.TgZ(0,"sivi-lib-navbar-action-button",12),e.NdJ("clicked",function(){e.CHM(C);const Ye=e.oxw();return e.KtG(Ye.saveOtherDecision())}),e.qZA()}if(2&te){const C=e.oxw();e.Q6J("disabled",C.contentLoader.shouldShowLoader())}}function wr(te,M){if(1&te){const C=e.EpF();e.TgZ(0,"sivi-mun-set-decision-type",15,16),e.NdJ("updateDecisionType",function(Ye){const Pi=e.CHM(C).index,Ir=e.oxw(3);return e.KtG(Ir.updateType(Ye,Pi))})("removeDecisionType",function(){const Zt=e.CHM(C).index,Pi=e.oxw(3);return e.KtG(Pi.removeTypeAt(Zt))}),e.qZA()}if(2&te){const C=M.$implicit,Q=M.index,Ye=e.oxw(3);e.Q6J("siviGoToInvalid",Ye.goToInvalid$)("decisionType",C)("originalDecisionType",Ye.originalEntities[Q])}}function Mo(te,M){if(1&te&&(e.ynx(0),e.YNc(1,wr,2,3,"sivi-mun-set-decision-type",14),e.BQk()),2&te){const C=e.oxw().ngIf,Q=e.oxw();e.xp6(1),e.Q6J("ngForOf",C)("ngForTrackBy",Q.trackByFn)}}function ro(te,M){if(1&te&&(e.ynx(0),e.YNc(1,Mo,2,2,"ng-container",13),e.BQk()),2&te){const C=M.ngIf;e.oxw();const Q=e.MAs(28);e.xp6(1),e.Q6J("ngIf",C.length)("ngIfElse",Q)}}function qr(te,M){1&te&&(e.TgZ(0,"div",17),e._uU(1),e.ALo(2,"translate"),e.qZA()),2&te&&(e.xp6(1),e.hij(" ",e.lcZ(2,1,"Message.NoDataFound")," "))}class ho extends l.SiviPage{get areComponentsValid(){return this.decisionTypeComponents.toArray().every(M=>M?.isValid)}constructor(M,C,Q,Ye,Zt,Pi,Ir,xo,Qa){super(Ye,M,Zt,Q,Pi,C),this.translate=M,this.modalCtrl=C,this.route=Q,this.notify=Ye,this.router=Zt,this.location=Pi,this.otherDecisionsSettingsService=Ir,this.siviProjectsGatewayService=xo,this.unsavedChanges=Qa,this.decisionTypes$=new ke.X([]),this.hasAtLeastOneRow$=this.decisionTypes$.pipe((0,Y.U)(ec=>!!ec.length))}ngOnInit(){this.getOtherDecisions()}getOtherDecisions(){this.contentLoader.showLoader(),this.otherDecisionsSettingsService.getOtherDecisionsSettings().pipe((0,V.b)(()=>this.contentLoader.hideLoader()),(0,B.K)(M=>(console.error(M),this.contentLoader.showError(),mt.E))).subscribe(M=>this.setDecisionTypes(M))}setDecisionTypes(M){this.decisionTypes$.next(M),this.watchForValueChanges(M)}onDismiss(){this.unsavedChanges.canDeactivate(this).pipe((0,n.q)(1)).subscribe(M=>{M&&this.modalCtrl.dismiss(null)})}addType(){const M={canEdit:!0,developmentAndLearningSupport:!1,tempId:l.Utils.createUUID(),nameInEnglish:"",nameInFinnish:"",nameInSwedish:"",validDates:[]};this.decisionTypes$.next([M,...(0,He.cloneDeep)(this.decisionTypes$.value)]),this.updateWatchedEntities(this.decisionTypes$.value)}updateType(M,C){const Q=this.decisionTypes$.value.map((Ye,Zt)=>C===Zt?M:Ye);this.decisionTypes$.next(Q),this.updateWatchedEntities(this.decisionTypes$.value)}removeTypeAt(M){var C=this;return(0,o.Z)(function*(){if(!(yield(yield C.notify.deleteConfirmPopup()).onDidDismiss()).data)return;const Zt=C.decisionTypes$.value.filter((Pi,Ir)=>M!==Ir);C.decisionTypes$.next(Zt),C.updateWatchedEntities(C.decisionTypes$.value)})()}saveOtherDecision(){var M=this;return(0,o.Z)(function*(){if(M.areComponentsValid)try{M.contentLoader.showLoader();const C=M.decisionTypes$.value.map(M.transformDecisionType);yield(0,ut.n)(M.otherDecisionsSettingsService.saveOtherDecisionsSettings(C)),M.notify.toastSaveSuccess(),M.getOtherDecisions()}catch(C){console.error(C),M.notify.alertBackendErrorWithCode(C,"Message.Save.Error")}finally{M.contentLoader.hideLoader()}else M.goToInvalid$.next()})()}transformDecisionType(M){const{canEdit:C,tempId:Q,nameInEnglish:Ye,nameInFinnish:Zt,nameInSwedish:Pi,validDates:Ir,...xo}=M;return{...xo,typeNameInEnglish:Ye,typeNameInFinnish:Zt,typeNameInSwedish:Pi,dateRanges:Ir}}}ho.\u0275fac=function(M){return new(M||ho)(e.Y36(T.sK),e.Y36(l.SiviModalController),e.Y36(j.gz),e.Y36(l.NotifyService),e.Y36(j.F0),e.Y36(D.Ye),e.Y36(Qr),e.Y36(l.SiviProjectsGatewayService),e.Y36(l.UnsavedChangesGuard))},ho.\u0275cmp=e.Xpm({type:ho,selectors:[["sivi-mun-set-other-decisions"]],viewQuery:function(M,C){if(1&M&&(e.Gf(Qn,7),e.Gf(fi,5)),2&M){let Q;e.iGM(Q=e.CRH())&&(C.contentLoader=Q.first),e.iGM(Q=e.CRH())&&(C.decisionTypeComponents=Q)}},features:[e.qOj],decls:29,vars:26,consts:[[3,"closeButton","hideNotifications","closed"],["navbar-title",""],["navbar-buttons-right",""],[3,"disabled","clicked",4,"ngIf"],[1,"ion-padding"],["siviContent",""],[1,"title"],["text","Page.MunicipalitySettings.OtherDecisions.Title.Info"],[1,"ion-text-right"],["no-min-width","","fill","outline","role","button",1,"button-primary-inverted",3,"click"],[4,"ngIf"],["noContent",""],[3,"disabled","clicked"],[4,"ngIf","ngIfElse"],[3,"siviGoToInvalid","decisionType","originalDecisionType","updateDecisionType","removeDecisionType",4,"ngFor","ngForOf","ngForTrackBy"],[3,"siviGoToInvalid","decisionType","originalDecisionType","updateDecisionType","removeDecisionType"],["decisionTypeComponent",""],[1,"ml2"]],template:function(M,C){if(1&M&&(e.TgZ(0,"ion-header")(1,"sivi-lib-navbar",0),e.NdJ("closed",function(){return C.onDismiss()}),e.TgZ(2,"div",1),e._uU(3),e.ALo(4,"translate"),e.ALo(5,"async"),e.qZA(),e.TgZ(6,"div",2),e.YNc(7,Xi,1,1,"sivi-lib-navbar-action-button",3),e.ALo(8,"async"),e.qZA()()(),e.TgZ(9,"ion-content",4)(10,"sivi-lib-content-loader",null,5)(12,"h1",6),e._uU(13),e.ALo(14,"translate"),e._UZ(15,"sivi-lib-info-popup",7),e.qZA(),e.TgZ(16,"h2",6),e._uU(17),e.ALo(18,"translate"),e.qZA(),e.TgZ(19,"ion-row")(20,"ion-col",8)(21,"ion-button",9),e.NdJ("click",function(){return C.addType()}),e.ALo(22,"translate"),e._uU(23),e.ALo(24,"translate"),e.qZA()()(),e.YNc(25,ro,2,2,"ng-container",10),e.ALo(26,"async"),e.YNc(27,qr,3,3,"ng-template",null,11,e.W1O),e.qZA()()),2&M){let Q;e.xp6(1),e.Q6J("closeButton",!0)("hideNotifications",!0),e.xp6(2),e.AsE(" ",e.lcZ(4,10,"Page.MunicipalitySettings.OtherDecisions.Title")," (",null==(Q=e.lcZ(5,12,C.siviProjectsGatewayService.getAppStateService().getMunicipality()))?null:Q.name,") "),e.xp6(4),e.Q6J("ngIf",e.lcZ(8,14,C.hasAtLeastOneRow$)),e.xp6(6),e.hij("",e.lcZ(14,16,"Page.MunicipalitySettings.OtherDecisions.Title")," "),e.xp6(4),e.Oqu(e.lcZ(18,18,"Decision.Type")),e.xp6(4),e.uIk("aria-label",e.lcZ(22,20,"General.Buttons.Add.Row")),e.xp6(2),e.hij(" ",e.lcZ(24,22,"General.Buttons.Add.Row")," "),e.xp6(2),e.Q6J("ngIf",e.lcZ(26,24,C.decisionTypes$))}},dependencies:[D.sg,D.O5,E.YG,E.wI,E.W2,E.Gu,E.Nd,l.ContentLoaderComponent,l.GoToInvalidDirective,l.NavbarComponent,l.NavbarActionButtonComponent,We,l.InfoPopupComponent,D.Ov,T.X$],styles:["h1[_ngcontent-%COMP%]{color:var(--ion-color-secondary)}"]});const xa=[{path:"other-decisions",component:ho}];class To{}To.\u0275fac=function(M){return new(M||To)},To.\u0275mod=e.oAB({type:To}),To.\u0275inj=e.cJS({providers:[Qr,l.SiviModalController],imports:[l.TimeframeCardComponentModule,Gi,l.NavbarComponentModule,Rt,l.InfoPopupComponentModule,j.Bz.forChild(xa)]});const Ao=["contentLoader"];function Ha(te,M){if(1&te){const C=e.EpF();e.TgZ(0,"div")(1,"sivi-mun-set-message-template-name",20),e.NdJ("update",function(Ye){e.CHM(C);const Zt=e.oxw(2);return e.KtG(Zt.onTemplateNameChange(Ye))}),e.qZA()()}if(2&te){const C=M.$implicit,Q=e.oxw(2);e.xp6(1),e.Q6J("language",C.value)("templateName",Q.getTemplateName(Q.form.value,C.value))}}const Ho=function(){return{text:"General.Text.Yes",value:"default"}},Ra=function(te){return[te]},ba=function(){return["default"]},Jt=function(){return[]};function De(te,M){if(1&te){const C=e.EpF();e.TgZ(0,"div")(1,"sivi-lib-checkbox-list",19),e.NdJ("siviChange",function(Ye){e.CHM(C);const Zt=e.oxw();return e.KtG(Zt.onChangeDefaultTemplate(Ye))}),e.ALo(2,"translate"),e.qZA(),e.YNc(3,Ha,2,2,"div",18),e.qZA()}if(2&te){const C=e.oxw();e.xp6(1),e.Q6J("options",e.VKq(8,Ra,e.DdM(7,Ho)))("value",C.isDefaultTemplate?e.DdM(10,ba):e.DdM(11,Jt))("label",e.lcZ(2,5,"Form.Label.Default")),e.xp6(2),e.Q6J("ngForOf",C.availableLanguageForTheUser)("ngForTrackBy",C.trackByFn)}}function bt(te,M){if(1&te&&(e.TgZ(0,"div")(1,"ion-row")(2,"ion-col",21),e._UZ(3,"cgi-input",22),e.qZA()()()),2&te){const C=M.$implicit,Q=e.oxw();e.xp6(3),e.s9C("formControlName","messageDescription_"+C),e.Q6J("label",Q.getTitle("Form.Label.Message.Description",C))}}function Xt(te,M){if(1&te&&(e.TgZ(0,"div")(1,"ion-row",26)(2,"ion-col",21),e._UZ(3,"cgi-input",22),e.qZA()(),e.TgZ(4,"ion-row")(5,"ion-col",21),e._UZ(6,"cgi-input",22),e.qZA()()()),2&te){const C=e.oxw().$implicit,Q=e.oxw(2);e.xp6(3),e.Q6J("formControlName","emailTitle_"+C)("label",Q.emailTitlesAndDescriptions[C].title),e.xp6(3),e.Q6J("formControlName","emailDescription_"+C)("label",Q.emailTitlesAndDescriptions[C].description)}}function Qi(te,M){if(1&te&&e._UZ(0,"sivi-mun-set-html-message-editor",27),2&te){const C=e.oxw().$implicit;e.Q6J("formControlName","uimessageDescription_"+C)("language",C)}}function Kt(te,M){if(1&te&&e._UZ(0,"sivi-mun-set-html-message-editor",28),2&te){const C=e.oxw().$implicit;e.Q6J("formControlName","documenttextDescription_"+C)("language",C)}}function Fe(te,M){if(1&te&&(e.TgZ(0,"div")(1,"ion-row")(2,"ion-col")(3,"h2",23),e._uU(4),e.qZA()()(),e.YNc(5,Xt,7,4,"div",15),e.YNc(6,Qi,1,2,"sivi-mun-set-html-message-editor",24),e.YNc(7,Kt,1,2,"sivi-mun-set-html-message-editor",25),e.qZA()),2&te){const C=M.$implicit,Q=e.oxw(2);e.xp6(4),e.Oqu(Q.getLanguageHeader(C)),e.xp6(1),e.Q6J("ngIf",Q.showEmailEditor),e.xp6(1),e.Q6J("ngIf",Q.showUiMessageEditor),e.xp6(1),e.Q6J("ngIf",Q.showDocumentTextEditor)}}function Wt(te,M){if(1&te&&(e.ynx(0),e.YNc(1,Fe,8,4,"div",18),e.BQk()),2&te){const C=e.oxw();e.xp6(1),e.Q6J("ngForOf",C.form.value.selectedLanguages)("ngForTrackBy",C.trackByFn)}}class yi extends l.SiviPage{get showEmailEditor(){return this.form.value.selectedMessageTypes.includes(l.ContactTypes.EMAIL_TYPE)}get showUiMessageEditor(){return this.form.value.selectedMessageTypes.includes(l.ContactTypes.UI_MESSAGE)}get showDocumentTextEditor(){return this.form.value.selectedMessageTypes.includes(l.ContactTypes.DOCUMENT_TEXT)}get newTemplate(){return this.templateId===l.Constants.NEW_ID}constructor(M,C,Q,Ye,Zt,Pi,Ir,xo,Qa){super(Ye,M,C),this.translate=M,this.router=C,this.modalCtrl=Q,this.notify=Ye,this.languageService=Zt,this.unsavedChanges=Pi,this.templateRestService=Ir,this.route=xo,this.fb=Qa,this.ignoredKeys=["updatedDate","createdDate","updatedBy","createdBy"],this.todayDate=rn().format("YYYY-MM-DD"),this.savedMessageTemplate={languageDescriptions:[],messageModes:[]},this.goToInvalid$=new Ve.x,this.validFromValidators=[l.SiviValidators.validateDate(),l.SiviValidators.validateDateIsAfterThan("validUntil"),l.SiviValidators.validateInvalidControl("validUntil"),l.SiviValidators.required],this.validUntilValidators=[l.SiviValidators.validateDate(),l.SiviValidators.validateDateIsBeforeThan("validFrom"),l.SiviValidators.validateInvalidControl("validFrom")],this.errorMessage={isSameOrAfter:this.translate.instant("Form.Error.Invalid.Date")},this.form=this.fb.group({validFrom:["",this.validFromValidators],validUntil:["",this.validUntilValidators],messageReason:["",[l.SiviValidators.required]],selectedLanguages:[[l.Languages.FINNISH],[l.SiviValidators.required]],selectedMessageTypes:[[],[l.SiviValidators.required]],templateName_fi:[""],templateName_sv:[""],templateName_en:[""],messageDescription_fi:["",[l.SiviValidators.required]],messageDescription_en:[""],messageDescription_sv:[""],emailTitle_fi:[""],emailTitle_en:[""],emailTitle_sv:[""],emailDescription_fi:[""],emailDescription_en:[""],emailDescription_sv:[""],uimessageDescription_fi:[""],uimessageDescription_en:[""],uimessageDescription_sv:[""],documenttextDescription_fi:[""],documenttextDescription_en:[""],documenttextDescription_sv:[""]}),this.availableLanguageCodes=[l.Languages.FINNISH,l.Languages.SWEDISH,l.Languages.ENGLISH],this.availableMessageTypes=[],this.availableLanguageForTheUser=[{text:this.translate.instant("General.Language.Finnish"),value:l.Languages.FINNISH,selected:!0,disabled:!0},{text:this.translate.instant("General.Language.Swedish"),value:l.Languages.SWEDISH},{text:this.translate.instant("General.Language.English"),value:l.Languages.ENGLISH}]}ngOnInit(){this.ignoreProperties=[...this.ignoredKeys],this.updateFormItem("messageReason",this.reason),this.emailTitlesAndDescriptions=this.getEmailTitlesAndDescriptions(),this.messageTypes=this.getMessageTypes(),this.availableMessageTypes=this.messageTypes.map(M=>M.value),this.newTemplate?(this.addValidationForNewTemplate(),this.watchForValueChanges([this.form.value])):this.getMessageTemplate(),this.approvalTemplate=this.isApprovalTemplate()}addValidationForNewTemplate(){this.validFromValidators.push(l.SiviValidators.validateDateIsSameOrAfterThanParameter(this.todayDate)),this.form.get("validFrom").setValidators(this.validFromValidators)}onTemplateNameChange(M){this.form.patchValue(M)}onChangeDefaultTemplate(M){this.isDefaultTemplate="default"===M.detail.value[0]}onSaveTemplate(){var M=this;return(0,o.Z)(function*(){if(M.allTemplateNamesAreValid=M.templateNames.toArray().every(Ye=>Ye.isValid),!M.isValid||!M.allTemplateNamesAreValid)return void M.goToInvalid$.next();const Q=M.createPayload();M.saveTemplate(Q),M.watchForValueChanges([M.form.value])})()}getLanguageHeader(M){return this.languageService.getAllTranslatedLanguages().find(Ye=>Ye.language===M).simpleLanguage}getTitle(M,C){return`${this.languageService.getTranslationByLocale(M,C)} (${C.toUpperCase()})`}isApprovalTemplate(){const M=this.form.value.messageReason||"";return M.includes(".approved")||M.includes("Approved")}onCloseMessageTemplate(){this.updateWatchedEntities([this.form.value]),this.unsavedChanges.canDeactivate(this).pipe((0,n.q)(1)).subscribe(M=>{M&&this.modalCtrl.dismiss(null)})}createFormItem(M,C,Q=!0){if(!this.form.get(M)){const Ye=this.fb.control(C,Q?[l.SiviValidators.required]:[]);this.form.addControl(M,Ye)}}updateFormItem(M,C,Q=!0){this.form.get(M)?(this.form.get(M).setValidators(Q?[l.SiviValidators.required]:[]),this.form.get(M).patchValue(C)):this.createFormItem(M,C)}getEmailTitlesAndDescriptions(){return["fi","sv","en"].reduce((C,Q)=>{const Ye=Q.toUpperCase(),Ir=`${this.languageService.getTranslationByLocale("Form.Label.Email.Title",Q)} (${Ye})`,xo=`${this.languageService.getTranslationByLocale("Form.Label.Email",Q)} (${Ye})`;return C[Q]={title:Ir,description:xo},C},{})}onEmailMessageEditorChange(M,C){this.updateFormItem("emailTitle_"+C,M.title),this.updateFormItem("emailDescription_"+C,M.description)}onUiMessageEditorChange(M,C){this.updateFormItem("uimessageDescription_"+C,M)}onDocumentTextChange(M,C){this.updateFormItem("documenttextDescription_"+C,M)}onChangeSelectedLanguage(M){const C=M.detail.value;this.updateFormModel(C),this.clearUnselectedLanguagesAndMessageTypes()}onChangeSelectedMessageTypes(M){const C=M.detail.value;this.updateFormModel(null,C),this.clearUnselectedLanguagesAndMessageTypes()}clearUnselectedLanguagesAndMessageTypes(){const{selectedLanguages:M,selectedMessageTypes:C}=this.form.value,Q=this.availableLanguageCodes.filter(Zt=>!M.includes(Zt)),Ye=this.availableMessageTypes.filter(Zt=>!C.includes(Zt));this.updateFormModel(Q,Ye,!1)}updateFormModel(M,C,Q=!0){const Ye=this.form.value,Zt=M||Ye.selectedLanguages,Pi=C||Ye.selectedMessageTypes;for(const Ir of Zt){const xo="messageDescription_"+Ir;this.updateFormItem(xo,this.form.get(xo).value,Q);for(const Qa of Pi)switch(Qa){case l.ContactTypes.EMAIL_TYPE:const ec="emailTitle_"+Ir,Sh="emailDescription_"+Ir;this.updateFormItem(ec,this.form.get(ec).value,Q),this.updateFormItem(Sh,this.form.get(Sh).value,Q);break;case l.ContactTypes.UI_MESSAGE:const qg="uimessageDescription_"+Ir;this.updateFormItem(qg,this.form.get(qg).value,Q);break;case l.ContactTypes.DOCUMENT_TEXT:const ao="documenttextDescription_"+Ir;this.updateFormItem(ao,this.form.get(ao).value,Q)}}}getMessageTemplate(){this.contentLoader.showLoader(),this.templateRestService.getTemplate(this.templateId).subscribe(M=>{this.savedMessageTemplate=M,this.form.patchValue(this.parseTemplateData(M)),this.updateFormModel(),this.watchForValueChanges([this.form.value]),this.contentLoader.showContent(M),this.approvalTemplate=this.isApprovalTemplate()})}parseTemplateData(M){const C=M.languageDescriptions.filter(Pi=>Pi.checked).map(Pi=>Pi.language),Q=M.messageModes.filter(Pi=>Pi.checked).map(Pi=>Pi.modeType),Ye=[l.Languages.FINNISH,l.Languages.SWEDISH,l.Languages.ENGLISH];this.isDefaultTemplate=M.isDefaultTemplate;let Zt={validFrom:l.Utils.getStartOfDay(M.validFrom),validUntil:l.Utils.getEndOfDay(M.validUntil),messageReason:this.reason||M.messageReason,type:M.type||this.type,organizationId:M.organizationId,selectedLanguages:C,selectedMessageTypes:Q};for(const Pi of Ye){const Ir=M.languageDescriptions.find(xo=>xo.language===Pi);Zt={...Zt,["templateName_"+Pi]:Ir.templateName}}for(const Pi of Zt.selectedLanguages){const Ir=M.languageDescriptions.find(xo=>xo.language===Pi);if(Zt={...Zt,["messageDescription_"+Pi]:Ir.description},Zt.selectedMessageTypes.includes(l.ContactTypes.EMAIL_TYPE)){const Qa=M.messageModes.find(ec=>ec.modeType===l.ContactTypes.EMAIL_TYPE).languages.find(ec=>ec.language===Pi);Qa&&(Zt={...Zt,["emailTitle_"+Pi]:Qa.title,["emailDescription_"+Pi]:Qa.description})}if(Zt.selectedMessageTypes.includes(l.ContactTypes.UI_MESSAGE)){const Qa=M.messageModes.find(ec=>ec.modeType===l.ContactTypes.UI_MESSAGE).languages.find(ec=>ec.language===Pi);Zt={...Zt,["uimessageDescription_"+Pi]:Qa?.description}}if(Zt.selectedMessageTypes.includes(l.ContactTypes.DOCUMENT_TEXT)){const Qa=M.messageModes.find(ec=>ec.modeType===l.ContactTypes.DOCUMENT_TEXT).languages.find(ec=>ec.language===Pi);Zt={...Zt,["documenttextDescription_"+Pi]:Qa?.description}}}return Zt}getTemplateName(M,C){return M[`templateName_${C}`]}createPayload(){return{id:this.savedMessageTemplate.id||null,isDefaultTemplate:this.isDefaultTemplate,validFrom:this.form.value.validFrom?rn(this.form.value.validFrom).utc().toISOString():null,validUntil:this.form.value.validUntil?rn(this.form.value.validUntil).utc().toISOString():null,messageReason:this.form.value.messageReason,type:this.type,organizationId:this.municipalityId,languageDescriptions:this.getLanguagesDescription(),messageModes:this.getModes()}}getLanguagesDescription(){return this.availableLanguageForTheUser.map(M=>{const C=this.form.value.selectedLanguages.some(Pi=>Pi===M.value),Q=this.savedMessageTemplate.languageDescriptions.find(Pi=>Pi.language===M.value),Ye=this.form.value["messageDescription_"+M.value],Zt=this.form.value["templateName_"+M.value];return{id:Q?Q.id:null,messageContentId:this.savedMessageTemplate.id||null,language:M.value,templateName:Zt,description:Ye,checked:C}})}getModes(){return this.messageTypes.map(M=>{const C=this.form.value.selectedMessageTypes.some(Zt=>Zt===M.value),Q=this.savedMessageTemplate.messageModes.find(Zt=>Zt.modeType===M.value),Ye=M.value.split(".").pop();return{id:Q?Q.id:null,messageContentId:this.savedMessageTemplate.id||null,modeType:M.value,languages:C?this.getModeLanguages(Ye,Q):[],checked:C}})}getModeLanguages(M,C){const Q=M.split(".").pop();return this.form.value.selectedLanguages.map(Ye=>{const Zt=C&&C.languages&&C.languages.find(xo=>xo.language===Ye),Pi=this.form.value[Q+"Title_"+Ye],Ir=this.form.value[Q+"Description_"+Ye];return{id:Zt?Zt.id:null,messageModeId:C?C.id:null,language:Ye,description:Ir,title:Pi||null}})}saveTemplate(M){const C=this.removeUncheckedMessageModes(M);this.contentLoader.showSavingLoader(),this.templateRestService.saveTemplate(C).subscribe(Q=>{this.savedMessageTemplate=Q,this.contentLoader.showContent(Q),this.notify.toastSaveSuccess()},Q=>{switch(console.error("MessageTemplateEditorPage: saveTemplate: returned",Q),this.contentLoader.hideLoader(),!0){case 406===Q.status:this.handleNotAcceptableError(Q);break;case Q.error===vr.OTHER_DECISION_DISAPPROVED_TEMPLATE_ALREADY_EXISTS:this.notify.alert("Message.Save.Error",`Backend.Error.${Q.error}`);break;default:this.notify.alertBackendError(Q,"Message.Save.Error")}})}handleNotAcceptableError(M){const C=(0,oe.Z)(M,"error");this.checkHasToBeNonDefault(C),this.checkDuplicatedTemplate(C)}checkDuplicatedTemplate(M){if(M&&M.includes("DUPLICATED_TEMPLATE")){const C=this.getDuplicatedTemplatePeriods(M);if(C){const Q=this.translate.instant("Message.Error.Templates.DuplicatedTemplate",{period:C});this.notify.createErrorAlert("Message.Save.Error",Q)}}}checkHasToBeNonDefault(M){M&&M.includes("has to be set non default")&&this.notify.createErrorAlert("Message.Save.Error","Message.Error.Templates.DefaultTemplate")}getDuplicatedTemplatePeriods(M){try{const C=M.split("#");return JSON.parse(C[1]).map(Ye=>`${rn(Ye.validFrom).format(l.DateFormats.FINNISH_MOMENT)} - ${Ye.validUntil?rn(Ye.validUntil).format(l.DateFormats.FINNISH_MOMENT):""}`)}catch(C){return console.error(C),null}}getMessageTypes(){let M=[];if(this.type.includes("starting-and-ending"))return this.getTypesEmailAndUIMessage();if(this.type.includes(l.FeeAndDecisionTemplateType.GENERAL))return this.getMessageTypeForFees(this.type,this.reason);switch(this.type){case l.MessageTemplateType.APPLICATION:M=this.getTypesEmailAndUIMessage();break;case l.MessageTemplateType.DECISION:M=this.getTypesEmailAndDocument()}return M}getMessageTypeForFees(M,C){const Q=[l.FeeAndDecisionTemplateType.TEXT,l.FeeAndDecisionTemplateType.TEXT_FEE_BASIS_DECISION,l.FeeAndDecisionTemplateType.TEXT_JUSTIFICATION,l.FeeAndDecisionTemplateType.INSTRUCTIONS];if(this.isTemplateOfAnyType(M,Q)){const Ye=[];return Ye.push({text:l.ContactTypes.DOCUMENT_TEXT,value:l.ContactTypes.DOCUMENT_TEXT}),this.isTemplateOfAnyType(M,[l.FeeAndDecisionTemplateType.TEXT])&&Ye.push({text:l.ContactTypes.EMAIL_TYPE,value:l.ContactTypes.EMAIL_TYPE}),Ye}return this.isTemplateOfAnyType(M,[l.FeeAndDecisionTemplateType.FEE_REDUCTION])?this.getMessageForFeeReduction(C):this.isTemplateOfAnyType(M,[l.FeeAndDecisionTemplateType.INCOME])?this.getMessageForIncomeStatement(C):void 0}getMessageForFeeReduction(M){switch(M){case l.FeeAndDecisionTemplateType.FEE_REDUCTION_GENERAL:return this.getTypesEmailAndDocument();case l.FeeAndDecisionTemplateType.FEE_REDUCTION_APPLICATION:return this.getTypesEmailAndUIMessage()}return[]}getMessageForIncomeStatement(M){const C=[{text:l.ContactTypes.EMAIL_TYPE,value:l.ContactTypes.EMAIL_TYPE}];return this.isTemplateOfAnyType(M,[l.FeeAndDecisionTemplateType.SENT_INCOME])&&C.push({text:l.ContactTypes.UI_MESSAGE,value:l.ContactTypes.UI_MESSAGE}),C}isTemplateOfAnyType(M,C){return C.some(Q=>Q.includes(M))}getTypesEmailAndUIMessage(){return[{text:l.ContactTypes.EMAIL_TYPE,value:l.ContactTypes.EMAIL_TYPE},{text:l.ContactTypes.UI_MESSAGE,value:l.ContactTypes.UI_MESSAGE}]}getTypesEmailAndDocument(){return[{text:l.ContactTypes.EMAIL_TYPE,value:l.ContactTypes.EMAIL_TYPE},{text:l.ContactTypes.DOCUMENT_TEXT,value:l.ContactTypes.DOCUMENT_TEXT}]}removeUncheckedMessageModes(M){const C=(0,ve.Z)(M);return C.messageModes=C.messageModes.filter(Q=>Q.checked),C}}yi.\u0275fac=function(M){return new(M||yi)(e.Y36(T.sK),e.Y36(j.F0),e.Y36(l.SiviModalController),e.Y36(l.NotifyService),e.Y36(l.LanguageService),e.Y36(l.UnsavedChangesGuard),e.Y36(l.MessageTemplateRestService),e.Y36(j.gz),e.Y36(Ct.QS))},yi.\u0275cmp=e.Xpm({type:yi,selectors:[["sivi-mun-set-message-template-editor"]],viewQuery:function(M,C){if(1&M&&(e.Gf(Ao,7),e.Gf(_i,5)),2&M){let Q;e.iGM(Q=e.CRH())&&(C.contentLoader=Q.first),e.iGM(Q=e.CRH())&&(C.templateNames=Q)}},inputs:{municipalityId:"municipalityId",templateId:"templateId",reason:"reason",type:"type",reasonTranslation:"reasonTranslation"},features:[e.qOj],decls:34,vars:32,consts:[["role","dialog"],[3,"closeButton","hideNotifications","closed"],["navbar-title",""],["navbar-buttons-right",""],[3,"clicked"],[1,"ion-padding",3,"siviGoToInvalid"],[3,"skeleton"],["contentLoader",""],["siviLibForm","",3,"formGroup"],[1,"title"],["size","12","size-sm","12","size-md","3"],["formControlName","validFrom","siviLibFormControl","",3,"errorMessages","label","minDate","maxDate"],["formControlName","validUntil","siviLibFormControl","",3,"label","minDate"],[1,"ion-margin-top"],[1,"subtitle"],[4,"ngIf"],["formControlName","selectedLanguages","siviLibFormControl","",3,"label","options","siviChange"],["formControlName","selectedMessageTypes","siviLibFormControl","",3,"label","options","siviChange"],[4,"ngFor","ngForOf","ngForTrackBy"],[3,"options","value","label","siviChange"],[3,"language","templateName","update"],["size","12"],["siviLibFormControl","","type","text","label-position","floating",3,"formControlName","label"],[1,"language-header"],["siviLibFormControl","","labelKey","Form.Label.UIMessage",3,"formControlName","language",4,"ngIf"],["siviLibFormControl","","labelKey","Form.Label.DocumentText",3,"formControlName","language",4,"ngIf"],[1,"margin-bottom"],["siviLibFormControl","","labelKey","Form.Label.UIMessage",3,"formControlName","language"],["siviLibFormControl","","labelKey","Form.Label.DocumentText",3,"formControlName","language"]],template:function(M,C){1&M&&(e.TgZ(0,"ion-header",0)(1,"sivi-lib-navbar",1),e.NdJ("closed",function(){return C.onCloseMessageTemplate()}),e.TgZ(2,"div",2),e._uU(3),e.ALo(4,"translate"),e.qZA(),e.TgZ(5,"div",3)(6,"sivi-lib-navbar-action-button",4),e.NdJ("clicked",function(){return C.onSaveTemplate()}),e.qZA()()()(),e.TgZ(7,"ion-content",5)(8,"sivi-lib-content-loader",6,7)(10,"form",8)(11,"ion-grid")(12,"ion-row")(13,"ion-col")(14,"h1",9),e._uU(15),e.ALo(16,"translate"),e.qZA()()(),e.TgZ(17,"ion-row")(18,"ion-col",10),e._UZ(19,"sivi-lib-datepicker",11),e.qZA(),e.TgZ(20,"ion-col",10),e._UZ(21,"sivi-lib-datepicker",12),e.qZA()(),e.TgZ(22,"ion-row",13)(23,"ion-col")(24,"h2",14),e._uU(25),e.ALo(26,"translate"),e.qZA()()(),e.YNc(27,De,4,12,"div",15),e.TgZ(28,"sivi-lib-checkbox-list",16),e.NdJ("siviChange",function(Ye){return C.onChangeSelectedLanguage(Ye)}),e.ALo(29,"translate"),e.qZA(),e.TgZ(30,"sivi-lib-checkbox-list",17),e.NdJ("siviChange",function(Ye){return C.onChangeSelectedMessageTypes(Ye)}),e.ALo(31,"translate"),e.qZA(),e.YNc(32,bt,4,2,"div",18),e.YNc(33,Wt,2,2,"ng-container",15),e.qZA()()()()),2&M&&(e.xp6(1),e.Q6J("closeButton",!0)("hideNotifications",!0),e.xp6(2),e.hij(" ",e.lcZ(4,22,"Page.Message.Template.Title.Singular")," "),e.xp6(4),e.Q6J("siviGoToInvalid",C.goToInvalid$),e.xp6(1),e.Q6J("skeleton","form"),e.xp6(2),e.Q6J("formGroup",C.form),e.xp6(5),e.hij(" ",C.reasonTranslation||e.lcZ(16,24,C.form.value.messageReason)," "),e.xp6(4),e.Q6J("errorMessages",C.errorMessage)("label","Form.Label.ValidFrom")("minDate",C.todayDate)("maxDate",C.form.value.validUntil),e.xp6(2),e.Q6J("label","Form.Label.ValidUntil")("minDate",C.form.value.validFrom),e.xp6(4),e.Oqu(e.lcZ(26,26,"General.Text.Message.BasicInfo")),e.xp6(2),e.Q6J("ngIf",C.approvalTemplate),e.xp6(1),e.Q6J("label",e.lcZ(29,28,"General.Language.Plural"))("options",C.availableLanguageForTheUser),e.xp6(2),e.Q6J("label",e.lcZ(31,30,"Form.Label.Message.Types"))("options",C.messageTypes),e.xp6(2),e.Q6J("ngForOf",C.form.value.selectedLanguages)("ngForTrackBy",C.trackByFn),e.xp6(1),e.Q6J("ngIf",C.form.value.selectedMessageTypes.length))},dependencies:[l.NavbarComponent,l.NavbarActionButtonComponent,l.CheckboxListComponent,D.sg,D.O5,E.wI,E.W2,E.jY,E.Gu,E.Nd,l.ContentLoaderComponent,l.GoToInvalidDirective,l.DatepickerComponent,l.SiviFormDirective,l.SiviFormControlDirective,Ct._Y,Ct.JJ,Ct.JL,Ct.sg,Ct.u,_i,ti,T.X$],styles:[".language-header[_ngcontent-%COMP%]{margin-bottom:0;margin-top:54px;font-weight:600}.margin-bottom[_ngcontent-%COMP%]{margin-bottom:32px}.title[_ngcontent-%COMP%]{color:var(--ion-color-secondary)}"]});const Ki=[{path:"message-template/:templateId",component:yi,canDeactivate:[l.UnsavedChangesGuard]}];class ya{}function Na(te,M){if(1&te&&(e.TgZ(0,"ion-row")(1,"ion-col",6),e._UZ(2,"sivi-lib-select",15),e.ALo(3,"translate"),e.qZA()()),2&te){const C=e.oxw();e.xp6(2),e.Q6J("disabled",!C.newMessageTemplate.messageReason)("options",C.approvalOptions)("label",C.newMessageTemplate.messageReasonTranslation||e.lcZ(3,3,C.newMessageTemplate.messageReason))}}ya.\u0275fac=function(M){return new(M||ya)},ya.\u0275mod=e.oAB({type:ya}),ya.\u0275inj=e.cJS({providers:[l.SiviModalController],imports:[l.NavbarComponentModule,l.HtmlEditorComponentModule,l.CheckboxListComponentModule,Gi,j.Bz.forChild(Ki),l.DatepickerModule,l.SiviFormsModule]});class qi extends l.SiviAbstractForm{constructor(M,C,Q,Ye,Zt,Pi){super(C),this.modalCtrl=M,this.translate=C,this.notify=Q,this.templateRestService=Ye,this.codeService=Zt,this.otherDecisionsService=Pi,this.applicationMessageTypesPreferredOrder=[l.MessageTemplateApplicationType.ECEC,l.MessageTemplateApplicationType.PPE,l.MessageTemplateApplicationType.PPEWITHECEC,l.MessageTemplateApplicationType.CLUB],this.reasonsPreferredOrder=[l.MessageTemplateApplicationReasons.DRAFT,l.MessageTemplateApplicationReasons.THANKS,l.MessageTemplateApplicationReasons.HANDLING,l.MessageTemplateApplicationReasons.COMMENT_MESSAGE],this.approvalOptions=[{value:"new",text:this.translate.instant("Form.Label.Message.Template.New")}],this.newMessageTemplate={templateMessage:"",messageReason:"",approvalOption:"new"},this.form=new Ct.cw({templateMessage:new Ct.NI("",l.SiviValidators.required),messageReason:new Ct.NI(""),approvalOption:new Ct.NI("")})}ngOnInit(){this.currentLang=this.translate.currentLang,this.typeLabel=this.getTemplateLabelText(this.templateType),this.initOptionsByTemplateType()}getTemplateLabelText(M){return[l.MessageTemplateType.DECISION,l.MessageTemplateType.ECEC_MESSAGE,l.MessageTemplateType.DECISION_FEE].some(Ye=>Ye===M)?"Form.Label.Template.Type":"Form.Label.Message.Template.Application.Type"}initOptions(){const M=this.getReasonCodeForTemplate(this.templateType),C=this.templateRestService.getMessageReasonsByType(this.municipalityId,this.templateType),Q=this.otherDecisionsService.getOtherDecisionTypes("NOT_ENDED",l.Utils.getTodayDateISO()).pipe((0,B.K)(Zt=>(console.error(Zt),this.notify.alertBackendErrorWithCode(Zt),(0,tt.of)([])))),Ye=(0,Be.D)({otherDecisionData:Q,messageReasons:C});this.codeService.getCodesByName(M).pipe((0,Y.U)(Zt=>this.applyLabelsForTypes(Zt.childCodes)),(0,V.b)(Zt=>{this.messageTypes=this.templateType===l.MessageTemplateType.DECISION_FEE?this.getDecisionFeeMessageTypeOptions():this.sortTypesToPreferredOrder(Zt)}),(0,ue.w)(()=>M===l.MessageTemplateReasonCode.DECISION_REASON?Ye:C),(0,B.K)(Zt=>(console.error(Zt),this.notify.alertBackendErrorWithCode(Zt),(0,tt.of)([])))).subscribe(Zt=>{this.reasons="otherDecisionData"in Zt?this.mapOtherDecisionData(Zt):Zt})}initOptionsByTemplateType(){this.templateType===l.MessageTemplateType.ECEC_MESSAGE?this.initECECMessageTemplateOptions():this.initOptions()}initECECMessageTemplateOptions(){this.messageTypes=this.getECECMessageTypeOptions(),this.reasons=this.getECECMessageReasons()}sortTypesToPreferredOrder(M){return this.templateType===l.MessageTemplateType.APPLICATION?l.Utils.sortFirstArrayAsSecondByKey(M,this.applicationMessageTypesPreferredOrder,"value"):M}onDismiss(){this.modalCtrl.dismiss()}onFormValueChange(M){const C=M.templateMessage!==this.newMessageTemplate.templateMessage,Q=M.messageReason!==this.newMessageTemplate.messageReason;C?this.onChangeType(M.templateMessage):Q?this.onChangeReason(M.messageReason):this.newMessageTemplate=this.newMessageTemplate}onChangeType(M){this.newMessageTemplate={...this.newMessageTemplate,templateMessage:M},this.getTypeSpecificReasonOptions(M),this.form.patchValue({messageReason:"",approvalOption:""}),this.form.get("messageReason").setValidators([l.SiviValidators.required])}onChangeReason(M){const C=this.reasons.find(Q=>Q.description===M);this.newMessageTemplate={...this.newMessageTemplate,messageReason:M,messageReasonTranslation:C?.reason||null},M&&(this.approval=this.newMessageTemplate.messageReason.includes(".approved")),this.approval&&(this.newMessageTemplate.approvalOption="new",this.form.patchValue({approvalOption:"new"}),this.form.get("approvalOption").setValidators([l.SiviValidators.required]))}onCreateTemplate(){const M={messageType:this.newMessageTemplate.templateMessage,reason:this.newMessageTemplate.messageReason};this.modalCtrl.dismiss(M)}getTypeSpecificReasonOptions(M){if(this.newMessageTemplate.templateMessage){const C=this.newMessageTemplate.templateMessage.replace("type.",""),Q=this.reasons.filter(Zt=>Zt.reason.includes(C+".")||Zt.description?.includes(M)),Ye=this.translateMessageReasons(Q);this.reasonOptions=this.sortReasonsToPreferredOrder(Ye)}}sortReasonsToPreferredOrder(M){return this.templateType===l.MessageTemplateType.APPLICATION?l.Utils.sortFirstArrayAsSecondByPartialKey(M,this.reasonsPreferredOrder,"value"):M}getDecisionFeeMessageTypeOptions(){const M=[{type:l.FeeAndDecisionTemplateType.TEXT,text:l.FeeAndDecisionTemplateType.TEXT},{type:l.FeeAndDecisionTemplateType.TEXT_FEE_BASIS_DECISION,text:l.FeeAndDecisionTemplateType.TEXT_FEE_BASIS_DECISION},{type:l.FeeAndDecisionTemplateType.TEXT_JUSTIFICATION,text:l.FeeAndDecisionTemplateType.TEXT_JUSTIFICATION},{type:l.FeeAndDecisionTemplateType.FEE_REDUCTION,text:l.FeeAndDecisionTemplateType.FEE_REDUCTION},{type:l.FeeAndDecisionTemplateType.INSTRUCTIONS,text:l.FeeAndDecisionTemplateType.INSTRUCTIONS},{type:l.FeeAndDecisionTemplateType.INCOME,text:l.FeeAndDecisionTemplateType.INCOME}];return l.Utils.getSelectOptionsFromArray(M,"type","text")}getECECMessageTypeOptions(){const M=[{type:l.ECECMessageTemplateType.ECEC,text:"Application.Type.ECEC"},{type:l.ECECMessageTemplateType.ECEC_AGREEMENT,text:"sivi.message.template.starting-and-ending.ecec-agreement"},{type:l.ECECMessageTemplateType.SERVICE_VOUCHER,text:"sivi.organization.type.decision.type.voucher"},{type:l.ECECMessageTemplateType.CLUB,text:"Application.Type.CLUB"}];return l.Utils.getSelectOptionsFromArray(M,"type","text")}getECECMessageReasons(){return Object.values(l.ECECMessageReasonCodes).map(C=>({reason:C,description:C}))}mapOtherDecisionData(M){const C=M.messageReasons;for(const Q of M.otherDecisionData)C.push({description:Q.approvedMessageReason,reason:this.translate.instant("General.Status.APPROVED")+" "+Q[this.currentLang]}),C.push({description:Q.demandForRectificationMessageReason,reason:this.translate.instant("General.Text.DemandForRectificationFor")+" "+Q[this.currentLang]}),C.push({description:Q.disapprovedMessageReason,reason:this.translate.instant("General.Status.DISAPPROVED")+" "+Q[this.currentLang]});return C}translateMessageReasons(M){const C=[];for(const Q of M)C.push({text:this.translate.instant(Q.reason),value:Q.description||Q.reason});return C}applyLabelsForTypes(M){const C=[];for(const Q of M)C.push({text:this.translate.instant(Q.name),value:Q.name});return C}getReasonCodeForTemplate(M){switch(M){case l.MessageTemplateType.APPLICATION:return l.MessageTemplateReasonCode.APPLICATION_REASON;case l.MessageTemplateType.DECISION:return l.MessageTemplateReasonCode.DECISION_REASON;case l.MessageTemplateType.DECISION_FEE:return l.MessageTemplateReasonCode.DECISION_FEE_REASON;default:return M}}}qi.\u0275fac=function(M){return new(M||qi)(e.Y36(l.SiviModalController),e.Y36(T.sK),e.Y36(l.NotifyService),e.Y36(l.MessageTemplateRestService),e.Y36(l.CodeService),e.Y36(Qr))},qi.\u0275cmp=e.Xpm({type:qi,selectors:[["sivi-mun-set-message-template-creation-modal"]],inputs:{title:"title",templateType:"templateType",municipalityId:"municipalityId"},features:[e.qOj],decls:28,vars:28,consts:[["siviLibForm","",1,"ion-padding",3,"formGroup"],[3,"skeleton"],["siviContent",""],[1,"weight-600","great"],[1,"title"],[3,"text","buttonLabel"],["size","12"],["formControlName","templateMessage","siviLibFormControl","",3,"options","label"],["formControlName","messageReason","siviLibFormControl","",3,"disabled","options","placeholder","label"],[4,"ngIf"],[1,"ion-no-border"],[1,"no-lines"],["slot","end"],["fill","outline","size","default",3,"click"],["fill","solid","size","default",3,"disabled","click"],["formControlName","approvalOption","siviLibFormControl","",3,"disabled","options","label"]],template:function(M,C){1&M&&(e.TgZ(0,"ion-content",0)(1,"sivi-lib-content-loader",1,2)(3,"ion-grid")(4,"ion-row",3)(5,"ion-col",4),e._uU(6),e._UZ(7,"sivi-lib-info-popup",5),e.ALo(8,"translate"),e.qZA()(),e.TgZ(9,"ion-row")(10,"ion-col",6),e._UZ(11,"sivi-lib-radio-list",7),e.qZA()(),e.TgZ(12,"ion-row")(13,"ion-col",6),e._UZ(14,"sivi-lib-select",8),e.ALo(15,"translate"),e.ALo(16,"translate"),e.ALo(17,"translate"),e.qZA()(),e.YNc(18,Na,4,5,"ion-row",9),e.qZA()()(),e.TgZ(19,"ion-footer",10)(20,"ion-item",11)(21,"div",12)(22,"ion-button",13),e.NdJ("click",function(){return C.onDismiss()}),e._uU(23),e.ALo(24,"translate"),e.qZA(),e.TgZ(25,"ion-button",14),e.NdJ("click",function(){return C.onCreateTemplate()}),e._uU(26),e.ALo(27,"translate"),e.qZA()()()()),2&M&&(e.Q6J("formGroup",C.form),e.xp6(1),e.Q6J("skeleton","form"),e.xp6(5),e.hij(" ",C.title," "),e.xp6(1),e.Q6J("text","Form.Label.Message.Template.New.Info")("buttonLabel",e.lcZ(8,16,"General.Text.Contextual.Help")),e.xp6(4),e.Q6J("options",C.messageTypes)("label",C.typeLabel),e.xp6(3),e.Q6J("disabled",!C.newMessageTemplate.templateMessage)("options",C.reasonOptions)("placeholder",e.lcZ(16,20,"General.Text.Message.Reason.Select"))("label",e.lcZ(17,22,"Form.Label.Message.Reason")),e.uIk("aria-label",e.lcZ(15,18,"Form.Label.Message.Reason")),e.xp6(4),e.Q6J("ngIf",C.approval),e.xp6(5),e.hij(" ",e.lcZ(24,24,"General.Buttons.Cancel")," "),e.xp6(2),e.Q6J("disabled",!C.isValid),e.xp6(1),e.hij(" ",e.lcZ(27,26,"General.Buttons.Continue")," "))},dependencies:[D.O5,E.YG,E.wI,E.W2,E.fr,E.jY,E.Ie,E.Nd,l.ContentLoaderComponent,l.RadioListComponent,l.SelectComponent,l.InfoPopupComponent,l.SiviFormDirective,l.SiviFormControlDirective,Ct.JJ,Ct.JL,Ct.sg,Ct.u,T.X$],styles:["[_nghost-%COMP%]   .title[_ngcontent-%COMP%]{color:var(--ion-color-secondary)}ion-footer[_ngcontent-%COMP%]{background:white}"]});const ia=[{path:"message-template/:templateId",component:qi,canDeactivate:[l.UnsavedChangesGuard]}];class $o{}function su(te,M){if(1&te&&(e.TgZ(0,"h4"),e._uU(1),e.qZA()),2&te){const C=e.oxw();e.xp6(1),e.hij(" ",C.title," ")}}function Us(te,M){if(1&te){const C=e.EpF();e.ynx(0),e.TgZ(1,"sivi-lib-timeframe-card",3),e.NdJ("clickCardHeaderEvent",function(Ye){e.CHM(C);const Zt=e.oxw();return e.KtG(Zt.clickCardHeaderEvent.emit(Ye))})("clickMainActionEvent",function(Ye){e.CHM(C);const Zt=e.oxw();return e.KtG(Zt.clickMainActionEvent.emit(Ye))})("clickSaveEvent",function(Ye){e.CHM(C);const Zt=e.oxw();return e.KtG(Zt.clickSaveEvent.emit(Ye))}),e.ALo(2,"translate"),e.qZA(),e.BQk()}if(2&te){const C=M.$implicit,Q=e.oxw();e.xp6(1),e.Q6J("id",C.id)("title",Q.getTitle(C))("validFrom",C.validFrom)("validUntil",C.validUntil)("state",C.restEntityState)("textMainActionButton",e.lcZ(2,7,Q.setMainActionButtonText(C)))("subtitle",Q.getSubtitle(C))}}$o.\u0275fac=function(M){return new(M||$o)},$o.\u0275mod=e.oAB({type:$o}),$o.\u0275inj=e.cJS({providers:[l.SiviModalController],imports:[Gi,T.aw,l.RadioListComponentModule,j.Bz.forChild(ia),l.SelectComponentModule,l.InfoPopupComponentModule,l.SiviFormsModule]});class Ka extends l.SiviPage{constructor(M,C,Q){super(M,C,Q),this.notify=M,this.translate=C,this.router=Q,this.clickCardHeaderEvent=new e.vpe,this.clickMainActionEvent=new e.vpe,this.clickSaveEvent=new e.vpe,this.languageOrder=[l.Languages.FINNISH,l.Languages.SWEDISH,l.Languages.ENGLISH]}setMainActionButtonText(M){let C;switch(M.restEntityState){case l.Constants.FUTURE:C="General.Buttons.Activate";break;case l.Constants.CURRENT:C="General.Buttons.Inactivate";break;default:C=""}return C}getSubtitle(M){const C=M.languageDescriptions.filter(Ye=>Ye.checked).map(Ye=>({language:Ye.language})),Q=l.Utils.sortFirstArrayAsSecondByKey(C,this.languageOrder,"language");return l.Utils.arrayByKeyToListUppercase(Q,"language")}getTitle(M){const C=M.messageReasonTranslation||this.translate.instant(M.messageReason),Q=M.messageReason.includes(".approved")||M.messageReason.includes("Approved"),Ye=M.languageDescriptions.find(Zt=>Zt.templateName);if(Q&&Ye){let Zt=M.languageDescriptions.find(Qa=>Qa.language===this.translate.currentLang);Zt.templateName||(Zt=M.languageDescriptions.find(Qa=>"fi"===Qa.language));const Pi=Zt.templateName,Ir=this.translate.instant("Form.Label.Default");return`${C} - ${Pi} ${M.isDefaultTemplate?`(${Ir})`:""}`}return C}}Ka.\u0275fac=function(M){return new(M||Ka)(e.Y36(l.NotifyService),e.Y36(T.sK),e.Y36(j.F0))},Ka.\u0275cmp=e.Xpm({type:Ka,selectors:[["sivi-mun-set-message-templates-list"]],inputs:{templates:"templates",title:"title"},outputs:{clickCardHeaderEvent:"clickCardHeaderEvent",clickMainActionEvent:"clickMainActionEvent",clickSaveEvent:"clickSaveEvent"},features:[e.qOj],decls:3,vars:3,consts:[[4,"ngIf"],[1,"templates-list-container"],[4,"ngFor","ngForOf","ngForTrackBy"],[1,"generic-card-container",3,"id","title","validFrom","validUntil","state","textMainActionButton","subtitle","clickCardHeaderEvent","clickMainActionEvent","clickSaveEvent"]],template:function(M,C){1&M&&(e.YNc(0,su,2,1,"h4",0),e.TgZ(1,"div",1),e.YNc(2,Us,3,9,"ng-container",2),e.qZA()),2&M&&(e.Q6J("ngIf",C.templates.length>0),e.xp6(2),e.Q6J("ngForOf",C.templates)("ngForTrackBy",C.trackByFn))},dependencies:[D.sg,D.O5,l.TimeframeCardComponent,T.X$],styles:["[_nghost-%COMP%]{--sivi-card-margin: 0}.templates-list-container[_ngcontent-%COMP%]{display:grid;grid-column-gap:24px;grid-template-columns:repeat(auto-fill,minmax(344px,1fr));grid-row-gap:24px}"],changeDetection:0});class Tc{transform(M,C){return M.filter(Q=>Q.messageReason.includes(`${C}.`))}}Tc.\u0275fac=function(M){return new(M||Tc)},Tc.\u0275pipe=e.Yjl({name:"siviFilterByReason",type:Tc,pure:!0});class Qs{transform(M,C){return M.filter(Q=>Q.restEntityState.includes(C))}}function vu(te,M){if(1&te){const C=e.EpF();e.TgZ(0,"ion-col",1)(1,"sivi-mun-set-message-templates-list",5),e.NdJ("clickCardHeaderEvent",function(Ye){e.CHM(C);const Zt=e.oxw(2);return e.KtG(Zt.onCardHeaderClick(Ye))})("clickMainActionEvent",function(Ye){e.CHM(C);const Zt=e.oxw(2);return e.KtG(Zt.onMainActionClick(Ye))})("clickSaveEvent",function(Ye){e.CHM(C);const Zt=e.oxw(2);return e.KtG(Zt.onSaveClick(Ye))}),e.ALo(2,"siviFilterByReason"),e.ALo(3,"siviFilterByState"),e.ALo(4,"translate"),e.qZA()()}if(2&te){const C=M.$implicit,Q=e.oxw().$implicit,Ye=e.oxw();e.xp6(1),e.Q6J("templates",e.xi3(2,2,e.xi3(3,5,Ye.templates,Q.name),C.name))("title",e.lcZ(4,8,C.title))}}function hl(te,M){1&te&&(e.TgZ(0,"div"),e._uU(1),e.ALo(2,"translate"),e.qZA()),2&te&&(e.xp6(1),e.hij(" ",e.lcZ(2,1,"Message.NoDataFound")," "))}function Wl(te,M){if(1&te&&(e.TgZ(0,"ion-row")(1,"ion-col",1)(2,"h1",2),e._uU(3),e.ALo(4,"translate"),e.qZA()(),e.YNc(5,vu,5,10,"ion-col",3),e.YNc(6,hl,3,3,"div",4),e.ALo(7,"siviFilterByState"),e.qZA()),2&te){const C=M.$implicit,Q=e.oxw();let Ye;e.xp6(3),e.Oqu(e.lcZ(4,4,C.title)),e.xp6(2),e.Q6J("ngForOf",Q.templateReasons)("ngForTrackBy",Q.trackByFnIndex),e.xp6(1),e.Q6J("ngIf",!(null!=(Ye=e.xi3(7,6,Q.templates,C.name))&&Ye.length))}}Qs.\u0275fac=function(M){return new(M||Qs)},Qs.\u0275pipe=e.Yjl({name:"siviFilterByState",type:Qs,pure:!0});class sp extends l.SiviComponent{constructor(){super(...arguments),this.templates=[],this.templateStates=[],this.templateReasons=[],this.cardHeaderClick=new e.vpe,this.mainActionClick=new e.vpe,this.saveClick=new e.vpe}onCardHeaderClick(M){this.cardHeaderClick.emit(M)}onMainActionClick(M){this.mainActionClick.emit(M)}onSaveClick(M){this.saveClick.emit(M)}}sp.\u0275fac=function(){let te;return function(C){return(te||(te=e.n5z(sp)))(C||sp)}}(),sp.\u0275cmp=e.Xpm({type:sp,selectors:[["sivi-mun-set-message-templates-container"]],inputs:{templates:"templates",templateStates:"templateStates",templateReasons:"templateReasons"},outputs:{cardHeaderClick:"cardHeaderClick",mainActionClick:"mainActionClick",saveClick:"saveClick"},features:[e.qOj],decls:2,vars:2,consts:[[4,"ngFor","ngForOf","ngForTrackBy"],["size","12"],[1,"title"],["size","12",4,"ngFor","ngForOf","ngForTrackBy"],[4,"ngIf"],[3,"templates","title","clickCardHeaderEvent","clickMainActionEvent","clickSaveEvent"]],template:function(M,C){1&M&&(e.TgZ(0,"ion-grid"),e.YNc(1,Wl,8,9,"ion-row",0),e.qZA()),2&M&&(e.xp6(1),e.Q6J("ngForOf",C.templateStates)("ngForTrackBy",C.trackByFnIndex))},dependencies:[D.sg,D.O5,E.wI,E.jY,E.Nd,Ka,T.X$,Tc,Qs],encapsulation:2,changeDetection:0});class Ku{constructor(M){this.getTemplatesFn=M,this.title=l.MessageTemplatesTitle.GENERAL_TEMPLATE_TITLE,this.templateStates=[{name:l.Constants.CURRENT,title:"General.Text.Active"},{name:l.Constants.FUTURE,title:"General.Text.Future"},{name:l.Constants.EXPIRED,title:"General.Text.History"}]}getTemplates(){return this.getTemplatesFn(this.reasonType)}getType(){return this.type}getReasonType(){return this.reasonType}getTitle(){return this.title}getTemplateStates(){return this.templateStates}getTemplateReasons(){return this.templateReasons}}class Da extends Ku{constructor(M){super(M),this.getTemplatesFn=M,this.type=l.MessageTemplateType.APPLICATION,this.title=l.MessageTemplatesTitle.APPLICATION_TEMPLATES_TITLE,this.reasonType=l.MessageTemplateReasonCode.APPLICATION_REASON,this.reasonsPreferredOrder=[l.MessageTemplateApplicationReasons.DRAFT,l.MessageTemplateApplicationReasons.THANKS,l.MessageTemplateApplicationReasons.HANDLING,l.MessageTemplateApplicationReasons.COMMENT_MESSAGE],this.templateReasons=[{name:l.MessageTemplateApplicationType.CLUB,title:"Application.Type.CLUB"},{name:l.MessageTemplateApplicationType.PPE,title:"Application.Type.PPE"},{name:l.MessageTemplateApplicationType.ECEC,title:"Application.Type.ECEC"},{name:l.MessageTemplateApplicationType.PPEWITHECEC,title:"Application.Type.PPEWITHECEC"}]}getTemplates(){return super.getTemplates().pipe((0,Y.U)(C=>l.Utils.sortFirstArrayAsSecondByPartialKey(C,this.reasonsPreferredOrder,"messageReason")))}}class Pl extends Ku{constructor(M){super(M),this.getTemplatesFn=M,this.type=l.MessageTemplateType.DECISION,this.reasonType=l.MessageTemplateReasonCode.DECISION_REASON,this.title=l.MessageTemplatesTitle.DECISION_TEMPLATES_TITLE,this.templateReasons=[{name:l.MessageTemplateDecisionType.CLUB,title:"Application.Type.CLUB"},{name:l.MessageTemplateDecisionType.PPE,title:"Application.Type.PPE"},{name:l.MessageTemplateDecisionType.ECEC,title:"Application.Type.ECEC"},{name:l.MessageTemplateDecisionType.VOUCHER,title:"General.Text.Voucher"},{name:l.MessageTemplateDecisionType.OTHERDECISION,title:"sivi.message.template.decision.other"}]}}const gl=["siviContent"];class ss extends l.SiviPage{constructor(M,C,Q,Ye,Zt,Pi,Ir,xo,Qa){super(Q,C,Ye),this.route=M,this.translate=C,this.notify=Q,this.router=Ye,this.siviGatewayService=Zt,this.unsavedChanges=Pi,this.templateRestService=Ir,this.modalCtrl=xo,this.otherDecisionsService=Qa,this.municipalityId=this.route.snapshot.paramMap.get("municipalityId"),this.constants=l.Constants,this.templates=[],this.title=l.MessageTemplatesTitle.GENERAL_TEMPLATE_TITLE}ngOnInit(){this.initProperties(),this.getAndMapTemplates().subscribe(M=>{this.templates=M,this.restoreModal()})}initProperties(){this.templatesStrategy=this.getTemplatesStrategy(),this.templatesStrategy?(this.type=this.templatesStrategy.getType(),this.title=this.templatesStrategy.getTitle(),this.templateStates=this.templatesStrategy.getTemplateStates(),this.templateReasons=this.templatesStrategy.getTemplateReasons()):console.error("No strategy found for given path")}getAndMapTemplates(){return this.getTemplates().pipe((0,Ne.z)(M=>this.mapTemplates(M).pipe((0,Y.U)(C=>C))))}getTemplatesStrategy(){const M=Q=>this.templateRestService.getTemplates(this.municipalityId,Q),C={[l.MessageTemplatePath.APPLICATION_TEMPLATE_PATH]:()=>new Da(M),[l.MessageTemplatePath.DECISION_TEMPLATE_PATH]:()=>new Pl(M),[l.MessageTemplatePath.DECISION_FEE_TEMPLATE_PATH]:()=>new Pl(M)};return C[this.path]?C[this.path]():null}getTemplates(){return this.templatesStrategy?(this.contentLoader.showLoader(),this.templatesStrategy.getTemplates().pipe((0,P.x)(()=>this.contentLoader.hideLoader()),(0,B.K)(M=>(console.log(M),this.contentLoader.showError(),(0,tt.of)([]))))):(0,tt.of)([])}getUpdatedTemplate(M){const C=this.templates.find(Q=>Q.id===M.id);return C?{...C,...M}:null}onDismiss(){this.unsavedChanges.canDeactivate(this).pipe((0,n.q)(1)).subscribe(M=>{M&&this.modalCtrl.dismiss(null)})}onSaveClick(M){if(this.templatesStrategy.reasonType===l.MessageTemplateReasonCode.DECISION_REASON){const Q=this.templates.find(Ye=>Ye.id===M.id);M.isDefaultTemplate=Q.isDefaultTemplate}const C=this.getUpdatedTemplate(M);this.saveMessageTemplate(C)}onMainActionClick(M){var C=this;return(0,o.Z)(function*(){const Q=C.getUpdatedTemplate(M);yield C.changeMessageTemplateState(Q)})()}changeMessageTemplateState(M){var C=this;return(0,o.Z)(function*(){const Q=C.getChangeTemplateStatePayload(M);if(Q.restEntityState!==l.Constants.CURRENT)return void C.saveMessageTemplate(Q);const Pi=yield(yield C.notify.inactivationConfirmPopup()).onDidDismiss();Pi&&Pi.data&&C.saveMessageTemplate(Q)})()}getChangeTemplateStatePayload(M){const C=l.Utils.getStartOfDay(rn().utc().toISOString()),Q=l.Utils.getEndOfDay(rn().utc().subtract(1,"day").toISOString()),Ye=M.restEntityState!==l.Constants.CURRENT,Zt=M.validFrom,Pi=rn(M.validUntil).isBefore(C)?null:M.validUntil;return{...M,validFrom:Ye?C:Zt,validUntil:Ye?Pi:Q}}saveMessageTemplate(M){if(!M)return;this.contentLoader.showLoader();const C=(0,me.Z)(M,(0,be.Z)());this.templateRestService.saveTemplate(C).pipe((0,P.x)(()=>this.contentLoader.hideLoader()),(0,B.K)(Q=>(this.notify.alertBackendError(Q,"Message.Save.Error"),Q))).subscribe(Q=>{this.notify.toastSaveSuccess(),this.updateTemplates(Q)})}updateTemplates(M){this.templates=l.Utils.patchImmutableCollectionBy(this.templates,M,"id")}openMessageTemplateEditor(M,C){var Q=this;return(0,o.Z)(function*(){if(Q.templates.find(xo=>xo.id===M&&xo.restEntityState===l.Constants.EXPIRED))return;const Zt={reason:C||Q.reason,translation:void 0},Pi=Q.templates.find(xo=>xo.id===M);if(Pi)Zt.translation=Pi.messageReasonTranslation;else if(M===l.Constants.NEW_ID){const xo={messageReason:C};Zt.translation=(yield(0,wt.z)(Q.setMessageReasonTranslation(xo))).messageReasonTranslation}yield(yield Q.modalCtrl.openModal({component:yi,componentProps:{municipalityId:Q.municipalityId,templateId:M,reason:Zt.reason,type:Q.type,reasonTranslation:Zt.translation},backdropDismiss:!1,cssClass:"modal-full-size"},"templateId",M,[{id:"reason",value:Zt.reason}])).onDidDismiss(),Q.contentLoader.showLoader(),Q.getAndMapTemplates().subscribe(xo=>{Q.templates=xo})})()}openMessageTemplateModal(M){var C=this;return(0,o.Z)(function*(){const Q=C.translate.instant("Form.Label.Message.Template.New"),Ye=yield C.modalCtrl.create({component:qi,componentProps:{title:Q,templateType:C.type,municipalityId:C.municipalityId},cssClass:"modal-auto-size"});yield Ye.present();const Zt=yield Ye.onDidDismiss();Zt.data&&(console.log(Zt),C.reason=Zt.data.reason,yield C.openMessageTemplateEditor(M,Zt.data.reason))})()}restoreModal(){var M=this;return(0,o.Z)(function*(){if(M.route.snapshot.queryParamMap.getAll("templateId").length>0){const Q=M.route.snapshot.queryParamMap.get("templateId"),Ye=M.route.snapshot.queryParamMap.get("reason");yield M.openMessageTemplateEditor(Q,Ye)}})()}mapTemplates(M){return(0,Be.D)(M.map(C=>this.setMessageReasonTranslation(C)))}setMessageReasonTranslation(M){if(M?.messageReason?.includes(l.MessageTemplateDecisionType.OTHERDECISION)){const C=M.messageReason.split("."),Q=C[C.length-2],Ye=M.messageReason.includes(".approved"),Zt=M.messageReason.includes(".disapproved");return this.otherDecisionsService.getOtherDecisionTypes("NOT_ENDED",rn(M.validFrom).format(l.DateFormats.STANDARD)).pipe((0,Y.U)(Pi=>{const Ir=Pi.find(xo=>xo.id===Q);return Ir?{...M,messageReasonTranslation:this.translate.instant(Ye?"General.Status.APPROVED":Zt?"General.Status.DISAPPROVED":"General.Text.DemandForRectificationFor")+" "+Ir[this.translate.currentLang]}:M}))}return(0,tt.of)(M)}}ss.\u0275fac=function(M){return new(M||ss)(e.Y36(j.gz),e.Y36(T.sK),e.Y36(l.NotifyService),e.Y36(j.F0),e.Y36(l.SiviProjectsGatewayService),e.Y36(l.UnsavedChangesGuard),e.Y36(l.MessageTemplateRestService),e.Y36(l.SiviModalController),e.Y36(Qr))},ss.\u0275cmp=e.Xpm({type:ss,selectors:[["sivi-mun-set-message-templates"]],viewQuery:function(M,C){if(1&M&&e.Gf(gl,7),2&M){let Q;e.iGM(Q=e.CRH())&&(C.contentLoader=Q.first)}},inputs:{path:"path"},features:[e.qOj],decls:12,vars:14,consts:[[3,"closeButton","hideNotifications","closed"],["navbar-title",""],[1,"ion-padding"],["siviKeyboardEvents","","tabindex","0","role","link",3,"siviClick"],["siviContent",""],[3,"templates","templateStates","templateReasons","cardHeaderClick","mainActionClick","saveClick"]],template:function(M,C){if(1&M&&(e.TgZ(0,"ion-header")(1,"sivi-lib-navbar",0),e.NdJ("closed",function(){return C.onDismiss()}),e.TgZ(2,"div",1),e._uU(3),e.ALo(4,"translate"),e.ALo(5,"async"),e.qZA()()(),e.TgZ(6,"ion-content",2)(7,"cgi-fab",3),e.NdJ("siviClick",function(){return C.openMessageTemplateModal(C.constants.NEW_ID)}),e.ALo(8,"translate"),e.qZA(),e.TgZ(9,"sivi-lib-content-loader",null,4)(11,"sivi-mun-set-message-templates-container",5),e.NdJ("cardHeaderClick",function(Ye){return C.openMessageTemplateEditor(Ye)})("mainActionClick",function(Ye){return C.onMainActionClick(Ye)})("saveClick",function(Ye){return C.onSaveClick(Ye)}),e.qZA()()()),2&M){let Q;e.xp6(1),e.Q6J("closeButton",!0)("hideNotifications",!0),e.xp6(2),e.AsE(" ",e.lcZ(4,8,C.title)," (",null==(Q=e.lcZ(5,10,C.siviGatewayService.getAppStateService().getMunicipality()))?null:Q.name,") "),e.xp6(4),e.uIk("aria-label",e.lcZ(8,12,"Message.Template.Add")),e.xp6(4),e.Q6J("templates",C.templates)("templateStates",C.templateStates)("templateReasons",C.templateReasons)}},styles:[".title[_ngcontent-%COMP%]{display:block;color:var(--ion-color-secondary)}"]});const gc=[{path:"message-templates",component:ss}];class rs{}rs.\u0275fac=function(M){return new(M||rs)},rs.\u0275mod=e.oAB({type:rs}),rs.\u0275inj=e.cJS({providers:[l.MessageTemplateRestService,l.CodeService,l.SiviModalController],imports:[Gi,l.NavbarComponentModule,l.TimeframeCardComponentModule,ya,$o,j.Bz.forChild(gc),T.aw,D.ez]}),e.B6R(ss,function(){return[E.W2,E.Gu,l.ContentLoaderComponent,l.KeyboardEventsDirective,l.NavbarComponent,sp]},function(){return[D.Ov,T.X$]});class Pc extends l.AbstractRestService{constructor(M,C){super(M,C),this.http=M,this.siviProjectsGateway=C,this.options=this.getCommonOptions()}saveTemplate(M){return this.saveEntity(M,"./api/sivi-ada-api/message-template/")}getTemplates(M,C){const Q="./api/sivi-ada-api/message-template/organization/"+M,Ye={...this.options};return C&&(Ye.params=(new g.LE).set("messageReason",C)),this.get(Q,Ye).pipe((0,Y.U)(Zt=>Zt.content))}}function ks(te,M){if(1&te){const C=e.EpF();e.ynx(0),e.TgZ(1,"sivi-lib-timeframe-card",4),e.NdJ("clickCardHeaderEvent",function(Ye){e.CHM(C);const Zt=e.oxw(3);return e.KtG(Zt.clickCardHeaderEvent.emit(Ye))})("clickMainActionEvent",function(){const Zt=e.CHM(C).$implicit,Pi=e.oxw(3);return e.KtG(Pi.onClickMainAction(Zt))})("clickSaveEvent",function(Ye){e.CHM(C);const Zt=e.oxw(3);return e.KtG(Zt.clickSave.emit(Ye))}),e.ALo(2,"translate"),e.ALo(3,"translate"),e.qZA(),e.BQk()}if(2&te){const C=M.$implicit,Q=e.oxw(3);e.xp6(1),e.Q6J("id",C.id)("title",e.lcZ(2,7,C.messageReason))("subtitle",Q.getSubTitle(C.languageDescriptions))("validFrom",C.validFrom)("validUntil",C.validUntil)("state",C.restEntityState)("textMainActionButton",e.lcZ(3,9,Q.setMainActionButtonText(C)))}}function Ol(te,M){if(1&te&&(e.TgZ(0,"div")(1,"h2"),e._uU(2),e.qZA(),e.TgZ(3,"div",3),e.YNc(4,ks,4,11,"ng-container",2),e.qZA()()),2&te){const C=M.$implicit,Q=e.oxw(2);e.xp6(2),e.Oqu(Q.getRowTitle(C)),e.xp6(2),e.Q6J("ngForOf",Q.getTemplatesByType(C))("ngForTrackBy",Q.trackByFnAll)}}function _c(te,M){if(1&te&&(e.ynx(0),e.YNc(1,Ol,5,3,"div",2),e.BQk()),2&te){const C=e.oxw();e.xp6(1),e.Q6J("ngForOf",C.getAvailableTypes())("ngForTrackBy",C.trackByFn)}}function Yc(te,M){1&te&&(e.TgZ(0,"div",5),e._uU(1),e.ALo(2,"translate"),e.qZA()),2&te&&(e.xp6(1),e.hij(" ",e.lcZ(2,1,"Message.NoDataFound")," "))}Pc.\u0275fac=function(M){return new(M||Pc)(e.LFG(g.eN),e.LFG(l.SiviProjectsGatewayService))},Pc.\u0275prov=e.Yz7({token:Pc,factory:Pc.\u0275fac,providedIn:"root"});class lu extends l.SiviComponent{constructor(M){super(),this.translate=M,this.clickCardHeaderEvent=new e.vpe,this.clickMainActionEvent=new e.vpe,this.clickSave=new e.vpe,this.typesDictionary={[l.ECECMessageTemplateType.ECEC]:this.translate.instant("Application.Type.ECEC"),[l.ECECMessageTemplateType.ECEC_AGREEMENT]:this.translate.instant("sivi.message.template.starting-and-ending.ecec-agreement"),[l.ECECMessageTemplateType.SERVICE_VOUCHER]:this.translate.instant("sivi.organization.type.decision.type.voucher"),[l.ECECMessageTemplateType.CLUB]:this.translate.instant("Application.Type.CLUB")}}getSubTitle(M){return M&&M.filter(C=>C.checked).map(C=>C.language).join(", ")}getAvailableTypes(){return this.templates?Object.keys(this.typesDictionary).filter(M=>Object.keys(this.templates).includes(M)):[]}getTemplatesByType(M){return this.templates&&this.templates[M]||[]}getRowTitle(M){return this.typesDictionary[M]}onClickMainAction(M){this.clickMainActionEvent.emit(M)}setMainActionButtonText(M){let C;switch(M.restEntityState){case l.Constants.FUTURE:C="General.Buttons.Activate";break;case l.Constants.CURRENT:C="General.Buttons.Inactivate";break;default:C=""}return C}}lu.\u0275fac=function(M){return new(M||lu)(e.Y36(T.sK))},lu.\u0275cmp=e.Xpm({type:lu,selectors:[["sivi-mun-set-ecec-message-template"]],inputs:{templates:"templates",state:"state"},outputs:{clickCardHeaderEvent:"clickCardHeaderEvent",clickMainActionEvent:"clickMainActionEvent",clickSave:"clickSave"},features:[e.qOj],decls:4,vars:4,consts:[[4,"ngIf","ngIfElse"],["noContent",""],[4,"ngFor","ngForOf","ngForTrackBy"],[1,"templates-list-container"],[3,"id","title","subtitle","validFrom","validUntil","state","textMainActionButton","clickCardHeaderEvent","clickMainActionEvent","clickSaveEvent"],[1,"margin-left"]],template:function(M,C){if(1&M&&(e.YNc(0,_c,2,2,"ng-container",0),e.ALo(1,"keyvalue"),e.YNc(2,Yc,3,3,"ng-template",null,1,e.W1O)),2&M){const Q=e.MAs(3);let Ye;e.Q6J("ngIf",null==(Ye=e.lcZ(1,2,C.templates))?null:Ye.length)("ngIfElse",Q)}},dependencies:[l.TimeframeCardComponent,D.sg,D.O5,D.Nd,T.X$],styles:[".card-container[_ngcontent-%COMP%]{display:flex}h2[_ngcontent-%COMP%], .margin-left[_ngcontent-%COMP%]{margin-left:16px}[_nghost-%COMP%]{--sivi-card-margin: 0}.templates-list-container[_ngcontent-%COMP%]{display:grid;grid-column-gap:24px;grid-template-columns:repeat(auto-fill,minmax(344px,1fr));grid-row-gap:24px}"],data:{animation:[l.listAnimations]},changeDetection:0});const ac=["siviContent"];class bd extends l.SiviPage{constructor(M,C,Q,Ye,Zt,Pi,Ir,xo,Qa){super(Ye,M,Ir,Q,Qa,C),this.translate=M,this.modalCtrl=C,this.route=Q,this.notify=Ye,this.messageTemplateService=Zt,this.unsavedChanges=Pi,this.router=Ir,this.ececMessageTemplatesService=xo,this.location=Qa,this.municipalityId=this.route.snapshot.paramMap.get("municipalityId"),this.reason=l.MessageTemplateReasonCode.STARTING_AND_ENDING_REASON,this.constants=l.Constants}ngOnInit(){this.getTemplates()}getTemplates(){this.contentLoader.showLoader(),this.ececMessageTemplatesService.getTemplates(this.municipalityId,this.reason).pipe((0,V.b)(M=>this.allTemplates=M||[]),(0,Y.U)(M=>this.groupTemplatesByStateAndType(M))).subscribe(M=>{this.contentLoader.hideLoader(),this.updateTemplatesView(M)},M=>{console.error(M),this.contentLoader.showError()})}updateTemplatesView(M){this.activeTemplates={...M.CURRENT},this.futureTemplates={...M.FUTURE},this.expiredTemplates={...M.EXPIRED}}onClickMainAction(M){var C=this;return(0,o.Z)(function*(){yield C.changeMessageTemplateState(M)})()}onClickSave(M){const C={...this.getTemplate(M.id),...M};this.saveECECMessageTemplate(C,!1)}onClickCardHeader(M){const C=this.getTemplate(M);if(C){const{type:Q,messageReason:Ye}=C;this.openMessageTemplateEditor(M,Ye,Q)}}getTemplate(M){return this.allTemplates.find(C=>C.id===M)}onDismiss(){this.unsavedChanges.canDeactivate(this).pipe((0,n.q)(1)).subscribe(M=>{M&&this.modalCtrl.dismiss(null)})}changeMessageTemplateState(M){var C=this;return(0,o.Z)(function*(){const Q=C.getChangeTemplateStatePayload(M);if(Q.restEntityState!==l.Constants.CURRENT)return void C.saveECECMessageTemplate(Q);const Pi=yield(yield C.notify.inactivationConfirmPopup()).onDidDismiss();Pi&&Pi.data&&C.saveECECMessageTemplate(Q)})()}getChangeTemplateStatePayload(M){const C=l.Utils.getStartOfDay(rn().utc().toISOString()),Q=l.Utils.getEndOfDay(rn().utc().subtract(1,"day").toISOString()),Ye=M.restEntityState!==l.Constants.CURRENT,Zt=M.validFrom,Pi=rn(M.validUntil).isBefore(C)?null:M.validUntil;return{...M,validFrom:Ye?C:Zt,validUntil:Ye?Pi:Q}}saveECECMessageTemplate(M,C=!0){this.contentLoader.showLoader(),this.ececMessageTemplatesService.saveTemplate(M).pipe((0,P.x)(()=>this.contentLoader.hideLoader())).subscribe(()=>{this.notify.toastSaveSuccess(),C&&this.getTemplates()},Q=>{console.error(Q),this.notify.alertBackendError(Q,"Message.Save.Error")})}openMessageTemplateEditor(M,C,Q){var Ye=this;return(0,o.Z)(function*(){yield(yield Ye.modalCtrl.openModal({component:yi,componentProps:{municipalityId:Ye.municipalityId,templateId:M,reason:C,type:Q},backdropDismiss:!1,cssClass:"modal-full-size"},"templateId",M,[{id:"reason",value:C}])).onDidDismiss(),Ye.getTemplates()})()}openMessageTemplateModal(M){var C=this;return(0,o.Z)(function*(){const Q=C.translate.instant("Form.Label.Message.Template.New"),Ye=yield C.modalCtrl.create({component:qi,componentProps:{title:Q,templateType:l.MessageTemplateType.ECEC_MESSAGE,municipalityId:C.municipalityId},cssClass:"modal-auto-size"});yield Ye.present();const Zt=yield Ye.onDidDismiss();if(Zt.data){const{reason:Pi,messageType:Ir}=Zt.data;yield C.openMessageTemplateEditor(M,Pi,Ir)}})()}restoreModal(){var M=this;return(0,o.Z)(function*(){if(M.route.snapshot.queryParamMap.getAll("templateId").length>0){const Q=M.route.snapshot.queryParamMap.get("templateId"),Ye=M.route.snapshot.queryParamMap.get("reason");yield M.openMessageTemplateEditor(Q,Ye)}})()}filterTemplatesByState(M,C){return C.filter(Q=>Q.restEntityState===M)||[]}groupTemplatesByType(M){return(0,le.Z)(M,"type")}groupTemplatesByStateAndType(M){const C=this.filterTemplatesByState(l.Constants.CURRENT,M),Q=this.filterTemplatesByState(l.Constants.FUTURE,M),Ye=this.filterTemplatesByState(l.Constants.EXPIRED,M);return{CURRENT:this.groupTemplatesByType(C),FUTURE:this.groupTemplatesByType(Q),EXPIRED:this.groupTemplatesByType(Ye)}}}bd.\u0275fac=function(M){return new(M||bd)(e.Y36(T.sK),e.Y36(l.SiviModalController),e.Y36(j.gz),e.Y36(l.NotifyService),e.Y36(l.MessageTemplateRestService),e.Y36(l.UnsavedChangesGuard),e.Y36(j.F0),e.Y36(Pc),e.Y36(D.Ye))},bd.\u0275cmp=e.Xpm({type:bd,selectors:[["sivi-mun-set-ecec-message-templates"]],viewQuery:function(M,C){if(1&M&&e.Gf(ac,7),2&M){let Q;e.iGM(Q=e.CRH())&&(C.contentLoader=Q.first)}},features:[e.qOj],decls:22,vars:23,consts:[[3,"closeButton","hideNotifications","closed"],["navbar-title",""],[1,"ion-padding"],["siviKeyboardEvents","","tabindex","0","role","link",3,"siviClick"],["siviContent",""],[3,"templates","state","clickCardHeaderEvent","clickMainActionEvent","clickSave"],[3,"templates","state","clickMainActionEvent","clickSave"]],template:function(M,C){1&M&&(e.TgZ(0,"ion-header")(1,"sivi-lib-navbar",0),e.NdJ("closed",function(){return C.onDismiss()}),e.TgZ(2,"div",1),e._uU(3),e.ALo(4,"translate"),e.qZA()()(),e.TgZ(5,"ion-content",2)(6,"cgi-fab",3),e.NdJ("siviClick",function(){return C.openMessageTemplateModal(C.constants.NEW_ID)}),e.ALo(7,"translate"),e.qZA(),e.TgZ(8,"sivi-lib-content-loader",null,4)(10,"h1"),e._uU(11),e.ALo(12,"translate"),e.qZA(),e.TgZ(13,"sivi-mun-set-ecec-message-template",5),e.NdJ("clickCardHeaderEvent",function(Ye){return C.onClickCardHeader(Ye)})("clickMainActionEvent",function(Ye){return C.onClickMainAction(Ye)})("clickSave",function(Ye){return C.onClickSave(Ye)}),e.qZA(),e.TgZ(14,"h1"),e._uU(15),e.ALo(16,"translate"),e.qZA(),e.TgZ(17,"sivi-mun-set-ecec-message-template",5),e.NdJ("clickCardHeaderEvent",function(Ye){return C.onClickCardHeader(Ye)})("clickMainActionEvent",function(Ye){return C.onClickMainAction(Ye)})("clickSave",function(Ye){return C.onClickSave(Ye)}),e.qZA(),e.TgZ(18,"h1"),e._uU(19),e.ALo(20,"translate"),e.qZA(),e.TgZ(21,"sivi-mun-set-ecec-message-template",6),e.NdJ("clickMainActionEvent",function(Ye){return C.onClickMainAction(Ye)})("clickSave",function(Ye){return C.onClickSave(Ye)}),e.qZA()()()),2&M&&(e.xp6(1),e.Q6J("closeButton",!0)("hideNotifications",!0),e.xp6(2),e.hij(" ",e.lcZ(4,13,"Page.Templates.ECEC.Starting.And.Ending.Title.Plural")," "),e.xp6(3),e.uIk("aria-label",e.lcZ(7,15,"Message.Template.Add")),e.xp6(5),e.Oqu(e.lcZ(12,17,"General.Text.Active")),e.xp6(2),e.Q6J("templates",C.activeTemplates)("state",C.constants.CURRENT),e.xp6(2),e.Oqu(e.lcZ(16,19,"General.Text.Future")),e.xp6(2),e.Q6J("templates",C.futureTemplates)("state",C.constants.FUTURE),e.xp6(2),e.Oqu(e.lcZ(20,21,"General.Text.History")),e.xp6(2),e.Q6J("templates",C.expiredTemplates)("state",C.constants.EXPIRED))},dependencies:[E.W2,E.Gu,l.ContentLoaderComponent,l.KeyboardEventsDirective,l.NavbarComponent,lu,T.X$],styles:[".card-container[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap}sivi-card-container[_ngcontent-%COMP%]   .card-header[_ngcontent-%COMP%]{height:90px}sivi-card-container[_ngcontent-%COMP%]   .card-content[_ngcontent-%COMP%]{height:234px}h1[_ngcontent-%COMP%]{color:var(--ion-color-secondary);margin-left:16px}"]});const kd=[{path:"ecec-message-templates",component:bd}];class Oc{}function or(te,M){if(1&te){const C=e.EpF();e.ynx(0),e.TgZ(1,"sivi-lib-timeframe-card",4),e.NdJ("clickCardHeaderEvent",function(){const Zt=e.CHM(C).$implicit,Pi=e.oxw(3);return e.KtG(Pi.clickCardHeaderEvent.emit(Zt))})("clickMainActionEvent",function(){const Zt=e.CHM(C).$implicit,Pi=e.oxw(3);return e.KtG(Pi.onClickMainAction(Zt))})("clickSaveEvent",function(Ye){e.CHM(C);const Zt=e.oxw(3);return e.KtG(Zt.clickSave.emit(Ye))}),e.ALo(2,"translate"),e.ALo(3,"translate"),e.qZA(),e.BQk()}if(2&te){const C=M.$implicit,Q=e.oxw(3);e.xp6(1),e.Q6J("id",C.id)("title",e.lcZ(2,7,C.messageReason))("subtitle",Q.getSubTitle(C.languageDescriptions))("validFrom",C.validFrom)("validUntil",C.validUntil)("state",C.restEntityState)("textMainActionButton",e.lcZ(3,9,Q.setMainActionButtonText(C)))}}function Dr(te,M){if(1&te&&(e.TgZ(0,"div")(1,"h2"),e._uU(2),e.qZA(),e.TgZ(3,"div",3),e.YNc(4,or,4,11,"ng-container",2),e.qZA()()),2&te){const C=M.$implicit,Q=e.oxw(2);e.xp6(2),e.Oqu(Q.getRowTitle(C)),e.xp6(2),e.Q6J("ngForOf",Q.getTemplatesByType(C))("ngForTrackBy",Q.trackByFn)}}function kr(te,M){if(1&te&&(e.ynx(0),e.YNc(1,Dr,5,3,"div",2),e.BQk()),2&te){const C=e.oxw();e.xp6(1),e.Q6J("ngForOf",C.getAvailableTypes())("ngForTrackBy",C.trackByFn)}}function Qo(te,M){1&te&&(e.TgZ(0,"div",5),e._uU(1),e.ALo(2,"translate"),e.qZA()),2&te&&(e.xp6(1),e.hij(" ",e.lcZ(2,1,"Message.NoDataFound")," "))}Oc.\u0275fac=function(M){return new(M||Oc)},Oc.\u0275mod=e.oAB({type:Oc}),Oc.\u0275inj=e.cJS({providers:[l.MessageTemplateRestService,l.CodeService,l.SiviModalController],imports:[l.TimeframeCardComponentModule,Gi,l.NavbarComponentModule,$o,j.Bz.forChild(kd)]});class oo extends l.SiviComponent{constructor(M){super(),this.translate=M,this.clickCardHeaderEvent=new e.vpe,this.clickMainActionEvent=new e.vpe,this.clickSave=new e.vpe,this.typesDictionary={[l.FeeAndDecisionTemplateType.TEXT]:this.translate.instant(l.FeeAndDecisionTemplateType.TEXT),[l.FeeAndDecisionTemplateType.TEXT_FEE_BASIS_DECISION]:this.translate.instant(l.FeeAndDecisionTemplateType.TEXT_FEE_BASIS_DECISION),[l.FeeAndDecisionTemplateType.TEXT_JUSTIFICATION]:this.translate.instant(l.FeeAndDecisionTemplateType.TEXT_JUSTIFICATION),[l.FeeAndDecisionTemplateType.FEE_REDUCTION]:this.translate.instant(l.FeeAndDecisionTemplateType.FEE_REDUCTION),[l.FeeAndDecisionTemplateType.INSTRUCTIONS]:this.translate.instant(l.FeeAndDecisionTemplateType.INSTRUCTIONS),[l.FeeAndDecisionTemplateType.INCOME]:this.translate.instant(l.FeeAndDecisionTemplateType.INCOME)}}getSubTitle(M){if(M)return M.filter(C=>C.checked).map(C=>C.language).join(", ")}getAvailableTypes(){return this.templates?Object.keys(this.typesDictionary).filter(M=>Object.keys(this.templates).includes(M)):[]}getTemplatesByType(M){return this.templates&&this.templates[M]||[]}getRowTitle(M){return this.typesDictionary[M]}onClickMainAction(M){this.clickMainActionEvent.emit(M)}setMainActionButtonText(M){let C;switch(M.restEntityState){case l.Constants.FUTURE:C="General.Buttons.Activate";break;case l.Constants.CURRENT:C="General.Buttons.Inactivate";break;default:C=""}return C}}oo.\u0275fac=function(M){return new(M||oo)(e.Y36(T.sK))},oo.\u0275cmp=e.Xpm({type:oo,selectors:[["sivi-mun-set-decision-fee-messages"]],inputs:{templates:"templates",state:"state"},outputs:{clickCardHeaderEvent:"clickCardHeaderEvent",clickMainActionEvent:"clickMainActionEvent",clickSave:"clickSave"},features:[e.qOj],decls:4,vars:4,consts:[[4,"ngIf","ngIfElse"],["noContent",""],[4,"ngFor","ngForOf","ngForTrackBy"],[1,"templates-list-container"],[3,"id","title","subtitle","validFrom","validUntil","state","textMainActionButton","clickCardHeaderEvent","clickMainActionEvent","clickSaveEvent"],[1,"margin-left"]],template:function(M,C){if(1&M&&(e.YNc(0,kr,2,2,"ng-container",0),e.ALo(1,"keyvalue"),e.YNc(2,Qo,3,3,"ng-template",null,1,e.W1O)),2&M){const Q=e.MAs(3);let Ye;e.Q6J("ngIf",null==(Ye=e.lcZ(1,2,C.templates))?null:Ye.length)("ngIfElse",Q)}},dependencies:[l.TimeframeCardComponent,D.sg,D.O5,D.Nd,T.X$],styles:[".card-container[_ngcontent-%COMP%]{display:flex}h2[_ngcontent-%COMP%], .margin-left[_ngcontent-%COMP%]{margin-left:16px}[_nghost-%COMP%]{--sivi-card-margin: 0}.templates-list-container[_ngcontent-%COMP%]{display:grid;grid-column-gap:24px;grid-template-columns:repeat(auto-fill,minmax(344px,1fr));grid-row-gap:24px}"],data:{animation:[l.listAnimations]},changeDetection:0});const da=["siviContent"];class ha extends l.SiviPage{constructor(M,C,Q,Ye,Zt,Pi,Ir,xo){super(Ye,M,Ir),this.translateService=M,this.modalCtrl=C,this.route=Q,this.notify=Ye,this.messageTemplateService=Zt,this.unsavedChanges=Pi,this.router=Ir,this.ececMessageTemplatesService=xo,this.municipalityId=this.route.snapshot.paramMap.get("municipalityId"),this.reason=l.MessageTemplateReasonCode.DECISION_FEE_REASON,this.constants=l.Constants}ngOnInit(){this.groupTemplates()}groupTemplates(){this.getTemplates().pipe((0,w.R)(this.destroy$)).subscribe(M=>{this.activeTemplates=M.CURRENT,this.futureTemplates=M.FUTURE,this.expiredTemplates=M.EXPIRED})}getTemplates(){return this.contentLoader.showLoader(),this.ececMessageTemplatesService.getTemplates(this.municipalityId,this.reason).pipe((0,V.b)(M=>this.templates=M),(0,Y.U)(M=>this.groupTemplatesByStateAndType(M)),(0,P.x)(()=>this.contentLoader.hideLoader()),(0,B.K)(M=>(console.error(M),this.contentLoader.showError(),(0,tt.of)({}))))}onClickMainAction(M){var C=this;return(0,o.Z)(function*(){const Q=C.getUpdatedTemplate(M);yield C.changeMessageTemplateState(Q)})()}onClickSave(M){var C=this;return(0,o.Z)(function*(){const Q=C.getUpdatedTemplate(M);C.saveMessageTemplate(Q)})()}onClickCardHeader(M){const{id:C,messageReason:Q,type:Ye}=M;this.openMessageTemplateEditor(C,Q,Ye)}onDismiss(){this.unsavedChanges.canDeactivate(this).pipe((0,n.q)(1)).subscribe(M=>{M&&this.modalCtrl.dismiss(null)})}changeMessageTemplateState(M){var C=this;return(0,o.Z)(function*(){const Q=C.getChangeTemplateStatePayload(M);if(Q.restEntityState!==l.Constants.CURRENT)return void C.saveMessageTemplate(Q);const Pi=yield(yield C.notify.inactivationConfirmPopup()).onDidDismiss();Pi&&Pi.data&&C.saveMessageTemplate(Q)})()}getChangeTemplateStatePayload(M){const C=l.Utils.getStartOfDay(rn().utc().toISOString()),Q=l.Utils.getEndOfDay(rn().utc().subtract(1,"day").toISOString()),Ye=M.restEntityState!==l.Constants.CURRENT,Zt=M.validFrom,Pi=rn(M.validUntil).isBefore(C)?null:M.validUntil;return{...M,validFrom:Ye?C:Zt,validUntil:Ye?Pi:Q}}saveMessageTemplate(M){this.contentLoader.showLoader(),this.ececMessageTemplatesService.saveTemplate(M).pipe((0,P.x)(()=>this.contentLoader.hideLoader()),(0,B.K)(C=>(this.notify.alertBackendError(C,"Message.Save.Error"),(0,tt.of)(null)))).subscribe(C=>{C&&(this.notify.toastSaveSuccess(),this.groupTemplates())})}getUpdatedTemplate(M){const C=this.templates.find(Q=>Q.id===M.id);return C?{...C,...M}:null}openMessageTemplateEditor(M,C,Q){var Ye=this;return(0,o.Z)(function*(){yield(yield Ye.modalCtrl.openModal({component:yi,componentProps:{municipalityId:Ye.municipalityId,templateId:M,reason:C,type:Q},backdropDismiss:!1,cssClass:"modal-full-size"},"templateId",M,[{id:"reason",value:C}])).onDidDismiss(),Ye.groupTemplates()})()}openMessageTemplateModal(M){var C=this;return(0,o.Z)(function*(){const Q=C.translate.instant("Form.Label.Message.Template.New"),Ye=yield C.modalCtrl.create({component:qi,componentProps:{title:Q,templateType:l.MessageTemplateType.DECISION_FEE,municipalityId:C.municipalityId},cssClass:"modal-auto-size"});yield Ye.present();const Zt=yield Ye.onDidDismiss();if(Zt.data){const{reason:Pi,messageType:Ir}=Zt.data;yield C.openMessageTemplateEditor(M,Pi,Ir)}})()}restoreModal(){var M=this;return(0,o.Z)(function*(){if(M.route.snapshot.queryParamMap.getAll("templateId").length>0){const Q=M.route.snapshot.queryParamMap.get("templateId"),Ye=M.route.snapshot.queryParamMap.get("reason");yield M.openMessageTemplateEditor(Q,Ye)}})()}filterTemplatesByState(M,C){return C.filter(Q=>Q.restEntityState===M)||[]}groupTemplatesByType(M){return(0,le.Z)(M,"type")}groupTemplatesByStateAndType(M){const C=this.filterTemplatesByState(l.Constants.CURRENT,M),Q=this.filterTemplatesByState(l.Constants.FUTURE,M),Ye=this.filterTemplatesByState(l.Constants.EXPIRED,M);return{CURRENT:this.groupTemplatesByType(C),FUTURE:this.groupTemplatesByType(Q),EXPIRED:this.groupTemplatesByType(Ye)}}}ha.\u0275fac=function(M){return new(M||ha)(e.Y36(T.sK),e.Y36(l.SiviModalController),e.Y36(j.gz),e.Y36(l.NotifyService),e.Y36(l.MessageTemplateRestService),e.Y36(l.UnsavedChangesGuard),e.Y36(j.F0),e.Y36(Pc))},ha.\u0275cmp=e.Xpm({type:ha,selectors:[["sivi-mun-set-decision-fee-messages-template"]],viewQuery:function(M,C){if(1&M&&e.Gf(da,7),2&M){let Q;e.iGM(Q=e.CRH())&&(C.contentLoader=Q.first)}},features:[e.qOj],decls:22,vars:23,consts:[[3,"closeButton","hideNotifications","closed"],["navbar-title",""],[1,"ion-padding"],["siviKeyboardEvents","","tabindex","0","role","link",3,"siviClick"],["siviContent",""],[3,"templates","state","clickCardHeaderEvent","clickMainActionEvent","clickSave"]],template:function(M,C){1&M&&(e.TgZ(0,"ion-header")(1,"sivi-lib-navbar",0),e.NdJ("closed",function(){return C.onDismiss()}),e.TgZ(2,"div",1),e._uU(3),e.ALo(4,"translate"),e.qZA()()(),e.TgZ(5,"ion-content",2)(6,"cgi-fab",3),e.NdJ("siviClick",function(){return C.openMessageTemplateModal(C.constants.NEW_ID)}),e.ALo(7,"translate"),e.qZA(),e.TgZ(8,"sivi-lib-content-loader",null,4)(10,"h1"),e._uU(11),e.ALo(12,"translate"),e.qZA(),e.TgZ(13,"sivi-mun-set-decision-fee-messages",5),e.NdJ("clickCardHeaderEvent",function(Ye){return C.onClickCardHeader(Ye)})("clickMainActionEvent",function(Ye){return C.onClickMainAction(Ye)})("clickSave",function(Ye){return C.onClickSave(Ye)}),e.qZA(),e.TgZ(14,"h1"),e._uU(15),e.ALo(16,"translate"),e.qZA(),e.TgZ(17,"sivi-mun-set-decision-fee-messages",5),e.NdJ("clickCardHeaderEvent",function(Ye){return C.onClickCardHeader(Ye)})("clickMainActionEvent",function(Ye){return C.onClickMainAction(Ye)})("clickSave",function(Ye){return C.onClickSave(Ye)}),e.qZA(),e.TgZ(18,"h1"),e._uU(19),e.ALo(20,"translate"),e.qZA(),e.TgZ(21,"sivi-mun-set-decision-fee-messages",5),e.NdJ("clickCardHeaderEvent",function(Ye){return C.onClickCardHeader(Ye)})("clickMainActionEvent",function(Ye){return C.onClickMainAction(Ye)})("clickSave",function(Ye){return C.onClickSave(Ye)}),e.qZA()()()),2&M&&(e.xp6(1),e.Q6J("closeButton",!0)("hideNotifications",!0),e.xp6(2),e.hij(" ",e.lcZ(4,13,"Page.MunicipalitySettings.FeeAndValueDecision.Title")," "),e.xp6(3),e.uIk("aria-label",e.lcZ(7,15,"Message.Template.Add")),e.xp6(5),e.Oqu(e.lcZ(12,17,"General.Text.Active")),e.xp6(2),e.Q6J("templates",C.activeTemplates)("state",C.constants.CURRENT),e.xp6(2),e.Oqu(e.lcZ(16,19,"General.Text.Future")),e.xp6(2),e.Q6J("templates",C.futureTemplates)("state",C.constants.FUTURE),e.xp6(2),e.Oqu(e.lcZ(20,21,"General.Text.History")),e.xp6(2),e.Q6J("templates",C.expiredTemplates)("state",C.constants.EXPIRED))},dependencies:[E.W2,E.Gu,l.ContentLoaderComponent,l.KeyboardEventsDirective,l.NavbarComponent,oo,T.X$],styles:[".card-container[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap}sivi-card-container[_ngcontent-%COMP%]   .card-header[_ngcontent-%COMP%]{height:90px}sivi-card-container[_ngcontent-%COMP%]   .card-content[_ngcontent-%COMP%]{height:234px}h1[_ngcontent-%COMP%]{color:var(--ion-color-secondary);margin-left:16px}"]});class Ia{}Ia.\u0275fac=function(M){return new(M||Ia)},Ia.\u0275mod=e.oAB({type:Ia}),Ia.\u0275inj=e.cJS({imports:[l.TimeframeCardComponentModule,Gi]});class cc{}cc.\u0275fac=function(M){return new(M||cc)},cc.\u0275mod=e.oAB({type:cc}),cc.\u0275inj=e.cJS({providers:[l.MessageTemplateRestService,l.CodeService,l.SiviModalController],imports:[l.TimeframeCardComponentModule,Gi,l.NavbarComponentModule,$o,Ia]});class Rs extends l.AbstractRestService{constructor(M,C){super(M,C),this.http=M,this.siviProjectsGateway=C,this.ececExtentBaseUrl="./api/sivi-accounts-api/payment-extent-options"}saveExtentOptions(M){return this.put(M,this.ececExtentBaseUrl)}getExtentOptionsByMunicipalityId(M,C){"ECEC"===C?C="sivi.care.extent-option.ecec":"PPEWITHECEC"===C&&(C="sivi.care.extent-option.ecec-ppe");const Q=`${this.ececExtentBaseUrl}?municipalityId=${M}&type=${C}`;return this.get(Q)}getExtentById(M){const C=`${this.ececExtentBaseUrl}/${M}`;return this.get(C)}}Rs.\u0275fac=function(M){return new(M||Rs)(e.LFG(g.eN),e.LFG(l.SiviProjectsGatewayService))},Rs.\u0275prov=e.Yz7({token:Rs,factory:Rs.\u0275fac});class xc{}xc.ECEC="sivi.care.extent-option.ecec",xc.ECECWITHPPE="sivi.care.extent-option.ecec-ppe";class Hc{static createExtentOptionValue(){return{paymentExtentMunicipalitySetting:{id:null},overHoursPerWeek:0,maxHoursPerWeek:0,overHoursPerWeekECEC:0,maxHoursPerWeekECEC:0,maxHoursPerMonth:0,maxHoursPerMonthECEC:0,overHoursPerWeekPrivateECEC:0,maxHoursPerWeekPrivateECEC:0,maxFees:0,fullTime:!1,partTime:!1,privateFullTime:!1,privatePartTime:!1,tempId:(Date.now()*Math.floor(Math.random()*Math.floor(1e3))).toString()}}static getExtentOptionsHours(M,C){const Q=[];for(const Ye of M)Q.push({id:Ye.id,value:Ye.overHoursPerWeek+"-"+Ye.maxHoursPerWeek+" "+C});return l.Utils.getSelectOptionsFromArray(Q,"id","value")}static getWeeklyCareTimeOptions(M,C){const Q=[];try{for(const Ye of M){const Zt=Ye.fromTime?Ye.fromTime+"-"+Ye.untilTime:"",Pi=Ye.languages.find(Ir=>Ir.language===C);Q.push({id:Ye.id,name:Pi.name+` ${Zt}`,value:{type:Ye.option,id:Ye.id}})}return l.Utils.getSelectOptionsFromArray(Q,"value","name")}catch(Ye){return console.error("getWeeklyCareTimeOptions",Ye),[]}}}function lp(te,M){if(1&te){const C=e.EpF();e.TgZ(0,"ion-col",30)(1,"sivi-lib-datepicker",31),e.NdJ("update",function(Ye){e.CHM(C);const Zt=e.oxw(2);return e.KtG(Zt.onChangeDate(Ye))}),e.qZA()()}if(2&te){const C=e.oxw(2);e.xp6(1),e.Q6J("minDate",C.minDate)}}function kp(te,M){if(1&te&&(e.TgZ(0,"ion-col",32),e._UZ(1,"cgi-input",33),e.ALo(2,"translate"),e.qZA()),2&te){const C=e.oxw(2);e.xp6(1),e.Q6J("viewMode",!0)("label",e.lcZ(2,3,"Form.Label.From"))("value",C.getFormattedTimeOrDate(C.extentOption.fromDate))}}function Ju(te,M){if(1&te&&(e._UZ(0,"cgi-input",33),e.ALo(1,"translate")),2&te){const C=e.oxw(2);e.Q6J("viewMode",!0)("label",e.lcZ(1,3,"Form.Label.Until"))("value",C.getFormattedTimeOrDate(C.extentOption.validUntil))}}function Su(te,M){if(1&te){const C=e.EpF();e.TgZ(0,"ion-button",34),e.NdJ("click",function(){e.CHM(C);const Ye=e.oxw(2);return e.KtG(Ye.onClickDelete())}),e._uU(1),e.ALo(2,"translate"),e.qZA()}if(2&te){const C=e.oxw(2);e.uIk("aria-label",C.deleteEcecExtentOptionLabel),e.xp6(1),e.hij(" ",e.lcZ(2,2,"General.Buttons.Cancel")," ")}}function qs(te,M){if(1&te){const C=e.EpF();e.TgZ(0,"ion-button",34),e.NdJ("click",function(){e.CHM(C);const Ye=e.oxw(2);return e.KtG(Ye.onClickEdit())}),e._uU(1),e.ALo(2,"translate"),e.qZA()}if(2&te){const C=e.oxw(2);e.uIk("aria-label",C.editEcecExtentOptionLabel),e.xp6(1),e.hij(" ",e.lcZ(2,2,"General.Buttons.Edit")," ")}}function Cd(te,M){if(1&te){const C=e.EpF();e.TgZ(0,"ion-button",34),e.NdJ("click",function(){e.CHM(C);const Ye=e.oxw(2);return e.KtG(Ye.onClickAddRow())}),e.ALo(1,"translate"),e._uU(2),e.ALo(3,"translate"),e.qZA()}2&te&&(e.uIk("aria-label",e.lcZ(1,2,"General.Buttons.AddRow ")),e.xp6(2),e.hij(" ",e.lcZ(3,4,"General.Buttons.Add.Row")," "))}function la(te,M){1&te&&(e.TgZ(0,"span",37),e._uU(1,"*"),e.qZA())}function ht(te,M){if(1&te&&(e.TgZ(0,"th",35),e._uU(1),e.ALo(2,"translate"),e.YNc(3,la,2,0,"span",36),e.qZA()),2&te){const C=e.oxw(2);e.xp6(1),e.hij("",e.lcZ(2,2,C.type===C.extentOptionTypes.ECEC?"ECEC.Payment.Extent.Option.OverHoursPerWeek":"ECEC.Payment.Extent.Option.PPEwithECEC.OverHoursPerWeek")," "),e.xp6(2),e.Q6J("ngIf",C.editMode)}}function Ke(te,M){if(1&te){const C=e.EpF();e.TgZ(0,"cgi-input",41),e.NdJ("ngModelChange",function(Ye){e.CHM(C);const Zt=e.oxw().$implicit;return e.KtG(Zt.overHoursPerWeek=Ye)}),e.qZA()}if(2&te){const C=e.oxw().$implicit,Q=e.oxw(2);e.Q6J("errorMessages",Q.errorMessages)("ngModel",C.overHoursPerWeek)}}function dn(te,M){if(1&te&&(e.TgZ(0,"p"),e._uU(1),e.qZA()),2&te){const C=e.oxw().$implicit;e.xp6(1),e.Oqu(C.overHoursPerWeek)}}function Kn(te,M){if(1&te&&(e.TgZ(0,"td",38),e.YNc(1,Ke,1,2,"cgi-input",39),e.YNc(2,dn,2,1,"ng-template",null,40,e.W1O),e.qZA()),2&te){const C=M.$implicit,Q=M.index,Ye=e.MAs(3);e.Q6J("formGroupName",Q),e.xp6(1),e.Q6J("ngIf",!C.id)("ngIfElse",Ye)}}function $i(te,M){1&te&&(e.TgZ(0,"span",37),e._uU(1,"*"),e.qZA())}function sr(te,M){if(1&te&&(e.TgZ(0,"th",35),e._uU(1),e.ALo(2,"translate"),e.YNc(3,$i,2,0,"span",36),e.qZA()),2&te){const C=e.oxw(2);e.xp6(1),e.hij(" ",e.lcZ(2,2,C.type===C.extentOptionTypes.ECEC?"ECEC.Payment.Extent.Option.MaxHoursPerWeek":"ECEC.Payment.Extent.Option.PPEwithECEC.MaxHoursPerWeek")," "),e.xp6(2),e.Q6J("ngIf",C.editMode)}}function lo(te,M){if(1&te){const C=e.EpF();e.TgZ(0,"cgi-input",44),e.NdJ("ngModelChange",function(Ye){e.CHM(C);const Zt=e.oxw().$implicit;return e.KtG(Zt.maxHoursPerWeek=Ye)}),e.qZA()}if(2&te){const C=e.oxw().$implicit,Q=e.oxw(2);e.Q6J("errorMessages",Q.errorMessages)("ngModel",C.maxHoursPerWeek)}}function ga(te,M){if(1&te&&(e.TgZ(0,"p"),e._uU(1),e.qZA()),2&te){const C=e.oxw().$implicit;e.xp6(1),e.Oqu(C.maxHoursPerWeek)}}function Zs(te,M){if(1&te&&(e.TgZ(0,"td",38),e.YNc(1,lo,1,2,"cgi-input",42),e.YNc(2,ga,2,1,"ng-template",null,43,e.W1O),e.qZA()),2&te){const C=M.$implicit,Q=M.index,Ye=e.MAs(3);e.Q6J("formGroupName",Q),e.xp6(1),e.Q6J("ngIf",!C.id)("ngIfElse",Ye)}}function Kr(te,M){1&te&&(e.TgZ(0,"span",37),e._uU(1,"*"),e.qZA())}function os(te,M){if(1&te&&(e.TgZ(0,"th",35),e._uU(1),e.ALo(2,"translate"),e.YNc(3,Kr,2,0,"span",36),e.qZA()),2&te){const C=e.oxw(2);e.xp6(1),e.hij(" ",e.lcZ(2,2,"ECEC.Payment.Extent.Option.ECEC.OverHoursPerWeek")," "),e.xp6(2),e.Q6J("ngIf",C.editMode)}}function _s(te,M){if(1&te){const C=e.EpF();e.TgZ(0,"cgi-input",47),e.NdJ("ngModelChange",function(Ye){e.CHM(C);const Zt=e.oxw().$implicit;return e.KtG(Zt.overHoursPerWeekECEC=Ye)}),e.qZA()}if(2&te){const C=e.oxw().$implicit,Q=e.oxw(2);e.Q6J("errorMessages",Q.errorMessages)("ngModel",C.overHoursPerWeekECEC)}}function ra(te,M){if(1&te&&(e.TgZ(0,"p"),e._uU(1),e.qZA()),2&te){const C=e.oxw().$implicit;e.xp6(1),e.Oqu(C.overHoursPerWeekECEC)}}function _a(te,M){if(1&te&&(e.TgZ(0,"td",38),e.YNc(1,_s,1,2,"cgi-input",45),e.YNc(2,ra,2,1,"ng-template",null,46,e.W1O),e.qZA()),2&te){const C=M.$implicit,Q=M.index,Ye=e.MAs(3);e.Q6J("formGroupName",Q),e.xp6(1),e.Q6J("ngIf",!C.id)("ngIfElse",Ye)}}function xl(te,M){1&te&&(e.TgZ(0,"span",37),e._uU(1,"*"),e.qZA())}function $l(te,M){if(1&te&&(e.TgZ(0,"th",35),e._uU(1),e.ALo(2,"translate"),e.YNc(3,xl,2,0,"span",36),e.qZA()),2&te){const C=e.oxw(2);e.xp6(1),e.hij(" ",e.lcZ(2,2,"ECEC.Payment.Extent.Option.ECEC.MaxHoursPerWeek")," "),e.xp6(2),e.Q6J("ngIf",C.editMode)}}function Os(te,M){if(1&te){const C=e.EpF();e.TgZ(0,"cgi-input",50),e.NdJ("ngModelChange",function(Ye){e.CHM(C);const Zt=e.oxw().$implicit;return e.KtG(Zt.maxHoursPerWeekECEC=Ye)}),e.qZA()}if(2&te){const C=e.oxw().$implicit,Q=e.oxw(2);e.Q6J("errorMessages",Q.errorMessages)("ngModel",C.maxHoursPerWeekECEC)}}function yu(te,M){if(1&te&&(e.TgZ(0,"p"),e._uU(1),e.qZA()),2&te){const C=e.oxw().$implicit;e.xp6(1),e.Oqu(C.maxHoursPerWeekECEC)}}function Ks(te,M){if(1&te&&(e.TgZ(0,"td",38),e.YNc(1,Os,1,2,"cgi-input",48),e.YNc(2,yu,2,1,"ng-template",null,49,e.W1O),e.qZA()),2&te){const C=M.$implicit,Q=M.index,Ye=e.MAs(3);e.Q6J("formGroupName",Q),e.xp6(1),e.Q6J("ngIf",!C.id)("ngIfElse",Ye)}}function _l(te,M){1&te&&(e.TgZ(0,"span",37),e._uU(1,"*"),e.qZA())}function Dc(te,M){if(1&te&&(e.TgZ(0,"th",35),e._uU(1),e.ALo(2,"translate"),e.YNc(3,_l,2,0,"span",36),e.qZA()),2&te){const C=e.oxw(2);e.xp6(1),e.hij(" ",e.lcZ(2,2,C.maxHoursPerMonthTranslations)," "),e.xp6(2),e.Q6J("ngIf",C.editMode)}}function Gs(te,M){if(1&te){const C=e.EpF();e.TgZ(0,"cgi-input",53),e.NdJ("ngModelChange",function(Ye){e.CHM(C);const Zt=e.oxw().$implicit;return e.KtG(Zt.maxHoursPerMonth=Ye)}),e.qZA()}if(2&te){const C=e.oxw().$implicit;e.Q6J("ngModel",C.maxHoursPerMonth)}}function Ed(te,M){if(1&te&&(e.TgZ(0,"p"),e._uU(1),e.qZA()),2&te){const C=e.oxw().$implicit;e.xp6(1),e.Oqu(C.maxHoursPerMonth)}}function zl(te,M){if(1&te&&(e.TgZ(0,"td",38),e.YNc(1,Gs,1,1,"cgi-input",51),e.YNc(2,Ed,2,1,"ng-template",null,52,e.W1O),e.qZA()),2&te){const C=M.$implicit,Q=M.index,Ye=e.MAs(3);e.Q6J("formGroupName",Q),e.xp6(1),e.Q6J("ngIf",!C.id)("ngIfElse",Ye)}}function vl(te,M){1&te&&(e.TgZ(0,"span",37),e._uU(1,"*"),e.qZA())}function Lc(te,M){if(1&te&&(e.TgZ(0,"th",35),e._uU(1),e.ALo(2,"translate"),e.YNc(3,vl,2,0,"span",36),e.qZA()),2&te){const C=e.oxw(2);e.xp6(1),e.hij(" ",e.lcZ(2,2,"ECEC.Payment.Extent.Option.ECEC.MaxHoursPerMonthECEC")," "),e.xp6(2),e.Q6J("ngIf",C.editMode)}}function Xe(te,M){if(1&te){const C=e.EpF();e.TgZ(0,"cgi-input",56),e.NdJ("ngModelChange",function(Ye){e.CHM(C);const Zt=e.oxw().$implicit;return e.KtG(Zt.maxHoursPerMonthECEC=Ye)}),e.qZA()}if(2&te){const C=e.oxw().$implicit;e.Q6J("ngModel",C.maxHoursPerMonthECEC)}}function zt(te,M){if(1&te&&(e.TgZ(0,"p"),e._uU(1),e.qZA()),2&te){const C=e.oxw().$implicit;e.xp6(1),e.Oqu(C.maxHoursPerMonthECEC||"0")}}function mn(te,M){if(1&te&&(e.TgZ(0,"td",38),e.YNc(1,Xe,1,1,"cgi-input",54),e.YNc(2,zt,2,1,"ng-template",null,55,e.W1O),e.qZA()),2&te){const C=M.$implicit,Q=M.index,Ye=e.MAs(3);e.Q6J("formGroupName",Q),e.xp6(1),e.Q6J("ngIf",!C.id)("ngIfElse",Ye)}}function ni(te,M){1&te&&(e.TgZ(0,"span",37),e._uU(1,"*"),e.qZA())}function Fi(te,M){if(1&te&&(e.TgZ(0,"th",35),e._uU(1),e.ALo(2,"translate"),e.YNc(3,ni,2,0,"span",36),e.qZA()),2&te){const C=e.oxw(2);e.xp6(1),e.hij(" ",e.lcZ(2,2,"ECEC.Payment.Extent.Option.privateECEC.OverHoursPerWeek")," "),e.xp6(2),e.Q6J("ngIf",C.editMode)}}function nr(te,M){if(1&te){const C=e.EpF();e.TgZ(0,"cgi-input",59),e.NdJ("ngModelChange",function(Ye){e.CHM(C);const Zt=e.oxw().$implicit;return e.KtG(Zt.overHoursPerWeekPrivateECEC=Ye)}),e.qZA()}if(2&te){const C=e.oxw().$implicit,Q=e.oxw(2);e.Q6J("errorMessages",Q.errorMessages)("ngModel",C.overHoursPerWeekPrivateECEC)}}function zo(te,M){if(1&te&&(e.TgZ(0,"p"),e._uU(1),e.qZA()),2&te){const C=e.oxw().$implicit;e.xp6(1),e.Oqu(C.overHoursPerWeekPrivateECEC)}}function oa(te,M){if(1&te&&(e.TgZ(0,"td",38),e.YNc(1,nr,1,2,"cgi-input",57),e.YNc(2,zo,2,1,"ng-template",null,58,e.W1O),e.qZA()),2&te){const C=M.$implicit,Q=M.index,Ye=e.MAs(3);e.Q6J("formGroupName",Q),e.xp6(1),e.Q6J("ngIf",!C.id)("ngIfElse",Ye)}}function Ca(te,M){1&te&&(e.TgZ(0,"span",37),e._uU(1,"*"),e.qZA())}function Ba(te,M){if(1&te&&(e.TgZ(0,"th",35),e._uU(1),e.ALo(2,"translate"),e.YNc(3,Ca,2,0,"span",36),e.qZA()),2&te){const C=e.oxw(2);e.xp6(1),e.hij(" ",e.lcZ(2,2,"ECEC.Payment.Extent.Option.privateECEC.MaxHoursPerWeek")," "),e.xp6(2),e.Q6J("ngIf",C.editMode)}}function Is(te,M){if(1&te){const C=e.EpF();e.TgZ(0,"cgi-input",62),e.NdJ("ngModelChange",function(Ye){e.CHM(C);const Zt=e.oxw().$implicit;return e.KtG(Zt.maxHoursPerWeekPrivateECEC=Ye)}),e.qZA()}if(2&te){const C=e.oxw().$implicit,Q=e.oxw(2);e.Q6J("errorMessages",Q.errorMessages)("ngModel",C.maxHoursPerWeekPrivateECEC)}}function ul(te,M){if(1&te&&(e.TgZ(0,"p"),e._uU(1),e.qZA()),2&te){const C=e.oxw().$implicit;e.xp6(1),e.Oqu(C.maxHoursPerWeekPrivateECEC)}}function bu(te,M){if(1&te&&(e.TgZ(0,"td",38),e.YNc(1,Is,1,2,"cgi-input",60),e.YNc(2,ul,2,1,"ng-template",null,61,e.W1O),e.qZA()),2&te){const C=M.$implicit,Q=M.index,Ye=e.MAs(3);e.Q6J("formGroupName",Q),e.xp6(1),e.Q6J("ngIf",!C.id)("ngIfElse",Ye)}}function Zd(te,M){1&te&&(e.TgZ(0,"th",35),e._uU(1),e.ALo(2,"translate"),e.qZA()),2&te&&(e.xp6(1),e.hij(" ",e.lcZ(2,1,"ECEC.Payment.Extent.Option.ECEC.Fee")," "))}function Qu(te,M){if(1&te){const C=e.EpF();e.TgZ(0,"cgi-input",65),e.NdJ("ngModelChange",function(Ye){e.CHM(C);const Zt=e.oxw().$implicit;return e.KtG(Zt.maxFees=Ye)}),e.qZA()}if(2&te){const C=e.oxw().$implicit,Q=e.oxw(2);e.Q6J("errorMessages",Q.errorMessages)("ngModel",C.maxFees)}}function _t(te,M){if(1&te&&(e.TgZ(0,"p"),e._uU(1),e.qZA()),2&te){const C=e.oxw().$implicit;e.xp6(1),e.Oqu(C.maxFees)}}function q(te,M){if(1&te&&(e.TgZ(0,"td",38),e.YNc(1,Qu,1,2,"cgi-input",63),e.YNc(2,_t,2,1,"ng-template",null,64,e.W1O),e.qZA()),2&te){const C=M.$implicit,Q=M.index,Ye=e.MAs(3);e.Q6J("formGroupName",Q),e.xp6(1),e.Q6J("ngIf",!C.id)("ngIfElse",Ye)}}function W(te,M){1&te&&(e.TgZ(0,"span",37),e._uU(1,"*"),e.qZA())}function dt(te,M){if(1&te&&(e.TgZ(0,"th",35),e._uU(1),e.ALo(2,"translate"),e.YNc(3,W,2,0,"span",36),e.qZA()),2&te){const C=e.oxw(2);e.xp6(1),e.hij(" ",e.lcZ(2,2,"ECEC.Payment.Extent.Option.CareNeed")," "),e.xp6(2),e.Q6J("ngIf",C.editMode)}}function fn(te,M){if(1&te){const C=e.EpF();e.TgZ(0,"td",38)(1,"sivi-lib-select",66),e.NdJ("siviChange",function(Ye){const Pi=e.CHM(C).$implicit,Ir=e.oxw(2);return e.KtG(Ir.onChangeCareNeed(Ye,!1,Pi.tempId))}),e.ALo(2,"translate"),e.qZA()()}if(2&te){const C=M.$implicit,Q=M.index,Ye=e.oxw(2);e.Q6J("formGroupName",Q),e.xp6(1),e.Q6J("showRequiredIndicator",!1)("viewMode",!!C.id)("options",Ye.getCareNeedOptions()),e.uIk("aria-label",e.lcZ(2,5,"ECEC.Payment.Extent.Option.Singular"))}}function Ei(te,M){1&te&&(e.TgZ(0,"span",37),e._uU(1,"*"),e.qZA())}function Po(te,M){if(1&te&&(e.TgZ(0,"th",35),e._uU(1),e.ALo(2,"translate"),e.YNc(3,Ei,2,0,"span",36),e.qZA()),2&te){const C=e.oxw(2);e.xp6(1),e.hij(" ",e.lcZ(2,2,"ECEC.Payment.Extent.Option.PrivateCareNeed")," "),e.xp6(2),e.Q6J("ngIf",C.editMode)}}function En(te,M){if(1&te){const C=e.EpF();e.TgZ(0,"td",38)(1,"sivi-lib-select",67),e.NdJ("siviChange",function(Ye){const Pi=e.CHM(C).$implicit,Ir=e.oxw(2);return e.KtG(Ir.onChangeCareNeed(Ye,!0,Pi.tempId))}),e.qZA()()}if(2&te){const C=M.$implicit,Q=M.index,Ye=e.oxw(2);e.Q6J("formGroupName",Q),e.xp6(1),e.Q6J("showRequiredIndicator",!1)("viewMode",!!C.id)("options",Ye.getCareNeedOptions())}}function ls(te,M){1&te&&e._UZ(0,"th",35)}function Au(te,M){if(1&te){const C=e.EpF();e.TgZ(0,"ion-button",69),e.NdJ("click",function(){e.CHM(C);const Ye=e.oxw().$implicit,Zt=e.oxw(2);return e.KtG(Zt.onDeleteOption(Ye))}),e._UZ(1,"cgi-icon",70),e.qZA()}}function kc(te,M){if(1&te&&(e.TgZ(0,"td",38),e.YNc(1,Au,2,0,"ion-button",68),e.qZA()),2&te){const C=M.$implicit,Q=M.index;e.Q6J("formGroupName",Q),e.xp6(1),e.Q6J("ngIf",!C.id)}}function cs(te,M){1&te&&e._UZ(0,"tr",71)}function wu(te,M){1&te&&e._UZ(0,"tr",72)}function Iu(te,M){if(1&te&&(e.TgZ(0,"ion-grid",1)(1,"ion-row",2),e.YNc(2,lp,2,1,"ion-col",3),e.YNc(3,kp,3,5,"ng-template",null,4,e.W1O),e.TgZ(5,"ion-col",5),e.YNc(6,Ju,2,5,"cgi-input",6),e.qZA(),e.TgZ(7,"ion-col",7),e.YNc(8,Su,3,4,"ion-button",8),e.qZA(),e.TgZ(9,"ion-col",9),e.YNc(10,qs,3,4,"ion-button",10),e.YNc(11,Cd,4,6,"ion-button",11),e.qZA()(),e.TgZ(12,"ion-row",12)(13,"table",13),e.ynx(14,14),e.YNc(15,ht,4,4,"th",15),e.YNc(16,Kn,4,3,"td",16),e.BQk(),e.ynx(17,17),e.YNc(18,sr,4,4,"th",15),e.YNc(19,Zs,4,3,"td",16),e.BQk(),e.ynx(20,18),e.YNc(21,os,4,4,"th",15),e.YNc(22,_a,4,3,"td",16),e.BQk(),e.ynx(23,19),e.YNc(24,$l,4,4,"th",15),e.YNc(25,Ks,4,3,"td",16),e.BQk(),e.ynx(26,20),e.YNc(27,Dc,4,4,"th",15),e.YNc(28,zl,4,3,"td",16),e.BQk(),e.ynx(29,21),e.YNc(30,Lc,4,4,"th",15),e.YNc(31,mn,4,3,"td",16),e.BQk(),e.ynx(32,22),e.YNc(33,Fi,4,4,"th",15),e.YNc(34,oa,4,3,"td",16),e.BQk(),e.ynx(35,23),e.YNc(36,Ba,4,4,"th",15),e.YNc(37,bu,4,3,"td",16),e.BQk(),e.ynx(38,24),e.YNc(39,Zd,3,3,"th",15),e.YNc(40,q,4,3,"td",16),e.BQk(),e.ynx(41,25),e.YNc(42,dt,4,4,"th",15),e.YNc(43,fn,3,7,"td",16),e.BQk(),e.ynx(44,26),e.YNc(45,Po,4,4,"th",15),e.YNc(46,En,2,4,"td",16),e.BQk(),e.ynx(47,27),e.YNc(48,ls,1,0,"th",15),e.YNc(49,kc,2,2,"td",16),e.BQk(),e.YNc(50,cs,1,0,"tr",28),e.YNc(51,wu,1,0,"tr",29),e.qZA()()()),2&te){const C=e.MAs(4),Q=e.oxw();e.Q6J("formGroup",Q.form),e.xp6(2),e.Q6J("ngIf",!Q.extentOption.id||Q.editMode&&Q.extentOption.restEntityState!==Q.constants.CURRENT)("ngIfElse",C),e.xp6(4),e.Q6J("ngIf",Q.extentOption.validUntil),e.xp6(2),e.Q6J("ngIf",Q.extentOption.tempId),e.xp6(2),e.Q6J("ngIf",Q.canSeeEditButton()),e.xp6(1),e.Q6J("ngIf",Q.editMode),e.xp6(2),e.Q6J("dataSource",Q.dataSource)("trackBy",Q.trackByFn),e.xp6(37),e.Q6J("matHeaderRowDef",Q.displayedColumns),e.xp6(1),e.Q6J("matRowDefColumns",Q.displayedColumns)}}class sd extends l.SiviPage{set option(M){(0,X.Z)(M,this.extentOption)||(this.extentOption=M,this.extentOption.tempId&&(this.editMode=!0),this.setFormAndValidators())}set onSubmit(M){this.form.markAllAsTouched()}get isFormValid(){return this.form.valid}constructor(M,C,Q,Ye){super(M,C,Q),this.notify=M,this.translate=C,this.router=Q,this.fb=Ye,this.readonly=!1,this.valueChange=new e.vpe,this.deletePaymentExtentOption=new e.vpe,this.constants=l.Constants,this.dateFormat=l.DateFormats.FINNISH_MOMENT,this.editMode=!1,this.fromDates=[],this.minDate=rn().add(1,"days").format("YYYY-MM-DD"),this.extentOptionTypes=xc,this.errorMessages={controlIsSmallerThanParameter:this.translate.instant("ECEC.Payment.Extent.Option.Error.OverHoursPerWeekGreaterThanMaxHoursPerWeek"),controlIsGreaterThanParameter:this.translate.instant("ECEC.Payment.Extent.Option.Error.MaxHoursPerWeekGreaterThanOverHoursPerWeek"),controlIsGreaterOrSameThanParameter:this.translate.instant("ECEC.Payment.Error.MaxFeeUnacceptable")},this.form=new Ct.cw({fromDate:new Ct.NI(""),table:new Ct.Oe([])}),this.editEcecExtentOptionLabel=this.translate.instant("Message.Edit",{name:this.translate.instant("ECEC.Payment.Extent.Option.Singular")}),this.deleteEcecExtentOptionLabel=this.translate.instant("Message.Delete",{name:this.translate.instant("ECEC.Payment.Extent.Option.Singular")}),this.displayedColumns=[],this.dataSource=new st.by,this.maxHoursPerMonthTranslations=""}ngOnInit(){this.type===xc.ECECWITHPPE?(this.displayedColumns=this.getColumnsForECECAndPPE(),this.maxHoursPerMonthTranslations="ECEC.Payment.Extent.Option.ECECandPPE.MaxHoursPerMonth"):(this.displayedColumns=this.getColumnsForECEC(),this.maxHoursPerMonthTranslations="ECEC.Payment.Extent.Option.ECEC.CareExtentOptions")}getCareNeedValue(M,C){let Q;return M&&C?Q="both":M?Q="fulltime":C&&(Q="parttime"),Q}getCareNeedBooleans(M){return"fulltime"===M?{fulltime:!0,parttime:!1}:"parttime"===M?{fulltime:!1,parttime:!0}:"both"===M?{fulltime:!0,parttime:!0}:{fulltime:!1,parttime:!1}}onChangeCareNeed(M,C,Q){const Zt=M[Object.keys(M).pop()],Pi=this.extentOption.paymentExtentValues.find(ec=>ec.tempId===Q),Ir=this.getCareNeedBooleans(Zt),xo=Ir.fulltime,Qa=Ir.parttime;C?(Pi.privateFullTime=xo,Pi.privatePartTime=Qa):(Pi.fullTime=xo,Pi.partTime=Qa),this.emitDataTable(this.extentOption)}getCareNeedOptions(){return[{text:this.translate.instant("ECEC.Payment.Extent.Option.FullTime"),value:"fulltime"},{text:this.translate.instant("ECEC.Payment.Extent.Option.PartTime"),value:"parttime"},{text:this.translate.instant("ECEC.Payment.Extent.Option.FullTimeAndPartTime"),value:"both"}]}getFormattedTimeOrDate(M){return l.Utils.convertDateToFinnishStandard(M)}setFromDateValidator(){if(!this.extentOption.id||this.editMode&&this.extentOption.restEntityState!==l.Constants.CURRENT){const M=[l.SiviValidators.required,l.SiviValidators.validateDate(),l.SiviValidators.validateDateLaterThanToday(),l.SiviValidators.checkUniqueness(this.fromDates,this.extentOption.id||this.extentOption.tempId)];this.form.get("fromDate").setValidators(M)}}onFormValueChange(){this.emitDataTable(this.extentOption)}onDeleteOption(M){var C=this;return(0,o.Z)(function*(){(yield C.notify.deleteConfirmPopup()).onDidDismiss().then(Ye=>{Ye&&Ye.data&&(C.extentOption.paymentExtentValues=C.extentOption.paymentExtentValues.filter(Zt=>Zt.id&&Zt.id!==M.id||Zt.tempId&&Zt.tempId!==M.tempId),C.dataSource.data=C.extentOption.paymentExtentValues,C.emitDataTable(C.extentOption))})})()}onChangeDate(M){this.extentOption.fromDate=M.value,this.emitDataTable(this.extentOption)}onClickEdit(){var M=this;return(0,o.Z)(function*(){M.extentOption.restEntityState===l.Constants.FUTURE?(yield M.notify.createConfirmationPopUp("Message.EditFutureValues.Title","Message.EditFutureValues.Message","General.Buttons.Continue")).onDidDismiss().then(Q=>{Q&&Q.data&&(M.editMode=!0,M.setFromDateValidator())}):M.editMode=!0})()}setFormAndValidators(){this.componentValidity=this.isFormValid,this.dataSource.data=this.extentOption.paymentExtentValues,this.form.get("fromDate").patchValue(this.extentOption.fromDate),this.setFromDateValidator(),this.createNewPaymentExtentRow()}createNewPaymentExtentRow(){this.extentOption.paymentExtentValues.forEach(M=>{const C=this.fb.group({overHoursPerWeek:[M.overHoursPerWeek],maxHoursPerWeek:[M.maxHoursPerWeek],overHoursPerWeekECEC:[M.overHoursPerWeekECEC],maxHoursPerWeekECEC:[M.maxHoursPerWeekECEC],maxHoursPerMonthECEC:[M.maxHoursPerMonthECEC],maxHoursPerMonth:[M.maxHoursPerMonth],overHoursPerWeekPrivateECEC:[M.overHoursPerWeekPrivateECEC],maxHoursPerWeekPrivateECEC:[M.maxHoursPerWeekPrivateECEC],fee:[M.maxFees],careNeed:[this.getCareNeedValue(M.fullTime,M.partTime)],privateCareNeed:[this.getCareNeedValue(M.privateFullTime,M.privatePartTime)]});this.form.get("table").push(C)})}onClickDelete(){this.deletePaymentExtentOption.emit(this.extentOption)}onClickAddRow(){this.extentOption.paymentExtentValues.push(Hc.createExtentOptionValue()),this.dataSource.data=this.extentOption.paymentExtentValues;const M=this.fb.group({overHoursPerWeek:[""],maxHoursPerWeek:[""],overHoursPerWeekECEC:[""],maxHoursPerWeekECEC:[""],maxHoursPerMonthECEC:[""],maxHoursPerMonth:[""],overHoursPerWeekPrivateECEC:[""],maxHoursPerWeekPrivateECEC:[""],fee:[""],careNeed:[null],privateCareNeed:[null]});M.valueChanges.pipe((0,w.R)(this.destroy$),(0,he.x)(X.Z)).subscribe(C=>{M.get("overHoursPerWeek").setValidators([l.SiviValidators.required,l.SiviValidators.isControlSmallerThanParameter(C?.maxHoursPerWeek)]),M.get("maxHoursPerWeek").setValidators([l.SiviValidators.required,l.SiviValidators.isControlGreaterThanParameter(C?.overHoursPerWeek)]),M.get("overHoursPerWeekECEC").setValidators([l.SiviValidators.required,l.SiviValidators.isControlSmallerThanParameter(C?.maxHoursPerWeekECEC)]),M.get("maxHoursPerWeekECEC").setValidators([l.SiviValidators.required,l.SiviValidators.isControlGreaterThanParameter(C?.overHoursPerWeekECEC)]),M.get("overHoursPerWeekPrivateECEC").setValidators([l.SiviValidators.required,l.SiviValidators.isControlSmallerThanParameter(C?.maxHoursPerWeekPrivateECEC)]),M.get("maxHoursPerWeekPrivateECEC").setValidators([l.SiviValidators.required,l.SiviValidators.isControlGreaterThanParameter(C?.overHoursPerWeekPrivateECEC)]),M.get("fee").setValidators([l.SiviValidators.isControlGreaterOrSameThanParameter("100")]),M.get("careNeed").setValidators([l.SiviValidators.required]),M.get("maxHoursPerMonthECEC").setValidators([l.SiviValidators.required]),M.get("privateCareNeed").setValidators([l.SiviValidators.required]),M.updateValueAndValidity()}),this.form.get("table").push(M),this.emitDataTable(this.extentOption)}canSeeEditButton(){return[l.Constants.FUTURE,l.Constants.CURRENT].includes(this.extentOption.restEntityState)&&this.extentOption.id&&!this.editMode&&!this.readonly}emitDataTable(M){this.componentValidity=this.isFormValid,this.valueChange.emit(M)}getColumnsForECECAndPPE(){return["overHoursPerWeek","maxHoursPerWeek","ECECOverHoursPerWeek","ECECMaxHoursPerWeek","maxHoursPerMonth","maxHoursPerMonthECEC","privateOverHoursPerWeek","privateMaxHoursPerWeek","fee","careNeed","privateCareNeed","button"]}getColumnsForECEC(){return["overHoursPerWeek","maxHoursPerWeek","ECECOverHoursPerWeek","ECECMaxHoursPerWeek","maxHoursPerMonth","privateOverHoursPerWeek","privateMaxHoursPerWeek","fee","careNeed","privateCareNeed","button"]}}sd.\u0275fac=function(M){return new(M||sd)(e.Y36(l.NotifyService),e.Y36(T.sK),e.Y36(j.F0),e.Y36(Ct.qu))},sd.\u0275cmp=e.Xpm({type:sd,selectors:[["sivi-mun-set-ecec-extent-option"]],inputs:{option:"option",onSubmit:"onSubmit",readonly:"readonly",type:"type"},outputs:{valueChange:"valueChange",deletePaymentExtentOption:"deletePaymentExtentOption"},features:[e.qOj],decls:1,vars:1,consts:[["siviLibForm","","class","ion-no-padding",3,"formGroup",4,"ngIf"],["siviLibForm","",1,"ion-no-padding",3,"formGroup"],[1,"ion-justify-content-start","ion-no-padding"],["size","12","size-md","3","class","ion-align-self-start ion-no-padding",4,"ngIf","ngIfElse"],["readonlyFromDate",""],["size","12","size-md","3"],[3,"viewMode","label","value",4,"ngIf"],["size","12","size-md","2","offset-md","2",1,"ion-text-end"],["no-min-width","","role","button","fill","outline","class","ion-margin-end",3,"click",4,"ngIf"],["size","12","size-md","2",1,"ion-text-end"],["no-min-width","","class","ion-margin-end","role","button","fill","outline",3,"click",4,"ngIf"],["no-min-width","","role","button","class","ion-margin-end","fill","outline",3,"click",4,"ngIf"],[1,"ion-no-padding"],["mat-table","","formArrayName","table",1,"mat-elevation-z8",3,"dataSource","trackBy"],["matColumnDef","overHoursPerWeek"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",3,"formGroupName",4,"matCellDef"],["matColumnDef","maxHoursPerWeek"],["matColumnDef","ECECOverHoursPerWeek"],["matColumnDef","ECECMaxHoursPerWeek"],["matColumnDef","maxHoursPerMonth"],["matColumnDef","maxHoursPerMonthECEC"],["matColumnDef","privateOverHoursPerWeek"],["matColumnDef","privateMaxHoursPerWeek"],["matColumnDef","fee"],["matColumnDef","careNeed"],["matColumnDef","privateCareNeed"],["matColumnDef","button"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["size","12","size-md","3",1,"ion-align-self-start","ion-no-padding"],["formControlName","fromDate","siviLibFormControl","","label","Form.Label.From",3,"minDate","update"],["size","12","size-md","3",1,"ion-no-padding"],[3,"viewMode","label","value"],["no-min-width","","role","button","fill","outline",1,"ion-margin-end",3,"click"],["mat-header-cell",""],["class","error",4,"ngIf"],[1,"error"],["mat-cell","",3,"formGroupName"],["formControlName","overHoursPerWeek","siviLibFormControl","","type","text",3,"errorMessages","ngModel","ngModelChange",4,"ngIf","ngIfElse"],["viewOverHoursPerWeek",""],["formControlName","overHoursPerWeek","siviLibFormControl","","type","text",3,"errorMessages","ngModel","ngModelChange"],["type","text","formControlName","maxHoursPerWeek","siviLibFormControl","",3,"errorMessages","ngModel","ngModelChange",4,"ngIf","ngIfElse"],["viewMaxHoursPerWeek",""],["type","text","formControlName","maxHoursPerWeek","siviLibFormControl","",3,"errorMessages","ngModel","ngModelChange"],["type","text","formControlName","overHoursPerWeekECEC","siviLibFormControl","",3,"errorMessages","ngModel","ngModelChange",4,"ngIf","ngIfElse"],["viewECECOverHoursPerWeek",""],["type","text","formControlName","overHoursPerWeekECEC","siviLibFormControl","",3,"errorMessages","ngModel","ngModelChange"],["type","text","formControlName","maxHoursPerWeekECEC","siviLibFormControl","",3,"errorMessages","ngModel","ngModelChange",4,"ngIf","ngIfElse"],["viewECECMaxHoursPerWeek",""],["type","text","formControlName","maxHoursPerWeekECEC","siviLibFormControl","",3,"errorMessages","ngModel","ngModelChange"],["type","text","formControlName","maxHoursPerMonth","siviLibFormControl","",3,"ngModel","ngModelChange",4,"ngIf","ngIfElse"],["viewMaxHoursPerMonth",""],["type","text","formControlName","maxHoursPerMonth","siviLibFormControl","",3,"ngModel","ngModelChange"],["type","text","formControlName","maxHoursPerMonthECEC","siviLibFormControl","",3,"ngModel","ngModelChange",4,"ngIf","ngIfElse"],["viewMaxHoursPerMonthECEC",""],["type","text","formControlName","maxHoursPerMonthECEC","siviLibFormControl","",3,"ngModel","ngModelChange"],["type","text","formControlName","overHoursPerWeekPrivateECEC","siviLibFormControl","",3,"errorMessages","ngModel","ngModelChange",4,"ngIf","ngIfElse"],["viewPrivateOverHoursPerWeek",""],["type","text","formControlName","overHoursPerWeekPrivateECEC","siviLibFormControl","",3,"errorMessages","ngModel","ngModelChange"],["type","text","formControlName","maxHoursPerWeekPrivateECEC","siviLibFormControl","",3,"errorMessages","ngModel","ngModelChange",4,"ngIf","ngIfElse"],["viewPrivateMaxHoursPerWeek",""],["type","text","formControlName","maxHoursPerWeekPrivateECEC","siviLibFormControl","",3,"errorMessages","ngModel","ngModelChange"],["type","text","formControlName","fee","siviLibFormControl","",3,"errorMessages","ngModel","ngModelChange",4,"ngIf","ngIfElse"],["viewFee",""],["type","text","formControlName","fee","siviLibFormControl","",3,"errorMessages","ngModel","ngModelChange"],["formControlName","careNeed","siviLibFormControl","",3,"showRequiredIndicator","viewMode","options","siviChange"],["formControlName","privateCareNeed","siviLibFormControl","",3,"showRequiredIndicator","viewMode","options","siviChange"],["color","primary","fill","clear","role","button","size","small","no-min-width","","class","ml2",3,"click",4,"ngIf"],["color","primary","fill","clear","role","button","size","small","no-min-width","",1,"ml2",3,"click"],["name","delete"],["mat-header-row",""],["mat-row",""]],template:function(M,C){1&M&&e.YNc(0,Iu,52,11,"ion-grid",0),2&M&&e.Q6J("ngIf",C.extentOption)},dependencies:[D.O5,E.YG,E.wI,E.jY,E.Nd,l.DatepickerComponent,st.BZ,st.fO,st.as,st.w1,st.Dz,st.nj,st.ge,st.ev,st.XQ,st.Gk,Ct.JJ,Ct.JL,l.SelectComponent,l.SiviFormDirective,l.SiviFormControlDirective,Ct.sg,Ct.u,Ct.x0,Ct.CE,T.X$],styles:["[_nghost-%COMP%]   .table[_ngcontent-%COMP%]{width:100%}[_nghost-%COMP%]   input[_ngcontent-%COMP%]{border-radius:0;border-style:solid;border-width:1px;border-color:#ccc;width:100%}[_nghost-%COMP%]   td.mat-mdc-cell[_ngcontent-%COMP%]{padding-left:.5em;padding-right:.5em}[_nghost-%COMP%]   th.mat-mdc-header-cell[_ngcontent-%COMP%]{padding-left:.5em;padding-right:.5em}[_nghost-%COMP%]   th.mat-mdc-header-cell[_ngcontent-%COMP%]:first-of-type{padding-left:none}[_nghost-%COMP%]   cgi-icon[_ngcontent-%COMP%]{color:var(--ion-color-primary)}[_nghost-%COMP%]   ion-grid[_ngcontent-%COMP%]{margin-bottom:3em}[_nghost-%COMP%]   .error[_ngcontent-%COMP%]{color:var(--ion-color-warning)}[_nghost-%COMP%]   .mat-column-privateCareNeed[_ngcontent-%COMP%], [_nghost-%COMP%]   .mat-column-careNeed[_ngcontent-%COMP%]{min-width:150px}[_nghost-%COMP%]   .select-text[_ngcontent-%COMP%]{overflow:visible;white-space:normal;text-overflow:unset}"]});const Cu=["siviContent"];function Gd(te,M){if(1&te&&(e.TgZ(0,"span"),e._uU(1),e.ALo(2,"async"),e.qZA()),2&te){const C=e.oxw();let Q;e.xp6(1),e.hij(" (",null==(Q=e.lcZ(2,1,C.siviProjectsGatewayService.getAppStateService().getMunicipality()))?null:Q.name,") ")}}function Rd(te,M){if(1&te){const C=e.EpF();e.TgZ(0,"sivi-lib-navbar-action-button",14),e.NdJ("clicked",function(){e.CHM(C);const Ye=e.oxw();return e.KtG(Ye.onSaveExtentOptions())}),e.qZA()}if(2&te){const C=e.oxw();e.Q6J("disabled",C.saving)}}function Bu(te,M){if(1&te){const C=e.EpF();e.ynx(0),e.TgZ(1,"sivi-mun-set-ecec-extent-option",16),e.NdJ("deletePaymentExtentOption",function(Ye){e.CHM(C);const Zt=e.oxw(2);return e.KtG(Zt.onDeletePaymentExtentOption(Ye))})("valueChange",function(Ye){e.CHM(C);const Zt=e.oxw(2);return e.KtG(Zt.handleValueChange(Ye))}),e.ALo(2,"async"),e.qZA(),e.BQk()}if(2&te){const C=M.$implicit,Q=e.oxw(2);e.xp6(1),e.Q6J("option",C)("readonly",Q.readonly)("onSubmit",e.lcZ(2,4,Q.onSubmit$))("type",Q.type)}}function Wf(te,M){if(1&te&&(e.TgZ(0,"div"),e.YNc(1,Bu,3,6,"ng-container",15),e.qZA()),2&te){const C=e.oxw();e.xp6(1),e.Q6J("ngForOf",C.activeExtentOptions)("ngForTrackBy",C.trackByFn)}}function vc(te,M){if(1&te){const C=e.EpF();e.TgZ(0,"ion-button",17),e.NdJ("click",function(){e.CHM(C);const Ye=e.oxw();return e.KtG(Ye.onClickAdd())}),e.ALo(1,"translate"),e._uU(2),e.ALo(3,"translate"),e.qZA()}2&te&&(e.Q6J("atrr.aria-label",e.lcZ(1,2,"ECEC.Payment.Extent.Option.New")),e.xp6(2),e.hij(" ",e.lcZ(3,4,"ECEC.Payment.Extent.Option.New")," "))}function Rc(te,M){1&te&&(e._uU(0),e.ALo(1,"translate")),2&te&&e.hij(" ",e.lcZ(1,1,"Message.NoDataFound")," ")}function Go(te,M){if(1&te){const C=e.EpF();e.ynx(0),e.TgZ(1,"sivi-mun-set-ecec-extent-option",18),e.NdJ("valueChange",function(Ye){e.CHM(C);const Zt=e.oxw(2);return e.KtG(Zt.handleValueChange(Ye))}),e.ALo(2,"async"),e.qZA(),e.BQk()}if(2&te){const C=M.$implicit,Q=e.oxw(2);e.xp6(1),e.Q6J("option",C)("readonly",Q.readonly)("onSubmit",e.lcZ(2,4,Q.onSubmit$))("type",Q.type)}}function Md(te,M){if(1&te&&(e.TgZ(0,"div"),e.YNc(1,Go,3,6,"ng-container",15),e.qZA()),2&te){const C=e.oxw();e.xp6(1),e.Q6J("ngForOf",C.futureExtentOptions)("ngForTrackBy",C.trackByFn)}}function Mm(te,M){1&te&&(e._uU(0),e.ALo(1,"translate")),2&te&&e.hij(" ",e.lcZ(1,1,"Message.NoDataFound")," ")}function am(te,M){if(1&te&&(e.ynx(0),e._UZ(1,"sivi-mun-set-ecec-extent-option",19),e.BQk()),2&te){const C=M.$implicit,Q=e.oxw(2);e.xp6(1),e.Q6J("option",C)("type",Q.type)("readonly",Q.readonly)}}function Ef(te,M){if(1&te&&(e.TgZ(0,"div"),e.YNc(1,am,2,3,"ng-container",15),e.qZA()),2&te){const C=e.oxw();e.xp6(1),e.Q6J("ngForOf",C.historyExtentOptions)("ngForTrackBy",C.trackByFn)}}function Xc(te,M){1&te&&(e._uU(0),e.ALo(1,"translate")),2&te&&e.hij(" ",e.lcZ(1,1,"Message.NoDataFound")," ")}class yc extends l.SiviPage{constructor(M,C,Q,Ye,Zt,Pi,Ir,xo,Qa){super(M,C,Q),this.notifyService=M,this.translate=C,this.router=Q,this.route=Ye,this.siviProjectsGatewayService=Zt,this.ececExtentOptionsService=Pi,this.unsavedChanges=Ir,this.modalCtrl=xo,this.cdr=Qa,this.extentOptions=[],this.activeExtentOptions=[],this.futureExtentOptions=[],this.historyExtentOptions=[],this.canSave=!1,this.showNewExtentOptionButton=!0,this.saving=!1,this.fromDates=[],this.oldFromDates=[],this.extentOptionTypes=xc,this.readonly=!this.siviProjectsGatewayService.getAuthService().hasAnyRole([l.Roles.MUNICIPALITY_ADMIN]),this.onSubmit$=new Ve.x,this.DEFAULT_AMOUNT_OF_ELEMENTS_WHEN_CREATING_TABLE=6}ngOnInit(){this.municipalityId=this.municipalityId||this.route.snapshot.paramMap.get("municipalityId"),"ecec-payment-extent-options-ecec"===this.path?this.type=xc.ECEC:"ecec-payment-extent-options-ecec-ppe"===this.path?this.type=xc.ECECWITHPPE:console.error("Unknown modal",this.path),this.municipalityId&&this.getExtentOptions(this.municipalityId)}getExtentOptions(M){var C=this;return(0,o.Z)(function*(){C.contentLoader.showLoader(),C.ececExtentOptionsService.getExtentOptionsByMunicipalityId(M,C.type).pipe((0,n.q)(1)).subscribe(Q=>{C.extentOptions=l.Utils.sortArrayByDate(Q),C.filterExtentOptions(C.extentOptions),C.contentLoader.hideLoader(),C.watchForValueChanges([C.activeExtentOptions,C.futureExtentOptions,C.historyExtentOptions])},Q=>{console.error("getExtentOptions failed",Q),C.contentLoader.showError()})})()}onSaveExtentOptions(){if(!this.checkPageValidity())return this.onSubmit$.next({}),void l.Utils.goToInvalid("ion-modal");const C=this.getPayload();this.saveExtentOptions(C),this.saving=!0}saveExtentOptions(M){var C=this;return(0,o.Z)(function*(){const Q={paymentExtentMunicipalitySettings:[...M]};C.contentLoader.showSavingLoader(),C.ececExtentOptionsService.saveExtentOptions(Q).pipe((0,n.q)(1)).subscribe(function(){var Ye=(0,o.Z)(function*(Zt){C.saving=!1,C.contentLoader.showContent(Zt),C.notify.toastSaveSuccess(),C.showNewExtentOptionButton=!0,C.extentOptions=l.Utils.sortArrayByDate(Zt.paymentExtentMunicipalitySettings),C.filterExtentOptions(C.extentOptions),C.watchForValueChanges([C.activeExtentOptions,C.futureExtentOptions,C.historyExtentOptions]),C.checkPageValidity()});return function(Zt){return Ye.apply(this,arguments)}}(),Ye=>{C.saving=!1,C.contentLoader.hideLoader(),null==Ye.error?C.notify.alertFormSaveFailed():C.createErrorResponseFromCode(Ye.error.message)})})()}handleValueChange(M){const C=M.restEntityState===l.Constants.CURRENT?this.activeExtentOptions:this.futureExtentOptions,Q=C.findIndex(Ye=>M.id?M.id===Ye.id:M.tempId===Ye.tempId);C[Q]={...C[Q],...M}}onClickAdd(){this.activeExtentOptions.unshift(this.createExtentOption()),this.showNewExtentOptionButton=!1}onDeletePaymentExtentOption(M){var C=this;return(0,o.Z)(function*(){(yield C.notify.deleteConfirmPopup()).onDidDismiss().then(Ye=>{Ye.data&&(C.showNewExtentOptionButton=!0,C.notify.toastDeleteSuccess(),C.activeExtentOptions=C.activeExtentOptions.filter(Zt=>Zt.tempId!==M.tempId))})})()}onDismiss(){this.unsavedChanges.canDeactivate(this).pipe((0,n.q)(1)).subscribe(M=>{M&&this.modalCtrl.dismiss(null)})}createErrorResponseFromCode(M){let C="";switch(M){case"ECEC_EXTENT_OPTION_ALREADY_EXISTS":C="Message.Error.EntityAlreadyExists";break;case"OVER_HOURS_PER_WEEK_GREATER_THAN_MAX_HOURS_PER_WEEK":C="ECEC.Payment.Extent.Option.Error.OverHoursPerWeekGreaterThanMaxHoursPerWeek";break;case"MAX_HOURS_PER_WEEK_GREATER_THAN_MAX_HOURS_PER_MONTH":C="ECEC.Payment.Extent.Option.Error.MaxHoursPerWeekGreaterThanMaxHoursPerMonth";break;case"OVER_HOURS_PER_WEEK_GREATER_THAN_MAX_HOURS_PER_MONTH":C="ECEC.Payment.Extent.Option.Error.OverHoursPerWeekGreaterThanMaxHoursPerMonth";break;case"DECIMAL_PLACES_CANNOT_BE_ALLOWED_MORE_THAN_TWO":C="ECEC.Payment.Error.DecimalPlacesMoreThanTwo";break;case"ECEC_MAX_FEES_NOT_ACCEPTABLE":C="ECEC.Payment.Error.MaxFeeUnacceptable";break;default:C="Message.Error.GeneralBackendError"}this.notify.alert(this.notify.translate.instant("Message.Save.Error"),this.notify.translate.instant(C))}getPayload(){return this.extentOptionsChildren.toArray().map(Ye=>({...Ye.extentOption,paymentExtentValues:this.changeEmptyValuesToZero(Ye.extentOption.paymentExtentValues)})).map(Ye=>({...Ye,paymentExtentValues:this.removeEmptyExtentOptionValue(Ye.paymentExtentValues)}))}getFromDates(){this.oldFromDates=this.fromDates;const M=[],C=this.extentOptionsChildren.toArray();C.forEach(Q=>{if(l.Utils.isISODate(Q.extentOption.fromDate)){const Ye={id:Q.extentOption.id||Q.extentOption.tempId,fromDate:l.Utils.convertDateToFinnishStandard(Q.extentOption.fromDate)};M.push(Ye)}}),(0,X.Z)(M,this.oldFromDates)||(C.forEach(Q=>{Q.fromDates=M}),this.fromDates=M,this.cdr.detectChanges())}changeEmptyValuesToZero(M){const C=(0,ve.Z)(M);return C.forEach(Q=>{Q.overHoursPerWeek=Q.overHoursPerWeek||0,Q.maxHoursPerWeek=Q.maxHoursPerWeek||0,Q.overHoursPerWeekECEC=Q.overHoursPerWeekECEC||0,Q.maxHoursPerWeekECEC=Q.maxHoursPerWeekECEC||0,Q.maxHoursPerMonth=Q.maxHoursPerMonth||0,Q.overHoursPerWeekPrivateECEC=Q.overHoursPerWeekPrivateECEC||0,Q.maxHoursPerWeekPrivateECEC=Q.maxHoursPerWeekPrivateECEC||0,Q.maxFees=Q.maxFees||0}),C}removeEmptyExtentOptionValue(M){return M.filter(Q=>{if(0!==Q.overHoursPerWeek||0!==Q.maxFees||0!==Q.maxHoursPerMonth||0!==Q.maxHoursPerWeek||!1!==Q.fullTime||!1!==Q.partTime)return Q})}checkPageValidity(){this.getFromDates();const C=this.extentOptionsChildren.toArray().every(Zt=>!0===Zt.componentValidity),Ye=this.getPayload().every(Zt=>Zt.paymentExtentValues.length>0);return C&&Ye}createExtentOption(){return{municipalityId:this.municipalityId,tempId:(Date.now()*Math.random()).toString(),paymentExtentValues:[],type:this.type}}filterExtentOptions(M){this.activeExtentOptions=M.filter(C=>C.restEntityState===l.Constants.CURRENT),this.futureExtentOptions=M.filter(C=>C.restEntityState===l.Constants.FUTURE||C.tempId),this.historyExtentOptions=M.filter(C=>C.restEntityState===l.Constants.EXPIRED)}}yc.\u0275fac=function(M){return new(M||yc)(e.Y36(l.NotifyService),e.Y36(T.sK),e.Y36(j.F0),e.Y36(j.gz),e.Y36(l.SiviProjectsGatewayService),e.Y36(Rs),e.Y36(l.UnsavedChangesGuard),e.Y36(l.SiviModalController),e.Y36(e.sBO))},yc.\u0275cmp=e.Xpm({type:yc,selectors:[["sivi-mun-set-ecec-extent-options"]],viewQuery:function(M,C){if(1&M&&(e.Gf(Cu,7),e.Gf(sd,5)),2&M){let Q;e.iGM(Q=e.CRH())&&(C.contentLoader=Q.first),e.iGM(Q=e.CRH())&&(C.extentOptionsChildren=Q)}},inputs:{path:"path",municipalityId:"municipalityId"},features:[e.qOj],decls:33,vars:24,consts:[[3,"closeButton","hideNotifications","closed"],["navbar-title",""],[4,"ngIf"],["navbar-buttons-right",""],[3,"disabled","clicked",4,"ngIf"],[1,"ion-padding"],["skeleton","form",3,"loadingByDefault"],["siviContent",""],[4,"ngIf","ngIfElse"],["outline","",3,"atrr.aria-label","click",4,"ngIf"],["noActiveOptions",""],[1,"bstriped-background-odd"],["noFutureOptions",""],["noHistoryOptions",""],[3,"disabled","clicked"],[4,"ngFor","ngForOf","ngForTrackBy"],[3,"option","readonly","onSubmit","type","deletePaymentExtentOption","valueChange"],["outline","",3,"atrr.aria-label","click"],[3,"option","readonly","onSubmit","type","valueChange"],[3,"option","type","readonly"]],template:function(M,C){if(1&M&&(e.TgZ(0,"ion-header")(1,"sivi-lib-navbar",0),e.NdJ("closed",function(){return C.onDismiss()}),e.TgZ(2,"div",1),e._uU(3),e.ALo(4,"translate"),e.YNc(5,Gd,3,3,"span",2),e.qZA(),e.TgZ(6,"div",3),e.YNc(7,Rd,1,1,"sivi-lib-navbar-action-button",4),e.qZA()()(),e.TgZ(8,"ion-content",5)(9,"sivi-lib-content-loader",6,7)(11,"div")(12,"h2"),e._uU(13),e.ALo(14,"translate"),e.qZA(),e.YNc(15,Wf,2,2,"div",8),e.YNc(16,vc,4,6,"ion-button",9),e.YNc(17,Rc,2,3,"ng-template",null,10,e.W1O),e.qZA(),e.TgZ(19,"div",11)(20,"h2"),e._uU(21),e.ALo(22,"translate"),e.qZA(),e.YNc(23,Md,2,2,"div",8),e.YNc(24,Mm,2,3,"ng-template",null,12,e.W1O),e.qZA(),e.TgZ(26,"div")(27,"h2"),e._uU(28),e.ALo(29,"translate"),e.qZA(),e.YNc(30,Ef,2,2,"div",8),e.YNc(31,Xc,2,3,"ng-template",null,13,e.W1O),e.qZA()()()),2&M){const Q=e.MAs(18),Ye=e.MAs(25),Zt=e.MAs(32);e.xp6(1),e.Q6J("closeButton",!0)("hideNotifications",!0),e.xp6(2),e.hij(" ",e.lcZ(4,16,C.type===C.extentOptionTypes.ECEC?"ECEC.Payment.Extent.Option.Plural":"ECEC.PPE.Payment.Extent.Option.Plural")," "),e.xp6(2),e.Q6J("ngIf",C.municipalityId),e.xp6(2),e.Q6J("ngIf",!C.readonly),e.xp6(2),e.Q6J("loadingByDefault",!0),e.xp6(4),e.Oqu(e.lcZ(14,18,"General.Text.Active")),e.xp6(2),e.Q6J("ngIf",C.activeExtentOptions.length>0)("ngIfElse",Q),e.xp6(1),e.Q6J("ngIf",C.showNewExtentOptionButton&&!C.readonly),e.xp6(5),e.Oqu(e.lcZ(22,20,"General.Text.Future")),e.xp6(2),e.Q6J("ngIf",C.futureExtentOptions.length>0)("ngIfElse",Ye),e.xp6(5),e.Oqu(e.lcZ(29,22,"General.Text.History")),e.xp6(2),e.Q6J("ngIf",C.historyExtentOptions.length>0)("ngIfElse",Zt)}},styles:[".bstriped-background-odd[_ngcontent-%COMP%]{background-color:var(--ion-color-light)}"]});const Eu=[{path:"ecec-extent-options",component:yc,canDeactivate:[l.UnsavedChangesGuard]}];class Mu{}Mu.\u0275fac=function(M){return new(M||Mu)},Mu.\u0275mod=e.oAB({type:Mu}),Mu.\u0275inj=e.cJS({providers:[Rs,l.SiviModalController],imports:[Gi,l.NavbarComponentModule,j.Bz.forChild(Eu),l.DatepickerModule,st.p0,Ct.u5,l.SelectComponentModule,l.SiviFormsModule]}),e.B6R(yc,function(){return[D.sg,D.O5,E.YG,E.W2,E.Gu,l.ContentLoaderComponent,l.NavbarComponent,l.NavbarActionButtonComponent,sd]},function(){return[D.Ov,T.X$]});class ws extends l.SiviPage{constructor(M,C,Q,Ye,Zt,Pi,Ir,xo){super(C,Q,Ye),this.siviProjectsGatewayService=M,this.notify=C,this.translate=Q,this.router=Ye,this.fb=Zt,this.unsavedChanges=Pi,this.ececFeeAndValueDecisionContactDetailsService=Ir,this.modalCtrl=xo,this.phoneValidators=[l.SiviValidators.required,l.SiviValidators.validatePhoneNumber()],this.emailValidators=[l.SiviValidators.required,l.SiviValidators.validateEmail()],this.form=this.fb.group({phone:["",this.phoneValidators],email:["",this.emailValidators]})}ngOnInit(){this.getContactDetails()}onFormValueChange(M){this.contactDetails=M}getContactDetails(){this.ececFeeAndValueDecisionContactDetailsService.getContactDetails().subscribe(M=>{this.originalContactDetails=M,this.form.patchValue(M)},M=>{console.error("getContactDetails",M),this.notify.alertBackendError(M)})}onSave(){this.isValid?this.ececFeeAndValueDecisionContactDetailsService.updateContactDetails(this.contactDetails).pipe((0,n.q)(1)).subscribe(()=>{this.originalContactDetails=this.contactDetails,this.notify.toastSaveSuccess()},M=>{console.error("Saving contact details failed",M),this.notify.alertFormSaveFailed()}):this.goToInvalid$.next()}canDeactivate(){return(0,X.Z)(this.contactDetails,this.originalContactDetails)}onDismiss(){this.unsavedChanges.canDeactivate(this).pipe((0,n.q)(1)).subscribe(M=>{M&&this.modalCtrl.dismiss(null)})}}ws.\u0275fac=function(M){return new(M||ws)(e.Y36(l.SiviProjectsGatewayService),e.Y36(l.NotifyService),e.Y36(T.sK),e.Y36(j.F0),e.Y36(Ct.QS),e.Y36(l.UnsavedChangesGuard),e.Y36(l.EcecFeeAndValueDecisionContactDetailsService),e.Y36(l.SiviModalController))},ws.\u0275cmp=e.Xpm({type:ws,selectors:[["sivi-mun-set-ecec-fee-and-value-decisions-contact-details-page"]],features:[e.qOj],decls:25,vars:24,consts:[[3,"hideNotifications","closeButton","closed"],["navbar-title",""],["navbar-buttons-right",""],[3,"clicked"],[1,"ion-padding"],["siviLibForm","",3,"formGroup"],["siviGridCol","left"],["formControlName","phone","siviLibFormControl","","type","text","label-position","floating",3,"label"],["formControlName","email","siviLibFormControl","","type","text","label-position","floating",3,"label"]],template:function(M,C){if(1&M&&(e.TgZ(0,"ion-header")(1,"sivi-lib-navbar",0),e.NdJ("closed",function(){return C.onDismiss()}),e.TgZ(2,"div",1),e._uU(3),e.ALo(4,"translate"),e.TgZ(5,"span"),e._uU(6),e.ALo(7,"async"),e.qZA()(),e.TgZ(8,"div",2)(9,"sivi-lib-navbar-action-button",3),e.NdJ("clicked",function(){return C.onSave()}),e.qZA()()()(),e.TgZ(10,"ion-content",4)(11,"h1"),e._uU(12),e.ALo(13,"translate"),e.qZA(),e.TgZ(14,"div",5)(15,"ion-row")(16,"ion-col",6),e._UZ(17,"cgi-input",7),e.ALo(18,"translate"),e.ALo(19,"translate"),e.qZA()(),e.TgZ(20,"ion-row")(21,"ion-col",6),e._UZ(22,"cgi-input",8),e.ALo(23,"translate"),e.ALo(24,"translate"),e.qZA()()()()),2&M){let Q;e.xp6(1),e.Q6J("hideNotifications",!0)("closeButton",!0),e.xp6(2),e.hij(" ",e.lcZ(4,10,"Fee.FeeOrValueDecision.ContactDetails.Title")," "),e.xp6(3),e.hij(" (",null==(Q=e.lcZ(7,12,C.siviProjectsGatewayService.getAppStateService().getMunicipality()))?null:Q.name,") "),e.xp6(6),e.Oqu(e.lcZ(13,14,"Fee.FeeOrValueDecision.ContactDetails.DecisionMaker.Title")),e.xp6(2),e.Q6J("formGroup",C.form),e.xp6(3),e.Q6J("label",e.lcZ(19,18,"Form.Label.PhoneNumber")),e.uIk("aria-label",e.lcZ(18,16,"Form.Label.PhoneNumber")),e.xp6(5),e.Q6J("label",e.lcZ(24,22,"Form.Label.Email")),e.uIk("aria-label",e.lcZ(23,20,"Form.Label.Email"))}},dependencies:[E.wI,E.W2,E.Gu,E.Nd,l.GridColDirective,l.NavbarComponent,l.NavbarActionButtonComponent,l.SiviFormDirective,l.SiviFormControlDirective,Ct.JJ,Ct.JL,Ct.sg,Ct.u,D.Ov,T.X$],encapsulation:2});const Ll=[{path:"fee-and-value-decisions-contact-details",component:ws,canDeactivate:[l.UnsavedChangesGuard]}];class Vc{}function Lo(te,M){1&te&&(e.TgZ(0,"th",13),e._uU(1),e.ALo(2,"translate"),e.qZA()),2&te&&(e.xp6(1),e.hij(" ",e.lcZ(2,1,"ECEC.Fee.FamilySize")," "))}function Uu(te,M){if(1&te&&(e.TgZ(0,"td",14)(1,"span"),e._uU(2),e.qZA()()),2&te){const C=M.$implicit;e.xp6(2),e.hij(" ",C.familySize,"")}}function et(te,M){1&te&&(e.TgZ(0,"th",13),e._uU(1),e.ALo(2,"translate"),e.qZA()),2&te&&(e.xp6(1),e.AsE(" ",e.lcZ(2,2,"ECEC.Fee.FamilySize.IncomeThreshold")," ","*"," "))}function Ae(te,M){if(1&te&&(e.TgZ(0,"td",15),e._UZ(1,"input",16),e.qZA()),2&te){const C=M.$implicit,Q=e.oxw();e.xp6(1),e.s9C("formControlName","familySize"+C.familySize+"IncomeThreshold"),e.Q6J("errorMessages",Q.errorMessage)}}function Ge(te,M){1&te&&(e.TgZ(0,"th",13),e._uU(1),e.ALo(2,"translate"),e.qZA()),2&te&&(e.xp6(1),e.AsE(" ",e.lcZ(2,2,"ECEC.Fee.FamilySize.MaximumFee")," ","*"," "))}function xt(te,M){if(1&te&&(e.TgZ(0,"td",17),e._UZ(1,"input",16),e.qZA()),2&te){const C=M.$implicit,Q=e.oxw();e.xp6(1),e.s9C("formControlName","familySize"+C.familySize+"MaxFee"),e.Q6J("errorMessages",Q.errorMessage)}}function Ht(te,M){1&te&&e._UZ(0,"tr",18)}function _n(te,M){1&te&&e._UZ(0,"tr",19)}Vc.\u0275fac=function(M){return new(M||Vc)},Vc.\u0275mod=e.oAB({type:Vc}),Vc.\u0275inj=e.cJS({providers:[l.EcecFeeAndValueDecisionContactDetailsService,l.SiviModalController],imports:[Gi,l.NavbarComponentModule,l.SiviFormsModule,Ct.u5,j.Bz.forChild(Ll)]});class li extends l.SiviAbstractForm{constructor(M,C){super(),this.translate=M,this.fb=C,this.update=new e.vpe,this.errorMessage={pattern:`${this.translate.instant("Form.Error.OnlyNumbers")}. ${this.translate.instant("ECEC.Payment.Error.DecimalPlacesMoreThanTwo")}`},this.displayedColumns=["familySize","familySizeIncomeThreshold","familySizeMaxFee"],this.dataSource=new st.by,this.formGroup=this.fb.group({familySize2IncomeThreshold:[{value:"",disabled:this.viewMode},[]],familySize3IncomeThreshold:[{value:"",disabled:this.viewMode},[]],familySize4IncomeThreshold:[{value:"",disabled:this.viewMode},[]],familySize5IncomeThreshold:[{value:"",disabled:this.viewMode},[]],familySize6IncomeThreshold:[{value:"",disabled:this.viewMode},[]],familySize2MaxFee:[{value:"",disabled:this.viewMode},[]],familySize3MaxFee:[{value:"",disabled:this.viewMode},[]],familySize4MaxFee:[{value:"",disabled:this.viewMode},[]],familySize5MaxFee:[{value:"",disabled:this.viewMode},[]],familySize6MaxFee:[{value:"",disabled:this.viewMode},[]],nextFamilyMembersIncomeThreshold:[{value:"",disabled:this.viewMode},[]]})}ngOnInit(){this.dataSource.data=this.initialiseTable(),this.updateData(),this.setValidators()}initialiseTable(){return[{familySize:2,familySize2IncomeThreshold:null,familySize2MaxFee:null},{familySize:3,familySize3IncomeThreshold:null,familySize3MaxFee:null},{familySize:4,familySize4IncomeThreshold:null,familySize4MaxFee:null},{familySize:5,familySize5IncomeThreshold:null,familySize5MaxFee:null},{familySize:6,familySize6IncomeThreshold:null,familySize6MaxFee:null}]}onFormValueChange(M){this.update.emit(M)}updateData(){this.formGroup.patchValue(this.familyFeeSetting)}setValidators(){if(this.viewMode)return;const M=[l.SiviValidators.required,l.SiviValidators.pattern(l.Patterns.NUMBERSWITHDECIMAL)];this.formGroup.get("familySize2IncomeThreshold").setValidators(M),this.formGroup.get("familySize3IncomeThreshold").setValidators(M),this.formGroup.get("familySize4IncomeThreshold").setValidators(M),this.formGroup.get("familySize5IncomeThreshold").setValidators(M),this.formGroup.get("familySize6IncomeThreshold").setValidators(M),this.formGroup.get("familySize2MaxFee").setValidators(M),this.formGroup.get("familySize3MaxFee").setValidators(M),this.formGroup.get("familySize4MaxFee").setValidators(M),this.formGroup.get("familySize5MaxFee").setValidators(M),this.formGroup.get("familySize6MaxFee").setValidators(M),this.formGroup.get("nextFamilyMembersIncomeThreshold").setValidators(M)}}function dr(te,M){if(1&te&&(e.TgZ(0,"form",1),e._UZ(1,"cgi-input",2),e.qZA()),2&te){const C=e.oxw();e.Q6J("formGroup",C.formGroup),e.xp6(1),e.Q6J("formControlName","feePercentReductionLvl"+C.reductionLevel)("viewMode",C.viewMode)("errorMessages",C.errorMessage)("label",C.getLabel(C.reductionLevel))}}li.\u0275fac=function(M){return new(M||li)(e.Y36(T.sK),e.Y36(Ct.QS))},li.\u0275cmp=e.Xpm({type:li,selectors:[["sivi-mun-set-family-size-table"]],inputs:{familyFeeSetting:"familyFeeSetting",viewMode:"viewMode"},outputs:{update:"update"},features:[e.qOj],decls:17,vars:10,consts:[["siviLibForm","",1,"table-container",3,"formGroup"],["mat-table","",1,"mat-elevation-z8","table-card",3,"dataSource","trackBy"],["matColumnDef","familySize"],["mat-header-cell","",4,"matHeaderCellDef"],["class","familySize","mat-cell","",4,"matCellDef"],["matColumnDef","familySizeIncomeThreshold"],["class","familySizeIncomeThreshold","mat-cell","",4,"matCellDef"],["matColumnDef","familySizeMaxFee"],["class","familySizeMaxFee","mat-cell","",4,"matCellDef"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],[1,"ion-padding-top"],["formControlName","nextFamilyMembersIncomeThreshold","siviLibFormControl","","type","text","label-position","floating",3,"errorMessages","viewMode","label"],["mat-header-cell",""],["mat-cell","",1,"familySize"],["mat-cell","",1,"familySizeIncomeThreshold"],["siviLibFormControl","","type","text",3,"formControlName","errorMessages"],["mat-cell","",1,"familySizeMaxFee"],["mat-header-row",""],["mat-row",""]],template:function(M,C){1&M&&(e.TgZ(0,"form",0)(1,"table",1),e.ynx(2,2),e.YNc(3,Lo,3,3,"th",3),e.YNc(4,Uu,3,1,"td",4),e.BQk(),e.ynx(5,5),e.YNc(6,et,3,4,"th",3),e.YNc(7,Ae,2,2,"td",6),e.BQk(),e.ynx(8,7),e.YNc(9,Ge,3,4,"th",3),e.YNc(10,xt,2,2,"td",8),e.BQk(),e.YNc(11,Ht,1,0,"tr",9),e.YNc(12,_n,1,0,"tr",10),e.qZA(),e.TgZ(13,"ion-row",11)(14,"ion-col"),e._UZ(15,"cgi-input",12),e.ALo(16,"translate"),e.qZA()()()),2&M&&(e.Q6J("formGroup",C.formGroup),e.xp6(1),e.Q6J("dataSource",C.dataSource)("trackBy",C.trackByFnIndex),e.xp6(10),e.Q6J("matHeaderRowDef",C.displayedColumns),e.xp6(1),e.Q6J("matRowDefColumns",C.displayedColumns),e.xp6(3),e.Q6J("errorMessages",C.errorMessage)("viewMode",C.viewMode)("label",e.lcZ(16,8,"ECEC.Fee.IncomeThresholdNextMember")))},dependencies:[E.wI,E.Nd,l.SiviFormDirective,l.SiviFormControlDirective,Ct._Y,Ct.Fj,Ct.JJ,Ct.JL,Ct.sg,Ct.u,st.BZ,st.fO,st.as,st.w1,st.Dz,st.nj,st.ge,st.ev,st.XQ,st.Gk,T.X$],styles:["[_nghost-%COMP%]{display:block;overflow:auto;margin-left:-12px;margin-right:-12px}.table-container[_ngcontent-%COMP%]{padding:16px 12px 24px}table[_ngcontent-%COMP%]{width:100%}th.mat-sort-header-sorted[_ngcontent-%COMP%]{color:var(--ion-color-primary)}[mat-header-cell][_ngcontent-%COMP%]{padding-left:4px;padding-right:4px}[mat-cell][_ngcontent-%COMP%]{color:var(--ion-color-primary);padding-left:4px;padding-right:4px;line-height:1}[mat-row][_ngcontent-%COMP%]{cursor:pointer}.mat-mdc-table-sticky[_ngcontent-%COMP%]{background-color:var(--ion-color-primary-contrast, #fff)}"]});class Sr extends l.SiviAbstractForm{constructor(M,C){super(),this.translate=M,this.fb=C,this.update=new e.vpe,this.errorMessage={pattern:`${this.translate.instant("Form.Error.OnlyNumbers")}. ${this.translate.instant("ECEC.Payment.Error.DecimalPlacesMoreThanTwo")}`}}ngOnInit(){this.setValidator(),this.updateData()}onFormValueChange(M){for(const C in M)""===M[C]&&(M[C]=null);this.update.emit(M)}setValidator(){const M=this.viewMode?[]:[l.SiviValidators.pattern(l.Patterns.NUMBERSWITHDECIMAL)];this.formGroup=this.fb.group({[`feePercentReductionLvl${this.reductionLevel}`]:["",M]})}updateData(){this.formGroup.get(`feePercentReductionLvl${this.reductionLevel}`).patchValue(this.value)}getLabel(M){return this.translate.instant("ECEC.Fee.ReductionLevels.Level",{number:M})}}Sr.\u0275fac=function(M){return new(M||Sr)(e.Y36(T.sK),e.Y36(Ct.QS))},Sr.\u0275cmp=e.Xpm({type:Sr,selectors:[["sivi-mun-set-reduction-level"]],inputs:{value:"value",reductionLevel:"reductionLevel",viewMode:"viewMode"},outputs:{update:"update"},features:[e.qOj],decls:1,vars:1,consts:[["siviLibForm","",3,"formGroup",4,"ngIf"],["siviLibForm","",3,"formGroup"],["siviLibFormControl","","type","text","label-position","floating",3,"formControlName","viewMode","errorMessages","label"]],template:function(M,C){1&M&&e.YNc(0,dr,2,5,"form",0),2&M&&e.Q6J("ngIf",C.formGroup)},dependencies:[D.O5,l.SiviFormDirective,l.SiviFormControlDirective,Ct._Y,Ct.JJ,Ct.JL,Ct.sg,Ct.u]});class fo extends l.AbstractRestService{constructor(M,C){super(M,C),this.http=M,this.siviProjectsGateway=C}updateEcecFee(M,C){const Q=`./api/sivi-accounts-api/municipality-settings/ecec-fees/${C}`;return this.put(M,Q)}getEcecFees(){return this.get("./api/sivi-accounts-api/municipality-settings/ecec-fees")}createNewEcecFee(M){return this.post("./api/sivi-accounts-api/municipality-settings/ecec-fee",M)}deleteEcecFee(M){const C=`./api/sivi-accounts-api/municipality-settings/ecec-fees/${M}`;return this.delete(C)}}function ms(te,M){if(1&te){const C=e.EpF();e.TgZ(0,"sivi-lib-navbar-action-button",20),e.NdJ("clicked",function(){e.CHM(C);const Ye=e.oxw();return e.KtG(Ye.saveFeeParameters(Ye.feeParameter.id))}),e.qZA()}if(2&te){const C=e.oxw();e.Q6J("disabled",!C.checkAllComponentsAreValid())}}function Nl(te,M){if(1&te){const C=e.EpF();e.TgZ(0,"ion-button",21),e.NdJ("click",function(){e.CHM(C);const Ye=e.oxw();return e.KtG(Ye.onDeleteFee())}),e._UZ(1,"cgi-icon",22),e.qZA()}if(2&te){const C=e.oxw();e.Q6J("disabled",!C.feeParameter.canBeDeleted)}}function Dl(te,M){if(1&te&&(e.TgZ(0,"ion-col",9),e._UZ(1,"sivi-lib-datepicker",23),e.ALo(2,"translate"),e.qZA()),2&te){const C=e.oxw();e.xp6(1),e.Q6J("minDate",C.feeParameter.startDate)("readonly",!0)("label",e.lcZ(2,3,"Form.Label.Until"))}}function Yl(te,M){if(1&te){const C=e.EpF();e.TgZ(0,"sivi-mun-set-family-size-table",24),e.NdJ("update",function(Ye){e.CHM(C);const Zt=e.oxw();return e.KtG(Zt.onUpdateFamilyTable(Ye))}),e.qZA()}if(2&te){const C=e.oxw();e.Q6J("familyFeeSetting",C.familyFeeSetting)("viewMode",C.viewMode)}}function cu(te,M){if(1&te){const C=e.EpF();e.TgZ(0,"ion-col",9)(1,"sivi-mun-set-reduction-level",25),e.NdJ("update",function(Ye){e.CHM(C);const Zt=e.oxw();return e.KtG(Zt.onUpdateReductionLevel(Ye))}),e.qZA()()}if(2&te){const C=M.$implicit,Q=e.oxw();e.xp6(1),e.Q6J("value",Q.getReductionLevelValue(C))("reductionLevel",C)("viewMode",Q.viewMode)}}fo.\u0275fac=function(M){return new(M||fo)(e.LFG(g.eN),e.LFG(l.SiviProjectsGatewayService))},fo.\u0275prov=e.Yz7({token:fo,factory:fo.\u0275fac});class Mr extends l.SiviAbstractForm{constructor(M,C,Q,Ye,Zt,Pi,Ir,xo){super(),this.notify=M,this.translate=C,this.router=Q,this.route=Ye,this.unsavedChanges=Zt,this.ececFeeParametersService=Pi,this.modalCtrl=Ir,this.fb=xo,this.freeOfChargeOptions=[{text:"General.Text.Yes",value:!0},{text:"General.Text.No",value:!1}],this.formGroup=this.fb.group({startDate:["",[]],validUntil:["",[]],minFee:["",[]],maxFee:["",[]],maxFeePercentSecondChild:["",[]],maxFeePercentNextChild:["",[]],freeOfCharge:[!1,[]]}),this.errorMessage={pattern:`${this.translate.instant("Form.Error.OnlyNumbers")}. ${this.translate.instant("ECEC.Payment.Error.DecimalPlacesMoreThanTwo")}`},this.minimumStartdate=rn().add(1,"day").format("YYYY-MM-DD"),this.feeReductionsLevels=[1,2,3,4,5,6],this.constants=l.Constants}ngOnInit(){this.feeParameter.id===l.Constants.NEW_ID&&(this.feeParameter=this.initialiseNewFeeParameters()),this.setValidators(),this.updateData(this.feeParameter),this.familyFeeSetting=this.feeParameter.familyFeeSetting,this.originalFee=(0,ve.Z)(this.feeParameter)}onFormValueChange(M){this.feeParameter={...this.feeParameter,...l.Utils.commaToDotConversion(M,["maxFee","maxFeePercentNextChild","maxFeePercentSecondChild","minFee"])}}onUpdateFamilyTable(M){this.feeParameter.familyFeeSetting={...this.feeParameter.familyFeeSetting,...l.Utils.commaToDotConversion(M,["familySize2IncomeThreshold","familySize2MaxFee","familySize3IncomeThreshold","familySize3MaxFee","familySize4IncomeThreshold","familySize4MaxFee","familySize5IncomeThreshold","familySize5MaxFee","familySize6IncomeThreshold","familySize6MaxFee","nextFamilyMembersIncomeThreshold"])}}onUpdateReductionLevel(M){Object.keys(M).forEach(function(C){void 0===M[C]&&delete M[C]}),this.feeParameter.feeReductionSetting={...this.feeParameter.feeReductionSetting,...l.Utils.commaToDotConversion(M,["feePercentReductionLvl1","feePercentReductionLvl2","feePercentReductionLvl3","feePercentReductionLvl4","feePercentReductionLvl5","feePercentReductionLvl6"])}}getReductionLevelValue(M){const C=`feePercentReductionLvl${M}`;return this.feeParameter.feeReductionSetting?this.feeParameter.feeReductionSetting[C]:null}canDeactivate(){return(0,X.Z)(this.feeParameter,this.originalFee)}checkAllComponentsAreValid(){return!(!this.familySizeTableComponent||!this.reductionLevelComponent)&&(this.isValid&&this.familySizeTableComponent.isValid&&this.reductionLevelComponent.isValid)}removesEmptyFeeReductionSettingValues(){this.feeParameter.feeReductionSetting=l.Utils.removeEmptyValues((0,ve.Z)(this.feeParameter.feeReductionSetting)),this.feeParameter.feeReductionSetting&&0===Object.keys(this.feeParameter.feeReductionSetting).length&&delete this.feeParameter.feeReductionSetting}onDismiss(){this.removesEmptyFeeReductionSettingValues(),this.unsavedChanges.canDeactivate(this).pipe((0,n.q)(1)).subscribe(M=>{M&&this.modalCtrl.dismiss(null)})}initialiseNewFeeParameters(){return{familyFeeSetting:{familySize2IncomeThreshold:null,familySize2MaxFee:null,familySize3MaxFee:null,familySize3IncomeThreshold:null,familySize4IncomeThreshold:null,familySize4MaxFee:null,familySize5IncomeThreshold:null,familySize5MaxFee:null,familySize6IncomeThreshold:null,familySize6MaxFee:null,nextFamilyMembersIncomeThreshold:null},feeReductionSetting:{feePercentReductionLvl1:null,feePercentReductionLvl2:null,feePercentReductionLvl3:null,feePercentReductionLvl4:null,feePercentReductionLvl5:null,feePercentReductionLvl6:null},id:l.Constants.NEW_ID,maxFee:null,maxFeePercentNextChild:null,maxFeePercentSecondChild:null,minFee:null,startDate:this.minimumStartdate,validUntil:"",state:l.Constants.FUTURE,canBeDeleted:!0,freeOfCharge:!1}}updateData(M){this.formGroup.get("startDate").patchValue(M.startDate||this.minimumStartdate),this.formGroup.get("validUntil").patchValue(M.validUntil),this.formGroup.get("freeOfCharge").patchValue(M.freeOfCharge),this.formGroup.get("minFee").patchValue(M.minFee),this.formGroup.get("maxFee").patchValue(M.maxFee),this.formGroup.get("maxFeePercentSecondChild").patchValue(M.maxFeePercentSecondChild),this.formGroup.get("maxFeePercentNextChild").patchValue(M.maxFeePercentNextChild)}setValidators(){if(this.viewMode)return;const M=[l.SiviValidators.validateDate(),l.SiviValidators.required],C=[l.SiviValidators.required,l.SiviValidators.pattern(l.Patterns.NUMBERSWITHDECIMAL)];this.formGroup.get("startDate").setValidators(M),this.formGroup.get("minFee").setValidators(C),this.formGroup.get("maxFee").setValidators(C),this.formGroup.get("maxFeePercentSecondChild").setValidators(C),this.formGroup.get("maxFeePercentNextChild").setValidators(C)}onDeleteFee(){var M=this;return(0,o.Z)(function*(){(yield M.notify.deleteConfirmPopup()).onDidDismiss().then(function(){var Q=(0,o.Z)(function*(Ye){if(Ye&&Ye.data)try{yield M.ececFeeParametersService.deleteEcecFee(M.feeParameter.id).toPromise(),M.notify.toastDeleteSuccess(),M.modalCtrl.dismiss()}catch{M.notify.alertDeleteError()}});return function(Ye){return Q.apply(this,arguments)}}())})()}saveFeeParameters(M){M===l.Constants.NEW_ID?this.ececFeeParametersService.createNewEcecFee(this.feeParameter).pipe((0,n.q)(1)).subscribe(()=>{this.notify.toastSaveSuccess(),this.modalCtrl.dismiss()},C=>{null==C.error?this.notify.alertFormSaveFailed():this.createErrorResponseFromCode(C.error)}):this.ececFeeParametersService.updateEcecFee(this.feeParameter,M).pipe((0,n.q)(1)).subscribe(()=>{this.notify.toastSaveSuccess(),this.removesEmptyFeeReductionSettingValues(),this.originalFee=(0,ve.Z)(this.feeParameter)},C=>{null==C.error?this.notify.alertFormSaveFailed():this.createErrorResponseFromCode(C.error)})}createErrorResponseFromCode(M){const C=this.notify.translate.instant("Message.Save.Error");let Q;if("START_DATE_NOT_UNIQUE"===M)Q="Backend.Error.START_DATE_NOT_UNIQUE";else Q="Message.Error.GeneralBackendError";this.notify.alert(C,this.notify.translate.instant(Q))}}Mr.\u0275fac=function(M){return new(M||Mr)(e.Y36(l.NotifyService),e.Y36(T.sK),e.Y36(j.F0),e.Y36(j.gz),e.Y36(l.UnsavedChangesGuard),e.Y36(fo),e.Y36(l.SiviModalController),e.Y36(Ct.QS))},Mr.\u0275cmp=e.Xpm({type:Mr,selectors:[["sivi-mun-set-ecec-fee-parameter-editor"]],viewQuery:function(M,C){if(1&M&&(e.Gf(li,5),e.Gf(Sr,5)),2&M){let Q;e.iGM(Q=e.CRH())&&(C.familySizeTableComponent=Q.first),e.iGM(Q=e.CRH())&&(C.reductionLevelComponent=Q.first)}},inputs:{feeParameter:"feeParameter",viewMode:"viewMode"},features:[e.qOj],decls:47,vars:52,consts:[[3,"hideNotifications","closeButton","closed"],["navbar-title",""],["navbar-buttons-right",""],[3,"disabled","clicked",4,"ngIf"],["name","delete","no-min-width","","slot","end","color","secondary","class","delete-button","icon-only","","fill","clear",3,"disabled","click",4,"ngIf"],["siviLibForm","",1,"ion-padding",3,"formGroup"],[1,"title"],[3,"text"],[1,"ion-no-padding"],["size","6"],["formControlName","startDate","siviLibFormControl","",3,"minDate","readonly","label"],["size","6",4,"ngIf"],[1,"mb0","weight-500"],["formControlName","freeOfCharge","siviLibFormControl","",3,"options","disabled"],["formControlName","minFee","siviLibFormControl","","type","text","label-position","floating",3,"errorMessages","viewMode","label"],["formControlName","maxFee","siviLibFormControl","","type","text","label-position","floating",3,"errorMessages","viewMode","label"],["formControlName","maxFeePercentSecondChild","siviLibFormControl","","type","text","label-position","floating",3,"errorMessages","viewMode","label"],["formControlName","maxFeePercentNextChild","siviLibFormControl","","type","text","label-position","floating",3,"errorMessages","viewMode","label"],[3,"familyFeeSetting","viewMode","update",4,"ngIf"],["size","6",4,"ngFor","ngForOf","ngForTrackBy"],[3,"disabled","clicked"],["name","delete","no-min-width","","slot","end","color","secondary","icon-only","","fill","clear",1,"delete-button",3,"disabled","click"],["name","delete"],["formControlName","validUntil","siviLibFormControl","",3,"minDate","readonly","label"],[3,"familyFeeSetting","viewMode","update"],[3,"value","reductionLevel","viewMode","update"]],template:function(M,C){1&M&&(e.TgZ(0,"ion-header")(1,"sivi-lib-navbar",0),e.NdJ("closed",function(){return C.onDismiss()}),e.TgZ(2,"div",1),e._uU(3),e.ALo(4,"translate"),e.qZA(),e.TgZ(5,"div",2),e.YNc(6,ms,1,1,"sivi-lib-navbar-action-button",3),e.qZA()()(),e.YNc(7,Nl,2,1,"ion-button",4),e.TgZ(8,"ion-content",5)(9,"h1",6),e._uU(10),e.ALo(11,"translate"),e._UZ(12,"sivi-lib-info-popup",7),e.qZA(),e.TgZ(13,"ion-grid",8)(14,"ion-row")(15,"ion-col",9),e._UZ(16,"sivi-lib-datepicker",10),e.ALo(17,"translate"),e.qZA(),e.YNc(18,Dl,3,5,"ion-col",11),e.qZA(),e.TgZ(19,"h4",12),e._uU(20),e.ALo(21,"translate"),e.qZA(),e.TgZ(22,"ion-row"),e._UZ(23,"sivi-lib-radio-list",13),e.qZA(),e.TgZ(24,"h2"),e._uU(25),e.ALo(26,"translate"),e.qZA(),e.TgZ(27,"ion-row")(28,"ion-col"),e._UZ(29,"cgi-input",14),e.ALo(30,"translate"),e.qZA(),e.TgZ(31,"ion-col"),e._UZ(32,"cgi-input",15),e.ALo(33,"translate"),e.qZA()(),e.TgZ(34,"ion-row")(35,"ion-col"),e._UZ(36,"cgi-input",16),e.ALo(37,"translate"),e.qZA(),e.TgZ(38,"ion-col"),e._UZ(39,"cgi-input",17),e.ALo(40,"translate"),e.qZA()(),e.YNc(41,Yl,1,2,"sivi-mun-set-family-size-table",18),e.TgZ(42,"h2"),e._uU(43),e.ALo(44,"translate"),e.qZA(),e.TgZ(45,"ion-row"),e.YNc(46,cu,2,3,"ion-col",19),e.qZA()()()),2&M&&(e.xp6(1),e.Q6J("hideNotifications",!0)("closeButton",!0),e.xp6(2),e.hij(" ",e.lcZ(4,32,"ECEC.Fee.Parameter.Plural")," "),e.xp6(3),e.Q6J("ngIf",!C.viewMode),e.xp6(1),e.Q6J("ngIf",C.feeParameter.state===C.constants.FUTURE&&C.feeParameter.id!==C.constants.NEW_ID),e.xp6(1),e.Q6J("formGroup",C.formGroup),e.xp6(2),e.hij("",e.lcZ(11,34,"ECEC.Fee.Parameter.Plural")," "),e.xp6(2),e.Q6J("text","ECEC.Fee.Parameter.Plural.Info"),e.xp6(4),e.Q6J("minDate",C.minimumStartdate)("readonly",C.viewMode)("label",e.lcZ(17,36,"Form.Label.From")),e.xp6(2),e.Q6J("ngIf",C.feeParameter.validUntil),e.xp6(2),e.hij(" ",e.lcZ(21,38,"ECEC.Fee.FreeOfCharge.Title")," "),e.xp6(3),e.Q6J("options",C.freeOfChargeOptions)("disabled",C.viewMode),e.xp6(2),e.hij(" ",e.lcZ(26,40,"ECEC.Fee.MinimumAndMaximum")," "),e.xp6(4),e.Q6J("errorMessages",C.errorMessage)("viewMode",C.viewMode)("label",e.lcZ(30,42,"ECEC.Fee.MinimumFee")),e.xp6(3),e.Q6J("errorMessages",C.errorMessage)("viewMode",C.viewMode)("label",e.lcZ(33,44,"ECEC.Fee.MaximumFee")),e.xp6(4),e.Q6J("errorMessages",C.errorMessage)("viewMode",C.viewMode)("label",e.lcZ(37,46,"ECEC.Fee.MaximumFeeSecondChild")),e.xp6(3),e.Q6J("errorMessages",C.errorMessage)("viewMode",C.viewMode)("label",e.lcZ(40,48,"ECEC.Fee.MaximumFeeNextChild")),e.xp6(2),e.Q6J("ngIf",C.familyFeeSetting),e.xp6(2),e.hij(" ",e.lcZ(44,50,"ECEC.Fee.ReductionLevels")," "),e.xp6(3),e.Q6J("ngForOf",C.feeReductionsLevels)("ngForTrackBy",C.trackByFn))},dependencies:[D.sg,D.O5,E.YG,E.wI,E.W2,E.jY,E.Gu,E.Nd,l.NavbarComponent,l.NavbarActionButtonComponent,l.SiviFormDirective,l.SiviFormControlDirective,Ct.JJ,Ct.JL,Ct.sg,Ct.u,l.DatepickerComponent,l.InfoPopupComponent,l.RadioListComponent,Sr,li,T.X$],styles:[".delete-button[_ngcontent-%COMP%]{width:min-content;align-self:end}h1[_ngcontent-%COMP%]{margin-top:0}"]});const sl=["siviContent"];function ld(te,M){if(1&te&&(e.TgZ(0,"span"),e._uU(1),e.ALo(2,"async"),e.qZA()),2&te){const C=e.oxw();let Q;e.xp6(1),e.hij(" (",null==(Q=e.lcZ(2,1,C.siviProjectsGatewayService.getAppStateService().getMunicipality()))?null:Q.name,") ")}}function qo(te,M){if(1&te){const C=e.EpF();e.TgZ(0,"ion-col",8)(1,"sivi-lib-timeframe-card",9),e.NdJ("clickCardHeaderEvent",function(Ye){e.CHM(C);const Zt=e.oxw(2);return e.KtG(Zt.openFeeParameterEditor(Ye))}),e.qZA()()}if(2&te){const C=M.$implicit,Q=e.oxw(2);e.xp6(1),e.Q6J("id",C.id)("title",Q.getTitle(C.startDate,null==C?null:C.validUntil))("viewMode",!0)("isFooterHidden",!0)("isBodyHidden",!0)}}function ll(te,M){if(1&te&&(e.TgZ(0,"ion-grid")(1,"ion-row"),e.YNc(2,qo,2,5,"ion-col",7),e.qZA()()),2&te){const C=e.oxw();e.xp6(2),e.Q6J("ngForOf",C.activeParameters)("ngForTrackBy",C.trackByFn)}}function y_(te,M){if(1&te){const C=e.EpF();e.TgZ(0,"ion-col",8)(1,"sivi-lib-timeframe-card",9),e.NdJ("clickCardHeaderEvent",function(Ye){e.CHM(C);const Zt=e.oxw(2);return e.KtG(Zt.openFeeParameterEditor(Ye))}),e.qZA()()}if(2&te){const C=M.$implicit,Q=e.oxw(2);e.xp6(1),e.Q6J("id",C.id)("title",Q.getTitle(C.startDate,null==C?null:C.validUntil))("viewMode",!0)("isFooterHidden",!0)("isBodyHidden",!0)}}function Hl(te,M){if(1&te&&(e.TgZ(0,"ion-grid")(1,"ion-row"),e.YNc(2,y_,2,5,"ion-col",7),e.qZA()()),2&te){const C=e.oxw();e.xp6(2),e.Q6J("ngForOf",C.futureParameters)("ngForTrackBy",C.trackByFn)}}function Fd(te,M){if(1&te){const C=e.EpF();e.TgZ(0,"ion-col",8)(1,"sivi-lib-timeframe-card",9),e.NdJ("clickCardHeaderEvent",function(Ye){e.CHM(C);const Zt=e.oxw(2);return e.KtG(Zt.openFeeParameterEditor(Ye))}),e.qZA()()}if(2&te){const C=M.$implicit,Q=e.oxw(2);e.xp6(1),e.Q6J("id",C.id)("title",Q.getTitle(C.startDate,null==C?null:C.validUntil))("viewMode",!0)("isFooterHidden",!0)("isBodyHidden",!0)}}function qu(te,M){if(1&te&&(e.TgZ(0,"ion-grid")(1,"ion-row"),e.YNc(2,Fd,2,5,"ion-col",7),e.qZA()()),2&te){const C=e.oxw();e.xp6(2),e.Q6J("ngForOf",C.expiredParameters)("ngForTrackBy",C.trackByFn)}}class Zc extends l.SiviPage{constructor(M,C,Q,Ye,Zt,Pi,Ir,xo,Qa){super(C,Q,Ye,Zt,Qa,xo),this.siviProjectsGatewayService=M,this.notify=C,this.translate=Q,this.router=Ye,this.route=Zt,this.ececFeeParametersService=Pi,this.unsavedChanges=Ir,this.modalCtrl=xo,this.location=Qa,this.municipalityId=this.route.snapshot.paramMap.get("municipalityId"),this.editorOpened=!1,this.activeParameters=[],this.futureParameters=[],this.expiredParameters=[],this.constants=l.Constants}ngOnInit(){this.getFeeParameters()}openFeeParameterEditor(M){var C=this;return(0,o.Z)(function*(){let Q,Ye=!1;if(M!==l.Constants.NEW_ID&&(Q=C.feeParameters.find(Ir=>Ir.id===M),Ye=Q.state!==l.Constants.FUTURE,!Ye)){const xo=yield(yield C.notify.createConfirmationPopUp("Alert.Title.Note","ECEC.Fee.Parameter.Confirmation.EditingValues")).onDidDismiss();if(xo&&!xo.data)return}const Zt={component:Mr,componentProps:{feeParameter:Q||{id:l.Constants.NEW_ID},viewMode:Ye},backdropDismiss:!1,cssClass:"modal-full-size"},Pi=yield C.openModal(Zt,"feeParameter");return Pi.onDidDismiss().then(()=>{C.getFeeParameters()}),yield Pi.present()})()}getTitle(M,C){return M=l.Utils.convertDateToFinnishStandard(M),C&&(C=l.Utils.convertDateToFinnishStandard(C)),`${M} - ${C}`}getFeeParameters(){this.contentLoader.showLoader(),this.ececFeeParametersService.getEcecFees().subscribe(M=>{M=M.map(C=>({...C,fromDate:C.startDate})),this.feeParameters=l.Utils.sortArrayByDate(M),this.activeParameters=this.feeParameters.filter(C=>C.state===l.Constants.CURRENT),this.futureParameters=this.feeParameters.filter(C=>C.state===l.Constants.FUTURE),this.expiredParameters=this.feeParameters.filter(C=>C.state===l.Constants.EXPIRED),this.contentLoader.hideLoader()},M=>{console.error("getFeeParameters",M),this.contentLoader.showError()})}onDismiss(){this.modalCtrl.dismiss()}}Zc.\u0275fac=function(M){return new(M||Zc)(e.Y36(l.SiviProjectsGatewayService),e.Y36(l.NotifyService),e.Y36(T.sK),e.Y36(j.F0),e.Y36(j.gz),e.Y36(fo),e.Y36(l.UnsavedChangesGuard),e.Y36(l.SiviModalController),e.Y36(D.Ye))},Zc.\u0275cmp=e.Xpm({type:Zc,selectors:[["sivi-mun-set-ecec-fee-parameters-page"]],viewQuery:function(M,C){if(1&M&&e.Gf(sl,7),2&M){let Q;e.iGM(Q=e.CRH())&&(C.contentLoader=Q.first)}},features:[e.qOj],decls:24,vars:21,consts:[[3,"hideNotifications","closeButton","closed"],["navbar-title",""],[4,"ngIf"],["navbar-buttons-right",""],["siviKeyboardEvents","","tabindex","0","role","link",3,"click"],[1,"ion-padding"],["siviContent",""],["class","generic-card-container",4,"ngFor","ngForOf","ngForTrackBy"],[1,"generic-card-container"],[1,"generic-card-container",3,"id","title","viewMode","isFooterHidden","isBodyHidden","clickCardHeaderEvent"]],template:function(M,C){1&M&&(e.TgZ(0,"ion-header")(1,"sivi-lib-navbar",0),e.NdJ("closed",function(){return C.onDismiss()}),e.TgZ(2,"div",1),e._uU(3),e.ALo(4,"translate"),e.YNc(5,ld,3,3,"span",2),e.qZA(),e._UZ(6,"div",3),e.qZA()(),e.TgZ(7,"cgi-fab",4),e.NdJ("click",function(){return C.openFeeParameterEditor(C.constants.NEW_ID)}),e.ALo(8,"translate"),e.qZA(),e.TgZ(9,"ion-content",5)(10,"sivi-lib-content-loader",null,6)(12,"h1"),e._uU(13),e.ALo(14,"translate"),e.qZA(),e.YNc(15,ll,3,2,"ion-grid",2),e.TgZ(16,"h1"),e._uU(17),e.ALo(18,"translate"),e.qZA(),e.YNc(19,Hl,3,2,"ion-grid",2),e.TgZ(20,"h1"),e._uU(21),e.ALo(22,"translate"),e.qZA(),e.YNc(23,qu,3,2,"ion-grid",2),e.qZA()()),2&M&&(e.xp6(1),e.Q6J("hideNotifications",!0)("closeButton",!0),e.xp6(2),e.hij(" ",e.lcZ(4,11,"ECEC.Payment.Parameter.Plural")," "),e.xp6(2),e.Q6J("ngIf",C.municipalityId),e.xp6(2),e.uIk("aria-label",e.lcZ(8,13,"ECEC.Fees.Parameter.AddNew")),e.xp6(6),e.Oqu(e.lcZ(14,15,"General.Text.Active")),e.xp6(2),e.Q6J("ngIf",C.activeParameters.length>0),e.xp6(2),e.Oqu(e.lcZ(18,17,"General.Text.Future")),e.xp6(2),e.Q6J("ngIf",C.futureParameters.length>0),e.xp6(2),e.Oqu(e.lcZ(22,19,"General.Text.History")),e.xp6(2),e.Q6J("ngIf",C.expiredParameters.length>0))},dependencies:[D.sg,D.O5,E.wI,E.W2,E.jY,E.Gu,E.Nd,l.ContentLoaderComponent,l.KeyboardEventsDirective,l.NavbarComponent,l.TimeframeCardComponent,D.Ov,T.X$],encapsulation:2});const uu=[{path:"feeParameter",component:Zc,canDeactivate:[l.UnsavedChangesGuard]}];class Es{}Es.\u0275fac=function(M){return new(M||Es)},Es.\u0275mod=e.oAB({type:Es}),Es.\u0275inj=e.cJS({providers:[fo,l.SiviModalController],imports:[Gi,l.NavbarComponentModule,l.SiviFormsModule,l.DatepickerModule,Ct.u5,l.TimeframeCardComponentModule,st.p0,l.InfoPopupComponentModule,l.RadioListComponentModule,j.Bz.forChild(uu)]});class mc extends l.AbstractRestService{constructor(M,C){super(M,C),this.http=M,this.siviProjectsGateway=C,this.options=this.getCommonOptions()}getIncomeStatements(){return this.get("./api/sivi-accounts-api/municipality-settings/income-statements",this.options)}getIncomeStatement(M){const C=`./api/sivi-accounts-api/municipality-settings/income-statements/${M}`;return this.get(C,this.options)}getFixedValuesForNewIncomeStatement(){return this.get("./api/sivi-accounts-api/municipality-settings/income-statements/draft",this.options)}saveNewIncomeStatement(M){return this.post("/api/sivi-accounts-api/municipality-settings/income-statements",M)}updateIncomeStatement(M){const C=`./api/sivi-accounts-api/municipality-settings/income-statements/${M.id}`;return this.put(M,C)}}mc.\u0275fac=function(M){return new(M||mc)(e.LFG(g.eN),e.LFG(l.SiviProjectsGatewayService))},mc.\u0275prov=e.Yz7({token:mc,factory:mc.\u0275fac});const Yp=function(te){return{"subtype-container":te}};class Fs extends l.SiviAbstractForm{constructor(M,C,Q){super(),this.translate=M,this.languageService=C,this.fb=Q,this.first=!1,this.last=!1,this.subType=!1,this.update=new e.vpe,this.move=new e.vpe,this.form=this.fb.group({descriptionFi:[""],descriptionSv:[""],descriptionEn:[""]})}ngOnInit(){this.setValidators(),this.updateDescriptionData()}onChangeSelectedTypes(M){const C={...this.incomeOrDeductionTypeObject,enabled:M.detail.checked};this.update.emit(C)}onFormValueChange(M){const C=this.incomeOrDeductionTypeObject;this.incomeOrDeductionTypeObject={...this.incomeOrDeductionTypeObject,...M},this.update.emit(this.incomeOrDeductionTypeObject),this.isDataChanged(C,M)&&this.setValidators()}isDataChanged(M,C){return M.descriptionFi!==C.descriptionFi||M.descriptionEn!==C.descriptionEn||M.descriptionSv!==C.descriptionSv}moveItem(M){this.move.emit(M)}getTitle(M,C){return`${this.languageService.getTranslationByLocale(M,C)} (${C.toUpperCase()})`}descriptionFilled(){return!!(this.incomeOrDeductionTypeObject.descriptionFi||this.incomeOrDeductionTypeObject.descriptionSv||this.incomeOrDeductionTypeObject.descriptionEn)}setValidators(){this.updateDescriptionValidator(this.descriptionFilled())}updateDescriptionValidator(M){const C=M?[l.SiviValidators.required]:[];this.form.get("descriptionFi").setValidators(C),this.form.get("descriptionSv").setValidators(C),this.form.get("descriptionEn").setValidators(C)}updateDescriptionData(){this.form.get("descriptionFi").patchValue(this.incomeOrDeductionTypeObject.descriptionFi||""),this.form.get("descriptionSv").patchValue(this.incomeOrDeductionTypeObject.descriptionSv||""),this.form.get("descriptionEn").patchValue(this.incomeOrDeductionTypeObject.descriptionEn||"")}}Fs.\u0275fac=function(M){return new(M||Fs)(e.Y36(T.sK),e.Y36(l.LanguageService),e.Y36(Ct.QS))},Fs.\u0275cmp=e.Xpm({type:Fs,selectors:[["sivi-mun-set-income-and-deduction-type"]],inputs:{incomeOrDeductionTypeObject:"incomeOrDeductionTypeObject",first:"first",last:"last",subType:"subType",canOnlyEditTexts:"canOnlyEditTexts"},outputs:{update:"update",move:"move"},features:[e.qOj],decls:18,vars:19,consts:[["siviLibForm","",3,"formGroup"],[3,"ngClass"],["size","10"],["role","checkbox",1,"ion-margin-end",3,"value","disabled","checked","ionChange"],["size","2",1,"buttons"],["color","primary","fill","clear","role","button","size","small","no-min-width","",1,"ml2",3,"disabled","click"],["name","arrow_downward"],["name","arrow_upward"],[3,"size"],["formControlName","descriptionFi","siviLibFormControl","","type","text","label-position","floating",3,"value","label"],["formControlName","descriptionSv","siviLibFormControl","","type","text","label-position","floating",3,"value","label"],["formControlName","descriptionEn","siviLibFormControl","","type","text","label-position","floating",3,"value","label"]],template:function(M,C){1&M&&(e.TgZ(0,"form",0)(1,"ion-grid",1)(2,"ion-row")(3,"ion-col",2)(4,"ion-checkbox",3),e.NdJ("ionChange",function(Ye){return C.onChangeSelectedTypes(Ye)}),e.qZA(),e.TgZ(5,"ion-label"),e._uU(6),e.ALo(7,"translate"),e.qZA()(),e.TgZ(8,"ion-col",4)(9,"ion-button",5),e.NdJ("click",function(){return C.moveItem(C.incomeOrDeductionTypeObject.orderIndex+1)}),e._UZ(10,"cgi-icon",6),e.qZA(),e.TgZ(11,"ion-button",5),e.NdJ("click",function(){return C.moveItem(C.incomeOrDeductionTypeObject.orderIndex-1)}),e._UZ(12,"cgi-icon",7),e.qZA()()(),e.TgZ(13,"ion-row")(14,"ion-col",8),e._UZ(15,"cgi-input",9)(16,"cgi-input",10)(17,"cgi-input",11),e.qZA()()()()),2&M&&(e.Q6J("formGroup",C.form),e.xp6(1),e.Q6J("ngClass",e.VKq(17,Yp,C.subType)),e.xp6(3),e.Q6J("value",C.incomeOrDeductionTypeObject.name)("disabled",C.canOnlyEditTexts)("checked",C.incomeOrDeductionTypeObject.enabled),e.xp6(2),e.Oqu(e.lcZ(7,15,null==C.incomeOrDeductionTypeObject?null:C.incomeOrDeductionTypeObject.name)),e.xp6(3),e.Q6J("disabled",C.last||C.canOnlyEditTexts),e.xp6(2),e.Q6J("disabled",C.first||C.canOnlyEditTexts),e.xp6(3),e.Q6J("size",C.subType?11:8),e.xp6(1),e.Q6J("value",C.incomeOrDeductionTypeObject.descriptionFi)("label",C.getTitle("ECEC.IncomeAndDeductionTypes.TypeDescription","fi")),e.xp6(1),e.Q6J("value",C.incomeOrDeductionTypeObject.descriptionSv)("label",C.getTitle("ECEC.IncomeAndDeductionTypes.TypeDescription","sv")),e.xp6(1),e.Q6J("value",C.incomeOrDeductionTypeObject.descriptionEn)("label",C.getTitle("ECEC.IncomeAndDeductionTypes.TypeDescription","en")))},dependencies:[D.mk,E.YG,E.nz,E.wI,E.jY,E.Q$,E.Nd,E.w,l.SiviFormDirective,l.SiviFormControlDirective,Ct._Y,Ct.JJ,Ct.JL,Ct.sg,Ct.u,T.X$],styles:[".subtype-container[_ngcontent-%COMP%]{background-color:var(--ion-color-light);padding:2rem}"]});const nc=["siviContent"];function Pu(te,M){if(1&te&&(e.TgZ(0,"span"),e._uU(1),e.ALo(2,"async"),e.qZA()),2&te){const C=e.oxw();let Q;e.xp6(1),e.hij(" (",null==(Q=e.lcZ(2,1,C.siviProjectsGatewayService.getAppStateService().getMunicipality()))?null:Q.name,") ")}}function yl(te,M){1&te&&(e.ynx(0),e.TgZ(1,"div",15),e._uU(2),e.ALo(3,"translate"),e.qZA(),e.BQk()),2&te&&(e.xp6(2),e.hij(" ",e.lcZ(3,1,"ECEC.IncomeAndDeductionTypes.IncomeTypes.SubTypeHasToBeSelected")," "))}function dl(te,M){if(1&te){const C=e.EpF();e.ynx(0),e.TgZ(1,"sivi-mun-set-income-and-deduction-type",17),e.NdJ("move",function(Ye){const Pi=e.CHM(C).index,Ir=e.oxw(2).$implicit,xo=e.oxw();return e.KtG(xo.onMoveType({from:Pi,to:Ye},Ir.subTypes))})("update",function(Ye){e.CHM(C);const Zt=e.oxw(3);return e.KtG(Zt.onUpdateType(Ye))}),e.qZA(),e.BQk()}if(2&te){const C=M.$implicit,Q=M.index,Ye=e.oxw(2).$implicit,Zt=e.oxw();e.xp6(1),e.Q6J("incomeOrDeductionTypeObject",C)("first",0===Q)("last",Q===Ye.subTypes.length-1)("subType",!0)("canOnlyEditTexts",Zt.canOnlyEditTexts)}}function Ti(te,M){if(1&te&&(e.TgZ(0,"div",16),e.YNc(1,dl,2,5,"ng-container",10),e.qZA()),2&te){const C=e.oxw().$implicit,Q=e.oxw();e.xp6(1),e.Q6J("ngForOf",C.subTypes)("ngForTrackBy",Q.trackByFn)}}function du(te,M){if(1&te){const C=e.EpF();e.ynx(0),e.TgZ(1,"div",12)(2,"sivi-mun-set-income-and-deduction-type",13),e.NdJ("move",function(Ye){const Pi=e.CHM(C).index,Ir=e.oxw();return e.KtG(Ir.onMoveType({from:Pi,to:Ye},Ir.incomeTypes))})("update",function(Ye){e.CHM(C);const Zt=e.oxw();return e.KtG(Zt.onUpdateType(Ye))}),e.qZA(),e.YNc(3,yl,4,3,"ng-container",2),e.YNc(4,Ti,2,2,"div",14),e.qZA(),e.BQk()}if(2&te){const C=M.$implicit,Q=M.index,Ye=e.oxw();e.xp6(2),e.Q6J("incomeOrDeductionTypeObject",C)("first",0===Q)("last",Q===Ye.incomeTypes.length-1)("canOnlyEditTexts",Ye.canOnlyEditTexts),e.xp6(1),e.Q6J("ngIf",Ye.shouldShowErrorForSubTypesNotSelected(C)),e.xp6(1),e.Q6J("ngIf",(null==C.subTypes?null:C.subTypes.length)>0&&C.enabled)}}function Kc(te,M){if(1&te){const C=e.EpF();e.ynx(0),e.TgZ(1,"div",12)(2,"sivi-mun-set-income-and-deduction-type",13),e.NdJ("move",function(Ye){const Pi=e.CHM(C).index,Ir=e.oxw();return e.KtG(Ir.onMoveType({from:Pi,to:Ye},Ir.deductionTypes))})("update",function(Ye){e.CHM(C);const Zt=e.oxw();return e.KtG(Zt.onUpdateType(Ye))}),e.qZA()(),e.BQk()}if(2&te){const C=M.$implicit,Q=M.index,Ye=e.oxw();e.xp6(2),e.Q6J("incomeOrDeductionTypeObject",C)("first",0===Q)("last",Q===Ye.deductionTypes.length-1)("canOnlyEditTexts",Ye.canOnlyEditTexts)}}class Wd extends l.SiviAbstractForm{constructor(M,C,Q,Ye,Zt,Pi,Ir,xo){super(),this.translate=M,this.route=C,this.unsavedChanges=Q,this.modalCtrl=Ye,this.siviProjectsGatewayService=Zt,this.incomeAndDeductionTypeService=Pi,this.fb=Ir,this.notifyService=xo,this.first=!1,this.last=!1,this.incomeTypes=[],this.deductionTypes=[],this.originalIncomeTypes=[],this.originalDeductionTypes=[],this.loading=!1,this.form=this.fb.group({fromDate:[""]}),this.municipalityId=this.route.snapshot.paramMap.get("municipalityId")}ngOnInit(){this.getIncomeStatementData(this.incomeStatementId)}canDeactivate(){return(0,X.Z)(this.originalIncomeTypes,this.incomeTypes)&&(0,X.Z)(this.originalDeductionTypes,this.deductionTypes)}checkAreTypesInUse(M){return!!M&&(M.id===l.Constants.NEW_ID||M.inUse)}onDismiss(){this.unsavedChanges.canDeactivate(this).pipe((0,n.q)(1)).subscribe(M=>{M&&this.modalCtrl.dismiss(null)})}onSave(M){const C=document.querySelector("ion-modal");this.checkForInvalidClass(C)?l.Utils.goToInvalid("ion-modal"):this.saveIncomeStatement(M)}saveIncomeStatement(M){this.loading=!0,this.contentLoader.showSavingLoader(),this.incomeStatement={...this.incomeStatement,incomeTypes:[...this.incomeTypes],deductionTypes:[...this.deductionTypes]};for(const Q of this.incomeTypes)Q.enabled||Q.subTypes.map(Ye=>Ye.enabled=!1);(M===l.Constants.NEW_ID?this.incomeAndDeductionTypeService.saveNewIncomeStatement(this.incomeStatement):this.incomeAndDeductionTypeService.updateIncomeStatement(this.incomeStatement)).pipe((0,n.q)(1)).subscribe(()=>{this.notifyService.toastSaveSuccess(),this.contentLoader.hideLoader(),this.originalIncomeTypes=(0,ve.Z)(this.incomeTypes),this.originalDeductionTypes=(0,ve.Z)(this.deductionTypes),this.loading=!1},Q=>{console.error(Q),this.notifyService.alertBackendError(Q,"Message.Save.Error"),this.contentLoader.hideLoader(),this.loading=!1})}getIncomeStatementData(M){var C=this;return(0,o.Z)(function*(){C.loading=!0,C.contentLoader.showLoader(),(M===l.Constants.NEW_ID?C.incomeAndDeductionTypeService.getFixedValuesForNewIncomeStatement():C.incomeAndDeductionTypeService.getIncomeStatement(M)).pipe().subscribe(Ye=>{C.incomeStatement=Ye,C.incomeTypes=Ye.incomeTypes,C.deductionTypes=Ye.deductionTypes,C.updateFormValues(),C.canOnlyEditTexts=C.checkAreTypesInUse(C.incomeStatement),C.originalIncomeTypes=(0,ve.Z)(C.incomeTypes),C.originalDeductionTypes=(0,ve.Z)(C.deductionTypes),C.contentLoader.showContent([C.incomeTypes,C.deductionTypes]),C.setValidator(),C.loading=!1},Ye=>{console.error("Failed to load Income statements",Ye),C.contentLoader.showError(),C.loading=!1})})()}onMoveType(M,C){C[M.from]={...C[M.from],orderIndex:M.to},C[M.to]={...C[M.to],orderIndex:M.from},C=l.Utils.reorderArray(C,M)}onFormValueChange(M){this.incomeStatement={...this.incomeStatement,...M}}updateFormValues(){this.incomeStatement&&this.form.get("fromDate").patchValue(this.incomeStatement.fromDate)}setValidator(){this.incomeStatement.inUse||this.form.get("fromDate").setValidators([l.SiviValidators.required])}updateIncomeType(M){if(M.name.includes(Vl.INCOME_SUBTYPE))for(const C of this.incomeTypes)C.subTypes=C.subTypes.map(Q=>Q.name===M.name?{...Q,...M}:Q);else this.incomeTypes=l.Utils.patchImmutableCollectionBy(this.incomeTypes,M,"id")}onUpdateType(M){M.name.includes(Vl.DEDUCTION)?this.deductionTypes=l.Utils.patchImmutableCollectionBy(this.deductionTypes,M,"id"):this.updateIncomeType(M)}shouldShowErrorForSubTypesNotSelected(M){if(!M.enabled)return!1;for(const C of M.subTypes)if(C.enabled)return!1;return!0}}var Vl;Wd.\u0275fac=function(M){return new(M||Wd)(e.Y36(T.sK),e.Y36(j.gz),e.Y36(l.UnsavedChangesGuard),e.Y36(l.SiviModalController),e.Y36(l.SiviProjectsGatewayService),e.Y36(mc),e.Y36(Ct.QS),e.Y36(l.NotifyService))},Wd.\u0275cmp=e.Xpm({type:Wd,selectors:[["sivi-mun-set-ecec-income-and-deduction-types"]],viewQuery:function(M,C){if(1&M&&e.Gf(nc,7),2&M){let Q;e.iGM(Q=e.CRH())&&(C.contentLoader=Q.first)}},inputs:{incomeStatementId:"incomeStatementId"},features:[e.qOj],decls:29,vars:25,consts:[[3,"closeButton","hideNotifications","closed"],["navbar-title",""],[4,"ngIf"],["navbar-buttons-right",""],[3,"disabled","clicked"],["siviLibForm","",1,"ion-padding",3,"formGroup"],["siviContent",""],[3,"text"],["size","3"],["formControlName","fromDate","siviLibFormControl","",3,"readonly","label"],[4,"ngFor","ngForOf","ngForTrackBy"],[1,"ion-padding-top"],[1,"container"],[3,"incomeOrDeductionTypeObject","first","last","canOnlyEditTexts","move","update"],["class","subType",4,"ngIf"],[1,"error","invalid","info-text"],[1,"subType"],[3,"incomeOrDeductionTypeObject","first","last","subType","canOnlyEditTexts","move","update"]],template:function(M,C){1&M&&(e.TgZ(0,"ion-header")(1,"sivi-lib-navbar",0),e.NdJ("closed",function(){return C.onDismiss()}),e.TgZ(2,"div",1),e._uU(3),e.ALo(4,"translate"),e.YNc(5,Pu,3,3,"span",2),e.qZA(),e.TgZ(6,"div",3)(7,"sivi-lib-navbar-action-button",4),e.NdJ("clicked",function(){return C.onSave(C.incomeStatementId)}),e.qZA()()()(),e.TgZ(8,"ion-content",5)(9,"sivi-lib-content-loader",null,6)(11,"h1"),e._uU(12),e.ALo(13,"translate"),e.qZA(),e.TgZ(14,"h3"),e._uU(15),e.ALo(16,"translate"),e._UZ(17,"sivi-lib-info-popup",7),e.qZA(),e.TgZ(18,"ion-grid")(19,"ion-row")(20,"ion-col",8),e._UZ(21,"sivi-lib-datepicker",9),e.qZA()(),e.YNc(22,du,5,6,"ng-container",10),e.TgZ(23,"div",11)(24,"h3"),e._uU(25),e.ALo(26,"translate"),e._UZ(27,"sivi-lib-info-popup",7),e.qZA(),e.YNc(28,Kc,3,4,"ng-container",10),e.qZA()()()()),2&M&&(e.xp6(1),e.Q6J("closeButton",!0)("hideNotifications",!0),e.xp6(2),e.hij(" ",e.lcZ(4,17,"ECEC.IncomeAndDeductionTypes.IncomeAndDeductionTypes.Title")," "),e.xp6(2),e.Q6J("ngIf",C.municipalityId),e.xp6(2),e.Q6J("disabled",C.loading),e.xp6(1),e.Q6J("formGroup",C.form),e.xp6(4),e.Oqu(e.lcZ(13,19,"ECEC.IncomeAndDeductionTypes.IncomeAndDeductionTypes.Title")),e.xp6(3),e.hij("",e.lcZ(16,21,"ECEC.IncomeAndDeductionTypes.IncomeTypes.Title")," "),e.xp6(2),e.Q6J("text","ECEC.IncomeAndDeductionTypes.IncomeTypes.Title.Info"),e.xp6(4),e.Q6J("readonly",C.incomeStatement.inUse)("label","Form.Label.From"),e.xp6(1),e.Q6J("ngForOf",C.incomeTypes)("ngForTrackBy",C.trackByFn),e.xp6(3),e.hij("",e.lcZ(26,23,"ECEC.IncomeAndDeductionTypes.DeductionTypes.Title")," "),e.xp6(2),e.Q6J("text","ECEC.IncomeAndDeductionTypes.DeductionTypes.Title.Info"),e.xp6(1),e.Q6J("ngForOf",C.deductionTypes)("ngForTrackBy",C.trackByFn))},dependencies:[D.sg,D.O5,E.wI,E.W2,E.jY,E.Gu,E.Nd,l.ContentLoaderComponent,l.NavbarComponent,l.NavbarActionButtonComponent,l.SiviFormDirective,l.SiviFormControlDirective,Ct.JJ,Ct.JL,Ct.sg,Ct.u,l.DatepickerComponent,l.InfoPopupComponent,Fs,D.Ov,T.X$],styles:["h1[_ngcontent-%COMP%]{color:var(--ion-color-secondary)}.buttons[_ngcontent-%COMP%]{margin-top:1em}.subType[_ngcontent-%COMP%]{padding-left:2em;width:80%}.container[_ngcontent-%COMP%]{border-top:1px solid var(--ion-color-light);padding-bottom:1em}.error[_ngcontent-%COMP%]{color:var(--ion-color-warning);padding:0 0 10px 10px}"]}),function(te){te.INCOME="income.type",te.INCOME_SUBTYPE="income.subtype",te.DEDUCTION="deduction.type"}(Vl||(Vl={}));const bl=["siviContent"];function Sl(te,M){if(1&te&&(e.TgZ(0,"span"),e._uU(1),e.ALo(2,"async"),e.qZA()),2&te){const C=e.oxw();let Q;e.xp6(1),e.hij(" (",null==(Q=e.lcZ(2,1,C.siviProjectsGatewayService.getAppStateService().getMunicipality()))?null:Q.name,") ")}}function Nd(te,M){if(1&te){const C=e.EpF();e.TgZ(0,"ion-col",8)(1,"sivi-lib-timeframe-card",9),e.NdJ("clickCardHeaderEvent",function(Ye){e.CHM(C);const Zt=e.oxw(2);return e.KtG(Zt.openincomeStatement(Ye))}),e.ALo(2,"date"),e.qZA()()}if(2&te){const C=M.$implicit,Q=e.oxw(2);e.xp6(1),e.Q6J("id",C.id)("title",e.xi3(2,5,C.fromDate,Q.dateFormats.FINNISH_ANGULAR))("viewMode",!0)("isFooterHidden",!0)("isBodyHidden",!0)}}function Hp(te,M){if(1&te&&(e.TgZ(0,"ion-grid")(1,"ion-row"),e.YNc(2,Nd,3,8,"ion-col",7),e.qZA()()),2&te){const C=e.oxw();e.xp6(2),e.Q6J("ngForOf",C.incomeStatements)("ngForTrackBy",C.trackByFn)}}class eu extends l.SiviPage{constructor(M,C,Q,Ye,Zt,Pi,Ir,xo,Qa){super(xo,M,Q,C,Qa,Zt),this.translate=M,this.route=C,this.router=Q,this.unsavedChanges=Ye,this.modalCtrl=Zt,this.siviProjectsGatewayService=Pi,this.incomeAndDeductionTypeService=Ir,this.notifyService=xo,this.location=Qa,this.incomeStatements=[],this.constants=l.Constants,this.dateFormats=l.DateFormats,this.municipalityId=this.route.snapshot.paramMap.get("municipalityId")}ngOnInit(){this.getIncomeStatements()}onDismiss(){this.modalCtrl.dismiss(null)}openincomeStatement(M){var C=this;return(0,o.Z)(function*(){if(M!==l.Constants.NEW_ID&&C.incomeStatements.find(Pi=>Pi.id===M).inUse){const Ir=yield(yield C.notifyService.createConfirmationPopUp("Alert.Title.Note","ECEC.IncomeAndDeductionTypes.IncomeStatement.Message.TypesAlreadyUsed")).onDidDismiss();if(Ir&&!Ir.data)return}const Q={component:Wd,componentProps:{incomeStatementId:M},backdropDismiss:!1,cssClass:"modal-full-size"},Ye=yield C.openModal(Q,"income-and-deduction-types");return Ye.onDidDismiss().then(()=>{C.getIncomeStatements()}),yield Ye.present()})()}getIncomeStatements(){this.contentLoader.showLoader(),this.incomeAndDeductionTypeService.getIncomeStatements().subscribe(M=>{this.incomeStatements=M,this.contentLoader.hideLoader()},M=>{console.error("Failed to load Income statements",M),this.contentLoader.showError()})}}eu.\u0275fac=function(M){return new(M||eu)(e.Y36(T.sK),e.Y36(j.gz),e.Y36(j.F0),e.Y36(l.UnsavedChangesGuard),e.Y36(l.SiviModalController),e.Y36(l.SiviProjectsGatewayService),e.Y36(mc),e.Y36(l.NotifyService),e.Y36(D.Ye))},eu.\u0275cmp=e.Xpm({type:eu,selectors:[["sivi-mun-set-ecec-income-and-deduction-page"]],viewQuery:function(M,C){if(1&M&&e.Gf(bl,7),2&M){let Q;e.iGM(Q=e.CRH())&&(C.contentLoader=Q.first)}},features:[e.qOj],decls:16,vars:13,consts:[[3,"closeButton","hideNotifications","closed"],["navbar-title",""],[4,"ngIf"],["navbar-buttons-right",""],[1,"ion-padding"],["siviKeyboardEvents","","tabindex","0","role","link",3,"click"],["siviContent",""],["class","generic-card-container",4,"ngFor","ngForOf","ngForTrackBy"],[1,"generic-card-container"],[1,"generic-card-container",3,"id","title","viewMode","isFooterHidden","isBodyHidden","clickCardHeaderEvent"]],template:function(M,C){1&M&&(e.TgZ(0,"ion-header")(1,"sivi-lib-navbar",0),e.NdJ("closed",function(){return C.onDismiss()}),e.TgZ(2,"div",1),e._uU(3),e.ALo(4,"translate"),e.YNc(5,Sl,3,3,"span",2),e.qZA(),e._UZ(6,"div",3),e.qZA()(),e.TgZ(7,"ion-content",4)(8,"cgi-fab",5),e.NdJ("click",function(){return C.openincomeStatement(C.constants.NEW_ID)}),e.ALo(9,"translate"),e.qZA(),e.TgZ(10,"sivi-lib-content-loader",null,6)(12,"h1"),e._uU(13),e.ALo(14,"translate"),e.qZA(),e.YNc(15,Hp,3,2,"ion-grid",2),e.qZA()()),2&M&&(e.xp6(1),e.Q6J("closeButton",!0)("hideNotifications",!0),e.xp6(2),e.hij(" ",e.lcZ(4,7,"ECEC.IncomeAndDeductionTypes.IncomeAndDeductionTypes.Title")," "),e.xp6(2),e.Q6J("ngIf",C.municipalityId),e.xp6(3),e.uIk("aria-label",e.lcZ(9,9,"AddNew")),e.xp6(5),e.hij("",e.lcZ(14,11,"ECEC.IncomeAndDeductionTypes.IncomeAndDeductionTypes.Title")," "),e.xp6(2),e.Q6J("ngIf",C.incomeStatements.length>0))},dependencies:[D.sg,D.O5,E.wI,E.W2,E.jY,E.Gu,E.Nd,l.ContentLoaderComponent,l.KeyboardEventsDirective,l.NavbarComponent,l.TimeframeCardComponent,D.Ov,D.uU,T.X$]});const ta=[{path:"ecec-income-and-deduction-page",component:eu}];class pu{}pu.\u0275fac=function(M){return new(M||pu)},pu.\u0275mod=e.oAB({type:pu}),pu.\u0275inj=e.cJS({providers:[l.NotifyService,l.SiviModalController,mc],imports:[Gi,l.NavbarComponentModule,j.Bz.forChild(ta),l.SiviFormsModule,l.DatepickerModule,l.TimeframeCardComponentModule,l.InfoPopupComponentModule]});class fc extends l.AbstractRestService{constructor(M,C){super(M,C),this.http=M,this.siviProjectsGateway=C}getEcecVoucherParameters(){return this.get("./api/sivi-accounts-api/municipality-settings/service-voucher")}updateEcecVoucherParameters(M){const{id:C}=M,Q=`./api/sivi-accounts-api/municipality-settings/service-voucher/${C}`;return this.put(M,Q)}createNewEcecVoucherParameters(M){return this.post("./api/sivi-accounts-api/municipality-settings/service-voucher",M)}deleteEcecVoucherParameters(M){const C=`./api/sivi-accounts-api/municipality-settings/service-voucher/${M}`;return this.delete(C)}}function Tu(te,M){if(1&te&&(e.TgZ(0,"span"),e._uU(1),e.qZA()),2&te){const C=e.oxw();e.xp6(1),e.hij(" (",C.municipalityName,") ")}}function cp(te,M){if(1&te){const C=e.EpF();e.TgZ(0,"sivi-lib-navbar-action-button",19),e.NdJ("clicked",function(){e.CHM(C);const Ye=e.oxw();return e.KtG(Ye.saveParameters())}),e.qZA()}if(2&te){const C=e.oxw();e.Q6J("disabled",!C.isValid)}}function Ql(te,M){if(1&te){const C=e.EpF();e.TgZ(0,"ion-button",20),e.NdJ("click",function(){e.CHM(C);const Ye=e.oxw();return e.KtG(Ye.onDeleteParameter())}),e.ALo(1,"translate"),e._UZ(2,"cgi-icon",21),e.qZA()}2&te&&e.uIk("aria-label",e.lcZ(1,1,"General.Buttons.Delete"))}fc.\u0275fac=function(M){return new(M||fc)(e.LFG(g.eN),e.LFG(l.SiviProjectsGatewayService))},fc.\u0275prov=e.Yz7({token:fc,factory:fc.\u0275fac});class Tm extends l.SiviPage{get canBeDeleted(){return this.voucherParameter?.state===l.Constants.FUTURE&&!!this.voucherParameter.id}get voucherParameterId(){return this.voucherParameter?.id}get validFromMinDate(){return rn().add(1,"day").format("YYYY-MM-DD")}get isValidUntilReadOnly(){return this.readonly||this.voucherParameter?.state===l.Constants.FUTURE}get isValidUntilHidden(){const{state:M,validUntil:C}=this.voucherParameter||{};return M===l.Constants.FUTURE&&(0,be.Z)(C)}constructor(M,C,Q,Ye,Zt,Pi,Ir,xo){super(M,C,Q),this.notify=M,this.translate=C,this.router=Q,this.route=Ye,this.unsavedChanges=Zt,this.ececVoucherParametersService=Pi,this.modalCtrl=Ir,this.fb=xo,this.formGroup=this.fb.group({validFrom:["",[]],validUntil:["",[]],ececMultiplierUnderThree:["",[]],ececMultiplierOverThree:["",[]],ececMultiplierPartTime:["",[]],ececMultiplierComplementary:["",[]],lowestVoucherValue:["",[]],highestVoucherValue:["",[]]}),this.validFromValidators=[l.SiviValidators.required,l.SiviValidators.validateDate(),l.SiviValidators.validateDateIsAfterThan("validUntil")],this.validUntilValidators=[l.SiviValidators.validateDate(),l.SiviValidators.validateDateIsBeforeThan("validFrom")],this.inputValidators=[l.SiviValidators.required,l.SiviValidators.pattern(l.Patterns.NUMBERSWITHDECIMAL)],this.errorMessage={pattern:`${this.translate.instant("Form.Error.OnlyNumbers")}. ${this.translate.instant("ECEC.Payment.Error.DecimalPlacesMoreThanTwo")}`},this.propertiesToConvert=["ececMultiplierUnderThree","ececMultiplierOverThree","ececMultiplierPartTime","ececMultiplierComplementary","lowestVoucherValue","highestVoucherValue"]}ngOnInit(){this.setValidators(),this.patchForm(this.voucherParameter)}ngAfterViewInit(){this.watchForValueChanges([this.voucherParameter])}onFormValueChange(M){this.voucherParameter={...this.voucherParameter,...l.Utils.commaToDotConversion(M,this.propertiesToConvert)},this.updateWatchedEntities([this.voucherParameter])}onDismiss(){this.unsavedChanges.canDeactivate(this).pipe((0,n.q)(1)).subscribe(M=>{M&&this.modalCtrl.dismiss()})}patchForm(M){M?(this.formGroup.get("validFrom").patchValue(M.validFrom),this.formGroup.get("validUntil").patchValue(M.validUntil),this.formGroup.get("ececMultiplierUnderThree").patchValue(M.ececMultiplierUnderThree),this.formGroup.get("ececMultiplierOverThree").patchValue(M.ececMultiplierOverThree),this.formGroup.get("ececMultiplierPartTime").patchValue(M.ececMultiplierPartTime),this.formGroup.get("ececMultiplierComplementary").patchValue(M.ececMultiplierComplementary),this.formGroup.get("lowestVoucherValue").patchValue(M.lowestVoucherValue),this.formGroup.get("highestVoucherValue").patchValue(M.highestVoucherValue)):this.formGroup.get("validFrom").patchValue(this.validFromMinDate)}setValidators(){this.readonly||(this.formGroup.get("validFrom").setValidators(this.validFromValidators),this.formGroup.get("validUntil").setValidators(this.validUntilValidators),this.formGroup.get("ececMultiplierUnderThree").setValidators(this.inputValidators),this.formGroup.get("ececMultiplierOverThree").setValidators(this.inputValidators),this.formGroup.get("ececMultiplierPartTime").setValidators(this.inputValidators),this.formGroup.get("ececMultiplierComplementary").setValidators(this.inputValidators),this.formGroup.get("lowestVoucherValue").setValidators(this.inputValidators),this.formGroup.get("highestVoucherValue").setValidators(this.inputValidators))}onDeleteParameter(){var M=this;return(0,o.Z)(function*(){(yield M.notify.deleteConfirmPopup()).onDidDismiss().then(function(){var Q=(0,o.Z)(function*(Ye){if(Ye?.data)try{yield M.ececVoucherParametersService.deleteEcecVoucherParameters(M.voucherParameterId).toPromise(),M.notify.toastDeleteSuccess(),M.modalCtrl.dismiss()}catch{M.notify.alertDeleteError()}});return function(Ye){return Q.apply(this,arguments)}}())})()}saveParameters(){const M={...this.voucherParameter,startDate:this.voucherParameter.validFrom};(0,ft.s)(()=>!!this.voucherParameterId,this.ececVoucherParametersService.updateEcecVoucherParameters(M),this.ececVoucherParametersService.createNewEcecVoucherParameters(M)).subscribe(()=>{this.watchForValueChanges([this.voucherParameter]),this.notify.toastSaveSuccess()},()=>this.notify.alertFormSaveFailed())}}Tm.\u0275fac=function(M){return new(M||Tm)(e.Y36(l.NotifyService),e.Y36(T.sK),e.Y36(j.F0),e.Y36(j.gz),e.Y36(l.UnsavedChangesGuard),e.Y36(fc),e.Y36(l.SiviModalController),e.Y36(Ct.QS))},Tm.\u0275cmp=e.Xpm({type:Tm,selectors:[["sivi-mun-set-ecec-voucher-parameters-modal"]],inputs:{municipalityName:"municipalityName",voucherParameter:"voucherParameter",readonly:"readonly"},features:[e.qOj],decls:49,vars:60,consts:[[3,"hideNotifications","closeButton","closed"],["navbar-title",""],[4,"ngIf"],["navbar-buttons-right",""],[3,"disabled","clicked",4,"ngIf"],["name","delete","no-min-width","","slot","end","color","secondary","class","delete-button","icon-only","","fill","clear",3,"click",4,"ngIf"],["siviLibForm","",1,"ion-padding",3,"formGroup"],[1,"title"],[3,"text"],[1,"ion-no-padding"],["size","6"],["formControlName","validFrom","siviLibFormControl","",3,"minDate","readonly","label"],["formControlName","validUntil","siviLibFormControl","",3,"hidden","readonly","label"],["formControlName","ececMultiplierUnderThree","siviLibFormControl","","type","text","label-position","floating",3,"viewMode","errorMessages","label"],["formControlName","ececMultiplierOverThree","siviLibFormControl","","type","text","label-position","floating",3,"viewMode","errorMessages","label"],["formControlName","ececMultiplierPartTime","siviLibFormControl","","type","text","label-position","floating",3,"viewMode","errorMessages","label"],["formControlName","ececMultiplierComplementary","siviLibFormControl","","type","text","label-position","floating",3,"viewMode","errorMessages","label"],["formControlName","lowestVoucherValue","siviLibFormControl","","type","text","label-position","floating",3,"viewMode","errorMessages","label"],["formControlName","highestVoucherValue","siviLibFormControl","","type","text","label-position","floating",3,"viewMode","errorMessages","label"],[3,"disabled","clicked"],["name","delete","no-min-width","","slot","end","color","secondary","icon-only","","fill","clear",1,"delete-button",3,"click"],["name","delete"]],template:function(M,C){1&M&&(e.TgZ(0,"ion-header")(1,"sivi-lib-navbar",0),e.NdJ("closed",function(){return C.onDismiss()}),e.TgZ(2,"div",1),e._uU(3),e.ALo(4,"translate"),e.YNc(5,Tu,2,1,"span",2),e.qZA(),e.TgZ(6,"div",3),e.YNc(7,cp,1,1,"sivi-lib-navbar-action-button",4),e.qZA()()(),e.YNc(8,Ql,3,3,"ion-button",5),e.TgZ(9,"ion-content",6)(10,"h1",7),e._uU(11),e.ALo(12,"translate"),e._UZ(13,"sivi-lib-info-popup",8),e.qZA(),e.TgZ(14,"ion-grid",9)(15,"ion-row")(16,"ion-col",10),e._UZ(17,"sivi-lib-datepicker",11),e.ALo(18,"translate"),e.qZA(),e.TgZ(19,"ion-col",10),e._UZ(20,"sivi-lib-datepicker",12),e.ALo(21,"translate"),e.qZA()(),e.TgZ(22,"h2"),e._uU(23),e.ALo(24,"translate"),e.qZA(),e.TgZ(25,"ion-row")(26,"ion-col"),e._UZ(27,"cgi-input",13),e.ALo(28,"translate"),e.qZA(),e.TgZ(29,"ion-col"),e._UZ(30,"cgi-input",14),e.ALo(31,"translate"),e.qZA()(),e.TgZ(32,"ion-row")(33,"ion-col"),e._UZ(34,"cgi-input",15),e.ALo(35,"translate"),e.qZA(),e.TgZ(36,"ion-col"),e._UZ(37,"cgi-input",16),e.ALo(38,"translate"),e.qZA()(),e.TgZ(39,"h2"),e._uU(40),e.ALo(41,"translate"),e.qZA(),e.TgZ(42,"ion-row")(43,"ion-col"),e._UZ(44,"cgi-input",17),e.ALo(45,"translate"),e.qZA(),e.TgZ(46,"ion-col"),e._UZ(47,"cgi-input",18),e.ALo(48,"translate"),e.qZA()()()()),2&M&&(e.xp6(1),e.Q6J("hideNotifications",!0)("closeButton",!0),e.xp6(2),e.hij(" ",e.lcZ(4,36,"ECEC.Voucher.Parameter.Plural")," "),e.xp6(2),e.Q6J("ngIf",C.municipalityName),e.xp6(2),e.Q6J("ngIf",!C.readonly),e.xp6(1),e.Q6J("ngIf",C.canBeDeleted),e.xp6(1),e.Q6J("formGroup",C.formGroup),e.xp6(2),e.AsE("",e.lcZ(12,38,"ECEC.Voucher.Parameter.Plural")," (",C.municipalityName,") "),e.xp6(2),e.Q6J("text","ECEC.Voucher.Parameter.Plural.Info"),e.xp6(4),e.Q6J("minDate",C.validFromMinDate)("readonly",C.readonly)("label",e.lcZ(18,40,"Form.Label.From")),e.xp6(3),e.Q6J("hidden",C.isValidUntilHidden)("readonly",C.isValidUntilReadOnly)("label",e.lcZ(21,42,"Form.Label.Until")),e.xp6(3),e.hij(" ",e.lcZ(24,44,"ECEC.Voucher.Parameter.Multipliers")," "),e.xp6(4),e.Q6J("viewMode",C.readonly)("errorMessages",C.errorMessage)("label",e.lcZ(28,46,"ECEC.Voucher.Parameter.Multipliers.Under.Three")),e.xp6(3),e.Q6J("viewMode",C.readonly)("errorMessages",C.errorMessage)("label",e.lcZ(31,48,"ECEC.Voucher.Parameter.Multipliers.Over.Three")),e.xp6(4),e.Q6J("viewMode",C.readonly)("errorMessages",C.errorMessage)("label",e.lcZ(35,50,"ECEC.Voucher.Parameter.Multipliers.Part.Time")),e.xp6(3),e.Q6J("viewMode",C.readonly)("errorMessages",C.errorMessage)("label",e.lcZ(38,52,"ECEC.Voucher.Parameter.Multipliers.Complementary")),e.xp6(3),e.hij(" ",e.lcZ(41,54,"ECEC.Voucher.Parameter.Lowest.And.Highest")," "),e.xp6(4),e.Q6J("viewMode",C.readonly)("errorMessages",C.errorMessage)("label",e.lcZ(45,56,"ECEC.Voucher.Parameter.Lowest")),e.xp6(3),e.Q6J("viewMode",C.readonly)("errorMessages",C.errorMessage)("label",e.lcZ(48,58,"ECEC.Voucher.Parameter.Highest")))},dependencies:[D.O5,E.YG,E.wI,E.W2,E.jY,E.Gu,E.Nd,l.NavbarComponent,l.NavbarActionButtonComponent,l.SiviFormDirective,l.SiviFormControlDirective,Ct.JJ,Ct.JL,Ct.sg,Ct.u,l.DatepickerComponent,l.InfoPopupComponent,T.X$],styles:[".delete-button[_ngcontent-%COMP%]{width:min-content;align-self:end}h1[_ngcontent-%COMP%]{margin-top:0}"]});const Ro=["siviContent"];function Fo(te,M){if(1&te&&(e.TgZ(0,"span"),e._uU(1),e.qZA()),2&te){const C=e.oxw();e.xp6(1),e.hij(" (",C.municipalityName,") ")}}function vs(te,M){if(1&te){const C=e.EpF();e.TgZ(0,"ion-col",7)(1,"sivi-lib-timeframe-card",8),e.NdJ("clickCardHeaderEvent",function(Ye){e.CHM(C);const Zt=e.oxw(2);return e.KtG(Zt.openVoucherParameter(Ye))}),e.qZA()()}if(2&te){const C=M.$implicit,Q=e.oxw(2);e.xp6(1),e.Q6J("id",C.id)("title",Q.getTitle(C.validFrom,null==C?null:C.validUntil))("viewMode",!0)("isFooterHidden",!0)("isBodyHidden",!0)}}function _e(te,M){if(1&te&&(e.TgZ(0,"ion-grid")(1,"ion-row"),e.YNc(2,vs,2,5,"ion-col",6),e.qZA()()),2&te){const C=e.oxw();e.xp6(2),e.Q6J("ngForOf",C.activeParameters)("ngForTrackBy",C.trackByFn)}}function $e(te,M){if(1&te){const C=e.EpF();e.TgZ(0,"ion-col",7)(1,"sivi-lib-timeframe-card",8),e.NdJ("clickCardHeaderEvent",function(Ye){e.CHM(C);const Zt=e.oxw(2);return e.KtG(Zt.openVoucherParameter(Ye))}),e.qZA()()}if(2&te){const C=M.$implicit,Q=e.oxw(2);e.xp6(1),e.Q6J("id",C.id)("title",Q.getTitle(C.validFrom,null==C?null:C.validUntil))("viewMode",!0)("isFooterHidden",!0)("isBodyHidden",!0)}}function Tt(te,M){if(1&te&&(e.TgZ(0,"ion-grid")(1,"ion-row"),e.YNc(2,$e,2,5,"ion-col",6),e.qZA()()),2&te){const C=e.oxw();e.xp6(2),e.Q6J("ngForOf",C.futureParameters)("ngForTrackBy",C.trackByFn)}}function Me(te,M){if(1&te){const C=e.EpF();e.TgZ(0,"ion-col",7)(1,"sivi-lib-timeframe-card",8),e.NdJ("clickCardHeaderEvent",function(Ye){e.CHM(C);const Zt=e.oxw(2);return e.KtG(Zt.openVoucherParameter(Ye))}),e.qZA()()}if(2&te){const C=M.$implicit,Q=e.oxw(2);e.xp6(1),e.Q6J("id",C.id)("title",Q.getTitle(C.validFrom,null==C?null:C.validUntil))("viewMode",!0)("isFooterHidden",!0)("isBodyHidden",!0)}}function N(te,M){if(1&te&&(e.TgZ(0,"ion-grid")(1,"ion-row"),e.YNc(2,Me,2,5,"ion-col",6),e.qZA()()),2&te){const C=e.oxw();e.xp6(2),e.Q6J("ngForOf",C.expiredParameters)("ngForTrackBy",C.trackByFn)}}class O extends l.SiviPage{constructor(M,C,Q,Ye,Zt,Pi,Ir,xo,Qa){super(C,Q,Ye,Zt,Qa,Ir),this.siviProjectsGatewayService=M,this.notify=C,this.translate=Q,this.router=Ye,this.route=Zt,this.ececVoucherParametersService=Pi,this.modalCtrl=Ir,this.cdr=xo,this.location=Qa,this.activeParameters=[],this.futureParameters=[],this.expiredParameters=[]}ngOnInit(){this.getVoucherParameters(),this.getMunicipalityName()}getMunicipalityName(){this.siviProjectsGatewayService.getAppStateService().getMunicipality().pipe((0,w.R)(this.destroy$),(0,ae.h)(M=>!!M),(0,Y.U)(M=>M.name),(0,P.x)(()=>this.contentLoader.hideLoader())).subscribe(M=>this.municipalityName=M)}getTitle(M,C){return`${l.Utils.convertDateToFinnishStandard(M)} - ${l.Utils.convertDateToFinnishStandard(C)}`}getModalOpts(M,C){return{component:Tm,backdropDismiss:!1,cssClass:"modal-full-size",componentProps:{readonly:C,municipalityName:this.municipalityName,voucherParameter:M}}}openVoucherParameterModal(M=null,C=!1){var Q=this;return(0,o.Z)(function*(){yield(yield Q.openModal(Q.getModalOpts(M,C))).onDidDismiss(),Q.getVoucherParameters()})()}openVoucherParameter(M){var C=this;return(0,o.Z)(function*(){const Q=C.parameters.find(Zt=>Zt.id===M),Ye=Q.state!==l.Constants.FUTURE;if(!Ye){const Pi=yield(yield C.notify.createConfirmationPopUp("Alert.Title.Note","ECEC.Voucher.Parameter.Confirmation.Editing.Values")).onDidDismiss();if(Pi&&!Pi.data)return}yield C.openVoucherParameterModal(Q,Ye)})()}getVoucherParameters(){const C=Q=>{const Ye=(0,le.Z)(Q,"state");this.activeParameters=Ye[l.Constants.CURRENT],this.futureParameters=Ye[l.Constants.FUTURE],this.expiredParameters=Ye[l.Constants.EXPIRED]};this.contentLoader.showLoader(),this.ececVoucherParametersService.getEcecVoucherParameters().pipe((0,w.R)(this.destroy$),(0,Y.U)(Q=>(Q=>Q.map(Ye=>({...Ye,fromDate:Ye.validFrom})))(Q)),(0,Y.U)(Q=>l.Utils.sortArrayByDate(Q)),(0,V.b)(Q=>C(Q)),(0,P.x)(()=>this.contentLoader.hideLoader())).subscribe(Q=>{this.parameters=Q},Q=>{console.error("getServiceVoucherParameters",Q),this.contentLoader.showError()})}onDismiss(){this.modalCtrl.dismiss()}}O.\u0275fac=function(M){return new(M||O)(e.Y36(l.SiviProjectsGatewayService),e.Y36(l.NotifyService),e.Y36(T.sK),e.Y36(j.F0),e.Y36(j.gz),e.Y36(fc),e.Y36(l.SiviModalController),e.Y36(e.sBO),e.Y36(D.Ye))},O.\u0275cmp=e.Xpm({type:O,selectors:[["sivi-mun-set-ecec-voucher-parameters-page"]],viewQuery:function(M,C){if(1&M&&e.Gf(Ro,7),2&M){let Q;e.iGM(Q=e.CRH())&&(C.contentLoader=Q.first)}},features:[e.qOj],decls:22,vars:18,consts:[[3,"hideNotifications","closeButton","closed"],["navbar-title",""],[4,"ngIf"],["siviKeyboardEvents","","tabindex","0","role","link",3,"click"],[1,"ion-padding"],["siviContent",""],["class","generic-card-container",4,"ngFor","ngForOf","ngForTrackBy"],[1,"generic-card-container"],[1,"generic-card-container",3,"id","title","viewMode","isFooterHidden","isBodyHidden","clickCardHeaderEvent"]],template:function(M,C){1&M&&(e.TgZ(0,"ion-header")(1,"sivi-lib-navbar",0),e.NdJ("closed",function(){return C.onDismiss()}),e.TgZ(2,"div",1),e._uU(3),e.ALo(4,"translate"),e.YNc(5,Fo,2,1,"span",2),e.qZA()()(),e.TgZ(6,"cgi-fab",3),e.NdJ("click",function(){return C.openVoucherParameterModal()}),e.qZA(),e.TgZ(7,"ion-content",4)(8,"sivi-lib-content-loader",null,5)(10,"h1"),e._uU(11),e.ALo(12,"translate"),e.qZA(),e.YNc(13,_e,3,2,"ion-grid",2),e.TgZ(14,"h1"),e._uU(15),e.ALo(16,"translate"),e.qZA(),e.YNc(17,Tt,3,2,"ion-grid",2),e.TgZ(18,"h1"),e._uU(19),e.ALo(20,"translate"),e.qZA(),e.YNc(21,N,3,2,"ion-grid",2),e.qZA()()),2&M&&(e.xp6(1),e.Q6J("hideNotifications",!0)("closeButton",!0),e.xp6(2),e.hij(" ",e.lcZ(4,10,"ECEC.Voucher.Parameter.Plural")," "),e.xp6(2),e.Q6J("ngIf",C.municipalityName),e.xp6(6),e.Oqu(e.lcZ(12,12,"General.Text.Active")),e.xp6(2),e.Q6J("ngIf",(null==C.activeParameters?null:C.activeParameters.length)>0),e.xp6(2),e.Oqu(e.lcZ(16,14,"General.Text.Future")),e.xp6(2),e.Q6J("ngIf",(null==C.futureParameters?null:C.futureParameters.length)>0),e.xp6(2),e.Oqu(e.lcZ(20,16,"General.Text.History")),e.xp6(2),e.Q6J("ngIf",(null==C.expiredParameters?null:C.expiredParameters.length)>0))},dependencies:[D.sg,D.O5,E.wI,E.W2,E.jY,E.Gu,E.Nd,l.ContentLoaderComponent,l.KeyboardEventsDirective,l.NavbarComponent,l.TimeframeCardComponent,T.X$],encapsulation:2});const Ce=[{path:"serviceVoucherParameter",component:O,canDeactivate:[l.UnsavedChangesGuard]}];class Je{}Je.\u0275fac=function(M){return new(M||Je)},Je.\u0275mod=e.oAB({type:Je}),Je.\u0275inj=e.cJS({providers:[fc,l.SiviModalController],imports:[Gi,l.NavbarComponentModule,l.SiviFormsModule,l.DatepickerModule,Ct.u5,l.TimeframeCardComponentModule,st.p0,l.InfoPopupComponentModule,j.Bz.forChild(Ce)]});class Vt extends l.AbstractRestService{constructor(M,C){super(M,C),this.http=M,this.siviProjectsGateway=C}saveWeeklyCareTimeOptions(M){return this.put(M,"./api/sivi-accounts-api/weeklycaretimes/")}getWeeklyCareTimeOptionsByMunicipalityId(M){const C=`./api/sivi-accounts-api/weeklycaretimes/?municipalityId=${M}`;return this.get(C)}getCurrentWeeklyCareTimeOptionByMunicipalityId(M){const C=`./api/sivi-accounts-api/weeklycaretimes/current/?municipalityId=${M}`;return this.get(C)}}function Rr(te,M){if(1&te&&(e.TgZ(0,"ion-col",21),e._UZ(1,"sivi-lib-datepicker",22),e.qZA()),2&te){const C=e.oxw();e.xp6(1),e.Q6J("minDate",C.minDate)}}function wo(te,M){if(1&te&&(e.TgZ(0,"ion-col",23),e._UZ(1,"cgi-input",24),e.ALo(2,"translate"),e.qZA()),2&te){const C=e.oxw();e.xp6(1),e.Q6J("viewMode",!0)("label",e.lcZ(2,3,"Form.Label.From"))("value",C.getFormattedTimeOrDate(C.weeklyCareTimeOption.fromDate))}}function ua(te,M){if(1&te&&(e._UZ(0,"cgi-input",24),e.ALo(1,"translate"),e.ALo(2,"date")),2&te){const C=e.oxw();e.Q6J("viewMode",!0)("label",e.lcZ(1,3,"Form.Label.Until"))("value",e.xi3(2,5,C.weeklyCareTimeOption.validUntil,C.dateFormats.FINNISH_ANGULAR))}}function Ls(te,M){if(1&te){const C=e.EpF();e.TgZ(0,"ion-button",25),e.NdJ("click",function(){e.CHM(C);const Ye=e.oxw();return e.KtG(Ye.onDeleteTable())}),e._uU(1),e.ALo(2,"translate"),e.qZA()}if(2&te){const C=e.oxw();e.uIk("aria-label",C.deleteWeeklyCareTimeOptionLabel),e.xp6(1),e.hij(" ",e.lcZ(2,2,"General.Buttons.Cancel")," ")}}function Ws(te,M){if(1&te){const C=e.EpF();e.TgZ(0,"ion-button",25),e.NdJ("click",function(){e.CHM(C);const Ye=e.oxw();return e.KtG(Ye.onClickEdit())}),e._uU(1),e.ALo(2,"translate"),e.qZA()}if(2&te){const C=e.oxw();e.uIk("aria-label",C.editWeeklyCareTimeOptionLabel),e.xp6(1),e.hij(" ",e.lcZ(2,2,"General.Buttons.Edit")," ")}}function tu(te,M){if(1&te){const C=e.EpF();e.TgZ(0,"ion-button",25),e.NdJ("click",function(){e.CHM(C);const Ye=e.oxw();return e.KtG(Ye.onClickAddRow())}),e.ALo(1,"translate"),e._uU(2),e.ALo(3,"translate"),e.qZA()}2&te&&(e.uIk("aria-label",e.lcZ(1,2,"General.Buttons.Add.Row ")),e.xp6(2),e.hij(" ",e.lcZ(3,4,"General.Buttons.Add.Row")," "))}function Sc(te,M){1&te&&(e.TgZ(0,"th",26),e._uU(1),e.ALo(2,"translate"),e.qZA()),2&te&&(e.xp6(1),e.Oqu(e.lcZ(2,1,"ECEC.WeeklyTimeOptions.Table.WeeklyCareTimesType")))}function Um(te,M){if(1&te&&e._UZ(0,"sivi-lib-select",30),2&te){const C=e.oxw().$implicit,Q=e.oxw();e.Q6J("viewMode",!Q.editMode||C.id&&!Q.isOptionInFuture)("multiple",!1)("options",Q.weeklyCareTimesTypeOptions),e.uIk("name","weeklyCareTimesType-"+C.tempId)}}function ic(te,M){if(1&te&&(e.TgZ(0,"span"),e._uU(1),e.ALo(2,"translate"),e.qZA()),2&te){const C=e.oxw().$implicit;e.xp6(1),e.Oqu(e.lcZ(2,1,C.option))}}function mu(te,M){if(1&te&&(e.TgZ(0,"td",27),e.YNc(1,Um,1,4,"sivi-lib-select",28),e.YNc(2,ic,3,3,"ng-template",null,29,e.W1O),e.qZA()),2&te){const C=M.$implicit,Q=M.index,Ye=e.MAs(3),Zt=e.oxw();e.Q6J("formGroupName",Q),e.xp6(1),e.Q6J("ngIf",Zt.editMode&&!C.id)("ngIfElse",Ye)}}function us(te,M){1&te&&(e.TgZ(0,"th",26),e._uU(1),e.ALo(2,"translate"),e.qZA()),2&te&&(e.xp6(1),e.hij(" ",e.lcZ(2,1,"Form.Label.OptionName")+" (FI)",""))}function Gg(te,M){1&te&&e._UZ(0,"input",34)}function cd(te,M){if(1&te&&(e.TgZ(0,"span"),e._uU(1),e.qZA()),2&te){const C=e.oxw().$implicit;e.xp6(1),e.Oqu(null==C||null==C.languages[0]?null:C.languages[0].name)}}function ds(te,M){if(1&te&&(e.TgZ(0,"td",27)(1,"div",31)(2,"div",32),e.YNc(3,Gg,1,0,"input",33),e.YNc(4,cd,2,1,"ng-template",null,29,e.W1O),e.qZA()()()),2&te){const C=M.index,Q=e.MAs(5),Ye=e.oxw();e.Q6J("formGroupName",C),e.xp6(2),e.Q6J("formGroupName",0),e.xp6(1),e.Q6J("ngIf",Ye.editMode&&Ye.isEditable)("ngIfElse",Q)}}function xm(te,M){1&te&&(e.TgZ(0,"th",26),e._uU(1),e.ALo(2,"translate"),e.qZA()),2&te&&(e.xp6(1),e.hij(" ",e.lcZ(2,1,"Form.Label.OptionName")+" (SV)",""))}function Ns(te,M){1&te&&e._UZ(0,"input",34)}function Dm(te,M){if(1&te&&(e.TgZ(0,"span"),e._uU(1),e.qZA()),2&te){const C=e.oxw().$implicit;e.xp6(1),e.Oqu(null==C||null==C.languages[1]?null:C.languages[1].name)}}function rc(te,M){if(1&te&&(e.TgZ(0,"td",27)(1,"div",31)(2,"div",32),e.YNc(3,Ns,1,0,"input",33),e.YNc(4,Dm,2,1,"ng-template",null,29,e.W1O),e.qZA()()()),2&te){const C=M.index,Q=e.MAs(5),Ye=e.oxw();e.Q6J("formGroupName",C),e.xp6(2),e.Q6J("formGroupName",1),e.xp6(1),e.Q6J("ngIf",Ye.editMode&&Ye.isEditable)("ngIfElse",Q)}}function sm(te,M){1&te&&(e.TgZ(0,"th",26),e._uU(1),e.ALo(2,"translate"),e.qZA()),2&te&&(e.xp6(1),e.hij(" ",e.lcZ(2,1,"Form.Label.OptionName")+" (EN)",""))}function Xu(te,M){1&te&&e._UZ(0,"input",34)}function Td(te,M){if(1&te&&(e.TgZ(0,"span"),e._uU(1),e.qZA()),2&te){const C=e.oxw().$implicit;e.xp6(1),e.Oqu(null==C||null==C.languages[2]?null:C.languages[2].name)}}function pg(te,M){if(1&te&&(e.TgZ(0,"td",27)(1,"div",31)(2,"div",32),e.YNc(3,Xu,1,0,"input",33),e.YNc(4,Td,2,1,"ng-template",null,29,e.W1O),e.qZA()()()),2&te){const C=M.index,Q=e.MAs(5),Ye=e.oxw();e.Q6J("formGroupName",C),e.xp6(2),e.Q6J("formGroupName",2),e.xp6(1),e.Q6J("ngIf",Ye.editMode&&Ye.isEditable)("ngIfElse",Q)}}function ud(te,M){1&te&&(e.TgZ(0,"th",26),e._uU(1),e.ALo(2,"translate"),e.qZA()),2&te&&(e.xp6(1),e.hij(" ",e.lcZ(2,1,"ECEC.WeeklyTimeOptions.Table.CareTimeFrom")," "))}function Vp(te,M){if(1&te){const C=e.EpF();e.TgZ(0,"input",36),e.NdJ("input",function(){e.CHM(C);const Ye=e.oxw().index,Zt=e.oxw();return e.KtG(Zt.updateControlValidity(Ye))}),e.qZA()}}function Wg(te,M){if(1&te&&(e.TgZ(0,"span"),e._uU(1),e.qZA()),2&te){const C=e.oxw().$implicit;e.xp6(1),e.Oqu(null==C?null:C.fromTime)}}function ql(te,M){if(1&te&&(e.TgZ(0,"td",27),e.YNc(1,Vp,1,0,"input",35),e.YNc(2,Wg,2,1,"ng-template",null,29,e.W1O),e.qZA()),2&te){const C=M.index,Q=e.MAs(3),Ye=e.oxw();e.Q6J("formGroupName",C),e.xp6(1),e.Q6J("ngIf",Ye.editMode&&Ye.isEditable)("ngIfElse",Q)}}function Bd(te,M){1&te&&(e.TgZ(0,"th",26),e._uU(1),e.ALo(2,"translate"),e.qZA()),2&te&&(e.xp6(1),e.hij(" ",e.lcZ(2,1,"ECEC.WeeklyTimeOptions.Table.CareTimeUntil")," "))}function Xl(te,M){if(1&te){const C=e.EpF();e.TgZ(0,"input",38),e.NdJ("input",function(){e.CHM(C);const Ye=e.oxw().index,Zt=e.oxw();return e.KtG(Zt.updateControlValidity(Ye))}),e.qZA()}}function gh(te,M){if(1&te&&(e.TgZ(0,"span"),e._uU(1),e.qZA()),2&te){const C=e.oxw().$implicit;e.xp6(1),e.Oqu(null==C?null:C.untilTime)}}function Zp(te,M){if(1&te&&(e.TgZ(0,"td",27),e.YNc(1,Xl,1,0,"input",37),e.YNc(2,gh,2,1,"ng-template",null,29,e.W1O),e.qZA()),2&te){const C=M.index,Q=e.MAs(3),Ye=e.oxw();e.Q6J("formGroupName",C),e.xp6(1),e.Q6J("ngIf",Ye.editMode&&Ye.isEditable)("ngIfElse",Q)}}function $d(te,M){1&te&&(e.TgZ(0,"th",26),e._uU(1),e.ALo(2,"translate"),e.qZA()),2&te&&(e.xp6(1),e.hij(" ",e.lcZ(2,1,"ECEC.WeeklyTimeOptions.Table.TurnCare")," "))}function dd(te,M){if(1&te){const C=e.EpF();e.TgZ(0,"td",27)(1,"ion-checkbox",39),e.NdJ("ionChange",function(Ye){const Pi=e.CHM(C).index,Ir=e.oxw();return e.KtG(Ir.onIonCheckboxChange(Ye,Pi))}),e.qZA()()}if(2&te){const C=M.$implicit,Q=M.index,Ye=e.oxw();e.Q6J("formGroupName",Q),e.xp6(1),e.Q6J("listenEvents",!1)("disabled",!Ye.editMode||C.id&&!Ye.isOptionInFuture)("checked",null==C?null:C.turnCare)}}function fu(te,M){1&te&&e._UZ(0,"th",26)}function up(te,M){if(1&te){const C=e.EpF();e.TgZ(0,"ion-button",44),e.NdJ("click",function(){e.CHM(C);const Ye=e.oxw().index,Zt=e.oxw().$implicit,Pi=e.oxw();return e.KtG(Pi.onActionButtonClicked(Zt.id,Ye))}),e.ALo(1,"translate"),e._UZ(2,"cgi-icon",45),e.qZA()}if(2&te){const C=e.oxw(2).$implicit;e.Q6J("size",C.size),e.uIk("aria-label",e.lcZ(1,3,"btn.buttonLabel")),e.xp6(2),e.Q6J("name",C.icon)}}function jd(te,M){if(1&te&&(e.TgZ(0,"td",42),e.YNc(1,up,3,5,"ion-button",43),e.qZA()),2&te){const C=e.oxw(2);e.xp6(1),e.Q6J("ngIf",C.editMode&&C.isEditable)}}function hu(te,M){if(1&te&&(e.ynx(0,40),e.YNc(1,fu,1,0,"th",10),e.YNc(2,jd,2,1,"td",41),e.BQk()),2&te){const C=M.$implicit;e.Q6J("matColumnDef",C.id)}}function Kd(te,M){1&te&&e._UZ(0,"tr",46)}function as(te,M){1&te&&e._UZ(0,"tr",47)}Vt.\u0275fac=function(M){return new(M||Vt)(e.LFG(g.eN),e.LFG(l.SiviProjectsGatewayService))},Vt.\u0275prov=e.Yz7({token:Vt,factory:Vt.\u0275fac});const ed=function(te,M){return{edit:te,addrow:M}};class dp extends l.SiviAbstractForm{get displayedColumns(){const M=["weeklyCareTimesType","optionFi","optionSv","optionEn","careTimeFrom","careTimeUntil","turnCare"];return this.editMode&&M.push(l.Actions.MOVE_UP,l.Actions.MOVE_DOWN,l.Actions.DELETE),M}get isOptionInFuture(){return this.weeklyCareTimeOption.restEntityState===l.Constants.FUTURE}get isEditable(){return!this.weeklyCareTimeOption.id||this.isOptionInFuture}constructor(M,C,Q,Ye,Zt){super(C),this.notify=M,this.translate=C,this.router=Q,this.siviProjectsGatewayService=Ye,this.fb=Zt,this.valueChange=new e.vpe,this.deleteTable=new e.vpe,this.fromDates=[],this.constants=l.Constants,this.dateFormats=l.DateFormats,this.editMode=!1,this.addRow=!1,this.minDate=rn().add(1,"days").format("YYYY-MM-DD"),this.locale=this.translate.getDefaultLang(),this.availableActionButtons=[{id:l.Actions.MOVE_UP,icon:"arrow_upward",buttonLabel:this.translate.instant("General.Buttons.MoveUp"),size:"0.5"},{id:l.Actions.MOVE_DOWN,icon:"arrow_downward",buttonLabel:this.translate.instant("General.Buttons.MoveDown"),size:"0.5"},{id:l.Actions.DELETE,icon:"delete",buttonLabel:this.translate.instant("General.Buttons.Delete"),size:"0.5"}],this.languagesOptions=["fi","sv","en"],this.editWeeklyCareTimeOptionLabel=this.translate.instant("Message.Edit",{name:this.translate.instant("ECEC.WeeklyTimeOptions.ShortName")}),this.deleteWeeklyCareTimeOptionLabel=this.translate.instant("Message.Delete",{name:this.translate.instant("ECEC.WeeklyTimeOptions.ShortName")}),this.form=this.fb.group({id:[""],tempId:[""],fromDate:[""],municipalityId:[""],restEntityState:[""],restWeeklyCareTimeOptionValue:this.fb.array([])})}ngOnInit(){this.weeklyCareTimeOption.tempId&&(this.editMode=!0),this.componentValidity=this.isValid,this.initForm(),this.setFromDateValidator()}get tableData(){return this.form?this.form.get("restWeeklyCareTimeOptionValue").value:[]}initForm(){this.form.patchValue(this.weeklyCareTimeOption),this.weeklyCareTimeOption.id||this.form.removeControl("id"),this.weeklyCareTimeOption.tempId||this.form.removeControl("tempId"),this.createTableRows()}createTableRows(){this.weeklyCareTimeOption.restWeeklyCareTimeOptionValue.forEach(M=>{this.onAddRow(M)})}trackFn(M,C){return C.tempId||C.id}getFormattedTimeOrDate(M){return l.Utils.convertDateToFinnishStandard(M)}onClickEdit(){var M=this;return(0,o.Z)(function*(){M.weeklyCareTimeOption.restEntityState===l.Constants.FUTURE?(yield M.notify.createConfirmationPopUp("Message.EditFutureValues.Title","Message.EditFutureValues.Message","General.Buttons.Continue")).onDidDismiss().then(Q=>{Q&&Q.data&&(M.editMode=!0)}):M.editMode=!0})()}onActionButtonClicked(M,C){var Q=this;return(0,o.Z)(function*(){M===l.Actions.DELETE?(yield Q.notify.deleteConfirmPopup()).onDidDismiss().then(Zt=>{Zt&&Zt.data&&(Q.weeklyCareTimeOption.restWeeklyCareTimeOptionValue.splice(C,1),Q.form.get("restWeeklyCareTimeOptionValue").removeAt(C))}):(M===l.Actions.MOVE_UP||M===l.Actions.MOVE_DOWN)&&Q.moveRow(M,C)})()}moveRow(M,C){const Q=M===l.Actions.MOVE_UP,Ye=M===l.Actions.MOVE_DOWN,Zt={from:C,to:Q?C-1:C+1},Pi=this.form.get("restWeeklyCareTimeOptionValue");if(Q&&0===C||Ye&&C===Pi.length-1)return;const xo=Pi.at(Zt.from);this.form.get("restWeeklyCareTimeOptionValue").removeAt(Zt.from),this.form.get("restWeeklyCareTimeOptionValue").insert(Zt.to,xo)}onDeleteRow(M){this.form.get("restWeeklyCareTimeOptionValue").removeAt(M)}onDeleteTable(){this.deleteTable.emit(this.weeklyCareTimeOption)}onAddRow(M){const C=M?this.createExistingRow(M):this.createEmptyRow();this.form.get("restWeeklyCareTimeOptionValue").push(C)}createEmptyRow(){const M=[l.SiviValidators.validateHour(!0),l.SiviValidators.validateFromHourBeforeControl("untilTime",!0)],C=[l.SiviValidators.validateHour(!0),l.SiviValidators.validateUntilHourAfterControl("fromTime",!0)],Ye=["fi","sv","en"].map(Pi=>this.fb.group({language:[Pi],name:["",[l.SiviValidators.required]]}));return this.fb.group({option:["",[l.SiviValidators.required]],tempId:[l.Utils.createUUID()],languages:this.fb.array(Ye),turnCare:[!1],fromTime:["",M],untilTime:["",C]})}updateControlValidity(M){this.setUntilTimeValidators(M),this.updateValidity(M,"fromTime"),this.updateValidity(M,"untilTime")}updateValidity(M,C){const Q=this.form.get("restWeeklyCareTimeOptionValue").get([M,C]);Q?.markAsTouched(),Q?.updateValueAndValidity()}setUntilTimeValidators(M){const C=[l.SiviValidators.validateHour(!0),l.SiviValidators.validateUntilHourAfterControl("fromTime",!0)];!!this.form.get("restWeeklyCareTimeOptionValue").get([M,"fromTime"]).value&&C.push(l.SiviValidators.required),this.form.get("restWeeklyCareTimeOptionValue").get([M,"untilTime"]).setValidators(C)}createExistingRow(M){const C=["fi","sv","en"].map((Ye,Zt)=>this.fb.group({createdDate:[M.languages[Zt].createdDate],id:[M.languages[Zt].id],language:[Ye],name:[M.languages[Zt].name],parentId:[M.languages[Zt].parentId]}));return this.fb.group({fromTime:[(0,oe.Z)(M,"fromTime")],id:[(0,oe.Z)(M,"id")],languages:this.fb.array(C),option:[(0,oe.Z)(M,"option")],turnCare:[(0,oe.Z)(M,"turnCare",!1)],untilTime:[(0,oe.Z)(M,"untilTime")]})}onFormValueChange(M){this.valueChange.emit(M)}onClickAddRow(){this.onAddRow(),this.addRow=!0}onIonCheckboxChange(M,C){this.form.get("restWeeklyCareTimeOptionValue").get([C,"turnCare"]).patchValue(M.detail.checked)}setFromDateValidator(){const M=this.weeklyCareTimeOption.id||this.weeklyCareTimeOption.tempId,C=this.editMode?[l.SiviValidators.required,l.SiviValidators.validateDate(),l.SiviValidators.validateDateLaterThanToday(),l.SiviValidators.checkUniqueness(this.fromDates,M)]:[];this.form.get("fromDate").setValidators(C)}}dp.\u0275fac=function(M){return new(M||dp)(e.Y36(l.NotifyService),e.Y36(T.sK),e.Y36(j.F0),e.Y36(l.SiviProjectsGatewayService),e.Y36(Ct.QS))},dp.\u0275cmp=e.Xpm({type:dp,selectors:[["sivi-mun-set-ecec-weekly-care-time-option"]],inputs:{weeklyCareTimeOption:"weeklyCareTimeOption",weeklyCareTimesTypeOptions:"weeklyCareTimesTypeOptions"},outputs:{valueChange:"valueChange",deleteTable:"deleteTable"},features:[e.qOj],decls:36,vars:17,consts:[["siviLibForm","",1,"ion-no-padding",3,"formGroup"],[1,"ion-justify-content-start","ion-no-padding"],["size","12","size-md","3","class","ion-align-self-start ion-no-padding",4,"ngIf"],["size","12","size-md","3","class","ion-no-padding",4,"ngIf"],["size","12","size-md","3"],[3,"viewMode","label","value",4,"ngIf"],["size","12","size-md","4","offset-md","2",1,"ion-text-end"],["no-min-width","","role","button","fill","outline","class","ion-margin-end",3,"click",4,"ngIf"],["mat-table","","formArrayName","restWeeklyCareTimeOptionValue",1,"mat-elevation-z8",3,"dataSource","trackBy","ngClass"],["matColumnDef","weeklyCareTimesType"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",3,"formGroupName",4,"matCellDef"],["matColumnDef","optionFi"],["matColumnDef","optionSv"],["matColumnDef","optionEn"],["matColumnDef","careTimeFrom"],["matColumnDef","careTimeUntil"],["matColumnDef","turnCare"],[3,"matColumnDef",4,"ngFor","ngForOf","ngForTrackBy"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["size","12","size-md","3",1,"ion-align-self-start","ion-no-padding"],["formControlName","fromDate","siviLibFormControl","","label","Form.Label.From",3,"minDate"],["size","12","size-md","3",1,"ion-no-padding"],[3,"viewMode","label","value"],["no-min-width","","role","button","fill","outline",1,"ion-margin-end",3,"click"],["mat-header-cell",""],["mat-cell","",3,"formGroupName"],["formControlName","option","siviLibFormControl","",3,"viewMode","multiple","options",4,"ngIf","ngIfElse"],["spanText",""],["formControlName","option","siviLibFormControl","",3,"viewMode","multiple","options"],["formGroupName","languages"],[3,"formGroupName"],["formControlName","name","siviLibFormControl","","type","text","label-position","floating",4,"ngIf","ngIfElse"],["formControlName","name","siviLibFormControl","","type","text","label-position","floating"],["formControlName","fromTime","siviLibFormControl","","type","text","label-position","floating",3,"input",4,"ngIf","ngIfElse"],["formControlName","fromTime","siviLibFormControl","","type","text","label-position","floating",3,"input"],["formControlName","untilTime","siviLibFormControl","","type","text","label-position","floating",3,"input",4,"ngIf","ngIfElse"],["formControlName","untilTime","siviLibFormControl","","type","text","label-position","floating",3,"input"],["name","turnCare","formControlName","turnCare","siviLibFormControl","",3,"listenEvents","disabled","checked","ionChange"],[3,"matColumnDef"],["mat-cell","",4,"matCellDef"],["mat-cell",""],["color","primary","fill","clear","role","button","no-min-width","","class","ml2",3,"size","click",4,"ngIf"],["color","primary","fill","clear","role","button","no-min-width","",1,"ml2",3,"size","click"],[3,"name"],["mat-header-row",""],["mat-row",""]],template:function(M,C){1&M&&(e.TgZ(0,"ion-grid",0)(1,"ion-row",1),e.YNc(2,Rr,2,1,"ion-col",2),e.YNc(3,wo,3,5,"ion-col",3),e.TgZ(4,"ion-col",4),e.YNc(5,ua,3,8,"cgi-input",5),e.qZA(),e.TgZ(6,"ion-col",6),e.YNc(7,Ls,3,4,"ion-button",7),e.YNc(8,Ws,3,4,"ion-button",7),e.YNc(9,tu,4,6,"ion-button",7),e.qZA()(),e.TgZ(10,"ion-row")(11,"table",8),e.ynx(12,9),e.YNc(13,Sc,3,3,"th",10),e.YNc(14,mu,4,3,"td",11),e.BQk(),e.ynx(15,12),e.YNc(16,us,3,3,"th",10),e.YNc(17,ds,6,4,"td",11),e.BQk(),e.ynx(18,13),e.YNc(19,xm,3,3,"th",10),e.YNc(20,rc,6,4,"td",11),e.BQk(),e.ynx(21,14),e.YNc(22,sm,3,3,"th",10),e.YNc(23,pg,6,4,"td",11),e.BQk(),e.ynx(24,15),e.YNc(25,ud,3,3,"th",10),e.YNc(26,ql,4,3,"td",11),e.BQk(),e.ynx(27,16),e.YNc(28,Bd,3,3,"th",10),e.YNc(29,Zp,4,3,"td",11),e.BQk(),e.ynx(30,17),e.YNc(31,$d,3,3,"th",10),e.YNc(32,dd,2,4,"td",11),e.BQk(),e.YNc(33,hu,3,1,"ng-container",18),e.YNc(34,Kd,1,0,"tr",19),e.YNc(35,as,1,0,"tr",20),e.qZA()()()),2&M&&(e.Q6J("formGroup",C.form),e.xp6(2),e.Q6J("ngIf",!C.weeklyCareTimeOption.id||C.editMode),e.xp6(1),e.Q6J("ngIf",C.weeklyCareTimeOption.id&&!C.editMode),e.xp6(2),e.Q6J("ngIf",C.weeklyCareTimeOption.validUntil),e.xp6(2),e.Q6J("ngIf",C.weeklyCareTimeOption.tempId),e.xp6(1),e.Q6J("ngIf",C.isOptionInFuture&&C.weeklyCareTimeOption.id&&!C.editMode),e.xp6(1),e.Q6J("ngIf",C.isOptionInFuture&&C.editMode||!C.weeklyCareTimeOption.id),e.xp6(2),e.Q6J("dataSource",C.tableData)("trackBy",C.trackFn)("ngClass",e.WLB(14,ed,C.editMode||C.addRow,C.addRow)),e.xp6(22),e.Q6J("ngForOf",C.availableActionButtons)("ngForTrackBy",C.trackByFn),e.xp6(1),e.Q6J("matHeaderRowDef",C.displayedColumns),e.xp6(1),e.Q6J("matRowDefColumns",C.displayedColumns))},dependencies:[D.mk,D.sg,D.O5,E.YG,E.nz,E.wI,E.jY,E.Nd,E.w,l.DatepickerComponent,st.BZ,st.fO,st.as,st.w1,st.Dz,st.nj,st.ge,st.ev,st.XQ,st.Gk,l.SelectComponent,l.SiviFormDirective,l.SiviFormControlDirective,Ct.Fj,Ct.JJ,Ct.JL,Ct.sg,Ct.u,Ct.x0,Ct.CE,D.uU,T.X$],styles:["table[_ngcontent-%COMP%]{width:100%;margin-bottom:30px}table[_ngcontent-%COMP%]   th.mat-mdc-header-cell[_ngcontent-%COMP%]{font-size:14px}table[_ngcontent-%COMP%]   input[_ngcontent-%COMP%]{border-radius:0;border-style:solid;border-width:1px;border-color:#ccc;width:100%}.mat-mdc-table.edit[_ngcontent-%COMP%]   th[_ngcontent-%COMP%], .mat-mdc-table.edit[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]{padding-bottom:8px;padding-top:8px;padding-right:16px}.mat-mdc-table.addrow[_ngcontent-%COMP%]   tr[_ngcontent-%COMP%]:last-of-type   td[_ngcontent-%COMP%]{vertical-align:bottom}cgi-icon[_ngcontent-%COMP%]{color:var(--ion-color-primary)}"]});const Gp=["siviContent"];function td(te,M){if(1&te&&(e.TgZ(0,"span"),e._uU(1),e.ALo(2,"async"),e.qZA()),2&te){const C=e.oxw();let Q;e.xp6(1),e.hij(" (",null==(Q=e.lcZ(2,1,C.siviProjectsGatewayService.getAppStateService().getMunicipality()))?null:Q.name,") ")}}function lm(te,M){if(1&te){const C=e.EpF();e.TgZ(0,"sivi-lib-navbar-action-button",14),e.NdJ("clicked",function(){e.CHM(C);const Ye=e.oxw();return e.KtG(Ye.onSave())}),e.qZA()}if(2&te){const C=e.oxw();e.Q6J("disabled",!C.canSave||C.saving||!C.hasChanges)}}function mg(te,M){if(1&te){const C=e.EpF();e.ynx(0),e.TgZ(1,"sivi-mun-set-ecec-weekly-care-time-option",16),e.NdJ("deleteTable",function(Ye){e.CHM(C);const Zt=e.oxw(2);return e.KtG(Zt.onDeleteWeeklyCareTimeOption(Ye))})("valueChange",function(Ye){e.CHM(C);const Zt=e.oxw(2);return e.KtG(Zt.handleValueChange(Ye))}),e.qZA(),e.BQk()}if(2&te){const C=M.$implicit,Q=e.oxw(2);e.xp6(1),e.Q6J("weeklyCareTimeOption",C)("weeklyCareTimesTypeOptions",Q.weeklyCareTimesTypeOptions)}}function Mf(te,M){if(1&te&&(e.TgZ(0,"div"),e.YNc(1,mg,2,2,"ng-container",15),e.qZA()),2&te){const C=e.oxw();e.xp6(1),e.Q6J("ngForOf",C.activeWeeklyCareTimeOptions)("ngForTrackBy",C.trackByFn)}}function pp(te,M){1&te&&(e._uU(0),e.ALo(1,"translate")),2&te&&e.hij(" ",e.lcZ(1,1,"Message.NoDataFound")," ")}function b_(te,M){if(1&te){const C=e.EpF();e.TgZ(0,"ion-button",17),e.NdJ("click",function(){e.CHM(C);const Ye=e.oxw();return e.KtG(Ye.onClickAdd())}),e.ALo(1,"translate"),e._uU(2),e.ALo(3,"translate"),e.qZA()}2&te&&(e.Q6J("atrr.aria-label",e.lcZ(1,2,"General.Buttons.NewOptions")),e.xp6(2),e.hij(" ",e.lcZ(3,4,"General.Buttons.NewOptions")," "))}function Nh(te,M){if(1&te){const C=e.EpF();e.ynx(0),e.TgZ(1,"sivi-mun-set-ecec-weekly-care-time-option",19),e.NdJ("valueChange",function(Ye){e.CHM(C);const Zt=e.oxw(2);return e.KtG(Zt.handleValueChange(Ye))}),e.qZA(),e.BQk()}if(2&te){const C=M.$implicit,Q=e.oxw(2);e.xp6(1),e.Q6J("weeklyCareTimeOption",C)("weeklyCareTimesTypeOptions",Q.weeklyCareTimesTypeOptions)}}function _h(te,M){1&te&&e._UZ(0,"sivi-lib-content-loader",20),2&te&&e.Q6J("loadingByDefault",!0)("secondaryMode",!0)}function Jd(te,M){if(1&te&&(e.TgZ(0,"div"),e.YNc(1,Nh,2,2,"ng-container",15),e.YNc(2,_h,1,2,"ng-template",null,18,e.W1O),e.qZA()),2&te){const C=e.oxw();e.xp6(1),e.Q6J("ngForOf",C.futureWeeklyCareTimeOptions)("ngForTrackBy",C.trackByFn)}}function cm(te,M){1&te&&(e._uU(0),e.ALo(1,"translate")),2&te&&e.hij(" ",e.lcZ(1,1,"Message.NoDataFound")," ")}function um(te,M){if(1&te&&(e.ynx(0),e._UZ(1,"sivi-mun-set-ecec-weekly-care-time-option",21),e.BQk()),2&te){const C=M.$implicit,Q=e.oxw(2);e.xp6(1),e.Q6J("weeklyCareTimeOption",C)("weeklyCareTimesTypeOptions",Q.weeklyCareTimesTypeOptions)}}function Cl(te,M){if(1&te&&(e.TgZ(0,"div"),e.YNc(1,um,2,2,"ng-container",15),e.qZA()),2&te){const C=e.oxw();e.xp6(1),e.Q6J("ngForOf",C.historyWeeklyCareTimeOptions)("ngForTrackBy",C.trackByFn)}}function Sa(te,M){1&te&&(e._uU(0),e.ALo(1,"translate")),2&te&&e.hij(" ",e.lcZ(1,1,"Message.NoDataFound")," ")}class pd extends l.SiviAbstractForm{constructor(M,C,Q,Ye,Zt,Pi,Ir,xo){super(),this.translate=M,this.route=C,this.codeService=Q,this.ececWeeklyCareTimeOptionsService=Ye,this.unsavedChanges=Zt,this.modalCtrl=Pi,this.siviProjectsGatewayService=Ir,this.notify=xo,this.dateFormat=l.DateFormats.FINNISH_MOMENT,this.weeklyCareTimeOptions=[],this.activeWeeklyCareTimeOptions=[],this.futureWeeklyCareTimeOptions=[],this.historyWeeklyCareTimeOptions=[],this.canSave=!1,this.showNewElementButton=!0,this.saving=!1,this.fromDates=[],this.oldFromDates=[],this.readonly=!this.siviProjectsGatewayService.getAuthService().hasAnyRole([l.Roles.MUNICIPALITY_ADMIN]),this.municipalityId=this.route.snapshot.paramMap.get("municipalityId")}ngOnInit(){this.municipalityId&&this.getData(this.municipalityId)}get hasChanges(){const M=[...this.activeWeeklyCareTimeOptions,...this.futureWeeklyCareTimeOptions,...this.historyWeeklyCareTimeOptions],C=l.Utils.removeEmptyValues((0,ve.Z)(this.originalEntities)),Q=l.Utils.removeEmptyValues((0,ve.Z)(M));return!(0,X.Z)(C,Q)}getData(M){this.contentLoader.showLoader(),(0,Be.D)([this.ececWeeklyCareTimeOptionsService.getWeeklyCareTimeOptionsByMunicipalityId(M),this.codeService.getCodesByName("sivi.municipality.settings.type.weeklycaretime")]).pipe((0,n.q)(1),(0,P.x)(()=>this.finalizeInitialization())).subscribe({next:([C,Q])=>{this.weeklyCareTimeOptions=l.Utils.sortArrayByDate(C);const Ye=this.getWeeklyCareTimeOptionOrder(),Zt=l.Utils.sortFirstArrayAsSecondByKey(Q.childCodes,Ye,"name");this.weeklyCareTimesTypeOptions=this.getDropdownOptions(Zt),this.filterWeeklyCareTimeOptions(this.weeklyCareTimeOptions)},error:C=>{console.error("getData failed",C),this.contentLoader.showError()}})}finalizeInitialization(){this.contentLoader.hideLoader(),setTimeout(()=>{this.originalEntities=[...(0,ve.Z)(this.activeWeeklyCareTimeOptions),...(0,ve.Z)(this.futureWeeklyCareTimeOptions),...(0,ve.Z)(this.historyWeeklyCareTimeOptions)]},0)}getWeeklyCareTimeOptionOrder(){return[l.DefaultWeeklyCareTimeOptions.MON_FRI,l.DefaultWeeklyCareTimeOptions.MON_FRI_MORNINGS,l.DefaultWeeklyCareTimeOptions.MON_FRI_EVENINGS,l.DefaultWeeklyCareTimeOptions.MON_FRI_LATE_EVENINGS,l.DefaultWeeklyCareTimeOptions.MON_FRI_FULL_EVENINGS,l.DefaultWeeklyCareTimeOptions.WEEKENDS,l.DefaultWeeklyCareTimeOptions.ROUND_THE_CLOCK]}onSave(){const M=this.getPayload();this.saving=!0,this.saveWeeklyCareTimeOptions(M)}saveWeeklyCareTimeOptions(M){var C=this;return(0,o.Z)(function*(){C.contentLoader.showSavingLoader();const Q={restWeeklyCareTimeList:[...M]};C.ececWeeklyCareTimeOptionsService.saveWeeklyCareTimeOptions(Q).pipe((0,n.q)(1)).subscribe(function(){var Ye=(0,o.Z)(function*(Zt){C.saving=!1,C.contentLoader.showContent(Zt),C.notify.toastSaveSuccess(),C.showNewElementButton=!0,C.weeklyCareTimeOptions=l.Utils.sortArrayByDate(Zt.restWeeklyCareTimeList),C.filterWeeklyCareTimeOptions(C.weeklyCareTimeOptions),C.checkPageValidity()});return function(Zt){return Ye.apply(this,arguments)}}(),Ye=>{C.saving=!1,Ye.error?C.notify.alertBackendError(Ye.error.message):C.notify.alertFormSaveFailed()})})()}handleValueChange(M){const C=M.restEntityState===l.Constants.CURRENT?this.activeWeeklyCareTimeOptions:this.futureWeeklyCareTimeOptions,Q=C.findIndex(Ye=>M.id?M.id===Ye.id:M.tempId===Ye.tempId);C[Q]={...C[Q],...M},this.checkPageValidity()}onClickAdd(){this.activeWeeklyCareTimeOptions.unshift(this.createWeeklyCareTimeOption()),this.showNewElementButton=!1,this.checkPageValidity()}onDeleteWeeklyCareTimeOption(M){var C=this;return(0,o.Z)(function*(){(yield C.notify.deleteConfirmPopup()).onDidDismiss().then(Ye=>{Ye.data&&(C.showNewElementButton=!0,C.activeWeeklyCareTimeOptions=C.activeWeeklyCareTimeOptions.filter(Zt=>Zt.tempId!==M.tempId),C.notify.toastDeleteSuccess(),C.checkPageValidity())})})()}canDeactivate(){return!this.hasChanges}onDismiss(){this.unsavedChanges.canDeactivate(this).pipe((0,n.q)(1)).subscribe(M=>{M&&this.modalCtrl.dismiss(null)})}getPayload(){return this.weeklyCareTimeOptionChildren.toArray().map(Q=>({...Q.weeklyCareTimeOption,restWeeklyCareTimeOptionValue:this.removeEmptyRows(Q.weeklyCareTimeOption.restWeeklyCareTimeOptionValue)}))}getFromDates(){this.oldFromDates=this.fromDates;const M=[],C=this.weeklyCareTimeOptionChildren.toArray();C.forEach(Q=>{if(l.Utils.isISODate(Q.weeklyCareTimeOption.fromDate)){const Ye={id:Q.weeklyCareTimeOption.id||Q.weeklyCareTimeOption.tempId,fromDate:l.Utils.convertDateToFinnishStandard(Q.weeklyCareTimeOption.fromDate)};M.push(Ye)}}),(0,X.Z)(M,this.oldFromDates)||(C.forEach(Q=>{Q.fromDates=M,Q.setFromDateValidator()}),this.fromDates=M)}removeEmptyRows(M){return M.filter(Q=>{if(Q.option||Q.languages[0].name||Q.languages[1].name||Q.languages[2].name||Q.fromTime||Q.untilTime||!1!==Q.turnCare)return Q})}checkPageValidity(){this.getFromDates();const C=this.weeklyCareTimeOptionChildren.toArray().every(Zt=>Zt.form.valid),Ye=this.getPayload().every(Zt=>Zt.restWeeklyCareTimeOptionValue.length>0);this.canSave=C&&Ye&&this.hasChanges}createWeeklyCareTimeOption(){return{municipalityId:this.municipalityId,tempId:l.Utils.createUUID(),restWeeklyCareTimeOptionValue:[],restEntityState:l.Constants.CURRENT}}getDropdownOptions(M){const C=l.Utils.getSelectOptionsFromArray(M,"name","name");return C?C.map(Q=>({...Q,text:this.translate.instant(Q.text)})):[]}filterWeeklyCareTimeOptions(M){this.activeWeeklyCareTimeOptions=M.filter(C=>C.restEntityState===l.Constants.CURRENT),this.futureWeeklyCareTimeOptions=M.filter(C=>C.restEntityState===l.Constants.FUTURE||C.tempId),this.historyWeeklyCareTimeOptions=M.filter(C=>C.restEntityState===l.Constants.EXPIRED),this.originalEntities=[...(0,ve.Z)(this.activeWeeklyCareTimeOptions),...(0,ve.Z)(this.futureWeeklyCareTimeOptions),...(0,ve.Z)(this.historyWeeklyCareTimeOptions)]}}pd.\u0275fac=function(M){return new(M||pd)(e.Y36(T.sK),e.Y36(j.gz),e.Y36(l.CodeService),e.Y36(Vt),e.Y36(l.UnsavedChangesGuard),e.Y36(l.SiviModalController),e.Y36(l.SiviProjectsGatewayService),e.Y36(l.NotifyService))},pd.\u0275cmp=e.Xpm({type:pd,selectors:[["sivi-mun-set-ecec-weekly-care-time-options"]],viewQuery:function(M,C){if(1&M&&(e.Gf(Gp,7),e.Gf(dp,5)),2&M){let Q;e.iGM(Q=e.CRH())&&(C.contentLoader=Q.first),e.iGM(Q=e.CRH())&&(C.weeklyCareTimeOptionChildren=Q)}},features:[e.qOj],decls:33,vars:24,consts:[[3,"closeButton","hideNotifications","closed"],["navbar-title",""],[4,"ngIf"],["navbar-buttons-right",""],[3,"disabled","clicked",4,"ngIf"],[1,"ion-padding"],["skeleton","form",3,"loadingByDefault"],["siviContent",""],[4,"ngIf","ngIfElse"],["noActiveOptions",""],["fill","outline",3,"atrr.aria-label","click",4,"ngIf"],[1,"bg-light"],["noFutureOptions",""],["noHistoryOptions",""],[3,"disabled","clicked"],[4,"ngFor","ngForOf","ngForTrackBy"],[3,"weeklyCareTimeOption","weeklyCareTimesTypeOptions","deleteTable","valueChange"],["fill","outline",3,"atrr.aria-label","click"],["futureLoader",""],[3,"weeklyCareTimeOption","weeklyCareTimesTypeOptions","valueChange"],["skeleton","form",3,"loadingByDefault","secondaryMode"],[3,"weeklyCareTimeOption","weeklyCareTimesTypeOptions"]],template:function(M,C){if(1&M&&(e.TgZ(0,"ion-header")(1,"sivi-lib-navbar",0),e.NdJ("closed",function(){return C.onDismiss()}),e.TgZ(2,"div",1),e._uU(3),e.ALo(4,"translate"),e.YNc(5,td,3,3,"span",2),e.qZA(),e.TgZ(6,"div",3),e.YNc(7,lm,1,1,"sivi-lib-navbar-action-button",4),e.qZA()()(),e.TgZ(8,"ion-content",5)(9,"sivi-lib-content-loader",6,7)(11,"div")(12,"h2"),e._uU(13),e.ALo(14,"translate"),e.qZA(),e.YNc(15,Mf,2,2,"div",8),e.YNc(16,pp,2,3,"ng-template",null,9,e.W1O),e.YNc(18,b_,4,6,"ion-button",10),e.qZA(),e.TgZ(19,"div",11)(20,"h2"),e._uU(21),e.ALo(22,"translate"),e.qZA(),e.YNc(23,Jd,4,2,"div",8),e.YNc(24,cm,2,3,"ng-template",null,12,e.W1O),e.qZA(),e.TgZ(26,"div")(27,"h2"),e._uU(28),e.ALo(29,"translate"),e.qZA(),e.YNc(30,Cl,2,2,"div",8),e.YNc(31,Sa,2,3,"ng-template",null,13,e.W1O),e.qZA()()()),2&M){const Q=e.MAs(17),Ye=e.MAs(25),Zt=e.MAs(32);e.xp6(1),e.Q6J("closeButton",!0)("hideNotifications",!0),e.xp6(2),e.hij(" ",e.lcZ(4,16,"ECEC.WeeklyTimeOptions.Title")," "),e.xp6(2),e.Q6J("ngIf",C.municipalityId),e.xp6(2),e.Q6J("ngIf",!C.readonly),e.xp6(2),e.Q6J("loadingByDefault",!0),e.xp6(4),e.Oqu(e.lcZ(14,18,"General.Text.Active")),e.xp6(2),e.Q6J("ngIf",C.activeWeeklyCareTimeOptions.length>0)("ngIfElse",Q),e.xp6(3),e.Q6J("ngIf",C.showNewElementButton&&!C.readonly),e.xp6(3),e.Oqu(e.lcZ(22,20,"General.Text.Future")),e.xp6(2),e.Q6J("ngIf",C.futureWeeklyCareTimeOptions.length>0)("ngIfElse",Ye),e.xp6(5),e.Oqu(e.lcZ(29,22,"General.Text.History")),e.xp6(2),e.Q6J("ngIf",C.historyWeeklyCareTimeOptions.length>0)("ngIfElse",Zt)}},dependencies:[D.sg,D.O5,E.YG,E.W2,E.Gu,l.ContentLoaderComponent,l.NavbarComponent,l.NavbarActionButtonComponent,dp,D.Ov,T.X$],styles:[".bg-light[_ngcontent-%COMP%]{background-color:var(--ion-color-light);margin:16px -24px;padding:24px}"]});class Sm{}Sm.\u0275fac=function(M){return new(M||Sm)},Sm.\u0275mod=e.oAB({type:Sm}),Sm.\u0275inj=e.cJS({providers:[Vt,l.SiviModalController],imports:[Gi,l.NavbarComponentModule,l.DatepickerModule,st.p0,l.SelectComponentModule,l.SiviFormsModule]});class zm extends l.AbstractRestService{constructor(M,C){super(M,C),this.http=M,this.siviProjectsGateway=C}getExpenseReimbursementsList(){return this.get("./api/vesa-attendance/reimbursement-settings")}getExpenseReimbursement(M){const C=`./api/vesa-attendance/reimbursement-settings/${M}`;return this.get(C)}saveExpenseReimbursement(M){return this.put(M,"./api/vesa-attendance/reimbursement-settings")}deleteExpenseReimbursement(M){const C=`./api/vesa-attendance/reimbursement-settings/${M}`;return this.delete(C)}}function vh(te,M){if(1&te){const C=e.EpF();e.TgZ(0,"ion-button",6),e.NdJ("click",function(){e.CHM(C);const Ye=e.oxw();return e.KtG(Ye.addNewMealRow())}),e._uU(1),e.ALo(2,"translate"),e.qZA()}2&te&&(e.xp6(1),e.hij(" ",e.lcZ(2,1,"General.Buttons.Add.Row")," "))}function $g(te,M){1&te&&(e.TgZ(0,"th",23)(1,"span",24),e._uU(2),e.ALo(3,"translate"),e.qZA()()),2&te&&(e.xp6(2),e.hij(" ",e.lcZ(3,1,"Page.MunicipalitySettings.ExpenseReimbursements.MealExpense.Table.Header.MealFI"),""))}function C_(te,M){if(1&te&&(e.TgZ(0,"td",25),e.ynx(1,26)(2,27),e._UZ(3,"cgi-input",28),e.ALo(4,"translate"),e.BQk()(),e.qZA()),2&te){const C=M.index,Q=e.oxw(2);e.Q6J("formGroupName",C),e.xp6(2),e.Q6J("formGroupName",0),e.xp6(1),e.Q6J("viewMode",Q.readonly)("showRequiredIndicator",!1),e.uIk("aria-label",e.lcZ(4,5,"Page.MunicipalitySettings.ExpenseReimbursements.MealExpense.Table.Header.MealFI"))}}function yr(te,M){1&te&&(e.TgZ(0,"th",23)(1,"span",24),e._uU(2),e.ALo(3,"translate"),e.qZA()()),2&te&&(e.xp6(2),e.hij(" ",e.lcZ(3,1,"Page.MunicipalitySettings.ExpenseReimbursements.MealExpense.Table.Header.MealSV"),""))}function Eb(te,M){if(1&te&&(e.TgZ(0,"td",25),e.ynx(1,26)(2,27),e._UZ(3,"cgi-input",28),e.ALo(4,"translate"),e.BQk()(),e.qZA()),2&te){const C=M.index,Q=e.oxw(2);e.Q6J("formGroupName",C),e.xp6(2),e.Q6J("formGroupName",1),e.xp6(1),e.Q6J("viewMode",Q.readonly)("showRequiredIndicator",!1),e.uIk("aria-label",e.lcZ(4,5,"Page.MunicipalitySettings.ExpenseReimbursements.MealExpense.Table.Header.MealSV"))}}function Q_(te,M){1&te&&(e.TgZ(0,"th",23)(1,"span",24),e._uU(2),e.ALo(3,"translate"),e.qZA()()),2&te&&(e.xp6(2),e.hij(" ",e.lcZ(3,1,"Page.MunicipalitySettings.ExpenseReimbursements.MealExpense.Table.Header.MealEN"),""))}function xd(te,M){if(1&te&&(e.TgZ(0,"td",25),e.ynx(1,26)(2,27),e._UZ(3,"cgi-input",28),e.ALo(4,"translate"),e.BQk()(),e.qZA()),2&te){const C=M.index,Q=e.oxw(2);e.Q6J("formGroupName",C),e.xp6(2),e.Q6J("formGroupName",2),e.xp6(1),e.Q6J("viewMode",Q.readonly)("showRequiredIndicator",!1),e.uIk("aria-label",e.lcZ(4,5,"Page.MunicipalitySettings.ExpenseReimbursements.MealExpense.Table.Header.MealEN"))}}function q_(te,M){1&te&&(e.TgZ(0,"th",23)(1,"span",24),e._uU(2),e.ALo(3,"translate"),e.qZA()()),2&te&&(e.xp6(2),e.hij(" ",e.lcZ(3,1,"Page.MunicipalitySettings.ExpenseReimbursements.MealExpense.Table.Header.FromTime"),""))}function $f(te,M){if(1&te){const C=e.EpF();e.TgZ(0,"td",25)(1,"sivi-lib-timepicker",29),e.NdJ("valueChange",function(){const Zt=e.CHM(C).index,Pi=e.oxw(2);return e.KtG(Pi.updateMealsFormControlValidity(Zt,"untilTime"))}),e.qZA()()}if(2&te){const C=M.index,Q=e.oxw(2);e.Q6J("formGroupName",C),e.xp6(1),e.Q6J("readonly",Q.readonly)("showRequiredIndicator",!1)("errorMessages",Q.timeErrorMessages)}}function jf(te,M){1&te&&(e.TgZ(0,"th",23)(1,"span",24),e._uU(2),e.ALo(3,"translate"),e.qZA()()),2&te&&(e.xp6(2),e.hij(" ",e.lcZ(3,1,"Page.MunicipalitySettings.ExpenseReimbursements.MealExpense.Table.Header.UntilTime"),""))}function rf(te,M){if(1&te){const C=e.EpF();e.TgZ(0,"td",25)(1,"sivi-lib-timepicker",30),e.NdJ("valueChange",function(){const Zt=e.CHM(C).index,Pi=e.oxw(2);return e.KtG(Pi.updateMealsFormControlValidity(Zt,"fromTime"))}),e.qZA()()}if(2&te){const C=M.index,Q=e.oxw(2);e.Q6J("formGroupName",C),e.xp6(1),e.Q6J("readonly",Q.readonly)("showRequiredIndicator",!1)("errorMessages",Q.timeErrorMessages)}}function E_(te,M){1&te&&(e.TgZ(0,"th",23)(1,"span",24),e._uU(2),e.ALo(3,"translate"),e.qZA()()),2&te&&(e.xp6(2),e.hij(" ",e.lcZ(3,1,"Page.MunicipalitySettings.ExpenseReimbursements.MealExpense.Table.Header.PayType"),""))}function nu(te,M){if(1&te&&(e.TgZ(0,"td",25),e._UZ(1,"cgi-input",31),e.ALo(2,"translate"),e.qZA()),2&te){const C=M.index,Q=e.oxw(2);e.Q6J("formGroupName",C),e.xp6(1),e.Q6J("viewMode",Q.readonly)("showRequiredIndicator",!1)("errorMessages",Q.payTypeErrorMessages),e.uIk("aria-label",e.lcZ(2,5,"Page.MunicipalitySettings.ExpenseReimbursements.MealExpense.Table.Header.PayType"))}}function Va(te,M){1&te&&(e.TgZ(0,"th",23)(1,"span",24),e._uU(2),e.ALo(3,"translate"),e.qZA()()),2&te&&(e.xp6(2),e.hij(" ",e.lcZ(3,1,"Page.MunicipalitySettings.ExpenseReimbursements.MealExpense.Table.Header.UnitPrice")," "))}function mp(te,M){if(1&te&&(e.TgZ(0,"td",25),e._UZ(1,"sivi-lib-currency-input",32),e.qZA()),2&te){const C=M.index,Q=e.oxw(2);e.Q6J("formGroupName",C),e.xp6(1),e.Q6J("readonly",Q.readonly)("showRequiredIndicator",!1)}}function M_(te,M){1&te&&e._UZ(0,"th",23)}function Wp(te,M){if(1&te){const C=e.EpF();e.TgZ(0,"ion-button",35),e.NdJ("click",function(){e.CHM(C);const Ye=e.oxw().index,Zt=e.oxw(2);return e.KtG(Zt.deleteMeal(Ye))}),e._UZ(1,"cgi-icon",36),e.qZA()}}function X_(te,M){if(1&te&&(e.TgZ(0,"td",33),e.YNc(1,Wp,2,0,"ion-button",34),e.qZA()),2&te){const C=e.oxw(2);e.xp6(1),e.Q6J("ngIf",!C.readonly&&(null==C.mealsFormArray||null==C.mealsFormArray.value?null:C.mealsFormArray.value.length)>1)}}function fp(te,M){1&te&&e._UZ(0,"th",23)}zm.\u0275fac=function(M){return new(M||zm)(e.LFG(g.eN),e.LFG(l.SiviProjectsGatewayService))},zm.\u0275prov=e.Yz7({token:zm,factory:zm.\u0275fac});const Bh=function(te){return{"hide-icon":te}};function Uh(te,M){if(1&te){const C=e.EpF();e.TgZ(0,"ion-button",39),e.NdJ("click",function(){e.CHM(C);const Ye=e.oxw().index,Zt=e.oxw(2);return e.KtG(Zt.moveDown(Ye))}),e._UZ(1,"cgi-icon",40),e.qZA()}if(2&te){const C=e.oxw().index,Q=e.oxw(2);e.Q6J("ngClass",e.VKq(2,Bh,C===(null==Q.mealsFormArray||null==Q.mealsFormArray.value?null:Q.mealsFormArray.value.length)-1))("disabled",C===(null==Q.mealsFormArray||null==Q.mealsFormArray.value?null:Q.mealsFormArray.value.length)-1)}}function ev(te,M){if(1&te){const C=e.EpF();e.TgZ(0,"ion-button",41),e.NdJ("click",function(){e.CHM(C);const Ye=e.oxw().index,Zt=e.oxw(2);return e.KtG(Zt.moveUp(Ye))}),e._UZ(1,"cgi-icon",42),e.qZA()}if(2&te){const C=e.oxw().index;e.Q6J("ngClass",e.VKq(1,Bh,0===C))}}function zh(te,M){if(1&te&&(e.TgZ(0,"td",33),e.YNc(1,Uh,2,4,"ion-button",37),e.YNc(2,ev,2,3,"ion-button",38),e.qZA()),2&te){const C=e.oxw(2);e.xp6(1),e.Q6J("ngIf",!C.readonly),e.xp6(1),e.Q6J("ngIf",!C.readonly)}}function Tf(te,M){1&te&&e._UZ(0,"tr",43)}function xf(te,M){1&te&&e._UZ(0,"tr",44)}function Ud(te,M){if(1&te&&(e.TgZ(0,"ion-row",7)(1,"table",8),e.ynx(2,9),e.YNc(3,$g,4,3,"th",10),e.YNc(4,C_,5,7,"td",11),e.BQk(),e.ynx(5,12),e.YNc(6,yr,4,3,"th",10),e.YNc(7,Eb,5,7,"td",11),e.BQk(),e.ynx(8,13),e.YNc(9,Q_,4,3,"th",10),e.YNc(10,xd,5,7,"td",11),e.BQk(),e.ynx(11,14),e.YNc(12,q_,4,3,"th",10),e.YNc(13,$f,2,4,"td",11),e.BQk(),e.ynx(14,15),e.YNc(15,jf,4,3,"th",10),e.YNc(16,rf,2,4,"td",11),e.BQk(),e.ynx(17,16),e.YNc(18,E_,4,3,"th",10),e.YNc(19,nu,3,7,"td",11),e.BQk(),e.ynx(20,17),e.YNc(21,Va,4,3,"th",10),e.YNc(22,mp,2,3,"td",11),e.BQk(),e.ynx(23,18),e.YNc(24,M_,1,0,"th",10),e.YNc(25,X_,2,1,"td",19),e.BQk(),e.ynx(26,20),e.YNc(27,fp,1,0,"th",10),e.YNc(28,zh,3,2,"td",19),e.BQk(),e.YNc(29,Tf,1,0,"tr",21),e.YNc(30,xf,1,0,"tr",22),e.qZA()()),2&te){const C=e.oxw();e.Q6J("formGroup",C.form),e.xp6(1),e.Q6J("dataSource",null==C.mealsFormArray?null:C.mealsFormArray.value)("trackBy",C.trackFn),e.xp6(28),e.Q6J("matHeaderRowDef",C.displayedColumns),e.xp6(1),e.Q6J("matRowDefColumns",C.displayedColumns)}}class Rp extends l.SiviAbstractForm{set reimbursementMealSettings(M){(0,X.Z)(M,this.form.value.reimbursementMealSettings)||(this.originalReimbursementMealSettings=(0,ve.Z)(M),this.mealsFormArray?.clear(),this.originalReimbursementMealSettings.forEach(C=>this.addExistingMealRow(C)))}get mealsFormArray(){return this.form.get("reimbursementMealSettings")}constructor(M,C,Q){super(),this.fb=M,this.notify=C,this.translate=Q,this.readonly=!0,this.tableChange=new e.vpe,this.displayedColumns=["mealFI","mealSV","mealEN","fromTime","untilTime","payType","unitPrice","delete","move"],this.form=this.fb.group({reimbursementMealSettings:this.fb.array([])}),this.mealLanguageValidators=[l.SiviValidators.required,l.SiviValidators.maxLength(100)],this.fromTimeValidators=[l.SiviValidators.required,l.SiviValidators.validateTimeAsMinutesNumber(),l.SiviValidators.validateTimeAsMinutesNumberIsNotAfter("untilTime")],this.untilTimeValidators=[l.SiviValidators.required,l.SiviValidators.validateTimeAsMinutesNumber(),l.SiviValidators.validateTimeAsMinutesNumberIsNotBefore("fromTime")],this.payTypeValidators=[l.SiviValidators.required,l.SiviValidators.maxLength(20)],this.unitPriceValidators=[l.SiviValidators.required],this.payTypeErrorMessages={maxlength:this.translate.instant("Form.Error.MaxLengthIsChactersCount",{count:20})},this.timeErrorMessages={timeIsAfter:this.translate.instant("Form.Error.ShouldBeBeforeUntilTime"),timeIsBefore:this.translate.instant("Form.Error.ShouldBeAfterFromTime"),notValidTime:this.translate.instant("Form.Error.NotValidTime"),overlappingTimeRanges:this.translate.instant("Form.Error.OverlappingTimeRanges")}}ngOnInit(){this.readonly||this.form.setValidators(function J_(te,M="fromTime",C="untilTime"){return Q=>{const Zt=Q.get(te)?.controls;return Zt&&(function uc(te,M,C){te.forEach(Q=>{const Ye=Q.get(M),Zt=Q.get(C);Ye?.hasError("overlappingTimeRanges")&&(Ye.setErrors({...Ye.errors,overlappingTimeRanges:null}),Ye.updateValueAndValidity({onlySelf:!0,emitEvent:!1})),Zt?.hasError("overlappingTimeRanges")&&(Zt.setErrors({...Zt.errors,overlappingTimeRanges:null}),Zt.updateValueAndValidity({onlySelf:!0,emitEvent:!1}))})}(Zt,M,C),Zt.forEach(Pi=>{const Ir=Pi.get(M),xo=Pi.get(C),Qa=Ir?.value,ec=xo?.value;Zt.forEach(Sh=>{if(Pi===Sh)return;const qg=Sh.get(M),ao=Sh.get(C),Ay=qg?.value,Wc=ao?.value;return Qa&&ec&&Ay&&Wc&&(Qa>=Ay&&Qa<=Wc||ec>=Ay&&ec<=Wc||Qa<=Ay&&ec>=Wc)?(Ir?.setErrors({overlappingTimeRanges:!0}),xo?.setErrors({overlappingTimeRanges:!0}),qg?.setErrors({overlappingTimeRanges:!0}),ao?.setErrors({overlappingTimeRanges:!0}),{overlappingTimeRanges:!0}):void 0})})),null}}("reimbursementMealSettings"))}trackFn(M,C){return C.id||C.tempId}onFormValueChange(M){this.tableChange.emit(M.reimbursementMealSettings)}addExistingMealRow(M){const C=M.mealNameLocalizations.map(Ye=>this.fb.group({id:[Ye.id],language:[Ye.language],name:[Ye.name,this.readonly?[]:this.mealLanguageValidators]})),Q=this.fb.group({...M,mealNameLocalizations:this.fb.array(C),fromTime:[M.fromTime,this.readonly?[]:this.fromTimeValidators],untilTime:[M.untilTime,this.readonly?[]:this.untilTimeValidators],payType:[M.payType,this.readonly?[]:this.payTypeValidators],unitPrice:[M.unitPrice,this.readonly?[]:this.unitPriceValidators]});this.mealsFormArray.push(Q)}addNewMealRow(){const M=["fi","sv","en"].map(Q=>this.fb.group({language:[Q],name:["",this.mealLanguageValidators]})),C=this.fb.group({mealNameLocalizations:this.fb.array(M),fromTime:[null,this.fromTimeValidators],untilTime:[null,this.untilTimeValidators],payType:[null,this.payTypeValidators],unitPrice:[null,this.unitPriceValidators],tempId:[l.Utils.createUUID()]});this.mealsFormArray.push(C)}updateMealsFormControlValidity(M,C){this.mealsFormArray.get([M,C]).updateValueAndValidity()}deleteMeal(M){var C=this;return(0,o.Z)(function*(){(yield(yield C.notify.createConfirmationPopUp("Page.MunicipalitySettings.ExpenseReimbursements.MealExpense.Table.DeleteConfirmation.Title","Page.MunicipalitySettings.ExpenseReimbursements.MealExpense.Table.DeleteConfirmation.Message","General.Buttons.DiscardChanges")).onDidDismiss())?.data&&C.mealsFormArray.removeAt(M)})()}moveUp(M){if(M<1)return;const C=this.mealsFormArray.at(M);this.mealsFormArray.removeAt(M),this.mealsFormArray.insert(M-1,C)}moveDown(M){if(M>this.mealsFormArray.value.length-1)return;const C=this.mealsFormArray.at(M);this.mealsFormArray.removeAt(M),this.mealsFormArray.insert(M+1,C)}}Rp.\u0275fac=function(M){return new(M||Rp)(e.Y36(Ct.qu),e.Y36(l.NotifyService),e.Y36(T.sK))},Rp.\u0275cmp=e.Xpm({type:Rp,selectors:[["sivi-mun-set-expense-reimbursement-meal-table"]],inputs:{readonly:"readonly",reimbursementMealSettings:"reimbursementMealSettings"},outputs:{tableChange:"tableChange"},features:[e.qOj],decls:9,vars:6,consts:[[1,"ion-align-items-center"],[1,"title"],[3,"text"],[1,"ion-text-end"],[3,"click",4,"ngIf"],["class","table-wrapper mat-elevation-z8","siviLibForm","",3,"formGroup",4,"ngIf"],[3,"click"],["siviLibForm","",1,"table-wrapper","mat-elevation-z8",3,"formGroup"],["mat-table","","formArrayName","reimbursementMealSettings",3,"dataSource","trackBy"],["matColumnDef","mealFI"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",3,"formGroupName",4,"matCellDef"],["matColumnDef","mealSV"],["matColumnDef","mealEN"],["matColumnDef","fromTime"],["matColumnDef","untilTime"],["matColumnDef","payType"],["matColumnDef","unitPrice"],["matColumnDef","delete"],["mat-cell","",4,"matCellDef"],["matColumnDef","move",1,"move"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["mat-header-cell",""],[1,"required-column"],["mat-cell","",3,"formGroupName"],["formGroupName","mealNameLocalizations"],[3,"formGroupName"],["formControlName","name","siviLibFormControl","",3,"viewMode","showRequiredIndicator"],["formControlName","fromTime","siviLibFormControl","","label","\xa0",3,"readonly","showRequiredIndicator","errorMessages","valueChange"],["formControlName","untilTime","siviLibFormControl","","label","\xa0",3,"readonly","showRequiredIndicator","errorMessages","valueChange"],["formControlName","payType","siviLibFormControl","",3,"viewMode","showRequiredIndicator","errorMessages"],["formControlName","unitPrice","siviLibFormControl","",3,"readonly","showRequiredIndicator"],["mat-cell",""],["color","primary","fill","none","role","button","size","small","no-min-width","",3,"click",4,"ngIf"],["color","primary","fill","none","role","button","size","small","no-min-width","",3,"click"],["name","delete","ariaLabel","delete"],["color","primary","fill","none","role","button","size","small","no-min-width","",3,"ngClass","disabled","click",4,"ngIf"],["color","primary","fill","none","role","button","size","small","no-min-width","",3,"ngClass","click",4,"ngIf"],["color","primary","fill","none","role","button","size","small","no-min-width","",3,"ngClass","disabled","click"],["name","arrow_downward","ariaLabel","arrow_downward"],["color","primary","fill","none","role","button","size","small","no-min-width","",3,"ngClass","click"],["name","arrow_upward","ariaLabel","arrow_upward"],["mat-header-row",""],["mat-row",""]],template:function(M,C){1&M&&(e.TgZ(0,"ion-row",0)(1,"ion-col")(2,"h2",1),e._uU(3),e.ALo(4,"translate"),e._UZ(5,"sivi-lib-info-popup",2),e.qZA()(),e.TgZ(6,"ion-col",3),e.YNc(7,vh,3,3,"ion-button",4),e.qZA()(),e.YNc(8,Ud,31,5,"ion-row",5)),2&M&&(e.xp6(3),e.hij("",e.lcZ(4,4,"Page.MunicipalitySettings.ExpenseReimbursements.MealExpense")," "),e.xp6(2),e.Q6J("text","Page.MunicipalitySettings.ExpenseReimbursements.MealExpense.Info"),e.xp6(2),e.Q6J("ngIf",!C.readonly),e.xp6(1),e.Q6J("ngIf",!C.readonly||(null==C.mealsFormArray||null==C.mealsFormArray.value?null:C.mealsFormArray.value.length)>0))},dependencies:[D.mk,D.O5,E.YG,E.wI,E.Nd,l.InfoPopupComponent,st.BZ,st.fO,st.as,st.w1,st.Dz,st.nj,st.ge,st.ev,st.XQ,st.Gk,l.SiviFormDirective,l.SiviFormControlDirective,Ct.JJ,Ct.JL,Ct.sg,Ct.u,Ct.x0,Ct.CE,l.TimepickerComponent,l.CurrencyInputComponent,T.X$],styles:['.table-wrapper[_ngcontent-%COMP%]{overflow:auto;white-space:nowrap}.table-wrapper[_ngcontent-%COMP%]   table[_ngcontent-%COMP%]{width:100%;min-width:1450px}.table-wrapper[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]{vertical-align:bottom}.table-wrapper[_ngcontent-%COMP%]   [mat-cell][_ngcontent-%COMP%]{padding-bottom:8px}.table-wrapper[_ngcontent-%COMP%]   [mat-header-cell][_ngcontent-%COMP%]:not(:first-child):not(.mat-column-delete):not(.mat-column-move), .table-wrapper[_ngcontent-%COMP%]   [mat-cell][_ngcontent-%COMP%]:not(:first-child):not(.mat-column-delete):not(.mat-column-move){padding-left:16px}.table-wrapper[_ngcontent-%COMP%]   [mat-header-cell][_ngcontent-%COMP%]:not(.mat-column-delete):not(.mat-column-move), .table-wrapper[_ngcontent-%COMP%]   [mat-cell][_ngcontent-%COMP%]:not(.mat-column-delete):not(.mat-column-move){padding-right:16px}.table-wrapper[_ngcontent-%COMP%]   [mat-header-cell].mat-column-move[_ngcontent-%COMP%], .table-wrapper[_ngcontent-%COMP%]   [mat-cell].mat-column-move[_ngcontent-%COMP%]{padding-right:0}.table-wrapper[_ngcontent-%COMP%]   .mat-column-fromTime[_ngcontent-%COMP%], .table-wrapper[_ngcontent-%COMP%]   .mat-column-untilTime[_ngcontent-%COMP%]{width:150px}.table-wrapper[_ngcontent-%COMP%]   .mat-column-fromTime[_ngcontent-%COMP%]   cgi-icon[_ngcontent-%COMP%], .table-wrapper[_ngcontent-%COMP%]   .mat-column-untilTime[_ngcontent-%COMP%]   cgi-icon[_ngcontent-%COMP%]{margin-right:16px}.table-wrapper[_ngcontent-%COMP%]   .mat-column-payType[_ngcontent-%COMP%]{width:220px}.table-wrapper[_ngcontent-%COMP%]   .mat-column-unitPrice[_ngcontent-%COMP%]{width:100px}.table-wrapper[_ngcontent-%COMP%]   .mat-column-delete[_ngcontent-%COMP%]{width:51px}.table-wrapper[_ngcontent-%COMP%]   .mat-column-move[_ngcontent-%COMP%]{width:105px}.table-wrapper[_ngcontent-%COMP%]   .hide-icon[_ngcontent-%COMP%]{opacity:0;pointer-events:none}.table-wrapper[_ngcontent-%COMP%]   .align-content[_ngcontent-%COMP%]{display:flex;align-items:center}.table-wrapper[_ngcontent-%COMP%]   .required-column[_ngcontent-%COMP%]:after{color:var(--ion-color-warning);content:"*";margin-left:.3rem}'],changeDetection:0});const Kf=["siviContent"],fg=["reimbursementMealTableComponent"];function jo(te,M){if(1&te){const C=e.EpF();e.TgZ(0,"sivi-lib-navbar-action-button",21),e.NdJ("clicked",function(){e.CHM(C);const Ye=e.oxw();return e.KtG(Ye.saveExpenseReimbursement())}),e.qZA()}if(2&te){const C=e.oxw();e.Q6J("disabled",C.contentLoader.shouldShowLoader())}}function Ou(te,M){if(1&te){const C=e.EpF();e.TgZ(0,"ion-button",22),e.NdJ("click",function(){e.CHM(C);const Ye=e.oxw();return e.KtG(Ye.deleteExpenseReimbursement())}),e.ALo(1,"translate"),e._UZ(2,"cgi-icon",23),e.qZA()}if(2&te){const C=e.oxw();e.Q6J("disabled",C.contentLoader.shouldShowLoader()),e.uIk("aria-label",e.lcZ(1,2,"General.Buttons.Delete"))}}function Ja(te,M){if(1&te&&(e.TgZ(0,"ion-col",14),e._UZ(1,"sivi-lib-datepicker",24),e.ALo(2,"translate"),e.qZA()),2&te){const C=e.oxw();e.xp6(1),e.Q6J("minDate",null==C.expenseReimbursement?null:C.expenseReimbursement.validFrom)("readonly",!0)("label",e.lcZ(2,3,"Form.Label.Until"))}}class $p extends l.SiviPage{get unitPricePartDayValue(){return this.form.get("unitPricePartDay").value?.toString().replace(".",",")}get unitPriceFullDayValue(){return this.form.get("unitPriceFullDay").value?.toString().replace(".",",")}set expenseReimbursement(M){this._expenseReimbursement=M,this.form.patchValue(this.expenseReimbursement)}get expenseReimbursement(){return this._expenseReimbursement}get shouldShowDeleteButton$(){return this.readonly$.pipe((0,Y.U)(M=>!M&&this.id!==l.Constants.NEW_ID))}constructor(M,C,Q,Ye,Zt,Pi,Ir,xo,Qa){super(C,Q,Ye),this.siviProjectsGatewayService=M,this.notify=C,this.translate=Q,this.router=Ye,this.modalCtrl=Zt,this.fb=Pi,this.expenseReimbursementsService=Ir,this.unsavedChanges=xo,this.cdr=Qa,this.readonly$=new ke.X(!1),this.form=this.fb.group({validFrom:[""],validUntil:[null],payTypePartDay:[""],unitPricePartDay:[null],payTypeFullDay:[""],unitPriceFullDay:[null],exactly5hoursIncludedPartDay:[!0],reimbursementMealSettings:[[this.getEmptyTableRow()]]}),this.payTypeMaxLength=20,this.exactly5HoursIncludedInPartDayOptions=[{value:!0,text:"Form.Label.Exactly5HoursInPartDay"},{value:!1,text:"Form.Label.Exactly5HoursInFullDay"}],this.validFromErrorMsg={invalidDate:this.translate.instant("Form.Error.DateShouldBeInFuture"),notUniqValidFrom:this.translate.instant("Page.MunicipalitySettings.Error.NotUniqValidFromDate")},this.unitPriceErrorMsg={notPositiveNumber:this.translate.instant("Form.Error.OnlyPositiveNumbers")},this.payTypeErrorMsg={maxlength:this.translate.instant("Form.Error.MaxLengthIsChactersCount",{count:this.payTypeMaxLength})},this.municipalityName$=this.getMunicipalityName(),this.tomorrowDate=rn().add(1,"day").format(l.DateFormats.STANDARD),this.dateLaterThanTodayValidator=l.SiviValidators.validateDateLaterThanToday(),this.payTypeMaxLengthValidator=l.SiviValidators.maxLength(this.payTypeMaxLength),this.positiveNumberValidator=this.positiveNumberOnlyValidator(),this.readonlyStates=[l.Constants.CURRENT,l.Constants.EXPIRED],this.savedExpenseReimbursement=this.form.value}ngOnInit(){this.getExpenseReimbursement(),this.handleSetValidators()}onFormValueChange(M){this._expenseReimbursement={...this.expenseReimbursement,...M}}onTableChange(M){this.form.get("reimbursementMealSettings").patchValue(M)}onUnitPriceChange(M,C){const Q=M.detail.value?.replace(",",".")||null,Ye=(0,ye.Z)(Q)?NaN:Number(Q);this.form.get(C).patchValue(isNaN(Ye)?Q:Ye)}getMunicipalityName(){return this.siviProjectsGatewayService.getAppStateService().getMunicipality().pipe((0,Y.U)(M=>M?.name))}onDismiss(){this.unsavedChanges.canDeactivate(this).pipe((0,ae.h)(Boolean)).subscribe(()=>this.modalCtrl.dismiss())}getExpenseReimbursement(){this.id!==l.Constants.NEW_ID&&(this.contentLoader.showLoader(),this.expenseReimbursementsService.getExpenseReimbursement(this.id).pipe((0,P.x)(()=>this.contentLoader.hideLoader())).subscribe({next:M=>{this.expenseReimbursement={...M,reimbursementMealSettings:this.getSortedLocalizations(M.reimbursementMealSettings)},this.savedExpenseReimbursement=M;const C=this.readonlyStates.includes(this.expenseReimbursement?.state);this.readonly$.next(C)},error:M=>this.notify.alertBackendError(M)}))}saveExpenseReimbursement(){this.form.valid&&this.reimbursementMealTableComponent?.isValid?(this.contentLoader.showLoader(),this.expenseReimbursementsService.saveExpenseReimbursement(this.expenseReimbursement).pipe((0,P.x)(()=>this.contentLoader.hideLoader())).subscribe({next:M=>{this.id=M.id,this.expenseReimbursement={...this.expenseReimbursement,...M,reimbursementMealSettings:this.getSortedLocalizations(M.reimbursementMealSettings)},this.savedExpenseReimbursement=this.expenseReimbursement,this.notify.toastSaveSuccess()},error:M=>{this.notify.alertBackendErrorWithCode(M,"Message.Save.Error")}})):this.goToInvalid$.next()}getSortedLocalizations(M){const C=["fi","sv","en"];return M.map(Q=>({...Q,mealNameLocalizations:Q.mealNameLocalizations.sort((Ye,Zt)=>C.indexOf(Ye.language)-C.indexOf(Zt.language))}))}deleteExpenseReimbursement(){var M=this;return(0,o.Z)(function*(){try{(yield M.notify.getDeleteConfirmation("Message.Delete.Settings.Message"))&&(M.contentLoader.showLoader(),yield(0,wt.z)(M.expenseReimbursementsService.deleteExpenseReimbursement(M.id)),yield M.modalCtrl.dismiss())}catch(C){M.notify.alertBackendError(C)}finally{M.contentLoader.hideLoader()}})()}setValidators(M,C){const Q=M?[]:[l.SiviValidators.required,this.dateLaterThanTodayValidator,l.SiviValidators.uniqueValidFromValidator(C)],Ye=M?[]:[l.SiviValidators.required,this.payTypeMaxLengthValidator],Zt=M?[]:[l.SiviValidators.required,this.positiveNumberValidator];this.form.get("validFrom").setValidators(Q),this.form.get("payTypePartDay").setValidators(Ye),this.form.get("payTypeFullDay").setValidators(Ye),this.form.get("unitPricePartDay").setValidators(Zt),this.form.get("unitPriceFullDay").setValidators(Zt)}canDeactivate(){return(0,X.Z)(this.expenseReimbursement,this.savedExpenseReimbursement)}decimalOnlyValidation(M){const C=l.Patterns.CURRENCY_STRING,Q=M.target.value,Ye=M.key,Zt=Q+Ye,Ir=document.getSelection().toString()===Q&&C.test(Ye);!C.test(Zt)&&!Ir&&M.preventDefault()}positiveNumberOnlyValidator(){return M=>{const C=M.value?.toString().replace(",","."),Q=Number(C);return C&&(isNaN(Q)||Q<=0)?{notPositiveNumber:!0}:null}}handleSetValidators(){(0,nt.a)([this.readonly$,this.futureExpenseReimbursements$]).pipe((0,w.R)(this.destroy$)).subscribe(([M,C])=>{const Q=C.filter(Ye=>Ye.id!==this.id).map(Ye=>Ye.validFrom);this.setValidators(M,Q)})}getEmptyTableRow(){return{tempId:l.Utils.createUUID(),payType:null,unitPrice:null,fromTime:null,untilTime:null,mealNameLocalizations:[{id:null,language:"fi",name:""},{id:null,language:"sv",name:""},{id:null,language:"en",name:""}]}}}$p.\u0275fac=function(M){return new(M||$p)(e.Y36(l.SiviProjectsGatewayService),e.Y36(l.NotifyService),e.Y36(T.sK),e.Y36(j.F0),e.Y36(l.SiviModalController),e.Y36(Ct.qu),e.Y36(zm),e.Y36(l.UnsavedChangesGuard),e.Y36(e.sBO))},$p.\u0275cmp=e.Xpm({type:$p,selectors:[["sivi-mun-set-expense-reimbursement"]],viewQuery:function(M,C){if(1&M&&(e.Gf(Kf,7),e.Gf(fg,5)),2&M){let Q;e.iGM(Q=e.CRH())&&(C.contentLoader=Q.first),e.iGM(Q=e.CRH())&&(C.reimbursementMealTableComponent=Q.first)}},inputs:{id:"id",futureExpenseReimbursements$:"futureExpenseReimbursements$"},features:[e.qOj],decls:64,vars:82,consts:[[3,"hideNotifications","closeButton","closed"],["navbar-title",""],["navbar-buttons-right",""],[3,"disabled","clicked",4,"ngIf"],["siviLibForm","",1,"ion-padding",3,"formGroup","siviGoToInvalid"],[3,"skeleton"],["siviContent",""],[1,"title"],[3,"text"],["no-min-width","","color","primary","class","delete-button","icon-only","","fill","clear",3,"disabled","click",4,"ngIf"],["siviGridCol","left"],["formControlName","validFrom","siviLibFormControl","",3,"errorMessages","readonly","minDate","label"],["siviGridCol","right",4,"ngIf"],["formControlName","payTypePartDay","siviLibFormControl","","label-position","floating",3,"viewMode","errorMessages","label"],["siviGridCol","right"],["formControlName","unitPricePartDay","siviLibFormControl","","label-position","floating",3,"viewMode","label","errorMessages","listenEvents","value","siviChange","keypress"],["formControlName","payTypeFullDay","siviLibFormControl","","label-position","floating",3,"errorMessages","viewMode","label"],["formControlName","unitPriceFullDay","siviLibFormControl","","label-position","floating",3,"viewMode","label","errorMessages","listenEvents","value","siviChange","keypress"],["formControlName","exactly5hoursIncludedPartDay","siviLibFormControl","","label","",3,"disabled","options"],[1,"meal-table",3,"readonly","reimbursementMealSettings","tableChange"],["reimbursementMealTableComponent",""],[3,"disabled","clicked"],["no-min-width","","color","primary","icon-only","","fill","clear",1,"delete-button",3,"disabled","click"],["name","delete"],["formControlName","validUntil","siviLibFormControl","",3,"minDate","readonly","label"]],template:function(M,C){1&M&&(e.TgZ(0,"ion-header")(1,"sivi-lib-navbar",0),e.NdJ("closed",function(){return C.onDismiss()}),e.TgZ(2,"div",1),e._uU(3),e.ALo(4,"translate"),e.TgZ(5,"span"),e._uU(6),e.ALo(7,"async"),e.qZA()(),e.TgZ(8,"div",2),e.YNc(9,jo,1,1,"sivi-lib-navbar-action-button",3),e.ALo(10,"async"),e.qZA()()(),e.TgZ(11,"ion-content",4)(12,"sivi-lib-content-loader",5,6)(14,"h2",7),e._uU(15),e.ALo(16,"translate"),e._UZ(17,"sivi-lib-info-popup",8),e.YNc(18,Ou,3,4,"ion-button",9),e.ALo(19,"async"),e.qZA(),e.TgZ(20,"ion-row")(21,"ion-col",10),e._UZ(22,"sivi-lib-datepicker",11),e.ALo(23,"async"),e.ALo(24,"translate"),e.qZA(),e.YNc(25,Ja,3,5,"ion-col",12),e.ALo(26,"async"),e.qZA(),e.TgZ(27,"h2",7),e._uU(28),e.ALo(29,"translate"),e._UZ(30,"sivi-lib-info-popup",8),e.qZA(),e.TgZ(31,"h3"),e._uU(32),e.ALo(33,"translate"),e.qZA(),e.TgZ(34,"ion-row")(35,"ion-col",10),e._UZ(36,"cgi-input",13),e.ALo(37,"async"),e.ALo(38,"translate"),e.qZA(),e.TgZ(39,"ion-col",14)(40,"cgi-input",15),e.NdJ("siviChange",function(Ye){return C.onUnitPriceChange(Ye,"unitPricePartDay")})("keypress",function(Ye){return C.decimalOnlyValidation(Ye)}),e.ALo(41,"async"),e.ALo(42,"translate"),e.qZA()()(),e.TgZ(43,"h3"),e._uU(44),e.ALo(45,"translate"),e.qZA(),e.TgZ(46,"ion-row")(47,"ion-col",10),e._UZ(48,"cgi-input",16),e.ALo(49,"async"),e.ALo(50,"translate"),e.qZA(),e.TgZ(51,"ion-col",14)(52,"cgi-input",17),e.NdJ("siviChange",function(Ye){return C.onUnitPriceChange(Ye,"unitPriceFullDay")})("keypress",function(Ye){return C.decimalOnlyValidation(Ye)}),e.ALo(53,"async"),e.ALo(54,"translate"),e.qZA()()(),e.TgZ(55,"ion-row")(56,"ion-col"),e._UZ(57,"sivi-lib-radio-list",18),e.ALo(58,"async"),e.qZA()(),e.TgZ(59,"ion-row")(60,"ion-col")(61,"sivi-mun-set-expense-reimbursement-meal-table",19,20),e.NdJ("tableChange",function(Ye){return C.onTableChange(Ye)}),e.ALo(63,"async"),e.qZA()()()()()),2&M&&(e.xp6(1),e.Q6J("hideNotifications",!0)("closeButton",!0),e.xp6(2),e.hij(" ",e.lcZ(4,40,"Page.MunicipalitySettings.ExpenseReimbursements.Title")," "),e.xp6(3),e.hij("(",e.lcZ(7,42,C.municipalityName$),")"),e.xp6(3),e.Q6J("ngIf",!1===e.lcZ(10,44,C.readonly$)),e.xp6(2),e.Q6J("formGroup",C.form)("siviGoToInvalid",C.goToInvalid$),e.xp6(1),e.Q6J("skeleton","form"),e.xp6(3),e.hij("",e.lcZ(16,46,"Page.MunicipalitySettings.ExpenseReimbursements.Title")," "),e.xp6(2),e.Q6J("text","Page.MunicipalitySettings.ExpenseReimbursements.Title.Info"),e.xp6(1),e.Q6J("ngIf",e.lcZ(19,48,C.shouldShowDeleteButton$)),e.xp6(4),e.Q6J("errorMessages",C.validFromErrorMsg)("readonly",e.lcZ(23,50,C.readonly$))("minDate",C.tomorrowDate)("label",e.lcZ(24,52,"Form.Label.From")),e.xp6(3),e.Q6J("ngIf",(null==C.expenseReimbursement?null:C.expenseReimbursement.validUntil)&&e.lcZ(26,54,C.readonly$)),e.xp6(3),e.hij("",e.lcZ(29,56,"Page.MunicipalitySettings.ExpenseReimbursements.OtherExpense.Title")," "),e.xp6(2),e.Q6J("text","Page.MunicipalitySettings.ExpenseReimbursements.OtherExpense.Title.Info"),e.xp6(2),e.Oqu(e.lcZ(33,58,"Page.MunicipalitySettings.ExpenseReimbursements.PartDay.Title")),e.xp6(4),e.Q6J("viewMode",e.lcZ(37,60,C.readonly$))("errorMessages",C.payTypeErrorMsg)("label",e.lcZ(38,62,"Form.Label.PayType")),e.xp6(4),e.Q6J("viewMode",e.lcZ(41,64,C.readonly$))("label",e.lcZ(42,66,"Form.Label.UnitPrice"))("errorMessages",C.unitPriceErrorMsg)("listenEvents",!1)("value",C.unitPricePartDayValue),e.xp6(4),e.Oqu(e.lcZ(45,68,"Page.MunicipalitySettings.ExpenseReimbursements.FullDay.Title")),e.xp6(4),e.Q6J("errorMessages",C.payTypeErrorMsg)("viewMode",e.lcZ(49,70,C.readonly$))("label",e.lcZ(50,72,"Form.Label.PayType")),e.xp6(4),e.Q6J("viewMode",e.lcZ(53,74,C.readonly$))("label",e.lcZ(54,76,"Form.Label.UnitPrice"))("errorMessages",C.unitPriceErrorMsg)("listenEvents",!1)("value",C.unitPriceFullDayValue),e.xp6(5),e.Q6J("disabled",e.lcZ(58,78,C.readonly$))("options",C.exactly5HoursIncludedInPartDayOptions),e.xp6(4),e.Q6J("readonly",e.lcZ(63,80,C.readonly$))("reimbursementMealSettings",C.form.value.reimbursementMealSettings))},dependencies:[D.O5,E.YG,E.wI,E.W2,E.Gu,E.Nd,l.ContentLoaderComponent,l.GridColDirective,l.GoToInvalidDirective,l.NavbarComponent,l.NavbarActionButtonComponent,l.SiviFormDirective,l.SiviFormControlDirective,Ct.JJ,Ct.JL,Ct.sg,Ct.u,l.InfoPopupComponent,l.DatepickerComponent,l.RadioListComponent,Rp,D.Ov,T.X$],styles:[".delete-button[_ngcontent-%COMP%]{color:var(--ion-color-primary);float:right;cursor:pointer}.meal-table[_ngcontent-%COMP%]{width:100%}"]});const tv=["siviContent"];function hg(te,M){if(1&te&&(e.TgZ(0,"span"),e._uU(1),e.ALo(2,"async"),e.qZA()),2&te){const C=e.oxw();let Q;e.xp6(1),e.hij(" (",null==(Q=e.lcZ(2,1,C.siviProjectsGatewayService.getAppStateService().getMunicipality()))?null:Q.name,") ")}}function Lt(te,M){if(1&te){const C=e.EpF();e.TgZ(0,"ion-col",10)(1,"sivi-lib-timeframe-card",11),e.NdJ("clickCardHeaderEvent",function(){const Zt=e.CHM(C).$implicit,Pi=e.oxw(2);return e.KtG(Pi.openExpenseReimbursementModal(Zt.id))}),e.qZA()()}if(2&te){const C=M.$implicit,Q=e.oxw(2);e.xp6(1),e.Q6J("id",C.id)("title",Q.getCardTitle(C.validFrom,C.validUntil))("viewMode",!0)("isFooterHidden",!0)("isBodyHidden",!0)}}function Am(te,M){if(1&te&&(e.TgZ(0,"ion-grid")(1,"ion-row"),e.YNc(2,Lt,2,5,"ion-col",9),e.qZA()()),2&te){const C=e.oxw();e.xp6(2),e.Q6J("ngForOf",C.active)("ngForTrackBy",C.trackByFn)}}function yh(te,M){if(1&te){const C=e.EpF();e.TgZ(0,"ion-col",10)(1,"sivi-lib-timeframe-card",11),e.NdJ("clickCardHeaderEvent",function(){const Zt=e.CHM(C).$implicit,Pi=e.oxw(2);return e.KtG(Pi.openExpenseReimbursementModal(Zt.id))}),e.qZA()()}if(2&te){const C=M.$implicit,Q=e.oxw(2);e.xp6(1),e.Q6J("id",C.id)("title",Q.getCardTitle(C.validFrom,C.validUntil))("viewMode",!0)("isFooterHidden",!0)("isBodyHidden",!0)}}function Lu(te,M){if(1&te&&(e.TgZ(0,"ion-grid")(1,"ion-row"),e.YNc(2,yh,2,5,"ion-col",9),e.qZA()()),2&te){const C=e.oxw();e.xp6(2),e.Q6J("ngForOf",C.future)("ngForTrackBy",C.trackByFn)}}function T_(te,M){if(1&te){const C=e.EpF();e.TgZ(0,"ion-col",10)(1,"sivi-lib-timeframe-card",11),e.NdJ("clickCardHeaderEvent",function(){const Zt=e.CHM(C).$implicit,Pi=e.oxw(2);return e.KtG(Pi.openExpenseReimbursementModal(Zt.id))}),e.qZA()()}if(2&te){const C=M.$implicit,Q=e.oxw(2);e.xp6(1),e.Q6J("id",C.id)("title",Q.getCardTitle(C.validFrom,C.validUntil))("viewMode",!0)("isFooterHidden",!0)("isBodyHidden",!0)}}function bh(te,M){if(1&te&&(e.TgZ(0,"ion-grid")(1,"ion-row"),e.YNc(2,T_,2,5,"ion-col",9),e.qZA()()),2&te){const C=e.oxw();e.xp6(2),e.Q6J("ngForOf",C.expired)("ngForTrackBy",C.trackByFn)}}function hp(te,M){1&te&&(e._uU(0),e.ALo(1,"translate")),2&te&&e.hij(" ",e.lcZ(1,1,"Message.NoDataFound")," ")}class Yh extends l.SiviPage{constructor(M,C,Q,Ye,Zt,Pi,Ir,xo){super(C,Q,Ye),this.siviProjectsGatewayService=M,this.notify=C,this.translate=Q,this.router=Ye,this.route=Zt,this.expenseReimbursementsService=Pi,this.unsavedChanges=Ir,this.modalCtrl=xo,this.municipalityId=this.route.snapshot.paramMap.get("municipalityId"),this.editorOpened=!1,this.active=[],this.future=[],this.expired=[],this.constants=l.Constants,this.futureExpenseReimbursements$=new ke.X([])}ngOnInit(){this.getExpenseReimbursements(),this.restoreModal()}openExpenseReimbursementModal(M=null){var C=this;return(0,o.Z)(function*(){const Q=M||l.Constants.NEW_ID,Ye={component:$p,backdropDismiss:!1,cssClass:"modal-full-size",componentProps:{id:Q,futureExpenseReimbursements$:C.futureExpenseReimbursements$.asObservable()}};yield(yield C.modalCtrl.openModal(Ye,"reimbursementId",Q)).onDidDismiss(),C.getExpenseReimbursements()})()}getExpenseReimbursements(){this.contentLoader.showLoader(),this.expenseReimbursementsService.getExpenseReimbursementsList().subscribe({next:M=>{const C=[...M].sort((Q,Ye)=>l.Utils.compareByDate(Q.validFrom,Ye.validFrom,"asc"));this.active=C.filter(Q=>Q.state===l.Constants.CURRENT),this.future=C.filter(Q=>Q.state===l.Constants.FUTURE),this.expired=C.filter(Q=>Q.state===l.Constants.EXPIRED),this.futureExpenseReimbursements$.next(this.future),this.contentLoader.hideLoader()},error:M=>{console.error("getExpenseReimbursements",M),this.contentLoader.showError()}})}getCardTitle(M,C){return`${M=l.Utils.convertDateToFinnishStandard(M)} - ${C=C?l.Utils.convertDateToFinnishStandard(C):""}`}onDismiss(){this.modalCtrl.dismiss()}restoreModal(){var M=this;return(0,o.Z)(function*(){const C=l.Utils.getParamFromURL("reimbursementId");C&&(yield M.openExpenseReimbursementModal(C))})()}}Yh.\u0275fac=function(M){return new(M||Yh)(e.Y36(l.SiviProjectsGatewayService),e.Y36(l.NotifyService),e.Y36(T.sK),e.Y36(j.F0),e.Y36(j.gz),e.Y36(zm),e.Y36(l.UnsavedChangesGuard),e.Y36(l.SiviModalController))},Yh.\u0275cmp=e.Xpm({type:Yh,selectors:[["sivi-mun-set-ecec-fee-parameters-page"]],viewQuery:function(M,C){if(1&M&&e.Gf(tv,7),2&M){let Q;e.iGM(Q=e.CRH())&&(C.contentLoader=Q.first)}},features:[e.qOj],decls:26,vars:24,consts:[[3,"hideNotifications","closeButton","closed"],["navbar-title",""],[4,"ngIf"],["navbar-buttons-right",""],["siviKeyboardEvents","","tabindex","0","role","link",3,"click"],[1,"ion-padding"],["siviContent",""],[4,"ngIf","ngIfElse"],["noDataFound",""],["class","generic-card-container",4,"ngFor","ngForOf","ngForTrackBy"],[1,"generic-card-container"],[1,"generic-card-container",3,"id","title","viewMode","isFooterHidden","isBodyHidden","clickCardHeaderEvent"]],template:function(M,C){if(1&M&&(e.TgZ(0,"ion-header")(1,"sivi-lib-navbar",0),e.NdJ("closed",function(){return C.onDismiss()}),e.TgZ(2,"div",1),e._uU(3),e.ALo(4,"translate"),e.YNc(5,hg,3,3,"span",2),e.qZA(),e._UZ(6,"div",3),e.qZA()(),e.TgZ(7,"cgi-fab",4),e.NdJ("click",function(){return C.openExpenseReimbursementModal()}),e.ALo(8,"translate"),e.qZA(),e.TgZ(9,"ion-content",5)(10,"sivi-lib-content-loader",null,6)(12,"h1"),e._uU(13),e.ALo(14,"translate"),e.qZA(),e.YNc(15,Am,3,2,"ion-grid",7),e.TgZ(16,"h1"),e._uU(17),e.ALo(18,"translate"),e.qZA(),e.YNc(19,Lu,3,2,"ion-grid",7),e.TgZ(20,"h1"),e._uU(21),e.ALo(22,"translate"),e.qZA(),e.YNc(23,bh,3,2,"ion-grid",7),e.YNc(24,hp,2,3,"ng-template",null,8,e.W1O),e.qZA()()),2&M){const Q=e.MAs(25);e.xp6(1),e.Q6J("hideNotifications",!0)("closeButton",!0),e.xp6(2),e.hij(" ",e.lcZ(4,14,"Page.MunicipalitySettings.ExpenseReimbursements.Title")," "),e.xp6(2),e.Q6J("ngIf",C.municipalityId),e.xp6(2),e.uIk("aria-label",e.lcZ(8,16,"ECEC.Fees.Parameter.AddNew")),e.xp6(6),e.Oqu(e.lcZ(14,18,"General.Text.Active")),e.xp6(2),e.Q6J("ngIf",C.active.length>0)("ngIfElse",Q),e.xp6(2),e.Oqu(e.lcZ(18,20,"General.Text.Future")),e.xp6(2),e.Q6J("ngIf",C.future.length>0)("ngIfElse",Q),e.xp6(2),e.Oqu(e.lcZ(22,22,"General.Text.History")),e.xp6(2),e.Q6J("ngIf",C.expired.length>0)("ngIfElse",Q)}},dependencies:[D.sg,D.O5,E.wI,E.W2,E.jY,E.Gu,E.Nd,l.ContentLoaderComponent,l.KeyboardEventsDirective,l.NavbarComponent,l.TimeframeCardComponent,D.Ov,T.X$],encapsulation:2});class gg{}gg.\u0275fac=function(M){return new(M||gg)},gg.\u0275mod=e.oAB({type:gg}),gg.\u0275inj=e.cJS({imports:[Gi,l.InfoPopupComponentModule,st.p0,l.SiviFormsModule,l.TimepickerComponentModule,l.CurrencyInputComponentModule]});class Ym{}Ym.\u0275fac=function(M){return new(M||Ym)},Ym.\u0275mod=e.oAB({type:Ym}),Ym.\u0275inj=e.cJS({imports:[Gi,l.NavbarComponentModule,l.SiviFormsModule,l.InfoPopupComponentModule,l.DatepickerModule,l.RadioListComponentModule,gg]});const co=[{path:"expense-reimbursements",component:Yh,canDeactivate:[l.UnsavedChangesGuard]}];class sc{}sc.\u0275fac=function(M){return new(M||sc)},sc.\u0275mod=e.oAB({type:sc}),sc.\u0275inj=e.cJS({providers:[l.SiviModalController,zm],imports:[Gi,l.NavbarComponentModule,l.SiviFormsModule,l.DatepickerModule,Ct.u5,l.TimeframeCardComponentModule,st.p0,l.InfoPopupComponentModule,j.Bz.forChild(co),Ym]});class Js extends l.AbstractRestService{constructor(M,C){super(M,C),this.http=M,this.siviProjectsGateway=C}saveIntegration(M){return this.saveArray(M,"./api/sivi-accounts-api/organizationattributes/integrations/")}getIntegrationsByMunicipalityId(M){const C=`./api/sivi-accounts-api/organizationattributes/integrations/${M}`;return this.get(C)}}Js.\u0275fac=function(M){return new(M||Js)(e.LFG(g.eN),e.LFG(l.SiviProjectsGatewayService))},Js.\u0275prov=e.Yz7({token:Js,factory:Js.\u0275fac});class zs extends l.SiviAbstractForm{constructor(M,C){super(),this.translate=M,this.fb=C,this.save=new e.vpe,this.pristine=new e.vpe}ngOnInit(){this.username=this.getIntegrationByKey("username"),this.password=this.getIntegrationByKey("password");const{attributeValue:M}=this.username;this.form=this.fb.group({username:[M,[l.SiviValidators.required]],password:["",[l.SiviValidators.required]]})}getIntegrationByKey(M){return this.integrations.find(C=>C.attributeKey.includes(M))}onFormValueChange(){this.pristine.emit(this.form.pristine)}onClickSave(){this.save.emit(this.form.value)}}zs.\u0275fac=function(M){return new(M||zs)(e.Y36(T.sK),e.Y36(Ct.QS))},zs.\u0275cmp=e.Xpm({type:zs,selectors:[["sivi-mun-set-integration-credential"]],inputs:{integrations:"integrations",errorMessage:"errorMessage"},outputs:{save:"save",pristine:"pristine"},features:[e.qOj],decls:22,vars:31,consts:[["siviLibForm","",3,"formGroup"],["siviGridCol","left"],["formControlName","username","siviLibFormControl","","type","text","label-position","floating",3,"label"],["formControlName","password","siviLibFormControl","","type","password","label-position","floating",3,"passwordExists","hidePasswordLabel","revealPasswordLabel","label","errorMessages"],["siviGridCol","right"],["fill","outline","role","button",3,"disabled","click"]],template:function(M,C){1&M&&(e.TgZ(0,"form",0)(1,"h2"),e._uU(2),e.ALo(3,"translate"),e.qZA(),e.TgZ(4,"ion-row")(5,"ion-col",1),e._UZ(6,"cgi-input",2),e.ALo(7,"translate"),e.ALo(8,"translate"),e.qZA()(),e.TgZ(9,"ion-row")(10,"ion-col",1),e._UZ(11,"cgi-input",3),e.ALo(12,"translate"),e.ALo(13,"translate"),e.ALo(14,"translate"),e.ALo(15,"translate"),e.qZA()(),e.TgZ(16,"ion-row")(17,"ion-col",4)(18,"ion-button",5),e.NdJ("click",function(){return C.onClickSave()}),e.ALo(19,"translate"),e._uU(20),e.ALo(21,"translate"),e.qZA()()()()),2&M&&(e.Q6J("formGroup",C.form),e.xp6(2),e.Oqu(e.lcZ(3,13,null==C.username?null:C.username.integrationType)),e.xp6(4),e.Q6J("label",e.lcZ(8,17,null==C.username?null:C.username.attributeKey)),e.uIk("aria-label",e.lcZ(7,15,null==C.username?null:C.username.attributeKey)),e.xp6(5),e.Q6J("passwordExists",!0)("hidePasswordLabel",e.lcZ(12,19,"General.Buttons.HidePassword"))("revealPasswordLabel",e.lcZ(13,21,"General.Buttons.ShowPassword"))("label",e.lcZ(15,25,null==C.password?null:C.password.attributeKey))("errorMessages",C.errorMessage),e.uIk("aria-label",e.lcZ(14,23,null==C.password?null:C.password.attributeKey)),e.xp6(7),e.Q6J("disabled",!C.isValid),e.uIk("aria-label",e.lcZ(19,27,"General.Buttons.Save")),e.xp6(2),e.hij(" ",e.lcZ(21,29,"General.Buttons.Save")," "))},dependencies:[E.YG,E.wI,E.Nd,l.GridColDirective,l.SiviFormDirective,l.SiviFormControlDirective,Ct._Y,Ct.JJ,Ct.JL,Ct.sg,Ct.u,T.X$]});const gp=["contentLoader"];function zu(te,M){if(1&te){const C=e.EpF();e.TgZ(0,"div")(1,"sivi-mun-set-integration-credential",9),e.NdJ("pristine",function(Ye){const Pi=e.CHM(C).index,Ir=e.oxw();return e.KtG(Ir.handlePristine(Ye,Pi))})("save",function(Ye){const Zt=e.CHM(C),Pi=Zt.$implicit,Ir=Zt.index,xo=e.oxw();return e.KtG(xo.handleSaveIntegration(Ye,Pi,Ir))}),e.qZA()()}if(2&te){const C=M.$implicit,Q=M.index,Ye=e.oxw();e.xp6(1),e.Q6J("integrations",Ye.getFormIntegrations(C))("errorMessage",Ye.errorMessages[Q])}}class _p extends l.SiviComponent{constructor(M,C,Q,Ye,Zt,Pi){super(),this.translate=M,this.notify=C,this.route=Q,this.router=Ye,this.modalCtrl=Zt,this.integrationService=Pi,this.municipalityId=this.route.snapshot.paramMap.get("municipalityId"),this.integrations=[],this.integrationTypes=[],this.errorMessages=[],this.formPristineArray=[]}ngOnInit(){this.getIntegrations()}getIntegrations(){this.contentLoader.showLoader(),this.integrationService.getIntegrationsByMunicipalityId(this.municipalityId).pipe((0,n.q)(1)).subscribe(M=>{if(this.contentLoader.hideLoader(),M&&M.length){this.integrations=M;const C=new Set(this.integrations.map(Q=>Q.integrationType));this.integrationTypes=Array.from(C),this.resetForms()}else this.contentLoader.showNoContent()},M=>{console.error("get integrations for municipality failed: ",M),M&&401===M.status?(this.contentLoader.hideLoader(),this.router.navigate(["/error/access-denied"]),this.modalCtrl.dismiss(null)):this.contentLoader.showError()})}resetForms(){const M=this.integrationTypes.length;this.formPristineArray=[...new Array(M)],this.formPristineArray.fill(!0),this.errorMessages=[...new Array(M)],this.errorMessages.fill("")}getFormIntegrations(M){return this.integrations.filter(C=>C.integrationType===M)}handleSaveIntegration(M,C,Q){const Ye=Object.keys(M),Zt=[];Ye.forEach(Pi=>{const Ir=`${C}.${Pi}`,xo=this.integrations.findIndex(ec=>ec.attributeKey===Ir),Qa={...this.integrations[xo],attributeValue:M[Pi]};Zt.push(Qa)}),Zt.length&&this.saveIntegration(Zt,Q)}saveIntegration(M,C){this.errorMessages[C]="",this.contentLoader.showLoader(),this.integrationService.saveIntegration(M).subscribe(Q=>{this.contentLoader.hideLoader(),this.notify.toastSaveSuccess(),this.handlePristine(!0,C),this.updateIntegrations(Q)},Q=>{this.contentLoader.hideLoader(),console.error("Failed to save integration",Q.error),this.errorMessages[C]=this.notify.translate.instant("Message.Error.GeneralBackendError")})}updateIntegrations(M){M.forEach(C=>{const Q=this.integrations.findIndex(Ye=>Ye.attributeKey===C.attributeKey);this.integrations[Q]={...this.integrations[Q],...C}})}handlePristine(M,C){this.formPristineArray[C]=M}isPagePristine(){return this.formPristineArray.every(M=>!0===M)}onDismiss(){var M=this;return(0,o.Z)(function*(){M.isPagePristine()?M.modalCtrl.dismiss(null):(yield M.notify.promptDiscardChanges()).onDidDismiss().then(Q=>{Q.data&&M.modalCtrl.dismiss(null)})})()}}_p.\u0275fac=function(M){return new(M||_p)(e.Y36(T.sK),e.Y36(l.NotifyService),e.Y36(j.gz),e.Y36(j.F0),e.Y36(l.SiviModalController),e.Y36(Js))},_p.\u0275cmp=e.Xpm({type:_p,selectors:[["sivi-mun-set-integrations"]],viewQuery:function(M,C){if(1&M&&e.Gf(gp,7),2&M){let Q;e.iGM(Q=e.CRH())&&(C.contentLoader=Q.first)}},features:[e.qOj],decls:16,vars:14,consts:[[3,"closeButton","hideNotifications","closed"],["navbar-title",""],[1,"ion-padding"],["contentLoader",""],[1,"header-div"],[1,"header-div","huge"],[1,"text-accent","ion-margin-vertical"],[3,"text","buttonLabel"],[4,"ngFor","ngForOf","ngForTrackBy"],[3,"integrations","errorMessage","pristine","save"]],template:function(M,C){1&M&&(e.TgZ(0,"ion-header")(1,"sivi-lib-navbar",0),e.NdJ("closed",function(){return C.onDismiss()}),e.TgZ(2,"div",1),e._uU(3),e.ALo(4,"translate"),e.qZA()()(),e.TgZ(5,"ion-content",2)(6,"sivi-lib-content-loader",null,3)(8,"div",4)(9,"div",5)(10,"h2",6),e._uU(11),e.ALo(12,"translate"),e._UZ(13,"sivi-lib-info-popup",7),e.ALo(14,"translate"),e.qZA()()(),e.YNc(15,zu,2,2,"div",8),e.qZA()()),2&M&&(e.xp6(1),e.Q6J("closeButton",!0)("hideNotifications",!0),e.xp6(2),e.hij(" ",e.lcZ(4,8,"Page.MunicipalitySettings.Integration.Title.Plural")," "),e.xp6(8),e.hij(" ",e.lcZ(12,10,"Page.MunicipalitySettings.IntegrationsPasswordsAndUsernames.Title")," "),e.xp6(2),e.Q6J("text","Page.MunicipalitySettings.IntegrationsPasswordsAndUsernames.Info")("buttonLabel",e.lcZ(14,12,"General.Text.Contextual.Help")),e.xp6(2),e.Q6J("ngForOf",C.integrationTypes)("ngForTrackBy",C.trackByFn))},dependencies:[D.sg,E.W2,E.Gu,l.ContentLoaderComponent,l.NavbarComponent,l.InfoPopupComponent,zs,T.X$],styles:[".header-div[_ngcontent-%COMP%]{display:flex}.header-div[_ngcontent-%COMP%]   sivi-lib-info-popup[_ngcontent-%COMP%]{margin:auto 10px 10px;font-size:20px}"]});const nv=[{path:"integrations",component:_p}];class Hm{}Hm.\u0275fac=function(M){return new(M||Hm)},Hm.\u0275mod=e.oAB({type:Hm}),Hm.\u0275inj=e.cJS({providers:[Js,l.SiviModalController],imports:[Gi,l.NavbarComponentModule,j.Bz.forChild(nv),l.SiviFormsModule,l.InfoPopupComponentModule]});class Vm{}class Dd extends l.AbstractRestService{constructor(M,C){super(M,C),this.http=M,this.siviProjectsGateway=C}getLockingTimesSettings(){return this.get("./api/vesa-attendance/locking-times-settings")}saveLockingTimeSetting(M){return this.put(M,"./api/vesa-attendance/locking-times-settings")}getLockingTimesSetting(M){const C=`./api/vesa-attendance/locking-times-settings/${M}`;return this.get(C)}deleteLockingTimeSetting(M){const C=`./api/vesa-attendance/locking-times-settings/${M}`;return this.delete(C)}}Dd.\u0275fac=function(M){return new(M||Dd)(e.LFG(g.eN),e.LFG(l.SiviProjectsGatewayService))},Dd.\u0275prov=e.Yz7({token:Dd,factory:Dd.\u0275fac});class Jf extends l.AbstractRestService{constructor(){super(...arguments),this.timeFormat="H:mm",this.dtoTimeFormat="HH:mm"}mapDtosToLockingTimeSettings(M){return M.map(C=>this.mapDtoToLockingTimeSetting(C))}mapDtoToLockingTimeSetting(M){return{...M,lockingTime:(0,ye.Z)(M.lockingTime)?null:this.getNumberFromTime(M.lockingTime)}}mapLockingTimeSettingToDto(M){return{...M,lockingTime:(0,ye.Z)(M.lockingTime)?null:this.getTimeFromNumber(M.lockingTime)}}getNumberFromTime(M){const C=rn(M,this.timeFormat).format(this.timeFormat);return rn.duration(C,"minutes").asMinutes()}getTimeFromNumber(M){return rn.utc().startOf("day").add(M,"minutes").format(this.dtoTimeFormat)}}Jf.\u0275fac=function(){let te;return function(C){return(te||(te=e.n5z(Jf)))(C||Jf)}}(),Jf.\u0275prov=e.Yz7({token:Jf,factory:Jf.\u0275fac});const iv=["siviContent"];function Sd(te,M){if(1&te){const C=e.EpF();e.TgZ(0,"sivi-lib-navbar-action-button",17),e.NdJ("clicked",function(){e.CHM(C);const Ye=e.oxw();return e.KtG(Ye.onSave())}),e.qZA()}if(2&te){const C=e.oxw();e.Q6J("disabled",!C.canSave)}}function jg(te,M){if(1&te){const C=e.EpF();e.TgZ(0,"ion-button",18),e.NdJ("click",function(){e.CHM(C);const Ye=e.oxw();return e.KtG(Ye.onDelete())}),e._UZ(1,"cgi-icon",19),e.qZA()}if(2&te){const C=e.oxw();e.Q6J("disabled",C.contentLoader.shouldShowLoader())}}function rv(te,M){if(1&te&&(e._UZ(0,"sivi-lib-datepicker",20),e.ALo(1,"translate"),e.ALo(2,"translate")),2&te){const C=e.oxw();e.Q6J("readonly",!0)("readonlyValue",C.formGroup.controls.validUntil.value||"-")("label",e.lcZ(1,4,"Form.Label.Until")),e.uIk("aria-label",e.lcZ(2,6,"Form.Label.Until"))}}function vp(te,M){1&te&&e._UZ(0,"sivi-lib-timepicker",21)}function _g(te,M){if(1&te&&(e._UZ(0,"cgi-input",22),e.ALo(1,"translate"),e.ALo(2,"translate")),2&te){const C=e.oxw();e.Q6J("viewMode",!0)("label",e.lcZ(1,4,"Title.Attendance.Plans.Table.Time"))("value",C.lockingTime||"-"),e.uIk("aria-label",e.lcZ(2,6,"Title.Attendance.Plans.Table.Time"))}}class of extends l.SiviAbstractForm{get lockingTime(){const M=this.formGroup.controls.lockingTime.value;return rn(this.lockingTimesMapperService.getTimeFromNumber(M),"HH:mm").format("H.mm")}get canSave(){return this.formGroup.valid&&!this.canDeactivate()&&!this.contentLoader.shouldShowLoader()}constructor(M,C,Q,Ye,Zt,Pi,Ir){super(),this.notify=M,this.translate=C,this.unsavedChanges=Q,this.modalCtrl=Ye,this.fb=Zt,this.lockingTimesService=Pi,this.lockingTimesMapperService=Ir,this.readonly=!1,this.weekdayOptions=this.getWeekdayOptions(),this.lockedWeeksOptions=this.getLockedWeeksOptions(12),this.formGroup=this.fb.group({validFrom:[""],validUntil:[""],lockingDay:[null],lockingTime:[null],numberOfLockedWeeks:[null]}),this.laterThanTodayValidator=l.SiviValidators.validateDateLaterThanToday(),this.validFromErrorMsg={invalidDate:this.translate.instant("Form.Error.DateShouldBeInFuture")},this.minValidFrom=rn().add(1,"day").format("YYYY-MM-DD")}ngOnInit(){this._setting=this.formGroup.value,this.setValidators(),this.settingId&&this.getSetting()}onFormValueChange(M){this.setting={...this.setting,...M}}canDeactivate(){return(0,X.Z)(this.setting,this._setting)}onDismiss(){this.unsavedChanges.canDeactivate(this).pipe((0,n.q)(1)).subscribe(M=>{M&&this.modalCtrl.dismiss(null)})}setValidators(){const M=this.readonly?[]:[l.SiviValidators.required,this.laterThanTodayValidator],C=this.readonly?[]:[l.SiviValidators.required];this.formGroup.get("validFrom").setValidators(M),this.formGroup.get("lockingDay").setValidators(C),this.formGroup.get("numberOfLockedWeeks").setValidators(C)}onSave(){this.saveSetting()}onDelete(){var M=this;return(0,o.Z)(function*(){(yield(yield M.notify.deleteConfirmPopup("Message.Delete.Settings.Message")).onDidDismiss()).data&&M.deleteSetting()})()}getSetting(){this.contentLoader.showLoader(),this.lockingTimesService.getLockingTimesSetting(this.settingId).pipe((0,P.x)(()=>this.contentLoader.hideLoader()),(0,B.K)(M=>(this.notify.alertBackendError(M),mt.E))).subscribe(M=>{this.readonly=[l.Constants.EXPIRED,l.Constants.CURRENT].includes(M.state),this.setting=this.lockingTimesMapperService.mapDtoToLockingTimeSetting(M),this._setting={...this.setting},this.formGroup.patchValue(this.setting),this.setValidators()})}saveSetting(){this.contentLoader.showLoader();const M=this.lockingTimesMapperService.mapLockingTimeSettingToDto(this.setting);this.lockingTimesService.saveLockingTimeSetting(M).pipe((0,P.x)(()=>this.contentLoader.hideLoader()),(0,B.K)(C=>(this.notify.alertBackendErrorWithCode(C,"Message.Save.Error"),mt.E))).subscribe(()=>{this._setting={...this.setting},this.notify.toastSaveSuccess(),this.modalCtrl.dismiss(null)})}deleteSetting(){this.contentLoader.showLoader(),this.lockingTimesService.deleteLockingTimeSetting(this.setting.id).pipe((0,P.x)(()=>this.contentLoader.hideLoader()),(0,B.K)(M=>(this.notify.alertBackendErrorWithCode(M,"Message.Save.Error"),mt.E))).subscribe(()=>{this._setting={...this.setting},this.notify.toastSaveSuccess(),this.modalCtrl.dismiss(null)})}getLockedWeeksOptions(M=0){const C=[];for(let Ye=1;Ye<=M;Ye++)C.push(this.getLockedWeekOption(Ye));return C}getLockedWeekOption(M=0){const C=this.translate.instant("General.Text.Ongoing"),Q=this.translate.instant("General.Text.Week"),Ye=this.translate.instant("General.Text.Weeks");return{text:`${C} ${M>0?`+${M}`:""} ${M<=1?Q:Ye}`,value:M}}getWeekdayOptions(){const M=C=>this.translate.instant(C);return[{text:M("General.Days.Monday"),value:l.WeekPeriods.MONDAY},{text:M("General.Days.Tuesday"),value:l.WeekPeriods.TUESDAY},{text:M("General.Days.Wednesday"),value:l.WeekPeriods.WEDNESDAY},{text:M("General.Days.Thursday"),value:l.WeekPeriods.THURSDAY},{text:M("General.Days.Friday"),value:l.WeekPeriods.FRIDAY},{text:M("General.Days.Saturday"),value:l.WeekPeriods.SATURDAY},{text:M("General.Days.Sunday"),value:l.WeekPeriods.SUNDAY}]}}of.\u0275fac=function(M){return new(M||of)(e.Y36(l.NotifyService),e.Y36(T.sK),e.Y36(l.UnsavedChangesGuard),e.Y36(l.SiviModalController),e.Y36(Ct.QS),e.Y36(Dd),e.Y36(Jf))},of.\u0275cmp=e.Xpm({type:of,selectors:[["sivi-mun-set-locking-time-setting"]],viewQuery:function(M,C){if(1&M&&e.Gf(iv,7),2&M){let Q;e.iGM(Q=e.CRH())&&(C.contentLoader=Q.first)}},inputs:{settingId:"settingId"},features:[e.qOj],decls:36,vars:37,consts:[[3,"hideNotifications","closeButton","closed"],["navbar-title",""],["navbar-buttons-right",""],[3,"disabled","clicked",4,"ngIf"],["icon-only","","no-min-width","","slot","end","color","primary","class","delete-button","fill","clear",3,"disabled","click",4,"ngIf"],["siviLibForm","",1,"ion-padding",3,"formGroup"],["siviContent",""],[1,"title"],[3,"text"],["siviGridCol","left"],["formControlName","validFrom","siviLibFormControl","",3,"minDate","errorMessages","readonly","label"],["siviGridCol","right"],[3,"readonly","readonlyValue","label",4,"ngIf"],["formControlName","lockingDay","siviLibFormControl","",3,"viewMode","options","label"],["formControlName","lockingTime","siviLibFormControl","","label","Title.Attendance.Plans.Table.Time",4,"ngIf","ngIfElse"],["readonlyTime",""],["formControlName","numberOfLockedWeeks","siviLibFormControl","",3,"viewMode","options","label"],[3,"disabled","clicked"],["icon-only","","no-min-width","","slot","end","color","primary","fill","clear",1,"delete-button",3,"disabled","click"],["name","delete"],[3,"readonly","readonlyValue","label"],["formControlName","lockingTime","siviLibFormControl","","label","Title.Attendance.Plans.Table.Time"],["type","text",3,"viewMode","label","value"]],template:function(M,C){if(1&M&&(e.TgZ(0,"ion-header")(1,"sivi-lib-navbar",0),e.NdJ("closed",function(){return C.onDismiss()}),e.TgZ(2,"div",1),e._uU(3),e.ALo(4,"translate"),e.qZA(),e.TgZ(5,"div",2),e.YNc(6,Sd,1,1,"sivi-lib-navbar-action-button",3),e.qZA()()(),e.YNc(7,jg,2,1,"ion-button",4),e.TgZ(8,"ion-content",5),e._UZ(9,"sivi-lib-content-loader",null,6),e.TgZ(11,"h1",7),e._uU(12),e.ALo(13,"translate"),e._UZ(14,"sivi-lib-info-popup",8),e.qZA(),e.TgZ(15,"ion-grid")(16,"ion-row")(17,"ion-col",9),e._UZ(18,"sivi-lib-datepicker",10),e.ALo(19,"translate"),e.qZA(),e.TgZ(20,"ion-col",11),e.YNc(21,rv,3,8,"sivi-lib-datepicker",12),e.qZA()(),e.TgZ(22,"ion-row")(23,"ion-col",9),e._UZ(24,"sivi-lib-select",13),e.ALo(25,"translate"),e.ALo(26,"translate"),e.qZA(),e.TgZ(27,"ion-col",11),e.YNc(28,vp,1,0,"sivi-lib-timepicker",14),e.YNc(29,_g,3,8,"ng-template",null,15,e.W1O),e.qZA()(),e.TgZ(31,"ion-row")(32,"ion-col",9),e._UZ(33,"sivi-lib-select",16),e.ALo(34,"translate"),e.ALo(35,"translate"),e.qZA()()()()),2&M){const Q=e.MAs(30);e.xp6(1),e.Q6J("hideNotifications",!0)("closeButton",!0),e.xp6(2),e.hij(" ",e.lcZ(4,23,"Title.MunicipalitySettings.LockingTimesSettings")," "),e.xp6(3),e.Q6J("ngIf",!C.readonly),e.xp6(1),e.Q6J("ngIf",(null==C.setting?null:C.setting.id)&&!C.readonly),e.xp6(1),e.Q6J("formGroup",C.formGroup),e.xp6(4),e.hij("",e.lcZ(13,25,"Title.MunicipalitySettings.LockingTimesSettings")," "),e.xp6(2),e.Q6J("text","Title.MunicipalitySettings.LockingTimesSettings.Info"),e.xp6(4),e.Q6J("minDate",C.minValidFrom)("errorMessages",C.validFromErrorMsg)("readonly",C.readonly)("label",e.lcZ(19,27,"Form.Label.From")),e.xp6(3),e.Q6J("ngIf",C.readonly),e.xp6(3),e.Q6J("viewMode",C.readonly)("options",C.weekdayOptions)("label",e.lcZ(26,31,"Form.Label.WeekdayWhenLockingTakesPlace")),e.uIk("aria-label",e.lcZ(25,29,"Form.Label.WeekdayWhenLockingTakesPlace")),e.xp6(4),e.Q6J("ngIf",!C.readonly)("ngIfElse",Q),e.xp6(5),e.Q6J("viewMode",C.readonly)("options",C.lockedWeeksOptions)("label",e.lcZ(34,33,"Form.Label.DurationOfLockingTime")),e.uIk("aria-label",e.lcZ(35,35,"Form.Label.DurationOfLockingTime"))}},dependencies:[D.O5,E.YG,E.wI,E.W2,E.jY,E.Gu,E.Nd,l.ContentLoaderComponent,l.GridColDirective,l.NavbarComponent,l.NavbarActionButtonComponent,l.SiviFormDirective,l.SiviFormControlDirective,Ct.JJ,Ct.JL,Ct.sg,Ct.u,l.DatepickerComponent,l.InfoPopupComponent,l.SelectComponent,l.TimepickerComponent,T.X$],styles:[".delete-button[_ngcontent-%COMP%]{width:min-content;align-self:end}h1[_ngcontent-%COMP%]{margin-top:0}.mdc-text-field--filled[_ngcontent-%COMP%]:not(.mdc-text-field--disabled)   .mdc-line-ripple[_ngcontent-%COMP%]:before{border-bottom-color:#0000001f}"],changeDetection:0});class Qd{transform(M){return`${l.Utils.convertDateToFinnishStandard(M.validFrom)} - ${l.Utils.convertDateToFinnishStandard(M.validUntil)||""}`}}Qd.\u0275fac=function(M){return new(M||Qd)},Qd.\u0275pipe=e.Yjl({name:"settingTitle",type:Qd,pure:!0});const jp=["siviContent"];function yp(te,M){if(1&te&&(e.TgZ(0,"span"),e._uU(1),e.qZA()),2&te){const C=e.oxw();e.xp6(1),e.hij(" (",C.municipalityName,") ")}}function Bl(te,M){if(1&te){const C=e.EpF();e.TgZ(0,"ion-col",9)(1,"sivi-lib-timeframe-card",10),e.NdJ("clickCardHeaderEvent",function(Ye){e.CHM(C);const Zt=e.oxw(2);return e.KtG(Zt.openLockingTimesSetting(Ye))}),e.ALo(2,"settingTitle"),e.qZA()()}if(2&te){const C=M.$implicit;e.xp6(1),e.Q6J("id",C.id)("title",e.lcZ(2,5,C))("viewMode",!0)("isFooterHidden",!0)("isBodyHidden",!0)}}function Kp(te,M){if(1&te&&(e.TgZ(0,"ion-grid")(1,"ion-row"),e.YNc(2,Bl,3,7,"ion-col",8),e.qZA()()),2&te){const C=e.oxw();e.xp6(2),e.Q6J("ngForOf",C.activeTimeSettings)("ngForTrackBy",C.trackByFn)}}function bp(te,M){if(1&te){const C=e.EpF();e.TgZ(0,"ion-col",9)(1,"sivi-lib-timeframe-card",10),e.NdJ("clickCardHeaderEvent",function(Ye){e.CHM(C);const Zt=e.oxw(2);return e.KtG(Zt.openLockingTimesSetting(Ye))}),e.ALo(2,"settingTitle"),e.qZA()()}if(2&te){const C=M.$implicit;e.xp6(1),e.Q6J("id",C.id)("title",e.lcZ(2,5,C))("viewMode",!0)("isFooterHidden",!0)("isBodyHidden",!0)}}function af(te,M){if(1&te&&(e.TgZ(0,"ion-grid")(1,"ion-row"),e.YNc(2,bp,3,7,"ion-col",8),e.qZA()()),2&te){const C=e.oxw();e.xp6(2),e.Q6J("ngForOf",C.futureTimeSettings)("ngForTrackBy",C.trackByFn)}}function wm(te,M){if(1&te){const C=e.EpF();e.TgZ(0,"ion-col",9)(1,"sivi-lib-timeframe-card",10),e.NdJ("clickCardHeaderEvent",function(Ye){e.CHM(C);const Zt=e.oxw(2);return e.KtG(Zt.openLockingTimesSetting(Ye))}),e.ALo(2,"settingTitle"),e.qZA()()}if(2&te){const C=M.$implicit;e.xp6(1),e.Q6J("id",C.id)("title",e.lcZ(2,5,C))("viewMode",!0)("isFooterHidden",!0)("isBodyHidden",!0)}}function Jc(te,M){if(1&te&&(e.TgZ(0,"ion-grid")(1,"ion-row"),e.YNc(2,wm,3,7,"ion-col",8),e.qZA()()),2&te){const C=e.oxw();e.xp6(2),e.Q6J("ngForOf",C.expiredTimeSettings)("ngForTrackBy",C.trackByFn)}}function Ac(te,M){1&te&&(e._uU(0),e.ALo(1,"translate")),2&te&&e.hij(" ",e.lcZ(1,1,"Message.NoDataFound"),"\n")}class sf extends l.SiviPage{constructor(M,C,Q,Ye,Zt,Pi,Ir,xo,Qa){super(C,Q,Ye,Zt,Qa,xo),this.siviProjectsGatewayService=M,this.notify=C,this.translate=Q,this.router=Ye,this.route=Zt,this.lockingTimesService=Pi,this.lockingTimesMapperService=Ir,this.modalCtrl=xo,this.location=Qa,this.activeTimeSettings=[],this.futureTimeSettings=[],this.expiredTimeSettings=[]}ngOnInit(){this.getLockingTimesSettings(),this.getMunicipalityName()}getMunicipalityName(){this.siviProjectsGatewayService.getAppStateService().getMunicipality().pipe((0,w.R)(this.destroy$),(0,ae.h)(M=>!!M),(0,Y.U)(M=>M.name)).subscribe(M=>this.municipalityName=M)}getModalOpts(M){return{component:of,backdropDismiss:!1,cssClass:"modal-full-size",componentProps:{municipalityName:this.municipalityName,settingId:M}}}openLockingTimesSettingModal(M=null){var C=this;return(0,o.Z)(function*(){yield(yield C.openModal(C.getModalOpts(M))).onDidDismiss(),C.getLockingTimesSettings()})()}openLockingTimesSetting(M){var C=this;return(0,o.Z)(function*(){yield C.openLockingTimesSettingModal(M)})()}getLockingTimesSettings(){this.contentLoader.showLoader();this.lockingTimesService.getLockingTimesSettings().pipe((0,Y.U)(Q=>this.lockingTimesMapperService.mapDtosToLockingTimeSettings(Q)),(0,Y.U)(Q=>Q.sort((Ye,Zt)=>l.Utils.compareByDate(Ye.validFrom,Zt.validFrom))),(0,P.x)(()=>this.contentLoader.hideLoader()),(0,B.K)(Q=>(console.error("getLockingTimesSettings",Q),this.contentLoader.showError(),mt.E))).subscribe(Q=>{const Ye=(0,le.Z)(Q,"state");this.activeTimeSettings=Ye[l.Constants.CURRENT],this.futureTimeSettings=Ye[l.Constants.FUTURE],this.expiredTimeSettings=Ye[l.Constants.EXPIRED]})}onDismiss(){this.modalCtrl.dismiss()}}sf.\u0275fac=function(M){return new(M||sf)(e.Y36(l.SiviProjectsGatewayService),e.Y36(l.NotifyService),e.Y36(T.sK),e.Y36(j.F0),e.Y36(j.gz),e.Y36(Dd),e.Y36(Jf),e.Y36(l.SiviModalController),e.Y36(D.Ye))},sf.\u0275cmp=e.Xpm({type:sf,selectors:[["sivi-mun-set-locking-times-page"]],viewQuery:function(M,C){if(1&M&&e.Gf(jp,7),2&M){let Q;e.iGM(Q=e.CRH())&&(C.contentLoader=Q.first)}},features:[e.qOj],decls:25,vars:24,consts:[[3,"hideNotifications","closeButton","closed"],["navbar-title",""],[4,"ngIf"],["siviKeyboardEvents","","tabindex","0","role","link",3,"click"],[1,"ion-padding"],["siviContent",""],[4,"ngIf","ngIfElse"],["noData",""],["class","generic-card-container",4,"ngFor","ngForOf","ngForTrackBy"],[1,"generic-card-container"],[1,"generic-card-container",3,"id","title","viewMode","isFooterHidden","isBodyHidden","clickCardHeaderEvent"]],template:function(M,C){if(1&M&&(e.TgZ(0,"ion-header")(1,"sivi-lib-navbar",0),e.NdJ("closed",function(){return C.onDismiss()}),e.TgZ(2,"div",1),e._uU(3),e.ALo(4,"translate"),e.YNc(5,yp,2,1,"span",2),e.qZA()()(),e.TgZ(6,"cgi-fab",3),e.NdJ("click",function(){return C.openLockingTimesSettingModal()}),e.ALo(7,"translate"),e.qZA(),e.TgZ(8,"ion-content",4)(9,"sivi-lib-content-loader",null,5)(11,"h1"),e._uU(12),e.ALo(13,"translate"),e.qZA(),e.YNc(14,Kp,3,2,"ion-grid",6),e.TgZ(15,"h1"),e._uU(16),e.ALo(17,"translate"),e.qZA(),e.YNc(18,af,3,2,"ion-grid",6),e.TgZ(19,"h1"),e._uU(20),e.ALo(21,"translate"),e.qZA(),e.YNc(22,Jc,3,2,"ion-grid",6),e.qZA()(),e.YNc(23,Ac,2,3,"ng-template",null,7,e.W1O)),2&M){const Q=e.MAs(24);e.xp6(1),e.Q6J("hideNotifications",!0)("closeButton",!0),e.xp6(2),e.hij(" ",e.lcZ(4,14,"Title.MunicipalitySettings.LockingTimesSettings")," "),e.xp6(2),e.Q6J("ngIf",C.municipalityName),e.xp6(1),e.uIk("aria-label",e.lcZ(7,16,"ECEC.Fees.Parameter.AddNew")),e.xp6(6),e.Oqu(e.lcZ(13,18,"General.Text.Active")),e.xp6(2),e.Q6J("ngIf",(null==C.activeTimeSettings?null:C.activeTimeSettings.length)>0)("ngIfElse",Q),e.xp6(2),e.Oqu(e.lcZ(17,20,"General.Text.Future")),e.xp6(2),e.Q6J("ngIf",(null==C.futureTimeSettings?null:C.futureTimeSettings.length)>0)("ngIfElse",Q),e.xp6(2),e.Oqu(e.lcZ(21,22,"General.Text.History")),e.xp6(2),e.Q6J("ngIf",(null==C.expiredTimeSettings?null:C.expiredTimeSettings.length)>0)("ngIfElse",Q)}},dependencies:[D.sg,D.O5,E.wI,E.W2,E.jY,E.Gu,E.Nd,l.ContentLoaderComponent,l.KeyboardEventsDirective,l.NavbarComponent,l.TimeframeCardComponent,T.X$,Qd],encapsulation:2});const pl=[{path:"locking-times",component:sf}];class Zm{}Zm.\u0275fac=function(M){return new(M||Zm)},Zm.\u0275mod=e.oAB({type:Zm}),Zm.\u0275inj=e.cJS({providers:[Dd,l.SiviModalController,Jf],imports:[Gi,l.NavbarComponentModule,l.SiviFormsModule,l.DatepickerModule,Ct.u5,l.TimeframeCardComponentModule,l.InfoPopupComponentModule,j.Bz.forChild(pl),l.SelectComponentModule,l.TimepickerComponentModule]});class Jp extends l.AbstractRestService{constructor(M,C){super(M,C),this.http=M,this.siviProjectsGateway=C}getInvoiceSettings(){return this.get("./api/vesa-invoicing/club-invoice-settings")}getInvoiceSetting(M){const C=`./api/vesa-invoicing/club-invoice-settings/${M}`;return this.get(C)}saveInvoiceSettings(M){return this.put(M,"./api/vesa-invoicing/club-invoice-settings")}}Jp.\u0275fac=function(M){return new(M||Jp)(e.LFG(g.eN),e.LFG(l.SiviProjectsGatewayService))},Jp.\u0275prov=e.Yz7({token:Jp,factory:Jp.\u0275fac});const Cp=["siviContent"];function md(te,M){if(1&te){const C=e.EpF();e.TgZ(0,"sivi-lib-navbar-action-button",20),e.NdJ("clicked",function(){e.CHM(C);const Ye=e.oxw();return e.KtG(Ye.onSave())}),e.qZA()}}function vg(te,M){1&te&&(e.TgZ(0,"ion-row",21),e._uU(1),e.ALo(2,"translate"),e.qZA()),2&te&&(e.xp6(1),e.hij(" ",e.lcZ(2,1,"Page.MunicipalitySettings.Error.NotUniqValidFromDate")," "))}function Vh(te,M){1&te&&(e.TgZ(0,"ion-col",8),e._UZ(1,"sivi-lib-datepicker",22),e.qZA()),2&te&&(e.xp6(1),e.Q6J("readonly",!0)("label","Form.Label.Until"))}function Qp(te,M){if(1&te){const C=e.EpF();e.TgZ(0,"ion-button",23),e.NdJ("click",function(){e.CHM(C);const Ye=e.oxw();return e.KtG(Ye.onClickAddRow("morningAfternoonCareFees"))}),e.ALo(1,"translate"),e._uU(2),e.ALo(3,"translate"),e.qZA()}2&te&&(e.uIk("aria-label",e.lcZ(1,2,"General.Buttons.Add.Row ")),e.xp6(2),e.hij(" ",e.lcZ(3,4,"General.Buttons.Add.Row")," "))}function Kg(te,M){if(1&te){const C=e.EpF();e.TgZ(0,"ion-button",31),e.NdJ("click",function(){e.CHM(C);const Ye=e.oxw().index,Zt=e.oxw(2);return e.KtG(Zt.onDeleteOption("morningAfternoonCareFees",Ye))}),e._UZ(1,"cgi-icon",32),e.qZA()}}function Qc(te,M){if(1&te&&(e.ynx(0,26),e.TgZ(1,"ion-row")(2,"ion-col",27),e._UZ(3,"cgi-input",28),e.ALo(4,"translate"),e.ALo(5,"translate"),e.qZA(),e.TgZ(6,"ion-col",29),e.YNc(7,Kg,2,0,"ion-button",30),e.qZA()(),e.BQk()),2&te){const C=M.index,Q=e.oxw(2);e.Q6J("formGroupName",C),e.xp6(3),e.Q6J("viewMode",!Q.editMode)("label",e.lcZ(5,7,"Page.MunicipalitySettings.OpenDayCareInvoicing.Fee.Label")),e.uIk("aria-label",e.lcZ(4,5,"Page.MunicipalitySettings.OpenDayCareInvoicing.Fee.Label")),e.xp6(4),e.Q6J("ngIf",Q.editMode)}}function Zh(te,M){if(1&te&&(e.TgZ(0,"section",24),e.YNc(1,Qc,8,9,"ng-container",25),e.qZA()),2&te){const C=e.oxw();e.xp6(1),e.Q6J("ngForOf",C.morningAfternoonCareFees.controls)("ngForTrackBy",C.trackByFn)}}function wc(te,M){if(1&te){const C=e.EpF();e.TgZ(0,"ion-button",23),e.NdJ("click",function(){e.CHM(C);const Ye=e.oxw();return e.KtG(Ye.onClickAddRow("openCareFees"))}),e.ALo(1,"translate"),e._uU(2),e.ALo(3,"translate"),e.qZA()}2&te&&(e.uIk("aria-label",e.lcZ(1,2,"General.Buttons.Add.Row ")),e.xp6(2),e.hij(" ",e.lcZ(3,4,"General.Buttons.Add.Row")," "))}function Ep(te,M){if(1&te){const C=e.EpF();e.TgZ(0,"ion-button",31),e.NdJ("click",function(){e.CHM(C);const Ye=e.oxw().index,Zt=e.oxw(2);return e.KtG(Zt.onDeleteOption("openCareFees",Ye))}),e._UZ(1,"cgi-icon",32),e.qZA()}}function Gh(te,M){if(1&te&&(e.ynx(0,26),e.TgZ(1,"ion-row")(2,"ion-col",27),e._UZ(3,"cgi-input",28),e.ALo(4,"translate"),e.ALo(5,"translate"),e.qZA(),e.TgZ(6,"ion-col",29),e.YNc(7,Ep,2,0,"ion-button",30),e.qZA()(),e.BQk()),2&te){const C=M.index,Q=e.oxw(2);e.Q6J("formGroupName",C),e.xp6(3),e.Q6J("viewMode",!Q.editMode)("label",e.lcZ(5,7,"Page.MunicipalitySettings.OpenDayCareInvoicing.Fee.Label")),e.uIk("aria-label",e.lcZ(4,5,"Page.MunicipalitySettings.OpenDayCareInvoicing.Fee.Label")),e.xp6(4),e.Q6J("ngIf",Q.editMode)}}function qp(te,M){if(1&te&&(e.TgZ(0,"section",33),e.YNc(1,Gh,8,9,"ng-container",25),e.qZA()),2&te){const C=e.oxw();e.xp6(1),e.Q6J("ngForOf",C.openCareFees.controls)("ngForTrackBy",C.trackByFn)}}class lf extends l.SiviAbstractForm{constructor(M,C,Q,Ye,Zt,Pi,Ir){super(),this.translate=M,this.unsavedChanges=C,this.modalCtrl=Q,this.fb=Ye,this.notifyService=Zt,this.openDaycareInvoiceSettingsService=Pi,this.cdr=Ir,this.editMode=!1,this.tomorrowDate=rn().add(1,"day").format(l.DateFormats.STANDARD),this.showMorningAfternoonCareFees=!0,this.showOpenCareFees=!0,this.constants=l.Constants,this.errorMessage={isSameOrAfter:this.translate.instant("Form.Error.DateShouldBeInFuture")},this.form=this.fb.group({validFrom:[""],validUntil:[""],municipalityInvoicingClub:[""],morningAfternoonCareType:[null],morningAfternoonCareFees:this.fb.array([]),openCareType:[null],openCareFees:this.fb.array([])}),this.basicOptions=[{value:!0,text:this.translate.instant("General.Yes")},{value:!1,text:this.translate.instant("General.No")}],this.typeOfFeeOptions=[{text:this.translate.instant("Page.MunicipalitySettings.OpenDayCareInvoicing.MorningAndAfternoonCare.TypeOfFee.Monthly"),value:"MONTHLY",selected:!0}]}ngOnInit(){this.invoiceId===l.Constants.NEW_ID?(this.editMode=!0,this.contentLoader.hideLoader(),this.setValidators()):this.getInvoiceSetting(this.invoiceId)}get morningAfternoonCareFees(){return this.form.get("morningAfternoonCareFees")}get openCareFees(){return this.form.get("openCareFees")}onFormValueChange(M){this.isOverlapping=this.existingStartDates.includes(M.validFrom)}canDeactivate(){return(0,X.Z)(this.form.value,this.originalValues)}onClickAddRow(M){const C=this.fb.group({feeValue:["",[Ct.kI.required,l.SiviValidators.pattern(l.Patterns.ONLYNUMBERS)]],id:null});"morningAfternoonCareFees"===M?this.morningAfternoonCareFees.push(C):"openCareFees"===M&&this.openCareFees.push(C)}onDeleteOption(M,C){"morningAfternoonCareFees"===M?(this.showMorningAfternoonCareFees=!1,this.cdr.detectChanges(),this.morningAfternoonCareFees.removeAt(C)):"openCareFees"===M&&(this.showOpenCareFees=!1,this.cdr.detectChanges(),this.openCareFees.removeAt(C)),this.showMorningAfternoonCareFees=!0,this.showOpenCareFees=!0,this.preventScrollDuringUpdate(),this.cdr.detectChanges()}onDismiss(){this.unsavedChanges.canDeactivate(this).pipe((0,n.q)(1)).subscribe(M=>{M&&this.modalCtrl.dismiss(null)})}getInvoiceSetting(M){this.contentLoader.showLoader(),this.openDaycareInvoiceSettingsService.getInvoiceSetting(M).subscribe({next:C=>{C.validUntil=C.validUntil||"-",this.form.patchValue(C),this.editMode=C.state===l.Constants.FUTURE,this.updateFormArray(this.form.get("morningAfternoonCareFees"),C.morningAfternoonCareFees),this.updateFormArray(this.form.get("openCareFees"),C.openCareFees),this.contentLoader.hideLoader(),this.originalValues=this.form.value,this.setValidators()},error:C=>{console.error("Failed to load invoice setting",C),this.notifyService.alertBackendError(C),this.contentLoader.hideLoader()}})}onSave(){if(!this.form.valid||this.isOverlapping)return void this.goToInvalid$.next();this.contentLoader.showLoader();const M={...this.form.value,id:this.invoiceId===l.Constants.NEW_ID?null:this.invoiceId};this.openDaycareInvoiceSettingsService.saveInvoiceSettings(M).pipe((0,P.x)(()=>this.contentLoader.hideLoader())).subscribe({next:C=>{this.notifyService.toastSaveSuccess(),this.form.patchValue(C),this.updateFormArray(this.form.get("morningAfternoonCareFees"),C.morningAfternoonCareFees),this.updateFormArray(this.form.get("openCareFees"),C.openCareFees),this.originalValues=this.form.value},error:C=>this.notifyService.alertBackendError(C)})}updateFormArray(M,C){M.clear(),C.forEach(Q=>{M.push(this.createFeeFormGroup(Q))})}setValidators(){this.editMode&&(this.form.get("validFrom").setValidators([l.SiviValidators.required,l.SiviValidators.validateDateIsSameOrAfterThanParameter(this.tomorrowDate)]),this.form.get("municipalityInvoicingClub").setValidators([l.SiviValidators.required]),this.form.get("morningAfternoonCareType").setValidators([l.SiviValidators.required]),this.form.get("openCareType").setValidators([l.SiviValidators.required]))}createFeeFormGroup(M){const C=this.editMode?[Ct.kI.required,l.SiviValidators.pattern(l.Patterns.ONLYNUMBERS)]:[];return this.fb.group({feeValue:[M.feeValue,C]})}preventScrollDuringUpdate(){const M=C=>C.preventDefault();window.addEventListener("scroll",M,{passive:!1}),setTimeout(()=>{window.removeEventListener("scroll",M)},1)}}lf.\u0275fac=function(M){return new(M||lf)(e.Y36(T.sK),e.Y36(l.UnsavedChangesGuard),e.Y36(l.SiviModalController),e.Y36(Ct.qu),e.Y36(l.NotifyService),e.Y36(Jp),e.Y36(e.sBO))},lf.\u0275cmp=e.Xpm({type:lf,selectors:[["sivi-mun-set-open-daycare-invoice-setting",8,"page"]],viewQuery:function(M,C){if(1&M&&e.Gf(Cp,7),2&M){let Q;e.iGM(Q=e.CRH())&&(C.contentLoader=Q.first)}},inputs:{invoiceId:"invoiceId",existingStartDates:"existingStartDates"},features:[e.qOj],attrs:["class","page"],decls:47,vars:43,consts:[[3,"closeButton","hideNotifications","closed"],["navbar-title",""],["navbar-buttons-right",""],[3,"clicked",4,"ngIf"],["siviLibForm","",1,"ion-padding",3,"formGroup","siviGoToInvalid"],["content",""],["siviContent",""],[3,"text"],["size","4"],["formControlName","municipalityInvoicingClub","siviLibFormControl","",3,"viewMode","label","options"],["size","3"],["formControlName","validFrom","siviLibFormControl","",3,"errorMessages","readonly","minDate","label"],["class","error-message",4,"ngIf"],["size","4",4,"ngIf"],["formControlName","morningAfternoonCareType","siviLibFormControl","",3,"viewMode","label","options"],[1,"ion-text-right"],["no-min-width","","role","button","fill","outline","class","ion-margin-end",3,"click",4,"ngIf"],["class","container","formArrayName","morningAfternoonCareFees",4,"ngIf"],["formControlName","openCareType","siviLibFormControl","",3,"viewMode","label","options"],["class","container","formArrayName","openCareFees",4,"ngIf"],[3,"clicked"],[1,"error-message"],["formControlName","validUntil","siviLibFormControl","","type","text",3,"readonly","label"],["no-min-width","","role","button","fill","outline",1,"ion-margin-end",3,"click"],["formArrayName","morningAfternoonCareFees",1,"container"],[3,"formGroupName",4,"ngFor","ngForOf","ngForTrackBy"],[3,"formGroupName"],["size","1"],["formControlName","feeValue","siviLibFormControl","","label-position","floating",3,"viewMode","label"],["size","2",1,"ion-align-self-end"],["color","primary","fill","clear","role","button","size","small","no-min-width","","class","ml2",3,"click",4,"ngIf"],["color","primary","fill","clear","role","button","size","small","no-min-width","",1,"ml2",3,"click"],["name","delete"],["formArrayName","openCareFees",1,"container"]],template:function(M,C){1&M&&(e.TgZ(0,"ion-header")(1,"sivi-lib-navbar",0),e.NdJ("closed",function(){return C.onDismiss()}),e.TgZ(2,"div",1),e._uU(3),e.ALo(4,"translate"),e.qZA(),e.TgZ(5,"div",2),e.YNc(6,md,1,0,"sivi-lib-navbar-action-button",3),e.qZA()()(),e.TgZ(7,"ion-content",4,5)(9,"sivi-lib-content-loader",null,6)(11,"h1"),e._uU(12),e.ALo(13,"translate"),e._UZ(14,"sivi-lib-info-popup",7),e.qZA(),e.TgZ(15,"ion-grid")(16,"ion-row")(17,"ion-col",8),e._UZ(18,"sivi-lib-radio-list",9),e.ALo(19,"translate"),e.qZA()(),e.TgZ(20,"ion-row")(21,"ion-col",10),e._UZ(22,"sivi-lib-datepicker",11),e.YNc(23,vg,3,3,"ion-row",12),e.qZA(),e.YNc(24,Vh,2,2,"ion-col",13),e.qZA(),e.TgZ(25,"ion-row")(26,"ion-col",8)(27,"h3"),e._uU(28),e.ALo(29,"translate"),e.qZA(),e._UZ(30,"sivi-lib-radio-list",14),e.ALo(31,"translate"),e.qZA()(),e.TgZ(32,"ion-row")(33,"ion-col",15),e.YNc(34,Qp,4,6,"ion-button",16),e.qZA()(),e.YNc(35,Zh,2,2,"section",17),e.TgZ(36,"ion-row")(37,"ion-col",8)(38,"h3"),e._uU(39),e.ALo(40,"translate"),e.qZA(),e._UZ(41,"sivi-lib-radio-list",18),e.ALo(42,"translate"),e.qZA()(),e.TgZ(43,"ion-row")(44,"ion-col",15),e.YNc(45,wc,4,6,"ion-button",16),e.qZA()(),e.YNc(46,qp,2,2,"section",19),e.qZA()()()),2&M&&(e.xp6(1),e.Q6J("closeButton",!0)("hideNotifications",!0),e.xp6(2),e.hij(" ",e.lcZ(4,29,"Page.MunicipalitySettings.OpenDayCareInvoicing.Title")," "),e.xp6(3),e.Q6J("ngIf",C.editMode),e.xp6(1),e.Q6J("formGroup",C.form)("siviGoToInvalid",C.goToInvalid$),e.xp6(5),e.hij("",e.lcZ(13,31,"Page.MunicipalitySettings.OpenDayCareInvoicing.Title")," "),e.xp6(2),e.Q6J("text","Page.MunicipalitySettings.OpenDayCareInvoicing.Title.Info"),e.xp6(4),e.Q6J("viewMode",!C.editMode)("label",e.lcZ(19,33,"Page.MunicipalitySettings.OpenDayCareInvoicing.Invoicing.Label"))("options",C.basicOptions),e.xp6(4),e.Q6J("errorMessages",C.errorMessage)("readonly",!C.editMode)("minDate",C.tomorrowDate)("label","Form.Label.From"),e.xp6(1),e.Q6J("ngIf",C.isOverlapping),e.xp6(1),e.Q6J("ngIf",C.invoiceId!==C.constants.NEW_ID),e.xp6(4),e.Oqu(e.lcZ(29,35,"Page.MunicipalitySettings.OpenDayCareInvoicing.MorningAndAfternoonCare.Title")),e.xp6(2),e.Q6J("viewMode",!C.editMode)("label",e.lcZ(31,37,"Page.MunicipalitySettings.OpenDayCareInvoicing.MorningAndAfternoonCare.TypeOfFee.Label"))("options",C.typeOfFeeOptions),e.xp6(4),e.Q6J("ngIf",C.editMode),e.xp6(1),e.Q6J("ngIf",C.showMorningAfternoonCareFees),e.xp6(4),e.Oqu(e.lcZ(40,39,"Page.MunicipalitySettings.OpenDayCareInvoicing.OpenDayCare.Title")),e.xp6(2),e.Q6J("viewMode",!C.editMode)("label",e.lcZ(42,41,"Page.MunicipalitySettings.OpenDayCareInvoicing.MorningAndAfternoonCare.TypeOfFee.Label"))("options",C.typeOfFeeOptions),e.xp6(4),e.Q6J("ngIf",C.editMode),e.xp6(1),e.Q6J("ngIf",C.showOpenCareFees))},dependencies:[D.sg,D.O5,E.YG,E.wI,E.W2,E.jY,E.Gu,E.Nd,l.ContentLoaderComponent,l.GoToInvalidDirective,l.NavbarComponent,l.NavbarActionButtonComponent,l.DatepickerComponent,l.SiviFormDirective,l.SiviFormControlDirective,Ct.JJ,Ct.JL,Ct.sg,Ct.u,Ct.x0,Ct.CE,l.InfoPopupComponent,l.RadioListComponent,T.X$],styles:["h1[_ngcontent-%COMP%]{color:var(--ion-color-secondary)}.container[_ngcontent-%COMP%]{background-color:#fff;padding:1.5em;box-shadow:0 5px 5px -3px #0003,0 8px 10px 1px #00000024,0 3px 14px 2px #0000001f}.error-message[_ngcontent-%COMP%]{margin-left:8px;color:var(--ion-color-warning, rgba(204, 0, 0, 0))}"],changeDetection:0});const dm=["siviContent"];function Ch(te,M){if(1&te){const C=e.EpF();e.TgZ(0,"ion-col",9)(1,"sivi-lib-timeframe-card",10),e.NdJ("clickCardHeaderEvent",function(Ye){e.CHM(C);const Zt=e.oxw(2);return e.KtG(Zt.showSettingsPage(Ye))}),e.qZA()()}if(2&te){const C=M.$implicit;e.xp6(1),e.Q6J("id",C.id)("title",C.title)("viewMode",!0)("isFooterHidden",!0)("isBodyHidden",!0)}}function Ov(te,M){if(1&te&&(e.TgZ(0,"ion-grid")(1,"ion-row"),e.YNc(2,Ch,2,5,"ion-col",8),e.qZA()()),2&te){const C=e.oxw();e.xp6(2),e.Q6J("ngForOf",C.currentInvoiceSettings)("ngForTrackBy",C.trackByFn)}}function Qf(te,M){if(1&te){const C=e.EpF();e.TgZ(0,"ion-col",9)(1,"sivi-lib-timeframe-card",10),e.NdJ("clickCardHeaderEvent",function(Ye){e.CHM(C);const Zt=e.oxw(2);return e.KtG(Zt.showSettingsPage(Ye))}),e.qZA()()}if(2&te){const C=M.$implicit;e.xp6(1),e.Q6J("id",C.id)("title",C.title)("viewMode",!0)("isFooterHidden",!0)("isBodyHidden",!0)}}function yg(te,M){if(1&te&&(e.TgZ(0,"ion-grid")(1,"ion-row"),e.YNc(2,Qf,2,5,"ion-col",8),e.qZA()()),2&te){const C=e.oxw();e.xp6(2),e.Q6J("ngForOf",C.futureInvoiceSettings)("ngForTrackBy",C.trackByFn)}}function Mb(te,M){if(1&te){const C=e.EpF();e.TgZ(0,"ion-col",9)(1,"sivi-lib-timeframe-card",10),e.NdJ("clickCardHeaderEvent",function(Ye){e.CHM(C);const Zt=e.oxw(2);return e.KtG(Zt.showSettingsPage(Ye))}),e.qZA()()}if(2&te){const C=M.$implicit;e.xp6(1),e.Q6J("id",C.id)("title",C.title)("viewMode",!0)("isFooterHidden",!0)("isBodyHidden",!0)}}function Tb(te,M){if(1&te&&(e.TgZ(0,"ion-grid")(1,"ion-row"),e.YNc(2,Mb,2,5,"ion-col",8),e.qZA()()),2&te){const C=e.oxw();e.xp6(2),e.Q6J("ngForOf",C.expiredInvoiceSettings)("ngForTrackBy",C.trackByFn)}}function x_(te,M){1&te&&(e.TgZ(0,"p",11),e._uU(1),e.ALo(2,"translate"),e.qZA()),2&te&&(e.xp6(1),e.Oqu(e.lcZ(2,1,"Message.NoDataFound")))}class Mp extends l.SiviPage{constructor(M,C,Q,Ye,Zt,Pi){super(M,C,Zt),this.notify=M,this.translateService=C,this.modalCtrl=Q,this.route=Ye,this.router=Zt,this.openDayMornAftCareService=Pi}ngOnInit(){this.getCareInvoiceSettings()}getCareInvoiceSettings(){this.currentInvoiceSettings=[],this.futureInvoiceSettings=[],this.expiredInvoiceSettings=[],this.contentLoader.showLoader(),this.openDayMornAftCareService.getInvoiceSettings().subscribe({next:M=>{M.forEach(C=>{C.title=this.getTitle(C),this.sortSettingByState(C)}),this.contentLoader.hideLoader(),this.restoreModal()},error:M=>{console.error("Failed to load care settings",M),this.notify.alertBackendError(M),this.contentLoader.hideLoader()}})}getTitle({validFrom:M,validUntil:C=""}){return M=l.Utils.convertDateToFinnishStandard(M),C&&(C=l.Utils.convertDateToFinnishStandard(C)),`${M} - ${C||""}`}sortSettingByState(M){switch(M.state){case l.Constants.CURRENT:this.currentInvoiceSettings.push(M);break;case l.Constants.FUTURE:this.futureInvoiceSettings.push(M);break;case l.Constants.EXPIRED:this.expiredInvoiceSettings.push(M);break;default:M.state,console.warn("Invalid state",M.state)}}showNewSettingsPage(){this.showSettingsPage(l.Constants.NEW_ID)}showSettingsPage(M){var C=this;return(0,o.Z)(function*(){const Q=[...C.currentInvoiceSettings??[],...C.futureInvoiceSettings??[]];yield(yield C.modalCtrl.openModal({component:lf,componentProps:{invoiceId:M,existingStartDates:C.getExistingStartDates(M,Q)},backdropDismiss:!1,cssClass:"modal-full-size"},"invoiceId",M)).onDidDismiss(),C.getCareInvoiceSettings()})()}restoreModal(){var M=this;return(0,o.Z)(function*(){const C=M.route.snapshot.queryParamMap.get("invoiceId");C&&(yield M.showSettingsPage(C))})()}getExistingStartDates(M,C){return C.filter(Ye=>Ye.id!==M).map(Ye=>Ye.validFrom)}onDismiss(){this.modalCtrl.dismiss(null)}}Mp.\u0275fac=function(M){return new(M||Mp)(e.Y36(l.NotifyService),e.Y36(T.sK),e.Y36(l.SiviModalController),e.Y36(j.gz),e.Y36(j.F0),e.Y36(Jp))},Mp.\u0275cmp=e.Xpm({type:Mp,selectors:[["sivi-mun-set-open-daycare-invoice-settings"]],viewQuery:function(M,C){if(1&M&&e.Gf(dm,7),2&M){let Q;e.iGM(Q=e.CRH())&&(C.contentLoader=Q.first)}},features:[e.qOj],decls:26,vars:20,consts:[[3,"closeButton","hideNotifications","closed"],["navbar-title",""],["siviKeyboardEvents","","tabindex","0","role","link",3,"siviClick"],["siviContent",""],[1,"invoice-settings"],[4,"ngIf","ngIfElse"],[1,"invoice-settings","future-invoice-settings"],["noDataFound",""],["class","generic-card-container",4,"ngFor","ngForOf","ngForTrackBy"],[1,"generic-card-container"],[1,"generic-card-container",3,"id","title","viewMode","isFooterHidden","isBodyHidden","clickCardHeaderEvent"],[1,"no-data-found"]],template:function(M,C){if(1&M&&(e.TgZ(0,"ion-header")(1,"sivi-lib-navbar",0),e.NdJ("closed",function(){return C.onDismiss()}),e.TgZ(2,"div",1),e._uU(3),e.ALo(4,"translate"),e.qZA()()(),e.TgZ(5,"ion-content")(6,"cgi-fab",2),e.NdJ("siviClick",function(){return C.showNewSettingsPage()}),e.qZA(),e.TgZ(7,"sivi-lib-content-loader",null,3)(9,"section",4)(10,"h1"),e._uU(11),e.ALo(12,"translate"),e.qZA(),e.YNc(13,Ov,3,2,"ion-grid",5),e.qZA(),e.TgZ(14,"section",6)(15,"h1"),e._uU(16),e.ALo(17,"translate"),e.qZA(),e.YNc(18,yg,3,2,"ion-grid",5),e.qZA(),e.TgZ(19,"section",4)(20,"h1"),e._uU(21),e.ALo(22,"translate"),e.qZA(),e.YNc(23,Tb,3,2,"ion-grid",5),e.qZA()(),e.YNc(24,x_,3,3,"ng-template",null,7,e.W1O),e.qZA()),2&M){const Q=e.MAs(25);e.xp6(1),e.Q6J("closeButton",!0)("hideNotifications",!0),e.xp6(2),e.hij(" ",e.lcZ(4,12,"Page.MunicipalitySettings.OpenDayCareInvoicing.Title")," "),e.xp6(8),e.Oqu(e.lcZ(12,14,"General.Text.Active")),e.xp6(2),e.Q6J("ngIf",C.currentInvoiceSettings.length>0)("ngIfElse",Q),e.xp6(3),e.Oqu(e.lcZ(17,16,"General.Text.Future")),e.xp6(2),e.Q6J("ngIf",C.futureInvoiceSettings.length>0)("ngIfElse",Q),e.xp6(3),e.Oqu(e.lcZ(22,18,"General.Text.History")),e.xp6(2),e.Q6J("ngIf",C.expiredInvoiceSettings.length>0)("ngIfElse",Q)}},dependencies:[l.TimeframeCardComponent,D.sg,D.O5,E.wI,E.W2,E.jY,E.Gu,E.Nd,l.ContentLoaderComponent,l.KeyboardEventsDirective,l.NavbarComponent,T.X$],styles:[".invoice-settings[_ngcontent-%COMP%]{padding:2em}.invoice-settings[_ngcontent-%COMP%]   h1[_ngcontent-%COMP%]{margin:.25em 0 .25em .75em}.invoice-settings.future-invoice-settings[_ngcontent-%COMP%]{background-color:var(--ion-color-light, #f1f6f8)}.no-data-found[_ngcontent-%COMP%]{font-weight:700;color:var(--ion-color-primary);margin-left:1.25em}"]});class Jg{}Jg.\u0275fac=function(M){return new(M||Jg)},Jg.\u0275mod=e.oAB({type:Jg}),Jg.\u0275inj=e.cJS({providers:[Jp],imports:[Gi,l.NavbarComponentModule,l.DatepickerModule,l.SiviFormsModule,l.InfoPopupComponentModule,st.p0,nn.Ps,l.RadioListComponentModule]});class bg{}bg.\u0275fac=function(M){return new(M||bg)},bg.\u0275mod=e.oAB({type:bg}),bg.\u0275inj=e.cJS({providers:[l.SiviModalController,Jp],imports:[l.TimeframeCardComponentModule,Gi,l.NavbarComponentModule,Jg]});class fd extends l.Entity{}class Wh extends l.Entity{}class Cg extends l.Entity{}class zd extends l.AbstractRestService{constructor(M,C){super(M,C),this.http=M,this.siviProjectsGateway=C}savePeriod(M){let C="./api/sivi-ada-api/application-period/";return M.id&&(C+=M.id),this.saveEntity(M,C)}deletePeriod(M){const C=`./api/sivi-ada-api/application-period/${M.id}`;return this.delete(C)}getPeriodsByMunicipality(M){const C=`./api/sivi-ada-api/application-period/municipalityId/${M}`;return this.get(C)}getPlannedUnits(M,C){const Q=`./api/sivi-ada-api/org-preprimary-periods/orgperiod/${M}/${C}`;return this.get(Q)}getAreas(M){const C=`./api/sivi-accounts-api/orgs/municipality-areas?municipalityId=${M}`;return this.get(C)}}function Ga(te,M){if(1&te&&(e.TgZ(0,"ion-col",1),e._UZ(1,"sivi-lib-datepicker",7),e.qZA()),2&te){const C=e.oxw();e.xp6(1),e.Q6J("readonly",C.readonly)("label","Page.MunicipalitySettings.PeriodsAndPlannedUnits.TwoYearPpeTrialPeriodEnds")("value",C.value.twoYearPeriodEnd)("minDate",C.minDateForTwoYearPpe)}}zd.\u0275fac=function(M){return new(M||zd)(e.LFG(g.eN),e.LFG(l.SiviProjectsGatewayService))},zd.\u0275prov=e.Yz7({token:zd,factory:zd.\u0275fac,providedIn:"root"});class hd extends l.SiviAbstractForm{constructor(M,C,Q){super(M),this.translate=M,this.elementRef=C,this.fb=Q,this.readonly=!1,this.componentStatus=new e.vpe,this.update=new e.vpe,this.form=this.fb.group({periodEnd:[""],periodStart:[""],enrollmentStart:[""],enrollmentEnd:[""],twoYearPeriodEnd:[""]})}ngOnInit(){this.initForm(),this.setValidators(),super.ngOnInit(),this.minDateForTwoYearPpe=rn(this.value.periodStart).add(1,"days").toString()}initForm(){this.form.patchValue(this.value)}onFormValueChange(M){this.update.emit(M)}onFormStatusChange(M){this.componentStatus.emit(M)}setValidators(){const M=[l.SiviValidators.required,l.SiviValidators.validateDate()];this.form.get("periodEnd").setValidators([...M,l.SiviValidators.validateIfSameOrBeforeThan("periodStart")]),this.form.get("periodStart").setValidators([...M,l.SiviValidators.validateControl("periodEnd")]),this.form.get("enrollmentStart").setValidators([...M,l.SiviValidators.validateControl("enrollmentEnd")]),this.form.get("enrollmentEnd").setValidators([...M,l.SiviValidators.validateIfSameOrBeforeThan("enrollmentStart")]),"prePrimaryPeriod"===this.name&&this.form.get("twoYearPeriodEnd").setValidators([l.SiviValidators.validateDate(),l.SiviValidators.validateIfSameOrBeforeThan("periodStart")])}countMinDateForTwoYearPpe(M){this.minDateForTwoYearPpe=rn(M.value).add(1,"days").toString()}}function Eh(te,M){if(1&te){const C=e.EpF();e.TgZ(0,"cgi-icon",8),e.NdJ("siviClick",function(){e.CHM(C);const Ye=e.oxw();return e.KtG(Ye.onDeleteClick())}),e.qZA()}if(2&te){const C=e.oxw();e.uIk("aria-label",C.removePeriodLabel)}}hd.\u0275fac=function(M){return new(M||hd)(e.Y36(T.sK),e.Y36(e.SBq),e.Y36(Ct.QS))},hd.\u0275cmp=e.Xpm({type:hd,selectors:[["sivi-mun-set-date-period"]],inputs:{name:"name",value:"value",title:"title",readonly:"readonly"},outputs:{componentStatus:"componentStatus",update:"update"},features:[e.qOj],decls:18,vars:16,consts:[["siviLibForm","",3,"formGroup"],["size","12","size-md","6"],["siviLibFormControl","","formControlName","periodStart",3,"readonly","label","value"],["siviLibFormControl","","formControlName","periodEnd",3,"readonly","label","value","minDate"],["size","12","size-md","6",4,"ngIf"],["siviLibFormControl","","formControlName","enrollmentStart",3,"readonly","label","value"],["siviLibFormControl","","formControlName","enrollmentEnd",3,"readonly","label","value"],["siviLibFormControl","","formControlName","twoYearPeriodEnd",3,"readonly","label","value","minDate"]],template:function(M,C){1&M&&(e.TgZ(0,"ion-grid",0)(1,"ion-row")(2,"ion-col")(3,"h4"),e._uU(4),e.qZA()()(),e.TgZ(5,"ion-row")(6,"ion-col",1),e._UZ(7,"sivi-lib-datepicker",2),e.qZA(),e.TgZ(8,"ion-col",1),e._UZ(9,"sivi-lib-datepicker",3),e.qZA()(),e.TgZ(10,"ion-row"),e._UZ(11,"ion-col",1),e.YNc(12,Ga,2,4,"ion-col",4),e.qZA(),e.TgZ(13,"ion-row")(14,"ion-col"),e._UZ(15,"sivi-lib-datepicker",5),e.qZA(),e.TgZ(16,"ion-col"),e._UZ(17,"sivi-lib-datepicker",6),e.qZA()()()),2&M&&(e.Q6J("formGroup",C.form),e.xp6(4),e.hij(" ",C.title," "),e.xp6(3),e.Q6J("readonly",C.readonly)("label","Page.MunicipalitySettings.PeriodsAndPlannedUnits.PeriodStarts")("value",C.value.periodStart),e.xp6(2),e.Q6J("readonly",C.readonly)("label","Page.MunicipalitySettings.PeriodsAndPlannedUnits.PeriodEnds")("value",C.value.periodEnd)("minDate",C.value.periodStart),e.xp6(3),e.Q6J("ngIf","prePrimaryPeriod"===C.name),e.xp6(3),e.Q6J("readonly",C.readonly)("label","Page.MunicipalitySettings.PeriodsAndPlannedUnits.EnrollmentStarts")("value",C.value.enrollmentStart),e.xp6(2),e.Q6J("readonly",C.readonly)("label","Page.MunicipalitySettings.PeriodsAndPlannedUnits.EnrollmentEnds")("value",C.value.enrollmentEnd))},dependencies:[D.O5,E.wI,E.jY,E.Nd,l.DatepickerComponent,l.SiviFormDirective,l.SiviFormControlDirective,Ct.JJ,Ct.JL,Ct.sg,Ct.u],styles:["ion-col[_ngcontent-%COMP%]{padding-top:0;padding-bottom:0}"]});class Al extends l.SiviAbstractForm{set period(M){this.periodInstance=M,this.initPeriods(M)}constructor(M,C,Q,Ye){super(C),this.route=M,this.translate=C,this.notify=Q,this.fb=Ye,this.readonly=!1,this.update=new e.vpe,this.deletePeriod=new e.vpe,this.errorMessages={period:"",enrollment:""},this.removePeriodLabel=this.translate.instant("Message.Delete.Period",{name:this.translate.instant("Municipality.Period.Singular")}),this.periodsValidity={ppe:!1,club:!1},this.form=this.fb.group({periodName:["",l.SiviValidators.required]})}initPeriods(M){this.prePrimaryPeriod={periodStart:M.periodStart,periodEnd:M.periodEnd,twoYearPeriodEnd:M.twoYearPeriodEnd,enrollmentStart:M.enrollmentStart,enrollmentEnd:M.enrollmentEnd},this.clubPeriod={periodStart:M.clubPeriodStart,periodEnd:M.clubPeriodEnd,enrollmentStart:M.clubEnrollmentStart,enrollmentEnd:M.clubEnrollmentEnd},this.form.get("periodName").patchValue(M.periodName),this.form.get("periodName").setValidators([l.SiviValidators.required])}onDeleteClick(){this.deletePeriod.emit(this.periodInstance)}generatePayload(){return{...this.periodInstance,...this.prePrimaryPeriod,clubPeriodStart:this.clubPeriod.periodStart,clubPeriodEnd:this.clubPeriod.periodEnd,clubEnrollmentStart:this.clubPeriod.enrollmentStart,clubEnrollmentEnd:this.clubPeriod.enrollmentEnd,periodName:this.form.value.periodName}}onFormValueChange(){this.emitForm()}onUpdatePPEPeriod(M){this.prePrimaryPeriod=M,this.emitForm()}onUpdateClubPeriod(M){this.clubPeriod=M,this.emitForm()}onChangePPEPeriodStatus(M){this.periodsValidity.ppe=M}onChangeClubPeriodStatus(M){this.periodsValidity.club=M}checkValidity(){return this.isValid&&this.periodsValidity.ppe&&this.periodsValidity.club}emitForm(){const M=this.generatePayload();(0,He.isEqual)(M,this.periodInstance)||this.update.emit(M)}}function pm(te,M){if(1&te){const C=e.EpF();e.TgZ(0,"ion-col",7)(1,"ion-item",8)(2,"ion-checkbox",9),e.NdJ("ionChange",function(Ye){const Pi=e.CHM(C).index,Ir=e.oxw();return e.KtG(Ir.onChangeArea(Ye,Pi))}),e.qZA(),e.TgZ(3,"ion-label"),e._uU(4),e.qZA()()()}if(2&te){const C=M.$implicit;e.xp6(2),e.Q6J("value",C.id)("checked",C.selected),e.uIk("aria-label",C.name),e.xp6(1),e.uIk("aria-checked",C.selected)("aria-label",C.name),e.xp6(1),e.hij(" ",C.name," ")}}function Yd(te,M){if(1&te){const C=e.EpF();e.TgZ(0,"ion-col",7)(1,"ion-item",8)(2,"ion-checkbox",9),e.NdJ("ionChange",function(Ye){e.CHM(C);const Zt=e.oxw();return e.KtG(Zt.onChangeServiceForm(Ye))}),e.qZA(),e.TgZ(3,"ion-label"),e._uU(4),e.ALo(5,"translate"),e.qZA()()()}if(2&te){const C=M.$implicit;e.xp6(2),e.Q6J("value",C.daycareType)("checked",C.selected),e.uIk("aria-label",C.daycareType),e.xp6(1),e.uIk("aria-checked",C.selected)("aria-label",C.daycareType),e.xp6(1),e.hij(" ",e.lcZ(5,6,C.daycareType)," ")}}function Ya(te,M){1&te&&(e.TgZ(0,"div",10),e._uU(1),e.ALo(2,"translate"),e.qZA()),2&te&&(e.xp6(1),e.hij(" ",e.lcZ(2,1,"Message.NoDataFound")," "))}function Im(te,M){1&te&&(e.TgZ(0,"th",21),e._uU(1),e.ALo(2,"translate"),e.qZA()),2&te&&(e.xp6(1),e.hij(" ",e.lcZ(2,1,"Page.MunicipalitySettings.PeriodsAndPlannedUnits.Unit")," "))}function cf(te,M){if(1&te&&(e.TgZ(0,"td",22),e._uU(1),e.qZA()),2&te){const C=M.$implicit;e.xp6(1),e.Oqu(C.unit)}}function Lv(te,M){1&te&&(e.TgZ(0,"th",21),e._uU(1),e.ALo(2,"translate"),e.qZA()),2&te&&(e.xp6(1),e.hij(" ",e.lcZ(2,1,"Page.MunicipalitySettings.PeriodsAndPlannedUnits.PreprimaryEducationEnrollment")," "))}function Fc(te,M){if(1&te){const C=e.EpF();e.TgZ(0,"td",22)(1,"ion-checkbox",23),e.NdJ("ionChange",function(Ye){const Pi=e.CHM(C).$implicit,Ir=e.oxw(2);return e.KtG(Ir.onChangeCheckbox(Ye,Pi.id))}),e.qZA()()}if(2&te){const C=M.$implicit,Q=e.oxw(2);e.xp6(1),e.Q6J("checked",C.PPE)("disabled",Q.readonly)}}function gd(te,M){1&te&&(e.TgZ(0,"th",21),e._uU(1),e.ALo(2,"translate"),e.qZA()),2&te&&(e.xp6(1),e.hij(" ",e.lcZ(2,1,"Page.MunicipalitySettings.PeriodsAndPlannedUnits.Club")," "))}function xb(te,M){if(1&te){const C=e.EpF();e.TgZ(0,"td",22)(1,"ion-checkbox",24),e.NdJ("ionChange",function(Ye){const Pi=e.CHM(C).$implicit,Ir=e.oxw(2);return e.KtG(Ir.onChangeCheckbox(Ye,Pi.id))}),e.qZA()()}if(2&te){const C=M.$implicit,Q=e.oxw(2);e.xp6(1),e.Q6J("checked",C.club)("disabled",Q.readonly)}}function uf(te,M){1&te&&(e.TgZ(0,"th",21),e._uU(1),e.ALo(2,"translate"),e.qZA()),2&te&&(e.xp6(1),e.hij(" ",e.lcZ(2,1,"Area.Singular")," "))}function jl(te,M){if(1&te&&(e.TgZ(0,"td",22),e._uU(1),e.qZA()),2&te){const C=M.$implicit;e.xp6(1),e.hij(" ",C.area," ")}}function Eg(te,M){1&te&&e._UZ(0,"tr",25)}function Gm(te,M){1&te&&e._UZ(0,"tr",26),2&te&&e.uIk("tabindex",0)}function qd(te,M){if(1&te&&(e.TgZ(0,"ion-row",11)(1,"table",12),e.ynx(2,13),e.YNc(3,Im,3,3,"th",14),e.YNc(4,cf,2,1,"td",15),e.BQk(),e.ynx(5,16),e.YNc(6,Lv,3,3,"th",14),e.YNc(7,Fc,2,2,"td",15),e.BQk(),e.ynx(8,17),e.YNc(9,gd,3,3,"th",14),e.YNc(10,xb,2,2,"td",15),e.BQk(),e.ynx(11,18),e.YNc(12,uf,3,3,"th",14),e.YNc(13,jl,2,1,"td",15),e.BQk(),e.YNc(14,Eg,1,0,"tr",19),e.YNc(15,Gm,1,1,"tr",20),e.qZA()()),2&te){const C=e.oxw();e.xp6(1),e.Q6J("dataSource",C.dataSource),e.xp6(13),e.Q6J("matHeaderRowDef",C.displayedColumns),e.xp6(1),e.Q6J("matRowDefColumns",C.displayedColumns)}}Al.\u0275fac=function(M){return new(M||Al)(e.Y36(j.gz),e.Y36(T.sK),e.Y36(l.NotifyService),e.Y36(Ct.QS))},Al.\u0275cmp=e.Xpm({type:Al,selectors:[["sivi-mun-set-municipality-period"]],inputs:{period:"period",readonly:"readonly"},outputs:{update:"update",deletePeriod:"deletePeriod"},features:[e.qOj],decls:17,vars:20,consts:[["siviLibForm","",3,"formGroup"],[1,"flex-nowrap","flex","text-primary"],[1,"ion-no-margin"],["tabindex","0","role","button","siviKeyboardEvents","","name","delete","class","pointer ion-margin-start",3,"siviClick",4,"ngIf"],["size","12","size-md","6"],["siviLibFormControl","","formControlName","periodName","type","text","label-position","floating",3,"viewMode","label"],["name","prePrimaryPeriod",3,"readonly","value","title","componentStatus","update"],["name","clubPeriod",3,"readonly","value","title","componentStatus","update"],["tabindex","0","role","button","siviKeyboardEvents","","name","delete",1,"pointer","ion-margin-start",3,"siviClick"]],template:function(M,C){1&M&&(e.TgZ(0,"div",0)(1,"ion-grid")(2,"ion-row")(3,"ion-col")(4,"div",1)(5,"h3",2),e._uU(6),e.qZA(),e.YNc(7,Eh,1,1,"cgi-icon",3),e.qZA()()(),e.TgZ(8,"ion-row")(9,"ion-col",4),e._UZ(10,"cgi-input",5),e.ALo(11,"translate"),e.ALo(12,"translate"),e.qZA()()(),e.TgZ(13,"sivi-mun-set-date-period",6),e.NdJ("componentStatus",function(Ye){return C.onChangePPEPeriodStatus(Ye)})("update",function(Ye){return C.onUpdatePPEPeriod(Ye)}),e.ALo(14,"translate"),e.qZA(),e.TgZ(15,"sivi-mun-set-date-period",7),e.NdJ("componentStatus",function(Ye){return C.onChangeClubPeriodStatus(Ye)})("update",function(Ye){return C.onUpdateClubPeriod(Ye)}),e.ALo(16,"translate"),e.qZA()()),2&M&&(e.Q6J("formGroup",C.form),e.xp6(6),e.hij(" ",C.form.value.periodName," "),e.xp6(1),e.Q6J("ngIf",!C.readonly),e.xp6(3),e.Q6J("viewMode",C.readonly)("label",e.lcZ(11,12,"Page.MunicipalitySettings.PeriodsAndPlannedUnits.PeriodName")),e.uIk("aria-label",e.lcZ(12,14,"Page.MunicipalitySettings.PeriodsAndPlannedUnits.PeriodName")),e.xp6(3),e.Q6J("readonly",C.readonly)("value",C.prePrimaryPeriod)("title",e.lcZ(14,16,"sivi.organization.languagefocus.type.preschool")),e.xp6(2),e.Q6J("readonly",C.readonly)("value",C.clubPeriod)("title",e.lcZ(16,18,"sivi.organization.type.daycareplace.type.opendaycare")))},dependencies:[D.O5,E.wI,E.jY,E.Nd,l.KeyboardEventsDirective,hd,l.SiviFormDirective,l.SiviFormControlDirective,Ct.JJ,Ct.JL,Ct.sg,Ct.u,T.X$],styles:[".delete-button[_ngcontent-%COMP%]{line-height:0}ion-col[_ngcontent-%COMP%]{padding-bottom:0}ion-grid[_ngcontent-%COMP%]{padding-bottom:24px}"]});class Tp extends l.SiviPage{constructor(M,C,Q,Ye,Zt){super(Q,M,Ye),this.translate=M,this.periodsService=C,this.notify=Q,this.router=Ye,this.cdRef=Zt,this.areas=[],this.readonly=!1,this.update=new e.vpe,this.serviceFormList=[{daycareType:l.OrganizationTypes.DAYCAREPLACE_TYPE_DAYCARE_CENTRE,selected:!0},{daycareType:l.OrganizationTypes.DAYCAREPLACE_TYPE_OPEN_DAYCARE,selected:!0}],this.allSelected$=new ke.X(!0),this.tempDataTableRows=[],this.dataSource=new st.by,this.displayedColumns=["unit","PPE","club","area"]}ngOnInit(){this.allSelected$.next(this.isAllSelected(this.areas)),this.tempDataTableRows=(0,ve.Z)(this.period.units),this.redrawTable()}ngAfterContentChecked(){this.cdRef.detectChanges()}onChangeArea(M,C){const Q=(0,ve.Z)(this.areas);Q[C]={...Q[C],selected:M.detail.checked},this.areas=[...Q],this.allSelected$.next(this.isAllSelected(Q)),this.redrawTable()}onChangeServiceForm(M){const C=this.serviceFormList.findIndex(Q=>Q.daycareType===M.detail.value);if(C>-1){const Q=(0,ve.Z)(this.serviceFormList);Q[C]={...Q[C],selected:M.detail.checked},this.serviceFormList=[...Q],this.redrawTable()}}toggleAll(){const M=!this.allSelected$.value,C=[...this.areas];C.forEach(Q=>Q.selected=M),this.areas=[...C],this.allSelected$.next(M)}updateTableData(M){if(this.dataSource=new st.by([]),!M)return void(this.dataSource.data=[]);const C=[];for(const Q of M){const Ye={unit:Q.organizationName,PPE:Q.preprimary,club:Q.club,area:Q.areaName,id:Q.organizationId};C.push(Ye)}this.dataSource.data=C.sort((Q,Ye)=>Q.unit.localeCompare(Ye.unit,"fi"))}onChangeCheckbox(M,C){const Q=this.tempDataTableRows.findIndex(Ye=>Ye.organizationId===C);Q>=0?(this.tempDataTableRows[Q][M.detail.value]=M.detail.checked,this.emitData()):console.error("Invalid row",C)}emitData(){this.period.units=this.tempDataTableRows,this.update.emit(this.period)}redrawTable(M){const C=M||this.tempDataTableRows,Q=this.filterUnits(C);this.updateTableData(Q)}isAllSelected(M){return M.every(C=>C.selected)}filterUnits(M){if(!M||!M.length)return[];const C=this.filterUnitsByAreas(M);return this.filterUnitsByServiceForm(C)}filterUnitsByAreas(M){const C=this.areas.filter(Q=>Q.selected).map(Q=>Q.id);return M.filter(Q=>{let Ye=!1;for(const Zt of C)if(Q.areaId===Zt){Ye=!0;break}return Ye})}filterUnitsByServiceForm(M){const C=this.serviceFormList.filter(Q=>Q.selected).map(Q=>Q.daycareType);return M.filter(Q=>C.includes(Q.daycareType))}}Tp.\u0275fac=function(M){return new(M||Tp)(e.Y36(T.sK),e.Y36(zd),e.Y36(l.NotifyService),e.Y36(j.F0),e.Y36(e.sBO))},Tp.\u0275cmp=e.Xpm({type:Tp,selectors:[["sivi-mun-set-municipality-planned-units"]],inputs:{municipalityId:"municipalityId",period:"period",areas:"areas",readonly:"readonly"},outputs:{update:"update"},features:[e.qOj],decls:31,vars:23,consts:[[1,"subtitle"],[1,"ion-no-padding"],["lines","none","tabindex","0","siviKeyboardEvents","",1,"ion-no-padding",3,"siviClick"],["role","switch","tabindex","-1",3,"checked"],["size-xs","12","size-sm","4","size-lg","3",4,"ngFor","ngForOf","ngForTrackBy"],["class","mat-elevation-z8 no-data-div",4,"ngIf","ngIfElse"],["table",""],["size-xs","12","size-sm","4","size-lg","3"],["lines","none"],["role","checked",1,"ion-margin-end",3,"value","checked","ionChange"],[1,"mat-elevation-z8","no-data-div"],[1,"data-table-padding"],["mat-table","",1,"mat-elevation-z8",3,"dataSource"],["matColumnDef","unit"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","PPE"],["matColumnDef","club"],["matColumnDef","area"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","","siviKeyboardEvents","","role","link",4,"matRowDef","matRowDefColumns"],["mat-header-cell",""],["mat-cell",""],["name","PPE","value","preprimary",3,"checked","disabled","ionChange"],["name","club","value","club",3,"checked","disabled","ionChange"],["mat-header-row",""],["mat-row","","siviKeyboardEvents","","role","link"]],template:function(M,C){if(1&M&&(e.TgZ(0,"ion-grid")(1,"ion-row")(2,"ion-col")(3,"h2",0),e._uU(4),e.ALo(5,"translate"),e.qZA()()(),e.TgZ(6,"ion-row")(7,"ion-col")(8,"h3"),e._uU(9),e.ALo(10,"translate"),e.qZA()()(),e.TgZ(11,"ion-row")(12,"ion-col",1)(13,"ion-item",2),e.NdJ("siviClick",function(){return C.toggleAll()}),e._UZ(14,"ion-toggle",3),e.ALo(15,"translate"),e.TgZ(16,"ion-label"),e._uU(17),e.ALo(18,"translate"),e.qZA()()()(),e.TgZ(19,"ion-row"),e.YNc(20,pm,5,6,"ion-col",4),e.qZA(),e.TgZ(21,"ion-row")(22,"ion-col")(23,"h2",0),e._uU(24),e.ALo(25,"translate"),e.qZA()()(),e.TgZ(26,"ion-row"),e.YNc(27,Yd,6,8,"ion-col",4),e.qZA(),e.YNc(28,Ya,3,3,"div",5),e.YNc(29,qd,16,3,"ng-template",null,6,e.W1O),e.qZA()),2&M){const Q=e.MAs(30);e.xp6(4),e.hij(" ",e.lcZ(5,13,"Page.MunicipalitySettings.PeriodsAndPlannedUnits.ShowAreas")," "),e.xp6(5),e.Oqu(e.lcZ(10,15,"Page.MunicipalitySettings.PeriodsAndPlannedUnits.ShowAllAreas")),e.xp6(5),e.Q6J("checked",C.allSelected$.value),e.uIk("aria-label",e.lcZ(15,17,"Page.MunicipalitySettings.PeriodsAndPlannedUnits.ShowAreas"))("aria-checked",C.allSelected$.value),e.xp6(3),e.hij("",e.lcZ(18,19,C.allSelected$.value?"General.Buttons.State.On":"General.Buttons.State.Off")," "),e.xp6(3),e.Q6J("ngForOf",C.areas)("ngForTrackBy",C.trackByFn),e.xp6(4),e.hij(" ",e.lcZ(25,21,"ECEC.Application.Title.ServiceForm")," "),e.xp6(3),e.Q6J("ngForOf",C.serviceFormList)("ngForTrackBy",C.trackByFn),e.xp6(1),e.Q6J("ngIf",!C.dataSource.data||!C.dataSource.data.length)("ngIfElse",Q)}},dependencies:[D.sg,D.O5,E.nz,E.wI,E.jY,E.Ie,E.Q$,E.Nd,E.ho,E.w,l.KeyboardEventsDirective,st.BZ,st.fO,st.as,st.w1,st.Dz,st.nj,st.ge,st.ev,st.XQ,st.Gk,T.X$],styles:["table.mat-mdc-table[_ngcontent-%COMP%]{width:100%}table.mat-mdc-table[_ngcontent-%COMP%]   .mat-column-unit[_ngcontent-%COMP%], table.mat-mdc-table[_ngcontent-%COMP%]   .mat-column-area[_ngcontent-%COMP%]{width:30%}table.mat-mdc-table[_ngcontent-%COMP%]   .mat-column-PPE[_ngcontent-%COMP%], table.mat-mdc-table[_ngcontent-%COMP%]   .mat-column-club[_ngcontent-%COMP%]{width:20%;text-align:center}table.mat-mdc-table[_ngcontent-%COMP%]   .mat-column-error[_ngcontent-%COMP%]{width:100%;text-align:center}.no-data-div[_ngcontent-%COMP%]{width:100%;text-align:center;padding:20px}.data-table-padding[_ngcontent-%COMP%]{padding-left:17px;padding-right:17px}ion-col[_ngcontent-%COMP%]{padding-bottom:0;padding-top:0}table[_ngcontent-%COMP%]{margin-top:10px}ion-checkbox[_ngcontent-%COMP%]{vertical-align:middle}h2[_ngcontent-%COMP%]{margin-bottom:16px}"]});const df=["contentLoader"],Fp=["municipalityPeriod"],xy=["unitLoader"],Xs=["areaLoader"];function nd(te,M){if(1&te){const C=e.EpF();e.TgZ(0,"sivi-lib-navbar-action-button",13),e.NdJ("clicked",function(){e.CHM(C);const Ye=e.oxw();return e.KtG(Ye.onSavePeriod())}),e.qZA()}}function Df(te,M){1&te&&(e.TgZ(0,"div"),e._UZ(1,"sivi-lib-content-loader",14,15),e.TgZ(3,"div",16),e._UZ(4,"sivi-lib-content-loader",17,18),e.qZA()()),2&te&&(e.xp6(1),e.Q6J("loadingByDefault",!0)("secondaryMode",!0)("skeleton","form"),e.xp6(3),e.Q6J("loadingByDefault",!0)("secondaryMode",!0))}function Db(te,M){if(1&te){const C=e.EpF();e.TgZ(0,"sivi-mun-set-municipality-planned-units",20),e.NdJ("update",function(Ye){e.CHM(C);const Zt=e.oxw(2);return e.KtG(Zt.onUpdatePeriod(Ye))}),e.qZA()}if(2&te){const C=e.oxw(2);e.Q6J("period",C.period)("readonly",C.readonly)("municipalityId",C.municipalityId)("areas",C.areas)}}function Sf(te,M){if(1&te&&e.YNc(0,Db,1,4,"sivi-mun-set-municipality-planned-units",19),2&te){const C=e.oxw();e.Q6J("ngIf",C.period.id&&!C.loading&&!C.newPeriod)}}class Mh extends l.SiviPage{constructor(M,C,Q,Ye,Zt,Pi,Ir,xo){super(Q,M,Zt),this.translate=M,this.periodsService=C,this.notify=Q,this.route=Ye,this.router=Zt,this.modalCtrl=Pi,this.siviProjectsGatewayService=Ir,this.unsavedChanges=xo,this.areas=[],this.loading=!1,this.newPeriod=!1}canDeactivate(){return(0,X.Z)(this.originalEntities,this.period)}ngOnInit(){this.newPeriod=!this.period.id,this.getAreas(),this.getData()}onDismiss(){this.unsavedChanges.canDeactivate(this).pipe((0,n.q)(1)).subscribe(M=>{M&&this.modalCtrl.dismiss(null)})}getData(){this.newPeriod||(this.contentLoader.showLoader(),this.loading=!0,this.updateUnitAndAreaLoaderStatus(!0),(0,Be.D)([this.getUnits(),this.getAreas()]).pipe((0,n.q)(1)).subscribe(M=>{this.setFetchedData(M),this.contentLoader.hideLoader()},M=>{console.error("get period and planned units for municipality: ",M),this.contentLoader.showError()},()=>{this.loading=!1,this.updateUnitAndAreaLoaderStatus(!1)}))}setFetchedData([M,C]){this.period.units=M,this.originalEntities=(0,ve.Z)(this.period),this.areas=C.filter(Q=>Q.organizationType===l.OrganizationTypes.ORGANIZATION_TYPE_AREA).map(Q=>({...Q,selected:!0})),this.originalEntities=(0,ve.Z)(this.period)}getAreas(){return this.periodsService.getAreas(this.municipalityId)}getUnits(){return this.getPlannedUnits(this.municipalityId,this.period.id)}getPlannedUnits(M,C){return this.periodsService.getPlannedUnits(M,C).pipe((0,n.q)(1),(0,Y.U)(Q=>Q.sort((Ye,Zt)=>Ye.organizationName.localeCompare(Zt.organizationName))))}onUpdatePeriod(M){this.period={...this.period,...M}}onSavePeriod(){this.contentLoader.showSavingLoader(),setTimeout(()=>{if(!this.canSave())return l.Utils.goToInvalid("sivi-lib-periods-planned-units-editor"),void this.contentLoader.hideLoader();this.savePeriod()},500)}isOverlappingPeriod(){const M=this.period.periodStart,C=this.period.periodEnd;for(const Q of this.periodsForOverlapCheck)if(this.period.id!==Q.id){const Ye=l.Utils.isDateBetweenRangeInclusive(rn(M),Q.periodStart,Q.periodEnd)||l.Utils.isDateBetweenRangeInclusive(rn(Q.periodStart),M,C),Zt=l.Utils.isDateBetweenRangeInclusive(rn(C),Q.periodStart,Q.periodEnd)||l.Utils.isDateBetweenRangeInclusive(rn(Q.periodEnd),M,C);if(Ye||Zt)return!0}return!1}savePeriod(){if(this.isOverlappingPeriod())return this.notify.alert("Message.Save.Error","Backend.Error.PERIOD_OVERLAPS_ANOTHER"),void this.contentLoader.hideLoader();this.periodsService.savePeriod(this.period).subscribe(M=>{this.newPeriod&&(this.modalCtrl.updateQueryParam("period",M.id,!0),this.newPeriod=!1),this.period=M,this.notify.toastSaveSuccess(),this.getData()},M=>{this.notify.alertBackendError((0,oe.Z)(M,"error"),"Message.Save.Error"),console.error("Save failed",M)},()=>{this.contentLoader.hideLoader()})}canSave(){return!!this.municipalityPeriod&&this.municipalityPeriod.checkValidity()}updateUnitAndAreaLoaderStatus(M){this.loading=M,this.unitLoader&&(M?this.unitLoader.showLoader():this.unitLoader.hideLoader()),this.areaLoader&&(M?this.areaLoader.showLoader():this.areaLoader.hideLoader())}onDeletePeriod(M){var C=this;return(0,o.Z)(function*(){try{(yield(yield C.notify.deleteConfirmPopup()).onDidDismiss()).data&&C.deletePeriod(M)}catch(Q){console.error(Q)}})()}deletePeriod(M){M.id?(this.contentLoader.showLoader(),this.periodsService.deletePeriod(M).pipe((0,n.q)(1)).subscribe(()=>{this.modalCtrl.dismiss(),this.notify.toastDeleteSuccess(),this.contentLoader.hideLoader()},C=>{this.notify.alertDeleteFailed(),console.error("Failed to delete period",C),this.contentLoader.hideLoader()})):(this.modalCtrl.dismiss(),this.notify.toastDeleteSuccess())}}Mh.\u0275fac=function(M){return new(M||Mh)(e.Y36(T.sK),e.Y36(zd),e.Y36(l.NotifyService),e.Y36(j.gz),e.Y36(j.F0),e.Y36(l.SiviModalController),e.Y36(l.SiviProjectsGatewayService),e.Y36(l.UnsavedChangesGuard))},Mh.\u0275cmp=e.Xpm({type:Mh,selectors:[["sivi-mun-set-periods-planned-units-editor"]],viewQuery:function(M,C){if(1&M&&(e.Gf(df,7),e.Gf(Fp,5),e.Gf(xy,5),e.Gf(Xs,5)),2&M){let Q;e.iGM(Q=e.CRH())&&(C.contentLoader=Q.first),e.iGM(Q=e.CRH())&&(C.municipalityPeriod=Q.first),e.iGM(Q=e.CRH())&&(C.unitLoader=Q.first),e.iGM(Q=e.CRH())&&(C.areaLoader=Q.first)}},inputs:{periodsForOverlapCheck:"periodsForOverlapCheck",period:"period",municipalityId:"municipalityId",readonly:"readonly"},features:[e.qOj],decls:24,vars:19,consts:[[3,"closeButton","hideNotifications","closed"],["navbar-title",""],["navbar-buttons-right",""],[3,"clicked",4,"ngIf"],[1,"ion-padding"],["contentLoader",""],["size","7","size-md","9"],[1,"header-div","huge"],[3,"text","buttonLabel"],[3,"disabled","readonly","period","municipalityId","update","deletePeriod"],["municipalityPeriod",""],[4,"ngIf","ngIfElse"],["plannedUnits",""],[3,"clicked"],[3,"loadingByDefault","secondaryMode","skeleton"],["areaLoader",""],[1,"mat-elevation-z8","loader-table"],[3,"loadingByDefault","secondaryMode"],["unitLoader",""],[3,"period","readonly","municipalityId","areas","update",4,"ngIf"],[3,"period","readonly","municipalityId","areas","update"]],template:function(M,C){if(1&M&&(e.TgZ(0,"ion-header")(1,"sivi-lib-navbar",0),e.NdJ("closed",function(){return C.onDismiss()}),e.TgZ(2,"div",1),e._uU(3),e.ALo(4,"translate"),e.qZA(),e.TgZ(5,"div",2),e.YNc(6,nd,1,0,"sivi-lib-navbar-action-button",3),e.qZA()()(),e.TgZ(7,"ion-content",4)(8,"sivi-lib-content-loader",null,5)(10,"ion-grid")(11,"ion-row")(12,"ion-col",6)(13,"div",7)(14,"h1"),e._uU(15),e.ALo(16,"translate"),e._UZ(17,"sivi-lib-info-popup",8),e.ALo(18,"translate"),e.qZA()()()()(),e.TgZ(19,"sivi-mun-set-municipality-period",9,10),e.NdJ("update",function(Ye){return C.onUpdatePeriod(Ye)})("deletePeriod",function(Ye){return C.onDeletePeriod(Ye)}),e.qZA(),e.YNc(21,Df,6,5,"div",11),e.YNc(22,Sf,1,1,"ng-template",null,12,e.W1O),e.qZA()()),2&M){const Q=e.MAs(23);e.xp6(1),e.Q6J("closeButton",!0)("hideNotifications",!0),e.xp6(2),e.hij(" ",e.lcZ(4,13,"Page.MunicipalitySettings.PeriodsAndPlannedUnits.Title")," "),e.xp6(3),e.Q6J("ngIf",!C.readonly),e.xp6(9),e.hij(" ",e.lcZ(16,15,"Page.MunicipalitySettings.PeriodsAndPlannedUnits.Title")," "),e.xp6(2),e.Q6J("text","Page.MunicipalitySettings.PeriodsAndPlannedUnits.Info")("buttonLabel",e.lcZ(18,17,"General.Text.Contextual.Help")),e.xp6(2),e.Q6J("disabled",C.loading)("readonly",C.readonly)("period",C.period)("municipalityId",C.municipalityId),e.xp6(2),e.Q6J("ngIf",C.loading&&!C.newPeriod)("ngIfElse",Q)}},dependencies:[D.O5,E.wI,E.W2,E.jY,E.Gu,E.Nd,l.ContentLoaderComponent,l.NavbarComponent,l.NavbarActionButtonComponent,Al,l.InfoPopupComponent,Tp,T.X$],styles:["[_nghost-%COMP%]{--ion-grid-column-padding: 16px;--sivi-card-margin: 0}.header-div[_ngcontent-%COMP%]{display:flex}.header-div[_ngcontent-%COMP%]   h1[_ngcontent-%COMP%]{color:var(--ion-color-secondary);margin-bottom:0}.header-div[_ngcontent-%COMP%]   sivi-lib-info-popup[_ngcontent-%COMP%]{margin-top:auto;margin-bottom:4px;margin-left:16px;font-size:20px}.bg-color[_ngcontent-%COMP%]:nth-child(odd){background-color:var(--ion-color-light)}.loader-table[_ngcontent-%COMP%]{padding:20px}ion-button[_ngcontent-%COMP%]{margin-right:0}ion-col[_ngcontent-%COMP%]{padding-bottom:0}"]});const Mg=["contentLoader"];function vC(te,M){if(1&te){const C=e.EpF();e.TgZ(0,"ion-button",11),e.NdJ("click",function(){e.CHM(C);const Ye=e.oxw();return e.KtG(Ye.openPeriodsAndPlannedUnitModal(null))}),e.ALo(1,"translate"),e._uU(2),e.ALo(3,"translate"),e.qZA()}if(2&te){const C=e.oxw();e.Q6J("disabled",C.loading.length>0),e.uIk("aria-label",e.lcZ(1,3,"Page.MunicipalitySettings.PeriodsAndPlannedUnits.AddPeriod")),e.xp6(2),e.hij(" ",e.lcZ(3,5,"Page.MunicipalitySettings.PeriodsAndPlannedUnits.AddPeriod")," ")}}function ov(te,M){if(1&te){const C=e.EpF();e.ynx(0),e.TgZ(1,"sivi-lib-timeframe-card",12),e.NdJ("clickCardHeaderEvent",function(Ye){e.CHM(C);const Zt=e.oxw();return e.KtG(Zt.openPeriodsAndPlannedUnitModal(Ye))}),e.qZA(),e.BQk()}if(2&te){const C=M.$implicit;e.xp6(1),e.Q6J("id",C.id)("title",C.periodName)("viewMode",!0)("isFooterHidden",!0)("isBodyHidden",!0)}}class Wm extends l.SiviPage{constructor(M,C,Q,Ye,Zt,Pi,Ir,xo,Qa){super(Q,M,Zt,Ye,Qa,Pi),this.translate=M,this.periodsService=C,this.notify=Q,this.route=Ye,this.router=Zt,this.modalCtrl=Pi,this.siviProjectsGatewayService=Ir,this.unsavedChanges=xo,this.location=Qa,this.municipalityId=this.route.snapshot.paramMap.get("municipalityId"),this.periods=[],this.loading=[],this.readonly=!this.siviProjectsGatewayService.getAuthService().hasAnyRole([l.Roles.MUNICIPALITY_ADMIN,l.Roles.DCP_CHIEF]),this.periodModalOpen=!1}ngOnInit(){this.getPeriods()}onDismiss(){this.unsavedChanges.canDeactivate(this).pipe((0,n.q)(1)).subscribe(M=>{M&&(this.destroy$.next(),this.destroy$.complete(),this.modalCtrl.dismiss(null))})}getPeriods(){this.contentLoader.showLoader(),this.periodsService.getPeriodsByMunicipality(this.municipalityId).pipe((0,n.q)(1)).subscribe(M=>{M&&(this.periods=M,this.contentLoader.hideLoader(),this.restoreModal())},M=>{console.error("get period and planned units for municipality: ",M),this.contentLoader.showError()})}createNewPeriod(){return{id:null,tempId:Date.now().toString(),periodName:"",municipalityId:this.municipalityId,periodStart:"",periodEnd:"",enrollmentStart:"",enrollmentEnd:"",clubPeriodStart:"",clubPeriodEnd:"",clubEnrollmentStart:"",clubEnrollmentEnd:"",units:[]}}openPeriodsAndPlannedUnitModal(M){var C=this;return(0,o.Z)(function*(){if(C.periodModalOpen)return;let Q;C.periodModalOpen=!0,Q=M&&M!==l.Constants.NEW_ID?C.periods.find(Pi=>Pi.id===M):C.createNewPeriod();const Ye={component:Mh,componentProps:{period:Q,periodsForOverlapCheck:C.periods,municipalityId:C.municipalityId,readonly:C.readonly},backdropDismiss:!1,cssClass:"modal-full-size"};(yield C.openModal(Ye,"period",Q.id?Q.id:l.Constants.NEW_ID)).onDidDismiss().then(()=>{C.periodModalOpen=!1,C.getPeriods()})})()}restoreModal(){const M=l.Utils.getParamFromURL("period");M&&this.openPeriodsAndPlannedUnitModal(M)}}Wm.\u0275fac=function(M){return new(M||Wm)(e.Y36(T.sK),e.Y36(zd),e.Y36(l.NotifyService),e.Y36(j.gz),e.Y36(j.F0),e.Y36(l.SiviModalController),e.Y36(l.SiviProjectsGatewayService),e.Y36(l.UnsavedChangesGuard),e.Y36(D.Ye))},Wm.\u0275cmp=e.Xpm({type:Wm,selectors:[["sivi-mun-set-periods-planned-units"]],viewQuery:function(M,C){if(1&M&&e.Gf(Mg,7),2&M){let Q;e.iGM(Q=e.CRH())&&(C.contentLoader=Q.first)}},features:[e.qOj],decls:21,vars:16,consts:[[3,"closeButton","hideNotifications","closed"],["navbar-title",""],[1,"ion-padding",3,"siviGoToInvalid"],["contentLoader",""],[1,"ion-no-padding"],[1,"header-div","huge"],[3,"text","buttonLabel"],["size","5","size-md","3",1,"ion-text-end"],["fill","outline",3,"disabled","click",4,"ngIf"],[1,"periods-list-container"],[4,"ngFor","ngForOf","ngForTrackBy"],["fill","outline",3,"disabled","click"],[1,"generic-card-container",3,"id","title","viewMode","isFooterHidden","isBodyHidden","clickCardHeaderEvent"]],template:function(M,C){1&M&&(e.TgZ(0,"ion-header")(1,"sivi-lib-navbar",0),e.NdJ("closed",function(){return C.onDismiss()}),e.TgZ(2,"div",1),e._uU(3),e.ALo(4,"translate"),e.qZA()()(),e.TgZ(5,"ion-content",2)(6,"sivi-lib-content-loader",null,3)(8,"ion-grid",4)(9,"ion-row")(10,"ion-col",4)(11,"div",5)(12,"h1"),e._uU(13),e.ALo(14,"translate"),e._UZ(15,"sivi-lib-info-popup",6),e.ALo(16,"translate"),e.qZA()()(),e.TgZ(17,"ion-col",7),e.YNc(18,vC,4,7,"ion-button",8),e.qZA()()(),e.TgZ(19,"div",9),e.YNc(20,ov,2,5,"ng-container",10),e.qZA()()()),2&M&&(e.xp6(1),e.Q6J("closeButton",!0)("hideNotifications",!0),e.xp6(2),e.hij(" ",e.lcZ(4,10,"Page.MunicipalitySettings.PeriodsAndPlannedUnits.Title")," "),e.xp6(2),e.Q6J("siviGoToInvalid",C.goToInvalid$),e.xp6(8),e.hij(" ",e.lcZ(14,12,"Page.MunicipalitySettings.PeriodsAndPlannedUnits.Title")," "),e.xp6(2),e.Q6J("text","Page.MunicipalitySettings.PeriodsAndPlannedUnits.Info")("buttonLabel",e.lcZ(16,14,"General.Text.Contextual.Help")),e.xp6(3),e.Q6J("ngIf",!C.readonly),e.xp6(2),e.Q6J("ngForOf",C.periods)("ngForTrackBy",C.trackByFn))},dependencies:[D.sg,D.O5,E.YG,E.wI,E.W2,E.jY,E.Gu,E.Nd,l.ContentLoaderComponent,l.GoToInvalidDirective,l.NavbarComponent,l.TimeframeCardComponent,l.InfoPopupComponent,T.X$],styles:["[_nghost-%COMP%]{--ion-grid-column-padding: 16px;--sivi-card-margin: 0}.header-div[_ngcontent-%COMP%]{display:flex;padding-bottom:1.5em}.header-div[_ngcontent-%COMP%]   h1[_ngcontent-%COMP%]{color:var(--ion-color-secondary);margin-bottom:0}.header-div[_ngcontent-%COMP%]   sivi-lib-info-popup[_ngcontent-%COMP%]{margin-top:auto;margin-bottom:4px;margin-left:16px;font-size:20px}.bg-color[_ngcontent-%COMP%]:nth-child(odd){background-color:var(--ion-color-light)}.loader-table[_ngcontent-%COMP%]{padding:20px}ion-button[_ngcontent-%COMP%]{margin-right:0}ion-col[_ngcontent-%COMP%]{padding-bottom:0}.periods-list-container[_ngcontent-%COMP%]{display:grid;grid-column-gap:24px;grid-template-columns:repeat(auto-fill,minmax(344px,1fr));grid-row-gap:24px}"]});class Pm{}Pm.\u0275fac=function(M){return new(M||Pm)},Pm.\u0275mod=e.oAB({type:Pm}),Pm.\u0275inj=e.cJS({imports:[Gi,l.DatepickerModule,l.SiviFormsModule]});class Af{}Af.\u0275fac=function(M){return new(M||Af)},Af.\u0275mod=e.oAB({type:Af}),Af.\u0275inj=e.cJS({imports:[Gi,Pm,l.SiviFormsModule]});const kl=[{path:"municipality-periods",component:Mh,canDeactivate:[l.UnsavedChangesGuard]}];class Gc{}Gc.\u0275fac=function(M){return new(M||Gc)},Gc.\u0275mod=e.oAB({type:Gc}),Gc.\u0275inj=e.cJS({providers:[zd,l.SiviModalController],imports:[Gi,l.NavbarComponentModule,l.TimeframeCardComponentModule,j.Bz.forChild(kl),Af,st.p0,l.InfoPopupComponentModule]});const gu=[{path:"municipality-periods",component:Wm,canDeactivate:[l.UnsavedChangesGuard]}];class Ad{}Ad.\u0275fac=function(M){return new(M||Ad)},Ad.\u0275mod=e.oAB({type:Ad}),Ad.\u0275inj=e.cJS({providers:[zd,l.SiviModalController],imports:[Gi,l.NavbarComponentModule,Gc,l.TimeframeCardComponentModule,j.Bz.forChild(gu),Af,st.p0,l.InfoPopupComponentModule]});class $s extends l.SiviAbstractForm{constructor(M,C){super(),this.fb=M,this.languageService=C,this.first=!1,this.last=!1,this.update=new e.vpe,this.delete=new e.vpe,this.move=new e.vpe}ngOnInit(){this.form=this.fb.group({permitNameSv:[this.permit.sv.permitName,[l.SiviValidators.required]],permitNameEn:[this.permit.en.permitName,[l.SiviValidators.required]],permitNameFi:[this.permit.fi.permitName,[l.SiviValidators.required]],permitDescSv:[this.permit.sv.permitDescription,[l.SiviValidators.required]],permitDescEn:[this.permit.en.permitDescription,[l.SiviValidators.required]],permitDescFi:[this.permit.fi.permitDescription,[l.SiviValidators.required]]})}onPermitChange(M,C){const Q=(0,ve.Z)(this.permit[C]),{name:Ye,value:Zt}=M.detail;if(!Ye)return;Ye.toLowerCase().includes("name")?Q.permitName=Zt:Q.permitDescription=Zt;const Pi={...this.permit,[C]:Q};this.update.emit(Pi)}deletePermit(){this.delete.emit()}moveItem(M){this.move.emit(M)}getTranslation(M,C){return this.languageService.getTranslationByLocale(M,C)+" ("+C.toUpperCase()+")"}}$s.\u0275fac=function(M){return new(M||$s)(e.Y36(Ct.QS),e.Y36(l.LanguageService))},$s.\u0275cmp=e.Xpm({type:$s,selectors:[["sivi-mun-set-permit-settings-component"]],inputs:{permit:"permit",first:"first",last:"last"},outputs:{update:"update",delete:"delete",move:"move"},features:[e.qOj],decls:31,vars:15,consts:[["siviLibForm","",1,"permit-wrapper",3,"formGroup"],[1,"button-row"],["color","primary","fill","clear","role","button","size","small","no-min-width","",1,"ml2",3,"click"],["name","delete"],["color","primary","fill","clear","role","button","size","small","no-min-width","",1,"ml2",3,"disabled","click"],["name","arrow_downward"],["name","arrow_upward"],["size","7"],["formControlName","permitNameFi","siviLibFormControl","","type","text","label-position","floating",3,"label","siviChange"],["size","11"],["formControlName","permitDescFi","siviLibFormControl","","type","text","label-position","floating",3,"label","siviChange"],["formControlName","permitNameSv","siviLibFormControl","","type","text","label-position","floating",3,"label","siviChange"],["formControlName","permitDescSv","siviLibFormControl","","type","text","label-position","floating",3,"label","siviChange"],["formControlName","permitNameEn","siviLibFormControl","","type","text","label-position","floating",3,"label","siviChange"],["formControlName","permitDescEn","siviLibFormControl","","type","text","label-position","floating",3,"label","siviChange"]],template:function(M,C){1&M&&(e.TgZ(0,"div",0)(1,"div",1)(2,"ion-grid")(3,"ion-row"),e._UZ(4,"ion-col"),e.TgZ(5,"ion-button",2),e.NdJ("click",function(){return C.deletePermit()}),e._UZ(6,"cgi-icon",3),e.qZA()(),e.TgZ(7,"ion-row")(8,"ion-button",4),e.NdJ("click",function(){return C.moveItem(1)}),e._UZ(9,"cgi-icon",5),e.qZA(),e.TgZ(10,"ion-button",4),e.NdJ("click",function(){return C.moveItem(-1)}),e._UZ(11,"cgi-icon",6),e.qZA()()()(),e.TgZ(12,"div")(13,"ion-row")(14,"ion-col",7)(15,"cgi-input",8),e.NdJ("siviChange",function(Ye){return C.onPermitChange(Ye,"fi")}),e.qZA()()(),e.TgZ(16,"ion-row")(17,"ion-col",9)(18,"cgi-input",10),e.NdJ("siviChange",function(Ye){return C.onPermitChange(Ye,"fi")}),e.qZA()()(),e.TgZ(19,"ion-row")(20,"ion-col",7)(21,"cgi-input",11),e.NdJ("siviChange",function(Ye){return C.onPermitChange(Ye,"sv")}),e.qZA()()(),e.TgZ(22,"ion-row")(23,"ion-col",9)(24,"cgi-input",12),e.NdJ("siviChange",function(Ye){return C.onPermitChange(Ye,"sv")}),e.qZA()()(),e.TgZ(25,"ion-row")(26,"ion-col",7)(27,"cgi-input",13),e.NdJ("siviChange",function(Ye){return C.onPermitChange(Ye,"en")}),e.qZA()()(),e.TgZ(28,"ion-row")(29,"ion-col",9)(30,"cgi-input",14),e.NdJ("siviChange",function(Ye){return C.onPermitChange(Ye,"en")}),e.qZA()()()()()),2&M&&(e.Q6J("formGroup",C.form),e.xp6(8),e.Q6J("disabled",C.last),e.xp6(2),e.Q6J("disabled",C.first),e.xp6(5),e.Q6J("label",C.getTranslation("Permit.Name","fi")),e.uIk("aria-label",C.getTranslation("Permit.Name","fi")),e.xp6(3),e.Q6J("label",C.getTranslation("Permit.Description","fi")),e.uIk("aria-label",C.getTranslation("Permit.Description","fi")),e.xp6(3),e.Q6J("label",C.getTranslation("Permit.Name","sv")),e.uIk("aria-label",C.getTranslation("Permit.Name","sv")),e.xp6(3),e.Q6J("label",C.getTranslation("Permit.Description","sv")),e.uIk("aria-label",C.getTranslation("Permit.Description","sv")),e.xp6(3),e.Q6J("label",C.getTranslation("Permit.Name","en")),e.uIk("aria-label",C.getTranslation("Permit.Name","en")),e.xp6(3),e.Q6J("label",C.getTranslation("Permit.Description","en")),e.uIk("aria-label",C.getTranslation("Permit.Description","en")))},dependencies:[E.YG,E.wI,E.jY,E.Nd,l.SiviFormDirective,l.SiviFormControlDirective,Ct.JJ,Ct.JL,Ct.sg,Ct.u],styles:[".permit-wrapper[_ngcontent-%COMP%]{display:block;border:1px solid var(--ion-color-primary);border-radius:2px;padding:0 0 2em 2em}.button-row[_ngcontent-%COMP%]{position:absolute;right:25px}.button-container[_ngcontent-%COMP%]{display:flex;flex-direction:row-reverse}ion-button[_ngcontent-%COMP%]{margin:2px}"]});const $h=["siviContent"];function av(te,M){if(1&te){const C=e.EpF();e.ynx(0),e.TgZ(1,"sivi-mun-set-permit-settings-component",10),e.NdJ("delete",function(){const Zt=e.CHM(C).index,Pi=e.oxw();return e.KtG(Pi.deletePermit(Zt))})("move",function(Ye){const Pi=e.CHM(C).index,Ir=e.oxw();return e.KtG(Ir.onMovePermit(Pi,Ye))})("update",function(Ye){const Pi=e.CHM(C).index,Ir=e.oxw();return e.KtG(Ir.onUpdatePermit(Ye,Pi))}),e.qZA(),e.BQk()}if(2&te){const C=M.$implicit,Q=M.index,Ye=e.oxw();e.xp6(1),e.Q6J("permit",C)("first",0===Q)("last",Q===Ye.permits.length-1)}}class Yu extends l.SiviPage{constructor(M,C,Q,Ye,Zt,Pi,Ir){super(M,C,Q),this.notifyService=M,this.translate=C,this.router=Q,this.unsavedChanges=Ye,this.modalCtrl=Zt,this.siviProjectsGatewayService=Pi,this.permitSettingsService=Ir,this.permits=[],this.saving=!1}ngOnInit(){this.getPermits()}getPermits(){this.contentLoader.showLoader(),this.permitSettingsService.getPermits().pipe((0,n.q)(1)).subscribe(M=>{this.permits=M,this.watchForValueChanges(M),this.contentLoader.hideLoader()},M=>{console.error("Fetching permit settings failed",M),this.notify.alertBackendError(M,"Message.Loading.Error"),this.contentLoader.showError()})}onUpdatePermit(M,C){const Q=(0,ve.Z)(this.permits);Q[C]=M,this.permits=Q,this.updateWatchedEntities(this.permits)}onMovePermit(M,C){const Q=M+C,Ye=(0,ve.Z)(this.permits),Zt=Ye.splice(M,1)[0];Ye.splice(Q,0,Zt),this.permits=Ye,this.updateWatchedEntities(this.permits)}addPermit(){this.permits=[this.getNewPermit(),...this.permits],this.updateWatchedEntities(this.permits)}deletePermit(M){var C=this;return(0,o.Z)(function*(){(yield C.notify.deleteConfirmPopup()).onDidDismiss().then(Ye=>{Ye.data&&C.permits.splice(M,1)}),C.updateWatchedEntities(C.permits)})()}savePermits(){if(!this.checkValidity())return void l.Utils.goToInvalid("sivi-lib-permit-settings");const M=this.permits;this.saving=!0,this.permitSettingsService.savePermits(M).pipe((0,n.q)(1)).subscribe(C=>{this.permits=C,this.watchForValueChanges(this.permits),this.saving=!1,this.notify.toastSaveSuccess()},C=>{console.error("Saving permit settings failed",C),this.notify.alertBackendError(C,"Message.Save.Error"),this.saving=!1})}onDismiss(){this.unsavedChanges.canDeactivate(this).pipe((0,n.q)(1)).subscribe(M=>{M&&this.modalCtrl.dismiss(null)})}getNewPermit(){return{tempId:(Date.now()*Math.floor(Math.random()*Math.floor(1e3))).toString(),fi:{permitName:"",permitDescription:""},sv:{permitName:"",permitDescription:""},en:{permitName:"",permitDescription:""}}}checkValidity(){return this.permitComponents.toArray().every(M=>M.isValid)}trackByFn(M,C){try{return C.id||C.tempId||M.toString()}catch{console.error("trackByFn error. Parameter missing",{index:M,item:C})}}}Yu.\u0275fac=function(M){return new(M||Yu)(e.Y36(l.NotifyService),e.Y36(T.sK),e.Y36(j.F0),e.Y36(l.UnsavedChangesGuard),e.Y36(l.SiviModalController),e.Y36(l.SiviProjectsGatewayService),e.Y36(l.PermitSettingsService))},Yu.\u0275cmp=e.Xpm({type:Yu,selectors:[["sivi-mun-set-permit-settings"]],viewQuery:function(M,C){if(1&M&&(e.Gf($h,7),e.Gf($s,5)),2&M){let Q;e.iGM(Q=e.CRH())&&(C.contentLoader=Q.first),e.iGM(Q=e.CRH())&&(C.permitComponents=Q)}},features:[e.qOj],decls:21,vars:17,consts:[[3,"closeButton","hideNotifications","closed"],["navbar-title",""],["navbar-buttons-right",""],[3,"disabled","clicked"],[1,"ion-padding"],["skeleton","form"],["siviContent",""],[1,"button-add"],["fill","outline",3,"click"],[4,"ngFor","ngForOf","ngForTrackBy"],[3,"permit","first","last","delete","move","update"]],template:function(M,C){if(1&M&&(e.TgZ(0,"ion-header")(1,"sivi-lib-navbar",0),e.NdJ("closed",function(){return C.onDismiss()}),e.TgZ(2,"div",1),e._uU(3),e.ALo(4,"translate"),e.TgZ(5,"span"),e._uU(6),e.ALo(7,"async"),e.qZA()(),e.TgZ(8,"div",2)(9,"sivi-lib-navbar-action-button",3),e.NdJ("clicked",function(){return C.savePermits()}),e.qZA()()()(),e.TgZ(10,"ion-content",4)(11,"h1"),e._uU(12),e.ALo(13,"translate"),e.qZA(),e.TgZ(14,"sivi-lib-content-loader",5,6)(16,"ion-row",7)(17,"ion-button",8),e.NdJ("click",function(){return C.addPermit()}),e._uU(18),e.ALo(19,"translate"),e.qZA()(),e.YNc(20,av,2,3,"ng-container",9),e.qZA()()),2&M){let Q;e.xp6(1),e.Q6J("closeButton",!0)("hideNotifications",!0),e.xp6(2),e.hij(" ",e.lcZ(4,9,"Permit.Plural")," "),e.xp6(3),e.hij(" (",null==(Q=e.lcZ(7,11,C.siviProjectsGatewayService.getAppStateService().getMunicipality()))?null:Q.name,") "),e.xp6(3),e.Q6J("disabled",C.saving),e.xp6(3),e.Oqu(e.lcZ(13,13,"Page.MunicipalitySettings.PermitSettings.Title")),e.xp6(6),e.Oqu(e.lcZ(19,15,"General.Buttons.Add")),e.xp6(2),e.Q6J("ngForOf",C.permits)("ngForTrackBy",C.trackByFn)}},dependencies:[D.sg,E.YG,E.W2,E.Gu,E.Nd,l.ContentLoaderComponent,l.NavbarComponent,l.NavbarActionButtonComponent,$s,D.Ov,T.X$],styles:["sivi-lib-permit-settings-component[_ngcontent-%COMP%]{padding-bottom:1em;padding-top:1em;display:block}.button-add[_ngcontent-%COMP%]{display:flex;flex-direction:row-reverse}"]});class Xp{}Xp.\u0275fac=function(M){return new(M||Xp)},Xp.\u0275mod=e.oAB({type:Xp}),Xp.\u0275inj=e.cJS({providers:[l.PermitSettingsService,l.SiviModalController],imports:[Gi,l.NavbarComponentModule,l.SiviFormsModule]});class Th extends l.AbstractRestService{constructor(M,C){super(M,C),this.http=M,this.siviProjectsGateway=C,this.options=this.getCommonOptions()}getReminderAndDeadlineSettings(M){const C=this.getCommonOptions();C.params=(new g.LE).set("municipalityId",M);return this.get("./api/sivi-accounts-api/notifications/reminder-and-deadline-municipality-setting",C)}saveReminderAndDeadlineSettings(M){return this.put(M,"./api/sivi-accounts-api/notifications/reminder-and-deadline-municipality-setting")}}Th.\u0275fac=function(M){return new(M||Th)(e.LFG(g.eN),e.LFG(l.SiviProjectsGatewayService))},Th.\u0275prov=e.Yz7({token:Th,factory:Th.\u0275fac});const yC=["siviContent"];function jh(te,M){if(1&te&&(e.TgZ(0,"span"),e._uU(1),e.ALo(2,"async"),e.qZA()),2&te){const C=e.oxw();let Q;e.xp6(1),e.hij(" (",null==(Q=e.lcZ(2,1,C.siviGatewayService.getAppStateService().getMunicipality()))?null:Q.name,") ")}}class Kh extends l.SiviPage{constructor(M,C,Q,Ye,Zt,Pi,Ir,xo,Qa){super(Ye,M,Pi),this.translateService=M,this.modalCtrl=C,this.route=Q,this.notify=Ye,this.unsavedChanges=Zt,this.router=Pi,this.siviGatewayService=Ir,this.reminderAndDeadlineService=xo,this.fb=Qa,this.municipalityId=this.route.snapshot.paramMap.get("municipalityId"),this.saving=!1,this.validatorOptions=[],this.onlyNumbersMessage={pattern:this.translate.instant("Form.Error.OnlyNumbers")},this.formGroup=this.initializeFormGroup()}ngOnInit(){this.getReminderAndDeadlineSettings(this.municipalityId)}getReminderAndDeadlineSettings(M){this.contentLoader.showLoader(),this.reminderAndDeadlineService.getReminderAndDeadlineSettings(M).pipe((0,n.q)(1)).subscribe(C=>{this.settings=this.settingsAdapterBEtoFE(C),this.contentLoader.showContent(this.settings),this.formGroup.patchValue(this.settings),this.watchForValueChanges([this.settings])},C=>{console.error("ReminderAndDeadlinePage: getReminderAndDeadlineSettings error",C),this.contentLoader.showError(),this.notify.alertFailedToLoadData()})}onFormValueChange(M){this.settings={...this.settings,...M},this.updateWatchedEntities([this.settings])}onDismiss(){this.unsavedChanges.canDeactivate(this).pipe((0,n.q)(1)).subscribe(M=>{M&&this.modalCtrl.dismiss(null)})}onClickSave(){const M=document.querySelector("ion-modal");this.checkForInvalidClass(M)?l.Utils.goToInvalid("ion-modal"):this.saveSettings(this.settings)}saveSettings(M){const C=this.settingsAdapterFEtoBE(M);this.saving=!0,this.contentLoader.showLoader(),this.reminderAndDeadlineService.saveReminderAndDeadlineSettings(C).pipe((0,n.q)(1),(0,P.x)(()=>{this.contentLoader.hideLoader(),this.saving=!1})).subscribe(()=>{this.watchForValueChanges([this.settings]),this.notify.toastSaveSuccess()},Q=>{console.error("ReminderAndDeadlinePage: saveSettings error",Q),this.notify.alertBackendError(Q,"Message.Save.Error")})}initializeFormGroup(){const M=[l.SiviValidators.required,l.SiviValidators.pattern(l.Patterns.ONLYNUMBERS)];return this.fb.group({incomeStatementHowOftenIsRequested:["",M],incomeStatementDaysForGuardianToReply:["",M],incomeStatementDaysBeforeDeadlineReminderIsSent:["",M],acceptECECdaysForGuardianToAcceptOrDecline:["",M],acceptECECdaysBeforeDeadlineReminderIsSent:["",M],acceptClubDaysForGuardianToAcceptOrDecline:["",M],acceptClubDaysBeforeDeadlineReminderIsSent:["",M],acceptVoucherDaysForGuardianToAcceptOrDecline:["",M],acceptVoucherDaysBeforeDeadlineReminderIsSent:["",M],agreementDaysForAproval:["",M],agreementDaysBeforeDeadlineReminderIsSent:["",M]})}settingsAdapterBEtoFE(M){const C=Q=>(0,Z.Z)((0,oe.Z)(M,Q));return{incomeStatementHowOftenIsRequested:C("incomeStatementRenewal.howOftenIsRequested"),incomeStatementDaysForGuardianToReply:C("incomeStatementRenewal.daysForGuardianToReply"),incomeStatementDaysBeforeDeadlineReminderIsSent:C("incomeStatementRenewal.daysBeforeDeadlineReminderIsSent"),acceptECECdaysForGuardianToAcceptOrDecline:C("deadlineForApprovalECEC.daysForApproval"),acceptECECdaysBeforeDeadlineReminderIsSent:C("deadlineForApprovalECEC.daysBeforeDeadlineReminderIsSent"),acceptClubDaysForGuardianToAcceptOrDecline:C("deadlineForApprovalClub.daysForApproval"),acceptClubDaysBeforeDeadlineReminderIsSent:C("deadlineForApprovalClub.daysBeforeDeadlineReminderIsSent"),acceptVoucherDaysForGuardianToAcceptOrDecline:C("deadlineForApprovalVoucher.daysForApproval"),acceptVoucherDaysBeforeDeadlineReminderIsSent:C("deadlineForApprovalVoucher.daysBeforeDeadlineReminderIsSent"),agreementDaysForAproval:C("deadlineForApprovalAgreement.daysForApproval"),agreementDaysBeforeDeadlineReminderIsSent:C("deadlineForApprovalAgreement.daysBeforeDeadlineReminderIsSent")}}settingsAdapterFEtoBE(M){const C=Q=>(0,Oe.Z)((0,oe.Z)(M,Q));return{municipalityId:this.municipalityId,incomeStatementRenewal:{howOftenIsRequested:C("incomeStatementHowOftenIsRequested"),daysForGuardianToReply:C("incomeStatementDaysForGuardianToReply"),daysBeforeDeadlineReminderIsSent:C("incomeStatementDaysBeforeDeadlineReminderIsSent")},deadlineForApprovalECEC:{daysForApproval:C("acceptECECdaysForGuardianToAcceptOrDecline"),daysBeforeDeadlineReminderIsSent:C("acceptECECdaysBeforeDeadlineReminderIsSent")},deadlineForApprovalClub:{daysForApproval:C("acceptClubDaysForGuardianToAcceptOrDecline"),daysBeforeDeadlineReminderIsSent:C("acceptClubDaysBeforeDeadlineReminderIsSent")},deadlineForApprovalVoucher:{daysForApproval:C("acceptVoucherDaysForGuardianToAcceptOrDecline"),daysBeforeDeadlineReminderIsSent:C("acceptVoucherDaysBeforeDeadlineReminderIsSent")},deadlineForApprovalAgreement:{daysForApproval:C("agreementDaysForAproval"),daysBeforeDeadlineReminderIsSent:C("agreementDaysBeforeDeadlineReminderIsSent")}}}}Kh.\u0275fac=function(M){return new(M||Kh)(e.Y36(T.sK),e.Y36(l.SiviModalController),e.Y36(j.gz),e.Y36(l.NotifyService),e.Y36(l.UnsavedChangesGuard),e.Y36(j.F0),e.Y36(l.SiviProjectsGatewayService),e.Y36(Th),e.Y36(Ct.QS))},Kh.\u0275cmp=e.Xpm({type:Kh,selectors:[["sivi-mun-set-reminders-and-deadlines"]],viewQuery:function(M,C){if(1&M&&e.Gf(yC,7),2&M){let Q;e.iGM(Q=e.CRH())&&(C.contentLoader=Q.first)}},features:[e.qOj],decls:55,vars:76,consts:[[3,"closeButton","hideNotifications","closed"],["navbar-title",""],[4,"ngIf"],["navbar-buttons-right",""],[3,"disabled","clicked"],[1,"ion-padding"],["siviContent",""],["siviLibForm","",3,"formGroup"],[1,"input-container"],[3,"text","buttonLabel"],["formControlName","incomeStatementHowOftenIsRequested","siviLibFormControl","","type","text","label-position","floating",3,"errorMessages","label"],["formControlName","incomeStatementDaysForGuardianToReply","siviLibFormControl","","type","text","label-position","floating",3,"errorMessages","label"],["formControlName","incomeStatementDaysBeforeDeadlineReminderIsSent","siviLibFormControl","","type","text","label-position","floating",3,"errorMessages","label"],["formControlName","acceptECECdaysForGuardianToAcceptOrDecline","siviLibFormControl","","type","text","label-position","floating",3,"errorMessages","label"],["formControlName","acceptECECdaysBeforeDeadlineReminderIsSent","siviLibFormControl","","type","text","label-position","floating",3,"errorMessages","label"],["formControlName","acceptClubDaysForGuardianToAcceptOrDecline","siviLibFormControl","","type","text","label-position","floating",1,"margin-top",3,"errorMessages","label"],["formControlName","acceptClubDaysBeforeDeadlineReminderIsSent","siviLibFormControl","","type","text","label-position","floating",3,"errorMessages","label"],["formControlName","acceptVoucherDaysForGuardianToAcceptOrDecline","siviLibFormControl","","type","text","label-position","floating",1,"margin-top",3,"errorMessages","label"],["formControlName","acceptVoucherDaysBeforeDeadlineReminderIsSent","siviLibFormControl","","type","text","label-position","floating",3,"errorMessages","label"],["formControlName","agreementDaysForAproval","siviLibFormControl","","type","text","label-position","floating",3,"errorMessages","label"],["formControlName","agreementDaysBeforeDeadlineReminderIsSent","siviLibFormControl","","type","text","label-position","floating",3,"errorMessages","label"]],template:function(M,C){1&M&&(e.TgZ(0,"ion-header")(1,"sivi-lib-navbar",0),e.NdJ("closed",function(){return C.onDismiss()}),e.TgZ(2,"div",1),e._uU(3),e.ALo(4,"translate"),e.YNc(5,jh,3,3,"span",2),e.qZA(),e.TgZ(6,"div",3)(7,"sivi-lib-navbar-action-button",4),e.NdJ("clicked",function(){return C.onClickSave()}),e.qZA()()()(),e.TgZ(8,"ion-content",5)(9,"sivi-lib-content-loader",null,6)(11,"form",7)(12,"h1"),e._uU(13),e.ALo(14,"translate"),e.qZA(),e.TgZ(15,"div",8)(16,"h2"),e._uU(17),e.ALo(18,"translate"),e._UZ(19,"sivi-lib-info-popup",9),e.ALo(20,"translate"),e.qZA(),e._UZ(21,"cgi-input",10),e.ALo(22,"translate"),e._UZ(23,"cgi-input",11),e.ALo(24,"translate"),e._UZ(25,"cgi-input",12),e.ALo(26,"translate"),e.qZA(),e.TgZ(27,"div",8)(28,"h2"),e._uU(29),e.ALo(30,"translate"),e._UZ(31,"sivi-lib-info-popup",9),e.ALo(32,"translate"),e.qZA(),e._UZ(33,"cgi-input",13),e.ALo(34,"translate"),e._UZ(35,"cgi-input",14),e.ALo(36,"translate"),e._UZ(37,"cgi-input",15),e.ALo(38,"translate"),e._UZ(39,"cgi-input",16),e.ALo(40,"translate"),e._UZ(41,"cgi-input",17),e.ALo(42,"translate"),e._UZ(43,"cgi-input",18),e.ALo(44,"translate"),e.qZA(),e.TgZ(45,"div")(46,"h2"),e._uU(47),e.ALo(48,"translate"),e._UZ(49,"sivi-lib-info-popup",9),e.ALo(50,"translate"),e.qZA(),e._UZ(51,"cgi-input",19),e.ALo(52,"translate"),e._UZ(53,"cgi-input",20),e.ALo(54,"translate"),e.qZA()()()()),2&M&&(e.xp6(1),e.Q6J("closeButton",!0)("hideNotifications",!0),e.xp6(2),e.hij(" ",e.lcZ(4,38,"Page.MunicipalitySettings.RemindersAndDeadlines.Title")," "),e.xp6(2),e.Q6J("ngIf",C.municipalityId),e.xp6(2),e.Q6J("disabled",C.saving),e.xp6(4),e.Q6J("formGroup",C.formGroup),e.xp6(2),e.Oqu(e.lcZ(14,40,"Page.MunicipalitySettings.RemindersAndDeadlines.Title")),e.xp6(4),e.hij("",e.lcZ(18,42,"Page.MunicipalitySettings.RemindersAndDeadlines.IncomeStatementRenewal.Title")," "),e.xp6(2),e.Q6J("text","Page.MunicipalitySettings.RemindersAndDeadlines.IncomeStatementRenewal.Info")("buttonLabel",e.lcZ(20,44,"General.Text.Contextual.Help")),e.xp6(2),e.Q6J("errorMessages",C.onlyNumbersMessage)("label",e.lcZ(22,46,"Page.MunicipalitySettings.RemindersAndDeadlines.IncomeStatementRenewal.HowOftenRequested")),e.xp6(2),e.Q6J("errorMessages",C.onlyNumbersMessage)("label",e.lcZ(24,48,"Page.MunicipalitySettings.RemindersAndDeadlines.IncomeStatementRenewal.DaysForGuardianToFillAndSend")),e.xp6(2),e.Q6J("errorMessages",C.onlyNumbersMessage)("label",e.lcZ(26,50,"Page.MunicipalitySettings.RemindersAndDeadlines.DaysBeforeTheReminderIsSent")),e.xp6(4),e.hij("",e.lcZ(30,52,"Page.MunicipalitySettings.RemindersAndDeadlines.DeadlinesForAcceptance.Title")," "),e.xp6(2),e.Q6J("text","Page.MunicipalitySettings.RemindersAndDeadlines.DeadlinesForAcceptance.Info")("buttonLabel",e.lcZ(32,54,"General.Text.Contextual.Help")),e.xp6(2),e.Q6J("errorMessages",C.onlyNumbersMessage)("label",e.lcZ(34,56,"Page.MunicipalitySettings.RemindersAndDeadlines.DeadlinesForAcceptance.ECEC.DaysForAcceptingOrDeclining")),e.xp6(2),e.Q6J("errorMessages",C.onlyNumbersMessage)("label",e.lcZ(36,58,"Page.MunicipalitySettings.RemindersAndDeadlines.DaysBeforeTheReminderIsSent")),e.xp6(2),e.Q6J("errorMessages",C.onlyNumbersMessage)("label",e.lcZ(38,60,"Page.MunicipalitySettings.RemindersAndDeadlines.DeadlinesForAcceptance.Club.DaysForAcceptingOrDeclining")),e.xp6(2),e.Q6J("errorMessages",C.onlyNumbersMessage)("label",e.lcZ(40,62,"Page.MunicipalitySettings.RemindersAndDeadlines.DaysBeforeTheReminderIsSent")),e.xp6(2),e.Q6J("errorMessages",C.onlyNumbersMessage)("label",e.lcZ(42,64,"Page.MunicipalitySettings.RemindersAndDeadlines.DeadlinesForAcceptance.Voucher.DaysForAcceptingOrDeclining")),e.xp6(2),e.Q6J("errorMessages",C.onlyNumbersMessage)("label",e.lcZ(44,66,"Page.MunicipalitySettings.RemindersAndDeadlines.DaysBeforeTheReminderIsSent")),e.xp6(4),e.hij("",e.lcZ(48,68,"Page.MunicipalitySettings.RemindersAndDeadlines.DeadlinesForAgreement.Title")," "),e.xp6(2),e.Q6J("text","Page.MunicipalitySettings.RemindersAndDeadlines.DeadlinesForAgreement.Info")("buttonLabel",e.lcZ(50,70,"General.Text.Contextual.Help")),e.xp6(2),e.Q6J("errorMessages",C.onlyNumbersMessage)("label",e.lcZ(52,72,"Page.MunicipalitySettings.RemindersAndDeadlines.DeadlinesForAgreement.DaysForGuardianToApprove")),e.xp6(2),e.Q6J("errorMessages",C.onlyNumbersMessage)("label",e.lcZ(54,74,"Page.MunicipalitySettings.RemindersAndDeadlines.DaysBeforeTheReminderIsSent")))},dependencies:[D.O5,E.W2,E.Gu,l.ContentLoaderComponent,l.SiviFormDirective,l.SiviFormControlDirective,Ct._Y,Ct.JJ,Ct.JL,Ct.sg,Ct.u,l.NavbarComponent,l.NavbarActionButtonComponent,l.InfoPopupComponent,D.Ov,T.X$],styles:[".margin-top[_ngcontent-%COMP%]{margin-top:2em;display:block}h1[_ngcontent-%COMP%]{color:var(--ion-color-secondary)}.input-container[_ngcontent-%COMP%]{margin-bottom:4em}"]});const D_=[{path:"reminders-and-deadlines",component:Kh,canDeactivate:[l.UnsavedChangesGuard]}];class wf{}function Qg(te,M){if(1&te){const C=e.EpF();e.TgZ(0,"span",8),e.NdJ("siviClick",function(){e.CHM(C);const Ye=e.oxw().$implicit,Zt=e.oxw(2);return e.KtG(Zt.openMunicipalitySettingsPages(Ye))}),e._uU(1),e.ALo(2,"translate"),e.qZA()}if(2&te){const C=e.oxw().$implicit;e.xp6(1),e.hij(" ",e.lcZ(2,1,C.name)," ")}}function Np(te,M){if(1&te&&(e.TgZ(0,"div",6),e.YNc(1,Qg,3,3,"span",7),e.qZA()),2&te){const C=M.$implicit;e.Q6J("ngClass",C.isAllowed?"container":""),e.xp6(1),e.Q6J("ngIf",C.isAllowed)}}function em(te,M){if(1&te&&(e.TgZ(0,"ion-col",3)(1,"h2",4),e._uU(2),e.ALo(3,"translate"),e.qZA(),e.YNc(4,Np,2,2,"div",5),e.qZA()),2&te){const C=M.$implicit,Q=e.oxw();e.xp6(2),e.Oqu(e.lcZ(3,3,C.name)),e.xp6(2),e.Q6J("ngForOf",C.modules)("ngForTrackBy",Q.trackByFn)}}wf.\u0275fac=function(M){return new(M||wf)},wf.\u0275mod=e.oAB({type:wf}),wf.\u0275inj=e.cJS({providers:[l.SiviProjectsGatewayService,Th,l.SiviModalController],imports:[Gi,l.SiviFormsModule,l.NavbarComponentModule,j.Bz.forChild(D_),l.InfoPopupComponentModule]});class _d extends l.SiviPage{constructor(M,C,Q,Ye,Zt,Pi,Ir,xo){super(Q,Zt,Ye,M,xo,Pi),this.route=M,this.siviProjectsGatewayService=C,this.notify=Q,this.router=Ye,this.translate=Zt,this.modalCtrl=Pi,this.permissionService=Ir,this.location=xo,this.municipalityId=this.route.snapshot.paramMap.get("municipalityId"),this.authService=this.siviProjectsGatewayService.getAuthService(),this.shouldShowFeatureOtherDecisions=!this.siviProjectsGatewayService.getEnvironmentService().isPreprodOrProdEnvironment()||this.siviProjectsGatewayService.getEnvironmentService().proConsona,this.shouldShowFeatureOpenDaycare=!this.siviProjectsGatewayService.getEnvironmentService().isUatPreprodOrProdEnvironment()||this.siviProjectsGatewayService.getEnvironmentService().proConsona}ngOnInit(){const M=l.Permissions.Menu.CAN_ACCESS_MUNICIPALITY_SETTINGS;this.categories=[{name:"Page.MunicipalitySettings.Header.General",modules:[{name:"Page.MunicipalitySettings.Integration.Title.Plural",path:"integrations",page:_p,isAllowed:this.authService.hasAnyRole([...M])},{name:"Page.MunicipalitySettings.PeriodsAndPlannedUnits.Title",path:"municipality-periods",page:Wm,isAllowed:this.authService.hasAnyRole([...M])},{name:"Page.ContextualInstructions.Title",path:"contextual-instructions",page:_o,isAllowed:this.authService.hasAnyRole([...M])}]},{name:"Page.MunicipalitySettings.Header.Templates",modules:[{name:"Page.Templates.Application.Message.Title.Plural",path:l.MessageTemplatePath.APPLICATION_TEMPLATE_PATH,page:ss,isAllowed:this.authService.hasAnyRole([...M])},{name:"Page.Templates.Decision.Text.Title.Plural",path:"message-templates-decision",page:ss,isAllowed:this.authService.hasAnyRole([...M])},{name:"Page.Templates.ECEC.Starting.And.Ending.Title.Plural",path:"ecec-message-templates",page:bd,isAllowed:this.authService.hasAnyRole([...M])},{name:"Page.MunicipalitySettings.FeeAndValueDecision.Title",path:"fee-and-value-decision",page:ha,isAllowed:this.authService.hasAnyRole([...M])}]},{name:"Page.MunicipalitySettings.Header.ApplicationsAndDecisions",modules:[{name:"Page.MunicipalitySettings.QuickHandlingReasons.Title",path:"quick-handling",page:en,isAllowed:this.authService.hasAnyRole([...M])},{name:"Page.MunicipalitySettings.NumberOfPreferredPlaces.Title",path:"number-of-preferred-places",page:vn,isAllowed:this.authService.hasAnyRole([...M])},{name:"Page.MunicipalitySettings.OtherDecisions.Title",path:"other-decisions",page:ho,isAllowed:this.authService.hasAnyRole([...M])&&this.shouldShowFeatureOtherDecisions}]},{name:"Fee.Plural",modules:[{name:"ECEC.Fee.Parameter.Plural",path:"fee-parameters",page:Zc,isAllowed:this.authService.hasAnyRole([l.Roles.MUNICIPALITY_ADMIN])},{name:"Fee.FeeOrValueDecision.ContactDetails.Title",path:"fee-and-value-decisions-contact-details",page:ws,isAllowed:this.authService.hasAnyRole([l.Roles.MUNICIPALITY_ADMIN,l.Roles.MUNICIPALITY_SUPPORT])},{name:"ECEC.Voucher.Parameter.Plural",path:"voucher-parameters",page:O,isAllowed:this.authService.hasAnyRole([l.Roles.MUNICIPALITY_ADMIN])}]},{name:"Notifications.PushPermissionExplanation.Title",modules:[{name:"Page.MunicipalitySettings.RemindersAndDeadlines.Title",path:"reminders-and-deadlines",page:Kh,isAllowed:this.authService.hasAnyRole([l.Roles.MUNICIPALITY_ADMIN])},{name:"Page.MunicipalitySettings.LockingTimes.Title",path:"locking-times",page:sf,isAllowed:this.authService.hasAnyRole([l.Roles.MUNICIPALITY_ADMIN])}]},{name:"Page.MunicipalitySettings.Header.ECEC",modules:[{name:"ECEC.Payment.Extent.Option.Plural",path:"ecec-payment-extent-options-ecec",page:yc,isAllowed:this.authService.hasAnyRole([...M])},{name:"ECEC.PPE.Payment.Extent.Option.Plural",path:"ecec-payment-extent-options-ecec-ppe",page:yc,isAllowed:this.authService.hasAnyRole([...M])},{name:"ECEC.WeeklyTimeOptions.Title",path:"weekly-care-time-options",page:pd,isAllowed:this.authService.hasAnyRole([...M])},{name:"ECEC.IncomeAndDeductionTypes.IncomeAndDeductionTypes.Title",path:"ecec-income-and-deduction-page",page:eu,isAllowed:this.authService.hasAnyRole([...M])}]},{name:"Page.MunicipalitySettings.Header.ChildBasicInformation",modules:[{name:"Page.MunicipalitySettings.AllergySettings.Title",path:"child-allergy-settings",page:ui,isAllowed:this.authService.hasAnyRole([l.Roles.MUNICIPALITY_ADMIN])},{name:"Page.MunicipalitySettings.SpecialDietSettings.Title",path:"child-diet-settings",page:ui,isAllowed:this.authService.hasAnyRole([l.Roles.MUNICIPALITY_ADMIN])},{name:"Page.MunicipalitySettings.PermitSettings.Title",path:"permit-settings",page:Yu,isAllowed:this.authService.hasAnyRole([l.Roles.MUNICIPALITY_ADMIN])}]},{name:"Page.MunicipalitySettings.Header.FamilyDaycare",modules:[{name:"Page.MunicipalitySettings.ExpenseReimbursements.Title",path:"expense-reimbursements",page:Yh,isAllowed:this.authService.hasAnyRole(M)}]},{name:"Invoicing.Plural",modules:[{name:"Page.MunicipalitySettings.CreditAccounts.Title",path:"credit-accounts",page:al,isAllowed:this.authService.hasAnyRole([l.Roles.MUNICIPALITY_ADMIN,l.Roles.SERVICE_SECRETARY])},{name:"Page.MunicipalitySettings.OpenDayCareInvoicing.Title",path:"open-daycare-invoice-settings",page:Mp,isAllowed:this.authService.hasAnyRole([l.Roles.MUNICIPALITY_ADMIN,l.Roles.SERVICE_SECRETARY,l.Roles.MUNICIPALITY_SUPPORT])&&this.shouldShowFeatureOpenDaycare}]}],this.restoreModal()}openMunicipalitySettingsPages(M){var C=this;return(0,o.Z)(function*(){if(M.isAllowed)if(M.openMethod)C.navigateByRelativeURL(M.path);else{const Q={component:M.page,componentProps:{municipalityId:C.municipalityId,path:M.path},cssClass:"modal-full-size"};yield C.openModal(Q,l.Constants.MODAL,M.path)}})()}restoreModal(){const M=this.route.snapshot.queryParamMap.get(l.Constants.MODAL);if(M){let C;for(const Q of this.categories)if(C=Q.modules.find(Ye=>Ye.path===M&&Ye.isAllowed),C)break;C&&this.openMunicipalitySettingsPages(C)}}}_d.\u0275fac=function(M){return new(M||_d)(e.Y36(j.gz),e.Y36(l.SiviProjectsGatewayService),e.Y36(l.NotifyService),e.Y36(j.F0),e.Y36(T.sK),e.Y36(l.SiviModalController),e.Y36(Dn.YI),e.Y36(D.Ye))},_d.\u0275cmp=e.Xpm({type:_d,selectors:[["sivi-mun-set-municipality-settings"]],features:[e.qOj],decls:10,vars:8,consts:[["navbar-title",""],[1,"ion-padding"],["size","12","sizeMd","6","sizeXl","4",4,"ngFor","ngForOf","ngForTrackBy"],["size","12","sizeMd","6","sizeXl","4"],[1,"title"],[3,"ngClass",4,"ngFor","ngForOf","ngForTrackBy"],[3,"ngClass"],["class","pointer link","tabindex","0","siviKeyboardEvents","","role","link",3,"siviClick",4,"ngIf"],["tabindex","0","siviKeyboardEvents","","role","link",1,"pointer","link",3,"siviClick"]],template:function(M,C){if(1&M&&(e.TgZ(0,"ion-header")(1,"sivi-lib-navbar")(2,"div",0),e._uU(3),e.ALo(4,"translate"),e.ALo(5,"async"),e.qZA()()(),e.TgZ(6,"ion-content",1)(7,"ion-grid")(8,"ion-row"),e.YNc(9,em,5,5,"ion-col",2),e.qZA()()()),2&M){let Q;e.xp6(3),e.AsE(" ",e.lcZ(4,4,"Settings.Plural")," (",null==(Q=e.lcZ(5,6,C.siviProjectsGatewayService.getAppStateService().getMunicipality()))?null:Q.name,") "),e.xp6(6),e.Q6J("ngForOf",C.categories)("ngForTrackBy",C.trackByFnIndex)}},dependencies:[D.mk,D.sg,D.O5,E.wI,E.W2,E.jY,E.Gu,E.Nd,l.KeyboardEventsDirective,l.NavbarComponent,D.Ov,T.X$],styles:[".link[_ngcontent-%COMP%]{color:var(--ion-color-primary);text-decoration:underline;font-size:16px}"],data:{animation:[l.listAnimations]}});const xh=[{path:"",component:_d,pathMatch:"full"}];class iu{}iu.\u0275fac=function(M){return new(M||iu)},iu.\u0275mod=e.oAB({type:iu}),iu.\u0275inj=e.cJS({providers:[l.SiviProjectsGatewayService,l.SiviModalController],imports:[Gi,l.SiviCorePageModule,j.Bz.forChild(xh),Mu,pu,at,rs,Ad,Hm,wf,Sm,Oc,Ai,Xp,cc,Si,Es,Je,Vc,sc,tn,Zi,bg,To,Zm]});class xp{}class kv{}class id{getCurrentWeeklyCareTimeOptionByMunicipalityId(){}getWeeklyCareTimeOptionsByMunicipalityId(){}saveWeeklyCareTimeOptions(){}}class Dy{flushPermissions(){}getPermissions(){}getPermission(){}loadPermissions(){}getCurrentMunicipality(){}}class Jh{getPeriodsByMunicipality(){return(0,tt.of)([])}deletePeriod(){return(0,tt.of)({})}savePeriod(){return(0,tt.of)({})}getPlannedUnits(){return(0,tt.of)([])}getAreas(){return(0,tt.of)([])}}class Sb{saveTemplate(){return(0,tt.of)({})}getTemplates(){return(0,tt.of)([])}}class f0{updateEcecFee(){return(0,tt.of)({})}getEcecFees(){return(0,tt.of)([])}createNewEcecFee(){return(0,tt.of)({})}deleteEcecFee(){return(0,tt.of)({})}}class Ab{getExpenseReimbursementsList(){return(0,tt.of)([])}getExpenseReimbursement(){return(0,tt.of)()}saveExpenseReimbursement(){return(0,tt.of)()}deleteExpenseReimbursement(){return(0,tt.of)()}}class Dh{updateEcecVoucherParameters(){return(0,tt.of)({})}getEcecVoucherParameters(){return(0,tt.of)([])}createNewEcecVoucherParameters(){return(0,tt.of)({})}deleteEcecVoucherParameters(){return(0,tt.of)({})}}class qf{getTemplates(){return(0,tt.of)([])}getTemplate(){}saveTemplate(){}deleteTemplate(){}getThemes(){}getTheme(){}deleteTheme(){}saveThemeAndTopics(){}}class wd{getIncomeStatements(){return(0,tt.of)([])}getIncomeStatement(){return(0,tt.of)([])}getFixedValuesForNewIncomeStatement(){return(0,tt.of)([])}saveNewIncomeStatement(){return(0,tt.of)([])}updateIncomeStatement(){return(0,tt.of)([])}}class Qh{getReminderAndDeadlineSettings(){}saveReminderAndDeadlineSettings(){}}class bC{getCreditAccounts(){return(0,tt.of)([])}getCreditAccountOrganizationStructure(){return(0,tt.of)([])}getCreditAccountWithId(){return(0,tt.of)({})}updateCreditSettings(){return(0,tt.of)({})}}class Bp{getOtherDecisionsSettings(){}saveOtherDecisionsSettings(){}getOtherDecisionTypes(){}getChildSupport(){}getOtherDecisionTexts(){}}class tm{getInvoiceSettings(){return(0,tt.of)([])}getInvoiceSetting(){return(0,tt.of)([])}saveInvoiceSettings(){return(0,tt.of)()}}class Hd{getLockingTimesSettings(){return(0,tt.of)([])}saveLockingTimeSetting(){return(0,tt.of)()}getLockingTimesSetting(){return(0,tt.of)({})}deleteLockingTimeSetting(){return(0,tt.of)(null)}}const nm=function(){var te=(0,o.Z)(function*(){return{present:(M=(0,o.Z)(function*(){}),function(){return M.apply(this,arguments)}),onDidDismiss:function(){var M=(0,o.Z)(function*(){});return function(){return M.apply(this,arguments)}}()};var M});return function(){return te.apply(this,arguments)}}();class Up{static getAccounts(){return[{id:"1",validFrom:"2023-07-01",validUntil:"2023-07-31",state:l.Constants.FUTURE,organizationAccountSettings:this.mockOrganizationAccountSettings()},{id:"2",validFrom:"2023-08-01",state:l.Constants.FUTURE,organizationAccountSettings:this.mockOrganizationAccountSettings()},{id:"3",validFrom:"2023-01-01",validUntil:"2023-06-30",state:l.Constants.CURRENT,organizationAccountSettings:this.mockOrganizationAccountSettingsIncludedChild()},{id:"4",validFrom:"2022-07-01",validUntil:"2022-12-31",state:l.Constants.EXPIRED}]}static mockOrganizationAccountSettings(){return[{level:0,organizationId:"123",name:"Organization 1",childrenOrganizations:null,showChildren:!1,creditAccount:"1234567890"},{level:0,organizationId:"456",name:"Organization 2",childrenOrganizations:null,showChildren:!1,creditAccount:"0987654321"}]}static mockOrganizationAccountSettingsIncludedChild(){return[{level:0,organizationId:"org1",name:"Organization 1",childrenOrganizations:[{level:1,organizationId:"org2",name:"Organization 2",childrenOrganizations:[{level:2,organizationId:"org3",name:"Organization 3",childrenOrganizations:null,showChildren:!1,creditAccount:"0123456789"}],showChildren:!0,creditAccount:"1234567890"}],showChildren:!0,creditAccount:"2345678901"}]}static mockPlainOrganizationAccountSettings(){return[{id:"1",name:"TestOrg",organizationId:"org1",creditAccount:null,childrenOrganizations:[{id:null,name:"Child1",organizationId:"child1",creditAccount:"credit1"},{id:"child2",name:"Child2",organizationId:"child2",creditAccount:"credit2",childrenOrganizations:[{id:null,name:"Grandchild1",organizationId:"grandchild1",creditAccount:null}]}]}]}static mockFlatOrganizationAccountSettings(){return[{id:"1",name:"TestOrg",organizationId:"org1",creditAccount:null},{id:null,name:"Child1",organizationId:"child1",creditAccount:"credit1"},{id:"child2",name:"Child2",organizationId:"child2",creditAccount:"credit2"},{id:null,name:"Grandchild1",organizationId:"grandchild1",creditAccount:null}]}}class Hu{static getExtentOptions(){return[{id:"0535d2f9-369e-413d-9e10-21c8a571eb7b",createdDate:"2019-03-11T10:11:59.822259Z",createdBy:"7bc039ff-00eb-45c9-8d10-485e9eb1f4cf",restEntityState:"EXPIRED",municipalityId:"c03cd4a6-5654-4c52-9c7b-1f2f8d4f5c4e",fromDate:"2019-03-01T18:02:50Z",paymentExtentValues:[{id:"7f3279ec-554c-4960-9c76-23dc1c44d901",paymentExtentMunicipalitySetting:{id:"0535d2f9-369e-413d-9e10-21c8a571eb7b"},overHoursPerWeek:20,maxHoursPerWeek:40,overHoursPerWeekECEC:30,maxHoursPerWeekECEC:40,maxHoursPerMonth:120,overHoursPerWeekPrivateECEC:50,maxHoursPerWeekPrivateECEC:60,maxFees:50.45,fullTime:!0,partTime:!1,privateFullTime:!0,privatePartTime:!1},{id:"540d39da-1aff-45a7-9b76-6632f683b214",paymentExtentMunicipalitySetting:{id:"0535d2f9-369e-413d-9e10-21c8a571eb7b"},overHoursPerWeek:20,overHoursPerWeekECEC:30,overHoursPerWeekPrivateECEC:30,maxHoursPerWeek:40,maxHoursPerWeekECEC:40,maxHoursPerWeekPrivateECEC:45,maxHoursPerMonth:120,maxFees:65.74,fullTime:!0,partTime:!1,privateFullTime:!0,privatePartTime:!1}]},{id:"94f4935f-2e29-4bd8-8dbb-efd657686366",createdDate:"2019-03-11T10:10:43.125546Z",createdBy:"7bc039ff-00eb-45c9-8d10-485e9eb1f4cf",restEntityState:"CURRENT",municipalityId:"c03cd4a6-5654-4c52-9c7b-1f2f8d4f5c4e",fromDate:"2019-03-03T18:02:50Z",paymentExtentValues:[{id:"3c489045-9d8d-4cce-8974-57d26983c8f1",paymentExtentMunicipalitySetting:{id:"94f4935f-2e29-4bd8-8dbb-efd657686366"},overHoursPerWeek:30,maxHoursPerWeek:60,maxHoursPerMonth:150,maxFees:65.74,fullTime:!0,partTime:!1,privateFullTime:!0,privatePartTime:!1}]},{id:"2e0c372f-cb3b-4769-8f39-f125f8e31833",createdDate:"2019-03-11T10:13:10.175627Z",createdBy:"7bc039ff-00eb-45c9-8d10-485e9eb1f4cf",restEntityState:"FUTURE",municipalityId:"c03cd4a6-5654-4c52-9c7b-1f2f8d4f5c4e",fromDate:"2019-03-25T18:02:50Z",paymentExtentValues:[{id:"f779b5ee-1b4d-445d-9bb0-ca20aac118ac",paymentExtentMunicipalitySetting:{id:"2e0c372f-cb3b-4769-8f39-f125f8e31833"},overHoursPerWeek:20,maxHoursPerWeek:30,maxHoursPerMonth:30,maxFees:150,fullTime:!0,partTime:!1,privateFullTime:!0,privatePartTime:!1}]}]}static getExtentOptionPayload(){return{municipalityId:this.getExtentOptions()[0].municipalityId,fromDate:"2019-03-22T21:02:50+03:00",paymentExtentValues:[{paymentExtentMunicipalitySetting:{id:null},overHoursPerWeek:20,maxHoursPerWeek:40,maxHoursPerMonth:120,maxFees:50,fullTime:!0,partTime:!1}]}}}class sv{static getFeeparameter(){return{familyFeeSetting:{familySize2IncomeThreshold:10,familySize2MaxFee:20,familySize3IncomeThreshold:10,familySize3MaxFee:20,familySize4IncomeThreshold:10,familySize4MaxFee:20,familySize5IncomeThreshold:10,familySize5MaxFee:20,familySize6IncomeThreshold:10,familySize6MaxFee:20,nextFamilyMembersIncomeThreshold:20},feeReductionSetting:{feePercentReductionLvl1:10,feePercentReductionLvl2:20,feePercentReductionLvl3:30,feePercentReductionLvl4:40,feePercentReductionLvl5:50,feePercentReductionLvl6:60},id:"123",maxFee:100,maxFeePercentNextChild:5,maxFeePercentSecondChild:4,minFee:0,startDate:"01.01.2019",state:"CURRENT",canBeDeleted:!1,freeOfCharge:!1}}}class Rv{static getIncomeType(){return{id:"123",name:"income.type",enabled:!0,subTypes:[this.getIncomeSubType()],descriptionEn:"",descriptionFi:"",descriptionSv:"",orderIndex:0}}static getIncomeSubType(){return{id:"456",name:"income.subtype",enabled:!0,descriptionEn:"",descriptionFi:"",descriptionSv:"",orderIndex:0}}static getMockIncomeStatement(){return{id:"123",fromDate:"2022 - 02 - 01",inUse:!1,incomeTypes:[this.mockIncomeType()],deductionTypes:[this.mockDeductionType()]}}static mockIncomeType(M=0,C=1,Q="123",Ye=!0,Zt=""){return{name:"Income.type",id:Q,enabled:!0,subTypes:this.getMockSubTypes(C,Ye,Zt),descriptionEn:"",descriptionFi:"",descriptionSv:"",orderIndex:M}}static getMockSubTypes(M=1,C=!0,Q=""){const Ye=[];for(let Zt=0;Zt<M;Zt++)Ye.push({name:Q+"income.subtype",enabled:C,descriptionEn:"",descriptionFi:"",descriptionSv:"",orderIndex:Zt});return Ye}static mockDeductionType(M=0,C=!0,Q="789"){return{name:"Deduction.type",id:Q,enabled:C,descriptionEn:"",descriptionFi:"",descriptionSv:"",orderIndex:M}}static mockUpdate(M,C=!0,Q=this.mockIncomeType().name,Ye=""){return{id:M,name:Q,enabled:C,descriptionFi:Ye,subTypes:this.getMockSubTypes()}}}class ml{static getECECMessageTemplate(){return{createdDate:"2020-08-11T08:25:09.384655+03:00",createdBy:"6623c6db-7e72-40d3-9489-cf2416e3e2a2",id:"ca300402-0b87-44af-8603-681bfb62319f",languages:["fi","sv","en"],title:"sivi.starting-and-ending.ecec-template.title",organizationId:"58adb5f3-70f4-488f-92e7-2f7870d2e846",restEntityState:"CURRENT",type:"sivi.message.template.starting-and-ending.service-voucher",validFrom:"2020-08-11T00:00:00+03:00",validUntil:"2020-08-21T00:00:00+03:00"}}}class pf{static getWeeklyTimeDropdown(){return{id:"da361588-f148-43ab-9bde-f892fc3824a2",createdDate:"2019-08-29T08:31:05.470519Z",updatedDate:"2019-08-29T08:31:05.470519Z",createdBy:"system",updatedBy:"system",name:"sivi.municipality.settings.type.weeklycaretime",value:"SIVI municipality settings type ECEC weekly care time",childCodes:[{id:"827779b8-5996-4932-bf3b-cce3fb8d42ab",createdDate:"2020-02-18T06:39:26.159017Z",updatedDate:"2020-02-18T06:39:26.159017Z",createdBy:"system",updatedBy:"system",name:"sivi.municipality.settings.type.weeklycaretime.mon-fri-late-evenings",value:"Late evenings Mon-Fri"},{id:"f9af4610-8e18-41cf-912e-0e78d1f94741",createdDate:"2019-08-29T08:31:05.470519Z",updatedDate:"2019-08-29T08:31:05.470519Z",createdBy:"system",updatedBy:"system",name:"sivi.municipality.settings.type.weeklycaretime.round-the-clock",value:"Round-the-clock"},{id:"ac20d87e-915a-44b5-b520-ed96e33aab9a",createdDate:"2019-08-29T08:31:05.470519Z",updatedDate:"2019-08-29T08:31:05.470519Z",createdBy:"system",updatedBy:"system",name:"sivi.municipality.settings.type.weeklycaretime.weekends",value:"Weekends Sat-Sun"},{id:"597b228c-ed36-4372-9177-a0176dfa28ca",createdDate:"2019-08-29T08:31:05.470519Z",updatedDate:"2019-08-29T08:31:05.470519Z",createdBy:"system",updatedBy:"system",name:"sivi.municipality.settings.type.weeklycaretime.mon-fri-evenings",value:"Early evenings Mon-Fri"},{id:"5e924da8-b1d8-4eac-aad4-7a6bbf5697ba",createdDate:"2019-08-29T08:31:05.470519Z",updatedDate:"2019-08-29T08:31:05.470519Z",createdBy:"system",updatedBy:"system",name:"sivi.municipality.settings.type.weeklycaretime.mon-fri-mornings",value:"Early mornings Mon-Fri"},{id:"ab049f9c-6a5b-4628-972c-aeebde38874b",createdDate:"2019-08-29T08:31:05.470519Z",updatedDate:"2019-08-29T08:31:05.470519Z",createdBy:"system",updatedBy:"system",name:"sivi.municipality.settings.type.weeklycaretime.mon-fri",value:"Mon-Fri"}]}}static getSavedWeeklyTimeOption(){return{id:"0535d2f9-369e-413d-9e10-21c8a571eb7b",municipalityId:"c03cd4a6-5654-4c52-9c7b-1f2f8d4f5c4e",fromDate:"2019-03-20T21:02:50+03:00",restWeeklyCareTimeOptionValue:[{id:"1",option:"Mon-Fri",languages:[{id:"1",language:"fi",name:"Manantai"},{id:"2",language:"sv",name:"M\xe5ndag"},{id:"3",language:"en",name:"Monday"}],fromTime:"08:00",untilTime:"16:00",turnCare:!0},{id:"2",option:"Mon-Fri",languages:[{id:"2-1",language:"fi",name:"Manantai"},{id:"2-2",language:"sv",name:"M\xe5ndag"},{id:"2-3",language:"en",name:"Monday"}],fromTime:"08:00",untilTime:"16:00",turnCare:!0}]}}}class mm{static getIntegrations(){return[{id:"5fd6cfb5-9236-4a5a-ad33-41b650fb33b1",organizationId:"dbb9169e-a6b4-47bb-bb7e-8ed9563fc618",attributeKey:"sivi.integration.type.facta.username",attributeValue:"factanewusername",integrationType:"sivi.integration.type.facta"},{id:"b38e4c3a-ed5c-4ff2-ae14-b75a8e21a53c",organizationId:"dbb9169e-a6b4-47bb-bb7e-8ed9563fc618",attributeKey:"sivi.integration.type.facta.password",integrationType:"sivi.integration.type.facta"}]}}class Sy{static getPeriod(){return{id:"123",periodName:"HP",municipalityId:"789",periodStart:"1995-03-20",periodEnd:"1995-03-21",enrollmentStart:"1995-03-22",enrollmentEnd:"1995-03-24",clubPeriodStart:"1995-03-20",clubPeriodEnd:"1995-03-21",clubEnrollmentStart:"1995-03-22",clubEnrollmentEnd:"1995-03-24",twoYearPeriodEnd:"1995-03-01",units:[]}}static getPlannedUnits(){return[{id:"123",organizationName:"vantaa",areaName:"helsinki",areaId:"area-id",club:!1,ecec:!0,organizationId:"7ddbfd8f-960f-481e-938c-fd9607a69fb3",periodId:"2d4528d2-67c0-4aa3-a30e-90c4d40486aa",preprimary:!1,daycareType:"sivi.organization.type.daycareplace.type.daycarecentre"}]}static getMunicipalityPeriodAreas(){return[{name:"area1",selected:!0,id:"area-id"},{name:"area2",selected:!0,id:"2"},{name:"area3",selected:!0,id:"3",organizationType:l.OrganizationTypes.ORGANIZATION_TYPE_AREA}]}static getMunicipalityPeriodUnits(){return[{id:"1",areaName:"area1",organizationName:"bTestOrganization",organizationId:"org2",preprimary:!1,ecec:!0,club:!0},{id:"2",areaName:"area2",organizationName:"aTestOrganization1",organizationId:"org1",preprimary:!1,ecec:!0,club:!0}]}static getPeriodPrimaryAreas(){return[{id:"123",name:"HP"}]}}},10516:(qe,I,p)=>{"use strict";p.r(I),p.d(I,{ChildrenListComponent:()=>Ra,ChildrenListModule:()=>ba,GroupBasicInfoComponent:()=>Uo,GroupContactsComponent:()=>nn,GroupFocusComponent:()=>ps,GroupInfoComponent:()=>Cs,GroupInfoModule:()=>Ts,LanguageAndFocusUtils:()=>kn,MunicipalityInfoComponent:()=>ho,MunicipalityInfoModule:()=>To,OrganizationChildrenListComponent:()=>bu,OrganizationChildrenListModule:()=>Qu,OrganizationGroupsListComponent:()=>ti,OrganizationGroupsListModule:()=>ar,OrganizationInfoComponent:()=>Jt,OrganizationInfoModule:()=>bt,OrganizationStaffListComponent:()=>zl,OrganizationStaffListModule:()=>Lc,OrganizationUtils:()=>Gi,OrganizationsHierarchyComponent:()=>Qs,OrganizationsHierarchyModule:()=>Ku,OrganizationsSharedModule:()=>vi,RoleService:()=>wi,RoleStateComponent:()=>Qo,RoleStateComponentModule:()=>oo,RoleStateService:()=>mi,SiviOrganizationsLibraryModule:()=>st,SiviStaffViewModeComponent:()=>Cd,SiviStaffViewModeModule:()=>la,StaffBasicInfoFormComponent:()=>Ia,StaffEditorComponent:()=>Ju,StaffEditorModule:()=>Su,StaffPage:()=>sr,StaffPageModule:()=>ga,UnitBasicInfoComponent:()=>Mn,UnitBasicInfoModule:()=>Bn,UnitInfoComponent:()=>er,UnitInfoModule:()=>to});var o=p(15861),e=p(94650),l=p(54004),D=p(95698),g=p(95577),E=p(82722),T=p(63900),n=p(78372),P=p(18505),w=p(22940),B=p(39300),Y=p(28746),V=p(70262),ue=p(71884),he=p(91005),ae=p(68675),X=p(11365),ve=p(41854),ye=p(78240),ge=p(45840),ne=p(59378),pe=p(49594),Pe=p(61135),xe=p(77579),de=p(4128),re=p(32076),oe=p(60515),me=p(39646),be=p(39841),le=p(56451),Z=p(88692),Oe=p(89383),j=p(9116),ke=p(36895),Be=p(70191),nt=p(24006),mt=p(80529),ut=p(17489),Ve=p(90455),tt=p(59798),Ne=p(30671),wt=p(96308),ft=p(15439),Ct=p(10266),rn=p(94954);class st{static forRoot(q,W,dt,fn,Ei){return{ngModule:st,providers:[{provide:"AuthService",useExisting:q.AuthService},{provide:"TranslateService",useExisting:W.TranslateService},{provide:"AbstractRestService",useExisting:dt.AbstractRestService},{provide:"EnvironmentService",useExisting:fn.EnvironmentService},{provide:"AppStateService",useExisting:Ei.AppStateService}]}}constructor(){console.log("[sivi-organizations] version: ","4.3.0-103")}}st.\u0275fac=function(q){return new(q||st)},st.\u0275mod=e.oAB({type:st}),st.\u0275inj=e.cJS({});class nn extends Z.SiviAbstractForm{set group(q){this.onSetGroup(q)}get group(){return this._group}set readonly(q){this._readonly=q,this.setFormValidators()}get readonly(){return this._readonly}constructor(q,W){super(q),this.translate=q,this.fb=W,this.update=new e.vpe,this.formGroup=this.fb.group({phone:[""],secondaryPhone:[""],email:[""],secondaryEmail:[""]}),this.phoneErrorMessage={maxlength:this.translate.instant("Form.Error.MaxLengthIsChactersCount",{count:20})},this.emailErrorMessage={pattern:this.translate.instant("Form.Error.Invalid.Email"),maxlength:this.translate.instant("Form.Error.MaxLengthIsChactersCount",{count:100})},this._readonly=!1}ngOnInit(){this.setFormValidators()}onSetGroup(q){(0,ve.Z)(this.group,q)||this.formGroup.patchValue(this.getContactInfo(q))}onFormValueChange(q){const W=Object.keys(q).reduce((dt,fn)=>(dt[fn]=q[fn]||null,dt),{});this._group={...W},this.update.emit(this.group)}setFormValidators(){this.formGroup.get("phone").setValidators(this.getPhoneValidators(!0)),this.formGroup.get("secondaryPhone").setValidators(this.getPhoneValidators()),this.formGroup.get("email").setValidators(this.getEmailValidators()),this.formGroup.get("secondaryEmail").setValidators(this.getEmailValidators())}getPhoneValidators(q=!1){if(this.readonly)return[];const W=[Z.SiviValidators.validatePhoneNumber(),Z.SiviValidators.maxLength(20)];return q?[Z.SiviValidators.required,...W]:W}getEmailValidators(){return this.readonly?[]:[Z.SiviValidators.pattern(Z.Patterns.EMAIL),Z.SiviValidators.maxLength(100)]}getContactInfo(q){const{phone:W,secondaryPhone:dt,email:fn,secondaryEmail:Ei}=q;return{phone:W,secondaryPhone:dt,email:fn,secondaryEmail:Ei}}}function Dn(_t,q){if(1&_t&&e._UZ(0,"sivi-lib-organization-selector",7),2&_t){const W=e.oxw();e.Q6J("municipalityId",W.municipalityId)("organization",W.unit.parent)("disabled",W.readonly)}}nn.\u0275fac=function(q){return new(q||nn)(e.Y36(Oe.sK),e.Y36(nt.QS))},nn.\u0275cmp=e.Xpm({type:nn,selectors:[["sivi-organizations-group-contacts"]],inputs:{group:"group",readonly:"readonly"},outputs:{update:"update"},features:[e.qOj],decls:28,vars:36,consts:[["siviLibForm","",3,"formGroup"],[1,"header-div"],["siviGridCol","left"],["formControlName","phone","siviLibFormControl","","type","text","label-position","floating",3,"viewMode","label","errorMessages"],["formControlName","secondaryPhone","siviLibFormControl","","type","text","label-position","floating",3,"viewMode","label","errorMessages"],["formControlName","email","siviLibFormControl","","type","text","label-position","floating",3,"viewMode","label","errorMessages"],["formControlName","secondaryEmail","siviLibFormControl","","type","text","label-position","floating",3,"viewMode","label","errorMessages"]],template:function(q,W){1&q&&(e.TgZ(0,"div",0)(1,"ion-grid")(2,"ion-row")(3,"ion-col")(4,"div",1)(5,"h2"),e._uU(6),e.ALo(7,"translate"),e.qZA()()()(),e.TgZ(8,"ion-row")(9,"ion-col",2),e._UZ(10,"cgi-input",3),e.ALo(11,"translate"),e.ALo(12,"translate"),e.qZA()(),e.TgZ(13,"ion-row")(14,"ion-col",2),e._UZ(15,"cgi-input",4),e.ALo(16,"translate"),e.ALo(17,"translate"),e.qZA()(),e.TgZ(18,"ion-row")(19,"ion-col",2),e._UZ(20,"cgi-input",5),e.ALo(21,"translate"),e.ALo(22,"translate"),e.qZA()(),e.TgZ(23,"ion-row")(24,"ion-col",2),e._UZ(25,"cgi-input",6),e.ALo(26,"translate"),e.ALo(27,"translate"),e.qZA()()()()),2&q&&(e.Q6J("formGroup",W.formGroup),e.xp6(6),e.Oqu(e.lcZ(7,18,"Group.ContactInfo")),e.xp6(4),e.Q6J("viewMode",W.readonly)("label",e.lcZ(12,22,"Form.Label.Phone"))("errorMessages",W.phoneErrorMessage),e.uIk("aria-label",e.lcZ(11,20,"Form.Label.Phone")),e.xp6(5),e.Q6J("viewMode",W.readonly)("label",e.lcZ(17,26,"Form.Label.PhoneSecondary"))("errorMessages",W.phoneErrorMessage),e.uIk("aria-label",e.lcZ(16,24,"Form.Label.PhoneSecondary")),e.xp6(5),e.Q6J("viewMode",W.readonly)("label",e.lcZ(22,30,"Form.Label.Email"))("errorMessages",W.emailErrorMessage),e.uIk("aria-label",e.lcZ(21,28,"Form.Label.Email")),e.xp6(5),e.Q6J("viewMode",W.readonly)("label",e.lcZ(27,34,"Form.Label.EmailSecondary"))("errorMessages",W.emailErrorMessage),e.uIk("aria-label",e.lcZ(26,32,"Form.Label.EmailSecondary")))},dependencies:[Be.wI,Be.jY,Be.Nd,nt.JJ,nt.JL,Z.GridColDirective,Z.SiviFormDirective,Z.SiviFormControlDirective,nt.sg,nt.u,Oe.X$],encapsulation:2});class Mn extends Z.SiviAbstractForm{constructor(q,W){super(W),this.fb=q,this.translate=W,this.readonly=!1,this.update=new e.vpe,this.form=this.fb.group({name:[""],parent:[""],validFrom:[""],validUntil:[""]})}ngOnInit(){this.setValidators(),this.updateUnitData()}onFormValueChange(q){this.unit={...this.unit,...q},this.update.emit(this.unit)}setValidators(){this.readonly||(this.form.get("name").setValidators([Z.SiviValidators.required,Z.SiviValidators.maxLength(100)]),this.form.get("parent").setValidators([Z.SiviValidators.required]),this.form.get("validFrom").setValidators([Z.SiviValidators.required,Z.SiviValidators.validateDate(),Z.SiviValidators.validateDateIsAfterThan("validUntil"),Z.SiviValidators.validateInvalidControl("validUntil")]),this.form.get("validUntil").setValidators([Z.SiviValidators.validateDate(),Z.SiviValidators.validateDateIsBeforeThan("validFrom"),Z.SiviValidators.validateInvalidControl("validFrom")]))}updateUnitData(){this.form.get("name").patchValue(this.unit.name||""),this.form.get("parent").patchValue(this.unit.parent||""),this.form.get("validFrom").patchValue(this.unit.validFrom||""),this.form.get("validUntil").patchValue(this.unit.validUntil||"")}}Mn.\u0275fac=function(q){return new(q||Mn)(e.Y36(nt.QS),e.Y36(Oe.sK))},Mn.\u0275cmp=e.Xpm({type:Mn,selectors:[["sivi-organizations-unit-basic-info"]],inputs:{unit:"unit",municipalityId:"municipalityId",readonly:"readonly"},outputs:{update:"update"},features:[e.qOj],decls:16,vars:20,consts:[["siviLibForm","",3,"formGroup"],["siviGridCol","left"],["formControlName","name","siviLibFormControl","","type","text","label-position","floating",3,"label","value","viewMode"],["formControlName","parent","siviLibFormControl","","restrictToProperty","canAddChildOrganization",3,"municipalityId","organization","disabled",4,"ngIf"],["formControlName","validFrom","siviLibFormControl","",3,"readonly","label"],["siviGridCol","right"],["formControlName","validUntil","siviLibFormControl","",3,"readonly","minDate","label","readonlyValue"],["formControlName","parent","siviLibFormControl","","restrictToProperty","canAddChildOrganization",3,"municipalityId","organization","disabled"]],template:function(q,W){1&q&&(e.TgZ(0,"form",0)(1,"ion-row")(2,"ion-col",1),e._UZ(3,"cgi-input",2),e.ALo(4,"translate"),e.ALo(5,"translate"),e.qZA()(),e.TgZ(6,"ion-row")(7,"ion-col",1),e.YNc(8,Dn,1,3,"sivi-lib-organization-selector",3),e.qZA()(),e.TgZ(9,"ion-row")(10,"ion-col",1),e._UZ(11,"sivi-lib-datepicker",4),e.ALo(12,"translate"),e.qZA(),e.TgZ(13,"ion-col",5),e._UZ(14,"sivi-lib-datepicker",6),e.ALo(15,"translate"),e.qZA()()()),2&q&&(e.Q6J("formGroup",W.form),e.xp6(3),e.Q6J("label",e.lcZ(4,12,"Form.Label.Name"))("value",W.unit.name)("viewMode",W.readonly),e.uIk("aria-label",e.lcZ(5,14,"Form.Label.Name")),e.xp6(5),e.Q6J("ngIf",W.unit),e.xp6(3),e.Q6J("readonly",W.readonly)("label",e.lcZ(12,16,"General.Text.ValidFrom")),e.xp6(3),e.Q6J("readonly",W.readonly)("minDate",W.form.value.validFrom)("label",e.lcZ(15,18,"General.Text.ValidTo"))("readonlyValue",W.unit.validUntil?void 0:"-"))},dependencies:[ke.O5,Be.wI,Be.Nd,Z.GridColDirective,nt._Y,nt.JJ,nt.JL,Z.SiviFormDirective,Z.SiviFormControlDirective,nt.sg,nt.u,Z.DatepickerComponent,Z.OrganizationSelectorComponent,Oe.X$],styles:[".header-div[_ngcontent-%COMP%]{display:flex}.header-div[_ngcontent-%COMP%]   sivi-lib-info-popup[_ngcontent-%COMP%]{margin-top:auto;margin-bottom:4px;margin-left:10px;font-size:20px}ion-col[_ngcontent-%COMP%]{padding-left:0}"]});class vi{}vi.\u0275fac=function(q){return new(q||vi)},vi.\u0275mod=e.oAB({type:vi}),vi.\u0275inj=e.cJS({imports:[ke.ez,Be.Pc,Oe.aw.forChild({loader:{provide:Oe.Zw,useFactory:Z.createTranslateLoader,deps:[mt.eN]}}),Z.ContentLoaderModule,Z.DirectivesModule,ke.ez,Be.Pc,Oe.aw,Z.ContentLoaderModule,Z.DirectivesModule]});class Gi{static createOrganizationContact(q,W,dt){return{organization:{id:q},contact:{id:null,contactTypeCode:W||"",contactTypeDescription:"",value:"",info:""},primary:dt||!1,validFrom:null,validUntill:null}}static createOrganizationAddress(q,W=Z.ContactTypes.ADDRESS_TYPE,dt){return{organization:{id:q},address:{id:null,addressTypeCode:W,street:"",postalCode:"",city:""},primary:dt||!0}}}class mi extends Z.AbstractRestService{constructor(q,W,dt,fn,Ei){super(fn,Ei),this.staffService=q,this.translateService=W,this.notifyService=dt,this.http=fn,this.siviProjectsGatewayService=Ei,this.allRoles$=new Pe.X([])}connect(q){var W=this;return(0,o.Z)(function*(){const dt=yield W.fetchPersonRoles(q,Z.PersonOrganizationRoleState.CURRENT),fn=yield W.fetchPersonRoles(q,Z.PersonOrganizationRoleState.EXPIRED),Ei=yield W.fetchPersonRoles(q,Z.PersonOrganizationRoleState.FUTURE),Po=dt.concat(fn,Ei),En=W.removeRoleByName(Po,Z.Roles.ORGANIZATION_MEMBER);return W.allRoles$.next(En),W.allRoles$.asObservable()})()}fetchPersonRoles(q,W){var dt=this;return(0,o.Z)(function*(){let fn=[];return yield dt.staffService.getAllRolesByStaffId(q,W).pipe((0,l.U)(Ei=>Ei.content)).toPromise().then(Ei=>{fn=[...Ei]}),fn})()}savePersonRole(q){var W=this;return(0,o.Z)(function*(){return W.staffService.saveStaffRole(q).toPromise().then(dt=>(W.updateLocalRoleList(dt),null)).catch(()=>q.organizationId)})()}updatePersonRole(q,W){this.staffService.saveStaffRole(q).pipe((0,D.q)(1)).subscribe(dt=>{this.updateLocalRoleList(dt),this.notifyService.toastSaveSuccess(),W&&this.deleteRole(W)},dt=>{console.error("updatePersonRole failed",dt),null===dt.error?this.notifyService.alertFormSaveFailed():this.createErrorResponseFromCode(dt.error.message,dt.error.status)})}deleteRole(q){const dt=this.allRoles$.getValue().filter(fn=>fn.restEntityState!==q);this.allRoles$.next(dt)}updateLocalRoleList(q){const W=this.allRoles$.getValue(),dt=W.findIndex(fn=>q.id===fn.id);dt>-1?W[dt]=q:W.push(q),this.allRoles$.next(W)}createErrorResponseFromCode(q,W){const dt=this.translateService.instant("Message.Save.Error");let fn;fn="personOrganizationRole not exists"===q?this.translateService.instant("Role.PersonOrganizationRoleNotExists"):"ValidFrom should not be null"===q?this.translateService.instant("Form.Error.Required"):"Invalid Date Range"===q?this.translateService.instant("Form.Error.Invalid.DateRange"):"Expired rolesOptions can't be inactivated"===q?this.translateService.instant("Role.ExpiredRolesCannotBeInactivated"):"Professional roles not found"===q?this.translateService.instant("Role.NoProfessionalRolesFoundInGivenRange"):"Number of childminders exceeds in the group type"===q?this.translateService.instant("Role.ChildminderExceededTheLimitInGroup"):this.createMoreErrorResponseFromCode(q,W),this.notifyService.alert(dt,fn)}createMoreErrorResponseFromCode(q,W){let dt="";return dt="INVALID_ROLE"===q?this.translateService.instant("Message.Error.InvalidRole"):"no-permission"===q?this.translateService.instant("Message.Error.NoPermission"):"USER_CANNOT_ASSIGN_ROLE_TO_SELF"===q?this.translateService.instant("Message.Error.UserCannotAssignRoleToSelf"):W&&417===W?this.translateService.instant("Message.Error.RoleAndOrganizationAlreadyExists"):this.translateService.instant("Message.Error.GeneralBackendError"),dt}removeRoleByName(q,W){return(0,ye.Z)(q,{roleName:W}),q}}mi.\u0275fac=function(q){return new(q||mi)(e.LFG(Z.StaffService),e.LFG(Oe.sK),e.LFG(Z.NotifyService),e.LFG(mt.eN),e.LFG(Z.SiviProjectsGatewayService))},mi.\u0275prov=e.Yz7({token:mi,factory:mi.\u0275fac});class wi extends Z.AbstractRestService{constructor(q,W){super(q,W),this.http=q,this.siviProjectsGatewayService=W}getAllRoles(q){const dt=this.getCommonOptions(),fn=new mt.LE;return dt.params=fn.set("organizationId",q),this.get("./api/sivi-accounts-api/roles/",dt)}}wi.\u0275fac=function(q){return new(q||wi)(e.LFG(mt.eN),e.LFG(Z.SiviProjectsGatewayService))},wi.\u0275prov=e.Yz7({token:wi,factory:wi.\u0275fac});class Bn{}Bn.\u0275fac=function(q){return new(q||Bn)},Bn.\u0275mod=e.oAB({type:Bn}),Bn.\u0275inj=e.cJS({providers:[Z.OrganizationCommonService],imports:[vi,nt.u5,Z.SiviFormsModule,Z.DirectivesModule,Z.SiviCoreComponentModule,Z.InfoPopupComponentModule,Z.DatepickerModule,Z.OrganizationSelectorModule]});class kn{static getValidFromValidators(q,W,dt){return[Z.SiviValidators.required,Z.SiviValidators.validateDate(),Z.SiviValidators.validateDateIsAfterThan("validUntil"),Z.SiviValidators.validateDateIsAfterThanParameter(q.validUntil||""),Z.SiviValidators.validateDateIsSameOrAfterThanParameter(q.validFrom||""),Z.SiviValidators.validateInvalidControl("validUntil"),Z.SiviValidators.validateIfDateIsBetweenRange(W,dt)]}static getValidUntilValidators(q,W,dt){return[Z.SiviValidators.validateDate(),Z.SiviValidators.validateDateIsBeforeThan("validFrom"),Z.SiviValidators.validateDateIsBeforeThanParameter(q.validFrom||""),Z.SiviValidators.validateDateIsAfterThanParameter(q.validUntil||""),Z.SiviValidators.validateInvalidControl("validFrom"),Z.SiviValidators.validateIfDateIsBetweenRange(W,dt)]}static calculateTotalPlaces(q,W){return(Number(q)||0)+(Number(W)||0)}static createFocus(){return{id:null,tempId:(Date.now()*Math.random()).toString(),activity:null,language:null,languageExtent:null,validFrom:null,validUntil:null,ececPlaces:null,ppePlaces:null}}static createPeriod(){return{id:null,tempId:(Date.now()*Math.random()).toString(),validFrom:null,validUntil:null,ececPlaces:null,ppePlaces:null,focuses:[],restEntityState:Z.Constants.FUTURE}}}function On(_t,q){if(1&_t){const W=e.EpF();e.TgZ(0,"cgi-icon",4),e.NdJ("siviClick",function(){e.CHM(W);const fn=e.oxw();return e.KtG(fn.onDeleteClick(fn.unitFocus))}),e.qZA()}if(2&_t){const W=e.oxw();e.uIk("aria-label",W.labels.deleteFocus)}}function je(_t,q){if(1&_t&&(e.ynx(0),e._UZ(1,"cgi-input",14),e.ALo(2,"translate"),e.ALo(3,"async"),e.BQk()),2&_t){const W=e.oxw(2);e.xp6(1),e.Q6J("label",e.lcZ(2,3,"General.Language.Singular"))("viewMode",!0)("value",W.getLanguageText(e.lcZ(3,5,W.selectedLanguage$)))}}const Bt=function(_t){return{"required-star":_t}};function xn(_t,q){if(1&_t){const W=e.EpF();e.TgZ(0,"div",15)(1,"cgi-autocomplete",16),e.NdJ("valueChange",function(fn){e.CHM(W);const Ei=e.oxw(2);return e.KtG(Ei.onChangeLanguage(fn))}),e.ALo(2,"async"),e.ALo(3,"translate"),e.ALo(4,"translate"),e.ALo(5,"translate"),e.qZA()()}if(2&_t){const W=e.oxw(2);e.Q6J("ngClass",e.VKq(16,Bt,W.showRequiredStarForLanguage)),e.xp6(1),e.Q6J("multiSelect",!1)("options",W.languageOptions)("value",e.lcZ(2,8,W.selectedLanguage$))("placeholderImage","")("selectAllText",e.lcZ(3,10,"General.Buttons.SelectAll"))("removeAllText",e.lcZ(4,12,"General.Buttons.RemoveAll"))("placeholder",e.lcZ(5,14,"General.Language.Singular"))}}function Fn(_t,q){if(1&_t&&(e.TgZ(0,"ion-grid")(1,"ion-row")(2,"ion-col",5),e._UZ(3,"sivi-lib-select",6),e.ALo(4,"translate"),e.ALo(5,"translate"),e.qZA()(),e.TgZ(6,"ion-row")(7,"ion-col",5),e.YNc(8,je,4,7,"ng-container",7),e.YNc(9,xn,6,18,"ng-template",null,8,e.W1O),e.qZA(),e.TgZ(11,"ion-col",9),e._UZ(12,"sivi-lib-select",10),e.ALo(13,"translate"),e.qZA()(),e.TgZ(14,"ion-row")(15,"ion-col",5),e._UZ(16,"cgi-input",11),e.ALo(17,"translate"),e.ALo(18,"translate"),e.qZA(),e.TgZ(19,"ion-col",9),e._UZ(20,"cgi-input",12),e.ALo(21,"translate"),e.ALo(22,"translate"),e.qZA()(),e.TgZ(23,"ion-row")(24,"ion-col",5),e._UZ(25,"cgi-input",13),e.ALo(26,"translate"),e.ALo(27,"translate"),e.qZA()()()),2&_t){const W=e.MAs(10),dt=e.oxw();e.xp6(3),e.Q6J("viewMode",dt.readonly)("options",dt.activityOptions)("label",e.lcZ(5,24,"General.Activity.Singular")),e.uIk("aria-label",e.lcZ(4,22,"General.Activity.Singular")),e.xp6(5),e.Q6J("ngIf",dt.readonly)("ngIfElse",W),e.xp6(4),e.Q6J("disabled",!dt.unitFocus.language)("viewMode",dt.readonly)("options",dt.languageExtentOptions)("label",e.lcZ(13,26,"General.Language.Extent.Singular")),e.xp6(4),e.Q6J("errorMessages",dt.validatorErrorMessagesForEcecPlaces)("label",e.lcZ(17,28,"Organization.Unit.PeriodsForPlacesAndFocuses.AmountOfECECPlaces"))("viewMode",dt.readonly),e.uIk("aria-label",e.lcZ(18,30,"Organization.Unit.PeriodsForPlacesAndFocuses.AmountOfECECPlaces")),e.xp6(4),e.Q6J("errorMessages",dt.validatorErrorMessagesForPpePlaces)("label",e.lcZ(21,32,"Organization.Unit.PlacesAndFocuses.AmountOfPPEPlaces"))("viewMode",dt.readonly),e.uIk("aria-label",e.lcZ(22,34,"Organization.Unit.PlacesAndFocuses.AmountOfPPEPlaces")),e.xp6(5),e.Q6J("value",dt.totalPlaces)("label",e.lcZ(26,36,"Organization.Unit.PeriodsForPlacesAndFocuses.TotalAmountOfECECPlaces"))("viewMode",!0),e.uIk("aria-label",e.lcZ(27,38,"Organization.Unit.PeriodsForPlacesAndFocuses.TotalAmountOfECECPlaces"))}}class ui extends Z.SiviAbstractForm{set focus(q){this.unitFocus={...q,...q.language?{language:q.language.toUpperCase()}:{}},this.totalPlaces=kn.calculateTotalPlaces(q.ececPlaces,q.ppePlaces)}set inputPeriod(q){this.period=q,this.updateEcecAndPpePlacesValidator()}get readonly(){return this._readonly}set readonly(q){this._readonly=q,this.setValidators(!q,this.unitFocus),setTimeout(()=>{this.setLanguage(this.unitFocus)},200),this.cdr.detectChanges()}constructor(q,W,dt,fn){super(q),this.translate=q,this.cdr=W,this.notify=dt,this.fb=fn,this.abnormalPeriod=!1,this._readonly=!0,this.update=new e.vpe,this.deleteElement=new e.vpe,this.constants=Z.Constants,this.totalPlaces=0,this.validatorErrorMessagesForEcecPlaces=this.getValidatorErrorMessagesForEcecPlaces(),this.validatorErrorMessagesForPpePlaces=this.getValidatorErrorMessagesForPpePlaces(),this.selectedLanguage$=new xe.x,this.showRequiredStarForLanguage=!1,this.labels={deleteFocus:this.translate.instant("Message.Delete",{name:this.translate.instant("Organization.Educational.Focus.Singular")})},this.form=this.fb.group({activity:[""],language:[""],languageExtent:[""],ececPlaces:[""],ppePlaces:[""]})}ngOnInit(){super.ngOnInit(),this.setUnitFocusData(this.unitFocus),setTimeout(()=>{this.setLanguage(this.unitFocus),this.cdr.detectChanges()},2e3)}onChangeLanguage(q){q.detail?.value[0]&&(this.unitFocus.language=q.detail?.value[0].code,this.selectedLanguage$.next(q.detail?.value),this.showRequiredStarForLanguage=!this.unitFocus.language,this.setValidators(!this.readonly,this.unitFocus),this.update.emit(this.clearEmptyValues(this.unitFocus)))}onFormValueChange(q){const W={...this.unitFocus,...q,language:this.unitFocus.language};(0,ve.Z)(this.clearEmptyValues(this.unitFocus),this.clearEmptyValues(W))||(this.totalPlaces=kn.calculateTotalPlaces(W.ececPlaces,W.ppePlaces),this.setValidators(!this.readonly,W),this.update.emit(this.clearEmptyValues(W)))}clearEmptyValues(q){return Z.Utils.removeEmptyValues((0,ge.Z)(q))}onDeleteClick(q){var W=this;return(0,o.Z)(function*(){(yield W.notify.deleteConfirmPopup()).onDidDismiss().then(fn=>{fn.data&&W.deleteElement.emit(q)})})()}setValidators(q,W){if(q){this.showRequiredStarForLanguage=W&&!W.activity&&!W.language;const dt=this.getDropdownValidators(W),fn=this.getLanguageExtentValidators(W);this.form.get("activity").setValidators(dt),this.form.get("language").setValidators(dt),this.form.get("languageExtent").setValidators(fn),this.updateEcecAndPpePlacesValidator(),this.cdr.detectChanges()}}setLanguage(q){if(!this.languageOptions)return void this.selectedLanguage$.next([]);const W=this.languageOptions.find(dt=>dt.value.code===q.language?.toUpperCase());this.selectedLanguage$.next(W?[W.value]:[])}setUnitFocusData(q){this.form.get("activity").patchValue(q.activity),this.form.get("languageExtent").patchValue(q.languageExtent),this.form.get("ececPlaces").patchValue(q.ececPlaces),this.form.get("ppePlaces").patchValue(q.ppePlaces)}updateEcecAndPpePlacesValidator(){if(!this.readonly){const q=this.getEcecPlacesValidators(),W=this.getPpePlacesValidators();this.form.get("ececPlaces").setValidators(q),this.form.get("ppePlaces").setValidators(W)}}getLanguageExtentValidators(q){return q?.language?[Z.SiviValidators.required]:[]}getLanguageText(q){return q&&0!==q.length?q.map(W=>W.name).join(", "):"-"}getDropdownValidators(q){return!q||q.activity||q.language?[]:[Z.SiviValidators.required]}getEcecPlacesValidators(){return[Z.SiviValidators.required,Z.SiviValidators.pattern(Z.Patterns.ONLYNUMBERS),this.validateIsControlSmallerOrEqualTo(this.period.ececPlaces,"controlIsGreaterThanParameter")]}getPpePlacesValidators(){return[Z.SiviValidators.required,Z.SiviValidators.pattern(Z.Patterns.ONLYNUMBERS),this.validateIsControlSmallerOrEqualTo(this.period.ppePlaces,"greaterThanPeriodPpePlaces")]}getValidatorErrorMessagesForEcecPlaces(){return{controlIsSmallerThanParameter:this.translate.instant("Organization.Unit.PlacesAndFocuses.Error.ECECPlacesSmallerThanPPEPlaces"),controlIsGreaterThanParameter:this.translate.instant("Organization.Unit.PlacesAndFocuses.Error.ECECPlacesGreaterThanUnitECECPlaces")}}getValidatorErrorMessagesForPpePlaces(){return{greaterThanPeriodPpePlaces:this.translate.instant("Organization.Unit.PlacesAndFocuses.Error.PPEPlacesGreaterThanUnitPPEPlaces"),greaterThanFocusEcecPlaces:this.translate.instant("Organization.Unit.PlacesAndFocuses.Error.PPEPlacesGreaterThanEcecPlaces")}}validateIsControlSmallerOrEqualTo(q,W){const dt=W||"controlIsGreaterThanParameter";return fn=>{const Ei=parseInt(fn.value,10),Po=parseInt(q,10)||0;return!Ei&&0!==Ei||isNaN(Ei)||!Po&&0!==Po||isNaN(Po)||Ei<=Po?null:{[dt]:!0}}}}ui.\u0275fac=function(q){return new(q||ui)(e.Y36(Oe.sK),e.Y36(e.sBO),e.Y36(Z.NotifyService),e.Y36(nt.QS))},ui.\u0275cmp=e.Xpm({type:ui,selectors:[["sivi-organizations-unit-focus"]],inputs:{focus:"focus",crudPermission:"crudPermission",abnormalPeriod:"abnormalPeriod",inputPeriod:"inputPeriod",readonly:"readonly",activityOptions:"activityOptions",languageOptions:"languageOptions",languageExtentOptions:"languageExtentOptions"},outputs:{update:"update",deleteElement:"deleteElement"},features:[e.qOj],decls:7,vars:6,consts:[[1,"header-div"],["tabindex","0","role","button","siviKeyboardEvents","","name","delete","class","pointer absolute-right",3,"siviClick",4,"ngIf"],["siviLibForm","",3,"formGroup"],[4,"ngIf"],["tabindex","0","role","button","siviKeyboardEvents","","name","delete",1,"pointer","absolute-right",3,"siviClick"],["siviGridCol","left"],["formControlName","activity","siviLibFormControl","",3,"viewMode","options","label"],[4,"ngIf","ngIfElse"],["editLanguage",""],["siviGridCol","right"],["formControlName","languageExtent","siviLibFormControl","",3,"disabled","viewMode","options","label"],["formControlName","ececPlaces","siviLibFormControl","","type","text","label-position","floating",3,"errorMessages","label","viewMode"],["formControlName","ppePlaces","siviLibFormControl","","type","text","label-position","floating",3,"errorMessages","label","viewMode"],["type","text","label-position","floating",3,"value","label","viewMode"],["type","text",1,"language",3,"label","viewMode","value"],[1,"autocomplete-wrapper",3,"ngClass"],["formControlName","language","siviLibFormControl","",3,"multiSelect","options","value","placeholderImage","selectAllText","removeAllText","placeholder","valueChange"]],template:function(q,W){1&q&&(e.TgZ(0,"div",0)(1,"h4"),e._uU(2),e.ALo(3,"translate"),e.qZA(),e.YNc(4,On,1,1,"cgi-icon",1),e.qZA(),e.TgZ(5,"form",2),e.YNc(6,Fn,28,40,"ion-grid",3),e.qZA()),2&q&&(e.xp6(2),e.hij("",e.lcZ(3,4,"Organization.Unit.PeriodsForPlacesAndFocuses.Focuses.Title")," "),e.xp6(2),e.Q6J("ngIf",W.crudPermission&&!W.readonly&&W.period.restEntityState!==W.constants.EXPIRED),e.xp6(1),e.Q6J("formGroup",W.form),e.xp6(1),e.Q6J("ngIf",W.unitFocus&&W.period&&W.languageOptions.length))},dependencies:[Z.GridColDirective,Z.KeyboardEventsDirective,Be.wI,Be.jY,Be.Nd,ke.mk,ke.O5,nt._Y,nt.JJ,nt.JL,Z.SiviFormDirective,Z.SiviFormControlDirective,nt.sg,nt.u,Z.SelectComponent,ke.Ov,Oe.X$],styles:['.header-div[_ngcontent-%COMP%]{display:flex}.header-div[_ngcontent-%COMP%]   sivi-lib-info-popup[_ngcontent-%COMP%]{margin-top:auto;margin-bottom:4px;margin-left:10px;font-size:20px}.language-activity-grid[_ngcontent-%COMP%]{border:1px solid var(--ion-color-primary);margin:20px 0;padding:20px 10px}ion-col[_ngcontent-%COMP%]{padding-left:0}.language[_ngcontent-%COMP%]{padding-top:6px;position:absolute}.autocomplete-wrapper[_ngcontent-%COMP%]{padding-top:20px;position:relative}.autocomplete-wrapper.required-star[_ngcontent-%COMP%]:before{content:"*";color:var(--ion-color-warning);position:absolute;top:2em;transform:translate(-50%,-100%);margin-left:.3rem}'],changeDetection:0});function si(_t,q){if(1&_t&&e._UZ(0,"sivi-lib-info-popup",20),2&_t){const W=e.oxw(2);e.Q6J("text",W.labels.period.infoPopUp)}}function Vi(_t,q){if(1&_t){const W=e.EpF();e.TgZ(0,"cgi-icon",21),e.NdJ("siviClick",function(){e.CHM(W);const fn=e.oxw(2);return e.KtG(fn.deleteClick(fn.unitPeriod))}),e.qZA()}if(2&_t){const W=e.oxw(2);e.uIk("aria-label",W.labels.period.delete)}}function Vn(_t,q){if(1&_t){const W=e.EpF();e.TgZ(0,"ion-button",23),e.NdJ("click",function(){e.CHM(W);const fn=e.oxw(3);return e.KtG(fn.editPeriod())}),e.ALo(1,"translate"),e._uU(2),e.ALo(3,"translate"),e.qZA()}2&_t&&(e.uIk("aria-label",e.lcZ(1,2,"General.Buttons.Edit")),e.xp6(2),e.hij(" ",e.lcZ(3,4,"General.Buttons.Edit")," "))}function Hn(_t,q){if(1&_t&&(e.ynx(0),e.YNc(1,Vn,4,6,"ion-button",22),e.BQk()),2&_t){const W=e.oxw(2);e.xp6(1),e.Q6J("ngIf",W.crudPermission&&W.unitPeriod.restEntityState===W.constants.CURRENT&&W.modal)}}function An(_t,q){if(1&_t&&(e.ynx(0),e._UZ(1,"cgi-input",13),e.ALo(2,"translate"),e.ALo(3,"translate"),e.ALo(4,"translate"),e.BQk()),2&_t){const W=e.oxw(2);e.xp6(1),e.Q6J("value",e.lcZ(2,4,W.unitPeriod.complementaryEcec?"General.Yes":"General.No"))("label",e.lcZ(3,6,"Form.Label.OrganizesComplementingEcec"))("viewMode",!0),e.uIk("aria-label",e.lcZ(4,8,"Form.Label.OrganizesComplementingEcec"))}}function vn(_t,q){if(1&_t){const W=e.EpF();e.TgZ(0,"ion-checkbox",24),e.NdJ("ionChange",function(fn){e.CHM(W);const Ei=e.oxw(2);return e.KtG(Ei.onChangeComplementaryEcec(fn))}),e.qZA(),e.TgZ(1,"ion-label",25),e._uU(2),e.ALo(3,"translate"),e.qZA()}if(2&_t){const W=e.oxw(2);e.Q6J("disabled",W.readonly)("checked",W.unitPeriod.complementaryEcec),e.xp6(2),e.hij(" ",e.lcZ(3,3,"Form.Label.OrganizesComplementingEcec")," ")}}function In(_t,q){if(1&_t){const W=e.EpF();e.TgZ(0,"ion-button",26),e.NdJ("click",function(){e.CHM(W);const fn=e.oxw(2);return e.KtG(fn.addFocus())}),e.ALo(1,"translate"),e._uU(2),e.ALo(3,"translate"),e.qZA()}2&_t&&(e.uIk("aria-label",e.lcZ(1,2,"General.Buttons.Add")),e.xp6(2),e.hij(" ",e.lcZ(3,4,"General.Buttons.Add")," "))}function Zi(_t,q){if(1&_t){const W=e.EpF();e.TgZ(0,"ion-col")(1,"sivi-organizations-unit-focus",28),e.NdJ("deleteElement",function(fn){e.CHM(W);const Ei=e.oxw(3);return e.KtG(Ei.deleteFocus(fn))})("update",function(fn){e.CHM(W);const Ei=e.oxw(3);return e.KtG(Ei.updateFocus(fn))}),e.qZA()()}if(2&_t){const W=e.oxw().$implicit,dt=e.oxw(2);e.xp6(1),e.Q6J("inputPeriod",dt.unitPeriod)("focus",W)("activityOptions",dt.activityOptions)("languageOptions",dt.languageOptions)("languageExtentOptions",dt.languageExtentOptions)("crudPermission",dt.crudPermission)("readonly",dt.readonly)}}function gr(_t,q){if(1&_t&&(e.TgZ(0,"ion-row",27),e.YNc(1,Zi,2,7,"ion-col",5),e.qZA()),2&_t){const W=e.oxw(2);e.xp6(1),e.Q6J("ngIf",W.activityOptions&&W.languageOptions&&W.languageExtentOptions)}}function Hi(_t,q){if(1&_t&&(e.TgZ(0,"ion-row",29),e._uU(1),e.qZA()),2&_t){const W=e.oxw(2);e.xp6(1),e.hij(" ",W.labels.focus.noFocusesForPeriod," ")}}function Gr(_t,q){if(1&_t){const W=e.EpF();e.TgZ(0,"ion-grid",1)(1,"div",2)(2,"h3"),e._uU(3),e.YNc(4,si,1,1,"sivi-lib-info-popup",3),e.qZA(),e.YNc(5,Vi,1,1,"cgi-icon",4),e.YNc(6,Hn,2,1,"ng-container",5),e.qZA(),e.TgZ(7,"form",6)(8,"ion-row")(9,"ion-col",7),e._UZ(10,"sivi-lib-datepicker",8),e.ALo(11,"translate"),e.qZA(),e.TgZ(12,"ion-col",9),e._UZ(13,"sivi-lib-datepicker",10),e.ALo(14,"translate"),e.qZA()(),e.TgZ(15,"ion-row")(16,"ion-col",7)(17,"cgi-input",11),e.NdJ("siviChange",function(fn){e.CHM(W);const Ei=e.oxw();return e.KtG(Ei.onChangeValue(fn))}),e.ALo(18,"translate"),e.ALo(19,"translate"),e.qZA()(),e.TgZ(20,"ion-col",9)(21,"cgi-input",12),e.NdJ("siviChange",function(fn){e.CHM(W);const Ei=e.oxw();return e.KtG(Ei.onChangeValue(fn))}),e.ALo(22,"translate"),e.ALo(23,"translate"),e.qZA()()(),e.TgZ(24,"ion-row")(25,"ion-col",7),e._UZ(26,"cgi-input",13),e.ALo(27,"translate"),e.ALo(28,"translate"),e.qZA(),e.TgZ(29,"ion-col",9)(30,"ion-item",14),e.YNc(31,An,5,10,"ng-container",15),e.YNc(32,vn,4,5,"ng-template",null,16,e.W1O),e.qZA()()(),e.TgZ(34,"div",2)(35,"h3"),e._uU(36),e.qZA(),e.YNc(37,In,4,6,"ion-button",17),e.qZA(),e.YNc(38,gr,2,1,"ion-row",18),e.YNc(39,Hi,2,1,"ion-row",19),e.qZA()()}if(2&_t){const W=e.MAs(33),dt=e.oxw();e.xp6(3),e.hij(" ",dt.labels.period.title," "),e.xp6(1),e.Q6J("ngIf",!(dt.readonly||dt.unitPeriod.restEntityState!==dt.constants.FUTURE&&dt.unitPeriod.restEntityState!==dt.constants.CURRENT||dt.abnormal)),e.xp6(1),e.Q6J("ngIf",dt.crudPermission&&!dt.readonly&&dt.unitPeriod.restEntityState===dt.constants.FUTURE),e.xp6(1),e.Q6J("ngIf",dt.showEditButton),e.xp6(1),e.Q6J("formGroup",dt.form),e.xp6(3),e.Q6J("minDate",dt.unit.validFrom)("maxDate",dt.unit.validUntil)("errorMessages",dt.getValidatorErrorMessagesForValidFrom())("readonly",dt.readonly||dt.unitPeriod.restEntityState===dt.constants.CURRENT)("label",e.lcZ(11,35,"General.Text.ValidFrom")),e.xp6(3),e.Q6J("minDate",dt.unit.validFrom)("maxDate",dt.unit.validUntil)("errorMessages",dt.getValidatorErrorMessagesForValidUntil())("readonly",dt.readonly)("label",e.lcZ(14,37,"General.Text.ValidTo"))("minDate",dt.form.value.validFrom),e.xp6(4),e.Q6J("errorMessages",dt.onlyNumbersMessage)("label",e.lcZ(18,39,"Organization.Unit.PeriodsForPlacesAndFocuses.AmountOfECECPlaces"))("viewMode",dt.readonly),e.uIk("aria-label",e.lcZ(19,41,"Organization.Unit.PeriodsForPlacesAndFocuses.AmountOfECECPlaces")),e.xp6(4),e.Q6J("errorMessages",dt.onlyNumbersMessage)("label",e.lcZ(22,43,"Organization.Unit.PeriodsForPlacesAndFocuses.AmountOfPPEPlaces"))("viewMode",dt.readonly),e.uIk("aria-label",e.lcZ(23,45,"Organization.Unit.PeriodsForPlacesAndFocuses.AmountOfPPEPlaces")),e.xp6(5),e.Q6J("value",dt.totalPlaces)("label",e.lcZ(27,47,"Organization.Unit.PeriodsForPlacesAndFocuses.TotalAmountOfECECPlaces"))("viewMode",!0),e.uIk("aria-label",e.lcZ(28,49,"Organization.Unit.PeriodsForPlacesAndFocuses.TotalAmountOfECECPlaces")),e.xp6(5),e.Q6J("ngIf",dt.readonly)("ngIfElse",W),e.xp6(5),e.Oqu(dt.labels.focus.title),e.xp6(1),e.Q6J("ngIf",dt.crudPermission&&!dt.readonly&&dt.unitPeriod.restEntityState!==dt.constants.EXPIRED&&dt.modal),e.xp6(1),e.Q6J("ngForOf",dt.unitPeriod.focuses)("ngForTrackBy",dt.trackByFn),e.xp6(1),e.Q6J("ngIf",!dt.unitPeriod.focuses||0===dt.unitPeriod.focuses.length)}}class zr extends Z.SiviAbstractForm{set period(q){this.unitPeriod=q,this.totalPlaces=kn.calculateTotalPlaces(this.unitPeriod.ececPlaces,this.unitPeriod.ppePlaces)}set inputUnit(q){this.unit&&(this.unit.validFrom!==q.validFrom||this.unit.validUntil!==q.validUntil)&&this.updateValidFromAndUntilValidators(),this.unit=q}get readonly(){return this._readonly}set readonly(q){this._readonly=q,q||this.setValidators(),this.updatePeriodData()}set periodsTimeFrame(q){this.timeFrames=q,this.updateValidFromAndUntilValidators()}constructor(q,W,dt){super(q),this.translate=q,this.notify=W,this.fb=dt,this.abnormal=!1,this.activityOptions=[],this.languageOptions=[],this.languageExtentOptions=[],this.modal=!1,this.update=new e.vpe,this.deleteElement=new e.vpe,this.timeFrames=[],this.constants=Z.Constants,this.showEditButton=!1,this.totalPlaces=0,this.form=this.fb.group({validFrom:[""],validUntil:[""],ececPlaces:[""],ppePlaces:[""]}),this.deleteLabel=this.translate.instant("Message.Delete",{name:this.translate.instant("Organization.Educational.ActivityFocus.Singular")}),this.labels={focus:{noFocusesForPeriod:this.translate.instant("Organization.Unit.PeriodsForPlacesAndFocuses.Periods.Focuses.NoFocusesForPeriod"),title:this.translate.instant("Organization.Unit.PeriodsForPlacesAndFocuses.Periods.Focuses.Title")},period:{infoPopUp:"",delete:this.translate.instant("Message.Delete",{name:this.translate.instant("Organization.Educational.Period.Singular")}),title:this.translate.instant("Organization.Unit.PeriodsForPlacesAndFocuses.Periods.ActivePeriod")}},this.onlyNumbersMessage={pattern:this.translate.instant("Form.Error.OnlyNumbers")}}ngOnInit(){super.ngOnInit(),this.showEditButton=this.modal,this.labels=this.getLabels()}onChangeValue(q){const W={...this.unitPeriod,[q.detail.name]:q.detail.value};this.totalPlaces=kn.calculateTotalPlaces(W.ececPlaces,W.ppePlaces),this.update.emit(W)}onChangeComplementaryEcec(q){const W={...this.unitPeriod,complementaryEcec:q.detail.checked};this.update.emit(W)}onFormValueChange(q){const W={...this.unitPeriod,...q};this.update.emit(W)}deleteClick(q){var W=this;return(0,o.Z)(function*(){(yield W.notify.deleteConfirmPopup()).onDidDismiss().then(fn=>{fn.data&&W.deleteElement.emit(q)})})()}addFocus(){const dt=[kn.createFocus(),...this.unitPeriod.focuses?(0,ge.Z)(this.unitPeriod.focuses):[]],fn={...this.unitPeriod,focuses:dt};this.update.emit(fn)}updateFocus(q){const W=q.id?"id":"tempId",dt=(0,ge.Z)(this.unitPeriod);dt.focuses=Z.Utils.patchCollectionBy(dt.focuses,q,W),this.update.emit(dt)}deleteFocus(q){const W=q.id?"id":"tempId",dt=(0,ge.Z)(this.unitPeriod);dt.focuses=dt.focuses.filter(fn=>fn[W]!==q[W]),this.update.emit(dt)}trackByFn(q,W){return W.id||W.tempId}editPeriod(){var q=this;return(0,o.Z)(function*(){q.unitPeriod.restEntityState===Z.Constants.CURRENT?(yield q.notify.createConfirmationPopUp("Message.EditActiveValues.Title","Message.EditActiveValues.Message","General.Buttons.Continue")).onDidDismiss().then(dt=>{dt&&dt.data&&(q.readonly=!1,q.updatePeriodData(),q.showEditButton=!1)}):(q.readonly=!1,q.showEditButton=!1)})()}setValidators(){if(!this.readonly){const q=kn.getValidUntilValidators(this.unit,this.timeFrames,this.unitPeriod),W=this.getEcecPlacesValidators(),dt=this.getPpePlacesValidators();this.form.get("validUntil").setValidators(q),this.form.get("ececPlaces").setValidators(W),this.form.get("ppePlaces").setValidators(dt),this.updateValidFromAndUntilValidators()}}updateValidFromAndUntilValidators(){if(this.unitPeriod){const q=kn.getValidFromValidators(this.unit,this.timeFrames,this.unitPeriod);this.unitPeriod.restEntityState===Z.Constants.CURRENT?this.form.get("validFrom").setValidators([]):this.form.get("validFrom").setValidators(q),this.form.get("validUntil").setValidators(kn.getValidUntilValidators(this.unit,this.timeFrames,this.unitPeriod))}this.form.controls.validFrom.updateValueAndValidity(),this.form.controls.validUntil.updateValueAndValidity(),this.form.controls.ececPlaces.updateValueAndValidity(),this.form.controls.ppePlaces.updateValueAndValidity()}updatePeriodData(){this.form.get("validFrom").patchValue(this.unitPeriod.validFrom),this.form.get("validUntil").patchValue(this.unitPeriod.validUntil),this.form.get("ececPlaces").patchValue(this.unitPeriod.ececPlaces),this.form.get("ppePlaces").patchValue(this.unitPeriod.ppePlaces)}getValidatorErrorMessagesForValidFrom(){return{isSameOrAfter:this.translate.instant("Organization.Unit.PlacesAndFocuses.AbnormalPeriodsForPlaces.Error.DateValidOutOfUnitValidityTimeframe"),isAfter:this.translate.instant("Organization.Unit.PlacesAndFocuses.AbnormalPeriodsForPlaces.Error.DateValidOutOfUnitValidityTimeframe"),isDateBetweenRange:this.translate.instant("Organization.Unit.Error.Backend.periods.overlap.exception")}}getValidatorErrorMessagesForValidUntil(){return{isAfter:this.translate.instant("Organization.Unit.PlacesAndFocuses.AbnormalPeriodsForPlaces.Error.DateValidOutOfUnitValidityTimeframe"),isBefore:this.translate.instant("Organization.Unit.PlacesAndFocuses.AbnormalPeriodsForPlaces.Error.DateValidOutOfUnitValidityTimeframe"),isDateBetweenRange:this.translate.instant("Organization.Unit.Error.Backend.periods.overlap.exception")}}getEcecPlacesValidators(){return[Z.SiviValidators.required,Z.SiviValidators.pattern(Z.Patterns.ONLYNUMBERS)]}getPpePlacesValidators(){return[Z.SiviValidators.required,Z.SiviValidators.pattern(Z.Patterns.ONLYNUMBERS)]}getLabels(){const q=this.abnormal?"AbnormalPeriods":"Periods",W={focus:{noFocusesForPeriod:this.translate.instant(`Organization.Unit.PeriodsForPlacesAndFocuses.${q}.Focuses.NoFocusesForPeriod`),title:this.translate.instant(`Organization.Unit.PeriodsForPlacesAndFocuses.${q}.Focuses.Title`)},period:{delete:this.translate.instant("Message.Delete",{name:this.translate.instant("Organization.Educational.Period.Singular")}),infoPopUp:"",title:""}};switch(this.unitPeriod.restEntityState){case Z.Constants.CURRENT:W.period.title=this.translate.instant(`Organization.Unit.PeriodsForPlacesAndFocuses.${q}.ActivePeriod`),W.period.infoPopUp=this.translate.instant(`Organization.Unit.PeriodsForPlacesAndFocuses.${q}.ActivePeriod.InfoPopUp`);break;case Z.Constants.FUTURE:W.period.title=this.translate.instant(`Organization.Unit.PeriodsForPlacesAndFocuses.${q}.FuturePeriod`),W.period.infoPopUp=this.translate.instant(`Organization.Unit.PeriodsForPlacesAndFocuses.${q}.FuturePeriod.InfoPopUp`);break;case Z.Constants.EXPIRED:W.period.title=this.translate.instant(`Organization.Unit.PeriodsForPlacesAndFocuses.${q}.OldPeriod`);break;default:console.warn("UnitPeriodComponent: getLabels. There is no restEntityState on the period. Check BE payloads.")}return W}}function Eo(_t,q){1&_t&&e._UZ(0,"sivi-lib-info-popup",8),2&_t&&e.Q6J("text","Organization.Unit.Language.InfoPopUp")}function mr(_t,q){if(1&_t){const W=e.EpF();e.TgZ(0,"sivi-lib-language-checkbox",9),e.NdJ("update",function(fn){e.CHM(W);const Ei=e.oxw();return e.KtG(Ei.updateLanguage(fn))}),e.qZA()}if(2&_t){const W=e.oxw();e.Q6J("languages",W.unit.languages)("readonly",W.readonly)}}function jn(_t,q){if(1&_t){const W=e.EpF();e.TgZ(0,"ion-button",10),e.NdJ("click",function(){e.CHM(W);const fn=e.oxw();return e.KtG(fn.addPeriod())}),e.ALo(1,"translate"),e._uU(2),e.ALo(3,"translate"),e.qZA()}if(2&_t){const W=e.oxw();e.Q6J("disabled",W.unit.virtual),e.uIk("aria-label",e.lcZ(1,3,"General.Buttons.Add")),e.xp6(2),e.hij(" ",e.lcZ(3,5,"General.Buttons.Add")," ")}}function ct(_t,q){if(1&_t){const W=e.EpF();e.TgZ(0,"ion-row",12)(1,"ion-col")(2,"sivi-organizations-unit-period",13),e.NdJ("deleteElement",function(fn){e.CHM(W);const Ei=e.oxw(2);return e.KtG(Ei.deletePeriod(fn))})("update",function(fn){e.CHM(W);const Ei=e.oxw(2);return e.KtG(Ei.updatePeriod(fn))}),e.qZA()()()}if(2&_t){const W=e.oxw().$implicit,dt=e.oxw();e.Q6J("ngClass",W.restEntityState===dt.constants.CURRENT?"currentPeriod":""),e.xp6(2),e.Q6J("inputUnit",dt.unit)("period",W)("crudPermission",dt.crudPermission)("readonly",dt.readonly||W.restEntityState===dt.constants.CURRENT)("periodsTimeFrame",dt.periodsTimeFrame)("activityOptions",dt.activityOptions)("languageOptions",dt.languageOptions)("languageExtentOptions",dt.languageExtentOptions)("modal",dt.modal)}}function Yt(_t,q){if(1&_t&&(e.ynx(0),e.YNc(1,ct,3,10,"ion-row",11),e.BQk()),2&_t){const W=q.$implicit,dt=e.oxw();e.xp6(1),e.Q6J("ngIf",dt.periodsTimeFrame&&W.restEntityState!==dt.constants.EXPIRED)}}function oi(_t,q){if(1&_t&&(e.ynx(0),e.TgZ(1,"ion-row",14)(2,"ion-col"),e._UZ(3,"sivi-organizations-unit-period",19),e.qZA()(),e.BQk()),2&_t){const W=q.$implicit,dt=e.oxw(2);e.xp6(3),e.Q6J("inputUnit",dt.unit)("period",W)("crudPermission",dt.crudPermission)("readonly",dt.readonly||W.restEntityState===dt.constants.EXPIRED)("activityOptions",dt.activityOptions)("languageOptions",dt.languageOptions)("languageExtentOptions",dt.languageExtentOptions)}}function Ni(_t,q){if(1&_t){const W=e.EpF();e.TgZ(0,"div",14)(1,"cgi-accordion-item",15)(2,"h3",16),e._uU(3),e.ALo(4,"translate"),e.qZA(),e.TgZ(5,"div",17),e.YNc(6,oi,4,7,"ng-container",5),e.qZA(),e.TgZ(7,"cgi-toggle-accordion",18),e.NdJ("click",function(){e.CHM(W);const fn=e.oxw();return e.KtG(fn.toggleAccordion("openPeriods"))}),e.ALo(8,"translate"),e.ALo(9,"translate"),e.qZA()()()}if(2&_t){const W=e.oxw();e.xp6(1),e.Q6J("open",W.openPeriods),e.xp6(2),e.hij(" ",e.lcZ(4,6,"Organization.Unit.PeriodsForPlacesAndFocuses.Periods.OldPeriodAndFocuses")," "),e.xp6(3),e.Q6J("ngForOf",W.oldPeriods)("ngForTrackBy",W.trackByFn),e.xp6(1),e.Q6J("ariaLabel",W.openPeriods?e.lcZ(8,8,"General.Buttons.Close"):e.lcZ(9,10,"General.Buttons.Open"))("open",W.openPeriods)}}function Nn(_t,q){1&_t&&e._UZ(0,"sivi-lib-info-popup",8),2&_t&&e.Q6J("text","Organization.Unit.PlacesAndFocuses.AbnormalPeriodsForPlaces.InfoPopUp")}function pr(_t,q){if(1&_t){const W=e.EpF();e.TgZ(0,"ion-button",10),e.NdJ("click",function(){e.CHM(W);const fn=e.oxw();return e.KtG(fn.addAbnormalPeriod())}),e.ALo(1,"translate"),e._uU(2),e.ALo(3,"translate"),e.qZA()}if(2&_t){const W=e.oxw();e.Q6J("disabled",W.unit.virtual),e.uIk("aria-label",e.lcZ(1,3,"General.Buttons.Add")),e.xp6(2),e.hij(" ",e.lcZ(3,5,"General.Buttons.Add")," ")}}function Sn(_t,q){if(1&_t){const W=e.EpF();e.TgZ(0,"ion-row",12)(1,"ion-col")(2,"sivi-organizations-unit-period",20),e.NdJ("deleteElement",function(fn){e.CHM(W);const Ei=e.oxw(2);return e.KtG(Ei.deleteAbnormalPeriod(fn))})("update",function(fn){e.CHM(W);const Ei=e.oxw(2);return e.KtG(Ei.updateAbnormalPeriod(fn))}),e.qZA()()()}if(2&_t){const W=e.oxw().$implicit,dt=e.oxw();e.Q6J("ngClass",W.restEntityState===dt.constants.CURRENT?"currentPeriod":""),e.xp6(2),e.Q6J("inputUnit",dt.unit)("period",W)("crudPermission",dt.crudPermission)("readonly",dt.readonly||W.restEntityState===dt.constants.CURRENT)("abnormal",!0)("periodsTimeFrame",dt.abnormalPeriodsTimeFrame)("activityOptions",dt.activityOptions)("languageOptions",dt.languageOptions)("languageExtentOptions",dt.languageExtentOptions)("modal",dt.modal)}}function Pn(_t,q){if(1&_t&&(e.ynx(0),e.YNc(1,Sn,3,11,"ion-row",11),e.BQk()),2&_t){const W=q.$implicit,dt=e.oxw();e.xp6(1),e.Q6J("ngIf",dt.abnormalPeriodsTimeFrame&&W.restEntityState!==dt.constants.EXPIRED)}}function Nt(_t,q){if(1&_t&&(e.TgZ(0,"ion-row",14)(1,"ion-col"),e._UZ(2,"sivi-organizations-unit-period",19),e.qZA()()),2&_t){const W=e.oxw().$implicit,dt=e.oxw(2);e.xp6(2),e.Q6J("inputUnit",dt.unit)("period",W)("crudPermission",dt.crudPermission)("readonly",dt.readonly||W.restEntityState===dt.constants.EXPIRED)("activityOptions",dt.activityOptions)("languageOptions",dt.languageOptions)("languageExtentOptions",dt.languageExtentOptions)}}function ai(_t,q){if(1&_t&&(e.ynx(0),e.YNc(1,Nt,3,7,"ion-row",7),e.BQk()),2&_t){const W=q.$implicit,dt=e.oxw(2);e.xp6(1),e.Q6J("ngIf",W.restEntityState===dt.constants.EXPIRED)}}function hn(_t,q){if(1&_t){const W=e.EpF();e.TgZ(0,"div",14)(1,"cgi-accordion-item",15)(2,"h3",16),e._uU(3),e.ALo(4,"translate"),e.qZA(),e.TgZ(5,"div",17),e.YNc(6,ai,2,1,"ng-container",5),e.qZA(),e.TgZ(7,"cgi-toggle-accordion",18),e.NdJ("click",function(){e.CHM(W);const fn=e.oxw();return e.KtG(fn.toggleAccordion("openAbnormalPeriods"))}),e.ALo(8,"translate"),e.ALo(9,"translate"),e.qZA()()()}if(2&_t){const W=e.oxw();e.xp6(1),e.Q6J("open",W.openAbnormalPeriods),e.xp6(2),e.hij(" ",e.lcZ(4,6,"Organization.Unit.PeriodsForPlacesAndFocuses.Periods.OldPeriodAndFocuses")," "),e.xp6(3),e.Q6J("ngForOf",W.oldAbnormalPeriods)("ngForTrackBy",W.trackByFn),e.xp6(1),e.Q6J("ariaLabel",W.openAbnormalPeriods?e.lcZ(8,8,"General.Buttons.Close"):e.lcZ(9,10,"General.Buttons.Open"))("open",W.openAbnormalPeriods)}}zr.\u0275fac=function(q){return new(q||zr)(e.Y36(Oe.sK),e.Y36(Z.NotifyService),e.Y36(nt.qu))},zr.\u0275cmp=e.Xpm({type:zr,selectors:[["sivi-organizations-unit-period"]],inputs:{period:"period",crudPermission:"crudPermission",abnormal:"abnormal",activityOptions:"activityOptions",languageOptions:"languageOptions",languageExtentOptions:"languageExtentOptions",inputUnit:"inputUnit",readonly:"readonly",periodsTimeFrame:"periodsTimeFrame",modal:"modal"},outputs:{update:"update",deleteElement:"deleteElement"},features:[e.qOj],decls:1,vars:1,consts:[["class","ion-no-padding",4,"ngIf"],[1,"ion-no-padding"],[1,"header-div"],[3,"text",4,"ngIf"],["item-right","","tabindex","0","role","button","siviKeyboardEvents","","name","delete","class","pointer absolute-right",3,"siviClick",4,"ngIf"],[4,"ngIf"],["siviLibForm","",3,"formGroup"],["siviGridCol","left"],["formControlName","validFrom","siviLibFormControl","",3,"minDate","maxDate","errorMessages","readonly","label"],["siviGridCol","right"],["formControlName","validUntil","siviLibFormControl","",3,"minDate","maxDate","errorMessages","readonly","label"],["formControlName","ececPlaces","siviLibFormControl","","type","text","label-position","floating",3,"errorMessages","label","viewMode","siviChange"],["formControlName","ppePlaces","siviLibFormControl","","type","text","label-position","floating",3,"errorMessages","label","viewMode","siviChange"],["type","text","label-position","floating",3,"value","label","viewMode"],["lines","none",1,"ion-no-padding"],[4,"ngIf","ngIfElse"],["complementaryEcecCheckbox",""],["outline","","fill","clear","class","absolute-right",3,"click",4,"ngIf"],["class","border-grid",4,"ngFor","ngForOf","ngForTrackBy"],["class","language-activity-grid",4,"ngIf"],[3,"text"],["item-right","","tabindex","0","role","button","siviKeyboardEvents","","name","delete",1,"pointer","absolute-right",3,"siviClick"],["class","button-primary-inverted absolute-right","role","button",3,"click",4,"ngIf"],["role","button",1,"button-primary-inverted","absolute-right",3,"click"],["name","complementaryEcec",3,"disabled","checked","ionChange"],[1,"label","ion-margin-horizontal"],["outline","","fill","clear",1,"absolute-right",3,"click"],[1,"border-grid"],[3,"inputPeriod","focus","activityOptions","languageOptions","languageExtentOptions","crudPermission","readonly","deleteElement","update"],[1,"language-activity-grid"]],template:function(q,W){1&q&&e.YNc(0,Gr,40,51,"ion-grid",0),2&q&&e.Q6J("ngIf",W.unitPeriod&&W.unit&&W.labels)},dependencies:[Z.GridColDirective,Z.KeyboardEventsDirective,Z.InfoPopupComponent,Be.YG,Be.nz,Be.wI,Be.jY,Be.Ie,Be.Q$,Be.Nd,Be.w,ke.sg,ke.O5,nt._Y,nt.JJ,nt.JL,Z.SiviFormDirective,Z.SiviFormControlDirective,nt.sg,nt.u,Z.DatepickerComponent,ui,Oe.X$],styles:[".header-div[_ngcontent-%COMP%]{display:flex}.header-div[_ngcontent-%COMP%]   sivi-lib-info-popup[_ngcontent-%COMP%]{margin-top:auto;margin-bottom:4px;margin-left:10px;font-size:20px}"]});class Le extends Z.SiviAbstractForm{set unit(q){(0,ne.Z)(q)||(this._unit=q,this.oldPeriods=this.unit.periods.filter(W=>W.restEntityState===Z.Constants.EXPIRED),this.oldAbnormalPeriods=this.unit.abnormalPeriods.filter(W=>W.restEntityState===Z.Constants.EXPIRED))}get unit(){return this._unit}constructor(q,W,dt,fn,Ei,Po){super(dt),this.notify=q,this.languageService=W,this.translate=dt,this.organizationCommonService=fn,this.codeService=Ei,this.fb=Po,this.readonly=!1,this.crudPermission=!1,this.modal=!1,this.update=new e.vpe,this.languageOptions=[],this.activityOptions=[],this.languageExtentOptions=[],this.openPeriods=!1,this.openAbnormalPeriods=!1,this.periodsTimeFrame=[],this.abnormalPeriodsTimeFrame=[],this.oldPeriods=[],this.oldAbnormalPeriods=[],this.constants=Z.Constants,this.form=this.fb.group({languages:[""]})}ngOnInit(){this.periodsTimeFrame=this.getPeriodsTimeFrame(this.unit.periods),this.abnormalPeriodsTimeFrame=this.getPeriodsTimeFrame(this.unit.abnormalPeriods),this.getCodesOptions(),this.readonly||this.setValidators(),this.updateLanguagesData()}onFormValueChange(q){const W={...this.unit,...q};this.updateValues(W)}updateLanguage(q){const W={...this.unit,languages:q};this.updateValues(W)}updateAbnormalPeriod(q){const W=q.id?"id":"tempId",{abnormalPeriods:dt}=this.unit,fn=dt.find(En=>En.id===q.id);if((0,ve.Z)(fn,q))return;const Ei=Z.Utils.patchCollectionBy(dt,q,W),Po={...this.unit,abnormalPeriods:Ei};this.updateValues(Po)}addAbnormalPeriod(){const q=(0,ge.Z)(this.unit),W=q.abnormalPeriods?q.abnormalPeriods:[],dt={...q,abnormalPeriods:[kn.createPeriod(),...W]};this.updateValues(dt)}deleteAbnormalPeriod(q){const W=q.id?"id":"tempId",dt={...this.unit,abnormalPeriods:this.unit.abnormalPeriods.filter(fn=>fn[W]!==q[W])};this.updateValues(dt)}updatePeriod(q){const W=q.id?"id":"tempId",dt=(0,pe.Z)(this.unit,"periods",[]),fn=dt.find(Po=>Po.id===q.id);if((0,ve.Z)(fn,q))return;const Ei={...this.unit,periods:Z.Utils.patchCollectionBy(dt,q,W)};this.updateValues(Ei)}addPeriod(){const q=(0,ge.Z)(this.unit),W=q.periods?q.periods:[],dt={...q,periods:[kn.createPeriod(),...W]};this.updateValues(dt)}deletePeriod(q){const W=q.id?"id":"tempId",dt={...this.unit,periods:this.unit.periods.filter(fn=>fn[W]!==q[W])};this.updateValues(dt)}trackByFn(q,W){return W.id||W.tempId}getCodesOptions(){const q=[this.codeService.getCodesByNameIncludedExternal(Z.CodeTypes.ACTIVITY_FOCUS),this.languageService.getLanguageList(this.translate.currentLang),this.codeService.getCodesByName(Z.CodeTypes.LANGUAGEFOCUSEXTENT)];(0,de.D)(q).pipe((0,D.q)(1)).subscribe(W=>{this.activityOptions=this.organizationCommonService.getSelectOptionsFromCodes(W[0].content),this.languageOptions=Z.Utils.getAutocompleteOptions(W[1]),this.languageExtentOptions=this.organizationCommonService.getSelectOptionsFromCodes(W[2].childCodes)},W=>{console.error("UnitEditorPage -> getCommonOptions error",W)})}toggleAccordion(q){this[q]=!this[q]}getPeriodsTimeFrame(q){return q.map(W=>({id:W.id,tempId:W.tempId,validFrom:W.validFrom,validUntil:W.validUntil}))}setValidators(){this.form.get("languages").setValidators([Z.SiviValidators.required])}updateLanguagesData(){this.form.get("languages").patchValue(this.unit.languages)}updateValues(q){this.periodsTimeFrame=this.getPeriodsTimeFrame(q.periods),this.abnormalPeriodsTimeFrame=this.getPeriodsTimeFrame(q.abnormalPeriods),this.update.emit(q)}}function ce(_t,q){1&_t&&e._UZ(0,"sivi-lib-info-popup",8),2&_t&&e.Q6J("text","Organization.Unit.OpeningHours.InfoPopUp")}function we(_t,q){if(1&_t){const W=e.EpF();e.TgZ(0,"ion-row")(1,"ion-col",9)(2,"sivi-lib-radio-list",10),e.NdJ("siviChange",function(fn){e.CHM(W);const Ei=e.oxw();return e.KtG(Ei.onChangeOpeningHourOptions(fn))}),e.qZA()()()}if(2&_t){const W=e.oxw();e.xp6(2),e.Q6J("viewMode",W.readonly)("options",W.openingHoursOptions)("value",W.sameHours)}}function Qe(_t,q){if(1&_t){const W=e.EpF();e.TgZ(0,"ion-row",14)(1,"ion-col",15)(2,"ion-label"),e._uU(3),e.qZA()(),e.TgZ(4,"ion-col",16)(5,"input",17),e.NdJ("blur",function(fn){e.CHM(W);const Ei=e.oxw(3);return e.KtG(Ei.updateControlValue(fn))})("ngModelChange",function(fn){e.CHM(W);const Ei=e.oxw().$implicit;return e.KtG(Ei.startTime=fn)})("ngModelChange",function(){e.CHM(W);const fn=e.oxw(3);return e.KtG(fn.onChangeOpeningHours())}),e.qZA()(),e.TgZ(6,"ion-col",16),e._uU(7,"-"),e.qZA(),e.TgZ(8,"ion-col",16)(9,"input",17),e.NdJ("blur",function(fn){e.CHM(W);const Ei=e.oxw(3);return e.KtG(Ei.updateControlValue(fn))})("ngModelChange",function(fn){e.CHM(W);const Ei=e.oxw().$implicit;return e.KtG(Ei.endTime=fn)})("ngModelChange",function(){e.CHM(W);const fn=e.oxw(3);return e.KtG(fn.onChangeOpeningHours())}),e.qZA()()()}if(2&_t){const W=e.oxw().$implicit;e.xp6(3),e.Oqu(W.label),e.xp6(2),e.Q6J("ngModel",W.startTime),e.uIk("name","startTime-"+W.openingDay),e.xp6(4),e.Q6J("ngModel",W.endTime),e.uIk("name","endTime-"+W.openingDay)}}function qt(_t,q){if(1&_t&&(e.TgZ(0,"ion-row")(1,"ion-col",15)(2,"ion-label"),e._uU(3),e.qZA()(),e.TgZ(4,"ion-col",16),e._UZ(5,"cgi-input",18),e.qZA(),e.TgZ(6,"ion-col",16),e._uU(7,"-"),e.qZA(),e.TgZ(8,"ion-col",16),e._UZ(9,"cgi-input",18),e.qZA()()),2&_t){const W=e.oxw().$implicit;e.xp6(3),e.Oqu(W.label),e.xp6(2),e.Q6J("name","startTime-"+W.openingDay)("viewMode",!0)("value",W.startTime),e.xp6(4),e.Q6J("name","endTime-"+W.openingDay)("viewMode",!0)("value",W.endTime)}}function Tn(_t,q){if(1&_t&&(e.ynx(0),e.YNc(1,Qe,10,5,"ion-row",12),e.YNc(2,qt,10,7,"ng-template",null,13,e.W1O),e.BQk()),2&_t){const W=e.MAs(3),dt=e.oxw(2);e.xp6(1),e.Q6J("ngIf",!dt.readonly)("ngIfElse",W)}}function lr(_t,q){if(1&_t&&(e.ynx(0),e.YNc(1,Tn,4,2,"ng-container",11),e.BQk()),2&_t){const W=e.oxw();e.xp6(1),e.Q6J("ngForOf",W.unitOpeningHoursFields)("ngForTrackBy",W.trackByDayFn)}}function mo(_t,q){1&_t&&(e.TgZ(0,"ion-row")(1,"ion-col",19)(2,"ion-label"),e._uU(3),e.ALo(4,"translate"),e.qZA()()()),2&_t&&(e.xp6(3),e.Oqu(e.lcZ(4,1,"sivi.municipality.settings.type.weeklycaretime.round-the-clock")))}Le.\u0275fac=function(q){return new(q||Le)(e.Y36(Z.NotifyService),e.Y36(Z.LanguageService),e.Y36(Oe.sK),e.Y36(Z.OrganizationCommonService),e.Y36(Z.CodeService),e.Y36(nt.QS))},Le.\u0275cmp=e.Xpm({type:Le,selectors:[["sivi-organizations-language-and-focuses"]],inputs:{unit:"unit",readonly:"readonly",crudPermission:"crudPermission",modal:"modal"},outputs:{update:"update"},features:[e.qOj],decls:26,vars:29,consts:[["siviLibForm","",3,"formGroup"],[1,"header-div"],[3,"text",4,"ngIf"],["formControlName","languages","siviLibFormControl","",3,"languages","readonly","update",4,"ngIf"],["outline","","fill","clear","class","absolute-right",3,"disabled","click",4,"ngIf"],[4,"ngFor","ngForOf","ngForTrackBy"],["styleClass","border-grid",3,"text","array"],["class","border-grid",4,"ngIf"],[3,"text"],["formControlName","languages","siviLibFormControl","",3,"languages","readonly","update"],["outline","","fill","clear",1,"absolute-right",3,"disabled","click"],["class","border-grid",3,"ngClass",4,"ngIf"],[1,"border-grid",3,"ngClass"],[3,"inputUnit","period","crudPermission","readonly","periodsTimeFrame","activityOptions","languageOptions","languageExtentOptions","modal","deleteElement","update"],[1,"border-grid"],[3,"open"],["slot","header",1,"weight-600","header"],["slot","content"],["slot","end",3,"ariaLabel","open","click"],[3,"inputUnit","period","crudPermission","readonly","activityOptions","languageOptions","languageExtentOptions"],[3,"inputUnit","period","crudPermission","readonly","abnormal","periodsTimeFrame","activityOptions","languageOptions","languageExtentOptions","modal","deleteElement","update"]],template:function(q,W){1&q&&(e.TgZ(0,"form",0)(1,"div",1)(2,"h2"),e._uU(3),e.ALo(4,"translate"),e.YNc(5,Eo,1,1,"sivi-lib-info-popup",2),e.qZA()(),e.YNc(6,mr,1,2,"sivi-lib-language-checkbox",3),e.TgZ(7,"div",1)(8,"h2"),e._uU(9),e.ALo(10,"translate"),e.qZA(),e.YNc(11,jn,4,7,"ion-button",4),e.qZA(),e.YNc(12,Yt,2,1,"ng-container",5),e._UZ(13,"sivi-lib-empty-array-message",6),e.ALo(14,"translate"),e.YNc(15,Ni,10,12,"div",7),e.TgZ(16,"div",1)(17,"h2"),e._uU(18),e.ALo(19,"translate"),e.YNc(20,Nn,1,1,"sivi-lib-info-popup",2),e.qZA(),e.YNc(21,pr,4,7,"ion-button",4),e.qZA(),e.YNc(22,Pn,2,1,"ng-container",5),e._UZ(23,"sivi-lib-empty-array-message",6),e.ALo(24,"translate"),e.YNc(25,hn,10,12,"div",7),e.qZA()),2&q&&(e.Q6J("formGroup",W.form),e.xp6(3),e.hij("",e.lcZ(4,19,"Organization.Unit.Language.Title")," "),e.xp6(2),e.Q6J("ngIf",!W.readonly),e.xp6(1),e.Q6J("ngIf",W.unit),e.xp6(3),e.hij("",e.lcZ(10,21,"Organization.Unit.PeriodsForPlacesAndFocuses.Title")," "),e.xp6(2),e.Q6J("ngIf",W.crudPermission&&!W.readonly),e.xp6(1),e.Q6J("ngForOf",W.unit.periods)("ngForTrackBy",W.trackByFn),e.xp6(1),e.Q6J("text",e.lcZ(14,23,"Organization.Unit.PeriodsForPlacesAndFocuses.Periods.NoPeriodsForUnit"))("array",W.unit.periods),e.xp6(2),e.Q6J("ngIf",W.oldPeriods.length>0),e.xp6(3),e.hij("",e.lcZ(19,25,"Organization.Unit.PlacesAndFocuses.AbnormalPeriodsForPlaces.Title")," "),e.xp6(2),e.Q6J("ngIf",!W.readonly),e.xp6(1),e.Q6J("ngIf",W.crudPermission&&!W.readonly),e.xp6(1),e.Q6J("ngForOf",W.unit.abnormalPeriods)("ngForTrackBy",W.trackByFn),e.xp6(1),e.Q6J("text",e.lcZ(24,27,"Organization.Unit.PlacesAndFocuses.AbnormalPeriodsForPlaces.NoAbnormalPeriodsForUnit"))("array",W.unit.abnormalPeriods),e.xp6(2),e.Q6J("ngIf",W.oldAbnormalPeriods.length>0))},dependencies:[Z.InfoPopupComponent,Be.YG,Be.wI,Be.Nd,ke.mk,ke.sg,ke.O5,nt._Y,nt.JJ,nt.JL,Z.LanguageCheckboxComponent,Z.SiviFormDirective,Z.SiviFormControlDirective,nt.sg,nt.u,Z.EmptyArrayMessageComponent,zr,Oe.X$],styles:[".header-div[_ngcontent-%COMP%]{display:flex}.header-div[_ngcontent-%COMP%]   sivi-lib-info-popup[_ngcontent-%COMP%]{margin-top:auto;margin-bottom:4px;margin-left:10px;font-size:20px}ion-col[_ngcontent-%COMP%]{padding-left:0}.currentPeriod[_ngcontent-%COMP%]{background-color:var(--ion-color-light-tint)}"],changeDetection:0});class rr extends Z.AbstractValidator{set ECECTimeOptions(q){this.selectedECECTimeOptions=q,this.unitOpeningHoursFields=this.getUnitOpeningHoursFields(),this.updateOpeningHours(this.openingHours),this.updateValidatorOptions()}constructor(q){super(q),this.translate=q,this.openingHours=[],this.readonly=!1,this.update=new e.vpe,this.sameHours=Z.Constants.YES,this.roundTheClockSelected=!1,this.unitOpeningHoursFields=[],this.weekdayOptions=[Z.WeekPeriods.MONDAY,Z.WeekPeriods.TUESDAY,Z.WeekPeriods.WEDNESDAY,Z.WeekPeriods.THURSDAY,Z.WeekPeriods.FRIDAY],this.weekendOptions=[Z.WeekPeriods.SATURDAY,Z.WeekPeriods.SUNDAY],this.customOptions=[Z.WeekPeriods.MON_FRI,Z.WeekPeriods.MON_SUN,Z.WeekPeriods.SAT_SUN]}ngOnInit(){this.initComponent()}initComponent(){this.openingHoursOptions=this.getOpeningHoursOptions(),this.sameHours=Z.Constants.YES,this.openingHours&&this.openingHours.find(q=>!this.customOptions.includes(q.openingDay))&&(this.sameHours=Z.Constants.NO),this.unitOpeningHoursFields=this.openingHours,this.unitOpeningHoursFields=this.getUnitOpeningHoursFields(),this.updateValidatorOptions()}setSameHoursValue(){this.sameHours=Z.Constants.YES,this.openingHours&&this.openingHours.find(q=>!this.customOptions.includes(q.openingDay))&&(this.sameHours=Z.Constants.NO)}onChangeOpeningHourOptions(q){this.sameHours=q.detail.value,this.unitOpeningHoursFields=this.getUnitOpeningHoursFields(),this.updateValidatorOptions(),this.emitOpeningHours()}onChangeOpeningHours(){this.updateValidatorOptions(),this.emitOpeningHours()}updateValidatorOptions(){this.validatorOptions=this.getValidatorOptions()}getOpeningHoursOptions(){return[{value:Z.Constants.YES,text:this.translate.instant("Organization.Unit.OpeningHours.SameHours")},{value:Z.Constants.NO,text:this.translate.instant("Organization.Unit.OpeningHours.HoursVary")}]}getUnitOpeningHoursFields(){const q=this.getUnitOpeningHoursCase();switch(this.roundTheClockSelected=!1,q){case 0:return this.roundTheClockSelected=!0,[];case 1:return[this.getOpeningHoursCustom()[0]];case 2:return this.getOpeningHoursWeekdays();case 3:return[this.getOpeningHoursCustom()[2]];case 4:return this.getOpeningHoursWeekend();case 5:return[this.getOpeningHoursCustom()[1]];case 6:return this.getOpeningHoursWeekdays().concat(this.getOpeningHoursWeekend());default:return void console.warn("unknown unit opening hours")}}emitOpeningHours(){let q=(0,ge.Z)(this.unitOpeningHoursFields);q=q.filter(W=>W.startTime||W.endTime);for(const W of q)delete W.label,W.id||delete W.id;this.update.emit(q)}trackByDayFn(q,W){return W.openingDay}isWeekdaysSelected(q){return q.includes(Z.DefaultWeeklyCareTimeOptions.MON_FRI)||q.includes(Z.DefaultWeeklyCareTimeOptions.MON_FRI_MORNINGS)||q.includes(Z.DefaultWeeklyCareTimeOptions.MON_FRI_EVENINGS)}isWeekendSelected(q){return q.includes(Z.DefaultWeeklyCareTimeOptions.WEEKENDS)}getUnitOpeningHoursCase(){const q=this.selectedECECTimeOptions;return q.includes(Z.DefaultWeeklyCareTimeOptions.ROUND_THE_CLOCK)?0:this.isWeekendSelected(q)?this.sameHours===Z.Constants.YES?this.isWeekdaysSelected(q)?5:3:this.isWeekdaysSelected(q)?6:4:this.sameHours===Z.Constants.YES?1:2}getLabel(q){switch(q){case Z.WeekPeriods.MONDAY:return this.translate.instant("General.Days.Monday");case Z.WeekPeriods.TUESDAY:return this.translate.instant("General.Days.Tuesday");case Z.WeekPeriods.WEDNESDAY:return this.translate.instant("General.Days.Wednesday");case Z.WeekPeriods.THURSDAY:return this.translate.instant("General.Days.Thursday");case Z.WeekPeriods.FRIDAY:return this.translate.instant("General.Days.Friday");case Z.WeekPeriods.SATURDAY:return this.translate.instant("General.Days.Saturday");case Z.WeekPeriods.SUNDAY:return this.translate.instant("General.Days.Sunday");case Z.WeekPeriods.MON_FRI:return this.translate.instant("General.Days.Monday")+" - "+this.translate.instant("General.Days.Friday");case Z.WeekPeriods.MON_SUN:return this.translate.instant("General.Days.Monday")+" - "+this.translate.instant("General.Days.Sunday");case Z.WeekPeriods.SAT_SUN:return this.translate.instant("General.Days.Saturday")+" - "+this.translate.instant("General.Days.Sunday");default:return""}}updateOpeningHours(q){this.openingHours=q,this.initComponent(),this.updateValidatorOptions()}getOpeningHoursWeekdays(){const q=[];for(const W of this.weekdayOptions)q.push({id:this.getOpeningTimeValue(W).id,openingDay:W,startTime:this.getOpeningTimeValue(W).startTime,endTime:this.getOpeningTimeValue(W).endTime,label:this.getLabel(W)});return q}getOpeningHoursWeekend(){const q=[];for(const W of this.weekendOptions)q.push({id:this.getOpeningTimeValue(W).id,openingDay:W,startTime:this.getOpeningTimeValue(W).startTime,endTime:this.getOpeningTimeValue(W).endTime,label:this.getLabel(W)});return q}getOpeningHoursCustom(){const q=[];for(const W of this.customOptions)q.push({id:this.getOpeningTimeValue(W).id,openingDay:W,startTime:this.getOpeningTimeValue(W).startTime,endTime:this.getOpeningTimeValue(W).endTime,label:this.getLabel(W)});return q}getOpeningTimeValue(q){const W={openingDay:q,startTime:"",endTime:""};return this.unitOpeningHoursFields&&this.unitOpeningHoursFields&&this.unitOpeningHoursFields.find(fn=>fn.openingDay===q)||W}getValidatorOptions(){if(!this.unitOpeningHoursFields||this.readonly)return[];const q=[];for(const W of this.unitOpeningHoursFields)q.push(this.createValidatorOption("startTime-"+W.openingDay,W.startTime,[Z.SiviValidators.validateHour(),Z.SiviValidators.validateFromHourBeforeUntilHour(W.endTime)]),this.createValidatorOption("endTime-"+W.openingDay,W.endTime,[Z.SiviValidators.validateHour(),Z.SiviValidators.validateUntilHourAfterFromHour(W.startTime)]));return q}}rr.\u0275fac=function(q){return new(q||rr)(e.Y36(Oe.sK))},rr.\u0275cmp=e.Xpm({type:rr,selectors:[["sivi-organizations-unit-opening-hours"]],inputs:{ECECTimeOptions:"ECECTimeOptions",openingHours:"openingHours",readonly:"readonly"},outputs:{update:"update"},features:[e.qOj],decls:12,vars:8,consts:[[1,"header-div","ion-no-padding"],[3,"text",4,"ngIf"],[3,"validatorOptions"],["validator",""],[1,"border-grid"],[4,"ngIf"],[4,"ngIf","ngIfElse"],["disabled",""],[3,"text"],["size","12"],["name","openingHoursOptions",3,"viewMode","options","value","siviChange"],[4,"ngFor","ngForOf","ngForTrackBy"],["class","input-row",4,"ngIf","ngIfElse"],["viewmode",""],[1,"input-row"],["size","12",1,"day-label"],[1,"input-col"],[3,"ngModel","blur","ngModelChange"],[3,"name","viewMode","value"],[1,"ion-margin-top","ion-margin-bottom"]],template:function(q,W){if(1&q&&(e.TgZ(0,"ion-col",0)(1,"h3"),e._uU(2),e.ALo(3,"translate"),e.YNc(4,ce,1,1,"sivi-lib-info-popup",1),e.qZA()(),e.TgZ(5,"cgi-validator",2,3)(7,"ion-grid",4),e.YNc(8,we,3,3,"ion-row",5),e.YNc(9,lr,2,2,"ng-container",6),e.YNc(10,mo,5,3,"ng-template",null,7,e.W1O),e.qZA()()),2&q){const dt=e.MAs(11);e.xp6(2),e.hij(" ",e.lcZ(3,6,"Organization.Unit.OpeningHours.Title")," "),e.xp6(2),e.Q6J("ngIf",!W.readonly),e.xp6(1),e.Q6J("validatorOptions",W.validatorOptions),e.xp6(3),e.Q6J("ngIf",!W.roundTheClockSelected),e.xp6(1),e.Q6J("ngIf",!W.roundTheClockSelected)("ngIfElse",dt)}},dependencies:[Z.InfoPopupComponent,Be.wI,Be.jY,Be.Q$,Be.Nd,ke.sg,ke.O5,nt.Fj,nt.JJ,nt.On,Z.RadioListComponent,Oe.X$],styles:["ion-col[_ngcontent-%COMP%]{padding-left:0}.input-col[_ngcontent-%COMP%]{flex-grow:0;padding-top:0}.input-col[_ngcontent-%COMP%] > input[_ngcontent-%COMP%]{border-radius:0;border-style:solid;border-width:1px;border-color:#ccc;width:110px}.day-label[_ngcontent-%COMP%]{padding-bottom:0}.input-row[_ngcontent-%COMP%]{padding-bottom:1em}"]});const aa=["openingHours"];function ea(_t,q){1&_t&&e._UZ(0,"sivi-lib-info-popup",10),2&_t&&e.Q6J("text","ECEC.WeeklyTimeOptions.InfoPopUp")}function Bo(_t,q){if(1&_t){const W=e.EpF();e.TgZ(0,"sivi-lib-checkbox-list",11),e.NdJ("siviChange",function(fn){e.CHM(W);const Ei=e.oxw();return e.KtG(Ei.onUpdateUnitCareTimes(fn))}),e.qZA()}if(2&_t){const W=e.oxw();e.Q6J("viewMode",W.readonly)("options",W.weeklyCareTimeOptions)("value",W.unit.timeOptions)("selectedValuesText",W.selectedWeeklyCareOptionsText)("verticalMode",!0)}}class Ii extends Z.AbstractValidator{set unit(q){this.unitCopy=q,this.initComponent()}get unit(){return this.unitCopy}constructor(q,W,dt,fn){super(W),this.notify=q,this.translate=W,this.codesService=dt,this.organizationCommonService=fn,this.readonly=!1,this.update=new e.vpe,this.selectedWeeklyCareOptionsText=""}ngOnInit(){this.initComponent(),this.getWeeklyCareTimeOptions()}initComponent(){this.unit.timeOptions&&(this.selectedWeeklyCareOptionsText=this.unit.timeOptions.map(q=>this.translate.instant(q)).join(", "))}onUpdateUnitCareTimes(q){if(!q.detail.value)return;const W=q.detail.value;this.unit.timeOptions=[...W],W.includes(Z.DefaultWeeklyCareTimeOptions.ROUND_THE_CLOCK)&&(this.unit.openingHours=[]),this.update.emit(this.unit)}changeOpeningHours(q){const W={...this.unit,openingHours:q};this.update.emit(W)}updateOpeningHours(q){this.openingHours&&this.openingHours.updateOpeningHours(q)}getWeeklyCareTimeOptions(){this.codesService.getCodesByName("sivi.municipality.settings.type.weeklycaretime").pipe((0,D.q)(1)).subscribe(q=>{const W=this.organizationCommonService.getWeeklyCareTimeOptionOrder(),dt=Z.Utils.sortFirstArrayAsSecondByKey(q.childCodes,W,"name");this.weeklyCareTimeOptions=this.getDropdownOptions(dt)},q=>{this.notify.alertFailedToLoadData(),console.error("UnitTimeOptionsComponent: getWeeklyCareTimeOptions failed",q)})}getDropdownOptions(q){return Z.Utils.getSelectOptionsFromArray(q,"name","name").map(dt=>({...dt,text:this.translate.instant(dt.text)}))}}function an(_t,q){1&_t&&e._UZ(0,"sivi-lib-info-popup",12),2&_t&&e.Q6J("text","Organization.OID.Info")}function Zn(_t,q){if(1&_t){const W=e.EpF();e.TgZ(0,"ion-col",13)(1,"cgi-input",14),e.NdJ("siviChange",function(fn){e.CHM(W);const Ei=e.oxw(2);return e.KtG(Ei.onChildminderPicChange(fn))}),e.ALo(2,"translate"),e.qZA()()}if(2&_t){const W=e.oxw(2);e.xp6(1),e.Q6J("viewMode",W.forceViewMode||!W.childminderPicCrudPermission)("label",e.lcZ(2,3,"Form.Label.ChildminderPic"))("listenEvents",!1)}}Ii.\u0275fac=function(q){return new(q||Ii)(e.Y36(Z.NotifyService),e.Y36(Oe.sK),e.Y36(Z.CodeService),e.Y36(Z.OrganizationCommonService))},Ii.\u0275cmp=e.Xpm({type:Ii,selectors:[["sivi-organizations-unit-time-options"]],viewQuery:function(q,W){if(1&q&&e.Gf(aa,5),2&q){let dt;e.iGM(dt=e.CRH())&&(W.openingHours=dt.first)}},inputs:{municipalityId:"municipalityId",unit:"unit",readonly:"readonly"},outputs:{update:"update"},features:[e.qOj],decls:23,vars:16,consts:[[1,"ion-no-padding"],[1,"header-div"],[3,"text",4,"ngIf"],["name","weeklyEcecCareTimes","class","ion-margin-top",3,"viewMode","options","value","selectedValuesText","verticalMode","siviChange",4,"ngIf"],["size-sm","12","size-md","5","size-lg","3"],["lines","none",1,"checkbox"],[3,"ngModel","disabled","ngModelChange"],["for","checkbox",1,"open-on-holidays-label","ion-text-wrap","ion-margin-start"],[3,"ECECTimeOptions","openingHours","readonly","update"],["openingHours",""],[3,"text"],["name","weeklyEcecCareTimes",1,"ion-margin-top",3,"viewMode","options","value","selectedValuesText","verticalMode","siviChange"]],template:function(q,W){1&q&&(e.TgZ(0,"ion-grid",0)(1,"ion-row")(2,"div",1)(3,"h3"),e._uU(4),e.ALo(5,"translate"),e.YNc(6,ea,1,1,"sivi-lib-info-popup",2),e.qZA()()(),e.TgZ(7,"ion-row")(8,"h4"),e._uU(9),e.ALo(10,"translate"),e.qZA()(),e.TgZ(11,"ion-row"),e.YNc(12,Bo,1,5,"sivi-lib-checkbox-list",3),e.qZA(),e.TgZ(13,"ion-row")(14,"ion-col",4)(15,"ion-item",5)(16,"ion-checkbox",6),e.NdJ("ngModelChange",function(fn){return W.unit.openOnPublicHoliday=fn}),e.qZA(),e.TgZ(17,"ion-label",7),e._uU(18),e.ALo(19,"translate"),e.qZA()()()(),e.TgZ(20,"ion-row")(21,"sivi-organizations-unit-opening-hours",8,9),e.NdJ("update",function(fn){return W.changeOpeningHours(fn)}),e.qZA()()()),2&q&&(e.xp6(4),e.hij("",e.lcZ(5,10,"ECEC.WeeklyTimeOptions.Title")," "),e.xp6(2),e.Q6J("ngIf",!W.readonly),e.xp6(3),e.Oqu(e.lcZ(10,12,"ECEC.Application.Title.Weekly.Times")),e.xp6(3),e.Q6J("ngIf",W.weeklyCareTimeOptions),e.xp6(4),e.Q6J("ngModel",W.unit.openOnPublicHoliday)("disabled",W.readonly),e.xp6(2),e.hij("",e.lcZ(19,14,"Form.Label.OpenOnPublicHolidays")," "),e.xp6(3),e.Q6J("ECECTimeOptions",W.unit.timeOptions)("openingHours",W.unit.openingHours)("readonly",W.readonly))},dependencies:[Z.InfoPopupComponent,Be.nz,Be.wI,Be.jY,Be.Ie,Be.Q$,Be.Nd,Be.w,ke.O5,nt.JJ,nt.On,Z.CheckboxListComponent,rr,Oe.X$],styles:[".header-div[_ngcontent-%COMP%]{display:flex}.header-div[_ngcontent-%COMP%]   sivi-lib-info-popup[_ngcontent-%COMP%]{margin-top:auto;margin-bottom:4px;margin-left:10px;font-size:20px}sivi-organizations-unit-opening-hours[_ngcontent-%COMP%]{width:100%}.checkbox[_ngcontent-%COMP%]{--padding-start: 0}.open-on-holidays-label[_ngcontent-%COMP%]{opacity:1!important}"]});const Ci=function(_t){return{readonly:_t}},Xn=function(){return{standalone:!0}};function Et(_t,q){if(1&_t){const W=e.EpF();e.TgZ(0,"ion-row")(1,"ion-col",2)(2,"div",15)(3,"ion-checkbox",16),e.NdJ("ngModelChange",function(fn){e.CHM(W);const Ei=e.oxw(2);return e.KtG(Ei.virtualUnit=fn)})("ngModelChange",function(fn){e.CHM(W);const Ei=e.oxw(2);return e.KtG(Ei.onVirtualUnitCheckboxChange(fn))}),e.ALo(4,"translate"),e.qZA(),e.TgZ(5,"ion-label"),e._uU(6),e.ALo(7,"translate"),e.qZA(),e._UZ(8,"sivi-lib-info-popup",12),e.qZA()()()}if(2&_t){const W=e.oxw(2);e.xp6(2),e.Q6J("ngClass",e.VKq(11,Ci,!W.canEditVirtualUnit)),e.xp6(1),e.Q6J("ngModel",W.virtualUnit)("ngModelOptions",e.DdM(13,Xn))("disabled",!W.canEditVirtualUnit),e.uIk("aria-label",e.lcZ(4,7,"Organization.Unit.Virtual.Title")),e.xp6(3),e.hij(" ",e.lcZ(7,9,"Organization.Unit.Virtual.Title")," "),e.xp6(2),e.Q6J("text","Organization.Unit.Virtual.Title.Info")}}function gn(_t,q){if(1&_t){const W=e.EpF();e.TgZ(0,"form",1)(1,"ion-row")(2,"ion-col",2)(3,"p",3)(4,"cgi-input",4),e.NdJ("siviChange",function(fn){e.CHM(W);const Ei=e.oxw();return e.KtG(Ei.updateOrganizationOId(fn))}),e.ALo(5,"translate"),e.qZA(),e.YNc(6,an,1,1,"sivi-lib-info-popup",5),e.qZA()(),e.YNc(7,Zn,3,5,"ion-col",6),e.qZA(),e.TgZ(8,"ion-row")(9,"ion-col",2),e._UZ(10,"sivi-lib-select",7),e.ALo(11,"async"),e.ALo(12,"translate"),e.qZA()(),e.YNc(13,Et,9,14,"ion-row",8),e.TgZ(14,"ion-row")(15,"ion-col",2),e._UZ(16,"sivi-lib-radio-list",9),e.qZA()(),e.TgZ(17,"ion-row")(18,"ion-col",2),e._UZ(19,"sivi-lib-radio-list",10),e.ALo(20,"async"),e.qZA()(),e.TgZ(21,"ion-row")(22,"ion-col",2),e._UZ(23,"sivi-lib-select",11),e.ALo(24,"async"),e.ALo(25,"translate"),e.qZA()()()}if(2&_t){const W=e.oxw();e.Q6J("formGroup",W.form),e.xp6(4),e.Q6J("viewMode",W.readonly)("label",e.lcZ(5,17,"Form.Label.OrganizationOID"))("value",W.unit.oid||"-"),e.xp6(2),e.Q6J("ngIf",!W.readonly),e.xp6(1),e.Q6J("ngIf",W.shouldShowChildminderPic),e.xp6(3),e.Q6J("viewMode",!!W.unit.id)("options",e.lcZ(11,19,W.serviceFormsByTypeOptions$))("placeholder",e.lcZ(12,21,"Organization.Educational.FormOfActivity")),e.xp6(3),e.Q6J("ngIf",W.canEditVirtualUnit||W.unit.virtual),e.xp6(3),e.Q6J("viewMode",W.readonly)("options",W.organizationFormatsOptions),e.xp6(3),e.Q6J("viewMode",W.readonly)("options",e.lcZ(20,23,W.organizationalFormOptions$)),e.xp6(4),e.Q6J("viewMode",W.readonly)("options",e.lcZ(24,25,W.educationalSystemOptions$))("placeholder",e.lcZ(25,27,"Organization.Educational.EducationalSystem"))}}class ei extends Z.SiviAbstractForm{get shouldShowChildminderPic(){return this.unit.serviceForm===Z.OrganizationTypes.DAYCAREPLACE_TYPE_FAMILY_DAYCARE&&this.childminderPicCrudPermission}constructor(q,W,dt,fn,Ei,Po){super(q),this.translate=q,this.organizationService=W,this.organizationCommonService=dt,this.codeService=fn,this.fb=Ei,this.notifyService=Po,this.readonly=!1,this.childminderPicCrudPermission=!1,this.forceViewMode=!0,this.update=new e.vpe,this.form=this.fb.group({serviceForm:[""],serviceFormat:[""],educationalSystem:[""],organizationalForm:[""]}),this.educationalSystemOptions$=new Pe.X([]),this.organizationalFormOptions$=new Pe.X([]),this.serviceFormsByTypeOptions$=new Pe.X([]),this.loading=!0}ngOnInit(){var q=()=>super.ngOnInit,W=this;return(0,o.Z)(function*(){q().call(W),W.organizationFormatsOptions=W.organizationCommonService.getOrganizationFormats(),yield W.getOrganizationOptions(),W.setValidators(),W.updateOrganizationInfoData(),W.addChildminderPicFormControlForFamilyDaycare()})()}onFormValueChange(q){this.unit={...this.unit,...q},this.update.emit(this.unit)}getOrganizationOptions(){var q=this;return(0,o.Z)(function*(){return new Promise((W,dt)=>{(0,de.D)([q.codeService.getCodesByName(Z.OrganizationTypes.DAYCAREPLACE),q.codeService.getCodesByNameIncludedExternal(Z.CodeTypes.ORGANIZATIONAL_FORM),q.codeService.getCodesByNameIncludedExternal(Z.CodeTypes.EDUCATIONAL_SYSTEM)]).pipe((0,D.q)(1)).subscribe(([fn,Ei,Po])=>{const En=q.organizationCommonService.orderEcecOrganizationTypeCodes(fn.childCodes);q.serviceFormsByTypeOptions$.next(q.organizationCommonService.getSelectOptionsFromCodes(En)),q.organizationalFormOptions$.next(q.organizationCommonService.getSelectOptionsFromCodes(Ei.content)),q.educationalSystemOptions$.next(q.organizationCommonService.getSelectOptionsFromCodes(Po.content)),q.loading=!1,W()},fn=>{console.error("UnitOrganizationalInfoComponent: getOrganizationOptions, error",fn),dt()})})})()}onChildminderPicChange(q){const W=q.detail.value||null;this.form.get("childminderPic").patchValue(W)}onVirtualUnitCheckboxChange(q){var W=this;return(0,o.Z)(function*(){!q||!W.unit.periods.length&&!W.unit.abnormalPeriods.length||(yield(yield W.notifyService.createConfirmationPopUp("General.AddressInUse.Delete","Confirmation.Unit.Virtual.Periods.Remove","General.Buttons.Continue")).onDidDismiss()).data?(W.unit={...W.unit,virtual:q},W.update.emit(W.unit)):W.virtualUnit=!1})()}setValidators(){this.readonly||(this.form.get("serviceForm").setValidators([Z.SiviValidators.required]),this.form.get("serviceFormat").setValidators([Z.SiviValidators.required]),this.form.get("educationalSystem").setValidators([Z.SiviValidators.required]),this.form.get("organizationalForm").setValidators([Z.SiviValidators.required]))}updateOrganizationInfoData(){this.form.get("serviceForm").patchValue(this.unit.serviceForm||""),this.form.get("serviceFormat").patchValue(this.unit.serviceFormat||""),this.form.get("educationalSystem").patchValue(this.unit.educationalSystem||""),this.form.get("organizationalForm").patchValue(this.unit.organizationalForm||""),this.virtualUnit=this.unit.virtual||!1}updateOrganizationOId(q){const W=q.detail;this.unit.oid=W.value,this.update.emit(this.unit)}addChildminderPicFormControlForFamilyDaycare(){if(this.unit.serviceForm===Z.OrganizationTypes.DAYCAREPLACE_TYPE_FAMILY_DAYCARE){const q=this.unit.childminderPic,W=this.childminderPicCrudPermission||q?q:"-",dt=this.childminderPicCrudPermission?[Z.SiviValidators.validatePin()]:[];this.form.addControl("childminderPic",new nt.NI(W,dt))}}}ei.\u0275fac=function(q){return new(q||ei)(e.Y36(Oe.sK),e.Y36(Z.OrganizationService),e.Y36(Z.OrganizationCommonService),e.Y36(Z.CodeService),e.Y36(nt.QS),e.Y36(Z.NotifyService))},ei.\u0275cmp=e.Xpm({type:ei,selectors:[["sivi-organizations-unit-organizational-info"]],inputs:{unit:"unit",municipalityId:"municipalityId",readonly:"readonly",childminderPicCrudPermission:"childminderPicCrudPermission",forceViewMode:"forceViewMode",canEditVirtualUnit:"canEditVirtualUnit"},outputs:{update:"update"},features:[e.qOj],decls:1,vars:1,consts:[["siviLibForm","",3,"formGroup",4,"ngIf"],["siviLibForm","",3,"formGroup"],["siviGridCol","left"],[1,"component-with-info-popup"],["name","organizationOID","label-position","floating",1,"organization-oid",3,"viewMode","label","value","siviChange"],[3,"text",4,"ngIf"],["siviGridCol","right",4,"ngIf"],["formControlName","serviceForm","siviLibFormControl","","label","Organization.Educational.FormOfActivity",3,"viewMode","options","placeholder"],[4,"ngIf"],["formControlName","serviceFormat","siviLibFormControl","","label","DaycarePlace.FormOfActivity",3,"viewMode","options"],["formControlName","organizationalForm","siviLibFormControl","","label","Organization.Educational.OrganizationalForm",3,"viewMode","options"],["formControlName","educationalSystem","siviLibFormControl","","label","Organization.Educational.EducationalSystem",3,"viewMode","options","placeholder"],[3,"text"],["siviGridCol","right"],["formControlName","childminderPic","siviLibFormControl","","label-position","floating",3,"viewMode","label","listenEvents","siviChange"],[1,"virtual-unit-checkbox",3,"ngClass"],[3,"ngModel","ngModelOptions","disabled","ngModelChange"]],template:function(q,W){1&q&&e.YNc(0,gn,26,29,"form",0),2&q&&e.Q6J("ngIf",!W.loading)},dependencies:[ke.mk,ke.O5,Be.nz,Be.wI,Be.Q$,Be.Nd,Be.w,Z.GridColDirective,Z.InfoPopupComponent,nt._Y,nt.JJ,nt.JL,nt.On,Z.SiviFormDirective,Z.SiviFormControlDirective,nt.sg,nt.u,Z.RadioListComponent,Z.SelectComponent,ke.Ov,Oe.X$],styles:["ion-col[_ngcontent-%COMP%]{padding-left:0}.component-with-info-popup[_ngcontent-%COMP%]{display:flex;margin-top:0;margin-bottom:0;margin-right:10px}.component-with-info-popup[_ngcontent-%COMP%]   .organization-oid[_ngcontent-%COMP%]{width:100%}.component-with-info-popup[_ngcontent-%COMP%]   sivi-lib-info-popup[_ngcontent-%COMP%]{margin:25px auto auto;font-size:26px}.virtual-unit-checkbox[_ngcontent-%COMP%]{margin:16px 0 8px;display:flex;align-items:center}.virtual-unit-checkbox.readonly[_ngcontent-%COMP%]{margin:8px 0}.virtual-unit-checkbox[_ngcontent-%COMP%]   ion-label[_ngcontent-%COMP%]{margin-left:8px}.virtual-unit-checkbox[_ngcontent-%COMP%]   sivi-lib-info-popup[_ngcontent-%COMP%]{font-size:24px}"]});class un extends Z.SiviAbstractForm{set unit(q){this.unitCopy=q,this.initComponent()}get unit(){return this.unitCopy}constructor(q,W){super(q),this.translate=q,this.fb=W,this.readonly=!0,this.update=new e.vpe,this.componentError=new e.vpe,this.areaOptions=[],this.form=this.fb.group({phone:[""],secondaryPhone:[""],email:[""],secondaryEmail:[""]})}ngOnInit(){this.setValidators(),this.updateContactData()}initComponent(){try{this.phone=this.unit.phone||"",this.secondaryPhone=this.unit.secondaryPhone||"",this.email=this.unit.email||"",this.secondaryEmail=this.unit.secondaryEmail||null}catch(q){console.warn("UnitContactsComponent: Could not set the contacts for this unit.\n      Maybe missing data or missing information from BE? Please check the payloads\n",q),this.componentError.emit(!0)}}onFormValueChange(q){const W=q;this.unit={...this.unit,...W},this.update.emit(this.unit)}setValidators(){this.readonly||(this.form.get("phone").setValidators([Z.SiviValidators.required,Z.SiviValidators.validatePhoneNumber()]),this.form.get("secondaryPhone").setValidators([Z.SiviValidators.validatePhoneNumber()]),this.form.get("email").setValidators([Z.SiviValidators.required,Z.SiviValidators.validateEmail()]),this.form.get("secondaryEmail").setValidators([Z.SiviValidators.validateEmail()]))}updateContactData(){this.form.get("phone").patchValue(this.phone||""),this.form.get("secondaryPhone").patchValue(this.secondaryPhone||""),this.form.get("email").patchValue(this.email||""),this.form.get("secondaryEmail").patchValue(this.secondaryEmail||null)}}function Ft(_t,q){if(1&_t&&(e.TgZ(0,"ion-row")(1,"ion-col",1),e._UZ(2,"cgi-input",8),e.ALo(3,"translate"),e.qZA()()),2&_t){const W=e.oxw();e.xp6(2),e.Q6J("hidden",!W.readonly)("viewMode",W.readonly)("value",W.locationCoordinates)("label",e.lcZ(3,4,"Form.Label.LocationCoordinates"))}}un.\u0275fac=function(q){return new(q||un)(e.Y36(Oe.sK),e.Y36(nt.QS))},un.\u0275cmp=e.Xpm({type:un,selectors:[["sivi-organizations-unit-contacts"]],inputs:{unit:"unit",areaCodes:"areaCodes",readonly:"readonly"},outputs:{update:"update",componentError:"componentError"},features:[e.qOj],decls:17,vars:23,consts:[["siviLibForm","",3,"formGroup"],["size-xs","12","size-md","6","size-lg","5","size-xl","4"],["formControlName","phone","siviLibFormControl","","type","text","label-position","floating",3,"value","viewMode","label"],["formControlName","secondaryPhone","siviLibFormControl","","type","text","label-position","floating",3,"hidden","value","viewMode","label"],["formControlName","email","siviLibFormControl","","type","text","label-position","floating",3,"value","viewMode","label"],["formControlName","secondaryEmail","siviLibFormControl","","type","text","label-position","floating",3,"hidden","value","viewMode","label"]],template:function(q,W){1&q&&(e.TgZ(0,"form",0)(1,"ion-row")(2,"ion-col",1),e._UZ(3,"cgi-input",2),e.ALo(4,"translate"),e.qZA()(),e.TgZ(5,"ion-row")(6,"ion-col",1),e._UZ(7,"cgi-input",3),e.ALo(8,"translate"),e.qZA()(),e.TgZ(9,"ion-row")(10,"ion-col",1),e._UZ(11,"cgi-input",4),e.ALo(12,"translate"),e.qZA()(),e.TgZ(13,"ion-row")(14,"ion-col",1),e._UZ(15,"cgi-input",5),e.ALo(16,"translate"),e.qZA()()()),2&q&&(e.Q6J("formGroup",W.form),e.xp6(3),e.Q6J("value",W.phone)("viewMode",W.readonly)("label",e.lcZ(4,15,"Form.Label.Phone")),e.xp6(4),e.Q6J("hidden",!W.secondaryPhone&&W.readonly)("value",W.secondaryPhone)("viewMode",W.readonly)("label",e.lcZ(8,17,"Form.Label.PhoneSecondary")),e.xp6(4),e.Q6J("value",W.email)("viewMode",W.readonly)("label",e.lcZ(12,19,"Form.Label.EmailAddress")),e.xp6(4),e.Q6J("hidden",!W.secondaryEmail&&W.readonly)("value",W.secondaryEmail)("viewMode",W.readonly)("label",e.lcZ(16,21,"Form.Label.EmailSecondary")))},dependencies:[Be.wI,Be.Nd,nt._Y,nt.JJ,nt.JL,Z.SiviFormDirective,Z.SiviFormControlDirective,nt.sg,nt.u,Oe.X$],styles:["ion-col[_ngcontent-%COMP%]{padding-left:0}"]});class Ut extends Z.SiviAbstractForm{set unit(q){this.unitCopy=q,this.initComponent()}get unit(){return this.unitCopy}constructor(q,W){super(q),this.translate=q,this.fb=W,this.type="address",this.readonly=!1,this.update=new e.vpe,this.postal="postal",this.locationCoordinates="(-)",this.form=this.fb.group({street:[""],postalCode:[""],city:[""]})}ngOnInit(){this.initComponent(),this.updateAddressData(),this.setValidators()}initComponent(){this.address=this.type===this.postal?this.unit.postalAddress:this.unit.address,this.setGeoLocationFromAddress()}onFormValueChange(q){const W=this.type===this.postal?"postalAddress":"address";this.type===this.postal&&this.isDataChanged(this.unit.postalAddress,q)&&this.setValidators();const dt={...this.unit,[W]:q};(0,ve.Z)(this.unit,dt)||(this.unit=dt,this.update.emit(this.unit))}isDataChanged(q,W){if(q)return!(0,ve.Z)(q,W)}setValidators(){let q=!0;this.type===this.postal&&(q=this.hasPostalAddressAnyValue(this.form.value)),q&&!this.readonly?(this.form.get("street").setValidators([Z.SiviValidators.required,Z.SiviValidators.maxLength(Z.MaxLength.DEFAULT)]),this.form.get("postalCode").setValidators([Z.SiviValidators.required,Z.SiviValidators.validatePostalCode()]),this.form.get("city").setValidators([Z.SiviValidators.required,Z.SiviValidators.validateCity()])):(this.form.get("street").setValidators([Z.SiviValidators.maxLength(Z.MaxLength.DEFAULT)]),this.form.get("postalCode").setValidators([Z.SiviValidators.validatePostalCode()]),this.form.get("city").setValidators([Z.SiviValidators.validateCity()]))}updateAddressData(){this.hasPostalAddressAnyValue(this.address)&&(this.form.get("street").patchValue(this.address.street),this.form.get("postalCode").patchValue(this.address.postalCode),this.form.get("city").patchValue(this.address.city))}hasPostalAddressAnyValue(q){return!!q&&Object.values(q).some(W=>W)}setGeoLocationFromAddress(){const q=(0,pe.Z)(this.address,"latitude"),W=(0,pe.Z)(this.address,"longitude");this.locationCoordinates=q&&W?[q,W].join(", "):"(-)"}}Ut.\u0275fac=function(q){return new(q||Ut)(e.Y36(Oe.sK),e.Y36(nt.QS))},Ut.\u0275cmp=e.Xpm({type:Ut,selectors:[["sivi-organizations-unit-address"]],inputs:{unit:"unit",type:"type",readonly:"readonly"},outputs:{update:"update"},features:[e.qOj],decls:15,vars:24,consts:[["siviLibForm","",3,"formGroup"],["size-xs","12","size-md","6","size-lg","5","size-xl","4"],["formControlName","street","siviLibFormControl","","type","text","label-position","floating",3,"hidden","viewMode","value","label"],["size-xs","12","size-md","3","size-lg","2","size-xl","2"],["formControlName","postalCode","siviLibFormControl","","type","text","label-position","floating",3,"hidden","viewMode","value","label"],["size-xs","12","size-md","3","size-lg","3","size-xl","2"],["formControlName","city","siviLibFormControl","","type","text","label-position","floating",3,"hidden","viewMode","value","label"],[4,"ngIf"],["name","geoLocation","type","text","label-position","floating",3,"hidden","viewMode","value","label"]],template:function(q,W){1&q&&(e.TgZ(0,"form",0)(1,"ion-row")(2,"ion-col",1),e._UZ(3,"cgi-input",2),e.ALo(4,"translate"),e.ALo(5,"translate"),e.qZA()(),e.TgZ(6,"ion-row")(7,"ion-col",3),e._UZ(8,"cgi-input",4),e.ALo(9,"translate"),e.qZA(),e.TgZ(10,"ion-col",5),e._UZ(11,"cgi-input",6),e.ALo(12,"translate"),e.ALo(13,"translate"),e.qZA()(),e.YNc(14,Ft,4,6,"ion-row",7),e.qZA()),2&q&&(e.Q6J("formGroup",W.form),e.xp6(3),e.Q6J("hidden",!(null!=W.address&&W.address.street)&&W.readonly)("viewMode",W.readonly)("value",null==W.address?null:W.address.street)("label",W.type===W.postal?e.lcZ(4,14,"Form.Label.PostalAddress"):e.lcZ(5,16,"Form.Label.PhysicalAddress")),e.xp6(5),e.Q6J("hidden",!(null!=W.address&&W.address.postalCode)&&W.readonly)("viewMode",W.readonly)("value",null==W.address?null:W.address.postalCode)("label",e.lcZ(9,18,"Form.Label.PostalCode")),e.xp6(3),e.Q6J("hidden",!(null!=W.address&&W.address.city)&&W.readonly)("viewMode",W.readonly)("value",null==W.address?null:W.address.city)("label",W.type===W.postal?e.lcZ(12,20,"Form.Label.PostOffice"):e.lcZ(13,22,"Municipality.Singular")),e.xp6(3),e.Q6J("ngIf","address"===W.type&&W.readonly))},dependencies:[ke.O5,Be.wI,Be.Nd,nt._Y,nt.JJ,nt.JL,Z.SiviFormDirective,Z.SiviFormControlDirective,nt.sg,nt.u,Oe.X$],styles:["ion-col[_ngcontent-%COMP%]{padding-left:0}"]});class wn extends Z.AbstractValidator{constructor(q){super(q),this.translate=q}}wn.\u0275fac=function(q){return new(q||wn)(e.Y36(Oe.sK))},wn.\u0275cmp=e.Xpm({type:wn,selectors:[["sivi-organizations-unit-staff-info"]],inputs:{person:"person",profileLabel:"profileLabel"},features:[e.qOj],decls:12,vars:15,consts:[["siviGridCol","left"],["name","name","type","text","label-position","floating",3,"value","viewMode","label"],["name","phoneWork","type","text","label-position","floating",3,"value","viewMode","label"],["name","emailWork","type","text","label-position","floating",3,"value","viewMode","label"]],template:function(q,W){1&q&&(e.TgZ(0,"ion-row")(1,"ion-col",0),e._UZ(2,"cgi-input",1),e.ALo(3,"translate"),e.qZA()(),e.TgZ(4,"ion-row")(5,"ion-col",0),e._UZ(6,"cgi-input",2),e.ALo(7,"translate"),e.qZA()(),e.TgZ(8,"ion-row")(9,"ion-col",0),e._UZ(10,"cgi-input",3),e.ALo(11,"translate"),e.qZA()()),2&q&&(e.xp6(2),e.Q6J("value",W.person.firstName+" "+W.person.lastName)("viewMode",!0)("label",e.lcZ(3,9,W.profileLabel)),e.xp6(4),e.Q6J("value",W.person.phoneWork||"-")("viewMode",!0)("label",e.lcZ(7,11,"Form.Label.Phone.Work")),e.xp6(4),e.Q6J("value",W.person.emailWork||"-")("viewMode",!0)("label",e.lcZ(11,13,"Form.Label.Email.Work")))},dependencies:[Be.wI,Be.Nd,Z.GridColDirective,Oe.X$],styles:["ion-col[_ngcontent-%COMP%]{padding-left:0}"]});const Gn=["form"],xi=["siviContent"],Cr=["timeOptions"];function Fr(_t,q){if(1&_t){const W=e.EpF();e.TgZ(0,"sivi-lib-navbar-action-button",14),e.NdJ("clicked",function(){e.CHM(W);const fn=e.oxw(2);return e.KtG(fn.onSaveOrganization())}),e.qZA()}}function en(_t,q){if(1&_t){const W=e.EpF();e.TgZ(0,"ion-header")(1,"sivi-lib-navbar",10),e.NdJ("closed",function(){e.CHM(W);const fn=e.oxw();return e.KtG(fn.onDismiss())}),e.TgZ(2,"div",11),e._uU(3),e.ALo(4,"translate"),e.ALo(5,"translate"),e.qZA(),e.TgZ(6,"div",12),e.YNc(7,Fr,1,0,"sivi-lib-navbar-action-button",13),e.qZA()()()}if(2&_t){const W=e.oxw();e.xp6(1),e.Q6J("hideNotifications",!0)("closeButton",W.componentInitialized),e.xp6(2),e.hij(" ",W.unitId===W.constants.NEW_ID?e.lcZ(4,4,"DaycarePlace.Title.Add"):e.lcZ(5,6,"Organization.Educational.BasicInfo")," "),e.xp6(4),e.Q6J("ngIf",W.componentInitialized&&(W.crudPermission||W.contactsCrudPermission||W.childminderPicCrudPermission))}}function Wn(_t,q){if(1&_t&&(e.ynx(0),e._uU(1),e.ALo(2,"translate"),e.ALo(3,"date"),e.BQk()),2&_t){const W=e.oxw();e.xp6(1),e.AsE("(",e.lcZ(2,2,"General.Status."+(null==W.unit?null:W.unit.restEntityState))," ",e.xi3(3,4,null==W.unit?null:W.unit.validUntil,W.dateFormats.FINNISH_ANGULAR),") ")}}function at(_t,q){if(1&_t){const W=e.EpF();e.TgZ(0,"ion-button",15),e.NdJ("click",function(){e.CHM(W);const fn=e.oxw();return e.KtG(fn.showEditUnitModal())}),e._uU(1),e.ALo(2,"translate"),e.qZA()}2&_t&&(e.xp6(1),e.hij(" ",e.lcZ(2,1,"General.Buttons.Edit")," "))}function It(_t,q){if(1&_t){const W=e.EpF();e.TgZ(0,"ion-button",15),e.NdJ("click",function(){e.CHM(W);const fn=e.oxw();return e.KtG(fn.reactivateUnit())}),e._uU(1),e.ALo(2,"translate"),e.qZA()}2&_t&&(e.xp6(1),e.hij(" ",e.lcZ(2,1,"General.Buttons.Reactivate")," "))}function Qt(_t,q){if(1&_t){const W=e.EpF();e.TgZ(0,"sivi-organizations-language-and-focuses",24),e.NdJ("update",function(fn){e.CHM(W);const Ei=e.oxw(2);return e.KtG(Ei.updateUnit(fn))}),e.qZA()}if(2&_t){const W=e.oxw(2);e.Q6J("unit",W.unit)("crudPermission",W.crudPermission)("readonly",!W.crudPermission||W.readonly)("modal",W.modal)}}function St(_t,q){if(1&_t&&(e.ynx(0),e.TgZ(1,"div",8)(2,"h2"),e._uU(3),e.ALo(4,"translate"),e.qZA()(),e._UZ(5,"cgi-input",28),e.BQk()),2&_t){const W=e.oxw(3);e.xp6(3),e.Oqu(e.lcZ(4,3,"Organization.Unit.Supervisor.Title")),e.xp6(2),e.Q6J("viewMode",!0)("value",W.unitSupervisor||"-")}}function Pt(_t,q){if(1&_t){const W=e.EpF();e.TgZ(0,"sivi-lib-select",29),e.NdJ("siviChange",function(fn){e.CHM(W);const Ei=e.oxw(3);return e.KtG(Ei.onChangeUnitSupervisor(fn))}),e.ALo(1,"translate"),e.ALo(2,"translate"),e.ALo(3,"translate"),e.qZA()}if(2&_t){const W=e.oxw(3);e.Q6J("value",null==W.unit.unitSupervisor?null:W.unit.unitSupervisor.id)("options",W.unitSupervisorOptions)("placeholder",e.lcZ(2,7,"General.Buttons.Select"))("label",e.lcZ(3,9,"Organization.Unit.Supervisor.Title")),e.uIk("aria-label",e.lcZ(1,5,"Organization.Unit.Supervisor.Title"))}}function cn(_t,q){if(1&_t&&(e.TgZ(0,"ion-row")(1,"ion-col",25),e.YNc(2,St,6,5,"ng-container",26),e.YNc(3,Pt,4,11,"ng-template",null,27,e.W1O),e.qZA()()),2&_t){const W=e.MAs(4),dt=e.oxw(2);e.xp6(2),e.Q6J("ngIf",!dt.crudPermission||dt.readonly)("ngIfElse",W)}}function Ln(_t,q){if(1&_t&&(e.ynx(0),e._UZ(1,"sivi-organizations-unit-staff-info",31),e.BQk()),2&_t){const W=q.$implicit;e.xp6(1),e.Q6J("person",W)("profileLabel","ROLE_DCP_CHIEF")}}function ii(_t,q){if(1&_t&&(e.ynx(0),e._UZ(1,"sivi-organizations-unit-staff-info",31),e.BQk()),2&_t){const W=q.$implicit;e.xp6(1),e.Q6J("person",W)("profileLabel","ROLE_SERVICE_COUNSELOR")}}function hi(_t,q){if(1&_t&&(e.ynx(0),e.TgZ(1,"div",8)(2,"h2"),e._uU(3),e.ALo(4,"translate"),e.qZA()(),e.YNc(5,Ln,2,2,"ng-container",30),e.YNc(6,ii,2,2,"ng-container",30),e.BQk()),2&_t){const W=e.oxw(2);e.xp6(3),e.Oqu(e.lcZ(4,5,"Organization.Unit.Contacts")),e.xp6(2),e.Q6J("ngForOf",W.unit.unitLeaders)("ngForTrackBy",W.trackByFn),e.xp6(1),e.Q6J("ngForOf",W.unit.unitCounselors)("ngForTrackBy",W.trackByFn)}}function Ri(_t,q){if(1&_t){const W=e.EpF();e.TgZ(0,"ion-grid",16)(1,"sivi-organizations-unit-basic-info",17),e.NdJ("update",function(fn){e.CHM(W);const Ei=e.oxw();return e.KtG(Ei.updateUnit(fn))}),e.qZA(),e.TgZ(2,"sivi-organizations-unit-organizational-info",18),e.NdJ("update",function(fn){e.CHM(W);const Ei=e.oxw();return e.KtG(Ei.updateUnit(fn))}),e.qZA(),e.TgZ(3,"div",8)(4,"h2"),e._uU(5),e.ALo(6,"translate"),e.qZA()(),e.TgZ(7,"sivi-organizations-unit-time-options",19,20),e.NdJ("update",function(fn){e.CHM(W);const Ei=e.oxw();return e.KtG(Ei.updateUnit(fn))}),e.qZA(),e.YNc(9,Qt,1,4,"sivi-organizations-language-and-focuses",21),e.TgZ(10,"div",8)(11,"h2"),e._uU(12),e.ALo(13,"translate"),e.qZA()(),e.TgZ(14,"sivi-organizations-unit-contacts",22),e.NdJ("update",function(fn){e.CHM(W);const Ei=e.oxw();return e.KtG(Ei.updateUnit(fn))})("componentError",function(fn){e.CHM(W);const Ei=e.oxw();return e.KtG(Ei.onMissingInformation(fn))}),e.qZA(),e.TgZ(15,"sivi-organizations-unit-address",22),e.NdJ("update",function(fn){e.CHM(W);const Ei=e.oxw();return e.KtG(Ei.updateUnit(fn))})("componentError",function(fn){e.CHM(W);const Ei=e.oxw();return e.KtG(Ei.onMissingInformation(fn))}),e.qZA(),e.TgZ(16,"sivi-organizations-unit-address",23),e.NdJ("update",function(fn){e.CHM(W);const Ei=e.oxw();return e.KtG(Ei.updateUnit(fn))})("componentError",function(fn){e.CHM(W);const Ei=e.oxw();return e.KtG(Ei.onMissingInformation(fn))}),e.qZA(),e.YNc(17,cn,5,2,"ion-row",0),e.YNc(18,hi,7,7,"ng-container",0),e.qZA()}if(2&_t){const W=e.oxw();e.xp6(1),e.Q6J("unit",W.unit)("municipalityId",W.municipalityId)("readonly",!W.crudPermission||W.readonly),e.xp6(1),e.Q6J("unit",W.unit)("municipalityId",W.municipalityId)("readonly",!W.crudPermission||W.readonly)("childminderPicCrudPermission",W.childminderPicCrudPermission)("forceViewMode",W.forceViewMode)("canEditVirtualUnit",W.canEditVirtualUnit),e.xp6(3),e.Oqu(e.lcZ(6,23,"Organization.Educational.TimeOptions")),e.xp6(2),e.Q6J("municipalityId",W.municipalityId)("unit",W.unit)("readonly",!W.crudPermission||W.readonly),e.xp6(2),e.Q6J("ngIf",W.unit),e.xp6(3),e.Oqu(e.lcZ(13,25,"Organization.Educational.ContactInfo")),e.xp6(2),e.Q6J("unit",W.unit)("readonly",!W.contactsCrudPermission||W.readonly),e.xp6(1),e.Q6J("unit",W.unit)("readonly",!W.contactsCrudPermission||W.readonly),e.xp6(1),e.Q6J("unit",W.unit)("readonly",!W.contactsCrudPermission||W.readonly),e.xp6(1),e.Q6J("ngIf",W.unitSupervisorOptions.length),e.xp6(1),e.Q6J("ngIf",W.unit.id)}}const _r=function(_t){return{name:_t}};class er extends Z.SiviPage{constructor(q,W,dt,fn,Ei,Po,En,ls,Au){super(Ei,Po,q,W,ls,En),this.router=q,this.route=W,this.organizationService=dt,this.siviProjectsGatewayService=fn,this.notify=Ei,this.translate=Po,this.modalCtrl=En,this.location=ls,this.organizationCommonService=Au,this.modal=!1,this.forceViewMode=!0,this.CRUDRoles=[Z.Roles.MUNICIPALITY_ADMIN],this.CRUDContactRoles=[Z.Roles.MUNICIPALITY_ADMIN,Z.Roles.DCP_CHIEF,Z.Roles.ECEC_LEAD],this.CRUDChildminderPicRoles=[Z.Roles.MUNICIPALITY_ADMIN,Z.Roles.DCP_CHIEF,Z.Roles.ECEC_LEAD],this.municipalityId=Z.Utils.getPathParamFromRouterSnapshot("municipalityId",this.router.routerState.snapshot.root),this.readonly=!0,this.crudPermission=!1,this.contactsCrudPermission=!1,this.childminderPicCrudPermission=!1,this.constants=Z.Constants,this.dateFormats=Z.DateFormats,this.loading=!1,this.unitSupervisorOptions=[],this.componentInitialized=!1,this.inactiveUnit=!0,this.hasBeenUpdated=!1,this.validUntilChanged=!1,this.auth=this.siviProjectsGatewayService.getAuthService(),this.appStateService=this.siviProjectsGatewayService.getAppStateService()}ngOnInit(){this.initComponent(),this.restoreModal()}initComponent(){const q=this.CRUDRoles.concat(this.CRUDContactRoles);this.readonly=!this.auth.hasAnyRole(q)||this.forceViewMode,this.unitId===Z.Constants.NEW_ID?(this.inactiveUnit=!1,this.unit=this.createUnit(),this.setCanEditVirtualUnit(),this.crudPermission=!0,this.contactsCrudPermission=!0,this.updateSavedUnit()):(this.unitId||(this.unitId=Z.Utils.getPathParamFromRouterSnapshot("organizationId",this.router.routerState.snapshot.root)),this.getUnit(this.unitId))}getUnit(q){this.contentLoader.showLoader(),this.organizationService.getUnit(q).pipe((0,D.q)(1)).subscribe(W=>{this.lastSavedValidUntil=W.validUntil,this.inactiveUnit=!this.organizationCommonService.isActive(W),this.unit={...W,languages:W.languages.map(Ei=>Ei.toUpperCase()),abnormalPeriods:Z.Utils.convertNumbersToStrings(W.abnormalPeriods),periods:Z.Utils.convertNumbersToStrings(W.periods)},this.setCanEditVirtualUnit(),this.unitSupervisorOptions=this.getUnitSupervisorOptions([...W.unitLeaders]);const fn=`--${this.translate.instant("General.None")}--`;this.unitSupervisorOptions.push({value:null,text:fn}),this.unitSupervisor=this.getUnitSupervisor(W),this.updateUnitSupervisorId(W),this.updateOpeningHours(),this.getOrganizationImage(),this.setPermissions(),this.contentLoader.showContent(this.unit),this.updateSavedUnit()},W=>{console.error("UnitInfoComponent: getUnit failed",W),this.contentLoader.showError()})}getUnitSupervisorOptions(q){return q?q.reduce((W,dt)=>(W.some(fn=>fn.id===dt.id)||W.push(dt),W),[]).map(W=>({value:W.id,text:`${W.firstName} ${W.lastName}`})):[]}getUnitSupervisor(q){if(!q.unitSupervisor)return null;const W=[...q.unitLeaders].find(dt=>dt.id===q.unitSupervisor.id);return W?`${W.firstName} ${W.lastName}`:null}setPermissions(){this.crudPermission=this.getCrudPermission(this.CRUDRoles,this.unit.organizationPath),this.contactsCrudPermission=this.getCrudPermission(this.CRUDContactRoles,this.unit.organizationPath),this.childminderPicCrudPermission=this.getCrudPermission(this.CRUDChildminderPicRoles,this.unit.organizationPath)}setCanEditVirtualUnit(){this.canEditVirtualUnit=(0,ut.isNil)(this.unit.virtual)}updateUnit(q){(0,ve.Z)(this.unit,q)||(this.unit.validUntil=this.unit.validUntil||null,this.validUntilChanged=q.validUntil!==this.lastSavedValidUntil,q.virtual&&(q.periods=[],q.abnormalPeriods=[]),this.unit={...this.unit,...q},this.updateUnitModel())}updateUnitModel(){this.updateUnitModelTimer||(this.updateUnitModelTimer=setTimeout(()=>{this.componentInitialized=!0,this.updateSavedUnit(),clearTimeout(this.updateUnitModelTimer)},2e3))}updateSavedUnit(){this.savedUnit={...this.unit}}canDismiss(){return(0,ve.Z)(this.savedUnit,this.unit)}onSaveOrganization(){const q=document.querySelector("ion-modal");if(this.checkForInvalidClass(q))return void Z.Utils.goToInvalid("ion-modal");const W=(0,ge.Z)(this.unit).periods||[],dt=(0,ge.Z)(this.unit).abnormalPeriods||[];let fn,Ei;this.crudPermission?(fn=this.getUnitToBeSaved(W,dt),Ei=this.organizationService.saveUnit(fn)):(fn=this.getUnitContactsAndChildminderPicToBeSaved(),Ei=this.organizationService.saveUnitContactsAndChildminderPic(fn)),this.validUntilChanged&&fn.id&&fn.validUntil?this.checkApplicationCount(Ei,fn):this.saveOrganization(Ei)}checkApplicationCount(q,W){this.contentLoader.showSavingLoader(),this.organizationService.findAllReceivedApplicationByOrganization(W.id).subscribe(dt=>{0!==dt?(this.showAlertWithReceivedApplications(dt),this.contentLoader.hideLoader()):this.saveOrganization(q)},dt=>{this.contentLoader.hideLoader(),console.error("UnitInfoComponent: checkApplicationCount error",dt),this.notify.alertFormSaveFailed()})}saveOrganization(q){this.contentLoader.showSavingLoader(),q.pipe((0,g.z)(W=>(this.lastSavedValidUntil=W.validUntil,this.contentLoader.hideLoader(),this.hasBeenUpdated=!0,this.unit=W,this.setCanEditVirtualUnit(),this.updateUnitSupervisorId(this.unit),this.shouldCloseModalForInactiveUnit(),this.appStateService.updateOrganization(),this.updateSavedUnit(),this.saveOrganizationImage(this.unit.id)))).subscribe({next:()=>{this.notify.toastSaveSuccess()},error:W=>{console.error("save failed",W),this.contentLoader.hideLoader();let dt=!1,fn=!1;try{W.error.fieldErrors.forEach(Ei=>{dt="overlappingPeriod"===Ei.fieldName&&"periods.overlap.exception"===Ei.message,fn="not.valid.language-extent.exception"===Ei.message})}catch{}dt?this.notify.createErrorAlert("Page.MunicipalitySettings.PeriodsAndPlannedUnits.DateOverlapError"):fn?this.notify.createErrorAlert("Message.Error.GeneralTitle","Page.MunicipalitySettings.PeriodsAndPlannedUnits.LanguageExtentError"):this.notify.alertBackendError(W)}})}shouldCloseModalForInactiveUnit(){this.inactiveUnit=!this.organizationCommonService.isActive(this.unit),this.inactiveUnit&&this.modalCtrl.dismiss(this.unit)}showAlertWithReceivedApplications(q){this.notify.createAlertWithValueToDisplay("Message.Warning.GeneralTitle","Organization.Unit.Info.ActiveApplicationsWhenChangingValidUntil",{numberOfApplication:q.toString()})}getUnitToBeSaved(q,W){const dt=fn=>fn.filter(Ei=>Ei.restEntityState!==Z.Constants.EXPIRED);return{...this.unit,periods:dt(q),abnormalPeriods:dt(W)}}getUnitContactsAndChildminderPicToBeSaved(){return Z.Utils.filterObjectKeys([this.unit],["id","address","postalAddress","phone","email","secondaryPhone","secondaryEmail","childminderPic"])[0]}getOrganizationImage(){var q=this;return(0,o.Z)(function*(){q.unitId?yield q.organizationService.getOrganizationPhoto(q.unitId).subscribe(W=>{W&&(q.organizationPictureFile=W)},W=>{console.error("getOrganizationPhoto failed ",W)}):q.organizationPictureFile=null})()}saveOrganizationImage(q){var W=this;return(0,o.Z)(function*(){if(!W.imageShouldBeSaved)return Promise.resolve();W.loading=!0,yield W.organizationService.saveOrganizationPhoto(q,W.organizationPictureFile).toPromise().then(()=>{W.loading=!1,W.imageShouldBeSaved=!1,W.unit.image=W.organizationPictureFile,Promise.resolve()}).catch(dt=>{W.loading=!1,Promise.reject(dt),console.error("Saving organization image failed",dt)})})()}deleteOrganizationImage(){this.loading=!0,this.organizationService.deleteOrganizationPhoto(this.unitId).subscribe(()=>{this.organizationPictureFile=null,this.imageShouldBeSaved=!1,this.loading=!1,this.notify.toastDeleteSuccess()},q=>{this.loading=!1,console.error("failed to delete organization image",q)})}onChangeOrganizationImage(q){q&&(this.organizationPictureFile=q,this.imageShouldBeSaved=!0)}onDismiss(){var q=this;return(0,o.Z)(function*(){!q.canDismiss()&&!(yield(yield q.notify.promptDiscardChanges()).onDidDismiss()).data||q.closeModal()})()}closeModal(){const q=(0,pe.Z)(this.unit,"id");this.modalCtrl.dismiss(this.hasBeenUpdated&&q?this.unit:null)}getCrudPermission(q,W){return W?this.auth.hasAnyOfRolesIn(q,W):(console.warn("The organization path has not been set."),!1)}onMissingInformation(q){q&&this.contentLoader.showError()}onChangeUnitSupervisor(q){const{unitSupervisorId:W}=q;this.unit.unitSupervisorId=W}updateOpeningHours(){this.timeOptions&&this.timeOptions.updateOpeningHours(this.unit.openingHours)}showEditUnitModal(){var q=this;return(0,o.Z)(function*(){const W={component:er,componentProps:{unitId:q.unitId,modal:!0,forceViewMode:!1},cssClass:"modal-full-size"};(yield q.openModal(W,Z.Constants.MODAL,Z.ModalNames.UNIT_EDITOR)).onDidDismiss().then(fn=>{fn.data&&(q.unit=null,q.getUnit(fn.data.id))})})()}reactivateUnit(){this.contentLoader.showSavingLoader(),this.organizationService.reactivateUnit(this.unit.id).pipe((0,D.q)(1)).subscribe(q=>{this.inactiveUnit=!this.organizationCommonService.isActive(q),this.unit={...q},this.updateSavedUnit(),this.notify.createToast("Message.Reactivate.Success"),this.contentLoader.hideLoader()},q=>{this.contentLoader.hideLoader(),console.error("UnitInfoComponent: reactivateUnit failed",q),this.notify.alertBackendError(q,"Message.Reactivate.Error")})}createUnit(){return{id:null,languages:["FI"],oid:null,serviceFormat:null,serviceForm:null,name:null,validFrom:"",validUntil:null,educationalSystem:null,organizationalForm:null,parent:{id:this.parentOrganization?this.parentOrganization.id:null,name:this.parentOrganization?this.parentOrganization.name:null},timeOptions:[],email:null,secondaryEmail:null,phone:null,secondaryPhone:null,address:{street:null,postalCode:null,city:null},postalAddress:{street:null,postalCode:null,city:null},abnormalPeriods:[],periods:[]}}restoreModal(){Z.Utils.getParamFromURL(Z.Constants.MODAL)===Z.ModalNames.UNIT_EDITOR&&!this.modal&&this.showEditUnitModal()}updateUnitSupervisorId(q){this.unit.unitSupervisorId=q.unitSupervisor?q.unitSupervisor.id:null}}er.\u0275fac=function(q){return new(q||er)(e.Y36(j.F0),e.Y36(j.gz),e.Y36(Z.OrganizationService),e.Y36(Z.SiviProjectsGatewayService),e.Y36(Z.NotifyService),e.Y36(Oe.sK),e.Y36(Z.SiviModalController),e.Y36(ke.Ye),e.Y36(Z.OrganizationCommonService))},er.\u0275cmp=e.Xpm({type:er,selectors:[["sivi-organizations-unit-info"]],viewQuery:function(q,W){if(1&q&&(e.Gf(Gn,7),e.Gf(xi,7),e.Gf(Cr,5)),2&q){let dt;e.iGM(dt=e.CRH())&&(W.form=dt.first),e.iGM(dt=e.CRH())&&(W.contentLoader=dt.first),e.iGM(dt=e.CRH())&&(W.timeOptions=dt.first)}},inputs:{unitId:"unitId",parentOrganization:"parentOrganization",modal:"modal",forceViewMode:"forceViewMode"},features:[e.qOj],decls:19,vars:24,consts:[[4,"ngIf"],["expectation","object",3,"skeleton"],["siviContent",""],["color","secondary",1,"ion-padding"],[1,"p2"],["form","ngForm"],["class","edit-unit-button","color","primary","fill","outline",3,"click",4,"ngIf"],[3,"uploadImageLabel","removeImageLabel","profileImage","loading","viewMode","removeImage","changeImage"],[1,"header-div"],["class","ion-no-padding",4,"ngIf"],[3,"hideNotifications","closeButton","closed"],["navbar-title",""],["navbar-buttons-right",""],[3,"clicked",4,"ngIf"],[3,"clicked"],["color","primary","fill","outline",1,"edit-unit-button",3,"click"],[1,"ion-no-padding"],[3,"unit","municipalityId","readonly","update"],[3,"unit","municipalityId","readonly","childminderPicCrudPermission","forceViewMode","canEditVirtualUnit","update"],[3,"municipalityId","unit","readonly","update"],["timeOptions",""],[3,"unit","crudPermission","readonly","modal","update",4,"ngIf"],[3,"unit","readonly","update","componentError"],["type","postal",3,"unit","readonly","update","componentError"],[3,"unit","crudPermission","readonly","modal","update"],["size-xs","12","size-md","4","size-xl","2"],[4,"ngIf","ngIfElse"],["assignUnitSupervisor",""],["type","text",3,"viewMode","value"],["name","unitSupervisorId",3,"value","options","placeholder","label","siviChange"],[4,"ngFor","ngForOf","ngForTrackBy"],[3,"person","profileLabel"]],template:function(q,W){1&q&&(e.YNc(0,en,8,8,"ion-header",0),e.TgZ(1,"ion-content")(2,"sivi-lib-content-loader",1,2)(4,"h2",3),e.YNc(5,Wn,4,7,"ng-container",0),e.qZA(),e.TgZ(6,"form",4,5)(8,"ion-row"),e.YNc(9,at,3,3,"ion-button",6),e.YNc(10,It,3,3,"ion-button",6),e.qZA(),e.TgZ(11,"sivi-lib-profile-image-picker",7),e.NdJ("removeImage",function(){return W.deleteOrganizationImage()})("changeImage",function(fn){return W.onChangeOrganizationImage(fn)}),e.ALo(12,"translate"),e.ALo(13,"translate"),e.qZA(),e.TgZ(14,"div",8)(15,"h2"),e._uU(16),e.ALo(17,"translate"),e.qZA()(),e.YNc(18,Ri,19,27,"ion-grid",9),e.qZA()()()),2&q&&(e.Q6J("ngIf",W.modal),e.xp6(2),e.Q6J("skeleton","form"),e.xp6(3),e.Q6J("ngIf",W.inactiveUnit&&W.unit),e.xp6(4),e.Q6J("ngIf",W.readonly&&(W.crudPermission||W.contactsCrudPermission)&&!W.inactiveUnit),e.xp6(1),e.Q6J("ngIf",W.readonly&&W.crudPermission&&W.inactiveUnit),e.xp6(1),e.Q6J("uploadImageLabel",e.xi3(12,12,"Message.Upload.Image",e.VKq(20,_r,W.translate.instant("Organization.Educational.Singular"))))("removeImageLabel",e.xi3(13,15,"Message.Delete.Image",e.VKq(22,_r,W.translate.instant("Organization.Educational.Singular"))))("profileImage",W.organizationPictureFile)("loading",W.loading)("viewMode",!W.crudPermission||W.readonly),e.xp6(5),e.Oqu(e.lcZ(17,18,"Organization.Educational.BasicInfo")),e.xp6(2),e.Q6J("ngIf",W.unit))},dependencies:[ke.sg,ke.O5,Be.YG,Be.wI,Be.W2,Be.jY,Be.Gu,Be.Nd,Z.ContentLoaderComponent,nt._Y,nt.JL,nt.F,Z.NavbarComponent,Z.NavbarActionButtonComponent,Z.ProfileImagePickerComponent,Le,Ii,Z.SelectComponent,Mn,ei,un,Ut,wn,ke.uU,Oe.X$],styles:[".header-div[_ngcontent-%COMP%]{display:flex}.header-div[_ngcontent-%COMP%]   sivi-lib-info-popup[_ngcontent-%COMP%]{margin-top:auto;margin-bottom:4px;margin-left:10px;font-size:20px}.header-div[_ngcontent-%COMP%]   h1[_ngcontent-%COMP%]{margin-bottom:0}ion-select[_ngcontent-%COMP%]{border-bottom:1px solid var(--ion-color-light-shade)}.select-label[_ngcontent-%COMP%]{padding-left:4px}.edit-unit-button[_ngcontent-%COMP%]{margin-left:auto}ion-col[_ngcontent-%COMP%]{padding:0}sivi-organizations-unit-staff-info[_ngcontent-%COMP%]{margin-bottom:1.5em;display:block}sivi-lib-select[_ngcontent-%COMP%]{display:block;margin:20px 0}"]});class Yr{}Yr.\u0275fac=function(q){return new(q||Yr)},Yr.\u0275mod=e.oAB({type:Yr}),Yr.\u0275inj=e.cJS({providers:[Z.CodeService,Z.OrganizationCommonService],imports:[Z.DirectivesModule,Z.SiviCoreComponentModule,Z.InfoPopupComponentModule,Z.CheckboxListComponentModule,Z.RadioListComponentModule,Z.DatepickerModule,vi]});class _o{}_o.\u0275fac=function(q){return new(q||_o)},_o.\u0275mod=e.oAB({type:_o}),_o.\u0275inj=e.cJS({providers:[Z.CodeService,Z.OrganizationService,Z.OrganizationCommonService],imports:[st,Z.DirectivesModule,Z.SiviCoreComponentModule,Z.InfoPopupComponentModule,Z.LanguageCheckboxModule,nt.u5,Z.SiviFormsModule,Z.SelectComponentModule,Z.DatepickerModule,Z.EmptyArrayMessageComponentModule,nt.UX,vi]});const Si=[{path:"",component:er}];class to{}to.\u0275fac=function(q){return new(q||to)},to.\u0275mod=e.oAB({type:to}),to.\u0275inj=e.cJS({providers:[Z.CodeService,Z.SiviModalController],imports:[vi,Z.DirectivesModule,Z.SiviCorePageModule,Z.ProfileImagePickerComponentModule,_o,nt.u5,Z.SiviFormsModule,Yr,Z.RadioListComponentModule,Z.InfoPopupComponentModule,Z.SelectComponentModule,Z.DatepickerModule,j.Bz.forChild(Si),Be.Pc,Oe.aw,Bn]});var Oa=Object.freeze({__proto__:null,UnitInfoModule:to});class Uo extends Z.SiviAbstractForm{set group(q){this.onSetGroup(q)}set readonly(q){this._readonly=q,this.setFormValidators()}get readonly(){return this._readonly}constructor(q,W,dt){super(q),this.translate=q,this.organizationCommonService=W,this.fb=dt,this.update=new e.vpe,this.totalPlaces=0,this.formGroup=this.fb.group({name:[""],parent:[null],validFrom:[""],validUntil:[""],ececPlaces:[""],ppePlaces:[""]}),this.nameErrorMessage={maxlength:this.translate.instant("Form.Error.MaxLengthIsChactersCount",{count:100})},this._readonly=!1}ngOnInit(){this.setFormValidators()}onSetGroup(q){const W=this.getValue(q),dt=this.formGroup.value;(0,ve.Z)(W,dt)||this.formGroup.patchValue(W)}onFormValueChange(q){this.totalPlaces=kn.calculateTotalPlaces(q.ececPlaces,q.ppePlaces),this.updateValues(q)}changeParentOrganization(q){this.updateValues({parent:q})}updateValues(q){this.update.emit(q)}getValue(q){const{name:W,parent:dt,validFrom:fn,validUntil:Ei,ececPlaces:Po,ppePlaces:En}=q;return{name:W,parent:dt,validFrom:fn,validUntil:Ei,ececPlaces:Po,ppePlaces:En}}setFormValidators(){this.setControlValidators("name",this.getNameValidators()),this.setControlValidators("parent",this.getParentValidators()),this.setControlValidators("validFrom",this.getValidFromValidators()),this.setControlValidators("validUntil",this.getValidUntilValidators()),this.setControlValidators("ececPlaces",this.getEcecPlacesValidators()),this.setControlValidators("ppePlaces",this.getPpePlacesValidators())}setControlValidators(q,W){const dt=this.readonly?[]:W;this.formGroup.get(q)?.setValidators(dt)}updateControlValidity(q){this.formGroup.get(q).updateValueAndValidity({onlySelf:!0})}getValidators(q){return this._readonly?[]:q}getNameValidators(){return this.getValidators([Z.SiviValidators.required,Z.SiviValidators.maxLength(100)])}getParentValidators(){return this.getValidators([Z.SiviValidators.required])}getValidFromValidators(){return this.getValidators([Z.SiviValidators.required,Z.SiviValidators.validateDate(),Z.SiviValidators.validateDateIsAfterThan("validUntil")])}getValidUntilValidators(){return this.getValidators([Z.SiviValidators.validateDate(),Z.SiviValidators.validateDateIsBeforeThan("validFrom")])}getEcecPlacesValidators(){return this.getValidators([Z.SiviValidators.required,Z.SiviValidators.pattern(Z.Patterns.ONLYNUMBERS)])}getPpePlacesValidators(){return this.getValidators([Z.SiviValidators.required,Z.SiviValidators.pattern(Z.Patterns.ONLYNUMBERS)])}}function rl(_t,q){if(1&_t){const W=e.EpF();e.TgZ(0,"ion-col",10),e._uU(1),e.ALo(2,"translate"),e.ALo(3,"translate"),e.TgZ(4,"mat-slide-toggle",11),e.NdJ("change",function(fn){e.CHM(W);const Ei=e.oxw(2);return e.KtG(Ei.onToggleChange(fn))}),e.qZA()()}if(2&_t){const W=e.oxw(2);e.xp6(1),e.hij(" ",W.isActive?e.lcZ(2,2,"General.Buttons.State.On"):e.lcZ(3,4,"General.Buttons.State.Off")," "),e.xp6(3),e.Q6J("checked",W.isActive)}}function Vs(_t,q){if(1&_t&&(e.TgZ(0,"ion-grid",1)(1,"ion-row"),e.YNc(2,rl,5,6,"ion-col",2),e.TgZ(3,"ion-col",3),e._UZ(4,"cgi-input",4),e.ALo(5,"translate"),e.ALo(6,"translate"),e.qZA()(),e.TgZ(7,"ion-row")(8,"ion-col",5),e._UZ(9,"cgi-input",6),e.ALo(10,"translate"),e.qZA(),e.TgZ(11,"ion-col",5),e._UZ(12,"cgi-input",7),e.ALo(13,"translate"),e.ALo(14,"translate"),e.qZA()(),e.TgZ(15,"ion-row")(16,"ion-col",5),e._UZ(17,"sivi-lib-datepicker",8),e.ALo(18,"translate"),e.qZA(),e.TgZ(19,"ion-col",5),e._UZ(20,"sivi-lib-datepicker",9),e.ALo(21,"translate"),e.qZA()()()),2&_t){const W=e.oxw();e.xp6(2),e.Q6J("ngIf",!W.readonly),e.xp6(1),e.uIk("size-sm",W.readonly?"6":"5")("pull-sm",W.readonly?"0":"2"),e.xp6(1),e.Q6J("value",W.focus.activity?e.lcZ(5,23,W.focus.activity):"-")("viewMode",!0)("label",e.lcZ(6,25,"General.Activity.Singular")),e.xp6(4),e.uIk("size-sm",W.readonly?"6":"5"),e.xp6(1),e.Q6J("value",W.getLanguage(W.focus.language))("viewMode",!0)("label",e.lcZ(10,27,"Organization.Educational.LanguageFocus.Singular")),e.xp6(2),e.uIk("size-sm",W.readonly?"6":"5"),e.xp6(1),e.Q6J("disabled",!W.focus.language)("value",W.focus.languageExtent?e.lcZ(13,29,W.focus.languageExtent):"-")("viewMode",!0)("label",e.lcZ(14,31,"General.Language.Extent.Singular")),e.xp6(4),e.uIk("size-sm",W.readonly?"6":"5"),e.xp6(1),e.Q6J("readonly",!0)("label",e.lcZ(18,33,"General.Text.ValidFrom"))("value",W.focus.validFrom),e.xp6(2),e.uIk("size-sm",W.readonly?"6":"5"),e.xp6(1),e.Q6J("readonly",!0)("label",e.lcZ(21,35,"General.Text.ValidTo"))("value",W.focus.validUntil)}}Uo.\u0275fac=function(q){return new(q||Uo)(e.Y36(Oe.sK),e.Y36(Z.OrganizationCommonService),e.Y36(nt.QS))},Uo.\u0275cmp=e.Xpm({type:Uo,selectors:[["sivi-organizations-group-basic-info"]],inputs:{group:"group",municipalityId:"municipalityId",readonly:"readonly"},outputs:{update:"update"},features:[e.qOj],decls:35,vars:43,consts:[["siviLibForm","",3,"formGroup"],[1,"header-div"],["siviGridCol","left"],["formControlName","name","siviLibFormControl","","type","text","label-position","floating",3,"label","errorMessages","viewMode"],["formControlName","parent","siviLibFormControl","","restrictToProperty","canAddChildOrganization",3,"municipalityId","organization","allowedTypes","disabled","changed"],["formControlName","validFrom","siviLibFormControl","",3,"readonly","label","update"],["siviGridCol","right"],["formControlName","validUntil","siviLibFormControl","",3,"readonly","label","readonlyValue","update"],["formControlName","ececPlaces","siviLibFormControl","","type","text","label-position","floating",3,"label","viewMode"],["formControlName","ppePlaces","siviLibFormControl","","type","text","label-position","floating",3,"label","viewMode"],["type","text","label-position","floating",3,"value","label","viewMode"]],template:function(q,W){1&q&&(e.TgZ(0,"div",0)(1,"ion-grid")(2,"ion-row")(3,"ion-col")(4,"div",1)(5,"h2"),e._uU(6),e.ALo(7,"translate"),e.qZA()()()(),e.TgZ(8,"ion-row")(9,"ion-col",2),e._UZ(10,"cgi-input",3),e.ALo(11,"translate"),e.ALo(12,"translate"),e.qZA()(),e.TgZ(13,"ion-row")(14,"ion-col",2)(15,"sivi-lib-organization-selector",4),e.NdJ("changed",function(fn){return W.changeParentOrganization(fn)}),e.qZA()()(),e.TgZ(16,"ion-row")(17,"ion-col",2)(18,"sivi-lib-datepicker",5),e.NdJ("update",function(){return W.updateControlValidity("validUntil")}),e.qZA()(),e.TgZ(19,"ion-col",6)(20,"sivi-lib-datepicker",7),e.NdJ("update",function(){return W.updateControlValidity("validFrom")}),e.qZA()()(),e.TgZ(21,"ion-row")(22,"ion-col",2),e._UZ(23,"cgi-input",8),e.ALo(24,"translate"),e.ALo(25,"translate"),e.qZA(),e.TgZ(26,"ion-col",6),e._UZ(27,"cgi-input",9),e.ALo(28,"translate"),e.ALo(29,"translate"),e.qZA()(),e.TgZ(30,"ion-row")(31,"ion-col",2),e._UZ(32,"cgi-input",10),e.ALo(33,"translate"),e.ALo(34,"translate"),e.qZA()()()()),2&q&&(e.Q6J("formGroup",W.formGroup),e.xp6(6),e.Oqu(e.lcZ(7,25,"Group.BasicInfo")),e.xp6(4),e.Q6J("label",e.lcZ(11,27,"Form.Label.Name"))("errorMessages",W.nameErrorMessage)("viewMode",W.readonly),e.uIk("aria-label",e.lcZ(12,29,"Form.Label.Name")),e.xp6(5),e.Q6J("municipalityId",W.municipalityId)("organization",W.formGroup.controls.parent.value)("allowedTypes",W.organizationCommonService.unitTypes)("disabled",W.readonly),e.xp6(3),e.Q6J("readonly",W.readonly)("label","General.Text.ValidFrom"),e.xp6(2),e.Q6J("readonly",W.readonly)("label","General.Text.ValidTo")("readonlyValue",W.formGroup.controls.validUntil.value?void 0:"-"),e.xp6(3),e.Q6J("label",e.lcZ(24,31,"Organization.Unit.PeriodsForPlacesAndFocuses.AmountOfECECPlaces"))("viewMode",W.readonly),e.uIk("aria-label",e.lcZ(25,33,"Organization.Unit.PeriodsForPlacesAndFocuses.AmountOfECECPlaces")),e.xp6(4),e.Q6J("label",e.lcZ(28,35,"Organization.Unit.PeriodsForPlacesAndFocuses.AmountOfPPEPlaces"))("viewMode",W.readonly),e.uIk("aria-label",e.lcZ(29,37,"Organization.Unit.PeriodsForPlacesAndFocuses.AmountOfPPEPlaces")),e.xp6(5),e.Q6J("value",W.totalPlaces)("label",e.lcZ(33,39,"Organization.Unit.PeriodsForPlacesAndFocuses.TotalAmountOfECECPlaces"))("viewMode",!0),e.uIk("aria-label",e.lcZ(34,41,"Organization.Unit.PeriodsForPlacesAndFocuses.TotalAmountOfECECPlaces")))},dependencies:[Be.wI,Be.jY,Be.Nd,nt.JJ,nt.JL,Z.GridColDirective,Z.DatepickerComponent,Z.SiviFormDirective,Z.SiviFormControlDirective,nt.sg,nt.u,Z.OrganizationSelectorComponent,Oe.X$],styles:[".header-div[_ngcontent-%COMP%]{display:flex}.header-div[_ngcontent-%COMP%]   sivi-lib-info-popup[_ngcontent-%COMP%]{margin-top:auto;margin-bottom:4px;margin-left:10px;font-size:20px}"]});class ps extends Z.AbstractValidator{constructor(q,W){super(q),this.translate=q,this.languageService=W,this.readonly=!1,this.isActive=!1,this.update=new e.vpe,this.language=""}onToggleChange(q){this.update.emit({id:this.focus.id,active:q.checked})}getLanguage(q){return this.languageService.getLanguagesText([q])||"-"}}ps.\u0275fac=function(q){return new(q||ps)(e.Y36(Oe.sK),e.Y36(Z.LanguageService))},ps.\u0275cmp=e.Xpm({type:ps,selectors:[["sivi-organizations-group-focus"]],inputs:{focus:"focus",municipalityId:"municipalityId",readonly:"readonly",isActive:"isActive"},outputs:{update:"update"},features:[e.qOj],decls:1,vars:1,consts:[["class","border-grid",4,"ngIf"],[1,"border-grid"],["class","text-right","size","4","size-sm","2","offset","8","offset-sm","0","push-sm","10",4,"ngIf"],["size","10","pull","0"],["name","activity","labelPosition","stacked",3,"value","viewMode","label"],["size","12"],["name","language","labelPosition","stacked",3,"value","viewMode","label"],["name","languageExtent","labelPosition","stacked",3,"disabled","value","viewMode","label"],["name","validFrom",3,"readonly","label","value"],["name","validUntil",3,"readonly","label","value"],["size","4","size-sm","2","offset","8","offset-sm","0","push-sm","10",1,"text-right"],[3,"checked","change"]],template:function(q,W){1&q&&e.YNc(0,Vs,22,37,"ion-grid",0),2&q&&e.Q6J("ngIf",W.focus)},dependencies:[Be.wI,Be.jY,Be.Nd,ke.O5,Z.DatepickerComponent,Ve.Rr,Oe.X$],styles:[".header-div[_ngcontent-%COMP%]{display:flex}.header-div[_ngcontent-%COMP%]   sivi-lib-info-popup[_ngcontent-%COMP%]{margin-top:auto;margin-bottom:4px;margin-left:10px;font-size:20px}"]});const ts=["siviContent"];function gs(_t,q){1&_t&&(e.TgZ(0,"ion-title"),e._uU(1),e.ALo(2,"translate"),e.qZA()),2&_t&&(e.xp6(1),e.Oqu(e.lcZ(2,1,"Group.Add")))}function tc(_t,q){1&_t&&(e.TgZ(0,"ion-title"),e._uU(1),e.ALo(2,"translate"),e.qZA()),2&_t&&(e.xp6(1),e.Oqu(e.lcZ(2,1,"Group.BasicInfo")))}function $a(_t,q){if(1&_t){const W=e.EpF();e.TgZ(0,"sivi-lib-navbar-action-button",9),e.NdJ("clicked",function(){e.CHM(W);const fn=e.oxw(2);return e.KtG(fn.saveGroup(fn.group))}),e.qZA()}}function ln(_t,q){if(1&_t){const W=e.EpF();e.TgZ(0,"ion-header")(1,"sivi-lib-navbar",5),e.NdJ("closed",function(){e.CHM(W);const fn=e.oxw();return e.KtG(fn.onDismiss())}),e.TgZ(2,"div",6),e.YNc(3,gs,3,3,"ion-title",0),e.YNc(4,tc,3,3,"ion-title",0),e.qZA(),e.TgZ(5,"div",7),e.YNc(6,$a,1,0,"sivi-lib-navbar-action-button",8),e.qZA()()()}if(2&_t){const W=e.oxw();e.xp6(1),e.Q6J("hideNotifications",!0)("closeButton",!0),e.xp6(2),e.Q6J("ngIf",W.isNew),e.xp6(1),e.Q6J("ngIf",!W.isNew),e.xp6(2),e.Q6J("ngIf",!W.readonly)}}function Mi(_t,q){if(1&_t&&(e.ynx(0),e._uU(1),e.ALo(2,"translate"),e.ALo(3,"date"),e.BQk()),2&_t){const W=e.oxw();e.xp6(1),e.AsE(" (",e.lcZ(2,2,"General.Status."+(null==W.group?null:W.group.restEntityState))," ",e.xi3(3,4,null==W.group?null:W.group.validUntil,W.dateFormats.FINNISH_ANGULAR),") ")}}function Di(_t,q){if(1&_t){const W=e.EpF();e.TgZ(0,"ion-button",19),e.NdJ("click",function(){e.CHM(W);const fn=e.oxw(2);return e.KtG(fn.showEditGroupModal())}),e._uU(1),e.ALo(2,"translate"),e.qZA()}2&_t&&(e.xp6(1),e.hij(" ",e.lcZ(2,1,"General.Buttons.Edit")," "))}function Er(_t,q){if(1&_t){const W=e.EpF();e.TgZ(0,"ion-button",19),e.NdJ("click",function(){e.CHM(W);const fn=e.oxw(2);return e.KtG(fn.reactivateGroup())}),e._uU(1),e.ALo(2,"translate"),e.qZA()}2&_t&&(e.xp6(1),e.hij(" ",e.lcZ(2,1,"General.Buttons.Reactivate")," "))}function ur(_t,q){1&_t&&e._UZ(0,"sivi-lib-info-popup",20),2&_t&&e.Q6J("text","Group.Focus.Info")}function gi(_t,q){1&_t&&(e.TgZ(0,"ion-row",14),e._uU(1),e.ALo(2,"translate"),e.qZA()),2&_t&&(e.xp6(1),e.hij(" ",e.lcZ(2,1,"Organization.Group.Focuses.NoFocusesForUnitAndPeriodSelected")," "))}function $t(_t,q){if(1&_t){const W=e.EpF();e.TgZ(0,"sivi-organizations-group-focus",23),e.NdJ("update",function(fn){e.CHM(W);const Ei=e.oxw(4);return e.KtG(Ei.updateFocus(fn))}),e.qZA()}if(2&_t){const W=e.oxw().$implicit,dt=e.oxw(3);e.Q6J("focus",W)("readonly",dt.readonly)("isActive",null==dt.group||null==dt.group.focuses?null:dt.group.focuses.includes(W.id))}}function Ma(_t,q){if(1&_t&&(e.TgZ(0,"div"),e.YNc(1,$t,1,3,"sivi-organizations-group-focus",22),e.qZA()),2&_t){const W=q.$implicit,dt=e.oxw(3);e.xp6(1),e.Q6J("ngIf",(null==dt.group||null==dt.group.focuses?null:dt.group.focuses.includes(W.id))||!dt.readonly)}}function Vo(_t,q){if(1&_t&&(e.ynx(0),e.YNc(1,Ma,2,1,"div",21),e.BQk()),2&_t){const W=e.oxw(2);e.xp6(1),e.Q6J("ngForOf",W.unitFocuses)("ngForTrackBy",W.trackByFn)}}function Ds(_t,q){if(1&_t&&(e.TgZ(0,"div"),e._UZ(1,"sivi-organizations-group-focus",29),e.qZA()),2&_t){const W=q.$implicit;e.xp6(1),e.Q6J("focus",W)("readonly",!0)}}function ja(_t,q){if(1&_t&&(e.ynx(0),e.YNc(1,Ds,2,2,"div",21),e.BQk()),2&_t){const W=e.oxw(3);e.xp6(1),e.Q6J("ngForOf",W.oldUnitFocuses)("ngForTrackBy",W.trackByFn)}}function wa(_t,q){if(1&_t){const W=e.EpF();e.TgZ(0,"div",24)(1,"cgi-accordion-item",25)(2,"h3",26),e._uU(3),e.ALo(4,"translate"),e.qZA(),e.TgZ(5,"div",27),e.YNc(6,ja,2,2,"ng-container",0),e.qZA(),e.TgZ(7,"cgi-toggle-accordion",28),e.NdJ("click",function(){e.CHM(W);const fn=e.oxw(2);return e.KtG(fn.toggleOldFocuses())}),e.ALo(8,"translate"),e.ALo(9,"translate"),e.qZA()()()}if(2&_t){const W=e.oxw(2);e.xp6(1),e.Q6J("open",W.showOldPeriods),e.xp6(2),e.hij(" ",e.lcZ(4,5,"Organization.Group.Focuses.OldFocuses")," "),e.xp6(3),e.Q6J("ngIf",W.group.focuses),e.xp6(1),e.Q6J("ariaLabel",W.showOldPeriods?e.lcZ(8,7,"General.Buttons.Close"):e.lcZ(9,9,"General.Buttons.Open"))("open",W.showOldPeriods)}}function ns(_t,q){if(1&_t){const W=e.EpF();e.TgZ(0,"form",3),e.YNc(1,Di,3,3,"ion-button",10),e.YNc(2,Er,3,3,"ion-button",10),e.TgZ(3,"sivi-lib-profile-image-picker",11),e.NdJ("removeImage",function(){e.CHM(W);const fn=e.oxw();return e.KtG(fn.deleteOrganizationImage())})("changeImage",function(fn){e.CHM(W);const Ei=e.oxw();return e.KtG(Ei.onChangeOrganizationImage(fn))}),e.qZA(),e.TgZ(4,"sivi-organizations-group-basic-info",12),e.NdJ("update",function(fn){e.CHM(W);const Ei=e.oxw();return e.KtG(Ei.updateGroup(fn))}),e.qZA(),e.TgZ(5,"div",13)(6,"div",14)(7,"h2"),e._uU(8),e.ALo(9,"translate"),e.YNc(10,ur,1,1,"sivi-lib-info-popup",15),e.qZA()(),e.YNc(11,gi,3,3,"ion-row",16),e.YNc(12,Vo,2,2,"ng-container",0),e.qZA(),e.YNc(13,wa,10,11,"div",17),e.TgZ(14,"sivi-organizations-group-contacts",18),e.NdJ("update",function(fn){e.CHM(W);const Ei=e.oxw();return e.KtG(Ei.updateGroup(fn))}),e.qZA()()}if(2&_t){const W=e.oxw();e.xp6(1),e.Q6J("ngIf",W.canEdit()),e.xp6(1),e.Q6J("ngIf",W.forceViewMode&&W.crudPermission&&W.inactiveGroup),e.xp6(1),e.Q6J("uploadImageLabel",W.uploadImageLabel)("viewMode",W.readonly)("removeImageLabel",W.removeImageLabel)("profileImage",W.organizationPictureFile)("loading",W.loading),e.xp6(1),e.Q6J("group",W.group)("readonly",W.readonly)("municipalityId",W.municipalityId),e.xp6(4),e.hij("",e.lcZ(9,17,"Organization.Focus.Plural")," "),e.xp6(2),e.Q6J("ngIf",!W.forceViewMode),e.xp6(1),e.Q6J("ngIf",0===(null==W.unitFocuses?null:W.unitFocuses.length)),e.xp6(1),e.Q6J("ngIf",W.group.focuses),e.xp6(1),e.Q6J("ngIf",(null==W.oldUnitFocuses?null:W.oldUnitFocuses.length)>0),e.xp6(1),e.Q6J("group",W.group)("readonly",W.readonly)}}class Cs extends Z.SiviPage{get group(){return this._group}set group(q){this.onSetGroup(q)}constructor(q,W,dt,fn,Ei,Po,En,ls,Au,kc){super(dt,fn,Ei,Po,kc,Au),this.siviProjectsGatewayService=q,this.organizationService=W,this.notify=dt,this.translate=fn,this.router=Ei,this.route=Po,this.unsavedChanges=En,this.organizationCommonService=ls,this.modalCtrl=Au,this.location=kc,this.modal=!1,this.forceViewMode=!0,this.CRUDRoles=[Z.Roles.MUNICIPALITY_ADMIN,Z.Roles.DCP_CHIEF],this.municipalityId=Z.Utils.getPathParamFromRouterSnapshot("municipalityId",this.router.routerState.snapshot.root),this.dateFormats=Z.DateFormats,this.loading=!1,this.isNew=!1,this.unitFocuses=[],this.oldUnitFocuses=[],this.inactiveGroup=!0,this.hasBeenUpdated=!1,this.showOldPeriods=!1,this.errorText="Message.Error.SomethingWentWrong",this.uploadImageLabel=this.translate.instant("Message.Upload.Image",{name:this.translate.instant("Group.Singular")}),this.removeImageLabel=this.translate.instant("Message.Delete.Image",{name:this.translate.instant("Group.Singular")}),this.updateFocuses$=new Pe.X([]),this.appStateService=this.siviProjectsGatewayService.getAppStateService(),this.authService=this.siviProjectsGatewayService.getAuthService(),this.imageSaved=!1}ngOnInit(){this.initComponent(),this.restoreModal(),this.handleUpdateUnitFocuses()}onSetGroup(q){(0,ve.Z)(this.group,q)||(this.shouldUpdateFocuses(q,this.group)&&this.updateFocuses$.next([q.validFrom,q.validUntil]),this._group=q)}initComponent(){this.readonly=!this.authService.hasAnyRole(this.CRUDRoles)||this.forceViewMode,this.crudPermission=this.authService.hasAnyRole(this.CRUDRoles),this.imageSaved=!0,this.educationGroupId===Z.Constants.NEW_ID?(this.isNew=!0,this.inactiveGroup=!1,this.group=this.createGroup(this.parentOrganization),this.watchForValueChanges([this.group])):(this.educationGroupId||(this.educationGroupId=Z.Utils.getPathParamFromRouterSnapshot("organizationId",this.router.routerState.snapshot.root)),this.getGroup(this.educationGroupId))}getGroup(q){this.organizationService.getGroup(q).pipe((0,g.z)(W=>(this.group=W,this.watchForValueChanges([this.group]),this.inactiveGroup=!this.organizationCommonService.isActive(this.group),this.getOrganizationImage()))).pipe((0,E.R)(this.destroy$)).subscribe(()=>{this.contentLoader.hideLoader()},W=>{console.error("getGroup: Error",W),403===W.status&&(this.errorText="Message.Error.AccessDenied"),this.contentLoader.showError()})}reactivateGroup(){this.contentLoader.showSavingLoader(),this.organizationService.reactivateGroup(this.group.id).pipe((0,D.q)(1)).subscribe(q=>{this.group=q,this.watchForValueChanges([this.group]),this.inactiveGroup=!this.organizationCommonService.isActive(this.group),this.notify.createToast("Message.Reactivate.Success"),this.contentLoader.hideLoader()},q=>{this.contentLoader.hideLoader(),console.error("getGroup: Error",q),this.notify.alertBackendError(q,"Message.Reactivate.Error")})}updateUnitFocuses(q,W){var dt=this;return(0,o.Z)(function*(){const fn=Po=>Po.restEntityState!==Z.Constants.EXPIRED;try{const Po=(0,pe.Z)(dt.group,"parent.id"),En=Po&&q?yield(Po=>dt.organizationService.getUnitFocuses(Po,q,W).toPromise())(Po):[];dt.unitFocuses=En.filter(fn),dt.oldUnitFocuses=En.filter(ls=>fn(ls)&&dt.group.focuses.includes(ls.id))}catch(Po){dt.notify.alertFailedToLoadData(),console.error("updateUnitFocuses: Error",Po)}})()}updateGroup(q){var W=this;return(0,o.Z)(function*(){W.group=Object.assign({},W.group,q),W.updateWatchedEntities([W.group])})()}handleUpdateUnitFocuses(){this.updateFocuses$.pipe((0,n.b)(100),(()=>(0,T.w)(([W,dt])=>this.updateUnitFocuses(W,dt)))(),(0,E.R)(this.destroy$)).subscribe()}shouldUpdateFocuses(q,W){const dt=fn=>(0,pe.Z)(q,fn)!==(0,pe.Z)(W,fn);return dt("validFrom")||dt("validUntil")||dt("parent.id")}updateFocus(q){let W=(0,ge.Z)(this.group.focuses);W=q.active?[...W,q.id]:W.filter(dt=>dt!==q.id),this.group={...this.group,focuses:W},this.updateWatchedEntities([this.group])}onDismiss(){this.unsavedChanges.canDeactivate(this).pipe((0,D.q)(1)).subscribe(q=>{q&&this.modalCtrl.dismiss(this.hasBeenUpdated&&this.group.id?this.group:null)})}saveGroup(q){const W=document.querySelector("ion-modal");this.checkForInvalidClass(W)?this.goToInvalid():(this.contentLoader.showSavingLoader(),this.organizationService.saveGroup(q).pipe((0,g.z)(dt=>(this.hasBeenUpdated=!0,this.group=dt,this.inactiveGroup=!this.organizationCommonService.isActive(dt),this.inactiveGroup&&this.modalCtrl.dismiss(this.group),this.watchForValueChanges([dt]),this.saveOrganizationImage(dt.id)))).subscribe(()=>{this.contentLoader.hideLoader(),this.imageSaved=!0,this.notify.toastSaveSuccess(),this.isNew=!1,this.appStateService.setOrganization(this.group)},dt=>{this.contentLoader.hideLoader(),console.error("saveGroup failed",dt),400===(0,pe.Z)(dt,"status")&&"name"===(0,pe.Z)(dt,"error.fieldErrors[0].fieldName")&&"alreadyExists"===(0,pe.Z)(dt,"error.fieldErrors[0].message")?this.notify.createErrorAlert("Form.Error.Duplicated.Name"):this.notify.alertFormSaveFailed()}))}showEditGroupModal(){var q=this;return(0,o.Z)(function*(){const W={component:Cs,componentProps:{groupId:q.educationGroupId,modal:!0,forceViewMode:!1},cssClass:"modal-full-size"};(yield q.openModal(W,Z.Constants.MODAL,Z.ModalNames.GROUP_EDITOR)).onDidDismiss().then(fn=>{fn.data&&q.getGroup(fn.data.id)})})()}getOrganizationImage(){var q=this;return(0,o.Z)(function*(){q.educationGroupId?yield q.organizationService.getOrganizationPhoto(q.educationGroupId).pipe((0,E.R)(q.destroy$)).subscribe(W=>{W&&(q.organizationPictureFile=W,q.imageSaved=!0)},W=>{console.error("getOrganizationPhoto failed ",W)}):q.organizationPictureFile=null})()}saveOrganizationImage(q){var W=this;return(0,o.Z)(function*(){W.imageSaved||(W.loading=!0,yield W.organizationService.saveOrganizationPhoto(q,W.organizationPictureFile).toPromise().then(()=>{W.loading=!1,W.imageSaved=!0}).catch(dt=>{W.loading=!1,console.error(dt)}))})()}deleteOrganizationImage(){if(!this.imageSaved)return this.organizationPictureFile=null,void(this.imageSaved=!0);this.loading=!0,this.organizationService.deleteOrganizationPhoto(this.educationGroupId).subscribe(()=>{this.organizationPictureFile=null,this.imageSaved=!0,this.loading=!1,this.notify.toastDeleteSuccess()},q=>{this.loading=!1,console.error(q)})}onChangeOrganizationImage(q){q&&(this.organizationPictureFile=q,this.imageSaved=!1)}canEdit(){return!(!this.forceViewMode||this.inactiveGroup)&&(!!this.authService.isMunicipalitySupportUser()||this.crudPermission&&this.group.canEdit)}restoreModal(){Z.Utils.getParamFromURL(Z.Constants.MODAL)===Z.ModalNames.GROUP_EDITOR&&!this.modal&&this.showEditGroupModal()}goToInvalid(){const W=document.querySelector("ion-modal").querySelector(".invalid");if(W){const dt=W.querySelector("input");this.scrollToView(dt,W)}}scrollToView(q,W){setTimeout(()=>{q&&(q.focus({preventScroll:!0}),q.blur(),q.focus({preventScroll:!0})),W.scrollIntoView({behavior:"smooth",block:"nearest",inline:"nearest"})},200)}toggleOldFocuses(){this.showOldPeriods=!this.showOldPeriods}createGroup(q){const W=(0,pe.Z)(q,"id"),dt=(0,pe.Z)(q,"name");return{name:"",parent:W&&dt?{id:W,name:dt}:null,validFrom:"",validUntil:"",ececPlaces:"",ppePlaces:"",focuses:[],phone:"",secondaryPhone:"",email:"",secondaryEmail:""}}}Cs.\u0275fac=function(q){return new(q||Cs)(e.Y36(Z.SiviProjectsGatewayService),e.Y36(Z.OrganizationService),e.Y36(Z.NotifyService),e.Y36(Oe.sK),e.Y36(j.F0),e.Y36(j.gz),e.Y36(Z.UnsavedChangesGuard),e.Y36(Z.OrganizationCommonService),e.Y36(Z.SiviModalController),e.Y36(ke.Ye))},Cs.\u0275cmp=e.Xpm({type:Cs,selectors:[["sivi-organizations-group-info"]],viewQuery:function(q,W){if(1&q&&e.Gf(ts,7),2&q){let dt;e.iGM(dt=e.CRH())&&(W.contentLoader=dt.first)}},inputs:{educationGroupId:"educationGroupId",parentOrganization:"parentOrganization",modal:"modal",forceViewMode:"forceViewMode"},features:[e.qOj],decls:8,vars:6,consts:[[4,"ngIf"],["expectation","object",3,"errorText","skeleton"],["siviContent",""],[1,"ion-padding"],["class","ion-padding",4,"ngIf"],[3,"hideNotifications","closeButton","closed"],["navbar-title",""],["navbar-buttons-right",""],[3,"clicked",4,"ngIf"],[3,"clicked"],["class","edit-group-button","color","primary","fill","outline",3,"click",4,"ngIf"],[3,"uploadImageLabel","viewMode","removeImageLabel","profileImage","loading","removeImage","changeImage"],[3,"group","readonly","municipalityId","update"],[1,"unit-focus"],[1,"header-div"],[3,"text",4,"ngIf"],["class","header-div",4,"ngIf"],["class","border-grid",4,"ngIf"],[3,"group","readonly","update"],["color","primary","fill","outline",1,"edit-group-button",3,"click"],[3,"text"],[4,"ngFor","ngForOf","ngForTrackBy"],[3,"focus","readonly","isActive","update",4,"ngIf"],[3,"focus","readonly","isActive","update"],[1,"border-grid"],[3,"open"],["slot","header",1,"weight-600","header"],["slot","content"],["slot","end",3,"ariaLabel","open","click"],[3,"focus","readonly"]],template:function(q,W){1&q&&(e.YNc(0,ln,7,5,"ion-header",0),e.TgZ(1,"ion-content")(2,"sivi-lib-content-loader",1,2)(4,"h2",3),e._uU(5),e.YNc(6,Mi,4,7,"ng-container",0),e.qZA(),e.YNc(7,ns,15,19,"form",4),e.qZA()()),2&q&&(e.Q6J("ngIf",W.modal),e.xp6(2),e.Q6J("errorText",W.errorText)("skeleton","form"),e.xp6(3),e.hij(" ",null==W.group?null:W.group.name," "),e.xp6(1),e.Q6J("ngIf",W.inactiveGroup&&W.group),e.xp6(1),e.Q6J("ngIf",W.group))},dependencies:[Z.InfoPopupComponent,Be.YG,Be.W2,Be.Gu,Be.Nd,Be.wd,ke.sg,ke.O5,nt._Y,nt.JL,nt.F,Z.ContentLoaderComponent,Z.NavbarComponent,Z.NavbarActionButtonComponent,Z.ProfileImagePickerComponent,nn,Uo,ps,ke.uU,Oe.X$],styles:[".periods-grid[_ngcontent-%COMP%]{border:1px solid var(--ion-color-primary);max-height:560px}@media screen and (min-width: 840px){.periods-grid[_ngcontent-%COMP%]{max-height:420px}}.periods-grid[scrolly=true][_ngcontent-%COMP%]{overflow-y:auto}.edit-group-button[_ngcontent-%COMP%]{float:right}.unit-focus[_ngcontent-%COMP%]{padding-left:.6em}"]});const $r=[{path:"",component:Cs,canDeactivate:[Z.UnsavedChangesGuard]}];class Ts{}Ts.\u0275fac=function(q){return new(q||Ts)},Ts.\u0275mod=e.oAB({type:Ts}),Ts.\u0275inj=e.cJS({providers:[Z.SiviModalController],imports:[st,Z.SiviCorePageModule,nt.u5,Z.ProfileImagePickerComponentModule,Z.InfoPopupComponentModule,Z.DirectivesModule,Z.DatepickerModule,Z.SelectComponentModule,Ve.rP,j.Bz.forChild($r),Z.SiviFormsModule,Z.OrganizationSelectorModule,vi]});var Gl=Object.freeze({__proto__:null,GroupInfoModule:Ts});function ol(_t,q){1&_t&&(e.TgZ(0,"th",10),e._uU(1),e.ALo(2,"translate"),e.qZA()),2&_t&&(e.xp6(1),e.Oqu(e.lcZ(2,1,"Form.Label.Name")))}function zc(_t,q){if(1&_t&&(e.TgZ(0,"td",11),e._uU(1),e.qZA()),2&_t){const W=q.$implicit;e.xp6(1),e.hij(" ",W.name," ")}}function al(_t,q){1&_t&&e._UZ(0,"tr",12)}function Jn(_t,q){if(1&_t){const W=e.EpF();e.TgZ(0,"tr",13),e.NdJ("click",function(){const Ei=e.CHM(W).$implicit,Po=e.oxw();return e.KtG(Po.navigateToGroup(Ei))}),e.qZA()}}const tn=function(_t){return{display:_t}};class ti extends Z.SiviComponent{constructor(q,W,dt,fn){super(),this.translate=q,this.notifyService=W,this.organizationService=dt,this.router=fn,this.displayedColumns=["name"],this.dataSource=new Z.DataTableSource,this.pageSizeOptions=Z.Constants.PAGINATOR_PAGE_SIZES,this.municipalityId=Z.Utils.getPathParamFromRouterSnapshot("municipalityId",this.router.routerState.snapshot.root),this.organizationId=Z.Utils.getPathParamFromRouterSnapshot("organizationId",this.router.routerState.snapshot.root)}ngAfterViewInit(){this.getGroups(),this.paginator.page.pipe((0,E.R)(this.destroy$),(0,P.b)(()=>this.getGroups())).subscribe()}getGroups(){const q=this.organizationService.getDaycarePlaceGroups(this.paginator.pageIndex,this.paginator.pageSize,this.organizationId);this.dataSource.source(q)}navigateToGroup(q){this.router.navigateByUrl("municipalities/"+this.municipalityId+"/organizations/"+q.id+"/info/group")}}ti.\u0275fac=function(q){return new(q||ti)(e.Y36(Oe.sK),e.Y36(Z.NotifyService),e.Y36(Z.OrganizationService),e.Y36(j.F0))},ti.\u0275cmp=e.Xpm({type:ti,selectors:[["sivi-organizations-organization-groups-list"]],viewQuery:function(q,W){if(1&q&&e.Gf(tt.NW,7),2&q){let dt;e.iGM(dt=e.CRH())&&(W.paginator=dt.first)}},features:[e.qOj],decls:15,vars:16,consts:[[1,"p3"],[3,"text"],[3,"state"],["mat-table","",1,"mat-elevation-z8",3,"dataSource","ngStyle"],["matColumnDef","name"],["mat-header-cell","",4,"matHeaderCellDef"],["class","pointer","mat-cell","",4,"matCellDef"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",3,"click",4,"matRowDef","matRowDefColumns"],[3,"length","pageSize","pageSizeOptions"],["mat-header-cell",""],["mat-cell","",1,"pointer"],["mat-header-row",""],["mat-row","",3,"click"]],template:function(q,W){1&q&&(e.TgZ(0,"ion-content")(1,"div",0)(2,"h1"),e._uU(3),e.ALo(4,"translate"),e._UZ(5,"sivi-lib-info-popup",1),e.qZA(),e._UZ(6,"sivi-lib-data-table-source-state",2),e.ALo(7,"async"),e.TgZ(8,"table",3),e.ynx(9,4),e.YNc(10,ol,3,3,"th",5),e.YNc(11,zc,2,1,"td",6),e.BQk(),e.YNc(12,al,1,0,"tr",7),e.YNc(13,Jn,1,0,"tr",8),e.qZA(),e._UZ(14,"mat-paginator",9),e.qZA()()),2&q&&(e.xp6(3),e.hij("",e.lcZ(4,10,"Group.Plural")," "),e.xp6(2),e.Q6J("text","Organization.Groups.Info"),e.xp6(1),e.Q6J("state",e.lcZ(7,12,W.dataSource.getState())),e.xp6(2),e.Q6J("dataSource",W.dataSource)("ngStyle",e.VKq(14,tn,W.dataSource.hasContent()?"table":"none")),e.xp6(4),e.Q6J("matHeaderRowDef",W.displayedColumns),e.xp6(1),e.Q6J("matRowDefColumns",W.displayedColumns),e.xp6(1),e.Q6J("length",100)("pageSize",100)("pageSizeOptions",W.pageSizeOptions))},dependencies:[Ne.BZ,Ne.fO,Ne.as,Ne.w1,Ne.Dz,Ne.nj,Ne.ge,Ne.ev,Ne.XQ,Ne.Gk,tt.NW,Z.DataTableSourceStateComponent,Z.InfoPopupComponent,Be.W2,ke.PC,ke.Ov,Oe.X$],styles:["table[_ngcontent-%COMP%]{width:100%}"]});const _i=[{path:"",component:ti}];class ar{}function vr(_t,q){1&_t&&e._UZ(0,"sivi-lib-info-popup",8),2&_t&&e.Q6J("text","Organization.OID.Info")}function Qr(_t,q){if(1&_t&&(e._UZ(0,"cgi-input",12),e.ALo(1,"translate"),e.ALo(2,"translate")),2&_t){const W=e.oxw(2);e.Q6J("value",W.basicInfo.municipalityNumber)("viewMode",!0)("label",e.lcZ(2,6,"Form.Label.MunicipalityCode")),e.uIk("aria-label",e.lcZ(1,4,"Form.Label.MunicipalityCode"))}}function Li(_t,q){if(1&_t){const W=e.EpF();e.TgZ(0,"cgi-autocomplete",13),e.NdJ("siviChange",function(fn){e.CHM(W);const Ei=e.oxw(2);return e.KtG(Ei.onSelectMunicipalityCode(fn))}),e.ALo(1,"translate"),e.ALo(2,"translate"),e.qZA()}if(2&_t){const W=e.oxw(2);e.Q6J("multiSelect",!1)("listenEvents",!1)("placeholderImage","location_city")("options",W.municipalityList)("placeholder",e.lcZ(1,6,"Form.Label.MunicipalityCode"))("noItemsText",e.lcZ(2,8,"Message.NoMunicipalityFound"))}}function Ta(_t,q){if(1&_t&&(e.TgZ(0,"ion-col",9),e.YNc(1,Qr,3,8,"cgi-input",10),e.YNc(2,Li,3,10,"ng-template",null,11,e.W1O),e.qZA()),2&_t){const W=e.MAs(3),dt=e.oxw();e.xp6(1),e.Q6J("ngIf",dt.shouldShowMunicipalityNumber())("ngIfElse",W)}}ar.\u0275fac=function(q){return new(q||ar)},ar.\u0275mod=e.oAB({type:ar}),ar.\u0275inj=e.cJS({imports:[Ne.p0,Z.SiviLibMatPaginatorModule,wt.JX,Z.DataTableSourceStateModule,Z.SiviCoreComponentModule,j.Bz.forChild(_i),Z.InfoPopupComponentModule,vi]});class La extends Z.SiviAbstractForm{set viewMode(q){this._viewMode=q,this.setValidators(q)}get viewMode(){return this._viewMode}constructor(q,W){super(),this.fb=q,this.translate=W,this.municipalityList=[],this.update=new e.vpe,this.componentStatus=new e.vpe,this._viewMode=!1,this.form=this.fb.group({name:[""],businessId:[""],municipalityNumber:[""],oid:[""]})}ngOnInit(){this.initFormValues()}getSelectedCode(){const q=this.municipalityList[0].value,W=this.basicInfo.municipalityNumber,dt=[];if(W){const fn=this.municipalityList.find(Po=>Po.value.code===W),Ei=fn?fn.value:q;dt.push(Ei)}else dt.push(q);return dt}onSelectMunicipalityCode(q){this.form.get("municipalityNumber").patchValue([q.detail.value])}initFormValues(){const{name:q,businessId:W,oid:dt}=this.basicInfo,fn={name:q,businessId:W,municipalityNumber:this.getSelectedCode(),oid:dt};this.form.patchValue(fn)}setValidators(q){const W=q?[]:[Z.SiviValidators.required],dt=this.shouldShowMunicipalityNumber()?[]:[Z.SiviValidators.required];this.form.get("businessId").setValidators(W),this.form.get("municipalityNumber").setValidators(dt)}onFormValueChange(q){try{const{name:W,businessId:dt,municipalityNumber:fn,oid:Ei}=q,En={name:W,businessId:dt,oid:Ei,municipalityNumber:fn[0].code};this.update.emit(En)}catch(W){console.error("onFormValueChange failed: ",W)}}onFormStatusChange(q){this.componentStatus.emit(q)}shouldShowMunicipalityNumber(){return this.viewMode||!(!this.municipalityId||this.municipalityId===Z.Constants.NEW_ID)}}La.\u0275fac=function(q){return new(q||La)(e.Y36(nt.QS),e.Y36(Oe.sK))},La.\u0275cmp=e.Xpm({type:La,selectors:[["sivi-organizations-municipality-basic-info"]],inputs:{municipalityId:"municipalityId",basicInfo:"basicInfo",municipalityList:"municipalityList",viewMode:"viewMode"},outputs:{update:"update",componentStatus:"componentStatus"},features:[e.qOj],decls:26,vars:28,consts:[["siviLibForm","",3,"formGroup"],["size","12","size-md","6"],["formControlName","name","siviLibFormControl","","type","text","label-position","floating",3,"label","viewMode"],["formControlName","businessId","siviLibFormControl","","type","text","label-position","floating",3,"label","viewMode"],[1,"component-with-info-popup"],["formControlName","oid","siviLibFormControl","","type","text","label-position","floating",1,"component",3,"label","viewMode"],[3,"text",4,"ngIf"],["size","12","size-md","6","class","ion-margin-top",4,"ngIf"],[3,"text"],["size","12","size-md","6",1,"ion-margin-top"],["type","text","label-position","floating",3,"value","viewMode","label",4,"ngIf","ngIfElse"],["municipalityCode",""],["type","text","label-position","floating",3,"value","viewMode","label"],["formControlName","municipalityNumber","siviLibFormControl","","placeholder-image","domain",3,"multiSelect","listenEvents","placeholderImage","options","placeholder","noItemsText","siviChange"]],template:function(q,W){1&q&&(e.TgZ(0,"form",0)(1,"ion-grid")(2,"ion-row")(3,"ion-col")(4,"h2"),e._uU(5),e.ALo(6,"translate"),e.qZA()()(),e.TgZ(7,"ion-row")(8,"ion-col",1),e._UZ(9,"cgi-input",2),e.ALo(10,"translate"),e.ALo(11,"translate"),e.qZA()(),e.TgZ(12,"ion-row")(13,"ion-col",1),e._UZ(14,"cgi-input",3),e.ALo(15,"translate"),e.ALo(16,"translate"),e.qZA()(),e.TgZ(17,"ion-row")(18,"ion-col",1)(19,"p",4),e._UZ(20,"cgi-input",5),e.ALo(21,"translate"),e.ALo(22,"translate"),e.YNc(23,vr,1,1,"sivi-lib-info-popup",6),e.qZA()()(),e.TgZ(24,"ion-row"),e.YNc(25,Ta,4,2,"ion-col",7),e.qZA()()()),2&q&&(e.Q6J("formGroup",W.form),e.xp6(5),e.Oqu(e.lcZ(6,14,"Municipality.BasicInfo")),e.xp6(4),e.Q6J("label",e.lcZ(11,18,"Form.Label.Name"))("viewMode",!0),e.uIk("aria-label",e.lcZ(10,16,"Form.Label.Name")),e.xp6(5),e.Q6J("label",e.lcZ(16,22,"Form.Label.BusinessId"))("viewMode",W.viewMode),e.uIk("aria-label",e.lcZ(15,20,"Form.Label.BusinessId")),e.xp6(6),e.Q6J("label",e.lcZ(22,26,"Form.Label.OrganizationOID"))("viewMode",W.viewMode),e.uIk("aria-label",e.lcZ(21,24,"Form.Label.OrganizationOID"))("disabled",!W.basicInfo.oid),e.xp6(3),e.Q6J("ngIf",!W.viewMode),e.xp6(2),e.Q6J("ngIf",W.municipalityList))},dependencies:[Z.InfoPopupComponent,Be.wI,Be.jY,Be.Nd,ke.O5,nt._Y,nt.JJ,nt.JL,Z.SiviFormDirective,Z.SiviFormControlDirective,nt.sg,nt.u,Oe.X$],styles:[".component-with-info-popup[_ngcontent-%COMP%]{display:flex;margin-top:0;margin-bottom:0}.component-with-info-popup[_ngcontent-%COMP%]   .component[_ngcontent-%COMP%]{width:100%}.component-with-info-popup[_ngcontent-%COMP%]   sivi-lib-info-popup[_ngcontent-%COMP%]{margin:25px auto auto;font-size:26px}"]});class Ps extends Z.AbstractValidator{constructor(q){super(q),this.translate=q,this.viewMode=!1,this.update=new e.vpe,this.componentStatus=new e.vpe}ngOnInit(){this.validatorOptions=this.getValidatorOptions()}onValidatorStatusChange(q){super.onValidatorStatusChange(q),this.componentStatus.emit(this.isValid),this.update.emit(this.contact)}onValidatorValuesChange(q){super.onValidatorValuesChange(q),this.contact={...this.contact,...q.detail}}getValidatorOptions(){if(this.viewMode)return[];const q=[Z.SiviValidators.required,Z.SiviValidators.validateEmail(),Z.SiviValidators.maxLength(Z.MaxLength.DEFAULT)],W=[Z.SiviValidators.required],dt=[Z.SiviValidators.required,Z.SiviValidators.validatePhoneNumber(),Z.SiviValidators.maxLength(Z.MaxLength.PHONE)];return[this.createValidatorOption("email",this.contact.email,q,{},Z.MaxLength.DEFAULT),this.createValidatorOption("accessibilityContactEmail",this.contact.accessibilityContactEmail,q,{},Z.MaxLength.DEFAULT),this.createValidatorOption("accountNumber",this.contact.accountNumber,W),this.createValidatorOption("phone",this.contact.phone,dt,{},Z.MaxLength.PHONE)]}}Ps.\u0275fac=function(q){return new(q||Ps)(e.Y36(Oe.sK))},Ps.\u0275cmp=e.Xpm({type:Ps,selectors:[["sivi-organizations-municipality-contacts"]],inputs:{contact:"contact",viewMode:"viewMode"},outputs:{update:"update",componentStatus:"componentStatus"},features:[e.qOj],decls:19,vars:21,consts:[[3,"validatorOptions"],["validator",""],[1,"ion-margin-top"],["size","12","size-md","6"],["name","email","type","text","label-position","floating",3,"label","value","viewMode"],["name","accountNumber","type","text","label-position","floating",3,"label","value","viewMode"],["name","accessibilityContactEmail","type","text","label-position","floating",3,"label","value","viewMode"],["name","phone","type","text","label-position","floating",3,"label","value","viewMode"]],template:function(q,W){1&q&&(e.TgZ(0,"cgi-validator",0,1)(2,"ion-grid",2)(3,"ion-row")(4,"ion-col",3),e._UZ(5,"cgi-input",4),e.ALo(6,"translate"),e.qZA()(),e.TgZ(7,"ion-row")(8,"ion-col",3),e._UZ(9,"cgi-input",5),e.ALo(10,"translate"),e.qZA()(),e.TgZ(11,"ion-row")(12,"ion-col",3),e._UZ(13,"cgi-input",6),e.ALo(14,"translate"),e.qZA()(),e.TgZ(15,"ion-row")(16,"ion-col",3),e._UZ(17,"cgi-input",7),e.ALo(18,"translate"),e.qZA()()()()),2&q&&(e.Q6J("validatorOptions",W.validatorOptions),e.xp6(5),e.Q6J("label",e.lcZ(6,13,"Form.Label.ECECEmail"))("value",null==W.contact?null:W.contact.email)("viewMode",W.viewMode),e.xp6(4),e.Q6J("label",e.lcZ(10,15,"Form.Label.ECECAccountNumber"))("value",null==W.contact?null:W.contact.accountNumber)("viewMode",W.viewMode),e.xp6(4),e.Q6J("label",e.lcZ(14,17,"Form.Label.MunicipalityAccessibilityContactEmail"))("value",null==W.contact?null:W.contact.accessibilityContactEmail)("viewMode",W.viewMode),e.xp6(4),e.Q6J("label",e.lcZ(18,19,"Form.Label.Phone"))("value",null==W.contact?null:W.contact.phone)("viewMode",W.viewMode))},dependencies:[Be.wI,Be.jY,Be.Nd,Oe.X$],encapsulation:2});class is extends Z.AbstractValidator{constructor(q){super(q),this.translate=q,this.viewMode=!1,this.update=new e.vpe,this.componentStatus=new e.vpe}ngOnInit(){this.validatorOptions=this.getValidatorOptions()}onValidatorStatusChange(q){super.onValidatorStatusChange(q),this.componentStatus.emit(this.isValid),this.update.emit(this.address)}onValidatorValuesChange(q){super.onValidatorValuesChange(q),this.address={...this.address,...q.detail}}getValidatorOptions(){if(this.viewMode)return[];const q=[Z.SiviValidators.required],W=[Z.SiviValidators.required,Z.SiviValidators.validatePostalCode()];return[this.createValidatorOption("address",this.address.address,q),this.createValidatorOption("city",this.address.city,q),this.createValidatorOption("postCode",this.address.postCode,W,{},Z.MaxLength.POSTALCODE),this.createValidatorOption("postalAddress",this.address.postalAddress,q),this.createValidatorOption("postOffice",this.address.postOffice,q),this.createValidatorOption("postalPostCode",this.address.postalPostCode,W,{},Z.MaxLength.POSTALCODE)]}}is.\u0275fac=function(q){return new(q||is)(e.Y36(Oe.sK))},is.\u0275cmp=e.Xpm({type:is,selectors:[["sivi-organizations-municipality-addresses"]],inputs:{address:"address",viewMode:"viewMode"},outputs:{update:"update",componentStatus:"componentStatus"},features:[e.qOj],decls:34,vars:49,consts:[[3,"validatorOptions"],["validator",""],[1,"ion-margin-top"],["size","12","size-md","6"],["name","address","autocomplete","no","type","text","label-position","floating",3,"label","value","viewMode"],["name","city","autocomplete","no","type","text","label-position","floating",3,"label","value","viewMode"],["name","postCode","autocomplete","no","type","text","label-position","floating",3,"label","value","viewMode"],["name","postalAddress","autocomplete","no","type","text","label-position","floating",3,"label","value","viewMode"],["name","postOffice","autocomplete","no","type","text","label-position","floating",3,"label","value","viewMode"],["name","postalPostCode","autocomplete","no","type","text","label-position","floating",3,"label","value","viewMode"]],template:function(q,W){1&q&&(e.TgZ(0,"cgi-validator",0,1)(2,"ion-grid",2)(3,"ion-row")(4,"ion-col",3),e._UZ(5,"cgi-input",4),e.ALo(6,"translate"),e.ALo(7,"translate"),e.qZA()(),e.TgZ(8,"ion-row")(9,"ion-col",3),e._UZ(10,"cgi-input",5),e.ALo(11,"translate"),e.ALo(12,"translate"),e.qZA()(),e.TgZ(13,"ion-row")(14,"ion-col",3),e._UZ(15,"cgi-input",6),e.ALo(16,"translate"),e.ALo(17,"translate"),e.qZA()()(),e.TgZ(18,"ion-grid",2)(19,"ion-row")(20,"ion-col",3),e._UZ(21,"cgi-input",7),e.ALo(22,"translate"),e.ALo(23,"translate"),e.qZA()(),e.TgZ(24,"ion-row")(25,"ion-col",3),e._UZ(26,"cgi-input",8),e.ALo(27,"translate"),e.ALo(28,"translate"),e.qZA()(),e.TgZ(29,"ion-row")(30,"ion-col",3),e._UZ(31,"cgi-input",9),e.ALo(32,"translate"),e.ALo(33,"translate"),e.qZA()()()()),2&q&&(e.Q6J("validatorOptions",W.validatorOptions),e.xp6(5),e.Q6J("label",e.lcZ(7,27,"Form.Label.Address"))("value",null==W.address?null:W.address.address)("viewMode",W.viewMode),e.uIk("aria-label",e.lcZ(6,25,"Form.Label.Address")),e.xp6(5),e.Q6J("label",e.lcZ(12,31,"Form.Label.City"))("value",null==W.address?null:W.address.city)("viewMode",W.viewMode),e.uIk("aria-label",e.lcZ(11,29,"Form.Label.City")),e.xp6(5),e.Q6J("label",e.lcZ(17,35,"Form.Label.PostalCode"))("value",null==W.address?null:W.address.postCode)("viewMode",W.viewMode),e.uIk("aria-label",e.lcZ(16,33,"Form.Label.PostCode")),e.xp6(6),e.Q6J("label",e.lcZ(23,39,"Form.Label.PostalAddress"))("value",null==W.address?null:W.address.postalAddress)("viewMode",W.viewMode),e.uIk("aria-label",e.lcZ(22,37,"Form.Label.PostalAddress")),e.xp6(5),e.Q6J("label",e.lcZ(28,43,"Form.Label.PostOffice"))("value",null==W.address?null:W.address.postOffice)("viewMode",W.viewMode),e.uIk("aria-label",e.lcZ(27,41,"Form.Label.PostOffice")),e.xp6(5),e.Q6J("label",e.lcZ(33,47,"Form.Label.PostalCode"))("value",null==W.address?null:W.address.postalPostCode)("viewMode",W.viewMode),e.uIk("aria-label",e.lcZ(32,45,"Form.Label.PostalCode")))},dependencies:[Be.wI,Be.jY,Be.Nd,Oe.X$],encapsulation:2});class yt{set resourceId(q){q!==this.logoResourceId&&(this.logoResourceId=q,this.getLogo()),this.logoResourceId=q}constructor(q,W,dt){this.organizationService=q,this.notify=W,this.translate=dt,this.update=new e.vpe,this.isSaved=!0,this.loading=!1,this.LOGO_PLACEHOLDER="/assets/img/organization_add.svg",this.uploadLogoLabel=this.notify.translate.instant("Message.Upload.Logo",{name:this.translate.instant("Municipality.Logo")}),this.removeLogoLabel=this.notify.translate.instant("Message.Delete.Logo",{name:this.translate.instant("Municipality.Logo")})}getLogo(){this.municipalityId&&this.logoResourceId?this.organizationService.getMunicipalityLogo(this.municipalityId).subscribe(q=>{console.log("received logo",q),q&&(this.logoFile=q)},q=>{console.error("get municipality logo failed ",q)}):this.logoFile=null}saveLogo(q){this.isSaved||(this.municipalityId=q,this.loading=!0,this.organizationService.saveOrganizationLogo(q,this.logoFile).pipe((0,D.q)(1)).subscribe(()=>{this.loading=!1,this.isSaved=!0,this.notify.toastSaveSuccess()},W=>{this.loading=!1,console.error("save municipality logo failed ",W)}))}removeLogo(){this.isSaved?(this.loading=!0,this.organizationService.deleteOrganizationLogo(this.municipalityId,this.logoResourceId).subscribe(()=>{this.onAfterDeleteLogo(),this.loading=!1},q=>{this.loading=!1,this.notify.alertDeleteError(),console.error("delete municipality logo failed ",q)})):this.onAfterDeleteLogo()}onChangeLogo(q){q&&(this.logoFile=q,this.isSaved=!1,this.update.emit(this.isSaved))}onAfterDeleteLogo(){this.logoFile=null,this.isSaved=!0,this.notify.toastDeleteSuccess(),this.update.emit(this.isSaved)}}yt.\u0275fac=function(q){return new(q||yt)(e.Y36(Z.OrganizationService),e.Y36(Z.NotifyService),e.Y36(Oe.sK))},yt.\u0275cmp=e.Xpm({type:yt,selectors:[["sivi-organizations-municipality-logo"]],inputs:{municipalityId:"municipalityId",resourceId:"resourceId",viewMode:"viewMode"},outputs:{update:"update"},decls:10,vars:13,consts:[[3,"uploadImageLabel","removeImageLabel","profileImage","text","loading","viewMode","placeholder","shaped","removeImage","changeImage"]],template:function(q,W){1&q&&(e.TgZ(0,"ion-grid")(1,"ion-row")(2,"ion-col")(3,"h2"),e._uU(4),e.ALo(5,"translate"),e.qZA()()(),e.TgZ(6,"ion-row")(7,"ion-col")(8,"sivi-lib-profile-image-picker",0),e.NdJ("removeImage",function(){return W.removeLogo()})("changeImage",function(fn){return W.onChangeLogo(fn)}),e.ALo(9,"translate"),e.qZA()()()()),2&q&&(e.xp6(4),e.Oqu(e.lcZ(5,9,"Municipality.Logo")),e.xp6(4),e.Q6J("uploadImageLabel",W.uploadLogoLabel)("removeImageLabel",W.removeLogoLabel)("profileImage",W.logoFile)("text",e.lcZ(9,11,W.viewMode?"":"General.Text.Attachment.RecommendationForPrinting"))("loading",W.loading)("viewMode",W.viewMode)("placeholder",W.LOGO_PLACEHOLDER)("shaped",!1))},dependencies:[Be.wI,Be.jY,Be.Nd,Z.ProfileImagePickerComponent,Oe.X$],encapsulation:2});const Dt=["siviContent"],We=["form"],Rt=["logo"];function Qn(_t,q){1&_t&&(e.TgZ(0,"ion-title"),e._uU(1),e.ALo(2,"translate"),e.qZA()),2&_t&&(e.xp6(1),e.Oqu(e.lcZ(2,1,"Municipality.Add")))}function fi(_t,q){1&_t&&(e.TgZ(0,"ion-title"),e._uU(1),e.ALo(2,"translate"),e.qZA()),2&_t&&(e.xp6(1),e.Oqu(e.lcZ(2,1,"Municipality.BasicInfo")))}function Xi(_t,q){if(1&_t){const W=e.EpF();e.TgZ(0,"sivi-lib-navbar-action-button",9),e.NdJ("clicked",function(){e.CHM(W);const fn=e.oxw(2);return e.KtG(fn.saveMunicipality())}),e.qZA()}if(2&_t){const W=e.oxw(2);e.Q6J("disabled",W.canSave())}}function wr(_t,q){if(1&_t){const W=e.EpF();e.TgZ(0,"ion-header")(1,"sivi-lib-navbar",5),e.NdJ("closed",function(){e.CHM(W);const fn=e.oxw();return e.KtG(fn.onDismiss())}),e.TgZ(2,"div",6),e.YNc(3,Qn,3,3,"ion-title",0),e.YNc(4,fi,3,3,"ion-title",0),e.qZA(),e.TgZ(5,"div",7),e.YNc(6,Xi,1,1,"sivi-lib-navbar-action-button",8),e.qZA()()()}if(2&_t){const W=e.oxw();e.xp6(1),e.Q6J("hideNotifications",!0)("closeButton",!0)("closeButtonDisabled",W.loading||(null==W.logo?null:W.logo.loading)||!1),e.xp6(2),e.Q6J("ngIf",W.isNew),e.xp6(1),e.Q6J("ngIf",!W.isNew),e.xp6(2),e.Q6J("ngIf",!W.viewMode)}}function Mo(_t,q){if(1&_t&&(e.ynx(0),e._uU(1),e.ALo(2,"translate"),e.ALo(3,"date"),e.BQk()),2&_t){const W=e.oxw();e.xp6(1),e.AsE(" (",e.lcZ(2,2,"General.Status."+(null==W.municipality?null:W.municipality.restEntityState))," ",e.xi3(3,4,null==W.municipality?null:W.municipality.validUntil,W.dateFormats.FINNISH_ANGULAR),") ")}}function ro(_t,q){if(1&_t){const W=e.EpF();e.TgZ(0,"ion-button",19),e.NdJ("click",function(){e.CHM(W);const fn=e.oxw(2);return e.KtG(fn.showEditMunicipalityModal())}),e._uU(1),e.ALo(2,"translate"),e.qZA()}2&_t&&(e.xp6(1),e.hij(" ",e.lcZ(2,1,"General.Buttons.Edit")," "))}function qr(_t,q){if(1&_t){const W=e.EpF();e.TgZ(0,"form",10,11),e.YNc(2,ro,3,3,"ion-button",12),e.TgZ(3,"sivi-lib-profile-image-picker",13),e.NdJ("removeImage",function(){e.CHM(W);const fn=e.oxw();return e.KtG(fn.removeOrganizationImage())})("changeImage",function(fn){e.CHM(W);const Ei=e.oxw();return e.KtG(Ei.onChangeOrganizationImage(fn))}),e.qZA(),e.TgZ(4,"sivi-organizations-municipality-basic-info",14),e.NdJ("update",function(fn){e.CHM(W);const Ei=e.oxw();return e.KtG(Ei.onUpdateBasicInfo(fn))})("componentStatus",function(fn){e.CHM(W);const Ei=e.oxw();return e.KtG(Ei.onComponentStatusChange(fn,"basicInfo"))}),e.qZA(),e.TgZ(5,"sivi-organizations-municipality-contacts",15),e.NdJ("update",function(fn){e.CHM(W);const Ei=e.oxw();return e.KtG(Ei.onUpdateContact(fn))})("componentStatus",function(fn){e.CHM(W);const Ei=e.oxw();return e.KtG(Ei.onComponentStatusChange(fn,"contact"))}),e.qZA(),e.TgZ(6,"sivi-organizations-municipality-addresses",16),e.NdJ("update",function(fn){e.CHM(W);const Ei=e.oxw();return e.KtG(Ei.onUpdateAddress(fn))})("componentStatus",function(fn){e.CHM(W);const Ei=e.oxw();return e.KtG(Ei.onComponentStatusChange(fn,"address"))}),e.qZA(),e.TgZ(7,"sivi-organizations-municipality-logo",17,18),e.NdJ("update",function(fn){e.CHM(W);const Ei=e.oxw();return e.KtG(Ei.onUpdateLogo(fn))}),e.qZA()()}if(2&_t){const W=e.oxw();e.xp6(2),e.Q6J("ngIf",W.forceViewMode&&W.canEditMunicipality),e.xp6(1),e.Q6J("uploadImageLabel",W.uploadImageLabel)("removeImageLabel",W.removeImageLabel)("profileImage",W.organizationPictureFile)("loading",W.loading)("viewMode",W.viewMode),e.xp6(1),e.Q6J("municipalityId",W.municipalityId)("basicInfo",W.basicInfo)("municipalityList",W.municipalityList)("viewMode",W.viewMode),e.xp6(1),e.Q6J("contact",W.contactData)("viewMode",W.viewMode),e.xp6(1),e.Q6J("address",W.addressData)("viewMode",W.viewMode),e.xp6(1),e.Q6J("municipalityId",W.municipality.id)("resourceId",W.municipalityLogoId)("viewMode",W.viewMode)}}class ho extends Z.SiviPage{constructor(q,W,dt,fn,Ei,Po,En,ls,Au,kc,cs,wu){super(W,dt,Ei,q,kc,fn),this.route=q,this.notify=W,this.translate=dt,this.modalCtrl=fn,this.router=Ei,this.organizationService=Po,this.unsavedChanges=En,this.fileService=ls,this.organizationCommonService=Au,this.location=kc,this.siviProjectsGatewayService=cs,this.languageService=wu,this.modal=!1,this.forceViewMode=!0,this.auth=this.siviProjectsGatewayService.getAuthService(),this.appStateService=this.siviProjectsGatewayService.getAppStateService(),this.patterns=Z.Patterns,this.uploadImageLabel=this.translate.instant("Message.Upload.Image",{name:this.translate.instant("Municipality.Singular")}),this.removeImageLabel=this.translate.instant("Message.Delete.Image",{name:this.translate.instant("Municipality.Singular")}),this.loading=!1,this.isNew=!1,this.municipalityList=[],this.componentsStatus={basicInfo:!1,contact:!1,address:!1},this.isInactiveMunicipality=!0,this.dateFormats=Z.DateFormats,this.hasBeenUpdated=!1,this.canEditMunicipality=this.auth.hasAnyRole([Z.Roles.MUNICIPALITY_ADMIN])}ngOnInit(){this.contentLoader.showLoader(),this.viewMode=!this.canEditMunicipality||this.forceViewMode,this.initValues(),this.getMunicipalityCodes(),this.municipalityId===Z.Constants.NEW_ID?(this.isNew=!0,this.isInactiveMunicipality=!1,this.municipality=new Z.Municipality,this.watchForValueChanges(this.getEntities()),this.contentLoader.hideLoader()):(this.municipalityId||(this.municipalityId=Z.Utils.getPathParamFromRouterSnapshot("municipalityId",this.router.routerState.snapshot.root)),this.getMunicipality(this.municipalityId),this.getOrganizationImage()),this.restoreModal()}initValues(){this.imageSaved=!0,this.logoSaved=!0,this.municipalityLogoId="",this.basicInfo={name:"",businessId:"",oid:"",municipalityNumber:""},this.contactData={email:"",accountNumber:"",phone:"",accessibilityContactEmail:""},this.addressData={address:"",city:"",postCode:"",postalAddress:"",postOffice:"",postalPostCode:""}}getMunicipalityCodes(){this.languageService.getUserLanguage().pipe((0,l.U)(q=>q?.language),(0,g.z)(q=>this.organizationService.getMunicipalityCodeList(q)),(0,D.q)(1)).subscribe(q=>{!q||!q.length||(this.municipalityList=this.getAutocompleteOptions(q),this.basicInfo={...this.basicInfo,municipalityNumber:this.municipalityList[0].value.code},this.watchForValueChanges(this.getEntities()))},q=>{console.error("getMunicipalityCodes failed",q),this.notify.alertFailedToLoadData()})}getAutocompleteOptions(q){return q.map(W=>({element:{text:`${W.code} ${W.name}`,image:""},value:W}))}onComponentStatusChange(q,W){this.componentsStatus[W]=q}onUpdateBasicInfo(q){this.basicInfo={...this.basicInfo,...q},this.updateEntities()}onUpdateContact(q){this.contactData={...this.contactData,...q},this.updateEntities()}onUpdateAddress(q){this.addressData={...this.addressData,...q},this.updateEntities()}onUpdateLogo(q){this.logoSaved=q,this.updateEntities()}updateEntities(){this.updateWatchedEntities(this.getEntities())}getEntities(){return[this.imageSaved,this.basicInfo,this.contactData,this.addressData,this.logoSaved]}getMunicipality(q){this.organizationService.getMunicipality(q).pipe((0,D.q)(1)).subscribe(W=>{this.isInactiveMunicipality=!this.organizationCommonService.isActive(W),this.municipality=W,this.prepareFormValues((0,ge.Z)(W))},W=>{console.error("getMunicipality failed",W),this.contentLoader.showError()})}prepareFormValues(q){const W=q.organizationAddresses,dt=q.organizationContacts;Object.keys(q).forEach(fn=>{fn in this.basicInfo&&(this.basicInfo[fn]=q[fn])}),this.addressData=this.getAddressData(W),this.contactData=this.getContactData(dt,q),this.municipalityLogoId=q.resources?q.resources[0].id:null,this.watchForValueChanges(this.getEntities()),this.contentLoader.hideLoader()}getAddressData(q){let W=(0,ge.Z)(this.addressData);if(!q)return W;const dt=this.findAddress(q,Z.ContactTypes.ADDRESS_TYPE);if(dt){const Ei=dt.address;W={...W,address:Ei.street,city:Ei.city,postCode:Ei.postalCode}}const fn=this.findAddress(q,Z.ContactTypes.ADDRESS_POSTAL_TYPE);if(fn){const Ei=fn.address;W={...W,postalAddress:Ei.street,postOffice:Ei.city,postalPostCode:Ei.postalCode}}return W}getContactData(q,W){const dt=(0,ge.Z)(this.contactData);if(!q)return dt;const fn=this.organizationCommonService.findContact(q,Z.ContactTypes.EMAIL_ECEC_TYPE),Ei=this.organizationCommonService.findContact(q,Z.ContactTypes.PHONE_ECEC_TYPE),Po=this.organizationCommonService.findContact(q,Z.ContactTypes.MUNICIPALITY_ACCESSIBILITY_EMAIL);return dt.email=fn?fn.contact.value:"",dt.phone=Ei?Ei.contact.value:"",dt.accessibilityContactEmail=Po?Po.contact.value:"",dt.accountNumber=W.ececIbanNumber,dt}findAddress(q,W){if(!(q.length<0))return q.find(dt=>dt.address.addressTypeCode===W)}canSave(){const q=(0,ve.Z)(this.originalEntities,this.currentEntities);return!(Z.Utils.checkObjectValidity(this.componentsStatus)&&!q)}saveMunicipality(){this.contentLoader.showSavingLoader();const q=this.createFormPayload(this.municipality);this.organizationService.saveMunicipality(q).pipe((0,D.q)(1)).subscribe(W=>{this.hasBeenUpdated=!0,this.logoSaved&&this.notify.toastSaveSuccess(),this.contentLoader.hideLoader(),this.municipality=W,this.municipalityId=W.id,this.watchForValueChanges(this.getEntities()),this.saveOrganizationImage(W.id),this.logo.saveLogo(W.id),this.isNew&&this.modalCtrl.dismiss(W),this.appStateService.setMunicipality(this.municipality)},W=>{console.error("saveMunicipality failed",W),this.notify.alertFormSaveFailed(),this.contentLoader.hideLoader()})}createFormPayload(q){const W={street:this.addressData.address,city:this.addressData.city,postalCode:this.addressData.postCode},dt={street:this.addressData.postalAddress,city:this.addressData.postOffice,postalCode:this.addressData.postalPostCode};return{id:this.isNew?null:q.id,name:this.basicInfo.name,businessId:this.basicInfo.businessId,municipalityNumber:this.basicInfo.municipalityNumber,ececIbanNumber:this.contactData.accountNumber,organizationType:Z.OrganizationTypes.MUNICIPALITY,organizationPath:this.isNew?null:q.organizationPath,oid:this.basicInfo.oid?this.basicInfo.oid:null,organizationAddresses:[this.getAddress(q.organizationAddresses,Z.ContactTypes.ADDRESS_TYPE,W),this.getAddress(q.organizationAddresses,Z.ContactTypes.ADDRESS_POSTAL_TYPE,dt)],organizationContacts:[this.getContact(q.organizationContacts,Z.ContactTypes.EMAIL_ECEC_TYPE,this.contactData.email),this.getContact(q.organizationContacts,Z.ContactTypes.PHONE_ECEC_TYPE,this.contactData.phone),this.getContact(q.organizationContacts,Z.ContactTypes.MUNICIPALITY_ACCESSIBILITY_EMAIL,this.contactData.accessibilityContactEmail)]}}getAddress(q,W,dt){let fn=q?this.findAddress(q,W):null;return fn||(fn=Gi.createOrganizationAddress(this.municipality.id)),fn.address={...fn.address,addressTypeCode:W,street:dt.street,postalCode:dt.postalCode,city:dt.city},fn}getContact(q,W,dt){let fn=q?this.organizationCommonService.findContact(q,W):null;return fn||(fn=Gi.createOrganizationContact(this.municipality.id)),fn.contact={...fn.contact,contactTypeCode:W,value:dt,contactTypeDescription:W},fn}onDismiss(){this.unsavedChanges.canDeactivate(this).pipe((0,D.q)(1)).subscribe(q=>{q&&this.modalCtrl.dismiss(this.hasBeenUpdated&&this.municipality.id?this.municipality:null)})}getOrganizationImage(){this.municipalityId?this.organizationService.getOrganizationPhoto(this.municipalityId).subscribe(q=>{q&&(this.organizationPictureFile=q)},q=>{console.error("get municipality photo failed ",q)}):this.organizationPictureFile=null}saveOrganizationImage(q){this.imageSaved||(this.loading=!0,this.organizationService.saveOrganizationPhoto(q,this.organizationPictureFile).pipe((0,D.q)(1)).subscribe(()=>{this.loading=!1,this.imageSaved=!0},W=>{this.loading=!1,console.error("save municipality photo failed ",W)}))}removeOrganizationImage(){this.imageSaved?(this.loading=!0,this.organizationService.deleteOrganizationPhoto(this.municipalityId).subscribe(()=>{this.onAfterDeleteImage(),this.loading=!1},q=>{this.loading=!1,this.notify.alertDeleteError(),console.error("delete municipality photo failed ",q)})):this.onAfterDeleteImage()}onChangeOrganizationImage(q){q&&(this.organizationPictureFile=q,this.imageSaved=!1,this.updateEntities())}showEditMunicipalityModal(){var q=this;return(0,o.Z)(function*(){q.modalCtrl.updateQueryParam(Z.Constants.MODAL,Z.ModalNames.MUNICIPALITY_EDITOR);const W=yield q.modalCtrl.create({component:ho,componentProps:{municipalityId:q.municipalityId,modal:!0,forceViewMode:!1},backdropDismiss:!1,cssClass:"modal-full-size"});return W.onDidDismiss().then(()=>{q.modalCtrl.removeQueryParam(Z.Constants.MODAL),q.getMunicipality(q.municipalityId),q.getOrganizationImage()}),yield W.present(),W})()}restoreModal(){Z.Utils.getParamFromURL(Z.Constants.MODAL)===Z.ModalNames.MUNICIPALITY_EDITOR&&!this.modal&&this.showEditMunicipalityModal()}onAfterDeleteImage(){this.organizationPictureFile=null,this.imageSaved=!0,this.notify.toastDeleteSuccess(),this.updateEntities()}}ho.\u0275fac=function(q){return new(q||ho)(e.Y36(j.gz),e.Y36(Z.NotifyService),e.Y36(Oe.sK),e.Y36(Z.SiviModalController),e.Y36(j.F0),e.Y36(Z.OrganizationService),e.Y36(Z.UnsavedChangesGuard),e.Y36(Z.FileService),e.Y36(Z.OrganizationCommonService),e.Y36(ke.Ye),e.Y36(Z.SiviProjectsGatewayService),e.Y36(Z.LanguageService))},ho.\u0275cmp=e.Xpm({type:ho,selectors:[["sivi-organizations-municipality-info"]],viewQuery:function(q,W){if(1&q&&(e.Gf(Dt,7),e.Gf(We,5),e.Gf(Rt,5)),2&q){let dt;e.iGM(dt=e.CRH())&&(W.contentLoader=dt.first),e.iGM(dt=e.CRH())&&(W.form=dt.first),e.iGM(dt=e.CRH())&&(W.logo=dt.first)}},inputs:{municipalityId:"municipalityId",modal:"modal",forceViewMode:"forceViewMode"},features:[e._Bn([Z.FileService]),e.qOj],decls:9,vars:4,consts:[[4,"ngIf"],["skeleton","form","expectation","object"],["siviContent",""],[1,"ph2"],["class","p2",4,"ngIf"],[3,"hideNotifications","closeButton","closeButtonDisabled","closed"],["navbar-title",""],["navbar-buttons-right",""],[3,"disabled","clicked",4,"ngIf"],[3,"disabled","clicked"],[1,"p2"],["form","ngForm"],["class","edit-municipality-button","color","primary","fill","outline",3,"click",4,"ngIf"],[3,"uploadImageLabel","removeImageLabel","profileImage","loading","viewMode","removeImage","changeImage"],[3,"municipalityId","basicInfo","municipalityList","viewMode","update","componentStatus"],[3,"contact","viewMode","update","componentStatus"],[3,"address","viewMode","update","componentStatus"],[3,"municipalityId","resourceId","viewMode","update"],["logo",""],["color","primary","fill","outline",1,"edit-municipality-button",3,"click"]],template:function(q,W){1&q&&(e.YNc(0,wr,7,6,"ion-header",0),e.TgZ(1,"ion-content")(2,"sivi-lib-content-loader",1,2)(4,"header",3)(5,"h1"),e._uU(6),e.qZA(),e.YNc(7,Mo,4,7,"ng-container",0),e.qZA(),e.YNc(8,qr,9,17,"form",4),e.qZA()()),2&q&&(e.Q6J("ngIf",W.modal),e.xp6(6),e.hij(" ",null==W.basicInfo?null:W.basicInfo.name," "),e.xp6(1),e.Q6J("ngIf",W.isInactiveMunicipality&&W.municipality),e.xp6(1),e.Q6J("ngIf",W.municipality&&W.municipalityList.length))},dependencies:[Be.YG,Be.W2,Be.Gu,Be.wd,ke.O5,nt._Y,nt.JL,nt.F,Z.ContentLoaderComponent,Z.NavbarComponent,Z.NavbarActionButtonComponent,Z.ProfileImagePickerComponent,La,Ps,is,yt,ke.uU,Oe.X$],styles:[".edit-municipality-button[_ngcontent-%COMP%]{float:right}"]});const xa=[{path:"",component:ho,canDeactivate:[Z.UnsavedChangesGuard]}];class To{}To.\u0275fac=function(q){return new(q||To)},To.\u0275mod=e.oAB({type:To}),To.\u0275inj=e.cJS({providers:[Z.SiviModalController],imports:[Z.SiviCorePageModule,Z.SiviFormsModule,Z.ProfileImagePickerComponentModule,Z.InfoPopupComponentModule,j.Bz.forChild(xa),vi]});var Ao=Object.freeze({__proto__:null,MunicipalityInfoModule:To});const Ha=["contentLoader"];function Ho(_t,q){if(1&_t){const W=e.EpF();e.TgZ(0,"cgi-profile-image",4),e.NdJ("siviClick",function(){const Ei=e.CHM(W).$implicit,Po=e.oxw();return e.KtG(Po.onNavigateToChildLevel(Ei))}),e.ALo(1,"async"),e.ALo(2,"async"),e.qZA()}if(2&_t){const W=q.$implicit,dt=e.oxw();e.s9C("name",W.nickName||W.firstName),e.s9C("text",W.lastName),e.Q6J("imgUrl",e.lcZ(1,3,dt.getChildImageUrl(W))?e.lcZ(2,5,dt.getChildImageUrl(W)):"")}}class Ra extends Z.SiviPage{set children(q){this.children$.next(q)}constructor(q,W,dt,fn,Ei){super(q,W,dt),this.notify=q,this.translate=W,this.router=dt,this.siviProjectsGatewayService=fn,this.personService=Ei,this.selectChild=new e.vpe,this.children$=new Pe.X([]),this.childImages$=new Pe.X([]),this.auth=this.siviProjectsGatewayService.getAuthService()}ngOnInit(){this.fetchChildImages()}shouldSeePicture(){return this.auth.hasAnyRole([...Z.Roles.ECEC_PROFESSIONALS,Z.Roles.GUARDIAN,Z.Roles.SERVICE_ADVISER])}fetchChildImages(){this.shouldSeePicture()&&this.getChildrenImages().subscribe(q=>{this.childImages$.next(q)})}getChildrenImages(){return this.children$.pipe((0,T.w)(q=>q?(0,re.D)(q).pipe((0,g.z)(W=>this.personService.getPersonMainPhoto(W.id)),(0,w.R)((W,dt)=>[...W,dt],[])):oe.E))}getChildImageUrl(q){return this.getChildImage(q).pipe((0,l.U)(W=>W.contentBase64))}getChildImage(q){return this.childImages$.pipe((0,T.w)(W=>(0,re.D)(W)),(0,B.h)(W=>W.relatedEntityId===q.id))}onNavigateToChildLevel(q){this.selectChild.emit(q)}}Ra.\u0275fac=function(q){return new(q||Ra)(e.Y36(Z.NotifyService),e.Y36(Oe.sK),e.Y36(j.F0),e.Y36(Z.SiviProjectsGatewayService),e.Y36(Z.PersonService))},Ra.\u0275cmp=e.Xpm({type:Ra,selectors:[["sivi-organizations-children-list"]],viewQuery:function(q,W){if(1&q&&e.Gf(Ha,7),2&q){let dt;e.iGM(dt=e.CRH())&&(W.contentLoader=dt.first)}},inputs:{children:"children"},outputs:{selectChild:"selectChild"},features:[e.qOj],decls:5,vars:4,consts:[["noContentTitle","Message.Error.Group.NoChildren.Title","noContentText","Message.Error.Group.NoChildren.LongExplanation","noContentIcon","child_care"],["contentLoader",""],[1,"grid"],["class","pointer flex flex-direction-column flex-justify-content-space-between","tabindex","0","siviKeyboardEvents","","role","link","item-type","person",3,"name","text","imgUrl","siviClick",4,"ngFor","ngForOf","ngForTrackBy"],["tabindex","0","siviKeyboardEvents","","role","link","item-type","person",1,"pointer","flex","flex-direction-column","flex-justify-content-space-between",3,"name","text","imgUrl","siviClick"]],template:function(q,W){1&q&&(e.TgZ(0,"sivi-lib-content-loader",0,1)(2,"section",2),e.YNc(3,Ho,3,7,"cgi-profile-image",3),e.ALo(4,"async"),e.qZA()()),2&q&&(e.xp6(3),e.Q6J("ngForOf",e.lcZ(4,2,W.children$))("ngForTrackBy",W.trackByFn))},dependencies:[Z.KeyboardEventsDirective,ke.sg,Z.ContentLoaderComponent,ke.Ov],styles:[".grid[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(auto-fill,minmax(16rem,1fr))}"],data:{animation:[Z.listAnimations]}});class ba{}ba.\u0275fac=function(q){return new(q||ba)},ba.\u0275mod=e.oAB({type:ba}),ba.\u0275inj=e.cJS({providers:[Z.PersonService],imports:[Z.DirectivesModule,Z.SiviCoreComponentModule,st,vi]});class Jt extends Z.SiviComponent{constructor(){super()}}Jt.\u0275fac=function(q){return new(q||Jt)},Jt.\u0275cmp=e.Xpm({type:Jt,selectors:[["sivi-organizations-organization-info"]],features:[e.qOj],decls:2,vars:0,template:function(q,W){1&q&&(e.TgZ(0,"ion-content"),e._UZ(1,"ion-router-outlet"),e.qZA())},dependencies:[Be.W2,Be.jP]});const De=[{path:"",component:Jt},{path:Z.OrganizationTypes.MUNICIPALITY_SHORT,loadChildren:()=>Promise.resolve().then(function(){return Ao}).then(_t=>_t.MunicipalityInfoModule)},{path:Z.OrganizationTypes.ORGANIZATION_GENERAL_SHORT,loadChildren:()=>Promise.resolve().then(function(){return sp}).then(_t=>_t.OrganizationGeneralInfoModule)},{path:Z.OrganizationTypes.DAYCAREPLACE_SHORT,loadChildren:()=>Promise.resolve().then(function(){return Oa}).then(_t=>_t.UnitInfoModule)},{path:Z.OrganizationTypes.DAYCAREPLACE_GROUP_SHORT,loadChildren:()=>Promise.resolve().then(function(){return Gl}).then(_t=>_t.GroupInfoModule)}];class bt{}bt.\u0275fac=function(q){return new(q||bt)},bt.\u0275mod=e.oAB({type:bt}),bt.\u0275inj=e.cJS({imports:[Z.SiviCoreComponentModule,j.Bz.forChild(De),vi]});class Xt{constructor(q,W){this.modalCtrl=q,this.siviProjectsGatewayService=W,this.auth=this.siviProjectsGatewayService.getAuthService()}ngOnInit(){this.createOrganizationTypesForSelection()}createOrganizationTypesForSelection(){let q=[];this.canAddMunicipality()&&q.push({text:"Municipality.Singular",value:Z.OrganizationTypes.MUNICIPALITY}),this.canAddGeneralOrganizationsAndUnits()&&(q=q.concat([{text:"Organization.General.Singular",value:Z.OrganizationTypes.ORGANIZATION_TYPE_GENERAL},{text:"Organization.Area.Singular",value:Z.OrganizationTypes.ORGANIZATION_TYPE_AREA},{text:"Organization.Educational.Singular",value:Z.OrganizationTypes.DAYCAREPLACE}])),this.canAddGroups()&&q.push({text:"sivi.organization.type.Group.regular",value:Z.OrganizationTypes.DAYCAREPLACE_GROUP}),this.options=q,this.options[0]&&(this.selectedOptionValue=this.options[0].value)}changeSelection(q){this.selectedOptionValue=q.detail.value}onDismiss(q){this.modalCtrl.dismiss(q)}canAddMunicipality(){return this.auth.hasRole(Z.Roles.GENERAL_ADMIN)}canAddGeneralOrganizationsAndUnits(){return this.auth.hasAnyRole([Z.Roles.MUNICIPALITY_ADMIN])}canAddGroups(){return this.auth.hasAnyRole([Z.Roles.MUNICIPALITY_ADMIN,Z.Roles.DCP_CHIEF])}}Xt.\u0275fac=function(q){return new(q||Xt)(e.Y36(Z.SiviModalController),e.Y36(Z.SiviProjectsGatewayService))},Xt.\u0275cmp=e.Xpm({type:Xt,selectors:[["sivi-organizations-add-organization-modal"]],decls:18,vars:20,consts:[[1,"p3","pb0"],["name","organizationType",3,"label","options","value","siviChange"],[1,"buttons-container","p3"],["fill","outline","role","button",1,"mr2",3,"click"],["role","button",3,"click"]],template:function(q,W){1&q&&(e.TgZ(0,"ion-content")(1,"ion-grid",0)(2,"ion-row")(3,"h1"),e._uU(4),e.ALo(5,"translate"),e.qZA()(),e.TgZ(6,"ion-row")(7,"sivi-lib-radio-list",1),e.NdJ("siviChange",function(fn){return W.changeSelection(fn)}),e.ALo(8,"translate"),e.qZA()()(),e.TgZ(9,"div",2)(10,"ion-button",3),e.NdJ("click",function(){return W.onDismiss()}),e.ALo(11,"translate"),e._uU(12),e.ALo(13,"translate"),e.qZA(),e.TgZ(14,"ion-button",4),e.NdJ("click",function(){return W.onDismiss(W.selectedOptionValue)}),e.ALo(15,"translate"),e._uU(16),e.ALo(17,"translate"),e.qZA()()()),2&q&&(e.xp6(4),e.hij(" ",e.lcZ(5,8,"General.Text.AddNewOrganization")," "),e.xp6(3),e.Q6J("label",e.lcZ(8,10,"General.Type.Singular"))("options",W.options)("value",W.selectedOptionValue),e.xp6(3),e.uIk("aria-label",e.lcZ(11,12,"General.Buttons.Close")),e.xp6(2),e.hij(" ",e.lcZ(13,14,"General.Buttons.Close")," "),e.xp6(2),e.uIk("aria-label",e.lcZ(15,16,"General.Buttons.Add")),e.xp6(2),e.hij(" ",e.lcZ(17,18,"General.Buttons.Add")," "))},dependencies:[Be.YG,Be.W2,Be.jY,Be.Nd,Z.RadioListComponent,Oe.X$],styles:["h1[_ngcontent-%COMP%]{color:var(--ion-color-secondary);margin-top:16px}.buttons-container[_ngcontent-%COMP%]{display:flex;justify-content:flex-end}.buttons-container[_ngcontent-%COMP%]   ion-button[_ngcontent-%COMP%]{width:35%}"],changeDetection:0});const Qi=["siviContent"],Kt=["form"];function Fe(_t,q){if(1&_t&&(e.TgZ(0,"ion-title"),e._uU(1),e.ALo(2,"translate"),e.qZA()),2&_t){const W=e.oxw(2);e.xp6(1),e.Oqu(e.lcZ(2,1,W.addOrganizationTitle))}}function Wt(_t,q){if(1&_t&&(e.TgZ(0,"ion-title"),e._uU(1),e.ALo(2,"translate"),e.qZA()),2&_t){const W=e.oxw(2);e.xp6(1),e.Oqu(e.lcZ(2,1,W.modifyOrganizationTitle))}}function yi(_t,q){if(1&_t){const W=e.EpF();e.TgZ(0,"sivi-lib-navbar-action-button",16),e.NdJ("clicked",function(){e.CHM(W);const fn=e.oxw(2);return e.KtG(fn.saveOrganization())}),e.qZA()}if(2&_t){const W=e.oxw(2);e.Q6J("disabled",!W.canSave())}}function Ki(_t,q){if(1&_t){const W=e.EpF();e.TgZ(0,"ion-header")(1,"sivi-lib-navbar",12),e.NdJ("closed",function(){e.CHM(W);const fn=e.oxw();return e.KtG(fn.onDismiss())}),e.TgZ(2,"div",13),e.YNc(3,Fe,3,3,"ion-title",0),e.YNc(4,Wt,3,3,"ion-title",0),e.qZA(),e.TgZ(5,"div",14),e.YNc(6,yi,1,1,"sivi-lib-navbar-action-button",15),e.qZA()()()}if(2&_t){const W=e.oxw();e.xp6(1),e.Q6J("hideNotifications",!0)("closeButton",!0),e.xp6(2),e.Q6J("ngIf",!W.organization.id),e.xp6(1),e.Q6J("ngIf",W.organization.id),e.xp6(2),e.Q6J("ngIf",!W.viewMode)}}function ya(_t,q){if(1&_t){const W=e.EpF();e.TgZ(0,"cgi-icon",17),e.NdJ("click",function(){e.CHM(W);const fn=e.oxw();return e.KtG(fn.promptExpireOrganization())}),e.qZA()}}function Na(_t,q){1&_t&&(e._UZ(0,"cgi-icon",18),e.ALo(1,"translate")),2&_t&&e.s9C("matTooltip",e.lcZ(1,1,"Organization.General.Expire.IsBlockedInstructions"))}function qi(_t,q){if(1&_t){const W=e.EpF();e.TgZ(0,"ion-button",19),e.NdJ("click",function(){e.CHM(W);const fn=e.oxw();return e.KtG(fn.showEditOrganizationModal())}),e._uU(1),e.ALo(2,"translate"),e.qZA()}2&_t&&(e.xp6(1),e.hij(" ",e.lcZ(2,1,"General.Buttons.Edit")," "))}class ia extends Z.SiviPage{constructor(q,W,dt,fn,Ei,Po,En,ls,Au,kc){super(W,dt,Ei,q,kc,fn),this.route=q,this.notify=W,this.translate=dt,this.modalCtrl=fn,this.router=Ei,this.siviProjectsGatewayService=Po,this.organizationService=En,this.unsavedChanges=ls,this.fb=Au,this.location=kc,this.modal=!1,this.forceViewMode=!0,this.organization={name:"",parent:{id:null,name:null},organizationType:""},this.municipalityId=Z.Utils.getPathParamFromRouterSnapshot("municipalityId",this.router.routerState.snapshot.root),this.canEditOrganization=!1,this.viewMode=!1,this.hasBeenUpdated=!1,this.canExpireOrganization=!1,this.formGroup=this.fb.group({parent:[this.organization.parent],name:[this.organization.name]}),this.appState=this.siviProjectsGatewayService.getAppStateService(),this.auth=this.siviProjectsGatewayService.getAuthService()}ngOnInit(){this.organizationId||(this.organizationId=Z.Utils.getPathParamFromRouterSnapshot("organizationId",this.router.routerState.snapshot.root)),this.organizationId===Z.Constants.NEW_ID?this.createOrganization():(this.getOrganization(this.organizationId),this.checkCanExpireOrganization()),this.setValidators(),this.restoreModal()}onFormValueChange(q){this.organization={...this.organization,...q},this.updateWatchedEntities([this.organization])}getOrganization(q){this.contentLoader.showLoader(),this.organizationService.getOrganization(q).subscribe(W=>{this.organization=W,this.contentLoader.showContent(W),this.watchForValueChanges([this.organization]),this.setTitles(this.organization.organizationType),this.checkCanEditOrganization(this.organization.restEntityState),this.viewMode=!this.canEditOrganization||this.forceViewMode,this.formGroup.patchValue(this.organization)},W=>{this.contentLoader.showError(),console.error("getOrganization",W)})}saveOrganization(){this.contentLoader.showSavingLoader(),this.organizationService.saveOrganizationGeneral(this.organization).pipe((0,D.q)(1)).subscribe(q=>{this.hasBeenUpdated=!0,this.notify.toastSaveSuccess(),this.contentLoader.hideLoader(),this.organization.id||this.modalCtrl.dismiss(q),this.organization=q,this.appState.setOrganization(this.organization),this.watchForValueChanges([this.organization])},q=>{console.error("saveOrganizationGeneral failed",q),this.notify.alertFormSaveFailed(),this.contentLoader.hideLoader()})}showEditOrganizationModal(){var q=this;return(0,o.Z)(function*(){const W={component:ia,componentProps:{organizationId:q.organization.id,modal:!0,forceViewMode:!1},cssClass:"modal-full-size"};(yield q.openModal(W,Z.Constants.MODAL,Z.ModalNames.ORGANIZATION_GENERAL_EDITOR)).onDidDismiss().then(fn=>{fn.data&&(q.organization=fn.data)})})()}onDismiss(){this.unsavedChanges.canDeactivate(this).pipe((0,D.q)(1)).subscribe(q=>{q&&this.modalCtrl.dismiss(this.hasBeenUpdated&&this.organization.id?this.organization:null)})}canSave(){return this.isValid&&this.canEditOrganization}promptExpireOrganization(){var q=this;return(0,o.Z)(function*(){(yield q.notify.deleteConfirmPopup()).onDidDismiss().then(dt=>{dt&&dt.data&&q.expireOrganization()})})()}setTitles(q){q===Z.OrganizationTypes.ORGANIZATION_TYPE_AREA?(this.addOrganizationTitle="Organization.Area.Add",this.modifyOrganizationTitle="Organization.Area.BasicInfo"):(this.addOrganizationTitle="Organization.General.Add",this.modifyOrganizationTitle="Organization.General.BasicInfo")}expireOrganization(){const q=ft().subtract(1,"days").format();this.organizationService.saveOrganizationGeneral({...this.organization,validUntil:q,restEntityState:Z.Constants.EXPIRED}).subscribe(()=>{this.modalCtrl.dismiss(this.organization),this.notify.toastDeleteSuccess(),this.navigateToOrganizations(this.municipalityId)})}checkCanEditOrganization(q){this.canEditOrganization=this.auth.hasAnyRole([Z.Roles.MUNICIPALITY_ADMIN])&&!this.wasDeleted(q)}wasDeleted(q){return q===Z.Constants.EXPIRED||q===Z.Constants.DELETED}checkCanExpireOrganization(){this.canExpireOrganization=!1,this.auth.hasRole(Z.Roles.MUNICIPALITY_ADMIN)&&this.organizationService.getOrganizationTreeByOrganizationId(this.organizationId).pipe((0,D.q)(1)).subscribe(q=>{const W=(q.childOrganizations||[]).find(dt=>!this.wasDeleted(dt.restEntityState));this.canExpireOrganization=!W})}shouldShowExpireButton(){return!this.forceViewMode&&this.canEditOrganization&&!!this.organization.id}createOrganization(){this.organization.parent={id:this.parentOrganization?this.parentOrganization.id:null,name:this.parentOrganization?this.parentOrganization.name:null},this.organization.organizationType=this.type,this.formGroup.patchValue(this.organization),this.watchForValueChanges([this.organization]),this.checkCanEditOrganization(this.organization.restEntityState),this.setTitles(this.organization.organizationType),this.viewMode=!1}restoreModal(){Z.Utils.getParamFromURL(Z.Constants.MODAL)===Z.ModalNames.ORGANIZATION_GENERAL_EDITOR&&!this.modal&&this.showEditOrganizationModal()}navigateToOrganizations(q){this.router.navigate(["municipalities/"+q+"/organizations/"+q+"/info/municipality"])}setValidators(){const q=this.viewMode?[]:[Z.SiviValidators.required];this.formGroup.get("parent").setValidators(q),this.formGroup.get("name").setValidators(q)}}ia.\u0275fac=function(q){return new(q||ia)(e.Y36(j.gz),e.Y36(Z.NotifyService),e.Y36(Oe.sK),e.Y36(Z.SiviModalController),e.Y36(j.F0),e.Y36(Z.SiviProjectsGatewayService),e.Y36(Z.OrganizationService),e.Y36(Z.UnsavedChangesGuard),e.Y36(nt.QS),e.Y36(ke.Ye))},ia.\u0275cmp=e.Xpm({type:ia,selectors:[["sivi-organizations-organization-general-info"]],viewQuery:function(q,W){if(1&q&&(e.Gf(Qi,7),e.Gf(Kt,5)),2&q){let dt;e.iGM(dt=e.CRH())&&(W.contentLoader=dt.first),e.iGM(dt=e.CRH())&&(W.form=dt.first)}},inputs:{organizationId:"organizationId",type:"type",parentOrganization:"parentOrganization",modal:"modal",forceViewMode:"forceViewMode"},features:[e._Bn([]),e.qOj],decls:27,vars:21,consts:[[4,"ngIf"],["expectation","object",3,"skeleton"],["siviContent",""],["siviLibForm","",3,"formGroup"],[1,"ion-padding-start"],[1,"actions"],["name","delete","class","non-disabled",3,"click",4,"ngIf"],["name","delete","class","disabled",3,"matTooltip",4,"ngIf"],["class","edit-organization-button","color","primary","fill","outline",3,"click",4,"ngIf"],["color","primary"],["formControlName","parent","siviLibFormControl","","restrictToProperty","canAddChildOrganization","title","Form.Label.ParentOrganization",3,"municipalityId","organization","disabled"],["formControlName","name","siviLibFormControl","","type","text","label-position","floating",3,"value","viewMode","label"],[3,"hideNotifications","closeButton","closed"],["navbar-title",""],["navbar-buttons-right",""],[3,"disabled","clicked",4,"ngIf"],[3,"disabled","clicked"],["name","delete",1,"non-disabled",3,"click"],["name","delete",1,"disabled",3,"matTooltip"],["color","primary","fill","outline",1,"edit-organization-button",3,"click"]],template:function(q,W){1&q&&(e.YNc(0,Ki,7,5,"ion-header",0),e.TgZ(1,"ion-content")(2,"sivi-lib-content-loader",1,2)(4,"div",3)(5,"ion-grid")(6,"ion-row")(7,"ion-col",4)(8,"h2"),e._uU(9),e.qZA()(),e.TgZ(10,"ion-col",5),e.YNc(11,ya,1,0,"cgi-icon",6),e.YNc(12,Na,2,3,"cgi-icon",7),e.YNc(13,qi,3,3,"ion-button",8),e.qZA()(),e.TgZ(14,"ion-row")(15,"ion-col",4)(16,"h1",9),e._uU(17),e.ALo(18,"translate"),e.qZA()()(),e.TgZ(19,"ion-row")(20,"ion-col",4),e._UZ(21,"sivi-lib-organization-selector",10),e.qZA()(),e.TgZ(22,"ion-row")(23,"ion-col",4),e._UZ(24,"cgi-input",11),e.ALo(25,"translate"),e.ALo(26,"translate"),e.qZA()()()()()()),2&q&&(e.Q6J("ngIf",W.modal),e.xp6(2),e.Q6J("skeleton","form"),e.xp6(2),e.Q6J("formGroup",W.formGroup),e.xp6(5),e.hij(" ",W.organization.name," "),e.xp6(2),e.Q6J("ngIf",W.shouldShowExpireButton()&&W.canExpireOrganization),e.xp6(1),e.Q6J("ngIf",W.shouldShowExpireButton()&&!W.canExpireOrganization),e.xp6(1),e.Q6J("ngIf",W.viewMode&&W.canEditOrganization),e.xp6(4),e.Oqu(e.lcZ(18,15,W.modifyOrganizationTitle)),e.xp6(4),e.Q6J("municipalityId",W.municipalityId)("organization",W.formGroup.controls.parent.value)("disabled",W.viewMode),e.xp6(3),e.Q6J("value",null==W.organization?null:W.organization.name)("viewMode",W.viewMode)("label",e.lcZ(26,19,"Form.Label.Name")),e.uIk("aria-label",e.lcZ(25,17,"Form.Label.Name")))},dependencies:[Be.YG,Be.wI,Be.W2,Be.jY,Be.Gu,Be.Nd,Be.wd,ke.O5,nt.JJ,nt.JL,Z.ContentLoaderComponent,Z.NavbarComponent,Z.NavbarActionButtonComponent,Ct.gM,Z.SiviFormDirective,Z.SiviFormControlDirective,nt.sg,nt.u,Z.OrganizationSelectorComponent,Oe.X$],styles:[".edit-organization-button[_ngcontent-%COMP%]{float:right}.actions[_ngcontent-%COMP%]   .clickable[_ngcontent-%COMP%]{cursor:pointer}.actions[_ngcontent-%COMP%]   cgi-icon[_ngcontent-%COMP%], .actions[_ngcontent-%COMP%]   ion-button[_ngcontent-%COMP%]{float:right;cursor:pointer}cgi-icon[_ngcontent-%COMP%]{padding:8px}cgi-icon.disabled[_ngcontent-%COMP%]{opacity:.5}cgi-icon.non-disabled[_ngcontent-%COMP%]{color:var(--ion-color-primary)}@media screen and (max-width: 1264px){ion-label[color=primary][_ngcontent-%COMP%]{font-size:1.5em}}"]});const $o=["organizationLoader"];function su(_t,q){if(1&_t){const W=e.EpF();e.TgZ(0,"cgi-navigation-tabs",9),e.NdJ("onSelectTab",function(fn){e.CHM(W);const Ei=e.oxw();return e.KtG(Ei.setTab(fn))}),e.qZA()}if(2&_t){const W=e.oxw();e.Q6J("tabs",W.viewTabs)("selectTabId",W.currentTabId)}}function Us(_t,q){if(1&_t){const W=e.EpF();e.TgZ(0,"sivi-lib-tree",10),e.NdJ("clickedNode",function(fn){e.CHM(W);const Ei=e.oxw();return e.KtG(Ei.navigateToOrganizationPage(fn))})("clickedExtraButton",function(fn){e.CHM(W);const Ei=e.oxw();return e.KtG(Ei.clickedExtraButton(fn))}),e.qZA()}if(2&_t){const W=e.oxw();e.Q6J("node",W.hierarchyTreeNode)("currentOrganizationId",W.currentOrganizationId)("expandAll",!1)("extraButtons",W.getExtraButtons())}}function Ka(_t,q){if(1&_t){const W=e.EpF();e.TgZ(0,"div")(1,"a",13),e.NdJ("siviClick",function(){const Ei=e.CHM(W).$implicit,Po=e.oxw(2);return e.KtG(Po.navigateToOrganizationPage(Ei))}),e._uU(2),e.ALo(3,"translate"),e.ALo(4,"date"),e.qZA()()}if(2&_t){const W=q.$implicit,dt=e.oxw(2);e.xp6(1),e.Q6J("ngClass",W.id===dt.currentOrganizationId?"pointer selected":"pointer"),e.uIk("tabindex","0"),e.xp6(1),e.lnq("",W.name," (",e.lcZ(3,5,"General.Status."+W.restEntityState)," ",e.Dn7(4,7,W.validUntil,dt.dateFormats.FINNISH_ANGULAR,"utc"),")")}}function Tc(_t,q){if(1&_t&&(e.TgZ(0,"div",11),e.YNc(1,Ka,5,11,"div",12),e.qZA()),2&_t){const W=e.oxw();e.xp6(1),e.Q6J("ngForOf",W.inactiveOrganizations)("ngForTrackBy",W.trackByFn)}}class Qs extends Z.SiviPage{constructor(q,W,dt,fn,Ei,Po,En,ls,Au){super(dt,Po,fn,Ei,ls,En),this.siviProjectsGatewayService=q,this.organizationService=W,this.notify=dt,this.router=fn,this.route=Ei,this.translate=Po,this.modalCtrl=En,this.location=ls,this.organizationCommonService=Au,this.auth=this.siviProjectsGatewayService.getAuthService(),this.loading=!1,this.dateFormats=Z.DateFormats,this.title=this.getTitle(),this.viewTabs=this.getViewTabs(),this.currentTabId=this.viewTabs[0].id,this.translate.onLangChange.pipe((0,E.R)(this.destroy$)).subscribe(()=>{this.viewTabs=this.getViewTabs(),this.title=this.getTitle()}),setTimeout(()=>{this.restoreModal()},250)}promptAddNewOrganization(){var q=this;return(0,o.Z)(function*(){const W=yield q.modalCtrl.create({component:Xt,componentProps:{showAddMunicipality:q.auth.hasRole(Z.Roles.GENERAL_ADMIN)}});W.present(),W.onDidDismiss().then(dt=>{dt&&dt.data&&q.addNewOrganization(dt.data)})})()}addNewOrganization(q){q===Z.OrganizationTypes.MUNICIPALITY?this.showAddNewMunicipalityModal():this.organizationCommonService.isTypeOfOrganizationGeneral(q)?this.showAddNewOrganizationGeneralModal(q):this.organizationCommonService.isTypeOfUnit(q)?this.showAddNewUnitModal():this.organizationCommonService.isTypeOfGroup(q)?this.showAddNewGroupModal(q):console.error("addNewOrganization unsupported type: "+q)}menuWillOpen(){this.currentOrganizationId=this.getOrganizationId(),this.getOrganizationTreeForMunicipality(this.getMunicipalityId()),this.canSeeTabs=this.auth.hasAnyRole(Z.Permissions.OrganizationsHierarchy.CAN_SEE_TABS),this.viewTabs=this.getViewTabs()}clearData(){this.currentOrganizationId=void 0,this.hierarchyTreeNode=void 0,this.activeOrganizations=[],this.inactiveOrganizations=[]}getOrganizationTreeForMunicipality(q){q&&(this.loading=!0,this.organizationService.getOrganizationTreeByOrganizationId(q).pipe((0,D.q)(1)).subscribe(W=>{this.createOrganizationTrees(W),this.contentLoader.showContent(this.hierarchyTreeNode),this.loading=!1},W=>{console.error("organization tree for municipality failed",W),this.contentLoader.showError(),this.loading=!1}))}createOrganizationTrees(q){this.hierarchyTreeNode=this.organizationCommonService.buildTreeStructure(q,[Z.Constants.CURRENT,Z.Constants.FUTURE]),this.activeOrganizations=this.organizationCommonService.flattenOrganizations(this.organizationCommonService.buildTreeStructure(q)).filter(W=>this.organizationCommonService.isActive(W)),this.inactiveOrganizations=this.organizationCommonService.flattenOrganizations(this.organizationCommonService.buildTreeStructure(q)).filter(W=>[Z.Constants.EXPIRED,Z.Constants.DELETED].includes(W.restEntityState))}navigateToOrganizationPage(q){console.log("navigateToOrganizationPage",q);try{const W=q.path.split("->")[0],dt=this.organizationCommonService.getOrganizationTypeShortVersion(q.type),fn=`municipalities/${W}/organizations/${q.id}/info/${dt}`;this.router.navigate([fn]).then(()=>{this.currentOrganizationId=this.getOrganizationId()})}catch(W){console.error("navigateToOrganizationPage failed",W)}}setTab(q){this.currentTabId=q.detail}clickedExtraButton(q){"add-organization"===q&&this.promptAddNewOrganization()}getMunicipalityId(){return Z.Utils.getPathParamFromRouterSnapshot("municipalityId",this.router.routerState.snapshot.root)}getOrganizationId(){return Z.Utils.getPathParamFromRouterSnapshot("organizationId",this.router.routerState.snapshot.root)}getCurrentOrganization(){if(!this.activeOrganizations)return null;return this.activeOrganizations.find(W=>W.id===this.currentOrganizationId)||null}showAddNewMunicipalityModal(){const q={municipalityId:Z.Constants.NEW_ID};this.openModalWithConfig(ho,q,Z.ModalNames.MUNICIPALITY_EDITOR)}showAddNewOrganizationGeneralModal(q){const W={organizationId:Z.Constants.NEW_ID,type:q};this.openModalWithConfig(ia,W,Z.ModalNames.ORGANIZATION_GENERAL_EDITOR,q)}showAddNewUnitModal(){const q={unitId:Z.Constants.NEW_ID};this.openModalWithConfig(er,q,Z.ModalNames.UNIT_EDITOR)}showAddNewGroupModal(q){const W={educationGroupId:Z.Constants.NEW_ID};this.openModalWithConfig(Cs,W,Z.ModalNames.GROUP_EDITOR,q)}getParentOrganizationDetails(q,W){return q?this.organizationCommonService.isTypeOfGroup(W)&&!this.organizationCommonService.isTypeOfUnit(q.type)?{}:q.canAddChildOrganization?{id:q.id,name:q.name}:{}:{}}openModalWithConfig(q,W,dt,fn){var Ei=this;return(0,o.Z)(function*(){const Po={component:q,componentProps:{modal:!0,forceViewMode:!1,parentOrganization:Ei.getParentOrganizationDetails(Ei.getCurrentOrganization(),fn),...W},cssClass:"modal-full-size"},En=[];fn&&En.push({id:"type",value:fn});const ls=yield Ei.openModal(Po,Z.ModalNames.HIERARCHY_MODAL,dt,En);ls&&ls.onDidDismiss().then(Au=>{Au.data&&Ei.getOrganizationTreeForMunicipality(Ei.getMunicipalityId())})})()}restoreModal(){const q=Z.Utils.getParamFromURL(Z.ModalNames.HIERARCHY_MODAL);if(!q)return;const W=Z.Utils.getParamFromURL("type");q===Z.ModalNames.MUNICIPALITY_EDITOR?this.showAddNewMunicipalityModal():q===Z.ModalNames.ORGANIZATION_GENERAL_EDITOR?this.showAddNewOrganizationGeneralModal(W):q===Z.ModalNames.UNIT_EDITOR?this.showAddNewUnitModal():q===Z.ModalNames.GROUP_EDITOR&&this.showAddNewGroupModal(W)}getViewTabs(){const q=this.auth.hasAnyRole([Z.Roles.MUNICIPALITY_ADMIN]);return[{id:"active",name:this.translate.instant("General.Text.Active.Plural")},...q?[{id:"inactive",name:this.translate.instant("General.Text.Inactive.Plural")}]:[]]}getTitle(){return this.translate.instant("Hierarchy.Organizations.Singular")}getExtraButtons(){return this.auth.hasAnyRole([Z.Roles.MUNICIPALITY_ADMIN,Z.Roles.DCP_CHIEF])?[{id:"add-organization",text:"General.Buttons.Add"}]:[]}}Qs.\u0275fac=function(q){return new(q||Qs)(e.Y36(Z.SiviProjectsGatewayService),e.Y36(Z.OrganizationService),e.Y36(Z.NotifyService),e.Y36(j.F0),e.Y36(j.gz),e.Y36(Oe.sK),e.Y36(Z.SiviModalController),e.Y36(ke.Ye),e.Y36(Z.OrganizationCommonService))},Qs.\u0275cmp=e.Xpm({type:Qs,selectors:[["sivi-organizations-organizations-hierarchy"]],viewQuery:function(q,W){if(1&q&&e.Gf($o,7),2&q){let dt;e.iGM(dt=e.CRH())&&(W.contentLoader=dt.first)}},features:[e.qOj],decls:13,vars:8,consts:[["color","primary"],["slot","start"],["data-cy","hierarchy-close-menu",1,"close-button"],["name","close"],[3,"tabs","selectTabId","onSelectTab",4,"ngIf"],[3,"show"],["organizationLoader",""],["class","content-div",3,"node","currentOrganizationId","expandAll","extraButtons","clickedNode","clickedExtraButton",4,"ngIf"],["class","content-div",4,"ngIf"],[3,"tabs","selectTabId","onSelectTab"],[1,"content-div",3,"node","currentOrganizationId","expandAll","extraButtons","clickedNode","clickedExtraButton"],[1,"content-div"],[4,"ngFor","ngForOf","ngForTrackBy"],["siviKeyboardEvents","",3,"ngClass","siviClick"]],template:function(q,W){1&q&&(e.TgZ(0,"ion-toolbar",0)(1,"ion-buttons",1)(2,"ion-menu-button",2),e.ALo(3,"translate"),e._UZ(4,"cgi-icon",3),e.qZA()(),e.TgZ(5,"ion-title"),e._uU(6),e.qZA()(),e.YNc(7,su,1,2,"cgi-navigation-tabs",4),e._UZ(8,"sivi-progress-bar",5),e.TgZ(9,"sivi-lib-content-loader",null,6),e.YNc(11,Us,1,4,"sivi-lib-tree",7),e.YNc(12,Tc,2,2,"div",8),e.qZA()),2&q&&(e.xp6(2),e.uIk("aria-label",e.lcZ(3,6,"General.Buttons.Close")),e.xp6(4),e.Oqu(W.title),e.xp6(1),e.Q6J("ngIf",W.canSeeTabs),e.xp6(1),e.Q6J("show",W.loading),e.xp6(3),e.Q6J("ngIf",W.viewTabs&&W.currentTabId===W.viewTabs[0].id&&W.hierarchyTreeNode),e.xp6(1),e.Q6J("ngIf",W.viewTabs[1]&&W.currentTabId===W.viewTabs[1].id&&W.inactiveOrganizations))},dependencies:[Be.Sm,Be.fG,Be.wd,Be.sr,ke.mk,ke.sg,ke.O5,Z.KeyboardEventsDirective,Z.ContentLoaderComponent,Z.TreeComponent,ke.uU,Oe.X$],styles:["[_nghost-%COMP%]{background:var(--ion-color-light);min-height:100vh;overflow-y:auto}.content-div[_ngcontent-%COMP%]{padding:16px;display:block;height:calc(100vh - 112px);overflow-y:auto;overflow-x:hidden}.selected[_ngcontent-%COMP%]{outline:2px var(--ion-color-secondary) solid;outline-offset:2px}.close-button[_ngcontent-%COMP%]{padding:14px 12px 12px;background:transparent}.close-button[_ngcontent-%COMP%]   cgi-icon[_ngcontent-%COMP%]{color:var(--ion-color-primary-contrast)}"]});class vu{}vu.\u0275fac=function(q){return new(q||vu)},vu.\u0275mod=e.oAB({type:vu}),vu.\u0275inj=e.cJS({providers:[Z.SiviModalController],imports:[Z.SiviCoreComponentModule,Z.RadioListComponentModule,vi]});const hl=[{path:"",component:ia,canDeactivate:[Z.UnsavedChangesGuard]}];class Wl{}Wl.\u0275fac=function(q){return new(q||Wl)},Wl.\u0275mod=e.oAB({type:Wl}),Wl.\u0275inj=e.cJS({providers:[Z.SiviModalController],imports:[Z.SiviCorePageModule,j.Bz.forChild(hl),Ct.AV,Z.SiviFormsModule,Z.OrganizationSelectorModule,vi]});var sp=Object.freeze({__proto__:null,OrganizationGeneralInfoModule:Wl});class Ku{}Ku.\u0275fac=function(q){return new(q||Ku)},Ku.\u0275mod=e.oAB({type:Ku}),Ku.\u0275inj=e.cJS({providers:[Z.SiviModalController],imports:[vu,Z.SiviCoreComponentModule,Ts,to,To,Wl,Z.TreeComponentModule,vi]});const Da=["card"];function Pl(_t,q){1&_t&&e._UZ(0,"ion-spinner",13)}class gl extends Z.SiviAbstractForm{get shouldShowMunicipalityStatistics(){return this.form.get("organization").value.id===this.municipalityId&&(this.envinronmentService.proConsona||this.envinronmentService.isDevOrE2eEnvironment())}constructor(q,W,dt,fn,Ei,Po){super(),this.roleStateService=q,this.roleService=W,this.translate=dt,this.notify=fn,this.fb=Ei,this.siviProjectsGatewayService=Po,this.saveRole=new e.vpe,this.deleteRole=new e.vpe,this.envinronmentService=this.siviProjectsGatewayService.getEnvironmentService(),this.rolesOptions=[],this.NEW_STATE="NEW",this.dateWithTime=Z.DateFormats.STANDARD_WITH_TIME,this.form=this.fb.group({validFrom:[""],validUntil:[""],organization:[""],roleId:[""]}),this.isLoading=!1}ngOnInit(){this.setValidators(),this.clearNewRoleFormData(),this.handleGetRolesOptions()}onClickCancelNewRoleCard(){this.tempId?this.deleteRole.emit(this.tempId):(this.clearNewRoleFormData(),this.roleStateService.deleteRole(this.NEW_STATE))}handleGetRolesOptions(){this.getRolesOptionsOnOrganizationChange().pipe((0,E.R)(this.destroy$)).subscribe(q=>{this.shouldShowMunicipalityStatistics||(q=q.filter(W=>W.text!==Z.Roles.MUNICIPALITY_STATISTICS)),this.rolesOptions=q,this.resetRoleIfNotSelectable(q)})}getRolesOptionsOnOrganizationChange(){return this.getSelectedOrganizationId().pipe((0,T.w)(W=>(this.isLoading=!0,this.getRolesOptions(W).pipe((0,D.q)(1),(0,Y.x)(()=>this.isLoading=!1),(0,V.K)(dt=>(console.log("getRolesOptions failed",dt),this.notify.alertFailedToLoadData(),(0,me.of)([])))))))}getSelectedOrganizationId(){return this.form.get("organization").valueChanges.pipe((0,l.U)(q=>q?.id||""),(0,ue.x)())}resetRoleIfNotSelectable(q){const W=this.form.get("roleId").value;q.some(fn=>fn.value===W)||this.form.get("roleId").patchValue("")}clearNewRoleFormData(){this.form.patchValue({validFrom:"",validUntil:"",organizationId:"",roleId:""})}onNewRoleCardSave(){if(this.tempId)this.saveRole.emit({...this.form.value,tempId:this.tempId,organizationId:this.form.value.organization.id});else{const q=String(this.form.value.organization.id),W=this.createRoleParams(q,this.user.id,this.form.value);this.roleStateService.updatePersonRole(W,this.NEW_STATE)}}createRoleParams(q,W,dt){return{organizationId:q||dt.organizationId,roleId:dt.roleId,personId:W,validFrom:dt.validFrom,validUntil:dt.validUntil||null,id:""}}getRolesOptions(q){return q?this.roleService.getAllRoles(q).pipe((0,l.U)(W=>W.sort((dt,fn)=>Z.Utils.compareByLang(this.lang,dt.name,fn.name))),(0,l.U)(W=>Z.Utils.getSelectOptionsFromArray(W,"id","name"))):(0,me.of)([])}setValidators(){this.form.get("organization").setValidators([Z.SiviValidators.required]),this.form.get("roleId").setValidators([Z.SiviValidators.required]),this.form.get("validFrom").setValidators([Z.SiviValidators.required]),this.form.get("validUntil").setValidators([Z.SiviValidators.validateDate(),Z.SiviValidators.validateDateIsBeforeThan("validFrom"),Z.SiviValidators.validateInvalidControl("validFrom")])}scrollToElement(){try{this.card.nativeElement.scrollIntoView({behavior:"smooth",block:"start"})}catch(q){console.error("AddRoleCardComponent scrollToElement failed",q)}}}gl.\u0275fac=function(q){return new(q||gl)(e.Y36(mi),e.Y36(wi),e.Y36(Oe.sK),e.Y36(Z.NotifyService),e.Y36(nt.QS),e.Y36(Z.SiviProjectsGatewayService))},gl.\u0275cmp=e.Xpm({type:gl,selectors:[["sivi-organizations-add-role-card"]],viewQuery:function(q,W){if(1&q&&e.Gf(Da,5),2&q){let dt;e.iGM(dt=e.CRH())&&(W.card=dt.first)}},inputs:{municipalityId:"municipalityId",user:"user",tempId:"tempId"},outputs:{saveRole:"saveRole",deleteRole:"deleteRole"},features:[e.qOj],decls:22,vars:27,consts:[["siviScrollIntoView","",1,"ion-no-margin"],["card",""],["siviLibForm","",3,"formGroup"],["formControlName","organization","siviLibFormControl","","restrictToProperty","canAddPersonToRole",3,"title","municipalityId"],[1,"roles-wrapper"],["formControlName","roleId","siviLibFormControl","",3,"options","disabled","label","placeholder"],[1,"spinner-wrapper"],["color","primary",4,"ngIf"],["formControlName","validFrom","siviLibFormControl","",3,"label","outputFormat"],["formControlName","validUntil","siviLibFormControl","",3,"label","minDate","outputFormat"],["slot","end"],["no-min-width","",3,"click"],["no-min-width","",3,"disabled","click"],["color","primary"]],template:function(q,W){1&q&&(e.TgZ(0,"cgi-card",0,1)(2,"ion-card-content",2),e._UZ(3,"sivi-lib-organization-selector",3),e.TgZ(4,"div",4),e._UZ(5,"sivi-lib-select",5),e.ALo(6,"translate"),e.ALo(7,"translate"),e.ALo(8,"translate"),e.TgZ(9,"div",6),e.YNc(10,Pl,1,0,"ion-spinner",7),e.qZA()(),e._UZ(11,"sivi-lib-datepicker",8)(12,"sivi-lib-datepicker",9),e.qZA(),e.TgZ(13,"ion-card-footer")(14,"ion-item")(15,"div",10)(16,"ion-button",11),e.NdJ("click",function(){return W.onClickCancelNewRoleCard()}),e._uU(17),e.ALo(18,"translate"),e.qZA(),e.TgZ(19,"ion-button",12),e.NdJ("click",function(){return W.onNewRoleCardSave()}),e._uU(20),e.ALo(21,"translate"),e.qZA()()()()()),2&q&&(e.xp6(2),e.Q6J("formGroup",W.form),e.xp6(1),e.Q6J("title","Organization.Singular")("municipalityId",W.municipalityId),e.xp6(2),e.Q6J("options",W.rolesOptions)("disabled",W.isLoading)("label",e.lcZ(7,19,"Role.Singular"))("placeholder",e.lcZ(8,21,"Role.Singular")),e.uIk("aria-label",e.lcZ(6,17,"Role.Singular")),e.xp6(5),e.Q6J("ngIf",W.isLoading),e.xp6(1),e.Q6J("label","General.Text.ValidFrom")("outputFormat",W.dateWithTime),e.xp6(1),e.Q6J("label","General.Text.ValidTo")("minDate",W.form.value.validFrom)("outputFormat",W.dateWithTime),e.xp6(5),e.hij(" ",e.lcZ(18,23,"General.Buttons.Cancel")," "),e.xp6(2),e.Q6J("disabled",!W.isValid||W.isLoading),e.xp6(1),e.hij(" ",e.lcZ(21,25,"General.Buttons.Save")," "))},dependencies:[Z.ScrollIntoViewDirective,Be.YG,Be.FN,Be.Ie,Be.PQ,ke.O5,nt.JJ,nt.JL,Z.OrganizationSelectorComponent,Z.DatepickerComponent,Z.SiviFormDirective,Z.SiviFormControlDirective,nt.sg,nt.u,Z.SelectComponent,Oe.X$],styles:[".roles-wrapper[_ngcontent-%COMP%]{position:relative}.roles-wrapper[_ngcontent-%COMP%]   .spinner-wrapper[_ngcontent-%COMP%]{position:absolute;width:30px;height:30px;top:50%;left:50%;transform:translate(-50%) translateY(-50%)}"]});class ss{}function gc(_t,q){if(1&_t&&(e.TgZ(0,"ion-card-content",8)(1,"cgi-validator",9,10),e._UZ(3,"sivi-lib-datepicker",11)(4,"sivi-lib-datepicker",12),e.qZA()()),2&_t){const W=e.oxw(2);e.xp6(1),e.Q6J("validatorOptions",W.validatorOptions),e.xp6(2),e.Q6J("label","General.Text.ValidFrom")("maxDate",W.roleParams.validUntil)("value",W.roleParams.validFrom),e.xp6(1),e.Q6J("label","General.Text.ValidTo")("minDate",W.minValidUntilDate)("value",W.roleParams.validUntil)}}function rs(_t,q){if(1&_t&&(e.TgZ(0,"ion-card-content",8),e._UZ(1,"cgi-input",13),e.ALo(2,"translate"),e.qZA()),2&_t){const W=e.oxw(2);e.xp6(1),e.Q6J("viewMode",!0)("label",e.lcZ(2,3,"General.Text.Valid"))("value",W.getDisplayDate(W.organizationRole))}}function Pc(_t,q){if(1&_t){const W=e.EpF();e.TgZ(0,"ion-card-footer")(1,"ion-item",14)(2,"ion-button",15),e.NdJ("click",function(){e.CHM(W);const fn=e.oxw(2);return e.KtG(fn.onInactivateRole(fn.organizationRole))}),e._uU(3),e.ALo(4,"translate"),e.qZA(),e.TgZ(5,"div",16)(6,"ion-button",17),e.NdJ("click",function(){e.CHM(W);const fn=e.oxw(2);return e.KtG(fn.onCancelClick(fn.organizationRole))}),e._uU(7),e.ALo(8,"translate"),e.qZA(),e.TgZ(9,"ion-button",17),e.NdJ("click",function(){e.CHM(W);const fn=e.oxw(2);return e.KtG(fn.onSaveClick(fn.roleParams))}),e._uU(10),e.ALo(11,"translate"),e.qZA()()()()}if(2&_t){const W=e.oxw(2);e.xp6(3),e.hij(" ",e.lcZ(4,5,"General.Buttons.Inactivate")," "),e.xp6(3),e.Q6J("disabled",W.buttonDisabled),e.xp6(1),e.hij(" ",e.lcZ(8,7,"General.Buttons.Cancel")," "),e.xp6(2),e.Q6J("disabled",!W.isValid||W.buttonDisabled),e.xp6(1),e.hij(" ",e.lcZ(11,9,"General.Buttons.Save")," ")}}function ks(_t,q){if(1&_t&&(e.TgZ(0,"cgi-card",1)(1,"ion-card-header",2)(2,"div",3),e._uU(3),e.qZA(),e.TgZ(4,"div",4),e._uU(5),e.qZA(),e.TgZ(6,"div",5),e._uU(7),e.ALo(8,"translate"),e.qZA()(),e.YNc(9,gc,5,7,"ion-card-content",6),e.YNc(10,rs,3,5,"ion-card-content",6),e.YNc(11,Pc,12,11,"ion-card-footer",7),e.qZA()),2&_t){const W=e.oxw();e.xp6(3),e.hij(" ",W.organizationBasicData.unitName," "),e.xp6(2),e.hij(" ",W.organizationBasicData.groupName," "),e.xp6(2),e.hij(" ",e.lcZ(8,6,W.organizationRole.roleName)," "),e.xp6(2),e.Q6J("ngIf",W.editMode),e.xp6(1),e.Q6J("ngIf",!W.editMode),e.xp6(1),e.Q6J("ngIf",W.editMode)}}ss.\u0275fac=function(q){return new(q||ss)},ss.\u0275mod=e.oAB({type:ss}),ss.\u0275inj=e.cJS({imports:[Z.DirectivesModule,Z.SiviCoreComponentModule,Z.OrganizationSelectorModule,Z.DatepickerModule,Z.SiviFormsModule,Z.SelectComponentModule,vi]});class Ol extends Z.AbstractValidator{set editMode(q){this._editMode=q,this.initializeRoleCard()}get editMode(){return this._editMode}constructor(q,W){super(q),this.translateService=q,this.notify=W,this.inactivateRole=new e.vpe,this.saveRole=new e.vpe,this.constants=Z.OrganizationTypes,this.buttonDisabled=!0,this.initialRoleParams={id:"",roleId:"",validFrom:"",validUntil:"",organizationId:""},this.organizationBasicData={unitId:"",unitName:"",groupName:""},this.roleParams={id:"",roleId:"",validFrom:"",validUntil:"",organizationId:""},this.todayDate=ft().format("YYYY-MM-DD"),this._editMode=!1}ngOnInit(){this.initializeRoleCard()}ngOnChanges(q){this.handleOrganizationRoleInputChange(q.organizationRole)}initializeRoleCard(){this.roleParams={id:this.organizationRole.id,roleId:null,validFrom:this.organizationRole.validFrom,validUntil:this.organizationRole.validUntil||null,organizationId:this.organizationRole.organizationId},this.minValidUntilDate=ft(this.roleParams.validFrom).isBefore(this.todayDate)?this.todayDate:this.roleParams.validFrom,this.initialRoleParams=this.roleParams,this.validatorOptions=this.getValidatorOptions(),this.organizationBasicData=this.getUnitAndGroupDetails(this.organizationRole)}handleOrganizationRoleInputChange(q){q&&!q.firstChange&&!(0,ve.Z)(q.currentValue,q.previousValue)&&(this.organizationRole=q.currentValue,this.initializeRoleCard(),this.setButtonStatus(this.roleParams,this.initialRoleParams))}onCancelClick(q){this.roleParams.validFrom=q.validFrom,this.roleParams.validUntil=q.validUntil?q.validUntil:null,this.buttonDisabled=!0}onSaveClick(q){this.saveRole.emit(q)}onInactivateRole(q){var W=this;return(0,o.Z)(function*(){const dt=W.translateService.instant("Message.Delete.Title"),fn=W.translateService.instant("Message.Delete.Question");(yield W.notify.createConfirmationPopUp(dt,fn,"General.Buttons.Inactivate")).onDidDismiss().then(Po=>{Po.data&&W.inactivateRole.emit(q)})})()}getDisplayDate(q){const{validUntil:W,validFrom:dt}=q,fn=Z.Utils.convertDateToFinnishStandard(dt,Z.DateFormats.FINNISH_MOMENT);let Ei="";return W&&(Ei=Z.Utils.convertDateToFinnishStandard(W,Z.DateFormats.FINNISH_MOMENT)),`${fn} - ${Ei}`}getUnitAndGroupDetails(q){try{const W={unitId:"",unitName:"",groupName:""};return q.organizationType.includes(this.constants.MUNICIPALITY)?(W.unitId=q.organizationId,W.unitName=q.organizationName):(W.unitId=(0,pe.Z)(q,"restOrganization.id"),W.unitName=(0,pe.Z)(q,"restOrganization.name"),W.groupName=q.organizationName),W}catch(W){console.error("getUnitAndGroupDetails failed",W)}}onValidatorValuesChange(q){const W=q.detail;q.detail&&(this.roleParams={...this.roleParams,...W},this.setButtonStatus(this.roleParams,this.initialRoleParams)),this.minValidUntilDate=ft(this.roleParams.validFrom).isBefore(this.todayDate)?this.todayDate:this.roleParams.validFrom}setButtonStatus(q,W){this.buttonDisabled=(0,ve.Z)(q,W)}getValidatorOptions(){return this.editMode?[this.createValidatorOption("validFrom",this.roleParams.validFrom,[Z.SiviValidators.required,Z.SiviValidators.validateDate(),Z.SiviValidators.validateDateIsAfterThan("validUntil"),Z.SiviValidators.validateInvalidControl("validUntil")]),this.createValidatorOption("validUntil",this.roleParams.validUntil,[Z.SiviValidators.validateDate(),Z.SiviValidators.validateDateIsBeforeThan("validFrom"),Z.SiviValidators.validateInvalidControl("validFrom")])]:[]}}Ol.\u0275fac=function(q){return new(q||Ol)(e.Y36(Oe.sK),e.Y36(Z.NotifyService))},Ol.\u0275cmp=e.Xpm({type:Ol,selectors:[["sivi-organizations-role-card"]],inputs:{editMode:"editMode",organizationRole:"organizationRole"},outputs:{inactivateRole:"inactivateRole",saveRole:"saveRole"},features:[e.qOj,e.TTD],decls:1,vars:1,consts:[["class","ion-no-margin",4,"ngIf"],[1,"ion-no-margin"],["color","primary",1,"header","ion-margin-bottom"],[1,"great","weight-500","title"],[1,"group-name"],[1,"text-uppercase"],["class","ion-margin-vertical",4,"ngIf"],[4,"ngIf"],[1,"ion-margin-vertical"],[3,"validatorOptions"],["validator",""],["name","validFrom",3,"label","maxDate","value"],["name","validUntil",3,"label","minDate","value"],[3,"viewMode","label","value"],["lines","none"],["slot","start","no-min-width","",3,"click"],["slot","end"],["no-min-width","",3,"disabled","click"]],template:function(q,W){1&q&&e.YNc(0,ks,12,8,"cgi-card",0),2&q&&e.Q6J("ngIf",W.organizationBasicData)},dependencies:[Be.YG,Be.FN,Be.Zi,Be.Ie,ke.O5,Z.DatepickerComponent,Oe.X$],styles:["sivi-organizations-role-card[_ngcontent-%COMP%]   ion-card-header[_ngcontent-%COMP%]{background-color:var(--ion-color-medium)!important}sivi-organizations-role-card[_ngcontent-%COMP%]   .header[_ngcontent-%COMP%]{white-space:normal;word-break:break-all;color:var(--ion-color-medium-contrast)}sivi-organizations-role-card[_ngcontent-%COMP%]   .group-name[_ngcontent-%COMP%]{min-height:16px}sivi-organizations-role-card[_ngcontent-%COMP%]   .button--primary[_ngcontent-%COMP%]{color:var(--ion-color-primary)}"]});class _c{}_c.\u0275fac=function(q){return new(q||_c)},_c.\u0275mod=e.oAB({type:_c}),_c.\u0275inj=e.cJS({imports:[Z.SiviCoreComponentModule,Z.DatepickerModule,vi]});const Yc=["contentLoader"],lu=["addRoleCard"];function ac(_t,q){if(1&_t){const W=e.EpF();e.TgZ(0,"ion-col",7)(1,"sivi-organizations-add-role-card",8,9),e.NdJ("deleteRole",function(fn){e.CHM(W);const Ei=e.oxw();return e.KtG(Ei.onDeleteNewRole(fn))})("saveRole",function(fn){e.CHM(W);const Ei=e.oxw();return e.KtG(Ei.onSaveRole(fn))}),e.qZA()()}if(2&_t){const W=q.$implicit,dt=e.oxw();e.Q6J("@animatedItem",void 0),e.xp6(1),e.Q6J("user",dt.user)("municipalityId",dt.municipalityId)("tempId",null==W?null:W.tempId)}}function bd(_t,q){if(1&_t){const W=e.EpF();e.TgZ(0,"ion-col",10)(1,"sivi-organizations-role-card",11),e.NdJ("inactivateRole",function(fn){e.CHM(W);const Ei=e.oxw();return e.KtG(Ei.onInactivateRole(fn))})("saveRole",function(fn){e.CHM(W);const Ei=e.oxw();return e.KtG(Ei.onSaveRole(fn))}),e.qZA()()}if(2&_t){const W=q.$implicit,dt=e.oxw();e.Q6J("@animatedItem",void 0),e.xp6(1),e.Q6J("organizationRole",W)("editMode",dt.checkCanEdit(W))}}function kd(_t,q){1&_t&&(e.TgZ(0,"p",12),e._uU(1),e.ALo(2,"translate"),e.qZA()),2&_t&&(e.xp6(1),e.hij(" ",e.lcZ(2,1,"Message.NoDataFound")," "))}function Oc(_t,q){if(1&_t){const W=e.EpF();e.TgZ(0,"ion-col",10)(1,"sivi-organizations-role-card",11),e.NdJ("inactivateRole",function(fn){e.CHM(W);const Ei=e.oxw();return e.KtG(Ei.onInactivateRole(fn))})("saveRole",function(fn){e.CHM(W);const Ei=e.oxw();return e.KtG(Ei.onSaveRole(fn))}),e.qZA()()}if(2&_t){const W=q.$implicit,dt=e.oxw();e.Q6J("@animatedItem",void 0),e.xp6(1),e.Q6J("organizationRole",W)("editMode",dt.checkCanEdit(W))}}function or(_t,q){1&_t&&(e.TgZ(0,"p",12),e._uU(1),e.ALo(2,"translate"),e.qZA()),2&_t&&(e.xp6(1),e.hij(" ",e.lcZ(2,1,"Message.NoDataFound")," "))}function Dr(_t,q){if(1&_t&&(e.TgZ(0,"ion-col",10),e._UZ(1,"sivi-organizations-role-card",13),e.qZA()),2&_t){const W=q.$implicit;e.Q6J("@animatedItem",void 0),e.xp6(1),e.Q6J("organizationRole",W)}}function kr(_t,q){1&_t&&(e.TgZ(0,"p",12),e._uU(1),e.ALo(2,"translate"),e.qZA()),2&_t&&(e.xp6(1),e.hij(" ",e.lcZ(2,1,"Message.NoDataFound")," "))}class Qo extends Z.SiviComponent{set user(q){this._user=q,this.assignRoles(q.roles)}get user(){return this._user}constructor(q){super(),this.translateService=q,this.removeNewRole=new e.vpe,this.saveRole=new e.vpe,this.inactivateRole=new e.vpe,this.activeRoles=[],this.historyRoles=[],this.futureRoles=[],this.newRoles=[],this.ACTIVE_STATE=Z.PersonOrganizationRoleState.CURRENT,this.HISTORY_STATE=Z.PersonOrganizationRoleState.EXPIRED,this.FUTURE_STATE=Z.PersonOrganizationRoleState.FUTURE,this.NEW_STATE="NEW",this.roleStates=[this.ACTIVE_STATE,this.HISTORY_STATE,this.FUTURE_STATE,this.NEW_STATE]}checkCanEdit(q){return!this.readonly&&this.permissions?.[q.id]||!1}assignRoles(q){q&&(this.activeRoles=q.filter(W=>W.restEntityState===this.ACTIVE_STATE),this.futureRoles=q.filter(W=>W.restEntityState===this.FUTURE_STATE),this.historyRoles=q.filter(W=>W.restEntityState===this.HISTORY_STATE),this.newRoles=q.filter(W=>W.restEntityState===this.NEW_STATE),this.scrollToLastNewRolesComponent())}scrollToLastNewRolesComponent(){try{(0,me.of)([]).pipe((0,he.g)(0)).subscribe(()=>{this.addRoleCardComponent.last?.scrollToElement()})}catch(q){console.error("scroll to last new roles error",q)}}onInactivateRole(q){this.inactivateRole.emit(q)}onDeleteNewRole(q){this.removeNewRole.emit(q)}onSaveRole(q){this.saveRole.emit(q)}}Qo.\u0275fac=function(q){return new(q||Qo)(e.Y36(Oe.sK))},Qo.\u0275cmp=e.Xpm({type:Qo,selectors:[["sivi-organizations-role-state"]],viewQuery:function(q,W){if(1&q&&(e.Gf(Yc,7),e.Gf(lu,5)),2&q){let dt;e.iGM(dt=e.CRH())&&(W.contentLoader=dt.first),e.iGM(dt=e.CRH())&&(W.addRoleCardComponent=dt)}},inputs:{user:"user",readonly:"readonly",municipalityId:"municipalityId",permissions:"permissions"},outputs:{removeNewRole:"removeNewRole",saveRole:"saveRole",inactivateRole:"inactivateRole"},features:[e.qOj],decls:27,vars:23,consts:[["contentLoader",""],[1,"ion-no-padding"],["size","12",1,"ion-no-padding"],["color","primary",1,"weight-bold"],["size","12","class","ion-no-padding ion-padding-end ion-padding-vertical",4,"ngFor","ngForOf","ngForTrackBy"],["size","12","size-md","6","size-xl","4","class","ion-no-padding ion-padding-end ion-padding-vertical",4,"ngFor","ngForOf","ngForTrackBy"],["class","small overflow-hidden margin-top",4,"ngIf"],["size","12",1,"ion-no-padding","ion-padding-end","ion-padding-vertical"],[3,"user","municipalityId","tempId","deleteRole","saveRole"],["addRoleCard",""],["size","12","size-md","6","size-xl","4",1,"ion-no-padding","ion-padding-end","ion-padding-vertical"],[3,"organizationRole","editMode","inactivateRole","saveRole"],[1,"small","overflow-hidden","margin-top"],[3,"organizationRole"]],template:function(q,W){1&q&&(e.TgZ(0,"sivi-lib-content-loader",null,0)(2,"ion-grid",1)(3,"ion-row")(4,"ion-col",2)(5,"h4",3),e._uU(6),e.ALo(7,"translate"),e.qZA()(),e.YNc(8,ac,3,4,"ion-col",4),e.YNc(9,bd,2,3,"ion-col",5),e.YNc(10,kd,3,3,"p",6),e.qZA()(),e.TgZ(11,"ion-grid",1)(12,"ion-row")(13,"ion-col",2)(14,"h4",3),e._uU(15),e.ALo(16,"translate"),e.qZA()(),e.YNc(17,Oc,2,3,"ion-col",5),e.YNc(18,or,3,3,"p",6),e.qZA()(),e.TgZ(19,"ion-grid",1)(20,"ion-row")(21,"ion-col",2)(22,"h4",3),e._uU(23),e.ALo(24,"translate"),e.qZA()(),e.YNc(25,Dr,2,2,"ion-col",5),e.YNc(26,kr,3,3,"p",6),e.qZA()()()),2&q&&(e.xp6(3),e.Q6J("@animatedList",W.activeRoles.length),e.xp6(3),e.Oqu(e.lcZ(7,17,"Role.Plural.Active")),e.xp6(2),e.Q6J("ngForOf",W.newRoles)("ngForTrackBy",W.trackByFn),e.xp6(1),e.Q6J("ngForOf",W.activeRoles)("ngForTrackBy",W.trackByFn),e.xp6(1),e.Q6J("ngIf",!W.activeRoles.length&&!W.newRoles.length),e.xp6(2),e.Q6J("@animatedList",W.futureRoles.length),e.xp6(3),e.Oqu(e.lcZ(16,19,"Role.Plural.Future")),e.xp6(2),e.Q6J("ngForOf",W.futureRoles)("ngForTrackBy",W.trackByFn),e.xp6(1),e.Q6J("ngIf",!W.futureRoles.length),e.xp6(2),e.Q6J("@animatedList",W.historyRoles.length),e.xp6(3),e.Oqu(e.lcZ(24,21,"Role.Plural.History")),e.xp6(2),e.Q6J("ngForOf",W.historyRoles)("ngForTrackBy",W.trackByFn),e.xp6(1),e.Q6J("ngIf",!W.historyRoles.length))},dependencies:[Be.wI,Be.jY,Be.Nd,ke.sg,ke.O5,Z.ContentLoaderComponent,Ol,gl,Oe.X$],encapsulation:2,data:{animation:[Z.listAnimations]}});class oo{}function da(_t,q){if(1&_t&&(e.TgZ(0,"ion-col",1),e._UZ(1,"cgi-input",7),e.ALo(2,"translate"),e.qZA()),2&_t){const W=e.oxw();e.xp6(1),e.Q6J("disabled",!!W.person.id)("label",e.lcZ(2,3,"Form.Label.Pic"))("viewMode",W.readonly)}}function ha(_t,q){if(1&_t&&(e.TgZ(0,"ion-col",3),e._UZ(1,"cgi-input",8),e.ALo(2,"translate"),e.qZA()),2&_t){const W=e.oxw();e.xp6(1),e.Q6J("errorMessages",W.alphabetMessages)("label",e.lcZ(2,3,"Form.Label.NickName"))("viewMode",W.readonly)}}oo.\u0275fac=function(q){return new(q||oo)},oo.\u0275mod=e.oAB({type:oo}),oo.\u0275inj=e.cJS({imports:[Z.SiviCoreComponentModule,_c,ss,vi]});class Ia extends Z.SiviAbstractForm{constructor(q,W){super(),this.translate=q,this.fb=W,this.showNickName=!1,this.showPIN=!0,this.readonly=!1,this.update=new e.vpe,this.componentStatus=new e.vpe,this.form=this.fb.group({id:[""],firstName:[""],lastName:[""],pin:[""],nickName:[""]}),this.alphabetMessages={pattern:this.translate.instant("Form.Error.OnlyAlphabets")}}ngOnInit(){this.form.patchValue(this.person),this.setValidators()}onFormStatusChange(q){this.componentStatus.emit(q)}onFormValueChange(q){this.update.emit(q)}setValidators(){if(!this.readonly){const q=[Z.SiviValidators.required,Z.SiviValidators.pattern(Z.Patterns.ALPHABETS)];this.form.get("firstName").setValidators(q),this.form.get("lastName").setValidators(q),this.form.get("nickName").setValidators(this.showNickName?q:[]),this.form.get("pin").setValidators(this.showNickName?Z.SiviValidators.validatePin():[])}}}Ia.\u0275fac=function(q){return new(q||Ia)(e.Y36(Oe.sK),e.Y36(nt.QS))},Ia.\u0275cmp=e.Xpm({type:Ia,selectors:[["sivi-organizations-staff-basic-info"]],inputs:{person:"person",showNickName:"showNickName",showPIN:"showPIN",readonly:"readonly"},outputs:{update:"update",componentStatus:"componentStatus"},features:[e.qOj],decls:10,vars:13,consts:[["siviLibForm","",3,"formGroup"],["siviGridCol","left",1,"ion-no-padding"],["formControlName","firstName","siviLibFormControl","","autocomplete","no","type","text","label-position","floating",3,"errorMessages","label","viewMode"],["siviGridCol","right",1,"ion-no-padding"],["formControlName","lastName","siviLibFormControl","","autocomplete","no","type","text","label-position","floating",3,"errorMessages","label","viewMode"],["siviGridCol","left","class","ion-no-padding",4,"ngIf"],["siviGridCol","right","class","ion-no-padding",4,"ngIf"],["formControlName","pin","siviLibFormControl","","autocomplete","no","type","text","label-position","floating",3,"disabled","label","viewMode"],["formControlName","nickName","siviLibFormControl","","autocomplete","no","type","text","label-position","floating",3,"errorMessages","label","viewMode"]],template:function(q,W){1&q&&(e.TgZ(0,"ion-row",0)(1,"ion-col",1),e._UZ(2,"cgi-input",2),e.ALo(3,"translate"),e.qZA(),e.TgZ(4,"ion-col",3),e._UZ(5,"cgi-input",4),e.ALo(6,"translate"),e.qZA()(),e.TgZ(7,"ion-row"),e.YNc(8,da,3,5,"ion-col",5),e.YNc(9,ha,3,5,"ion-col",6),e.qZA()),2&q&&(e.Q6J("formGroup",W.form),e.xp6(2),e.Q6J("errorMessages",W.alphabetMessages)("label",e.lcZ(3,9,"Form.Label.FirstName"))("viewMode",W.readonly),e.xp6(3),e.Q6J("errorMessages",W.alphabetMessages)("label",e.lcZ(6,11,"Form.Label.LastName"))("viewMode",W.readonly),e.xp6(3),e.Q6J("ngIf",W.showPIN),e.xp6(1),e.Q6J("ngIf",W.showNickName))},dependencies:[Be.wI,Be.Nd,ke.O5,nt.JJ,nt.JL,Z.GridColDirective,Z.SiviFormDirective,Z.SiviFormControlDirective,nt.sg,nt.u,Oe.X$],encapsulation:2});const cc=["contentLoader"];function Rs(_t,q){1&_t&&(e.TgZ(0,"span"),e._uU(1),e.ALo(2,"translate"),e.qZA()),2&_t&&(e.xp6(1),e.Oqu(e.lcZ(2,1,"Staff.Add")))}function xc(_t,q){if(1&_t&&(e.TgZ(0,"span"),e._uU(1),e.ALo(2,"firstNameLastName"),e.qZA()),2&_t){const W=e.oxw();e.xp6(1),e.Oqu(e.lcZ(2,1,W.staffMember))}}function Hc(_t,q){if(1&_t){const W=e.EpF();e.TgZ(0,"sivi-lib-navbar-action-button",12),e.NdJ("clicked",function(){e.CHM(W);const fn=e.oxw();return e.KtG(fn.saveStaffMember())}),e.qZA()}}function lp(_t,q){if(1&_t){const W=e.EpF();e.TgZ(0,"sivi-organizations-staff-basic-info",13),e.NdJ("update",function(fn){e.CHM(W);const Ei=e.oxw();return e.KtG(Ei.updateStaffMemberPersonData(fn))})("componentStatus",function(fn){e.CHM(W);const Ei=e.oxw();return e.KtG(Ei.updatePersonBasicInfoFormStatus(fn))}),e.qZA()}if(2&_t){const W=e.oxw();e.Q6J("readonly",W.readonly)("person",W.staffMember)("showPIN",!1)}}function kp(_t,q){if(1&_t){const W=e.EpF();e.TgZ(0,"ion-grid",14)(1,"ion-row")(2,"ion-col",15)(3,"cgi-input",16),e.NdJ("siviChange",function(fn){e.CHM(W);const Ei=e.oxw();return e.KtG(Ei.updateStaffMemberContactDetail(fn))}),e.ALo(4,"translate"),e.qZA()(),e.TgZ(5,"ion-col",17)(6,"cgi-input",18),e.NdJ("siviChange",function(fn){e.CHM(W);const Ei=e.oxw();return e.KtG(Ei.updateStaffMemberContactDetail(fn))}),e.ALo(7,"translate"),e.qZA()()(),e.TgZ(8,"ion-row")(9,"ion-col",15)(10,"div",19),e._UZ(11,"sivi-lib-select",20),e.ALo(12,"translate"),e.ALo(13,"translate"),e.qZA()()()()}if(2&_t){const W=e.oxw();e.xp6(3),e.Q6J("viewMode",!W.canEditContact)("label",e.lcZ(4,8,"Form.Label.Phone.Work")),e.xp6(3),e.Q6J("viewMode",!W.canEditContact)("label",e.lcZ(7,10,"Form.Label.Email.Work")),e.xp6(5),e.Q6J("viewMode",W.readonly||!W.canEditJobPosition)("options",W.selectableJobPositions)("label",e.lcZ(13,14,"General.Text.JobPositionTitle")),e.uIk("aria-label",e.lcZ(12,12,"General.Text.JobPositionTitle"))}}class Ju extends Z.SiviAbstractForm{constructor(q,W,dt,fn,Ei,Po,En){super(),this.notify=q,this.translate=W,this.modalCtrl=dt,this.unsavedChanges=fn,this.staffService=Ei,this.siviProjectsGatewayService=Po,this.fb=En,this.basicInformationFormIsValid=!1,this.canEditContact=!1,this.readonly=!0,this.canEditJobPosition=!1,this.selectableJobPositions=[{value:"",text:this.translate.instant("General.None")}],this.isADPerson=!1,this.form=this.fb.group({workEmail:[""],workPhone:[""],jobTitle:[""],firstName:[""],lastName:[""],personAdNames:[""],id:[""],address:this.fb.group({street:[""],postalCode:[""],city:[""]})}),this.originalValue={},this.auth=this.siviProjectsGatewayService.getAuthService()}ngOnInit(){this.contentLoader.showLoader(),this.staffId===Z.Constants.NEW_ID?this.initNewStaffMember():this.initOldStaffMember()}initNewStaffMember(){this.staffMember=this.getNewStaffMember(),this.setEditingPermissions(this.staffMember),this.initStaffMemberForm(this.staffMember),this.getJobPositionTitles().subscribe(q=>{this.initTitles(q),this.contentLoader.showContent([this.staffMember])},q=>{console.error("Fetching titles failed",q),this.contentLoader.showError()})}initOldStaffMember(){const q=this.getStaffMember(this.staffId),W=this.getJobPositionTitles();(0,be.a)([q,W]).subscribe(([dt,fn])=>{this.setEditingPermissions(dt),this.staffMember=dt,this.initStaffMemberForm(this.staffMember),this.initTitles(fn),this.contentLoader.showContent([this.staffMember])},dt=>{console.error("Initializing form failed",dt),this.contentLoader.showError()})}initTitles(q){this.selectableJobPositions=[...this.selectableJobPositions,...this.translateJobTitles(q.childCodes)]}initStaffMemberForm(q){this.form.patchValue(q),this.originalValue=this.form.value,this.setValidators()}setValidators(){const q=this.readonly?[]:Z.SiviValidators.validateEmail(),W=this.readonly?[]:Z.SiviValidators.validatePhoneNumber();this.form.get("workPhone").setValidators(W),this.form.get("workEmail").setValidators(q)}getStaffMember(q){return this.staffService.getStaffMember(q).pipe((0,D.q)(1))}setEditingPermissions(q){this.readonly=!this.auth.hasAnyRole(Z.Permissions.StaffMember.CAN_EDIT_STAFF_BASIC_INFO),this.canEditContact=q.editable,this.canEditJobPosition=this.auth.hasAnyRole([Z.Roles.MUNICIPALITY_ADMIN]),q.editable||(this.readonly=!0,this.canEditContact=!1,this.canEditJobPosition=!1)}getJobPositionTitles(){return this.staffService.getJobPositionTitlesForEcec().pipe((0,D.q)(1))}saveStaffMember(){const q=this.form.value;this.isValidForm()?(this.contentLoader.showSavingLoader(),this.staffService.saveStaffMember(q).pipe((0,D.q)(1)).subscribe(W=>{this.staffMember.id=W.id,this.initStaffMemberForm(W),this.notify.toastSaveSuccess(),this.contentLoader.hideLoader()},W=>{console.error("saveStaffMember failed",W),this.contentLoader.hideLoader(),401!==W.status?this.notify.alertBackendError(W,"Message.Save.Error"):this.notify.alertNoPermissionError()})):this.goToInvalid$.next()}canDeactivate(){return(0,ve.Z)(this.form.value,this.originalValue)}onValidatorValuesChange(q){super.onValidatorValuesChange(q);const W=q.detail;this.staffMember={...this.staffMember,...W}}updateStaffMemberContactDetail(q){const W=q.detail;this.staffMember={...this.staffMember,[W.name]:W.value}}updateStaffMemberPersonData(q){this.form.get("firstName").patchValue(q.firstName),this.form.get("lastName").patchValue(q.lastName)}onDismiss(){this.unsavedChanges.canDeactivate(this).pipe((0,D.q)(1)).subscribe(q=>{q&&this.modalCtrl.dismiss(null)})}translateJobTitles(q){const W=[];for(const dt of q)W.push({text:this.translate.instant(dt.name),value:dt.name});return W}updatePersonBasicInfoFormStatus(q){this.basicInformationFormIsValid=q}getNewStaffMember(){return{id:"",firstName:"",lastName:"",username:"",jobTitle:"",workPhone:"",workEmail:""}}isValidForm(){return this.isValid&&this.basicInformationFormIsValid}}Ju.\u0275fac=function(q){return new(q||Ju)(e.Y36(Z.NotifyService),e.Y36(Oe.sK),e.Y36(Z.SiviModalController),e.Y36(Z.UnsavedChangesGuard),e.Y36(Z.StaffService),e.Y36(Z.SiviProjectsGatewayService),e.Y36(nt.QS))},Ju.\u0275cmp=e.Xpm({type:Ju,selectors:[["sivi-organizations-staff-editor"]],viewQuery:function(q,W){if(1&q&&e.Gf(cc,7),2&q){let dt;e.iGM(dt=e.CRH())&&(W.contentLoader=dt.first)}},inputs:{staffId:"staffId"},features:[e.qOj],decls:13,vars:10,consts:[["role","dialog"],[3,"hideNotifications","closeButton","closed"],["navbar-title",""],[4,"ngIf"],["navbar-buttons-right",""],[3,"clicked",4,"ngIf"],["id","staff-editor-wrapper",1,"ion-padding",3,"siviGoToInvalid"],["siviLibForm","",3,"formGroup"],[3,"skeleton"],["contentLoader",""],[3,"readonly","person","showPIN","update","componentStatus",4,"ngIf"],["class","ion-no-padding",4,"ngIf"],[3,"clicked"],[3,"readonly","person","showPIN","update","componentStatus"],[1,"ion-no-padding"],["siviGridCol","left"],["formControlName","workPhone","siviLibFormControl","","type","text","label-position","floating",3,"viewMode","label","siviChange"],["siviGridCol","right"],["formControlName","workEmail","siviLibFormControl","","type","text","label-position","floating",3,"viewMode","label","siviChange"],[1,"job-position"],["formControlName","jobTitle","siviLibFormControl","",3,"viewMode","options","label"]],template:function(q,W){1&q&&(e.TgZ(0,"ion-header",0)(1,"sivi-lib-navbar",1),e.NdJ("closed",function(){return W.onDismiss()}),e.TgZ(2,"div",2),e.YNc(3,Rs,3,3,"span",3),e.YNc(4,xc,3,3,"span",3),e.qZA(),e.TgZ(5,"div",4),e.YNc(6,Hc,1,0,"sivi-lib-navbar-action-button",5),e.qZA()()(),e.TgZ(7,"ion-content",6)(8,"form",7)(9,"sivi-lib-content-loader",8,9),e.YNc(11,lp,1,3,"sivi-organizations-staff-basic-info",10),e.YNc(12,kp,14,16,"ion-grid",11),e.qZA()()()),2&q&&(e.xp6(1),e.Q6J("hideNotifications",!0)("closeButton",!0),e.xp6(2),e.Q6J("ngIf",!(null!=W.staffMember&&W.staffMember.id)),e.xp6(1),e.Q6J("ngIf",null==W.staffMember?null:W.staffMember.id),e.xp6(2),e.Q6J("ngIf",W.canEditContact),e.xp6(1),e.Q6J("siviGoToInvalid",W.goToInvalid$),e.xp6(1),e.Q6J("formGroup",W.form),e.xp6(1),e.Q6J("skeleton","form"),e.xp6(2),e.Q6J("ngIf",W.staffMember),e.xp6(1),e.Q6J("ngIf",W.staffMember))},dependencies:[Be.wI,Be.W2,Be.jY,Be.Gu,Be.Nd,ke.O5,nt._Y,nt.JJ,nt.JL,Z.GridColDirective,Z.GoToInvalidDirective,Z.ContentLoaderComponent,Z.NavbarComponent,Z.NavbarActionButtonComponent,Z.SiviFormDirective,Z.SiviFormControlDirective,nt.sg,nt.u,Z.SelectComponent,Ia,Oe.X$,Z.firstNameLastNamePipe],encapsulation:2});class Su{}function qs(_t,q){if(1&_t&&(e.TgZ(0,"ion-col",5),e._UZ(1,"cgi-input",1),e.ALo(2,"translate"),e.qZA()),2&_t){const W=e.oxw();e.xp6(1),e.Q6J("value",(null==W.staff?null:W.staff.nickName)||"-")("viewMode",!0)("label",e.lcZ(2,3,"Form.Label.NickName"))}}Su.\u0275fac=function(q){return new(q||Su)},Su.\u0275mod=e.oAB({type:Su}),Su.\u0275inj=e.cJS({providers:[Z.SiviModalController],imports:[Z.SiviCorePageModule,Z.DirectivesModule,Z.SiviFormsModule,Z.SelectComponentModule,Z.PipesModule,vi]});class Cd extends Z.SiviComponent{constructor(q){super(),this.translate=q,this.showNickName=!1}}Cd.\u0275fac=function(q){return new(q||Cd)(e.Y36(Oe.sK))},Cd.\u0275cmp=e.Xpm({type:Cd,selectors:[["sivi-organizations-staff-view-mode"]],inputs:{staff:"staff",showNickName:"showNickName"},features:[e.qOj],decls:21,vars:28,consts:[["siviGridCol","left",1,"ion-no-padding"],[3,"value","viewMode","label"],["siviGridCol","right",1,"ion-no-padding"],["class","ion-no-padding",4,"ngIf"],[3,"value","label","viewMode"],[1,"ion-no-padding"],[3,"label","value","viewMode"]],template:function(q,W){1&q&&(e.TgZ(0,"ion-row")(1,"ion-col",0),e._UZ(2,"cgi-input",1),e.ALo(3,"translate"),e.qZA(),e.TgZ(4,"ion-col",2),e._UZ(5,"cgi-input",1),e.ALo(6,"translate"),e.qZA()(),e.TgZ(7,"ion-row"),e.YNc(8,qs,3,5,"ion-col",3),e.qZA(),e.TgZ(9,"ion-row")(10,"ion-col",0),e._UZ(11,"cgi-input",4),e.ALo(12,"translate"),e.qZA(),e.TgZ(13,"ion-col",2),e._UZ(14,"cgi-input",4),e.ALo(15,"translate"),e.qZA()(),e.TgZ(16,"ion-row")(17,"ion-col",5),e._UZ(18,"cgi-input",6),e.ALo(19,"translate"),e.ALo(20,"translate"),e.qZA()()),2&q&&(e.xp6(2),e.Q6J("value",(null==W.staff?null:W.staff.firstName)||"-")("viewMode",!0)("label",e.lcZ(3,16,"Form.Label.FirstName")),e.xp6(3),e.Q6J("value",(null==W.staff?null:W.staff.lastName)||"-")("viewMode",!0)("label",e.lcZ(6,18,"Form.Label.LastName")),e.xp6(3),e.Q6J("ngIf",W.showNickName),e.xp6(3),e.Q6J("value",W.staff.workPhone||"-")("label",e.lcZ(12,20,"General.Phone"))("viewMode",!0),e.xp6(3),e.Q6J("value",W.staff.workEmail||"-")("label",e.lcZ(15,22,"General.Email"))("viewMode",!0),e.xp6(4),e.Q6J("label",e.lcZ(19,24,"General.Text.JobPositionTitle"))("value",e.lcZ(20,26,null==W.staff?null:W.staff.jobTitle)||"-")("viewMode",!0))},dependencies:[Be.wI,Be.Nd,ke.O5,Z.GridColDirective,Oe.X$],encapsulation:2});class la{}la.\u0275fac=function(q){return new(q||la)},la.\u0275mod=e.oAB({type:la}),la.\u0275inj=e.cJS({imports:[Z.SiviCorePageModule,vi]});const ht=["contentLoader"];function Ke(_t,q){if(1&_t&&(e.TgZ(0,"div",7),e._uU(1),e.ALo(2,"firstNameLastName"),e.qZA()),2&_t){const W=e.oxw();e.xp6(1),e.hij(" ",e.lcZ(2,1,W.staff)," ")}}function dn(_t,q){if(1&_t){const W=e.EpF();e.TgZ(0,"sivi-lib-navbar-more-options",8),e.NdJ("clickedSettings",function(){e.CHM(W);const fn=e.oxw();return e.KtG(fn.openStaffEditorModal(fn.staff.id))}),e.ALo(1,"translate"),e.qZA()}2&_t&&e.Q6J("showSettings",!0)("ariaLabel",e.lcZ(1,2,"Staff.BasicInfo"))}function Kn(_t,q){if(1&_t){const W=e.EpF();e.TgZ(0,"cgi-fab",13),e.NdJ("siviClick",function(){e.CHM(W);const fn=e.oxw(2);return e.KtG(fn.onClickAddNewRole())}),e.ALo(1,"translate"),e.qZA()}2&_t&&e.uIk("aria-label",e.lcZ(1,1,"Role.Add"))}function $i(_t,q){if(1&_t){const W=e.EpF();e.ynx(0),e.TgZ(1,"h4",9),e._uU(2),e.ALo(3,"translate"),e.qZA(),e._UZ(4,"sivi-organizations-staff-view-mode",10),e.YNc(5,Kn,2,3,"cgi-fab",11),e.TgZ(6,"sivi-organizations-role-state",12),e.NdJ("removeNewRole",function(fn){e.CHM(W);const Ei=e.oxw();return e.KtG(Ei.removeRole(fn))})("saveRole",function(fn){e.CHM(W);const Ei=e.oxw();return e.KtG(Ei.onSaveRole(fn))})("inactivateRole",function(fn){e.CHM(W);const Ei=e.oxw();return e.KtG(Ei.inactivateRole(fn))}),e.qZA(),e.BQk()}if(2&_t){const W=e.oxw();e.xp6(2),e.Oqu(e.lcZ(3,7,"Title.BasicInformation")),e.xp6(2),e.Q6J("staff",W.staff),e.xp6(1),e.Q6J("ngIf",W.canAddNewRole&&!W.hasNewRoleCard&&!W.isUserEditingOwnData()),e.xp6(1),e.Q6J("user",W.staff)("municipalityId",W.municipalityId)("readonly",W.isUserEditingOwnData())("permissions",W.permissions)}}class sr extends Z.SiviPage{get shouldBeAbleToOpenStaffEditor(){return!!this.permissions?.[this.staffMemberId]}constructor(q,W,dt,fn,Ei,Po,En,ls,Au){super(W,q,fn,dt,Au,En),this.translate=q,this.notify=W,this.route=dt,this.router=fn,this.siviProjectsGatewayService=Ei,this.staffService=Po,this.modalCtrl=En,this.cdr=ls,this.location=Au,this.municipalityId=this.route.snapshot.paramMap.get("municipalityId"),this.staffMemberId=this.route.snapshot.paramMap.get("staffId"),this.auth=this.siviProjectsGatewayService.getAuthService(),this.canAddNewRole=this.auth.hasAnyRole([Z.Roles.MUNICIPALITY_ADMIN,Z.Roles.ECEC_LEAD,Z.Roles.DCP_CHIEF])}ngOnInit(){this.restoreModal(),this.getStaffMember(this.staffMemberId),this.getStaffMemberPermissions(),this.auth.getUserPersonData().pipe((0,D.q)(1)).subscribe(q=>this.user=q)}ngDoCheck(){this.cdr.detectChanges()}getStaffMember(q){this.contentLoader.showLoader(),this.staffService.getStaffMemberWithRoles(q).pipe((0,D.q)(1)).subscribe(W=>{let dt=(0,ge.Z)(W.roles);dt&&dt.length&&(dt=dt.filter(fn=>fn.roleName!==Z.Roles.ORGANIZATION_MEMBER)),this.staff={...W,roles:dt,organizationId:this.municipalityId,jobTitle:W.jobTitle},this.contentLoader.showContent([this.staff]),this.watchForValueChanges([this.staff])},W=>{console.error("getStaffMember failed",W),this.contentLoader.showError()})}getStaffMemberPermissions(){this.staffService.getStaffMemberPermissions(this.staffMemberId).pipe((0,l.U)(q=>this.mapPermissionsToKeyValue(q)),(0,l.U)(q=>this.auth.mapPermissionsForSupportUser(q))).subscribe(q=>this.permissions=q,q=>{console.error("getStaffMemberPermissions failed",q),this.contentLoader.showError()})}mapPermissionsToKeyValue(q){const W=(q?.roles||[]).reduce((dt,fn)=>({...dt,[fn.id]:fn.canEdit}),{});return{[q.id]:q.canEdit,...W}}onClickAddNewRole(){this.staff.roles||(this.staff.roles=[]);const q={validFrom:"",validUntil:"",organizationId:null,roleId:null,restEntityState:"NEW",tempId:(Date.now()*Math.random()).toString()},W=(0,ge.Z)(this.staff.roles);W.push(q),this.staff={...this.staff,roles:W}}removeRole(q){const W=(0,ge.Z)(this.staff.roles).filter(dt=>dt.tempId!==q);this.staff={...this.staff,roles:W}}inactivateRole(q){this.staffService.inactivateStaffRole(q).pipe((0,D.q)(1)).subscribe(W=>{const dt=(0,ge.Z)(this.staff.roles),fn=dt.find(Ei=>Ei.id===W.id);fn.restEntityState=W.restEntityState,fn.validUntil=W.validUntil,this.staff={...this.staff,roles:dt},this.notify.toastSaveSuccess()},W=>{console.error("Inactivating role failed",W),401!==W.status?this.notify.alertSaveError():this.notify.alertNoPermissionError()})}onSaveRole(q){var W=this;return(0,o.Z)(function*(){try{yield W.saveRole(q),W.getStaffMemberPermissions()}catch(dt){console.error(dt)}})()}saveRole(q){var W=this;return(0,o.Z)(function*(){try{const dt=W.getRolePayload(q),fn=yield W.staffService.saveStaffRole(dt).pipe((0,D.q)(1)).toPromise(),Ei={...q,...fn},Po=W.getUpdatedRoles(Ei);W.staff={...W.staff,roles:Po},W.notify.toastSaveSuccess()}catch(dt){console.error("Saving a role failed",dt),W.notify.alertBackendError(dt,"Message.Save.Error")}})()}getUpdatedRoles(q){return q.tempId?(()=>this.staff.roles.reduce((dt,fn)=>fn.tempId===q.tempId?[q,...dt]:[...dt,fn],[]))():Z.Utils.patchImmutableCollectionBy(this.staff.roles,q,"id")}getRolePayload(q){return{organizationId:q.organizationId,roleId:q.roleId,personId:this.staff.id,validFrom:q.validFrom,validUntil:q.validUntil||null,id:q.id||""}}isUserEditingOwnData(){return this.user.userId===this.staff.id}openStaffEditorModal(q){var W=this;return(0,o.Z)(function*(){const dt={component:Ju,componentProps:{municipalityId:W.municipalityId,staffId:q},cssClass:"modal-full-size"};(yield W.openModal(dt,Z.Constants.MODAL,Z.Constants.SETTINGS)).onDidDismiss().then(()=>{W.getStaffMember(W.staffMemberId)})})()}restoreModal(){this.route.snapshot.queryParamMap.get(Z.Constants.MODAL)===Z.Constants.SETTINGS&&this.openStaffEditorModal(this.staffMemberId)}}sr.\u0275fac=function(q){return new(q||sr)(e.Y36(Oe.sK),e.Y36(Z.NotifyService),e.Y36(j.gz),e.Y36(j.F0),e.Y36(Z.SiviProjectsGatewayService),e.Y36(Z.StaffService),e.Y36(Z.SiviModalController),e.Y36(e.sBO),e.Y36(ke.Ye))},sr.\u0275cmp=e.Xpm({type:sr,selectors:[["sivi-organizations-staff-page"]],viewQuery:function(q,W){if(1&q&&e.Gf(ht,7),2&q){let dt;e.iGM(dt=e.CRH())&&(W.contentLoader=dt.first)}},features:[e.qOj],decls:9,vars:4,consts:[["data-cy","staff-navbar",3,"backButton"],["navbar-title","",4,"ngIf"],["navbar-buttons-right",""],[3,"showSettings","ariaLabel","clickedSettings",4,"ngIf"],[1,"ion-padding"],["contentLoader",""],[4,"ngIf"],["navbar-title",""],[3,"showSettings","ariaLabel","clickedSettings"],[1,"weight-bold"],[3,"staff"],["siviKeyboardEvents","","tabindex","0","role","link",3,"siviClick",4,"ngIf"],[3,"user","municipalityId","readonly","permissions","removeNewRole","saveRole","inactivateRole"],["siviKeyboardEvents","","tabindex","0","role","link",3,"siviClick"]],template:function(q,W){1&q&&(e.TgZ(0,"ion-header")(1,"sivi-lib-navbar",0),e.YNc(2,Ke,3,3,"div",1),e.TgZ(3,"div",2),e.YNc(4,dn,2,4,"sivi-lib-navbar-more-options",3),e.qZA()()(),e.TgZ(5,"ion-content",4)(6,"sivi-lib-content-loader",null,5),e.YNc(8,$i,7,9,"ng-container",6),e.qZA()()),2&q&&(e.xp6(1),e.Q6J("backButton",!0),e.xp6(1),e.Q6J("ngIf",W.staff),e.xp6(2),e.Q6J("ngIf",W.shouldBeAbleToOpenStaffEditor),e.xp6(4),e.Q6J("ngIf",W.staff))},dependencies:[Be.W2,Be.Gu,ke.O5,Z.KeyboardEventsDirective,Z.ContentLoaderComponent,Z.NavbarComponent,Z.NavbarMoreOptionsComponent,Qo,Cd,Oe.X$,Z.firstNameLastNamePipe],encapsulation:2});const lo=[{path:"",component:sr}];class ga{}function Zs(_t,q){1&_t&&(e.TgZ(0,"th",16),e._uU(1),e.ALo(2,"translate"),e.qZA()),2&_t&&(e.xp6(1),e.Oqu(e.lcZ(2,1,"Form.Label.LastName")))}function Kr(_t,q){if(1&_t&&(e.TgZ(0,"td",17),e._uU(1),e.qZA()),2&_t){const W=q.$implicit;e.xp6(1),e.hij(" ",W.lastName," ")}}function os(_t,q){1&_t&&(e.TgZ(0,"th",16),e._uU(1),e.ALo(2,"translate"),e.qZA()),2&_t&&(e.xp6(1),e.Oqu(e.lcZ(2,1,"Form.Label.FirstName")))}function _s(_t,q){if(1&_t&&(e.TgZ(0,"td",17),e._uU(1),e.qZA()),2&_t){const W=q.$implicit;e.xp6(1),e.hij(" ",W.firstName," ")}}function ra(_t,q){1&_t&&(e.TgZ(0,"th",18),e._uU(1),e.ALo(2,"translate"),e.qZA()),2&_t&&(e.xp6(1),e.Oqu(e.lcZ(2,1,"Role.Plural")))}function _a(_t,q){1&_t&&(e.ynx(0),e._uU(1,", "),e.BQk())}function xl(_t,q){if(1&_t&&(e.ynx(0),e._uU(1),e.ALo(2,"translate"),e.YNc(3,_a,2,0,"ng-container",19),e.BQk()),2&_t){const W=q.$implicit,dt=q.last,fn=e.oxw(2).$implicit;e.xp6(1),e.AsE(" ",W.organizationName," (",e.lcZ(2,3,W.name)+fn.startAndEndDate,") "),e.xp6(2),e.Q6J("ngIf",!dt)}}function $l(_t,q){if(1&_t&&(e.TgZ(0,"span"),e.YNc(1,xl,4,5,"ng-container",20),e.qZA()),2&_t){const W=e.oxw().$implicit,dt=e.oxw();e.xp6(1),e.Q6J("ngForOf",W.professionalRoles)("ngForTrackBy",dt.trackByFn)}}function Os(_t,q){if(1&_t&&(e.TgZ(0,"td",17),e.YNc(1,$l,2,2,"span",19),e.qZA()),2&_t){const W=q.$implicit;e.xp6(1),e.Q6J("ngIf",W.professionalRoles)}}function yu(_t,q){1&_t&&(e.TgZ(0,"th",16),e._uU(1),e.ALo(2,"translate"),e.qZA()),2&_t&&(e.xp6(1),e.Oqu(e.lcZ(2,1,"Form.Label.AdNames")))}function Ks(_t,q){if(1&_t&&(e.TgZ(0,"span"),e._uU(1),e.qZA()),2&_t){const W=e.oxw().$implicit;e.xp6(1),e.hij(" ",W.personAdName," ")}}function _l(_t,q){if(1&_t&&(e.TgZ(0,"td",17),e.YNc(1,Ks,2,1,"span",19),e.qZA()),2&_t){const W=q.$implicit;e.xp6(1),e.Q6J("ngIf",W.personAdName)}}function Dc(_t,q){1&_t&&e._UZ(0,"tr",21)}ga.\u0275fac=function(q){return new(q||ga)},ga.\u0275mod=e.oAB({type:ga}),ga.\u0275inj=e.cJS({providers:[Z.CodeService,Z.OrganizationService,Z.OrganizationCommonService,mi,wi,Z.SiviModalController],imports:[Z.SiviCorePageModule,Su,ss,_c,oo,j.Bz.forChild(lo),la,Z.PipesModule,vi]});const Gs=function(_t){return{pointer:_t}};function Ed(_t,q){if(1&_t){const W=e.EpF();e.TgZ(0,"tr",22),e.NdJ("click",function(){const Ei=e.CHM(W).$implicit,Po=e.oxw();return e.KtG(Ei.canOpen&&Po.navigateToStaffMember(Ei))}),e.qZA()}if(2&_t){const W=q.$implicit;e.Q6J("ngClass",e.VKq(1,Gs,W.canOpen))}}class zl extends Z.SiviPage{constructor(q,W,dt,fn,Ei,Po,En,ls,Au){super(W,q,fn,Ei,Po,En),this.translate=q,this.notifyService=W,this.staffService=dt,this.router=fn,this.route=Ei,this.location=Po,this.modalCtrl=En,this.organizationCommonService=ls,this.siviProjectsGatewayService=Au,this.organizationId=Z.Utils.getPathParamFromRouterSnapshot("organizationId",this.router.routerState.snapshot.root),this.municipalityId=Z.Utils.getPathParamFromRouterSnapshot("municipalityId",this.router.routerState.snapshot.root),this.pageSizeOptions=Z.Constants.PAGINATOR_PAGE_SIZES,this.initialPager={pageIndex:0,pageSize:100,length:0},this.staffPagerValue=this.initialPager,this.dataSource=new Ne.by,this.roles=Z.Roles,this.environment=Z.Environment,this.staffEntityStates$=new xe.x,this.staffSearchTerm$=new xe.x,this.staffPagerValueChange$=new xe.x,this.auth=this.siviProjectsGatewayService.getAuthService()}ngOnInit(){this.restoreModal(),this.displayedColumns=this.getDisplayedColumns()}ionViewDidEnter(){this.watchFilters()}ionViewDidLeave(){this.destroy$.next()}onStaffSearchTermChange(q){this.staffSearchTerm$.next(q.detail.value)}onPageChange(q){this.staffPagerValueChange$.next(q)}watchFilters(){const q=[this.staffSearchTerm$.pipe((0,ae.O)(""),(0,n.b)(500),(0,l.U)(W=>W.length>2?W:"")),this.staffPagerValueChange$.pipe((0,ae.O)(this.initialPager)),this.sort.sortChange.pipe((0,ae.O)(""))];(0,be.a)(q).pipe((0,ue.x)((W,dt)=>(0,ve.Z)(W,dt)),(0,E.R)(this.destroy$),(0,T.w)(W=>this.handleFetchStaff(W))).subscribe(W=>W.forEach(dt=>dt.startAndEndDate=this.getStartAndEndDate(dt.roles[0]),this.dataSource.data=W))}handleFetchStaff(q){const W=dt=>this.staffService.getStaff(dt,this.organizationId).pipe((0,V.K)(()=>oe.E));return(0,me.of)(q).pipe((0,l.U)(([dt,fn,Ei])=>this.mapToSearchParams(dt,fn,Ei)),(0,T.w)(dt=>W(dt)),(0,P.b)(dt=>this.staffPagerValue=Z.SiviUtils.convertPageableToPageEvent(dt)),(0,l.U)(dt=>this.processStaffMembersRoles(dt)))}navigateToStaffMember(q){this.router.navigateByUrl("municipalities/"+this.municipalityId+"/staff/"+q.id)}processStaffMembersRoles(q){return q.content.map(W=>({...W,professionalRoles:this.getStaffMemberUniqueProfessionalRoles(W.roles)}))}getStaffMemberUniqueProfessionalRoles(q){const Po=[...q.filter(ls=>ls.organizationType===Z.OrganizationTypes.MUNICIPALITY).map(ls=>({name:ls.roleName,organizationName:ls.organizationName})),...q.filter(ls=>this.organizationCommonService.isTypeOfOrganizationGeneral(ls.organizationType)).map(ls=>({name:ls.roleName,organizationName:ls.organizationName})),...q.filter(ls=>this.organizationCommonService.isTypeOfUnit(ls.organizationType)).map(ls=>({name:ls.roleName,organizationName:ls.organizationName})),...q.filter(ls=>this.organizationCommonService.isTypeOfGroup(ls.organizationType)).map(ls=>({name:ls.roleName,organizationName:ls.organizationName}))];return Z.Utils.mapToUniqueArrayObjects(Po,"name")}restoreModal(){Z.Utils.getParamFromURL("modal")===Z.Constants.NEW_ID&&this.addStaffMember()}getStartAndEndDate(q){if(!q)return;return`, ${q.validFrom?Z.Utils.convertDateToFinnishStandard(q.validFrom)+" -":""} ${q.validTo?Z.Utils.convertDateToFinnishStandard(q.validTo):""}`}addStaffMember(){var q=this;return(0,o.Z)(function*(){const W={component:Ju,componentProps:{municipalityId:q.organizationId,staffId:Z.Constants.NEW_ID},cssClass:"modal-full-size"};yield q.openModal(W,Z.Constants.MODAL,Z.Constants.NEW_ID)})()}mapToSearchParams(q,W,dt){return{filters:{...q.length>2&&{searchTerm:q}},pager:W,...dt.active&&dt.direction&&{sortParam:[dt.active,dt.direction].join(",")}}}getDisplayedColumns(){return["lastName","firstName","professionalRoles",...this.auth.hasAnyRole([Z.Roles.MUNICIPALITY_ADMIN,Z.Roles.ECEC_LEAD,Z.Roles.DCP_CHIEF])?["adName"]:[]]}}zl.\u0275fac=function(q){return new(q||zl)(e.Y36(Oe.sK),e.Y36(Z.NotifyService),e.Y36(Z.StaffService),e.Y36(j.F0),e.Y36(j.gz),e.Y36(ke.Ye),e.Y36(Z.SiviModalController),e.Y36(Z.OrganizationCommonService),e.Y36(Z.SiviProjectsGatewayService))},zl.\u0275cmp=e.Xpm({type:zl,selectors:[["sivi-organizations-staff-list"]],viewQuery:function(q,W){if(1&q&&e.Gf(wt.YE,5),2&q){let dt;e.iGM(dt=e.CRH())&&(W.sort=dt.first)}},features:[e.qOj],decls:27,vars:15,consts:[[1,"p3"],[3,"text"],[1,"staff-filter"],["position","floating"],[3,"ionChange"],["mat-table","","matSort","",1,"mat-elevation-z8",3,"dataSource","trackBy"],["matColumnDef","lastName"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","firstName"],["matColumnDef","professionalRoles"],["mat-header-cell","",4,"matHeaderCellDef"],["matColumnDef","adName"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","","siviKeyboardEvents","",3,"ngClass","click",4,"matRowDef","matRowDefColumns"],[3,"length","pageIndex","pageSize","pageSizeOptions","page"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],["mat-header-cell",""],[4,"ngIf"],[4,"ngFor","ngForOf","ngForTrackBy"],["mat-header-row",""],["mat-row","","siviKeyboardEvents","",3,"ngClass","click"]],template:function(q,W){1&q&&(e.TgZ(0,"ion-content")(1,"div",0)(2,"h1"),e._uU(3),e.ALo(4,"translate"),e._UZ(5,"sivi-lib-info-popup",1),e.qZA(),e.TgZ(6,"ion-item",2)(7,"ion-label",3),e._uU(8),e.ALo(9,"translate"),e.qZA(),e.TgZ(10,"ion-input",4),e.NdJ("ionChange",function(fn){return W.onStaffSearchTermChange(fn)}),e.qZA()(),e.TgZ(11,"table",5),e.ynx(12,6),e.YNc(13,Zs,3,3,"th",7),e.YNc(14,Kr,2,1,"td",8),e.BQk(),e.ynx(15,9),e.YNc(16,os,3,3,"th",7),e.YNc(17,_s,2,1,"td",8),e.BQk(),e.ynx(18,10),e.YNc(19,ra,3,3,"th",11),e.YNc(20,Os,2,1,"td",8),e.BQk(),e.ynx(21,12),e.YNc(22,yu,3,3,"th",7),e.YNc(23,_l,2,1,"td",8),e.BQk(),e.YNc(24,Dc,1,0,"tr",13),e.YNc(25,Ed,1,3,"tr",14),e.qZA(),e.TgZ(26,"mat-paginator",15),e.NdJ("page",function(fn){return W.onPageChange(fn)}),e.qZA()()()),2&q&&(e.xp6(3),e.hij("",e.lcZ(4,11,"Staff.Plural")," "),e.xp6(2),e.Q6J("text","Organization.Staff.Info"),e.xp6(3),e.Oqu(e.lcZ(9,13,"Form.Label.Filter")),e.xp6(3),e.Q6J("dataSource",W.dataSource)("trackBy",W.trackByFnIndex),e.xp6(13),e.Q6J("matHeaderRowDef",W.displayedColumns),e.xp6(1),e.Q6J("matRowDefColumns",W.displayedColumns),e.xp6(1),e.Q6J("length",W.staffPagerValue.length)("pageIndex",W.staffPagerValue.pageIndex)("pageSize",W.staffPagerValue.pageSize)("pageSizeOptions",W.pageSizeOptions))},dependencies:[Ne.BZ,Ne.fO,Ne.as,Ne.w1,Ne.Dz,Ne.nj,Ne.ge,Ne.ev,Ne.XQ,Ne.Gk,tt.NW,wt.YE,wt.nU,Z.InfoPopupComponent,Be.W2,Be.pK,Be.Ie,Be.Q$,Be.j9,ke.mk,ke.sg,ke.O5,Z.KeyboardEventsDirective,Oe.X$],styles:["table[_ngcontent-%COMP%]{width:100%}.no-data-div[_ngcontent-%COMP%]{width:100%;text-align:center;padding:20px;display:table}.mh2[_ngcontent-%COMP%]{margin-bottom:0;margin-left:10px}.staff-filter[_ngcontent-%COMP%]{margin-bottom:1em}.mat-column-uniqueRoles[_ngcontent-%COMP%]{padding:0 10px}.mat-column-startDate[_ngcontent-%COMP%], .mat-column-endDate[_ngcontent-%COMP%]{width:130px;max-width:130px}"]});const vl=[{path:"",component:zl}];class Lc{}function Xe(_t,q){1&_t&&(e.TgZ(0,"th",22),e._uU(1),e.ALo(2,"translate"),e.qZA()),2&_t&&(e.xp6(1),e.Oqu(e.lcZ(2,1,"Form.Label.LastName")))}function zt(_t,q){if(1&_t&&(e.TgZ(0,"td",23),e._uU(1),e.qZA()),2&_t){const W=q.$implicit;e.xp6(1),e.hij(" ",W.lastName," ")}}function mn(_t,q){1&_t&&(e.TgZ(0,"th",22),e._uU(1),e.ALo(2,"translate"),e.qZA()),2&_t&&(e.xp6(1),e.Oqu(e.lcZ(2,1,"Form.Label.FirstName")))}function ni(_t,q){if(1&_t&&(e.TgZ(0,"td",23),e._uU(1),e.qZA()),2&_t){const W=q.$implicit;e.xp6(1),e.hij(" ",W.firstName," ")}}function Fi(_t,q){1&_t&&(e.TgZ(0,"th",24),e._uU(1),e.ALo(2,"translate"),e.qZA()),2&_t&&(e.xp6(1),e.Oqu(e.lcZ(2,1,"Form.Label.Unit")))}function nr(_t,q){if(1&_t&&(e.TgZ(0,"td",23),e._uU(1),e.qZA()),2&_t){const W=q.$implicit;e.xp6(1),e.hij(" ",null==W?null:W.unitName.join(", ")," ")}}function zo(_t,q){1&_t&&e._UZ(0,"tr",25)}function oa(_t,q){if(1&_t){const W=e.EpF();e.TgZ(0,"tr",26),e.NdJ("click",function(){const Ei=e.CHM(W).$implicit,Po=e.oxw();return e.KtG(Po.navigateToChild(Ei))}),e.qZA()}}function Ca(_t,q){if(1&_t){const W=e.EpF();e.TgZ(0,"sivi-organizations-children-list",27),e.NdJ("selectChild",function(fn){e.CHM(W);const Ei=e.oxw();return e.KtG(Ei.navigateToChild(fn))}),e.ALo(1,"async"),e.qZA()}if(2&_t){const W=e.oxw();e.Q6J("children",e.lcZ(1,1,W.dataSource.connect(null)))}}Lc.\u0275fac=function(q){return new(q||Lc)},Lc.\u0275mod=e.oAB({type:Lc}),Lc.\u0275inj=e.cJS({providers:[Z.SiviModalController],imports:[Ne.p0,Z.SiviLibMatPaginatorModule,wt.JX,Z.SiviCoreComponentModule,Z.DataTableSourceStateModule,j.Bz.forChild(vl),Su,rn.VI.forChild(),Z.CheckboxListComponentModule,Z.InfoPopupComponentModule,vi]});const Ba=function(_t){return{selected:_t}},Is=function(_t){return{hidden:_t}},ul=function(_t){return{display:_t}};class bu extends Z.SiviComponent{constructor(q,W,dt,fn,Ei,Po){super(),this.translate=q,this.notifyService=W,this.organizationService=dt,this.router=fn,this.siviProjectsGatewayService=Ei,this.organizationCommonService=Po,this.municipalityId=Z.Utils.getPathParamFromRouterSnapshot("municipalityId",this.router.routerState.snapshot.root),this.organizationId=Z.Utils.getPathParamFromRouterSnapshot("organizationId",this.router.routerState.snapshot.root),this.displayedColumns=["lastName","firstName","unitName"],this.dataSource=new Z.DataTableSource,this.pageSizeOptions=Z.Constants.PAGINATOR_PAGE_SIZES,this.currentView="table",this.gridViewAvailable=!1,this.childSearchTerm$=new xe.x,this.initialPager={pageIndex:0,pageSize:100,length:0},this.appStateService=this.siviProjectsGatewayService.getAppStateService()}ionViewWillEnter(){this.dataSource=new Z.DataTableSource}ionViewDidEnter(){this.handleGetChildren(),this.appStateService.getOrganization().pipe((0,E.R)(this.destroy$)).subscribe(q=>{const W=!!q&&(this.organizationCommonService.isTypeOfGroup(q.organizationType)||this.organizationCommonService.isTypeOfUnit(q.organizationType));this.gridViewAvailable=W})}ionViewDidLeave(){this.destroy$.next()}handleGetChildren(){const q=this.childSearchTerm$.pipe((0,ae.O)(""),(0,n.b)(500),(0,l.U)(Po=>Po.length>2?Po:"")),W=this.sort.sortChange.pipe((0,ae.O)("")),dt=this.paginator.page.pipe((0,ae.O)(this.initialPager)),fn=q.pipe((0,X.M)(W,dt),(0,l.U)(([Po,En,ls])=>[Po,En,{...ls,pageIndex:0}])),Ei=(0,be.a)([W,dt]).pipe((0,X.M)(q),(0,l.U)(([[Po,En],ls])=>[ls,Po,En]));(0,le.T)(fn,Ei).pipe((0,ue.x)(ve.Z),(0,E.R)(this.destroy$)).subscribe(([Po,En,ls])=>{this.getChildren(this.mapToSearchParams(Po,En,ls))})}getChildren(q){const W=this.organizationService.getChildrenForOrganizationWithSearchParam(this.organizationId,q);this.dataSource.source(W)}navigateToChild(q){this.router.navigateByUrl("municipalities/"+this.municipalityId+"/children/"+q.id)}changeView(q){this.currentView=q}onChildSearchTermChange(q){this.childSearchTerm$.next(q.detail.value)}mapToSearchParams(q,W,dt){(!W.active||!W.direction)&&(W={active:"lastName",direction:"asc"});const fn=[W.active.toLowerCase(),W.direction].join(",");return{searchTerm:q,page:dt.pageIndex,count:dt.pageSize,sortParam:fn}}}bu.\u0275fac=function(q){return new(q||bu)(e.Y36(Oe.sK),e.Y36(Z.NotifyService),e.Y36(Z.OrganizationService),e.Y36(j.F0),e.Y36(Z.SiviProjectsGatewayService),e.Y36(Z.OrganizationCommonService))},bu.\u0275cmp=e.Xpm({type:bu,selectors:[["sivi-organizations-organization-children-list"]],viewQuery:function(q,W){if(1&q&&(e.Gf(tt.NW,7),e.Gf(wt.YE,5)),2&q){let dt;e.iGM(dt=e.CRH())&&(W.paginator=dt.first),e.iGM(dt=e.CRH())&&(W.sort=dt.first)}},features:[e.qOj],decls:36,vars:31,consts:[[1,"p3"],[1,"ion-no-padding"],[3,"text"],[1,"view-selector","ion-padding-vertical","ion-padding-horizontal"],["fill","outline","size","small",3,"ngClass","click"],["name","view_stream"],["name","view_module"],[1,"filter"],["position","floating"],[3,"ionChange"],[3,"state"],["mat-table","","matSort","",1,"mat-elevation-z8",3,"ngClass","dataSource","ngStyle","trackBy"],["matColumnDef","lastName",1,"pointer"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","firstName",1,"pointer"],["matColumnDef","unitName"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-header-row","",4,"matHeaderRowDef"],["class","pointer","mat-row","",3,"click",4,"matRowDef","matRowDefColumns"],[3,"children","selectChild",4,"ngIf"],[3,"length","pageSize","pageSizeOptions","pageIndex"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],["mat-header-cell",""],["mat-header-row",""],["mat-row","",1,"pointer",3,"click"],[3,"children","selectChild"]],template:function(q,W){1&q&&(e.TgZ(0,"ion-content")(1,"div",0)(2,"ion-grid",1)(3,"ion-row")(4,"ion-col",1)(5,"h1"),e._uU(6),e.ALo(7,"translate"),e._UZ(8,"sivi-lib-info-popup",2),e.qZA()(),e.TgZ(9,"ion-col",1)(10,"div",3)(11,"ion-button",4),e.NdJ("click",function(){return W.changeView("table")}),e._UZ(12,"cgi-icon",5),e.qZA(),e.TgZ(13,"ion-button",4),e.NdJ("click",function(){return W.changeView("grid")}),e._UZ(14,"cgi-icon",6),e.qZA()()()()(),e.TgZ(15,"ion-item",7)(16,"ion-label",8),e._uU(17),e.ALo(18,"translate"),e.qZA(),e.TgZ(19,"ion-input",9),e.NdJ("ionChange",function(fn){return W.onChildSearchTermChange(fn)}),e.qZA()(),e._UZ(20,"sivi-lib-data-table-source-state",10),e.ALo(21,"async"),e.TgZ(22,"table",11),e.ynx(23,12),e.YNc(24,Xe,3,3,"th",13),e.YNc(25,zt,2,1,"td",14),e.BQk(),e.ynx(26,15),e.YNc(27,mn,3,3,"th",13),e.YNc(28,ni,2,1,"td",14),e.BQk(),e.ynx(29,16),e.YNc(30,Fi,3,3,"th",17),e.YNc(31,nr,2,1,"td",14),e.BQk(),e.YNc(32,zo,1,0,"tr",18),e.YNc(33,oa,1,0,"tr",19),e.qZA(),e.YNc(34,Ca,2,3,"sivi-organizations-children-list",20),e._UZ(35,"mat-paginator",21),e.qZA()()),2&q&&(e.xp6(6),e.hij(" ",e.lcZ(7,17,"Child.Plural")," "),e.xp6(2),e.Q6J("text","Organization.Children.Info"),e.xp6(3),e.Q6J("ngClass",e.VKq(23,Ba,"table"===W.currentView)),e.xp6(2),e.Q6J("ngClass",e.VKq(25,Ba,"grid"===W.currentView)),e.xp6(4),e.Oqu(e.lcZ(18,19,"Form.Label.Filter")),e.xp6(3),e.Q6J("state",e.lcZ(21,21,W.dataSource.getState())),e.xp6(2),e.Q6J("ngClass",e.VKq(27,Is,"grid"===W.currentView))("dataSource",W.dataSource)("ngStyle",e.VKq(29,ul,W.dataSource.hasContent()?"table":"none"))("trackBy",W.trackByFnIndex),e.xp6(10),e.Q6J("matHeaderRowDef",W.displayedColumns),e.xp6(1),e.Q6J("matRowDefColumns",W.displayedColumns),e.xp6(1),e.Q6J("ngIf","grid"===W.currentView),e.xp6(1),e.Q6J("length",W.dataSource.getPaginatorOptions().length)("pageSize",W.dataSource.getPaginatorOptions().pageSize)("pageSizeOptions",W.pageSizeOptions)("pageIndex",W.dataSource.getPaginatorOptions().pageIndex))},dependencies:[Ne.BZ,Ne.fO,Ne.as,Ne.w1,Ne.Dz,Ne.nj,Ne.ge,Ne.ev,Ne.XQ,Ne.Gk,tt.NW,wt.YE,wt.nU,Z.DataTableSourceStateComponent,Z.InfoPopupComponent,Be.YG,Be.wI,Be.W2,Be.jY,Be.pK,Be.Ie,Be.Q$,Be.Nd,Be.j9,ke.mk,ke.O5,ke.PC,Ra,ke.Ov,Oe.X$],styles:["table[_ngcontent-%COMP%]{width:100%}.hidden[_ngcontent-%COMP%]{display:none!important}.view-selector[_ngcontent-%COMP%]{text-align:end}.view-selector[_ngcontent-%COMP%]   ion-button[_ngcontent-%COMP%]{min-width:40px;margin-bottom:4px;margin-top:4px;--border-width: 0;--padding-end: 0;--padding-start: 0}.view-selector[_ngcontent-%COMP%]   ion-button[_ngcontent-%COMP%]:hover, .view-selector[_ngcontent-%COMP%]   ion-button.selected[_ngcontent-%COMP%]{--border-width: 1px}.mat-column-lastName[_ngcontent-%COMP%], .mat-column-firstName[_ngcontent-%COMP%]{padding-right:20px}.filter[_ngcontent-%COMP%]{margin-bottom:1em}"]});const Zd=[{path:"",component:bu}];class Qu{}Qu.\u0275fac=function(q){return new(q||Qu)},Qu.\u0275mod=e.oAB({type:Qu}),Qu.\u0275inj=e.cJS({imports:[st,Ne.p0,Z.SiviLibMatPaginatorModule,wt.JX,Z.DataTableSourceStateModule,Z.SiviCoreComponentModule,j.Bz.forChild(Zd),ba,Z.InfoPopupComponentModule,vi]})},89383:(qe,I,p)=>{"use strict";p.d(I,{X$:()=>Z,Zw:()=>Y,aw:()=>Oe,sK:()=>be});var o=p(94650),e=p(39646),l=p(45191),D=p(4128),g=p(97272),E=p(49770),T=p(95698),n=p(34782),P=p(54004),w=p(24351),B=p(63900);class Y{}class V extends Y{getTranslation(ke){return(0,e.of)({})}}V.\u0275fac=function(){let j;return function(Be){return(j||(j=o.n5z(V)))(Be||V)}}(),V.\u0275prov=o.Yz7({token:V,factory:V.\u0275fac});class ue{}class he{handle(ke){return ke.key}}function ae(j,ke){if(j===ke)return!0;if(null===j||null===ke)return!1;if(j!=j&&ke!=ke)return!0;let mt,ut,Ve,Be=typeof j;if(Be==typeof ke&&"object"==Be){if(!Array.isArray(j)){if(Array.isArray(ke))return!1;for(ut in Ve=Object.create(null),j){if(!ae(j[ut],ke[ut]))return!1;Ve[ut]=!0}for(ut in ke)if(!(ut in Ve)&&typeof ke[ut]<"u")return!1;return!0}if(!Array.isArray(ke))return!1;if((mt=j.length)==ke.length){for(ut=0;ut<mt;ut++)if(!ae(j[ut],ke[ut]))return!1;return!0}}return!1}function X(j){return typeof j<"u"&&null!==j}function ve(j){return j&&"object"==typeof j&&!Array.isArray(j)}function ye(j,ke){let Be=Object.assign({},j);return ve(j)&&ve(ke)&&Object.keys(ke).forEach(nt=>{ve(ke[nt])?nt in j?Be[nt]=ye(j[nt],ke[nt]):Object.assign(Be,{[nt]:ke[nt]}):Object.assign(Be,{[nt]:ke[nt]})}),Be}he.\u0275fac=function(ke){return new(ke||he)},he.\u0275prov=o.Yz7({token:he,factory:he.\u0275fac});class ge{}class ne extends ge{constructor(){super(...arguments),this.templateMatcher=/{{\s?([^{}\s]*)\s?}}/g}interpolate(ke,Be){let nt;return nt="string"==typeof ke?this.interpolateString(ke,Be):"function"==typeof ke?this.interpolateFunction(ke,Be):ke,nt}getValue(ke,Be){let nt="string"==typeof Be?Be.split("."):[Be];Be="";do{Be+=nt.shift(),!X(ke)||!X(ke[Be])||"object"!=typeof ke[Be]&&nt.length?nt.length?Be+=".":ke=void 0:(ke=ke[Be],Be="")}while(nt.length);return ke}interpolateFunction(ke,Be){return ke(Be)}interpolateString(ke,Be){return Be?ke.replace(this.templateMatcher,(nt,mt)=>{let ut=this.getValue(Be,mt);return X(ut)?ut:nt}):ke}}ne.\u0275fac=function(){let j;return function(Be){return(j||(j=o.n5z(ne)))(Be||ne)}}(),ne.\u0275prov=o.Yz7({token:ne,factory:ne.\u0275fac});class pe{}class Pe extends pe{compile(ke,Be){return ke}compileTranslations(ke,Be){return ke}}Pe.\u0275fac=function(){let j;return function(Be){return(j||(j=o.n5z(Pe)))(Be||Pe)}}(),Pe.\u0275prov=o.Yz7({token:Pe,factory:Pe.\u0275fac});class xe{constructor(){this.currentLang=this.defaultLang,this.translations={},this.langs=[],this.onTranslationChange=new o.vpe,this.onLangChange=new o.vpe,this.onDefaultLangChange=new o.vpe}}const de=new o.OlP("USE_STORE"),re=new o.OlP("USE_DEFAULT_LANG"),oe=new o.OlP("DEFAULT_LANGUAGE"),me=new o.OlP("USE_EXTEND");class be{constructor(ke,Be,nt,mt,ut,Ve=!0,tt=!1,Ne=!1,wt){this.store=ke,this.currentLoader=Be,this.compiler=nt,this.parser=mt,this.missingTranslationHandler=ut,this.useDefaultLang=Ve,this.isolate=tt,this.extend=Ne,this.pending=!1,this._onTranslationChange=new o.vpe,this._onLangChange=new o.vpe,this._onDefaultLangChange=new o.vpe,this._langs=[],this._translations={},this._translationRequests={},wt&&this.setDefaultLang(wt)}get onTranslationChange(){return this.isolate?this._onTranslationChange:this.store.onTranslationChange}get onLangChange(){return this.isolate?this._onLangChange:this.store.onLangChange}get onDefaultLangChange(){return this.isolate?this._onDefaultLangChange:this.store.onDefaultLangChange}get defaultLang(){return this.isolate?this._defaultLang:this.store.defaultLang}set defaultLang(ke){this.isolate?this._defaultLang=ke:this.store.defaultLang=ke}get currentLang(){return this.isolate?this._currentLang:this.store.currentLang}set currentLang(ke){this.isolate?this._currentLang=ke:this.store.currentLang=ke}get langs(){return this.isolate?this._langs:this.store.langs}set langs(ke){this.isolate?this._langs=ke:this.store.langs=ke}get translations(){return this.isolate?this._translations:this.store.translations}set translations(ke){this.isolate?this._translations=ke:this.store.translations=ke}setDefaultLang(ke){if(ke===this.defaultLang)return;let Be=this.retrieveTranslations(ke);typeof Be<"u"?(null==this.defaultLang&&(this.defaultLang=ke),Be.pipe((0,T.q)(1)).subscribe(nt=>{this.changeDefaultLang(ke)})):this.changeDefaultLang(ke)}getDefaultLang(){return this.defaultLang}use(ke){if(ke===this.currentLang)return(0,e.of)(this.translations[ke]);let Be=this.retrieveTranslations(ke);return typeof Be<"u"?(this.currentLang||(this.currentLang=ke),Be.pipe((0,T.q)(1)).subscribe(nt=>{this.changeLang(ke)}),Be):(this.changeLang(ke),(0,e.of)(this.translations[ke]))}retrieveTranslations(ke){let Be;return(typeof this.translations[ke]>"u"||this.extend)&&(this._translationRequests[ke]=this._translationRequests[ke]||this.getTranslation(ke),Be=this._translationRequests[ke]),Be}getTranslation(ke){this.pending=!0;const Be=this.currentLoader.getTranslation(ke).pipe((0,n.d)(1),(0,T.q)(1));return this.loadingTranslations=Be.pipe((0,P.U)(nt=>this.compiler.compileTranslations(nt,ke)),(0,n.d)(1),(0,T.q)(1)),this.loadingTranslations.subscribe({next:nt=>{this.translations[ke]=this.extend&&this.translations[ke]?{...nt,...this.translations[ke]}:nt,this.updateLangs(),this.pending=!1},error:nt=>{this.pending=!1}}),Be}setTranslation(ke,Be,nt=!1){Be=this.compiler.compileTranslations(Be,ke),(nt||this.extend)&&this.translations[ke]?this.translations[ke]=ye(this.translations[ke],Be):this.translations[ke]=Be,this.updateLangs(),this.onTranslationChange.emit({lang:ke,translations:this.translations[ke]})}getLangs(){return this.langs}addLangs(ke){ke.forEach(Be=>{-1===this.langs.indexOf(Be)&&this.langs.push(Be)})}updateLangs(){this.addLangs(Object.keys(this.translations))}getParsedResult(ke,Be,nt){let mt;if(Be instanceof Array){let ut={},Ve=!1;for(let tt of Be)ut[tt]=this.getParsedResult(ke,tt,nt),(0,l.b)(ut[tt])&&(Ve=!0);if(Ve){const tt=Be.map(Ne=>(0,l.b)(ut[Ne])?ut[Ne]:(0,e.of)(ut[Ne]));return(0,D.D)(tt).pipe((0,P.U)(Ne=>{let wt={};return Ne.forEach((ft,Ct)=>{wt[Be[Ct]]=ft}),wt}))}return ut}if(ke&&(mt=this.parser.interpolate(this.parser.getValue(ke,Be),nt)),typeof mt>"u"&&null!=this.defaultLang&&this.defaultLang!==this.currentLang&&this.useDefaultLang&&(mt=this.parser.interpolate(this.parser.getValue(this.translations[this.defaultLang],Be),nt)),typeof mt>"u"){let ut={key:Be,translateService:this};typeof nt<"u"&&(ut.interpolateParams=nt),mt=this.missingTranslationHandler.handle(ut)}return typeof mt<"u"?mt:Be}get(ke,Be){if(!X(ke)||!ke.length)throw new Error('Parameter "key" required');if(this.pending)return this.loadingTranslations.pipe((0,w.b)(nt=>(nt=this.getParsedResult(nt,ke,Be),(0,l.b)(nt)?nt:(0,e.of)(nt))));{let nt=this.getParsedResult(this.translations[this.currentLang],ke,Be);return(0,l.b)(nt)?nt:(0,e.of)(nt)}}getStreamOnTranslationChange(ke,Be){if(!X(ke)||!ke.length)throw new Error('Parameter "key" required');return(0,g.z)((0,E.P)(()=>this.get(ke,Be)),this.onTranslationChange.pipe((0,B.w)(nt=>{const mt=this.getParsedResult(nt.translations,ke,Be);return"function"==typeof mt.subscribe?mt:(0,e.of)(mt)})))}stream(ke,Be){if(!X(ke)||!ke.length)throw new Error('Parameter "key" required');return(0,g.z)((0,E.P)(()=>this.get(ke,Be)),this.onLangChange.pipe((0,B.w)(nt=>{const mt=this.getParsedResult(nt.translations,ke,Be);return(0,l.b)(mt)?mt:(0,e.of)(mt)})))}instant(ke,Be){if(!X(ke)||!ke.length)throw new Error('Parameter "key" required');let nt=this.getParsedResult(this.translations[this.currentLang],ke,Be);if((0,l.b)(nt)){if(ke instanceof Array){let mt={};return ke.forEach((ut,Ve)=>{mt[ke[Ve]]=ke[Ve]}),mt}return ke}return nt}set(ke,Be,nt=this.currentLang){this.translations[nt][ke]=this.compiler.compile(Be,nt),this.updateLangs(),this.onTranslationChange.emit({lang:nt,translations:this.translations[nt]})}changeLang(ke){this.currentLang=ke,this.onLangChange.emit({lang:ke,translations:this.translations[ke]}),null==this.defaultLang&&this.changeDefaultLang(ke)}changeDefaultLang(ke){this.defaultLang=ke,this.onDefaultLangChange.emit({lang:ke,translations:this.translations[ke]})}reloadLang(ke){return this.resetLang(ke),this.getTranslation(ke)}resetLang(ke){this._translationRequests[ke]=void 0,this.translations[ke]=void 0}getBrowserLang(){if(typeof window>"u"||typeof window.navigator>"u")return;let ke=window.navigator.languages?window.navigator.languages[0]:null;return ke=ke||window.navigator.language||window.navigator.browserLanguage||window.navigator.userLanguage,typeof ke>"u"?void 0:(-1!==ke.indexOf("-")&&(ke=ke.split("-")[0]),-1!==ke.indexOf("_")&&(ke=ke.split("_")[0]),ke)}getBrowserCultureLang(){if(typeof window>"u"||typeof window.navigator>"u")return;let ke=window.navigator.languages?window.navigator.languages[0]:null;return ke=ke||window.navigator.language||window.navigator.browserLanguage||window.navigator.userLanguage,ke}}be.\u0275fac=function(ke){return new(ke||be)(o.LFG(xe),o.LFG(Y),o.LFG(pe),o.LFG(ge),o.LFG(ue),o.LFG(re),o.LFG(de),o.LFG(me),o.LFG(oe))},be.\u0275prov=o.Yz7({token:be,factory:be.\u0275fac});class le{constructor(ke,Be,nt){this.translateService=ke,this.element=Be,this._ref=nt,this.onTranslationChangeSub||(this.onTranslationChangeSub=this.translateService.onTranslationChange.subscribe(mt=>{mt.lang===this.translateService.currentLang&&this.checkNodes(!0,mt.translations)})),this.onLangChangeSub||(this.onLangChangeSub=this.translateService.onLangChange.subscribe(mt=>{this.checkNodes(!0,mt.translations)})),this.onDefaultLangChangeSub||(this.onDefaultLangChangeSub=this.translateService.onDefaultLangChange.subscribe(mt=>{this.checkNodes(!0)}))}set translate(ke){ke&&(this.key=ke,this.checkNodes())}set translateParams(ke){ae(this.currentParams,ke)||(this.currentParams=ke,this.checkNodes(!0))}ngAfterViewChecked(){this.checkNodes()}checkNodes(ke=!1,Be){let nt=this.element.nativeElement.childNodes;nt.length||(this.setContent(this.element.nativeElement,this.key),nt=this.element.nativeElement.childNodes);for(let mt=0;mt<nt.length;++mt){let ut=nt[mt];if(3===ut.nodeType){let Ve;if(ke&&(ut.lastKey=null),X(ut.lookupKey))Ve=ut.lookupKey;else if(this.key)Ve=this.key;else{let tt=this.getContent(ut),Ne=tt.trim();Ne.length&&(ut.lookupKey=Ne,tt!==ut.currentValue?(Ve=Ne,ut.originalContent=tt||ut.originalContent):ut.originalContent?Ve=ut.originalContent.trim():tt!==ut.currentValue&&(Ve=Ne,ut.originalContent=tt||ut.originalContent))}this.updateValue(Ve,ut,Be)}}}updateValue(ke,Be,nt){if(ke){if(Be.lastKey===ke&&this.lastParams===this.currentParams)return;this.lastParams=this.currentParams;let mt=ut=>{ut!==ke&&(Be.lastKey=ke),Be.originalContent||(Be.originalContent=this.getContent(Be)),Be.currentValue=X(ut)?ut:Be.originalContent||ke,this.setContent(Be,this.key?Be.currentValue:Be.originalContent.replace(ke,Be.currentValue)),this._ref.markForCheck()};if(X(nt)){let ut=this.translateService.getParsedResult(nt,ke,this.currentParams);(0,l.b)(ut)?ut.subscribe({next:mt}):mt(ut)}else this.translateService.get(ke,this.currentParams).subscribe(mt)}}getContent(ke){return X(ke.textContent)?ke.textContent:ke.data}setContent(ke,Be){X(ke.textContent)?ke.textContent=Be:ke.data=Be}ngOnDestroy(){this.onLangChangeSub&&this.onLangChangeSub.unsubscribe(),this.onDefaultLangChangeSub&&this.onDefaultLangChangeSub.unsubscribe(),this.onTranslationChangeSub&&this.onTranslationChangeSub.unsubscribe()}}le.\u0275fac=function(ke){return new(ke||le)(o.Y36(be),o.Y36(o.SBq),o.Y36(o.sBO))},le.\u0275dir=o.lG2({type:le,selectors:[["","translate",""],["","ngx-translate",""]],inputs:{translate:"translate",translateParams:"translateParams"}});class Z{constructor(ke,Be){this.translate=ke,this._ref=Be,this.value="",this.lastKey=null,this.lastParams=[]}updateValue(ke,Be,nt){let mt=ut=>{this.value=void 0!==ut?ut:ke,this.lastKey=ke,this._ref.markForCheck()};if(nt){let ut=this.translate.getParsedResult(nt,ke,Be);(0,l.b)(ut.subscribe)?ut.subscribe(mt):mt(ut)}this.translate.get(ke,Be).subscribe(mt)}transform(ke,...Be){if(!ke||!ke.length)return ke;if(ae(ke,this.lastKey)&&ae(Be,this.lastParams))return this.value;let nt;if(X(Be[0])&&Be.length)if("string"==typeof Be[0]&&Be[0].length){let mt=Be[0].replace(/(\')?([a-zA-Z0-9_]+)(\')?(\s)?:/g,'"$2":').replace(/:(\s)?(\')(.*?)(\')/g,':"$3"');try{nt=JSON.parse(mt)}catch{throw new SyntaxError(`Wrong parameter in TranslatePipe. Expected a valid Object, received: ${Be[0]}`)}}else"object"==typeof Be[0]&&!Array.isArray(Be[0])&&(nt=Be[0]);return this.lastKey=ke,this.lastParams=Be,this.updateValue(ke,nt),this._dispose(),this.onTranslationChange||(this.onTranslationChange=this.translate.onTranslationChange.subscribe(mt=>{this.lastKey&&mt.lang===this.translate.currentLang&&(this.lastKey=null,this.updateValue(ke,nt,mt.translations))})),this.onLangChange||(this.onLangChange=this.translate.onLangChange.subscribe(mt=>{this.lastKey&&(this.lastKey=null,this.updateValue(ke,nt,mt.translations))})),this.onDefaultLangChange||(this.onDefaultLangChange=this.translate.onDefaultLangChange.subscribe(()=>{this.lastKey&&(this.lastKey=null,this.updateValue(ke,nt))})),this.value}_dispose(){typeof this.onTranslationChange<"u"&&(this.onTranslationChange.unsubscribe(),this.onTranslationChange=void 0),typeof this.onLangChange<"u"&&(this.onLangChange.unsubscribe(),this.onLangChange=void 0),typeof this.onDefaultLangChange<"u"&&(this.onDefaultLangChange.unsubscribe(),this.onDefaultLangChange=void 0)}ngOnDestroy(){this._dispose()}}Z.\u0275fac=function(ke){return new(ke||Z)(o.Y36(be,16),o.Y36(o.sBO,16))},Z.\u0275pipe=o.Yjl({name:"translate",type:Z,pure:!1}),Z.\u0275prov=o.Yz7({token:Z,factory:Z.\u0275fac});class Oe{static forRoot(ke={}){return{ngModule:Oe,providers:[ke.loader||{provide:Y,useClass:V},ke.compiler||{provide:pe,useClass:Pe},ke.parser||{provide:ge,useClass:ne},ke.missingTranslationHandler||{provide:ue,useClass:he},xe,{provide:de,useValue:ke.isolate},{provide:re,useValue:ke.useDefaultLang},{provide:me,useValue:ke.extend},{provide:oe,useValue:ke.defaultLanguage},be]}}static forChild(ke={}){return{ngModule:Oe,providers:[ke.loader||{provide:Y,useClass:V},ke.compiler||{provide:pe,useClass:Pe},ke.parser||{provide:ge,useClass:ne},ke.missingTranslationHandler||{provide:ue,useClass:he},{provide:de,useValue:ke.isolate},{provide:re,useValue:ke.useDefaultLang},{provide:me,useValue:ke.extend},{provide:oe,useValue:ke.defaultLanguage},be]}}}Oe.\u0275fac=function(ke){return new(ke||Oe)},Oe.\u0275mod=o.oAB({type:Oe}),Oe.\u0275inj=o.cJS({})},19832:(qe,I,p)=>{"use strict";p.d(I,{w:()=>o});class o{constructor(l,D="/assets/i18n/",g=".json"){this.http=l,this.prefix=D,this.suffix=g}getTranslation(l){return this.http.get(`${this.prefix}${l}${this.suffix}`)}}},32622:(qe,I,p)=>{"use strict";p.d(I,{Z:()=>X});const e=function o(){this.__data__=[],this.size=0};var l=p(93093);const g=function D(ve,ye){for(var ge=ve.length;ge--;)if((0,l.Z)(ve[ge][0],ye))return ge;return-1};var T=Array.prototype.splice;const P=function n(ve){var ye=this.__data__,ge=g(ye,ve);return!(ge<0)&&(ge==ye.length-1?ye.pop():T.call(ye,ge,1),--this.size,!0)};const B=function w(ve){var ye=this.__data__,ge=g(ye,ve);return ge<0?void 0:ye[ge][1]};const V=function Y(ve){return g(this.__data__,ve)>-1};const he=function ue(ve,ye){var ge=this.__data__,ne=g(ge,ve);return ne<0?(++this.size,ge.push([ve,ye])):ge[ne][1]=ye,this};function ae(ve){var ye=-1,ge=null==ve?0:ve.length;for(this.clear();++ye<ge;){var ne=ve[ye];this.set(ne[0],ne[1])}}ae.prototype.clear=e,ae.prototype.delete=P,ae.prototype.get=B,ae.prototype.has=V,ae.prototype.set=he;const X=ae},79329:(qe,I,p)=>{"use strict";p.d(I,{Z:()=>D});var o=p(53858),e=p(25946);const D=(0,o.Z)(e.Z,"Map")},43639:(qe,I,p)=>{"use strict";p.d(I,{Z:()=>Ve});const l=(0,p(53858).Z)(Object,"create");const g=function D(){this.__data__=l?l(null):{},this.size=0};const T=function E(tt){var Ne=this.has(tt)&&delete this.__data__[tt];return this.size-=Ne?1:0,Ne};var n="__lodash_hash_undefined__",w=Object.prototype.hasOwnProperty;const Y=function B(tt){var Ne=this.__data__;if(l){var wt=Ne[tt];return wt===n?void 0:wt}return w.call(Ne,tt)?Ne[tt]:void 0};var ue=Object.prototype.hasOwnProperty;const ae=function he(tt){var Ne=this.__data__;return l?void 0!==Ne[tt]:ue.call(Ne,tt)};var X="__lodash_hash_undefined__";const ye=function ve(tt,Ne){var wt=this.__data__;return this.size+=this.has(tt)?0:1,wt[tt]=l&&void 0===Ne?X:Ne,this};function ge(tt){var Ne=-1,wt=null==tt?0:tt.length;for(this.clear();++Ne<wt;){var ft=tt[Ne];this.set(ft[0],ft[1])}}ge.prototype.clear=g,ge.prototype.delete=T,ge.prototype.get=Y,ge.prototype.has=ae,ge.prototype.set=ye;const ne=ge;var pe=p(32622),Pe=p(79329);const de=function xe(){this.size=0,this.__data__={hash:new ne,map:new(Pe.Z||pe.Z),string:new ne}};const oe=function re(tt){var Ne=typeof tt;return"string"==Ne||"number"==Ne||"symbol"==Ne||"boolean"==Ne?"__proto__"!==tt:null===tt};const be=function me(tt,Ne){var wt=tt.__data__;return oe(Ne)?wt["string"==typeof Ne?"string":"hash"]:wt.map};const Z=function le(tt){var Ne=be(this,tt).delete(tt);return this.size-=Ne?1:0,Ne};const j=function Oe(tt){return be(this,tt).get(tt)};const Be=function ke(tt){return be(this,tt).has(tt)};const mt=function nt(tt,Ne){var wt=be(this,tt),ft=wt.size;return wt.set(tt,Ne),this.size+=wt.size==ft?0:1,this};function ut(tt){var Ne=-1,wt=null==tt?0:tt.length;for(this.clear();++Ne<wt;){var ft=tt[Ne];this.set(ft[0],ft[1])}}ut.prototype.clear=de,ut.prototype.delete=Z,ut.prototype.get=j,ut.prototype.has=Be,ut.prototype.set=mt;const Ve=ut},97863:(qe,I,p)=>{"use strict";p.d(I,{Z:()=>D});var o=p(53858),e=p(25946);const D=(0,o.Z)(e.Z,"Set")},3713:(qe,I,p)=>{"use strict";p.d(I,{Z:()=>n});var o=p(43639),e="__lodash_hash_undefined__";const D=function l(P){return this.__data__.set(P,e),this};const E=function g(P){return this.__data__.has(P)};function T(P){var w=-1,B=null==P?0:P.length;for(this.__data__=new o.Z;++w<B;)this.add(P[w])}T.prototype.add=T.prototype.push=D,T.prototype.has=E;const n=T},95343:(qe,I,p)=>{"use strict";p.d(I,{Z:()=>ae});var o=p(32622);const l=function e(){this.__data__=new o.Z,this.size=0};const g=function D(X){var ve=this.__data__,ye=ve.delete(X);return this.size=ve.size,ye};const T=function E(X){return this.__data__.get(X)};const P=function n(X){return this.__data__.has(X)};var w=p(79329),B=p(43639),Y=200;const ue=function V(X,ve){var ye=this.__data__;if(ye instanceof o.Z){var ge=ye.__data__;if(!w.Z||ge.length<Y-1)return ge.push([X,ve]),this.size=++ye.size,this;ye=this.__data__=new B.Z(ge)}return ye.set(X,ve),this.size=ye.size,this};function he(X){var ve=this.__data__=new o.Z(X);this.size=ve.size}he.prototype.clear=l,he.prototype.delete=g,he.prototype.get=T,he.prototype.has=P,he.prototype.set=ue;const ae=he},38492:(qe,I,p)=>{"use strict";p.d(I,{Z:()=>l});const l=p(25946).Z.Symbol},71630:(qe,I,p)=>{"use strict";p.d(I,{Z:()=>l});const l=p(25946).Z.Uint8Array},68553:(qe,I,p)=>{"use strict";p.d(I,{Z:()=>D});var o=p(53858),e=p(25946);const D=(0,o.Z)(e.Z,"WeakMap")},7585:(qe,I,p)=>{"use strict";p.d(I,{Z:()=>e});const e=function o(l,D){for(var g=-1,E=null==l?0:l.length;++g<E&&!1!==D(l[g],g,l););return l}},74666:(qe,I,p)=>{"use strict";p.d(I,{Z:()=>P});var o=p(59009);const l=function e(w){return w!=w};const g=function D(w,B,Y){for(var V=Y-1,ue=w.length;++V<ue;)if(w[V]===B)return V;return-1};const T=function E(w,B,Y){return B==B?g(w,B,Y):(0,o.Z)(w,l,Y)};const P=function n(w,B){return!!(null==w?0:w.length)&&T(w,B,0)>-1}},69512:(qe,I,p)=>{"use strict";p.d(I,{Z:()=>e});const e=function o(l,D,g){for(var E=-1,T=null==l?0:l.length;++E<T;)if(g(D,l[E]))return!0;return!1}},73487:(qe,I,p)=>{"use strict";p.d(I,{Z:()=>B});const e=function o(Y,V){for(var ue=-1,he=Array(Y);++ue<Y;)he[ue]=V(ue);return he};var l=p(24825),D=p(14177),g=p(85202),E=p(56667),T=p(87583),P=Object.prototype.hasOwnProperty;const B=function w(Y,V){var ue=(0,D.Z)(Y),he=!ue&&(0,l.Z)(Y),ae=!ue&&!he&&(0,g.Z)(Y),X=!ue&&!he&&!ae&&(0,T.Z)(Y),ve=ue||he||ae||X,ye=ve?e(Y.length,String):[],ge=ye.length;for(var ne in Y)(V||P.call(Y,ne))&&(!ve||!("length"==ne||ae&&("offset"==ne||"parent"==ne)||X&&("buffer"==ne||"byteLength"==ne||"byteOffset"==ne)||(0,E.Z)(ne,ge)))&&ye.push(ne);return ye}},27988:(qe,I,p)=>{"use strict";p.d(I,{Z:()=>e});const e=function o(l,D){for(var g=-1,E=null==l?0:l.length,T=Array(E);++g<E;)T[g]=D(l[g],g,l);return T}},6623:(qe,I,p)=>{"use strict";p.d(I,{Z:()=>e});const e=function o(l,D){for(var g=-1,E=D.length,T=l.length;++g<E;)l[T+g]=D[g];return l}},21481:(qe,I,p)=>{"use strict";p.d(I,{Z:()=>E});var o=p(43496),e=p(93093),D=Object.prototype.hasOwnProperty;const E=function g(T,n,P){var w=T[n];(!D.call(T,n)||!(0,e.Z)(w,P)||void 0===P&&!(n in T))&&(0,o.Z)(T,n,P)}},43496:(qe,I,p)=>{"use strict";p.d(I,{Z:()=>l});var o=p(52370);const l=function e(D,g,E){"__proto__"==g&&o.Z?(0,o.Z)(D,g,{configurable:!0,enumerable:!0,value:E,writable:!0}):D[g]=E}},29600:(qe,I,p)=>{"use strict";p.d(I,{Z:()=>St});var o=p(95343),e=p(7585),l=p(21481),D=p(83276),g=p(31952);const T=function E(Pt,cn){return Pt&&(0,D.Z)(cn,(0,g.Z)(cn),Pt)};var n=p(571);const w=function P(Pt,cn){return Pt&&(0,D.Z)(cn,(0,n.Z)(cn),Pt)};var B=p(25946),Y="object"==typeof exports&&exports&&!exports.nodeType&&exports,V=Y&&"object"==typeof module&&module&&!module.nodeType&&module,he=V&&V.exports===Y?B.Z.Buffer:void 0,ae=he?he.allocUnsafe:void 0;const ve=function X(Pt,cn){if(cn)return Pt.slice();var Ln=Pt.length,ii=ae?ae(Ln):new Pt.constructor(Ln);return Pt.copy(ii),ii};var ye=p(68297),ge=p(13976);const pe=function ne(Pt,cn){return(0,D.Z)(Pt,(0,ge.Z)(Pt),cn)};var Pe=p(7098);const de=function xe(Pt,cn){return(0,D.Z)(Pt,(0,Pe.Z)(Pt),cn)};var re=p(28501),oe=p(28065),me=p(20599),le=Object.prototype.hasOwnProperty;const Oe=function Z(Pt){var cn=Pt.length,Ln=new Pt.constructor(cn);return cn&&"string"==typeof Pt[0]&&le.call(Pt,"index")&&(Ln.index=Pt.index,Ln.input=Pt.input),Ln};var j=p(71630);const Be=function ke(Pt){var cn=new Pt.constructor(Pt.byteLength);return new j.Z(cn).set(new j.Z(Pt)),cn};const mt=function nt(Pt,cn){var Ln=cn?Be(Pt.buffer):Pt.buffer;return new Pt.constructor(Ln,Pt.byteOffset,Pt.byteLength)};var ut=/\w*$/;const tt=function Ve(Pt){var cn=new Pt.constructor(Pt.source,ut.exec(Pt));return cn.lastIndex=Pt.lastIndex,cn};var Ne=p(38492),wt=Ne.Z?Ne.Z.prototype:void 0,ft=wt?wt.valueOf:void 0;const rn=function Ct(Pt){return ft?Object(ft.call(Pt)):{}};const st=function He(Pt,cn){var Ln=cn?Be(Pt.buffer):Pt.buffer;return new Pt.constructor(Ln,Pt.byteOffset,Pt.length)};var nn="[object Boolean]",Dn="[object Date]",Mn="[object Map]",vi="[object Number]",Gi="[object RegExp]",mi="[object Set]",wi="[object String]",Bn="[object Symbol]",kn="[object ArrayBuffer]",On="[object DataView]",je="[object Float32Array]",Bt="[object Float64Array]",xn="[object Int8Array]",Fn="[object Int16Array]",ui="[object Int32Array]",Ai="[object Uint8Array]",si="[object Uint8ClampedArray]",Vi="[object Uint16Array]",Vn="[object Uint32Array]";const An=function Hn(Pt,cn,Ln){var ii=Pt.constructor;switch(cn){case kn:return Be(Pt);case nn:case Dn:return new ii(+Pt);case On:return mt(Pt,Ln);case je:case Bt:case xn:case Fn:case ui:case Ai:case si:case Vi:case Vn:return st(Pt,Ln);case Mn:return new ii;case vi:case wi:return new ii(Pt);case Gi:return tt(Pt);case mi:return new ii;case Bn:return rn(Pt)}};var vn=p(84792),In=p(65650),Zi=p(11986);const Hi=function gr(Pt){return"function"!=typeof Pt.constructor||(0,Zi.Z)(Pt)?{}:(0,vn.Z)((0,In.Z)(Pt))};var Gr=p(14177),zr=p(85202),Eo=p(214),mr="[object Map]";const ct=function jn(Pt){return(0,Eo.Z)(Pt)&&(0,me.Z)(Pt)==mr};var Yt=p(66932),oi=p(76594),Ni=oi.Z&&oi.Z.isMap;const pr=Ni?(0,Yt.Z)(Ni):ct;var Sn=p(71999),Pn="[object Set]";const ai=function Nt(Pt){return(0,Eo.Z)(Pt)&&(0,me.Z)(Pt)==Pn};var hn=oi.Z&&oi.Z.isSet;const ce=hn?(0,Yt.Z)(hn):ai;var we=1,Qe=2,qt=4,Tn="[object Arguments]",ea="[object Function]",Bo="[object GeneratorFunction]",Zn="[object Object]",It={};It[Tn]=It["[object Array]"]=It["[object ArrayBuffer]"]=It["[object DataView]"]=It["[object Boolean]"]=It["[object Date]"]=It["[object Float32Array]"]=It["[object Float64Array]"]=It["[object Int8Array]"]=It["[object Int16Array]"]=It["[object Int32Array]"]=It["[object Map]"]=It["[object Number]"]=It[Zn]=It["[object RegExp]"]=It["[object Set]"]=It["[object String]"]=It["[object Symbol]"]=It["[object Uint8Array]"]=It["[object Uint8ClampedArray]"]=It["[object Uint16Array]"]=It["[object Uint32Array]"]=!0,It["[object Error]"]=It[ea]=It["[object WeakMap]"]=!1;const St=function Qt(Pt,cn,Ln,ii,hi,Ri){var _r,er=cn&we,Yr=cn&Qe,_o=cn&qt;if(Ln&&(_r=hi?Ln(Pt,ii,hi,Ri):Ln(Pt)),void 0!==_r)return _r;if(!(0,Sn.Z)(Pt))return Pt;var Si=(0,Gr.Z)(Pt);if(Si){if(_r=Oe(Pt),!er)return(0,ye.Z)(Pt,_r)}else{var to=(0,me.Z)(Pt),Oa=to==ea||to==Bo;if((0,zr.Z)(Pt))return ve(Pt,er);if(to==Zn||to==Tn||Oa&&!hi){if(_r=Yr||Oa?{}:Hi(Pt),!er)return Yr?de(Pt,w(_r,Pt)):pe(Pt,T(_r,Pt))}else{if(!It[to])return hi?Pt:{};_r=An(Pt,to,er)}}Ri||(Ri=new o.Z);var Uo=Ri.get(Pt);if(Uo)return Uo;Ri.set(Pt,_r),ce(Pt)?Pt.forEach(function(ps){_r.add(Qt(ps,cn,Ln,ps,Pt,Ri))}):pr(Pt)&&Pt.forEach(function(ps,ts){_r.set(ts,Qt(ps,cn,Ln,ts,Pt,Ri))});var rl=_o?Yr?oe.Z:re.Z:Yr?n.Z:g.Z,Vs=Si?void 0:rl(Pt);return(0,e.Z)(Vs||Pt,function(ps,ts){Vs&&(ps=Pt[ts=ps]),(0,l.Z)(_r,ts,Qt(ps,cn,Ln,ts,Pt,Ri))}),_r}},84792:(qe,I,p)=>{"use strict";p.d(I,{Z:()=>D});var o=p(71999),e=Object.create;const D=function(){function g(){}return function(E){if(!(0,o.Z)(E))return{};if(e)return e(E);g.prototype=E;var T=new g;return g.prototype=void 0,T}}()},22754:(qe,I,p)=>{"use strict";p.d(I,{Z:()=>P});var o=p(3713),e=p(74666),l=p(69512),D=p(27988),g=p(66932),E=p(93228),T=200;const P=function n(w,B,Y,V){var ue=-1,he=e.Z,ae=!0,X=w.length,ve=[],ye=B.length;if(!X)return ve;Y&&(B=(0,D.Z)(B,(0,g.Z)(Y))),V?(he=l.Z,ae=!1):B.length>=T&&(he=E.Z,ae=!1,B=new o.Z(B));e:for(;++ue<X;){var ge=w[ue],ne=null==Y?ge:Y(ge);if(ge=V||0!==ge?ge:0,ae&&ne==ne){for(var pe=ye;pe--;)if(B[pe]===ne)continue e;ve.push(ge)}else he(B,ne,V)||ve.push(ge)}return ve}},61082:(qe,I,p)=>{"use strict";p.d(I,{Z:()=>E});var o=p(61149),e=p(78706);const E=function l(T,n){return function(P,w){if(null==P)return P;if(!(0,e.Z)(P))return T(P,w);for(var B=P.length,Y=n?B:-1,V=Object(P);(n?Y--:++Y<B)&&!1!==w(V[Y],Y,V););return P}}(o.Z)},59009:(qe,I,p)=>{"use strict";p.d(I,{Z:()=>e});const e=function o(l,D,g,E){for(var T=l.length,n=g+(E?1:-1);E?n--:++n<T;)if(D(l[n],n,l))return n;return-1}},20113:(qe,I,p)=>{"use strict";p.d(I,{Z:()=>P});var o=p(6623),e=p(38492),l=p(24825),D=p(14177),g=e.Z?e.Z.isConcatSpreadable:void 0;const T=function E(w){return(0,D.Z)(w)||(0,l.Z)(w)||!!(g&&w&&w[g])};const P=function n(w,B,Y,V,ue){var he=-1,ae=w.length;for(Y||(Y=T),ue||(ue=[]);++he<ae;){var X=w[he];B>0&&Y(X)?B>1?n(X,B-1,Y,V,ue):(0,o.Z)(ue,X):V||(ue[ue.length]=X)}return ue}},61149:(qe,I,p)=>{"use strict";p.d(I,{Z:()=>T});const D=function o(n){return function(P,w,B){for(var Y=-1,V=Object(P),ue=B(P),he=ue.length;he--;){var ae=ue[n?he:++Y];if(!1===w(V[ae],ae,V))break}return P}}();var g=p(31952);const T=function E(n,P){return n&&D(n,P,g.Z)}},97298:(qe,I,p)=>{"use strict";p.d(I,{Z:()=>D});var o=p(25575),e=p(62168);const D=function l(g,E){for(var T=0,n=(E=(0,o.Z)(E,g)).length;null!=g&&T<n;)g=g[(0,e.Z)(E[T++])];return T&&T==n?g:void 0}},18203:(qe,I,p)=>{"use strict";p.d(I,{Z:()=>D});var o=p(6623),e=p(14177);const D=function l(g,E,T){var n=E(g);return(0,e.Z)(g)?n:(0,o.Z)(n,T(g))}},77079:(qe,I,p)=>{"use strict";p.d(I,{Z:()=>ae});var o=p(38492),e=Object.prototype,l=e.hasOwnProperty,D=e.toString,g=o.Z?o.Z.toStringTag:void 0;const T=function E(X){var ve=l.call(X,g),ye=X[g];try{X[g]=void 0;var ge=!0}catch{}var ne=D.call(X);return ge&&(ve?X[g]=ye:delete X[g]),ne};var P=Object.prototype.toString;const B=function w(X){return P.call(X)};var Y="[object Null]",V="[object Undefined]",ue=o.Z?o.Z.toStringTag:void 0;const ae=function he(X){return null==X?void 0===X?V:Y:ue&&ue in Object(X)?T(X):B(X)}},74526:(qe,I,p)=>{"use strict";p.d(I,{Z:()=>P});var o=p(3713),e=p(74666),l=p(69512),D=p(27988),g=p(66932),E=p(93228),T=Math.min;const P=function n(w,B,Y){for(var V=Y?l.Z:e.Z,ue=w[0].length,he=w.length,ae=he,X=Array(he),ve=1/0,ye=[];ae--;){var ge=w[ae];ae&&B&&(ge=(0,D.Z)(ge,(0,g.Z)(B))),ve=T(ge.length,ve),X[ae]=!Y&&(B||ue>=120&&ge.length>=120)?new o.Z(ae&&ge):void 0}ge=w[0];var ne=-1,pe=X[0];e:for(;++ne<ue&&ye.length<ve;){var Pe=ge[ne],xe=B?B(Pe):Pe;if(Pe=Y||0!==Pe?Pe:0,!(pe?(0,E.Z)(pe,xe):V(ye,xe,Y))){for(ae=he;--ae;){var de=X[ae];if(!(de?(0,E.Z)(de,xe):V(w[ae],xe,Y)))continue e}pe&&pe.push(xe),ye.push(Pe)}}return ye}},77088:(qe,I,p)=>{"use strict";p.d(I,{Z:()=>mi});var o=p(95343),e=p(3713);const D=function l(wi,Bn){for(var kn=-1,On=null==wi?0:wi.length;++kn<On;)if(Bn(wi[kn],kn,wi))return!0;return!1};var g=p(93228),E=1,T=2;const P=function n(wi,Bn,kn,On,je,Bt){var xn=kn&E,Fn=wi.length,ui=Bn.length;if(Fn!=ui&&!(xn&&ui>Fn))return!1;var Ai=Bt.get(wi),si=Bt.get(Bn);if(Ai&&si)return Ai==Bn&&si==wi;var Vi=-1,Vn=!0,Hn=kn&T?new e.Z:void 0;for(Bt.set(wi,Bn),Bt.set(Bn,wi);++Vi<Fn;){var An=wi[Vi],vn=Bn[Vi];if(On)var In=xn?On(vn,An,Vi,Bn,wi,Bt):On(An,vn,Vi,wi,Bn,Bt);if(void 0!==In){if(In)continue;Vn=!1;break}if(Hn){if(!D(Bn,function(Zi,gr){if(!(0,g.Z)(Hn,gr)&&(An===Zi||je(An,Zi,kn,On,Bt)))return Hn.push(gr)})){Vn=!1;break}}else if(An!==vn&&!je(An,vn,kn,On,Bt)){Vn=!1;break}}return Bt.delete(wi),Bt.delete(Bn),Vn};var w=p(38492),B=p(71630),Y=p(93093);const ue=function V(wi){var Bn=-1,kn=Array(wi.size);return wi.forEach(function(On,je){kn[++Bn]=[je,On]}),kn};var he=p(42699),ae=1,X=2,ve="[object Boolean]",ye="[object Date]",ge="[object Error]",ne="[object Map]",pe="[object Number]",Pe="[object RegExp]",xe="[object Set]",de="[object String]",re="[object Symbol]",oe="[object ArrayBuffer]",me="[object DataView]",be=w.Z?w.Z.prototype:void 0,le=be?be.valueOf:void 0;const Oe=function Z(wi,Bn,kn,On,je,Bt,xn){switch(kn){case me:if(wi.byteLength!=Bn.byteLength||wi.byteOffset!=Bn.byteOffset)return!1;wi=wi.buffer,Bn=Bn.buffer;case oe:return!(wi.byteLength!=Bn.byteLength||!Bt(new B.Z(wi),new B.Z(Bn)));case ve:case ye:case pe:return(0,Y.Z)(+wi,+Bn);case ge:return wi.name==Bn.name&&wi.message==Bn.message;case Pe:case de:return wi==Bn+"";case ne:var Fn=ue;case xe:var ui=On&ae;if(Fn||(Fn=he.Z),wi.size!=Bn.size&&!ui)return!1;var Ai=xn.get(wi);if(Ai)return Ai==Bn;On|=X,xn.set(wi,Bn);var si=P(Fn(wi),Fn(Bn),On,je,Bt,xn);return xn.delete(wi),si;case re:if(le)return le.call(wi)==le.call(Bn)}return!1};var j=p(28501),ke=1,nt=Object.prototype.hasOwnProperty;const ut=function mt(wi,Bn,kn,On,je,Bt){var xn=kn&ke,Fn=(0,j.Z)(wi),ui=Fn.length;if(ui!=(0,j.Z)(Bn).length&&!xn)return!1;for(var Vi=ui;Vi--;){var Vn=Fn[Vi];if(!(xn?Vn in Bn:nt.call(Bn,Vn)))return!1}var Hn=Bt.get(wi),An=Bt.get(Bn);if(Hn&&An)return Hn==Bn&&An==wi;var vn=!0;Bt.set(wi,Bn),Bt.set(Bn,wi);for(var In=xn;++Vi<ui;){var Zi=wi[Vn=Fn[Vi]],gr=Bn[Vn];if(On)var Hi=xn?On(gr,Zi,Vn,Bn,wi,Bt):On(Zi,gr,Vn,wi,Bn,Bt);if(!(void 0===Hi?Zi===gr||je(Zi,gr,kn,On,Bt):Hi)){vn=!1;break}In||(In="constructor"==Vn)}if(vn&&!In){var Gr=wi.constructor,zr=Bn.constructor;Gr!=zr&&"constructor"in wi&&"constructor"in Bn&&!("function"==typeof Gr&&Gr instanceof Gr&&"function"==typeof zr&&zr instanceof zr)&&(vn=!1)}return Bt.delete(wi),Bt.delete(Bn),vn};var Ve=p(20599),tt=p(14177),Ne=p(85202),wt=p(87583),ft=1,Ct="[object Arguments]",rn="[object Array]",He="[object Object]",nn=Object.prototype.hasOwnProperty;const Mn=function Dn(wi,Bn,kn,On,je,Bt){var xn=(0,tt.Z)(wi),Fn=(0,tt.Z)(Bn),ui=xn?rn:(0,Ve.Z)(wi),Ai=Fn?rn:(0,Ve.Z)(Bn),si=(ui=ui==Ct?He:ui)==He,Vi=(Ai=Ai==Ct?He:Ai)==He,Vn=ui==Ai;if(Vn&&(0,Ne.Z)(wi)){if(!(0,Ne.Z)(Bn))return!1;xn=!0,si=!1}if(Vn&&!si)return Bt||(Bt=new o.Z),xn||(0,wt.Z)(wi)?P(wi,Bn,kn,On,je,Bt):Oe(wi,Bn,ui,kn,On,je,Bt);if(!(kn&ft)){var Hn=si&&nn.call(wi,"__wrapped__"),An=Vi&&nn.call(Bn,"__wrapped__");if(Hn||An){var vn=Hn?wi.value():wi,In=An?Bn.value():Bn;return Bt||(Bt=new o.Z),je(vn,In,kn,On,Bt)}}return!!Vn&&(Bt||(Bt=new o.Z),ut(wi,Bn,kn,On,je,Bt))};var vi=p(214);const mi=function Gi(wi,Bn,kn,On,je){return wi===Bn||(null==wi||null==Bn||!(0,vi.Z)(wi)&&!(0,vi.Z)(Bn)?wi!=wi&&Bn!=Bn:Mn(wi,Bn,kn,On,Gi,je))}},5229:(qe,I,p)=>{"use strict";p.d(I,{Z:()=>ke});var o=p(95343),e=p(77088),l=1,D=2;const E=function g(Be,nt,mt,ut){var Ve=mt.length,tt=Ve,Ne=!ut;if(null==Be)return!tt;for(Be=Object(Be);Ve--;){var wt=mt[Ve];if(Ne&&wt[2]?wt[1]!==Be[wt[0]]:!(wt[0]in Be))return!1}for(;++Ve<tt;){var ft=(wt=mt[Ve])[0],Ct=Be[ft],rn=wt[1];if(Ne&&wt[2]){if(void 0===Ct&&!(ft in Be))return!1}else{var He=new o.Z;if(ut)var st=ut(Ct,rn,ft,Be,nt,He);if(!(void 0===st?(0,e.Z)(rn,Ct,l|D,ut,He):st))return!1}}return!0};var T=p(71999);const P=function n(Be){return Be==Be&&!(0,T.Z)(Be)};var w=p(31952);const Y=function B(Be){for(var nt=(0,w.Z)(Be),mt=nt.length;mt--;){var ut=nt[mt],Ve=Be[ut];nt[mt]=[ut,Ve,P(Ve)]}return nt};const ue=function V(Be,nt){return function(mt){return null!=mt&&(mt[Be]===nt&&(void 0!==nt||Be in Object(mt)))}};const ae=function he(Be){var nt=Y(Be);return 1==nt.length&&nt[0][2]?ue(nt[0][0],nt[0][1]):function(mt){return mt===Be||E(mt,Be,nt)}};var X=p(49594),ve=p(55867),ye=p(48042),ge=p(62168),ne=1,pe=2;const xe=function Pe(Be,nt){return(0,ye.Z)(Be)&&P(nt)?ue((0,ge.Z)(Be),nt):function(mt){var ut=(0,X.Z)(mt,Be);return void 0===ut&&ut===nt?(0,ve.Z)(mt,Be):(0,e.Z)(nt,ut,ne|pe)}};var de=p(79940),re=p(14177),oe=p(70666),me=p(97298);const le=function be(Be){return function(nt){return(0,me.Z)(nt,Be)}};const Oe=function Z(Be){return(0,ye.Z)(Be)?(0,oe.Z)((0,ge.Z)(Be)):le(Be)};const ke=function j(Be){return"function"==typeof Be?Be:null==Be?de.Z:"object"==typeof Be?(0,re.Z)(Be)?xe(Be[0],Be[1]):ae(Be):Oe(Be)}},14884:(qe,I,p)=>{"use strict";p.d(I,{Z:()=>n});var o=p(11986);const D=(0,p(65820).Z)(Object.keys,Object);var E=Object.prototype.hasOwnProperty;const n=function T(P){if(!(0,o.Z)(P))return D(P);var w=[];for(var B in Object(P))E.call(P,B)&&"constructor"!=B&&w.push(B);return w}},45944:(qe,I,p)=>{"use strict";p.d(I,{Z:()=>ye});var o=p(27988),e=p(97298),l=p(5229),D=p(61082),g=p(78706);const T=function E(ge,ne){var pe=-1,Pe=(0,g.Z)(ge)?Array(ge.length):[];return(0,D.Z)(ge,function(xe,de,re){Pe[++pe]=ne(xe,de,re)}),Pe};const P=function n(ge,ne){var pe=ge.length;for(ge.sort(ne);pe--;)ge[pe]=ge[pe].value;return ge};var w=p(66932),B=p(96460);const V=function Y(ge,ne){if(ge!==ne){var pe=void 0!==ge,Pe=null===ge,xe=ge==ge,de=(0,B.Z)(ge),re=void 0!==ne,oe=null===ne,me=ne==ne,be=(0,B.Z)(ne);if(!oe&&!be&&!de&&ge>ne||de&&re&&me&&!oe&&!be||Pe&&re&&me||!pe&&me||!xe)return 1;if(!Pe&&!de&&!be&&ge<ne||be&&pe&&xe&&!Pe&&!de||oe&&pe&&xe||!re&&xe||!me)return-1}return 0};const he=function ue(ge,ne,pe){for(var Pe=-1,xe=ge.criteria,de=ne.criteria,re=xe.length,oe=pe.length;++Pe<re;){var me=V(xe[Pe],de[Pe]);if(me)return Pe>=oe?me:me*("desc"==pe[Pe]?-1:1)}return ge.index-ne.index};var ae=p(79940),X=p(14177);const ye=function ve(ge,ne,pe){ne=ne.length?(0,o.Z)(ne,function(de){return(0,X.Z)(de)?function(re){return(0,e.Z)(re,1===de.length?de[0]:de)}:de}):[ae.Z];var Pe=-1;ne=(0,o.Z)(ne,(0,w.Z)(l.Z));var xe=T(ge,function(de,re,oe){return{criteria:(0,o.Z)(ne,function(be){return be(de)}),index:++Pe,value:de}});return P(xe,function(de,re){return he(de,re,pe)})}},74166:(qe,I,p)=>{"use strict";p.d(I,{Z:()=>w});var o=p(97298),e=p(21481),l=p(25575),D=p(56667),g=p(71999),E=p(62168);const n=function T(B,Y,V,ue){if(!(0,g.Z)(B))return B;for(var he=-1,ae=(Y=(0,l.Z)(Y,B)).length,X=ae-1,ve=B;null!=ve&&++he<ae;){var ye=(0,E.Z)(Y[he]),ge=V;if("__proto__"===ye||"constructor"===ye||"prototype"===ye)return B;if(he!=X){var ne=ve[ye];void 0===(ge=ue?ue(ne,ye,ve):void 0)&&(ge=(0,g.Z)(ne)?ne:(0,D.Z)(Y[he+1])?[]:{})}(0,e.Z)(ve,ye,ge),ve=ve[ye]}return B};const w=function P(B,Y,V){for(var ue=-1,he=Y.length,ae={};++ue<he;){var X=Y[ue],ve=(0,o.Z)(B,X);V(ve,X)&&n(ae,(0,l.Z)(X,B),ve)}return ae}},70666:(qe,I,p)=>{"use strict";p.d(I,{Z:()=>e});const e=function o(l){return function(D){return D?.[l]}}},57965:(qe,I,p)=>{"use strict";p.d(I,{Z:()=>g});var o=p(79940),e=p(15604),l=p(38661);const g=function D(E,T){return(0,l.Z)((0,e.Z)(E,T,o.Z),E+"")}},8344:(qe,I,p)=>{"use strict";p.d(I,{Z:()=>e});const e=function o(l,D,g){var E=-1,T=l.length;D<0&&(D=-D>T?0:T+D),(g=g>T?T:g)<0&&(g+=T),T=D>g?0:g-D>>>0,D>>>=0;for(var n=Array(T);++E<T;)n[E]=l[E+D];return n}},66932:(qe,I,p)=>{"use strict";p.d(I,{Z:()=>e});const e=function o(l){return function(D){return l(D)}}},46368:(qe,I,p)=>{"use strict";p.d(I,{Z:()=>V});var o=p(3713),e=p(74666),l=p(69512),D=p(93228),g=p(97863),E=p(98395),T=p(42699);const w=g.Z&&1/(0,T.Z)(new g.Z([,-0]))[1]==1/0?function(ue){return new g.Z(ue)}:E.Z;var B=200;const V=function Y(ue,he,ae){var X=-1,ve=e.Z,ye=ue.length,ge=!0,ne=[],pe=ne;if(ae)ge=!1,ve=l.Z;else if(ye>=B){var Pe=he?null:w(ue);if(Pe)return(0,T.Z)(Pe);ge=!1,ve=D.Z,pe=new o.Z}else pe=he?[]:ne;e:for(;++X<ye;){var xe=ue[X],de=he?he(xe):xe;if(xe=ae||0!==xe?xe:0,ge&&de==de){for(var re=pe.length;re--;)if(pe[re]===de)continue e;he&&pe.push(de),ne.push(xe)}else ve(pe,de,ae)||(pe!==ne&&pe.push(de),ne.push(xe))}return ne}},12490:(qe,I,p)=>{"use strict";p.d(I,{Z:()=>P});var o=p(25575),e=p(38320),l=p(97298),D=p(8344);const E=function g(w,B){return B.length<2?w:(0,l.Z)(w,(0,D.Z)(B,0,-1))};var T=p(62168);const P=function n(w,B){return B=(0,o.Z)(B,w),null==(w=E(w,B))||delete w[(0,T.Z)((0,e.Z)(B))]}},93228:(qe,I,p)=>{"use strict";p.d(I,{Z:()=>e});const e=function o(l,D){return l.has(D)}},64183:(qe,I,p)=>{"use strict";p.d(I,{Z:()=>l});var o=p(67118);const l=function e(D){return(0,o.Z)(D)?D:[]}},25575:(qe,I,p)=>{"use strict";p.d(I,{Z:()=>ae});var o=p(14177),e=p(48042),l=p(43639),D="Expected a function";function g(X,ve){if("function"!=typeof X||null!=ve&&"function"!=typeof ve)throw new TypeError(D);var ye=function(){var ge=arguments,ne=ve?ve.apply(this,ge):ge[0],pe=ye.cache;if(pe.has(ne))return pe.get(ne);var Pe=X.apply(this,ge);return ye.cache=pe.set(ne,Pe)||pe,Pe};return ye.cache=new(g.Cache||l.Z),ye}g.Cache=l.Z;const E=g;var T=500;var w=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,B=/\\(\\)?/g;const V=function n(X){var ve=E(X,function(ge){return ye.size===T&&ye.clear(),ge}),ye=ve.cache;return ve}(function(X){var ve=[];return 46===X.charCodeAt(0)&&ve.push(""),X.replace(w,function(ye,ge,ne,pe){ve.push(ne?pe.replace(B,"$1"):ge||ye)}),ve});var ue=p(76506);const ae=function he(X,ve){return(0,o.Z)(X)?X:(0,e.Z)(X,ve)?[X]:V((0,ue.Z)(X))}},68297:(qe,I,p)=>{"use strict";p.d(I,{Z:()=>e});const e=function o(l,D){var g=-1,E=l.length;for(D||(D=Array(E));++g<E;)D[g]=l[g];return D}},83276:(qe,I,p)=>{"use strict";p.d(I,{Z:()=>D});var o=p(21481),e=p(43496);const D=function l(g,E,T,n){var P=!T;T||(T={});for(var w=-1,B=E.length;++w<B;){var Y=E[w],V=n?n(T[Y],g[Y],Y,T,g):void 0;void 0===V&&(V=g[Y]),P?(0,e.Z)(T,Y,V):(0,o.Z)(T,Y,V)}return T}},52370:(qe,I,p)=>{"use strict";p.d(I,{Z:()=>l});var o=p(53858);const l=function(){try{var D=(0,o.Z)(Object,"defineProperty");return D({},"",{}),D}catch{}}()},70420:(qe,I,p)=>{"use strict";p.d(I,{Z:()=>g});var o=p(76224),e=p(15604),l=p(38661);const g=function D(E){return(0,l.Z)((0,e.Z)(E,void 0,o.Z),E+"")}},38346:(qe,I,p)=>{"use strict";p.d(I,{Z:()=>e});const e="object"==typeof global&&global&&global.Object===Object&&global},28501:(qe,I,p)=>{"use strict";p.d(I,{Z:()=>g});var o=p(18203),e=p(13976),l=p(31952);const g=function D(E){return(0,o.Z)(E,l.Z,e.Z)}},28065:(qe,I,p)=>{"use strict";p.d(I,{Z:()=>g});var o=p(18203),e=p(7098),l=p(571);const g=function D(E){return(0,o.Z)(E,l.Z,e.Z)}},53858:(qe,I,p)=>{"use strict";p.d(I,{Z:()=>pe});var o=p(42089);const D=p(25946).Z["__core-js_shared__"];var Pe,g=(Pe=/[^.]+$/.exec(D&&D.keys&&D.keys.IE_PROTO||""))?"Symbol(src)_1."+Pe:"";const T=function E(Pe){return!!g&&g in Pe};var n=p(71999),P=p(94407),B=/^\[object .+?Constructor\]$/,Y=Function.prototype,V=Object.prototype,ue=Y.toString,he=V.hasOwnProperty,ae=RegExp("^"+ue.call(he).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");const ve=function X(Pe){return!(!(0,n.Z)(Pe)||T(Pe))&&((0,o.Z)(Pe)?ae:B).test((0,P.Z)(Pe))};const ge=function ye(Pe,xe){return Pe?.[xe]};const pe=function ne(Pe,xe){var de=ge(Pe,xe);return ve(de)?de:void 0}},65650:(qe,I,p)=>{"use strict";p.d(I,{Z:()=>l});const l=(0,p(65820).Z)(Object.getPrototypeOf,Object)},13976:(qe,I,p)=>{"use strict";p.d(I,{Z:()=>n});const e=function o(P,w){for(var B=-1,Y=null==P?0:P.length,V=0,ue=[];++B<Y;){var he=P[B];w(he,B,P)&&(ue[V++]=he)}return ue};var l=p(33419),g=Object.prototype.propertyIsEnumerable,E=Object.getOwnPropertySymbols;const n=E?function(P){return null==P?[]:(P=Object(P),e(E(P),function(w){return g.call(P,w)}))}:l.Z},7098:(qe,I,p)=>{"use strict";p.d(I,{Z:()=>T});var o=p(6623),e=p(65650),l=p(13976),D=p(33419);const T=Object.getOwnPropertySymbols?function(n){for(var P=[];n;)(0,o.Z)(P,(0,l.Z)(n)),n=(0,e.Z)(n);return P}:D.Z},20599:(qe,I,p)=>{"use strict";p.d(I,{Z:()=>xe});var o=p(53858),e=p(25946);const D=(0,o.Z)(e.Z,"DataView");var g=p(79329);const T=(0,o.Z)(e.Z,"Promise");var n=p(97863),P=p(68553),w=p(77079),B=p(94407),Y="[object Map]",ue="[object Promise]",he="[object Set]",ae="[object WeakMap]",X="[object DataView]",ve=(0,B.Z)(D),ye=(0,B.Z)(g.Z),ge=(0,B.Z)(T),ne=(0,B.Z)(n.Z),pe=(0,B.Z)(P.Z),Pe=w.Z;(D&&Pe(new D(new ArrayBuffer(1)))!=X||g.Z&&Pe(new g.Z)!=Y||T&&Pe(T.resolve())!=ue||n.Z&&Pe(new n.Z)!=he||P.Z&&Pe(new P.Z)!=ae)&&(Pe=function(de){var re=(0,w.Z)(de),oe="[object Object]"==re?de.constructor:void 0,me=oe?(0,B.Z)(oe):"";if(me)switch(me){case ve:return X;case ye:return Y;case ge:return ue;case ne:return he;case pe:return ae}return re});const xe=Pe},56667:(qe,I,p)=>{"use strict";p.d(I,{Z:()=>D});var o=9007199254740991,e=/^(?:0|[1-9]\d*)$/;const D=function l(g,E){var T=typeof g;return!!(E=E??o)&&("number"==T||"symbol"!=T&&e.test(g))&&g>-1&&g%1==0&&g<E}},48042:(qe,I,p)=>{"use strict";p.d(I,{Z:()=>E});var o=p(14177),e=p(96460),l=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,D=/^\w*$/;const E=function g(T,n){if((0,o.Z)(T))return!1;var P=typeof T;return!("number"!=P&&"symbol"!=P&&"boolean"!=P&&null!=T&&!(0,e.Z)(T))||(D.test(T)||!l.test(T)||null!=n&&T in Object(n))}},11986:(qe,I,p)=>{"use strict";p.d(I,{Z:()=>l});var o=Object.prototype;const l=function e(D){var g=D&&D.constructor;return D===("function"==typeof g&&g.prototype||o)}},76594:(qe,I,p)=>{"use strict";p.d(I,{Z:()=>T});var o=p(38346),e="object"==typeof exports&&exports&&!exports.nodeType&&exports,l=e&&"object"==typeof module&&module&&!module.nodeType&&module,g=l&&l.exports===e&&o.Z.process;const T=function(){try{return l&&l.require&&l.require("util").types||g&&g.binding&&g.binding("util")}catch{}}()},65820:(qe,I,p)=>{"use strict";p.d(I,{Z:()=>e});const e=function o(l,D){return function(g){return l(D(g))}}},15604:(qe,I,p)=>{"use strict";p.d(I,{Z:()=>g});const e=function o(E,T,n){switch(n.length){case 0:return E.call(T);case 1:return E.call(T,n[0]);case 2:return E.call(T,n[0],n[1]);case 3:return E.call(T,n[0],n[1],n[2])}return E.apply(T,n)};var l=Math.max;const g=function D(E,T,n){return T=l(void 0===T?E.length-1:T,0),function(){for(var P=arguments,w=-1,B=l(P.length-T,0),Y=Array(B);++w<B;)Y[w]=P[T+w];w=-1;for(var V=Array(T+1);++w<T;)V[w]=P[w];return V[T]=n(Y),e(E,this,V)}}},25946:(qe,I,p)=>{"use strict";p.d(I,{Z:()=>D});var o=p(38346),e="object"==typeof self&&self&&self.Object===Object&&self;const D=o.Z||e||Function("return this")()},42699:(qe,I,p)=>{"use strict";p.d(I,{Z:()=>e});const e=function o(l){var D=-1,g=Array(l.size);return l.forEach(function(E){g[++D]=E}),g}},38661:(qe,I,p)=>{"use strict";p.d(I,{Z:()=>V});const e=function o(ue){return function(){return ue}};var l=p(52370),D=p(79940);const E=l.Z?function(ue,he){return(0,l.Z)(ue,"toString",{configurable:!0,enumerable:!1,value:e(he),writable:!0})}:D.Z;var T=800,n=16,P=Date.now;const V=function w(ue){var he=0,ae=0;return function(){var X=P(),ve=n-(X-ae);if(ae=X,ve>0){if(++he>=T)return arguments[0]}else he=0;return ue.apply(void 0,arguments)}}(E)},62168:(qe,I,p)=>{"use strict";p.d(I,{Z:()=>D});var o=p(96460),e=1/0;const D=function l(g){if("string"==typeof g||(0,o.Z)(g))return g;var E=g+"";return"0"==E&&1/g==-e?"-0":E}},94407:(qe,I,p)=>{"use strict";p.d(I,{Z:()=>D});var e=Function.prototype.toString;const D=function l(g){if(null!=g){try{return e.call(g)}catch{}try{return g+""}catch{}}return""}},45840:(qe,I,p)=>{"use strict";p.d(I,{Z:()=>g});var o=p(29600),e=1,l=4;const g=function D(E){return(0,o.Z)(E,e|l)}},93093:(qe,I,p)=>{"use strict";p.d(I,{Z:()=>e});const e=function o(l,D){return l===D||l!=l&&D!=D}},76224:(qe,I,p)=>{"use strict";p.d(I,{Z:()=>l});var o=p(20113);const l=function e(D){return(null==D?0:D.length)?(0,o.Z)(D,1):[]}},49594:(qe,I,p)=>{"use strict";p.d(I,{Z:()=>l});var o=p(97298);const l=function e(D,g,E){var T=null==D?void 0:(0,o.Z)(D,g);return void 0===T?E:T}},92686:(qe,I,p)=>{"use strict";p.d(I,{Z:()=>ue});var o=p(43496);const l=function e(he,ae,X,ve){for(var ye=-1,ge=null==he?0:he.length;++ye<ge;){var ne=he[ye];ae(ve,ne,X(ne),he)}return ve};var D=p(61082);const E=function g(he,ae,X,ve){return(0,D.Z)(he,function(ye,ge,ne){ae(ve,ye,X(ye),ne)}),ve};var T=p(5229),n=p(14177);const w=function P(he,ae){return function(X,ve){var ye=(0,n.Z)(X)?l:E,ge=ae?ae():{};return ye(X,he,(0,T.Z)(ve,2),ge)}};var Y=Object.prototype.hasOwnProperty;const ue=w(function(he,ae,X){Y.call(he,X)?he[X].push(ae):(0,o.Z)(he,X,[ae])})},55867:(qe,I,p)=>{"use strict";p.d(I,{Z:()=>Y});const e=function o(V,ue){return null!=V&&ue in Object(V)};var l=p(25575),D=p(24825),g=p(14177),E=p(56667),T=p(68696),n=p(62168);const w=function P(V,ue,he){for(var ae=-1,X=(ue=(0,l.Z)(ue,V)).length,ve=!1;++ae<X;){var ye=(0,n.Z)(ue[ae]);if(!(ve=null!=V&&he(V,ye)))break;V=V[ye]}return ve||++ae!=X?ve:!!(X=null==V?0:V.length)&&(0,T.Z)(X)&&(0,E.Z)(ye,X)&&((0,g.Z)(V)||(0,D.Z)(V))};const Y=function B(V,ue){return null!=V&&w(V,ue,e)}},78033:(qe,I,p)=>{"use strict";p.d(I,{Z:()=>e});const e=function o(l){return l&&l.length?l[0]:void 0}},79940:(qe,I,p)=>{"use strict";p.d(I,{Z:()=>e});const e=function o(l){return l}},24825:(qe,I,p)=>{"use strict";p.d(I,{Z:()=>w});var o=p(77079),e=p(214),l="[object Arguments]";const g=function D(B){return(0,e.Z)(B)&&(0,o.Z)(B)==l};var E=Object.prototype,T=E.hasOwnProperty,n=E.propertyIsEnumerable;const w=g(function(){return arguments}())?g:function(B){return(0,e.Z)(B)&&T.call(B,"callee")&&!n.call(B,"callee")}},14177:(qe,I,p)=>{"use strict";p.d(I,{Z:()=>e});const e=Array.isArray},78706:(qe,I,p)=>{"use strict";p.d(I,{Z:()=>D});var o=p(42089),e=p(68696);const D=function l(g){return null!=g&&(0,e.Z)(g.length)&&!(0,o.Z)(g)}},67118:(qe,I,p)=>{"use strict";p.d(I,{Z:()=>D});var o=p(78706),e=p(214);const D=function l(g){return(0,e.Z)(g)&&(0,o.Z)(g)}},85202:(qe,I,p)=>{"use strict";p.d(I,{Z:()=>w});var o=p(25946);const l=function e(){return!1};var D="object"==typeof exports&&exports&&!exports.nodeType&&exports,g=D&&"object"==typeof module&&module&&!module.nodeType&&module,T=g&&g.exports===D?o.Z.Buffer:void 0;const w=(T?T.isBuffer:void 0)||l},59378:(qe,I,p)=>{"use strict";p.d(I,{Z:()=>ue});var o=p(14884),e=p(20599),l=p(24825),D=p(14177),g=p(78706),E=p(85202),T=p(11986),n=p(87583),P="[object Map]",w="[object Set]",Y=Object.prototype.hasOwnProperty;const ue=function V(he){if(null==he)return!0;if((0,g.Z)(he)&&((0,D.Z)(he)||"string"==typeof he||"function"==typeof he.splice||(0,E.Z)(he)||(0,n.Z)(he)||(0,l.Z)(he)))return!he.length;var ae=(0,e.Z)(he);if(ae==P||ae==w)return!he.size;if((0,T.Z)(he))return!(0,o.Z)(he).length;for(var X in he)if(Y.call(he,X))return!1;return!0}},41854:(qe,I,p)=>{"use strict";p.d(I,{Z:()=>l});var o=p(77088);const l=function e(D,g){return(0,o.Z)(D,g)}},42089:(qe,I,p)=>{"use strict";p.d(I,{Z:()=>n});var o=p(77079),e=p(71999),l="[object AsyncFunction]",D="[object Function]",g="[object GeneratorFunction]",E="[object Proxy]";const n=function T(P){if(!(0,e.Z)(P))return!1;var w=(0,o.Z)(P);return w==D||w==g||w==l||w==E}},68696:(qe,I,p)=>{"use strict";p.d(I,{Z:()=>l});var o=9007199254740991;const l=function e(D){return"number"==typeof D&&D>-1&&D%1==0&&D<=o}},21441:(qe,I,p)=>{"use strict";p.d(I,{Z:()=>e});const e=function o(l){return null==l}},68924:(qe,I,p)=>{"use strict";p.d(I,{Z:()=>e});const e=function o(l){return null===l}},40190:(qe,I,p)=>{"use strict";p.d(I,{Z:()=>g});var o=p(77079),e=p(214),l="[object Number]";const g=function D(E){return"number"==typeof E||(0,e.Z)(E)&&(0,o.Z)(E)==l}},71999:(qe,I,p)=>{"use strict";p.d(I,{Z:()=>e});const e=function o(l){var D=typeof l;return null!=l&&("object"==D||"function"==D)}},214:(qe,I,p)=>{"use strict";p.d(I,{Z:()=>e});const e=function o(l){return null!=l&&"object"==typeof l}},85689:(qe,I,p)=>{"use strict";p.d(I,{Z:()=>E});var o=p(77079),e=p(14177),l=p(214),D="[object String]";const E=function g(T){return"string"==typeof T||!(0,e.Z)(T)&&(0,l.Z)(T)&&(0,o.Z)(T)==D}},96460:(qe,I,p)=>{"use strict";p.d(I,{Z:()=>g});var o=p(77079),e=p(214),l="[object Symbol]";const g=function D(E){return"symbol"==typeof E||(0,e.Z)(E)&&(0,o.Z)(E)==l}},87583:(qe,I,p)=>{"use strict";p.d(I,{Z:()=>Be});var o=p(77079),e=p(68696),l=p(214),me={};me["[object Float32Array]"]=me["[object Float64Array]"]=me["[object Int8Array]"]=me["[object Int16Array]"]=me["[object Int32Array]"]=me["[object Uint8Array]"]=me["[object Uint8ClampedArray]"]=me["[object Uint16Array]"]=me["[object Uint32Array]"]=!0,me["[object Arguments]"]=me["[object Array]"]=me["[object ArrayBuffer]"]=me["[object Boolean]"]=me["[object DataView]"]=me["[object Date]"]=me["[object Error]"]=me["[object Function]"]=me["[object Map]"]=me["[object Number]"]=me["[object Object]"]=me["[object RegExp]"]=me["[object Set]"]=me["[object String]"]=me["[object WeakMap]"]=!1;const le=function be(nt){return(0,l.Z)(nt)&&(0,e.Z)(nt.length)&&!!me[(0,o.Z)(nt)]};var Z=p(66932),Oe=p(76594),j=Oe.Z&&Oe.Z.isTypedArray;const Be=j?(0,Z.Z)(j):le},31952:(qe,I,p)=>{"use strict";p.d(I,{Z:()=>g});var o=p(73487),e=p(14884),l=p(78706);const g=function D(E){return(0,l.Z)(E)?(0,o.Z)(E):(0,e.Z)(E)}},571:(qe,I,p)=>{"use strict";p.d(I,{Z:()=>Y});var o=p(73487),e=p(71999),l=p(11986);const g=function D(V){var ue=[];if(null!=V)for(var he in Object(V))ue.push(he);return ue};var T=Object.prototype.hasOwnProperty;const P=function n(V){if(!(0,e.Z)(V))return g(V);var ue=(0,l.Z)(V),he=[];for(var ae in V)"constructor"==ae&&(ue||!T.call(V,ae))||he.push(ae);return he};var w=p(78706);const Y=function B(V){return(0,w.Z)(V)?(0,o.Z)(V,!0):P(V)}},38320:(qe,I,p)=>{"use strict";p.d(I,{Z:()=>e});const e=function o(l){var D=null==l?0:l.length;return D?l[D-1]:void 0}},98395:(qe,I,p)=>{"use strict";p.d(I,{Z:()=>e});const e=function o(){}},71178:(qe,I,p)=>{"use strict";p.d(I,{Z:()=>B});var o=p(5229),e="Expected a function";const D=function l(Y){if("function"!=typeof Y)throw new TypeError(e);return function(){var V=arguments;switch(V.length){case 0:return!Y.call(this);case 1:return!Y.call(this,V[0]);case 2:return!Y.call(this,V[0],V[1]);case 3:return!Y.call(this,V[0],V[1],V[2])}return!Y.apply(this,V)}};var g=p(27988),E=p(74166),T=p(28065);const P=function n(Y,V){if(null==Y)return{};var ue=(0,g.Z)((0,T.Z)(Y),function(he){return[he]});return V=(0,o.Z)(V),(0,E.Z)(Y,ue,function(he,ae){return V(he,ae[0])})};const B=function w(Y,V){return P(Y,D((0,o.Z)(V)))}},86377:(qe,I,p)=>{"use strict";p.d(I,{Z:()=>D});var o=p(45944),e=p(14177);const D=function l(g,E,T,n){return null==g?[]:((0,e.Z)(E)||(E=null==E?[]:[E]),T=n?void 0:T,(0,e.Z)(T)||(T=null==T?[]:[T]),(0,o.Z)(g,E,T))}},74744:(qe,I,p)=>{"use strict";p.d(I,{Z:()=>T});var o=p(74166),e=p(55867);const D=function l(n,P){return(0,o.Z)(n,P,function(w,B){return(0,e.Z)(n,B)})};const T=(0,p(70420).Z)(function(n,P){return null==n?{}:D(n,P)})},78240:(qe,I,p)=>{"use strict";p.d(I,{Z:()=>P});var o=p(5229),e=p(12490),l=p(56667),g=Array.prototype.splice;const T=function E(w,B){for(var Y=w?B.length:0,V=Y-1;Y--;){var ue=B[Y];if(Y==V||ue!==he){var he=ue;(0,l.Z)(ue)?g.call(w,ue,1):(0,e.Z)(w,ue)}}return w};const P=function n(w,B){var Y=[];if(!w||!w.length)return Y;var V=-1,ue=[],he=w.length;for(B=(0,o.Z)(B,3);++V<he;){var ae=w[V];B(ae,V,w)&&(Y.push(ae),ue.push(V))}return T(w,ue),Y}},54603:(qe,I,p)=>{"use strict";p.d(I,{Z:()=>B});var o=p(20113),e=p(45944),l=p(57965),D=p(93093),g=p(78706),E=p(56667),T=p(71999);const P=function n(Y,V,ue){if(!(0,T.Z)(ue))return!1;var he=typeof V;return!!("number"==he?(0,g.Z)(ue)&&(0,E.Z)(V,ue.length):"string"==he&&V in ue)&&(0,D.Z)(ue[V],Y)};const B=(0,l.Z)(function(Y,V){if(null==Y)return[];var ue=V.length;return ue>1&&P(Y,V[0],V[1])?V=[]:ue>2&&P(V[0],V[1],V[2])&&(V=[V[0]]),(0,e.Z)(Y,(0,o.Z)(V,1),[])})},33419:(qe,I,p)=>{"use strict";p.d(I,{Z:()=>e});const e=function o(){return[]}},33765:(qe,I,p)=>{"use strict";p.d(I,{Z:()=>he});var o=/\s/;const l=function e(ae){for(var X=ae.length;X--&&o.test(ae.charAt(X)););return X};var D=/^\s+/;const E=function g(ae){return ae&&ae.slice(0,l(ae)+1).replace(D,"")};var T=p(71999),n=p(96460),P=NaN,w=/^[-+]0x[0-9a-f]+$/i,B=/^0b[01]+$/i,Y=/^0o[0-7]+$/i,V=parseInt;const he=function ue(ae){if("number"==typeof ae)return ae;if((0,n.Z)(ae))return P;if((0,T.Z)(ae)){var X="function"==typeof ae.valueOf?ae.valueOf():ae;ae=(0,T.Z)(X)?X+"":X}if("string"!=typeof ae)return 0===ae?ae:+ae;ae=E(ae);var ve=B.test(ae);return ve||Y.test(ae)?V(ae.slice(2),ve?2:8):w.test(ae)?P:+ae}},76506:(qe,I,p)=>{"use strict";p.d(I,{Z:()=>B});var o=p(38492),e=p(27988),l=p(14177),D=p(96460),g=1/0,E=o.Z?o.Z.prototype:void 0,T=E?E.toString:void 0;const P=function n(Y){if("string"==typeof Y)return Y;if((0,l.Z)(Y))return(0,e.Z)(Y,n)+"";if((0,D.Z)(Y))return T?T.call(Y):"";var V=Y+"";return"0"==V&&1/Y==-g?"-0":V};const B=function w(Y){return null==Y?"":P(Y)}},5698:(qe,I,p)=>{"use strict";p.d(I,{Z:()=>D});var o=p(5229),e=p(46368);const D=function l(g,E){return g&&g.length?(0,e.Z)(g,(0,o.Z)(E,2)):[]}},93795:(qe,I,p)=>{"use strict";p.d(I,{x0:()=>Pe});var o=p(94650),e=p(36895);const l={UKNOWN:"Unknown"},D={CHROME:"Chrome",FIREFOX:"Firefox",SAFARI:"Safari",OPERA:"Opera",IE:"IE",MS_EDGE:"MS-Edge",MS_EDGE_CHROMIUM:"MS-Edge-Chromium",FB_MESSANGER:"FB-Messanger",SAMSUNG:"Samsung",UCBROWSER:"UC-Browser",UNKNOWN:l.UKNOWN},g={HTC:/HTC|HTC.*(Sensation|Evo|Vision|Explorer|6800|8100|8900|A7272|S510e|C110e|Legend|Desire|T8282)|APX515CKT|Qtek9090|APA9292KT|HD_mini|Sensation.*Z710e|PG86100|Z715e|Desire.*(A8181|HD)|ADR6200|ADR6400L|ADR6425|001HT|Inspire 4G|Android.*\bEVO\b|T-Mobile G1|Z520m|Android [0-9.]+; Pixel/,NEXUS_PHONE:/Nexus One|Nexus S|Galaxy.*Nexus|Android.*Nexus.*Mobile|Nexus 4|Nexus 5|Nexus 6/,DELL:/Dell[;]? (Streak|Aero|Venue|Venue Pro|Flash|Smoke|Mini 3iX)|XCD28|XCD35|\b001DL\b|\b101DL\b|\bGS01\b/,MOTOROLA:new RegExp("Motorola|DROIDX|DROID BIONIC|\\bDroid\\b.*Build|Android.*Xoom|HRI39|MOT-|A1260|A1680|A555|A853|\n      A855|A953|A955|A956|Motorola.*ELECTRIFY|Motorola.*i1|i867|i940|MB200|MB300|MB501|MB502|MB508|MB511|\n      MB520|MB525|MB526|MB611|MB612|MB632|MB810|MB855|MB860|MB861|MB865|MB870|ME501|ME502|ME511|ME525|ME600|\n      ME632|ME722|ME811|ME860|ME863|ME865|MT620|MT710|MT716|MT720|MT810|MT870|MT917|Motorola.*TITANIUM|WX435|\n      WX445|XT300|XT301|XT311|XT316|XT317|XT319|XT320|XT390|XT502|XT530|XT531|XT532|XT535|XT603|XT610|XT611|\n      XT615|XT681|XT701|XT702|XT711|XT720|XT800|XT806|XT860|XT862|XT875|XT882|XT883|XT894|XT901|XT907|XT909|\n      XT910|XT912|XT928|XT926|XT915|XT919|XT925|XT1021|\\bMoto E\\b|XT1068|XT1092|XT1052"),SAMSUNG:new RegExp("\\bSamsung\\b|SM-G950F|SM-G955F|SM-G9250|GT-19300|SGH-I337|BGT-S5230|GT-B2100|GT-B2700|GT-B2710|\n      GT-B3210|GT-B3310|GT-B3410|GT-B3730|GT-B3740|GT-B5510|GT-B5512|GT-B5722|GT-B6520|GT-B7300|GT-B7320|\n      GT-B7330|GT-B7350|GT-B7510|GT-B7722|GT-B7800|GT-C3010|GT-C3011|GT-C3060|GT-C3200|GT-C3212|GT-C3212I|\n      GT-C3262|GT-C3222|GT-C3300|GT-C3300K|GT-C3303|GT-C3303K|GT-C3310|GT-C3322|GT-C3330|GT-C3350|GT-C3500|\n      GT-C3510|GT-C3530|GT-C3630|GT-C3780|GT-C5010|GT-C5212|GT-C6620|GT-C6625|GT-C6712|GT-E1050|GT-E1070|\n      GT-E1075|GT-E1080|GT-E1081|GT-E1085|GT-E1087|GT-E1100|GT-E1107|GT-E1110|GT-E1120|GT-E1125|GT-E1130|\n      GT-E1160|GT-E1170|GT-E1175|GT-E1180|GT-E1182|GT-E1200|GT-E1210|GT-E1225|GT-E1230|GT-E1390|GT-E2100|\n      GT-E2120|GT-E2121|GT-E2152|GT-E2220|GT-E2222|GT-E2230|GT-E2232|GT-E2250|GT-E2370|GT-E2550|GT-E2652|\n      GT-E3210|GT-E3213|GT-I5500|GT-I5503|GT-I5700|GT-I5800|GT-I5801|GT-I6410|GT-I6420|GT-I7110|GT-I7410|\n      GT-I7500|GT-I8000|GT-I8150|GT-I8160|GT-I8190|GT-I8320|GT-I8330|GT-I8350|GT-I8530|GT-I8700|GT-I8703|\n      GT-I8910|GT-I9000|GT-I9001|GT-I9003|GT-I9010|GT-I9020|GT-I9023|GT-I9070|GT-I9082|GT-I9100|GT-I9103|\n      GT-I9220|GT-I9250|GT-I9300|GT-I9305|GT-I9500|GT-I9505|GT-M3510|GT-M5650|GT-M7500|GT-M7600|GT-M7603|\n      GT-M8800|GT-M8910|GT-N7000|GT-S3110|GT-S3310|GT-S3350|GT-S3353|GT-S3370|GT-S3650|GT-S3653|GT-S3770|\n      GT-S3850|GT-S5210|GT-S5220|GT-S5229|GT-S5230|GT-S5233|GT-S5250|GT-S5253|GT-S5260|GT-S5263|GT-S5270|\n      GT-S5300|GT-S5330|GT-S5350|GT-S5360|GT-S5363|GT-S5369|GT-S5380|GT-S5380D|GT-S5560|GT-S5570|GT-S5600|\n      GT-S5603|GT-S5610|GT-S5620|GT-S5660|GT-S5670|GT-S5690|GT-S5750|GT-S5780|GT-S5830|GT-S5839|GT-S6102|\n      GT-S6500|GT-S7070|GT-S7200|GT-S7220|GT-S7230|GT-S7233|GT-S7250|GT-S7500|GT-S7530|GT-S7550|GT-S7562|\n      GT-S7710|GT-S8000|GT-S8003|GT-S8500|GT-S8530|GT-S8600|SCH-A310|SCH-A530|SCH-A570|SCH-A610|SCH-A630|\n      SCH-A650|SCH-A790|SCH-A795|SCH-A850|SCH-A870|SCH-A890|SCH-A930|SCH-A950|SCH-A970|SCH-A990|SCH-I100|\n      SCH-I110|SCH-I400|SCH-I405|SCH-I500|SCH-I510|SCH-I515|SCH-I600|SCH-I730|SCH-I760|SCH-I770|SCH-I830|\n      SCH-I910|SCH-I920|SCH-I959|SCH-LC11|SCH-N150|SCH-N300|SCH-R100|SCH-R300|SCH-R351|SCH-R400|SCH-R410|\n      SCH-T300|SCH-U310|SCH-U320|SCH-U350|SCH-U360|SCH-U365|SCH-U370|SCH-U380|SCH-U410|SCH-U430|SCH-U450|\n      SCH-U460|SCH-U470|SCH-U490|SCH-U540|SCH-U550|SCH-U620|SCH-U640|SCH-U650|SCH-U660|SCH-U700|SCH-U740|\n      SCH-U750|SCH-U810|SCH-U820|SCH-U900|SCH-U940|SCH-U960|SCS-26UC|SGH-A107|SGH-A117|SGH-A127|SGH-A137|\n      SGH-A157|SGH-A167|SGH-A177|SGH-A187|SGH-A197|SGH-A227|SGH-A237|SGH-A257|SGH-A437|SGH-A517|SGH-A597|\n      SGH-A637|SGH-A657|SGH-A667|SGH-A687|SGH-A697|SGH-A707|SGH-A717|SGH-A727|SGH-A737|SGH-A747|SGH-A767|\n      SGH-A777|SGH-A797|SGH-A817|SGH-A827|SGH-A837|SGH-A847|SGH-A867|SGH-A877|SGH-A887|SGH-A897|SGH-A927|\n      SGH-B100|SGH-B130|SGH-B200|SGH-B220|SGH-C100|SGH-C110|SGH-C120|SGH-C130|SGH-C140|SGH-C160|SGH-C170|\n      SGH-C180|SGH-C200|SGH-C207|SGH-C210|SGH-C225|SGH-C230|SGH-C417|SGH-C450|SGH-D307|SGH-D347|SGH-D357|\n      SGH-D407|SGH-D415|SGH-D780|SGH-D807|SGH-D980|SGH-E105|SGH-E200|SGH-E315|SGH-E316|SGH-E317|SGH-E335|\n      SGH-E590|SGH-E635|SGH-E715|SGH-E890|SGH-F300|SGH-F480|SGH-I200|SGH-I300|SGH-I320|SGH-I550|SGH-I577|\n      SGH-I600|SGH-I607|SGH-I617|SGH-I627|SGH-I637|SGH-I677|SGH-I700|SGH-I717|SGH-I727|SGH-i747M|SGH-I777|\n      SGH-I780|SGH-I827|SGH-I847|SGH-I857|SGH-I896|SGH-I897|SGH-I900|SGH-I907|SGH-I917|SGH-I927|SGH-I937|\n      SGH-I997|SGH-J150|SGH-J200|SGH-L170|SGH-L700|SGH-M110|SGH-M150|SGH-M200|SGH-N105|SGH-N500|SGH-N600|\n      SGH-N620|SGH-N625|SGH-N700|SGH-N710|SGH-P107|SGH-P207|SGH-P300|SGH-P310|SGH-P520|SGH-P735|SGH-P777|\n      SGH-Q105|SGH-R210|SGH-R220|SGH-R225|SGH-S105|SGH-S307|SGH-T109|SGH-T119|SGH-T139|SGH-T209|SGH-T219|\n      SGH-T229|SGH-T239|SGH-T249|SGH-T259|SGH-T309|SGH-T319|SGH-T329|SGH-T339|SGH-T349|SGH-T359|SGH-T369|\n      SGH-T379|SGH-T409|SGH-T429|SGH-T439|SGH-T459|SGH-T469|SGH-T479|SGH-T499|SGH-T509|SGH-T519|SGH-T539|\n      SGH-T559|SGH-T589|SGH-T609|SGH-T619|SGH-T629|SGH-T639|SGH-T659|SGH-T669|SGH-T679|SGH-T709|SGH-T719|\n      SGH-T729|SGH-T739|SGH-T746|SGH-T749|SGH-T759|SGH-T769|SGH-T809|SGH-T819|SGH-T839|SGH-T919|SGH-T929|\n      SGH-T939|SGH-T959|SGH-T989|SGH-U100|SGH-U200|SGH-U800|SGH-V205|SGH-V206|SGH-X100|SGH-X105|SGH-X120|\n      SGH-X140|SGH-X426|SGH-X427|SGH-X475|SGH-X495|SGH-X497|SGH-X507|SGH-X600|SGH-X610|SGH-X620|SGH-X630|\n      SGH-X700|SGH-X820|SGH-X890|SGH-Z130|SGH-Z150|SGH-Z170|SGH-ZX10|SGH-ZX20|SHW-M110|SPH-A120|SPH-A400|\n      SPH-A420|SPH-A460|SPH-A500|SPH-A560|SPH-A600|SPH-A620|SPH-A660|SPH-A700|SPH-A740|SPH-A760|SPH-A790|\n      SPH-A800|SPH-A820|SPH-A840|SPH-A880|SPH-A900|SPH-A940|SPH-A960|SPH-D600|SPH-D700|SPH-D710|SPH-D720|\n      SPH-I300|SPH-I325|SPH-I330|SPH-I350|SPH-I500|SPH-I600|SPH-I700|SPH-L700|SPH-M100|SPH-M220|SPH-M240|\n      SPH-M300|SPH-M305|SPH-M320|SPH-M330|SPH-M350|SPH-M360|SPH-M370|SPH-M380|SPH-M510|SPH-M540|SPH-M550|\n      SPH-M560|SPH-M570|SPH-M580|SPH-M610|SPH-M620|SPH-M630|SPH-M800|SPH-M810|SPH-M850|SPH-M900|SPH-M910|\n      SPH-M920|SPH-M930|SPH-N100|SPH-N200|SPH-N240|SPH-N300|SPH-N400|SPH-Z400|SWC-E100|SCH-i909|GT-N7100|\n      GT-N7105|SCH-I535|SM-N900A|SM-N900T|SGH-I317|SGH-T999L|GT-S5360B|GT-I8262|GT-S6802|GT-S6312|GT-S6310|GT-S5312|\n      GT-S5310|GT-I9105|GT-I8510|GT-S6790N|SM-G7105|SM-N9005|GT-S5301|GT-I9295|GT-I9195|SM-C101|GT-S7392|GT-S7560|\n      GT-B7610|GT-I5510|GT-S7582|GT-S7530E|GT-I8750|SM-G9006V|SM-G9008V|SM-G9009D|SM-G900A|SM-G900D|SM-G900F|\n      SM-G900H|SM-G900I|SM-G900J|SM-G900K|SM-G900L|SM-G900M|SM-G900P|SM-G900R4|SM-G900S|SM-G900T|SM-G900V|\n      SM-G900W8|SHV-E160K|SCH-P709|SCH-P729|SM-T2558|GT-I9205|SM-G9350|SM-J120F|SM-G920F|SM-G920V|SM-G930F|\n      SM-N910C|SM-A310F|GT-I9190|SM-J500FN|SM-G903F|SM-J330F"),LG:new RegExp("\\bLG\\b;|LG[- ]?(C800|C900|E400|E610|E900|E-900|F160|F180K|F180L|F180S|730|855|L160|LS740|LS840|LS970|\n      LU6200|MS690|MS695|MS770|MS840|MS870|MS910|P500|P700|P705|VM696|AS680|AS695|AX840|C729|E970|GS505|272|\n      C395|E739BK|E960|L55C|L75C|LS696|LS860|P769BK|P350|P500|P509|P870|UN272|US730|VS840|VS950|LN272|LN510|\n      LS670|LS855|LW690|MN270|MN510|P509|P769|P930|UN200|UN270|UN510|UN610|US670|US740|US760|UX265|UX840|VN271|\n      VN530|VS660|VS700|VS740|VS750|VS910|VS920|VS930|VX9200|VX11000|AX840A|LW770|P506|P925|P999|E612|D955|D802|\n      MS323|M257)"),SONY:/SonyST|SonyLT|SonyEricsson|SonyEricssonLT15iv|LT18i|E10i|LT28h|LT26w|SonyEricssonMT27i|C5303|C6902|C6903|C6906|C6943|D2533/,ASUS:/Asus.*Galaxy|PadFone.*Mobile/,NOKIA_LUMIA:/Lumia [0-9]{3,4}/,MICROMAX:/Micromax.*\b(A210|A92|A88|A72|A111|A110Q|A115|A116|A110|A90S|A26|A51|A35|A54|A25|A27|A89|A68|A65|A57|A90)\b/,PALM:/PalmSource|Palm/,VERTU:/Vertu|Vertu.*Ltd|Vertu.*Ascent|Vertu.*Ayxta|Vertu.*Constellation(F|Quest)?|Vertu.*Monika|Vertu.*Signature/,PANTECH:new RegExp("PANTECH|IM-A850S|IM-A840S|IM-A830L|IM-A830K|IM-A830S|IM-A820L|IM-A810K|IM-A810S|IM-A800S|IM-T100K|\n        IM-A725L|IM-A780L|IM-A775C|IM-A770K|IM-A760S|IM-A750K|IM-A740S|IM-A730S|IM-A720L|IM-A710K|IM-A690L|\n        IM-A690S|IM-A650S|IM-A630K|IM-A600S|VEGA PTL21|PT003|P8010|ADR910L|P6030|P6020|P9070|P4100|P9060|P5000|\n        CDM8992|TXT8045|ADR8995|IS11PT|P2030|P6010|P8000|PT002|IS06|CDM8999|P9050|PT001|TXT8040|P2020|P9020|\n        P2000|P7040|P7000|C790"),FLY:/IQ230|IQ444|IQ450|IQ440|IQ442|IQ441|IQ245|IQ256|IQ236|IQ255|IQ235|IQ245|IQ275|IQ240|IQ285|IQ280|IQ270|IQ260|IQ250/,WIKO:new RegExp("KITE 4G|HIGHWAY|GETAWAY|STAIRWAY|DARKSIDE|DARKFULL|DARKNIGHT|DARKMOON|SLIDE|WAX 4G|RAINBOW|BLOOM|\n        SUNSET|GOA(?!nna)|LENNY|BARRY|IGGY|OZZY|CINK FIVE|CINK PEAX|CINK PEAX 2|CINK SLIM|CINK SLIM 2|CINK +|\n        CINK KING|CINK PEAX|CINK SLIM|SUBLIM"),I_MOBILE:/i-mobile (IQ|i-STYLE|idea|ZAA|Hitz)/,SIMVALLEY:/\b(SP-80|XT-930|SX-340|XT-930|SX-310|SP-360|SP60|SPT-800|SP-120|SPT-800|SP-140|SPX-5|SPX-8|SP-100|SPX-8|SPX-12)\b/,WOLFGANG:/AT-B24D|AT-AS50HD|AT-AS40W|AT-AS55HD|AT-AS45q2|AT-B26D|AT-AS50Q/,ALCATEL:/Alcatel|Mobile; rv:49.0|Mobile; ALCATEL 4052R; rv:48.0/,NINTENDO:/Nintendo (3DS|Switch)/,AMOI:/Amoi/,INQ:/INQ/,VITA:/\bVita\b/,BLACKBERRY:/\bBlackBerry\b|\bBB10\b|rim[0-9]+/,FIREFOX_OS:/\bFirefox-OS\b/,IPHONE:/\biPhone\b/,iPod:/\biPod\b/,ANDROID:/\bAndroid\b/,WINDOWS_PHONE:/\bWindows-Phone\b/,GENERIC_PHONE:new RegExp("Tapatalk|PDA;|SAGEM|\\bmmp\\b|pocket|\\bpsp\\b|symbian|Smartphone|smartfon|treo|up.browser|\n        up.link|vodafone|\\bwap\\b|nokia|Nokia|Series40|Series60|S60|SonyEricsson|N900|MAUI.*WAP.*Browser")},E={iPad:/iPad|iPad.*Mobile/,NexusTablet:/Android.*Nexus[\s]+(7|9|10)/,GoogleTablet:/Android.*Pixel C/,SamsungTablet:new RegExp("SAMSUNG.*Tablet|Galaxy.*Tab|SC-01C|GT-P1000|GT-P1003|GT-P1010|GT-P3105|GT-P6210|\n        GT-P6800|GT-P6810|GT-P7100|GT-P7300|GT-P7310|GT-P7500|GT-P7510|SCH-I800|SCH-I815|SCH-I905|\n        SGH-I957|SGH-I987|SGH-T849|SGH-T859|SGH-T869|SPH-P100|GT-P3100|GT-P3108|GT-P3110|GT-P5100|\n        GT-P5110|GT-P6200|GT-P7320|GT-P7511|GT-N8000|GT-P8510|SGH-I497|SPH-P500|SGH-T779|SCH-I705|\n        SCH-I915|GT-N8013|GT-P3113|GT-P5113|GT-P8110|GT-N8010|GT-N8005|GT-N8020|GT-P1013|GT-P6201|\n        GT-P7501|GT-N5100|GT-N5105|GT-N5110|SHV-E140K|SHV-E140L|SHV-E140S|SHV-E150S|SHV-E230K|SHV-E230L|\n        SHV-E230S|SHW-M180K|SHW-M180L|SM-T865|SM-T290|SHW-M180S|SHW-M180W|SHW-M300W|SHW-M305W|SHW-M380K|SHW-M380S|SHW-M380W|\n        SHW-M430W|SHW-M480K|SHW-M480S|SHW-M480W|SHW-M485W|SHW-M486W|SHW-M500W|GT-I9228|SCH-P739|SCH-I925|\n        GT-I9200|GT-P5200|GT-P5210|GT-P5210X|SM-T385M|SM-P585M|SM-T311|SM-T310|SM-T310X|SM-T210|SM-T210R|SM-T211|SM-P600|\n        SM-P601|SM-P605|SM-P615|SM-P900|SM-P901|SM-T217|SM-T217A|SM-T217S|SM-P6000|SM-T3100|SGH-I467|XE500|SM-T110|\n        GT-P5220|GT-I9200X|GT-N5110X|GT-N5120|SM-P905|SM-T111|SM-T2105|SM-T315|SM-T320|SM-T320X|SM-T321|\n        SM-T510|SM-T520|SM-T525|SM-T530NU|SM-T230NU|SM-T330NU|SM-T900|XE500T1C|SM-P605V|SM-P905V|SM-T337V|SM-T537V|\n        SM-T707V|SM-T807V|SM-P600X|SM-P900X|SM-T210X|SM-T230|SM-T230X|SM-T325|GT-P7503|SM-T531|SM-T500|SM-T330|\n        SM-T530|SM-T705|SM-T705C|SM-T535|SM-T331|SM-T800|SM-T700|SM-T537|SM-T807|SM-P907A|SM-T337A|SM-T537A|\n        SM-T707A|SM-T807A|SM-T237|SM-T807P|SM-P607T|SM-T217T|SM-T337T|SM-T807T|SM-T116NQ|SM-T116BU|SM-P550|\n        SM-T350|SM-T550|SM-T9000|SM-P9000|SM-T705Y|SM-T805|GT-P3113|SM-T710|SM-T810|SM-T815|SM-T360|SM-T533|\n        SM-T113|SM-T335|SM-T715|SM-T560|SM-T670|SM-T677|SM-T377|SM-T567|SM-T357T|SM-T555|SM-T561|SM-T713|\n        SM-T719|SM-T725|SM-T813|SM-T819|SM-T580|SM-T590|SM-T355Y?|SM-T280|SM-T817A|SM-T820|SM-W700|SM-P580|SM-T587|SM-P350|\n        SM-P555M|SM-P355M|SM-T113NU|SM-T815Y|SM-T585|SM-T285|SM-T825|SM-W708|SM-T835|SM-P585Y|SM-X200"),Kindle:new RegExp("Kindle|Silk.*Accelerated|Android.*\\b(KFOT|KFTT|KFJWI|KFJWA|KFOTE|KFSOWI|KFTHWI|KFTHWA|KFAPWI|\n        KFAPWA|WFJWAE|KFSAWA|KFSAWI|KFASWI|KFARWI|KFFOWI|KFGIWI|KFMEWI)\\b|Android.*Silk/[0-9.]+ like Chrome        /[0-9.]+ (?!Mobile)"),SurfaceTablet:/Windows NT [0-9.]+; ARM;.*(Tablet|ARMBJS)/,HPTablet:/HP Slate (7|8|10)|HP ElitePad 900|hp-tablet|EliteBook.*Touch|HP 8|Slate 21|HP SlateBook 10/,AsusTablet:new RegExp("^.*PadFone((?!Mobile).)*$|Transformer|TF101|TF101G|TF300T|TF300TG|TF300TL|TF700T|TF700KL|\n        TF701T|TF810C|ME171|ME301T|ME302C|ME371MG|ME370T|ME372MG|ME172V|ME173X|ME400C|\n        Slider SL101|\\bK00F\\b|\\bK00C\\b|\\bK00E\\b|\\bK00L\\b|TX201LA|ME176C|ME102A|\\bM80TA\\b|ME372CL|\n        ME560CG|ME372CG|ME302KL| K010 | K011 | K017 | K01E |ME572C|ME103K|ME170C|ME171C|\\bME70C\\b|ME581C|\n        ME581CL|ME8510C|ME181C|P01Y|PO1MA|P01Z|\\bP027\\b|\\bP024\\b|\\bP00C\\b"),BlackBerryTablet:/PlayBook|RIM Tablet/,HTCtablet:/HTC_Flyer_P512|HTC Flyer|HTC Jetstream|HTC-P715a|HTC EVO View 4G|PG41200|PG09410/,MotorolaTablet:/xoom|sholest|MZ615|MZ605|MZ505|MZ601|MZ602|MZ603|MZ604|MZ606|MZ607|MZ608|MZ609|MZ615|MZ616|MZ617/,NookTablet:/Android.*Nook|NookColor|nook browser|BNRV200|BNRV200A|BNTV250|BNTV250A|BNTV400|BNTV600|LogicPD Zoom2/,AcerTablet:new RegExp("Android.*; \\b(A100|A101|A110|A200|A210|A211|A500|A501|A510|A511|A700|A701|W500|W500P|W501|\n        W501P|W510|W511|W700|G100|G100W|B1-A71|B1-710|B1-711|A1-810|A1-811|A1-830)\\b|W3-810|\\bA3-A10\\b|\\bA3-A11\\b|\n        \\bA3-A20\\b|\\bA3-A30"),ToshibaTablet:/Android.*(AT100|AT105|AT200|AT205|AT270|AT275|AT300|AT305|AT1S5|AT500|AT570|AT700|AT830)|TOSHIBA.*FOLIO/,LGTablet:/\bL-06C|LG-V909|LG-V900|LG-V700|LG-V510|LG-V500|LG-V410|LG-V400|LG-VK810\b/,FujitsuTablet:/Android.*\b(F-01D|F-02F|F-05E|F-10D|M532|Q572)\b/,PrestigioTablet:new RegExp("PMP3170B|PMP3270B|PMP3470B|PMP7170B|PMP3370B|PMP3570C|PMP5870C|PMP3670B|PMP5570C|\n        PMP5770D|PMP3970B|PMP3870C|PMP5580C|PMP5880D|PMP5780D|PMP5588C|PMP7280C|PMP7280C3G|PMP7280|PMP7880D|\n        PMP5597D|PMP5597|PMP7100D|PER3464|PER3274|PER3574|PER3884|PER5274|PER5474|PMP5097CPRO|PMP5097|PMP7380D|\n        PMP5297C|PMP5297C_QUAD|PMP812E|PMP812E3G|PMP812F|PMP810E|PMP880TD|PMT3017|PMT3037|PMT3047|PMT3057|PMT7008|\n        PMT5887|PMT5001|PMT5002"),LenovoTablet:new RegExp("Lenovo TAB|Idea(Tab|Pad)( A1|A10| K1|)|ThinkPad([ ]+)?Tablet|YT3-850M|YT3-X90L|YT3-X90F|\n        YT3-X90X|Lenovo.*(S2109|S2110|S5000|S6000|K3011|A3000|A3500|A1000|A2107|A2109|A1107|A5500|A7600|B6000|\n        B8000|B8080)(-|)(FL|F|HV|H|)|TB-X606F|TB-X103F|TB-X304F|TB-X304L|TB-X704F|TB-8703F|Tab2A7-10F|TB2-X30L|TB-8504F"),DellTablet:/Venue 11|Venue 8|Venue 7|Dell Streak 10|Dell Streak 7/,YarvikTablet:new RegExp("Android.*\\b(TAB210|TAB211|TAB224|TAB250|TAB260|TAB264|TAB310|TAB360|TAB364|TAB410|TAB411|\n        TAB420|TAB424|TAB450|TAB460|TAB461|TAB464|TAB465|TAB467|TAB468|TAB07-100|TAB07-101|TAB07-150|TAB07-151|\n        TAB07-152|TAB07-200|TAB07-201-3G|TAB07-210|TAB07-211|TAB07-212|TAB07-214|TAB07-220|TAB07-400|TAB07-485|\n        TAB08-150|TAB08-200|TAB08-201-3G|TAB08-201-30|TAB09-100|TAB09-211|TAB09-410|TAB10-150|TAB10-201|TAB10-211|\n        TAB10-400|TAB10-410|TAB13-201|TAB274EUK|TAB275EUK|TAB374EUK|TAB462EUK|TAB474EUK|TAB9-200)\\b"),MedionTablet:/Android.*\bOYO\b|LIFE.*(P9212|P9514|P9516|S9512)|LIFETAB/,ArnovaTablet:/97G4|AN10G2|AN7bG3|AN7fG3|AN8G3|AN8cG3|AN7G3|AN9G3|AN7dG3|AN7dG3ST|AN7dG3ChildPad|AN10bG3|AN10bG3DT|AN9G2/,IntensoTablet:/INM8002KP|INM1010FP|INM805ND|Intenso Tab|TAB1004/,IRUTablet:/M702pro/,MegafonTablet:/MegaFon V9|\bZTE V9\b|Android.*\bMT7A\b/,EbodaTablet:/E-Boda (Supreme|Impresspeed|Izzycomm|Essential)/,AllViewTablet:/Allview.*(Viva|Alldro|City|Speed|All TV|Frenzy|Quasar|Shine|TX1|AX1|AX2)/,ArchosTablet:new RegExp("\\b(101G9|80G9|A101IT)\\b|Qilive 97R|Archos5|\\bARCHOS (70|79|80|90|97|101|FAMILYPAD|)(b|c|)(G10|\n         Cobalt| TITANIUM(HD|)| Xenon| Neon|XSK| 2| XS 2| PLATINUM| CARBON|GAMEPAD)\\b"),AinolTablet:/NOVO7|NOVO8|NOVO10|Novo7Aurora|Novo7Basic|NOVO7PALADIN|novo9-Spark/,NokiaLumiaTablet:/Lumia 2520/,SonyTablet:new RegExp("Sony.*Tablet|Xperia Tablet|Sony Tablet S|SO-03E|SGPT12|SGPT13|SGPT114|SGPT121|SGPT122|SGPT123|\n        SGPT111|SGPT112|SGPT113|SGPT131|SGPT132|SGPT133|SGPT211|SGPT212|SGPT213|SGP311|SGP312|SGP321|EBRD1101|\n        EBRD1102|EBRD1201|SGP351|SGP341|SGP511|SGP512|SGP521|SGP541|SGP551|SGP621|SGP641|SGP612|SOT31|SGP771|SGP611|\n        SGP612|SGP712"),PhilipsTablet:/\b(PI2010|PI3000|PI3100|PI3105|PI3110|PI3205|PI3210|PI3900|PI4010|PI7000|PI7100)\b/,CubeTablet:/Android.*(K8GT|U9GT|U10GT|U16GT|U17GT|U18GT|U19GT|U20GT|U23GT|U30GT)|CUBE U8GT/,CobyTablet:new RegExp("MID1042|MID1045|MID1125|MID1126|MID7012|MID7014|MID7015|MID7034|MID7035|MID7036|MID7042|MID7048|\n        MID7127|MID8042|MID8048|MID8127|MID9042|MID9740|MID9742|MID7022|MID7010"),MIDTablet:new RegExp("M9701|M9000|M9100|M806|M1052|M806|T703|MID701|MID713|MID710|MID727|MID760|MID830|MID728|MID933|\n        MID125|MID810|MID732|MID120|MID930|MID800|MID731|MID900|MID100|MID820|MID735|MID980|MID130|MID833|MID737|\n        MID960|MID135|MID860|MID736|MID140|MID930|MID835|MID733|MID4X10"),MSITablet:new RegExp("MSI \\b(Primo 73K|Primo 73L|Primo 81L|Primo 77|Primo 93|Primo 75|Primo 76|Primo 73|Primo 81|\n        Primo 91|Primo 90|Enjoy 71|Enjoy 7|Enjoy 10)\\b"),SMiTTablet:/Android.*(\bMID\b|MID-560|MTV-T1200|MTV-PND531|MTV-P1101|MTV-PND530)/,RockChipTablet:/Android.*(RK2818|RK2808A|RK2918|RK3066)|RK2738|RK2808A/,FlyTablet:/IQ310|Fly Vision/,bqTablet:new RegExp("Android.*(bq)?.*(Elcano|Curie|Edison|Maxwell|Kepler|Pascal|Tesla|Hypatia|Platon|Newton|\n        Livingstone|Cervantes|Avant|Aquaris ([E|M]10|M8))|Maxwell.*Lite|Maxwell.*Plus"),HuaweiTablet:new RegExp("MediaPad|MediaPad 7 Youth|MediaPad T3 10|IDEOS S7|S7-201c|S7-202u|S7-101|S7-103|S7-104|S7-105|S7-106|\n        S7-201|S7-Slim|M2-A01L|BAH-L09|BAH-W09|AGS-W09"),NecTablet:/\bN-06D|\bN-08D/,PantechTablet:/Pantech.*P4100/,BronchoTablet:/Broncho.*(N701|N708|N802|a710)/,VersusTablet:/TOUCHPAD.*[78910]|\bTOUCHTAB\b/,ZyncTablet:/z1000|Z99 2G|z99|z930|z999|z990|z909|Z919|z900/,PositivoTablet:/TB07STA|TB10STA|TB07FTA|TB10FTA/,NabiTablet:/Android.*\bNabi/,KoboTablet:/Kobo Touch|\bK080\b|\bVox\b Build|\bArc\b Build/,DanewTablet:/DSlide.*\b(700|701R|702|703R|704|802|970|971|972|973|974|1010|1012)\b/,TexetTablet:new RegExp("NaviPad|TB-772A|TM-7045|TM-7055|TM-9750|TM-7016|TM-7024|TM-7026|TM-7041|TM-7043|TM-7047|\n        TM-8041|TM-9741|TM-9747|TM-9748|TM-9751|TM-7022|TM-7021|TM-7020|TM-7011|TM-7010|TM-7023|TM-7025|\n        TM-7037W|TM-7038W|TM-7027W|TM-9720|TM-9725|TM-9737W|TM-1020|TM-9738W|TM-9740|TM-9743W|TB-807A|TB-771A|\n        TB-727A|TB-725A|TB-719A|TB-823A|TB-805A|TB-723A|TB-715A|TB-707A|TB-705A|TB-709A|TB-711A|TB-890HD|\n        TB-880HD|TB-790HD|TB-780HD|TB-770HD|TB-721HD|TB-710HD|TB-434HD|TB-860HD|TB-840HD|TB-760HD|TB-750HD|\n        TB-740HD|TB-730HD|TB-722HD|TB-720HD|TB-700HD|TB-500HD|TB-470HD|TB-431HD|TB-430HD|TB-506|TB-504|TB-446|\n        TB-436|TB-416|TB-146SE|TB-126SE"),PlaystationTablet:/Playstation.*(Portable|Vita)/,TrekstorTablet:/ST10416-1|VT10416-1|ST70408-1|ST702xx-1|ST702xx-2|ST80208|ST97216|ST70104-2|VT10416-2|ST10216-2A|SurfTab/,PyleAudioTablet:/\b(PTBL10CEU|PTBL10C|PTBL72BC|PTBL72BCEU|PTBL7CEU|PTBL7C|PTBL92BC|PTBL92BCEU|PTBL9CEU|PTBL9CUK|PTBL9C)\b/,AdvanTablet:new RegExp("Android.* \\b(E3A|T3X|T5C|T5B|T3E|T3C|T3B|T1J|T1F|T2A|T1H|T1i|E1C|T1-E|T5-A|T4|E1-B|T2Ci|\n        T1-B|T1-D|O1-A|E1-A|T1-A|T3A|T4i)\\b"),DanyTechTablet:"Genius Tab G3|Genius Tab S2|Genius Tab Q3|Genius Tab G4|Genius Tab Q4|Genius Tab G-II|\n        Genius TAB GII|Genius TAB GIII|Genius Tab S1",GalapadTablet:/Android.*\bG1\b(?!\))/,MicromaxTablet:/Funbook|Micromax.*\b(P250|P560|P360|P362|P600|P300|P350|P500|P275)\b/,KarbonnTablet:/Android.*\b(A39|A37|A34|ST8|ST10|ST7|Smart Tab3|Smart Tab2)\b/,AllFineTablet:/Fine7 Genius|Fine7 Shine|Fine7 Air|Fine8 Style|Fine9 More|Fine10 Joy|Fine11 Wide/,PROSCANTablet:new RegExp("\\b(PEM63|PLT1023G|PLT1041|PLT1044|PLT1044G|PLT1091|PLT4311|PLT4311PL|PLT4315|PLT7030|\n        PLT7033|PLT7033D|PLT7035|PLT7035D|PLT7044K|PLT7045K|PLT7045KB|PLT7071KG|PLT7072|PLT7223G|PLT7225G|\n        PLT7777G|PLT7810K|PLT7849G|PLT7851G|PLT7852G|PLT8015|PLT8031|PLT8034|PLT8036|PLT8080K|PLT8082|PLT8088|\n        PLT8223G|PLT8234G|PLT8235G|PLT8816K|PLT9011|PLT9045K|PLT9233G|PLT9735|PLT9760G|PLT9770G)\\b"),YONESTablet:/BQ1078|BC1003|BC1077|RK9702|BC9730|BC9001|IT9001|BC7008|BC7010|BC708|BC728|BC7012|BC7030|BC7027|BC7026/,ChangJiaTablet:new RegExp("TPC7102|TPC7103|TPC7105|TPC7106|TPC7107|TPC7201|TPC7203|TPC7205|TPC7210|TPC7708|TPC7709|\n        TPC7712|TPC7110|TPC8101|TPC8103|TPC8105|TPC8106|TPC8203|TPC8205|TPC8503|TPC9106|TPC9701|TPC97101|TPC97103|\n        TPC97105|TPC97106|TPC97111|TPC97113|TPC97203|TPC97603|TPC97809|TPC97205|TPC10101|TPC10103|TPC10106|\n        TPC10111|TPC10203|TPC10205|TPC10503"),GUTablet:/TX-A1301|TX-M9002|Q702|kf026/,PointOfViewTablet:new RegExp("TAB-P506|TAB-navi-7-3G-M|TAB-P517|TAB-P-527|TAB-P701|TAB-P703|TAB-P721|TAB-P731N|\n        TAB-P741|TAB-P825|TAB-P905|TAB-P925|TAB-PR945|TAB-PL1015|TAB-P1025|TAB-PI1045|TAB-P1325|TAB-PROTAB[0-9]+|\n        TAB-PROTAB25|TAB-PROTAB26|TAB-PROTAB27|TAB-PROTAB26XL|TAB-PROTAB2-IPS9|TAB-PROTAB30-IPS9|TAB-PROTAB25XXL|\n        TAB-PROTAB26-IPS10|TAB-PROTAB30-IPS10"),OvermaxTablet:new RegExp("OV-(SteelCore|NewBase|Basecore|Baseone|Exellen|Quattor|EduTab|Solution|ACTION|BasicTab|TeddyTab|\n        MagicTab|Stream|TB-08|TB-09)|Qualcore 1027"),HCLTablet:/HCL.*Tablet|Connect-3G-2.0|Connect-2G-2.0|ME Tablet U1|ME Tablet U2|ME Tablet G1|ME Tablet X1|ME Tablet Y2|ME Tablet Sync/,DPSTablet:/DPS Dream 9|DPS Dual 7/,VistureTablet:/V97 HD|i75 3G|Visture V4( HD)?|Visture V5( HD)?|Visture V10/,CrestaTablet:/CTP(-)?810|CTP(-)?818|CTP(-)?828|CTP(-)?838|CTP(-)?888|CTP(-)?978|CTP(-)?980|CTP(-)?987|CTP(-)?988|CTP(-)?989/,MediatekTablet:/\bMT8125|MT8389|MT8135|MT8377\b/,ConcordeTablet:/Concorde([ ]+)?Tab|ConCorde ReadMan/,GoCleverTablet:new RegExp("GOCLEVER TAB|A7GOCLEVER|M1042|M7841|M742|R1042BK|R1041|TAB A975|TAB A7842|TAB A741|TAB A741L|TAB M723G|\n        TAB M721|TAB A1021|TAB I921|TAB R721|TAB I720|TAB T76|TAB R70|TAB R76.2|TAB R106|TAB R83.2|TAB M813G|TAB I721|\n        GCTA722|TAB I70|TAB I71|TAB S73|TAB R73|TAB R74|TAB R93|TAB R75|TAB R76.1|TAB A73|TAB A93|TAB A93.2|TAB T72|\n        TAB R83|TAB R974|TAB R973|TAB A101|TAB A103|TAB A104|TAB A104.2|R105BK|M713G|A972BK|TAB A971|TAB R974.2|\n        TAB R104|TAB R83.3|TAB A1042"),ModecomTablet:new RegExp("FreeTAB 9000|FreeTAB 7.4|FreeTAB 7004|FreeTAB 7800|FreeTAB 2096|FreeTAB 7.5|FreeTAB 1014|\n        FreeTAB 1001 |FreeTAB 8001|FreeTAB 9706|FreeTAB 9702|FreeTAB 7003|FreeTAB 7002|FreeTAB 1002|FreeTAB 7801|\n        FreeTAB 1331|FreeTAB 1004|FreeTAB 8002|FreeTAB 8014|FreeTAB 9704|FreeTAB 1003"),VoninoTablet:new RegExp("\\b(Argus[ _]?S|Diamond[ _]?79HD|Emerald[ _]?78E|Luna[ _]?70C|Onyx[ _]?S|Onyx[ _]?Z|\n        Orin[ _]?HD|Orin[ _]?S|Otis[ _]?S|SpeedStar[ _]?S|Magnet[ _]?M9|Primus[ _]?94[ _]?3G|Primus[ _]?94HD|\n        Primus[ _]?QS|Android.*\\bQ8\\b|Sirius[ _]?EVO[ _]?QS|Sirius[ _]?QS|Spirit[ _]?S)\\b"),ECSTablet:/V07OT2|TM105A|S10OT1|TR10CS1/,StorexTablet:/eZee[_']?(Tab|Go)[0-9]+|TabLC7|Looney Tunes Tab/,VodafoneTablet:/SmartTab([ ]+)?[0-9]+|SmartTabII10|SmartTabII7|VF-1497/,EssentielBTablet:/Smart[ ']?TAB[ ]+?[0-9]+|Family[ ']?TAB2/,RossMoorTablet:/RM-790|RM-997|RMD-878G|RMD-974R|RMT-705A|RMT-701|RME-601|RMT-501|RMT-711/,iMobileTablet:/i-mobile i-note/,TolinoTablet:/tolino tab [0-9.]+|tolino shine/,AudioSonicTablet:/\bC-22Q|T7-QC|T-17B|T-17P\b/,AMPETablet:/Android.* A78 /,SkkTablet:/Android.* (SKYPAD|PHOENIX|CYCLOPS)/,TecnoTablet:/TECNO P9|TECNO DP8D/,JXDTablet:new RegExp("Android.* \\b(F3000|A3300|JXD5000|JXD3000|JXD2000|JXD300B|JXD300|S5800|S7800|S602b|S5110b|S7300|\n        S5300|S602|S603|S5100|S5110|S601|S7100a|P3000F|P3000s|P101|P200s|P1000m|P200m|P9100|P1000s|S6600b|S908|\n        P1000|P300|S18|S6600|S9100)\\b"),iJoyTablet:new RegExp("Tablet (Spirit 7|Essentia|Galatea|Fusion|Onix 7|Landa|Titan|Scooby|Deox|Stella|Themis|Argon|\n        Unique 7|Sygnus|Hexen|Finity 7|Cream|Cream X2|Jade|Neon 7|Neron 7|Kandy|Scape|Saphyr 7|Rebel|Biox|Rebel|\n        Rebel 8GB|Myst|Draco 7|Myst|Tab7-004|Myst|Tadeo Jones|Tablet Boing|Arrow|Draco Dual Cam|Aurix|Mint|Amity|\n        Revolution|Finity 9|Neon 9|T9w|Amity 4GB Dual Cam|Stone 4GB|Stone 8GB|Andromeda|Silken|X2|Andromeda II|\n        Halley|Flame|Saphyr 9,7|Touch 8|Planet|Triton|Unique 10|Hexen 10|Memphis 4GB|Memphis 8GB|Onix 10)"),FX2Tablet:/FX2 PAD7|FX2 PAD10/,XoroTablet:new RegExp("KidsPAD 701|PAD[ ]?712|PAD[ ]?714|PAD[ ]?716|PAD[ ]?717|PAD[ ]?718|PAD[ ]?720|PAD[ ]?721|\n        PAD[ ]?722|PAD[ ]?790|PAD[ ]?792|PAD[ ]?900|PAD[ ]?9715D|PAD[ ]?9716DR|PAD[ ]?9718DR|PAD[ ]?9719QR|\n        PAD[ ]?9720QR|TelePAD1030|Telepad1032|TelePAD730|TelePAD731|TelePAD732|TelePAD735Q|TelePAD830|TelePAD9730|\n        TelePAD795|MegaPAD 1331|MegaPAD 1851|MegaPAD 2151"),ViewsonicTablet:/ViewPad 10pi|ViewPad 10e|ViewPad 10s|ViewPad E72|ViewPad7|ViewPad E100|ViewPad 7e|ViewSonic VB733|VB100a/,VerizonTablet:/QTAQZ3|QTAIR7|QTAQTZ3|QTASUN1|QTASUN2|QTAXIA1/,OdysTablet:/LOOX|XENO10|ODYS[ -](Space|EVO|Xpress|NOON)|\bXELIO\b|Xelio10Pro|XELIO7PHONETAB|XELIO10EXTREME|XELIOPT2|NEO_QUAD10/,CaptivaTablet:/CAPTIVA PAD/,IconbitTablet:new RegExp("NetTAB|NT-3702|NT-3702S|NT-3702S|NT-3603P|NT-3603P|NT-0704S|NT-0704S|NT-3805C|NT-3805C|\n        NT-0806C|NT-0806C|NT-0909T|NT-0909T|NT-0907S|NT-0907S|NT-0902S|NT-0902S"),TeclastTablet:new RegExp("T98 4G|\\bP80\\b|\\bX90HD\\b|X98 Air|X98 Air 3G|\\bX89\\b|P80 3G|\\bX80h\\b|P98 Air|\n        \\bX89HD\\b|P98 3G|\\bP90HD\\b|P89 3G|X98 3G|\\bP70h\\b|P79HD 3G|G18d 3G|\\bP79HD\\b|\\bP89s\\b|\\bA88\\b|\n        \\bP10HD\\b|\\bP19HD\\b|G18 3G|\\bP78HD\\b|\\bA78\\b|\\bP75\\b|G17s 3G|G17h 3G|\\bP85t\\b|\\bP90\\b|\n        \\bP11\\b|\\bP98t\\b|\\bP98HD\\b|\\bG18d\\b|\\bP85s\\b|\\bP11HD\\b|\\bP88s\\b|\\bA80HD\\b|\\bA80se\\b|\n        \\bA10h\\b|\\bP89\\b|\\bP78s\\b|\\bG18\\b|\\bP85\\b|\\bA70h\\b|\\bA70\\b|\\bG17\\b|\\bP18\\b|\\bA80s\\b|\n        \\bA11s\\b|\\bP88HD\\b|\\bA80h\\b|\\bP76s\\b|\\bP76h\\b|\\bP98\\b|\\bA10HD\\b|\\bP78\\b|\\bP88\\b|\\bA11\\b|\n        \\bA10t\\b|\\bP76a\\b|\\bP76t\\b|\\bP76e\\b|\\bP85HD\\b|\\bP85a\\b|\\bP86\\b|\\bP75HD\\b|\\bP76v\\b|\\bA12\\b|\n        \\bP75a\\b|\\bA15\\b|\\bP76Ti\\b|\\bP81HD\\b|\\bA10\\b|\\bT760VE\\b|\\bT720HD\\b|\\bP76\\b|\\bP73\\b|\\bP71\\b|\n        \\bP72\\b|\\bT720SE\\b|\\bC520Ti\\b|\\bT760\\b|\\bT720VE\\b|T720-3GE|T720-WiFi"),OndaTablet:new RegExp("\\b(V975i|Vi30|VX530|V701|Vi60|V701s|Vi50|V801s|V719|Vx610w|VX610W|V819i|Vi10|VX580W|Vi10|\n        V711s|V813|V811|V820w|V820|Vi20|V711|VI30W|V712|V891w|V972|V819w|V820w|Vi60|V820w|V711|V813s|V801|V819|\n        V975s|V801|V819|V819|V818|V811|V712|V975m|V101w|V961w|V812|V818|V971|V971s|V919|V989|V116w|V102w|V973|\n        Vi40)\\b[s]+|V10 \\b4G\\b"),JaytechTablet:/TPC-PA762/,BlaupunktTablet:/Endeavour 800NG|Endeavour 1010/,DigmaTablet:/\b(iDx10|iDx9|iDx8|iDx7|iDxD7|iDxD8|iDsQ8|iDsQ7|iDsQ8|iDsD10|iDnD7|3TS804H|iDsQ11|iDj7|iDs10)\b/,EvolioTablet:/ARIA_Mini_wifi|Aria[ _]Mini|Evolio X10|Evolio X7|Evolio X8|\bEvotab\b|\bNeura\b/,LavaTablet:/QPAD E704|\bIvoryS\b|E-TAB IVORY|\bE-TAB\b/,AocTablet:/MW0811|MW0812|MW0922|MTK8382|MW1031|MW0831|MW0821|MW0931|MW0712/,MpmanTablet:new RegExp("MP11 OCTA|MP10 OCTA|MPQC1114|MPQC1004|MPQC994|MPQC974|MPQC973|MPQC804|MPQC784|MPQC780|\n        \\bMPG7\\b|MPDCG75|MPDCG71|MPDC1006|MP101DC|MPDC9000|MPDC905|MPDC706HD|MPDC706|MPDC705|MPDC110|\n        MPDC100|MPDC99|MPDC97|MPDC88|MPDC8|MPDC77|MP709|MID701|MID711|MID170|MPDC703|MPQC1010"),CelkonTablet:/CT695|CT888|CT[\s]?910|CT7 Tab|CT9 Tab|CT3 Tab|CT2 Tab|CT1 Tab|C820|C720|\bCT-1\b/,WolderTablet:new RegExp("miTab \\b(DIAMOND|SPACE|BROOKLYN|NEO|FLY|MANHATTAN|FUNK|EVOLUTION|SKY|GOCAR|IRON|GENIUS|\n        POP|MINT|EPSILON|BROADWAY|JUMP|HOP|LEGEND|NEW AGE|LINE|ADVANCE|FEEL|FOLLOW|LIKE|LINK|LIVE|THINK|\n        FREEDOM|CHICAGO|CLEVELAND|BALTIMORE-GH|IOWA|BOSTON|SEATTLE|PHOENIX|DALLAS|IN 101|MasterChef)\\b"),MediacomTablet:"M-MPI10C3G|M-SP10EG|M-SP10EGP|M-SP10HXAH|M-SP7HXAH|M-SP10HXBH|M-SP8HXAH|M-SP8MXA",MiTablet:/\bMI PAD\b|\bHM NOTE 1W\b/,NibiruTablet:/Nibiru M1|Nibiru Jupiter One/,NexoTablet:/NEXO NOVA|NEXO 10|NEXO AVIO|NEXO FREE|NEXO GO|NEXO EVO|NEXO 3G|NEXO SMART|NEXO KIDDO|NEXO MOBI/,LeaderTablet:new RegExp("TBLT10Q|TBLT10I|TBL-10WDKB|TBL-10WDKBO2013|TBL-W230V2|TBL-W450|TBL-W500|SV572|TBLT7I|\n        TBA-AC7-8G|TBLT79|TBL-8W16|TBL-10W32|TBL-10WKB|TBL-W100"),UbislateTablet:/UbiSlate[\s]?7C/,PocketBookTablet:/Pocketbook/,KocasoTablet:/\b(TB-1207)\b/,HisenseTablet:/\b(F5281|E2371)\b/,Hudl:/Hudl HT7S3|Hudl 2/,TelstraTablet:/T-Hub2/,Honeywell:/RT10A/,GenericTablet:new RegExp("Android.*\\b97D\\b|Tablet(?!.*PC)|BNTV250A|MID-WCDMA|LogicPD Zoom2|\\bA7EB\\b|CatNova8|\n        A1_07|CT704|CT1002|\\bM721\\b|rk30sdk|\\bEVOTAB\\b|M758A|ET904|ALUMIUM10|Smartfren Tab|Endeavour 1010|\n        Tablet-PC-4|Tagi Tab|\\bM6pro\\b|CT1020W|arc 10HD|\\bTP750\\b|\\bQTAQZ3\\b|WVT101|TM1088|KT107")},T={BLACKBERRY:"Blackberry",FIREFOX_OS:"Firefox-OS",CHROME_BOOK:"Chrome-Book",WINDOWS_PHONE:"Windows-Phone",VITA:"Vita",PS4:"PS4",MAC:"Macintosh",CHROMECAST:"Chromecast",APPLE_TV:"Apple-TV",GOOGLE_TV:"Google-TV",ANDROID:"Android",Tesla:"Tesla",iPad:"iPad",IPHONE:"iPhone",iPod:"iPod",UNKNOWN:l.UKNOWN,HTC:"HTC",NEXUS_PHONE:"Nexus Phone",NexusTablet:"Nexus Tablet",DELL:"Dell",MOTOROLA:"Motorola",SAMSUNG:"Samsung",LG:"LG",SONY:"Sony",ASUS:"Asus",NOKIA_LUMIA:"Nokia Lumia",MICROMAX:"Micromax",PALM:"Palm",VERTU:"Vertu",PANTECH:"PANTECH",FLY:"Fly",WIKO:"WIKO",I_MOBILE:"i-mobile",SIMVALLEY:"Simvalley",WOLFGANG:"Wolfgang",ALCATEL:"Alcatel",HONEYWELL:"Honeywell",NINTENDO:"Nintendo",AMOI:"Amoi",INQ:"INQ",GENERIC_PHONE:"Generic Phone",MI_SE_9:"Mi SE 9"},n=[T.PS4,T.CHROME_BOOK,T.MAC,T.DELL,T.ASUS,T.UNKNOWN],P={WINDOWS:"Windows",MAC:"Mac",IOS:"iOS",ANDROID:"Android",LINUX:"Linux",UNIX:"Unix",FIREFOX_OS:"Firefox-OS",CHROME_OS:"Chrome-OS",WINDOWS_PHONE:"Windows-Phone",UNKNOWN:l.UKNOWN},w={WINDOWS_3_11:"windows-3-11",WINDOWS_95:"windows-95",WINDOWS_ME:"windows-me",WINDOWS_98:"windows-98",WINDOWS_CE:"windows-ce",WINDOWS_2000:"windows-2000",WINDOWS_XP:"windows-xp",WINDOWS_SERVER_2003:"windows-server-2003",WINDOWS_VISTA:"windows-vista",WINDOWS_7:"windows-7",WINDOWS_8_1:"windows-8-1",WINDOWS_8:"windows-8",WINDOWS_10:"windows-10",WINDOWS_PHONE_7_5:"windows-phone-7-5",WINDOWS_PHONE_8_1:"windows-phone-8-1",WINDOWS_PHONE_10:"windows-phone-10",WINDOWS_NT_4_0:"windows-nt-4-0",MACOSX_11_0:"mac-os-x-11-0",MACOSX_16:"mac-os-x-16",MACOSX_15:"mac-os-x-15",MACOSX_14:"mac-os-x-14",MACOSX_13:"mac-os-x-13",MACOSX_12:"mac-os-x-12",MACOSX_11:"mac-os-x-11",MACOSX_10:"mac-os-x-10",MACOSX_9:"mac-os-x-9",MACOSX_8:"mac-os-x-8",MACOSX_7:"mac-os-x-7",MACOSX_6:"mac-os-x-6",MACOSX_5:"mac-os-x-5",MACOSX_4:"mac-os-x-4",MACOSX_3:"mac-os-x-3",MACOSX_2:"mac-os-x-2",MACOSX:"mac-os-x",iOS:"iOS",ANDROID_9:"android-9",UNKNOWN:l.UKNOWN.toLowerCase()},B={WINDOWS:{and:[{or:[/\bWindows|(Win\d\d)\b/,/\bWin 9x\b/]},{not:/\bWindows Phone\b/}]},MAC:{and:[/\bMac OS\b/,{not:{or:[/\biPhone\b/,/\biPad\b/,/\biPod\b/,/\bWindows Phone\b/]}}]},IOS:{and:[{or:[/\biPad\b/,/\biPhone\b/,/\biPod\b/]},{not:/\bWindows Phone\b/}]},ANDROID:{and:[/\bAndroid\b/,{not:/\bWindows Phone\b/}]},LINUX:/\bLinux\b/,UNIX:/\bUNIX\b/,FIREFOX_OS:{and:[/\bFirefox\b/,/Mobile\b/]},CHROME_OS:/\bCrOS\b/,WINDOWS_PHONE:{or:[/\bIEMobile\b/,/\bWindows Phone\b/]},PS4:/\bMozilla\/5.0 \(PlayStation 4\b/,VITA:/\bMozilla\/5.0 \(Play(S|s)tation Vita\b/},V={...g,...E,...B,FIREFOX_OS:{and:[/\bFirefox\b/,/\bMobile\b/]},CHROME_BOOK:/\bCrOS\b/,PS4:/\bMozilla\/5.0 \(PlayStation 4\b/,CHROMECAST:/\bCrKey\b/,APPLE_TV:/^iTunes-AppleTV\/4.1$/,GOOGLE_TV:/\bGoogleTV\b/,Tesla:/Tesla\/([0-9]{4}.[0-9]{1,2}.?[0-9]{0,2}.?[0-9]{0,2})-(.{7})/,MI_SE_9:/\bXiaomi\b/,MAC:{and:[/\bMac OS\b/,{not:{or:[/\biPhone\b/,/\biPad\b/,/\biPod\b/,/\bWindows Phone\b/]}}]}},ue={WINDOWS_3_11:/Win16/,WINDOWS_95:/(Windows 95|Win95|Windows_95)/,WINDOWS_ME:/(Win 9x 4.90|Windows ME)/,WINDOWS_98:/(Windows 98|Win98)/,WINDOWS_CE:/Windows CE/,WINDOWS_2000:/(Windows NT 5.0|Windows 2000)/,WINDOWS_XP:/(Windows NT 5.1|Windows XP)/,WINDOWS_SERVER_2003:/Windows NT 5.2/,WINDOWS_VISTA:/Windows NT 6.0/,WINDOWS_7:/(Windows 7|Windows NT 6.1)/,WINDOWS_8_1:/(Windows 8.1|Windows NT 6.3)/,WINDOWS_8:/(Windows 8|Windows NT 6.2)/,WINDOWS_10:/(Windows NT 10.0)/,WINDOWS_PHONE_7_5:/(Windows Phone OS 7.5)/,WINDOWS_PHONE_8_1:/(Windows Phone 8.1)/,WINDOWS_PHONE_10:/(Windows Phone 10)/,WINDOWS_NT_4_0:{and:[/(Windows NT 4.0|WinNT4.0|WinNT|Windows NT)/,{not:/Windows NT 10.0/}]},MACOSX:/(MAC OS X\s*[^ 0-9])/,MACOSX_3:/(Darwin 10.3|Mac OS X 10.3)/,MACOSX_4:/(Darwin 10.4|Mac OS X 10.4)/,MACOSX_5:/(Mac OS X 10.5)/,MACOSX_6:/(Mac OS X 10.6)/,MACOSX_7:/(Mac OS X 10.7)/,MACOSX_8:/(Mac OS X 10.8)/,MACOSX_9:/(Mac OS X 10.9)/,MACOSX_10:/(Mac OS X 10.10)/,MACOSX_11:/(Mac OS X 10.11)/,MACOSX_12:/(Mac OS X 10.12)/,MACOSX_13:/(Mac OS X 10.13)/,MACOSX_14:/(Mac OS X 10.14)/,MACOSX_15:/(Mac OS X 10.15)/,MACOSX_16:/(Mac OS X 10.16)/,MACOSX_11_0:{or:[/11_0 like Mac OS X/,/Mac OS X 11/]},iOS:/(iPhone OS\s*[0-9_]+)/,ANDROID_9:/(Android 9)/},he={CHROME:[/\bChrome\/([\d\.]+)\b/,/\bCriOS\/([\d\.]+)\b/,/\bHeadlessChrome\/([\d\.]+)\b/],FIREFOX:[/\bFirefox\/([\d\.]+)\b/,/\bFxiOS\/([\d\.]+)\b/],SAFARI:[/\bVersion\/([\d\.]+)\b/,/\bSafari\/([\d\.]+)\b/],OPERA:[/\bVersion\/([\d\.]+)\b/,/\bOPR\/([\d\.]+)\b/],IE:[/\bMSIE ([\d\.]+\w?)\b/,/\brv:([\d\.]+\w?)\b/],MS_EDGE:/\bEdg(?:e|A|iOS)\/([\d\.]+)\b/,MS_EDGE_CHROMIUM:/\bEdg\/([\d\.]+)\b/,SAMSUNG:/\bSamsungBrowser\/([\d\.]+)\b/,UCBROWSER:/\bUCBrowser\/([\d\.]+)\b/},ae=Object.keys(ue).reduce((xe,de)=>(xe[de]=ue[de],xe),{}),X=Object.keys(he).reduce((xe,de)=>(xe[D[de]]=he[de],xe),{});var ge,xe,ne,ve=Object.freeze({__proto__:null,GENERAL:l,BROWSERS:D,MOBILES_RE:g,TABLETS_RE:E,DEVICES:T,DESKTOP_DEVICES:n,OS:P,OS_VERSIONS:w,OS_RE:B,BROWSERS_RE:{CHROME:{and:[{or:[/\bChrome\b/,/\bCriOS\b/,/\bHeadlessChrome\b/]},{not:{or:[/\bOPR\b/,/\bEdg(e|A|iOS)\b/,/\bEdg\/\b/,/\bSamsungBrowser\b/,/\bUCBrowser\b/]}}]},FIREFOX:{or:[/\bFirefox\b/,/\bFxiOS\b/]},SAFARI:{and:[/^((?!CriOS).)*\Safari\b.*$/,{not:{or:[/\bOPR\b/,/\bEdg(e|A|iOS)\b/,/\bEdg\/\b/,/\bWindows Phone\b/,/\bSamsungBrowser\b/,/\bUCBrowser\b/]}}]},OPERA:{or:[/Opera\b/,/\bOPR\b/]},IE:{or:[/\bMSIE\b/,/\bTrident\b/,/^Mozilla\/5\.0 \(Windows NT 10\.0; Win64; x64\)$/]},MS_EDGE:{or:[/\bEdg(e|A|iOS)\b/]},MS_EDGE_CHROMIUM:/\bEdg\/\b/,PS4:/\bMozilla\/5.0 \(PlayStation 4\b/,VITA:/\bMozilla\/5.0 \(Play(S|s)tation Vita\b/,FB_MESSANGER:/\bFBAN\/MessengerForiOS\b/,SAMSUNG:/\bSamsungBrowser\b/,UCBROWSER:/\bUCBrowser\b/},DEVICES_RE:V,OS_VERSIONS_RE_MAP:ue,BROWSER_VERSIONS_RE_MAP:he,OS_VERSIONS_RE:ae,BROWSER_VERSIONS_RE:X});class ye{constructor(){}test(de,re){return"string"==typeof re&&(re=new RegExp(re)),re instanceof RegExp?re.test(de):re&&Array.isArray(re.and)?re.and.every(oe=>this.test(de,oe)):re&&Array.isArray(re.or)?re.or.some(oe=>this.test(de,oe)):!(!re||!re.not)&&!this.test(de,re.not)}exec(de,re){return"string"==typeof re&&(re=new RegExp(re)),re instanceof RegExp?re.exec(de):re&&Array.isArray(re)?re.reduce((oe,me)=>oe||this.exec(de,me),null):null}}(xe=ge||(ge={})).Mobile="mobile",xe.Tablet="tablet",xe.Desktop="desktop",xe.Unknown="unknown",function(xe){xe.Portrait="portrait",xe.Landscape="landscape"}(ne||(ne={}));const pe="iPad";class Pe{constructor(de){this.platformId=de,this.ua="",this.userAgent="",this.os="",this.browser="",this.device="",this.os_version="",this.browser_version="",this.reTree=new ye,this.deviceType="",this.orientation="",(0,e.NF)(this.platformId)&&typeof window<"u"&&(this.userAgent=window.navigator.userAgent),this.setDeviceInfo(this.userAgent)}setDeviceInfo(de=this.userAgent){de!==this.userAgent&&(this.userAgent=de);const re=[{const:"OS",prop:"os"},{const:"BROWSERS",prop:"browser"},{const:"DEVICES",prop:"device"},{const:"OS_VERSIONS",prop:"os_version"}];if(re.forEach(oe=>{this[oe.prop]=Object.keys(ve[oe.const]).reduce((me,be)=>"device"===ve[oe.const][be]&&(0,e.NF)(this.platformId)&&(this.reTree.test(this.userAgent,E[pe])||"MacIntel"===navigator.platform&&navigator.maxTouchPoints>1)?(me[ve[oe.const][be]]=pe,Object):(me[ve[oe.const][be]]=this.reTree.test(de,ve[`${oe.const}_RE`][be]),me),{})}),re.forEach(oe=>{this[oe.prop]=Object.keys(ve[oe.const]).map(me=>ve[oe.const][me]).reduce((me,be)=>"device"===oe.prop&&me===ve[oe.const].ANDROID?this[oe.prop][be]?be:me:me===ve[oe.const].UNKNOWN&&this[oe.prop][be]?be:me,ve[oe.const].UNKNOWN)}),this.browser_version="0",this.browser!==D.UNKNOWN){const oe=X[this.browser],me=this.reTree.exec(de,oe);me&&(this.browser_version=me[1])}typeof window<"u"&&window.matchMedia?this.orientation=window.matchMedia("(orientation: landscape)").matches?ne.Landscape:ne.Portrait:this.orientation=l.UKNOWN,this.deviceType=this.isTablet()?ge.Tablet:this.isMobile(this.userAgent)?ge.Mobile:this.isDesktop(this.userAgent)?ge.Desktop:ge.Unknown}getDeviceInfo(){return{userAgent:this.userAgent,os:this.os,browser:this.browser,device:this.device,os_version:this.os_version,browser_version:this.browser_version,deviceType:this.deviceType,orientation:this.orientation}}isMobile(de=this.userAgent){return!this.isTablet(de)&&!!Object.keys(g).find(oe=>this.reTree.test(de,g[oe]))}isTablet(de=this.userAgent){return!(!(0,e.NF)(this.platformId)||!(this.reTree.test(this.userAgent,E[pe])||typeof navigator<"u"&&"MacIntel"===navigator.platform&&navigator.maxTouchPoints>1))||!!Object.keys(E).find(oe=>!!this.reTree.test(de,E[oe]))}isDesktop(de=this.userAgent){return(this.device!==T.UNKNOWN||!this.isMobile(de)&&!this.isTablet(de))&&n.indexOf(this.device)>-1}}Pe.\u0275fac=function(de){return new(de||Pe)(o.LFG(o.Lbi))},Pe.\u0275prov=o.Yz7({token:Pe,factory:Pe.\u0275fac,providedIn:"root"})},94954:(qe,I,p)=>{"use strict";p.d(I,{gE:()=>mt,VI:()=>wt,YI:()=>le});var o=p(94650),e=p(61135),l=p(39646),D=p(32076),g=p(56451),E=p(4128),T=p(54004),n=p(63900),P=p(70262),w=p(8189),B=p(50590),Y=p(95577),V=p(54482),ue=p(25403);var ae=p(35684),X=p(95698),ve=p(18505),ye=p(9116);const ge_REMOVE="remove",ge_SHOW="show";function ne(rn){return"function"==typeof rn}function pe(rn){if("[object Object]"!==Object.prototype.toString.call(rn))return!1;{const He=Object.getPrototypeOf(rn);return null===He||He===Object.prototype}}function Pe(rn){return!!rn&&"string"==typeof rn}function xe(rn){return"boolean"==typeof rn}function re(rn){return Array.isArray(rn)?rn.length>0:!!rn}function oe(rn){return Pe(rn)?[rn]:rn}class me{constructor(){this.permissionsSource=new e.X({}),this.permissions$=this.permissionsSource.asObservable()}}me.\u0275fac=function(He){return new(He||me)},me.\u0275prov=o.Yz7({token:me,factory:me.\u0275fac});const be=new o.OlP("USE_PERMISSIONS_STORE");class le{constructor(He=!1,st){this.isolate=He,this.permissionsStore=st,this.permissionsSource=He?new e.X({}):st.permissionsSource,this.permissions$=this.permissionsSource.asObservable()}flushPermissions(){this.permissionsSource.next({})}hasPermission(He){return!He||Array.isArray(He)&&0===He.length?Promise.resolve(!0):(He=oe(He),this.hasArrayPermission(He))}loadPermissions(He,st){const nn=He.reduce((Dn,Mn)=>this.reducePermission(Dn,Mn,st),{});this.permissionsSource.next(nn)}addPermission(He,st){if(Array.isArray(He)){const nn=He.reduce((Dn,Mn)=>this.reducePermission(Dn,Mn,st),this.permissionsSource.value);this.permissionsSource.next(nn)}else{const nn=this.reducePermission(this.permissionsSource.value,He,st);this.permissionsSource.next(nn)}}removePermission(He){const st={...this.permissionsSource.value};delete st[He],this.permissionsSource.next(st)}getPermission(He){return this.permissionsSource.value[He]}getPermissions(){return this.permissionsSource.value}reducePermission(He,st,nn){return nn&&ne(nn)?{...He,[st]:{name:st,validationFunction:nn}}:{...He,[st]:{name:st}}}hasArrayPermission(He){const st=He.map(nn=>{if(this.hasPermissionValidationFunction(nn)){const Dn=this.permissionsSource.value[nn].validationFunction,Mn={...this.permissionsSource.value};return(0,l.of)(null).pipe((0,T.U)(()=>Dn(nn,Mn)),(0,n.w)(vi=>xe(vi)?(0,l.of)(vi):vi),(0,P.K)(()=>(0,l.of)(!1)))}return(0,l.of)(!!this.permissionsSource.value[nn])});return(0,D.D)(st).pipe((0,w.J)(),(0,B.P)(nn=>!1!==nn,!1),(0,T.U)(nn=>!1!==nn)).toPromise().then(nn=>nn)}hasPermissionValidationFunction(He){return!!this.permissionsSource.value[He]&&!!this.permissionsSource.value[He].validationFunction&&ne(this.permissionsSource.value[He].validationFunction)}}le.\u0275fac=function(He){return new(He||le)(o.LFG(be),o.LFG(me))},le.\u0275prov=o.Yz7({token:le,factory:le.\u0275fac});class Z{constructor(){this.strategiesSource=new e.X({}),this.strategies$=this.strategiesSource.asObservable()}}Z.\u0275fac=function(He){return new(He||Z)},Z.\u0275prov=o.Yz7({token:Z,factory:Z.\u0275fac});const Oe=new o.OlP("USE_CONFIGURATION_STORE");class j{constructor(He=!1,st){this.isolate=He,this.configurationStore=st,this.strategiesSource=this.isolate?new e.X({}):this.configurationStore.strategiesSource,this.strategies$=this.strategiesSource.asObservable(),this.onAuthorisedDefaultStrategy=this.isolate?void 0:this.configurationStore.onAuthorisedDefaultStrategy,this.onUnAuthorisedDefaultStrategy=this.isolate?void 0:this.configurationStore.onUnAuthorisedDefaultStrategy}setDefaultOnAuthorizedStrategy(He){this.isolate?this.onAuthorisedDefaultStrategy=this.getDefinedStrategy(He):(this.configurationStore.onAuthorisedDefaultStrategy=this.getDefinedStrategy(He),this.onAuthorisedDefaultStrategy=this.configurationStore.onAuthorisedDefaultStrategy)}setDefaultOnUnauthorizedStrategy(He){this.isolate?this.onUnAuthorisedDefaultStrategy=this.getDefinedStrategy(He):(this.configurationStore.onUnAuthorisedDefaultStrategy=this.getDefinedStrategy(He),this.onUnAuthorisedDefaultStrategy=this.configurationStore.onUnAuthorisedDefaultStrategy)}addPermissionStrategy(He,st){this.strategiesSource.value[He]=st}getStrategy(He){return this.strategiesSource.value[He]}getAllStrategies(){return this.strategiesSource.value}getDefinedStrategy(He){if(this.strategiesSource.value[He]||this.isPredefinedStrategy(He))return He;throw new Error(`No ' ${He} ' strategy is found please define one`)}isPredefinedStrategy(He){return He===ge_SHOW||He===ge_REMOVE}}j.\u0275fac=function(He){return new(He||j)(o.LFG(Oe),o.LFG(Z))},j.\u0275prov=o.Yz7({token:j,factory:j.\u0275fac});class ke{constructor(){this.rolesSource=new e.X({}),this.roles$=this.rolesSource.asObservable()}}const Be=new o.OlP("USE_ROLES_STORE");class nt{constructor(He=!1,st,nn){this.isolate=He,this.rolesStore=st,this.permissionsService=nn,this.rolesSource=this.isolate?new e.X({}):this.rolesStore.rolesSource,this.roles$=this.rolesSource.asObservable()}addRole(He,st){const nn={...this.rolesSource.value,[He]:{name:He,validationFunction:st}};this.rolesSource.next(nn)}addRoleWithPermissions(He,st){this.permissionsService.addPermission(st),this.addRole(He,st)}addRoles(He){Object.keys(He).forEach((st,nn)=>{this.addRole(st,He[st])})}addRolesWithPermissions(He){Object.keys(He).forEach((st,nn)=>{this.addRoleWithPermissions(st,He[st])})}flushRoles(){this.rolesSource.next({})}flushRolesAndPermissions(){this.flushRoles(),this.permissionsService.flushPermissions()}removeRole(He){const st={...this.rolesSource.value};delete st[He],this.rolesSource.next(st)}getRoles(){return this.rolesSource.value}getRole(He){return this.rolesSource.value[He]}hasOnlyRoles(He){return!He||Array.isArray(He)&&0===He.length?Promise.resolve(!0):(He=oe(He),Promise.all([this.hasRoleKey(He),this.hasRolePermission(this.rolesSource.value,He)]).then(([nn,Dn])=>nn||Dn))}hasRoleKey(He){const st=He.map(nn=>{if(this.rolesSource.value[nn]&&this.rolesSource.value[nn].validationFunction&&ne(this.rolesSource.value[nn].validationFunction)&&!function de(rn){return"[object Promise]"===Object.prototype.toString.call(rn)}(this.rolesSource.value[nn].validationFunction)){const Mn=this.rolesSource.value[nn].validationFunction,vi={...this.rolesSource.value};return(0,l.of)(null).pipe((0,T.U)(()=>Mn(nn,vi)),(0,n.w)(Gi=>xe(Gi)?(0,l.of)(Gi):Gi),(0,P.K)(()=>(0,l.of)(!1)))}return(0,l.of)(!1)});return(0,D.D)(st).pipe((0,w.J)(),(0,B.P)(nn=>!1!==nn,!1),(0,T.U)(nn=>!1!==nn)).toPromise().then(nn=>nn)}hasRolePermission(He,st){return(0,D.D)(st).pipe((0,Y.z)(nn=>He[nn]&&Array.isArray(He[nn].validationFunction)?(0,D.D)(He[nn].validationFunction).pipe((0,Y.z)(Dn=>this.permissionsService.hasPermission(Dn)),function he(rn,He){return(0,V.e)((st,nn)=>{let Dn=0;st.subscribe((0,ue.x)(nn,Mn=>{rn.call(He,Mn,Dn++,st)||(nn.next(!1),nn.complete())},()=>{nn.next(!0),nn.complete()}))})}(Dn=>!0===Dn)):(0,l.of)(!1)),(0,B.P)(nn=>!0===nn,!1)).toPromise()}}nt.\u0275fac=function(He){return new(He||nt)(o.LFG(Be),o.LFG(ke),o.LFG(le))},nt.\u0275prov=o.Yz7({token:nt,factory:nt.\u0275fac});class mt{constructor(He,st,nn,Dn,Mn,vi){this.permissionsService=He,this.configurationService=st,this.rolesService=nn,this.viewContainer=Dn,this.changeDetector=Mn,this.templateRef=vi,this.permissionsAuthorized=new o.vpe,this.permissionsUnauthorized=new o.vpe,this.firstMergeUnusedRun=1}ngOnInit(){this.viewContainer.clear(),this.initPermissionSubscription=this.validateExceptOnlyPermissions()}ngOnChanges(He){const st=He.ngxPermissionsOnly,nn=He.ngxPermissionsExcept;if(st||nn){if(st&&st.firstChange||nn&&nn.firstChange)return;(0,g.T)(this.permissionsService.permissions$,this.rolesService.roles$).pipe((0,ae.T)(this.firstMergeUnusedRun),(0,X.q)(1)).subscribe(()=>{re(this.ngxPermissionsExcept)?this.validateExceptAndOnlyPermissions():re(this.ngxPermissionsOnly)?this.validateOnlyPermissions():this.handleAuthorisedPermission(this.getAuthorisedTemplates())})}}ngOnDestroy(){this.initPermissionSubscription&&this.initPermissionSubscription.unsubscribe()}validateExceptOnlyPermissions(){return(0,g.T)(this.permissionsService.permissions$,this.rolesService.roles$).pipe((0,ae.T)(this.firstMergeUnusedRun)).subscribe(()=>{re(this.ngxPermissionsExcept)?this.validateExceptAndOnlyPermissions():re(this.ngxPermissionsOnly)?this.validateOnlyPermissions():this.handleAuthorisedPermission(this.getAuthorisedTemplates())})}validateExceptAndOnlyPermissions(){Promise.all([this.permissionsService.hasPermission(this.ngxPermissionsExcept),this.rolesService.hasOnlyRoles(this.ngxPermissionsExcept)]).then(([He,st])=>{if(He||st)this.handleUnauthorisedPermission(this.ngxPermissionsExceptElse||this.ngxPermissionsElse);else{if(this.ngxPermissionsOnly)throw!1;this.handleAuthorisedPermission(this.ngxPermissionsExceptThen||this.ngxPermissionsThen||this.templateRef)}}).catch(()=>{this.ngxPermissionsOnly?this.validateOnlyPermissions():this.handleAuthorisedPermission(this.ngxPermissionsExceptThen||this.ngxPermissionsThen||this.templateRef)})}validateOnlyPermissions(){Promise.all([this.permissionsService.hasPermission(this.ngxPermissionsOnly),this.rolesService.hasOnlyRoles(this.ngxPermissionsOnly)]).then(([He,st])=>{He||st?this.handleAuthorisedPermission(this.ngxPermissionsOnlyThen||this.ngxPermissionsThen||this.templateRef):this.handleUnauthorisedPermission(this.ngxPermissionsOnlyElse||this.ngxPermissionsElse)}).catch(()=>{this.handleUnauthorisedPermission(this.ngxPermissionsOnlyElse||this.ngxPermissionsElse)})}handleUnauthorisedPermission(He){if(!xe(this.currentAuthorizedState)||this.currentAuthorizedState){if(this.currentAuthorizedState=!1,this.permissionsUnauthorized.emit(),this.getUnAuthorizedStrategyInput())return void this.applyStrategyAccordingToStrategyType(this.getUnAuthorizedStrategyInput());this.configurationService.onUnAuthorisedDefaultStrategy&&!this.elseBlockDefined()?this.applyStrategy(this.configurationService.onUnAuthorisedDefaultStrategy):this.showTemplateBlockInView(He)}}handleAuthorisedPermission(He){if(!xe(this.currentAuthorizedState)||!this.currentAuthorizedState){if(this.currentAuthorizedState=!0,this.permissionsAuthorized.emit(),this.getAuthorizedStrategyInput())return void this.applyStrategyAccordingToStrategyType(this.getAuthorizedStrategyInput());this.configurationService.onAuthorisedDefaultStrategy&&!this.thenBlockDefined()?this.applyStrategy(this.configurationService.onAuthorisedDefaultStrategy):this.showTemplateBlockInView(He)}}applyStrategyAccordingToStrategyType(He){if(!Pe(He))return ne(He)?(this.showTemplateBlockInView(this.templateRef),void He(this.templateRef)):void 0;this.applyStrategy(He)}showTemplateBlockInView(He){this.viewContainer.clear(),He&&(this.viewContainer.createEmbeddedView(He),this.changeDetector.markForCheck())}getAuthorisedTemplates(){return this.ngxPermissionsOnlyThen||this.ngxPermissionsExceptThen||this.ngxPermissionsThen||this.templateRef}elseBlockDefined(){return!!this.ngxPermissionsExceptElse||!!this.ngxPermissionsElse}thenBlockDefined(){return!!this.ngxPermissionsExceptThen||!!this.ngxPermissionsThen}getAuthorizedStrategyInput(){return this.ngxPermissionsOnlyAuthorisedStrategy||this.ngxPermissionsExceptAuthorisedStrategy||this.ngxPermissionsAuthorisedStrategy}getUnAuthorizedStrategyInput(){return this.ngxPermissionsOnlyUnauthorisedStrategy||this.ngxPermissionsExceptUnauthorisedStrategy||this.ngxPermissionsUnauthorisedStrategy}applyStrategy(He){if(He===ge_SHOW)return void this.showTemplateBlockInView(this.templateRef);if(He===ge_REMOVE)return void this.viewContainer.clear();const st=this.configurationService.getStrategy(He);this.showTemplateBlockInView(this.templateRef),st(this.templateRef)}}mt.\u0275fac=function(He){return new(He||mt)(o.Y36(le),o.Y36(j),o.Y36(nt),o.Y36(o.s_b),o.Y36(o.sBO),o.Y36(o.Rgc))},mt.\u0275dir=o.lG2({type:mt,selectors:[["","ngxPermissionsOnly",""],["","ngxPermissionsExcept",""]],inputs:{ngxPermissionsOnly:"ngxPermissionsOnly",ngxPermissionsOnlyThen:"ngxPermissionsOnlyThen",ngxPermissionsOnlyElse:"ngxPermissionsOnlyElse",ngxPermissionsExcept:"ngxPermissionsExcept",ngxPermissionsExceptElse:"ngxPermissionsExceptElse",ngxPermissionsExceptThen:"ngxPermissionsExceptThen",ngxPermissionsThen:"ngxPermissionsThen",ngxPermissionsElse:"ngxPermissionsElse",ngxPermissionsOnlyAuthorisedStrategy:"ngxPermissionsOnlyAuthorisedStrategy",ngxPermissionsOnlyUnauthorisedStrategy:"ngxPermissionsOnlyUnauthorisedStrategy",ngxPermissionsExceptUnauthorisedStrategy:"ngxPermissionsExceptUnauthorisedStrategy",ngxPermissionsExceptAuthorisedStrategy:"ngxPermissionsExceptAuthorisedStrategy",ngxPermissionsUnauthorisedStrategy:"ngxPermissionsUnauthorisedStrategy",ngxPermissionsAuthorisedStrategy:"ngxPermissionsAuthorisedStrategy"},outputs:{permissionsAuthorized:"permissionsAuthorized",permissionsUnauthorized:"permissionsUnauthorized"},features:[o.TTD]});class Ve{constructor(He,st,nn){this.permissionsService=He,this.rolesService=st,this.router=nn}canActivate(He,st){return this.hasPermissions(He,st)}canActivateChild(He,st){return this.hasPermissions(He,st)}canLoad(He){return this.hasPermissions(He)}hasPermissions(He,st){const nn=He&&He.data?He.data.permissions:{},Dn=this.transformPermission(nn,He,st);return this.isParameterAvailable(Dn.except)?this.passingExceptPermissionsValidation(Dn,He,st):!this.isParameterAvailable(Dn.only)||this.passingOnlyPermissionsValidation(Dn,He,st)}transformPermission(He,st,nn){return{only:ne(He.only)?He.only(st,nn):oe(He.only),except:ne(He.except)?He.except(st,nn):oe(He.except),redirectTo:He.redirectTo}}isParameterAvailable(He){return!!He&&He.length>0}passingExceptPermissionsValidation(He,st,nn){if(He.redirectTo&&(ne(He.redirectTo)||pe(He.redirectTo)&&!this.isRedirectionWithParameters(He.redirectTo))){let Dn="";return(0,D.D)(He.except).pipe((0,Y.z)(Mn=>(0,E.D)([this.permissionsService.hasPermission(Mn),this.rolesService.hasOnlyRoles(Mn)]).pipe((0,ve.b)(vi=>{vi.every(mi=>!1===mi)||(Dn=Mn)}))),(0,B.P)(Mn=>Mn.some(vi=>!0===vi),!1),(0,Y.z)(Mn=>Dn?(this.handleRedirectOfFailedPermission(He,Dn,st,nn),(0,l.of)(!1)):!Mn&&He.only?this.onlyRedirectCheck(He,st,nn):(0,l.of)(!Mn))).toPromise()}return Promise.all([this.permissionsService.hasPermission(He.except),this.rolesService.hasOnlyRoles(He.except)]).then(([Dn,Mn])=>Dn||Mn?(He.redirectTo&&this.redirectToAnotherRoute(He.redirectTo,st,nn),!1):!He.only||this.checkOnlyPermissions(He,st,nn))}redirectToAnotherRoute(He,st,nn,Dn){const Mn=ne(He)?He(Dn,st,nn):He;if(this.isRedirectionWithParameters(Mn))return Mn.navigationCommands=this.transformNavigationCommands(Mn.navigationCommands,st,nn),Mn.navigationExtras=this.transformNavigationExtras(Mn.navigationExtras,st,nn),void this.router.navigate(Mn.navigationCommands,Mn.navigationExtras);Array.isArray(Mn)?this.router.navigate(Mn):this.router.navigate([Mn])}isRedirectionWithParameters(He){return pe(He)&&(!!He.navigationCommands||!!He.navigationExtras)}transformNavigationCommands(He,st,nn){return ne(He)?He(st,nn):He}transformNavigationExtras(He,st,nn){return ne(He)?He(st,nn):He}onlyRedirectCheck(He,st,nn){let Dn="";return(0,D.D)(He.only).pipe((0,Y.z)(Mn=>(0,E.D)([this.permissionsService.hasPermission(Mn),this.rolesService.hasOnlyRoles(Mn)]).pipe((0,ve.b)(vi=>{vi.every(mi=>!1===mi)&&(Dn=Mn)}))),(0,B.P)(Mn=>ne(He.redirectTo)?Mn.some(vi=>!0===vi):Mn.every(vi=>!1===vi),!1),(0,Y.z)(Mn=>ne(He.redirectTo)?Mn?(0,l.of)(!0):(this.handleRedirectOfFailedPermission(He,Dn,st,nn),(0,l.of)(!1)):(Dn&&this.handleRedirectOfFailedPermission(He,Dn,st,nn),(0,l.of)(!Mn)))).toPromise()}handleRedirectOfFailedPermission(He,st,nn,Dn){this.isFailedPermissionPropertyOfRedirectTo(He,st)?this.redirectToAnotherRoute(He.redirectTo[st],nn,Dn,st):ne(He.redirectTo)?this.redirectToAnotherRoute(He.redirectTo,nn,Dn,st):this.redirectToAnotherRoute(He.redirectTo.default,nn,Dn,st)}isFailedPermissionPropertyOfRedirectTo(He,st){return!!He.redirectTo&&He.redirectTo[st]}checkOnlyPermissions(He,st,nn){const Dn={...He};return Promise.all([this.permissionsService.hasPermission(Dn.only),this.rolesService.hasOnlyRoles(Dn.only)]).then(([Mn,vi])=>!(!Mn&&!vi)||(Dn.redirectTo&&this.redirectToAnotherRoute(Dn.redirectTo,st,nn),!1))}passingOnlyPermissionsValidation(He,st,nn){return ne(He.redirectTo)||pe(He.redirectTo)&&!this.isRedirectionWithParameters(He.redirectTo)?this.onlyRedirectCheck(He,st,nn):this.checkOnlyPermissions(He,st,nn)}}Ve.\u0275fac=function(He){return new(He||Ve)(o.LFG(le),o.LFG(nt),o.LFG(ye.F0))},Ve.\u0275prov=o.Yz7({token:Ve,factory:Ve.\u0275fac});class tt{constructor(He,st){this.viewContainer=He,this.templateRef=st,this.permissionsAuthorized=new o.vpe,this.permissionsUnauthorized=new o.vpe}ngOnInit(){this.viewContainer.clear(),this.viewContainer.createEmbeddedView(this.getAuthorizedTemplate()),this.permissionsUnauthorized.emit()}getAuthorizedTemplate(){return this.ngxPermissionsOnlyThen||this.ngxPermissionsExceptThen||this.ngxPermissionsThen||this.templateRef}}tt.\u0275fac=function(He){return new(He||tt)(o.Y36(o.s_b),o.Y36(o.Rgc))},tt.\u0275dir=o.lG2({type:tt,selectors:[["","ngxPermissionsOnly",""],["","ngxPermissionsExcept",""]],inputs:{ngxPermissionsOnly:"ngxPermissionsOnly",ngxPermissionsOnlyThen:"ngxPermissionsOnlyThen",ngxPermissionsOnlyElse:"ngxPermissionsOnlyElse",ngxPermissionsExcept:"ngxPermissionsExcept",ngxPermissionsExceptElse:"ngxPermissionsExceptElse",ngxPermissionsExceptThen:"ngxPermissionsExceptThen",ngxPermissionsThen:"ngxPermissionsThen",ngxPermissionsElse:"ngxPermissionsElse",ngxPermissionsOnlyAuthorisedStrategy:"ngxPermissionsOnlyAuthorisedStrategy",ngxPermissionsOnlyUnauthorisedStrategy:"ngxPermissionsOnlyUnauthorisedStrategy",ngxPermissionsExceptUnauthorisedStrategy:"ngxPermissionsExceptUnauthorisedStrategy",ngxPermissionsExceptAuthorisedStrategy:"ngxPermissionsExceptAuthorisedStrategy",ngxPermissionsUnauthorisedStrategy:"ngxPermissionsUnauthorisedStrategy",ngxPermissionsAuthorisedStrategy:"ngxPermissionsAuthorisedStrategy"},outputs:{permissionsAuthorized:"permissionsAuthorized",permissionsUnauthorized:"permissionsUnauthorized"}});class Ne{constructor(He){this.viewContainer=He,this.permissionsAuthorized=new o.vpe,this.permissionsUnauthorized=new o.vpe}ngOnInit(){this.viewContainer.clear(),this.getUnAuthorizedTemplate()&&this.viewContainer.createEmbeddedView(this.getUnAuthorizedTemplate()),this.permissionsUnauthorized.emit()}getUnAuthorizedTemplate(){return this.ngxPermissionsOnlyElse||this.ngxPermissionsExceptElse||this.ngxPermissionsElse}}Ne.\u0275fac=function(He){return new(He||Ne)(o.Y36(o.s_b))},Ne.\u0275dir=o.lG2({type:Ne,selectors:[["","ngxPermissionsOnly",""],["","ngxPermissionsExcept",""]],inputs:{ngxPermissionsOnly:"ngxPermissionsOnly",ngxPermissionsOnlyThen:"ngxPermissionsOnlyThen",ngxPermissionsOnlyElse:"ngxPermissionsOnlyElse",ngxPermissionsExcept:"ngxPermissionsExcept",ngxPermissionsExceptElse:"ngxPermissionsExceptElse",ngxPermissionsExceptThen:"ngxPermissionsExceptThen",ngxPermissionsThen:"ngxPermissionsThen",ngxPermissionsElse:"ngxPermissionsElse",ngxPermissionsOnlyAuthorisedStrategy:"ngxPermissionsOnlyAuthorisedStrategy",ngxPermissionsOnlyUnauthorisedStrategy:"ngxPermissionsOnlyUnauthorisedStrategy",ngxPermissionsExceptUnauthorisedStrategy:"ngxPermissionsExceptUnauthorisedStrategy",ngxPermissionsExceptAuthorisedStrategy:"ngxPermissionsExceptAuthorisedStrategy",ngxPermissionsUnauthorisedStrategy:"ngxPermissionsUnauthorisedStrategy",ngxPermissionsAuthorisedStrategy:"ngxPermissionsAuthorisedStrategy"},outputs:{permissionsAuthorized:"permissionsAuthorized",permissionsUnauthorized:"permissionsUnauthorized"}});class wt{static forRoot(He={}){return{ngModule:wt,providers:[me,ke,Z,le,Ve,nt,j,{provide:be,useValue:He.permissionsIsolate},{provide:Be,useValue:He.rolesIsolate},{provide:Oe,useValue:He.configurationIsolate}]}}static forChild(He={}){return{ngModule:wt,providers:[{provide:be,useValue:He.permissionsIsolate},{provide:Be,useValue:He.rolesIsolate},{provide:Oe,useValue:He.configurationIsolate},j,le,nt,Ve]}}}wt.\u0275fac=function(He){return new(He||wt)},wt.\u0275mod=o.oAB({type:wt}),wt.\u0275inj=o.cJS({});class ft{}ft.\u0275fac=function(He){return new(He||ft)},ft.\u0275mod=o.oAB({type:ft}),ft.\u0275inj=o.cJS({});class Ct{}Ct.\u0275fac=function(He){return new(He||Ct)},Ct.\u0275mod=o.oAB({type:Ct}),Ct.\u0275inj=o.cJS({})},15861:(qe,I,p)=>{"use strict";function o(l,D,g,E,T,n,P){try{var w=l[n](P),B=w.value}catch(Y){return void g(Y)}w.done?D(B):Promise.resolve(B).then(E,T)}function e(l){return function(){var D=this,g=arguments;return new Promise(function(E,T){var n=l.apply(D,g);function P(B){o(n,E,T,P,w,"next",B)}function w(B){o(n,E,T,P,w,"throw",B)}P(void 0)})}}p.d(I,{Z:()=>e})}},qe=>{var o;o=65647,qe(qe.s=o)}]);